@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,130 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const dialogRecipe = defineSlotRecipe({
|
|
4
|
+
className: 'dialog',
|
|
5
|
+
description: 'Material Design 3 dialog component',
|
|
6
|
+
slots: ['backdrop', 'positioner', 'content', 'title', 'description', 'closeTrigger'],
|
|
7
|
+
base: {
|
|
8
|
+
backdrop: {
|
|
9
|
+
position: 'fixed',
|
|
10
|
+
inset: '0',
|
|
11
|
+
bg: 'scrim',
|
|
12
|
+
opacity: 0.4,
|
|
13
|
+
zIndex: 'modal',
|
|
14
|
+
animation: 'fadeIn',
|
|
15
|
+
_open: {
|
|
16
|
+
animation: 'fadeIn',
|
|
17
|
+
},
|
|
18
|
+
_closed: {
|
|
19
|
+
animation: 'fadeOut',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
positioner: {
|
|
23
|
+
position: 'fixed',
|
|
24
|
+
inset: '0',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
zIndex: 'modal',
|
|
29
|
+
p: 'lg',
|
|
30
|
+
},
|
|
31
|
+
content: {
|
|
32
|
+
position: 'relative',
|
|
33
|
+
bg: 'surfaceContainerHigh',
|
|
34
|
+
color: 'onSurface',
|
|
35
|
+
borderRadius: 'extraLarge',
|
|
36
|
+
boxShadow: 'level3',
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexDirection: 'column',
|
|
39
|
+
maxWidth: '90vw',
|
|
40
|
+
maxHeight: '90vh',
|
|
41
|
+
overflow: 'hidden',
|
|
42
|
+
animation: 'scaleIn',
|
|
43
|
+
_open: {
|
|
44
|
+
animation: 'scaleIn',
|
|
45
|
+
},
|
|
46
|
+
_closed: {
|
|
47
|
+
animation: 'scaleOut',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
title: {
|
|
51
|
+
fontFamily: 'headline',
|
|
52
|
+
fontSize: 'headlineSmall',
|
|
53
|
+
fontWeight: 'regular',
|
|
54
|
+
color: 'onSurface',
|
|
55
|
+
px: 'xl',
|
|
56
|
+
pt: 'xl',
|
|
57
|
+
pb: 'md',
|
|
58
|
+
},
|
|
59
|
+
description: {
|
|
60
|
+
fontFamily: 'body',
|
|
61
|
+
fontSize: 'bodyMedium',
|
|
62
|
+
color: 'onSurfaceVariant',
|
|
63
|
+
px: 'xl',
|
|
64
|
+
pb: 'xl',
|
|
65
|
+
flex: '1',
|
|
66
|
+
overflow: 'auto',
|
|
67
|
+
},
|
|
68
|
+
closeTrigger: {
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
top: 'md',
|
|
71
|
+
right: 'md',
|
|
72
|
+
display: 'flex',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
justifyContent: 'center',
|
|
75
|
+
width: '40px',
|
|
76
|
+
height: '40px',
|
|
77
|
+
borderRadius: 'full',
|
|
78
|
+
cursor: 'pointer',
|
|
79
|
+
color: 'onSurfaceVariant',
|
|
80
|
+
bg: 'transparent',
|
|
81
|
+
border: 'none',
|
|
82
|
+
transition: 'all',
|
|
83
|
+
transitionDuration: 'fast',
|
|
84
|
+
_hover: {
|
|
85
|
+
bg: 'surfaceContainerHighest',
|
|
86
|
+
},
|
|
87
|
+
_focus: {
|
|
88
|
+
outline: 'none',
|
|
89
|
+
bg: 'surfaceContainerHighest',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
variants: {
|
|
94
|
+
size: {
|
|
95
|
+
sm: {
|
|
96
|
+
content: {
|
|
97
|
+
width: '280px',
|
|
98
|
+
minHeight: '140px',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
md: {
|
|
102
|
+
content: {
|
|
103
|
+
width: '560px',
|
|
104
|
+
minHeight: '200px',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
lg: {
|
|
108
|
+
content: {
|
|
109
|
+
width: '800px',
|
|
110
|
+
minHeight: '300px',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
fullscreen: {
|
|
114
|
+
content: {
|
|
115
|
+
width: '100vw',
|
|
116
|
+
height: '100vh',
|
|
117
|
+
maxWidth: '100vw',
|
|
118
|
+
maxHeight: '100vh',
|
|
119
|
+
borderRadius: 'none',
|
|
120
|
+
},
|
|
121
|
+
positioner: {
|
|
122
|
+
p: '0',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
defaultVariants: {
|
|
128
|
+
size: 'md',
|
|
129
|
+
},
|
|
130
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const iconButtonRecipe = defineRecipe({
|
|
4
|
+
className: 'icon-button',
|
|
5
|
+
description: 'Material Design 3 icon button component',
|
|
6
|
+
base: {
|
|
7
|
+
display: 'inline-flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
borderRadius: 'full',
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
transition: 'all',
|
|
13
|
+
transitionDuration: 'fast',
|
|
14
|
+
transitionTimingFunction: 'standard',
|
|
15
|
+
outline: 'none',
|
|
16
|
+
border: 'none',
|
|
17
|
+
p: '0',
|
|
18
|
+
_disabled: {
|
|
19
|
+
opacity: 0.38,
|
|
20
|
+
cursor: 'not-allowed',
|
|
21
|
+
pointerEvents: 'none'
|
|
22
|
+
},
|
|
23
|
+
_focusVisible: {
|
|
24
|
+
outline: '2px solid',
|
|
25
|
+
outlineColor: 'primary',
|
|
26
|
+
outlineOffset: '2px'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
variants: {
|
|
30
|
+
variant: {
|
|
31
|
+
standard: {
|
|
32
|
+
bg: 'transparent',
|
|
33
|
+
color: 'onSurfaceVariant',
|
|
34
|
+
_hover: {
|
|
35
|
+
bg: 'onSurfaceVariant',
|
|
36
|
+
bgOpacity: 0.08
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
filled: {
|
|
40
|
+
bg: 'primary',
|
|
41
|
+
color: 'onPrimary',
|
|
42
|
+
_hover: {
|
|
43
|
+
opacity: 0.92
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
tonal: {
|
|
47
|
+
bg: 'secondaryContainer',
|
|
48
|
+
color: 'onSecondaryContainer',
|
|
49
|
+
_hover: {
|
|
50
|
+
opacity: 0.92
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
outlined: {
|
|
54
|
+
bg: 'transparent',
|
|
55
|
+
color: 'onSurfaceVariant',
|
|
56
|
+
borderWidth: '1px',
|
|
57
|
+
borderStyle: 'solid',
|
|
58
|
+
borderColor: 'outline',
|
|
59
|
+
_hover: {
|
|
60
|
+
bg: 'onSurfaceVariant',
|
|
61
|
+
bgOpacity: 0.08
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
sm: {
|
|
67
|
+
width: '32px',
|
|
68
|
+
height: '32px',
|
|
69
|
+
'& svg': {
|
|
70
|
+
width: '18px',
|
|
71
|
+
height: '18px'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
md: {
|
|
75
|
+
width: '40px',
|
|
76
|
+
height: '40px',
|
|
77
|
+
'& svg': {
|
|
78
|
+
width: '24px',
|
|
79
|
+
height: '24px'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
lg: {
|
|
83
|
+
width: '48px',
|
|
84
|
+
height: '48px',
|
|
85
|
+
'& svg': {
|
|
86
|
+
width: '24px',
|
|
87
|
+
height: '24px'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
defaultVariants: {
|
|
93
|
+
variant: 'standard',
|
|
94
|
+
size: 'md'
|
|
95
|
+
}
|
|
96
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { buttonRecipe } from './button.recipe';
|
|
2
|
+
export { cardRecipe } from './card.recipe';
|
|
3
|
+
export { iconButtonRecipe } from './icon-button.recipe';
|
|
4
|
+
export { inputRecipe } from './input.recipe';
|
|
5
|
+
export { dialogRecipe } from './dialog.recipe';
|
|
6
|
+
export { switchRecipe } from './switch.recipe';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const inputRecipe = defineRecipe({
|
|
4
|
+
className: 'input',
|
|
5
|
+
description: 'Material Design 3 text field component',
|
|
6
|
+
base: {
|
|
7
|
+
width: '100%',
|
|
8
|
+
fontFamily: 'body',
|
|
9
|
+
fontSize: 'bodyLarge',
|
|
10
|
+
lineHeight: 'bodyLarge',
|
|
11
|
+
color: 'onSurface',
|
|
12
|
+
bg: 'transparent',
|
|
13
|
+
borderRadius: 'extraSmall',
|
|
14
|
+
px: 'md',
|
|
15
|
+
transition: 'all',
|
|
16
|
+
transitionDuration: 'fast',
|
|
17
|
+
outline: 'none',
|
|
18
|
+
_placeholder: {
|
|
19
|
+
color: 'onSurfaceVariant',
|
|
20
|
+
opacity: 0.6,
|
|
21
|
+
},
|
|
22
|
+
_focus: {
|
|
23
|
+
outline: 'none',
|
|
24
|
+
},
|
|
25
|
+
_disabled: {
|
|
26
|
+
opacity: 0.38,
|
|
27
|
+
cursor: 'not-allowed',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
filled: {
|
|
33
|
+
bg: 'surfaceContainerHighest',
|
|
34
|
+
borderBottomWidth: '1px',
|
|
35
|
+
borderBottomStyle: 'solid',
|
|
36
|
+
borderBottomColor: 'onSurfaceVariant',
|
|
37
|
+
borderTopLeftRadius: 'extraSmall',
|
|
38
|
+
borderTopRightRadius: 'extraSmall',
|
|
39
|
+
borderBottomLeftRadius: '0',
|
|
40
|
+
borderBottomRightRadius: '0',
|
|
41
|
+
_hover: {
|
|
42
|
+
bg: 'surfaceContainerHigh',
|
|
43
|
+
},
|
|
44
|
+
_focus: {
|
|
45
|
+
borderBottomWidth: '2px',
|
|
46
|
+
borderBottomColor: 'primary',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
outlined: {
|
|
50
|
+
bg: 'transparent',
|
|
51
|
+
borderWidth: '1px',
|
|
52
|
+
borderStyle: 'solid',
|
|
53
|
+
borderColor: 'outline',
|
|
54
|
+
_hover: {
|
|
55
|
+
borderColor: 'onSurface',
|
|
56
|
+
},
|
|
57
|
+
_focus: {
|
|
58
|
+
borderWidth: '2px',
|
|
59
|
+
borderColor: 'primary',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
size: {
|
|
64
|
+
sm: {
|
|
65
|
+
height: '40px',
|
|
66
|
+
fontSize: 'bodySmall',
|
|
67
|
+
lineHeight: 'bodySmall',
|
|
68
|
+
},
|
|
69
|
+
md: {
|
|
70
|
+
height: '56px',
|
|
71
|
+
fontSize: 'bodyLarge',
|
|
72
|
+
lineHeight: 'bodyLarge',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
state: {
|
|
76
|
+
error: {
|
|
77
|
+
borderColor: 'error',
|
|
78
|
+
_focus: {
|
|
79
|
+
borderColor: 'error',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
disabled: {
|
|
83
|
+
opacity: 0.38,
|
|
84
|
+
cursor: 'not-allowed',
|
|
85
|
+
pointerEvents: 'none',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
variant: 'outlined',
|
|
91
|
+
size: 'md',
|
|
92
|
+
},
|
|
93
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const switchRecipe = defineSlotRecipe({
|
|
4
|
+
className: 'switchControl',
|
|
5
|
+
description: 'Material Design 3 switch component',
|
|
6
|
+
slots: ['root', 'control', 'thumb', 'label'],
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
display: 'inline-flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
gap: 'sm',
|
|
12
|
+
cursor: 'pointer',
|
|
13
|
+
userSelect: 'none',
|
|
14
|
+
_disabled: {
|
|
15
|
+
cursor: 'not-allowed',
|
|
16
|
+
opacity: 0.38,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
control: {
|
|
20
|
+
position: 'relative',
|
|
21
|
+
display: 'inline-flex',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
width: '52px',
|
|
24
|
+
height: '32px',
|
|
25
|
+
borderRadius: 'full',
|
|
26
|
+
bg: 'surfaceContainerHighest',
|
|
27
|
+
border: '2px solid',
|
|
28
|
+
borderColor: 'outline',
|
|
29
|
+
transition: 'all',
|
|
30
|
+
transitionDuration: 'fast',
|
|
31
|
+
flexShrink: 0,
|
|
32
|
+
_checked: {
|
|
33
|
+
bg: 'primary',
|
|
34
|
+
borderColor: 'primary',
|
|
35
|
+
},
|
|
36
|
+
_disabled: {
|
|
37
|
+
bg: 'surfaceVariant',
|
|
38
|
+
borderColor: 'onSurface',
|
|
39
|
+
opacity: 0.12,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
thumb: {
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
left: '4px',
|
|
45
|
+
width: '16px',
|
|
46
|
+
height: '16px',
|
|
47
|
+
borderRadius: 'full',
|
|
48
|
+
bg: 'outline',
|
|
49
|
+
transition: 'all',
|
|
50
|
+
transitionDuration: 'fast',
|
|
51
|
+
_checked: {
|
|
52
|
+
left: '28px',
|
|
53
|
+
width: '24px',
|
|
54
|
+
height: '24px',
|
|
55
|
+
bg: 'onPrimary',
|
|
56
|
+
},
|
|
57
|
+
_disabled: {
|
|
58
|
+
bg: 'onSurface',
|
|
59
|
+
opacity: 0.38,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
label: {
|
|
63
|
+
fontFamily: 'body',
|
|
64
|
+
fontSize: 'bodyMedium',
|
|
65
|
+
color: 'onSurface',
|
|
66
|
+
userSelect: 'none',
|
|
67
|
+
_disabled: {
|
|
68
|
+
opacity: 0.38,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
variants: {
|
|
73
|
+
size: {
|
|
74
|
+
sm: {
|
|
75
|
+
control: {
|
|
76
|
+
width: '44px',
|
|
77
|
+
height: '24px',
|
|
78
|
+
},
|
|
79
|
+
thumb: {
|
|
80
|
+
width: '12px',
|
|
81
|
+
height: '12px',
|
|
82
|
+
left: '4px',
|
|
83
|
+
_checked: {
|
|
84
|
+
left: '24px',
|
|
85
|
+
width: '16px',
|
|
86
|
+
height: '16px',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
label: {
|
|
90
|
+
fontSize: 'bodySmall',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
md: {
|
|
94
|
+
control: {
|
|
95
|
+
width: '52px',
|
|
96
|
+
height: '32px',
|
|
97
|
+
},
|
|
98
|
+
thumb: {
|
|
99
|
+
width: '16px',
|
|
100
|
+
height: '16px',
|
|
101
|
+
left: '4px',
|
|
102
|
+
_checked: {
|
|
103
|
+
left: '28px',
|
|
104
|
+
width: '24px',
|
|
105
|
+
height: '24px',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
label: {
|
|
109
|
+
fontSize: 'bodyMedium',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
defaultVariants: {
|
|
115
|
+
size: 'md',
|
|
116
|
+
},
|
|
117
|
+
});
|