@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.
Files changed (268) hide show
  1. package/dist/components/AbsoluteCenter.d.ts +4 -0
  2. package/dist/components/AbsoluteCenter.d.ts.map +1 -0
  3. package/dist/components/Accordion.d.ts +12 -0
  4. package/dist/components/Accordion.d.ts.map +1 -0
  5. package/dist/components/Avatar.d.ts +17 -0
  6. package/dist/components/Avatar.d.ts.map +1 -0
  7. package/dist/components/Badge.d.ts +13 -0
  8. package/dist/components/Badge.d.ts.map +1 -0
  9. package/dist/components/Button.d.ts +39 -0
  10. package/dist/components/Button.d.ts.map +1 -0
  11. package/dist/components/Card.d.ts +17 -0
  12. package/dist/components/Card.d.ts.map +1 -0
  13. package/dist/components/Checkbox.d.ts +507 -0
  14. package/dist/components/Checkbox.d.ts.map +1 -0
  15. package/dist/components/CloseButton.d.ts +4 -0
  16. package/dist/components/CloseButton.d.ts.map +1 -0
  17. package/dist/components/Dialog.d.ts +16 -0
  18. package/dist/components/Dialog.d.ts.map +1 -0
  19. package/dist/components/Drawer.d.ts +17 -0
  20. package/dist/components/Drawer.d.ts.map +1 -0
  21. package/dist/components/Group.d.ts +4 -0
  22. package/dist/components/Group.d.ts.map +1 -0
  23. package/dist/components/Heading.d.ts +10 -0
  24. package/dist/components/Heading.d.ts.map +1 -0
  25. package/dist/components/Icon.d.ts +4 -0
  26. package/dist/components/Icon.d.ts.map +1 -0
  27. package/dist/components/IconButton.d.ts +5 -0
  28. package/dist/components/IconButton.d.ts.map +1 -0
  29. package/dist/components/Input.d.ts +5 -0
  30. package/dist/components/Input.d.ts.map +1 -0
  31. package/dist/components/InputAddon.d.ts +4 -0
  32. package/dist/components/InputAddon.d.ts.map +1 -0
  33. package/dist/components/InputGroup.d.ts +14 -0
  34. package/dist/components/InputGroup.d.ts.map +1 -0
  35. package/dist/components/Loader.d.ts +25 -0
  36. package/dist/components/Loader.d.ts.map +1 -0
  37. package/dist/components/Popover.d.ts +20 -0
  38. package/dist/components/Popover.d.ts.map +1 -0
  39. package/dist/components/Progress.d.ts +14 -0
  40. package/dist/components/Progress.d.ts.map +1 -0
  41. package/dist/components/RadioGroup.d.ts +14 -0
  42. package/dist/components/RadioGroup.d.ts.map +1 -0
  43. package/dist/components/Select.d.ts +26 -0
  44. package/dist/components/Select.d.ts.map +1 -0
  45. package/dist/components/Skeleton.d.ts +16 -0
  46. package/dist/components/Skeleton.d.ts.map +1 -0
  47. package/dist/components/Slider.d.ts +34 -0
  48. package/dist/components/Slider.d.ts.map +1 -0
  49. package/dist/components/Spinner.d.ts +4 -0
  50. package/dist/components/Spinner.d.ts.map +1 -0
  51. package/dist/components/Switch.d.ts +10 -0
  52. package/dist/components/Switch.d.ts.map +1 -0
  53. package/dist/components/Tabs.d.ts +11 -0
  54. package/dist/components/Tabs.d.ts.map +1 -0
  55. package/dist/components/Textarea.d.ts +5 -0
  56. package/dist/components/Textarea.d.ts.map +1 -0
  57. package/dist/components/Toast.d.ts +4 -0
  58. package/dist/components/Toast.d.ts.map +1 -0
  59. package/dist/components/Tooltip.d.ts +19 -0
  60. package/dist/components/Tooltip.d.ts.map +1 -0
  61. package/dist/components/index.d.ts +30 -0
  62. package/dist/components/index.d.ts.map +1 -0
  63. package/dist/contracts/design-language.contract.d.ts +175 -0
  64. package/dist/contracts/design-language.contract.d.ts.map +1 -0
  65. package/dist/index.d.ts +7 -21506
  66. package/dist/index.d.ts.map +1 -0
  67. package/dist/languages/index.d.ts +4 -0
  68. package/dist/languages/index.d.ts.map +1 -0
  69. package/dist/languages/material3.language.d.ts +9 -0
  70. package/dist/languages/material3.language.d.ts.map +1 -0
  71. package/dist/languages/transform.d.ts +98 -0
  72. package/dist/languages/transform.d.ts.map +1 -0
  73. package/dist/main.d.ts +2 -0
  74. package/dist/main.d.ts.map +1 -0
  75. package/dist/preset/colors/index.d.ts +1485 -0
  76. package/dist/preset/colors/index.d.ts.map +1 -0
  77. package/dist/preset/colors/m3-error.d.ts +295 -0
  78. package/dist/preset/colors/m3-error.d.ts.map +1 -0
  79. package/dist/preset/colors/m3-neutral.d.ts +301 -0
  80. package/dist/preset/colors/m3-neutral.d.ts.map +1 -0
  81. package/dist/preset/colors/m3-primary.d.ts +312 -0
  82. package/dist/preset/colors/m3-primary.d.ts.map +1 -0
  83. package/dist/preset/index.d.ts +3 -0
  84. package/dist/preset/index.d.ts.map +1 -0
  85. package/dist/preset/layer-styles.d.ts +6 -0
  86. package/dist/preset/layer-styles.d.ts.map +1 -0
  87. package/dist/preset/recipes/absolute-center.d.ts +2 -0
  88. package/dist/preset/recipes/absolute-center.d.ts.map +1 -0
  89. package/dist/preset/recipes/accordion.d.ts +2 -0
  90. package/dist/preset/recipes/accordion.d.ts.map +1 -0
  91. package/dist/preset/recipes/avatar.d.ts +2 -0
  92. package/dist/preset/recipes/avatar.d.ts.map +1 -0
  93. package/dist/preset/recipes/badge.d.ts +2 -0
  94. package/dist/preset/recipes/badge.d.ts.map +1 -0
  95. package/dist/preset/recipes/button.d.ts +2 -0
  96. package/dist/preset/recipes/button.d.ts.map +1 -0
  97. package/dist/preset/recipes/card.d.ts +2 -0
  98. package/dist/preset/recipes/card.d.ts.map +1 -0
  99. package/dist/preset/recipes/checkbox.d.ts +2 -0
  100. package/dist/preset/recipes/checkbox.d.ts.map +1 -0
  101. package/dist/preset/recipes/dialog.d.ts +2 -0
  102. package/dist/preset/recipes/dialog.d.ts.map +1 -0
  103. package/dist/preset/recipes/drawer.d.ts +2 -0
  104. package/dist/preset/recipes/drawer.d.ts.map +1 -0
  105. package/dist/preset/recipes/field.d.ts +2 -0
  106. package/dist/preset/recipes/field.d.ts.map +1 -0
  107. package/dist/preset/recipes/group.d.ts +2 -0
  108. package/dist/preset/recipes/group.d.ts.map +1 -0
  109. package/dist/preset/recipes/heading.d.ts +2 -0
  110. package/dist/preset/recipes/heading.d.ts.map +1 -0
  111. package/dist/preset/recipes/index.d.ts +28 -0
  112. package/dist/preset/recipes/index.d.ts.map +1 -0
  113. package/dist/preset/recipes/input-addon.d.ts +2 -0
  114. package/dist/preset/recipes/input-addon.d.ts.map +1 -0
  115. package/dist/preset/recipes/input-group.d.ts +2 -0
  116. package/dist/preset/recipes/input-group.d.ts.map +1 -0
  117. package/dist/preset/recipes/input.d.ts +114 -0
  118. package/dist/preset/recipes/input.d.ts.map +1 -0
  119. package/dist/preset/recipes/popover.d.ts +2 -0
  120. package/dist/preset/recipes/popover.d.ts.map +1 -0
  121. package/dist/preset/recipes/progress.d.ts +2 -0
  122. package/dist/preset/recipes/progress.d.ts.map +1 -0
  123. package/dist/preset/recipes/radio-group.d.ts +2 -0
  124. package/dist/preset/recipes/radio-group.d.ts.map +1 -0
  125. package/dist/preset/recipes/select.d.ts +2 -0
  126. package/dist/preset/recipes/select.d.ts.map +1 -0
  127. package/dist/preset/recipes/skeleton.d.ts +2 -0
  128. package/dist/preset/recipes/skeleton.d.ts.map +1 -0
  129. package/dist/preset/recipes/slider.d.ts +2 -0
  130. package/dist/preset/recipes/slider.d.ts.map +1 -0
  131. package/dist/preset/recipes/spinner.d.ts +2 -0
  132. package/dist/preset/recipes/spinner.d.ts.map +1 -0
  133. package/dist/preset/recipes/switch.d.ts +2 -0
  134. package/dist/preset/recipes/switch.d.ts.map +1 -0
  135. package/dist/preset/recipes/tabs.d.ts +2 -0
  136. package/dist/preset/recipes/tabs.d.ts.map +1 -0
  137. package/dist/preset/recipes/textarea.d.ts +2 -0
  138. package/dist/preset/recipes/textarea.d.ts.map +1 -0
  139. package/dist/preset/recipes/toast.d.ts +2 -0
  140. package/dist/preset/recipes/toast.d.ts.map +1 -0
  141. package/dist/preset/recipes/tooltip.d.ts +2 -0
  142. package/dist/preset/recipes/tooltip.d.ts.map +1 -0
  143. package/dist/preset/semantic-tokens.d.ts +197 -0
  144. package/dist/preset/semantic-tokens.d.ts.map +1 -0
  145. package/dist/preset/shadows.d.ts +49 -0
  146. package/dist/preset/shadows.d.ts.map +1 -0
  147. package/dist/preset/text-styles.d.ts +6 -0
  148. package/dist/preset/text-styles.d.ts.map +1 -0
  149. package/dist/recipes/button.recipe.d.ts +2 -0
  150. package/dist/recipes/button.recipe.d.ts.map +1 -0
  151. package/dist/recipes/card.recipe.d.ts +2 -0
  152. package/dist/recipes/card.recipe.d.ts.map +1 -0
  153. package/dist/recipes/dialog.recipe.d.ts +2 -0
  154. package/dist/recipes/dialog.recipe.d.ts.map +1 -0
  155. package/dist/recipes/icon-button.recipe.d.ts +2 -0
  156. package/dist/recipes/icon-button.recipe.d.ts.map +1 -0
  157. package/dist/recipes/index.d.ts +7 -0
  158. package/dist/recipes/index.d.ts.map +1 -0
  159. package/dist/recipes/input.recipe.d.ts +2 -0
  160. package/dist/recipes/input.recipe.d.ts.map +1 -0
  161. package/dist/recipes/switch.recipe.d.ts +2 -0
  162. package/dist/recipes/switch.recipe.d.ts.map +1 -0
  163. package/dist/stories/foundations/components/ColorSwatch.d.ts +21 -0
  164. package/dist/stories/foundations/components/ColorSwatch.d.ts.map +1 -0
  165. package/dist/stories/foundations/components/ElevationCard.d.ts +11 -0
  166. package/dist/stories/foundations/components/ElevationCard.d.ts.map +1 -0
  167. package/dist/stories/foundations/components/SpacingBox.d.ts +11 -0
  168. package/dist/stories/foundations/components/SpacingBox.d.ts.map +1 -0
  169. package/dist/stories/foundations/components/TypeSpecimen.d.ts +12 -0
  170. package/dist/stories/foundations/components/TypeSpecimen.d.ts.map +1 -0
  171. package/dist/utils/cn.d.ts +6 -0
  172. package/dist/utils/cn.d.ts.map +1 -0
  173. package/package.json +4 -2
  174. package/src/components/AbsoluteCenter.tsx +7 -0
  175. package/src/components/Accordion.tsx +27 -0
  176. package/src/components/Avatar.tsx +55 -0
  177. package/src/components/Badge.tsx +29 -0
  178. package/src/components/Button.tsx +116 -0
  179. package/src/components/Card.tsx +24 -0
  180. package/src/components/Checkbox.tsx +48 -0
  181. package/src/components/CloseButton.tsx +21 -0
  182. package/src/components/Dialog.tsx +25 -0
  183. package/src/components/Drawer.tsx +29 -0
  184. package/src/components/Group.tsx +7 -0
  185. package/src/components/Heading.tsx +9 -0
  186. package/src/components/Icon.tsx +6 -0
  187. package/src/components/IconButton.tsx +10 -0
  188. package/src/components/Input.tsx +7 -0
  189. package/src/components/InputAddon.tsx +7 -0
  190. package/src/components/InputGroup.tsx +44 -0
  191. package/src/components/Loader.tsx +71 -0
  192. package/src/components/Popover.tsx +34 -0
  193. package/src/components/Progress.tsx +19 -0
  194. package/src/components/RadioGroup.tsx +21 -0
  195. package/src/components/Select.tsx +70 -0
  196. package/src/components/Skeleton.tsx +37 -0
  197. package/src/components/Slider.tsx +156 -0
  198. package/src/components/Spinner.tsx +7 -0
  199. package/src/components/Switch.tsx +19 -0
  200. package/src/components/Tabs.tsx +17 -0
  201. package/src/components/Textarea.tsx +7 -0
  202. package/src/components/Toast.tsx +96 -0
  203. package/src/components/Tooltip.tsx +65 -0
  204. package/src/components/index.ts +48 -0
  205. package/src/contracts/design-language.contract.ts +198 -0
  206. package/src/global.css +4 -0
  207. package/src/index.ts +18 -0
  208. package/src/languages/index.ts +9 -0
  209. package/src/languages/material3.language.ts +379 -0
  210. package/src/languages/transform.ts +131 -0
  211. package/src/main.ts +33 -0
  212. package/src/preset/colors/index.ts +14 -0
  213. package/src/preset/colors/m3-error.ts +76 -0
  214. package/src/preset/colors/m3-neutral.ts +89 -0
  215. package/src/preset/colors/m3-primary.ts +107 -0
  216. package/src/preset/index.ts +189 -0
  217. package/src/preset/layer-styles.ts +14 -0
  218. package/src/preset/recipes/absolute-center.ts +37 -0
  219. package/src/preset/recipes/accordion.ts +92 -0
  220. package/src/preset/recipes/avatar.ts +152 -0
  221. package/src/preset/recipes/badge.ts +49 -0
  222. package/src/preset/recipes/button.ts +110 -0
  223. package/src/preset/recipes/card.ts +69 -0
  224. package/src/preset/recipes/checkbox.ts +109 -0
  225. package/src/preset/recipes/dialog.ts +157 -0
  226. package/src/preset/recipes/drawer.ts +203 -0
  227. package/src/preset/recipes/field.ts +40 -0
  228. package/src/preset/recipes/group.ts +77 -0
  229. package/src/preset/recipes/heading.ts +26 -0
  230. package/src/preset/recipes/index.ts +40 -0
  231. package/src/preset/recipes/input-addon.ts +42 -0
  232. package/src/preset/recipes/input-group.ts +66 -0
  233. package/src/preset/recipes/input.ts +87 -0
  234. package/src/preset/recipes/popover.ts +77 -0
  235. package/src/preset/recipes/progress.ts +120 -0
  236. package/src/preset/recipes/radio-group.ts +99 -0
  237. package/src/preset/recipes/select.ts +175 -0
  238. package/src/preset/recipes/skeleton.ts +64 -0
  239. package/src/preset/recipes/slider.ts +174 -0
  240. package/src/preset/recipes/spinner.ts +33 -0
  241. package/src/preset/recipes/switch.ts +136 -0
  242. package/src/preset/recipes/tabs.ts +177 -0
  243. package/src/preset/recipes/textarea.ts +82 -0
  244. package/src/preset/recipes/toast.ts +51 -0
  245. package/src/preset/recipes/tooltip.ts +38 -0
  246. package/src/preset/semantic-tokens.ts +75 -0
  247. package/src/preset/shadows.ts +50 -0
  248. package/src/preset/text-styles.ts +21 -0
  249. package/src/recipes/button.recipe.ts +120 -0
  250. package/src/recipes/card.recipe.ts +50 -0
  251. package/src/recipes/dialog.recipe.ts +130 -0
  252. package/src/recipes/icon-button.recipe.ts +96 -0
  253. package/src/recipes/index.ts +6 -0
  254. package/src/recipes/input.recipe.ts +93 -0
  255. package/src/recipes/switch.recipe.ts +117 -0
  256. package/src/stories/foundations/Colors.mdx +380 -0
  257. package/src/stories/foundations/Elevation.mdx +292 -0
  258. package/src/stories/foundations/Spacing.mdx +223 -0
  259. package/src/stories/foundations/Typography.mdx +264 -0
  260. package/src/stories/foundations/components/ColorSwatch.tsx +166 -0
  261. package/src/stories/foundations/components/ElevationCard.tsx +81 -0
  262. package/src/stories/foundations/components/SpacingBox.tsx +94 -0
  263. package/src/stories/foundations/components/TypeSpecimen.tsx +117 -0
  264. package/src/test/setup.ts +12 -0
  265. package/src/test/vitest.d.ts +29 -0
  266. package/src/utils/cn.ts +8 -0
  267. package/src/vite-env.d.ts +1 -0
  268. 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
+ })