@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
@@ -1,116 +1,59 @@
1
- import {
2
- cn
3
- } from "./chunk-Y4TTYVNE.js";
4
-
5
- // src/empty-state.tsx
6
- import { cva } from "class-variance-authority";
1
+ import { t as cn } from "./cn-BI_4DMBf.js";
7
2
  import { jsx } from "react/jsx-runtime";
8
- function Empty({
9
- className,
10
- variant = "default",
11
- ...props
12
- }) {
13
- return /* @__PURE__ */ jsx(
14
- "div",
15
- {
16
- "data-slot": "empty",
17
- className: cn(
18
- "flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-gdt-xl rounded-2xl p-gdt-2xl text-center text-balance",
19
- variant === "filled" && "bg-surface-raised border border-line-subtle",
20
- variant === "outline" && "border border-line",
21
- className
22
- ),
23
- ...props
24
- }
25
- );
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/empty-state.tsx
5
+ function Empty({ className, variant = "default", ...props }) {
6
+ return /* @__PURE__ */ jsx("div", {
7
+ "data-slot": "empty",
8
+ className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-gdt-xl rounded-2xl p-gdt-2xl text-center text-balance", variant === "filled" && "bg-surface-raised border border-line-subtle", variant === "outline" && "border border-line", className),
9
+ ...props
10
+ });
26
11
  }
27
12
  function EmptyHeader({ className, ...props }) {
28
- return /* @__PURE__ */ jsx(
29
- "div",
30
- {
31
- "data-slot": "empty-header",
32
- className: cn(
33
- "flex w-full max-w-95 flex-col items-center gap-gdt-sm",
34
- className
35
- ),
36
- ...props
37
- }
38
- );
13
+ return /* @__PURE__ */ jsx("div", {
14
+ "data-slot": "empty-header",
15
+ className: cn("flex w-full max-w-95 flex-col items-center gap-gdt-sm", className),
16
+ ...props
17
+ });
39
18
  }
40
- var emptyMediaVariants = cva(
41
- "mb-gdt-sm flex shrink-0 items-center justify-center text-fg-brand [&_svg]:pointer-events-none [&_svg]:shrink-0",
42
- {
43
- variants: {
44
- variant: {
45
- default: "bg-transparent",
46
- icon: "size-24 rounded-full bg-surface-brand-subtle [&_svg:not([class*='size-'])]:size-10"
47
- }
48
- },
49
- defaultVariants: {
50
- variant: "default"
51
- }
52
- }
53
- );
54
- function EmptyMedia({
55
- className,
56
- variant = "default",
57
- ...props
58
- }) {
59
- return /* @__PURE__ */ jsx(
60
- "div",
61
- {
62
- "data-slot": "empty-media",
63
- "data-variant": variant,
64
- className: cn(emptyMediaVariants({ variant, className })),
65
- ...props
66
- }
67
- );
19
+ const emptyMediaVariants = cva("mb-gdt-sm flex shrink-0 items-center justify-center text-fg-brand [&_svg]:pointer-events-none [&_svg]:shrink-0", {
20
+ variants: { variant: {
21
+ default: "bg-transparent",
22
+ icon: "size-24 rounded-full bg-surface-brand-subtle [&_svg:not([class*='size-'])]:size-10"
23
+ } },
24
+ defaultVariants: { variant: "default" }
25
+ });
26
+ function EmptyMedia({ className, variant = "default", ...props }) {
27
+ return /* @__PURE__ */ jsx("div", {
28
+ "data-slot": "empty-media",
29
+ "data-variant": variant,
30
+ className: cn(emptyMediaVariants({
31
+ variant,
32
+ className
33
+ })),
34
+ ...props
35
+ });
68
36
  }
69
37
  function EmptyTitle({ className, ...props }) {
70
- return /* @__PURE__ */ jsx(
71
- "div",
72
- {
73
- "data-slot": "empty-title",
74
- className: cn(
75
- "text-gdt-h4 font-extrabold tracking-tight text-fg-primary",
76
- className
77
- ),
78
- ...props
79
- }
80
- );
38
+ return /* @__PURE__ */ jsx("div", {
39
+ "data-slot": "empty-title",
40
+ className: cn("text-gdt-h4 font-extrabold tracking-tight text-fg-primary", className),
41
+ ...props
42
+ });
81
43
  }
82
44
  function EmptyDescription({ className, ...props }) {
83
- return /* @__PURE__ */ jsx(
84
- "p",
85
- {
86
- "data-slot": "empty-description",
87
- className: cn(
88
- "max-w-95 text-gdt-md font-normal text-fg-secondary [&>a]:font-semibold [&>a]:text-fg-brand [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-fg-primary",
89
- className
90
- ),
91
- ...props
92
- }
93
- );
45
+ return /* @__PURE__ */ jsx("p", {
46
+ "data-slot": "empty-description",
47
+ className: cn("max-w-95 text-gdt-md font-normal text-fg-secondary [&>a]:font-semibold [&>a]:text-fg-brand [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-fg-primary", className),
48
+ ...props
49
+ });
94
50
  }
95
51
  function EmptyContent({ className, ...props }) {
96
- return /* @__PURE__ */ jsx(
97
- "div",
98
- {
99
- "data-slot": "empty-content",
100
- className: cn(
101
- "flex w-full max-w-95 min-w-0 flex-col items-center justify-center gap-gdt-sm text-gdt-sm text-balance sm:flex-row [&_[data-slot=button]]:w-full sm:[&_[data-slot=button]]:w-auto",
102
- className
103
- ),
104
- ...props
105
- }
106
- );
52
+ return /* @__PURE__ */ jsx("div", {
53
+ "data-slot": "empty-content",
54
+ className: cn("flex w-full max-w-95 min-w-0 flex-col items-center justify-center gap-gdt-sm text-gdt-sm text-balance sm:flex-row [&_[data-slot=button]]:w-full sm:[&_[data-slot=button]]:w-auto", className),
55
+ ...props
56
+ });
107
57
  }
108
- export {
109
- Empty,
110
- EmptyContent,
111
- EmptyDescription,
112
- EmptyHeader,
113
- EmptyMedia,
114
- EmptyTitle
115
- };
116
- //# sourceMappingURL=empty-state.js.map
58
+ //#endregion
59
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
package/dist/field.d.ts CHANGED
@@ -1,29 +1,27 @@
1
- import * as class_variance_authority_types from 'class-variance-authority/types';
2
- import * as React$1 from 'react';
3
- import { VariantProps } from 'class-variance-authority';
4
- import { Label } from './label.js';
5
-
6
- declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): React$1.JSX.Element;
1
+ import { Label } from "./label.js";
2
+ import { VariantProps } from "class-variance-authority";
3
+ //#region src/field.d.ts
4
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react").JSX.Element;
7
5
  declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
8
- variant?: "legend" | "label";
9
- }): React$1.JSX.Element;
10
- declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
6
+ variant?: "legend" | "label";
7
+ }): import("react").JSX.Element;
8
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
11
9
  declare const fieldVariants: (props?: ({
12
- orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
13
- size?: "sm" | "md" | "lg" | null | undefined;
14
- } & class_variance_authority_types.ClassProp) | undefined) => string;
15
- declare function Field({ className, orientation, size, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): React$1.JSX.Element;
16
- declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
17
- declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React$1.JSX.Element;
18
- declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
19
- declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): React$1.JSX.Element;
10
+ orientation?: "horizontal" | "responsive" | "vertical" | null | undefined;
11
+ size?: "lg" | "md" | "sm" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ declare function Field({ className, orientation, size, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
14
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
15
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react").JSX.Element;
16
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
17
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
20
18
  declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
21
- children?: React.ReactNode;
22
- }): React$1.JSX.Element;
19
+ children?: React.ReactNode;
20
+ }): import("react").JSX.Element;
23
21
  declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
24
- errors?: Array<{
25
- message?: string;
26
- } | undefined>;
27
- }): React$1.JSX.Element | null;
28
-
29
- export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
22
+ errors?: Array<{
23
+ message?: string;
24
+ } | undefined>;
25
+ }): import("react").JSX.Element | null;
26
+ //#endregion
27
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
package/dist/field.js CHANGED
@@ -1,240 +1,129 @@
1
1
  "use client";
2
- import {
3
- Label
4
- } from "./chunk-7TBMLFGW.js";
5
- import {
6
- Separator
7
- } from "./chunk-CHII2QHH.js";
8
- import {
9
- SizeProvider,
10
- useComponentSize
11
- } from "./chunk-HL3ZSYES.js";
12
- import {
13
- cn
14
- } from "./chunk-Y4TTYVNE.js";
15
-
16
- // src/field.tsx
2
+ import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { SizeProvider, useComponentSize } from "./size-context.js";
4
+ import { Separator } from "./separator.js";
5
+ import { Label } from "./label.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
17
7
  import { cva } from "class-variance-authority";
18
8
  import { useMemo } from "react";
19
- import { jsx, jsxs } from "react/jsx-runtime";
9
+ //#region src/field.tsx
20
10
  function FieldSet({ className, ...props }) {
21
- return /* @__PURE__ */ jsx(
22
- "fieldset",
23
- {
24
- "data-slot": "field-set",
25
- className: cn(
26
- "flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
27
- className
28
- ),
29
- ...props
30
- }
31
- );
11
+ return /* @__PURE__ */ jsx("fieldset", {
12
+ "data-slot": "field-set",
13
+ className: cn("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
14
+ ...props
15
+ });
32
16
  }
33
- function FieldLegend({
34
- className,
35
- variant = "legend",
36
- ...props
37
- }) {
38
- return /* @__PURE__ */ jsx(
39
- "legend",
40
- {
41
- "data-slot": "field-legend",
42
- "data-variant": variant,
43
- className: cn(
44
- "text-fg-primary data-[variant=label]:text-gdt-sm data-[variant=label]:font-semibold data-[variant=legend]:text-gdt-md data-[variant=legend]:font-medium",
45
- className
46
- ),
47
- ...props
48
- }
49
- );
17
+ function FieldLegend({ className, variant = "legend", ...props }) {
18
+ return /* @__PURE__ */ jsx("legend", {
19
+ "data-slot": "field-legend",
20
+ "data-variant": variant,
21
+ className: cn("text-fg-primary data-[variant=label]:text-gdt-sm data-[variant=label]:font-semibold data-[variant=legend]:text-gdt-md data-[variant=legend]:font-medium", className),
22
+ ...props
23
+ });
50
24
  }
51
25
  function FieldGroup({ className, ...props }) {
52
- return /* @__PURE__ */ jsx(
53
- "div",
54
- {
55
- "data-slot": "field-group",
56
- className: cn(
57
- "group/field-group @container/field-group flex w-full flex-col gap-6 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
58
- className
59
- ),
60
- ...props
61
- }
62
- );
26
+ return /* @__PURE__ */ jsx("div", {
27
+ "data-slot": "field-group",
28
+ className: cn("group/field-group @container/field-group flex w-full flex-col gap-6 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", className),
29
+ ...props
30
+ });
63
31
  }
64
- var fieldVariants = cva("group/field flex w-full", {
65
- variants: {
66
- orientation: {
67
- vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
68
- horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio],[role=switch]]:mt-px data-[size=sm]:gap-1.5 data-[size=md]:gap-2.5 data-[size=lg]:gap-3",
69
- responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio],[role=switch]]:mt-px"
70
- },
71
- size: {
72
- sm: "gap-1",
73
- md: "gap-1.5",
74
- lg: "gap-2"
75
- }
76
- },
77
- defaultVariants: {
78
- orientation: "vertical",
79
- size: "md"
80
- }
32
+ const fieldVariants = cva("group/field flex w-full", {
33
+ variants: {
34
+ orientation: {
35
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
36
+ horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio],[role=switch]]:mt-px data-[size=sm]:gap-1.5 data-[size=md]:gap-2.5 data-[size=lg]:gap-3",
37
+ responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio],[role=switch]]:mt-px"
38
+ },
39
+ size: {
40
+ sm: "gap-1",
41
+ md: "gap-1.5",
42
+ lg: "gap-2"
43
+ }
44
+ },
45
+ defaultVariants: {
46
+ orientation: "vertical",
47
+ size: "md"
48
+ }
81
49
  });
82
- function Field({
83
- className,
84
- orientation = "vertical",
85
- size,
86
- ...props
87
- }) {
88
- const resolvedSize = useComponentSize(size);
89
- return /* @__PURE__ */ jsx(SizeProvider, { size: resolvedSize, children: /* @__PURE__ */ jsx(
90
- "div",
91
- {
92
- role: "group",
93
- "data-slot": "field",
94
- "data-orientation": orientation,
95
- "data-size": resolvedSize,
96
- className: cn(
97
- fieldVariants({ orientation, size: resolvedSize }),
98
- className
99
- ),
100
- ...props
101
- }
102
- ) });
50
+ function Field({ className, orientation = "vertical", size, ...props }) {
51
+ const resolvedSize = useComponentSize(size);
52
+ return /* @__PURE__ */ jsx(SizeProvider, {
53
+ size: resolvedSize,
54
+ children: /* @__PURE__ */ jsx("div", {
55
+ role: "group",
56
+ "data-slot": "field",
57
+ "data-orientation": orientation,
58
+ "data-size": resolvedSize,
59
+ className: cn(fieldVariants({
60
+ orientation,
61
+ size: resolvedSize
62
+ }), className),
63
+ ...props
64
+ })
65
+ });
103
66
  }
104
67
  function FieldContent({ className, ...props }) {
105
- return /* @__PURE__ */ jsx(
106
- "div",
107
- {
108
- "data-slot": "field-content",
109
- className: cn(
110
- "group/field-content flex flex-1 flex-col leading-snug group-data-[size=sm]/field:gap-0.5 group-data-[size=md]/field:gap-0.5 group-data-[size=lg]/field:gap-1",
111
- className
112
- ),
113
- ...props
114
- }
115
- );
68
+ return /* @__PURE__ */ jsx("div", {
69
+ "data-slot": "field-content",
70
+ className: cn("group/field-content flex flex-1 flex-col leading-snug group-data-[size=sm]/field:gap-0.5 group-data-[size=md]/field:gap-0.5 group-data-[size=lg]/field:gap-1", className),
71
+ ...props
72
+ });
116
73
  }
117
- function FieldLabel({
118
- className,
119
- ...props
120
- }) {
121
- return /* @__PURE__ */ jsx(
122
- Label,
123
- {
124
- "data-slot": "field-label",
125
- className: cn(
126
- "group/field-label peer/field-label flex w-fit gap-1 leading-snug font-semibold text-fg-primary group-data-[size=sm]/field:text-gdt-xs group-data-[size=md]/field:text-gdt-sm group-data-[size=lg]/field:text-gdt-md group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
127
- "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:gap-2",
128
- className
129
- ),
130
- ...props
131
- }
132
- );
74
+ function FieldLabel({ className, ...props }) {
75
+ return /* @__PURE__ */ jsx(Label, {
76
+ "data-slot": "field-label",
77
+ className: cn("group/field-label peer/field-label flex w-fit gap-1 leading-snug font-semibold text-fg-primary group-data-[size=sm]/field:text-gdt-xs group-data-[size=md]/field:text-gdt-sm group-data-[size=lg]/field:text-gdt-md group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:gap-2", className),
78
+ ...props
79
+ });
133
80
  }
134
81
  function FieldTitle({ className, ...props }) {
135
- return /* @__PURE__ */ jsx(
136
- "div",
137
- {
138
- "data-slot": "field-label",
139
- className: cn(
140
- "flex w-fit items-center gap-2 font-semibold text-fg-primary group-data-[size=sm]/field:text-gdt-xs group-data-[size=md]/field:text-gdt-sm group-data-[size=lg]/field:text-gdt-md group-data-[disabled=true]/field:opacity-50",
141
- className
142
- ),
143
- ...props
144
- }
145
- );
82
+ return /* @__PURE__ */ jsx("div", {
83
+ "data-slot": "field-label",
84
+ className: cn("flex w-fit items-center gap-2 font-semibold text-fg-primary group-data-[size=sm]/field:text-gdt-xs group-data-[size=md]/field:text-gdt-sm group-data-[size=lg]/field:text-gdt-md group-data-[disabled=true]/field:opacity-50", className),
85
+ ...props
86
+ });
146
87
  }
147
88
  function FieldDescription({ className, ...props }) {
148
- return /* @__PURE__ */ jsx(
149
- "p",
150
- {
151
- "data-slot": "field-description",
152
- className: cn(
153
- "text-left font-normal text-fg-secondary group-data-[size=sm]/field:text-gdt-subtext group-data-[size=md]/field:text-gdt-xs group-data-[size=lg]/field:text-gdt-sm group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
154
- "last:mt-0 nth-last-2:-mt-1",
155
- "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
156
- className
157
- ),
158
- ...props
159
- }
160
- );
89
+ return /* @__PURE__ */ jsx("p", {
90
+ "data-slot": "field-description",
91
+ className: cn("text-left font-normal text-fg-secondary group-data-[size=sm]/field:text-gdt-subtext group-data-[size=md]/field:text-gdt-xs group-data-[size=lg]/field:text-gdt-sm group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
92
+ ...props
93
+ });
161
94
  }
162
- function FieldSeparator({
163
- children,
164
- className,
165
- ...props
166
- }) {
167
- return /* @__PURE__ */ jsxs(
168
- "div",
169
- {
170
- "data-slot": "field-separator",
171
- "data-content": !!children,
172
- className: cn(
173
- "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
174
- className
175
- ),
176
- ...props,
177
- children: [
178
- /* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
179
- children && /* @__PURE__ */ jsx(
180
- "span",
181
- {
182
- className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
183
- "data-slot": "field-separator-content",
184
- children
185
- }
186
- )
187
- ]
188
- }
189
- );
95
+ function FieldSeparator({ children, className, ...props }) {
96
+ return /* @__PURE__ */ jsxs("div", {
97
+ "data-slot": "field-separator",
98
+ "data-content": !!children,
99
+ className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
100
+ ...props,
101
+ children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx("span", {
102
+ className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
103
+ "data-slot": "field-separator-content",
104
+ children
105
+ })]
106
+ });
190
107
  }
191
- function FieldError({
192
- className,
193
- children,
194
- errors,
195
- ...props
196
- }) {
197
- const content = useMemo(() => {
198
- if (children) {
199
- return children;
200
- }
201
- if (!errors?.length) {
202
- return null;
203
- }
204
- const uniqueErrors = [
205
- ...new Map(errors.map((error) => [error?.message, error])).values()
206
- ];
207
- if (uniqueErrors?.length === 1) {
208
- return uniqueErrors[0]?.message;
209
- }
210
- return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
211
- (error) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, error.message)
212
- ) });
213
- }, [children, errors]);
214
- if (!content) {
215
- return null;
216
- }
217
- return /* @__PURE__ */ jsx(
218
- "div",
219
- {
220
- role: "alert",
221
- "data-slot": "field-error",
222
- className: cn("text-gdt-xs font-normal text-fg-danger", className),
223
- ...props,
224
- children: content
225
- }
226
- );
108
+ function FieldError({ className, children, errors, ...props }) {
109
+ const content = useMemo(() => {
110
+ if (children) return children;
111
+ if (!errors?.length) return null;
112
+ const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
113
+ if (uniqueErrors?.length === 1) return uniqueErrors[0]?.message;
114
+ return /* @__PURE__ */ jsx("ul", {
115
+ className: "ml-4 flex list-disc flex-col gap-1",
116
+ children: uniqueErrors.map((error) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, error.message))
117
+ });
118
+ }, [children, errors]);
119
+ if (!content) return null;
120
+ return /* @__PURE__ */ jsx("div", {
121
+ role: "alert",
122
+ "data-slot": "field-error",
123
+ className: cn("text-gdt-xs font-normal text-fg-danger", className),
124
+ ...props,
125
+ children: content
126
+ });
227
127
  }
228
- export {
229
- Field,
230
- FieldContent,
231
- FieldDescription,
232
- FieldError,
233
- FieldGroup,
234
- FieldLabel,
235
- FieldLegend,
236
- FieldSeparator,
237
- FieldSet,
238
- FieldTitle
239
- };
240
- //# sourceMappingURL=field.js.map
128
+ //#endregion
129
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };