@jordan-mace/chaser-design-system 1.1.0 → 1.2.0
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 +108 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +2 -0
- package/dist/components/Accordion/styles.css.d.ts +7 -0
- package/dist/components/Accordion/styles.css.js +66 -0
- package/dist/components/Alert/Alert.d.ts +9 -0
- package/dist/components/Alert/Alert.js +28 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Alert/index.js +2 -0
- package/dist/components/Alert/styles.css.d.ts +4 -0
- package/dist/components/Alert/styles.css.js +55 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +9 -0
- package/dist/components/AspectRatio/AspectRatio.js +27 -0
- package/dist/components/AspectRatio/index.d.ts +2 -0
- package/dist/components/AspectRatio/index.js +2 -0
- package/dist/components/Avatar/Avatar.d.ts +11 -0
- package/dist/components/Avatar/Avatar.js +27 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/Avatar/styles.css.d.ts +4 -0
- package/dist/components/Avatar/styles.css.js +152 -0
- package/dist/components/Badge/Badge.d.ts +11 -0
- package/dist/components/Badge/Badge.js +13 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Badge/styles.css.d.ts +5 -0
- package/dist/components/Badge/styles.css.js +78 -0
- package/dist/components/Box/Box.d.ts +11 -0
- package/dist/components/Box/Box.js +53 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Box/index.js +2 -0
- package/dist/components/Box/reset.css.d.ts +1 -0
- package/dist/components/Box/reset.css.js +16 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +66 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Breadcrumb/index.js +2 -0
- package/dist/components/Breadcrumb/styles.css.d.ts +6 -0
- package/dist/components/Breadcrumb/styles.css.js +51 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Button/Button.js +15 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Button/styles.css.d.ts +2 -0
- package/dist/components/Button/styles.css.js +31 -0
- package/dist/components/Card/Card.d.ts +8 -0
- package/dist/components/Card/Card.js +15 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +2 -0
- package/dist/components/Card/styles.css.d.ts +2 -0
- package/dist/components/Card/styles.css.js +26 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.js +50 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/Checkbox/styles.css.d.ts +3 -0
- package/dist/components/Checkbox/styles.css.js +32 -0
- package/dist/components/Collapse/Collapse.d.ts +12 -0
- package/dist/components/Collapse/Collapse.js +58 -0
- package/dist/components/Collapse/index.d.ts +2 -0
- package/dist/components/Collapse/index.js +2 -0
- package/dist/components/Collapse/styles.css.d.ts +3 -0
- package/dist/components/Collapse/styles.css.js +37 -0
- package/dist/components/Combobox/Combobox.d.ts +23 -0
- package/dist/components/Combobox/Combobox.js +171 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/Combobox/index.js +2 -0
- package/dist/components/Combobox/styles.css.d.ts +13 -0
- package/dist/components/Combobox/styles.css.js +143 -0
- package/dist/components/Container/Container.d.ts +11 -0
- package/dist/components/Container/Container.js +31 -0
- package/dist/components/Container/index.d.ts +2 -0
- package/dist/components/Container/index.js +2 -0
- package/dist/components/Divider/Divider.d.ts +9 -0
- package/dist/components/Divider/Divider.js +14 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/index.js +2 -0
- package/dist/components/Divider/styles.css.d.ts +4 -0
- package/dist/components/Divider/styles.css.js +42 -0
- package/dist/components/Drawer/Drawer.d.ts +16 -0
- package/dist/components/Drawer/Drawer.js +113 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/index.js +2 -0
- package/dist/components/Drawer/styles.css.d.ts +8 -0
- package/dist/components/Drawer/styles.css.js +146 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +23 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +98 -0
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/DropdownMenu/index.js +2 -0
- package/dist/components/DropdownMenu/styles.css.d.ts +9 -0
- package/dist/components/DropdownMenu/styles.css.js +94 -0
- package/dist/components/EmptyState/EmptyState.d.ts +10 -0
- package/dist/components/EmptyState/EmptyState.js +32 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EmptyState/index.js +2 -0
- package/dist/components/EmptyState/styles.css.d.ts +5 -0
- package/dist/components/EmptyState/styles.css.js +31 -0
- package/dist/components/FileUpload/FileUpload.d.ts +27 -0
- package/dist/components/FileUpload/FileUpload.js +214 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FileUpload/index.js +2 -0
- package/dist/components/FileUpload/styles.css.d.ts +19 -0
- package/dist/components/FileUpload/styles.css.js +146 -0
- package/dist/components/Form/Form.d.ts +7 -0
- package/dist/components/Form/Form.js +15 -0
- package/dist/components/Form/FormInput.d.ts +5 -0
- package/dist/components/Form/FormInput.js +15 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/index.js +3 -0
- package/dist/components/Form/styles.css.d.ts +2 -0
- package/dist/components/Form/styles.css.js +12 -0
- package/dist/components/Grid/Grid.d.ts +13 -0
- package/dist/components/Grid/Grid.js +30 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/index.js +2 -0
- package/dist/components/Icon/Icon.d.ts +12 -0
- package/dist/components/Icon/Icon.js +29 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/index.js +2 -0
- package/dist/components/Icon/styles.css.d.ts +1 -0
- package/dist/components/Icon/styles.css.js +10 -0
- package/dist/components/Input/Input.d.ts +7 -0
- package/dist/components/Input/Input.js +38 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/Input/styles.css.d.ts +2 -0
- package/dist/components/Input/styles.css.js +9 -0
- package/dist/components/Kbd/Kbd.d.ts +7 -0
- package/dist/components/Kbd/Kbd.js +10 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Kbd/index.js +2 -0
- package/dist/components/Kbd/styles.css.d.ts +1 -0
- package/dist/components/Kbd/styles.css.js +17 -0
- package/dist/components/List/List.d.ts +5 -0
- package/dist/components/List/List.js +11 -0
- package/dist/components/List/ListItem.d.ts +5 -0
- package/dist/components/List/ListItem.js +11 -0
- package/dist/components/List/index.d.ts +2 -0
- package/dist/components/List/index.js +3 -0
- package/dist/components/List/styles.css.d.ts +2 -0
- package/dist/components/List/styles.css.js +12 -0
- package/dist/components/Modal/Modal.d.ts +13 -0
- package/dist/components/Modal/Modal.js +71 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.js +2 -0
- package/dist/components/Modal/styles.css.d.ts +7 -0
- package/dist/components/Modal/styles.css.js +93 -0
- package/dist/components/Navbar/Navbar.d.ts +6 -0
- package/dist/components/Navbar/Navbar.js +16 -0
- package/dist/components/Navbar/NavbarItem.d.ts +6 -0
- package/dist/components/Navbar/NavbarItem.js +12 -0
- package/dist/components/Navbar/index.d.ts +2 -0
- package/dist/components/Navbar/index.js +3 -0
- package/dist/components/Navbar/styles.css.d.ts +2 -0
- package/dist/components/Navbar/styles.css.js +4 -0
- package/dist/components/NumberInput/NumberInput.d.ts +20 -0
- package/dist/components/NumberInput/NumberInput.js +108 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/NumberInput/index.js +2 -0
- package/dist/components/NumberInput/styles.css.d.ts +10 -0
- package/dist/components/NumberInput/styles.css.js +118 -0
- package/dist/components/Pagination/Pagination.d.ts +11 -0
- package/dist/components/Pagination/Pagination.js +70 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +2 -0
- package/dist/components/Pagination/styles.css.d.ts +4 -0
- package/dist/components/Pagination/styles.css.js +45 -0
- package/dist/components/Popover/Popover.d.ts +18 -0
- package/dist/components/Popover/Popover.js +105 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/index.js +2 -0
- package/dist/components/Popover/styles.css.d.ts +11 -0
- package/dist/components/Popover/styles.css.js +192 -0
- package/dist/components/Progress/Progress.d.ts +11 -0
- package/dist/components/Progress/Progress.js +55 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/Progress/index.js +2 -0
- package/dist/components/Progress/styles.css.d.ts +4 -0
- package/dist/components/Progress/styles.css.js +72 -0
- package/dist/components/Radio/Radio.d.ts +16 -0
- package/dist/components/Radio/Radio.js +60 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Radio/index.js +2 -0
- package/dist/components/Radio/styles.css.d.ts +5 -0
- package/dist/components/Radio/styles.css.js +43 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +11 -0
- package/dist/components/ScrollArea/ScrollArea.js +22 -0
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/ScrollArea/index.js +2 -0
- package/dist/components/ScrollArea/styles.css.d.ts +3 -0
- package/dist/components/ScrollArea/styles.css.js +26 -0
- package/dist/components/Select/Select.d.ts +13 -0
- package/dist/components/Select/Select.js +36 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.js +2 -0
- package/dist/components/Select/styles.css.d.ts +4 -0
- package/dist/components/Select/styles.css.js +83 -0
- package/dist/components/Separator/Separator.d.ts +9 -0
- package/dist/components/Separator/Separator.js +13 -0
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/Separator/index.js +2 -0
- package/dist/components/Separator/styles.css.d.ts +4 -0
- package/dist/components/Separator/styles.css.js +29 -0
- package/dist/components/Skeleton/Skeleton.d.ts +14 -0
- package/dist/components/Skeleton/Skeleton.js +28 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.js +2 -0
- package/dist/components/Skeleton/styles.css.d.ts +4 -0
- package/dist/components/Skeleton/styles.css.js +65 -0
- package/dist/components/Spinner/Spinner.d.ts +10 -0
- package/dist/components/Spinner/Spinner.js +14 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.js +2 -0
- package/dist/components/Spinner/styles.css.d.ts +4 -0
- package/dist/components/Spinner/styles.css.js +60 -0
- package/dist/components/Stack/Stack.d.ts +16 -0
- package/dist/components/Stack/Stack.js +39 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Stack/index.js +2 -0
- package/dist/components/Stepper/Stepper.d.ts +18 -0
- package/dist/components/Stepper/Stepper.js +70 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Stepper/index.js +2 -0
- package/dist/components/Stepper/styles.css.d.ts +14 -0
- package/dist/components/Stepper/styles.css.js +105 -0
- package/dist/components/Table/Table.d.ts +42 -0
- package/dist/components/Table/Table.js +65 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/Table/styles.css.d.ts +8 -0
- package/dist/components/Table/styles.css.js +50 -0
- package/dist/components/Tabs/Tabs.d.ts +29 -0
- package/dist/components/Tabs/Tabs.js +71 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +2 -0
- package/dist/components/Tabs/styles.css.d.ts +6 -0
- package/dist/components/Tabs/styles.css.js +101 -0
- package/dist/components/Tag/Tag.d.ts +16 -0
- package/dist/components/Tag/Tag.js +40 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/Tag/index.js +2 -0
- package/dist/components/Tag/styles.css.d.ts +3 -0
- package/dist/components/Tag/styles.css.js +94 -0
- package/dist/components/Text/Header.d.ts +8 -0
- package/dist/components/Text/Header.js +12 -0
- package/dist/components/Text/P.d.ts +7 -0
- package/dist/components/Text/P.js +12 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/index.js +3 -0
- package/dist/components/Text/styles.css.d.ts +2 -0
- package/dist/components/Text/styles.css.js +14 -0
- package/dist/components/TextArea/TextArea.d.ts +7 -0
- package/dist/components/TextArea/TextArea.js +38 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/TextArea/index.js +2 -0
- package/dist/components/TextArea/styles.css.d.ts +2 -0
- package/dist/components/TextArea/styles.css.js +11 -0
- package/dist/components/Toast/Toast.d.ts +34 -0
- package/dist/components/Toast/Toast.js +236 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/styles.css.d.ts +21 -0
- package/dist/components/Toast/styles.css.js +217 -0
- package/dist/components/Toggle/Toggle.d.ts +10 -0
- package/dist/components/Toggle/Toggle.js +62 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Toggle/index.js +2 -0
- package/dist/components/Toggle/styles.css.d.ts +12 -0
- package/dist/components/Toggle/styles.css.js +119 -0
- package/dist/components/Tooltip/Tooltip.d.ts +10 -0
- package/dist/components/Tooltip/Tooltip.js +41 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.js +2 -0
- package/dist/components/Tooltip/styles.css.d.ts +8 -0
- package/dist/components/Tooltip/styles.css.js +87 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +8 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +8 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/VisuallyHidden/index.js +2 -0
- package/dist/components/VisuallyHidden/styles.css.d.ts +1 -0
- package/dist/components/VisuallyHidden/styles.css.js +13 -0
- package/dist/components/index.d.ts +68 -0
- package/dist/components/index.js +48 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/layers.css.js +9 -0
- package/dist/reset.css.js +57 -0
- package/dist/styles/layers.css.d.ts +3 -0
- package/dist/styles/layers.css.js +9 -0
- package/dist/styles/reset.css.js +57 -0
- package/dist/styles/sprinkles.css.d.ts +241 -0
- package/dist/styles/sprinkles.css.js +220 -0
- package/dist/styles/theme.css.d.ts +38 -0
- package/dist/styles/theme.css.js +50 -0
- package/dist/styles/utils.d.ts +2 -0
- package/dist/styles/utils.js +8 -0
- package/dist/theme.css.js +50 -0
- package/package.json +4 -4
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { styleVariants } from "@vanilla-extract/css";
|
|
2
|
+
import { vars } from "../../styles/theme.css.js";
|
|
3
|
+
import { styleWithLayer } from "../../styles/utils.js";
|
|
4
|
+
const badgeVariants = styleVariants({
|
|
5
|
+
default: {
|
|
6
|
+
backgroundColor: vars.colors.borderDefault,
|
|
7
|
+
color: vars.colors.textPrimary
|
|
8
|
+
},
|
|
9
|
+
success: {
|
|
10
|
+
backgroundColor: vars.colors.alertSuccessBackground,
|
|
11
|
+
color: vars.colors.alertSuccessText,
|
|
12
|
+
border: `1px solid ${vars.colors.alertSuccessBorder}`
|
|
13
|
+
},
|
|
14
|
+
warning: {
|
|
15
|
+
backgroundColor: vars.colors.alertWarningBackground,
|
|
16
|
+
color: vars.colors.alertWarningText,
|
|
17
|
+
border: `1px solid ${vars.colors.alertWarningBorder}`
|
|
18
|
+
},
|
|
19
|
+
error: {
|
|
20
|
+
backgroundColor: vars.colors.alertErrorBackground,
|
|
21
|
+
color: vars.colors.alertErrorText,
|
|
22
|
+
border: `1px solid ${vars.colors.alertErrorBorder}`
|
|
23
|
+
},
|
|
24
|
+
info: {
|
|
25
|
+
backgroundColor: vars.colors.alertInfoBackground,
|
|
26
|
+
color: vars.colors.alertInfoText,
|
|
27
|
+
border: `1px solid ${vars.colors.alertInfoBorder}`
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const badgeSizes = styleVariants({
|
|
31
|
+
small: {
|
|
32
|
+
fontSize: '0.7rem',
|
|
33
|
+
padding: '0.125rem 0.375rem',
|
|
34
|
+
borderRadius: '0.25rem'
|
|
35
|
+
},
|
|
36
|
+
medium: {
|
|
37
|
+
fontSize: '0.75rem',
|
|
38
|
+
padding: '0.25rem 0.5rem',
|
|
39
|
+
borderRadius: '0.375rem'
|
|
40
|
+
},
|
|
41
|
+
large: {
|
|
42
|
+
fontSize: '0.875rem',
|
|
43
|
+
padding: '0.375rem 0.625rem',
|
|
44
|
+
borderRadius: '0.5rem'
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const badge = styleWithLayer({
|
|
48
|
+
display: 'inline-flex',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
fontWeight: '500',
|
|
52
|
+
whiteSpace: 'nowrap',
|
|
53
|
+
fontFamily: vars.fontFamily.body,
|
|
54
|
+
transition: 'background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out'
|
|
55
|
+
});
|
|
56
|
+
const badgeDot = styleWithLayer({
|
|
57
|
+
width: '0.5rem',
|
|
58
|
+
height: '0.5rem',
|
|
59
|
+
borderRadius: '50%',
|
|
60
|
+
display: 'inline-block',
|
|
61
|
+
padding: 0,
|
|
62
|
+
minWidth: 'auto'
|
|
63
|
+
});
|
|
64
|
+
const badgeDotSizes = styleVariants({
|
|
65
|
+
small: {
|
|
66
|
+
width: '0.375rem',
|
|
67
|
+
height: '0.375rem'
|
|
68
|
+
},
|
|
69
|
+
medium: {
|
|
70
|
+
width: '0.5rem',
|
|
71
|
+
height: '0.5rem'
|
|
72
|
+
},
|
|
73
|
+
large: {
|
|
74
|
+
width: '0.625rem',
|
|
75
|
+
height: '0.625rem'
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
export { badge, badgeDot, badgeDotSizes, badgeSizes, badgeVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Sprinkles } from '../../styles/sprinkles.css';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type BoxProps = Sprinkles & {
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
export default Box;
|
|
11
|
+
export type { BoxProps };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { sprinkles } from "../../styles/sprinkles.css.js";
|
|
3
|
+
import { reset as external_reset_css_js_reset } from "./reset.css.js";
|
|
4
|
+
import react, { forwardRef } from "react";
|
|
5
|
+
const Box = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
|
+
const { as: Component = 'div', className, children, ...rest } = props;
|
|
7
|
+
const sprinkleProps = {};
|
|
8
|
+
const otherProps = {
|
|
9
|
+
ref
|
|
10
|
+
};
|
|
11
|
+
const sprinkleKeys = new Set([
|
|
12
|
+
'display',
|
|
13
|
+
'width',
|
|
14
|
+
'height',
|
|
15
|
+
'flexDirection',
|
|
16
|
+
'justifyContent',
|
|
17
|
+
'alignItems',
|
|
18
|
+
'paddingTop',
|
|
19
|
+
'paddingBottom',
|
|
20
|
+
'paddingLeft',
|
|
21
|
+
'paddingRight',
|
|
22
|
+
'marginLeft',
|
|
23
|
+
'marginRight',
|
|
24
|
+
'marginTop',
|
|
25
|
+
'marginBottom',
|
|
26
|
+
'borderLeft',
|
|
27
|
+
'borderRight',
|
|
28
|
+
'borderTop',
|
|
29
|
+
'borderBottom',
|
|
30
|
+
'borderRadius',
|
|
31
|
+
'gap',
|
|
32
|
+
'padding',
|
|
33
|
+
'border',
|
|
34
|
+
'paddingX',
|
|
35
|
+
'paddingY',
|
|
36
|
+
'marginX',
|
|
37
|
+
'marginY',
|
|
38
|
+
'placeItems',
|
|
39
|
+
'color',
|
|
40
|
+
'background'
|
|
41
|
+
]);
|
|
42
|
+
Object.entries(rest).forEach(([key, value])=>{
|
|
43
|
+
if (sprinkleKeys.has(key)) sprinkleProps[key] = value;
|
|
44
|
+
else otherProps[key] = value;
|
|
45
|
+
});
|
|
46
|
+
return /*#__PURE__*/ react.createElement(Component, {
|
|
47
|
+
className: clsx(external_reset_css_js_reset, sprinkles(sprinkleProps), className),
|
|
48
|
+
...otherProps
|
|
49
|
+
}, children);
|
|
50
|
+
});
|
|
51
|
+
Box.displayName = 'Box';
|
|
52
|
+
const Box_Box = Box;
|
|
53
|
+
export { Box_Box as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const reset: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { style } from "@vanilla-extract/css";
|
|
2
|
+
import { componentsLayer } from "../../styles/layers.css.js";
|
|
3
|
+
const reset_css_reset = style({
|
|
4
|
+
'@layer': {
|
|
5
|
+
[componentsLayer]: {
|
|
6
|
+
margin: 0,
|
|
7
|
+
padding: 0,
|
|
8
|
+
border: 0,
|
|
9
|
+
boxSizing: 'border-box',
|
|
10
|
+
fontSize: '100%',
|
|
11
|
+
font: 'inherit',
|
|
12
|
+
verticalAlign: 'baseline'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export { reset_css_reset as reset };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type BreadcrumbItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
current?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type BreadcrumbProps = {
|
|
8
|
+
items: BreadcrumbItem[];
|
|
9
|
+
className?: string;
|
|
10
|
+
separator?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Breadcrumb: ({ items, className, separator, }: BreadcrumbProps) => React.JSX.Element;
|
|
13
|
+
export default Breadcrumb;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import "react";
|
|
4
|
+
import { breadcrumb, breadcrumbCurrent, breadcrumbItem, breadcrumbLink, breadcrumbList, breadcrumbSeparator } from "./styles.css.js";
|
|
5
|
+
import Box from "../Box/index.js";
|
|
6
|
+
const Breadcrumb = ({ items, className, separator = '/' })=>/*#__PURE__*/ jsx(Box, {
|
|
7
|
+
as: "nav",
|
|
8
|
+
"aria-label": "Breadcrumb",
|
|
9
|
+
className: clsx(breadcrumb, className),
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
gap: "small",
|
|
13
|
+
fontSize: "14px",
|
|
14
|
+
children: /*#__PURE__*/ jsx(Box, {
|
|
15
|
+
as: "ol",
|
|
16
|
+
className: breadcrumbList,
|
|
17
|
+
display: "flex",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
style: {
|
|
20
|
+
listStyle: 'none'
|
|
21
|
+
},
|
|
22
|
+
margin: "none",
|
|
23
|
+
padding: "none",
|
|
24
|
+
gap: "small",
|
|
25
|
+
children: items.map((item, index)=>/*#__PURE__*/ jsxs(Box, {
|
|
26
|
+
as: "li",
|
|
27
|
+
className: breadcrumbItem,
|
|
28
|
+
display: "flex",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
children: [
|
|
31
|
+
item.href && !item.current ? /*#__PURE__*/ jsx(Box, {
|
|
32
|
+
as: "a",
|
|
33
|
+
href: item.href,
|
|
34
|
+
className: breadcrumbLink,
|
|
35
|
+
display: "inline",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
color: "c5-600",
|
|
38
|
+
fontSize: "14px",
|
|
39
|
+
textDecoration: "none",
|
|
40
|
+
children: item.label
|
|
41
|
+
}) : /*#__PURE__*/ jsx(Box, {
|
|
42
|
+
as: "span",
|
|
43
|
+
className: breadcrumbCurrent,
|
|
44
|
+
display: "inline",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
color: "c5-700",
|
|
47
|
+
fontSize: "14px",
|
|
48
|
+
fontWeight: "500",
|
|
49
|
+
children: item.label
|
|
50
|
+
}),
|
|
51
|
+
index < items.length - 1 && /*#__PURE__*/ jsx(Box, {
|
|
52
|
+
as: "span",
|
|
53
|
+
className: breadcrumbSeparator,
|
|
54
|
+
color: "c5-500",
|
|
55
|
+
fontSize: "12px",
|
|
56
|
+
style: {
|
|
57
|
+
userSelect: 'none'
|
|
58
|
+
},
|
|
59
|
+
children: separator
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}, index))
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
const Breadcrumb_Breadcrumb = Breadcrumb;
|
|
66
|
+
export { Breadcrumb_Breadcrumb as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Breadcrumb } from './Breadcrumb';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const breadcrumb: string;
|
|
2
|
+
export declare const breadcrumbList: string;
|
|
3
|
+
export declare const breadcrumbItem: string;
|
|
4
|
+
export declare const breadcrumbLink: string;
|
|
5
|
+
export declare const breadcrumbSeparator: string;
|
|
6
|
+
export declare const breadcrumbCurrent: string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { style } from "@vanilla-extract/css";
|
|
2
|
+
import { vars } from "../../styles/theme.css.js";
|
|
3
|
+
import { styleWithLayer } from "../../styles/utils.js";
|
|
4
|
+
const breadcrumb = styleWithLayer({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
gap: '4px',
|
|
8
|
+
fontFamily: vars.fontFamily.body,
|
|
9
|
+
fontSize: '14px'
|
|
10
|
+
});
|
|
11
|
+
const breadcrumbList = style({
|
|
12
|
+
display: 'flex',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
listStyle: 'none',
|
|
15
|
+
margin: 0,
|
|
16
|
+
padding: 0,
|
|
17
|
+
gap: '4px'
|
|
18
|
+
});
|
|
19
|
+
const breadcrumbItem = style({
|
|
20
|
+
display: 'flex',
|
|
21
|
+
alignItems: 'center'
|
|
22
|
+
});
|
|
23
|
+
const breadcrumbLink = style({
|
|
24
|
+
display: 'inline-flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
color: vars.colors.textSecondary,
|
|
27
|
+
textDecoration: 'none',
|
|
28
|
+
fontSize: '14px',
|
|
29
|
+
':hover': {
|
|
30
|
+
color: vars.colors.buttonBackgroundPrimary,
|
|
31
|
+
textDecoration: 'underline'
|
|
32
|
+
},
|
|
33
|
+
':focus-visible': {
|
|
34
|
+
outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
|
|
35
|
+
outlineOffset: '2px',
|
|
36
|
+
borderRadius: '4px'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const breadcrumbSeparator = style({
|
|
40
|
+
color: vars.colors.textDisabled,
|
|
41
|
+
fontSize: '12px',
|
|
42
|
+
userSelect: 'none'
|
|
43
|
+
});
|
|
44
|
+
const breadcrumbCurrent = style({
|
|
45
|
+
display: 'inline-flex',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
color: vars.colors.textPrimary,
|
|
48
|
+
fontSize: '14px',
|
|
49
|
+
fontWeight: '500'
|
|
50
|
+
});
|
|
51
|
+
export { breadcrumb, breadcrumbCurrent, breadcrumbItem, breadcrumbLink, breadcrumbList, breadcrumbSeparator };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
3
|
+
variant: 'primary' | 'secondary';
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
label?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const Button: ({ label, ...props }: ButtonProps) => React.JSX.Element;
|
|
9
|
+
export default Button;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { button as external_styles_css_js_button, buttonVariants } from "./styles.css.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import Box from "../Box/index.js";
|
|
6
|
+
const Button = ({ label, ...props })=>/*#__PURE__*/ jsx(Box, {
|
|
7
|
+
as: "button",
|
|
8
|
+
borderRadius: "large",
|
|
9
|
+
width: props.fullWidth ? '100%' : void 0,
|
|
10
|
+
className: clsx(buttonVariants[props.variant], external_styles_css_js_button, props.className),
|
|
11
|
+
...props,
|
|
12
|
+
children: props.children || label
|
|
13
|
+
});
|
|
14
|
+
const Button_Button = Button;
|
|
15
|
+
export { Button_Button as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Button } from './Button';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { styleVariants } from "@vanilla-extract/css";
|
|
2
|
+
import { vars } from "../../styles/theme.css.js";
|
|
3
|
+
import { styleWithLayer } from "../../styles/utils.js";
|
|
4
|
+
const buttonVariants = styleVariants({
|
|
5
|
+
primary: {
|
|
6
|
+
backgroundColor: vars.colors.buttonBackgroundPrimary,
|
|
7
|
+
color: vars.colors.buttonTextPrimary,
|
|
8
|
+
':focus-visible': {
|
|
9
|
+
backgroundColor: vars.colors.buttonBackgroundFocusedPrimary
|
|
10
|
+
},
|
|
11
|
+
':hover': {
|
|
12
|
+
backgroundColor: vars.colors.buttonBackgroundFocusedPrimary
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
secondary: {
|
|
16
|
+
backgroundColor: vars.colors.buttonBackgroundSecondary,
|
|
17
|
+
color: vars.colors.buttonTextSecondary,
|
|
18
|
+
':focus-visible': {
|
|
19
|
+
backgroundColor: vars.colors.buttonBackgroundFocusedSecondary
|
|
20
|
+
},
|
|
21
|
+
':hover': {
|
|
22
|
+
backgroundColor: vars.colors.buttonBackgroundFocusedSecondary
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const styles_css_button = styleWithLayer({
|
|
27
|
+
padding: '1rem',
|
|
28
|
+
borderRadius: '1rem',
|
|
29
|
+
border: 0
|
|
30
|
+
});
|
|
31
|
+
export { styles_css_button as button, buttonVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type CardProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
variant?: 'elevated' | 'outlined' | 'filled';
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
padding?: 'none' | 'small' | 'medium' | 'large';
|
|
6
|
+
};
|
|
7
|
+
declare const Card: ({ variant, padding, ...props }: CardProps) => React.JSX.Element;
|
|
8
|
+
export default Card;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { card, cardVariants } from "./styles.css.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import Box from "../Box/index.js";
|
|
6
|
+
const Card = ({ variant = 'elevated', padding = 'medium', ...props })=>/*#__PURE__*/ jsx(Box, {
|
|
7
|
+
as: "div",
|
|
8
|
+
borderRadius: "large",
|
|
9
|
+
padding: 'none' !== padding ? padding : void 0,
|
|
10
|
+
className: clsx(cardVariants[variant], card, props.className),
|
|
11
|
+
...props,
|
|
12
|
+
children: props.children
|
|
13
|
+
});
|
|
14
|
+
const Card_Card = Card;
|
|
15
|
+
export { Card_Card as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Card } from './Card';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { styleVariants } from "@vanilla-extract/css";
|
|
2
|
+
import { vars } from "../../styles/theme.css.js";
|
|
3
|
+
import { styleWithLayer } from "../../styles/utils.js";
|
|
4
|
+
const cardVariants = styleVariants({
|
|
5
|
+
elevated: {
|
|
6
|
+
backgroundColor: vars.colors.backgroundDefault,
|
|
7
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
|
|
8
|
+
border: 'none'
|
|
9
|
+
},
|
|
10
|
+
outlined: {
|
|
11
|
+
backgroundColor: vars.colors.backgroundDefault,
|
|
12
|
+
border: `1px solid ${vars.colors.borderDefault}`,
|
|
13
|
+
boxShadow: 'none'
|
|
14
|
+
},
|
|
15
|
+
filled: {
|
|
16
|
+
backgroundColor: vars.colors.backgroundMuted,
|
|
17
|
+
border: 'none',
|
|
18
|
+
boxShadow: 'none'
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const card = styleWithLayer({
|
|
22
|
+
display: 'block',
|
|
23
|
+
position: 'relative',
|
|
24
|
+
transition: 'all 0.2s ease-in-out'
|
|
25
|
+
});
|
|
26
|
+
export { card, cardVariants };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { forwardRef, useEffect, useRef } from "react";
|
|
4
|
+
import { checkboxContainer, checkboxInput, checkboxLabel } from "./styles.css.js";
|
|
5
|
+
import Box from "../Box/index.js";
|
|
6
|
+
const Checkbox = /*#__PURE__*/ forwardRef(({ label, className, indeterminate, ...props }, ref)=>{
|
|
7
|
+
const inputRef = useRef(null);
|
|
8
|
+
const combinedRef = (node)=>{
|
|
9
|
+
if ('function' == typeof ref) ref(node);
|
|
10
|
+
else if (ref) ref.current = node;
|
|
11
|
+
inputRef.current = node;
|
|
12
|
+
};
|
|
13
|
+
useEffect(()=>{
|
|
14
|
+
if (inputRef.current) inputRef.current.indeterminate = !!indeterminate;
|
|
15
|
+
}, [
|
|
16
|
+
indeterminate
|
|
17
|
+
]);
|
|
18
|
+
return /*#__PURE__*/ jsxs(Box, {
|
|
19
|
+
as: "label",
|
|
20
|
+
className: clsx(checkboxContainer, className),
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
gap: "small",
|
|
24
|
+
cursor: "pointer",
|
|
25
|
+
style: {
|
|
26
|
+
userSelect: 'none'
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ jsx(Box, {
|
|
30
|
+
as: "input",
|
|
31
|
+
type: "checkbox",
|
|
32
|
+
ref: combinedRef,
|
|
33
|
+
className: checkboxInput,
|
|
34
|
+
style: {
|
|
35
|
+
width: '18px',
|
|
36
|
+
height: '18px'
|
|
37
|
+
},
|
|
38
|
+
...props
|
|
39
|
+
}),
|
|
40
|
+
label && /*#__PURE__*/ jsx(Box, {
|
|
41
|
+
as: "span",
|
|
42
|
+
className: checkboxLabel,
|
|
43
|
+
children: label
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
Checkbox.displayName = 'Checkbox';
|
|
49
|
+
const Checkbox_Checkbox = Checkbox;
|
|
50
|
+
export { Checkbox_Checkbox as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Checkbox } from './Checkbox';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { style } from "@vanilla-extract/css";
|
|
2
|
+
import { vars } from "../../styles/theme.css.js";
|
|
3
|
+
import { styleWithLayer } from "../../styles/utils.js";
|
|
4
|
+
const checkboxContainer = styleWithLayer({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
gap: '8px',
|
|
8
|
+
cursor: 'pointer',
|
|
9
|
+
userSelect: 'none'
|
|
10
|
+
});
|
|
11
|
+
const checkboxInput = style({
|
|
12
|
+
width: '18px',
|
|
13
|
+
height: '18px',
|
|
14
|
+
border: `2px solid ${vars.colors.borderDefault}`,
|
|
15
|
+
borderRadius: '4px',
|
|
16
|
+
cursor: 'pointer',
|
|
17
|
+
accentColor: vars.colors.buttonBackgroundPrimary,
|
|
18
|
+
':focus-visible': {
|
|
19
|
+
outline: `2px solid ${vars.colors.buttonBackgroundPrimary}`,
|
|
20
|
+
outlineOffset: '2px'
|
|
21
|
+
},
|
|
22
|
+
':disabled': {
|
|
23
|
+
cursor: 'not-allowed',
|
|
24
|
+
opacity: 0.5
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const checkboxLabel = styleWithLayer({
|
|
28
|
+
fontFamily: vars.fontFamily.body,
|
|
29
|
+
fontSize: '14px',
|
|
30
|
+
color: vars.colors.textPrimary
|
|
31
|
+
});
|
|
32
|
+
export { checkboxContainer, checkboxInput, checkboxLabel };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CollapseAnimation = 'height' | 'opacity' | 'both';
|
|
3
|
+
export interface CollapseProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
animation?: CollapseAnimation;
|
|
7
|
+
duration?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
onAnimationEnd?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Collapse: ({ isOpen, children, animation, duration, className, onAnimationEnd, }: CollapseProps) => React.JSX.Element | null;
|
|
12
|
+
export default Collapse;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { collapseContainer, collapseContent } from "./styles.css.js";
|
|
5
|
+
import Box from "../Box/index.js";
|
|
6
|
+
const Collapse = ({ isOpen, children, animation = 'both', duration = 300, className, onAnimationEnd })=>{
|
|
7
|
+
const [height, setHeight] = useState(isOpen ? void 0 : 0);
|
|
8
|
+
const [isAnimating, setIsAnimating] = useState(false);
|
|
9
|
+
const contentRef = useRef(null);
|
|
10
|
+
useEffect(()=>{
|
|
11
|
+
if (isOpen) {
|
|
12
|
+
setIsAnimating(true);
|
|
13
|
+
if (contentRef.current) setHeight(contentRef.current.scrollHeight);
|
|
14
|
+
} else {
|
|
15
|
+
setIsAnimating(true);
|
|
16
|
+
setHeight(0);
|
|
17
|
+
}
|
|
18
|
+
}, [
|
|
19
|
+
isOpen
|
|
20
|
+
]);
|
|
21
|
+
const handleTransitionEnd = ()=>{
|
|
22
|
+
setIsAnimating(false);
|
|
23
|
+
if (isOpen) setHeight(void 0);
|
|
24
|
+
onAnimationEnd?.();
|
|
25
|
+
};
|
|
26
|
+
const getAnimationStyles = ()=>{
|
|
27
|
+
const baseStyles = {
|
|
28
|
+
transition: `height ${duration}ms ease-out, opacity ${duration}ms ease-out`,
|
|
29
|
+
height: void 0 !== height ? `${height}px` : void 0,
|
|
30
|
+
opacity: isOpen || isAnimating ? 1 : 0
|
|
31
|
+
};
|
|
32
|
+
if ('height' === animation) return {
|
|
33
|
+
...baseStyles,
|
|
34
|
+
transition: `height ${duration}ms ease-out`,
|
|
35
|
+
opacity: 1
|
|
36
|
+
};
|
|
37
|
+
if ('opacity' === animation) return {
|
|
38
|
+
...baseStyles,
|
|
39
|
+
transition: `opacity ${duration}ms ease-out`,
|
|
40
|
+
height: void 0
|
|
41
|
+
};
|
|
42
|
+
return baseStyles;
|
|
43
|
+
};
|
|
44
|
+
if (!isOpen && !isAnimating && 'opacity' !== animation) return null;
|
|
45
|
+
return /*#__PURE__*/ jsx(Box, {
|
|
46
|
+
className: clsx(collapseContainer, className),
|
|
47
|
+
style: getAnimationStyles(),
|
|
48
|
+
onTransitionEnd: handleTransitionEnd,
|
|
49
|
+
"aria-hidden": !isOpen,
|
|
50
|
+
children: /*#__PURE__*/ jsx(Box, {
|
|
51
|
+
ref: contentRef,
|
|
52
|
+
className: collapseContent,
|
|
53
|
+
children: children
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
const Collapse_Collapse = Collapse;
|
|
58
|
+
export { Collapse_Collapse as default };
|