@discourser/design-system 0.9.3 → 0.9.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/AbsoluteCenter.d.ts +4 -0
- package/dist/components/AbsoluteCenter.d.ts.map +1 -0
- package/dist/components/Accordion.d.ts +12 -0
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/Avatar.d.ts +17 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Badge.d.ts +13 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Button.d.ts +39 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Card.d.ts +17 -0
- package/dist/components/Card.d.ts.map +1 -0
- package/dist/components/Checkbox.d.ts +507 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/CloseButton.d.ts +4 -0
- package/dist/components/CloseButton.d.ts.map +1 -0
- package/dist/components/Dialog.d.ts +16 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/Drawer.d.ts +17 -0
- package/dist/components/Drawer.d.ts.map +1 -0
- package/dist/components/Group.d.ts +4 -0
- package/dist/components/Group.d.ts.map +1 -0
- package/dist/components/Heading.d.ts +10 -0
- package/dist/components/Heading.d.ts.map +1 -0
- package/dist/components/Icon.d.ts +4 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/IconButton.d.ts +5 -0
- package/dist/components/IconButton.d.ts.map +1 -0
- package/dist/components/Input.d.ts +5 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/InputAddon.d.ts +4 -0
- package/dist/components/InputAddon.d.ts.map +1 -0
- package/dist/components/InputGroup.d.ts +14 -0
- package/dist/components/InputGroup.d.ts.map +1 -0
- package/dist/components/Loader.d.ts +25 -0
- package/dist/components/Loader.d.ts.map +1 -0
- package/dist/components/Popover.d.ts +20 -0
- package/dist/components/Popover.d.ts.map +1 -0
- package/dist/components/Progress.d.ts +14 -0
- package/dist/components/Progress.d.ts.map +1 -0
- package/dist/components/RadioGroup.d.ts +14 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/Select.d.ts +26 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/Skeleton.d.ts +16 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Slider.d.ts +34 -0
- package/dist/components/Slider.d.ts.map +1 -0
- package/dist/components/Spinner.d.ts +4 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Switch.d.ts +10 -0
- package/dist/components/Switch.d.ts.map +1 -0
- package/dist/components/Tabs.d.ts +11 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Textarea.d.ts +5 -0
- package/dist/components/Textarea.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +4 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Tooltip.d.ts +19 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/index.d.ts +30 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/contracts/design-language.contract.d.ts +175 -0
- package/dist/contracts/design-language.contract.d.ts.map +1 -0
- package/dist/index.d.ts +7 -21506
- package/dist/index.d.ts.map +1 -0
- package/dist/languages/index.d.ts +4 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/material3.language.d.ts +9 -0
- package/dist/languages/material3.language.d.ts.map +1 -0
- package/dist/languages/transform.d.ts +98 -0
- package/dist/languages/transform.d.ts.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/preset/colors/index.d.ts +1485 -0
- package/dist/preset/colors/index.d.ts.map +1 -0
- package/dist/preset/colors/m3-error.d.ts +295 -0
- package/dist/preset/colors/m3-error.d.ts.map +1 -0
- package/dist/preset/colors/m3-neutral.d.ts +301 -0
- package/dist/preset/colors/m3-neutral.d.ts.map +1 -0
- package/dist/preset/colors/m3-primary.d.ts +312 -0
- package/dist/preset/colors/m3-primary.d.ts.map +1 -0
- package/dist/preset/index.d.ts +3 -0
- package/dist/preset/index.d.ts.map +1 -0
- package/dist/preset/layer-styles.d.ts +6 -0
- package/dist/preset/layer-styles.d.ts.map +1 -0
- package/dist/preset/recipes/absolute-center.d.ts +2 -0
- package/dist/preset/recipes/absolute-center.d.ts.map +1 -0
- package/dist/preset/recipes/accordion.d.ts +2 -0
- package/dist/preset/recipes/accordion.d.ts.map +1 -0
- package/dist/preset/recipes/avatar.d.ts +2 -0
- package/dist/preset/recipes/avatar.d.ts.map +1 -0
- package/dist/preset/recipes/badge.d.ts +2 -0
- package/dist/preset/recipes/badge.d.ts.map +1 -0
- package/dist/preset/recipes/button.d.ts +2 -0
- package/dist/preset/recipes/button.d.ts.map +1 -0
- package/dist/preset/recipes/card.d.ts +2 -0
- package/dist/preset/recipes/card.d.ts.map +1 -0
- package/dist/preset/recipes/checkbox.d.ts +2 -0
- package/dist/preset/recipes/checkbox.d.ts.map +1 -0
- package/dist/preset/recipes/dialog.d.ts +2 -0
- package/dist/preset/recipes/dialog.d.ts.map +1 -0
- package/dist/preset/recipes/drawer.d.ts +2 -0
- package/dist/preset/recipes/drawer.d.ts.map +1 -0
- package/dist/preset/recipes/field.d.ts +2 -0
- package/dist/preset/recipes/field.d.ts.map +1 -0
- package/dist/preset/recipes/group.d.ts +2 -0
- package/dist/preset/recipes/group.d.ts.map +1 -0
- package/dist/preset/recipes/heading.d.ts +2 -0
- package/dist/preset/recipes/heading.d.ts.map +1 -0
- package/dist/preset/recipes/index.d.ts +28 -0
- package/dist/preset/recipes/index.d.ts.map +1 -0
- package/dist/preset/recipes/input-addon.d.ts +2 -0
- package/dist/preset/recipes/input-addon.d.ts.map +1 -0
- package/dist/preset/recipes/input-group.d.ts +2 -0
- package/dist/preset/recipes/input-group.d.ts.map +1 -0
- package/dist/preset/recipes/input.d.ts +114 -0
- package/dist/preset/recipes/input.d.ts.map +1 -0
- package/dist/preset/recipes/popover.d.ts +2 -0
- package/dist/preset/recipes/popover.d.ts.map +1 -0
- package/dist/preset/recipes/progress.d.ts +2 -0
- package/dist/preset/recipes/progress.d.ts.map +1 -0
- package/dist/preset/recipes/radio-group.d.ts +2 -0
- package/dist/preset/recipes/radio-group.d.ts.map +1 -0
- package/dist/preset/recipes/select.d.ts +2 -0
- package/dist/preset/recipes/select.d.ts.map +1 -0
- package/dist/preset/recipes/skeleton.d.ts +2 -0
- package/dist/preset/recipes/skeleton.d.ts.map +1 -0
- package/dist/preset/recipes/slider.d.ts +2 -0
- package/dist/preset/recipes/slider.d.ts.map +1 -0
- package/dist/preset/recipes/spinner.d.ts +2 -0
- package/dist/preset/recipes/spinner.d.ts.map +1 -0
- package/dist/preset/recipes/switch.d.ts +2 -0
- package/dist/preset/recipes/switch.d.ts.map +1 -0
- package/dist/preset/recipes/tabs.d.ts +2 -0
- package/dist/preset/recipes/tabs.d.ts.map +1 -0
- package/dist/preset/recipes/textarea.d.ts +2 -0
- package/dist/preset/recipes/textarea.d.ts.map +1 -0
- package/dist/preset/recipes/toast.d.ts +2 -0
- package/dist/preset/recipes/toast.d.ts.map +1 -0
- package/dist/preset/recipes/tooltip.d.ts +2 -0
- package/dist/preset/recipes/tooltip.d.ts.map +1 -0
- package/dist/preset/semantic-tokens.d.ts +197 -0
- package/dist/preset/semantic-tokens.d.ts.map +1 -0
- package/dist/preset/shadows.d.ts +49 -0
- package/dist/preset/shadows.d.ts.map +1 -0
- package/dist/preset/text-styles.d.ts +6 -0
- package/dist/preset/text-styles.d.ts.map +1 -0
- package/dist/recipes/button.recipe.d.ts +2 -0
- package/dist/recipes/button.recipe.d.ts.map +1 -0
- package/dist/recipes/card.recipe.d.ts +2 -0
- package/dist/recipes/card.recipe.d.ts.map +1 -0
- package/dist/recipes/dialog.recipe.d.ts +2 -0
- package/dist/recipes/dialog.recipe.d.ts.map +1 -0
- package/dist/recipes/icon-button.recipe.d.ts +2 -0
- package/dist/recipes/icon-button.recipe.d.ts.map +1 -0
- package/dist/recipes/index.d.ts +7 -0
- package/dist/recipes/index.d.ts.map +1 -0
- package/dist/recipes/input.recipe.d.ts +2 -0
- package/dist/recipes/input.recipe.d.ts.map +1 -0
- package/dist/recipes/switch.recipe.d.ts +2 -0
- package/dist/recipes/switch.recipe.d.ts.map +1 -0
- package/dist/stories/foundations/components/ColorSwatch.d.ts +21 -0
- package/dist/stories/foundations/components/ColorSwatch.d.ts.map +1 -0
- package/dist/stories/foundations/components/ElevationCard.d.ts +11 -0
- package/dist/stories/foundations/components/ElevationCard.d.ts.map +1 -0
- package/dist/stories/foundations/components/SpacingBox.d.ts +11 -0
- package/dist/stories/foundations/components/SpacingBox.d.ts.map +1 -0
- package/dist/stories/foundations/components/TypeSpecimen.d.ts +12 -0
- package/dist/stories/foundations/components/TypeSpecimen.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +6 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/components/AbsoluteCenter.tsx +7 -0
- package/src/components/Accordion.tsx +27 -0
- package/src/components/Avatar.tsx +55 -0
- package/src/components/Badge.tsx +29 -0
- package/src/components/Button.tsx +116 -0
- package/src/components/Card.tsx +24 -0
- package/src/components/Checkbox.tsx +48 -0
- package/src/components/CloseButton.tsx +21 -0
- package/src/components/Dialog.tsx +25 -0
- package/src/components/Drawer.tsx +29 -0
- package/src/components/Group.tsx +7 -0
- package/src/components/Heading.tsx +9 -0
- package/src/components/Icon.tsx +6 -0
- package/src/components/IconButton.tsx +10 -0
- package/src/components/Input.tsx +7 -0
- package/src/components/InputAddon.tsx +7 -0
- package/src/components/InputGroup.tsx +44 -0
- package/src/components/Loader.tsx +71 -0
- package/src/components/Popover.tsx +34 -0
- package/src/components/Progress.tsx +19 -0
- package/src/components/RadioGroup.tsx +21 -0
- package/src/components/Select.tsx +70 -0
- package/src/components/Skeleton.tsx +37 -0
- package/src/components/Slider.tsx +156 -0
- package/src/components/Spinner.tsx +7 -0
- package/src/components/Switch.tsx +19 -0
- package/src/components/Tabs.tsx +17 -0
- package/src/components/Textarea.tsx +7 -0
- package/src/components/Toast.tsx +96 -0
- package/src/components/Tooltip.tsx +65 -0
- package/src/components/index.ts +48 -0
- package/src/contracts/design-language.contract.ts +198 -0
- package/src/global.css +4 -0
- package/src/index.ts +18 -0
- package/src/languages/index.ts +9 -0
- package/src/languages/material3.language.ts +379 -0
- package/src/languages/transform.ts +131 -0
- package/src/main.ts +33 -0
- package/src/preset/colors/index.ts +14 -0
- package/src/preset/colors/m3-error.ts +76 -0
- package/src/preset/colors/m3-neutral.ts +89 -0
- package/src/preset/colors/m3-primary.ts +107 -0
- package/src/preset/index.ts +189 -0
- package/src/preset/layer-styles.ts +14 -0
- package/src/preset/recipes/absolute-center.ts +37 -0
- package/src/preset/recipes/accordion.ts +92 -0
- package/src/preset/recipes/avatar.ts +152 -0
- package/src/preset/recipes/badge.ts +49 -0
- package/src/preset/recipes/button.ts +110 -0
- package/src/preset/recipes/card.ts +69 -0
- package/src/preset/recipes/checkbox.ts +109 -0
- package/src/preset/recipes/dialog.ts +157 -0
- package/src/preset/recipes/drawer.ts +203 -0
- package/src/preset/recipes/field.ts +40 -0
- package/src/preset/recipes/group.ts +77 -0
- package/src/preset/recipes/heading.ts +26 -0
- package/src/preset/recipes/index.ts +40 -0
- package/src/preset/recipes/input-addon.ts +42 -0
- package/src/preset/recipes/input-group.ts +66 -0
- package/src/preset/recipes/input.ts +87 -0
- package/src/preset/recipes/popover.ts +77 -0
- package/src/preset/recipes/progress.ts +120 -0
- package/src/preset/recipes/radio-group.ts +99 -0
- package/src/preset/recipes/select.ts +175 -0
- package/src/preset/recipes/skeleton.ts +64 -0
- package/src/preset/recipes/slider.ts +174 -0
- package/src/preset/recipes/spinner.ts +33 -0
- package/src/preset/recipes/switch.ts +136 -0
- package/src/preset/recipes/tabs.ts +177 -0
- package/src/preset/recipes/textarea.ts +82 -0
- package/src/preset/recipes/toast.ts +51 -0
- package/src/preset/recipes/tooltip.ts +38 -0
- package/src/preset/semantic-tokens.ts +75 -0
- package/src/preset/shadows.ts +50 -0
- package/src/preset/text-styles.ts +21 -0
- package/src/recipes/button.recipe.ts +120 -0
- package/src/recipes/card.recipe.ts +50 -0
- package/src/recipes/dialog.recipe.ts +130 -0
- package/src/recipes/icon-button.recipe.ts +96 -0
- package/src/recipes/index.ts +6 -0
- package/src/recipes/input.recipe.ts +93 -0
- package/src/recipes/switch.recipe.ts +117 -0
- package/src/stories/foundations/Colors.mdx +380 -0
- package/src/stories/foundations/Elevation.mdx +292 -0
- package/src/stories/foundations/Spacing.mdx +223 -0
- package/src/stories/foundations/Typography.mdx +264 -0
- package/src/stories/foundations/components/ColorSwatch.tsx +166 -0
- package/src/stories/foundations/components/ElevationCard.tsx +81 -0
- package/src/stories/foundations/components/SpacingBox.tsx +94 -0
- package/src/stories/foundations/components/TypeSpecimen.tsx +117 -0
- package/src/test/setup.ts +12 -0
- package/src/test/vitest.d.ts +29 -0
- package/src/utils/cn.ts +8 -0
- package/src/vite-env.d.ts +1 -0
- package/dist/index.d.cts +0 -21506
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
export const badge = defineRecipe({
|
|
4
|
+
className: 'badge',
|
|
5
|
+
base: {
|
|
6
|
+
display: 'inline-flex',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
borderRadius: 'l2',
|
|
9
|
+
lineHeight: '1',
|
|
10
|
+
fontWeight: 'medium',
|
|
11
|
+
fontVariantNumeric: 'tabular-nums',
|
|
12
|
+
whiteSpace: 'nowrap',
|
|
13
|
+
userSelect: 'none',
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: 'subtle',
|
|
17
|
+
size: 'md',
|
|
18
|
+
},
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
solid: {
|
|
22
|
+
bg: 'colorPalette.solid.bg',
|
|
23
|
+
color: 'colorPalette.solid.fg',
|
|
24
|
+
},
|
|
25
|
+
surface: {
|
|
26
|
+
bg: 'colorPalette.surface.bg',
|
|
27
|
+
borderWidth: '1px',
|
|
28
|
+
borderColor: 'colorPalette.surface.border',
|
|
29
|
+
color: 'colorPalette.surface.fg',
|
|
30
|
+
},
|
|
31
|
+
subtle: {
|
|
32
|
+
bg: 'colorPalette.subtle.bg',
|
|
33
|
+
color: 'colorPalette.subtle.fg',
|
|
34
|
+
},
|
|
35
|
+
outline: {
|
|
36
|
+
borderWidth: '1px',
|
|
37
|
+
borderColor: 'colorPalette.outline.border',
|
|
38
|
+
color: 'colorPalette.outline.fg',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
sm: { fontSize: 'xs', px: '1.5', h: '4.5', gap: '0.5', _icon: { boxSize: '2.5' } },
|
|
43
|
+
md: { fontSize: 'xs', px: '2', h: '5', gap: '1', _icon: { boxSize: '3' } },
|
|
44
|
+
lg: { fontSize: 'xs', px: '2.5', h: '5.5', gap: '1', _icon: { boxSize: '3.5' } },
|
|
45
|
+
xl: { fontSize: 'sm', px: '2.5', h: '6', gap: '1.5', _icon: { boxSize: '4' } },
|
|
46
|
+
'2xl': { fontSize: 'md', px: '3', h: '7', gap: '1.5', _icon: { boxSize: '4.5' } },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
})
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
export const button = defineRecipe({
|
|
4
|
+
className: 'button',
|
|
5
|
+
jsx: ['Button', 'IconButton', 'CloseButton', 'ButtonGroup'],
|
|
6
|
+
base: {
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
appearance: 'none',
|
|
9
|
+
borderRadius: 'l2',
|
|
10
|
+
cursor: 'pointer',
|
|
11
|
+
display: 'inline-flex',
|
|
12
|
+
flexShrink: '0',
|
|
13
|
+
fontWeight: 'semibold',
|
|
14
|
+
gap: '2',
|
|
15
|
+
isolation: 'isolate',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
outline: '0',
|
|
18
|
+
position: 'relative',
|
|
19
|
+
transition: 'colors',
|
|
20
|
+
transitionProperty: 'background-color, border-color, color, box-shadow',
|
|
21
|
+
userSelect: 'none',
|
|
22
|
+
verticalAlign: 'middle',
|
|
23
|
+
whiteSpace: 'nowrap',
|
|
24
|
+
_icon: {
|
|
25
|
+
flexShrink: '0',
|
|
26
|
+
},
|
|
27
|
+
_disabled: {
|
|
28
|
+
layerStyle: 'disabled',
|
|
29
|
+
},
|
|
30
|
+
focusVisibleRing: 'outside',
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: 'solid',
|
|
34
|
+
size: 'md',
|
|
35
|
+
},
|
|
36
|
+
variants: {
|
|
37
|
+
variant: {
|
|
38
|
+
solid: {
|
|
39
|
+
bg: 'colorPalette.solid.bg',
|
|
40
|
+
color: 'colorPalette.solid.fg',
|
|
41
|
+
_hover: {
|
|
42
|
+
bg: 'colorPalette.solid.bg.hover',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
surface: {
|
|
46
|
+
bg: 'colorPalette.surface.bg',
|
|
47
|
+
borderWidth: '1px',
|
|
48
|
+
borderColor: 'colorPalette.surface.border',
|
|
49
|
+
color: 'colorPalette.surface.fg',
|
|
50
|
+
_hover: {
|
|
51
|
+
borderColor: 'colorPalette.surface.border.hover',
|
|
52
|
+
},
|
|
53
|
+
_active: {
|
|
54
|
+
bg: 'colorPalette.surface.bg.active',
|
|
55
|
+
},
|
|
56
|
+
_on: {
|
|
57
|
+
bg: 'colorPalette.surface.bg.active',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
subtle: {
|
|
61
|
+
bg: 'colorPalette.subtle.bg',
|
|
62
|
+
color: 'colorPalette.subtle.fg',
|
|
63
|
+
_hover: {
|
|
64
|
+
bg: 'colorPalette.subtle.bg.hover',
|
|
65
|
+
},
|
|
66
|
+
_active: {
|
|
67
|
+
bg: 'colorPalette.subtle.bg.active',
|
|
68
|
+
},
|
|
69
|
+
_on: {
|
|
70
|
+
bg: 'colorPalette.subtle.bg.active',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
outline: {
|
|
74
|
+
borderWidth: '1px',
|
|
75
|
+
borderColor: 'colorPalette.outline.border',
|
|
76
|
+
color: 'colorPalette.outline.fg',
|
|
77
|
+
_hover: {
|
|
78
|
+
bg: 'colorPalette.outline.bg.hover',
|
|
79
|
+
},
|
|
80
|
+
_active: {
|
|
81
|
+
bg: 'colorPalette.outline.bg.active',
|
|
82
|
+
},
|
|
83
|
+
_on: {
|
|
84
|
+
bg: 'colorPalette.outline.bg.active',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
plain: {
|
|
88
|
+
color: 'colorPalette.plain.fg',
|
|
89
|
+
_hover: {
|
|
90
|
+
bg: 'colorPalette.plain.bg.hover',
|
|
91
|
+
},
|
|
92
|
+
_active: {
|
|
93
|
+
bg: 'colorPalette.plain.bg.active',
|
|
94
|
+
},
|
|
95
|
+
_on: {
|
|
96
|
+
bg: 'colorPalette.plain.bg.active',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
size: {
|
|
101
|
+
'2xs': { h: '6', minW: '6', textStyle: 'xs', px: '2', _icon: { boxSize: '3.5' } },
|
|
102
|
+
xs: { h: '8', minW: '8', textStyle: 'sm', px: '2.5', _icon: { boxSize: '4' } },
|
|
103
|
+
sm: { h: '9', minW: '9', textStyle: 'sm', px: '3', _icon: { boxSize: '4' } },
|
|
104
|
+
md: { h: '10', minW: '10', textStyle: 'sm', px: '3.5', _icon: { boxSize: '5' } },
|
|
105
|
+
lg: { h: '11', minW: '11', textStyle: 'md', px: '4', _icon: { boxSize: '5' } },
|
|
106
|
+
xl: { h: '12', minW: '12', textStyle: 'md', px: '4.5', _icon: { boxSize: '5.5' } },
|
|
107
|
+
'2xl': { h: '16', minW: '16', textStyle: 'xl', px: '6', _icon: { boxSize: '6' } },
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
})
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const card = defineSlotRecipe({
|
|
4
|
+
className: 'card',
|
|
5
|
+
slots: ['root', 'header', 'body', 'footer', 'title', 'description'],
|
|
6
|
+
base: {
|
|
7
|
+
root: {
|
|
8
|
+
borderRadius: 'l3',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
overflow: 'hidden',
|
|
12
|
+
position: 'relative',
|
|
13
|
+
},
|
|
14
|
+
header: {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
gap: '1',
|
|
18
|
+
p: '6',
|
|
19
|
+
},
|
|
20
|
+
body: {
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flex: '1',
|
|
23
|
+
flexDirection: 'column',
|
|
24
|
+
pb: '6',
|
|
25
|
+
px: '6',
|
|
26
|
+
},
|
|
27
|
+
footer: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
justifyContent: 'flex-end',
|
|
30
|
+
gap: '3',
|
|
31
|
+
pb: '6',
|
|
32
|
+
pt: '2',
|
|
33
|
+
px: '6',
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
36
|
+
textStyle: 'lg',
|
|
37
|
+
fontWeight: 'semibold',
|
|
38
|
+
},
|
|
39
|
+
description: {
|
|
40
|
+
color: 'fg.muted',
|
|
41
|
+
textStyle: 'sm',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
variant: 'outline',
|
|
46
|
+
},
|
|
47
|
+
variants: {
|
|
48
|
+
variant: {
|
|
49
|
+
elevated: {
|
|
50
|
+
root: {
|
|
51
|
+
bg: 'neutral.surface.bg',
|
|
52
|
+
boxShadow: 'lg',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
outline: {
|
|
56
|
+
root: {
|
|
57
|
+
bg: 'neutral.surface.bg',
|
|
58
|
+
borderWidth: '1px',
|
|
59
|
+
borderColor: 'border.default',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
subtle: {
|
|
63
|
+
root: {
|
|
64
|
+
bg: 'neutral.subtle.bg',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { checkboxAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const checkbox = defineSlotRecipe({
|
|
5
|
+
slots: checkboxAnatomy.keys(),
|
|
6
|
+
className: 'checkbox',
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
display: 'inline-flex',
|
|
10
|
+
gap: '2',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
verticalAlign: 'top',
|
|
13
|
+
position: 'relative',
|
|
14
|
+
_disabled: {
|
|
15
|
+
layerStyle: 'disabled',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
control: {
|
|
19
|
+
display: 'inline-flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
flexShrink: '0',
|
|
23
|
+
borderWidth: '1px',
|
|
24
|
+
borderColor: 'border',
|
|
25
|
+
borderRadius: 'l1',
|
|
26
|
+
cursor: 'pointer',
|
|
27
|
+
focusVisibleRing: 'outside',
|
|
28
|
+
bg: 'canvas',
|
|
29
|
+
|
|
30
|
+
_icon: {
|
|
31
|
+
boxSize: 'full',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
label: {
|
|
35
|
+
fontWeight: 'medium',
|
|
36
|
+
userSelect: 'none',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
variants: {
|
|
41
|
+
size: {
|
|
42
|
+
sm: {
|
|
43
|
+
root: { gap: '2' },
|
|
44
|
+
label: { textStyle: 'sm' },
|
|
45
|
+
control: { boxSize: '4.5', _icon: { boxSize: '3' } },
|
|
46
|
+
},
|
|
47
|
+
md: {
|
|
48
|
+
root: { gap: '3' },
|
|
49
|
+
label: { textStyle: 'md' },
|
|
50
|
+
control: { boxSize: '5', _icon: { boxSize: '3.5' } },
|
|
51
|
+
},
|
|
52
|
+
lg: {
|
|
53
|
+
root: { gap: '3' },
|
|
54
|
+
label: { textStyle: 'lg' },
|
|
55
|
+
control: { boxSize: '5.5', _icon: { boxSize: '4' } },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
variant: {
|
|
60
|
+
solid: {
|
|
61
|
+
control: {
|
|
62
|
+
borderColor: 'border',
|
|
63
|
+
_checked: {
|
|
64
|
+
bg: 'colorPalette.solid.bg',
|
|
65
|
+
borderColor: 'colorPalette.solid.bg',
|
|
66
|
+
color: 'colorPalette.solid.fg',
|
|
67
|
+
},
|
|
68
|
+
_invalid: {
|
|
69
|
+
background: 'error',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
surface: {
|
|
74
|
+
control: {
|
|
75
|
+
bg: 'colorPalette.surface.bg',
|
|
76
|
+
borderWidth: '1px',
|
|
77
|
+
borderColor: 'colorPalette.surface.border',
|
|
78
|
+
color: 'colorPalette.surface.fg',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
subtle: {
|
|
82
|
+
control: {
|
|
83
|
+
bg: 'colorPalette.subtle.bg',
|
|
84
|
+
color: 'colorPalette.subtle.fg',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
outline: {
|
|
88
|
+
control: {
|
|
89
|
+
borderWidth: '1px',
|
|
90
|
+
borderColor: 'colorPalette.outline.border',
|
|
91
|
+
color: 'colorPalette.outline.fg',
|
|
92
|
+
_checked: {
|
|
93
|
+
borderColor: 'colorPalette.solid.bg',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
plain: {
|
|
98
|
+
control: {
|
|
99
|
+
color: 'colorPalette.plain.fg',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
defaultVariants: {
|
|
106
|
+
variant: 'solid',
|
|
107
|
+
size: 'md',
|
|
108
|
+
},
|
|
109
|
+
})
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { dialogAnatomy } from '@ark-ui/react/anatomy';
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
3
|
+
|
|
4
|
+
export const dialog = defineSlotRecipe({
|
|
5
|
+
className: 'dialog',
|
|
6
|
+
slots: dialogAnatomy.extendWith('header', 'body', 'footer').keys(),
|
|
7
|
+
base: {
|
|
8
|
+
backdrop: {
|
|
9
|
+
background: 'neutral.a7',
|
|
10
|
+
height: '100dvh',
|
|
11
|
+
left: '0',
|
|
12
|
+
position: 'fixed',
|
|
13
|
+
top: '0',
|
|
14
|
+
width: '100dvw',
|
|
15
|
+
zIndex: 'overlay',
|
|
16
|
+
_open: {
|
|
17
|
+
animationDuration: 'normal',
|
|
18
|
+
},
|
|
19
|
+
_closed: {
|
|
20
|
+
animationDuration: 'fast',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
positioner: {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
height: '100dvh',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
left: 0,
|
|
28
|
+
overscrollBehaviorY: 'none',
|
|
29
|
+
position: 'fixed',
|
|
30
|
+
top: 0,
|
|
31
|
+
width: '100dvw',
|
|
32
|
+
zIndex: 'modal',
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
fontWeight: 'semibold',
|
|
36
|
+
textStyle: 'lg',
|
|
37
|
+
},
|
|
38
|
+
description: {
|
|
39
|
+
color: 'fg.muted',
|
|
40
|
+
textStyle: 'sm',
|
|
41
|
+
},
|
|
42
|
+
closeTrigger: {
|
|
43
|
+
},
|
|
44
|
+
content: {
|
|
45
|
+
bg: 'neutral.surface.bg',
|
|
46
|
+
borderRadius: 'l3',
|
|
47
|
+
boxShadow: 'lg',
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'column',
|
|
50
|
+
my: 'auto',
|
|
51
|
+
outline: 0,
|
|
52
|
+
position: 'relative',
|
|
53
|
+
textStyle: 'sm',
|
|
54
|
+
width: '100%',
|
|
55
|
+
zIndex: 'modal',
|
|
56
|
+
py: { base: '4', md: '6' },
|
|
57
|
+
gap: { base: '4', md: '6' },
|
|
58
|
+
_open: {
|
|
59
|
+
animationDuration: 'slowest',
|
|
60
|
+
},
|
|
61
|
+
_closed: {
|
|
62
|
+
animationDuration: 'normal',
|
|
63
|
+
display: 'none',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
header: {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
gap: '0.5',
|
|
70
|
+
px: { base: '4', md: '6' },
|
|
71
|
+
flex: '0',
|
|
72
|
+
},
|
|
73
|
+
body: {
|
|
74
|
+
display: 'flex',
|
|
75
|
+
flex: '1',
|
|
76
|
+
flexDirection: 'column',
|
|
77
|
+
alignItems: 'flex-start',
|
|
78
|
+
px: { base: '4', md: '6' },
|
|
79
|
+
},
|
|
80
|
+
footer: {
|
|
81
|
+
display: 'flex',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
justifyContent: 'flex-end',
|
|
84
|
+
flex: '0',
|
|
85
|
+
gap: '3',
|
|
86
|
+
px: { base: '4', md: '6' },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
size: 'md',
|
|
91
|
+
scrollBehavior: 'outside',
|
|
92
|
+
placement: 'center',
|
|
93
|
+
},
|
|
94
|
+
variants: {
|
|
95
|
+
size: {
|
|
96
|
+
xs: { content: { maxW: 'xs' } },
|
|
97
|
+
sm: { content: { maxW: 'sm' } },
|
|
98
|
+
md: { content: { maxW: 'md' } },
|
|
99
|
+
lg: { content: { maxW: 'lg' } },
|
|
100
|
+
xl: { content: { maxW: 'xl' } },
|
|
101
|
+
full: {
|
|
102
|
+
content: {
|
|
103
|
+
maxW: '100dvw',
|
|
104
|
+
minH: '100dvh',
|
|
105
|
+
borderRadius: '0',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
placement: {
|
|
110
|
+
center: {
|
|
111
|
+
positioner: {
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
},
|
|
114
|
+
content: {
|
|
115
|
+
mx: 'auto',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
top: {
|
|
119
|
+
positioner: {
|
|
120
|
+
alignItems: 'flex-start',
|
|
121
|
+
},
|
|
122
|
+
content: {
|
|
123
|
+
mt: '16',
|
|
124
|
+
mx: 'auto',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
bottom: {
|
|
128
|
+
positioner: {
|
|
129
|
+
alignItems: 'flex-end',
|
|
130
|
+
},
|
|
131
|
+
content: {
|
|
132
|
+
mb: '16',
|
|
133
|
+
mx: 'auto',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
scrollBehavior: {
|
|
138
|
+
inside: {
|
|
139
|
+
positioner: {
|
|
140
|
+
overflow: 'hidden',
|
|
141
|
+
},
|
|
142
|
+
content: {
|
|
143
|
+
maxH: 'calc(100% - 7.5rem)',
|
|
144
|
+
},
|
|
145
|
+
body: {
|
|
146
|
+
overflow: 'auto',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
outside: {
|
|
150
|
+
positioner: {
|
|
151
|
+
overflow: 'auto',
|
|
152
|
+
pointerEvents: 'auto',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
});
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { dialogAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const drawer = defineSlotRecipe({
|
|
5
|
+
className: 'drawer',
|
|
6
|
+
slots: dialogAnatomy.extendWith('header', 'body', 'footer').keys(),
|
|
7
|
+
base: {
|
|
8
|
+
backdrop: {
|
|
9
|
+
background: 'black.a7',
|
|
10
|
+
position: 'fixed',
|
|
11
|
+
insetInlineStart: '0',
|
|
12
|
+
top: '0',
|
|
13
|
+
width: '100vw',
|
|
14
|
+
height: '100dvh',
|
|
15
|
+
zIndex: 'overlay',
|
|
16
|
+
_open: {
|
|
17
|
+
animationName: 'fade-in',
|
|
18
|
+
animationTimingFunction: 'emphasized-in',
|
|
19
|
+
animationDuration: 'slow',
|
|
20
|
+
},
|
|
21
|
+
_closed: {
|
|
22
|
+
animationName: 'fade-out',
|
|
23
|
+
animationTimingFunction: 'emphasized-out',
|
|
24
|
+
animationDuration: 'normal',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
positioner: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
width: '100vw',
|
|
30
|
+
height: '100dvh',
|
|
31
|
+
position: 'fixed',
|
|
32
|
+
insetInlineStart: '0',
|
|
33
|
+
top: '0',
|
|
34
|
+
zIndex: 'modal',
|
|
35
|
+
overscrollBehaviorY: 'none',
|
|
36
|
+
},
|
|
37
|
+
content: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
position: 'relative',
|
|
41
|
+
width: '100%',
|
|
42
|
+
outline: 0,
|
|
43
|
+
zIndex: 'modal',
|
|
44
|
+
maxH: '100dvh',
|
|
45
|
+
color: 'inherit',
|
|
46
|
+
bg: 'gray.surface.bg',
|
|
47
|
+
boxShadow: 'lg',
|
|
48
|
+
_open: {
|
|
49
|
+
animationDuration: 'slowest',
|
|
50
|
+
animationTimingFunction: 'cubic-bezier(0.05, 0.7, 0.1, 1.0)',
|
|
51
|
+
},
|
|
52
|
+
_closed: {
|
|
53
|
+
animationDuration: 'normal',
|
|
54
|
+
animationTimingFunction: 'cubic-bezier(0.3, 0.0, 0.8, 0.15)',
|
|
55
|
+
display: 'none',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
header: {
|
|
59
|
+
display: 'flex',
|
|
60
|
+
flexDirection: 'column',
|
|
61
|
+
gap: '1',
|
|
62
|
+
pt: { base: '4', md: '6' },
|
|
63
|
+
pb: '4',
|
|
64
|
+
px: { base: '4', md: '6' },
|
|
65
|
+
flex: '0',
|
|
66
|
+
},
|
|
67
|
+
body: {
|
|
68
|
+
display: 'flex',
|
|
69
|
+
flexDirection: 'column',
|
|
70
|
+
alignItems: 'flex-start',
|
|
71
|
+
flex: '1',
|
|
72
|
+
overflow: 'auto',
|
|
73
|
+
p: { base: '4', md: '6' },
|
|
74
|
+
},
|
|
75
|
+
footer: {
|
|
76
|
+
display: 'flex',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
justifyContent: 'flex-end',
|
|
79
|
+
flex: '0',
|
|
80
|
+
gap: '3',
|
|
81
|
+
py: '4',
|
|
82
|
+
px: { base: '4', md: '6' },
|
|
83
|
+
},
|
|
84
|
+
title: {
|
|
85
|
+
color: 'fg.default',
|
|
86
|
+
fontWeight: 'semibold',
|
|
87
|
+
textStyle: 'xl',
|
|
88
|
+
},
|
|
89
|
+
description: {
|
|
90
|
+
color: 'fg.muted',
|
|
91
|
+
textStyle: 'sm',
|
|
92
|
+
},
|
|
93
|
+
closeTrigger: {
|
|
94
|
+
pos: 'absolute',
|
|
95
|
+
top: '3',
|
|
96
|
+
insetEnd: '3',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
defaultVariants: {
|
|
100
|
+
placement: 'end',
|
|
101
|
+
size: 'sm',
|
|
102
|
+
},
|
|
103
|
+
variants: {
|
|
104
|
+
size: {
|
|
105
|
+
xs: {
|
|
106
|
+
content: {
|
|
107
|
+
maxW: 'xs',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
sm: {
|
|
111
|
+
content: {
|
|
112
|
+
maxW: 'sm',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
md: {
|
|
116
|
+
content: {
|
|
117
|
+
maxW: 'md',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
lg: {
|
|
121
|
+
content: {
|
|
122
|
+
maxW: 'lg',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
xl: {
|
|
126
|
+
content: {
|
|
127
|
+
maxW: 'xl',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
full: {
|
|
131
|
+
content: {
|
|
132
|
+
maxW: '100vw',
|
|
133
|
+
h: '100dvh',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
placement: {
|
|
138
|
+
start: {
|
|
139
|
+
positioner: {
|
|
140
|
+
justifyContent: 'flex-start',
|
|
141
|
+
alignItems: 'stretch',
|
|
142
|
+
},
|
|
143
|
+
content: {
|
|
144
|
+
_open: {
|
|
145
|
+
animationName: {
|
|
146
|
+
base: 'slide-from-left-full, fade-in',
|
|
147
|
+
_rtl: 'slide-from-right-full, fade-in',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
_closed: {
|
|
151
|
+
animationName: {
|
|
152
|
+
base: 'slide-to-left-full, fade-out',
|
|
153
|
+
_rtl: 'slide-to-right-full, fade-out',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
end: {
|
|
159
|
+
positioner: {
|
|
160
|
+
justifyContent: 'flex-end',
|
|
161
|
+
alignItems: 'stretch',
|
|
162
|
+
},
|
|
163
|
+
content: {
|
|
164
|
+
_open: {
|
|
165
|
+
animationName: {
|
|
166
|
+
base: 'slide-from-right-full, fade-in',
|
|
167
|
+
_rtl: 'slide-from-left-full, fade-in',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
_closed: {
|
|
171
|
+
animationName: {
|
|
172
|
+
base: 'slide-to-right-full, fade-out',
|
|
173
|
+
_rtl: 'slide-to-left-full, fade-out',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
top: {
|
|
179
|
+
positioner: {
|
|
180
|
+
justifyContent: 'stretch',
|
|
181
|
+
alignItems: 'flex-start',
|
|
182
|
+
},
|
|
183
|
+
content: {
|
|
184
|
+
maxW: '100%',
|
|
185
|
+
_open: { animationName: 'slide-from-top-full, fade-in' },
|
|
186
|
+
_closed: { animationName: 'slide-to-top-full, fade-out' },
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
bottom: {
|
|
191
|
+
positioner: {
|
|
192
|
+
justifyContent: 'stretch',
|
|
193
|
+
alignItems: 'flex-end',
|
|
194
|
+
},
|
|
195
|
+
content: {
|
|
196
|
+
maxW: '100%',
|
|
197
|
+
_open: { animationName: 'slide-from-bottom-full, fade-in' },
|
|
198
|
+
_closed: { animationName: 'slide-to-bottom-full, fade-out' },
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
})
|