@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
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../styles/theme.css';
|
|
3
|
-
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
-
export const breadcrumb = styleWithLayer({
|
|
5
|
-
display: 'flex',
|
|
6
|
-
alignItems: 'center',
|
|
7
|
-
gap: '4px',
|
|
8
|
-
fontFamily: vars.fontFamily.body,
|
|
9
|
-
fontSize: '14px',
|
|
10
|
-
});
|
|
11
|
-
export const breadcrumbList = style({
|
|
12
|
-
display: 'flex',
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
listStyle: 'none',
|
|
15
|
-
margin: 0,
|
|
16
|
-
padding: 0,
|
|
17
|
-
gap: '4px',
|
|
18
|
-
});
|
|
19
|
-
export const breadcrumbItem = style({
|
|
20
|
-
display: 'flex',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
});
|
|
23
|
-
export const breadcrumbLink = style({
|
|
24
|
-
display: 'inline-flex',
|
|
25
|
-
alignItems: 'center',
|
|
26
|
-
color: vars.colors.textSecondary,
|
|
27
|
-
textDecoration: 'none',
|
|
28
|
-
fontSize: '14px',
|
|
29
|
-
':hover': {
|
|
30
|
-
color: vars.colors.buttonBackgroundPrimary,
|
|
31
|
-
textDecoration: 'underline',
|
|
32
|
-
},
|
|
33
|
-
':focus-visible': {
|
|
34
|
-
outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
|
|
35
|
-
outlineOffset: '2px',
|
|
36
|
-
borderRadius: '4px',
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
export const breadcrumbSeparator = style({
|
|
40
|
-
color: vars.colors.textDisabled,
|
|
41
|
-
fontSize: '12px',
|
|
42
|
-
userSelect: 'none',
|
|
43
|
-
});
|
|
44
|
-
export const breadcrumbCurrent = style({
|
|
45
|
-
display: 'inline-flex',
|
|
46
|
-
alignItems: 'center',
|
|
47
|
-
color: vars.colors.textPrimary,
|
|
48
|
-
fontSize: '14px',
|
|
49
|
-
fontWeight: '500',
|
|
50
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
3
|
-
variant: 'primary' | 'secondary';
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
label?: string;
|
|
6
|
-
fullWidth?: boolean;
|
|
7
|
-
};
|
|
8
|
-
declare const Button: ({ label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default Button;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { button, buttonVariants } from './styles.css';
|
|
4
|
-
import Box from '../Box';
|
|
5
|
-
const Button = ({ label, ...props }) => {
|
|
6
|
-
return (_jsx(Box, { as: "button", borderRadius: "large", width: props.fullWidth ? '100%' : undefined, className: clsx(buttonVariants[props.variant], button, props.className), ...props, children: props.children || label }));
|
|
7
|
-
};
|
|
8
|
-
export default Button;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../styles/theme.css';
|
|
3
|
-
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
-
export const buttonVariants = styleVariants({
|
|
5
|
-
primary: {
|
|
6
|
-
backgroundColor: vars.colors.buttonBackgroundPrimary,
|
|
7
|
-
color: vars.colors.buttonTextPrimary,
|
|
8
|
-
':focus-visible': {
|
|
9
|
-
backgroundColor: vars.colors.buttonBackgroundFocusedPrimary,
|
|
10
|
-
},
|
|
11
|
-
':hover': {
|
|
12
|
-
backgroundColor: vars.colors.buttonBackgroundFocusedPrimary,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
secondary: {
|
|
16
|
-
backgroundColor: vars.colors.buttonBackgroundSecondary,
|
|
17
|
-
color: vars.colors.buttonTextSecondary,
|
|
18
|
-
':focus-visible': {
|
|
19
|
-
backgroundColor: vars.colors.buttonBackgroundFocusedSecondary,
|
|
20
|
-
},
|
|
21
|
-
':hover': {
|
|
22
|
-
backgroundColor: vars.colors.buttonBackgroundFocusedSecondary,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
export const button = styleWithLayer({
|
|
27
|
-
padding: '1rem',
|
|
28
|
-
borderRadius: '1rem',
|
|
29
|
-
border: 0,
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type CardProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
-
variant?: 'elevated' | 'outlined' | 'filled';
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
padding?: 'none' | 'small' | 'medium' | 'large';
|
|
6
|
-
};
|
|
7
|
-
declare const Card: ({ variant, padding, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default Card;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { card, cardVariants } from './styles.css';
|
|
4
|
-
import Box from '../Box';
|
|
5
|
-
const Card = ({ variant = 'elevated', padding = 'medium', ...props }) => {
|
|
6
|
-
return (_jsx(Box, { as: "div", borderRadius: "large", padding: padding !== 'none' ? padding : undefined, className: clsx(cardVariants[variant], card, props.className), ...props, children: props.children }));
|
|
7
|
-
};
|
|
8
|
-
export default Card;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Card } from './Card';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Card } from './Card';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../styles/theme.css';
|
|
3
|
-
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
-
export const cardVariants = styleVariants({
|
|
5
|
-
elevated: {
|
|
6
|
-
backgroundColor: vars.colors.backgroundDefault,
|
|
7
|
-
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
|
|
8
|
-
border: 'none',
|
|
9
|
-
},
|
|
10
|
-
outlined: {
|
|
11
|
-
backgroundColor: vars.colors.backgroundDefault,
|
|
12
|
-
border: `1px solid ${vars.colors.borderDefault}`,
|
|
13
|
-
boxShadow: 'none',
|
|
14
|
-
},
|
|
15
|
-
filled: {
|
|
16
|
-
backgroundColor: vars.colors.backgroundMuted,
|
|
17
|
-
border: 'none',
|
|
18
|
-
boxShadow: 'none',
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
export const card = styleWithLayer({
|
|
22
|
-
display: 'block',
|
|
23
|
-
position: 'relative',
|
|
24
|
-
transition: 'all 0.2s ease-in-out',
|
|
25
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { forwardRef, useEffect, useRef } from 'react';
|
|
4
|
-
import { checkboxContainer, checkboxInput, checkboxLabel } from './styles.css';
|
|
5
|
-
import Box from '../Box';
|
|
6
|
-
const Checkbox = forwardRef(({ label, className, indeterminate, ...props }, ref) => {
|
|
7
|
-
const inputRef = useRef(null);
|
|
8
|
-
const combinedRef = (node) => {
|
|
9
|
-
if (typeof ref === 'function') {
|
|
10
|
-
ref(node);
|
|
11
|
-
}
|
|
12
|
-
else if (ref) {
|
|
13
|
-
ref.current = node;
|
|
14
|
-
}
|
|
15
|
-
inputRef.current = node;
|
|
16
|
-
};
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (inputRef.current) {
|
|
19
|
-
inputRef.current.indeterminate = !!indeterminate;
|
|
20
|
-
}
|
|
21
|
-
}, [indeterminate]);
|
|
22
|
-
return (_jsxs(Box, { as: "label", className: clsx(checkboxContainer, className), display: "flex", alignItems: "center", gap: "small", cursor: "pointer", style: { userSelect: 'none' }, children: [_jsx(Box, { as: "input", type: "checkbox", ref: combinedRef, className: checkboxInput, style: { width: '18px', height: '18px' }, ...props }), label && _jsx(Box, { as: "span", className: checkboxLabel, children: label })] }));
|
|
23
|
-
});
|
|
24
|
-
Checkbox.displayName = 'Checkbox';
|
|
25
|
-
export default Checkbox;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Checkbox } from './Checkbox';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Checkbox } from './Checkbox';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../styles/theme.css';
|
|
3
|
-
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
-
export const checkboxContainer = styleWithLayer({
|
|
5
|
-
display: 'flex',
|
|
6
|
-
alignItems: 'center',
|
|
7
|
-
gap: '8px',
|
|
8
|
-
cursor: 'pointer',
|
|
9
|
-
userSelect: 'none',
|
|
10
|
-
});
|
|
11
|
-
export const checkboxInput = style({
|
|
12
|
-
width: '18px',
|
|
13
|
-
height: '18px',
|
|
14
|
-
border: `2px solid ${vars.colors.borderDefault}`,
|
|
15
|
-
borderRadius: '4px',
|
|
16
|
-
cursor: 'pointer',
|
|
17
|
-
accentColor: vars.colors.buttonBackgroundPrimary,
|
|
18
|
-
':focus-visible': {
|
|
19
|
-
outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
|
|
20
|
-
outlineOffset: '2px',
|
|
21
|
-
},
|
|
22
|
-
':disabled': {
|
|
23
|
-
cursor: 'not-allowed',
|
|
24
|
-
opacity: 0.5,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
export const checkboxLabel = styleWithLayer({
|
|
28
|
-
fontFamily: vars.fontFamily.body,
|
|
29
|
-
fontSize: '14px',
|
|
30
|
-
color: vars.colors.textPrimary,
|
|
31
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type CollapseAnimation = 'height' | 'opacity' | 'both';
|
|
3
|
-
export interface CollapseProps {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
animation?: CollapseAnimation;
|
|
7
|
-
duration?: number;
|
|
8
|
-
className?: string;
|
|
9
|
-
onAnimationEnd?: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare const Collapse: ({ isOpen, children, animation, duration, className, onAnimationEnd, }: CollapseProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default Collapse;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { useState, useRef, useEffect } from 'react';
|
|
4
|
-
import { collapseContainer, collapseContent, } from './styles.css';
|
|
5
|
-
import Box from '../Box';
|
|
6
|
-
const Collapse = ({ isOpen, children, animation = 'both', duration = 300, className, onAnimationEnd, }) => {
|
|
7
|
-
const [height, setHeight] = useState(isOpen ? undefined : 0);
|
|
8
|
-
const [isAnimating, setIsAnimating] = useState(false);
|
|
9
|
-
const contentRef = useRef(null);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
if (isOpen) {
|
|
12
|
-
setIsAnimating(true);
|
|
13
|
-
if (contentRef.current) {
|
|
14
|
-
setHeight(contentRef.current.scrollHeight);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
setIsAnimating(true);
|
|
19
|
-
setHeight(0);
|
|
20
|
-
}
|
|
21
|
-
}, [isOpen]);
|
|
22
|
-
const handleTransitionEnd = () => {
|
|
23
|
-
setIsAnimating(false);
|
|
24
|
-
if (isOpen) {
|
|
25
|
-
setHeight(undefined);
|
|
26
|
-
}
|
|
27
|
-
onAnimationEnd?.();
|
|
28
|
-
};
|
|
29
|
-
const getAnimationStyles = () => {
|
|
30
|
-
const baseStyles = {
|
|
31
|
-
transition: `height ${duration}ms ease-out, opacity ${duration}ms ease-out`,
|
|
32
|
-
height: height !== undefined ? `${height}px` : undefined,
|
|
33
|
-
opacity: isOpen || isAnimating ? 1 : 0,
|
|
34
|
-
};
|
|
35
|
-
if (animation === 'height') {
|
|
36
|
-
return {
|
|
37
|
-
...baseStyles,
|
|
38
|
-
transition: `height ${duration}ms ease-out`,
|
|
39
|
-
opacity: 1,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (animation === 'opacity') {
|
|
43
|
-
return {
|
|
44
|
-
...baseStyles,
|
|
45
|
-
transition: `opacity ${duration}ms ease-out`,
|
|
46
|
-
height: undefined,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
return baseStyles;
|
|
50
|
-
};
|
|
51
|
-
if (!isOpen && !isAnimating && animation !== 'opacity') {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
return (_jsx(Box, { className: clsx(collapseContainer, className), style: getAnimationStyles(), onTransitionEnd: handleTransitionEnd, "aria-hidden": !isOpen, children: _jsx(Box, { ref: contentRef, className: collapseContent, children: children }) }));
|
|
55
|
-
};
|
|
56
|
-
export default Collapse;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Collapse } from './Collapse';
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { styleVariants, keyframes } from '@vanilla-extract/css';
|
|
2
|
-
import { styleWithLayer } from '../../styles/utils';
|
|
3
|
-
const collapseIn = keyframes({
|
|
4
|
-
from: {
|
|
5
|
-
height: 0,
|
|
6
|
-
opacity: 0,
|
|
7
|
-
},
|
|
8
|
-
to: {
|
|
9
|
-
height: 'auto',
|
|
10
|
-
opacity: 1,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
const collapseOut = keyframes({
|
|
14
|
-
from: {
|
|
15
|
-
height: 'auto',
|
|
16
|
-
opacity: 1,
|
|
17
|
-
},
|
|
18
|
-
to: {
|
|
19
|
-
height: 0,
|
|
20
|
-
opacity: 0,
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
export const collapseContainer = styleWithLayer({
|
|
24
|
-
overflow: 'hidden',
|
|
25
|
-
});
|
|
26
|
-
export const collapseContent = styleWithLayer({
|
|
27
|
-
width: '100%',
|
|
28
|
-
});
|
|
29
|
-
export const collapseAnimation = styleVariants({
|
|
30
|
-
in: {
|
|
31
|
-
animation: `${collapseIn} 0.3s ease-out forwards`,
|
|
32
|
-
},
|
|
33
|
-
out: {
|
|
34
|
-
animation: `${collapseOut} 0.3s ease-out forwards`,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ComboboxOption {
|
|
3
|
-
value: string;
|
|
4
|
-
label: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface ComboboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'> {
|
|
8
|
-
label?: string;
|
|
9
|
-
options: ComboboxOption[];
|
|
10
|
-
value?: string;
|
|
11
|
-
onChange?: (value: string, option: ComboboxOption | null) => void;
|
|
12
|
-
onInputChange?: (inputValue: string) => void;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
hint?: string;
|
|
15
|
-
error?: boolean;
|
|
16
|
-
errorMessage?: string;
|
|
17
|
-
fullWidth?: boolean;
|
|
18
|
-
clearable?: boolean;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
filterFn?: (option: ComboboxOption, inputValue: string) => boolean;
|
|
21
|
-
}
|
|
22
|
-
declare const Combobox: ({ label, options, value, onChange, onInputChange, placeholder, hint, error, errorMessage, fullWidth, clearable, disabled, filterFn, className, ...props }: ComboboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export default Combobox;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { useState, useRef, useEffect } from 'react';
|
|
4
|
-
import { comboboxContainer, comboboxInput, comboboxInputVariants, comboboxLabel, comboboxDropdown, comboboxOption, comboboxOptionSelected, comboboxOptionDisabled, comboboxClearButton, comboboxArrow, comboboxNoResults, comboboxHint, comboboxErrorMessage, } from './styles.css';
|
|
5
|
-
import Box from '../Box';
|
|
6
|
-
const defaultFilterFn = (option, inputValue) => {
|
|
7
|
-
return option.label.toLowerCase().includes(inputValue.toLowerCase());
|
|
8
|
-
};
|
|
9
|
-
const Combobox = ({ label, options, value, onChange, onInputChange, placeholder = 'Search...', hint, error = false, errorMessage, fullWidth = true, clearable = true, disabled = false, filterFn = defaultFilterFn, className, ...props }) => {
|
|
10
|
-
const [inputValue, setInputValue] = useState('');
|
|
11
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
12
|
-
const [highlightedIndex, setHighlightedIndex] = useState(-1);
|
|
13
|
-
const containerRef = useRef(null);
|
|
14
|
-
const inputRef = useRef(null);
|
|
15
|
-
const selectedOption = options.find(opt => opt.value === value);
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
if (selectedOption) {
|
|
18
|
-
setInputValue(selectedOption.label);
|
|
19
|
-
}
|
|
20
|
-
else if (!isOpen) {
|
|
21
|
-
setInputValue('');
|
|
22
|
-
}
|
|
23
|
-
}, [selectedOption, isOpen]);
|
|
24
|
-
const filteredOptions = options.filter(option => filterFn(option, inputValue));
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
const handleClickOutside = (event) => {
|
|
27
|
-
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
28
|
-
setIsOpen(false);
|
|
29
|
-
if (selectedOption) {
|
|
30
|
-
setInputValue(selectedOption.label);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
setInputValue('');
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
38
|
-
return () => document.removeEventListener('mousedown', handleClickOutside);
|
|
39
|
-
}, [selectedOption]);
|
|
40
|
-
const handleInputChange = (e) => {
|
|
41
|
-
const newValue = e.target.value;
|
|
42
|
-
setInputValue(newValue);
|
|
43
|
-
setIsOpen(true);
|
|
44
|
-
setHighlightedIndex(-1);
|
|
45
|
-
onInputChange?.(newValue);
|
|
46
|
-
if (!newValue) {
|
|
47
|
-
onChange?.('', null);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
const handleOptionClick = (option) => {
|
|
51
|
-
if (option.disabled)
|
|
52
|
-
return;
|
|
53
|
-
setInputValue(option.label);
|
|
54
|
-
setIsOpen(false);
|
|
55
|
-
onChange?.(option.value, option);
|
|
56
|
-
};
|
|
57
|
-
const handleClear = (e) => {
|
|
58
|
-
e.stopPropagation();
|
|
59
|
-
setInputValue('');
|
|
60
|
-
setIsOpen(false);
|
|
61
|
-
onChange?.('', null);
|
|
62
|
-
inputRef.current?.focus();
|
|
63
|
-
};
|
|
64
|
-
const handleKeyDown = (e) => {
|
|
65
|
-
if (disabled)
|
|
66
|
-
return;
|
|
67
|
-
switch (e.key) {
|
|
68
|
-
case 'ArrowDown':
|
|
69
|
-
e.preventDefault();
|
|
70
|
-
if (!isOpen) {
|
|
71
|
-
setIsOpen(true);
|
|
72
|
-
}
|
|
73
|
-
setHighlightedIndex(prev => prev < filteredOptions.length - 1 ? prev + 1 : prev);
|
|
74
|
-
break;
|
|
75
|
-
case 'ArrowUp':
|
|
76
|
-
e.preventDefault();
|
|
77
|
-
setHighlightedIndex(prev => (prev > 0 ? prev - 1 : prev));
|
|
78
|
-
break;
|
|
79
|
-
case 'Enter':
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
if (isOpen && highlightedIndex >= 0 && filteredOptions[highlightedIndex]) {
|
|
82
|
-
handleOptionClick(filteredOptions[highlightedIndex]);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
setIsOpen(!isOpen);
|
|
86
|
-
}
|
|
87
|
-
break;
|
|
88
|
-
case 'Escape':
|
|
89
|
-
setIsOpen(false);
|
|
90
|
-
if (selectedOption) {
|
|
91
|
-
setInputValue(selectedOption.label);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
setInputValue('');
|
|
95
|
-
}
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
const displayValue = selectedOption && !isOpen ? selectedOption.label : inputValue;
|
|
100
|
-
return (_jsxs(Box, { className: comboboxContainer, ref: containerRef, width: fullWidth ? '100%' : undefined, children: [label && (_jsx(Box, { as: "label", className: comboboxLabel, children: label })), _jsxs(Box, { position: "relative", children: [_jsx(Box, { as: "input", ref: inputRef, type: "text", value: displayValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onFocus: () => setIsOpen(true), placeholder: placeholder, disabled: disabled, className: clsx(comboboxInput, comboboxInputVariants[error ? 'error' : 'default'], className), role: "combobox", "aria-expanded": isOpen, "aria-autocomplete": "list", "aria-controls": isOpen ? 'combobox-listbox' : undefined, "aria-activedescendant": highlightedIndex >= 0 ? `option-${filteredOptions[highlightedIndex]?.value}` : undefined, ...props }), clearable && inputValue && !disabled && (_jsx(Box, { as: "button", className: comboboxClearButton, onClick: handleClear, type: "button", "aria-label": "Clear selection", children: "\u00D7" })), _jsx(Box, { className: comboboxArrow, "aria-hidden": "true", children: _jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "currentColor", children: _jsx("path", { d: "M6 8L1 3h10z" }) }) })] }), isOpen && (_jsx(Box, { as: "ul", id: "combobox-listbox", className: comboboxDropdown, role: "listbox", children: filteredOptions.length === 0 ? (_jsx(Box, { as: "li", className: comboboxNoResults, children: "No results found" })) : (filteredOptions.map((option, index) => (_jsx(Box, { as: "li", id: `option-${option.value}`, className: clsx(comboboxOption, option.value === value && comboboxOptionSelected, option.disabled && comboboxOptionDisabled), onClick: () => handleOptionClick(option), role: "option", "aria-selected": option.value === value, "aria-disabled": option.disabled, style: {
|
|
101
|
-
backgroundColor: index === highlightedIndex ? 'var(--highlight-color, #f3f4f6)' : undefined,
|
|
102
|
-
}, children: option.label }, option.value)))) })), error && errorMessage && (_jsx(Box, { as: "div", className: comboboxErrorMessage, role: "alert", children: errorMessage })), hint && !error && (_jsx(Box, { as: "div", className: comboboxHint, children: hint }))] }));
|
|
103
|
-
};
|
|
104
|
-
export default Combobox;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Combobox } from './Combobox';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const comboboxContainer: string;
|
|
2
|
-
export declare const comboboxInput: string;
|
|
3
|
-
export declare const comboboxInputVariants: Record<"default" | "error", string>;
|
|
4
|
-
export declare const comboboxLabel: string;
|
|
5
|
-
export declare const comboboxDropdown: string;
|
|
6
|
-
export declare const comboboxOption: string;
|
|
7
|
-
export declare const comboboxOptionSelected: string;
|
|
8
|
-
export declare const comboboxOptionDisabled: string;
|
|
9
|
-
export declare const comboboxClearButton: string;
|
|
10
|
-
export declare const comboboxArrow: string;
|
|
11
|
-
export declare const comboboxNoResults: string;
|
|
12
|
-
export declare const comboboxHint: string;
|
|
13
|
-
export declare const comboboxErrorMessage: string;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../styles/theme.css';
|
|
3
|
-
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
-
export const comboboxContainer = styleWithLayer({
|
|
5
|
-
position: 'relative',
|
|
6
|
-
width: '100%',
|
|
7
|
-
});
|
|
8
|
-
export const comboboxInput = styleWithLayer({
|
|
9
|
-
width: '100%',
|
|
10
|
-
padding: '0.75rem 2.5rem 0.75rem 1rem',
|
|
11
|
-
fontSize: '14px',
|
|
12
|
-
fontFamily: vars.fontFamily.body,
|
|
13
|
-
color: vars.colors.textPrimary,
|
|
14
|
-
backgroundColor: vars.colors.inputBackground,
|
|
15
|
-
border: `1px solid ${vars.colors.inputBorder}`,
|
|
16
|
-
borderRadius: '8px',
|
|
17
|
-
outline: 'none',
|
|
18
|
-
transition: 'border-color 0.2s ease',
|
|
19
|
-
'::placeholder': {
|
|
20
|
-
color: vars.colors.inputPlaceholder,
|
|
21
|
-
},
|
|
22
|
-
':focus-visible': {
|
|
23
|
-
outline: `2px solid ${vars.colors.inputBorderFocused}`,
|
|
24
|
-
outlineOffset: '2px',
|
|
25
|
-
},
|
|
26
|
-
':hover': {
|
|
27
|
-
borderColor: vars.colors.inputBorderFocused,
|
|
28
|
-
},
|
|
29
|
-
selectors: {
|
|
30
|
-
'&:disabled': {
|
|
31
|
-
cursor: 'not-allowed',
|
|
32
|
-
opacity: 0.5,
|
|
33
|
-
backgroundColor: vars.colors.backgroundMuted,
|
|
34
|
-
},
|
|
35
|
-
'&:disabled:hover': {
|
|
36
|
-
borderColor: vars.colors.inputBorder,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
export const comboboxInputVariants = styleVariants({
|
|
41
|
-
default: {},
|
|
42
|
-
error: {
|
|
43
|
-
border: `1px solid ${vars.colors.alertErrorBorder}`,
|
|
44
|
-
':focus-visible': {
|
|
45
|
-
outline: `2px solid ${vars.colors.alertErrorBorder}`,
|
|
46
|
-
},
|
|
47
|
-
':hover': {
|
|
48
|
-
borderColor: vars.colors.alertErrorBorder,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
export const comboboxLabel = styleWithLayer({
|
|
53
|
-
display: 'block',
|
|
54
|
-
fontSize: '14px',
|
|
55
|
-
fontWeight: '500',
|
|
56
|
-
color: vars.colors.textPrimary,
|
|
57
|
-
marginBottom: '8px',
|
|
58
|
-
});
|
|
59
|
-
export const comboboxDropdown = styleWithLayer({
|
|
60
|
-
position: 'absolute',
|
|
61
|
-
top: '100%',
|
|
62
|
-
left: 0,
|
|
63
|
-
right: 0,
|
|
64
|
-
backgroundColor: vars.colors.backgroundDefault,
|
|
65
|
-
border: `1px solid ${vars.colors.borderDefault}`,
|
|
66
|
-
borderRadius: '8px',
|
|
67
|
-
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
|
68
|
-
maxHeight: '200px',
|
|
69
|
-
overflowY: 'auto',
|
|
70
|
-
zIndex: 50,
|
|
71
|
-
marginTop: '4px',
|
|
72
|
-
});
|
|
73
|
-
export const comboboxOption = styleWithLayer({
|
|
74
|
-
padding: '0.75rem 1rem',
|
|
75
|
-
cursor: 'pointer',
|
|
76
|
-
fontSize: '14px',
|
|
77
|
-
color: vars.colors.textPrimary,
|
|
78
|
-
transition: 'background-color 0.15s ease',
|
|
79
|
-
':hover': {
|
|
80
|
-
backgroundColor: vars.colors.backgroundMuted,
|
|
81
|
-
},
|
|
82
|
-
':focus-visible': {
|
|
83
|
-
outline: 'none',
|
|
84
|
-
backgroundColor: vars.colors.backgroundMuted,
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
export const comboboxOptionSelected = styleWithLayer({
|
|
88
|
-
backgroundColor: vars.colors.buttonBackgroundPrimary,
|
|
89
|
-
color: vars.colors.buttonTextPrimary,
|
|
90
|
-
':hover': {
|
|
91
|
-
backgroundColor: vars.colors.buttonBackgroundFocusedPrimary,
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
export const comboboxOptionDisabled = styleWithLayer({
|
|
95
|
-
opacity: 0.5,
|
|
96
|
-
cursor: 'not-allowed',
|
|
97
|
-
':hover': {
|
|
98
|
-
backgroundColor: 'transparent',
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
export const comboboxClearButton = styleWithLayer({
|
|
102
|
-
position: 'absolute',
|
|
103
|
-
right: '2.5rem',
|
|
104
|
-
top: '50%',
|
|
105
|
-
transform: 'translateY(-50%)',
|
|
106
|
-
background: 'none',
|
|
107
|
-
border: 'none',
|
|
108
|
-
cursor: 'pointer',
|
|
109
|
-
padding: '0.25rem',
|
|
110
|
-
color: vars.colors.textSecondary,
|
|
111
|
-
fontSize: '16px',
|
|
112
|
-
display: 'flex',
|
|
113
|
-
alignItems: 'center',
|
|
114
|
-
justifyContent: 'center',
|
|
115
|
-
':hover': {
|
|
116
|
-
color: vars.colors.textPrimary,
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
export const comboboxArrow = styleWithLayer({
|
|
120
|
-
position: 'absolute',
|
|
121
|
-
right: '0.75rem',
|
|
122
|
-
top: '50%',
|
|
123
|
-
transform: 'translateY(-50%)',
|
|
124
|
-
pointerEvents: 'none',
|
|
125
|
-
color: vars.colors.textSecondary,
|
|
126
|
-
});
|
|
127
|
-
export const comboboxNoResults = styleWithLayer({
|
|
128
|
-
padding: '0.75rem 1rem',
|
|
129
|
-
fontSize: '14px',
|
|
130
|
-
color: vars.colors.textSecondary,
|
|
131
|
-
textAlign: 'center',
|
|
132
|
-
});
|
|
133
|
-
export const comboboxHint = styleWithLayer({
|
|
134
|
-
fontSize: '12px',
|
|
135
|
-
color: vars.colors.textSecondary,
|
|
136
|
-
marginTop: '4px',
|
|
137
|
-
});
|
|
138
|
-
export const comboboxErrorMessage = styleWithLayer({
|
|
139
|
-
fontSize: '12px',
|
|
140
|
-
color: vars.colors.alertErrorText,
|
|
141
|
-
marginTop: '4px',
|
|
142
|
-
});
|