@jordan-mace/chaser-design-system 1.2.2 → 1.2.4
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 +2 -2
- package/dist/components/Accordion/Accordion.js +26 -91
- package/dist/components/Accordion/index.js +1 -2
- package/dist/components/Accordion/styles.css.js +65 -14
- package/dist/components/Alert/Alert.d.ts +1 -1
- package/dist/components/Alert/Alert.js +8 -28
- package/dist/components/Alert/index.js +1 -2
- package/dist/components/Alert/styles.css.js +54 -13
- package/dist/components/AspectRatio/AspectRatio.js +9 -24
- package/dist/components/AspectRatio/index.js +1 -2
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +10 -24
- package/dist/components/Avatar/index.js +1 -2
- package/dist/components/Avatar/styles.css.js +151 -19
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +8 -13
- package/dist/components/Badge/index.js +1 -2
- package/dist/components/Badge/styles.css.js +77 -23
- package/dist/components/Box/Box.js +18 -17
- package/dist/components/Box/index.js +1 -2
- package/dist/components/Box/reset.css.js +15 -3
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +8 -66
- package/dist/components/Breadcrumb/index.js +1 -2
- package/dist/components/Breadcrumb/styles.css.js +50 -10
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +8 -15
- package/dist/components/Button/index.js +1 -2
- package/dist/components/Button/styles.css.js +30 -9
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +8 -15
- package/dist/components/Card/index.js +1 -2
- package/dist/components/Card/styles.css.js +25 -10
- package/dist/components/Checkbox/Checkbox.js +20 -45
- package/dist/components/Checkbox/index.js +1 -2
- package/dist/components/Checkbox/styles.css.js +31 -7
- package/dist/components/Collapse/Collapse.d.ts +1 -1
- package/dist/components/Collapse/Collapse.js +40 -42
- package/dist/components/Collapse/index.js +1 -2
- package/dist/components/Collapse/styles.css.js +36 -8
- package/dist/components/Combobox/Combobox.d.ts +1 -1
- package/dist/components/Combobox/Combobox.js +62 -129
- package/dist/components/Combobox/index.js +1 -2
- package/dist/components/Combobox/styles.css.js +142 -20
- package/dist/components/Container/Container.js +9 -19
- package/dist/components/Container/index.js +1 -2
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Divider/Divider.js +8 -14
- package/dist/components/Divider/index.js +1 -2
- package/dist/components/Divider/styles.css.js +41 -19
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +37 -85
- package/dist/components/Drawer/index.js +1 -2
- package/dist/components/Drawer/styles.css.js +125 -17
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +33 -88
- package/dist/components/DropdownMenu/index.js +1 -2
- package/dist/components/DropdownMenu/styles.css.d.ts +1 -1
- package/dist/components/DropdownMenu/styles.css.js +93 -22
- package/dist/components/EmptyState/EmptyState.d.ts +1 -1
- package/dist/components/EmptyState/EmptyState.js +8 -32
- package/dist/components/EmptyState/index.js +1 -2
- package/dist/components/EmptyState/styles.css.js +30 -9
- package/dist/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/components/FileUpload/FileUpload.js +63 -175
- package/dist/components/FileUpload/index.js +1 -2
- package/dist/components/FileUpload/styles.css.js +145 -32
- package/dist/components/Form/Form.d.ts +1 -1
- package/dist/components/Form/Form.js +8 -15
- package/dist/components/Form/FormInput.d.ts +1 -1
- package/dist/components/Form/FormInput.js +9 -15
- package/dist/components/Form/index.js +2 -3
- package/dist/components/Form/styles.css.js +11 -4
- package/dist/components/Grid/Grid.js +14 -19
- package/dist/components/Grid/index.js +1 -2
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +12 -20
- package/dist/components/Icon/index.js +1 -2
- package/dist/components/Icon/styles.css.js +9 -3
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +9 -38
- package/dist/components/Input/index.js +1 -2
- package/dist/components/Input/styles.css.js +8 -4
- package/dist/components/Kbd/Kbd.d.ts +1 -1
- package/dist/components/Kbd/Kbd.js +6 -10
- package/dist/components/Kbd/index.js +1 -2
- package/dist/components/Kbd/styles.css.js +16 -5
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +7 -11
- package/dist/components/List/ListItem.d.ts +1 -1
- package/dist/components/List/ListItem.js +7 -11
- package/dist/components/List/index.js +2 -3
- package/dist/components/List/styles.css.js +11 -6
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.js +21 -57
- package/dist/components/Modal/index.js +1 -2
- package/dist/components/Modal/styles.css.js +92 -16
- package/dist/components/Navbar/Navbar.d.ts +1 -1
- package/dist/components/Navbar/Navbar.js +8 -16
- package/dist/components/Navbar/NavbarItem.d.ts +1 -1
- package/dist/components/Navbar/NavbarItem.js +8 -12
- package/dist/components/Navbar/index.js +2 -3
- package/dist/components/Navbar/styles.css.js +3 -4
- package/dist/components/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/NumberInput/NumberInput.js +25 -94
- package/dist/components/NumberInput/index.js +1 -2
- package/dist/components/NumberInput/styles.css.js +117 -17
- package/dist/components/Pagination/Pagination.d.ts +1 -2
- package/dist/components/Pagination/Pagination.js +34 -57
- package/dist/components/Pagination/index.js +1 -2
- package/dist/components/Pagination/styles.css.js +44 -11
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.js +43 -93
- package/dist/components/Popover/index.js +1 -2
- package/dist/components/Popover/styles.css.d.ts +2 -2
- package/dist/components/Popover/styles.css.js +185 -33
- package/dist/components/Progress/Progress.d.ts +1 -2
- package/dist/components/Progress/Progress.js +8 -54
- package/dist/components/Progress/index.js +1 -2
- package/dist/components/Progress/styles.css.js +71 -18
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/Radio.js +17 -52
- package/dist/components/Radio/index.js +1 -2
- package/dist/components/Radio/styles.css.js +42 -9
- package/dist/components/ScrollArea/ScrollArea.d.ts +1 -1
- package/dist/components/ScrollArea/ScrollArea.js +8 -18
- package/dist/components/ScrollArea/index.js +1 -2
- package/dist/components/ScrollArea/styles.css.js +25 -11
- package/dist/components/Select/Select.js +9 -35
- package/dist/components/Select/index.js +1 -2
- package/dist/components/Select/styles.css.js +82 -11
- package/dist/components/Separator/Separator.d.ts +1 -2
- package/dist/components/Separator/Separator.js +8 -13
- package/dist/components/Separator/index.js +1 -2
- package/dist/components/Separator/styles.css.js +28 -15
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +9 -24
- package/dist/components/Skeleton/index.js +1 -2
- package/dist/components/Skeleton/styles.css.js +56 -20
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +8 -14
- package/dist/components/Spinner/index.js +1 -2
- package/dist/components/Spinner/styles.css.d.ts +1 -1
- package/dist/components/Spinner/styles.css.js +55 -19
- package/dist/components/Stack/Stack.js +10 -25
- package/dist/components/Stack/index.js +1 -2
- package/dist/components/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Stepper/Stepper.js +19 -64
- package/dist/components/Stepper/index.js +1 -2
- package/dist/components/Stepper/styles.css.js +104 -22
- package/dist/components/Table/Table.d.ts +7 -7
- package/dist/components/Table/Table.js +30 -56
- package/dist/components/Table/index.js +1 -2
- package/dist/components/Table/styles.css.js +49 -15
- package/dist/components/Tabs/Tabs.d.ts +4 -4
- package/dist/components/Tabs/Tabs.js +33 -52
- package/dist/components/Tabs/index.js +1 -2
- package/dist/components/Tabs/styles.css.js +100 -14
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/Tag/Tag.js +16 -38
- package/dist/components/Tag/index.js +1 -2
- package/dist/components/Tag/styles.css.d.ts +1 -1
- package/dist/components/Tag/styles.css.js +93 -14
- package/dist/components/Text/Header.d.ts +1 -1
- package/dist/components/Text/Header.js +8 -12
- package/dist/components/Text/P.d.ts +1 -1
- package/dist/components/Text/P.js +8 -12
- package/dist/components/Text/index.js +2 -3
- package/dist/components/Text/styles.css.js +13 -6
- package/dist/components/TextArea/TextArea.d.ts +1 -1
- package/dist/components/TextArea/TextArea.js +9 -38
- package/dist/components/TextArea/index.js +1 -2
- package/dist/components/TextArea/styles.css.js +10 -4
- package/dist/components/Toast/Toast.d.ts +3 -3
- package/dist/components/Toast/Toast.js +85 -144
- package/dist/components/Toast/index.js +1 -2
- package/dist/components/Toast/styles.css.d.ts +1 -1
- package/dist/components/Toast/styles.css.js +192 -32
- package/dist/components/Toggle/Toggle.d.ts +1 -1
- package/dist/components/Toggle/Toggle.js +12 -57
- package/dist/components/Toggle/index.js +1 -2
- package/dist/components/Toggle/styles.css.js +118 -24
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +12 -37
- package/dist/components/Tooltip/index.js +1 -2
- package/dist/components/Tooltip/styles.css.js +86 -17
- package/dist/components/VisuallyHidden/VisuallyHidden.js +7 -6
- package/dist/components/VisuallyHidden/index.js +1 -2
- package/dist/components/VisuallyHidden/styles.css.js +12 -3
- package/dist/components/index.js +47 -48
- package/dist/index.js +1 -1
- package/dist/styles/layers.css.js +3 -4
- package/dist/styles/sprinkles.css.d.ts +115 -115
- package/dist/styles/sprinkles.css.js +72 -2219
- package/dist/styles/theme.css.js +48 -38
- package/dist/styles/utils.js +7 -8
- package/package.json +12 -16
- package/src/components/Accordion/Accordion.stories.tsx +73 -0
- package/src/components/Accordion/Accordion.test.tsx +54 -0
- package/src/components/Accordion/Accordion.tsx +146 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/Accordion/styles.css.ts +72 -0
- package/src/components/Alert/Alert.stories.tsx +82 -0
- package/src/components/Alert/Alert.test.tsx +58 -0
- package/src/components/Alert/Alert.tsx +48 -0
- package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-dismissible-alert-correctly-1-chromium-linux.png +0 -0
- package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-error-alert-correctly-1-chromium-linux.png +0 -0
- package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-info-alert-correctly-1-chromium-linux.png +0 -0
- package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-success-alert-correctly-1-chromium-linux.png +0 -0
- package/src/components/Alert/__screenshots__/Alert.test.tsx/Alert-renders-warning-alert-correctly-1-chromium-linux.png +0 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Alert/styles.css.ts +58 -0
- package/src/components/AspectRatio/AspectRatio.stories.tsx +85 -0
- package/src/components/AspectRatio/AspectRatio.test.tsx +50 -0
- package/src/components/AspectRatio/AspectRatio.tsx +42 -0
- package/src/components/AspectRatio/index.ts +2 -0
- package/src/components/Avatar/Avatar.stories.tsx +82 -0
- package/src/components/Avatar/Avatar.test.tsx +45 -0
- package/src/components/Avatar/Avatar.tsx +51 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Avatar/styles.css.ts +155 -0
- package/src/components/Badge/Badge.stories.tsx +141 -0
- package/src/components/Badge/Badge.test.tsx +74 -0
- package/src/components/Badge/Badge.tsx +46 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-does-not-render-children-when-dot-is-true-1.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-default-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-dot-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-dot-with-size-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-dot-with-variant-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-error-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-info-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-large-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-medium-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-small-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-span-element-with-proper-attributes-1.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-success-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/__screenshots__/Badge.test.tsx/Badge-renders-warning-badge-correctly-1-chromium-linux.png +0 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/Badge/styles.css.ts +82 -0
- package/src/components/Box/Box.stories.tsx +183 -0
- package/src/components/Box/Box.test.tsx +63 -0
- package/src/components/Box/Box.tsx +72 -0
- package/src/components/Box/index.ts +2 -0
- package/src/components/Box/reset.css.ts +16 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +55 -0
- package/src/components/Breadcrumb/Breadcrumb.test.tsx +44 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +102 -0
- package/src/components/Breadcrumb/index.ts +1 -0
- package/src/components/Breadcrumb/styles.css.ts +56 -0
- package/src/components/Button/Button.stories.tsx +60 -0
- package/src/components/Button/Button.test.tsx +26 -0
- package/src/components/Button/Button.tsx +31 -0
- package/src/components/Button/__screenshots__/Button.test.tsx/Button-renders-correctly-1-chromium-win32.png +0 -0
- package/src/components/Button/__screenshots__/Button.test.tsx/Button-renders-primary-button-correctly-1-chromium-linux.png +0 -0
- package/src/components/Button/__screenshots__/Button.test.tsx/Button-renders-primary-button-correctly-1-chromium-win32.png +0 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Button/styles.css.ts +32 -0
- package/src/components/Card/Card.stories.tsx +85 -0
- package/src/components/Card/Card.test.tsx +43 -0
- package/src/components/Card/Card.tsx +34 -0
- package/src/components/Card/__screenshots__/Card.test.tsx/Card-renders-elevated-card-correctly-1-chromium-linux.png +0 -0
- package/src/components/Card/__screenshots__/Card.test.tsx/Card-renders-filled-card-correctly-1-chromium-linux.png +0 -0
- package/src/components/Card/__screenshots__/Card.test.tsx/Card-renders-outlined-card-correctly-1-chromium-linux.png +0 -0
- package/src/components/Card/__screenshots__/Card.test.tsx/Card-renders-with-no-padding-1-chromium-linux.png +0 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Card/styles.css.ts +27 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +61 -0
- package/src/components/Checkbox/Checkbox.test.tsx +40 -0
- package/src/components/Checkbox/Checkbox.tsx +58 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Checkbox/styles.css.ts +34 -0
- package/src/components/Collapse/Collapse.stories.tsx +63 -0
- package/src/components/Collapse/Collapse.test.tsx +24 -0
- package/src/components/Collapse/Collapse.tsx +97 -0
- package/src/components/Collapse/index.ts +2 -0
- package/src/components/Collapse/styles.css.ts +42 -0
- package/src/components/Combobox/Combobox.stories.tsx +100 -0
- package/src/components/Combobox/Combobox.test.tsx +49 -0
- package/src/components/Combobox/Combobox.tsx +266 -0
- package/src/components/Combobox/index.ts +2 -0
- package/src/components/Combobox/styles.css.ts +155 -0
- package/src/components/Container/Container.stories.tsx +69 -0
- package/src/components/Container/Container.test.tsx +42 -0
- package/src/components/Container/Container.tsx +47 -0
- package/src/components/Container/index.ts +2 -0
- package/src/components/Divider/Divider.stories.tsx +121 -0
- package/src/components/Divider/Divider.test.tsx +56 -0
- package/src/components/Divider/Divider.tsx +40 -0
- package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-applies-orientation-correctly-1.png +0 -0
- package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-horizontal-divider-correctly-1-chromium-linux.png +0 -0
- package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-hr-element-with-proper-attributes-1.png +0 -0
- package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-large-divider-correctly-1-chromium-linux.png +0 -0
- package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-medium-divider-correctly-1-chromium-linux.png +0 -0
- package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-small-divider-correctly-1-chromium-linux.png +0 -0
- package/src/components/Divider/__screenshots__/Divider.test.tsx/Divider-renders-vertical-divider-correctly-1-chromium-linux.png +0 -0
- package/src/components/Divider/index.ts +2 -0
- package/src/components/Divider/styles.css.ts +45 -0
- package/src/components/Drawer/Drawer.stories.tsx +99 -0
- package/src/components/Drawer/Drawer.test.tsx +51 -0
- package/src/components/Drawer/Drawer.tsx +148 -0
- package/src/components/Drawer/index.ts +2 -0
- package/src/components/Drawer/styles.css.ts +138 -0
- package/src/components/DropdownMenu/DropdownMenu.stories.tsx +72 -0
- package/src/components/DropdownMenu/DropdownMenu.test.tsx +43 -0
- package/src/components/DropdownMenu/DropdownMenu.tsx +156 -0
- package/src/components/DropdownMenu/index.ts +2 -0
- package/src/components/DropdownMenu/styles.css.ts +102 -0
- package/src/components/EmptyState/EmptyState.stories.tsx +47 -0
- package/src/components/EmptyState/EmptyState.test.tsx +25 -0
- package/src/components/EmptyState/EmptyState.tsx +53 -0
- package/src/components/EmptyState/index.ts +2 -0
- package/src/components/EmptyState/styles.css.ts +36 -0
- package/src/components/FileUpload/FileUpload.stories.tsx +138 -0
- package/src/components/FileUpload/FileUpload.test.tsx +56 -0
- package/src/components/FileUpload/FileUpload.tsx +269 -0
- package/src/components/FileUpload/index.ts +2 -0
- package/src/components/FileUpload/styles.css.ts +164 -0
- package/src/components/Form/Form.stories.tsx +51 -0
- package/src/components/Form/Form.test.tsx +41 -0
- package/src/components/Form/Form.tsx +28 -0
- package/src/components/Form/FormInput.tsx +16 -0
- package/src/components/Form/__screenshots__/Form.test.tsx/Form-can-submit-1.png +0 -0
- package/src/components/Form/__screenshots__/Form.test.tsx/Form-renders-correctly-1-chromium-win32.png +0 -0
- package/src/components/Form/__screenshots__/Form.test.tsx/Form-renders-form-correctly-1-chromium-linux.png +0 -0
- package/src/components/Form/__screenshots__/Form.test.tsx/Form-renders-form-correctly-1-chromium-win32.png +0 -0
- package/src/components/Form/index.ts +2 -0
- package/src/components/Form/styles.css.ts +13 -0
- package/src/components/Grid/Grid.stories.tsx +134 -0
- package/src/components/Grid/Grid.test.tsx +41 -0
- package/src/components/Grid/Grid.tsx +48 -0
- package/src/components/Grid/index.ts +2 -0
- package/src/components/Icon/Icon.tsx +43 -0
- package/src/components/Icon/index.ts +1 -0
- package/src/components/Icon/styles.css.ts +11 -0
- package/src/components/Input/Input.stories.tsx +38 -0
- package/src/components/Input/Input.test.tsx +16 -0
- package/src/components/Input/Input.tsx +43 -0
- package/src/components/Input/__screenshots__/Input.test.tsx/Input-renders-correctly-with-label-1-chromium-linux.png +0 -0
- package/src/components/Input/__screenshots__/Input.test.tsx/Input-renders-correctly-with-label-1-chromium-win32.png +0 -0
- package/src/components/Input/__screenshots__/Input.test.tsx/Input-renders-correctly-without-label-1-chromium-linux.png +0 -0
- package/src/components/Input/__screenshots__/Input.test.tsx/Input-renders-correctly-without-label-1-chromium-win32.png +0 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Input/styles.css.ts +10 -0
- package/src/components/Kbd/Kbd.stories.tsx +53 -0
- package/src/components/Kbd/Kbd.test.tsx +22 -0
- package/src/components/Kbd/Kbd.tsx +17 -0
- package/src/components/Kbd/index.ts +2 -0
- package/src/components/Kbd/styles.css.ts +18 -0
- package/src/components/List/List.test.tsx +18 -0
- package/src/components/List/List.tsx +13 -0
- package/src/components/List/ListItem.tsx +13 -0
- package/src/components/List/__screenshots__/List.test.tsx/List-renders-correctly-1-chromium-win32.png +0 -0
- package/src/components/List/__screenshots__/List.test.tsx/List-renders-list-correctly-1-chromium-linux.png +0 -0
- package/src/components/List/__screenshots__/List.test.tsx/List-renders-list-correctly-1-chromium-win32.png +0 -0
- package/src/components/List/index.ts +2 -0
- package/src/components/List/styles.css.ts +13 -0
- package/src/components/Modal/Modal.stories.tsx +202 -0
- package/src/components/Modal/Modal.test.tsx +168 -0
- package/src/components/Modal/Modal.tsx +109 -0
- package/src/components/Modal/__screenshots__/Modal.test.tsx/Modal-displays-title-correctly-1.png +0 -0
- package/src/components/Modal/__screenshots__/Modal.test.tsx/Modal-handles-backdrop-click-to-close-1.png +0 -0
- package/src/components/Modal/index.ts +2 -0
- package/src/components/Modal/styles.css.ts +99 -0
- package/src/components/Navbar/Navbar.stories.tsx +49 -0
- package/src/components/Navbar/Navbar.test.tsx +18 -0
- package/src/components/Navbar/Navbar.tsx +27 -0
- package/src/components/Navbar/NavbarItem.tsx +14 -0
- package/src/components/Navbar/__screenshots__/Navbar.test.tsx/Navbar-renders-correctly-1-chromium-win32.png +0 -0
- package/src/components/Navbar/__screenshots__/Navbar.test.tsx/Navbar-renders-navbar-correctly-1-chromium-linux.png +0 -0
- package/src/components/Navbar/__screenshots__/Navbar.test.tsx/Navbar-renders-navbar-correctly-1-chromium-win32.png +0 -0
- package/src/components/Navbar/index.ts +2 -0
- package/src/components/Navbar/styles.css.ts +5 -0
- package/src/components/NumberInput/NumberInput.stories.tsx +101 -0
- package/src/components/NumberInput/NumberInput.test.tsx +39 -0
- package/src/components/NumberInput/NumberInput.tsx +161 -0
- package/src/components/NumberInput/index.ts +2 -0
- package/src/components/NumberInput/styles.css.ts +127 -0
- package/src/components/Pagination/Pagination.stories.tsx +63 -0
- package/src/components/Pagination/Pagination.test.tsx +27 -0
- package/src/components/Pagination/Pagination.tsx +138 -0
- package/src/components/Pagination/index.ts +2 -0
- package/src/components/Pagination/styles.css.ts +48 -0
- package/src/components/Popover/Popover.stories.tsx +80 -0
- package/src/components/Popover/Popover.test.tsx +47 -0
- package/src/components/Popover/Popover.tsx +171 -0
- package/src/components/Popover/index.ts +2 -0
- package/src/components/Popover/styles.css.ts +197 -0
- package/src/components/Progress/Progress.stories.tsx +73 -0
- package/src/components/Progress/Progress.test.tsx +53 -0
- package/src/components/Progress/Progress.tsx +66 -0
- package/src/components/Progress/index.ts +1 -0
- package/src/components/Progress/styles.css.ts +75 -0
- package/src/components/Radio/Radio.stories.tsx +75 -0
- package/src/components/Radio/Radio.test.tsx +54 -0
- package/src/components/Radio/Radio.tsx +104 -0
- package/src/components/Radio/index.ts +1 -0
- package/src/components/Radio/styles.css.ts +47 -0
- package/src/components/ScrollArea/ScrollArea.stories.tsx +63 -0
- package/src/components/ScrollArea/ScrollArea.test.tsx +24 -0
- package/src/components/ScrollArea/ScrollArea.tsx +50 -0
- package/src/components/ScrollArea/index.ts +2 -0
- package/src/components/ScrollArea/styles.css.ts +28 -0
- package/src/components/Select/Select.stories.tsx +94 -0
- package/src/components/Select/Select.test.tsx +57 -0
- package/src/components/Select/Select.tsx +60 -0
- package/src/components/Select/index.ts +1 -0
- package/src/components/Select/styles.css.ts +86 -0
- package/src/components/Separator/Separator.stories.tsx +49 -0
- package/src/components/Separator/Separator.test.tsx +22 -0
- package/src/components/Separator/Separator.tsx +37 -0
- package/src/components/Separator/index.ts +2 -0
- package/src/components/Separator/styles.css.ts +32 -0
- package/src/components/Skeleton/Skeleton.stories.tsx +78 -0
- package/src/components/Skeleton/Skeleton.test.tsx +36 -0
- package/src/components/Skeleton/Skeleton.tsx +67 -0
- package/src/components/Skeleton/index.ts +2 -0
- package/src/components/Skeleton/styles.css.ts +62 -0
- package/src/components/Spinner/Spinner.stories.tsx +123 -0
- package/src/components/Spinner/Spinner.test.tsx +73 -0
- package/src/components/Spinner/Spinner.tsx +41 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-div-element-with-proper-attributes-1.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-error-color-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-info-color-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-large-spinner-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-medium-spinner-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-primary-spinner-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-secondary-color-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-small-spinner-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-success-color-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/__screenshots__/Spinner.test.tsx/Spinner-renders-warning-color-correctly-1-chromium-linux.png +0 -0
- package/src/components/Spinner/index.ts +2 -0
- package/src/components/Spinner/styles.css.ts +59 -0
- package/src/components/Stack/Stack.stories.tsx +123 -0
- package/src/components/Stack/Stack.test.tsx +48 -0
- package/src/components/Stack/Stack.tsx +60 -0
- package/src/components/Stack/index.ts +2 -0
- package/src/components/Stepper/Stepper.stories.tsx +85 -0
- package/src/components/Stepper/Stepper.test.tsx +47 -0
- package/src/components/Stepper/Stepper.tsx +133 -0
- package/src/components/Stepper/index.ts +2 -0
- package/src/components/Stepper/styles.css.ts +118 -0
- package/src/components/Table/Table.stories.tsx +147 -0
- package/src/components/Table/Table.test.tsx +104 -0
- package/src/components/Table/Table.tsx +131 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/Table/styles.css.ts +57 -0
- package/src/components/Tabs/Tabs.stories.tsx +104 -0
- package/src/components/Tabs/Tabs.test.tsx +52 -0
- package/src/components/Tabs/Tabs.tsx +147 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/Tabs/styles.css.ts +106 -0
- package/src/components/Tag/Tag.stories.tsx +72 -0
- package/src/components/Tag/Tag.test.tsx +49 -0
- package/src/components/Tag/Tag.tsx +72 -0
- package/src/components/Tag/index.ts +1 -0
- package/src/components/Tag/styles.css.ts +96 -0
- package/src/components/Text/Header.stories.tsx +45 -0
- package/src/components/Text/Header.tsx +20 -0
- package/src/components/Text/P.stories.tsx +24 -0
- package/src/components/Text/P.tsx +19 -0
- package/src/components/Text/Text.test.tsx +32 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h1-correctly-1-chromium-linux.png +0 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h1-correctly-1-chromium-win32.png +0 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h2-correctly-1-chromium-linux.png +0 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h2-correctly-1-chromium-win32.png +0 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h3-correctly-1-chromium-linux.png +0 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/Header-renders-h3-correctly-1-chromium-win32.png +0 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/P-renders-correctly-1-chromium-win32.png +0 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/P-renders-p-correctly-1-chromium-linux.png +0 -0
- package/src/components/Text/__screenshots__/Text.test.tsx/P-renders-p-correctly-1-chromium-win32.png +0 -0
- package/src/components/Text/index.ts +2 -0
- package/src/components/Text/styles.css.ts +15 -0
- package/src/components/TextArea/TextArea.stories.tsx +40 -0
- package/src/components/TextArea/TextArea.test.tsx +16 -0
- package/src/components/TextArea/TextArea.tsx +43 -0
- package/src/components/TextArea/index.ts +2 -0
- package/src/components/TextArea/styles.css.ts +12 -0
- package/src/components/Toast/Toast.tsx +342 -0
- package/src/components/Toast/index.ts +9 -0
- package/src/components/Toast/styles.css.ts +213 -0
- package/src/components/Toggle/Toggle.stories.tsx +190 -0
- package/src/components/Toggle/Toggle.test.tsx +85 -0
- package/src/components/Toggle/Toggle.tsx +94 -0
- package/src/components/Toggle/index.ts +2 -0
- package/src/components/Toggle/styles.css.ts +130 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +111 -0
- package/src/components/Tooltip/Tooltip.test.tsx +93 -0
- package/src/components/Tooltip/Tooltip.tsx +72 -0
- package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-has-proper-role-attribute-1.png +0 -0
- package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-bottom-tooltip-correctly-1-chromium-linux.png +0 -0
- package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-left-tooltip-correctly-1-chromium-linux.png +0 -0
- package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-right-tooltip-correctly-1-chromium-linux.png +0 -0
- package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-tooltip-without-arrow-1-chromium-linux.png +0 -0
- package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-top-tooltip-correctly-1-chromium-linux.png +0 -0
- package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-renders-with-tooltip-content-1.png +0 -0
- package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-shows-tooltip-on-hover-1.png +0 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/Tooltip/styles.css.ts +94 -0
- package/src/components/VisuallyHidden/VisuallyHidden.stories.tsx +42 -0
- package/src/components/VisuallyHidden/VisuallyHidden.test.tsx +20 -0
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +26 -0
- package/src/components/VisuallyHidden/index.ts +2 -0
- package/src/components/VisuallyHidden/styles.css.ts +14 -0
- package/src/components/index.ts +68 -0
- package/src/index.ts +1 -0
- package/src/styles/layers.css.ts +3 -0
- package/src/styles/reset.css.ts +79 -0
- package/src/styles/sprinkles.css.ts +177 -0
- package/src/styles/theme.css.ts +55 -0
- package/src/styles/utils.ts +9 -0
- package/dist/layers.css.js +0 -4
- package/dist/reset.css.js +0 -1
- package/dist/styles/reset.css.js +0 -1
- package/dist/theme.css.js +0 -41
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import {
|
|
3
|
+
tooltipContainer,
|
|
4
|
+
tooltipContent,
|
|
5
|
+
tooltipPositions,
|
|
6
|
+
tooltipArrow,
|
|
7
|
+
tooltipArrowTop,
|
|
8
|
+
tooltipArrowBottom,
|
|
9
|
+
tooltipArrowLeft,
|
|
10
|
+
tooltipArrowRight,
|
|
11
|
+
} from './styles.css';
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import Box from '../Box';
|
|
14
|
+
|
|
15
|
+
export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
16
|
+
|
|
17
|
+
export interface TooltipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
content: string;
|
|
19
|
+
position?: TooltipPosition;
|
|
20
|
+
showArrow?: boolean;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const Tooltip = ({
|
|
25
|
+
content,
|
|
26
|
+
position = 'top',
|
|
27
|
+
showArrow = true,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}: TooltipProps) => {
|
|
31
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
32
|
+
|
|
33
|
+
const arrowStyle = {
|
|
34
|
+
top: position === 'bottom' ? tooltipArrowBottom : undefined,
|
|
35
|
+
bottom: position === 'top' ? tooltipArrowTop : undefined,
|
|
36
|
+
left: position === 'right' ? tooltipArrowLeft : undefined,
|
|
37
|
+
right: position === 'left' ? tooltipArrowRight : undefined,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Box
|
|
42
|
+
as="div"
|
|
43
|
+
className={clsx(tooltipContainer, props.className)}
|
|
44
|
+
onMouseEnter={() => setIsVisible(true)}
|
|
45
|
+
onMouseLeave={() => setIsVisible(false)}
|
|
46
|
+
onFocus={() => setIsVisible(true)}
|
|
47
|
+
onBlur={() => setIsVisible(false)}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
<Box
|
|
52
|
+
as="div"
|
|
53
|
+
className={clsx(
|
|
54
|
+
tooltipContent,
|
|
55
|
+
tooltipPositions[position],
|
|
56
|
+
)}
|
|
57
|
+
data-visible={isVisible}
|
|
58
|
+
role="tooltip"
|
|
59
|
+
>
|
|
60
|
+
{showArrow && (
|
|
61
|
+
<Box
|
|
62
|
+
as="span"
|
|
63
|
+
className={clsx(tooltipArrow, arrowStyle.top, arrowStyle.bottom, arrowStyle.left, arrowStyle.right)}
|
|
64
|
+
/>
|
|
65
|
+
)}
|
|
66
|
+
{content}
|
|
67
|
+
</Box>
|
|
68
|
+
</Box>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default Tooltip;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/components/Tooltip/__screenshots__/Tooltip.test.tsx/Tooltip-shows-tooltip-on-hover-1.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
+
import { vars } from '../../styles/theme.css';
|
|
3
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
+
|
|
5
|
+
export const tooltipPositions = styleVariants({
|
|
6
|
+
top: {
|
|
7
|
+
bottom: '100%',
|
|
8
|
+
marginBottom: '0.25rem',
|
|
9
|
+
left: '50%',
|
|
10
|
+
transform: 'translateX(-50%)',
|
|
11
|
+
},
|
|
12
|
+
bottom: {
|
|
13
|
+
top: '100%',
|
|
14
|
+
marginTop: '0.25rem',
|
|
15
|
+
left: '50%',
|
|
16
|
+
transform: 'translateX(-50%)',
|
|
17
|
+
},
|
|
18
|
+
left: {
|
|
19
|
+
right: '100%',
|
|
20
|
+
marginRight: '0.25rem',
|
|
21
|
+
top: '50%',
|
|
22
|
+
transform: 'translateY(-50%)',
|
|
23
|
+
},
|
|
24
|
+
right: {
|
|
25
|
+
left: '100%',
|
|
26
|
+
marginLeft: '0.25rem',
|
|
27
|
+
top: '50%',
|
|
28
|
+
transform: 'translateY(-50%)',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const tooltipContainer = styleWithLayer({
|
|
33
|
+
position: 'relative',
|
|
34
|
+
display: 'inline-flex',
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const tooltipContent = styleWithLayer({
|
|
38
|
+
position: 'absolute',
|
|
39
|
+
backgroundColor: vars.colors.textPrimary,
|
|
40
|
+
color: vars.colors.backgroundDefault,
|
|
41
|
+
padding: '0.375rem 0.75rem',
|
|
42
|
+
borderRadius: '0.375rem',
|
|
43
|
+
fontSize: '0.75rem',
|
|
44
|
+
whiteSpace: 'nowrap',
|
|
45
|
+
zIndex: 1001,
|
|
46
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)',
|
|
47
|
+
opacity: 0,
|
|
48
|
+
visibility: 'hidden',
|
|
49
|
+
transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
|
|
50
|
+
pointerEvents: 'none',
|
|
51
|
+
selectors: {
|
|
52
|
+
'&[data-visible="true"]': {
|
|
53
|
+
opacity: 1,
|
|
54
|
+
visibility: 'visible',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const tooltipArrow = styleWithLayer({
|
|
60
|
+
position: 'absolute',
|
|
61
|
+
width: '0',
|
|
62
|
+
height: '0',
|
|
63
|
+
borderStyle: 'solid',
|
|
64
|
+
borderWidth: '0.25rem',
|
|
65
|
+
borderColor: 'transparent',
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export const tooltipArrowTop = styleWithLayer({
|
|
69
|
+
bottom: '-0.25rem',
|
|
70
|
+
left: '50%',
|
|
71
|
+
transform: 'translateX(-50%)',
|
|
72
|
+
borderTopColor: vars.colors.textPrimary,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const tooltipArrowBottom = styleWithLayer({
|
|
76
|
+
top: '-0.25rem',
|
|
77
|
+
left: '50%',
|
|
78
|
+
transform: 'translateX(-50%)',
|
|
79
|
+
borderBottomColor: vars.colors.textPrimary,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const tooltipArrowLeft = styleWithLayer({
|
|
83
|
+
right: '-0.25rem',
|
|
84
|
+
top: '50%',
|
|
85
|
+
transform: 'translateY(-50%)',
|
|
86
|
+
borderLeftColor: vars.colors.textPrimary,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export const tooltipArrowRight = styleWithLayer({
|
|
90
|
+
left: '-0.25rem',
|
|
91
|
+
top: '50%',
|
|
92
|
+
transform: 'translateY(-50%)',
|
|
93
|
+
borderRightColor: vars.colors.textPrimary,
|
|
94
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { VisuallyHidden } from '.';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/VisuallyHidden',
|
|
7
|
+
component: VisuallyHidden,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
} satisfies Meta<typeof VisuallyHidden>;
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
children: 'This text is visually hidden but accessible to screen readers',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const AsSpan: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
as: 'span',
|
|
26
|
+
children: 'Hidden span element',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const WithVisibleContent: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
children: 'Screen reader label',
|
|
33
|
+
},
|
|
34
|
+
render: () => (
|
|
35
|
+
<div>
|
|
36
|
+
<button>
|
|
37
|
+
<VisuallyHidden>Close</VisuallyHidden>
|
|
38
|
+
<span aria-hidden="true">×</span>
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
),
|
|
42
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { render } from 'vitest-browser-react';
|
|
3
|
+
import VisuallyHidden from './VisuallyHidden';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
describe('VisuallyHidden', () => {
|
|
7
|
+
it('renders visually hidden content', async () => {
|
|
8
|
+
const { container } = await render(
|
|
9
|
+
<VisuallyHidden>Screen reader only text</VisuallyHidden>
|
|
10
|
+
);
|
|
11
|
+
expect(container).toMatchScreenshot();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('renders as different element', async () => {
|
|
15
|
+
const { container } = await render(
|
|
16
|
+
<VisuallyHidden as="span">Hidden span content</VisuallyHidden>
|
|
17
|
+
);
|
|
18
|
+
expect(container).toMatchScreenshot();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { visuallyHidden } from './styles.css';
|
|
3
|
+
|
|
4
|
+
export interface VisuallyHiddenProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const VisuallyHidden = ({
|
|
11
|
+
children,
|
|
12
|
+
as: Component = 'span',
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
}: VisuallyHiddenProps) => {
|
|
16
|
+
return React.createElement(
|
|
17
|
+
Component as React.ElementType,
|
|
18
|
+
{
|
|
19
|
+
className: visuallyHidden,
|
|
20
|
+
...props,
|
|
21
|
+
},
|
|
22
|
+
children
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default VisuallyHidden;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { style } from '@vanilla-extract/css';
|
|
2
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
3
|
+
|
|
4
|
+
export const visuallyHidden = styleWithLayer({
|
|
5
|
+
position: 'absolute',
|
|
6
|
+
width: '1px',
|
|
7
|
+
height: '1px',
|
|
8
|
+
padding: 0,
|
|
9
|
+
margin: '-1px',
|
|
10
|
+
overflow: 'hidden',
|
|
11
|
+
clip: 'rect(0, 0, 0, 0)',
|
|
12
|
+
whiteSpace: 'nowrap',
|
|
13
|
+
border: 0,
|
|
14
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export { Button } from './Button';
|
|
2
|
+
export { List, ListItem } from './List';
|
|
3
|
+
export { Input } from './Input';
|
|
4
|
+
export { Form, FormInput } from './Form';
|
|
5
|
+
export { Navbar, NavbarItem } from './Navbar';
|
|
6
|
+
export { Card } from './Card';
|
|
7
|
+
export { Alert } from './Alert';
|
|
8
|
+
export { P, Header } from './Text';
|
|
9
|
+
export { Modal } from './Modal';
|
|
10
|
+
export { Badge } from './Badge';
|
|
11
|
+
export { Divider } from './Divider';
|
|
12
|
+
export { Spinner } from './Spinner';
|
|
13
|
+
export { Tooltip } from './Tooltip';
|
|
14
|
+
export { Toggle } from './Toggle';
|
|
15
|
+
export { Checkbox } from './Checkbox';
|
|
16
|
+
export { Radio } from './Radio';
|
|
17
|
+
export { Select } from './Select';
|
|
18
|
+
export { Tabs } from './Tabs';
|
|
19
|
+
export { Avatar } from './Avatar';
|
|
20
|
+
export { Tag } from './Tag';
|
|
21
|
+
export { Breadcrumb } from './Breadcrumb';
|
|
22
|
+
export { Accordion } from './Accordion';
|
|
23
|
+
export { Progress } from './Progress';
|
|
24
|
+
export { Icon } from './Icon';
|
|
25
|
+
export { ToastProvider, Toast, useToast } from './Toast';
|
|
26
|
+
export { default as Box } from './Box';
|
|
27
|
+
export type { BoxProps } from './Box';
|
|
28
|
+
export { Table } from './Table';
|
|
29
|
+
export { TextArea } from './TextArea';
|
|
30
|
+
export type { TextAreaProps } from './TextArea';
|
|
31
|
+
export { Pagination } from './Pagination';
|
|
32
|
+
export type { PaginationProps } from './Pagination';
|
|
33
|
+
export { Skeleton } from './Skeleton';
|
|
34
|
+
export type { SkeletonProps, SkeletonVariant, SkeletonSize, SkeletonAnimation } from './Skeleton';
|
|
35
|
+
export { Drawer } from './Drawer';
|
|
36
|
+
export type { DrawerProps, DrawerPosition, DrawerSize } from './Drawer';
|
|
37
|
+
export { DropdownMenu } from './DropdownMenu';
|
|
38
|
+
export type { DropdownMenuProps, DropdownMenuItemProps, DropdownMenuGroupProps, DropdownMenuPosition, DropdownMenuItemVariant } from './DropdownMenu';
|
|
39
|
+
export { Popover } from './Popover';
|
|
40
|
+
export type { PopoverProps, PopoverPosition, PopoverTriggerType } from './Popover';
|
|
41
|
+
export { Stepper } from './Stepper';
|
|
42
|
+
export type { StepperProps, Step, StepperOrientation, StepStatus } from './Stepper';
|
|
43
|
+
export { Combobox } from './Combobox';
|
|
44
|
+
export type { ComboboxProps, ComboboxOption } from './Combobox';
|
|
45
|
+
export { NumberInput } from './NumberInput';
|
|
46
|
+
export type { NumberInputProps, NumberInputPosition } from './NumberInput';
|
|
47
|
+
export { FileUpload } from './FileUpload';
|
|
48
|
+
export type { FileUploadProps, FileUploadFile } from './FileUpload';
|
|
49
|
+
export { Stack } from './Stack';
|
|
50
|
+
export type { StackProps, StackDirection, StackAlign, StackJustify } from './Stack';
|
|
51
|
+
export { Grid } from './Grid';
|
|
52
|
+
export type { GridProps, GridColumns, GridGap } from './Grid';
|
|
53
|
+
export { Container } from './Container';
|
|
54
|
+
export type { ContainerProps, ContainerSize } from './Container';
|
|
55
|
+
export { AspectRatio } from './AspectRatio';
|
|
56
|
+
export type { AspectRatioProps, AspectRatioValue } from './AspectRatio';
|
|
57
|
+
export { Collapse } from './Collapse';
|
|
58
|
+
export type { CollapseProps, CollapseAnimation } from './Collapse';
|
|
59
|
+
export { VisuallyHidden } from './VisuallyHidden';
|
|
60
|
+
export type { VisuallyHiddenProps } from './VisuallyHidden';
|
|
61
|
+
export { EmptyState } from './EmptyState';
|
|
62
|
+
export type { EmptyStateProps } from './EmptyState';
|
|
63
|
+
export { Separator } from './Separator';
|
|
64
|
+
export type { SeparatorProps, SeparatorOrientation } from './Separator';
|
|
65
|
+
export { ScrollArea } from './ScrollArea';
|
|
66
|
+
export type { ScrollAreaProps, ScrollAreaOrientation } from './ScrollArea';
|
|
67
|
+
export { Kbd } from './Kbd';
|
|
68
|
+
export type { KbdProps } from './Kbd';
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components'
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* http://meyerweb.com/eric/tools/css/reset/
|
|
2
|
+
v2.0 | 20110126
|
|
3
|
+
License: none (public domain)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { globalStyle } from '@vanilla-extract/css';
|
|
7
|
+
import { resetLayer } from './layers.css';
|
|
8
|
+
|
|
9
|
+
globalStyle(
|
|
10
|
+
'html, body, div, span, applet, object, iframe, \
|
|
11
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre, \
|
|
12
|
+
a, abbr, acronym, address, big, cite, code, \
|
|
13
|
+
del, dfn, em, img, ins, kbd, q, s, samp, \
|
|
14
|
+
small, strike, strong, sub, sup, tt, var, \
|
|
15
|
+
b, u, i, center, \
|
|
16
|
+
dl, dt, dd, ol, ul, li, \
|
|
17
|
+
fieldset, form, label, legend, \
|
|
18
|
+
table, caption, tbody, tfoot, thead, tr, th, td, \
|
|
19
|
+
article, aside, canvas, details, embed, \
|
|
20
|
+
figure, figcaption, footer, header, hgroup, \
|
|
21
|
+
menu, nav, output, ruby, section, summary,\
|
|
22
|
+
time, mark, audio, video',
|
|
23
|
+
{
|
|
24
|
+
[resetLayer]: {
|
|
25
|
+
margin: 0,
|
|
26
|
+
padding: 0,
|
|
27
|
+
border: 0,
|
|
28
|
+
fontSize: '100%',
|
|
29
|
+
font: 'inherit',
|
|
30
|
+
verticalAlign: 'baseline',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/* HTML5 display-role reset for older browsers */
|
|
36
|
+
globalStyle(
|
|
37
|
+
'article, aside, details, figcaption, figure, \
|
|
38
|
+
footer, header, hgroup, menu, nav, section',
|
|
39
|
+
{
|
|
40
|
+
[resetLayer]: {
|
|
41
|
+
display: 'block',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
globalStyle('body', {
|
|
47
|
+
[resetLayer]: {
|
|
48
|
+
lineHeight: 1,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
globalStyle('ol, ul', {
|
|
53
|
+
[resetLayer]: {
|
|
54
|
+
listStyle: 'none',
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
globalStyle('blockquote, q', {
|
|
59
|
+
[resetLayer]: {
|
|
60
|
+
quotes: 'none',
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
globalStyle(
|
|
65
|
+
'blockquote:before, blockquote:after, \
|
|
66
|
+
q:before, q:after',
|
|
67
|
+
{
|
|
68
|
+
[resetLayer]: {
|
|
69
|
+
content: 'none',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
globalStyle('table', {
|
|
75
|
+
[resetLayer]: {
|
|
76
|
+
borderCollapse: 'collapse',
|
|
77
|
+
borderSpacing: 0,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { defineProperties, createSprinkles } from '@vanilla-extract/sprinkles';
|
|
2
|
+
import { componentsLayer } from './layers.css';
|
|
3
|
+
|
|
4
|
+
const space = {
|
|
5
|
+
none: 0,
|
|
6
|
+
small: '4px',
|
|
7
|
+
medium: '8px',
|
|
8
|
+
large: '16px',
|
|
9
|
+
auto: 'auto',
|
|
10
|
+
// etc.
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const responsiveProperties = defineProperties({
|
|
14
|
+
'@layer': componentsLayer,
|
|
15
|
+
conditions: {
|
|
16
|
+
mobile: {},
|
|
17
|
+
tablet: { '@media': 'screen and (min-width: 768px)' },
|
|
18
|
+
desktop: { '@media': 'screen and (min-width: 1024px)' },
|
|
19
|
+
},
|
|
20
|
+
defaultCondition: 'mobile',
|
|
21
|
+
responsiveArray: ['mobile', 'tablet', 'desktop'],
|
|
22
|
+
properties: {
|
|
23
|
+
display: ['none', 'flex', 'block', 'inline'],
|
|
24
|
+
width: ['auto', '100%', '50%', '25%'],
|
|
25
|
+
height: ['auto', '100%', '50%', '25%'],
|
|
26
|
+
flexDirection: ['row', 'column'],
|
|
27
|
+
justifyContent: [
|
|
28
|
+
'stretch',
|
|
29
|
+
'flex-start',
|
|
30
|
+
'center',
|
|
31
|
+
'flex-end',
|
|
32
|
+
'space-around',
|
|
33
|
+
'space-between',
|
|
34
|
+
],
|
|
35
|
+
alignItems: ['stretch', 'flex-start', 'center', 'flex-end'],
|
|
36
|
+
paddingTop: space,
|
|
37
|
+
paddingBottom: space,
|
|
38
|
+
paddingLeft: space,
|
|
39
|
+
paddingRight: space,
|
|
40
|
+
marginLeft: space,
|
|
41
|
+
marginRight: space,
|
|
42
|
+
marginTop: space,
|
|
43
|
+
marginBottom: space,
|
|
44
|
+
borderLeft: space,
|
|
45
|
+
borderRight: space,
|
|
46
|
+
borderTop: space,
|
|
47
|
+
borderBottom: space,
|
|
48
|
+
borderRadius: space,
|
|
49
|
+
gap: space,
|
|
50
|
+
// etc.
|
|
51
|
+
},
|
|
52
|
+
shorthands: {
|
|
53
|
+
padding: ['paddingTop', 'paddingBottom', 'paddingLeft', 'paddingRight'],
|
|
54
|
+
border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],
|
|
55
|
+
paddingX: ['paddingLeft', 'paddingRight'],
|
|
56
|
+
paddingY: ['paddingTop', 'paddingBottom'],
|
|
57
|
+
marginX: ['marginLeft', 'marginRight'],
|
|
58
|
+
marginY: ['marginTop', 'marginBottom'],
|
|
59
|
+
placeItems: ['justifyContent', 'alignItems'],
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export const colors = {
|
|
64
|
+
// Generated color tokens from base palette [CAE5FF, ACEDFF, 89BBFE, 6F8AB7, 615D6C]
|
|
65
|
+
'c1-50': '#F5FAFE',
|
|
66
|
+
'c1-100': '#DDEEFD',
|
|
67
|
+
'c1-150': '#BFDFFC',
|
|
68
|
+
'c1-200': '#A6D3FC',
|
|
69
|
+
'c1-250': '#88C4FC',
|
|
70
|
+
'c1-300': '#6EB7FC',
|
|
71
|
+
'c1-350': '#54ABFC',
|
|
72
|
+
'c1-400': '#349CFE',
|
|
73
|
+
'c1-450': '#1A90FF',
|
|
74
|
+
'c1-500': '#0181F9',
|
|
75
|
+
'c1-550': '#0374DD',
|
|
76
|
+
'c1-600': '#0464BE',
|
|
77
|
+
'c1-650': '#0457A4',
|
|
78
|
+
'c1-700': '#054A8A',
|
|
79
|
+
'c1-750': '#043A6C',
|
|
80
|
+
'c1-800': '#042D53',
|
|
81
|
+
'c1-850': '#031D35',
|
|
82
|
+
'c1-900': '#02101D',
|
|
83
|
+
|
|
84
|
+
'c2-50': '#F5FCFE',
|
|
85
|
+
'c2-100': '#DDF6FD',
|
|
86
|
+
'c2-150': '#BFEFFC',
|
|
87
|
+
'c2-200': '#A6E9FC',
|
|
88
|
+
'c2-250': '#88E3FC',
|
|
89
|
+
'c2-300': '#6EDDFC',
|
|
90
|
+
'c2-350': '#54D8FC',
|
|
91
|
+
'c2-400': '#34D2FE',
|
|
92
|
+
'c2-450': '#1ACDFF',
|
|
93
|
+
'c2-500': '#01C3F9',
|
|
94
|
+
'c2-550': '#03AEDD',
|
|
95
|
+
'c2-600': '#0496BE',
|
|
96
|
+
'c2-650': '#0481A4',
|
|
97
|
+
'c2-700': '#056D8A',
|
|
98
|
+
'c2-750': '#04556C',
|
|
99
|
+
'c2-800': '#044253',
|
|
100
|
+
'c2-850': '#032A35',
|
|
101
|
+
'c2-900': '#02171D',
|
|
102
|
+
|
|
103
|
+
'c3-50': '#F5F9FE',
|
|
104
|
+
'c3-100': '#DDEBFD',
|
|
105
|
+
'c3-150': '#C0DAFC',
|
|
106
|
+
'c3-200': '#A7CCFB',
|
|
107
|
+
'c3-250': '#89BAFB',
|
|
108
|
+
'c3-300': '#70ACFB',
|
|
109
|
+
'c3-350': '#569DFB',
|
|
110
|
+
'c3-400': '#368CFC',
|
|
111
|
+
'c3-450': '#1C7DFD',
|
|
112
|
+
'c3-500': '#046DF6',
|
|
113
|
+
'c3-550': '#0662DB',
|
|
114
|
+
'c3-600': '#0655BC',
|
|
115
|
+
'c3-650': '#064AA2',
|
|
116
|
+
'c3-700': '#063F88',
|
|
117
|
+
'c3-750': '#06316B',
|
|
118
|
+
'c3-800': '#052652',
|
|
119
|
+
'c3-850': '#031935',
|
|
120
|
+
'c3-900': '#020E1C',
|
|
121
|
+
|
|
122
|
+
'c4-50': '#F8FAFB',
|
|
123
|
+
'c4-100': '#E8ECF3',
|
|
124
|
+
'c4-150': '#D4DBE8',
|
|
125
|
+
'c4-200': '#C3CDDF',
|
|
126
|
+
'c4-250': '#AFBDD5',
|
|
127
|
+
'c4-300': '#9DAFCD',
|
|
128
|
+
'c4-350': '#8DA1C4',
|
|
129
|
+
'c4-400': '#7790BB',
|
|
130
|
+
'c4-450': '#6682B2',
|
|
131
|
+
'c4-500': '#5472A6',
|
|
132
|
+
'c4-550': '#4C6794',
|
|
133
|
+
'c4-600': '#425980',
|
|
134
|
+
'c4-650': '#3A4D6E',
|
|
135
|
+
'c4-700': '#31415E',
|
|
136
|
+
'c4-750': '#273449',
|
|
137
|
+
'c4-800': '#1E2838',
|
|
138
|
+
'c4-850': '#141A24',
|
|
139
|
+
'c4-900': '#0B0E14',
|
|
140
|
+
|
|
141
|
+
'c5-50': '#FAFAFA',
|
|
142
|
+
'c5-100': '#EDECEE',
|
|
143
|
+
'c5-150': '#DDDCE0',
|
|
144
|
+
'c5-200': '#D0CED4',
|
|
145
|
+
'c5-250': '#C0BEC6',
|
|
146
|
+
'c5-300': '#B3B0BA',
|
|
147
|
+
'c5-350': '#A5A2AE',
|
|
148
|
+
'c5-400': '#9692A0',
|
|
149
|
+
'c5-450': '#898494',
|
|
150
|
+
'c5-500': '#797486',
|
|
151
|
+
'c5-550': '#6D6878',
|
|
152
|
+
'c5-600': '#5E5A68',
|
|
153
|
+
'c5-650': '#514E5A',
|
|
154
|
+
'c5-700': '#45424C',
|
|
155
|
+
'c5-750': '#37353B',
|
|
156
|
+
'c5-800': '#2A292E',
|
|
157
|
+
'c5-850': '#1B1A1E',
|
|
158
|
+
'c5-900': '#0F0E10',
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const colorProperties = defineProperties({
|
|
162
|
+
conditions: {
|
|
163
|
+
lightMode: {},
|
|
164
|
+
darkMode: { '@media': '(prefers-color-scheme: dark)' },
|
|
165
|
+
},
|
|
166
|
+
defaultCondition: 'lightMode',
|
|
167
|
+
properties: {
|
|
168
|
+
color: colors,
|
|
169
|
+
background: colors,
|
|
170
|
+
// etc.
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
export const sprinkles = createSprinkles(responsiveProperties, colorProperties);
|
|
175
|
+
|
|
176
|
+
// It's a good idea to export the Sprinkles type too
|
|
177
|
+
export type Sprinkles = Parameters<typeof sprinkles>[0];
|