@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,2 @@
1
+ export declare const tabs: import("@pandacss/dev").SlotRecipeConfig;
2
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/preset/recipes/tabs.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,0CA6Kf,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const textarea: import("@pandacss/dev").RecipeConfig<import("@pandacss/dev").RecipeVariantRecord>;
2
+ //# sourceMappingURL=textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/preset/recipes/textarea.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,mFA+EnB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const toast: import("@pandacss/dev").SlotRecipeConfig;
2
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/preset/recipes/toast.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,0CA+ChB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const tooltip: import("@pandacss/dev").SlotRecipeConfig;
2
+ //# sourceMappingURL=tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/preset/recipes/tooltip.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,0CAkClB,CAAA"}
@@ -0,0 +1,197 @@
1
+ /**
2
+ * M3 Semantic Tokens - layered on top of Park UI
3
+ *
4
+ * These provide M3-style naming (surface, onSurface, etc.)
5
+ * while Park UI components use their own naming (fg, canvas, etc.)
6
+ */
7
+ export declare const m3SemanticTokens: {
8
+ surface: {
9
+ DEFAULT: {
10
+ value: {
11
+ base: string;
12
+ _dark: string;
13
+ };
14
+ };
15
+ dim: {
16
+ value: {
17
+ base: string;
18
+ _dark: string;
19
+ };
20
+ };
21
+ bright: {
22
+ value: {
23
+ base: string;
24
+ _dark: string;
25
+ };
26
+ };
27
+ container: {
28
+ DEFAULT: {
29
+ value: {
30
+ base: string;
31
+ _dark: string;
32
+ };
33
+ };
34
+ low: {
35
+ value: {
36
+ base: string;
37
+ _dark: string;
38
+ };
39
+ };
40
+ lowest: {
41
+ value: {
42
+ base: string;
43
+ _dark: string;
44
+ };
45
+ };
46
+ high: {
47
+ value: {
48
+ base: string;
49
+ _dark: string;
50
+ };
51
+ };
52
+ highest: {
53
+ value: {
54
+ base: string;
55
+ _dark: string;
56
+ };
57
+ };
58
+ };
59
+ };
60
+ onSurface: {
61
+ DEFAULT: {
62
+ value: {
63
+ base: string;
64
+ _dark: string;
65
+ };
66
+ };
67
+ variant: {
68
+ value: {
69
+ base: string;
70
+ _dark: string;
71
+ };
72
+ };
73
+ };
74
+ m3Primary: {
75
+ DEFAULT: {
76
+ value: {
77
+ base: string;
78
+ _dark: string;
79
+ };
80
+ };
81
+ container: {
82
+ value: {
83
+ base: string;
84
+ _dark: string;
85
+ };
86
+ };
87
+ };
88
+ onM3Primary: {
89
+ DEFAULT: {
90
+ value: {
91
+ base: string;
92
+ _dark: string;
93
+ };
94
+ };
95
+ container: {
96
+ value: {
97
+ base: string;
98
+ _dark: string;
99
+ };
100
+ };
101
+ };
102
+ secondary: {
103
+ DEFAULT: {
104
+ value: {
105
+ base: string;
106
+ _dark: string;
107
+ };
108
+ };
109
+ container: {
110
+ value: {
111
+ base: string;
112
+ _dark: string;
113
+ };
114
+ };
115
+ };
116
+ onSecondary: {
117
+ DEFAULT: {
118
+ value: {
119
+ base: string;
120
+ _dark: string;
121
+ };
122
+ };
123
+ container: {
124
+ value: {
125
+ base: string;
126
+ _dark: string;
127
+ };
128
+ };
129
+ };
130
+ tertiary: {
131
+ DEFAULT: {
132
+ value: {
133
+ base: string;
134
+ _dark: string;
135
+ };
136
+ };
137
+ container: {
138
+ value: {
139
+ base: string;
140
+ _dark: string;
141
+ };
142
+ };
143
+ };
144
+ onTertiary: {
145
+ DEFAULT: {
146
+ value: {
147
+ base: string;
148
+ _dark: string;
149
+ };
150
+ };
151
+ container: {
152
+ value: {
153
+ base: string;
154
+ _dark: string;
155
+ };
156
+ };
157
+ };
158
+ outline: {
159
+ DEFAULT: {
160
+ value: {
161
+ base: string;
162
+ _dark: string;
163
+ };
164
+ };
165
+ variant: {
166
+ value: {
167
+ base: string;
168
+ _dark: string;
169
+ };
170
+ };
171
+ };
172
+ inverseSurface: {
173
+ value: {
174
+ base: string;
175
+ _dark: string;
176
+ };
177
+ };
178
+ inverseOnSurface: {
179
+ value: {
180
+ base: string;
181
+ _dark: string;
182
+ };
183
+ };
184
+ inversePrimary: {
185
+ value: {
186
+ base: string;
187
+ _dark: string;
188
+ };
189
+ };
190
+ scrim: {
191
+ value: {
192
+ base: string;
193
+ _dark: string;
194
+ };
195
+ };
196
+ };
197
+ //# sourceMappingURL=semantic-tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semantic-tokens.d.ts","sourceRoot":"","sources":["../../src/preset/semantic-tokens.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D3B,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Shadow semantic tokens from Park UI
3
+ * Adjusted to use 'base' instead of '_light' and neutral.a* instead of black.a*
4
+ */
5
+ export declare const shadows: {
6
+ xs: {
7
+ value: {
8
+ base: string;
9
+ _dark: string;
10
+ };
11
+ };
12
+ sm: {
13
+ value: {
14
+ base: string;
15
+ _dark: string;
16
+ };
17
+ };
18
+ md: {
19
+ value: {
20
+ base: string;
21
+ _dark: string;
22
+ };
23
+ };
24
+ lg: {
25
+ value: {
26
+ base: string;
27
+ _dark: string;
28
+ };
29
+ };
30
+ xl: {
31
+ value: {
32
+ base: string;
33
+ _dark: string;
34
+ };
35
+ };
36
+ '2xl': {
37
+ value: {
38
+ base: string;
39
+ _dark: string;
40
+ };
41
+ };
42
+ inset: {
43
+ value: {
44
+ base: string;
45
+ _dark: string;
46
+ };
47
+ };
48
+ };
49
+ //# sourceMappingURL=shadows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../src/preset/shadows.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ClB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Text styles from Park UI
3
+ * These provide consistent typography sizing across components
4
+ */
5
+ export declare const textStyles: import("@pandacss/dev").TextStyles;
6
+ //# sourceMappingURL=text-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-styles.d.ts","sourceRoot":"","sources":["../../src/preset/text-styles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,UAAU,oCAcrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const buttonRecipe: import("@pandacss/dev").RecipeConfig<import("@pandacss/dev").RecipeVariantRecord>;
2
+ //# sourceMappingURL=button.recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/button.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,mFAqHvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const cardRecipe: import("@pandacss/dev").RecipeConfig<import("@pandacss/dev").RecipeVariantRecord>;
2
+ //# sourceMappingURL=card.recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/card.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,mFA+CrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const dialogRecipe: import("@pandacss/dev").SlotRecipeConfig;
2
+ //# sourceMappingURL=dialog.recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/dialog.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,0CA+HvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const iconButtonRecipe: import("@pandacss/dev").RecipeConfig<import("@pandacss/dev").RecipeVariantRecord>;
2
+ //# sourceMappingURL=icon-button.recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/icon-button.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,mFA6F3B,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { buttonRecipe } from './button.recipe';
2
+ export { cardRecipe } from './card.recipe';
3
+ export { iconButtonRecipe } from './icon-button.recipe';
4
+ export { inputRecipe } from './input.recipe';
5
+ export { dialogRecipe } from './dialog.recipe';
6
+ export { switchRecipe } from './switch.recipe';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recipes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const inputRecipe: import("@pandacss/dev").RecipeConfig<import("@pandacss/dev").RecipeVariantRecord>;
2
+ //# sourceMappingURL=input.recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/input.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,mFA0FtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const switchRecipe: import("@pandacss/dev").SlotRecipeConfig;
2
+ //# sourceMappingURL=switch.recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.recipe.d.ts","sourceRoot":"","sources":["../../src/recipes/switch.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,0CAkHvB,CAAC"}
@@ -0,0 +1,21 @@
1
+ interface ColorSwatchProps {
2
+ name: string;
3
+ value: string;
4
+ description?: string;
5
+ }
6
+ export declare const ColorSwatch: ({ name, value, description }: ColorSwatchProps) => import("react/jsx-runtime").JSX.Element;
7
+ interface TonalSwatchProps {
8
+ paletteName: string;
9
+ tone: number;
10
+ value: string;
11
+ }
12
+ export declare const TonalSwatch: ({ paletteName, tone, value }: TonalSwatchProps) => import("react/jsx-runtime").JSX.Element;
13
+ interface SemanticSwatchProps {
14
+ name: string;
15
+ lightValue: string;
16
+ darkValue: string;
17
+ description?: string;
18
+ }
19
+ export declare const SemanticSwatch: ({ name, lightValue, darkValue, description, }: SemanticSwatchProps) => import("react/jsx-runtime").JSX.Element;
20
+ export {};
21
+ //# sourceMappingURL=ColorSwatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorSwatch.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/ColorSwatch.tsx"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,GAAI,8BAA8B,gBAAgB,4CA2CzE,CAAC;AAEF,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,GAAI,8BAA8B,gBAAgB,4CAyBzE,CAAC;AAEF,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GAAI,+CAK5B,mBAAmB,4CAmErB,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface ElevationCardProps {
2
+ level: string;
3
+ shadow: string;
4
+ }
5
+ export declare const ElevationCard: ({ level, shadow }: ElevationCardProps) => import("react/jsx-runtime").JSX.Element;
6
+ interface ElevationGridProps {
7
+ elevations: Record<string, string>;
8
+ }
9
+ export declare const ElevationGrid: ({ elevations }: ElevationGridProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=ElevationCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElevationCard.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/ElevationCard.tsx"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,GAAI,mBAAmB,kBAAkB,4CAiDlE,CAAC;AAEF,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,aAAa,GAAI,gBAAgB,kBAAkB,4CAkB/D,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface SpacingBoxProps {
2
+ name: string;
3
+ value: string;
4
+ }
5
+ export declare const SpacingBox: ({ name, value }: SpacingBoxProps) => import("react/jsx-runtime").JSX.Element;
6
+ interface SpacingGridProps {
7
+ spacings: Record<string, string>;
8
+ }
9
+ export declare const SpacingGrid: ({ spacings }: SpacingGridProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=SpacingBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpacingBox.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/SpacingBox.tsx"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,UAAU,GAAI,iBAAiB,eAAe,4CAiE1D,CAAC;AAEF,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,gBAAgB,4CAezD,CAAC"}
@@ -0,0 +1,12 @@
1
+ interface TypeSpecimenProps {
2
+ name: string;
3
+ fontSize: string;
4
+ lineHeight: string;
5
+ fontWeight: string;
6
+ letterSpacing: string;
7
+ fontFamily: string;
8
+ sampleText?: string;
9
+ }
10
+ export declare const TypeSpecimen: ({ name, fontSize, lineHeight, fontWeight, letterSpacing, fontFamily, sampleText, }: TypeSpecimenProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=TypeSpecimen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeSpecimen.d.ts","sourceRoot":"","sources":["../../../../src/stories/foundations/components/TypeSpecimen.tsx"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,GAAI,oFAQ1B,iBAAiB,4CAsFnB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /**
3
+ * Utility function to merge class names
4
+ */
5
+ export declare function cn(...inputs: ClassValue[]): string;
6
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7C;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discourser/design-system",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Aesthetic-agnostic design system with Panda CSS and Ark UI",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -60,14 +60,16 @@
60
60
  "files": [
61
61
  "dist",
62
62
  "styled-system",
63
+ "src",
63
64
  "guidelines"
64
65
  ],
65
66
  "scripts": {
66
67
  "dev": "pnpm docs:generate && storybook dev -p 6006",
67
- "build": "pnpm build:panda && pnpm build:lib && pnpm build:css",
68
+ "build": "pnpm build:panda && pnpm build:lib && pnpm build:types && pnpm build:css",
68
69
  "build:panda": "panda codegen",
69
70
  "build:css": "panda cssgen --outfile dist/styles.css",
70
71
  "build:lib": "tsup",
72
+ "build:types": "tsc --project tsconfig.build.json",
71
73
  "build:storybook": "pnpm docs:generate && storybook build",
72
74
  "prepare": "panda codegen && husky",
73
75
  "lint": "eslint src --ext .ts,.tsx",
@@ -0,0 +1,7 @@
1
+ import { ark } from '@ark-ui/react/factory'
2
+ import type { ComponentProps } from 'react'
3
+ import { styled } from 'styled-system/jsx'
4
+ import { absoluteCenter } from 'styled-system/recipes'
5
+
6
+ export type AbsoluteCenterProps = ComponentProps<typeof AbsoluteCenter>
7
+ export const AbsoluteCenter = styled(ark.div, absoluteCenter)
@@ -0,0 +1,27 @@
1
+ 'use client'
2
+ import { Accordion } from '@ark-ui/react/accordion'
3
+ import { ark } from '@ark-ui/react/factory'
4
+ import type { ComponentProps } from 'react'
5
+ import { createStyleContext } from 'styled-system/jsx'
6
+ import { accordion } from 'styled-system/recipes'
7
+
8
+ const ChevronDownIcon = () => (
9
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
10
+ <path d="m6 9 6 6 6-6"></path>
11
+ </svg>
12
+ )
13
+
14
+ const { withProvider, withContext } = createStyleContext(accordion)
15
+
16
+ export type RootProps = ComponentProps<typeof Root>
17
+ export const Root = withProvider(Accordion.Root, 'root')
18
+ export const RootProvider = withProvider(Accordion.RootProvider, 'root')
19
+ export const Item = withContext(Accordion.Item, 'item')
20
+ export const ItemContent = withContext(Accordion.ItemContent, 'itemContent')
21
+ export const ItemIndicator = withContext(Accordion.ItemIndicator, 'itemIndicator', {
22
+ defaultProps: { children: <ChevronDownIcon /> },
23
+ })
24
+ export const ItemTrigger = withContext(Accordion.ItemTrigger, 'itemTrigger')
25
+ export const ItemBody = withContext(ark.div, 'itemBody')
26
+
27
+ export { AccordionContext as Context } from '@ark-ui/react/accordion'
@@ -0,0 +1,55 @@
1
+ 'use client'
2
+ import { Avatar } from '@ark-ui/react/avatar'
3
+ import { type ComponentProps, forwardRef } from 'react'
4
+ import { createStyleContext } from 'styled-system/jsx'
5
+ import { avatar } from 'styled-system/recipes'
6
+
7
+ const UserIcon = () => (
8
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
9
+ <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path>
10
+ <circle cx="12" cy="7" r="4"></circle>
11
+ </svg>
12
+ )
13
+
14
+ const { withProvider, withContext } = createStyleContext(avatar)
15
+
16
+ export type RootProps = ComponentProps<typeof Root>
17
+ export const Root = withProvider(Avatar.Root, 'root')
18
+ export const RootProvider = withProvider(Avatar.RootProvider, 'root')
19
+ export const Image = withContext(Avatar.Image, 'image', {
20
+ defaultProps: {
21
+ draggable: 'false',
22
+ referrerPolicy: 'no-referrer',
23
+ },
24
+ })
25
+
26
+ export { AvatarContext as Context } from '@ark-ui/react/avatar'
27
+
28
+ export interface FallbackProps extends ComponentProps<typeof StyledFallback> {
29
+ /**
30
+ * The name to derive the initials from.
31
+ * If not provided, the fallback will display a generic icon.
32
+ */
33
+ name?: string | undefined
34
+ }
35
+
36
+ const StyledFallback = withContext(Avatar.Fallback, 'fallback')
37
+
38
+ export const Fallback = forwardRef<HTMLDivElement, FallbackProps>(function Fallback(props, ref) {
39
+ const { name, children, asChild, ...rest } = props
40
+
41
+ const fallbackContent = children || asChild ? children : name ? getInitials(name) : <UserIcon />
42
+
43
+ return (
44
+ <StyledFallback ref={ref} {...rest}>
45
+ {fallbackContent}
46
+ </StyledFallback>
47
+ )
48
+ })
49
+
50
+ const getInitials = (name: string) => {
51
+ const names = name.trim().split(' ')
52
+ const firstName = names[0] || ''
53
+ const lastName = names.length > 1 ? names[names.length - 1] : ''
54
+ return firstName && lastName ? `${firstName[0]}${lastName[0]}` : firstName[0]
55
+ }
@@ -0,0 +1,29 @@
1
+ import { ark } from '@ark-ui/react/factory';
2
+ import { forwardRef, type ComponentProps } from 'react';
3
+ import { css, cx } from 'styled-system/css';
4
+ import { styled } from 'styled-system/jsx';
5
+ import { badge } from 'styled-system/recipes';
6
+
7
+ type BaseBadgeProps = ComponentProps<typeof BaseBadge>;
8
+ const BaseBadge = styled(ark.div, badge);
9
+
10
+ // Override colorPalette type to provide specific values
11
+ export interface BadgeProps extends Omit<BaseBadgeProps, 'colorPalette'> {
12
+ /**
13
+ * The color palette to use for the badge.
14
+ * @default "primary"
15
+ */
16
+ colorPalette?: 'primary' | 'neutral' | 'error' | 'gray' | 'red' | undefined;
17
+ }
18
+
19
+ export const Badge = forwardRef<HTMLDivElement, BadgeProps>(
20
+ function Badge(props, ref) {
21
+ const { colorPalette = 'primary', className, ...rest } = props;
22
+
23
+ // Apply colorPalette using Panda's css() function
24
+ const colorPaletteClass = css({ colorPalette });
25
+ const mergedClassName = cx(colorPaletteClass, className);
26
+
27
+ return <BaseBadge ref={ref} {...rest} className={mergedClassName} />;
28
+ },
29
+ );