@jordan-mace/chaser-design-system 1.2.7 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1834 -0
- package/dist/index.mjs +4729 -0
- package/dist/styles/layers.css.d.mts +6 -0
- package/dist/styles/layers.css.mjs +7 -0
- package/dist/styles/reset.css.d.mts +1 -0
- package/dist/styles/reset.css.mjs +24 -0
- package/dist/styles/sprinkles.css.d.mts +246 -0
- package/dist/styles/sprinkles.css.mjs +200 -0
- package/dist/styles/theme.css.d.mts +41 -0
- package/dist/styles/theme.css.mjs +50 -0
- package/package.json +18 -9
- package/src/components/Accordion/Accordion.tsx +21 -16
- package/src/components/Alert/Alert.tsx +11 -7
- package/src/components/Avatar/Avatar.tsx +16 -14
- package/src/components/Badge/Badge.tsx +8 -6
- package/src/components/Box/reset.css.ts +2 -2
- package/src/components/Breadcrumb/Breadcrumb.tsx +7 -10
- package/src/components/Button/Button.tsx +9 -11
- package/src/components/Card/Card.tsx +8 -10
- package/src/components/Checkbox/Checkbox.tsx +11 -8
- package/src/components/Collapse/Collapse.tsx +12 -9
- package/src/components/Combobox/Combobox.tsx +60 -31
- package/src/components/Container/Container.tsx +4 -3
- package/src/components/Divider/Divider.tsx +9 -5
- package/src/components/Drawer/Drawer.tsx +20 -13
- package/src/components/DropdownMenu/DropdownMenu.tsx +37 -15
- package/src/components/EmptyState/EmptyState.tsx +9 -12
- package/src/components/FileUpload/FileUpload.tsx +61 -45
- package/src/components/Form/Form.tsx +6 -8
- package/src/components/Grid/Grid.tsx +18 -13
- package/src/components/Icon/Icon.tsx +7 -6
- package/src/components/Input/Input.tsx +7 -8
- package/src/components/Kbd/Kbd.tsx +5 -4
- package/src/components/List/List.tsx +6 -2
- package/src/components/List/ListItem.tsx +6 -2
- package/src/components/Modal/Modal.tsx +16 -5
- package/src/components/Navbar/Navbar.tsx +2 -1
- package/src/components/Navbar/NavbarItem.tsx +2 -1
- package/src/components/NumberInput/NumberInput.tsx +29 -22
- package/src/components/Pagination/Pagination.tsx +39 -28
- package/src/components/Popover/Popover.tsx +37 -21
- package/src/components/Progress/Progress.tsx +39 -38
- package/src/components/Radio/Radio.tsx +12 -6
- package/src/components/ScrollArea/ScrollArea.tsx +9 -10
- package/src/components/Select/Select.tsx +12 -7
- package/src/components/Separator/Separator.tsx +8 -14
- package/src/components/Skeleton/Skeleton.tsx +11 -13
- package/src/components/Spinner/Spinner.tsx +15 -11
- package/src/components/Stack/Stack.tsx +34 -15
- package/src/components/Stepper/Stepper.tsx +19 -17
- package/src/components/Table/Table.tsx +31 -21
- package/src/components/Tabs/Tabs.tsx +14 -10
- package/src/components/Tag/Tag.tsx +8 -7
- package/src/components/Text/Header.tsx +6 -5
- package/src/components/Text/P.tsx +5 -4
- package/src/components/TextArea/TextArea.tsx +7 -8
- package/src/components/Toggle/Toggle.tsx +16 -7
- package/src/components/Tooltip/Tooltip.tsx +16 -11
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +7 -8
- package/src/index.ts +6 -1
- package/dist/components/Accordion/Accordion.d.ts +0 -16
- package/dist/components/Accordion/Accordion.js +0 -43
- package/dist/components/Accordion/index.d.ts +0 -1
- package/dist/components/Accordion/index.js +0 -1
- package/dist/components/Accordion/styles.css.d.ts +0 -7
- package/dist/components/Accordion/styles.css.js +0 -65
- package/dist/components/Alert/Alert.d.ts +0 -9
- package/dist/components/Alert/Alert.js +0 -8
- package/dist/components/Alert/index.d.ts +0 -1
- package/dist/components/Alert/index.js +0 -1
- package/dist/components/Alert/styles.css.d.ts +0 -4
- package/dist/components/Alert/styles.css.js +0 -54
- package/dist/components/AspectRatio/AspectRatio.d.ts +0 -9
- package/dist/components/AspectRatio/AspectRatio.js +0 -12
- package/dist/components/AspectRatio/index.d.ts +0 -2
- package/dist/components/AspectRatio/index.js +0 -1
- package/dist/components/Avatar/Avatar.d.ts +0 -11
- package/dist/components/Avatar/Avatar.js +0 -13
- package/dist/components/Avatar/index.d.ts +0 -1
- package/dist/components/Avatar/index.js +0 -1
- package/dist/components/Avatar/styles.css.d.ts +0 -4
- package/dist/components/Avatar/styles.css.js +0 -151
- package/dist/components/Badge/Badge.d.ts +0 -11
- package/dist/components/Badge/Badge.js +0 -8
- package/dist/components/Badge/index.d.ts +0 -2
- package/dist/components/Badge/index.js +0 -1
- package/dist/components/Badge/styles.css.d.ts +0 -5
- package/dist/components/Badge/styles.css.js +0 -77
- package/dist/components/Box/Box.d.ts +0 -11
- package/dist/components/Box/Box.js +0 -54
- package/dist/components/Box/index.d.ts +0 -2
- package/dist/components/Box/index.js +0 -1
- package/dist/components/Box/reset.css.d.ts +0 -1
- package/dist/components/Box/reset.css.js +0 -15
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -12
- package/dist/components/Breadcrumb/Breadcrumb.js +0 -8
- package/dist/components/Breadcrumb/index.d.ts +0 -1
- package/dist/components/Breadcrumb/index.js +0 -1
- package/dist/components/Breadcrumb/styles.css.d.ts +0 -6
- package/dist/components/Breadcrumb/styles.css.js +0 -50
- package/dist/components/Button/Button.d.ts +0 -9
- package/dist/components/Button/Button.js +0 -8
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Button/index.js +0 -1
- package/dist/components/Button/styles.css.d.ts +0 -2
- package/dist/components/Button/styles.css.js +0 -30
- package/dist/components/Card/Card.d.ts +0 -8
- package/dist/components/Card/Card.js +0 -8
- package/dist/components/Card/index.d.ts +0 -1
- package/dist/components/Card/index.js +0 -1
- package/dist/components/Card/styles.css.d.ts +0 -2
- package/dist/components/Card/styles.css.js +0 -25
- package/dist/components/Checkbox/Checkbox.d.ts +0 -6
- package/dist/components/Checkbox/Checkbox.js +0 -25
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/Checkbox/index.js +0 -1
- package/dist/components/Checkbox/styles.css.d.ts +0 -3
- package/dist/components/Checkbox/styles.css.js +0 -31
- package/dist/components/Collapse/Collapse.d.ts +0 -12
- package/dist/components/Collapse/Collapse.js +0 -56
- package/dist/components/Collapse/index.d.ts +0 -2
- package/dist/components/Collapse/index.js +0 -1
- package/dist/components/Collapse/styles.css.d.ts +0 -3
- package/dist/components/Collapse/styles.css.js +0 -36
- package/dist/components/Combobox/Combobox.d.ts +0 -23
- package/dist/components/Combobox/Combobox.js +0 -104
- package/dist/components/Combobox/index.d.ts +0 -2
- package/dist/components/Combobox/index.js +0 -1
- package/dist/components/Combobox/styles.css.d.ts +0 -13
- package/dist/components/Combobox/styles.css.js +0 -142
- package/dist/components/Container/Container.d.ts +0 -11
- package/dist/components/Container/Container.js +0 -21
- package/dist/components/Container/index.d.ts +0 -2
- package/dist/components/Container/index.js +0 -1
- package/dist/components/Divider/Divider.d.ts +0 -9
- package/dist/components/Divider/Divider.js +0 -8
- package/dist/components/Divider/index.d.ts +0 -2
- package/dist/components/Divider/index.js +0 -1
- package/dist/components/Divider/styles.css.d.ts +0 -4
- package/dist/components/Divider/styles.css.js +0 -41
- package/dist/components/Drawer/Drawer.d.ts +0 -16
- package/dist/components/Drawer/Drawer.js +0 -65
- package/dist/components/Drawer/index.d.ts +0 -2
- package/dist/components/Drawer/index.js +0 -1
- package/dist/components/Drawer/styles.css.d.ts +0 -8
- package/dist/components/Drawer/styles.css.js +0 -125
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -23
- package/dist/components/DropdownMenu/DropdownMenu.js +0 -43
- package/dist/components/DropdownMenu/index.d.ts +0 -2
- package/dist/components/DropdownMenu/index.js +0 -1
- package/dist/components/DropdownMenu/styles.css.d.ts +0 -9
- package/dist/components/DropdownMenu/styles.css.js +0 -93
- package/dist/components/EmptyState/EmptyState.d.ts +0 -10
- package/dist/components/EmptyState/EmptyState.js +0 -8
- package/dist/components/EmptyState/index.d.ts +0 -2
- package/dist/components/EmptyState/index.js +0 -1
- package/dist/components/EmptyState/styles.css.d.ts +0 -5
- package/dist/components/EmptyState/styles.css.js +0 -30
- package/dist/components/FileUpload/FileUpload.d.ts +0 -27
- package/dist/components/FileUpload/FileUpload.js +0 -102
- package/dist/components/FileUpload/index.d.ts +0 -2
- package/dist/components/FileUpload/index.js +0 -1
- package/dist/components/FileUpload/styles.css.d.ts +0 -19
- package/dist/components/FileUpload/styles.css.js +0 -145
- package/dist/components/Form/Form.d.ts +0 -7
- package/dist/components/Form/Form.js +0 -8
- package/dist/components/Form/FormInput.d.ts +0 -5
- package/dist/components/Form/FormInput.js +0 -9
- package/dist/components/Form/index.d.ts +0 -2
- package/dist/components/Form/index.js +0 -2
- package/dist/components/Form/styles.css.d.ts +0 -2
- package/dist/components/Form/styles.css.js +0 -11
- package/dist/components/Grid/Grid.d.ts +0 -13
- package/dist/components/Grid/Grid.js +0 -25
- package/dist/components/Grid/index.d.ts +0 -2
- package/dist/components/Grid/index.js +0 -1
- package/dist/components/Icon/Icon.d.ts +0 -12
- package/dist/components/Icon/Icon.js +0 -21
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Icon/index.js +0 -1
- package/dist/components/Icon/styles.css.d.ts +0 -1
- package/dist/components/Icon/styles.css.js +0 -9
- package/dist/components/Input/Input.d.ts +0 -7
- package/dist/components/Input/Input.js +0 -9
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Input/index.js +0 -1
- package/dist/components/Input/styles.css.d.ts +0 -2
- package/dist/components/Input/styles.css.js +0 -8
- package/dist/components/Kbd/Kbd.d.ts +0 -7
- package/dist/components/Kbd/Kbd.js +0 -6
- package/dist/components/Kbd/index.d.ts +0 -2
- package/dist/components/Kbd/index.js +0 -1
- package/dist/components/Kbd/styles.css.d.ts +0 -1
- package/dist/components/Kbd/styles.css.js +0 -16
- package/dist/components/List/List.d.ts +0 -5
- package/dist/components/List/List.js +0 -7
- package/dist/components/List/ListItem.d.ts +0 -5
- package/dist/components/List/ListItem.js +0 -7
- package/dist/components/List/index.d.ts +0 -2
- package/dist/components/List/index.js +0 -2
- package/dist/components/List/styles.css.d.ts +0 -2
- package/dist/components/List/styles.css.js +0 -11
- package/dist/components/Modal/Modal.d.ts +0 -13
- package/dist/components/Modal/Modal.js +0 -35
- package/dist/components/Modal/index.d.ts +0 -2
- package/dist/components/Modal/index.js +0 -1
- package/dist/components/Modal/styles.css.d.ts +0 -7
- package/dist/components/Modal/styles.css.js +0 -92
- package/dist/components/Navbar/Navbar.d.ts +0 -6
- package/dist/components/Navbar/Navbar.js +0 -8
- package/dist/components/Navbar/NavbarItem.d.ts +0 -6
- package/dist/components/Navbar/NavbarItem.js +0 -8
- package/dist/components/Navbar/index.d.ts +0 -2
- package/dist/components/Navbar/index.js +0 -2
- package/dist/components/Navbar/styles.css.d.ts +0 -2
- package/dist/components/Navbar/styles.css.js +0 -3
- package/dist/components/NumberInput/NumberInput.d.ts +0 -20
- package/dist/components/NumberInput/NumberInput.js +0 -39
- package/dist/components/NumberInput/index.d.ts +0 -2
- package/dist/components/NumberInput/index.js +0 -1
- package/dist/components/NumberInput/styles.css.d.ts +0 -10
- package/dist/components/NumberInput/styles.css.js +0 -117
- package/dist/components/Pagination/Pagination.d.ts +0 -10
- package/dist/components/Pagination/Pagination.js +0 -47
- package/dist/components/Pagination/index.d.ts +0 -2
- package/dist/components/Pagination/index.js +0 -1
- package/dist/components/Pagination/styles.css.d.ts +0 -4
- package/dist/components/Pagination/styles.css.js +0 -44
- package/dist/components/Popover/Popover.d.ts +0 -18
- package/dist/components/Popover/Popover.js +0 -55
- package/dist/components/Popover/index.d.ts +0 -2
- package/dist/components/Popover/index.js +0 -1
- package/dist/components/Popover/styles.css.d.ts +0 -11
- package/dist/components/Popover/styles.css.js +0 -185
- package/dist/components/Progress/Progress.d.ts +0 -10
- package/dist/components/Progress/Progress.js +0 -9
- package/dist/components/Progress/index.d.ts +0 -1
- package/dist/components/Progress/index.js +0 -1
- package/dist/components/Progress/styles.css.d.ts +0 -4
- package/dist/components/Progress/styles.css.js +0 -71
- package/dist/components/Radio/Radio.d.ts +0 -16
- package/dist/components/Radio/Radio.js +0 -25
- package/dist/components/Radio/index.d.ts +0 -1
- package/dist/components/Radio/index.js +0 -1
- package/dist/components/Radio/styles.css.d.ts +0 -5
- package/dist/components/Radio/styles.css.js +0 -42
- package/dist/components/ScrollArea/ScrollArea.d.ts +0 -11
- package/dist/components/ScrollArea/ScrollArea.js +0 -12
- package/dist/components/ScrollArea/index.d.ts +0 -2
- package/dist/components/ScrollArea/index.js +0 -1
- package/dist/components/ScrollArea/styles.css.d.ts +0 -3
- package/dist/components/ScrollArea/styles.css.js +0 -25
- package/dist/components/Select/Select.d.ts +0 -13
- package/dist/components/Select/Select.js +0 -10
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/Select/index.js +0 -1
- package/dist/components/Select/styles.css.d.ts +0 -4
- package/dist/components/Select/styles.css.js +0 -82
- package/dist/components/Separator/Separator.d.ts +0 -8
- package/dist/components/Separator/Separator.js +0 -8
- package/dist/components/Separator/index.d.ts +0 -2
- package/dist/components/Separator/index.js +0 -1
- package/dist/components/Separator/styles.css.d.ts +0 -4
- package/dist/components/Separator/styles.css.js +0 -28
- package/dist/components/Skeleton/Skeleton.d.ts +0 -14
- package/dist/components/Skeleton/Skeleton.js +0 -13
- package/dist/components/Skeleton/index.d.ts +0 -2
- package/dist/components/Skeleton/index.js +0 -1
- package/dist/components/Skeleton/styles.css.d.ts +0 -4
- package/dist/components/Skeleton/styles.css.js +0 -56
- package/dist/components/Spinner/Spinner.d.ts +0 -10
- package/dist/components/Spinner/Spinner.js +0 -8
- package/dist/components/Spinner/index.d.ts +0 -2
- package/dist/components/Spinner/index.js +0 -1
- package/dist/components/Spinner/styles.css.d.ts +0 -4
- package/dist/components/Spinner/styles.css.js +0 -55
- package/dist/components/Stack/Stack.d.ts +0 -16
- package/dist/components/Stack/Stack.js +0 -24
- package/dist/components/Stack/index.d.ts +0 -2
- package/dist/components/Stack/index.js +0 -1
- package/dist/components/Stepper/Stepper.d.ts +0 -18
- package/dist/components/Stepper/Stepper.js +0 -25
- package/dist/components/Stepper/index.d.ts +0 -2
- package/dist/components/Stepper/index.js +0 -1
- package/dist/components/Stepper/styles.css.d.ts +0 -14
- package/dist/components/Stepper/styles.css.js +0 -104
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -39
- package/dist/components/Table/index.d.ts +0 -1
- package/dist/components/Table/index.js +0 -1
- package/dist/components/Table/styles.css.d.ts +0 -8
- package/dist/components/Table/styles.css.js +0 -49
- package/dist/components/Tabs/Tabs.d.ts +0 -29
- package/dist/components/Tabs/Tabs.js +0 -52
- package/dist/components/Tabs/index.d.ts +0 -1
- package/dist/components/Tabs/index.js +0 -1
- package/dist/components/Tabs/styles.css.d.ts +0 -6
- package/dist/components/Tabs/styles.css.js +0 -100
- package/dist/components/Tag/Tag.d.ts +0 -16
- package/dist/components/Tag/Tag.js +0 -18
- package/dist/components/Tag/index.d.ts +0 -1
- package/dist/components/Tag/index.js +0 -1
- package/dist/components/Tag/styles.css.d.ts +0 -3
- package/dist/components/Tag/styles.css.js +0 -93
- package/dist/components/Text/Header.d.ts +0 -8
- package/dist/components/Text/Header.js +0 -8
- package/dist/components/Text/P.d.ts +0 -7
- package/dist/components/Text/P.js +0 -8
- package/dist/components/Text/index.d.ts +0 -2
- package/dist/components/Text/index.js +0 -2
- package/dist/components/Text/styles.css.d.ts +0 -2
- package/dist/components/Text/styles.css.js +0 -13
- package/dist/components/TextArea/TextArea.d.ts +0 -7
- package/dist/components/TextArea/TextArea.js +0 -9
- package/dist/components/TextArea/index.d.ts +0 -2
- package/dist/components/TextArea/index.js +0 -1
- package/dist/components/TextArea/styles.css.d.ts +0 -2
- package/dist/components/TextArea/styles.css.js +0 -10
- package/dist/components/Toast/Toast.d.ts +0 -34
- package/dist/components/Toast/Toast.js +0 -177
- package/dist/components/Toast/index.d.ts +0 -1
- package/dist/components/Toast/index.js +0 -1
- package/dist/components/Toast/styles.css.d.ts +0 -21
- package/dist/components/Toast/styles.css.js +0 -192
- package/dist/components/Toggle/Toggle.d.ts +0 -10
- package/dist/components/Toggle/Toggle.js +0 -17
- package/dist/components/Toggle/index.d.ts +0 -2
- package/dist/components/Toggle/index.js +0 -1
- package/dist/components/Toggle/styles.css.d.ts +0 -12
- package/dist/components/Toggle/styles.css.js +0 -118
- package/dist/components/Tooltip/Tooltip.d.ts +0 -10
- package/dist/components/Tooltip/Tooltip.js +0 -16
- package/dist/components/Tooltip/index.d.ts +0 -2
- package/dist/components/Tooltip/index.js +0 -1
- package/dist/components/Tooltip/styles.css.d.ts +0 -8
- package/dist/components/Tooltip/styles.css.js +0 -86
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +0 -8
- package/dist/components/VisuallyHidden/VisuallyHidden.js +0 -9
- package/dist/components/VisuallyHidden/index.d.ts +0 -2
- package/dist/components/VisuallyHidden/index.js +0 -1
- package/dist/components/VisuallyHidden/styles.css.d.ts +0 -1
- package/dist/components/VisuallyHidden/styles.css.js +0 -12
- package/dist/components/index.d.ts +0 -68
- package/dist/components/index.js +0 -47
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/styles/layers.css.d.ts +0 -3
- package/dist/styles/layers.css.js +0 -3
- package/dist/styles/sprinkles.css.d.ts +0 -241
- package/dist/styles/sprinkles.css.js +0 -165
- package/dist/styles/theme.css.d.ts +0 -38
- package/dist/styles/theme.css.js +0 -51
- package/dist/styles/utils.d.ts +0 -2
- package/dist/styles/utils.js +0 -7
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jordan-mace/chaser-design-system",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
|
+
"*.css.mjs",
|
|
6
7
|
"*.css.js"
|
|
7
8
|
],
|
|
8
9
|
"repository": {
|
|
@@ -11,16 +12,24 @@
|
|
|
11
12
|
},
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
14
|
-
"types": "./dist/index.d.
|
|
15
|
-
"import": "./dist/index.
|
|
15
|
+
"types": "./dist/index.d.mts",
|
|
16
|
+
"import": "./dist/index.mjs"
|
|
16
17
|
},
|
|
17
18
|
"./layers.css": {
|
|
18
|
-
"types": "./dist/styles/layers.css.d.
|
|
19
|
-
"import": "./dist/styles/layers.css.
|
|
19
|
+
"types": "./dist/styles/layers.css.d.mts",
|
|
20
|
+
"import": "./dist/styles/layers.css.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./reset.css": {
|
|
23
|
+
"types": "./dist/styles/reset.css.d.mts",
|
|
24
|
+
"import": "./dist/styles/reset.css.mjs"
|
|
20
25
|
},
|
|
21
26
|
"./theme.css": {
|
|
22
|
-
"types": "./dist/styles/theme.css.d.
|
|
23
|
-
"import": "./dist/styles/theme.css.
|
|
27
|
+
"types": "./dist/styles/theme.css.d.mts",
|
|
28
|
+
"import": "./dist/styles/theme.css.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./sprinkles.css": {
|
|
31
|
+
"types": "./dist/styles/sprinkles.css.d.mts",
|
|
32
|
+
"import": "./dist/styles/sprinkles.css.mjs"
|
|
24
33
|
}
|
|
25
34
|
},
|
|
26
35
|
"files": [
|
|
@@ -75,8 +84,8 @@
|
|
|
75
84
|
"@rsbuild/core": "^1.6.14"
|
|
76
85
|
},
|
|
77
86
|
"scripts": {
|
|
78
|
-
"build": "
|
|
79
|
-
"dev": "
|
|
87
|
+
"build": "tsdown src/index.ts src/styles/layers.css.ts src/styles/reset.css.ts src/styles/theme.css.ts src/styles/sprinkles.css.ts --format esm --dts --clean",
|
|
88
|
+
"dev": "tsdown src/index.ts src/styles/layers.css.ts src/styles/reset.css.ts src/styles/theme.css.ts src/styles/sprinkles.css.ts --format esm --dts --watch",
|
|
80
89
|
"format": "prettier --write .",
|
|
81
90
|
"lint": "eslint .",
|
|
82
91
|
"test": "vitest --config=vitest.browser.config.ts",
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
accordionGroup,
|
|
10
10
|
} from './styles.css';
|
|
11
11
|
import Box from '../Box';
|
|
12
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
12
13
|
|
|
13
14
|
type AccordionContextType = {
|
|
14
15
|
allowMultiple?: boolean;
|
|
@@ -22,16 +23,16 @@ const AccordionContext = createContext<AccordionContextType>({
|
|
|
22
23
|
toggleItem: () => {},
|
|
23
24
|
});
|
|
24
25
|
|
|
25
|
-
type AccordionProps =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
26
|
+
type AccordionProps = React.HTMLAttributes<HTMLDivElement> &
|
|
27
|
+
Sprinkles & {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
allowMultiple?: boolean;
|
|
30
|
+
};
|
|
30
31
|
|
|
31
32
|
const Accordion = ({
|
|
32
33
|
children,
|
|
33
34
|
allowMultiple = false,
|
|
34
|
-
|
|
35
|
+
...props
|
|
35
36
|
}: AccordionProps) => {
|
|
36
37
|
const [expandedItems, setExpandedItems] = useState<Set<string>>(new Set());
|
|
37
38
|
|
|
@@ -52,10 +53,13 @@ const Accordion = ({
|
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
return (
|
|
55
|
-
<AccordionContext.Provider
|
|
56
|
+
<AccordionContext.Provider
|
|
57
|
+
value={{ allowMultiple, expandedItems, toggleItem }}
|
|
58
|
+
>
|
|
56
59
|
<Box
|
|
57
|
-
className={clsx(accordionGroup, className)}
|
|
60
|
+
className={clsx(accordionGroup, props.className)}
|
|
58
61
|
width="100%"
|
|
62
|
+
{...props}
|
|
59
63
|
>
|
|
60
64
|
{children}
|
|
61
65
|
</Box>
|
|
@@ -63,18 +67,18 @@ const Accordion = ({
|
|
|
63
67
|
);
|
|
64
68
|
};
|
|
65
69
|
|
|
66
|
-
type AccordionItemProps =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
70
|
+
type AccordionItemProps = React.HTMLAttributes<HTMLDivElement> &
|
|
71
|
+
Sprinkles & {
|
|
72
|
+
value: string;
|
|
73
|
+
title: string;
|
|
74
|
+
children: React.ReactNode;
|
|
75
|
+
};
|
|
72
76
|
|
|
73
77
|
const AccordionItem = ({
|
|
74
78
|
value,
|
|
75
79
|
title,
|
|
76
80
|
children,
|
|
77
|
-
|
|
81
|
+
...props
|
|
78
82
|
}: AccordionItemProps) => {
|
|
79
83
|
const { expandedItems, toggleItem } = useContext(AccordionContext);
|
|
80
84
|
const isExpanded = expandedItems.has(value);
|
|
@@ -86,12 +90,13 @@ const AccordionItem = ({
|
|
|
86
90
|
return (
|
|
87
91
|
<Box
|
|
88
92
|
as="div"
|
|
89
|
-
className={clsx(accordionItem, className)}
|
|
93
|
+
className={clsx(accordionItem, props.className)}
|
|
90
94
|
width="100%"
|
|
91
95
|
marginBottom="small"
|
|
92
96
|
border="small"
|
|
93
97
|
borderRadius="large"
|
|
94
98
|
overflow="hidden"
|
|
99
|
+
{...props}
|
|
95
100
|
>
|
|
96
101
|
<Box
|
|
97
102
|
as="button"
|
|
@@ -7,13 +7,15 @@ import {
|
|
|
7
7
|
} from './styles.css';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Box from '../Box';
|
|
10
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
10
11
|
|
|
11
|
-
type AlertProps = React.HTMLAttributes<HTMLDivElement> &
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
type AlertProps = React.HTMLAttributes<HTMLDivElement> &
|
|
13
|
+
Sprinkles & {
|
|
14
|
+
severity?: 'success' | 'warning' | 'error' | 'info';
|
|
15
|
+
dismissible?: boolean;
|
|
16
|
+
onDismiss?: () => void;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
};
|
|
17
19
|
|
|
18
20
|
const Alert = ({
|
|
19
21
|
severity = 'info',
|
|
@@ -29,7 +31,9 @@ const Alert = ({
|
|
|
29
31
|
className={clsx(alert, alertVariants[severity], props.className)}
|
|
30
32
|
{...props}
|
|
31
33
|
>
|
|
32
|
-
<Box as="div" className={alertContent}>
|
|
34
|
+
<Box as="div" className={alertContent}>
|
|
35
|
+
{children}
|
|
36
|
+
</Box>
|
|
33
37
|
{dismissible && onDismiss && (
|
|
34
38
|
<Box
|
|
35
39
|
as="button"
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
avatar,
|
|
5
|
+
avatarImage,
|
|
6
|
+
avatarWithImage,
|
|
7
|
+
avatarWrapper,
|
|
8
|
+
} from './styles.css';
|
|
4
9
|
import Box from '../Box';
|
|
10
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
5
11
|
|
|
6
|
-
type AvatarProps =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
12
|
+
type AvatarProps = React.HTMLAttributes<HTMLDivElement> &
|
|
13
|
+
Sprinkles & {
|
|
14
|
+
alt?: string;
|
|
15
|
+
src?: string;
|
|
16
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
fallback?: string;
|
|
19
|
+
};
|
|
14
20
|
|
|
15
21
|
const Avatar = ({
|
|
16
22
|
alt,
|
|
@@ -38,11 +44,7 @@ const Avatar = ({
|
|
|
38
44
|
const initials = children || fallback;
|
|
39
45
|
|
|
40
46
|
return (
|
|
41
|
-
<Box
|
|
42
|
-
className={clsx(sizeClass, className)}
|
|
43
|
-
role="img"
|
|
44
|
-
aria-label={alt}
|
|
45
|
-
>
|
|
47
|
+
<Box className={clsx(sizeClass, className)} role="img" aria-label={alt}>
|
|
46
48
|
{initials}
|
|
47
49
|
</Box>
|
|
48
50
|
);
|
|
@@ -8,16 +8,18 @@ import {
|
|
|
8
8
|
} from './styles.css';
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import Box from '../Box';
|
|
11
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
11
12
|
|
|
12
13
|
export type BadgeVariant = 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
13
14
|
export type BadgeSize = 'small' | 'medium' | 'large';
|
|
14
15
|
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> &
|
|
17
|
+
Sprinkles & {
|
|
18
|
+
variant?: BadgeVariant;
|
|
19
|
+
size?: BadgeSize;
|
|
20
|
+
dot?: boolean;
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
};
|
|
21
23
|
|
|
22
24
|
const Badge = ({
|
|
23
25
|
variant = 'default',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import {
|
|
2
|
+
import { resetLayer } from '../../styles/layers.css';
|
|
3
3
|
|
|
4
4
|
export const reset = style({
|
|
5
5
|
'@layer': {
|
|
6
|
-
[
|
|
6
|
+
[resetLayer]: {
|
|
7
7
|
margin: 0,
|
|
8
8
|
padding: 0,
|
|
9
9
|
border: 0,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
breadcrumbCurrent,
|
|
10
10
|
} from './styles.css';
|
|
11
11
|
import Box from '../Box';
|
|
12
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
12
13
|
|
|
13
14
|
type BreadcrumbItem = {
|
|
14
15
|
label: string;
|
|
@@ -16,17 +17,13 @@ type BreadcrumbItem = {
|
|
|
16
17
|
current?: boolean;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
type BreadcrumbProps =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
20
|
+
type BreadcrumbProps = React.HTMLAttributes<HTMLDivElement> &
|
|
21
|
+
Sprinkles & {
|
|
22
|
+
items: BreadcrumbItem[];
|
|
23
|
+
separator?: string;
|
|
24
|
+
};
|
|
24
25
|
|
|
25
|
-
const Breadcrumb = ({
|
|
26
|
-
items,
|
|
27
|
-
className,
|
|
28
|
-
separator = '/',
|
|
29
|
-
}: BreadcrumbProps) => {
|
|
26
|
+
const Breadcrumb = ({ items, className, separator = '/' }: BreadcrumbProps) => {
|
|
30
27
|
return (
|
|
31
28
|
<Box
|
|
32
29
|
as="nav"
|
|
@@ -2,13 +2,15 @@ import clsx from 'clsx';
|
|
|
2
2
|
import { button, buttonVariants } from './styles.css';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Box from '../Box';
|
|
5
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
5
6
|
|
|
6
|
-
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
|
|
8
|
+
Sprinkles & {
|
|
9
|
+
variant: 'primary' | 'secondary';
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
label?: string;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
};
|
|
12
14
|
|
|
13
15
|
const Button = ({ label, ...props }: ButtonProps) => {
|
|
14
16
|
return (
|
|
@@ -16,11 +18,7 @@ const Button = ({ label, ...props }: ButtonProps) => {
|
|
|
16
18
|
as="button"
|
|
17
19
|
borderRadius="large"
|
|
18
20
|
width={props.fullWidth ? '100%' : undefined}
|
|
19
|
-
className={clsx(
|
|
20
|
-
buttonVariants[props.variant],
|
|
21
|
-
button,
|
|
22
|
-
props.className,
|
|
23
|
-
)}
|
|
21
|
+
className={clsx(buttonVariants[props.variant], button, props.className)}
|
|
24
22
|
{...props}
|
|
25
23
|
>
|
|
26
24
|
{props.children || label}
|
|
@@ -2,12 +2,14 @@ import clsx from 'clsx';
|
|
|
2
2
|
import { card, cardVariants } from './styles.css';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Box from '../Box';
|
|
5
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
5
6
|
|
|
6
|
-
type CardProps = React.HTMLAttributes<HTMLDivElement> &
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
type CardProps = React.HTMLAttributes<HTMLDivElement> &
|
|
8
|
+
Sprinkles & {
|
|
9
|
+
variant?: 'elevated' | 'outlined' | 'filled';
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
padding?: 'none' | 'small' | 'medium' | 'large';
|
|
12
|
+
};
|
|
11
13
|
|
|
12
14
|
const Card = ({
|
|
13
15
|
variant = 'elevated',
|
|
@@ -19,11 +21,7 @@ const Card = ({
|
|
|
19
21
|
as="div"
|
|
20
22
|
borderRadius="large"
|
|
21
23
|
padding={padding !== 'none' ? padding : undefined}
|
|
22
|
-
className={clsx(
|
|
23
|
-
cardVariants[variant],
|
|
24
|
-
card,
|
|
25
|
-
props.className,
|
|
26
|
-
)}
|
|
24
|
+
className={clsx(cardVariants[variant], card, props.className)}
|
|
27
25
|
{...props}
|
|
28
26
|
>
|
|
29
27
|
{props.children}
|
|
@@ -2,14 +2,13 @@ import clsx from 'clsx';
|
|
|
2
2
|
import React, { forwardRef, useEffect, useRef } from 'react';
|
|
3
3
|
import { checkboxContainer, checkboxInput, checkboxLabel } from './styles.css';
|
|
4
4
|
import Box from '../Box';
|
|
5
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
5
6
|
|
|
6
|
-
type CheckboxProps = Omit<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
indeterminate?: boolean;
|
|
12
|
-
};
|
|
7
|
+
type CheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> &
|
|
8
|
+
Sprinkles & {
|
|
9
|
+
label?: string;
|
|
10
|
+
indeterminate?: boolean;
|
|
11
|
+
};
|
|
13
12
|
|
|
14
13
|
const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
|
|
15
14
|
({ label, className, indeterminate, ...props }, ref) => {
|
|
@@ -47,7 +46,11 @@ const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
|
|
|
47
46
|
style={{ width: '18px', height: '18px' }}
|
|
48
47
|
{...props}
|
|
49
48
|
/>
|
|
50
|
-
{label &&
|
|
49
|
+
{label && (
|
|
50
|
+
<Box as="span" className={checkboxLabel}>
|
|
51
|
+
{label}
|
|
52
|
+
</Box>
|
|
53
|
+
)}
|
|
51
54
|
</Box>
|
|
52
55
|
);
|
|
53
56
|
},
|
|
@@ -6,17 +6,18 @@ import {
|
|
|
6
6
|
collapseAnimation,
|
|
7
7
|
} from './styles.css';
|
|
8
8
|
import Box from '../Box';
|
|
9
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
9
10
|
|
|
10
11
|
export type CollapseAnimation = 'height' | 'opacity' | 'both';
|
|
11
12
|
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
13
|
+
export type CollapseProps = React.HTMLAttributes<HTMLDivElement> &
|
|
14
|
+
Sprinkles & {
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
animation?: CollapseAnimation;
|
|
18
|
+
duration?: number;
|
|
19
|
+
onAnimationEnd?: () => void;
|
|
20
|
+
};
|
|
20
21
|
|
|
21
22
|
const Collapse = ({
|
|
22
23
|
isOpen,
|
|
@@ -26,7 +27,9 @@ const Collapse = ({
|
|
|
26
27
|
className,
|
|
27
28
|
onAnimationEnd,
|
|
28
29
|
}: CollapseProps) => {
|
|
29
|
-
const [height, setHeight] = useState<number | undefined>(
|
|
30
|
+
const [height, setHeight] = useState<number | undefined>(
|
|
31
|
+
isOpen ? undefined : 0,
|
|
32
|
+
);
|
|
30
33
|
const [isAnimating, setIsAnimating] = useState(false);
|
|
31
34
|
const contentRef = useRef<HTMLDivElement>(null);
|
|
32
35
|
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
comboboxErrorMessage,
|
|
17
17
|
} from './styles.css';
|
|
18
18
|
import Box from '../Box';
|
|
19
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
19
20
|
|
|
20
21
|
export interface ComboboxOption {
|
|
21
22
|
value: string;
|
|
@@ -23,23 +24,30 @@ export interface ComboboxOption {
|
|
|
23
24
|
disabled?: boolean;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
export type ComboboxProps = Omit<
|
|
28
|
+
React.InputHTMLAttributes<HTMLInputElement>,
|
|
29
|
+
'onChange' | 'value'
|
|
30
|
+
> &
|
|
31
|
+
Sprinkles & {
|
|
32
|
+
label?: string;
|
|
33
|
+
options: ComboboxOption[];
|
|
34
|
+
value?: string;
|
|
35
|
+
onChange?: (value: string, option: ComboboxOption | null) => void;
|
|
36
|
+
onInputChange?: (inputValue: string) => void;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
hint?: string;
|
|
39
|
+
error?: boolean;
|
|
40
|
+
errorMessage?: string;
|
|
41
|
+
fullWidth?: boolean;
|
|
42
|
+
clearable?: boolean;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
filterFn?: (option: ComboboxOption, inputValue: string) => boolean;
|
|
45
|
+
};
|
|
41
46
|
|
|
42
|
-
const defaultFilterFn = (
|
|
47
|
+
const defaultFilterFn = (
|
|
48
|
+
option: ComboboxOption,
|
|
49
|
+
inputValue: string,
|
|
50
|
+
): boolean => {
|
|
43
51
|
return option.label.toLowerCase().includes(inputValue.toLowerCase());
|
|
44
52
|
};
|
|
45
53
|
|
|
@@ -66,7 +74,7 @@ const Combobox = ({
|
|
|
66
74
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
67
75
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
68
76
|
|
|
69
|
-
const selectedOption = options.find(opt => opt.value === value);
|
|
77
|
+
const selectedOption = options.find((opt) => opt.value === value);
|
|
70
78
|
|
|
71
79
|
useEffect(() => {
|
|
72
80
|
if (selectedOption) {
|
|
@@ -76,11 +84,16 @@ const Combobox = ({
|
|
|
76
84
|
}
|
|
77
85
|
}, [selectedOption, isOpen]);
|
|
78
86
|
|
|
79
|
-
const filteredOptions = options.filter(option =>
|
|
87
|
+
const filteredOptions = options.filter((option) =>
|
|
88
|
+
filterFn(option, inputValue),
|
|
89
|
+
);
|
|
80
90
|
|
|
81
91
|
useEffect(() => {
|
|
82
92
|
const handleClickOutside = (event: MouseEvent) => {
|
|
83
|
-
if (
|
|
93
|
+
if (
|
|
94
|
+
containerRef.current &&
|
|
95
|
+
!containerRef.current.contains(event.target as Node)
|
|
96
|
+
) {
|
|
84
97
|
setIsOpen(false);
|
|
85
98
|
if (selectedOption) {
|
|
86
99
|
setInputValue(selectedOption.label);
|
|
@@ -108,7 +121,7 @@ const Combobox = ({
|
|
|
108
121
|
|
|
109
122
|
const handleOptionClick = (option: ComboboxOption) => {
|
|
110
123
|
if (option.disabled) return;
|
|
111
|
-
|
|
124
|
+
|
|
112
125
|
setInputValue(option.label);
|
|
113
126
|
setIsOpen(false);
|
|
114
127
|
onChange?.(option.value, option);
|
|
@@ -131,17 +144,21 @@ const Combobox = ({
|
|
|
131
144
|
if (!isOpen) {
|
|
132
145
|
setIsOpen(true);
|
|
133
146
|
}
|
|
134
|
-
setHighlightedIndex(prev =>
|
|
135
|
-
prev < filteredOptions.length - 1 ? prev + 1 : prev
|
|
147
|
+
setHighlightedIndex((prev) =>
|
|
148
|
+
prev < filteredOptions.length - 1 ? prev + 1 : prev,
|
|
136
149
|
);
|
|
137
150
|
break;
|
|
138
151
|
case 'ArrowUp':
|
|
139
152
|
e.preventDefault();
|
|
140
|
-
setHighlightedIndex(prev => (prev > 0 ? prev - 1 : prev));
|
|
153
|
+
setHighlightedIndex((prev) => (prev > 0 ? prev - 1 : prev));
|
|
141
154
|
break;
|
|
142
155
|
case 'Enter':
|
|
143
156
|
e.preventDefault();
|
|
144
|
-
if (
|
|
157
|
+
if (
|
|
158
|
+
isOpen &&
|
|
159
|
+
highlightedIndex >= 0 &&
|
|
160
|
+
filteredOptions[highlightedIndex]
|
|
161
|
+
) {
|
|
145
162
|
handleOptionClick(filteredOptions[highlightedIndex]);
|
|
146
163
|
} else {
|
|
147
164
|
setIsOpen(!isOpen);
|
|
@@ -158,16 +175,21 @@ const Combobox = ({
|
|
|
158
175
|
}
|
|
159
176
|
};
|
|
160
177
|
|
|
161
|
-
const displayValue =
|
|
178
|
+
const displayValue =
|
|
179
|
+
selectedOption && !isOpen ? selectedOption.label : inputValue;
|
|
162
180
|
|
|
163
181
|
return (
|
|
164
|
-
<Box
|
|
182
|
+
<Box
|
|
183
|
+
className={comboboxContainer}
|
|
184
|
+
ref={containerRef}
|
|
185
|
+
width={fullWidth ? '100%' : undefined}
|
|
186
|
+
>
|
|
165
187
|
{label && (
|
|
166
188
|
<Box as="label" className={comboboxLabel}>
|
|
167
189
|
{label}
|
|
168
190
|
</Box>
|
|
169
191
|
)}
|
|
170
|
-
|
|
192
|
+
|
|
171
193
|
<Box position="relative">
|
|
172
194
|
<Box
|
|
173
195
|
as="input"
|
|
@@ -188,10 +210,14 @@ const Combobox = ({
|
|
|
188
210
|
aria-expanded={isOpen}
|
|
189
211
|
aria-autocomplete="list"
|
|
190
212
|
aria-controls={isOpen ? 'combobox-listbox' : undefined}
|
|
191
|
-
aria-activedescendant={
|
|
213
|
+
aria-activedescendant={
|
|
214
|
+
highlightedIndex >= 0
|
|
215
|
+
? `option-${filteredOptions[highlightedIndex]?.value}`
|
|
216
|
+
: undefined
|
|
217
|
+
}
|
|
192
218
|
{...props}
|
|
193
219
|
/>
|
|
194
|
-
|
|
220
|
+
|
|
195
221
|
{clearable && inputValue && !disabled && (
|
|
196
222
|
<Box
|
|
197
223
|
as="button"
|
|
@@ -203,7 +229,7 @@ const Combobox = ({
|
|
|
203
229
|
×
|
|
204
230
|
</Box>
|
|
205
231
|
)}
|
|
206
|
-
|
|
232
|
+
|
|
207
233
|
<Box className={comboboxArrow} aria-hidden="true">
|
|
208
234
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor">
|
|
209
235
|
<path d="M6 8L1 3h10z" />
|
|
@@ -238,7 +264,10 @@ const Combobox = ({
|
|
|
238
264
|
aria-selected={option.value === value}
|
|
239
265
|
aria-disabled={option.disabled}
|
|
240
266
|
style={{
|
|
241
|
-
backgroundColor:
|
|
267
|
+
backgroundColor:
|
|
268
|
+
index === highlightedIndex
|
|
269
|
+
? 'var(--highlight-color, #f3f4f6)'
|
|
270
|
+
: undefined,
|
|
242
271
|
}}
|
|
243
272
|
>
|
|
244
273
|
{option.label}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import Box from '../Box';
|
|
3
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
3
4
|
|
|
4
5
|
export type ContainerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
5
6
|
|
|
6
|
-
export
|
|
7
|
+
export type ContainerProps = Sprinkles & {
|
|
7
8
|
size?: ContainerSize;
|
|
8
9
|
centerContent?: boolean;
|
|
9
10
|
children?: React.ReactNode;
|
|
10
11
|
className?: string;
|
|
11
12
|
style?: React.CSSProperties;
|
|
12
|
-
}
|
|
13
|
+
};
|
|
13
14
|
|
|
14
15
|
const sizeMap: Record<ContainerSize, string> = {
|
|
15
16
|
sm: '640px',
|
|
@@ -39,7 +40,7 @@ const Container = forwardRef<HTMLElement, ContainerProps>(
|
|
|
39
40
|
{children}
|
|
40
41
|
</Box>
|
|
41
42
|
);
|
|
42
|
-
}
|
|
43
|
+
},
|
|
43
44
|
);
|
|
44
45
|
|
|
45
46
|
Container.displayName = 'Container';
|
|
@@ -7,14 +7,16 @@ import {
|
|
|
7
7
|
} from './styles.css';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Box from '../Box';
|
|
10
|
+
import { Sprinkles } from '../../styles/sprinkles.css';
|
|
10
11
|
|
|
11
12
|
export type DividerOrientation = 'horizontal' | 'vertical';
|
|
12
13
|
export type DividerSize = 'small' | 'medium' | 'large';
|
|
13
14
|
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
export type DividerProps = React.HTMLAttributes<HTMLHRElement> &
|
|
16
|
+
Sprinkles & {
|
|
17
|
+
orientation?: DividerOrientation;
|
|
18
|
+
size?: DividerSize;
|
|
19
|
+
};
|
|
18
20
|
|
|
19
21
|
const Divider = ({
|
|
20
22
|
orientation = 'horizontal',
|
|
@@ -27,7 +29,9 @@ const Divider = ({
|
|
|
27
29
|
className={clsx(
|
|
28
30
|
divider,
|
|
29
31
|
dividerOrientations[orientation],
|
|
30
|
-
orientation === 'vertical'
|
|
32
|
+
orientation === 'vertical'
|
|
33
|
+
? dividerVerticalSizes[size]
|
|
34
|
+
: dividerSizes[size],
|
|
31
35
|
props.className,
|
|
32
36
|
)}
|
|
33
37
|
role="separator"
|