@px-ui/ui 0.1.4 → 1.0.1

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 (316) hide show
  1. package/dist/avatar-C-yFMpI5.d.ts +41 -0
  2. package/dist/avatar-C-yFMpI5.d.ts.map +1 -0
  3. package/dist/avatar-DDdL9xDH.js +119 -0
  4. package/dist/avatar-DDdL9xDH.js.map +1 -0
  5. package/dist/button-KTVkwZNA.d.ts +19 -0
  6. package/dist/button-KTVkwZNA.d.ts.map +1 -0
  7. package/dist/button-hBUFMmsZ.js +47 -0
  8. package/dist/button-hBUFMmsZ.js.map +1 -0
  9. package/dist/combobox-CnpyzZ7B.js +334 -0
  10. package/dist/combobox-CnpyzZ7B.js.map +1 -0
  11. package/dist/combobox-GYXOAPSk.d.ts +109 -0
  12. package/dist/combobox-GYXOAPSk.d.ts.map +1 -0
  13. package/dist/components/accordion.d.ts +25 -0
  14. package/dist/components/accordion.d.ts.map +1 -0
  15. package/dist/components/accordion.js +56 -0
  16. package/dist/components/accordion.js.map +1 -0
  17. package/dist/components/alert-dialog.d.ts +59 -0
  18. package/dist/components/alert-dialog.d.ts.map +1 -0
  19. package/dist/components/alert-dialog.js +99 -0
  20. package/dist/components/alert-dialog.js.map +1 -0
  21. package/dist/components/alert.d.ts +29 -0
  22. package/dist/components/alert.d.ts.map +1 -0
  23. package/dist/components/alert.js +47 -0
  24. package/dist/components/alert.js.map +1 -0
  25. package/dist/components/aspect-ratio.d.ts +13 -0
  26. package/dist/components/aspect-ratio.d.ts.map +1 -0
  27. package/dist/components/aspect-ratio.js +16 -0
  28. package/dist/components/aspect-ratio.js.map +1 -0
  29. package/dist/components/avatar-group.d.ts +30 -0
  30. package/dist/components/avatar-group.d.ts.map +1 -0
  31. package/dist/components/avatar-group.js +69 -0
  32. package/dist/components/avatar-group.js.map +1 -0
  33. package/dist/components/avatar.d.ts +2 -0
  34. package/dist/components/avatar.js +5 -0
  35. package/dist/components/badge.d.ts +18 -0
  36. package/dist/components/badge.d.ts.map +1 -0
  37. package/dist/components/badge.js +31 -0
  38. package/dist/components/badge.js.map +1 -0
  39. package/dist/components/breadcrumb.d.ts +38 -0
  40. package/dist/components/breadcrumb.d.ts.map +1 -0
  41. package/dist/components/breadcrumb.js +75 -0
  42. package/dist/components/breadcrumb.js.map +1 -0
  43. package/dist/components/button-group.d.ts +29 -0
  44. package/dist/components/button-group.d.ts.map +1 -0
  45. package/dist/components/button-group.js +44 -0
  46. package/dist/components/button-group.js.map +1 -0
  47. package/dist/components/button.d.ts +2 -0
  48. package/dist/components/button.js +4 -0
  49. package/dist/components/calendar.d.ts +32 -0
  50. package/dist/components/calendar.d.ts.map +1 -0
  51. package/dist/components/calendar.js +119 -0
  52. package/dist/components/calendar.js.map +1 -0
  53. package/dist/components/card.d.ts +38 -0
  54. package/dist/components/card.d.ts.map +1 -0
  55. package/dist/components/card.js +59 -0
  56. package/dist/components/card.js.map +1 -0
  57. package/dist/components/carousel.d.ts +57 -0
  58. package/dist/components/carousel.d.ts.map +1 -0
  59. package/dist/components/carousel.js +136 -0
  60. package/dist/components/carousel.js.map +1 -0
  61. package/dist/components/chart.d.ts +79 -0
  62. package/dist/components/chart.d.ts.map +1 -0
  63. package/dist/components/chart.js +148 -0
  64. package/dist/components/chart.js.map +1 -0
  65. package/dist/components/checkbox.d.ts +11 -0
  66. package/dist/components/checkbox.d.ts.map +1 -0
  67. package/dist/components/checkbox.js +24 -0
  68. package/dist/components/checkbox.js.map +1 -0
  69. package/dist/components/collapsible.d.ts +25 -0
  70. package/dist/components/collapsible.d.ts.map +1 -0
  71. package/dist/components/collapsible.js +28 -0
  72. package/dist/components/collapsible.js.map +1 -0
  73. package/dist/components/combobox.d.ts +3 -0
  74. package/dist/components/combobox.js +13 -0
  75. package/dist/components/command.d.ts +78 -0
  76. package/dist/components/command.d.ts.map +1 -0
  77. package/dist/components/command.js +125 -0
  78. package/dist/components/command.js.map +1 -0
  79. package/dist/components/context-menu.d.ts +87 -0
  80. package/dist/components/context-menu.d.ts.map +1 -0
  81. package/dist/components/context-menu.js +137 -0
  82. package/dist/components/context-menu.js.map +1 -0
  83. package/dist/components/currency-select-field.d.ts +105 -0
  84. package/dist/components/currency-select-field.d.ts.map +1 -0
  85. package/dist/components/currency-select-field.js +266 -0
  86. package/dist/components/currency-select-field.js.map +1 -0
  87. package/dist/components/dialog.d.ts +61 -0
  88. package/dist/components/dialog.d.ts.map +1 -0
  89. package/dist/components/dialog.js +5 -0
  90. package/dist/components/direction.d.ts +2 -0
  91. package/dist/components/direction.js +3 -0
  92. package/dist/components/drawer.d.ts +45 -0
  93. package/dist/components/drawer.d.ts.map +1 -0
  94. package/dist/components/drawer.js +86 -0
  95. package/dist/components/drawer.js.map +1 -0
  96. package/dist/components/dropdown-menu.d.ts +2 -0
  97. package/dist/components/dropdown-menu.js +4 -0
  98. package/dist/components/empty.d.ts +36 -0
  99. package/dist/components/empty.d.ts.map +1 -0
  100. package/dist/components/empty.js +62 -0
  101. package/dist/components/empty.js.map +1 -0
  102. package/dist/components/field.d.ts +72 -0
  103. package/dist/components/field.d.ts.map +1 -0
  104. package/dist/components/field.js +122 -0
  105. package/dist/components/field.js.map +1 -0
  106. package/dist/components/file-upload-field.d.ts +58 -0
  107. package/dist/components/file-upload-field.d.ts.map +1 -0
  108. package/dist/components/file-upload-field.js +90 -0
  109. package/dist/components/file-upload-field.js.map +1 -0
  110. package/dist/components/file-upload.d.ts +4 -0
  111. package/dist/components/file-upload.js +6 -0
  112. package/dist/components/hover-card.d.ts +21 -0
  113. package/dist/components/hover-card.d.ts.map +1 -0
  114. package/dist/components/hover-card.js +40 -0
  115. package/dist/components/hover-card.js.map +1 -0
  116. package/dist/components/input-group.d.ts +46 -0
  117. package/dist/components/input-group.d.ts.map +1 -0
  118. package/dist/components/input-group.js +9 -0
  119. package/dist/components/input-otp.d.ts +24 -0
  120. package/dist/components/input-otp.d.ts.map +1 -0
  121. package/dist/components/input-otp.js +40 -0
  122. package/dist/components/input-otp.js.map +1 -0
  123. package/dist/components/input.d.ts +2 -0
  124. package/dist/components/input.js +4 -0
  125. package/dist/components/item.d.ts +62 -0
  126. package/dist/components/item.d.ts.map +1 -0
  127. package/dist/components/item.js +124 -0
  128. package/dist/components/item.js.map +1 -0
  129. package/dist/components/kbd.d.ts +14 -0
  130. package/dist/components/kbd.d.ts.map +1 -0
  131. package/dist/components/kbd.js +22 -0
  132. package/dist/components/kbd.js.map +1 -0
  133. package/dist/components/label.d.ts +2 -0
  134. package/dist/components/label.js +6 -0
  135. package/dist/components/menubar.d.ts +89 -0
  136. package/dist/components/menubar.d.ts.map +1 -0
  137. package/dist/components/menubar.js +140 -0
  138. package/dist/components/menubar.js.map +1 -0
  139. package/dist/components/native-select.d.ts +23 -0
  140. package/dist/components/native-select.d.ts.map +1 -0
  141. package/dist/components/native-select.js +41 -0
  142. package/dist/components/native-select.js.map +1 -0
  143. package/dist/components/navigation-menu.d.ts +48 -0
  144. package/dist/components/navigation-menu.d.ts.map +1 -0
  145. package/dist/components/navigation-menu.js +85 -0
  146. package/dist/components/navigation-menu.js.map +1 -0
  147. package/dist/components/pagination.d.ts +46 -0
  148. package/dist/components/pagination.d.ts.map +1 -0
  149. package/dist/components/pagination.js +89 -0
  150. package/dist/components/pagination.js.map +1 -0
  151. package/dist/components/phone-input.d.ts +28 -0
  152. package/dist/components/phone-input.d.ts.map +1 -0
  153. package/dist/components/phone-input.js +60 -0
  154. package/dist/components/phone-input.js.map +1 -0
  155. package/dist/components/popover.d.ts +34 -0
  156. package/dist/components/popover.d.ts.map +1 -0
  157. package/dist/components/popover.js +4 -0
  158. package/dist/components/progress.d.ts +29 -0
  159. package/dist/components/progress.d.ts.map +1 -0
  160. package/dist/components/progress.js +48 -0
  161. package/dist/components/progress.js.map +1 -0
  162. package/dist/components/radio-group.d.ts +16 -0
  163. package/dist/components/radio-group.d.ts.map +1 -0
  164. package/dist/components/radio-group.js +29 -0
  165. package/dist/components/radio-group.js.map +1 -0
  166. package/dist/components/resizable.d.ts +21 -0
  167. package/dist/components/resizable.d.ts.map +1 -0
  168. package/dist/components/resizable.js +32 -0
  169. package/dist/components/resizable.js.map +1 -0
  170. package/dist/components/scroll-area.d.ts +17 -0
  171. package/dist/components/scroll-area.d.ts.map +1 -0
  172. package/dist/components/scroll-area.js +39 -0
  173. package/dist/components/scroll-area.js.map +1 -0
  174. package/dist/components/select.d.ts +56 -0
  175. package/dist/components/select.d.ts.map +1 -0
  176. package/dist/components/select.js +102 -0
  177. package/dist/components/select.js.map +1 -0
  178. package/dist/components/separator.d.ts +2 -0
  179. package/dist/components/separator.js +4 -0
  180. package/dist/components/sheet.d.ts +43 -0
  181. package/dist/components/sheet.d.ts.map +1 -0
  182. package/dist/components/sheet.js +7 -0
  183. package/dist/components/sidebar.d.ts +162 -0
  184. package/dist/components/sidebar.d.ts.map +1 -0
  185. package/dist/components/sidebar.js +390 -0
  186. package/dist/components/sidebar.js.map +1 -0
  187. package/dist/components/skeleton.d.ts +10 -0
  188. package/dist/components/skeleton.d.ts.map +1 -0
  189. package/dist/components/skeleton.js +4 -0
  190. package/dist/components/slider.d.ts +15 -0
  191. package/dist/components/slider.d.ts.map +1 -0
  192. package/dist/components/slider.js +36 -0
  193. package/dist/components/slider.js.map +1 -0
  194. package/dist/components/spinner.d.ts +11 -0
  195. package/dist/components/spinner.d.ts.map +1 -0
  196. package/dist/components/spinner.js +4 -0
  197. package/dist/components/switch.d.ts +14 -0
  198. package/dist/components/switch.d.ts.map +1 -0
  199. package/dist/components/switch.js +21 -0
  200. package/dist/components/switch.js.map +1 -0
  201. package/dist/components/table.d.ts +39 -0
  202. package/dist/components/table.d.ts.map +1 -0
  203. package/dist/components/table.js +71 -0
  204. package/dist/components/table.js.map +1 -0
  205. package/dist/components/tabs.d.ts +31 -0
  206. package/dist/components/tabs.d.ts.map +1 -0
  207. package/dist/components/tabs.js +55 -0
  208. package/dist/components/tabs.js.map +1 -0
  209. package/dist/components/textarea.d.ts +11 -0
  210. package/dist/components/textarea.d.ts.map +1 -0
  211. package/dist/components/textarea.js +4 -0
  212. package/dist/components/toast.d.ts +2 -0
  213. package/dist/components/toast.js +6 -0
  214. package/dist/components/toggle-group.d.ts +29 -0
  215. package/dist/components/toggle-group.d.ts.map +1 -0
  216. package/dist/components/toggle-group.js +55 -0
  217. package/dist/components/toggle-group.js.map +1 -0
  218. package/dist/components/toggle.d.ts +2 -0
  219. package/dist/components/toggle.js +6 -0
  220. package/dist/components/tooltip.d.ts +2 -0
  221. package/dist/components/tooltip.js +4 -0
  222. package/dist/dialog-CTqRrytc.js +103 -0
  223. package/dist/dialog-CTqRrytc.js.map +1 -0
  224. package/dist/direction-BKSh6e6q.js +3 -0
  225. package/dist/dropdown-menu-CcumvwhM.js +139 -0
  226. package/dist/dropdown-menu-CcumvwhM.js.map +1 -0
  227. package/dist/dropdown-menu-tIPvwiCD.d.ts +91 -0
  228. package/dist/dropdown-menu-tIPvwiCD.d.ts.map +1 -0
  229. package/dist/file-upload-CmWvJwwY.d.ts +145 -0
  230. package/dist/file-upload-CmWvJwwY.d.ts.map +1 -0
  231. package/dist/file-upload-DeCIv13t.js +434 -0
  232. package/dist/file-upload-DeCIv13t.js.map +1 -0
  233. package/dist/hooks/use-async-options.d.ts +2 -0
  234. package/dist/hooks/use-async-options.js +3 -0
  235. package/dist/hooks/use-debounce.d.ts +5 -0
  236. package/dist/hooks/use-debounce.d.ts.map +1 -0
  237. package/dist/hooks/use-debounce.js +3 -0
  238. package/dist/hooks/use-file-upload.d.ts +2 -0
  239. package/dist/hooks/use-file-upload.js +3 -0
  240. package/dist/hooks/use-infinite-scroll.d.ts +21 -0
  241. package/dist/hooks/use-infinite-scroll.d.ts.map +1 -0
  242. package/dist/hooks/use-infinite-scroll.js +4 -0
  243. package/dist/hooks/use-intersection-observer.d.ts +2 -0
  244. package/dist/hooks/use-intersection-observer.js +3 -0
  245. package/dist/hooks/use-mobile.d.ts +5 -0
  246. package/dist/hooks/use-mobile.d.ts.map +1 -0
  247. package/dist/hooks/use-mobile.js +3 -0
  248. package/dist/input-8jqdnUZl.js +18 -0
  249. package/dist/input-8jqdnUZl.js.map +1 -0
  250. package/dist/input-CvG-4ebq.d.ts +12 -0
  251. package/dist/input-CvG-4ebq.d.ts.map +1 -0
  252. package/dist/input-group-DqEkmpXW.js +81 -0
  253. package/dist/input-group-DqEkmpXW.js.map +1 -0
  254. package/dist/label-AaH9ZYCZ.js +16 -0
  255. package/dist/label-AaH9ZYCZ.js.map +1 -0
  256. package/dist/label-CCHCFJeS.d.ts +11 -0
  257. package/dist/label-CCHCFJeS.d.ts.map +1 -0
  258. package/dist/lib/utils.d.ts +7 -0
  259. package/dist/lib/utils.d.ts.map +1 -0
  260. package/dist/lib/utils.js +3 -0
  261. package/dist/popover-C9D43EuT.js +57 -0
  262. package/dist/popover-C9D43EuT.js.map +1 -0
  263. package/dist/providers/px-ui-provider.d.ts +36 -0
  264. package/dist/providers/px-ui-provider.d.ts.map +1 -0
  265. package/dist/providers/px-ui-provider.js +26 -0
  266. package/dist/providers/px-ui-provider.js.map +1 -0
  267. package/dist/separator-BS3ilczC.js +17 -0
  268. package/dist/separator-BS3ilczC.js.map +1 -0
  269. package/dist/separator-CmcC4YJr.d.ts +12 -0
  270. package/dist/separator-CmcC4YJr.d.ts.map +1 -0
  271. package/dist/sheet-CLjNDrfL.js +91 -0
  272. package/dist/sheet-CLjNDrfL.js.map +1 -0
  273. package/dist/skeleton-BcIxI5Wq.js +15 -0
  274. package/dist/skeleton-BcIxI5Wq.js.map +1 -0
  275. package/dist/spinner-Bo0sUZEg.js +17 -0
  276. package/dist/spinner-Bo0sUZEg.js.map +1 -0
  277. package/dist/styles.css +196 -0
  278. package/dist/textarea-Cq0o323P.js +16 -0
  279. package/dist/textarea-Cq0o323P.js.map +1 -0
  280. package/dist/toast-COWAQbIk.js +211 -0
  281. package/dist/toast-COWAQbIk.js.map +1 -0
  282. package/dist/toast-FlYtbGl-.d.ts +74 -0
  283. package/dist/toast-FlYtbGl-.d.ts.map +1 -0
  284. package/dist/toggle-Bln33AlY.d.ts +19 -0
  285. package/dist/toggle-Bln33AlY.d.ts.map +1 -0
  286. package/dist/toggle-DhJ_qwgw.js +38 -0
  287. package/dist/toggle-DhJ_qwgw.js.map +1 -0
  288. package/dist/tooltip-D7qJywrH.d.ts +26 -0
  289. package/dist/tooltip-D7qJywrH.d.ts.map +1 -0
  290. package/dist/tooltip-DkPxCJIL.js +43 -0
  291. package/dist/tooltip-DkPxCJIL.js.map +1 -0
  292. package/dist/use-async-options-DHR8q5qX.d.ts +45 -0
  293. package/dist/use-async-options-DHR8q5qX.d.ts.map +1 -0
  294. package/dist/use-async-options-wZ9LJ2BJ.js +46 -0
  295. package/dist/use-async-options-wZ9LJ2BJ.js.map +1 -0
  296. package/dist/use-debounce-_qaEZqtt.js +24 -0
  297. package/dist/use-debounce-_qaEZqtt.js.map +1 -0
  298. package/dist/{index.js → use-file-upload-Dxrej28u.js} +3 -204
  299. package/dist/use-file-upload-Dxrej28u.js.map +1 -0
  300. package/dist/use-file-upload-yy-xLBtn.d.ts +133 -0
  301. package/dist/use-file-upload-yy-xLBtn.d.ts.map +1 -0
  302. package/dist/use-infinite-scroll-CpbhGGT5.js +38 -0
  303. package/dist/use-infinite-scroll-CpbhGGT5.js.map +1 -0
  304. package/dist/use-intersection-observer-C2xDq2SW.d.ts +11 -0
  305. package/dist/use-intersection-observer-C2xDq2SW.d.ts.map +1 -0
  306. package/dist/use-intersection-observer-CZfnep4z.js +33 -0
  307. package/dist/use-intersection-observer-CZfnep4z.js.map +1 -0
  308. package/dist/use-mobile-l5ebOdQl.js +21 -0
  309. package/dist/use-mobile-l5ebOdQl.js.map +1 -0
  310. package/dist/utils-mWJR2N24.js +28 -0
  311. package/dist/utils-mWJR2N24.js.map +1 -0
  312. package/package.json +289 -26
  313. package/dist/index.css +0 -143
  314. package/dist/index.d.ts +0 -229
  315. package/dist/index.d.ts.map +0 -1
  316. package/dist/index.js.map +0 -1
@@ -0,0 +1,266 @@
1
+ import { t as cn } from "../utils-mWJR2N24.js";
2
+ import "../button-hBUFMmsZ.js";
3
+ import "../input-8jqdnUZl.js";
4
+ import "../textarea-Cq0o323P.js";
5
+ import { n as InputGroupAddon } from "../input-group-DqEkmpXW.js";
6
+ import "../spinner-Bo0sUZEg.js";
7
+ import "../use-async-options-wZ9LJ2BJ.js";
8
+ import "../use-intersection-observer-CZfnep4z.js";
9
+ import "../use-infinite-scroll-CpbhGGT5.js";
10
+ import "../use-debounce-_qaEZqtt.js";
11
+ import { f as ComboboxList, l as ComboboxInput, m as ComboboxStatus, s as ComboboxContent, t as Combobox, u as ComboboxItem } from "../combobox-CnpyzZ7B.js";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ import "react";
14
+ import ReactCountryFlag from "react-country-flag";
15
+
16
+ //#region src/components/currency-select-field.tsx
17
+ /**
18
+ * Mapping of currency abbreviations to country codes for flag display.
19
+ * Used internally by CurrencySelectField to display country flags.
20
+ */
21
+ const CURRENCY_FLAG_CODE = {
22
+ USD: "US",
23
+ CAD: "CA",
24
+ EUR: "EU",
25
+ GBP: "GB",
26
+ INR: "IN",
27
+ AFN: "AF",
28
+ ALL: "AL",
29
+ ANG: "MY",
30
+ ARS: "AR",
31
+ AUD: "AU",
32
+ AZN: "AZ",
33
+ BBD: "BB",
34
+ BGN: "BG",
35
+ BMD: "BM",
36
+ BOB: "BO",
37
+ BRL: "BR",
38
+ BSD: "BS",
39
+ BWP: "BW",
40
+ BYN: "BY",
41
+ CHF: "CH",
42
+ CLP: "CL",
43
+ COP: "CO",
44
+ CRC: "CR",
45
+ CUP: "CU",
46
+ CZK: "CZ",
47
+ DKK: "DK",
48
+ DOP: "DO",
49
+ EGP: "EG",
50
+ FJD: "FJ",
51
+ GGP: "GG",
52
+ GHS: "US",
53
+ GIP: "GI",
54
+ GTQ: "GT",
55
+ GYD: "GY",
56
+ HKD: "HK",
57
+ HNL: "HN",
58
+ HRK: "HR",
59
+ HUF: "HU",
60
+ ILS: "IL",
61
+ IMP: "IM",
62
+ IRR: "IR",
63
+ ISK: "IS",
64
+ JEP: "JE",
65
+ JMD: "JM",
66
+ JPY: "JP",
67
+ KHR: "KM",
68
+ KPW: "KP",
69
+ KRW: "KR",
70
+ KYD: "KY",
71
+ LAK: "LA",
72
+ LBP: "LB",
73
+ LKR: "LK",
74
+ LRD: "LR",
75
+ MKD: "MK",
76
+ MNT: "MN",
77
+ MXN: "MX",
78
+ MYR: "MY",
79
+ MZN: "MZ",
80
+ NGN: "NG",
81
+ NIO: "NI",
82
+ NOK: "NO",
83
+ NPR: "NP",
84
+ NZD: "NZ",
85
+ PAB: "PA",
86
+ PEN: "PE",
87
+ PHP: "PH",
88
+ PKR: "PK",
89
+ PLN: "PL",
90
+ PYG: "PY",
91
+ QAR: "QA",
92
+ RON: "RO",
93
+ RSD: "RS",
94
+ RUB: "RU",
95
+ SAR: "SA",
96
+ SBD: "SB",
97
+ SCR: "SC",
98
+ SEK: "SE",
99
+ SGD: "SG",
100
+ SHP: "SH",
101
+ SOS: "SO",
102
+ SRD: "SR",
103
+ SVC: "SV",
104
+ THB: "TH",
105
+ TRY: "TR",
106
+ TVD: "TV",
107
+ TWD: "TW",
108
+ UAH: "UA",
109
+ UYU: "UY",
110
+ UZS: "UZ",
111
+ VEF: "VE",
112
+ VND: "VN",
113
+ XCD: "EC",
114
+ YEN: "YE",
115
+ YER: "YE",
116
+ ZAR: "ZA",
117
+ ZWD: "ZW",
118
+ AED: "AE",
119
+ AMD: "AD",
120
+ BDT: "BD",
121
+ BTN: "BT",
122
+ AOA: "AO",
123
+ AWG: "AW",
124
+ BAM: "BA",
125
+ BHD: "BH",
126
+ BIF: "BI",
127
+ BND: "BN",
128
+ BZD: "BZ",
129
+ CNY: "CN",
130
+ CVE: "CV",
131
+ DJF: "DJ",
132
+ DZD: "DZ",
133
+ ETB: "ET",
134
+ FKP: "FK",
135
+ GEL: "GE",
136
+ GMD: "GM",
137
+ GNF: "GN",
138
+ HTG: "HT",
139
+ IDR: "ID",
140
+ IQD: "IQ",
141
+ JOD: "JO",
142
+ KES: "KE",
143
+ KGS: "KG",
144
+ KMF: "KM",
145
+ KWD: "KW",
146
+ MWK: "MW",
147
+ ZMW: "ZM",
148
+ LSL: "LS",
149
+ LYD: "LY",
150
+ MAD: "MA",
151
+ MDL: "MD",
152
+ MGA: "MG",
153
+ MMK: "MM",
154
+ KZT: "KZ",
155
+ MOP: "MO",
156
+ MRU: "MR",
157
+ MUR: "MU",
158
+ MVR: "MV",
159
+ NAD: "NA",
160
+ OMR: "OM",
161
+ PGK: "PG",
162
+ RWF: "RW",
163
+ SDG: "SD",
164
+ SLL: "SL",
165
+ STD: "ST",
166
+ SYP: "SY",
167
+ SZL: "SZ",
168
+ TJS: "TJ",
169
+ TMT: "TM",
170
+ TND: "TN",
171
+ TOP: "TO",
172
+ TTD: "TT",
173
+ TZS: "TZ",
174
+ UGX: "UG",
175
+ VES: "VE",
176
+ VUV: "VU",
177
+ WST: "WS",
178
+ XAF: "CF",
179
+ XOF: "NG",
180
+ XPF: "CF"
181
+ };
182
+ function CurrencyFlag({ countryCode, className }) {
183
+ if (!countryCode) return /* @__PURE__ */ jsx("span", { className: cn("inline-block w-4", className) });
184
+ return /* @__PURE__ */ jsx("div", {
185
+ className: cn("relative -top-px flex shrink-0 items-center", className),
186
+ children: /* @__PURE__ */ jsx(ReactCountryFlag, {
187
+ countryCode,
188
+ svg: true,
189
+ style: {
190
+ width: "14px",
191
+ height: "14px"
192
+ },
193
+ "aria-label": `Flag of ${countryCode}`
194
+ })
195
+ });
196
+ }
197
+ function CurrencyOptionContent({ currency }) {
198
+ const countryCode = CURRENCY_FLAG_CODE[currency.abbr];
199
+ return /* @__PURE__ */ jsxs("div", {
200
+ className: "flex items-center gap-2.5",
201
+ children: [/* @__PURE__ */ jsx(CurrencyFlag, { countryCode }), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
202
+ className: "text-foreground font-medium",
203
+ children: currency.abbr
204
+ }), /* @__PURE__ */ jsxs("span", {
205
+ className: "text-muted-foreground",
206
+ children: [" - ", currency.name]
207
+ })] })]
208
+ });
209
+ }
210
+ /**
211
+ * A currency select component with search functionality and flag display.
212
+ * Country flags are automatically displayed based on the currency abbreviation
213
+ * using the built-in CURRENCY_FLAG_CODE mapping.
214
+ *
215
+ * @example
216
+ * ```tsx
217
+ * const currencies = [
218
+ * { id: "1", abbr: "USD", name: "United States dollar", value: "USD" },
219
+ * { id: "2", abbr: "EUR", name: "Euro", value: "EUR" },
220
+ * { id: "3", abbr: "GBP", name: "British Pound", value: "GBP" },
221
+ * ];
222
+ *
223
+ * <CurrencySelectField
224
+ * currencies={currencies}
225
+ * value={selectedCurrency}
226
+ * onValueChange={setSelectedCurrency}
227
+ * placeholder="Select currency"
228
+ * />
229
+ * ```
230
+ */
231
+ function CurrencySelectField({ currencies, value, onValueChange, placeholder = "Select currency", disabled, readOnly, invalid, name, inputRef, triggerClassName, className, isLoading, contentProps }) {
232
+ return /* @__PURE__ */ jsxs(Combobox, {
233
+ items: currencies,
234
+ value,
235
+ onValueChange,
236
+ disabled,
237
+ readOnly,
238
+ name,
239
+ inputRef,
240
+ isLoading,
241
+ isItemEqualToValue: (item, val) => item.id ? item.id === val.id : item.abbr ? item.abbr === val.abbr : item.value === val.value,
242
+ itemToStringLabel: (item) => `${item.abbr} - ${item.name}`,
243
+ children: [/* @__PURE__ */ jsx(ComboboxInput, {
244
+ placeholder,
245
+ "aria-invalid": invalid || void 0,
246
+ className: cn(className, triggerClassName),
247
+ children: value ? /* @__PURE__ */ jsx(InputGroupAddon, {
248
+ align: "inline-start",
249
+ children: /* @__PURE__ */ jsx(CurrencyFlag, {
250
+ countryCode: CURRENCY_FLAG_CODE[value.abbr],
251
+ className: "w-fit"
252
+ })
253
+ }) : null
254
+ }), /* @__PURE__ */ jsxs(ComboboxContent, {
255
+ ...contentProps,
256
+ children: [/* @__PURE__ */ jsx(ComboboxStatus, { empty: "No currencies found" }), /* @__PURE__ */ jsx(ComboboxList, { children: (currency) => /* @__PURE__ */ jsx(ComboboxItem, {
257
+ value: currency,
258
+ children: /* @__PURE__ */ jsx(CurrencyOptionContent, { currency })
259
+ }, currency.id) })]
260
+ })]
261
+ });
262
+ }
263
+
264
+ //#endregion
265
+ export { CURRENCY_FLAG_CODE, CurrencySelectField };
266
+ //# sourceMappingURL=currency-select-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency-select-field.js","names":["CURRENCY_FLAG_CODE: Record<string, string>"],"sources":["../../src/components/currency-select-field.tsx"],"sourcesContent":["import * as React from \"react\";\nimport ReactCountryFlag from \"react-country-flag\";\nimport { cn } from \"@px-ui/ui/lib/utils\";\nimport {\n Combobox,\n ComboboxContent,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxStatus,\n} from \"@px-ui/ui/components/combobox\";\nimport { InputGroupAddon } from \"@px-ui/ui/components/input-group\";\n\n// ============================================================================\n// Constants\n// ============================================================================\n\n/**\n * Mapping of currency abbreviations to country codes for flag display.\n * Used internally by CurrencySelectField to display country flags.\n */\nexport const CURRENCY_FLAG_CODE: Record<string, string> = {\n USD: \"US\",\n CAD: \"CA\",\n EUR: \"EU\",\n GBP: \"GB\",\n INR: \"IN\",\n AFN: \"AF\",\n ALL: \"AL\",\n ANG: \"MY\",\n ARS: \"AR\",\n AUD: \"AU\",\n AZN: \"AZ\",\n BBD: \"BB\",\n BGN: \"BG\",\n BMD: \"BM\",\n BOB: \"BO\",\n BRL: \"BR\",\n BSD: \"BS\",\n BWP: \"BW\",\n BYN: \"BY\",\n CHF: \"CH\",\n CLP: \"CL\",\n COP: \"CO\",\n CRC: \"CR\",\n CUP: \"CU\",\n CZK: \"CZ\",\n DKK: \"DK\",\n DOP: \"DO\",\n EGP: \"EG\",\n FJD: \"FJ\",\n GGP: \"GG\",\n GHS: \"US\",\n GIP: \"GI\",\n GTQ: \"GT\",\n GYD: \"GY\",\n HKD: \"HK\",\n HNL: \"HN\",\n HRK: \"HR\",\n HUF: \"HU\",\n ILS: \"IL\",\n IMP: \"IM\",\n IRR: \"IR\",\n ISK: \"IS\",\n JEP: \"JE\",\n JMD: \"JM\",\n JPY: \"JP\",\n KHR: \"KM\",\n KPW: \"KP\",\n KRW: \"KR\",\n KYD: \"KY\",\n LAK: \"LA\",\n LBP: \"LB\",\n LKR: \"LK\",\n LRD: \"LR\",\n MKD: \"MK\",\n MNT: \"MN\",\n MXN: \"MX\",\n MYR: \"MY\",\n MZN: \"MZ\",\n NGN: \"NG\",\n NIO: \"NI\",\n NOK: \"NO\",\n NPR: \"NP\",\n NZD: \"NZ\",\n PAB: \"PA\",\n PEN: \"PE\",\n PHP: \"PH\",\n PKR: \"PK\",\n PLN: \"PL\",\n PYG: \"PY\",\n QAR: \"QA\",\n RON: \"RO\",\n RSD: \"RS\",\n RUB: \"RU\",\n SAR: \"SA\",\n SBD: \"SB\",\n SCR: \"SC\",\n SEK: \"SE\",\n SGD: \"SG\",\n SHP: \"SH\",\n SOS: \"SO\",\n SRD: \"SR\",\n SVC: \"SV\",\n THB: \"TH\",\n TRY: \"TR\",\n TVD: \"TV\",\n TWD: \"TW\",\n UAH: \"UA\",\n UYU: \"UY\",\n UZS: \"UZ\",\n VEF: \"VE\",\n VND: \"VN\",\n XCD: \"EC\",\n YEN: \"YE\",\n YER: \"YE\",\n ZAR: \"ZA\",\n ZWD: \"ZW\",\n AED: \"AE\",\n AMD: \"AD\",\n BDT: \"BD\",\n BTN: \"BT\",\n AOA: \"AO\",\n AWG: \"AW\",\n BAM: \"BA\",\n BHD: \"BH\",\n BIF: \"BI\",\n BND: \"BN\",\n BZD: \"BZ\",\n CNY: \"CN\",\n CVE: \"CV\",\n DJF: \"DJ\",\n DZD: \"DZ\",\n ETB: \"ET\",\n FKP: \"FK\",\n GEL: \"GE\",\n GMD: \"GM\",\n GNF: \"GN\",\n HTG: \"HT\",\n IDR: \"ID\",\n IQD: \"IQ\",\n JOD: \"JO\",\n KES: \"KE\",\n KGS: \"KG\",\n KMF: \"KM\",\n KWD: \"KW\",\n MWK: \"MW\",\n ZMW: \"ZM\",\n LSL: \"LS\",\n LYD: \"LY\",\n MAD: \"MA\",\n MDL: \"MD\",\n MGA: \"MG\",\n MMK: \"MM\",\n KZT: \"KZ\",\n MOP: \"MO\",\n MRU: \"MR\",\n MUR: \"MU\",\n MVR: \"MV\",\n NAD: \"NA\",\n OMR: \"OM\",\n PGK: \"PG\",\n RWF: \"RW\",\n SDG: \"SD\",\n SLL: \"SL\",\n STD: \"ST\",\n SYP: \"SY\",\n SZL: \"SZ\",\n TJS: \"TJ\",\n TMT: \"TM\",\n TND: \"TN\",\n TOP: \"TO\",\n TTD: \"TT\",\n TZS: \"TZ\",\n UGX: \"UG\",\n VES: \"VE\",\n VUV: \"VU\",\n WST: \"WS\",\n XAF: \"CF\",\n XOF: \"NG\",\n XPF: \"CF\",\n};\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Currency type representing a currency option\n */\nexport interface Currency {\n /** Unique identifier for the currency */\n id: string;\n /** Full currency name (e.g., \"United States dollar\") */\n name: string;\n /** Currency abbreviation (e.g., \"USD\", \"EUR\") */\n abbr: string;\n /** Currency value/code used for form submission */\n value: string;\n}\n\nexport interface CurrencySelectFieldProps {\n /**\n * Array of currency options to display\n */\n currencies: ReadonlyArray<Currency>;\n\n /** The selected currency. Use for a controlled field. */\n value?: Currency | null;\n\n /** Called when the selected currency changes. */\n onValueChange?: (value: Currency | null, eventDetails: unknown) => void;\n\n /** Whether the field is disabled. */\n disabled?: boolean;\n\n /** Whether the field is read only. */\n readOnly?: boolean;\n\n /** Applies error styling to the trigger input. */\n invalid?: boolean;\n\n /** Name used for form submission. */\n name?: string;\n\n /** Ref forwarded to the underlying input element. */\n inputRef?: React.Ref<HTMLInputElement>;\n\n /**\n * Placeholder text when no currency is selected\n * @default \"Select currency\"\n */\n placeholder?: string;\n\n /**\n * Additional className for the trigger input\n */\n triggerClassName?: string;\n\n /**\n * Additional className for the trigger input (alias of `triggerClassName`)\n */\n className?: string;\n\n /**\n * Accepted for API compatibility with the legacy field. Static currency\n * lists render immediately, so this currently has no effect.\n */\n isLoading?: boolean;\n\n /**\n * Additional props forwarded to the dropdown content.\n */\n contentProps?: Omit<React.ComponentProps<typeof ComboboxContent>, \"children\">;\n}\n\n// ============================================================================\n// Sub-components\n// ============================================================================\n\ninterface CurrencyFlagProps {\n countryCode: string | null | undefined;\n className?: string;\n}\n\nfunction CurrencyFlag({ countryCode, className }: CurrencyFlagProps) {\n if (!countryCode) {\n return <span className={cn(\"inline-block w-4\", className)} />;\n }\n\n return (\n <div\n className={cn(\"relative -top-px flex shrink-0 items-center\", className)}\n >\n <ReactCountryFlag\n countryCode={countryCode}\n svg\n style={{\n width: \"14px\",\n height: \"14px\",\n }}\n aria-label={`Flag of ${countryCode}`}\n />\n </div>\n );\n}\n\ninterface CurrencyOptionContentProps {\n currency: Currency;\n}\n\nfunction CurrencyOptionContent({ currency }: CurrencyOptionContentProps) {\n const countryCode = CURRENCY_FLAG_CODE[currency.abbr];\n\n return (\n <div className=\"flex items-center gap-2.5\">\n <CurrencyFlag countryCode={countryCode} />\n <span>\n <span className=\"text-foreground font-medium\">{currency.abbr}</span>\n <span className=\"text-muted-foreground\"> - {currency.name}</span>\n </span>\n </div>\n );\n}\n\n// ============================================================================\n// Main Component\n// ============================================================================\n\n/**\n * A currency select component with search functionality and flag display.\n * Country flags are automatically displayed based on the currency abbreviation\n * using the built-in CURRENCY_FLAG_CODE mapping.\n *\n * @example\n * ```tsx\n * const currencies = [\n * { id: \"1\", abbr: \"USD\", name: \"United States dollar\", value: \"USD\" },\n * { id: \"2\", abbr: \"EUR\", name: \"Euro\", value: \"EUR\" },\n * { id: \"3\", abbr: \"GBP\", name: \"British Pound\", value: \"GBP\" },\n * ];\n *\n * <CurrencySelectField\n * currencies={currencies}\n * value={selectedCurrency}\n * onValueChange={setSelectedCurrency}\n * placeholder=\"Select currency\"\n * />\n * ```\n */\nexport function CurrencySelectField({\n currencies,\n value,\n onValueChange,\n placeholder = \"Select currency\",\n disabled,\n readOnly,\n invalid,\n name,\n inputRef,\n triggerClassName,\n className,\n isLoading,\n contentProps,\n}: CurrencySelectFieldProps) {\n return (\n <Combobox<Currency, false>\n items={currencies as Currency[]}\n value={value}\n onValueChange={onValueChange}\n disabled={disabled}\n readOnly={readOnly}\n name={name}\n inputRef={inputRef}\n isLoading={isLoading}\n isItemEqualToValue={(item, val) =>\n item.id\n ? item.id === val.id\n : item.abbr\n ? item.abbr === val.abbr\n : item.value === val.value\n }\n itemToStringLabel={(item) => `${item.abbr} - ${item.name}`}\n >\n <ComboboxInput\n placeholder={placeholder}\n aria-invalid={invalid || undefined}\n className={cn(className, triggerClassName)}\n >\n {value ? (\n <InputGroupAddon align=\"inline-start\">\n <CurrencyFlag\n countryCode={CURRENCY_FLAG_CODE[value.abbr]}\n className=\"w-fit\"\n />\n </InputGroupAddon>\n ) : null}\n </ComboboxInput>\n\n <ComboboxContent {...contentProps}>\n <ComboboxStatus empty=\"No currencies found\" />\n <ComboboxList>\n {(currency: Currency) => (\n <ComboboxItem key={currency.id} value={currency}>\n <CurrencyOptionContent currency={currency} />\n </ComboboxItem>\n )}\n </ComboboxList>\n </ComboboxContent>\n </Combobox>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA,MAAaA,qBAA6C;CACxD,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACN;AAoFD,SAAS,aAAa,EAAE,aAAa,aAAgC;AACnE,KAAI,CAAC,YACH,QAAO,oBAAC,UAAK,WAAW,GAAG,oBAAoB,UAAU,GAAI;AAG/D,QACE,oBAAC;EACC,WAAW,GAAG,+CAA+C,UAAU;YAEvE,oBAAC;GACc;GACb;GACA,OAAO;IACL,OAAO;IACP,QAAQ;IACT;GACD,cAAY,WAAW;IACvB;GACE;;AAQV,SAAS,sBAAsB,EAAE,YAAwC;CACvE,MAAM,cAAc,mBAAmB,SAAS;AAEhD,QACE,qBAAC;EAAI,WAAU;aACb,oBAAC,gBAA0B,cAAe,EAC1C,qBAAC,qBACC,oBAAC;GAAK,WAAU;aAA+B,SAAS;IAAY,EACpE,qBAAC;GAAK,WAAU;cAAwB,OAAI,SAAS;IAAY,IAC5D;GACH;;;;;;;;;;;;;;;;;;;;;;;AA6BV,SAAgB,oBAAoB,EAClC,YACA,OACA,eACA,cAAc,mBACd,UACA,UACA,SACA,MACA,UACA,kBACA,WACA,WACA,gBAC2B;AAC3B,QACE,qBAAC;EACC,OAAO;EACA;EACQ;EACL;EACA;EACJ;EACI;EACC;EACX,qBAAqB,MAAM,QACzB,KAAK,KACD,KAAK,OAAO,IAAI,KAChB,KAAK,OACH,KAAK,SAAS,IAAI,OAClB,KAAK,UAAU,IAAI;EAE3B,oBAAoB,SAAS,GAAG,KAAK,KAAK,KAAK,KAAK;aAEpD,oBAAC;GACc;GACb,gBAAc,WAAW;GACzB,WAAW,GAAG,WAAW,iBAAiB;aAEzC,QACC,oBAAC;IAAgB,OAAM;cACrB,oBAAC;KACC,aAAa,mBAAmB,MAAM;KACtC,WAAU;MACV;KACc,GAChB;IACU,EAEhB,qBAAC;GAAgB,GAAI;cACnB,oBAAC,kBAAe,OAAM,wBAAwB,EAC9C,oBAAC,2BACG,aACA,oBAAC;IAA+B,OAAO;cACrC,oBAAC,yBAAgC,WAAY;MAD5B,SAAS,GAEb,GAEJ;IACC;GACT"}
@@ -0,0 +1,61 @@
1
+ import * as react_jsx_runtime149 from "react/jsx-runtime";
2
+ import * as React$1 from "react";
3
+ import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
4
+
5
+ //#region src/components/dialog.d.ts
6
+ declare function Dialog({
7
+ ...props
8
+ }: Dialog$1.Root.Props): react_jsx_runtime149.JSX.Element;
9
+ declare function DialogTrigger({
10
+ ...props
11
+ }: Dialog$1.Trigger.Props): react_jsx_runtime149.JSX.Element;
12
+ declare function DialogPortal({
13
+ ...props
14
+ }: Dialog$1.Portal.Props): react_jsx_runtime149.JSX.Element;
15
+ declare function DialogClose({
16
+ ...props
17
+ }: Dialog$1.Close.Props): react_jsx_runtime149.JSX.Element;
18
+ declare function DialogOverlay({
19
+ className,
20
+ ...props
21
+ }: Dialog$1.Backdrop.Props): react_jsx_runtime149.JSX.Element;
22
+ declare function DialogContent({
23
+ className,
24
+ children,
25
+ showCloseButton,
26
+ ...props
27
+ }: Dialog$1.Popup.Props & {
28
+ showCloseButton?: boolean;
29
+ }): react_jsx_runtime149.JSX.Element;
30
+ declare function DialogHeader({
31
+ className,
32
+ ...props
33
+ }: React$1.ComponentProps<"div">): react_jsx_runtime149.JSX.Element;
34
+ declare function DialogFooter({
35
+ className,
36
+ showCloseButton,
37
+ children,
38
+ ...props
39
+ }: React$1.ComponentProps<"div"> & {
40
+ showCloseButton?: boolean;
41
+ }): react_jsx_runtime149.JSX.Element;
42
+ declare function DialogTitle({
43
+ className,
44
+ ...props
45
+ }: Dialog$1.Title.Props): react_jsx_runtime149.JSX.Element;
46
+ declare function DialogDescription({
47
+ className,
48
+ ...props
49
+ }: Dialog$1.Description.Props): react_jsx_runtime149.JSX.Element;
50
+ /**
51
+ * Creates a handle that links a `Dialog` to one or more `DialogTrigger`s via
52
+ * their `handle` prop. Use it for detached triggers (a trigger rendered outside
53
+ * `Dialog`) and to reuse a single dialog from multiple triggers. The handle also
54
+ * exposes imperative `open(triggerId)`, `openWithPayload(payload)`, `close()`,
55
+ * and `isOpen`. Create it once, outside render.
56
+ */
57
+ declare const createDialogHandle: typeof Dialog$1.createHandle;
58
+ type DialogHandle<Payload = unknown> = Dialog$1.Handle<Payload>;
59
+ //#endregion
60
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, type DialogHandle, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, createDialogHandle };
61
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","names":[],"sources":["../../src/components/dialog.tsx"],"sourcesContent":[],"mappings":";;;;;iBAOS,MAAA;;GAAqB,QAAA,CAAgB,IAAA,CAAK,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAU/C,aAAA;;GAA4B,QAAA,CAAgB,OAAA,CAAQ,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAIzD,YAAA;;GAA2B,QAAA,CAAgB,MAAA,CAAO,QAAK,oBAAA,CAAA,GAAA,CAAA;AApBE,iBAwBzD,WAAA,CAlBqB;EAAA,GAAA;AAA0B,CAAL,EAkBhB,QAAA,CAAgB,KAAA,CAAM,KAlBD,CAAA,EAkBM,oBAAA,CAAA,GAAA,CAAA,OAlBN;AAAA,iBAsB/C,aAAA,CAZa;EAAe,SAAgB;EAAA,GAAA;AAAa,CAAL,EAe1D,QAAA,CAAgB,QAAA,CAAS,KAfsC,CAAA,EAejC,oBAAA,CAAA,GAAA,CAAA,OAfiC;AAAA,iBA4BzD,aAAA,CAxBY;EAAe,SAAgB;EAAA,QAAO;EAAA,eAAK;EAAA,GAAA;AAIF,CAJE,EA6B7D,QAAA,CAAgB,KAAA,CAAM,KA7BuC,GAAA;EAIvD,eAAW,CAAA,EAAA,OAAA;AAA0C,CAAA,CAAA,EA2B7D,oBAAA,CAAA,GAAA,CAAA,OAvBqB;iBAwDb,YAAA,CAvDP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAuD6C,OAAA,CAAM,cAvDnD,CAAA,KAAA,CAAA,CAAA,EAuDwE,oBAAA,CAAA,GAAA,CAAA,OAvDxE;iBAiEO,YAAA,CA/DmB;EAAA,SAAA;EAAA,eAAA;EAAA,QAAA;EAAA,GAAA;CAAA,EAoEzB,OAAA,CAAM,cApEmB,CAAA,KAAA,CAAA,GAAA;EAAK,eAAA,CAAA,EAAA,OAAA;CAAA,CAAA,EAsEhC,oBAAA,CAAA,GAAA,CAAA,OAtEgC;AAAA,iBA0FxB,WAAA,CA7Ea;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA6EwB,QAAA,CAAgB,KAAA,CAAM,KA7E9C,CAAA,EA6EmD,oBAAA,CAAA,GAAA,CAAA,OA7EnD;iBAuFb,iBAAA,CAtFP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyFC,QAAA,CAAgB,WAAA,CAAY,KAzF7B,CAAA,EAyFkC,oBAAA,CAAA,GAAA,CAAA,OAzFlC;;;;;;AAMD;;cAuGK,kBAtE+C,EAAA,OAsE7B,QAAA,CAAA,YAtE6B;KAwEhD,YAxEqE,CAAA,UAAA,OAAA,CAAA,GAwEnC,QAAA,CAAgB,MAxEmB,CAwEZ,OAxEY,CAAA"}
@@ -0,0 +1,5 @@
1
+ import "../utils-mWJR2N24.js";
2
+ import "../button-hBUFMmsZ.js";
3
+ import { a as DialogFooter, c as DialogPortal, d as createDialogHandle, i as DialogDescription, l as DialogTitle, n as DialogClose, o as DialogHeader, r as DialogContent, s as DialogOverlay, t as Dialog, u as DialogTrigger } from "../dialog-CTqRrytc.js";
4
+
5
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, createDialogHandle };
@@ -0,0 +1,2 @@
1
+ import { DirectionProvider, useDirection } from "@base-ui/react/direction-provider";
2
+ export { DirectionProvider, useDirection };
@@ -0,0 +1,3 @@
1
+ import { n as useDirection, t as DirectionProvider } from "../direction-BKSh6e6q.js";
2
+
3
+ export { DirectionProvider, useDirection };
@@ -0,0 +1,45 @@
1
+ import * as react_jsx_runtime162 from "react/jsx-runtime";
2
+ import * as React$1 from "react";
3
+ import { Drawer as Drawer$1 } from "@base-ui/react/drawer";
4
+
5
+ //#region src/components/drawer.d.ts
6
+ declare function Drawer({
7
+ ...props
8
+ }: React$1.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime162.JSX.Element;
9
+ declare function DrawerTrigger({
10
+ ...props
11
+ }: React$1.ComponentProps<typeof Drawer$1.Trigger>): react_jsx_runtime162.JSX.Element;
12
+ declare function DrawerPortal({
13
+ ...props
14
+ }: React$1.ComponentProps<typeof Drawer$1.Portal>): react_jsx_runtime162.JSX.Element;
15
+ declare function DrawerClose({
16
+ ...props
17
+ }: React$1.ComponentProps<typeof Drawer$1.Close>): react_jsx_runtime162.JSX.Element;
18
+ declare function DrawerOverlay({
19
+ className,
20
+ ...props
21
+ }: React$1.ComponentProps<typeof Drawer$1.Backdrop>): react_jsx_runtime162.JSX.Element;
22
+ declare function DrawerContent({
23
+ className,
24
+ children,
25
+ ...props
26
+ }: React$1.ComponentProps<typeof Drawer$1.Popup>): react_jsx_runtime162.JSX.Element;
27
+ declare function DrawerHeader({
28
+ className,
29
+ ...props
30
+ }: React$1.ComponentProps<"div">): react_jsx_runtime162.JSX.Element;
31
+ declare function DrawerFooter({
32
+ className,
33
+ ...props
34
+ }: React$1.ComponentProps<"div">): react_jsx_runtime162.JSX.Element;
35
+ declare function DrawerTitle({
36
+ className,
37
+ ...props
38
+ }: React$1.ComponentProps<typeof Drawer$1.Title>): react_jsx_runtime162.JSX.Element;
39
+ declare function DrawerDescription({
40
+ className,
41
+ ...props
42
+ }: React$1.ComponentProps<typeof Drawer$1.Description>): react_jsx_runtime162.JSX.Element;
43
+ //#endregion
44
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
45
+ //# sourceMappingURL=drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.d.ts","names":[],"sources":["../../src/components/drawer.tsx"],"sourcesContent":[],"mappings":";;;;;iBAOS,MAAA;;GAEN,OAAA,CAAM,sBAAsB,QAAA,CAAgB,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAI3C,aAAA;;GAEN,OAAA,CAAM,sBAAsB,QAAA,CAAgB,WAAQ,oBAAA,CAAA,GAAA,CAAA;iBAI9C,YAAA;;GAEN,OAAA,CAAM,sBAAsB,QAAA,CAAgB,UAAO,oBAAA,CAAA,GAAA,CAAA;AAlBW,iBAsBxD,WAAA,CAlBM;EAAA,GAAA;AAAA,CAAA,EAoBZ,OAAA,CAAM,cApBM,CAAA,OAoBgB,QAAA,CAAgB,KApBhC,CAAA,CAAA,EAoBsC,oBAAA,CAAA,GAAA,CAAA,OApBtC;iBAwBN,aAAA,CAtBsC;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyB5C,OAAA,CAAM,cAzBsC,CAAA,OAyBhB,QAAA,CAAgB,QAzBA,CAAA,CAAA,EAyBS,oBAAA,CAAA,GAAA,CAAA,OAzBT;iBAsCtC,aAAA,CAtCA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA0CN,OAAA,CAAM,cA1CA,CAAA,OA0CsB,QAAA,CAAgB,KA1CtC,CAAA,CAAA,EA0C4C,oBAAA,CAAA,GAAA,CAAA,OA1C5C;iBA2EA,YAAA,CA3E2C;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA2EL,OAAA,CAAM,cA3ED,CAAA,KAAA,CAAA,CAAA,EA2EsB,oBAAA,CAAA,GAAA,CAAA,OA3EtB;iBAwF3C,YAAA,CAxF2C;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAwFL,OAAA,CAAM,cAxFD,CAAA,KAAA,CAAA,CAAA,EAwFsB,oBAAA,CAAA,GAAA,CAAA,OAxFtB;AAAA,iBAkG3C,WAAA,CA9Fa;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAiGnB,OAAA,CAAM,cAjGa,CAAA,OAiGS,QAAA,CAAgB,KAjGzB,CAAA,CAAA,EAiG+B,oBAAA,CAAA,GAAA,CAAA,OAjG/B;iBA2Gb,iBAAA,CAzGsC;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA4G5C,OAAA,CAAM,cA5GsC,CAAA,OA4GhB,QAAA,CAAgB,WA5GA,CAAA,CAAA,EA4GY,oBAAA,CAAA,GAAA,CAAA,OA5GZ"}
@@ -0,0 +1,86 @@
1
+ "use client";
2
+
3
+ import { t as cn } from "../utils-mWJR2N24.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import "react";
6
+ import { Drawer as Drawer$1 } from "@base-ui/react/drawer";
7
+
8
+ //#region src/components/drawer.tsx
9
+ function Drawer({ ...props }) {
10
+ return /* @__PURE__ */ jsx(Drawer$1.Root, {
11
+ "data-slot": "drawer",
12
+ ...props
13
+ });
14
+ }
15
+ function DrawerTrigger({ ...props }) {
16
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, {
17
+ "data-slot": "drawer-trigger",
18
+ ...props
19
+ });
20
+ }
21
+ function DrawerPortal({ ...props }) {
22
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, {
23
+ "data-slot": "drawer-portal",
24
+ ...props
25
+ });
26
+ }
27
+ function DrawerClose({ ...props }) {
28
+ return /* @__PURE__ */ jsx(Drawer$1.Close, {
29
+ "data-slot": "drawer-close",
30
+ ...props
31
+ });
32
+ }
33
+ function DrawerOverlay({ className, ...props }) {
34
+ return /* @__PURE__ */ jsx(Drawer$1.Backdrop, {
35
+ "data-slot": "drawer-overlay",
36
+ className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-300 supports-backdrop-filter:backdrop-blur-xs data-ending-style:opacity-0 data-starting-style:opacity-0 data-swiping:duration-0", className),
37
+ ...props
38
+ });
39
+ }
40
+ function DrawerContent({ className, children, ...props }) {
41
+ return /* @__PURE__ */ jsxs(DrawerPortal, {
42
+ "data-slot": "drawer-portal",
43
+ children: [/* @__PURE__ */ jsx(DrawerOverlay, {}), /* @__PURE__ */ jsx(Drawer$1.Viewport, {
44
+ "data-slot": "drawer-viewport",
45
+ className: "fixed inset-0 z-50",
46
+ children: /* @__PURE__ */ jsxs(Drawer$1.Popup, {
47
+ "data-slot": "drawer-content",
48
+ className: cn("group/drawer-content fixed z-50 flex h-auto flex-col overflow-y-auto overscroll-contain bg-popover text-sm text-popover-foreground outline-none", "[transform:translate(var(--drawer-swipe-movement-x,0px),var(--drawer-swipe-movement-y,0px))] transition-transform duration-500 ease-[cubic-bezier(0.32,0.72,0,1)] data-swiping:duration-0", "data-[swipe-direction=down]:inset-x-0 data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:mt-24 data-[swipe-direction=down]:max-h-[80vh] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=down]:data-starting-style:[transform:translateY(100%)] data-[swipe-direction=down]:data-ending-style:[transform:translateY(100%)]", "data-[swipe-direction=up]:inset-x-0 data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:mb-24 data-[swipe-direction=up]:max-h-[80vh] data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b data-[swipe-direction=up]:data-starting-style:[transform:translateY(-100%)] data-[swipe-direction=up]:data-ending-style:[transform:translateY(-100%)]", "data-[swipe-direction=left]:inset-y-0 data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:w-3/4 data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=left]:ppx-sm:max-w-sm data-[swipe-direction=left]:data-starting-style:[transform:translateX(-100%)] data-[swipe-direction=left]:data-ending-style:[transform:translateX(-100%)]", "data-[swipe-direction=right]:inset-y-0 data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:w-3/4 data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=right]:ppx-sm:max-w-sm data-[swipe-direction=right]:data-starting-style:[transform:translateX(100%)] data-[swipe-direction=right]:data-ending-style:[transform:translateX(100%)]", className),
49
+ ...props,
50
+ children: [/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 hidden h-1.5 w-[100px] shrink-0 rounded-full bg-muted group-data-[swipe-direction=down]/drawer-content:block" }), children]
51
+ })
52
+ })]
53
+ });
54
+ }
55
+ function DrawerHeader({ className, ...props }) {
56
+ return /* @__PURE__ */ jsx("div", {
57
+ "data-slot": "drawer-header",
58
+ className: cn("flex flex-col gap-0.5 p-4 group-data-[swipe-direction=down]/drawer-content:text-center group-data-[swipe-direction=up]/drawer-content:text-center ppx-md:gap-1.5 ppx-md:text-start", className),
59
+ ...props
60
+ });
61
+ }
62
+ function DrawerFooter({ className, ...props }) {
63
+ return /* @__PURE__ */ jsx("div", {
64
+ "data-slot": "drawer-footer",
65
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
66
+ ...props
67
+ });
68
+ }
69
+ function DrawerTitle({ className, ...props }) {
70
+ return /* @__PURE__ */ jsx(Drawer$1.Title, {
71
+ "data-slot": "drawer-title",
72
+ className: cn("font-heading text-lg font-medium text-foreground", className),
73
+ ...props
74
+ });
75
+ }
76
+ function DrawerDescription({ className, ...props }) {
77
+ return /* @__PURE__ */ jsx(Drawer$1.Description, {
78
+ "data-slot": "drawer-description",
79
+ className: cn("text-sm text-muted-foreground", className),
80
+ ...props
81
+ });
82
+ }
83
+
84
+ //#endregion
85
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
86
+ //# sourceMappingURL=drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.js","names":["DrawerPrimitive"],"sources":["../../src/components/drawer.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"@base-ui/react/drawer\"\n\nimport { cn } from \"@px-ui/ui/lib/utils\"\n\nfunction Drawer({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Backdrop>) {\n return (\n <DrawerPrimitive.Backdrop\n data-slot=\"drawer-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 transition-opacity duration-300 supports-backdrop-filter:backdrop-blur-xs data-ending-style:opacity-0 data-starting-style:opacity-0 data-swiping:duration-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Popup>) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Viewport\n data-slot=\"drawer-viewport\"\n className=\"fixed inset-0 z-50\"\n >\n <DrawerPrimitive.Popup\n data-slot=\"drawer-content\"\n className={cn(\n \"group/drawer-content fixed z-50 flex h-auto flex-col overflow-y-auto overscroll-contain bg-popover text-sm text-popover-foreground outline-none\",\n \"[transform:translate(var(--drawer-swipe-movement-x,0px),var(--drawer-swipe-movement-y,0px))] transition-transform duration-500 ease-[cubic-bezier(0.32,0.72,0,1)] data-swiping:duration-0\",\n // bottom (swipeDirection=\"down\", default)\n \"data-[swipe-direction=down]:inset-x-0 data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:mt-24 data-[swipe-direction=down]:max-h-[80vh] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=down]:data-starting-style:[transform:translateY(100%)] data-[swipe-direction=down]:data-ending-style:[transform:translateY(100%)]\",\n // top (swipeDirection=\"up\")\n \"data-[swipe-direction=up]:inset-x-0 data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:mb-24 data-[swipe-direction=up]:max-h-[80vh] data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b data-[swipe-direction=up]:data-starting-style:[transform:translateY(-100%)] data-[swipe-direction=up]:data-ending-style:[transform:translateY(-100%)]\",\n // left (swipeDirection=\"left\")\n \"data-[swipe-direction=left]:inset-y-0 data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:w-3/4 data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=left]:ppx-sm:max-w-sm data-[swipe-direction=left]:data-starting-style:[transform:translateX(-100%)] data-[swipe-direction=left]:data-ending-style:[transform:translateX(-100%)]\",\n // right (swipeDirection=\"right\")\n \"data-[swipe-direction=right]:inset-y-0 data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:w-3/4 data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=right]:ppx-sm:max-w-sm data-[swipe-direction=right]:data-starting-style:[transform:translateX(100%)] data-[swipe-direction=right]:data-ending-style:[transform:translateX(100%)]\",\n className\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 hidden h-1.5 w-[100px] shrink-0 rounded-full bg-muted group-data-[swipe-direction=down]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"flex flex-col gap-0.5 p-4 group-data-[swipe-direction=down]/drawer-content:text-center group-data-[swipe-direction=up]/drawer-content:text-center ppx-md:gap-1.5 ppx-md:text-start\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn(\"font-heading text-lg font-medium text-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n"],"mappings":";;;;;;;;AAOA,SAAS,OAAO,EACd,GAAG,SACiD;AACpD,QAAO,oBAACA,SAAgB;EAAK,aAAU;EAAS,GAAI;GAAS;;AAG/D,SAAS,cAAc,EACrB,GAAG,SACoD;AACvD,QAAO,oBAACA,SAAgB;EAAQ,aAAU;EAAiB,GAAI;GAAS;;AAG1E,SAAS,aAAa,EACpB,GAAG,SACmD;AACtD,QAAO,oBAACA,SAAgB;EAAO,aAAU;EAAgB,GAAI;GAAS;;AAGxE,SAAS,YAAY,EACnB,GAAG,SACkD;AACrD,QAAO,oBAACA,SAAgB;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,cAAc,EACrB,WACA,GAAG,SACqD;AACxD,QACE,oBAACA,SAAgB;EACf,aAAU;EACV,WAAW,GACT,8LACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,cAAc,EACrB,WACA,UACA,GAAG,SACkD;AACrD,QACE,qBAAC;EAAa,aAAU;aACtB,oBAAC,kBAAgB,EACjB,oBAACA,SAAgB;GACf,aAAU;GACV,WAAU;aAEV,qBAACA,SAAgB;IACf,aAAU;IACV,WAAW,GACT,mJACA,6LAEA,+XAEA,8WAEA,kYAEA,yYACA,UACD;IACD,GAAI;eAEJ,oBAAC,SAAI,WAAU,8HAA8H,EAC5I;KACqB;IACC;GACd;;AAInB,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,sLACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,mCAAmC,UAAU;EAC3D,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;AACrD,QACE,oBAACA,SAAgB;EACf,aAAU;EACV,WAAW,GAAG,oDAAoD,UAAU;EAC5E,GAAI;GACJ;;AAIN,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;AAC3D,QACE,oBAACA,SAAgB;EACf,aAAU;EACV,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ"}
@@ -0,0 +1,2 @@
1
+ import { a as DropdownMenuItem, c as DropdownMenuRadioGroup, d as DropdownMenuShortcut, f as DropdownMenuSub, h as DropdownMenuTrigger, i as DropdownMenuGroup, l as DropdownMenuRadioItem, m as DropdownMenuSubTrigger, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, p as DropdownMenuSubContent, r as DropdownMenuContent, s as DropdownMenuPortal, t as DropdownMenu, u as DropdownMenuSeparator } from "../dropdown-menu-tIPvwiCD.js";
2
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -0,0 +1,4 @@
1
+ import "../utils-mWJR2N24.js";
2
+ import { a as DropdownMenuItem, c as DropdownMenuRadioGroup, d as DropdownMenuShortcut, f as DropdownMenuSub, h as DropdownMenuTrigger, i as DropdownMenuGroup, l as DropdownMenuRadioItem, m as DropdownMenuSubTrigger, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, p as DropdownMenuSubContent, r as DropdownMenuContent, s as DropdownMenuPortal, t as DropdownMenu, u as DropdownMenuSeparator } from "../dropdown-menu-CcumvwhM.js";
3
+
4
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -0,0 +1,36 @@
1
+ import * as react_jsx_runtime172 from "react/jsx-runtime";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as class_variance_authority_types9 from "class-variance-authority/types";
4
+
5
+ //#region src/components/empty.d.ts
6
+ declare function Empty({
7
+ className,
8
+ ...props
9
+ }: React.ComponentProps<"div">): react_jsx_runtime172.JSX.Element;
10
+ declare function EmptyHeader({
11
+ className,
12
+ ...props
13
+ }: React.ComponentProps<"div">): react_jsx_runtime172.JSX.Element;
14
+ declare const emptyMediaVariants: (props?: ({
15
+ variant?: "default" | "icon" | null | undefined;
16
+ } & class_variance_authority_types9.ClassProp) | undefined) => string;
17
+ declare function EmptyMedia({
18
+ className,
19
+ variant,
20
+ ...props
21
+ }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): react_jsx_runtime172.JSX.Element;
22
+ declare function EmptyTitle({
23
+ className,
24
+ ...props
25
+ }: React.ComponentProps<"div">): react_jsx_runtime172.JSX.Element;
26
+ declare function EmptyDescription({
27
+ className,
28
+ ...props
29
+ }: React.ComponentProps<"p">): react_jsx_runtime172.JSX.Element;
30
+ declare function EmptyContent({
31
+ className,
32
+ ...props
33
+ }: React.ComponentProps<"div">): react_jsx_runtime172.JSX.Element;
34
+ //#endregion
35
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
36
+ //# sourceMappingURL=empty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.d.ts","names":[],"sources":["../../src/components/empty.tsx"],"sourcesContent":[],"mappings":";;;;;iBAIS,KAAA;;;GAA+B,KAAA,CAAM,wBAAqB,oBAAA,CAAA,GAAA,CAAA;iBAa1D,WAAA;;;GAAqC,KAAA,CAAM,wBAAqB,oBAAA,CAAA,GAAA,CAAA;cAUnE,0BAvBQ;;AAJmD,CAAA,GAwChE,+BAAA,CAAA,SApCa,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBAsCL,UAAA,CAtCQ;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EA0Cd,KAAA,CAAM,cA1CQ,CAAA,KAAA,CAAA,GA0CgB,YA1ChB,CAAA,OA0CoC,kBA1CpC,CAAA,CAAA,EA0CuD,oBAAA,CAAA,GAAA,CAAA,OA1CvD;iBAqDR,UAAA,CArDqC;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAqDD,KAAA,CAAM,cArDL,CAAA,KAAA,CAAA,CAAA,EAqD0B,oBAAA,CAAA,GAAA,CAAA,OArD1B;iBAkErC,gBAAA,CAlE0D;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAkEhB,KAAA,CAAM,cAlEU,CAAA,GAAA,CAAA,CAAA,EAkES,oBAAA,CAAA,GAAA,CAAA,OAlET;iBA+E1D,YAAA,CA/E0D;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA+EpB,KAAA,CAAM,cA/Ec,CAAA,KAAA,CAAA,CAAA,EA+EO,oBAAA,CAAA,GAAA,CAAA,OA/EP"}
@@ -0,0 +1,62 @@
1
+ import { t as cn } from "../utils-mWJR2N24.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+
5
+ //#region src/components/empty.tsx
6
+ function Empty({ className, ...props }) {
7
+ return /* @__PURE__ */ jsx("div", {
8
+ "data-slot": "empty",
9
+ className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance", className),
10
+ ...props
11
+ });
12
+ }
13
+ function EmptyHeader({ className, ...props }) {
14
+ return /* @__PURE__ */ jsx("div", {
15
+ "data-slot": "empty-header",
16
+ className: cn("flex max-w-sm flex-col items-center gap-2", className),
17
+ ...props
18
+ });
19
+ }
20
+ const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
21
+ variants: { variant: {
22
+ default: "bg-transparent",
23
+ icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
24
+ } },
25
+ defaultVariants: { variant: "default" }
26
+ });
27
+ function EmptyMedia({ className, variant = "default", ...props }) {
28
+ return /* @__PURE__ */ jsx("div", {
29
+ "data-slot": "empty-icon",
30
+ "data-variant": variant,
31
+ className: cn(emptyMediaVariants({
32
+ variant,
33
+ className
34
+ })),
35
+ ...props
36
+ });
37
+ }
38
+ function EmptyTitle({ className, ...props }) {
39
+ return /* @__PURE__ */ jsx("div", {
40
+ "data-slot": "empty-title",
41
+ className: cn("font-heading text-lg font-medium tracking-ppx-tight", className),
42
+ ...props
43
+ });
44
+ }
45
+ function EmptyDescription({ className, ...props }) {
46
+ return /* @__PURE__ */ jsx("div", {
47
+ "data-slot": "empty-description",
48
+ className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
49
+ ...props
50
+ });
51
+ }
52
+ function EmptyContent({ className, ...props }) {
53
+ return /* @__PURE__ */ jsx("div", {
54
+ "data-slot": "empty-content",
55
+ className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
56
+ ...props
57
+ });
58
+ }
59
+
60
+ //#endregion
61
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
62
+ //# sourceMappingURL=empty.js.map