@jordan-mace/chaser-design-system 1.2.3 → 1.2.6
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/components/Accordion/Accordion.d.ts +16 -0
- package/dist/components/Accordion/Accordion.js +43 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/Accordion/styles.css.d.ts +7 -0
- package/dist/components/Accordion/styles.css.js +65 -0
- package/dist/components/Alert/Alert.d.ts +9 -0
- package/dist/components/Alert/Alert.js +8 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Alert/index.js +1 -0
- package/dist/components/Alert/styles.css.d.ts +4 -0
- package/dist/components/Alert/styles.css.js +54 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +9 -0
- package/dist/components/AspectRatio/AspectRatio.js +12 -0
- package/dist/components/AspectRatio/index.d.ts +2 -0
- package/dist/components/AspectRatio/index.js +1 -0
- package/dist/components/Avatar/Avatar.d.ts +11 -0
- package/dist/components/Avatar/Avatar.js +13 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +1 -0
- package/dist/components/Avatar/styles.css.d.ts +4 -0
- package/dist/components/Avatar/styles.css.js +151 -0
- package/dist/components/Badge/Badge.d.ts +11 -0
- package/dist/components/Badge/Badge.js +8 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Badge/styles.css.d.ts +5 -0
- package/dist/components/Badge/styles.css.js +77 -0
- package/dist/components/Box/Box.d.ts +11 -0
- package/dist/components/Box/Box.js +54 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Box/index.js +1 -0
- package/dist/components/Box/reset.css.d.ts +1 -0
- package/dist/components/Box/reset.css.js +15 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +8 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Breadcrumb/index.js +1 -0
- package/dist/components/Breadcrumb/styles.css.d.ts +6 -0
- package/dist/components/Breadcrumb/styles.css.js +50 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Button/Button.js +8 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/Button/styles.css.d.ts +2 -0
- package/dist/components/Button/styles.css.js +30 -0
- package/dist/components/Card/Card.d.ts +8 -0
- package/dist/components/Card/Card.js +8 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +1 -0
- package/dist/components/Card/styles.css.d.ts +2 -0
- package/dist/components/Card/styles.css.js +25 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.js +25 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.js +1 -0
- package/dist/components/Checkbox/styles.css.d.ts +3 -0
- package/dist/components/Checkbox/styles.css.js +31 -0
- package/dist/components/Collapse/Collapse.d.ts +12 -0
- package/dist/components/Collapse/Collapse.js +56 -0
- package/dist/components/Collapse/index.d.ts +2 -0
- package/dist/components/Collapse/index.js +1 -0
- package/dist/components/Collapse/styles.css.d.ts +3 -0
- package/dist/components/Collapse/styles.css.js +36 -0
- package/dist/components/Combobox/Combobox.d.ts +23 -0
- package/dist/components/Combobox/Combobox.js +104 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/Combobox/index.js +1 -0
- package/dist/components/Combobox/styles.css.d.ts +13 -0
- package/dist/components/Combobox/styles.css.js +142 -0
- package/dist/components/Container/Container.d.ts +11 -0
- package/dist/components/Container/Container.js +21 -0
- package/dist/components/Container/index.d.ts +2 -0
- package/dist/components/Container/index.js +1 -0
- package/dist/components/Divider/Divider.d.ts +9 -0
- package/dist/components/Divider/Divider.js +8 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/index.js +1 -0
- package/dist/components/Divider/styles.css.d.ts +4 -0
- package/dist/components/Divider/styles.css.js +41 -0
- package/dist/components/Drawer/Drawer.d.ts +16 -0
- package/dist/components/Drawer/Drawer.js +65 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/index.js +1 -0
- package/dist/components/Drawer/styles.css.d.ts +8 -0
- package/dist/components/Drawer/styles.css.js +125 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +23 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +43 -0
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/DropdownMenu/index.js +1 -0
- package/dist/components/DropdownMenu/styles.css.d.ts +9 -0
- package/dist/components/DropdownMenu/styles.css.js +93 -0
- package/dist/components/EmptyState/EmptyState.d.ts +10 -0
- package/dist/components/EmptyState/EmptyState.js +8 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EmptyState/index.js +1 -0
- package/dist/components/EmptyState/styles.css.d.ts +5 -0
- package/dist/components/EmptyState/styles.css.js +30 -0
- package/dist/components/FileUpload/FileUpload.d.ts +27 -0
- package/dist/components/FileUpload/FileUpload.js +102 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FileUpload/index.js +1 -0
- package/dist/components/FileUpload/styles.css.d.ts +19 -0
- package/dist/components/FileUpload/styles.css.js +145 -0
- package/dist/components/Form/Form.d.ts +7 -0
- package/dist/components/Form/Form.js +8 -0
- package/dist/components/Form/FormInput.d.ts +5 -0
- package/dist/components/Form/FormInput.js +9 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/index.js +2 -0
- package/dist/components/Form/styles.css.d.ts +2 -0
- package/dist/components/Form/styles.css.js +11 -0
- package/dist/components/Grid/Grid.d.ts +13 -0
- package/dist/components/Grid/Grid.js +25 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/index.js +1 -0
- package/dist/components/Icon/Icon.d.ts +12 -0
- package/dist/components/Icon/Icon.js +21 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/index.js +1 -0
- package/dist/components/Icon/styles.css.d.ts +1 -0
- package/dist/components/Icon/styles.css.js +9 -0
- package/dist/components/Input/Input.d.ts +7 -0
- package/dist/components/Input/Input.js +9 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.js +1 -0
- package/dist/components/Input/styles.css.d.ts +2 -0
- package/dist/components/Input/styles.css.js +8 -0
- package/dist/components/Kbd/Kbd.d.ts +7 -0
- package/dist/components/Kbd/Kbd.js +6 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Kbd/index.js +1 -0
- package/dist/components/Kbd/styles.css.d.ts +1 -0
- package/dist/components/Kbd/styles.css.js +16 -0
- package/dist/components/List/List.d.ts +5 -0
- package/dist/components/List/List.js +7 -0
- package/dist/components/List/ListItem.d.ts +5 -0
- package/dist/components/List/ListItem.js +7 -0
- package/dist/components/List/index.d.ts +2 -0
- package/dist/components/List/index.js +2 -0
- package/dist/components/List/styles.css.d.ts +2 -0
- package/dist/components/List/styles.css.js +11 -0
- package/dist/components/Modal/Modal.d.ts +13 -0
- package/dist/components/Modal/Modal.js +35 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.js +1 -0
- package/dist/components/Modal/styles.css.d.ts +7 -0
- package/dist/components/Modal/styles.css.js +92 -0
- package/dist/components/Navbar/Navbar.d.ts +6 -0
- package/dist/components/Navbar/Navbar.js +8 -0
- package/dist/components/Navbar/NavbarItem.d.ts +6 -0
- package/dist/components/Navbar/NavbarItem.js +8 -0
- package/dist/components/Navbar/index.d.ts +2 -0
- package/dist/components/Navbar/index.js +2 -0
- package/dist/components/Navbar/styles.css.d.ts +2 -0
- package/dist/components/Navbar/styles.css.js +3 -0
- package/dist/components/NumberInput/NumberInput.d.ts +20 -0
- package/dist/components/NumberInput/NumberInput.js +39 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/NumberInput/index.js +1 -0
- package/dist/components/NumberInput/styles.css.d.ts +10 -0
- package/dist/components/NumberInput/styles.css.js +117 -0
- package/dist/components/Pagination/Pagination.d.ts +10 -0
- package/dist/components/Pagination/Pagination.js +47 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +1 -0
- package/dist/components/Pagination/styles.css.d.ts +4 -0
- package/dist/components/Pagination/styles.css.js +44 -0
- package/dist/components/Popover/Popover.d.ts +18 -0
- package/dist/components/Popover/Popover.js +55 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/index.js +1 -0
- package/dist/components/Popover/styles.css.d.ts +11 -0
- package/dist/components/Popover/styles.css.js +185 -0
- package/dist/components/Progress/Progress.d.ts +10 -0
- package/dist/components/Progress/Progress.js +9 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/Progress/index.js +1 -0
- package/dist/components/Progress/styles.css.d.ts +4 -0
- package/dist/components/Progress/styles.css.js +71 -0
- package/dist/components/Radio/Radio.d.ts +16 -0
- package/dist/components/Radio/Radio.js +25 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Radio/index.js +1 -0
- package/dist/components/Radio/styles.css.d.ts +5 -0
- package/dist/components/Radio/styles.css.js +42 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +11 -0
- package/dist/components/ScrollArea/ScrollArea.js +12 -0
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/ScrollArea/index.js +1 -0
- package/dist/components/ScrollArea/styles.css.d.ts +3 -0
- package/dist/components/ScrollArea/styles.css.js +25 -0
- package/dist/components/Select/Select.d.ts +13 -0
- package/dist/components/Select/Select.js +10 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.js +1 -0
- package/dist/components/Select/styles.css.d.ts +4 -0
- package/dist/components/Select/styles.css.js +82 -0
- package/dist/components/Separator/Separator.d.ts +8 -0
- package/dist/components/Separator/Separator.js +8 -0
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/Separator/index.js +1 -0
- package/dist/components/Separator/styles.css.d.ts +4 -0
- package/dist/components/Separator/styles.css.js +28 -0
- package/dist/components/Skeleton/Skeleton.d.ts +14 -0
- package/dist/components/Skeleton/Skeleton.js +13 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.js +1 -0
- package/dist/components/Skeleton/styles.css.d.ts +4 -0
- package/dist/components/Skeleton/styles.css.js +56 -0
- package/dist/components/Spinner/Spinner.d.ts +10 -0
- package/dist/components/Spinner/Spinner.js +8 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.js +1 -0
- package/dist/components/Spinner/styles.css.d.ts +4 -0
- package/dist/components/Spinner/styles.css.js +55 -0
- package/dist/components/Stack/Stack.d.ts +16 -0
- package/dist/components/Stack/Stack.js +24 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Stack/index.js +1 -0
- package/dist/components/Stepper/Stepper.d.ts +18 -0
- package/dist/components/Stepper/Stepper.js +25 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Stepper/index.js +1 -0
- package/dist/components/Stepper/styles.css.d.ts +14 -0
- package/dist/components/Stepper/styles.css.js +104 -0
- package/dist/components/Table/Table.d.ts +42 -0
- package/dist/components/Table/Table.js +39 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +1 -0
- package/dist/components/Table/styles.css.d.ts +8 -0
- package/dist/components/Table/styles.css.js +49 -0
- package/dist/components/Tabs/Tabs.d.ts +29 -0
- package/dist/components/Tabs/Tabs.js +52 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +1 -0
- package/dist/components/Tabs/styles.css.d.ts +6 -0
- package/dist/components/Tabs/styles.css.js +100 -0
- package/dist/components/Tag/Tag.d.ts +16 -0
- package/dist/components/Tag/Tag.js +18 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/Tag/index.js +1 -0
- package/dist/components/Tag/styles.css.d.ts +3 -0
- package/dist/components/Tag/styles.css.js +93 -0
- package/dist/components/Text/Header.d.ts +8 -0
- package/dist/components/Text/Header.js +8 -0
- package/dist/components/Text/P.d.ts +7 -0
- package/dist/components/Text/P.js +8 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/index.js +2 -0
- package/dist/components/Text/styles.css.d.ts +2 -0
- package/dist/components/Text/styles.css.js +13 -0
- package/dist/components/TextArea/TextArea.d.ts +7 -0
- package/dist/components/TextArea/TextArea.js +9 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/TextArea/index.js +1 -0
- package/dist/components/TextArea/styles.css.d.ts +2 -0
- package/dist/components/TextArea/styles.css.js +10 -0
- package/dist/components/Toast/Toast.d.ts +34 -0
- package/dist/components/Toast/Toast.js +177 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Toast/index.js +1 -0
- package/dist/components/Toast/styles.css.d.ts +21 -0
- package/dist/components/Toast/styles.css.js +192 -0
- package/dist/components/Toggle/Toggle.d.ts +10 -0
- package/dist/components/Toggle/Toggle.js +17 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Toggle/index.js +1 -0
- package/dist/components/Toggle/styles.css.d.ts +12 -0
- package/dist/components/Toggle/styles.css.js +118 -0
- package/dist/components/Tooltip/Tooltip.d.ts +10 -0
- package/dist/components/Tooltip/Tooltip.js +16 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/components/Tooltip/styles.css.d.ts +8 -0
- package/dist/components/Tooltip/styles.css.js +86 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +8 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +9 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/VisuallyHidden/index.js +1 -0
- package/dist/components/VisuallyHidden/styles.css.d.ts +1 -0
- package/dist/components/VisuallyHidden/styles.css.js +12 -0
- package/dist/components/index.d.ts +68 -0
- package/dist/components/index.js +47 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/styles/layers.css.d.ts +3 -0
- package/dist/styles/layers.css.js +3 -0
- package/dist/styles/sprinkles.css.d.ts +241 -0
- package/dist/styles/sprinkles.css.js +165 -0
- package/dist/styles/theme.css.d.ts +38 -0
- package/dist/styles/theme.css.js +51 -0
- package/dist/styles/utils.d.ts +2 -0
- package/dist/styles/utils.js +7 -0
- package/package.json +8 -12
- package/dist/index.cjs +0 -4894
- package/dist/index.d.cts +0 -1111
- package/dist/index.d.mts +0 -1111
- package/dist/index.mjs +0 -4812
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const popoverContainer: string;
|
|
2
|
+
export declare const popoverTrigger: string;
|
|
3
|
+
export declare const popoverContent: string;
|
|
4
|
+
export declare const popoverPositionVariants: Record<"bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight", string>;
|
|
5
|
+
export declare const popoverArrow: string;
|
|
6
|
+
export declare const popoverArrowPositionVariants: Record<"bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight", string>;
|
|
7
|
+
export declare const popoverHeader: string;
|
|
8
|
+
export declare const popoverTitle: string;
|
|
9
|
+
export declare const popoverCloseButton: string;
|
|
10
|
+
export declare const popoverBody: string;
|
|
11
|
+
export declare const popoverFooter: string;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { styleVariants, keyframes } from '@vanilla-extract/css';
|
|
2
|
+
import { vars } from '../../styles/theme.css';
|
|
3
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
+
const fadeIn = keyframes({
|
|
5
|
+
from: { opacity: 0, transform: 'scale(0.95)' },
|
|
6
|
+
to: { opacity: 1, transform: 'scale(1)' },
|
|
7
|
+
});
|
|
8
|
+
export const popoverContainer = styleWithLayer({
|
|
9
|
+
position: 'relative',
|
|
10
|
+
display: 'inline-block',
|
|
11
|
+
});
|
|
12
|
+
export const popoverTrigger = styleWithLayer({
|
|
13
|
+
cursor: 'pointer',
|
|
14
|
+
});
|
|
15
|
+
export const popoverContent = styleWithLayer({
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
backgroundColor: vars.colors.backgroundDefault,
|
|
18
|
+
border: `1px solid ${vars.colors.borderDefault}`,
|
|
19
|
+
borderRadius: '0.75rem',
|
|
20
|
+
boxShadow: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
|
|
21
|
+
zIndex: 50,
|
|
22
|
+
padding: '1rem',
|
|
23
|
+
minWidth: '200px',
|
|
24
|
+
maxWidth: '400px',
|
|
25
|
+
animation: `${fadeIn} 0.15s ease-out`,
|
|
26
|
+
});
|
|
27
|
+
export const popoverPositionVariants = styleVariants({
|
|
28
|
+
top: {
|
|
29
|
+
bottom: '100%',
|
|
30
|
+
left: '50%',
|
|
31
|
+
transform: 'translateX(-50%)',
|
|
32
|
+
marginBottom: '0.5rem',
|
|
33
|
+
},
|
|
34
|
+
bottom: {
|
|
35
|
+
top: '100%',
|
|
36
|
+
left: '50%',
|
|
37
|
+
transform: 'translateX(-50%)',
|
|
38
|
+
marginTop: '0.5rem',
|
|
39
|
+
},
|
|
40
|
+
left: {
|
|
41
|
+
right: '100%',
|
|
42
|
+
top: '50%',
|
|
43
|
+
transform: 'translateY(-50%)',
|
|
44
|
+
marginRight: '0.5rem',
|
|
45
|
+
},
|
|
46
|
+
right: {
|
|
47
|
+
left: '100%',
|
|
48
|
+
top: '50%',
|
|
49
|
+
transform: 'translateY(-50%)',
|
|
50
|
+
marginLeft: '0.5rem',
|
|
51
|
+
},
|
|
52
|
+
topLeft: {
|
|
53
|
+
bottom: '100%',
|
|
54
|
+
right: 0,
|
|
55
|
+
marginBottom: '0.5rem',
|
|
56
|
+
},
|
|
57
|
+
topRight: {
|
|
58
|
+
bottom: '100%',
|
|
59
|
+
left: 0,
|
|
60
|
+
marginBottom: '0.5rem',
|
|
61
|
+
},
|
|
62
|
+
bottomLeft: {
|
|
63
|
+
top: '100%',
|
|
64
|
+
right: 0,
|
|
65
|
+
marginTop: '0.5rem',
|
|
66
|
+
},
|
|
67
|
+
bottomRight: {
|
|
68
|
+
top: '100%',
|
|
69
|
+
left: 0,
|
|
70
|
+
marginTop: '0.5rem',
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
export const popoverArrow = styleWithLayer({
|
|
74
|
+
position: 'absolute',
|
|
75
|
+
width: '8px',
|
|
76
|
+
height: '8px',
|
|
77
|
+
backgroundColor: vars.colors.backgroundDefault,
|
|
78
|
+
border: `1px solid ${vars.colors.borderDefault}`,
|
|
79
|
+
transform: 'rotate(45deg)',
|
|
80
|
+
});
|
|
81
|
+
export const popoverArrowPositionVariants = styleVariants({
|
|
82
|
+
top: {
|
|
83
|
+
bottom: '-5px',
|
|
84
|
+
left: '50%',
|
|
85
|
+
transform: 'translateX(-50%) rotate(45deg)',
|
|
86
|
+
borderTop: 'none',
|
|
87
|
+
borderLeft: 'none',
|
|
88
|
+
},
|
|
89
|
+
bottom: {
|
|
90
|
+
top: '-5px',
|
|
91
|
+
left: '50%',
|
|
92
|
+
transform: 'translateX(-50%) rotate(45deg)',
|
|
93
|
+
borderBottom: 'none',
|
|
94
|
+
borderRight: 'none',
|
|
95
|
+
},
|
|
96
|
+
left: {
|
|
97
|
+
right: '-5px',
|
|
98
|
+
top: '50%',
|
|
99
|
+
transform: 'translateY(-50%) rotate(45deg)',
|
|
100
|
+
borderLeft: 'none',
|
|
101
|
+
borderBottom: 'none',
|
|
102
|
+
},
|
|
103
|
+
right: {
|
|
104
|
+
left: '-5px',
|
|
105
|
+
top: '50%',
|
|
106
|
+
transform: 'translateY(-50%) rotate(45deg)',
|
|
107
|
+
borderRight: 'none',
|
|
108
|
+
borderTop: 'none',
|
|
109
|
+
},
|
|
110
|
+
topLeft: {
|
|
111
|
+
bottom: '-5px',
|
|
112
|
+
right: '1rem',
|
|
113
|
+
transform: 'rotate(45deg)',
|
|
114
|
+
borderTop: 'none',
|
|
115
|
+
borderLeft: 'none',
|
|
116
|
+
},
|
|
117
|
+
topRight: {
|
|
118
|
+
bottom: '-5px',
|
|
119
|
+
left: '1rem',
|
|
120
|
+
transform: 'rotate(45deg)',
|
|
121
|
+
borderTop: 'none',
|
|
122
|
+
borderLeft: 'none',
|
|
123
|
+
},
|
|
124
|
+
bottomLeft: {
|
|
125
|
+
top: '-5px',
|
|
126
|
+
right: '1rem',
|
|
127
|
+
transform: 'rotate(45deg)',
|
|
128
|
+
borderBottom: 'none',
|
|
129
|
+
borderRight: 'none',
|
|
130
|
+
},
|
|
131
|
+
bottomRight: {
|
|
132
|
+
top: '-5px',
|
|
133
|
+
left: '1rem',
|
|
134
|
+
transform: 'rotate(45deg)',
|
|
135
|
+
borderBottom: 'none',
|
|
136
|
+
borderRight: 'none',
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
export const popoverHeader = styleWithLayer({
|
|
140
|
+
display: 'flex',
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
justifyContent: 'space-between',
|
|
143
|
+
marginBottom: '0.75rem',
|
|
144
|
+
paddingBottom: '0.75rem',
|
|
145
|
+
borderBottom: `1px solid ${vars.colors.borderMuted}`,
|
|
146
|
+
});
|
|
147
|
+
export const popoverTitle = styleWithLayer({
|
|
148
|
+
fontFamily: vars.fontFamily.heading,
|
|
149
|
+
fontSize: '1rem',
|
|
150
|
+
fontWeight: '600',
|
|
151
|
+
color: vars.colors.textPrimary,
|
|
152
|
+
margin: 0,
|
|
153
|
+
});
|
|
154
|
+
export const popoverCloseButton = styleWithLayer({
|
|
155
|
+
background: 'none',
|
|
156
|
+
border: 'none',
|
|
157
|
+
padding: '0.25rem',
|
|
158
|
+
cursor: 'pointer',
|
|
159
|
+
borderRadius: '0.25rem',
|
|
160
|
+
display: 'flex',
|
|
161
|
+
alignItems: 'center',
|
|
162
|
+
justifyContent: 'center',
|
|
163
|
+
color: vars.colors.textSecondary,
|
|
164
|
+
fontSize: '1.25rem',
|
|
165
|
+
lineHeight: '1',
|
|
166
|
+
marginLeft: '0.5rem',
|
|
167
|
+
transition: 'background-color 0.2s ease-in-out, color 0.2s ease-in-out',
|
|
168
|
+
':hover': {
|
|
169
|
+
backgroundColor: vars.colors.borderMuted,
|
|
170
|
+
color: vars.colors.textPrimary,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
export const popoverBody = styleWithLayer({
|
|
174
|
+
fontSize: '14px',
|
|
175
|
+
color: vars.colors.textPrimary,
|
|
176
|
+
lineHeight: '1.5',
|
|
177
|
+
});
|
|
178
|
+
export const popoverFooter = styleWithLayer({
|
|
179
|
+
display: 'flex',
|
|
180
|
+
gap: '0.5rem',
|
|
181
|
+
justifyContent: 'flex-end',
|
|
182
|
+
marginTop: '0.75rem',
|
|
183
|
+
paddingTop: '0.75rem',
|
|
184
|
+
borderTop: `1px solid ${vars.colors.borderMuted}`,
|
|
185
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ProgressProps = {
|
|
2
|
+
value: number;
|
|
3
|
+
max?: number;
|
|
4
|
+
label?: string;
|
|
5
|
+
showPercentage?: boolean;
|
|
6
|
+
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Progress: ({ value, max, label, showPercentage, variant, className, }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Progress;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { progress, progressBar, progressFill, progressLabel, } from './styles.css';
|
|
4
|
+
import Box from '../Box';
|
|
5
|
+
const Progress = ({ value, max = 100, label, showPercentage = false, variant = 'default', className, }) => {
|
|
6
|
+
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
|
7
|
+
return (_jsxs(Box, { className: clsx(progress, className), width: "100%", children: [(label || showPercentage) && (_jsxs(Box, { className: progressLabel, display: "flex", justifyContent: "space-between", fontSize: "12px", fontWeight: "500", color: "c5-600", marginBottom: "small", fontFamily: "body", children: [label && _jsx(Box, { as: "span", children: label }), showPercentage && _jsxs(Box, { as: "span", children: [percentage, "%"] })] })), _jsx(Box, { as: "div", className: progressBar[variant], role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, children: _jsx(Box, { as: "div", className: progressFill[variant], style: { width: `${percentage}%` }, role: "presentation" }) })] }));
|
|
8
|
+
};
|
|
9
|
+
export default Progress;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Progress } from './Progress';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Progress } from './Progress';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const progress: string;
|
|
2
|
+
export declare const progressBar: Record<"default" | "success" | "warning" | "error", string>;
|
|
3
|
+
export declare const progressFill: Record<"default" | "success" | "warning" | "error", string>;
|
|
4
|
+
export declare const progressLabel: string;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
+
import { vars } from '../../styles/theme.css';
|
|
3
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
+
export const progress = styleWithLayer({
|
|
5
|
+
width: '100%',
|
|
6
|
+
});
|
|
7
|
+
export const progressBar = styleVariants({
|
|
8
|
+
default: {
|
|
9
|
+
width: '100%',
|
|
10
|
+
height: '8px',
|
|
11
|
+
backgroundColor: vars.colors.backgroundMuted,
|
|
12
|
+
borderRadius: '4px',
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
},
|
|
15
|
+
success: {
|
|
16
|
+
width: '100%',
|
|
17
|
+
height: '8px',
|
|
18
|
+
backgroundColor: vars.colors.alertSuccessBackground,
|
|
19
|
+
borderRadius: '4px',
|
|
20
|
+
overflow: 'hidden',
|
|
21
|
+
},
|
|
22
|
+
warning: {
|
|
23
|
+
width: '100%',
|
|
24
|
+
height: '8px',
|
|
25
|
+
backgroundColor: vars.colors.alertWarningBackground,
|
|
26
|
+
borderRadius: '4px',
|
|
27
|
+
overflow: 'hidden',
|
|
28
|
+
},
|
|
29
|
+
error: {
|
|
30
|
+
width: '100%',
|
|
31
|
+
height: '8px',
|
|
32
|
+
backgroundColor: vars.colors.alertErrorBackground,
|
|
33
|
+
borderRadius: '4px',
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
export const progressFill = styleVariants({
|
|
38
|
+
default: {
|
|
39
|
+
height: '100%',
|
|
40
|
+
borderRadius: '4px',
|
|
41
|
+
transition: 'width 0.3s ease',
|
|
42
|
+
backgroundColor: vars.colors.buttonBackgroundPrimary,
|
|
43
|
+
},
|
|
44
|
+
success: {
|
|
45
|
+
height: '100%',
|
|
46
|
+
borderRadius: '4px',
|
|
47
|
+
transition: 'width 0.3s ease',
|
|
48
|
+
backgroundColor: vars.colors.alertSuccessBorder,
|
|
49
|
+
},
|
|
50
|
+
warning: {
|
|
51
|
+
height: '100%',
|
|
52
|
+
borderRadius: '4px',
|
|
53
|
+
transition: 'width 0.3s ease',
|
|
54
|
+
backgroundColor: vars.colors.alertWarningBorder,
|
|
55
|
+
},
|
|
56
|
+
error: {
|
|
57
|
+
height: '100%',
|
|
58
|
+
borderRadius: '4px',
|
|
59
|
+
transition: 'width 0.3s ease',
|
|
60
|
+
backgroundColor: vars.colors.alertErrorBorder,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
export const progressLabel = styleWithLayer({
|
|
64
|
+
display: 'flex',
|
|
65
|
+
justifyContent: 'space-between',
|
|
66
|
+
fontSize: '12px',
|
|
67
|
+
fontWeight: '500',
|
|
68
|
+
color: vars.colors.textSecondary,
|
|
69
|
+
marginBottom: '4px',
|
|
70
|
+
fontFamily: vars.fontFamily.body,
|
|
71
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type RadioGroupProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
name: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
layout?: 'vertical' | 'horizontal';
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const RadioComponent: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "type" | "onChange"> & {
|
|
11
|
+
label?: string;
|
|
12
|
+
value: string;
|
|
13
|
+
} & React.RefAttributes<HTMLInputElement>> & {
|
|
14
|
+
Group: ({ children, name, value, onChange, layout, className, }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
export default RadioComponent;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef, createContext, useContext } from 'react';
|
|
4
|
+
import { radioContainer, radioInput, radioLabel, radioGroup, radioGroupHorizontal, } from './styles.css';
|
|
5
|
+
import Box from '../Box';
|
|
6
|
+
const RadioContext = createContext({});
|
|
7
|
+
const Radio = forwardRef(({ label, className, value, ...props }, ref) => {
|
|
8
|
+
const context = useContext(RadioContext);
|
|
9
|
+
const name = context.name || props.name;
|
|
10
|
+
const isChecked = context.value === value;
|
|
11
|
+
const handleChange = () => {
|
|
12
|
+
if (context.onChange) {
|
|
13
|
+
context.onChange(value);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return (_jsxs(Box, { as: "label", className: clsx(radioContainer, className), display: "flex", alignItems: "center", gap: "small", cursor: "pointer", style: { userSelect: 'none' }, children: [_jsx(Box, { as: "input", type: "radio", ref: ref, name: name, value: value, checked: isChecked, onChange: handleChange, className: radioInput, ...props }), label && _jsx(Box, { as: "span", className: radioLabel, children: label })] }));
|
|
17
|
+
});
|
|
18
|
+
Radio.displayName = 'Radio';
|
|
19
|
+
const RadioGroup = ({ children, name, value, onChange, layout = 'vertical', className, }) => {
|
|
20
|
+
return (_jsx(RadioContext.Provider, { value: { name, value, onChange }, children: _jsx(Box, { className: clsx(layout === 'horizontal' ? radioGroupHorizontal : radioGroup, className), children: children }) }));
|
|
21
|
+
};
|
|
22
|
+
const RadioComponent = Object.assign(Radio, {
|
|
23
|
+
Group: RadioGroup,
|
|
24
|
+
});
|
|
25
|
+
export default RadioComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Radio } from './Radio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Radio } from './Radio';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
|
2
|
+
import { vars } from '../../styles/theme.css';
|
|
3
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
+
export const radioContainer = styleWithLayer({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
gap: '8px',
|
|
8
|
+
cursor: 'pointer',
|
|
9
|
+
userSelect: 'none',
|
|
10
|
+
});
|
|
11
|
+
export const radioInput = style({
|
|
12
|
+
width: '18px',
|
|
13
|
+
height: '18px',
|
|
14
|
+
border: `2px solid ${vars.colors.borderDefault}`,
|
|
15
|
+
borderRadius: '50%',
|
|
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 radioLabel = styleWithLayer({
|
|
28
|
+
fontFamily: vars.fontFamily.body,
|
|
29
|
+
fontSize: '14px',
|
|
30
|
+
color: vars.colors.textPrimary,
|
|
31
|
+
});
|
|
32
|
+
export const radioGroup = styleWithLayer({
|
|
33
|
+
display: 'flex',
|
|
34
|
+
flexDirection: 'column',
|
|
35
|
+
gap: '8px',
|
|
36
|
+
});
|
|
37
|
+
export const radioGroupHorizontal = styleWithLayer({
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
gap: '16px',
|
|
41
|
+
flexWrap: 'wrap',
|
|
42
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';
|
|
3
|
+
export interface ScrollAreaProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
orientation?: ScrollAreaOrientation;
|
|
6
|
+
maxHeight?: string | number;
|
|
7
|
+
maxWidth?: string | number;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const ScrollArea: ({ children, orientation, maxHeight, maxWidth, className, ...props }: ScrollAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default ScrollArea;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { scrollArea, scrollAreaOrientation, scrollAreaViewport, } from './styles.css';
|
|
4
|
+
import Box from '../Box';
|
|
5
|
+
const ScrollArea = ({ children, orientation = 'vertical', maxHeight, maxWidth, className, ...props }) => {
|
|
6
|
+
const style = {
|
|
7
|
+
maxHeight,
|
|
8
|
+
maxWidth,
|
|
9
|
+
};
|
|
10
|
+
return (_jsx(Box, { className: clsx(scrollArea, scrollAreaOrientation[orientation], className), style: style, ...props, children: _jsx(Box, { className: scrollAreaViewport, children: children }) }));
|
|
11
|
+
};
|
|
12
|
+
export default ScrollArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ScrollArea } from './ScrollArea';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
+
import { vars } from '../../styles/theme.css';
|
|
3
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
+
export const scrollArea = styleWithLayer({
|
|
5
|
+
overflow: 'auto',
|
|
6
|
+
scrollbarWidth: 'thin',
|
|
7
|
+
scrollbarColor: `${vars.colors.borderDefault} ${vars.colors.backgroundMuted}`,
|
|
8
|
+
});
|
|
9
|
+
export const scrollAreaOrientation = styleVariants({
|
|
10
|
+
vertical: {
|
|
11
|
+
overflowX: 'hidden',
|
|
12
|
+
overflowY: 'auto',
|
|
13
|
+
},
|
|
14
|
+
horizontal: {
|
|
15
|
+
overflowX: 'auto',
|
|
16
|
+
overflowY: 'hidden',
|
|
17
|
+
},
|
|
18
|
+
both: {
|
|
19
|
+
overflow: 'auto',
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
export const scrollAreaViewport = styleWithLayer({
|
|
23
|
+
width: '100%',
|
|
24
|
+
height: '100%',
|
|
25
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SelectOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const Select: React.ForwardRefExoticComponent<Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> & {
|
|
8
|
+
label?: string;
|
|
9
|
+
options: SelectOption[];
|
|
10
|
+
error?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
} & React.RefAttributes<HTMLSelectElement>>;
|
|
13
|
+
export default Select;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { select, selectLabel, selectWrapper } from './styles.css';
|
|
5
|
+
import Box from '../Box';
|
|
6
|
+
const Select = forwardRef(({ label, options, error = false, fullWidth = true, className, ...props }, ref) => {
|
|
7
|
+
return (_jsxs(Box, { className: selectWrapper, width: "100%", children: [label && (_jsx(Box, { as: "label", className: selectLabel, display: "block", fontSize: "14px", fontWeight: "500", color: "c5-700", marginBottom: "small", children: label })), _jsx(Box, { as: "select", ref: ref, className: clsx(select[error ? 'error' : 'default'], className), width: fullWidth ? '100%' : undefined, ...props, children: options.map((option) => (_jsx("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value))) })] }));
|
|
8
|
+
});
|
|
9
|
+
Select.displayName = 'Select';
|
|
10
|
+
export default Select;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Select } from './Select';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Select } from './Select';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
+
import { vars } from '../../styles/theme.css';
|
|
3
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
+
export const selectContainer = styleWithLayer({
|
|
5
|
+
width: '100%',
|
|
6
|
+
});
|
|
7
|
+
export const select = styleVariants({
|
|
8
|
+
default: {
|
|
9
|
+
width: '100%',
|
|
10
|
+
padding: '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
|
+
cursor: 'pointer',
|
|
18
|
+
outline: 'none',
|
|
19
|
+
appearance: 'none',
|
|
20
|
+
backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23252525' d='M6 8L1 3h10z'/%3E%3C/svg%3E")`,
|
|
21
|
+
backgroundRepeat: 'no-repeat',
|
|
22
|
+
backgroundPosition: 'right 12px center',
|
|
23
|
+
transition: 'border-color 0.2s ease',
|
|
24
|
+
'::placeholder': {
|
|
25
|
+
color: vars.colors.inputPlaceholder,
|
|
26
|
+
},
|
|
27
|
+
':focus-visible': {
|
|
28
|
+
outline: `2px solid ${vars.colors.inputBorderFocused}`,
|
|
29
|
+
outlineOffset: '2px',
|
|
30
|
+
},
|
|
31
|
+
':hover:not(:disabled)': {
|
|
32
|
+
borderColor: vars.colors.inputBorderFocused,
|
|
33
|
+
},
|
|
34
|
+
':disabled': {
|
|
35
|
+
cursor: 'not-allowed',
|
|
36
|
+
opacity: 0.5,
|
|
37
|
+
backgroundColor: vars.colors.backgroundMuted,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
error: {
|
|
41
|
+
width: '100%',
|
|
42
|
+
padding: '0.75rem 1rem',
|
|
43
|
+
fontSize: '14px',
|
|
44
|
+
fontFamily: vars.fontFamily.body,
|
|
45
|
+
color: vars.colors.textPrimary,
|
|
46
|
+
backgroundColor: vars.colors.inputBackground,
|
|
47
|
+
border: `1px solid ${vars.colors.alertErrorBorder}`,
|
|
48
|
+
borderRadius: '8px',
|
|
49
|
+
cursor: 'pointer',
|
|
50
|
+
outline: 'none',
|
|
51
|
+
appearance: 'none',
|
|
52
|
+
backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23252525' d='M6 8L1 3h10z'/%3E%3C/svg%3E")`,
|
|
53
|
+
backgroundRepeat: 'no-repeat',
|
|
54
|
+
backgroundPosition: 'right 12px center',
|
|
55
|
+
transition: 'border-color 0.2s ease',
|
|
56
|
+
'::placeholder': {
|
|
57
|
+
color: vars.colors.inputPlaceholder,
|
|
58
|
+
},
|
|
59
|
+
':focus-visible': {
|
|
60
|
+
outline: `2px solid ${vars.colors.alertErrorBorder}`,
|
|
61
|
+
outlineOffset: '2px',
|
|
62
|
+
},
|
|
63
|
+
':hover:not(:disabled)': {
|
|
64
|
+
borderColor: vars.colors.alertErrorBorder,
|
|
65
|
+
},
|
|
66
|
+
':disabled': {
|
|
67
|
+
cursor: 'not-allowed',
|
|
68
|
+
opacity: 0.5,
|
|
69
|
+
backgroundColor: vars.colors.backgroundMuted,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
export const selectLabel = styleWithLayer({
|
|
74
|
+
display: 'block',
|
|
75
|
+
fontSize: '14px',
|
|
76
|
+
fontWeight: '500',
|
|
77
|
+
color: vars.colors.textPrimary,
|
|
78
|
+
marginBottom: '8px',
|
|
79
|
+
});
|
|
80
|
+
export const selectWrapper = styleWithLayer({
|
|
81
|
+
width: '100%',
|
|
82
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type SeparatorOrientation = 'horizontal' | 'vertical';
|
|
2
|
+
export interface SeparatorProps {
|
|
3
|
+
orientation?: SeparatorOrientation;
|
|
4
|
+
decorative?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const Separator: ({ orientation, decorative, className, ...props }: SeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Separator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { separator, separatorOrientation, } from './styles.css';
|
|
4
|
+
import Box from '../Box';
|
|
5
|
+
const Separator = ({ orientation = 'horizontal', decorative = false, className, ...props }) => {
|
|
6
|
+
return (_jsx(Box, { as: "hr", className: clsx(separator, separatorOrientation[orientation], className), "aria-hidden": decorative, ...props }));
|
|
7
|
+
};
|
|
8
|
+
export default Separator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Separator } from './Separator';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
+
import { vars } from '../../styles/theme.css';
|
|
3
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
+
export const separator = styleWithLayer({
|
|
5
|
+
border: 'none',
|
|
6
|
+
margin: 0,
|
|
7
|
+
flexShrink: 0,
|
|
8
|
+
});
|
|
9
|
+
export const separatorOrientation = styleVariants({
|
|
10
|
+
horizontal: {
|
|
11
|
+
width: '100%',
|
|
12
|
+
height: '1px',
|
|
13
|
+
backgroundColor: vars.colors.borderDefault,
|
|
14
|
+
},
|
|
15
|
+
vertical: {
|
|
16
|
+
width: '1px',
|
|
17
|
+
height: '100%',
|
|
18
|
+
backgroundColor: vars.colors.borderDefault,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
export const separatorSize = styleVariants({
|
|
22
|
+
small: {},
|
|
23
|
+
medium: {},
|
|
24
|
+
large: {},
|
|
25
|
+
});
|
|
26
|
+
export const separatorDecorative = styleWithLayer({
|
|
27
|
+
backgroundColor: vars.colors.borderMuted,
|
|
28
|
+
});
|