@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,177 @@
1
+ import { tabsAnatomy } from '@ark-ui/react/anatomy'
2
+ import { defineSlotRecipe } from '@pandacss/dev'
3
+
4
+ export const tabs = defineSlotRecipe({
5
+ slots: tabsAnatomy.keys(),
6
+ className: 'tabs',
7
+ base: {
8
+ root: {
9
+ position: 'relative',
10
+ display: 'flex',
11
+ alignItems: 'start',
12
+ _horizontal: {
13
+ flexDirection: 'column',
14
+ gap: '2',
15
+ },
16
+ _vertical: {
17
+ flexDirection: 'row',
18
+ gap: '4',
19
+ },
20
+ },
21
+ list: {
22
+ display: 'flex',
23
+ position: 'relative',
24
+ isolation: 'isolate',
25
+ _horizontal: {
26
+ flexDirection: 'row',
27
+ },
28
+ _vertical: {
29
+ flexDirection: 'column',
30
+ },
31
+ },
32
+ trigger: {
33
+ alignItems: 'center',
34
+ cursor: 'pointer',
35
+ display: 'flex',
36
+ fontWeight: 'semibold',
37
+ outline: '0',
38
+ position: 'relative',
39
+ _focusVisible: {
40
+ zIndex: 1,
41
+ focusVisibleRing: 'outside',
42
+ },
43
+ _disabled: {
44
+ layerStyle: 'disabled',
45
+ },
46
+ },
47
+ content: {
48
+ focusVisibleRing: 'inside',
49
+
50
+ _horizontal: {
51
+ width: '100%',
52
+ },
53
+ _vertical: {
54
+ height: '100%',
55
+ },
56
+ },
57
+ indicator: {
58
+ width: 'var(--width)',
59
+ height: 'var(--height)',
60
+ zIndex: -1,
61
+ },
62
+ },
63
+
64
+ variants: {
65
+ size: {
66
+ xs: {
67
+ list: { gap: '1' },
68
+ trigger: { h: '8', minW: '8', textStyle: 'xs', px: '3', gap: '2' },
69
+ },
70
+ sm: {
71
+ list: { gap: '1' },
72
+ trigger: { h: '9', minW: '9', textStyle: 'sm', px: '3.5', gap: '2' },
73
+ },
74
+ md: {
75
+ list: { gap: '1' },
76
+ trigger: { h: '10', minW: '10', textStyle: 'sm', px: '4', gap: '2' },
77
+ },
78
+ lg: {
79
+ list: { gap: '1' },
80
+ trigger: { h: '11', minW: '11', textStyle: 'md', px: '4.5', gap: '2' },
81
+ },
82
+ },
83
+ variant: {
84
+ line: {
85
+ root: {
86
+ alignItems: 'stretch',
87
+ },
88
+ list: {
89
+ _horizontal: {
90
+ borderBottomWidth: 'thin',
91
+ },
92
+ _vertical: {
93
+ borderStartWidth: 'thin',
94
+ },
95
+ },
96
+ indicator: {
97
+ background: 'colorPalette.solid.bg',
98
+ _horizontal: {
99
+ bottom: '0',
100
+ height: 'xxs',
101
+ transform: 'translateY(1px)',
102
+ },
103
+ _vertical: {
104
+ left: '0',
105
+ width: 'xxs',
106
+ transform: 'translateX(-1px)',
107
+ },
108
+ },
109
+ trigger: {
110
+ color: 'fg.muted',
111
+ _selected: {
112
+ color: 'colorPalette.plain.fg',
113
+ },
114
+ },
115
+ },
116
+ subtle: {
117
+ trigger: {
118
+ color: 'fg.muted',
119
+ _selected: {
120
+ color: 'colorPalette.subtle.fg',
121
+ },
122
+ },
123
+ indicator: {
124
+ bg: 'colorPalette.subtle.bg',
125
+ color: 'colorPalette.subtle.fg',
126
+ borderRadius: 'l2',
127
+ },
128
+ },
129
+ enclosed: {
130
+ list: {
131
+ bg: {
132
+ _light: 'gray.2',
133
+ _dark: 'gray.1',
134
+ },
135
+ boxShadow: 'inset 0 0 0px 1px var(--shadow-color)',
136
+ boxShadowColor: 'border',
137
+ borderRadius: 'l3',
138
+ p: '1',
139
+ },
140
+ trigger: {
141
+ color: 'fg.muted',
142
+ _selected: {
143
+ color: 'colorPalette.surface.fg',
144
+ },
145
+ },
146
+ indicator: {
147
+ borderRadius: 'l2',
148
+ boxShadow: {
149
+ _light: 'xs',
150
+ _dark: 'none',
151
+ },
152
+ bg: {
153
+ _light: 'white',
154
+ _dark: 'gray.2',
155
+ },
156
+ },
157
+ },
158
+ },
159
+ fitted: {
160
+ true: {
161
+ root: {
162
+ alignItems: 'stretch',
163
+ },
164
+ trigger: {
165
+ flex: 1,
166
+ textAlign: 'center',
167
+ justifyContent: 'center',
168
+ },
169
+ },
170
+ },
171
+ },
172
+
173
+ defaultVariants: {
174
+ size: 'md',
175
+ variant: 'line',
176
+ },
177
+ })
@@ -0,0 +1,82 @@
1
+ import { defineRecipe } from '@pandacss/dev'
2
+
3
+ export const textarea = defineRecipe({
4
+ className: 'textarea',
5
+ base: {
6
+ appearance: 'none',
7
+ borderRadius: 'l2',
8
+ minWidth: '0',
9
+ outline: '0',
10
+ position: 'relative',
11
+ transition: 'colors',
12
+ transitionProperty: 'box-shadow, border-color',
13
+ width: '100%',
14
+ _disabled: {
15
+ layerStyle: 'disabled',
16
+ },
17
+ },
18
+ defaultVariants: {
19
+ size: 'md',
20
+ variant: 'surface',
21
+ },
22
+ variants: {
23
+ variant: {
24
+ outline: {
25
+ borderWidth: 'thin',
26
+ borderColor: 'gray.outline.border',
27
+ focusVisibleRing: 'inside',
28
+ _invalid: {
29
+ borderColor: 'error',
30
+ focusRingColor: 'error',
31
+ },
32
+ },
33
+ surface: {
34
+ bg: 'gray.surface.bg',
35
+ borderWidth: 'thin',
36
+ borderColor: 'gray.surface.border',
37
+ focusVisibleRing: 'inside',
38
+ _invalid: {
39
+ borderColor: 'error',
40
+ focusRingColor: 'error',
41
+ },
42
+ },
43
+ subtle: {
44
+ borderWidth: 'thin',
45
+ borderColor: 'transparent',
46
+ bg: 'gray.subtle.bg',
47
+ color: 'gray.subtle.fg',
48
+ focusVisibleRing: 'inside',
49
+ _invalid: {
50
+ borderColor: 'error',
51
+ focusRingColor: 'error',
52
+ },
53
+ },
54
+ flushed: {
55
+ borderBottomWidth: 'thin',
56
+ borderBottomColor: 'gray.outline.border',
57
+ borderRadius: '0',
58
+ color: 'fg.default',
59
+ px: '0',
60
+ _invalid: {
61
+ borderColor: 'error',
62
+ },
63
+ _focus: {
64
+ borderColor: 'colorPalette.solid.bg',
65
+ boxShadowColor: 'colorPalette.solid.bg',
66
+ boxShadow: '0 1px 0 0 var(--shadow-color)',
67
+ _invalid: {
68
+ borderColor: 'error',
69
+ boxShadowColor: 'error',
70
+ },
71
+ },
72
+ },
73
+ },
74
+ size: {
75
+ xs: { textStyle: 'sm', px: '2', py: 'sm', scrollPaddingBottom: 'sm' },
76
+ sm: { textStyle: 'sm', px: '2.5', py: 'sm', scrollPaddingBottom: 'sm' },
77
+ md: { textStyle: 'md', px: '3', py: 'sm', scrollPaddingBottom: 'sm' },
78
+ lg: { textStyle: 'md', px: '3.5', py: 'sm', scrollPaddingBottom: 'sm' },
79
+ xl: { textStyle: 'lg', px: '4', py: 'sm', scrollPaddingBottom: 'sm' },
80
+ },
81
+ },
82
+ })
@@ -0,0 +1,51 @@
1
+ import { toastAnatomy } from '@ark-ui/react/anatomy'
2
+ import { defineSlotRecipe } from '@pandacss/dev'
3
+
4
+ export const toast = defineSlotRecipe({
5
+ className: 'toast',
6
+ slots: toastAnatomy.keys(),
7
+ base: {
8
+ root: {
9
+ alignItems: 'start',
10
+ background: 'gray.surface.bg',
11
+ borderRadius: 'l3',
12
+ boxShadow: 'lg',
13
+ display: 'flex',
14
+ gap: '4',
15
+ height: 'var(--height)',
16
+ minWidth: 'sm',
17
+ opacity: 'var(--opacity)',
18
+ overflowWrap: 'anywhere',
19
+ p: '4',
20
+ position: 'relative',
21
+ scale: 'var(--scale)',
22
+ transitionDuration: 'slow',
23
+ transitionProperty: 'translate, scale, opacity, height',
24
+ transitionTimingFunction: 'default',
25
+ translate: 'var(--x) var(--y)',
26
+ width: 'full',
27
+ willChange: 'translate, opacity, scale',
28
+ zIndex: 'var(--z-index)',
29
+ },
30
+ title: {
31
+ color: 'fg.default',
32
+ fontWeight: 'medium',
33
+ textStyle: 'sm',
34
+ },
35
+ description: {
36
+ color: 'fg.muted',
37
+ textStyle: 'sm',
38
+ },
39
+ actionTrigger: {
40
+ color: 'colorPalette.plain.fg',
41
+ cursor: 'pointer',
42
+ fontWeight: 'semibold',
43
+ textStyle: 'sm',
44
+ },
45
+ closeTrigger: {
46
+ position: 'absolute',
47
+ top: '2',
48
+ insetEnd: '2',
49
+ },
50
+ },
51
+ })
@@ -0,0 +1,38 @@
1
+ import { tooltipAnatomy } from '@ark-ui/react/anatomy'
2
+ import { defineSlotRecipe } from '@pandacss/dev'
3
+
4
+ export const tooltip = defineSlotRecipe({
5
+ className: 'tooltip',
6
+ slots: tooltipAnatomy.keys(),
7
+ base: {
8
+ content: {
9
+ '--tooltip-bg': 'colors.gray.solid.bg',
10
+ bg: 'var(--tooltip-bg)',
11
+ color: 'gray.solid.fg',
12
+ borderRadius: 'l2',
13
+ boxShadow: 'sm',
14
+ fontWeight: 'semibold',
15
+ px: '2',
16
+ py: '1.5',
17
+ textStyle: 'xs',
18
+ maxWidth: 'xs',
19
+ _open: {
20
+ animationStyle: 'scale-fade-in',
21
+ animationDuration: 'fast',
22
+ },
23
+ _closed: {
24
+ animationStyle: 'scale-fade-out',
25
+ animationDuration: 'faster',
26
+ },
27
+ },
28
+ arrow: {
29
+ '--arrow-size': 'sizes.2',
30
+ '--arrow-background': 'var(--tooltip-bg)',
31
+ },
32
+ arrowTip: {
33
+ borderTopWidth: 'thin',
34
+ borderInlineStartWidth: 'thin',
35
+ borderColor: 'var(--tooltip-bg)',
36
+ },
37
+ },
38
+ })
@@ -0,0 +1,75 @@
1
+ import { defineSemanticTokens } from '@pandacss/dev';
2
+ import { material3Language } from '../languages/material3.language';
3
+
4
+ const semantic = material3Language.semantic;
5
+ const semanticDark = material3Language.semanticDark!;
6
+
7
+ /**
8
+ * M3 Semantic Tokens - layered on top of Park UI
9
+ *
10
+ * These provide M3-style naming (surface, onSurface, etc.)
11
+ * while Park UI components use their own naming (fg, canvas, etc.)
12
+ */
13
+ export const m3SemanticTokens = defineSemanticTokens.colors({
14
+ // M3 Surface System
15
+ surface: {
16
+ DEFAULT: { value: { base: semantic.surface, _dark: semanticDark.surface } },
17
+ dim: { value: { base: semantic.surfaceContainerLow, _dark: semanticDark.surfaceContainerLow } },
18
+ bright: { value: { base: semantic.surfaceContainerHigh, _dark: semanticDark.surfaceContainerHigh } },
19
+ container: {
20
+ DEFAULT: { value: { base: semantic.surfaceContainer, _dark: semanticDark.surfaceContainer } },
21
+ low: { value: { base: semantic.surfaceContainerLow, _dark: semanticDark.surfaceContainerLow } },
22
+ lowest: { value: { base: semantic.surfaceContainerLowest, _dark: semanticDark.surfaceContainerLowest } },
23
+ high: { value: { base: semantic.surfaceContainerHigh, _dark: semanticDark.surfaceContainerHigh } },
24
+ highest: { value: { base: semantic.surfaceContainerHighest, _dark: semanticDark.surfaceContainerHighest } },
25
+ },
26
+ },
27
+ onSurface: {
28
+ DEFAULT: { value: { base: semantic.onSurface, _dark: semanticDark.onSurface } },
29
+ variant: { value: { base: semantic.onSurfaceVariant, _dark: semanticDark.onSurfaceVariant } },
30
+ },
31
+
32
+ // M3 Primary tokens (for explicit M3 usage)
33
+ m3Primary: {
34
+ DEFAULT: { value: { base: semantic.primary, _dark: semanticDark.primary } },
35
+ container: { value: { base: semantic.primaryContainer, _dark: semanticDark.primaryContainer } },
36
+ },
37
+ onM3Primary: {
38
+ DEFAULT: { value: { base: semantic.onPrimary, _dark: semanticDark.onPrimary } },
39
+ container: { value: { base: semantic.onPrimaryContainer, _dark: semanticDark.onPrimaryContainer } },
40
+ },
41
+
42
+ // M3 Secondary
43
+ secondary: {
44
+ DEFAULT: { value: { base: semantic.secondary, _dark: semanticDark.secondary } },
45
+ container: { value: { base: semantic.secondaryContainer, _dark: semanticDark.secondaryContainer } },
46
+ },
47
+ onSecondary: {
48
+ DEFAULT: { value: { base: semantic.onSecondary, _dark: semanticDark.onSecondary } },
49
+ container: { value: { base: semantic.onSecondaryContainer, _dark: semanticDark.onSecondaryContainer } },
50
+ },
51
+
52
+ // M3 Tertiary
53
+ tertiary: {
54
+ DEFAULT: { value: { base: semantic.tertiary, _dark: semanticDark.tertiary } },
55
+ container: { value: { base: semantic.tertiaryContainer, _dark: semanticDark.tertiaryContainer } },
56
+ },
57
+ onTertiary: {
58
+ DEFAULT: { value: { base: semantic.onTertiary, _dark: semanticDark.onTertiary } },
59
+ container: { value: { base: semantic.onTertiaryContainer, _dark: semanticDark.onTertiaryContainer } },
60
+ },
61
+
62
+ // M3 Outline
63
+ outline: {
64
+ DEFAULT: { value: { base: semantic.outline, _dark: semanticDark.outline } },
65
+ variant: { value: { base: semantic.outlineVariant, _dark: semanticDark.outlineVariant } },
66
+ },
67
+
68
+ // M3 Inverse
69
+ inverseSurface: { value: { base: semantic.inverseSurface, _dark: semanticDark.inverseSurface } },
70
+ inverseOnSurface: { value: { base: semantic.inverseOnSurface, _dark: semanticDark.inverseOnSurface } },
71
+ inversePrimary: { value: { base: semantic.inversePrimary, _dark: semanticDark.inversePrimary } },
72
+
73
+ // Scrim/Shadow
74
+ scrim: { value: { base: semantic.scrim, _dark: semanticDark.scrim } },
75
+ });
@@ -0,0 +1,50 @@
1
+ import { defineSemanticTokens } from '@pandacss/dev';
2
+
3
+ /**
4
+ * Shadow semantic tokens from Park UI
5
+ * Adjusted to use 'base' instead of '_light' and neutral.a* instead of black.a*
6
+ */
7
+ export const shadows = defineSemanticTokens.shadows({
8
+ xs: {
9
+ value: {
10
+ base: '0px 1px 2px {colors.neutral.a6}, 0px 0px 1px {colors.neutral.a7}',
11
+ _dark: '0px 1px 1px {colors.neutral.a8}, 0px 0px 1px inset {colors.neutral.a8}',
12
+ },
13
+ },
14
+ sm: {
15
+ value: {
16
+ base: '0px 2px 4px {colors.neutral.a4}, 0px 0px 1px {colors.neutral.a4}',
17
+ _dark: '0px 2px 4px {colors.neutral.a8}, 0px 0px 1px inset {colors.neutral.a8}',
18
+ },
19
+ },
20
+ md: {
21
+ value: {
22
+ base: '0px 4px 8px {colors.neutral.a4}, 0px 0px 1px {colors.neutral.a4}',
23
+ _dark: '0px 4px 8px {colors.neutral.a8}, 0px 0px 1px inset {colors.neutral.a8}',
24
+ },
25
+ },
26
+ lg: {
27
+ value: {
28
+ base: '0px 8px 16px {colors.neutral.a4}, 0px 0px 1px {colors.neutral.a4}',
29
+ _dark: '0px 8px 16px {colors.neutral.a8}, 0px 0px 1px inset {colors.neutral.a8}',
30
+ },
31
+ },
32
+ xl: {
33
+ value: {
34
+ base: '0px 16px 24px {colors.neutral.a4}, 0px 0px 1px {colors.neutral.a4}',
35
+ _dark: '0px 16px 24px {colors.neutral.a8}, 0px 0px 1px inset {colors.neutral.a8}',
36
+ },
37
+ },
38
+ '2xl': {
39
+ value: {
40
+ base: '0px 24px 40px {colors.neutral.a4}, 0px 0px 1px {colors.neutral.a4}',
41
+ _dark: '0px 24px 40px {colors.neutral.a8}, 0px 0px 1px inset {colors.neutral.a8}',
42
+ },
43
+ },
44
+ inset: {
45
+ value: {
46
+ base: 'inset 8px 0 12px -8px {colors.neutral.a4}',
47
+ _dark: 'inset 8px 0 12px -8px {colors.neutral.a6}',
48
+ },
49
+ },
50
+ });
@@ -0,0 +1,21 @@
1
+ import { defineTextStyles } from '@pandacss/dev';
2
+
3
+ /**
4
+ * Text styles from Park UI
5
+ * These provide consistent typography sizing across components
6
+ */
7
+ export const textStyles = defineTextStyles({
8
+ xs: { value: { fontSize: 'xs', lineHeight: '1.125rem' } },
9
+ sm: { value: { fontSize: 'sm', lineHeight: '1.25rem' } },
10
+ md: { value: { fontSize: 'md', lineHeight: '1.5rem' } },
11
+ lg: { value: { fontSize: 'lg', lineHeight: '1.75rem' } },
12
+ xl: { value: { fontSize: 'xl', lineHeight: '1.875rem' } },
13
+ '2xl': { value: { fontSize: '2xl', lineHeight: '2rem' } },
14
+ '3xl': { value: { fontSize: '3xl', lineHeight: '2.375rem' } },
15
+ '4xl': { value: { fontSize: '4xl', lineHeight: '2.75rem', letterSpacing: '-0.02em' } },
16
+ '5xl': { value: { fontSize: '5xl', lineHeight: '3.75rem', letterSpacing: '-0.02em' } },
17
+ '6xl': { value: { fontSize: '6xl', lineHeight: '4.5rem', letterSpacing: '-0.02em' } },
18
+ '7xl': { value: { fontSize: '7xl', lineHeight: '5.75rem', letterSpacing: '-0.02em' } },
19
+
20
+ label: { value: { fontSize: 'sm', lineHeight: '1.25rem', fontWeight: 'medium' } },
21
+ });
@@ -0,0 +1,120 @@
1
+ import { defineRecipe } from '@pandacss/dev';
2
+
3
+ export const buttonRecipe = defineRecipe({
4
+ className: 'button',
5
+ description: 'Material Design 3 button component',
6
+ base: {
7
+ display: 'inline-flex',
8
+ alignItems: 'center',
9
+ justifyContent: 'center',
10
+ gap: 'sm',
11
+ fontFamily: 'body',
12
+ fontWeight: '500',
13
+ borderRadius: 'full',
14
+ cursor: 'pointer',
15
+ transition: 'all',
16
+ transitionDuration: 'fast',
17
+ transitionTimingFunction: 'standard',
18
+ outline: 'none',
19
+ border: 'none',
20
+ textDecoration: 'none',
21
+ _disabled: {
22
+ opacity: 0.38,
23
+ cursor: 'not-allowed',
24
+ pointerEvents: 'none'
25
+ },
26
+ _focusVisible: {
27
+ outline: '2px solid',
28
+ outlineColor: 'primary',
29
+ outlineOffset: '2px'
30
+ }
31
+ },
32
+ variants: {
33
+ variant: {
34
+ filled: {
35
+ bg: 'primary',
36
+ color: 'onPrimary',
37
+ _hover: {
38
+ opacity: 0.92,
39
+ shadow: 'level1'
40
+ },
41
+ _active: {
42
+ opacity: 0.88
43
+ }
44
+ },
45
+ outlined: {
46
+ bg: 'transparent',
47
+ color: 'primary',
48
+ borderWidth: '1px',
49
+ borderStyle: 'solid',
50
+ borderColor: 'outline',
51
+ _hover: {
52
+ bg: 'primary',
53
+ bgOpacity: 0.08
54
+ },
55
+ _active: {
56
+ bg: 'primary',
57
+ bgOpacity: 0.12
58
+ }
59
+ },
60
+ text: {
61
+ bg: 'transparent',
62
+ color: 'primary',
63
+ _hover: {
64
+ bg: 'primary',
65
+ bgOpacity: 0.08
66
+ },
67
+ _active: {
68
+ bg: 'primary',
69
+ bgOpacity: 0.12
70
+ }
71
+ },
72
+ elevated: {
73
+ bg: 'surfaceContainerLow',
74
+ color: 'primary',
75
+ shadow: 'level1',
76
+ _hover: {
77
+ shadow: 'level2',
78
+ bg: 'surfaceContainerLow'
79
+ },
80
+ _active: {
81
+ shadow: 'level1'
82
+ }
83
+ },
84
+ tonal: {
85
+ bg: 'secondaryContainer',
86
+ color: 'onSecondaryContainer',
87
+ _hover: {
88
+ shadow: 'level1'
89
+ },
90
+ _active: {
91
+ shadow: 'none'
92
+ }
93
+ }
94
+ },
95
+ size: {
96
+ sm: {
97
+ height: '32px',
98
+ px: 'md',
99
+ fontSize: 'labelMedium',
100
+ lineHeight: 'labelMedium'
101
+ },
102
+ md: {
103
+ height: '40px',
104
+ px: 'lg',
105
+ fontSize: 'labelLarge',
106
+ lineHeight: 'labelLarge'
107
+ },
108
+ lg: {
109
+ height: '48px',
110
+ px: 'xl',
111
+ fontSize: 'labelLarge',
112
+ lineHeight: 'labelLarge'
113
+ }
114
+ }
115
+ },
116
+ defaultVariants: {
117
+ variant: 'filled',
118
+ size: 'md'
119
+ }
120
+ });
@@ -0,0 +1,50 @@
1
+ import { defineRecipe } from '@pandacss/dev';
2
+
3
+ export const cardRecipe = defineRecipe({
4
+ className: 'card',
5
+ description: 'Material Design 3 card component',
6
+ base: {
7
+ display: 'flex',
8
+ flexDirection: 'column',
9
+ borderRadius: 'medium',
10
+ overflow: 'hidden',
11
+ transition: 'all',
12
+ transitionDuration: 'fast',
13
+ transitionTimingFunction: 'standard'
14
+ },
15
+ variants: {
16
+ variant: {
17
+ elevated: {
18
+ bg: 'surfaceContainerLow',
19
+ shadow: 'level1',
20
+ _hover: {
21
+ shadow: 'level2'
22
+ }
23
+ },
24
+ filled: {
25
+ bg: 'surfaceContainerHighest'
26
+ },
27
+ outlined: {
28
+ bg: 'surface',
29
+ borderWidth: '1px',
30
+ borderStyle: 'solid',
31
+ borderColor: 'outlineVariant'
32
+ }
33
+ },
34
+ interactive: {
35
+ true: {
36
+ cursor: 'pointer',
37
+ _hover: {
38
+ opacity: 0.96
39
+ },
40
+ _active: {
41
+ opacity: 0.92
42
+ }
43
+ }
44
+ }
45
+ },
46
+ defaultVariants: {
47
+ variant: 'elevated',
48
+ interactive: false
49
+ }
50
+ });