@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,40 @@
|
|
|
1
|
+
import { fieldAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const field = defineSlotRecipe({
|
|
5
|
+
className: 'field',
|
|
6
|
+
slots: fieldAnatomy.keys(),
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
gap: '1.5',
|
|
12
|
+
},
|
|
13
|
+
label: {
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
color: 'fg.default',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
gap: '0.5',
|
|
18
|
+
textAlign: 'start',
|
|
19
|
+
userSelect: 'none',
|
|
20
|
+
textStyle: 'label',
|
|
21
|
+
_disabled: {
|
|
22
|
+
layerStyle: 'disabled',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
requiredIndicator: {
|
|
26
|
+
color: 'colorPalette.solid',
|
|
27
|
+
},
|
|
28
|
+
helperText: {
|
|
29
|
+
color: 'fg.muted',
|
|
30
|
+
textStyle: 'sm',
|
|
31
|
+
_disabled: {
|
|
32
|
+
layerStyle: 'disabled',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
errorText: {
|
|
36
|
+
color: 'error',
|
|
37
|
+
textStyle: 'sm',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
})
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
export const group = defineRecipe({
|
|
4
|
+
className: 'group',
|
|
5
|
+
base: {
|
|
6
|
+
display: 'inline-flex',
|
|
7
|
+
position: 'relative',
|
|
8
|
+
gap: '2',
|
|
9
|
+
'& > *': {
|
|
10
|
+
_focusVisible: {
|
|
11
|
+
zIndex: 1,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: 'horizontal',
|
|
17
|
+
},
|
|
18
|
+
variants: {
|
|
19
|
+
orientation: {
|
|
20
|
+
horizontal: {
|
|
21
|
+
flexDirection: 'row',
|
|
22
|
+
},
|
|
23
|
+
vertical: {
|
|
24
|
+
flexDirection: 'column',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
attached: {
|
|
28
|
+
true: {
|
|
29
|
+
gap: '0',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
grow: {
|
|
33
|
+
true: {
|
|
34
|
+
display: 'flex',
|
|
35
|
+
'& > *': {
|
|
36
|
+
flex: 1,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
compoundVariants: [
|
|
42
|
+
{
|
|
43
|
+
orientation: 'horizontal',
|
|
44
|
+
attached: true,
|
|
45
|
+
css: {
|
|
46
|
+
'& > *:first-child': {
|
|
47
|
+
borderEndRadius: '0',
|
|
48
|
+
marginEnd: '-1px',
|
|
49
|
+
},
|
|
50
|
+
'& > *:last-child': {
|
|
51
|
+
borderStartRadius: '0',
|
|
52
|
+
},
|
|
53
|
+
'& > *:not(:first-child):not(:last-child)': {
|
|
54
|
+
borderRadius: '0',
|
|
55
|
+
marginEnd: '-1px',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
orientation: 'vertical',
|
|
61
|
+
attached: true,
|
|
62
|
+
css: {
|
|
63
|
+
'& > *:first-child': {
|
|
64
|
+
borderBottomRadius: '0',
|
|
65
|
+
marginBottom: '-1px',
|
|
66
|
+
},
|
|
67
|
+
'& > *:last-child': {
|
|
68
|
+
borderTopRadius: '0',
|
|
69
|
+
},
|
|
70
|
+
'& > *:not(:first-child):not(:last-child)': {
|
|
71
|
+
borderRadius: '0',
|
|
72
|
+
marginBottom: '-1px',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const heading = defineRecipe({
|
|
4
|
+
className: 'heading',
|
|
5
|
+
base: {
|
|
6
|
+
color: 'fg.default',
|
|
7
|
+
},
|
|
8
|
+
defaultVariants: {
|
|
9
|
+
size: 'xl',
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
xs: { textStyle: 'labelLarge' },
|
|
14
|
+
sm: { textStyle: 'titleSmall' },
|
|
15
|
+
md: { textStyle: 'titleMedium' },
|
|
16
|
+
lg: { textStyle: 'titleLarge' },
|
|
17
|
+
xl: { textStyle: 'headlineSmall' },
|
|
18
|
+
'2xl': { textStyle: 'headlineMedium' },
|
|
19
|
+
'3xl': { textStyle: 'headlineLarge' },
|
|
20
|
+
'4xl': { textStyle: 'displaySmall' },
|
|
21
|
+
'5xl': { textStyle: 'displayMedium' },
|
|
22
|
+
'6xl': { textStyle: 'displayLarge' },
|
|
23
|
+
'7xl': { textStyle: 'displayLarge' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Core components
|
|
2
|
+
export * from './button';
|
|
3
|
+
export * from './input';
|
|
4
|
+
export * from './input-addon';
|
|
5
|
+
export * from './input-group';
|
|
6
|
+
export * from './field';
|
|
7
|
+
|
|
8
|
+
// Layout & containers
|
|
9
|
+
export * from './card';
|
|
10
|
+
export * from './accordion';
|
|
11
|
+
export * from './drawer';
|
|
12
|
+
export * from './tabs';
|
|
13
|
+
|
|
14
|
+
// Form elements
|
|
15
|
+
export * from './switch';
|
|
16
|
+
export * from './checkbox';
|
|
17
|
+
export * from './radio-group';
|
|
18
|
+
export * from './select';
|
|
19
|
+
export * from './textarea';
|
|
20
|
+
export * from './slider';
|
|
21
|
+
|
|
22
|
+
// Feedback & status
|
|
23
|
+
export * from './avatar';
|
|
24
|
+
export * from './badge';
|
|
25
|
+
export * from './progress';
|
|
26
|
+
export * from './skeleton';
|
|
27
|
+
export * from './spinner';
|
|
28
|
+
export * from './toast';
|
|
29
|
+
|
|
30
|
+
// Overlays
|
|
31
|
+
export * from './dialog';
|
|
32
|
+
export * from './popover';
|
|
33
|
+
export * from './tooltip';
|
|
34
|
+
|
|
35
|
+
// Typography
|
|
36
|
+
export * from './heading';
|
|
37
|
+
|
|
38
|
+
// Utilities
|
|
39
|
+
export * from './absolute-center';
|
|
40
|
+
export * from './group';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const inputAddon = defineRecipe({
|
|
4
|
+
className: 'input-addon',
|
|
5
|
+
base: {
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
alignSelf: 'stretch',
|
|
8
|
+
borderRadius: 'l2',
|
|
9
|
+
color: 'fg.muted',
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flex: '0 0 auto',
|
|
12
|
+
whiteSpace: 'nowrap',
|
|
13
|
+
width: 'auto',
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: 'md',
|
|
17
|
+
variant: 'outline',
|
|
18
|
+
},
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
outline: {
|
|
22
|
+
borderWidth: 'thin',
|
|
23
|
+
borderColor: 'neutral.outline.border',
|
|
24
|
+
},
|
|
25
|
+
surface: {
|
|
26
|
+
bg: 'neutral.surface.bg',
|
|
27
|
+
borderWidth: 'thin',
|
|
28
|
+
borderColor: 'neutral.surface.border',
|
|
29
|
+
},
|
|
30
|
+
subtle: {
|
|
31
|
+
bg: 'neutral.subtle.bg',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
xs: { textStyle: 'sm', px: '2', _icon: { boxSize: '4' } },
|
|
36
|
+
sm: { textStyle: 'sm', px: '2.5', _icon: { boxSize: '4.5' } },
|
|
37
|
+
md: { textStyle: 'md', px: '3', _icon: { boxSize: '5' } },
|
|
38
|
+
lg: { textStyle: 'md', px: '3.5', _icon: { boxSize: '5' } },
|
|
39
|
+
xl: { textStyle: 'lg', px: '4', _icon: { boxSize: '5.5' } },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const inputGroup = defineSlotRecipe({
|
|
4
|
+
className: 'input-group',
|
|
5
|
+
slots: ['root', 'element'],
|
|
6
|
+
base: {
|
|
7
|
+
root: {
|
|
8
|
+
position: 'relative',
|
|
9
|
+
width: 'full',
|
|
10
|
+
},
|
|
11
|
+
element: {
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
color: 'fg.muted',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
height: 'full',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
zIndex: '2',
|
|
19
|
+
_icon: {
|
|
20
|
+
color: 'fg.subtle',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
size: 'md',
|
|
26
|
+
},
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
xs: {
|
|
30
|
+
element: { minW: '8', _icon: { boxSize: '4' } },
|
|
31
|
+
root: {
|
|
32
|
+
'& > input:not(:first-child)': { ps: '7!' },
|
|
33
|
+
'& > input:not(:last-child)': { pe: '7!' },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
sm: {
|
|
37
|
+
root: {
|
|
38
|
+
'& > input:not(:first-child)': { ps: '8!' },
|
|
39
|
+
'& > input:not(:last-child)': { pe: '8!' },
|
|
40
|
+
},
|
|
41
|
+
element: { minW: '9', _icon: { boxSize: '4.5' } },
|
|
42
|
+
},
|
|
43
|
+
md: {
|
|
44
|
+
root: {
|
|
45
|
+
'& > input:not(:first-child)': { ps: '9!' },
|
|
46
|
+
'& > input:not(:last-child)': { pe: '9!' },
|
|
47
|
+
},
|
|
48
|
+
element: { minW: '10', _icon: { boxSize: '5' } },
|
|
49
|
+
},
|
|
50
|
+
lg: {
|
|
51
|
+
root: {
|
|
52
|
+
'& > input:not(:first-child)': { ps: '10!' },
|
|
53
|
+
'& > input:not(:last-child)': { pe: '10!' },
|
|
54
|
+
},
|
|
55
|
+
element: { minW: '11', _icon: { boxSize: '5' } },
|
|
56
|
+
},
|
|
57
|
+
xl: {
|
|
58
|
+
root: {
|
|
59
|
+
'& > input:not(:first-child)': { ps: '11!' },
|
|
60
|
+
'& > input:not(:last-child)': { pe: '11!' },
|
|
61
|
+
},
|
|
62
|
+
element: { minW: '11', _icon: { boxSize: '5.5' } },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { RecipeConfig } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const input = {
|
|
4
|
+
className: 'input',
|
|
5
|
+
jsx: ['Input', 'Field.Input'],
|
|
6
|
+
base: {
|
|
7
|
+
appearance: 'none',
|
|
8
|
+
borderRadius: 'l2',
|
|
9
|
+
height: 'var(--input-height)',
|
|
10
|
+
minHeight: 'var(--input-height)',
|
|
11
|
+
minW: 'var(--input-height)',
|
|
12
|
+
outline: '0',
|
|
13
|
+
position: 'relative',
|
|
14
|
+
textAlign: 'start',
|
|
15
|
+
transition: 'colors',
|
|
16
|
+
width: '100%',
|
|
17
|
+
_disabled: {
|
|
18
|
+
layerStyle: 'disabled',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
size: 'md',
|
|
23
|
+
variant: 'outline',
|
|
24
|
+
},
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
outline: {
|
|
28
|
+
borderWidth: '1px',
|
|
29
|
+
borderColor: 'neutral.outline.border',
|
|
30
|
+
focusVisibleRing: 'inside',
|
|
31
|
+
_invalid: {
|
|
32
|
+
focusRingColor: 'error',
|
|
33
|
+
borderColor: 'error',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
surface: {
|
|
37
|
+
bg: 'neutral.surface.bg',
|
|
38
|
+
borderWidth: '1px',
|
|
39
|
+
borderColor: 'neutral.surface.border',
|
|
40
|
+
focusVisibleRing: 'inside',
|
|
41
|
+
_invalid: {
|
|
42
|
+
focusRingColor: 'error',
|
|
43
|
+
borderColor: 'error',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
subtle: {
|
|
47
|
+
borderWidth: '1px',
|
|
48
|
+
borderColor: 'transparent',
|
|
49
|
+
bg: 'neutral.subtle.bg',
|
|
50
|
+
color: 'neutral.subtle.fg',
|
|
51
|
+
focusVisibleRing: 'inside',
|
|
52
|
+
_invalid: {
|
|
53
|
+
focusRingColor: 'error',
|
|
54
|
+
borderColor: 'error',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
flushed: {
|
|
58
|
+
borderBottomWidth: '1px',
|
|
59
|
+
borderBottomColor: 'neutral.outline.border',
|
|
60
|
+
borderRadius: '0',
|
|
61
|
+
color: 'fg.default',
|
|
62
|
+
px: '0',
|
|
63
|
+
_invalid: {
|
|
64
|
+
borderColor: 'error',
|
|
65
|
+
},
|
|
66
|
+
_focus: {
|
|
67
|
+
borderColor: 'colorPalette.solid.bg',
|
|
68
|
+
boxShadowColor: 'colorPalette.solid.bg',
|
|
69
|
+
boxShadow: '0 1px 0 0 var(--shadow-color)',
|
|
70
|
+
_invalid: {
|
|
71
|
+
borderColor: 'error',
|
|
72
|
+
boxShadowColor: 'error',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
size: {
|
|
78
|
+
'2xs': { textStyle: 'xs', px: '1.5', '--input-height': 'sizes.7' },
|
|
79
|
+
xs: { textStyle: 'sm', px: '2', '--input-height': 'sizes.8' },
|
|
80
|
+
sm: { textStyle: 'sm', px: '2.5', '--input-height': 'sizes.9' },
|
|
81
|
+
md: { textStyle: 'md', px: '3', '--input-height': 'sizes.10' },
|
|
82
|
+
lg: { textStyle: 'md', px: '3.5', '--input-height': 'sizes.11' },
|
|
83
|
+
xl: { textStyle: 'lg', px: '4', '--input-height': 'sizes.12' },
|
|
84
|
+
'2xl': { textStyle: '3xl', px: '4.5', '--input-height': 'sizes.16' },
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
} satisfies RecipeConfig;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { popoverAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const popover = defineSlotRecipe({
|
|
5
|
+
className: 'popover',
|
|
6
|
+
slots: popoverAnatomy.extendWith('header', 'body', 'footer').keys(),
|
|
7
|
+
base: {
|
|
8
|
+
positioner: {
|
|
9
|
+
position: 'absolute',
|
|
10
|
+
top: '0',
|
|
11
|
+
left: '0',
|
|
12
|
+
zIndex: 'popover',
|
|
13
|
+
},
|
|
14
|
+
content: {
|
|
15
|
+
'--popover-bg': 'colors.gray.surface.bg',
|
|
16
|
+
'--popover-padding': 'spacing.md',
|
|
17
|
+
|
|
18
|
+
background: 'var(--popover-bg)',
|
|
19
|
+
borderRadius: 'l3',
|
|
20
|
+
boxShadow: 'lg',
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
maxHeight: 'var(--available-height)',
|
|
24
|
+
outline: '0',
|
|
25
|
+
position: 'relative',
|
|
26
|
+
textStyle: 'sm',
|
|
27
|
+
transformOrigin: 'var(--transform-origin)',
|
|
28
|
+
width: 'sm',
|
|
29
|
+
zIndex: 'calc(var(--z-index-popover) + var(--layer-index, 0))',
|
|
30
|
+
_open: {
|
|
31
|
+
animationStyle: 'scale-fade-in',
|
|
32
|
+
animationDuration: 'fast',
|
|
33
|
+
},
|
|
34
|
+
_closed: {
|
|
35
|
+
animationStyle: 'scale-fade-out',
|
|
36
|
+
animationDuration: 'faster',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
title: {
|
|
40
|
+
color: 'fg.default',
|
|
41
|
+
fontWeight: 'medium',
|
|
42
|
+
textStyle: 'md',
|
|
43
|
+
},
|
|
44
|
+
description: {
|
|
45
|
+
color: 'fg.muted',
|
|
46
|
+
textStyle: 'sm',
|
|
47
|
+
},
|
|
48
|
+
closeTrigger: {
|
|
49
|
+
position: 'absolute',
|
|
50
|
+
top: '1',
|
|
51
|
+
right: '1',
|
|
52
|
+
},
|
|
53
|
+
header: {
|
|
54
|
+
display: 'flex',
|
|
55
|
+
flexDirection: 'column',
|
|
56
|
+
p: 'var(--popover-padding)',
|
|
57
|
+
},
|
|
58
|
+
body: { p: 'var(--popover-padding)', display: 'flex', flex: '1', flexDirection: 'column' },
|
|
59
|
+
footer: {
|
|
60
|
+
display: 'flex',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
justifyContent: 'flex-end',
|
|
63
|
+
gap: '3',
|
|
64
|
+
paddingInline: 'var(--popover-padding)',
|
|
65
|
+
paddingBottom: 'var(--popover-padding)',
|
|
66
|
+
},
|
|
67
|
+
arrow: {
|
|
68
|
+
'--arrow-size': 'sizes.3',
|
|
69
|
+
'--arrow-background': 'var(--popover-bg)',
|
|
70
|
+
},
|
|
71
|
+
arrowTip: {
|
|
72
|
+
borderTopWidth: 'thin',
|
|
73
|
+
borderInlineStartWidth: 'thin',
|
|
74
|
+
borderColor: 'var(--popover-bg)',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
})
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { progressAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const progress = defineSlotRecipe({
|
|
5
|
+
slots: progressAnatomy.keys(),
|
|
6
|
+
className: 'progress',
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
textStyle: 'sm',
|
|
10
|
+
position: 'relative',
|
|
11
|
+
},
|
|
12
|
+
track: {
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
position: 'relative',
|
|
15
|
+
},
|
|
16
|
+
range: {
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
transitionProperty: 'width, height',
|
|
21
|
+
transitionDuration: 'slow',
|
|
22
|
+
height: '100%',
|
|
23
|
+
bgColor: 'var(--track-color)',
|
|
24
|
+
_indeterminate: {
|
|
25
|
+
'--animate-from-x': '-40%',
|
|
26
|
+
'--animate-to-x': '100%',
|
|
27
|
+
position: 'absolute',
|
|
28
|
+
willChange: 'left',
|
|
29
|
+
minWidth: '50%',
|
|
30
|
+
animation: 'position 1s ease infinite normal none running',
|
|
31
|
+
backgroundImage: `linear-gradient(to right, transparent 0%, var(--track-color) 50%, transparent 100%)`,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
label: {
|
|
35
|
+
display: 'inline-flex',
|
|
36
|
+
fontWeight: 'medium',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
gap: '1',
|
|
39
|
+
},
|
|
40
|
+
valueText: {
|
|
41
|
+
textStyle: 'xs',
|
|
42
|
+
lineHeight: '1',
|
|
43
|
+
fontWeight: 'medium',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
variants: {
|
|
48
|
+
variant: {
|
|
49
|
+
solid: {
|
|
50
|
+
track: {
|
|
51
|
+
bgColor: 'gray.subtle.bg',
|
|
52
|
+
},
|
|
53
|
+
range: {
|
|
54
|
+
bgColor: 'colorPalette.solid.bg',
|
|
55
|
+
color: 'colorPalette.solid.fg',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
subtle: {
|
|
59
|
+
track: {
|
|
60
|
+
bgColor: 'colorPalette.subtle.bg.active',
|
|
61
|
+
},
|
|
62
|
+
range: {
|
|
63
|
+
bgColor: 'colorPalette.solid.bg',
|
|
64
|
+
color: 'colorPalette.solid.fg',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
shape: {
|
|
70
|
+
square: {},
|
|
71
|
+
rounded: {
|
|
72
|
+
track: {
|
|
73
|
+
borderRadius: 'l1',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
full: {
|
|
77
|
+
track: {
|
|
78
|
+
borderRadius: 'full',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
striped: {
|
|
84
|
+
true: {
|
|
85
|
+
range: {
|
|
86
|
+
backgroundImage: `linear-gradient(45deg, var(--stripe-color) 25%, transparent 25%, transparent 50%, var(--stripe-color) 50%, var(--stripe-color) 75%, transparent 75%, transparent)`,
|
|
87
|
+
backgroundSize: `var(--stripe-size) var(--stripe-size)`,
|
|
88
|
+
'--stripe-size': '1rem',
|
|
89
|
+
'--stripe-color': {
|
|
90
|
+
_light: 'rgba(255, 255, 255, 0.3)',
|
|
91
|
+
_dark: 'rgba(0, 0, 0, 0.3)',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
animated: {
|
|
98
|
+
true: {
|
|
99
|
+
range: {
|
|
100
|
+
'--animate-from': 'var(--stripe-size)',
|
|
101
|
+
animation: 'bg-position 1s linear infinite',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
size: {
|
|
107
|
+
xs: { track: { h: '1.5' } },
|
|
108
|
+
sm: { track: { h: '2' } },
|
|
109
|
+
md: { track: { h: '2.5' } },
|
|
110
|
+
lg: { track: { h: '3' } },
|
|
111
|
+
xl: { track: { h: '3.5' } },
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
defaultVariants: {
|
|
116
|
+
variant: 'solid',
|
|
117
|
+
size: 'md',
|
|
118
|
+
shape: 'rounded',
|
|
119
|
+
},
|
|
120
|
+
})
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { radioGroupAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const radioGroup = defineSlotRecipe({
|
|
5
|
+
className: 'radio-group',
|
|
6
|
+
slots: radioGroupAnatomy.keys(),
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
gap: '3',
|
|
12
|
+
},
|
|
13
|
+
itemControl: {
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
borderRadius: 'full',
|
|
16
|
+
display: 'inline-flex',
|
|
17
|
+
flexShrink: 0,
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
verticalAlign: 'top',
|
|
20
|
+
boxShadow: 'inset 0 0 0 1px var(--shadow-color)',
|
|
21
|
+
boxShadowColor: 'gray.surface.border',
|
|
22
|
+
_after: {
|
|
23
|
+
content: '""',
|
|
24
|
+
display: 'block',
|
|
25
|
+
borderRadius: 'full',
|
|
26
|
+
boxSize: '40%',
|
|
27
|
+
},
|
|
28
|
+
_focusVisible: {
|
|
29
|
+
focusVisibleRing: 'outside',
|
|
30
|
+
},
|
|
31
|
+
_checked: {
|
|
32
|
+
bg: 'colorPalette.solid.bg',
|
|
33
|
+
color: 'colorPalette.solid.fg',
|
|
34
|
+
boxShadowColor: 'colorPalette.solid.bg',
|
|
35
|
+
_after: {
|
|
36
|
+
background: 'colorPalette.solid.fg',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
item: {
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
cursor: 'pointer',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
_disabled: {
|
|
45
|
+
layerStyle: 'disabled',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
itemText: {
|
|
49
|
+
fontWeight: 'medium',
|
|
50
|
+
userSelect: 'none',
|
|
51
|
+
},
|
|
52
|
+
label: {
|
|
53
|
+
fontWeight: 'semibold',
|
|
54
|
+
textStyle: 'sm',
|
|
55
|
+
mb: '1',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: 'solid',
|
|
60
|
+
size: 'md',
|
|
61
|
+
orientation: 'vertical',
|
|
62
|
+
},
|
|
63
|
+
variants: {
|
|
64
|
+
variant: {
|
|
65
|
+
solid: {
|
|
66
|
+
itemControl: {},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
size: {
|
|
70
|
+
sm: {
|
|
71
|
+
item: { gap: '2' },
|
|
72
|
+
itemControl: { boxSize: '4.5' },
|
|
73
|
+
itemText: { textStyle: 'sm' },
|
|
74
|
+
},
|
|
75
|
+
md: {
|
|
76
|
+
item: { gap: '3' },
|
|
77
|
+
itemControl: { boxSize: '5' },
|
|
78
|
+
itemText: { textStyle: 'md' },
|
|
79
|
+
},
|
|
80
|
+
lg: {
|
|
81
|
+
item: { gap: '3' },
|
|
82
|
+
itemControl: { boxSize: '5.5' },
|
|
83
|
+
itemText: { textStyle: 'lg' },
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
orientation: {
|
|
87
|
+
horizontal: {
|
|
88
|
+
root: {
|
|
89
|
+
flexDirection: 'row',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
vertical: {
|
|
93
|
+
root: {
|
|
94
|
+
flexDirection: 'column',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
})
|