Skip to content

Commit ad94f27

Browse files
authored
feat: add hierarchy icons (#550)
1 parent 7a95fd5 commit ad94f27

File tree

9 files changed

+100
-3
lines changed

9 files changed

+100
-3
lines changed

.changeset/popular-taxis-lay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Add new icons: Folder, FolderFilled, FolderOpen, FolderOpenFilled, Hierarchy.

.size-limit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ module.exports = [
1919
}),
2020
);
2121
},
22-
limit: '230kB',
22+
limit: '235kB',
2323
},
2424
{
2525
name: 'Tree shaking (just a Button)',
2626
path: './dist/es/index.js',
2727
webpack: true,
2828
import: '{ Button }',
29-
limit: '37 kB',
29+
limit: '38 kB',
3030
},
3131
{
3232
name: 'Tree shaking (just an Icon)',
3333
path: './dist/es/index.js',
3434
webpack: true,
3535
import: '{ AiIcon }',
36-
limit: '27 kB',
36+
limit: '28 kB',
3737
},
3838
];

src/components/fields/RadioGroup/Radio.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ export interface CubeRadioProps
162162
inputStyles?: Styles;
163163
/* The visual type of the radio button */
164164
type?: 'button' | 'radio';
165+
value?: string;
165166
}
166167

167168
function Radio(props: CubeRadioProps, ref) {

src/icons/FolderFilledIcon.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export const FolderFilledIcon = (
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
width="16"
5+
height="16"
6+
fill="none"
7+
viewBox="0 0 16 16"
8+
>
9+
<path
10+
fill="currentColor"
11+
d="M1.386 3.041v9.918a1 1 0 0 0 1 1h11.27a1 1 0 0 0 1-1V5.23a1 1 0 0 0-1-1H8.16a1 1 0 0 1-.716-.302L5.9 2.344a1 1 0 0 0-.717-.303H2.386a1 1 0 0 0-1 1"
12+
/>
13+
</svg>
14+
);

src/icons/FolderIcon.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export const FolderIcon = (
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
width="16"
5+
height="16"
6+
fill="none"
7+
viewBox="0 0 16 16"
8+
>
9+
<path
10+
fill="currentColor"
11+
fillRule="evenodd"
12+
d="M2.286 3.251v9.498h11.429V5.343H7.98a1.25 1.25 0 0 1-.894-.376L5.41 3.25zm-1.3-.05c0-.69.56-1.25 1.25-1.25H5.43c.337 0 .659.136.894.376l1.677 1.716h5.762c.69 0 1.25.56 1.25 1.25V12.8c0 .69-.56 1.25-1.25 1.25H2.236c-.69 0-1.25-.56-1.25-1.25z"
13+
clipRule="evenodd"
14+
/>
15+
</svg>
16+
);

src/icons/FolderOpenFilledIcon.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export const FolderOpenFilledIcon = (
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
width="16"
5+
height="16"
6+
fill="none"
7+
viewBox="0 0 16 16"
8+
>
9+
<path
10+
fill="currentColor"
11+
fillRule="evenodd"
12+
d="M1.3 11.346V3.3h3.13L6.11 4.97c.233.233.55.364.88.364h5.225V7H3.569a.8.8 0 0 0-.743.505zM1.25 14C.56 14 0 13.44 0 12.75v-9.5C0 2.56.56 2 1.25 2h3.2c.331 0 .648.13.882.364l1.68 1.67h5.253c.69 0 1.25.56 1.25 1.25V7h1.539a.8.8 0 0 1 .743 1.095l-2.145 5.4a.8.8 0 0 1-.743.505z"
13+
clipRule="evenodd"
14+
/>
15+
</svg>
16+
);

src/icons/FolderOpenIcon.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export const FolderOpenIcon = (
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
width="16"
5+
height="16"
6+
fill="none"
7+
viewBox="0 0 16 16"
8+
>
9+
<path
10+
fill="currentColor"
11+
fillRule="evenodd"
12+
d="M1.3 11.059V3.3h3.13l1.68 1.671c.233.233.55.364.88.364h5.225v1.693l-8.467-.026a1 1 0 0 0-.918.596zm.696 1.641h10.233l1.942-4.366L3.94 8.303zM1.25 14C.56 14 0 13.44 0 12.75v-9.5C0 2.56.56 2 1.25 2h3.2c.331 0 .648.13.882.364l1.68 1.671h5.253c.69 0 1.25.56 1.25 1.25v1.747l1.12.003a1 1 0 0 1 .91 1.406l-2.207 4.965a1 1 0 0 1-.914.594z"
13+
clipRule="evenodd"
14+
/>
15+
</svg>
16+
);

src/icons/HierarchyIcon.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export const HierarchyIcon = (
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
width="16"
5+
height="16"
6+
fill="none"
7+
viewBox="0 0 16 16"
8+
>
9+
<path
10+
fill="currentColor"
11+
fillRule="evenodd"
12+
d="M1.637 1.25c0-.69.56-1.25 1.25-1.25h3.2c.69 0 1.25.56 1.25 1.25v2.5c0 .69-.56 1.25-1.25 1.25h-.924v1.993h3.474V6.25c0-.69.56-1.25 1.25-1.25h3.193c.69 0 1.25.56 1.25 1.25v2.5c0 .69-.56 1.25-1.25 1.25H9.887c-.69 0-1.25-.56-1.25-1.25v-.457H5.163v4.704h3.474v-.747c0-.69.56-1.25 1.25-1.25h3.193c.69 0 1.25.56 1.25 1.25v2.5c0 .69-.56 1.25-1.25 1.25H9.887c-.69 0-1.25-.56-1.25-1.25v-.453H5.113c-.69 0-1.25-.56-1.25-1.25V5h-.976c-.69 0-1.25-.56-1.25-1.25zm1.3.05v2.4h3.1V1.3zm7 5v2.4h3.093V6.3zm0 8.4v-2.4h3.093v2.4z"
13+
clipRule="evenodd"
14+
/>
15+
</svg>
16+
);

src/icons/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ import { UserGroupIcon as _UserGroupIcon } from './UserGroupIcon';
7373
import { UserLockIcon as _UserLockIcon } from './UserLockIcon';
7474
import { ShieldIcon as _ShieldIcon } from './ShieldIcon';
7575
import { ShieldFilledIcon as _ShieldFilledIcon } from './ShieldFilledIcon';
76+
import { FolderIcon as _FolderIcon } from './FolderIcon';
77+
import { FolderFilledIcon as _FolderFilledIcon } from './FolderFilledIcon';
78+
import { FolderOpenIcon as _FolderOpenIcon } from './FolderOpenIcon';
79+
import { FolderOpenFilledIcon as _FolderOpenFilledIcon } from './FolderOpenFilledIcon';
80+
import { HierarchyIcon as _HierarchyIcon } from './HierarchyIcon';
7681

7782
export const CloseIcon = wrapIcon('CloseIcon', _CloseIcon);
7883
export const ExclamationIcon = wrapIcon('ExclamationIcon', _ExclamationIcon);
@@ -172,6 +177,14 @@ export const UserGroupIcon = wrapIcon('UserGroupIcon', _UserGroupIcon);
172177
export const UserLockIcon = wrapIcon('UserLockIcon', _UserLockIcon);
173178
export const ShieldIcon = wrapIcon('ShieldIcon', _ShieldIcon);
174179
export const ShieldFilledIcon = wrapIcon('ShieldFilledIcon', _ShieldFilledIcon);
180+
export const FolderIcon = wrapIcon('FolderIcon', _FolderIcon);
181+
export const FolderFilledIcon = wrapIcon('FolderFilledIcon', _FolderFilledIcon);
182+
export const FolderOpenIcon = wrapIcon('FolderOpenIcon', _FolderOpenIcon);
183+
export const FolderOpenFilledIcon = wrapIcon(
184+
'FolderOpenFilledIcon',
185+
_FolderOpenFilledIcon,
186+
);
187+
export const HierarchyIcon = wrapIcon('HierarchyIcon', _HierarchyIcon);
175188

176189
export { IconContainer } from './IconContainer';
177190

0 commit comments

Comments
 (0)