@godxjp/ui 13.9.2 → 13.10.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 (474) hide show
  1. package/dist/app/app-provider.d.ts +30 -0
  2. package/dist/app/app-provider.js +244 -0
  3. package/dist/app/date-format-labels.d.ts +8 -0
  4. package/dist/app/date-format-labels.js +16 -0
  5. package/dist/app/date-formats.d.ts +10 -0
  6. package/dist/app/date-formats.js +27 -0
  7. package/dist/app/index.d.ts +13 -136
  8. package/dist/app/index.js +65 -38
  9. package/dist/app/locales.d.ts +12 -0
  10. package/dist/app/locales.js +26 -0
  11. package/dist/app/request-headers.d.ts +7 -0
  12. package/dist/app/request-headers.js +27 -0
  13. package/dist/app/storage.d.ts +11 -0
  14. package/dist/app/storage.js +32 -0
  15. package/dist/app/time-format-labels.d.ts +8 -0
  16. package/dist/app/time-format-labels.js +14 -0
  17. package/dist/app/time-formats.d.ts +7 -0
  18. package/dist/app/time-formats.js +14 -0
  19. package/dist/app/timezones.d.ts +31 -0
  20. package/dist/app/timezones.js +161 -0
  21. package/dist/app/types.d.ts +21 -0
  22. package/dist/app/types.js +30 -0
  23. package/dist/app/use-formatting.d.ts +19 -0
  24. package/dist/app/use-formatting.js +37 -0
  25. package/dist/components/admin/index.d.ts +26 -66
  26. package/dist/components/admin/index.js +96 -49
  27. package/dist/components/data-display/accordion.d.ts +1 -0
  28. package/dist/components/data-display/accordion.js +7 -0
  29. package/dist/components/data-display/avatar.d.ts +1 -0
  30. package/dist/components/data-display/avatar.js +6 -0
  31. package/dist/components/data-display/badge.d.ts +9 -13
  32. package/dist/components/data-display/badge.js +111 -5
  33. package/dist/components/data-display/card.d.ts +22 -26
  34. package/dist/components/data-display/card.js +153 -2
  35. package/dist/components/data-display/carousel.d.ts +11 -13
  36. package/dist/components/data-display/carousel.js +220 -4
  37. package/dist/components/data-display/collapsible.d.ts +4 -0
  38. package/dist/components/data-display/collapsible.js +9 -0
  39. package/dist/components/data-display/data-table.d.ts +53 -0
  40. package/dist/{chunk-DQGTN6UJ.js → components/data-display/data-table.js} +28 -36
  41. package/dist/components/data-display/descriptions.d.ts +19 -0
  42. package/dist/components/data-display/descriptions.js +25 -0
  43. package/dist/components/data-display/empty-state.d.ts +3 -0
  44. package/dist/{chunk-YD7V2HGZ.js → components/data-display/empty-state.js} +5 -5
  45. package/dist/components/data-display/hover-card.d.ts +1 -0
  46. package/dist/components/data-display/hover-card.js +6 -0
  47. package/dist/components/data-display/index.d.ts +24 -79
  48. package/dist/components/data-display/index.js +95 -176
  49. package/dist/components/data-display/popover.d.ts +9 -13
  50. package/dist/components/data-display/popover.js +61 -2
  51. package/dist/components/data-display/progress.d.ts +7 -0
  52. package/dist/components/data-display/progress.js +27 -0
  53. package/dist/components/data-display/scroll-area.d.ts +4 -7
  54. package/dist/components/data-display/scroll-area.js +38 -2
  55. package/dist/components/data-display/table.d.ts +7 -10
  56. package/dist/components/data-display/table.js +36 -3
  57. package/dist/components/data-display/timeline.d.ts +12 -0
  58. package/dist/components/data-display/timeline.js +35 -0
  59. package/dist/components/data-display/tree-list.d.ts +13 -0
  60. package/dist/components/data-display/tree-list.js +30 -0
  61. package/dist/components/data-entry/calendar.d.ts +3 -19
  62. package/dist/components/data-entry/calendar.js +96 -6
  63. package/dist/components/data-entry/cascader.d.ts +4 -35
  64. package/dist/components/data-entry/cascader.js +327 -10
  65. package/dist/components/data-entry/checkbox-group.d.ts +3 -0
  66. package/dist/{chunk-BE6GJGKJ.js → components/data-entry/checkbox-group.js} +9 -26
  67. package/dist/components/data-entry/checkbox.d.ts +7 -16
  68. package/dist/components/data-entry/checkbox.js +26 -4
  69. package/dist/components/data-entry/choice-option.d.ts +10 -0
  70. package/dist/components/data-entry/choice-option.js +7 -0
  71. package/dist/components/data-entry/color-picker.d.ts +3 -19
  72. package/dist/components/data-entry/color-picker.js +75 -6
  73. package/dist/components/data-entry/command.d.ts +7 -10
  74. package/dist/components/data-entry/command.js +51 -3
  75. package/dist/components/data-entry/date-picker.d.ts +3 -19
  76. package/dist/components/data-entry/date-picker.js +153 -9
  77. package/dist/components/data-entry/date-range-picker.d.ts +3 -19
  78. package/dist/components/data-entry/date-range-picker.js +191 -8
  79. package/dist/components/data-entry/field.d.ts +4 -0
  80. package/dist/{chunk-44YRPSZ7.js → components/data-entry/field.js} +6 -11
  81. package/dist/components/data-entry/form-field.d.ts +3 -0
  82. package/dist/{chunk-LBYSX3VM.js → components/data-entry/form-field.js} +14 -47
  83. package/dist/components/data-entry/form.d.ts +29 -0
  84. package/dist/components/data-entry/form.js +41 -0
  85. package/dist/components/data-entry/index.d.ts +61 -164
  86. package/dist/components/data-entry/index.js +117 -37
  87. package/dist/components/data-entry/input-otp.d.ts +1 -0
  88. package/dist/components/data-entry/input-otp.js +7 -0
  89. package/dist/components/data-entry/input.d.ts +3 -6
  90. package/dist/components/data-entry/input.js +98 -4
  91. package/dist/components/data-entry/label.d.ts +4 -8
  92. package/dist/components/data-entry/label.js +25 -2
  93. package/dist/components/data-entry/month-picker.d.ts +9 -0
  94. package/dist/components/data-entry/month-picker.js +188 -0
  95. package/dist/components/data-entry/month-range-picker.d.ts +11 -0
  96. package/dist/components/data-entry/month-range-picker.js +245 -0
  97. package/dist/components/data-entry/number-input.d.ts +12 -0
  98. package/dist/components/data-entry/number-input.js +219 -0
  99. package/dist/components/data-entry/password-input.d.ts +2 -0
  100. package/dist/components/data-entry/password-input.js +4 -0
  101. package/dist/components/data-entry/password-strength.d.ts +20 -0
  102. package/dist/{chunk-VSUYVT2Q.js → components/data-entry/password-strength.js} +8 -62
  103. package/dist/components/data-entry/radio.d.ts +7 -20
  104. package/dist/components/data-entry/radio.js +93 -4
  105. package/dist/components/data-entry/rating.d.ts +2 -0
  106. package/dist/components/data-entry/rating.js +4 -0
  107. package/dist/components/data-entry/search-input.d.ts +18 -0
  108. package/dist/{chunk-LVLPNKJP.js → components/data-entry/search-input.js} +11 -11
  109. package/dist/components/data-entry/search-select.d.ts +11 -0
  110. package/dist/{chunk-7KN4I3ZG.js → components/data-entry/search-select.js} +15 -239
  111. package/dist/components/data-entry/select.d.ts +14 -30
  112. package/dist/components/data-entry/select.js +243 -9
  113. package/dist/components/data-entry/slider.d.ts +4 -18
  114. package/dist/components/data-entry/slider.js +52 -2
  115. package/dist/components/data-entry/switch.d.ts +4 -18
  116. package/dist/components/data-entry/switch.js +40 -2
  117. package/dist/components/data-entry/tag-input.d.ts +2 -0
  118. package/dist/components/data-entry/tag-input.js +4 -0
  119. package/dist/components/data-entry/textarea.d.ts +3 -6
  120. package/dist/components/data-entry/textarea.js +86 -5
  121. package/dist/components/data-entry/time-input.d.ts +3 -6
  122. package/dist/components/data-entry/time-input.js +137 -3
  123. package/dist/components/data-entry/time-picker.d.ts +3 -19
  124. package/dist/components/data-entry/time-picker.js +329 -7
  125. package/dist/components/data-entry/toggle-group.d.ts +1 -0
  126. package/dist/components/data-entry/toggle-group.js +5 -0
  127. package/dist/components/data-entry/toggle.d.ts +2 -0
  128. package/dist/components/data-entry/toggle.js +4 -0
  129. package/dist/components/data-entry/transfer.d.ts +3 -20
  130. package/dist/components/data-entry/transfer.js +193 -13
  131. package/dist/components/data-entry/tree-select-strategy.d.ts +5 -0
  132. package/dist/components/data-entry/tree-select-strategy.js +8 -0
  133. package/dist/components/data-entry/tree-select.d.ts +5 -25
  134. package/dist/components/data-entry/tree-select.js +299 -13
  135. package/dist/components/data-entry/tree-utils.d.ts +48 -0
  136. package/dist/{chunk-SMLKNECP.js → components/data-entry/tree-utils.js} +33 -5
  137. package/dist/components/data-entry/upload-crop-dialog.d.ts +9 -0
  138. package/dist/components/data-entry/upload-crop-dialog.js +102 -0
  139. package/dist/components/data-entry/upload-types.d.ts +39 -0
  140. package/dist/components/data-entry/upload-types.js +41 -0
  141. package/dist/components/data-entry/upload.d.ts +6 -45
  142. package/dist/components/data-entry/upload.js +417 -12
  143. package/dist/components/data-entry/use-upload-draft.d.ts +25 -0
  144. package/dist/components/data-entry/use-upload-draft.js +64 -0
  145. package/dist/components/data-grid/data-grid.d.ts +67 -0
  146. package/dist/components/data-grid/data-grid.js +402 -0
  147. package/dist/components/data-grid/index.d.ts +2 -71
  148. package/dist/components/data-grid/index.js +3 -371
  149. package/dist/components/feedback/alert.d.ts +37 -42
  150. package/dist/components/feedback/alert.js +127 -7
  151. package/dist/components/feedback/dialog.d.ts +21 -25
  152. package/dist/components/feedback/dialog.js +356 -8
  153. package/dist/components/feedback/index.d.ts +10 -28
  154. package/dist/components/feedback/index.js +105 -18
  155. package/dist/components/feedback/overlay-header-tone.d.ts +7 -0
  156. package/dist/{chunk-VU4GFGDG.js → components/feedback/overlay-header-tone.js} +4 -4
  157. package/dist/components/feedback/sheet.d.ts +18 -23
  158. package/dist/components/feedback/sheet.js +192 -3
  159. package/dist/components/feedback/skeleton.d.ts +17 -0
  160. package/dist/{chunk-2BR7KFCP.js → components/feedback/skeleton.js} +10 -6
  161. package/dist/components/feedback/sonner.d.ts +2 -5
  162. package/dist/components/feedback/sonner.js +50 -1
  163. package/dist/components/feedback/tooltip.d.ts +10 -0
  164. package/dist/{chunk-32WO3YLB.js → components/feedback/tooltip.js} +12 -9
  165. package/dist/components/feedback/use-toast.d.ts +3 -0
  166. package/dist/components/feedback/use-toast.js +5 -0
  167. package/dist/components/general/button.d.ts +12 -18
  168. package/dist/components/general/button.js +118 -4
  169. package/dist/components/general/index.d.ts +4 -37
  170. package/dist/components/general/index.js +8 -48
  171. package/dist/components/general/typography.d.ts +30 -0
  172. package/dist/components/general/typography.js +46 -0
  173. package/dist/components/layout/app-shell.d.ts +3 -0
  174. package/dist/components/layout/app-shell.js +33 -0
  175. package/dist/components/layout/aspect-ratio.d.ts +1 -0
  176. package/dist/components/layout/aspect-ratio.js +4 -0
  177. package/dist/components/layout/breadcrumb.d.ts +7 -0
  178. package/dist/components/layout/breadcrumb.js +16 -0
  179. package/dist/components/layout/flex.d.ts +3 -0
  180. package/dist/components/layout/flex.js +29 -0
  181. package/dist/components/layout/index.d.ts +19 -60
  182. package/dist/components/layout/index.js +29 -12
  183. package/dist/components/layout/page-container.d.ts +8 -0
  184. package/dist/components/layout/page-container.js +77 -0
  185. package/dist/components/layout/resizable.d.ts +8 -12
  186. package/dist/components/layout/resizable.js +44 -2
  187. package/dist/components/layout/responsive-grid.d.ts +7 -0
  188. package/dist/{chunk-C3PKEV6S.js → components/layout/responsive-grid.js} +4 -5
  189. package/dist/components/layout/separator.d.ts +1 -0
  190. package/dist/components/layout/separator.js +4 -0
  191. package/dist/components/layout/sidebar.d.ts +21 -0
  192. package/dist/components/layout/sidebar.js +254 -0
  193. package/dist/components/layout/split-pane.d.ts +7 -0
  194. package/dist/components/layout/split-pane.js +10 -0
  195. package/dist/components/layout/topbar.d.ts +3 -0
  196. package/dist/components/layout/topbar.js +133 -0
  197. package/dist/components/navigation/app-setting-picker.d.ts +9 -0
  198. package/dist/{chunk-FISUA4FU.js → components/navigation/app-setting-picker.js} +24 -49
  199. package/dist/components/navigation/context-menu.d.ts +16 -20
  200. package/dist/components/navigation/context-menu.js +144 -2
  201. package/dist/components/navigation/dropdown-menu.d.ts +17 -21
  202. package/dist/components/navigation/dropdown-menu.js +164 -2
  203. package/dist/components/navigation/filter-bar.d.ts +4 -0
  204. package/dist/components/navigation/filter-bar.js +43 -0
  205. package/dist/components/navigation/index.d.ts +12 -36
  206. package/dist/components/navigation/index.js +140 -17
  207. package/dist/components/navigation/menubar.d.ts +18 -23
  208. package/dist/components/navigation/menubar.js +135 -2
  209. package/dist/components/navigation/navigation-menu.d.ts +10 -13
  210. package/dist/components/navigation/navigation-menu.js +90 -2
  211. package/dist/components/navigation/pagination-utils.d.ts +2 -0
  212. package/dist/components/navigation/pagination-utils.js +25 -0
  213. package/dist/components/navigation/pagination.d.ts +6 -12
  214. package/dist/components/navigation/pagination.js +222 -10
  215. package/dist/components/navigation/steps.d.ts +3 -12
  216. package/dist/components/navigation/steps.js +150 -5
  217. package/dist/components/navigation/tabs.d.ts +8 -12
  218. package/dist/components/navigation/tabs.js +109 -2
  219. package/dist/components/query/data-state.d.ts +7 -0
  220. package/dist/components/query/data-state.js +44 -0
  221. package/dist/components/query/index.d.ts +10 -43
  222. package/dist/components/query/index.js +13 -195
  223. package/dist/components/query/infinite-query-state.d.ts +13 -0
  224. package/dist/components/query/infinite-query-state.js +70 -0
  225. package/dist/components/query/mutation-feedback.d.ts +7 -0
  226. package/dist/components/query/mutation-feedback.js +23 -0
  227. package/dist/components/query/prefetch-link.d.ts +7 -0
  228. package/dist/components/query/prefetch-link.js +36 -0
  229. package/dist/components/query/query-refetch-button.d.ts +4 -0
  230. package/dist/components/query/query-refetch-button.js +40 -0
  231. package/dist/components/ui/accordion.d.ts +6 -0
  232. package/dist/components/ui/accordion.js +47 -0
  233. package/dist/components/ui/alert-dialog.d.ts +1 -0
  234. package/dist/components/ui/alert-dialog.js +1 -0
  235. package/dist/components/ui/alert.d.ts +1 -0
  236. package/dist/components/ui/alert.js +1 -0
  237. package/dist/components/ui/aspect-ratio.d.ts +3 -0
  238. package/dist/components/ui/aspect-ratio.js +18 -0
  239. package/dist/components/ui/avatar.d.ts +5 -0
  240. package/dist/{chunk-QTUJSRDH.js → components/ui/avatar.js} +12 -10
  241. package/dist/components/ui/badge.d.ts +1 -0
  242. package/dist/components/ui/badge.js +1 -0
  243. package/dist/components/ui/button.d.ts +1 -0
  244. package/dist/components/ui/button.js +1 -0
  245. package/dist/components/ui/calendar.d.ts +1 -0
  246. package/dist/components/ui/calendar.js +1 -0
  247. package/dist/components/ui/card.d.ts +1 -0
  248. package/dist/components/ui/card.js +1 -0
  249. package/dist/components/ui/carousel.d.ts +1 -0
  250. package/dist/components/ui/carousel.js +1 -0
  251. package/dist/components/ui/checkbox.d.ts +1 -0
  252. package/dist/components/ui/checkbox.js +1 -0
  253. package/dist/components/ui/color-picker.d.ts +1 -0
  254. package/dist/components/ui/color-picker.js +1 -0
  255. package/dist/components/ui/command.d.ts +1 -0
  256. package/dist/components/ui/command.js +1 -0
  257. package/dist/components/ui/context-menu.d.ts +1 -0
  258. package/dist/components/ui/context-menu.js +1 -0
  259. package/dist/components/ui/date-picker.d.ts +1 -0
  260. package/dist/components/ui/date-picker.js +1 -0
  261. package/dist/components/ui/date-range-picker.d.ts +1 -0
  262. package/dist/components/ui/date-range-picker.js +1 -0
  263. package/dist/components/ui/dialog.d.ts +1 -0
  264. package/dist/components/ui/dialog.js +1 -0
  265. package/dist/components/ui/dropdown-menu.d.ts +1 -0
  266. package/dist/components/ui/dropdown-menu.js +1 -0
  267. package/dist/components/ui/hover-card.d.ts +10 -0
  268. package/dist/components/ui/hover-card.js +45 -0
  269. package/dist/components/ui/index.d.ts +43 -80
  270. package/dist/components/ui/index.js +50 -47
  271. package/dist/components/ui/input-otp.d.ts +33 -0
  272. package/dist/components/ui/input-otp.js +55 -0
  273. package/dist/components/ui/input.d.ts +1 -0
  274. package/dist/components/ui/input.js +1 -0
  275. package/dist/components/ui/label.d.ts +1 -0
  276. package/dist/components/ui/label.js +1 -0
  277. package/dist/components/ui/menubar.d.ts +1 -0
  278. package/dist/components/ui/menubar.js +1 -0
  279. package/dist/components/ui/navigation-menu.d.ts +1 -0
  280. package/dist/components/ui/navigation-menu.js +1 -0
  281. package/dist/components/ui/pagination.d.ts +1 -0
  282. package/dist/components/ui/pagination.js +1 -0
  283. package/dist/components/ui/password-input.d.ts +4 -0
  284. package/dist/components/ui/password-input.js +38 -0
  285. package/dist/components/ui/password-strength.d.ts +1 -0
  286. package/dist/components/ui/password-strength.js +1 -0
  287. package/dist/components/ui/popover.d.ts +1 -0
  288. package/dist/components/ui/popover.js +1 -0
  289. package/dist/components/ui/radio.d.ts +1 -0
  290. package/dist/components/ui/radio.js +1 -0
  291. package/dist/components/ui/rating.d.ts +13 -0
  292. package/dist/components/ui/rating.js +90 -0
  293. package/dist/components/ui/resizable.d.ts +1 -0
  294. package/dist/components/ui/resizable.js +1 -0
  295. package/dist/components/ui/scroll-area.d.ts +1 -0
  296. package/dist/components/ui/scroll-area.js +1 -0
  297. package/dist/components/ui/select.d.ts +1 -0
  298. package/dist/components/ui/select.js +1 -0
  299. package/dist/components/ui/separator.d.ts +3 -0
  300. package/dist/components/ui/separator.js +20 -0
  301. package/dist/components/ui/sheet.d.ts +1 -0
  302. package/dist/components/ui/sheet.js +1 -0
  303. package/dist/components/ui/skeleton.d.ts +1 -0
  304. package/dist/components/ui/skeleton.js +4 -0
  305. package/dist/components/ui/slider.d.ts +1 -0
  306. package/dist/components/ui/slider.js +1 -0
  307. package/dist/components/ui/sonner.d.ts +1 -0
  308. package/dist/components/ui/sonner.js +1 -0
  309. package/dist/components/ui/switch.d.ts +1 -0
  310. package/dist/components/ui/switch.js +1 -0
  311. package/dist/components/ui/table.d.ts +1 -0
  312. package/dist/components/ui/table.js +1 -0
  313. package/dist/components/ui/tabs.d.ts +1 -0
  314. package/dist/components/ui/tabs.js +1 -0
  315. package/dist/components/ui/tag-input.d.ts +13 -0
  316. package/dist/components/ui/tag-input.js +100 -0
  317. package/dist/components/ui/textarea.d.ts +1 -0
  318. package/dist/components/ui/textarea.js +1 -0
  319. package/dist/components/ui/time-input.d.ts +1 -0
  320. package/dist/components/ui/time-input.js +1 -0
  321. package/dist/components/ui/time-picker.d.ts +1 -0
  322. package/dist/components/ui/time-picker.js +1 -0
  323. package/dist/components/ui/toggle-group.d.ts +11 -0
  324. package/dist/components/ui/toggle-group.js +32 -0
  325. package/dist/components/ui/toggle.d.ts +13 -0
  326. package/dist/components/ui/toggle.js +36 -0
  327. package/dist/components/ui/upload.d.ts +1 -0
  328. package/dist/components/ui/upload.js +1 -0
  329. package/dist/form/form-field-control.d.ts +4 -0
  330. package/dist/form/form-field-control.js +42 -0
  331. package/dist/form/form-root.d.ts +4 -0
  332. package/dist/form/form-root.js +26 -0
  333. package/dist/form/index.d.ts +7 -21
  334. package/dist/form/index.js +8 -73
  335. package/dist/form/use-zod-form.d.ts +10 -0
  336. package/dist/form/use-zod-form.js +14 -0
  337. package/dist/i18n/index.d.ts +3 -326
  338. package/dist/i18n/index.js +17 -2
  339. package/dist/i18n/messages/en.json +279 -0
  340. package/dist/i18n/messages/ja.json +276 -0
  341. package/dist/i18n/messages/vi.json +276 -0
  342. package/dist/i18n/translate.d.ts +15 -0
  343. package/dist/i18n/translate.js +82 -0
  344. package/dist/i18n/use-translation.d.ts +19 -0
  345. package/dist/i18n/use-translation.js +46 -0
  346. package/dist/index.d.ts +11 -47
  347. package/dist/index.js +16 -62
  348. package/dist/lib/control-styles.d.ts +26 -0
  349. package/dist/lib/control-styles.js +34 -0
  350. package/dist/lib/datetime/detect.d.ts +4 -0
  351. package/dist/lib/datetime/detect.js +16 -0
  352. package/dist/lib/datetime/format-date.d.ts +22 -0
  353. package/dist/lib/datetime/format-date.js +73 -0
  354. package/dist/lib/datetime/format.d.ts +23 -0
  355. package/dist/lib/datetime/format.js +94 -0
  356. package/dist/lib/datetime/index.d.ts +5 -35
  357. package/dist/lib/datetime/index.js +50 -1
  358. package/dist/lib/datetime/parse.d.ts +12 -0
  359. package/dist/lib/datetime/parse.js +56 -0
  360. package/dist/lib/datetime/sync.d.ts +19 -0
  361. package/dist/lib/datetime/sync.js +45 -0
  362. package/dist/lib/format.d.ts +21 -0
  363. package/dist/{chunk-X6AJ5HEI.js → lib/format.js} +35 -5
  364. package/dist/lib/hooks.d.ts +4 -6
  365. package/dist/lib/hooks.js +70 -1
  366. package/dist/lib/utils.d.ts +2 -5
  367. package/dist/lib/utils.js +8 -1
  368. package/dist/lib/variants.d.ts +12 -0
  369. package/dist/lib/variants.js +38 -0
  370. package/dist/{app.prop-CVY8V4ss.d.ts → props/components/app.prop.d.ts} +8 -12
  371. package/dist/props/components/app.prop.js +0 -0
  372. package/dist/{data-display.prop-CT0nVMdp.d.ts → props/components/data-display.prop.d.ts} +7 -15
  373. package/dist/props/components/data-display.prop.js +0 -0
  374. package/dist/{data-entry.prop-BSUaseKh.d.ts → props/components/data-entry.prop.d.ts} +46 -91
  375. package/dist/props/components/data-entry.prop.js +0 -0
  376. package/dist/{feedback.prop-CHlHDYZK.d.ts → props/components/feedback.prop.d.ts} +10 -16
  377. package/dist/props/components/feedback.prop.js +0 -0
  378. package/dist/{form.prop-5cyL3bvT.d.ts → props/components/form.prop.d.ts} +10 -14
  379. package/dist/props/components/form.prop.js +0 -0
  380. package/dist/{general.prop-CzlQin6v.d.ts → props/components/general.prop.d.ts} +5 -10
  381. package/dist/props/components/general.prop.js +0 -0
  382. package/dist/props/components/index.d.ts +9 -27
  383. package/dist/props/components/index.js +0 -1
  384. package/dist/{layout.prop-fCz-Vlie.d.ts → props/components/layout.prop.d.ts} +19 -26
  385. package/dist/props/components/layout.prop.js +0 -0
  386. package/dist/{navigation.prop-FCsOVGrP.d.ts → props/components/navigation.prop.d.ts} +10 -15
  387. package/dist/props/components/navigation.prop.js +0 -0
  388. package/dist/{query.prop-CT2gFtr4.d.ts → props/components/query.prop.d.ts} +12 -15
  389. package/dist/props/components/query.prop.js +0 -0
  390. package/dist/props/index.d.ts +7 -28
  391. package/dist/props/index.js +12 -3
  392. package/dist/props/registry.d.ts +5 -7
  393. package/dist/props/registry.js +998 -1
  394. package/dist/{content.prop-DrV_zDy-.d.ts → props/vocabulary/content.prop.d.ts} +12 -16
  395. package/dist/props/vocabulary/content.prop.js +0 -0
  396. package/dist/props/vocabulary/data.prop.d.ts +38 -0
  397. package/dist/props/vocabulary/data.prop.js +0 -0
  398. package/dist/props/vocabulary/index.d.ts +7 -7
  399. package/dist/props/vocabulary/index.js +0 -1
  400. package/dist/props/vocabulary/interaction.prop.d.ts +45 -0
  401. package/dist/props/vocabulary/interaction.prop.js +0 -0
  402. package/dist/props/vocabulary/layout.prop.d.ts +14 -0
  403. package/dist/props/vocabulary/layout.prop.js +0 -0
  404. package/dist/{navigation.prop-CXDaVNaR.d.ts → props/vocabulary/navigation.prop.d.ts} +3 -7
  405. package/dist/props/vocabulary/navigation.prop.js +0 -0
  406. package/dist/{shared.prop-BvMSLFJ6.d.ts → props/vocabulary/shared.prop.d.ts} +23 -27
  407. package/dist/props/vocabulary/shared.prop.js +0 -0
  408. package/package.json +6 -4
  409. package/dist/aspect-ratio-CZZJd9Km.d.ts +0 -9
  410. package/dist/avatar-D9MdXzfF.d.ts +0 -8
  411. package/dist/checkbox-bBfLARyF.d.ts +0 -13
  412. package/dist/chunk-2H65B4JA.js +0 -1
  413. package/dist/chunk-2RGPEFAW.js +0 -46
  414. package/dist/chunk-3VFNWVR7.js +0 -153
  415. package/dist/chunk-4FGE5XVC.js +0 -996
  416. package/dist/chunk-5732TWQF.js +0 -1206
  417. package/dist/chunk-57VDEN64.js +0 -881
  418. package/dist/chunk-5LTW2LWF.js +0 -182
  419. package/dist/chunk-65RWSIZF.js +0 -327
  420. package/dist/chunk-7PWBC4BY.js +0 -25
  421. package/dist/chunk-7WKODMCZ.js +0 -485
  422. package/dist/chunk-B4K4BXEF.js +0 -18
  423. package/dist/chunk-B6S6LTWT.js +0 -464
  424. package/dist/chunk-B73NA66T.js +0 -122
  425. package/dist/chunk-B775Y6BE.js +0 -1
  426. package/dist/chunk-BF7J2U3E.js +0 -331
  427. package/dist/chunk-D4JX6O2W.js +0 -114
  428. package/dist/chunk-DIH7VPGN.js +0 -288
  429. package/dist/chunk-DV52WNXO.js +0 -8
  430. package/dist/chunk-DY5C44UP.js +0 -55
  431. package/dist/chunk-EQUUIEKU.js +0 -232
  432. package/dist/chunk-ES4Q3KGL.js +0 -1
  433. package/dist/chunk-FQGGF7GQ.js +0 -320
  434. package/dist/chunk-GJXOBDER.js +0 -1
  435. package/dist/chunk-HDWTBX2Q.js +0 -587
  436. package/dist/chunk-HIEGUYPP.js +0 -95
  437. package/dist/chunk-HL3G4SVG.js +0 -131
  438. package/dist/chunk-I7NQ2LIL.js +0 -40
  439. package/dist/chunk-IJ5ALJGA.js +0 -31
  440. package/dist/chunk-INIIF7F7.js +0 -47
  441. package/dist/chunk-ION2KFXK.js +0 -75
  442. package/dist/chunk-J2DEWIYY.js +0 -37
  443. package/dist/chunk-K24AQV4R.js +0 -98
  444. package/dist/chunk-KNXOBSUZ.js +0 -193
  445. package/dist/chunk-LFW37FGG.js +0 -68
  446. package/dist/chunk-LMKUKCTN.js +0 -150
  447. package/dist/chunk-NU2SOVTU.js +0 -96
  448. package/dist/chunk-NZBAFFWP.js +0 -214
  449. package/dist/chunk-Q3KUZG4P.js +0 -86
  450. package/dist/chunk-QROC2RMH.js +0 -150
  451. package/dist/chunk-QVBOICFU.js +0 -145
  452. package/dist/chunk-R2TXLS7S.js +0 -137
  453. package/dist/chunk-S2IJKT3D.js +0 -89
  454. package/dist/chunk-TBJBVEIP.js +0 -52
  455. package/dist/chunk-TO7URV7U.js +0 -51
  456. package/dist/chunk-U7N2A7A3.js +0 -9
  457. package/dist/chunk-V3N266PT.js +0 -106
  458. package/dist/chunk-W4REF4TD.js +0 -42
  459. package/dist/chunk-WGWI7EGL.js +0 -83
  460. package/dist/chunk-XBFUROAY.js +0 -117
  461. package/dist/chunk-XK3M3VRR.js +0 -32
  462. package/dist/chunk-YXVJFYQE.js +0 -191
  463. package/dist/chunk-ZT5UEUBO.js +0 -1
  464. package/dist/data-table-DRr70ULe.d.ts +0 -80
  465. package/dist/data.prop-D0UEEczj.d.ts +0 -42
  466. package/dist/filter-bar-DoDtwYrr.d.ts +0 -7
  467. package/dist/flex-1Cy46L0M.d.ts +0 -12
  468. package/dist/format-date-ByyZoqI5.d.ts +0 -51
  469. package/dist/interaction.prop-DD46aTro.d.ts +0 -47
  470. package/dist/layout.prop-CXvl2rVR.d.ts +0 -16
  471. package/dist/password-strength-DVRvXEOK.d.ts +0 -47
  472. package/dist/search-input-D4v1JGOA.d.ts +0 -27
  473. package/dist/skeleton-cj9kh5wo.d.ts +0 -20
  474. package/dist/types-mvzYGrma.d.ts +0 -37
@@ -1,131 +0,0 @@
1
- import { cn } from './chunk-U7N2A7A3.js';
2
- import * as React from 'react';
3
- import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
4
- import { Check, Circle, ChevronRight } from 'lucide-react';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
-
7
- var ContextMenu = ContextMenuPrimitive.Root;
8
- function ContextMenuTrigger(props) {
9
- return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
10
- }
11
- var ContextMenuPortal = ContextMenuPrimitive.Portal;
12
- var ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
13
- ContextMenuPrimitive.Content,
14
- {
15
- ref,
16
- "data-slot": "context-menu-content",
17
- className: cn("ui-context-menu-content", className),
18
- ...props
19
- }
20
- ) }));
21
- ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
22
- var ContextMenuItem = React.forwardRef(({ className, inset, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(
23
- ContextMenuPrimitive.Item,
24
- {
25
- ref,
26
- "data-slot": "context-menu-item",
27
- "data-inset": inset,
28
- "data-variant": variant,
29
- className: cn("ui-context-menu-item", className),
30
- ...props
31
- }
32
- ));
33
- ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
34
- var ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
35
- ContextMenuPrimitive.CheckboxItem,
36
- {
37
- ref,
38
- "data-slot": "context-menu-checkbox-item",
39
- className: cn("ui-context-menu-checkbox-item", className),
40
- checked,
41
- ...props,
42
- children: [
43
- /* @__PURE__ */ jsx("span", { className: "ui-context-menu-item-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "ui-context-menu-check" }) }) }),
44
- children
45
- ]
46
- }
47
- ));
48
- ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
49
- var ContextMenuRadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
50
- ContextMenuPrimitive.RadioGroup,
51
- {
52
- ref,
53
- "data-slot": "context-menu-radio-group",
54
- className: cn("ui-context-menu-radio-group", className),
55
- ...props
56
- }
57
- ));
58
- ContextMenuRadioGroup.displayName = ContextMenuPrimitive.RadioGroup.displayName;
59
- var ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
60
- ContextMenuPrimitive.RadioItem,
61
- {
62
- ref,
63
- "data-slot": "context-menu-radio-item",
64
- className: cn("ui-context-menu-radio-item", className),
65
- ...props,
66
- children: [
67
- /* @__PURE__ */ jsx("span", { className: "ui-context-menu-item-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "ui-context-menu-dot" }) }) }),
68
- children
69
- ]
70
- }
71
- ));
72
- ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
73
- var ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
74
- ContextMenuPrimitive.Label,
75
- {
76
- ref,
77
- "data-slot": "context-menu-label",
78
- "data-inset": inset,
79
- className: cn("ui-context-menu-label", className),
80
- ...props
81
- }
82
- ));
83
- ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
84
- var ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
85
- ContextMenuPrimitive.Separator,
86
- {
87
- ref,
88
- "data-slot": "context-menu-separator",
89
- className: cn("ui-context-menu-separator", className),
90
- ...props
91
- }
92
- ));
93
- ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
94
- var ContextMenuShortcut = ({
95
- className,
96
- ...props
97
- }) => /* @__PURE__ */ jsx(
98
- "span",
99
- {
100
- "data-slot": "context-menu-shortcut",
101
- className: cn("ui-context-menu-shortcut", className),
102
- ...props
103
- }
104
- );
105
- var ContextMenuSub = ContextMenuPrimitive.Sub;
106
- var ContextMenuSubTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
107
- ContextMenuPrimitive.SubTrigger,
108
- {
109
- ref,
110
- "data-slot": "context-menu-sub-trigger",
111
- className: cn("ui-context-menu-sub-trigger", className),
112
- ...props,
113
- children: [
114
- children,
115
- /* @__PURE__ */ jsx(ChevronRight, { className: "ui-context-menu-sub-trigger-icon", "aria-hidden": "true" })
116
- ]
117
- }
118
- ));
119
- ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
120
- var ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
121
- ContextMenuPrimitive.SubContent,
122
- {
123
- ref,
124
- "data-slot": "context-menu-sub-content",
125
- className: cn("ui-context-menu-sub-content", className),
126
- ...props
127
- }
128
- ));
129
- ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
130
-
131
- export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
@@ -1,40 +0,0 @@
1
- import { cn } from './chunk-U7N2A7A3.js';
2
- import * as React from 'react';
3
- import * as SwitchPrimitive from '@radix-ui/react-switch';
4
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
-
6
- var Switch = React.forwardRef(
7
- ({ className, size = "md", name, checked, defaultChecked = false, onCheckedChange, ...props }, ref) => {
8
- const [internalChecked, setInternalChecked] = React.useState(defaultChecked);
9
- const isControlled = checked !== void 0;
10
- const isChecked = isControlled ? checked : internalChecked;
11
- const handleCheckedChange = (next) => {
12
- if (!isControlled) {
13
- setInternalChecked(next);
14
- }
15
- onCheckedChange?.(next);
16
- };
17
- return /* @__PURE__ */ jsxs(Fragment, { children: [
18
- name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value: isChecked ? "1" : "0", readOnly: true }) : null,
19
- /* @__PURE__ */ jsx(
20
- SwitchPrimitive.Root,
21
- {
22
- ref,
23
- "data-slot": "switch",
24
- "data-size": size,
25
- checked: isChecked,
26
- onCheckedChange: handleCheckedChange,
27
- className: cn(
28
- "peer ui-switch focus-visible:border-ring focus-visible:ring-ring/50 shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
29
- className
30
- ),
31
- ...props,
32
- children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "ui-switch-thumb" })
33
- }
34
- )
35
- ] });
36
- }
37
- );
38
- Switch.displayName = SwitchPrimitive.Root.displayName;
39
-
40
- export { Switch };
@@ -1,31 +0,0 @@
1
- import { tableHeadHeightClass } from './chunk-B4K4BXEF.js';
2
- import { cn } from './chunk-U7N2A7A3.js';
3
- import * as React from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- var Table = React.forwardRef(
7
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
8
- );
9
- Table.displayName = "Table";
10
- var TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
11
- TableHeader.displayName = "TableHeader";
12
- var TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
13
- TableBody.displayName = "TableBody";
14
- var TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
15
- "tr",
16
- {
17
- ref,
18
- className: cn(
19
- "ui-table-row hover:bg-accent/70 data-[state=selected]:bg-primary/[0.06] border-b transition-colors",
20
- className
21
- ),
22
- ...props
23
- }
24
- ));
25
- TableRow.displayName = "TableRow";
26
- var TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, "data-slot": "table-head", className: cn(tableHeadHeightClass, className), ...props }));
27
- TableHead.displayName = "TableHead";
28
- var TableCell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", { ref, "data-slot": "table-cell", className: cn(className), ...props }));
29
- TableCell.displayName = "TableCell";
30
-
31
- export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow };
@@ -1,47 +0,0 @@
1
- import { cn } from './chunk-U7N2A7A3.js';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- // src/lib/variants.ts
5
- var densityClass = {
6
- compact: "ui-density-compact",
7
- default: "ui-density-default",
8
- comfortable: "ui-density-comfortable"
9
- };
10
- var pageContainerVariantClass = {
11
- default: void 0,
12
- narrow: "ui-page-container--narrow",
13
- flush: "ui-page-container--flush",
14
- ghost: "ui-page-container--ghost"
15
- };
16
- var flexGapClass = {
17
- xs: "ui-flex-gap-xs",
18
- sm: "ui-flex-gap-sm",
19
- md: "ui-flex-gap-md",
20
- lg: "ui-flex-gap-lg",
21
- xl: "ui-flex-gap-xl"
22
- };
23
- function Flex({
24
- direction = "col",
25
- gap = "md",
26
- align,
27
- justify,
28
- wrap = false,
29
- className,
30
- children,
31
- ...props
32
- }) {
33
- return /* @__PURE__ */ jsx(
34
- "div",
35
- {
36
- "data-direction": direction,
37
- "data-align": align,
38
- "data-justify": justify,
39
- "data-wrap": wrap ? "true" : void 0,
40
- className: cn("ui-flex", flexGapClass[gap], className),
41
- ...props,
42
- children
43
- }
44
- );
45
- }
46
-
47
- export { Flex, densityClass, pageContainerVariantClass };
@@ -1,75 +0,0 @@
1
- import { Input } from './chunk-K24AQV4R.js';
2
- import { controlIconClass } from './chunk-B4K4BXEF.js';
3
- import { useTranslation } from './chunk-B6S6LTWT.js';
4
- import { cn } from './chunk-U7N2A7A3.js';
5
- import * as React from 'react';
6
- import { jsxs, jsx } from 'react/jsx-runtime';
7
-
8
- var HEX_PATTERN = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
9
- function normalizeHex(value) {
10
- if (!value.startsWith("#")) return `#${value}`;
11
- return value;
12
- }
13
- function ColorPicker({
14
- value = "#2563eb",
15
- onValueChange,
16
- disabled,
17
- className,
18
- id,
19
- showHexInput = true
20
- }) {
21
- const { t } = useTranslation();
22
- const [draft, setDraft] = React.useState(null);
23
- const display = draft ?? value;
24
- const commit = (next) => {
25
- const normalized = normalizeHex(next);
26
- if (!HEX_PATTERN.test(normalized)) {
27
- setDraft(null);
28
- return;
29
- }
30
- setDraft(null);
31
- onValueChange?.(normalized);
32
- };
33
- return /* @__PURE__ */ jsxs("div", { className: cn("ui-color-picker", className), children: [
34
- /* @__PURE__ */ jsxs("div", { className: cn("ui-color-picker-swatch", controlIconClass), children: [
35
- /* @__PURE__ */ jsx(
36
- "div",
37
- {
38
- className: "ui-color-picker-preview",
39
- style: { backgroundColor: HEX_PATTERN.test(display) ? display : value },
40
- "aria-hidden": "true"
41
- }
42
- ),
43
- /* @__PURE__ */ jsx(
44
- "input",
45
- {
46
- id,
47
- type: "color",
48
- value: HEX_PATTERN.test(display) ? display : value,
49
- disabled,
50
- onChange: (event) => commit(event.target.value),
51
- className: "ui-color-picker-input",
52
- "aria-label": t("dataEntry.colorPicker.ariaLabel")
53
- }
54
- )
55
- ] }),
56
- showHexInput && /* @__PURE__ */ jsx(
57
- Input,
58
- {
59
- id: id ? `${id}-hex` : void 0,
60
- value: display,
61
- disabled,
62
- "aria-label": t("dataEntry.colorPicker.hexLabel"),
63
- onChange: (event) => setDraft(event.target.value),
64
- onBlur: () => commit(display),
65
- onKeyDown: (event) => {
66
- if (event.key === "Enter") commit(display);
67
- },
68
- className: "ui-color-picker-hex",
69
- spellCheck: false
70
- }
71
- )
72
- ] });
73
- }
74
-
75
- export { ColorPicker };
@@ -1,37 +0,0 @@
1
- import { cn } from './chunk-U7N2A7A3.js';
2
- import * as React from 'react';
3
- import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
4
- import { jsxs, jsx } from 'react/jsx-runtime';
5
-
6
- var ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7
- ScrollAreaPrimitive.Root,
8
- {
9
- ref,
10
- className: cn("relative overflow-hidden", className),
11
- ...props,
12
- children: [
13
- /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "size-full rounded-[inherit]", children }),
14
- /* @__PURE__ */ jsx(ScrollBar, {}),
15
- /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
16
- ]
17
- }
18
- ));
19
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
20
- var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
21
- ScrollAreaPrimitive.ScrollAreaScrollbar,
22
- {
23
- ref,
24
- orientation,
25
- className: cn(
26
- "flex touch-none transition-colors select-none",
27
- orientation === "vertical" && "h-full w-2.5 border-s border-s-transparent p-px",
28
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
29
- className
30
- ),
31
- ...props,
32
- children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "bg-border relative flex-1 rounded-full" })
33
- }
34
- ));
35
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
36
-
37
- export { ScrollArea, ScrollBar };
@@ -1,98 +0,0 @@
1
- import { useTranslation } from './chunk-B6S6LTWT.js';
2
- import { cn } from './chunk-U7N2A7A3.js';
3
- import * as React from 'react';
4
- import { X } from 'lucide-react';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
-
7
- var inputBaseClass = [
8
- "ui-control border-input bg-background w-full min-w-0 rounded-md border px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none",
9
- "selection:bg-primary selection:text-primary-foreground",
10
- "file:text-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",
11
- "placeholder:text-muted-foreground",
12
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
13
- "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
14
- "aria-invalid:border-destructive aria-invalid:ring-destructive/20"
15
- ];
16
- var Input = React.forwardRef(
17
- ({ className, type, allowClear = false, onClear, value, defaultValue, onChange, ...props }, ref) => {
18
- const { t } = useTranslation();
19
- const innerRef = React.useRef(null);
20
- const setRefs = React.useCallback(
21
- (node) => {
22
- innerRef.current = node;
23
- if (typeof ref === "function") ref(node);
24
- else if (ref) ref.current = node;
25
- },
26
- [ref]
27
- );
28
- const [hasText, setHasText] = React.useState(
29
- () => String(value ?? defaultValue ?? "").length > 0
30
- );
31
- React.useEffect(() => {
32
- if (value !== void 0) setHasText(String(value).length > 0);
33
- }, [value]);
34
- const handleChange = (event) => {
35
- if (value === void 0) setHasText(event.target.value.length > 0);
36
- onChange?.(event);
37
- };
38
- const clear = () => {
39
- const el = innerRef.current;
40
- if (el) {
41
- const setter = Object.getOwnPropertyDescriptor(
42
- window.HTMLInputElement.prototype,
43
- "value"
44
- )?.set;
45
- setter?.call(el, "");
46
- el.dispatchEvent(new Event("input", { bubbles: true }));
47
- el.focus();
48
- }
49
- setHasText(false);
50
- onClear?.();
51
- };
52
- if (!allowClear) {
53
- return /* @__PURE__ */ jsx(
54
- "input",
55
- {
56
- type,
57
- "data-slot": "input",
58
- ref: setRefs,
59
- value,
60
- defaultValue,
61
- onChange,
62
- className: cn(inputBaseClass, className),
63
- ...props
64
- }
65
- );
66
- }
67
- const showClear = hasText && !props.disabled && !props.readOnly;
68
- return /* @__PURE__ */ jsxs("span", { "data-slot": "input-affix-wrapper", className: "relative inline-flex w-full items-center", children: [
69
- /* @__PURE__ */ jsx(
70
- "input",
71
- {
72
- type,
73
- "data-slot": "input",
74
- ref: setRefs,
75
- value,
76
- defaultValue,
77
- onChange: handleChange,
78
- className: cn(inputBaseClass, showClear && "pe-9", className),
79
- ...props
80
- }
81
- ),
82
- showClear ? /* @__PURE__ */ jsx(
83
- "button",
84
- {
85
- type: "button",
86
- tabIndex: -1,
87
- "aria-label": t("common.clear") ?? "Clear",
88
- onClick: clear,
89
- className: "text-muted-foreground hover:text-foreground absolute end-2 inline-flex size-5 items-center justify-center rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:opacity-100",
90
- children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": "true" })
91
- }
92
- ) : null
93
- ] });
94
- }
95
- );
96
- Input.displayName = "Input";
97
-
98
- export { Input };
@@ -1,193 +0,0 @@
1
- import { SearchInput } from './chunk-LVLPNKJP.js';
2
- import { reactNodeText } from './chunk-SMLKNECP.js';
3
- import { Button } from './chunk-XBFUROAY.js';
4
- import { Checkbox } from './chunk-BE6GJGKJ.js';
5
- import { ScrollArea } from './chunk-J2DEWIYY.js';
6
- import { useTranslation } from './chunk-B6S6LTWT.js';
7
- import { cn } from './chunk-U7N2A7A3.js';
8
- import * as React from 'react';
9
- import { ChevronRight, ChevronLeft } from 'lucide-react';
10
- import { jsxs, jsx } from 'react/jsx-runtime';
11
-
12
- function TransferPanel({
13
- title,
14
- items,
15
- selectedKeys,
16
- onSelectChange,
17
- onSelectAll,
18
- showSearch,
19
- disabled,
20
- searchPlaceholder,
21
- emptyText,
22
- direction
23
- }) {
24
- const { t } = useTranslation();
25
- const titleId = React.useId();
26
- const [query, setQuery] = React.useState("");
27
- const filtered = React.useMemo(() => {
28
- const q = query.trim().toLowerCase();
29
- if (!q) return items;
30
- return items.filter((item) => {
31
- const titleMatch = reactNodeText(item.title).toLowerCase().includes(q);
32
- const descMatch = item.description ? reactNodeText(item.description).toLowerCase().includes(q) : false;
33
- return titleMatch || descMatch;
34
- });
35
- }, [items, query]);
36
- const enabledItems = filtered.filter((i) => !i.disabled);
37
- const allChecked = enabledItems.length > 0 && enabledItems.every((i) => selectedKeys.includes(i.key));
38
- const indeterminate = !allChecked && enabledItems.some((i) => selectedKeys.includes(i.key));
39
- const toggleKey = (key, checked) => {
40
- onSelectChange(checked ? [...selectedKeys, key] : selectedKeys.filter((k) => k !== key));
41
- };
42
- return /* @__PURE__ */ jsxs("div", { className: "bg-background flex min-h-[14rem] flex-1 flex-col rounded-md border", children: [
43
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b px-3 py-2 text-sm", children: [
44
- /* @__PURE__ */ jsxs("label", { className: "flex cursor-pointer items-center gap-2 font-medium", children: [
45
- /* @__PURE__ */ jsx(
46
- Checkbox,
47
- {
48
- checked: allChecked ? true : indeterminate ? "indeterminate" : false,
49
- disabled: Boolean(disabled) || enabledItems.length === 0,
50
- onCheckedChange: (v) => onSelectAll(v === true),
51
- "aria-label": direction === "left" ? t("dataEntry.transfer.selectAllSource") : t("dataEntry.transfer.selectAllTarget")
52
- }
53
- ),
54
- /* @__PURE__ */ jsx("span", { id: titleId, children: title })
55
- ] }),
56
- /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
57
- selectedKeys.length,
58
- "/",
59
- filtered.length
60
- ] })
61
- ] }),
62
- showSearch && /* @__PURE__ */ jsx("div", { className: "border-b p-2", children: /* @__PURE__ */ jsx(
63
- SearchInput,
64
- {
65
- onSearch: setQuery,
66
- placeholder: searchPlaceholder,
67
- ariaLabel: searchPlaceholder,
68
- debounce: 0,
69
- className: disabled ? "pointer-events-none opacity-50" : void 0
70
- }
71
- ) }),
72
- /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsx("ul", { className: "p-1", role: "group", "aria-labelledby": titleId, children: filtered.length === 0 ? /* @__PURE__ */ jsx("li", { className: "text-muted-foreground py-8 text-center text-sm", children: emptyText }) : filtered.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
73
- "label",
74
- {
75
- className: cn(
76
- "flex cursor-pointer items-start gap-2 rounded-sm px-2 py-2 text-sm",
77
- "hover:bg-accent hover:text-accent-foreground",
78
- item.disabled && "pointer-events-none opacity-50"
79
- ),
80
- children: [
81
- /* @__PURE__ */ jsx(
82
- Checkbox,
83
- {
84
- checked: selectedKeys.includes(item.key),
85
- disabled: Boolean(disabled) || Boolean(item.disabled),
86
- onCheckedChange: (v) => toggleKey(item.key, v === true),
87
- className: "mt-0.5"
88
- }
89
- ),
90
- /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
91
- /* @__PURE__ */ jsx("span", { className: "block truncate font-medium", children: item.title }),
92
- item.description && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground block truncate text-xs", children: item.description })
93
- ] })
94
- ]
95
- }
96
- ) }, item.key)) }) })
97
- ] });
98
- }
99
- function Transfer({
100
- dataSource,
101
- targetKeys,
102
- onValueChange,
103
- titles,
104
- showSearch,
105
- oneWay,
106
- disabled,
107
- className,
108
- selectedKeys: selectedKeysProp,
109
- onSelectChange
110
- }) {
111
- const { t } = useTranslation();
112
- const [internalSelected, setInternalSelected] = React.useState([[], []]);
113
- const selected = selectedKeysProp ?? internalSelected;
114
- const sourceItems = dataSource.filter((item) => !targetKeys.includes(item.key));
115
- const targetItems = dataSource.filter((item) => targetKeys.includes(item.key));
116
- const setSelected = (side, keys) => {
117
- const next = side === 0 ? [keys, selected[1]] : [selected[0], keys];
118
- if (selectedKeysProp) onSelectChange?.(next[0], next[1]);
119
- else setInternalSelected(next);
120
- };
121
- const move = (direction) => {
122
- const fromSide = direction === "right" ? 0 : 1;
123
- const keys = selected[fromSide];
124
- if (!keys.length) return;
125
- const nextTarget = direction === "right" ? [...targetKeys, ...keys.filter((k) => !targetKeys.includes(k))] : targetKeys.filter((k) => !keys.includes(k));
126
- onValueChange?.(nextTarget, direction, keys);
127
- const cleared = fromSide === 0 ? [[], selected[1]] : [selected[0], []];
128
- if (selectedKeysProp) onSelectChange?.(cleared[0], cleared[1]);
129
- else setInternalSelected(cleared);
130
- };
131
- const leftTitle = titles?.[0] ?? t("dataEntry.transfer.source");
132
- const rightTitle = titles?.[1] ?? t("dataEntry.transfer.target");
133
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap items-stretch gap-3", className), children: [
134
- /* @__PURE__ */ jsx(
135
- TransferPanel,
136
- {
137
- direction: "left",
138
- title: leftTitle,
139
- items: sourceItems,
140
- selectedKeys: selected[0],
141
- onSelectChange: (keys) => setSelected(0, keys),
142
- onSelectAll: (checked) => setSelected(0, checked ? sourceItems.filter((i) => !i.disabled).map((i) => i.key) : []),
143
- showSearch,
144
- disabled,
145
- searchPlaceholder: t("dataEntry.transfer.searchPlaceholder"),
146
- emptyText: t("dataEntry.transfer.empty")
147
- }
148
- ),
149
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center gap-2", children: [
150
- /* @__PURE__ */ jsx(
151
- Button,
152
- {
153
- type: "button",
154
- size: "icon",
155
- variant: "outline",
156
- disabled: Boolean(disabled) || selected[0].length === 0,
157
- "aria-label": t("dataEntry.transfer.moveRight"),
158
- onClick: () => move("right"),
159
- children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-4", "aria-hidden": "true" })
160
- }
161
- ),
162
- !oneWay && /* @__PURE__ */ jsx(
163
- Button,
164
- {
165
- type: "button",
166
- size: "icon",
167
- variant: "outline",
168
- disabled: Boolean(disabled) || selected[1].length === 0,
169
- "aria-label": t("dataEntry.transfer.moveLeft"),
170
- onClick: () => move("left"),
171
- children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4", "aria-hidden": "true" })
172
- }
173
- )
174
- ] }),
175
- /* @__PURE__ */ jsx(
176
- TransferPanel,
177
- {
178
- direction: "right",
179
- title: rightTitle,
180
- items: targetItems,
181
- selectedKeys: selected[1],
182
- onSelectChange: (keys) => setSelected(1, keys),
183
- onSelectAll: (checked) => setSelected(1, checked ? targetItems.filter((i) => !i.disabled).map((i) => i.key) : []),
184
- showSearch,
185
- disabled,
186
- searchPlaceholder: t("dataEntry.transfer.searchPlaceholder"),
187
- emptyText: t("dataEntry.transfer.empty")
188
- }
189
- )
190
- ] });
191
- }
192
-
193
- export { Transfer };