@giddaa-housing/ui 1.0.0 → 1.2.0

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 (331) hide show
  1. package/css/generated/shared.css +1 -1
  2. package/css/giddaa.css +12 -2
  3. package/dist/accordion.d.ts +9 -10
  4. package/dist/accordion.js +41 -87
  5. package/dist/activity-timeline.d.ts +12 -16
  6. package/dist/activity-timeline.js +83 -198
  7. package/dist/alert.d.ts +8 -9
  8. package/dist/alert.js +53 -111
  9. package/dist/auth-layout.d.ts +4 -4
  10. package/dist/auth-layout.js +143 -294
  11. package/dist/avatar.d.ts +6 -6
  12. package/dist/avatar.js +49 -19
  13. package/dist/badge.d.ts +12 -14
  14. package/dist/badge.js +71 -11
  15. package/dist/bar-chart.d.ts +65 -67
  16. package/dist/bar-chart.js +232 -207
  17. package/dist/breadcrumb.d.ts +5 -5
  18. package/dist/breadcrumb.js +56 -118
  19. package/dist/bullet-chart.d.ts +41 -37
  20. package/dist/bullet-chart.js +125 -148
  21. package/dist/button-BZIeyUw6.d.ts +17 -0
  22. package/dist/button-group.d.ts +13 -16
  23. package/dist/button-group.js +39 -88
  24. package/dist/button.d.ts +2 -19
  25. package/dist/button.js +94 -13
  26. package/dist/calendar.d.ts +6 -6
  27. package/dist/calendar.js +138 -17
  28. package/dist/card.d.ts +14 -16
  29. package/dist/card.js +59 -145
  30. package/dist/carousel.d.ts +34 -35
  31. package/dist/carousel.js +335 -20
  32. package/dist/chart.d.ts +90 -63
  33. package/dist/chart.js +573 -28
  34. package/dist/checkbox.d.ts +10 -12
  35. package/dist/checkbox.js +82 -47
  36. package/dist/cn-BI_4DMBf.js +23 -0
  37. package/dist/collapsible.d.ts +7 -8
  38. package/dist/collapsible.js +22 -47
  39. package/dist/combobox.d.ts +10 -10
  40. package/dist/combobox.js +236 -44
  41. package/dist/cta.d.ts +12 -14
  42. package/dist/cta.js +175 -341
  43. package/dist/currency-selector.d.ts +31 -32
  44. package/dist/currency-selector.js +106 -184
  45. package/dist/data-table.d.ts +168 -0
  46. package/dist/data-table.js +676 -0
  47. package/dist/date-picker.d.ts +22 -23
  48. package/dist/date-picker.js +119 -192
  49. package/dist/details-card.d.ts +7 -7
  50. package/dist/details-card.js +104 -253
  51. package/dist/dialog.d.ts +13 -14
  52. package/dist/dialog.js +116 -209
  53. package/dist/dropdown-menu.d.ts +13 -13
  54. package/dist/dropdown-menu.js +180 -37
  55. package/dist/dropzone.d.ts +55 -55
  56. package/dist/dropzone.js +327 -439
  57. package/dist/editorial-card.d.ts +23 -25
  58. package/dist/editorial-card.js +129 -296
  59. package/dist/empty-state.d.ts +8 -9
  60. package/dist/empty-state.js +48 -105
  61. package/dist/field.d.ts +23 -25
  62. package/dist/field.js +110 -221
  63. package/dist/filter.d.ts +118 -0
  64. package/dist/filter.js +775 -0
  65. package/dist/footer.d.ts +8 -15
  66. package/dist/footer.js +197 -400
  67. package/dist/funnel-chart.d.ts +49 -48
  68. package/dist/funnel-chart.js +170 -189
  69. package/dist/gallery-indicator.d.ts +11 -12
  70. package/dist/gallery-indicator.js +75 -12
  71. package/dist/heatmap-chart.d.ts +47 -50
  72. package/dist/heatmap-chart.js +186 -237
  73. package/dist/infotip.d.ts +8 -9
  74. package/dist/infotip.js +33 -59
  75. package/dist/input-CfoEJ8A6.d.ts +12 -0
  76. package/dist/input-group.d.ts +16 -20
  77. package/dist/input-group.js +99 -23
  78. package/dist/input-size-context-C-SFx9sx.d.ts +10 -0
  79. package/dist/input-size-context.d.ts +2 -11
  80. package/dist/input-size-context.js +17 -9
  81. package/dist/input.d.ts +2 -13
  82. package/dist/input.js +27 -11
  83. package/dist/item.d.ts +7 -8
  84. package/dist/item.js +22 -59
  85. package/dist/kpi-card.d.ts +18 -20
  86. package/dist/kpi-card.js +84 -192
  87. package/dist/label.d.ts +6 -6
  88. package/dist/label.js +40 -8
  89. package/dist/line-chart.d.ts +200 -129
  90. package/dist/line-chart.js +330 -105
  91. package/dist/list-item.d.ts +22 -0
  92. package/dist/list-item.js +84 -0
  93. package/dist/logo.d.ts +4 -4
  94. package/dist/logo.js +92 -9
  95. package/dist/map-indicator.d.ts +7 -7
  96. package/dist/map-indicator.js +80 -106
  97. package/dist/match.d.ts +10 -11
  98. package/dist/match.js +62 -107
  99. package/dist/media-gallery-hero.d.ts +40 -42
  100. package/dist/media-gallery-hero.js +182 -343
  101. package/dist/media-player.d.ts +17 -17
  102. package/dist/media-player.js +873 -1348
  103. package/dist/multi-step-form.d.ts +56 -0
  104. package/dist/multi-step-form.js +342 -0
  105. package/dist/number-input.d.ts +34 -34
  106. package/dist/number-input.js +64 -117
  107. package/dist/page-header.d.ts +10 -11
  108. package/dist/page-header.js +34 -79
  109. package/dist/pagination.d.ts +17 -21
  110. package/dist/pagination.js +132 -207
  111. package/dist/password-input.d.ts +5 -13
  112. package/dist/password-input.js +31 -55
  113. package/dist/phone-input.d.ts +19 -20
  114. package/dist/phone-input.js +226 -344
  115. package/dist/photo-gallery.d.ts +19 -19
  116. package/dist/photo-gallery.js +313 -449
  117. package/dist/picker-lzgmsNfG.js +32 -0
  118. package/dist/pie-chart.d.ts +121 -90
  119. package/dist/pie-chart.js +183 -149
  120. package/dist/popover.d.ts +9 -9
  121. package/dist/popover.js +72 -23
  122. package/dist/price-tag.d.ts +26 -27
  123. package/dist/price-tag.js +113 -173
  124. package/dist/progress.d.ts +16 -17
  125. package/dist/progress.js +169 -24
  126. package/dist/property-listing-card.d.ts +14 -17
  127. package/dist/property-listing-card.js +102 -220
  128. package/dist/purchase-option-card.d.ts +79 -0
  129. package/dist/purchase-option-card.js +176 -0
  130. package/dist/radar-chart.d.ts +29 -31
  131. package/dist/radar-chart.js +162 -137
  132. package/dist/radio-group.d.ts +11 -13
  133. package/dist/radio-group.js +46 -60
  134. package/dist/review-block.d.ts +14 -16
  135. package/dist/review-block.js +154 -10
  136. package/dist/rich-text-editor.d.ts +30 -14
  137. package/dist/rich-text-editor.js +592 -716
  138. package/dist/scatter-chart.d.ts +45 -47
  139. package/dist/scatter-chart.js +236 -240
  140. package/dist/search-input.d.ts +8 -16
  141. package/dist/search-input.js +57 -109
  142. package/dist/select.d.ts +8 -8
  143. package/dist/select.js +144 -27
  144. package/dist/separator.d.ts +8 -9
  145. package/dist/separator.js +32 -8
  146. package/dist/sheet.d.ts +11 -11
  147. package/dist/sheet.js +103 -24
  148. package/dist/sidebar.d.ts +32 -37
  149. package/dist/sidebar.js +364 -634
  150. package/dist/size-context-D4mYvcg8.d.ts +10 -0
  151. package/dist/size-context.d.ts +2 -11
  152. package/dist/size-context.js +17 -9
  153. package/dist/skeleton.d.ts +4 -5
  154. package/dist/skeleton.js +12 -8
  155. package/dist/slider.d.ts +8 -9
  156. package/dist/slider.js +64 -135
  157. package/dist/sparkline.d.ts +68 -58
  158. package/dist/sparkline.js +315 -251
  159. package/dist/stepper.d.ts +23 -24
  160. package/dist/stepper.js +149 -246
  161. package/dist/styles.css +1004 -116
  162. package/dist/switch.d.ts +10 -12
  163. package/dist/switch.js +48 -70
  164. package/dist/table-card.d.ts +35 -0
  165. package/dist/table-card.js +125 -0
  166. package/dist/table.d.ts +18 -14
  167. package/dist/table.js +117 -154
  168. package/dist/tabs.d.ts +33 -15
  169. package/dist/tabs.js +110 -18
  170. package/dist/tag.d.ts +21 -23
  171. package/dist/tag.js +103 -159
  172. package/dist/testimonial-block.d.ts +18 -19
  173. package/dist/testimonial-block.js +189 -358
  174. package/dist/textarea-IS_D8pXf.d.ts +11 -0
  175. package/dist/textarea.d.ts +2 -12
  176. package/dist/textarea.js +24 -11
  177. package/dist/time-picker.d.ts +11 -11
  178. package/dist/time-picker.js +245 -302
  179. package/dist/toast.d.ts +16 -18
  180. package/dist/toast.js +154 -205
  181. package/dist/tooltip.d.ts +8 -9
  182. package/dist/tooltip.js +37 -12
  183. package/dist/tree-map.d.ts +59 -62
  184. package/dist/tree-map.js +226 -269
  185. package/dist/use-uncontrolled-CLfM1XbB.js +21 -0
  186. package/dist/waterfall-chart.d.ts +94 -97
  187. package/dist/waterfall-chart.js +455 -552
  188. package/package.json +36 -9
  189. package/dist/accordion.js.map +0 -1
  190. package/dist/activity-timeline.js.map +0 -1
  191. package/dist/alert.js.map +0 -1
  192. package/dist/auth-layout.js.map +0 -1
  193. package/dist/avatar.js.map +0 -1
  194. package/dist/badge.js.map +0 -1
  195. package/dist/bar-chart.js.map +0 -1
  196. package/dist/breadcrumb.js.map +0 -1
  197. package/dist/bullet-chart.js.map +0 -1
  198. package/dist/button-group.js.map +0 -1
  199. package/dist/button.js.map +0 -1
  200. package/dist/calendar.js.map +0 -1
  201. package/dist/card.js.map +0 -1
  202. package/dist/carousel.js.map +0 -1
  203. package/dist/chart.js.map +0 -1
  204. package/dist/checkbox.js.map +0 -1
  205. package/dist/chunk-322YCNVL.js +0 -278
  206. package/dist/chunk-322YCNVL.js.map +0 -1
  207. package/dist/chunk-3ACQVT7A.js +0 -25
  208. package/dist/chunk-3ACQVT7A.js.map +0 -1
  209. package/dist/chunk-3T65TLJX.js +0 -334
  210. package/dist/chunk-3T65TLJX.js.map +0 -1
  211. package/dist/chunk-6ZSGQHH2.js +0 -192
  212. package/dist/chunk-6ZSGQHH2.js.map +0 -1
  213. package/dist/chunk-7TBMLFGW.js +0 -41
  214. package/dist/chunk-7TBMLFGW.js.map +0 -1
  215. package/dist/chunk-B4H6RNDH.js +0 -135
  216. package/dist/chunk-B4H6RNDH.js.map +0 -1
  217. package/dist/chunk-BUXCGZ6X.js +0 -219
  218. package/dist/chunk-BUXCGZ6X.js.map +0 -1
  219. package/dist/chunk-CHII2QHH.js +0 -58
  220. package/dist/chunk-CHII2QHH.js.map +0 -1
  221. package/dist/chunk-DMNOXRRW.js +0 -147
  222. package/dist/chunk-DMNOXRRW.js.map +0 -1
  223. package/dist/chunk-EFSOSSIC.js +0 -130
  224. package/dist/chunk-EFSOSSIC.js.map +0 -1
  225. package/dist/chunk-FZDSVMKY.js +0 -363
  226. package/dist/chunk-FZDSVMKY.js.map +0 -1
  227. package/dist/chunk-GJOFIJS3.js +0 -246
  228. package/dist/chunk-GJOFIJS3.js.map +0 -1
  229. package/dist/chunk-HL3ZSYES.js +0 -23
  230. package/dist/chunk-HL3ZSYES.js.map +0 -1
  231. package/dist/chunk-JVLUBAPB.js +0 -129
  232. package/dist/chunk-JVLUBAPB.js.map +0 -1
  233. package/dist/chunk-KDPYSOYZ.js +0 -64
  234. package/dist/chunk-KDPYSOYZ.js.map +0 -1
  235. package/dist/chunk-KSMDANKI.js +0 -43
  236. package/dist/chunk-KSMDANKI.js.map +0 -1
  237. package/dist/chunk-MEKCCOP5.js +0 -46
  238. package/dist/chunk-MEKCCOP5.js.map +0 -1
  239. package/dist/chunk-NOFXVRWL.js +0 -451
  240. package/dist/chunk-NOFXVRWL.js.map +0 -1
  241. package/dist/chunk-PC5MHNVA.js +0 -171
  242. package/dist/chunk-PC5MHNVA.js.map +0 -1
  243. package/dist/chunk-QKAQZ2GU.js +0 -122
  244. package/dist/chunk-QKAQZ2GU.js.map +0 -1
  245. package/dist/chunk-QZHSHSVV.js +0 -26
  246. package/dist/chunk-QZHSHSVV.js.map +0 -1
  247. package/dist/chunk-RBMK26XD.js +0 -19
  248. package/dist/chunk-RBMK26XD.js.map +0 -1
  249. package/dist/chunk-SFNJGF6M.js +0 -262
  250. package/dist/chunk-SFNJGF6M.js.map +0 -1
  251. package/dist/chunk-UJJNLGTM.js +0 -112
  252. package/dist/chunk-UJJNLGTM.js.map +0 -1
  253. package/dist/chunk-VGR4ZWJ3.js +0 -418
  254. package/dist/chunk-VGR4ZWJ3.js.map +0 -1
  255. package/dist/chunk-XG47P6D4.js +0 -99
  256. package/dist/chunk-XG47P6D4.js.map +0 -1
  257. package/dist/chunk-XZZAHNVM.js +0 -21
  258. package/dist/chunk-XZZAHNVM.js.map +0 -1
  259. package/dist/chunk-Y4TTYVNE.js +0 -36
  260. package/dist/chunk-Y4TTYVNE.js.map +0 -1
  261. package/dist/chunk-YDWIHW6Q.js +0 -69
  262. package/dist/chunk-YDWIHW6Q.js.map +0 -1
  263. package/dist/collapsible.js.map +0 -1
  264. package/dist/combobox.js.map +0 -1
  265. package/dist/cta.js.map +0 -1
  266. package/dist/currency-selector.js.map +0 -1
  267. package/dist/date-picker.js.map +0 -1
  268. package/dist/details-card.js.map +0 -1
  269. package/dist/dialog.js.map +0 -1
  270. package/dist/dropdown-menu.js.map +0 -1
  271. package/dist/dropzone.js.map +0 -1
  272. package/dist/editorial-card.js.map +0 -1
  273. package/dist/empty-state.js.map +0 -1
  274. package/dist/field.js.map +0 -1
  275. package/dist/footer.js.map +0 -1
  276. package/dist/funnel-chart.js.map +0 -1
  277. package/dist/gallery-indicator.js.map +0 -1
  278. package/dist/heatmap-chart.js.map +0 -1
  279. package/dist/infotip.js.map +0 -1
  280. package/dist/input-group.js.map +0 -1
  281. package/dist/input-size-context.js.map +0 -1
  282. package/dist/input.js.map +0 -1
  283. package/dist/item.js.map +0 -1
  284. package/dist/kpi-card.js.map +0 -1
  285. package/dist/label.js.map +0 -1
  286. package/dist/line-chart.js.map +0 -1
  287. package/dist/logo.js.map +0 -1
  288. package/dist/map-indicator.js.map +0 -1
  289. package/dist/match.js.map +0 -1
  290. package/dist/media-gallery-hero.js.map +0 -1
  291. package/dist/media-player.js.map +0 -1
  292. package/dist/number-input.js.map +0 -1
  293. package/dist/page-header.js.map +0 -1
  294. package/dist/pagination.js.map +0 -1
  295. package/dist/password-input.js.map +0 -1
  296. package/dist/phone-input.js.map +0 -1
  297. package/dist/photo-gallery.js.map +0 -1
  298. package/dist/pie-chart.js.map +0 -1
  299. package/dist/popover.js.map +0 -1
  300. package/dist/price-tag.js.map +0 -1
  301. package/dist/progress.js.map +0 -1
  302. package/dist/property-listing-card.js.map +0 -1
  303. package/dist/radar-chart.js.map +0 -1
  304. package/dist/radio-group.js.map +0 -1
  305. package/dist/review-block.js.map +0 -1
  306. package/dist/rich-text-editor.js.map +0 -1
  307. package/dist/scatter-chart.js.map +0 -1
  308. package/dist/search-input.js.map +0 -1
  309. package/dist/select.js.map +0 -1
  310. package/dist/separator.js.map +0 -1
  311. package/dist/sheet.js.map +0 -1
  312. package/dist/sidebar.js.map +0 -1
  313. package/dist/size-context.js.map +0 -1
  314. package/dist/skeleton.js.map +0 -1
  315. package/dist/slider.js.map +0 -1
  316. package/dist/sparkline.js.map +0 -1
  317. package/dist/stepper.js.map +0 -1
  318. package/dist/switch.js.map +0 -1
  319. package/dist/tab-list.d.ts +0 -38
  320. package/dist/tab-list.js +0 -123
  321. package/dist/tab-list.js.map +0 -1
  322. package/dist/table.js.map +0 -1
  323. package/dist/tabs.js.map +0 -1
  324. package/dist/tag.js.map +0 -1
  325. package/dist/testimonial-block.js.map +0 -1
  326. package/dist/textarea.js.map +0 -1
  327. package/dist/time-picker.js.map +0 -1
  328. package/dist/toast.js.map +0 -1
  329. package/dist/tooltip.js.map +0 -1
  330. package/dist/tree-map.js.map +0 -1
  331. package/dist/waterfall-chart.js.map +0 -1
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@giddaa-housing/ui",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Giddaa reusable UI component library.",
5
5
  "type": "module",
6
6
  "private": false,
7
+ "homepage": "https://ui-doc.giddaa.com",
8
+ "sideEffects": [
9
+ "**/*.css"
10
+ ],
7
11
  "files": [
8
12
  "dist",
9
13
  "css"
@@ -97,6 +101,10 @@
97
101
  "types": "./dist/date-picker.d.ts",
98
102
  "import": "./dist/date-picker.js"
99
103
  },
104
+ "./data-table": {
105
+ "types": "./dist/data-table.d.ts",
106
+ "import": "./dist/data-table.js"
107
+ },
100
108
  "./details-card": {
101
109
  "types": "./dist/details-card.d.ts",
102
110
  "import": "./dist/details-card.js"
@@ -125,6 +133,10 @@
125
133
  "types": "./dist/field.d.ts",
126
134
  "import": "./dist/field.js"
127
135
  },
136
+ "./filter": {
137
+ "types": "./dist/filter.d.ts",
138
+ "import": "./dist/filter.js"
139
+ },
128
140
  "./footer": {
129
141
  "types": "./dist/footer.d.ts",
130
142
  "import": "./dist/footer.js"
@@ -173,6 +185,10 @@
173
185
  "types": "./dist/line-chart.d.ts",
174
186
  "import": "./dist/line-chart.js"
175
187
  },
188
+ "./list-item": {
189
+ "types": "./dist/list-item.d.ts",
190
+ "import": "./dist/list-item.js"
191
+ },
176
192
  "./match": {
177
193
  "types": "./dist/match.d.ts",
178
194
  "import": "./dist/match.js"
@@ -189,6 +205,10 @@
189
205
  "types": "./dist/media-player.d.ts",
190
206
  "import": "./dist/media-player.js"
191
207
  },
208
+ "./multi-step-form": {
209
+ "types": "./dist/multi-step-form.d.ts",
210
+ "import": "./dist/multi-step-form.js"
211
+ },
192
212
  "./number-input": {
193
213
  "types": "./dist/number-input.d.ts",
194
214
  "import": "./dist/number-input.js"
@@ -233,6 +253,10 @@
233
253
  "types": "./dist/property-listing-card.d.ts",
234
254
  "import": "./dist/property-listing-card.js"
235
255
  },
256
+ "./purchase-option-card": {
257
+ "types": "./dist/purchase-option-card.d.ts",
258
+ "import": "./dist/purchase-option-card.js"
259
+ },
236
260
  "./radar-chart": {
237
261
  "types": "./dist/radar-chart.d.ts",
238
262
  "import": "./dist/radar-chart.js"
@@ -297,14 +321,14 @@
297
321
  "types": "./dist/switch.d.ts",
298
322
  "import": "./dist/switch.js"
299
323
  },
300
- "./tab-list": {
301
- "types": "./dist/tab-list.d.ts",
302
- "import": "./dist/tab-list.js"
303
- },
304
324
  "./table": {
305
325
  "types": "./dist/table.d.ts",
306
326
  "import": "./dist/table.js"
307
327
  },
328
+ "./table-card": {
329
+ "types": "./dist/table-card.d.ts",
330
+ "import": "./dist/table-card.js"
331
+ },
308
332
  "./tabs": {
309
333
  "types": "./dist/tabs.d.ts",
310
334
  "import": "./dist/tabs.js"
@@ -345,6 +369,7 @@
345
369
  "./css/*": "./css/*"
346
370
  },
347
371
  "peerDependencies": {
372
+ "@tanstack/react-table": "^8.21.0",
348
373
  "react": ">=18.3.0 || >=19.0.0",
349
374
  "react-dom": ">=18.3.0 || >=19.0.0"
350
375
  },
@@ -372,25 +397,27 @@
372
397
  "@tailwindcss/cli": "^4.1.18",
373
398
  "@tailwindcss/oxide": "^4.3.2",
374
399
  "@tailwindcss/typography": "^0.5.19",
400
+ "@tanstack/react-table": "^8.21.3",
375
401
  "@types/react": "^19.2.14",
376
402
  "@types/react-dom": "^19.2.3",
377
403
  "react": "^19.2.6",
378
404
  "react-dom": "^19.2.6",
379
405
  "tailwindcss": "^4.2.4",
380
406
  "tailwindcss-animate": "^1.0.7",
381
- "tsup": "^8.5.0",
382
- "typescript": "^6.0.3",
407
+ "tsdown": "^0.22.4",
408
+ "typescript": "^7.0.2",
383
409
  "vitest": "^4.1.5"
384
410
  },
385
411
  "publishConfig": {
412
+ "registry": "https://registry.npmjs.org/",
386
413
  "access": "public"
387
414
  },
388
415
  "scripts": {
389
416
  "build": "pnpm run clean && pnpm run build:js && pnpm run build:css",
390
417
  "build:css": "tailwindcss -i css/styles.css -o ./dist/styles.css",
391
- "build:js": "tsup",
418
+ "build:js": "tsdown",
392
419
  "check:boundaries": "vitest run src/import-boundaries.test.ts",
393
- "clean": "rm -rf dist",
420
+ "clean": "rm -rf dist css/generated",
394
421
  "lint": "biome lint .",
395
422
  "test": "vitest run --passWithNoTests",
396
423
  "typecheck": "tsc --noEmit"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/accordion.tsx"],"sourcesContent":["import { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\";\nimport { ChevronRightIcon } from \"lucide-react\";\n\nimport { cn } from \"./lib/cn\";\n\nfunction Accordion({\n\tclassName,\n\tvariant = \"surface\",\n\t...props\n}: AccordionPrimitive.Root.Props & { variant?: \"surface\" | \"ghost\" }) {\n\treturn (\n\t\t<AccordionPrimitive.Root\n\t\t\tdata-slot=\"accordion\"\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\"group/accordion flex w-full flex-col gap-3\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n\treturn (\n\t\t<AccordionPrimitive.Item\n\t\t\tdata-slot=\"accordion-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"rounded-xl border border-line-subtle text-fg-primary transition-[background-color,border-color,box-shadow] group-data-[variant=surface]/accordion:bg-surface\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AccordionTrigger({\n\tclassName,\n\tchildren,\n\t...props\n}: AccordionPrimitive.Trigger.Props) {\n\treturn (\n\t\t<AccordionPrimitive.Header data-slot=\"accordion-header\" className=\"flex\">\n\t\t\t<AccordionPrimitive.Trigger\n\t\t\t\tdata-slot=\"accordion-trigger\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"group/accordion-trigger flex w-full items-center gap-3 px-4 sm:px-5 py-5.5 aria-expanded:pb-2 text-left text-gdt-md font-semibold text-fg-primary outline-none transition-[padding] aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<ChevronRightIcon\n\t\t\t\t\tdata-slot=\"accordion-trigger-icon\"\n\t\t\t\t\tclassName=\"pointer-events-none size-5 shrink-0 text-fg-primary transition-transform duration-200 ease-out group-aria-expanded/accordion-trigger:rotate-90\"\n\t\t\t\t/>\n\t\t\t\t{children}\n\t\t\t</AccordionPrimitive.Trigger>\n\t\t</AccordionPrimitive.Header>\n\t);\n}\n\nfunction AccordionContent({\n\tclassName,\n\tchildren,\n\t...props\n}: AccordionPrimitive.Panel.Props) {\n\treturn (\n\t\t<AccordionPrimitive.Panel\n\t\t\tdata-slot=\"accordion-content\"\n\t\t\tclassName=\"overflow-hidden h-(--accordion-panel-height) transition-[height] ease-out data-ending-style:h-0 data-starting-style:h-0\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\" pl-12 sm:pl-13 pr-4 sm:pr-5 pt-0 pb-4 sm:pb-5.5 text-fg-secondary text-gdt-md [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</AccordionPrimitive.Panel>\n\t);\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n"],"mappings":";;;;;AAAA,SAAS,aAAa,0BAA0B;AAChD,SAAS,wBAAwB;AAU/B,cA6BC,YA7BD;AANF,SAAS,UAAU;AAAA,EAClB;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACJ,GAAsE;AACrE,SACC;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,gBAAc;AAAA,MACd,WAAW,GAAG,8CAA8C,SAAS;AAAA,MACpE,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,MAAM,GAAkC;AAC9E,SACC;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,iBAAiB;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAqC;AACpC,SACC,oBAAC,mBAAmB,QAAnB,EAA0B,aAAU,oBAAmB,WAAU,QACjE;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,aAAU;AAAA,YACV,WAAU;AAAA;AAAA,QACX;AAAA,QACC;AAAA;AAAA;AAAA,EACF,GACD;AAEF;AAEA,SAAS,iBAAiB;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAmC;AAClC,SACC;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACA,WAAW;AAAA,YACV;AAAA,YACA;AAAA,UACD;AAAA,UAEC;AAAA;AAAA,MACF;AAAA;AAAA,EACD;AAEF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/activity-timeline.tsx"],"sourcesContent":["\"use client\";\n\nimport { ChevronRightIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"./avatar\";\nimport { Badge } from \"./badge\";\nimport { cn } from \"./lib/cn\";\n\ntype ActivityTimelineProps = React.ComponentProps<\"section\">;\n\nfunction ActivityTimeline({ className, ...props }: ActivityTimelineProps) {\n\treturn (\n\t\t<section\n\t\t\tdata-slot=\"activity-timeline\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex w-full max-w-[520px] flex-col items-start gap-4 rounded-2xl border border-line bg-canvas px-4 py-5 text-fg-primary sm:p-6 dark:bg-surface\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ActivityTimelineTitle({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"h3\">) {\n\treturn (\n\t\t<h3\n\t\t\tdata-slot=\"activity-timeline-title\"\n\t\t\tclassName={cn(\n\t\t\t\t\"w-full text-gdt-md leading-[26px] font-bold sm:text-gdt-lg sm:leading-[28px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ActivityTimelineList({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"ol\">) {\n\treturn (\n\t\t<ol\n\t\t\tdata-slot=\"activity-timeline-list\"\n\t\t\tclassName={cn(\"flex w-full flex-col items-start\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype ActivityTimelineItemProps = React.ComponentProps<\"li\"> & {\n\thighlighted?: boolean;\n\thighlightOnHover?: boolean;\n};\n\nfunction ActivityTimelineItem({\n\tclassName,\n\thighlighted = false,\n\thighlightOnHover = true,\n\t...props\n}: ActivityTimelineItemProps) {\n\treturn (\n\t\t<li\n\t\t\tdata-slot=\"activity-timeline-item\"\n\t\t\tdata-highlighted={highlighted || undefined}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex min-h-20 w-full min-w-0 gap-3 rounded-lg p-3 transition-[background-color,border-radius]\",\n\t\t\t\thighlighted && \"rounded-2xl bg-surface-raised\",\n\t\t\t\thighlightOnHover && \"hover:rounded-2xl hover:bg-surface-raised\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ActivityTimelineRail({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"activity-timeline-rail\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex w-10 shrink-0 flex-col items-center gap-1.5\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype ActivityTimelineAvatarProps = React.ComponentProps<typeof Avatar> & {\n\tsrc?: string;\n\talt?: string;\n\tinitials?: React.ReactNode;\n};\n\nfunction ActivityTimelineAvatar({\n\tclassName,\n\tsrc,\n\talt = \"\",\n\tinitials,\n\tchildren,\n\t...props\n}: ActivityTimelineAvatarProps) {\n\treturn (\n\t\t<Avatar\n\t\t\tdata-slot=\"activity-timeline-avatar\"\n\t\t\tsize=\"md\"\n\t\t\tclassName={cn(\"bg-surface-brand\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children ?? (\n\t\t\t\t<>\n\t\t\t\t\t{src ? <AvatarImage src={src} alt={alt} /> : null}\n\t\t\t\t\t<AvatarFallback className=\"bg-surface-brand text-fg-on-brand\">\n\t\t\t\t\t\t{initials ?? \"?\"}\n\t\t\t\t\t</AvatarFallback>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</Avatar>\n\t);\n}\n\nfunction ActivityTimelineConnector({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\taria-hidden=\"true\"\n\t\t\tdata-slot=\"activity-timeline-connector\"\n\t\t\tclassName={cn(\n\t\t\t\t\"h-6 w-0.5 shrink-0 rounded-full bg-line-subtle\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ActivityTimelineContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"activity-timeline-content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex min-w-0 flex-1 flex-col items-start gap-1\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype ActivityTimelineBadgeProps = React.ComponentProps<typeof Badge> & {\n\ticon?: React.ReactNode;\n};\n\nfunction ActivityTimelineBadge({\n\tclassName,\n\ticon,\n\tchildren,\n\tvariant = \"default\",\n\tsize = \"sm\",\n\tborder = false,\n\t...props\n}: ActivityTimelineBadgeProps) {\n\treturn (\n\t\t<Badge\n\t\t\tdata-slot=\"activity-timeline-badge\"\n\t\t\tsize={size}\n\t\t\tvariant={variant}\n\t\t\tborder={border}\n\t\t\tclassName={cn(\"min-h-0 py-1 text-gdt-xs font-semibold\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"inline-flex shrink-0 items-center [&>svg]:size-3.5\"\n\t\t\t>\n\t\t\t\t{icon ?? <ChevronRightIcon className=\"cn-rtl-flip\" />}\n\t\t\t</span>\n\t\t\t{children}\n\t\t</Badge>\n\t);\n}\n\nfunction ActivityTimelineDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"activity-timeline-description\"\n\t\t\tclassName={cn(\n\t\t\t\t\"min-w-0 text-gdt-xs text-fg-secondary sm:text-[13px] sm:leading-[22px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tActivityTimeline,\n\tActivityTimelineAvatar,\n\tActivityTimelineBadge,\n\tActivityTimelineConnector,\n\tActivityTimelineContent,\n\tActivityTimelineDescription,\n\tActivityTimelineItem,\n\tActivityTimelineList,\n\tActivityTimelineRail,\n\tActivityTimelineTitle,\n};\n"],"mappings":";;;;;;;;;;;;;;;AAEA,SAAS,wBAAwB;AAW/B,SAwGE,UAxGF,KAwGE,YAxGF;AAFF,SAAS,iBAAiB,EAAE,WAAW,GAAG,MAAM,GAA0B;AACzE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,sBAAsB;AAAA,EAC9B;AAAA,EACA,GAAG;AACJ,GAA+B;AAC9B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,qBAAqB;AAAA,EAC7B;AAAA,EACA,GAAG;AACJ,GAA+B;AAC9B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW,GAAG,oCAAoC,SAAS;AAAA,MAC1D,GAAG;AAAA;AAAA,EACL;AAEF;AAOA,SAAS,qBAAqB;AAAA,EAC7B;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,GAAG;AACJ,GAA8B;AAC7B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,oBAAkB,eAAe;AAAA,MAC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,EACT,GAAG;AACJ,GAA+B;AAC9B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,GAAG,0CAA0C,SAAS;AAAA,MAChE,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,eAAY;AAAA,YACZ,WAAU;AAAA,YAET,kBAAQ,oBAAC,oBAAiB,WAAU,eAAc;AAAA;AAAA,QACpD;AAAA,QACC;AAAA;AAAA;AAAA,EACF;AAEF;AAEA,SAAS,4BAA4B;AAAA,EACpC;AAAA,EACA,GAAG;AACJ,GAAgC;AAC/B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
package/dist/alert.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/alert.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { cn } from \"./lib/cn\";\n\nconst alertVariants = cva(\n\t\"grid w-full grid-cols-[0_minmax(0,1fr)_auto] items-start gap-y-1 rounded-xl border-2 px-4 py-3.5 text-gdt-sm transition-[background-color,border-color,color,box-shadow] has-[>svg]:grid-cols-[1.25rem_minmax(0,1fr)_auto] has-[>svg]:gap-x-3 [&>svg]:col-start-1 [&>svg]:row-span-2 [&>svg]:mt-0.5 [&>svg]:size-5 [&>svg]:text-current\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tsuccess:\n\t\t\t\t\t\"border-status-success bg-surface-brand-subtle text-status-success\",\n\t\t\t\tinfo: \"border-status-info bg-surface text-status-info\",\n\t\t\t\twarning:\n\t\t\t\t\t\"border-status-warning bg-surface-accent-subtle text-status-warning\",\n\t\t\t\terror:\n\t\t\t\t\t\"border-status-danger bg-surface-danger-subtle text-status-danger\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"info\",\n\t\t},\n\t},\n);\n\ntype AlertVariant = NonNullable<VariantProps<typeof alertVariants>[\"variant\"]>;\n\ntype AlertProps = React.ComponentProps<\"div\"> &\n\tVariantProps<typeof alertVariants> & {\n\t\tliveRegion?: \"polite\" | \"assertive\" | \"off\";\n\t};\n\nfunction Alert({\n\tclassName,\n\tvariant = \"info\",\n\tliveRegion,\n\trole,\n\t...props\n}: AlertProps) {\n\tconst resolvedVariant: AlertVariant = variant ?? \"info\";\n\tconst resolvedRole =\n\t\trole ?? (liveRegion === \"off\" ? undefined : getAlertRole(resolvedVariant));\n\tconst resolvedLiveRegion =\n\t\tliveRegion === \"off\"\n\t\t\t? undefined\n\t\t\t: (liveRegion ?? (resolvedVariant === \"error\" ? \"assertive\" : \"polite\"));\n\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert\"\n\t\t\tdata-variant={resolvedVariant}\n\t\t\trole={resolvedRole}\n\t\t\taria-live={resolvedLiveRegion}\n\t\t\tclassName={cn(alertVariants({ variant: resolvedVariant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-title\"\n\t\t\tclassName={cn(\n\t\t\t\t\"col-start-2 row-start-1 font-extrabold text-fg-primary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-description\"\n\t\t\tclassName={cn(\n\t\t\t\t\"col-start-2 row-start-2 text-fg-secondary [&_p]:leading-relaxed\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertActions({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-actions\"\n\t\t\tclassName={cn(\n\t\t\t\t\"col-start-2 row-start-3 mt-2 flex shrink-0 items-center gap-2 justify-self-start sm:col-start-3 sm:row-span-2 sm:row-start-1 sm:mt-[-0.125rem] sm:justify-self-end\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertClose({\n\tclassName,\n\ttype = \"button\",\n\tchildren,\n\t\"aria-label\": ariaLabel = \"Dismiss alert\",\n\t...props\n}: React.ComponentProps<\"button\">) {\n\treturn (\n\t\t<button\n\t\t\tdata-slot=\"alert-close\"\n\t\t\ttype={type}\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent p-0 text-fg-secondary transition-[background-color,color,box-shadow] hover:bg-surface-raised hover:text-fg-primary focus-visible:border-line-focus focus-visible:outline-none focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\taria-label={ariaLabel}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children ?? <X className=\"size-4\" aria-hidden=\"true\" />}\n\t\t</button>\n\t);\n}\n\nfunction getAlertRole(variant: AlertVariant) {\n\treturn variant === \"error\" ? \"alert\" : \"status\";\n}\n\nexport {\n\tAlert,\n\tAlertActions,\n\tAlertClose,\n\tAlertDescription,\n\tAlertTitle,\n\talertVariants,\n};\nexport type { AlertProps, AlertVariant };\n"],"mappings":";;;;;AAAA,SAAS,WAA8B;AACvC,SAAS,SAAS;AA+ChB;AA3CF,IAAM,gBAAgB;AAAA,EACrB;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,SAAS;AAAA,QACR,SACC;AAAA,QACD,MAAM;AAAA,QACN,SACC;AAAA,QACD,OACC;AAAA,MACF;AAAA,IACD;AAAA,IACA,iBAAiB;AAAA,MAChB,SAAS;AAAA,IAC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QACA;AAAA,MACD;AAAA,MACA,cAAY;AAAA,MACX,GAAG;AAAA,MAEH,sBAAY,oBAAC,KAAE,WAAU,UAAS,eAAY,QAAO;AAAA;AAAA,EACvD;AAEF;AAEA,SAAS,aAAa,SAAuB;AAC5C,SAAO,YAAY,UAAU,UAAU;AACxC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/auth-layout.tsx"],"sourcesContent":["import type * as React from \"react\";\nimport { cn } from \"./lib/cn\";\nimport { GiddaaLogo } from \"./logo\";\n\nfunction AuthLayout({ className, ...props }: React.ComponentProps<\"main\">) {\n\treturn (\n\t\t<main\n\t\t\tdata-slot=\"auth-layout\"\n\t\t\tclassName={cn(\n\t\t\t\t\"grid min-h-svh bg-surface p-gdt-lg text-fg-primary lg:grid-cols-[minmax(0,1fr)_minmax(30rem,1fr)] lg:bg-surface-brand lg:p-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutBrandPanel({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<\"section\">) {\n\treturn (\n\t\t<section\n\t\t\tdata-slot=\"auth-layout-brand-panel\"\n\t\t\tclassName={cn(\n\t\t\t\t\"relative hidden min-h-svh overflow-hidden bg-surface-brand px-gdt-5xl py-gdt-5xl text-fg-on-brand lg:flex lg:flex-col\",\n\t\t\t\t\"before:absolute before:inset-0 before:bg-[radial-gradient(circle_at_20%_20%,rgb(255_255_255_/_0.12),transparent_24rem),radial-gradient(circle_at_80%_70%,rgb(0_0_0_/_0.14),transparent_28rem)] before:content-['']\",\n\t\t\t\t\"after:absolute after:inset-0 after:opacity-18 after:[background-image:radial-gradient(currentColor_0.7px,transparent_0.7px)] after:[background-size:7px_7px] after:content-['']\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<div className=\"relative z-10 flex min-h-0 flex-1 flex-col\">\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</section>\n\t);\n}\n\nfunction AuthLayoutBrandLogo({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-brand-logo\"\n\t\t\tclassName={cn(\"mb-gdt-3xl flex items-center text-fg-on-brand\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children ?? <GiddaaLogo className=\"h-auto w-35\" />}\n\t\t</div>\n\t);\n}\n\nfunction AuthLayoutBrandContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-brand-content\"\n\t\t\tclassName={cn(\"max-w-[31rem]\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutBrandTitle({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"h2\">) {\n\treturn (\n\t\t<h2\n\t\t\tdata-slot=\"auth-layout-brand-title\"\n\t\t\tclassName={cn(\"text-gdt-h1 text-balance\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutBrandDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"p\">) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot=\"auth-layout-brand-description\"\n\t\t\tclassName={cn(\"mt-gdt-lg text-gdt-md text-pretty opacity-90\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutMedia({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-media\"\n\t\t\tclassName={cn(\n\t\t\t\t\"mt-auto grid h-58 grid-cols-3 items-end gap-gdt-lg pt-gdt-5xl\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutMediaItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-media-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"min-h-32 overflow-hidden rounded-t-4xl bg-surface-glass-overlay-container-1 shadow-3 odd:h-36 even:h-52\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutMain({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"section\">) {\n\treturn (\n\t\t<section\n\t\t\tdata-slot=\"auth-layout-main\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex min-h-[calc(100svh-2rem)] items-stretch justify-center bg-canvas lg:min-h-svh lg:rounded-l-[5rem]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutCard({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-card\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex w-full max-w-[26.5rem] flex-col border border-line-subtle bg-canvas px-gdt-lg py-gdt-2xl sm:px-gdt-2xl lg:max-w-[32rem] lg:border-0 lg:px-0 lg:py-gdt-5xl\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutTopAction({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-top-action\"\n\t\t\tclassName={cn(\"mb-gdt-4xl text-gdt-xs text-fg-secondary\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutMobileLogo({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-mobile-logo\"\n\t\t\tclassName={cn(\n\t\t\t\t\"mb-gdt-xl flex items-center text-fg-brand lg:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children ?? <GiddaaLogo className=\"h-auto w-30\" />}\n\t\t</div>\n\t);\n}\n\nfunction AuthLayoutHeader({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"header\">) {\n\treturn (\n\t\t<header\n\t\t\tdata-slot=\"auth-layout-header\"\n\t\t\tclassName={cn(\"mb-gdt-xl flex flex-col gap-gdt-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutTitle({ className, ...props }: React.ComponentProps<\"h1\">) {\n\treturn (\n\t\t<h1\n\t\t\tdata-slot=\"auth-layout-title\"\n\t\t\tclassName={cn(\"text-gdt-h2 text-fg-primary\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"p\">) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot=\"auth-layout-description\"\n\t\t\tclassName={cn(\"text-gdt-sm text-fg-secondary\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutForm({ className, ...props }: React.ComponentProps<\"form\">) {\n\treturn (\n\t\t<form\n\t\t\tdata-slot=\"auth-layout-form\"\n\t\t\tclassName={cn(\"flex flex-col gap-gdt-lg\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutActions({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-actions\"\n\t\t\tclassName={cn(\"flex flex-col gap-gdt-md\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AuthLayoutDivider({\n\tchildren = \"Or continue with\",\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"auth-layout-divider\"\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex items-center py-gdt-sm text-gdt-sm text-fg-secondary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<div className=\"h-px flex-1 bg-line-subtle\" />\n\t\t\t<span className=\"px-gdt-md\">{children}</span>\n\t\t\t<div className=\"h-px flex-1 bg-line-subtle\" />\n\t\t</div>\n\t);\n}\n\nfunction AuthLayoutFooter({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"footer\">) {\n\treturn (\n\t\t<footer\n\t\t\tdata-slot=\"auth-layout-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t\"mt-auto flex items-center justify-between gap-gdt-lg pt-gdt-5xl text-gdt-subtext text-fg-secondary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAuthLayout,\n\tAuthLayoutActions,\n\tAuthLayoutBrandContent,\n\tAuthLayoutBrandDescription,\n\tAuthLayoutBrandLogo,\n\tAuthLayoutBrandPanel,\n\tAuthLayoutBrandTitle,\n\tAuthLayoutCard,\n\tAuthLayoutDescription,\n\tAuthLayoutDivider,\n\tAuthLayoutFooter,\n\tAuthLayoutForm,\n\tAuthLayoutHeader,\n\tAuthLayoutMain,\n\tAuthLayoutMedia,\n\tAuthLayoutMediaItem,\n\tAuthLayoutMobileLogo,\n\tAuthLayoutTitle,\n\tAuthLayoutTopAction,\n};\n"],"mappings":";;;;;;;;AAME,cAoPA,YApPA;AAFF,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAiC;AAC1E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,qBAAqB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAoC;AACnC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA,M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sB;AAAA,EAC9B;AAAA,EACA,GAAG;AACJ,GAA8B;AAC7B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW,GAAG,iCAAiC,SAAS;AAAA,MACvD,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,MAAM,GAAiC;AAC9E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW,GAAG,4BAA4B,SAAS;AAAA,MAClD,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,kBAAkB;AAAA,EAC1B;AAAA,EACA,GAAG;AACJ,GAAgC;AAC/B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW,GAAG,4BAA4B,SAAS;AAAA,MAClD,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,kBAAkB;AAAA,EAC1B,WAAW;AAAA,EACX;AAAA,EACA,GAAG;AACJ,GAAgC;AAC/B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,SAAI,WAAU,8BAA6B;AAAA,QAC5C,oBAAC,UAAK,WAAU,aAAa,UAAS;AAAA,QACtC,oBAAC,SAAI,WAAU,8BAA6B;AAAA;AAAA;AAAA,EAC7C;AAEF;AAEA,SAAS,iBAAiB;AAAA,EACzB;AAAA,EACA,GAAG;AACJ,GAAmC;AAClC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/badge.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/bar-chart.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n\tBar,\n\tBarChart as BarChartPrimitive,\n\tCartesianGrid,\n\tXAxis,\n\tYAxis,\n} from \"recharts\";\nimport { type ChartConfig, ChartContainer, cartesianAxisProps } from \"./chart\";\nimport { cn } from \"./lib/cn\";\nimport {\n\ttype ComponentSize,\n\tSizeProvider,\n\tuseComponentSize,\n} from \"./size-context\";\n\n/**\n * Bar charts are composable wrappers over the recharts cartesian primitives.\n * recharts 3 registers graphical items through context when they render, so the\n * primitives CAN be wrapped in our own components. Each wrapper bakes in the\n * giddaa defaults (tokens, size-scaled type, mark specs) and forwards every\n * recharts prop, so anything can be overridden in place or replaced with the\n * raw recharts element.\n *\n * Anatomy: `BarChart` is the plot root (frame + responsive box + recharts\n * chart); compose the grid, axes, series, and the shared overlays from\n * `./chart` as children:\n *\n * @example\n * <ChartCard size=\"md\">\n * <ChartHeader>\n * <ChartTitle>Revenue Overview</ChartTitle>\n * <ChartDescription>Monthly revenue - Jan-Jul</ChartDescription>\n * </ChartHeader>\n * <BarChart config={config} data={data}>\n * <BarChartGrid />\n * <BarChartXAxis dataKey=\"month\" />\n * <BarChartYAxis domain={[0, 120]} />\n * <ChartTooltip content={<ChartTooltipContent />} />\n * <BarChartSeries dataKey=\"revenue\" name=\"Revenue\">\n * <LabelList dataKey=\"revenue\" content={<BarValueLabel />} />\n * </BarChartSeries>\n * </BarChart>\n * </ChartCard>\n */\n\n/**\n * Categorical series palette - the theme-aware `chart-1`...`chart-3` tokens.\n * Assign colours in this fixed order, never cycled: a fourth series folds into\n * \"Other\" or becomes a second chart.\n */\nconst BAR_CHART_PALETTE = [\n\t\"var(--color-chart-1)\",\n\t\"var(--color-chart-2)\",\n\t\"var(--color-chart-3)\",\n] as const;\n\nconst DEFAULT_SERIES_COLOR = BAR_CHART_PALETTE[0];\n\ntype BarChartOrientation = \"vertical\" | \"horizontal\";\n\ntype BarChartLayout = {\n\t/** Plot height in px. Width stays fluid via the ResponsiveContainer. */\n\theight: number;\n\t/** Outer margin - top leaves room for value labels above the tallest bar. */\n\tmargin: { top: number; right: number; bottom: number; left: number };\n\t/** Cap on bar thickness so a few categories don't render slab-wide bars. */\n\tmaxBarSize: number;\n\t/** Gap between categories (groups), as a percentage of the band. */\n\tbarCategoryGap: string;\n\t/** Gap between bars within a group (grouped layout). */\n\tbarGap: number;\n\t/** Corner radius for a bar. */\n\tbarRadius: number;\n\t/** Axis tick label font size. */\n\ttickFontSize: number;\n\t/** Value label (on-bar number) font size. */\n\tvalueFontSize: number;\n\t/** Reserved width for the value axis. */\n\tyAxisWidth: number;\n\t/** Space between an axis and its tick labels. */\n\ttickMargin: number;\n};\n\nconst BAR_CHART_LAYOUT: Record<ComponentSize, BarChartLayout> = {\n\tsm: {\n\t\theight: 180,\n\t\tmargin: { top: 20, right: 8, bottom: 0, left: 0 },\n\t\tmaxBarSize: 22,\n\t\tbarCategoryGap: \"8%\",\n\t\tbarGap: 4,\n\t\tbarRadius: 4,\n\t\ttickFontSize: 10,\n\t\tvalueFontSize: 10,\n\t\tyAxisWidth: 28,\n\t\ttickMargin: 6,\n\t},\n\tmd: {\n\t\theight: 220,\n\t\tmargin: { top: 24, right: 12, bottom: 0, left: 0 },\n\t\tmaxBarSize: 28,\n\t\tbarCategoryGap: \"8%\",\n\t\tbarGap: 6,\n\t\tbarRadius: 6,\n\t\ttickFontSize: 11,\n\t\tvalueFontSize: 11,\n\t\tyAxisWidth: 32,\n\t\ttickMargin: 8,\n\t},\n\tlg: {\n\t\theight: 280,\n\t\tmargin: { top: 28, right: 16, bottom: 0, left: 0 },\n\t\tmaxBarSize: 36,\n\t\tbarCategoryGap: \"8%\",\n\t\tbarGap: 8,\n\t\tbarRadius: 8,\n\t\ttickFontSize: 12,\n\t\tvalueFontSize: 12,\n\t\tyAxisWidth: 36,\n\t\ttickMargin: 10,\n\t},\n};\n\nconst BarChartContext = React.createContext<{\n\torientation: BarChartOrientation;\n} | null>(null);\n\nfunction useBarChartOrientation(orientation?: BarChartOrientation) {\n\tconst context = React.useContext(BarChartContext);\n\treturn orientation ?? context?.orientation ?? \"vertical\";\n}\n\nfunction barChartAxisProps(layout: BarChartLayout) {\n\tconst axes = cartesianAxisProps(layout);\n\tconst tick = {\n\t\t...axes.xAxis.tick,\n\t\tfill: \"var(--color-fg-caption-placeholder)\",\n\t};\n\n\treturn {\n\t\txAxis: {\n\t\t\t...axes.xAxis,\n\t\t\ttick,\n\t\t},\n\t\tyAxis: {\n\t\t\t...axes.yAxis,\n\t\t\ttick,\n\t\t},\n\t} as const;\n}\n\ntype BarChartProps = Omit<\n\tReact.ComponentProps<typeof BarChartPrimitive>,\n\t\"width\" | \"height\"\n> & {\n\t/** Series labels/icons for the shared tooltip and legend (see `ChartConfig`). */\n\tconfig?: ChartConfig;\n\t/** Plot scale; inherited from the nearest `SizeProvider` when omitted. */\n\tsize?: ComponentSize;\n\t/** Applied to the responsive plot box, e.g. to override its height. */\n\tclassName?: string;\n\t/** Visual bar direction. `horizontal` maps to recharts `layout=\"vertical\"`. */\n\torientation?: BarChartOrientation;\n};\n\n/**\n * Plot root - wraps the shared `ChartContainer` (tooltip/legend theming,\n * responsive box) around the recharts `BarChart` with size-scaled height,\n * margin, and bar gaps. `size` also flows to the child primitives through\n * `SizeProvider`. Extra props reach the recharts chart (`data`, `syncId`,\n * `layout`, ...); passing `layout` directly overrides `orientation`.\n */\nfunction BarChart({\n\tconfig = {},\n\tsize,\n\tclassName,\n\tchildren,\n\torientation = \"vertical\",\n\tlayout,\n\t...props\n}: BarChartProps) {\n\tconst resolvedSize = useComponentSize(size);\n\tconst chartLayout = BAR_CHART_LAYOUT[resolvedSize];\n\tconst rechartsLayout =\n\t\tlayout ?? (orientation === \"horizontal\" ? \"vertical\" : \"horizontal\");\n\n\treturn (\n\t\t<SizeProvider size={resolvedSize}>\n\t\t\t<BarChartContext.Provider value={{ orientation }}>\n\t\t\t\t<ChartContainer\n\t\t\t\t\tconfig={config}\n\t\t\t\t\tclassName={cn(\"aspect-auto w-full\", className)}\n\t\t\t\t\tstyle={{ height: chartLayout.height }}\n\t\t\t\t>\n\t\t\t\t\t<BarChartPrimitive\n\t\t\t\t\t\taccessibilityLayer\n\t\t\t\t\t\tmargin={chartLayout.margin}\n\t\t\t\t\t\tbarCategoryGap={chartLayout.barCategoryGap}\n\t\t\t\t\t\tbarGap={chartLayout.barGap}\n\t\t\t\t\t\tlayout={rechartsLayout}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</BarChartPrimitive>\n\t\t\t\t</ChartContainer>\n\t\t\t</BarChartContext.Provider>\n\t\t</SizeProvider>\n\t);\n}\n\ntype BarChartGridProps = React.ComponentProps<typeof CartesianGrid>;\n\n/**\n * Value reference lines - recharts `CartesianGrid` with vertical lines hidden\n * and the visible grid painted with the `line` token (`line-subtle` matches the\n * chart card surface in both themes, so it would vanish). For horizontal bar\n * charts, pass `horizontal={false} vertical`.\n */\nfunction BarChartGrid(props: BarChartGridProps) {\n\treturn (\n\t\t<CartesianGrid vertical={false} stroke=\"var(--color-line)\" {...props} />\n\t);\n}\n\ntype BarChartXAxisProps = React.ComponentProps<typeof XAxis> & {\n\t/** Explicit axis scale; otherwise inherited from the chart's `size`. */\n\tsize?: ComponentSize;\n};\n\n/**\n * Category/value axis - recharts `XAxis` with no axis/tick lines,\n * size-scaled tick margin, and caption-placeholder tick ink. Passing your own\n * `tick` replaces the default styling entirely.\n */\nfunction BarChartXAxis({ size, tick, ...props }: BarChartXAxisProps) {\n\tconst layout = BAR_CHART_LAYOUT[useComponentSize(size)];\n\tconst axes = barChartAxisProps(layout);\n\n\treturn (\n\t\t<XAxis\n\t\t\ttickLine={axes.xAxis.tickLine}\n\t\t\taxisLine={axes.xAxis.axisLine}\n\t\t\ttickMargin={axes.xAxis.tickMargin}\n\t\t\ttick={tick ?? axes.xAxis.tick}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype BarChartYAxisProps = React.ComponentProps<typeof YAxis> & {\n\t/** Explicit axis scale; otherwise inherited from the chart's `size`. */\n\tsize?: ComponentSize;\n};\n\n/**\n * Value/category axis - recharts `YAxis` with no axis/tick lines,\n * size-scaled tick type, and reserved width for value labels. Override `width`\n * for long horizontal-category labels.\n */\nfunction BarChartYAxis({ size, tick, ...props }: BarChartYAxisProps) {\n\tconst layout = BAR_CHART_LAYOUT[useComponentSize(size)];\n\tconst axes = barChartAxisProps(layout);\n\n\treturn (\n\t\t<YAxis\n\t\t\ttickLine={axes.yAxis.tickLine}\n\t\t\taxisLine={axes.yAxis.axisLine}\n\t\t\twidth={axes.yAxis.width}\n\t\t\ttick={tick ?? axes.yAxis.tick}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype BarChartSeriesProps = React.ComponentProps<typeof Bar> & {\n\t/** Series colour for the bar. Defaults to the first categorical chart token. */\n\tcolor?: string;\n\t/** Explicit mark scale; otherwise inherited from the chart's `size`. */\n\tsize?: ComponentSize;\n\t/** Override visual direction for radius when the root orientation is absent. */\n\torientation?: BarChartOrientation;\n};\n\n/**\n * One data series - recharts `Bar` with the giddaa mark spec: a theme-aware\n * series colour, size-scaled max thickness, and a small radius only on the\n * leading edge (top for vertical bars, right for horizontal bars). `color`\n * drives `fill`; `fill`, `radius`, and `maxBarSize` still win when passed\n * directly.\n */\nfunction BarChartSeries({\n\tcolor = DEFAULT_SERIES_COLOR,\n\tsize,\n\torientation,\n\t...props\n}: BarChartSeriesProps) {\n\tconst layout = BAR_CHART_LAYOUT[useComponentSize(size)];\n\tconst resolvedOrientation = useBarChartOrientation(orientation);\n\tconst radius =\n\t\tresolvedOrientation === \"horizontal\"\n\t\t\t? ([0, layout.barRadius, layout.barRadius, 0] as [\n\t\t\t\t\tnumber,\n\t\t\t\t\tnumber,\n\t\t\t\t\tnumber,\n\t\t\t\t\tnumber,\n\t\t\t\t])\n\t\t\t: ([layout.barRadius, layout.barRadius, 0, 0] as [\n\t\t\t\t\tnumber,\n\t\t\t\t\tnumber,\n\t\t\t\t\tnumber,\n\t\t\t\t\tnumber,\n\t\t\t\t]);\n\n\treturn (\n\t\t<Bar\n\t\t\tfill={color}\n\t\t\tradius={radius}\n\t\t\tmaxBarSize={layout.maxBarSize}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * Renderer for recharts `<LabelList content={<BarValueLabel />} />`. recharts\n * injects the bar geometry (`x`, `y`, `width`, `height`, `value`); the rest are\n * caller props. For a vertical bar the label sits above the bar; for a\n * horizontal bar it sits to the right of the bar. When used inside `BarChart`,\n * the root `orientation` is inherited unless this component receives an\n * explicit `orientation`.\n */\ntype BarValueLabelProps = {\n\t/** Bar visual direction - drives where the label is placed. */\n\torientation?: BarChartOrientation;\n\t/** Override the on-bar font size (defaults to the size-scaled value). */\n\tfontSize?: number;\n\t/** Format the raw value before display, e.g. `(v) => String(v)`. */\n\tformatter?: (value: React.ReactNode) => React.ReactNode;\n\t/** Explicit label scale; otherwise inherited from the chart's `size`. */\n\tsize?: ComponentSize;\n\tclassName?: string;\n\t// Injected by recharts at render time.\n\tx?: string | number;\n\ty?: string | number;\n\twidth?: string | number;\n\theight?: string | number;\n\tvalue?: React.ReactNode;\n};\n\nfunction BarValueLabel({\n\torientation,\n\tfontSize,\n\tformatter,\n\tsize,\n\tclassName,\n\tx,\n\ty,\n\twidth,\n\theight,\n\tvalue,\n}: BarValueLabelProps) {\n\tconst resolvedOrientation = useBarChartOrientation(orientation);\n\tconst valueFontSize = BAR_CHART_LAYOUT[useComponentSize(size)].valueFontSize;\n\n\tif (value == null || x == null || y == null || width == null) {\n\t\treturn null;\n\t}\n\n\tconst numX = Number(x);\n\tconst numY = Number(y);\n\tconst numWidth = Number(width);\n\tconst numHeight = Number(height ?? 0);\n\tconst gap = 6;\n\n\tif (\n\t\t!Number.isFinite(numX) ||\n\t\t!Number.isFinite(numY) ||\n\t\t!Number.isFinite(numWidth) ||\n\t\t!Number.isFinite(numHeight)\n\t) {\n\t\treturn null;\n\t}\n\n\tconst isHorizontal = resolvedOrientation === \"horizontal\";\n\tconst labelX = isHorizontal ? numX + numWidth + gap : numX + numWidth / 2;\n\tconst labelY = isHorizontal ? numY + numHeight / 2 : numY - gap;\n\n\treturn (\n\t\t<text\n\t\t\tx={labelX}\n\t\t\ty={labelY}\n\t\t\ttextAnchor={isHorizontal ? \"start\" : \"middle\"}\n\t\t\tdominantBaseline={isHorizontal ? \"central\" : \"auto\"}\n\t\t\tclassName={cn(\"fill-fg-primary font-semibold tabular-nums\", className)}\n\t\t\tstyle={{ fontSize: fontSize ?? valueFontSize }}\n\t\t>\n\t\t\t{formatter ? formatter(value) : value}\n\t\t</text>\n\t);\n}\n\nexport {\n\tBAR_CHART_LAYOUT,\n\tBAR_CHART_PALETTE,\n\tBarChart,\n\tBarChartGrid,\n\tBarChartSeries,\n\tBarChartXAxis,\n\tBarChartYAxis,\n\tBarValueLabel,\n};\nexport type {\n\tBarChartGridProps,\n\tBarChartLayout,\n\tBarChartOrientation,\n\tBarChartProps,\n\tBarChartSeriesProps,\n\tBarChartXAxisProps,\n\tBarChartYAxisProps,\n\tBarValueLabelProps,\n};\n"],"mappings":";;;;;;;;;;;;;;AAEA,YAAY,WAAW;AACvB;AAAA,EACC;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,OACM;AA2LF;AA/IL,IAAM,oBAAoB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAM,uBAAuB,kBAAkB,CAAC;AA2BhD,IAAM,mBAA0D;AAAA,EAC/D,IAAI;AAAA,IACH,QAAQ;AAAA,IACR,QAAQ,EAAE,KAAK,IAAI,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;AAAA,IAChD,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,cAAc;AAAA,IACd,eAAe;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rC,kBAAkB,eAAe,YAAY;AAAA,MAC7C,WAAW,GAAG,8CAA8C,SAAS;AAAA,MACrE,OAAO,EAAE,UAAU,YAAY,cAAc;AAAA,MAE5C,sBAAY,UAAU,KAAK,IAAI;AAAA;AAAA,EACjC;AAEF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/breadcrumb.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"./lib/cn\";\n\nfunction Breadcrumb({ className, ...props }: React.ComponentProps<\"nav\">) {\n\treturn (\n\t\t<nav\n\t\t\taria-label=\"breadcrumb\"\n\t\t\tdata-slot=\"breadcrumb\"\n\t\t\tclassName={cn(\"min-w-0\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n\treturn (\n\t\t<ol\n\t\t\tdata-slot=\"breadcrumb-list\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-wrap items-center gap-2 wrap-break-word text-gdt-sm text-fg-secondary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li\n\t\t\tdata-slot=\"breadcrumb-item\"\n\t\t\tclassName={cn(\"inline-flex min-w-0 items-center gap-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbLink({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"a\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"a\",\n\t\tprops: mergeProps<\"a\">(\n\t\t\t{\n\t\t\t\tclassName: cn(\n\t\t\t\t\t\"inline-flex min-w-0 items-center rounded-sm text-gdt-sm font-normal text-fg-secondary transition-colors hover:text-fg-primary focus-visible:outline-none focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)]\",\n\t\t\t\t\tclassName,\n\t\t\t\t),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t\tstate: {\n\t\t\tslot: \"breadcrumb-link\",\n\t\t},\n\t});\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"breadcrumb-page\"\n\t\t\taria-current=\"page\"\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex min-w-0 items-center text-gdt-sm font-semibold text-fg-brand\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction BreadcrumbSeparator({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li\n\t\t\tdata-slot=\"breadcrumb-separator\"\n\t\t\trole=\"presentation\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex shrink-0 items-center text-fg-caption-placeholder [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children ?? <ChevronRightIcon className=\"cn-rtl-flip\" />}\n\t\t</li>\n\t);\n}\n\nfunction BreadcrumbEllipsis({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"breadcrumb-ellipsis\"\n\t\t\trole=\"presentation\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex items-center justify-center text-fg-caption-placeholder [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon />\n\t\t\t<span className=\"sr-only\">More</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\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A,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,oBAAoB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAA+B;AAC9B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA,MAEH,sBAAY,oBAAC,oBAAiB,WAAU,eAAc;AAAA;AAAA,EACxD;AAEF;AAEA,SAAS,mBAAmB;AAAA,EAC3B;AAAA,EACA,GAAG;AACJ,GAAiC;AAChC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,sBAAmB;AAAA,QACpB,oBAAC,UAAK,WAAU,WAAU,kBAAI;AAAA;AAAA;AAAA,EAC/B;AAEF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/bullet-chart.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\nimport { cn } from \"./lib/cn\";\nimport { type ComponentSize, useComponentSize } from \"./size-context\";\n\n/**\n * A bullet chart — a compact linear gauge for KPI-vs-goal reporting where a full\n * bar chart would be excessive. It encodes three things on one horizontal track:\n * a **measure** bar (the actualized value), a **target** marker (the forecast to\n * beat), and qualitative **range** bands (poor · satisfactory · good context\n * zones) along a quantitative axis.\n *\n * This is just the gauge — no card, title, or value display — so it composes\n * into whatever surrounds it (a `ChartCard`, a `KpiCard`, a table cell). Unlike\n * the other charts in this folder it is not built on recharts (recharts has no\n * bullet/linear-gauge primitive); it is a few positioned bands, a centered bar,\n * and a tick. It stays size-aware via the shared `SizeProvider` and reuses the\n * brand colour tokens.\n *\n * Status colour signals whether the actual cleared the forecast: `auto` paints\n * the measure bar `status-success` when `value >= target` (OnTrack) and\n * `status-warning` when it falls short (Behind); pass `status` to override.\n *\n * Tokens:\n * - Measure bar — OnTrack `var(--color-status-success)`, Behind\n * `var(--color-status-warning)`\n * - Target marker — `var(--color-fg-primary)`\n * - Range bands — progressively darker `stone` shades (poor → good); the base\n * track is the lightest shade\n * - Axis ticks — `var(--color-fg-caption-placeholder)`\n *\n * @example\n * <BulletChart\n * value={108}\n * target={100}\n * max={120}\n * ranges={[60, 90]}\n * ticks={[0, 60, 120]}\n * valueFormatter={(v) => `₦${v}M`}\n * />\n *\n * @example\n * // Composed under a heading the consumer owns\n * <div className=\"flex flex-col gap-4\">\n * <div className=\"flex items-start justify-between\">\n * <div>\n * <h3 className=\"font-bold\">Revenue</h3>\n * <p className=\"text-fg-secondary\">Actual vs ₦100M forecast</p>\n * </div>\n * <span className=\"text-gdt-h3 font-extrabold\">₦108M</span>\n * </div>\n * <BulletChart value={108} target={100} max={120} ranges={[60, 90]} />\n * </div>\n */\n\n/** Bullet sizes line up with the three shared `ComponentSize` values. */\ntype BulletChartSize = ComponentSize;\n\n/** Measure-bar sentiment — `auto` derives it from `value` vs `target`. */\ntype BulletChartStatus = \"auto\" | \"success\" | \"warning\";\n\ntype BulletChartLayout = {\n\t/** Thickness of the range-band track (the pill) in px. */\n\ttrackHeight: number;\n\t/** Thickness of the centered measure bar in px. */\n\tmeasureHeight: number;\n\t/** Height of the target marker in px — taller than the bar, inside the track. */\n\tmarkerHeight: number;\n\t/** Target marker thickness in px. */\n\tmarkerWidth: number;\n\t/** Axis tick label class. */\n\ttickClass: string;\n};\n\nconst BULLET_CHART_LAYOUT: Record<BulletChartSize, BulletChartLayout> = {\n\tsm: {\n\t\ttrackHeight: 26,\n\t\tmeasureHeight: 11,\n\t\tmarkerHeight: 20,\n\t\tmarkerWidth: 3,\n\t\ttickClass: \"text-gdt-xs\",\n\t},\n\tmd: {\n\t\ttrackHeight: 34,\n\t\tmeasureHeight: 15,\n\t\tmarkerHeight: 26,\n\t\tmarkerWidth: 4,\n\t\ttickClass: \"text-gdt-sm\",\n\t},\n\tlg: {\n\t\ttrackHeight: 44,\n\t\tmeasureHeight: 19,\n\t\tmarkerHeight: 34,\n\t\tmarkerWidth: 5,\n\t\ttickClass: \"text-gdt-sm\",\n\t},\n};\n\n/**\n * Range-band shades, ordered poor → good. The base track is the lightest shade,\n * so the first (poorest) zone blends into it and each higher zone darkens —\n * giving the gauge its qualitative context without competing with the bar.\n */\nconst BULLET_RANGE_PALETTE = [\n\t\"var(--color-stone-200)\",\n\t\"var(--color-stone-300)\",\n\t\"var(--color-stone-400)\",\n] as const;\n\nconst STATUS_COLOR: Record<Exclude<BulletChartStatus, \"auto\">, string> = {\n\tsuccess: \"var(--color-status-success)\",\n\twarning: \"var(--color-status-warning)\",\n};\n\n/** Clamp a value into [min, max] and express it as a 0–100 track percentage. */\nfunction toPercent(value: number, min: number, max: number) {\n\tif (max <= min) return 0;\n\tconst ratio = (value - min) / (max - min);\n\treturn Math.min(Math.max(ratio, 0), 1) * 100;\n}\n\ntype BulletChartProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n\t/** The realized (actualized) value — drives the measure bar length. */\n\tvalue: number;\n\t/** The goal to beat — drives the target marker and the auto status colour. */\n\ttarget: number;\n\t/** Axis start. Default 0. */\n\tmin?: number;\n\t/** Axis end. Default the largest of `value`, `target`, and the top range. */\n\tmax?: number;\n\t/** Internal thresholds dividing [min, max] into qualitative zones, ascending. */\n\tranges?: number[];\n\t/** Axis tick values. Default `[min, midpoint, max]`. Pass `[]` to hide. */\n\tticks?: number[];\n\t/** Measure-bar sentiment. Default `auto` (success when `value >= target`). */\n\tstatus?: BulletChartStatus;\n\t/** Explicit size; otherwise inherited from the nearest `SizeProvider`. */\n\tsize?: BulletChartSize;\n\t/** Format the tick labels (and the aria summary). Default grouped integer. */\n\tvalueFormatter?: (value: number) => string;\n};\n\nfunction BulletChart({\n\tvalue,\n\ttarget,\n\tmin = 0,\n\tmax,\n\tranges,\n\tticks,\n\tstatus = \"auto\",\n\tsize,\n\tvalueFormatter = (v) => v.toLocaleString(\"en-NG\"),\n\tclassName,\n\t...props\n}: BulletChartProps) {\n\tconst layout = BULLET_CHART_LAYOUT[useComponentSize(size)];\n\n\tconst topRange = ranges?.length ? Math.max(...ranges) : 0;\n\tconst resolvedMax = max ?? (Math.max(value, target, topRange) || 1);\n\tconst resolvedTicks = ticks ?? [min, (min + resolvedMax) / 2, resolvedMax];\n\n\tconst resolvedStatus =\n\t\tstatus === \"auto\" ? (value >= target ? \"success\" : \"warning\") : status;\n\tconst measureColor = STATUS_COLOR[resolvedStatus];\n\n\t// Zones are the spans between consecutive thresholds (and the axis bounds).\n\tconst thresholds = [\n\t\tmin,\n\t\t...(ranges ?? [])\n\t\t\t.filter((r) => r > min && r < resolvedMax)\n\t\t\t.sort((a, b) => a - b),\n\t\tresolvedMax,\n\t];\n\tconst zones = thresholds.slice(0, -1).map((from, i) => ({\n\t\tfrom,\n\t\tto: thresholds[i + 1],\n\t\tcolor: BULLET_RANGE_PALETTE[Math.min(i, BULLET_RANGE_PALETTE.length - 1)],\n\t}));\n\n\tconst ariaLabel =\n\t\t(props[\"aria-label\"] as string | undefined) ??\n\t\t`${valueFormatter(value)} of ${valueFormatter(target)} target — ${\n\t\t\tresolvedStatus === \"success\" ? \"on track\" : \"behind\"\n\t\t}`;\n\n\treturn (\n\t\t<div\n\t\t\t{...props}\n\t\t\trole=\"img\"\n\t\t\taria-label={ariaLabel}\n\t\t\tclassName={cn(\"flex w-full flex-col gap-2\", className)}\n\t\t>\n\t\t\t<div className=\"relative w-full\" style={{ height: layout.trackHeight }}>\n\t\t\t\t{/* Range bands — the lightest shade is the full-width base track,\n\t\t\t\t darker zones layer on top, all clipped to the pill. */}\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"absolute inset-0 overflow-hidden rounded-full\"\n\t\t\t\t\tstyle={{ backgroundColor: BULLET_RANGE_PALETTE[0] }}\n\t\t\t\t>\n\t\t\t\t\t{zones.map((zone) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={zone.from}\n\t\t\t\t\t\t\tclassName=\"absolute inset-y-0\"\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tleft: `${toPercent(zone.from, min, resolvedMax)}%`,\n\t\t\t\t\t\t\t\twidth: `${\n\t\t\t\t\t\t\t\t\ttoPercent(zone.to, min, resolvedMax) -\n\t\t\t\t\t\t\t\t\ttoPercent(zone.from, min, resolvedMax)\n\t\t\t\t\t\t\t\t}%`,\n\t\t\t\t\t\t\t\tbackgroundColor: zone.color,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\n\t\t\t\t{/* Measure / actual bar — centered, thinner than the track. */}\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"absolute left-0 top-1/2 rounded-full\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\theight: layout.measureHeight,\n\t\t\t\t\t\twidth: `${toPercent(value, min, resolvedMax)}%`,\n\t\t\t\t\t\tbackgroundColor: measureColor,\n\t\t\t\t\t\ttransform: \"translateY(-50%)\",\n\t\t\t\t\t}}\n\t\t\t\t/>\n\n\t\t\t\t{/* Target / forecast marker — taller than the bar, inside the track. */}\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"absolute top-1/2 rounded-full bg-fg-primary\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\theight: layout.markerHeight,\n\t\t\t\t\t\twidth: layout.markerWidth,\n\t\t\t\t\t\tleft: `${toPercent(target, min, resolvedMax)}%`,\n\t\t\t\t\t\ttransform: \"translate(-50%, -50%)\",\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{resolvedTicks.length > 0 && (\n\t\t\t\t<div className=\"relative h-4 w-full\">\n\t\t\t\t\t{resolvedTicks.map((tick) => {\n\t\t\t\t\t\tconst pct = toPercent(tick, min, resolvedMax);\n\t\t\t\t\t\tconst transform =\n\t\t\t\t\t\t\tpct <= 0\n\t\t\t\t\t\t\t\t? \"translateX(0)\"\n\t\t\t\t\t\t\t\t: pct >= 100\n\t\t\t\t\t\t\t\t\t? \"translateX(-100%)\"\n\t\t\t\t\t\t\t\t\t: \"translateX(-50%)\";\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tkey={tick}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"absolute top-0 whitespace-nowrap tabular-nums text-fg-caption-placeholder\",\n\t\t\t\t\t\t\t\t\tlayout.tickClass,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tstyle={{ left: `${pct}%`, transform }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{valueFormatter(tick)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport { BULLET_CHART_LAYOUT, BULLET_RANGE_PALETTE, BulletChart };\nexport type {\n\tBulletChartLayout,\n\tBulletChartProps,\n\tBulletChartSize,\n\tBulletChartStatus,\n};\n"],"mappings":";;;;;;;;;AAiMG,SAQG,KARH;AAtHH,IAAM,sBAAkE;AAAA,EACvE,IAAI;AAAA,IACH,aAAa;AAAA,IACb,eAAe;AAAA,IACf,cAAc;AAAA,IACd,aAAa;AAAA,IACb,WAAW;AAAA,EACZ;AAAA,EACA,IAAI;AAAA,IACH,aAAa;AAAA,IACb,eAAe;AAAA,IACf,cAAc;AAAA,IACd,aAAa;AAAA,IACb,WAAW;AAAA,EACZ;AAAA,EACA,IAAI;AAAA,IACH,aAAa;AAAA,IACb,eAAe;AAAA,IACf,cAAc;AAAA,IACd,aAAa;AAAA,IACb,WAAW;AAAA,EACZ;AACD;AAOA,IAAM,uBAAuB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAM,eAAmE;AAAA,EACxE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,YACL,OAAO,IACJ,kBACA,OAAO,MACN,sBACA;AACL,iBACC;AAAA,YAAC;AAAA;AAAA,cAEA,WAAW;AAAA,gBACV;AAAA,gBACA,OAAO;AAAA,cACR;AAAA,cACA,OAAO,EAAE,MAAM,GAAG,GAAG,KAAK,UAAU;AAAA,cAEnC,yBAAe,IAAI;AAAA;AAAA,YAPf;AAAA,UAQN;AAAA,QAEF,CAAC,GACF;AAAA;AAAA;AAAA,EAEF;AAEF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/button-group.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"./lib/cn\";\nimport { Separator } from \"./separator\";\nimport {\n\ttype ComponentSize,\n\tSizeProvider,\n\tuseComponentSize,\n} from \"./size-context\";\n\nconst buttonGroupVariants = cva(\n\t\"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n\t{\n\t\tvariants: {\n\t\t\torientation: {\n\t\t\t\thorizontal:\n\t\t\t\t\t\"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-full! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0\",\n\t\t\t\tvertical:\n\t\t\t\t\t\"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-full! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\torientation: \"horizontal\",\n\t\t},\n\t},\n);\n\nfunction ButtonGroup({\n\tclassName,\n\torientation,\n\t...props\n}: React.ComponentProps<\"div\"> &\n\tVariantProps<typeof buttonGroupVariants> & { size?: ComponentSize }) {\n\tconst size = useComponentSize();\n\n\treturn (\n\t\t<SizeProvider size={size}>\n\t\t\t{/* biome-ignore lint/a11y/useSemanticElements: this primitive groups composite controls without forcing fieldset semantics. */}\n\t\t\t<div\n\t\t\t\trole=\"group\"\n\t\t\t\tdata-slot=\"button-group\"\n\t\t\t\tdata-orientation={orientation}\n\t\t\t\tclassName={cn(buttonGroupVariants({ orientation }), className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</SizeProvider>\n\t);\n}\n\nfunction ButtonGroupText({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"div\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"div\",\n\t\tprops: mergeProps<\"div\">(\n\t\t\t{\n\t\t\t\tclassName: cn(\n\t\t\t\t\t\"flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\t\tclassName,\n\t\t\t\t),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t\tstate: {\n\t\t\tslot: \"button-group-text\",\n\t\t},\n\t});\n}\n\nfunction ButtonGroupSeparator({\n\tclassName,\n\torientation = \"vertical\",\n\t...props\n}: React.ComponentProps<typeof Separator>) {\n\treturn (\n\t\t<Separator\n\t\t\tdata-slot=\"button-group-separator\"\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tButtonGroup,\n\tButtonGroupSeparator,\n\tButtonGroupText,\n\tbuttonGroupVariants,\n};\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,WAA8B;AAqCpC;AA5BH,IAAM,sBAAsB;AAAA,EAC3B;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,aAAa;AAAA,QACZ,YACC;AAAA,QACD,UACC;AAAA,MACF;AAAA,IACD;AAAA,IACA,iBAAiB;AAAA,MAChB,aAAa;AAAA,IACd;AAAA,EACD;AACD;AAEA,SAAS,YAAY;AAAA,EACpB;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GACsE;AACrE,QAAM,OAAO,iBAAiB;AAE9B,SACC,oBAAC,gBAAa,MAEb;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACL,aAAU;AAAA,MACV,oBAAkB;AAAA,MAClB,WAAW,GAAG,oBAAoB,EAAE,YAAY,CAAC,GAAG,SAAS;AAAA,MAC5D,GAAG;AAAA;AAAA,EACL,GACD;AAEF;AAEA,SAAS,gBAAgB;AAAA,EACxB;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAoC;AACnC,SAAO,UAAU;AAAA,IAChB,gBAAgB;AAAA,IAChB,OAAO;AAAA,MACN;AAAA,QACC,WAAW;AAAA,UACV;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,IACD;AAAA,IACA;AAAA,IACA,OAAO;AAAA,MACN,MAAM;AAAA,IACP;AAAA,EACD,CAAC;AACF;AAEA,SAAS,qBAAqB;AAAA,EAC7B;AAAA,EACA,cAAc;AAAA,EACd,GAAG;AACJ,GAA2C;AAC1C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/card.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/card.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"./lib/cn\";\n\nconst cardVariants = cva(\n\t\"group/card relative flex w-full min-w-0 flex-col gap-5 rounded-2xl border border-line-subtle bg-canvas py-gdt-xl text-fg-primary shadow-1 transition-[background-color,border-color,box-shadow,transform] outline-none has-[[data-slot=card-action]:hover]:shadow-2 has-[[data-slot=card-action]:focus-visible]:border-line-focus has-[[data-slot=card-action]:focus-visible]inset-ring-1 has-[[data-slot=card-action]:focus-visible]:ring-line-focus has-[[data-slot=card-action]:active]:border-line-subtle has-[[data-slot=card-action]:active]:bg-surface has-[[data-slot=card-action]:active]:shadow-none!\",\n\t{\n\t\tvariants: {\n\t\t\tselected: {\n\t\t\t\ttrue: \"border-line-focus bg-surface-brand-subtle inset-ring-1 inset-ring-line-focus has-[[data-slot=card-action]:hover]:border-line-focus has-[[data-slot=card-action]:hover]:bg-surface-brand-subtle has-[[data-slot=card-action]:hover]:inset-ring-1 has-[[data-slot=card-action]:active]:border-line-focus has-[[data-slot=card-action]:active]:bg-surface-brand-subtle has-[[data-slot=card-action]:active]:inset-ring-1 has-[[data-slot=card-action]:active]:inset-ring-line-focus\",\n\t\t\t\tfalse: \"\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tselected: false,\n\t\t},\n\t},\n);\n\ntype CardProps = useRender.ComponentProps<\"article\"> &\n\tVariantProps<typeof cardVariants>;\n\nfunction Card({ className, render, selected = false, ...props }: CardProps) {\n\treturn useRender({\n\t\tdefaultTagName: \"article\",\n\t\tprops: mergeProps<\"article\">(\n\t\t\t{\n\t\t\t\tclassName: cn(cardVariants({ selected }), className),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t\tstate: {\n\t\t\tselected,\n\t\t\tslot: \"card\",\n\t\t},\n\t});\n}\n\nfunction CardTitle({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"h3\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"h3\",\n\t\tprops: mergeProps<\"h3\">(\n\t\t\t{\n\t\t\t\tclassName: cn(\"text-gdt-h5 text-fg-primary\", className),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t});\n}\n\nfunction CardHeader({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"div\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"div\",\n\t\tprops: mergeProps<\"div\">(\n\t\t\t{\n\t\t\t\tclassName: cn(\"flex min-w-0 flex-col gap-gdt-sm px-gdt-xl\", className),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t});\n}\n\nfunction CardDescription({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"p\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"p\",\n\t\tprops: mergeProps<\"p\">(\n\t\t\t{\n\t\t\t\tclassName: cn(\"text-gdt-sm font-normal text-fg-primary\", className),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t});\n}\n\nfunction CardContent({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"div\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"div\",\n\t\tprops: mergeProps<\"div\">(\n\t\t\t{\n\t\t\t\tclassName: cn(\n\t\t\t\t\t\"min-w-0 px-gdt-xl text-gdt-sm text-fg-primary\",\n\t\t\t\t\tclassName,\n\t\t\t\t),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t});\n}\n\nfunction CardFooter({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"div\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"div\",\n\t\tprops: mergeProps<\"div\">(\n\t\t\t{\n\t\t\t\tclassName: cn(\n\t\t\t\t\t\"flex min-w-0 px-gdt-xl flex-wrap items-center justify-end gap-gdt-sm\",\n\t\t\t\t\tclassName,\n\t\t\t\t),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t});\n}\n\nfunction CardAction({\n\tclassName,\n\trender,\n\t...props\n}: useRender.ComponentProps<\"button\">) {\n\treturn useRender({\n\t\tdefaultTagName: \"button\",\n\t\tprops: mergeProps<\"button\">(\n\t\t\t{\n\t\t\t\t// @ts-expect-error — data-* attrs are valid but not in mergeProps generic\n\t\t\t\t\"data-slot\": \"card-action\",\n\t\t\t\tclassName: cn(\n\t\t\t\t\t\"cursor-pointer focus-visible:outline-none before:absolute before:inset-0 before:content-['']\",\n\t\t\t\t\tclassName,\n\t\t\t\t),\n\t\t\t},\n\t\t\tprops,\n\t\t),\n\t\trender,\n\t});\n}\n\n/**\n * Card is always a semantic container (article). Use CardAction to make the\n * whole card interactive — it stretches a ::before pseudo-element over the\n * entire card area while keeping the markup accessible.\n *\n * CardAction defaults to `button` but accepts any interactive element via\n * the `render` prop (e.g. `render={<a href=\"...\" />}` or\n * `render={<label htmlFor=\"my-checkbox\" />}`).\n *\n * Other interactive elements inside the card (e.g. footer buttons) must have\n * `className=\"relative\"` so they stack above CardAction's pseudo-element.\n *\n * <Card>\n * <CardAction render={<a href=\"/path\" />} />\n * <CardHeader>\n * <CardTitle>Card Title</CardTitle>\n * <CardDescription>\n * Body content area for descriptive text, supporting copy, or other\n * inline content as needed.\n * </CardDescription>\n * </CardHeader>\n * <CardContent>{...}</CardContent>\n * <CardFooter>\n * <Button variant=\"tertiary\" size=\"sm\" className=\"relative\">Cancel</Button>\n * <Button size=\"sm\" className=\"relative\">Confirm</Button>\n * </CardFooter>\n * </Card>\n */\nexport {\n\tCard,\n\tCardAction,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n\tcardVariants,\n};\nexport type { CardProps };\n"],"mappings":";;;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,WAA8B;AAIvC,IAAM,eAAe;AAAA,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AAAA,EACpB;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAoC;AACnC,SAAO,UAAU;AAAA,IAChB,gBAAgB;AAAA,IAChB,OAAO;AAAA,MACN;AAAA,QACC,WAAW;AAAA,UACV;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,IACD;AAAA,IACA;AAAA,EACD,CAAC;AACF;AAEA,SAAS,WAAW;AAAA,EACnB;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAoC;AACnC,SAAO,UAAU;AAAA,IAChB,gBAAgB;AAAA,IAChB,OAAO;AAAA,MACN;AAAA,QACC,WAAW;AAAA,UACV;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,IACD;AAAA,IACA;AAAA,EACD,CAAC;AACF;AAEA,SAAS,WAAW;AAAA,EACnB;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAuC;AACtC,SAAO,UAAU;AAAA,IAChB,gBAAgB;AAAA,IAChB,OAAO;AAAA,MACN;AAAA;AAAA,QAEC,aAAa;AAAA,QACb,WAAW;AAAA,UACV;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,IACD;AAAA,IACA;AAAA,EACD,CAAC;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/chart.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\";\nimport { CheckboxGroup } from \"@base-ui/react/checkbox-group\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { CheckIcon } from \"lucide-react\";\n\nimport { cn } from \"./lib/cn\";\nimport { useComponentSize } from \"./size-context\";\n\nconst checkboxVariants = cva(\n\t\"peer group/checkbox relative flex shrink-0 items-center justify-center rounded-sm border bg-canvas text-transparent outline-none transition-[background-color,border-color,box-shadow,color] after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] aria-invalid:border-line-danger aria-invalid:ring-3 aria-invalid:ring-destructive/20 border-line data-unchecked:hover:border-line-focus data-unchecked:hover:bg-surface-brand-subtle data-checked:border-action-primary data-checked:bg-action-primary data-checked:text-fg-on-brand data-disabled:cursor-not-allowed data-disabled:border-line-subtle data-disabled:bg-surface data-disabled:text-fg-caption-placeholder size-5 [--checkbox-icon-size:0.75rem] group-data-[size=sm]/field:size-4 group-data-[size=sm]/field:[--checkbox-icon-size:0.625rem] group-data-[size=md]/field:size-5 group-data-[size=md]/field:[--checkbox-icon-size:0.75rem] group-data-[size=lg]/field:size-6 group-data-[size=lg]/field:[--checkbox-icon-size:0.875rem]\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"size-4 [--checkbox-icon-size:0.625rem]\",\n\t\t\t\tmd: \"size-5 [--checkbox-icon-size:0.75rem]\",\n\t\t\t\tlg: \"size-6 [--checkbox-icon-size:0.875rem]\",\n\t\t\t},\n\t\t},\n\t},\n);\n\ntype CheckboxSize = NonNullable<VariantProps<typeof checkboxVariants>[\"size\"]>;\ntype CheckboxProps = CheckboxPrimitive.Root.Props & {\n\tsize?: CheckboxSize;\n};\n\n/**\n * Compose with the shared field primitives for label and helper text.\n *\n * ```tsx\n * <Field orientation=\"horizontal\" size=\"sm\">\n * <Checkbox id=\"terms\" />\n * <FieldContent>\n * <FieldLabel htmlFor=\"terms\">Checkbox label</FieldLabel>\n * <FieldDescription>Helper description text.</FieldDescription>\n * </FieldContent>\n * </Field>\n * ```\n *\n * Group multiple checkboxes with the field set primitives.\n *\n * ```tsx\n * <FieldSet>\n * <FieldLegend variant=\"label\">Show these items on the desktop:</FieldLegend>\n * <FieldDescription>\n * Select the items you want to show on the desktop.\n * </FieldDescription>\n * <FieldGroup className=\"gap-3\">\n * <Field orientation=\"horizontal\">\n * <Checkbox id=\"desktop-hard-disks\" name=\"desktop-hard-disks\" defaultChecked />\n * <FieldLabel htmlFor=\"desktop-hard-disks\" className=\"font-normal\">\n * Hard disks\n * </FieldLabel>\n * </Field>\n * <Field orientation=\"horizontal\">\n * <Checkbox\n * id=\"desktop-external-disks\"\n * name=\"desktop-external-disks\"\n * defaultChecked\n * />\n * <FieldLabel htmlFor=\"desktop-external-disks\" className=\"font-normal\">\n * External disks\n * </FieldLabel>\n * </Field>\n * <Field orientation=\"horizontal\">\n * <Checkbox id=\"desktop-cds-dvds-ipods\" name=\"desktop-cds-dvds-ipods\" />\n * <FieldLabel htmlFor=\"desktop-cds-dvds-ipods\" className=\"font-normal\">\n * CDs, DVDs, and iPods\n * </FieldLabel>\n * </Field>\n * <Field orientation=\"horizontal\">\n * <Checkbox\n * id=\"desktop-connected-servers\"\n * name=\"desktop-connected-servers\"\n * />\n * <FieldLabel htmlFor=\"desktop-connected-servers\" className=\"font-normal\">\n * Connected servers\n * </FieldLabel>\n * </Field>\n * </FieldGroup>\n * </FieldSet>\n * ```\n */\nfunction Checkbox({ className, size, ...props }: CheckboxProps) {\n\tconst resolvedSize = useComponentSize(size);\n\n\treturn (\n\t\t<CheckboxPrimitive.Root\n\t\t\tdata-slot=\"checkbox\"\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(checkboxVariants({ size: resolvedSize }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<CheckboxPrimitive.Indicator\n\t\t\t\tdata-slot=\"checkbox-indicator\"\n\t\t\t\tclassName=\"grid place-content-center text-current transition-none [&>svg]:size-(--checkbox-icon-size)\"\n\t\t\t>\n\t\t\t\t<CheckIcon />\n\t\t\t</CheckboxPrimitive.Indicator>\n\t\t</CheckboxPrimitive.Root>\n\t);\n}\n\nexport { Checkbox, CheckboxGroup, checkboxVariants };\n"],"mappings":";;;;;;;;;AAEA,SAAS,YAAY,yBAAyB;AAC9C,SAAS,qBAAqB;AAC9B,SAAS,WAA8B;AACvC,SAAS,iBAAiB;AA8FtB;AAzFJ,IAAM,mBAAmB;AAAA,EACxB;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,MAAM;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACD;AAAA,EACD;AACD;AAgEA,SAAS,SAAS,EAAE,WAAW,MAAM,GAAG,MAAM,GAAkB;AAC/D,QAAM,eAAe,iBAAiB,IAAI;AAE1C,SACC;AAAA,IAAC,kBAAkB;AAAA,IAAlB;AAAA,MACA,aAAU;AAAA,MACV,aAAW;AAAA,MACX,WAAW,GAAG,iBAAiB,EAAE,MAAM,aAAa,CAAC,GAAG,SAAS;AAAA,MAChE,GAAG;AAAA,MAEJ;AAAA,QAAC,kBAAkB;AAAA,QAAlB;AAAA,UACA,aAAU;AAAA,UACV,WAAU;AAAA,UAEV,8BAAC,aAAU;AAAA;AAAA,MACZ;AAAA;AAAA,EACD;AAEF;","names":[]}
@@ -1,278 +0,0 @@
1
- import {
2
- SizeProvider,
3
- useComponentSize
4
- } from "./chunk-HL3ZSYES.js";
5
- import {
6
- cn
7
- } from "./chunk-Y4TTYVNE.js";
8
-
9
- // src/progress.tsx
10
- import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
11
- import { cva } from "class-variance-authority";
12
- import * as React from "react";
13
- import { jsx, jsxs } from "react/jsx-runtime";
14
- var progressVariants = cva(
15
- "group/progress flex w-full flex-wrap items-center",
16
- {
17
- variants: {
18
- size: {
19
- sm: "gap-x-2 gap-y-1.5",
20
- md: "gap-x-3 gap-y-2",
21
- lg: "gap-x-4 gap-y-2.5"
22
- }
23
- },
24
- defaultVariants: {
25
- size: "md"
26
- }
27
- }
28
- );
29
- var circularProgressVariants = cva(
30
- "relative grid place-items-center text-fg-on-brand",
31
- {
32
- variants: {
33
- size: {
34
- sm: "text-[9px]",
35
- md: "text-[10px]",
36
- lg: "text-gdt-xs"
37
- }
38
- },
39
- defaultVariants: {
40
- size: "md"
41
- }
42
- }
43
- );
44
- var circularProgressLabelVariants = cva(
45
- "relative z-10 font-medium tabular-nums leading-none",
46
- {
47
- variants: {
48
- size: {
49
- sm: "text-[9px]",
50
- md: "text-[10px]",
51
- lg: "text-gdt-xs"
52
- },
53
- overlay: {
54
- true: "grid place-items-center rounded-full bg-black/65 text-white shadow-sm backdrop-blur-[1px]",
55
- false: ""
56
- }
57
- },
58
- defaultVariants: {
59
- size: "md",
60
- overlay: false
61
- }
62
- }
63
- );
64
- var circularProgressSizes = {
65
- sm: { pixelSize: 40, strokeWidth: 3 },
66
- md: { pixelSize: 48, strokeWidth: 4 },
67
- lg: { pixelSize: 56, strokeWidth: 5 }
68
- };
69
- function Progress({
70
- className,
71
- children,
72
- value,
73
- size,
74
- disabled = false,
75
- ...props
76
- }) {
77
- const resolvedSize = useComponentSize(size);
78
- const hasCustomTrack = React.Children.toArray(children).some(
79
- (child) => React.isValidElement(child) && child.type === ProgressTrack
80
- );
81
- return /* @__PURE__ */ jsx(SizeProvider, { size: resolvedSize, children: /* @__PURE__ */ jsxs(
82
- ProgressPrimitive.Root,
83
- {
84
- value,
85
- "aria-disabled": disabled || void 0,
86
- "data-disabled": disabled,
87
- "data-size": resolvedSize,
88
- "data-slot": "progress",
89
- className: cn(progressVariants({ size: resolvedSize }), className),
90
- ...props,
91
- children: [
92
- children,
93
- !hasCustomTrack && /* @__PURE__ */ jsx(ProgressTrack, { children: /* @__PURE__ */ jsx(ProgressIndicator, {}) })
94
- ]
95
- }
96
- ) });
97
- }
98
- function ProgressTrack({ className, ...props }) {
99
- return /* @__PURE__ */ jsx(
100
- ProgressPrimitive.Track,
101
- {
102
- className: cn(
103
- "order-3 relative flex basis-full items-center overflow-hidden rounded-full bg-surface-raised",
104
- "group-data-[size=sm]/progress:h-1 group-data-[size=md]/progress:h-1.5 group-data-[size=lg]/progress:h-2",
105
- className
106
- ),
107
- "data-slot": "progress-track",
108
- ...props
109
- }
110
- );
111
- }
112
- function ProgressIndicator({
113
- className,
114
- ...props
115
- }) {
116
- return /* @__PURE__ */ jsx(
117
- ProgressPrimitive.Indicator,
118
- {
119
- "data-slot": "progress-indicator",
120
- className: cn(
121
- "h-full rounded-full bg-action-primary transition-[width,transform,background-color] duration-300 ease-out group-data-[disabled=true]/progress:bg-line-strong",
122
- className
123
- ),
124
- ...props
125
- }
126
- );
127
- }
128
- function ProgressLabel({ className, ...props }) {
129
- return /* @__PURE__ */ jsx(
130
- ProgressPrimitive.Label,
131
- {
132
- className: cn(
133
- "order-1 min-w-0 text-fg-primary font-semibold leading-snug group-data-[disabled=true]/progress:text-fg-caption-placeholder",
134
- "group-data-[size=sm]/progress:text-gdt-xs group-data-[size=md]/progress:text-gdt-sm group-data-[size=lg]/progress:text-gdt-md",
135
- className
136
- ),
137
- "data-slot": "progress-label",
138
- ...props
139
- }
140
- );
141
- }
142
- function ProgressValue({ className, ...props }) {
143
- return /* @__PURE__ */ jsx(
144
- ProgressPrimitive.Value,
145
- {
146
- className: cn(
147
- "order-2 ml-auto shrink-0 tabular-nums text-fg-secondary leading-snug group-data-[disabled=true]/progress:text-fg-caption-placeholder",
148
- "group-data-[size=sm]/progress:text-gdt-xs group-data-[size=md]/progress:text-gdt-sm group-data-[size=lg]/progress:text-gdt-md",
149
- className
150
- ),
151
- "data-slot": "progress-value",
152
- ...props
153
- }
154
- );
155
- }
156
- function ProgressCaption({ className, ...props }) {
157
- return /* @__PURE__ */ jsx(
158
- "p",
159
- {
160
- className: cn(
161
- "order-4 basis-full text-fg-secondary leading-snug group-data-[disabled=true]/progress:text-fg-caption-placeholder",
162
- "group-data-[size=sm]/progress:text-gdt-subtext group-data-[size=md]/progress:text-gdt-xs group-data-[size=lg]/progress:text-gdt-sm",
163
- className
164
- ),
165
- "data-slot": "progress-caption",
166
- ...props
167
- }
168
- );
169
- }
170
- function CircularProgress({
171
- className,
172
- style,
173
- value,
174
- size,
175
- children,
176
- labelOverlay = false,
177
- pixelSize,
178
- strokeWidth,
179
- strokeLinecap = "round",
180
- ...props
181
- }) {
182
- const resolvedSize = useComponentSize(size);
183
- const normalizedValue = Number.isFinite(value) ? value : 0;
184
- const progress = Math.min(100, Math.max(0, Math.round(normalizedValue)));
185
- const resolvedDimensions = circularProgressSizes[resolvedSize];
186
- const resolvedPixelSize = pixelSize ?? resolvedDimensions.pixelSize;
187
- const resolvedStrokeWidth = strokeWidth ?? resolvedDimensions.strokeWidth;
188
- const radius = (resolvedPixelSize - resolvedStrokeWidth) / 2;
189
- const labelSize = resolvedPixelSize - resolvedStrokeWidth * 3;
190
- const circumference = 2 * Math.PI * radius;
191
- const strokeDashoffset = circumference - progress / 100 * circumference;
192
- return /* @__PURE__ */ jsxs(
193
- "div",
194
- {
195
- role: "progressbar",
196
- "aria-valuemin": 0,
197
- "aria-valuemax": 100,
198
- "aria-valuenow": progress,
199
- "aria-valuetext": `${progress}%`,
200
- "data-slot": "circular-progress",
201
- className: cn(
202
- circularProgressVariants({ size: resolvedSize }),
203
- className
204
- ),
205
- style: { width: resolvedPixelSize, height: resolvedPixelSize, ...style },
206
- ...props,
207
- children: [
208
- /* @__PURE__ */ jsxs(
209
- "svg",
210
- {
211
- "aria-hidden": "true",
212
- className: "absolute inset-0 -rotate-90 transform",
213
- focusable: "false",
214
- width: resolvedPixelSize,
215
- height: resolvedPixelSize,
216
- viewBox: `0 0 ${resolvedPixelSize} ${resolvedPixelSize}`,
217
- fill: "none",
218
- stroke: "currentColor",
219
- children: [
220
- /* @__PURE__ */ jsx(
221
- "circle",
222
- {
223
- className: "text-line",
224
- strokeWidth: resolvedStrokeWidth,
225
- cx: resolvedPixelSize / 2,
226
- cy: resolvedPixelSize / 2,
227
- r: radius
228
- }
229
- ),
230
- /* @__PURE__ */ jsx(
231
- "circle",
232
- {
233
- className: "text-action-primary transition-[stroke-dashoffset] duration-300 ease-linear",
234
- strokeWidth: resolvedStrokeWidth,
235
- strokeLinecap,
236
- strokeDasharray: circumference,
237
- strokeDashoffset,
238
- cx: resolvedPixelSize / 2,
239
- cy: resolvedPixelSize / 2,
240
- r: radius
241
- }
242
- )
243
- ]
244
- }
245
- ),
246
- children ?? /* @__PURE__ */ jsxs(
247
- "span",
248
- {
249
- className: cn(
250
- circularProgressLabelVariants({
251
- size: resolvedSize,
252
- overlay: labelOverlay
253
- })
254
- ),
255
- style: labelOverlay ? { width: labelSize, height: labelSize } : void 0,
256
- children: [
257
- progress,
258
- "%"
259
- ]
260
- }
261
- )
262
- ]
263
- }
264
- );
265
- }
266
-
267
- export {
268
- progressVariants,
269
- circularProgressVariants,
270
- Progress,
271
- ProgressTrack,
272
- ProgressIndicator,
273
- ProgressLabel,
274
- ProgressValue,
275
- ProgressCaption,
276
- CircularProgress
277
- };
278
- //# sourceMappingURL=chunk-322YCNVL.js.map