@exxatdesignux/ui 0.2.19 → 0.4.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 (716) hide show
  1. package/CHANGELOG.md +662 -7
  2. package/bin/sync-extras.mjs +116 -29
  3. package/consumer-extras/README.md +42 -7
  4. package/consumer-extras/cursor-rules/exxat-accessibility.mdc +39 -0
  5. package/consumer-extras/cursor-rules/exxat-board-cards.mdc +26 -0
  6. package/consumer-extras/cursor-rules/exxat-breadcrumbs-no-back.mdc +21 -0
  7. package/consumer-extras/cursor-rules/exxat-card-vs-list-rows.mdc +21 -0
  8. package/consumer-extras/cursor-rules/exxat-centralized-list-dataset.mdc +44 -0
  9. package/consumer-extras/cursor-rules/exxat-collaboration-access.mdc +32 -0
  10. package/consumer-extras/cursor-rules/exxat-command-menu.mdc +22 -0
  11. package/consumer-extras/cursor-rules/exxat-dashboard-view-charts.mdc +53 -0
  12. package/consumer-extras/cursor-rules/exxat-data-tables.mdc +43 -0
  13. package/consumer-extras/cursor-rules/exxat-dedicated-search-surfaces.mdc +25 -0
  14. package/consumer-extras/cursor-rules/exxat-drawer-vs-dialog.mdc +22 -0
  15. package/consumer-extras/cursor-rules/exxat-ds-agents.mdc +56 -0
  16. package/consumer-extras/cursor-rules/exxat-fontawesome-icons.mdc +31 -0
  17. package/consumer-extras/cursor-rules/exxat-kbd-shortcuts.mdc +100 -0
  18. package/consumer-extras/cursor-rules/exxat-kpi-flat-band.mdc +28 -0
  19. package/consumer-extras/cursor-rules/exxat-kpi-max-four.mdc +21 -0
  20. package/consumer-extras/cursor-rules/exxat-kpi-trends.mdc +31 -0
  21. package/consumer-extras/cursor-rules/exxat-library-hub-header.mdc +28 -0
  22. package/consumer-extras/cursor-rules/exxat-list-page-connected-views.mdc +24 -0
  23. package/consumer-extras/cursor-rules/exxat-list-page-view-shells.mdc +31 -0
  24. package/consumer-extras/cursor-rules/exxat-mono-ids.mdc +30 -0
  25. package/consumer-extras/cursor-rules/exxat-no-slds-leakage.mdc +78 -0
  26. package/consumer-extras/cursor-rules/exxat-no-toast.mdc +25 -0
  27. package/consumer-extras/cursor-rules/exxat-page-vs-drawer.mdc +23 -0
  28. package/consumer-extras/cursor-rules/exxat-person-identity-display.mdc +47 -0
  29. package/consumer-extras/cursor-rules/exxat-primary-nav-secondary-panel.mdc +52 -0
  30. package/consumer-extras/cursor-rules/exxat-reuse-before-custom.mdc +34 -0
  31. package/consumer-extras/cursor-rules/exxat-table-properties-drawer.mdc +77 -0
  32. package/consumer-extras/cursor-rules/exxat-token-discipline.mdc +103 -0
  33. package/consumer-extras/cursor-skills/exxat-accessibility/SKILL.md +1 -1
  34. package/consumer-extras/cursor-skills/exxat-board-cards/SKILL.md +3 -3
  35. package/consumer-extras/cursor-skills/exxat-centralized-list-dataset/SKILL.md +5 -16
  36. package/consumer-extras/cursor-skills/exxat-collaboration-access/SKILL.md +3 -3
  37. package/consumer-extras/cursor-skills/exxat-dedicated-search-surfaces/SKILL.md +2 -2
  38. package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +19 -34
  39. package/consumer-extras/cursor-skills/exxat-ds-skill/references/data-table-pattern.md +1 -1
  40. package/consumer-extras/cursor-skills/exxat-kpi-flat-band/SKILL.md +1 -1
  41. package/consumer-extras/cursor-skills/exxat-list-page-view-shells/SKILL.md +1 -1
  42. package/consumer-extras/cursor-skills/exxat-mono-ids/SKILL.md +4 -4
  43. package/consumer-extras/cursor-skills/exxat-primary-nav-secondary-panel/SKILL.md +10 -12
  44. package/consumer-extras/cursor-skills/exxat-token-economy/SKILL.md +277 -0
  45. package/consumer-extras/handbook/HANDBOOK.md +187 -0
  46. package/consumer-extras/handbook/glossary.md +58 -0
  47. package/consumer-extras/handbook/reference-implementations.md +153 -0
  48. package/consumer-extras/handbook/voice-and-tone.md +262 -0
  49. package/consumer-extras/patterns/collaboration-access-pattern.md +7 -7
  50. package/consumer-extras/patterns/command-menu-pattern.md +1 -1
  51. package/consumer-extras/patterns/consumer-upgrade-checklist.md +0 -20
  52. package/consumer-extras/patterns/data-views-pattern.md +31 -66
  53. package/consumer-extras/patterns/kpi-flat-band-pattern.md +2 -2
  54. package/consumer-extras/patterns/shell-surface-elevation-pattern.md +3 -5
  55. package/dist/components/data-table/filter-date-calendar.d.ts +10 -0
  56. package/dist/components/data-table/filter-date-calendar.js +280 -0
  57. package/dist/components/data-table/filter-date-calendar.js.map +1 -0
  58. package/dist/components/data-table/filter-text-value-input.d.ts +15 -0
  59. package/dist/components/data-table/filter-text-value-input.js +561 -0
  60. package/dist/components/data-table/filter-text-value-input.js.map +1 -0
  61. package/dist/components/data-table/index.d.ts +45 -0
  62. package/dist/components/data-table/index.js +3085 -0
  63. package/dist/components/data-table/index.js.map +1 -0
  64. package/dist/components/data-table/pagination.d.ts +28 -0
  65. package/dist/components/data-table/pagination.js +3264 -0
  66. package/dist/components/data-table/pagination.js.map +1 -0
  67. package/dist/components/data-table/types.d.ts +84 -0
  68. package/dist/components/data-table/types.js +3 -0
  69. package/dist/components/data-table/types.js.map +1 -0
  70. package/dist/components/data-table/use-table-state.d.ts +116 -0
  71. package/dist/components/data-table/use-table-state.js +670 -0
  72. package/dist/components/data-table/use-table-state.js.map +1 -0
  73. package/dist/components/data-views/board-card-primitives.d.ts +22 -0
  74. package/dist/components/data-views/board-card-primitives.js +84 -0
  75. package/dist/components/data-views/board-card-primitives.js.map +1 -0
  76. package/dist/components/data-views/data-row-list.d.ts +33 -0
  77. package/dist/components/data-views/data-row-list.js +106 -0
  78. package/dist/components/data-views/data-row-list.js.map +1 -0
  79. package/dist/components/data-views/finder-panel-view.d.ts +54 -0
  80. package/dist/components/data-views/finder-panel-view.js +388 -0
  81. package/dist/components/data-views/finder-panel-view.js.map +1 -0
  82. package/dist/components/data-views/folder-grid-view.d.ts +22 -0
  83. package/dist/components/data-views/folder-grid-view.js +58 -0
  84. package/dist/components/data-views/folder-grid-view.js.map +1 -0
  85. package/dist/components/data-views/hub-table.d.ts +173 -0
  86. package/dist/components/data-views/hub-table.js +5783 -0
  87. package/dist/components/data-views/hub-table.js.map +1 -0
  88. package/dist/components/data-views/index.d.ts +27 -0
  89. package/dist/components/data-views/index.js +6797 -0
  90. package/dist/components/data-views/index.js.map +1 -0
  91. package/dist/components/data-views/list-page-board-card.d.ts +72 -0
  92. package/dist/components/data-views/list-page-board-card.js +264 -0
  93. package/dist/components/data-views/list-page-board-card.js.map +1 -0
  94. package/dist/components/data-views/list-page-board-template.d.ts +24 -0
  95. package/dist/components/data-views/list-page-board-template.js +137 -0
  96. package/dist/components/data-views/list-page-board-template.js.map +1 -0
  97. package/dist/components/data-views/list-page-connected-view-body.d.ts +19 -0
  98. package/dist/components/data-views/list-page-connected-view-body.js +116 -0
  99. package/dist/components/data-views/list-page-connected-view-body.js.map +1 -0
  100. package/dist/components/data-views/list-page-split-details-placeholder.d.ts +14 -0
  101. package/dist/components/data-views/list-page-split-details-placeholder.js +38 -0
  102. package/dist/components/data-views/list-page-split-details-placeholder.js.map +1 -0
  103. package/dist/components/data-views/list-page-split-hub-chrome.d.ts +17 -0
  104. package/dist/components/data-views/list-page-split-hub-chrome.js +54 -0
  105. package/dist/components/data-views/list-page-split-hub-chrome.js.map +1 -0
  106. package/dist/components/data-views/list-page-split-hub-tokens.d.ts +12 -0
  107. package/dist/components/data-views/list-page-split-hub-tokens.js +8 -0
  108. package/dist/components/data-views/list-page-split-hub-tokens.js.map +1 -0
  109. package/dist/components/data-views/list-page-tree-column-header.d.ts +15 -0
  110. package/dist/components/data-views/list-page-tree-column-header.js +22 -0
  111. package/dist/components/data-views/list-page-tree-column-header.js.map +1 -0
  112. package/dist/components/data-views/list-page-tree-panel-shell.d.ts +25 -0
  113. package/dist/components/data-views/list-page-tree-panel-shell.js +146 -0
  114. package/dist/components/data-views/list-page-tree-panel-shell.js.map +1 -0
  115. package/dist/components/data-views/os-folder-glyph.d.ts +35 -0
  116. package/dist/components/data-views/os-folder-glyph.js +104 -0
  117. package/dist/components/data-views/os-folder-glyph.js.map +1 -0
  118. package/dist/components/data-views/outline-tree-menu.d.ts +36 -0
  119. package/dist/components/data-views/outline-tree-menu.js +131 -0
  120. package/dist/components/data-views/outline-tree-menu.js.map +1 -0
  121. package/dist/components/table-properties/column-row.d.ts +22 -0
  122. package/dist/components/table-properties/column-row.js +153 -0
  123. package/dist/components/table-properties/column-row.js.map +1 -0
  124. package/dist/components/table-properties/draggable-list.d.ts +24 -0
  125. package/dist/components/table-properties/draggable-list.js +53 -0
  126. package/dist/components/table-properties/draggable-list.js.map +1 -0
  127. package/dist/components/table-properties/drawer-button.d.ts +110 -0
  128. package/dist/components/table-properties/drawer-button.js +2748 -0
  129. package/dist/components/table-properties/drawer-button.js.map +1 -0
  130. package/dist/components/table-properties/drawer.d.ts +100 -0
  131. package/dist/components/table-properties/drawer.js +2595 -0
  132. package/dist/components/table-properties/drawer.js.map +1 -0
  133. package/dist/components/table-properties/filter-card.d.ts +24 -0
  134. package/dist/components/table-properties/filter-card.js +854 -0
  135. package/dist/components/table-properties/filter-card.js.map +1 -0
  136. package/dist/components/table-properties/index.d.ts +14 -0
  137. package/dist/components/table-properties/index.js +2768 -0
  138. package/dist/components/table-properties/index.js.map +1 -0
  139. package/dist/components/table-properties/sort-card.d.ts +20 -0
  140. package/dist/components/table-properties/sort-card.js +102 -0
  141. package/dist/components/table-properties/sort-card.js.map +1 -0
  142. package/dist/components/templates/dedicated-search-landing-template.d.ts +21 -0
  143. package/dist/components/templates/dedicated-search-landing-template.js +254 -0
  144. package/dist/components/templates/dedicated-search-landing-template.js.map +1 -0
  145. package/dist/components/templates/dedicated-search-results-template.d.ts +15 -0
  146. package/dist/components/templates/dedicated-search-results-template.js +16 -0
  147. package/dist/components/templates/dedicated-search-results-template.js.map +1 -0
  148. package/dist/components/templates/index.d.ts +9 -0
  149. package/dist/components/templates/index.js +2720 -0
  150. package/dist/components/templates/index.js.map +1 -0
  151. package/dist/components/templates/list-page.d.ts +83 -0
  152. package/dist/components/templates/list-page.js +2433 -0
  153. package/dist/components/templates/list-page.js.map +1 -0
  154. package/dist/components/templates/nested-secondary-panel-shell.d.ts +20 -0
  155. package/dist/components/templates/nested-secondary-panel-shell.js +54 -0
  156. package/dist/components/templates/nested-secondary-panel-shell.js.map +1 -0
  157. package/dist/components/ui/accordion.d.ts +10 -0
  158. package/dist/components/ui/accordion.js +74 -0
  159. package/dist/components/ui/accordion.js.map +1 -0
  160. package/dist/components/ui/alert-dialog.d.ts +37 -0
  161. package/dist/components/ui/alert-dialog.js +201 -0
  162. package/dist/components/ui/alert-dialog.js.map +1 -0
  163. package/dist/components/ui/avatar.d.ts +84 -0
  164. package/dist/components/ui/avatar.js +328 -0
  165. package/dist/components/ui/avatar.js.map +1 -0
  166. package/dist/components/ui/badge.d.ts +13 -0
  167. package/dist/components/ui/badge.js +49 -0
  168. package/dist/components/ui/badge.js.map +1 -0
  169. package/dist/components/ui/banner.d.ts +62 -0
  170. package/dist/components/ui/banner.js +364 -0
  171. package/dist/components/ui/banner.js.map +1 -0
  172. package/dist/components/ui/breadcrumb.d.ts +14 -0
  173. package/dist/components/ui/breadcrumb.js +114 -0
  174. package/dist/components/ui/breadcrumb.js.map +1 -0
  175. package/dist/components/ui/button.d.ts +16 -0
  176. package/dist/components/ui/button.js +59 -0
  177. package/dist/components/ui/button.js.map +1 -0
  178. package/dist/components/ui/calendar.d.ts +13 -0
  179. package/dist/components/ui/calendar.js +238 -0
  180. package/dist/components/ui/calendar.js.map +1 -0
  181. package/dist/components/ui/card.d.ts +14 -0
  182. package/dist/components/ui/card.js +102 -0
  183. package/dist/components/ui/card.js.map +1 -0
  184. package/dist/components/ui/chart.d.ts +58 -0
  185. package/dist/components/ui/chart.js +292 -0
  186. package/dist/components/ui/chart.js.map +1 -0
  187. package/dist/components/ui/checkbox.d.ts +23 -0
  188. package/dist/components/ui/checkbox.js +155 -0
  189. package/dist/components/ui/checkbox.js.map +1 -0
  190. package/dist/components/ui/coach-mark.d.ts +27 -0
  191. package/dist/components/ui/coach-mark.js +306 -0
  192. package/dist/components/ui/coach-mark.js.map +1 -0
  193. package/dist/components/ui/collapsible.d.ts +8 -0
  194. package/dist/components/ui/collapsible.js +35 -0
  195. package/dist/components/ui/collapsible.js.map +1 -0
  196. package/dist/components/ui/command.d.ts +36 -0
  197. package/dist/components/ui/command.js +274 -0
  198. package/dist/components/ui/command.js.map +1 -0
  199. package/dist/components/ui/context-menu.d.ts +32 -0
  200. package/dist/components/ui/context-menu.js +245 -0
  201. package/dist/components/ui/context-menu.js.map +1 -0
  202. package/dist/components/ui/date-picker-field.d.ts +38 -0
  203. package/dist/components/ui/date-picker-field.js +550 -0
  204. package/dist/components/ui/date-picker-field.js.map +1 -0
  205. package/dist/components/ui/dialog.d.ts +22 -0
  206. package/dist/components/ui/dialog.js +200 -0
  207. package/dist/components/ui/dialog.js.map +1 -0
  208. package/dist/components/ui/dot-pattern.d.ts +21 -0
  209. package/dist/components/ui/dot-pattern.js +139 -0
  210. package/dist/components/ui/dot-pattern.js.map +1 -0
  211. package/dist/components/ui/drag-handle-grip.d.ts +10 -0
  212. package/dist/components/ui/drag-handle-grip.js +15 -0
  213. package/dist/components/ui/drag-handle-grip.js.map +1 -0
  214. package/dist/components/ui/drawer.d.ts +16 -0
  215. package/dist/components/ui/drawer.js +125 -0
  216. package/dist/components/ui/drawer.js.map +1 -0
  217. package/dist/components/ui/dropdown-menu.d.ts +45 -0
  218. package/dist/components/ui/dropdown-menu.js +353 -0
  219. package/dist/components/ui/dropdown-menu.js.map +1 -0
  220. package/dist/components/ui/export-drawer.d.ts +11 -0
  221. package/dist/components/ui/export-drawer.js +1658 -0
  222. package/dist/components/ui/export-drawer.js.map +1 -0
  223. package/dist/components/ui/field.d.ts +30 -0
  224. package/dist/components/ui/field.js +249 -0
  225. package/dist/components/ui/field.js.map +1 -0
  226. package/dist/components/ui/form.d.ts +28 -0
  227. package/dist/components/ui/form.js +110 -0
  228. package/dist/components/ui/form.js.map +1 -0
  229. package/dist/components/ui/hover-card.d.ts +9 -0
  230. package/dist/components/ui/hover-card.js +43 -0
  231. package/dist/components/ui/hover-card.js.map +1 -0
  232. package/dist/components/ui/input-group.d.ts +20 -0
  233. package/dist/components/ui/input-group.js +219 -0
  234. package/dist/components/ui/input-group.js.map +1 -0
  235. package/dist/components/ui/input-mask.d.ts +39 -0
  236. package/dist/components/ui/input-mask.js +118 -0
  237. package/dist/components/ui/input-mask.js.map +1 -0
  238. package/dist/components/ui/input.d.ts +5 -0
  239. package/dist/components/ui/input.js +30 -0
  240. package/dist/components/ui/input.js.map +1 -0
  241. package/dist/components/ui/kbd.d.ts +20 -0
  242. package/dist/components/ui/kbd.js +45 -0
  243. package/dist/components/ui/kbd.js.map +1 -0
  244. package/dist/components/ui/key-metrics-context.d.ts +19 -0
  245. package/dist/components/ui/key-metrics-context.js +26 -0
  246. package/dist/components/ui/key-metrics-context.js.map +1 -0
  247. package/dist/components/ui/key-metrics.d.ts +131 -0
  248. package/dist/components/ui/key-metrics.js +1015 -0
  249. package/dist/components/ui/key-metrics.js.map +1 -0
  250. package/dist/components/ui/label.d.ts +6 -0
  251. package/dist/components/ui/label.js +28 -0
  252. package/dist/components/ui/label.js.map +1 -0
  253. package/dist/components/ui/list-page-view-frame.d.ts +22 -0
  254. package/dist/components/ui/list-page-view-frame.js +24 -0
  255. package/dist/components/ui/list-page-view-frame.js.map +1 -0
  256. package/dist/components/ui/page-header.d.ts +51 -0
  257. package/dist/components/ui/page-header.js +372 -0
  258. package/dist/components/ui/page-header.js.map +1 -0
  259. package/dist/components/ui/payment-card-fields.d.ts +10 -0
  260. package/dist/components/ui/payment-card-fields.js +80 -0
  261. package/dist/components/ui/payment-card-fields.js.map +1 -0
  262. package/dist/components/ui/popover.d.ts +10 -0
  263. package/dist/components/ui/popover.js +47 -0
  264. package/dist/components/ui/popover.js.map +1 -0
  265. package/dist/components/ui/radio-group.d.ts +29 -0
  266. package/dist/components/ui/radio-group.js +190 -0
  267. package/dist/components/ui/radio-group.js.map +1 -0
  268. package/dist/components/ui/resizable.d.ts +16 -0
  269. package/dist/components/ui/resizable.js +51 -0
  270. package/dist/components/ui/resizable.js.map +1 -0
  271. package/dist/components/ui/scroll-area.d.ts +8 -0
  272. package/dist/components/ui/scroll-area.js +66 -0
  273. package/dist/components/ui/scroll-area.js.map +1 -0
  274. package/dist/components/ui/select.d.ts +18 -0
  275. package/dist/components/ui/select.js +186 -0
  276. package/dist/components/ui/select.js.map +1 -0
  277. package/dist/components/ui/selection-tile-grid.d.ts +52 -0
  278. package/dist/components/ui/selection-tile-grid.js +347 -0
  279. package/dist/components/ui/selection-tile-grid.js.map +1 -0
  280. package/dist/components/ui/separator.d.ts +7 -0
  281. package/dist/components/ui/separator.js +33 -0
  282. package/dist/components/ui/separator.js.map +1 -0
  283. package/dist/components/ui/sheet.d.ts +18 -0
  284. package/dist/components/ui/sheet.js +181 -0
  285. package/dist/components/ui/sheet.js.map +1 -0
  286. package/dist/components/ui/sidebar.d.ts +94 -0
  287. package/dist/components/ui/sidebar.js +805 -0
  288. package/dist/components/ui/sidebar.js.map +1 -0
  289. package/dist/components/ui/skeleton.d.ts +5 -0
  290. package/dist/components/ui/skeleton.js +22 -0
  291. package/dist/components/ui/skeleton.js.map +1 -0
  292. package/dist/components/ui/slider.d.ts +7 -0
  293. package/dist/components/ui/slider.js +66 -0
  294. package/dist/components/ui/slider.js.map +1 -0
  295. package/dist/components/ui/sonner.d.ts +6 -0
  296. package/dist/components/ui/sonner.js +38 -0
  297. package/dist/components/ui/sonner.js.map +1 -0
  298. package/dist/components/ui/status-badge.d.ts +38 -0
  299. package/dist/components/ui/status-badge.js +77 -0
  300. package/dist/components/ui/status-badge.js.map +1 -0
  301. package/dist/components/ui/table.d.ts +13 -0
  302. package/dist/components/ui/table.js +115 -0
  303. package/dist/components/ui/table.js.map +1 -0
  304. package/dist/components/ui/tabs.d.ts +15 -0
  305. package/dist/components/ui/tabs.js +93 -0
  306. package/dist/components/ui/tabs.js.map +1 -0
  307. package/dist/components/ui/textarea.d.ts +6 -0
  308. package/dist/components/ui/textarea.js +25 -0
  309. package/dist/components/ui/textarea.js.map +1 -0
  310. package/dist/components/ui/tip.d.ts +12 -0
  311. package/dist/components/ui/tip.js +61 -0
  312. package/dist/components/ui/tip.js.map +1 -0
  313. package/dist/components/ui/toggle-group.d.ts +14 -0
  314. package/dist/components/ui/toggle-group.js +104 -0
  315. package/dist/components/ui/toggle-group.js.map +1 -0
  316. package/dist/components/ui/toggle-switch.d.ts +10 -0
  317. package/dist/components/ui/toggle-switch.js +33 -0
  318. package/dist/components/ui/toggle-switch.js.map +1 -0
  319. package/dist/components/ui/toggle.d.ts +13 -0
  320. package/dist/components/ui/toggle.js +51 -0
  321. package/dist/components/ui/toggle.js.map +1 -0
  322. package/dist/components/ui/tooltip.d.ts +10 -0
  323. package/dist/components/ui/tooltip.js +68 -0
  324. package/dist/components/ui/tooltip.js.map +1 -0
  325. package/dist/components/ui/view-segmented-control.d.ts +31 -0
  326. package/dist/components/ui/view-segmented-control.js +167 -0
  327. package/dist/components/ui/view-segmented-control.js.map +1 -0
  328. package/dist/data-list-view-registry-CyBoBML4.d.ts +73 -0
  329. package/dist/hooks/use-app-theme.d.ts +24 -0
  330. package/dist/hooks/use-app-theme.js +286 -0
  331. package/dist/hooks/use-app-theme.js.map +1 -0
  332. package/dist/hooks/use-coach-mark.d.ts +86 -0
  333. package/dist/hooks/use-coach-mark.js +218 -0
  334. package/dist/hooks/use-coach-mark.js.map +1 -0
  335. package/dist/hooks/use-mobile.d.ts +3 -0
  336. package/dist/hooks/use-mobile.js +29 -0
  337. package/dist/hooks/use-mobile.js.map +1 -0
  338. package/dist/hooks/use-mod-key-label.d.ts +6 -0
  339. package/dist/hooks/use-mod-key-label.js +25 -0
  340. package/dist/hooks/use-mod-key-label.js.map +1 -0
  341. package/dist/index.d.ts +120 -0
  342. package/dist/index.js +13421 -0
  343. package/dist/index.js.map +1 -0
  344. package/dist/lib/compose-refs.d.ts +6 -0
  345. package/dist/lib/compose-refs.js +17 -0
  346. package/dist/lib/compose-refs.js.map +1 -0
  347. package/dist/lib/conditional-rule-match.d.ts +30 -0
  348. package/dist/lib/conditional-rule-match.js +66 -0
  349. package/dist/lib/conditional-rule-match.js.map +1 -0
  350. package/dist/lib/data-list-display-options.d.ts +26 -0
  351. package/dist/lib/data-list-display-options.js +14 -0
  352. package/dist/lib/data-list-display-options.js.map +1 -0
  353. package/dist/lib/data-list-view-registry.d.ts +2 -0
  354. package/dist/lib/data-list-view-registry.js +102 -0
  355. package/dist/lib/data-list-view-registry.js.map +1 -0
  356. package/dist/lib/data-list-view-surface.d.ts +2 -0
  357. package/dist/lib/data-list-view-surface.js +80 -0
  358. package/dist/lib/data-list-view-surface.js.map +1 -0
  359. package/dist/lib/data-list-view.d.ts +21 -0
  360. package/dist/lib/data-list-view.js +25 -0
  361. package/dist/lib/data-list-view.js.map +1 -0
  362. package/dist/lib/date-filter.d.ts +22 -0
  363. package/dist/lib/date-filter.js +61 -0
  364. package/dist/lib/date-filter.js.map +1 -0
  365. package/dist/lib/dev-log.d.ts +8 -0
  366. package/dist/lib/dev-log.js +10 -0
  367. package/dist/lib/dev-log.js.map +1 -0
  368. package/dist/lib/dropdown-menu-surface.d.ts +14 -0
  369. package/dist/lib/dropdown-menu-surface.js +6 -0
  370. package/dist/lib/dropdown-menu-surface.js.map +1 -0
  371. package/dist/lib/editable-target.d.ts +12 -0
  372. package/dist/lib/editable-target.js +12 -0
  373. package/dist/lib/editable-target.js.map +1 -0
  374. package/dist/lib/list-page-table-properties.d.ts +35 -0
  375. package/dist/lib/list-page-table-properties.js +81 -0
  376. package/dist/lib/list-page-table-properties.js.map +1 -0
  377. package/dist/lib/raf-throttle.d.ts +23 -0
  378. package/dist/lib/raf-throttle.js +27 -0
  379. package/dist/lib/raf-throttle.js.map +1 -0
  380. package/dist/lib/row-height.d.ts +16 -0
  381. package/dist/lib/row-height.js +10 -0
  382. package/dist/lib/row-height.js.map +1 -0
  383. package/dist/lib/table-properties-types.d.ts +83 -0
  384. package/dist/lib/table-properties-types.js +19 -0
  385. package/dist/lib/table-properties-types.js.map +1 -0
  386. package/dist/lib/utils.d.ts +5 -0
  387. package/dist/lib/utils.js +11 -0
  388. package/dist/lib/utils.js.map +1 -0
  389. package/package.json +83 -19
  390. package/src/components/data-table/filter-date-calendar.tsx +38 -0
  391. package/src/components/data-table/filter-text-value-input.tsx +77 -0
  392. package/src/components/data-table/index.tsx +1678 -0
  393. package/src/components/data-table/pagination.tsx +259 -0
  394. package/src/components/data-table/types.ts +96 -0
  395. package/src/components/data-table/use-table-state.ts +767 -0
  396. package/src/components/data-views/board-card-primitives.tsx +93 -0
  397. package/src/components/data-views/data-row-list.tsx +183 -0
  398. package/src/components/data-views/finder-panel-view.tsx +405 -0
  399. package/src/components/data-views/folder-grid-view.tsx +86 -0
  400. package/src/components/data-views/hub-table.tsx +606 -0
  401. package/src/components/data-views/index.ts +28 -0
  402. package/src/components/data-views/list-page-board-card.tsx +192 -0
  403. package/src/components/data-views/list-page-board-template.tsx +122 -0
  404. package/src/components/data-views/list-page-connected-view-body.tsx +66 -0
  405. package/src/components/data-views/list-page-split-details-placeholder.tsx +39 -0
  406. package/src/components/data-views/list-page-split-hub-chrome.tsx +60 -0
  407. package/src/components/data-views/list-page-split-hub-tokens.ts +16 -0
  408. package/src/components/data-views/list-page-tree-column-header.tsx +31 -0
  409. package/src/components/data-views/list-page-tree-panel-shell.tsx +91 -0
  410. package/src/components/data-views/os-folder-glyph.tsx +141 -0
  411. package/src/components/data-views/outline-tree-menu.tsx +157 -0
  412. package/src/components/table-properties/column-row.tsx +90 -0
  413. package/src/components/table-properties/draggable-list.ts +54 -0
  414. package/src/components/table-properties/drawer-button.tsx +300 -0
  415. package/src/components/table-properties/drawer.tsx +1148 -0
  416. package/src/components/table-properties/filter-card.tsx +251 -0
  417. package/src/components/table-properties/index.ts +36 -0
  418. package/src/components/table-properties/sort-card.tsx +63 -0
  419. package/src/components/templates/dedicated-search-landing-template.tsx +124 -0
  420. package/src/components/templates/dedicated-search-results-template.tsx +19 -0
  421. package/src/components/templates/index.ts +33 -0
  422. package/src/components/templates/list-page.tsx +602 -0
  423. package/src/components/templates/nested-secondary-panel-shell.tsx +70 -0
  424. package/src/components/ui/accordion.tsx +92 -0
  425. package/src/components/ui/alert-dialog.tsx +221 -0
  426. package/src/components/ui/avatar.tsx +13 -2
  427. package/src/components/ui/banner.tsx +2 -2
  428. package/src/components/ui/button.tsx +4 -4
  429. package/src/components/ui/calendar.tsx +1 -1
  430. package/src/components/ui/coach-mark.tsx +1 -1
  431. package/src/components/ui/context-menu.tsx +291 -0
  432. package/src/components/ui/date-picker-field.tsx +2 -2
  433. package/src/components/ui/dot-pattern.tsx +183 -0
  434. package/src/components/ui/export-drawer.tsx +375 -0
  435. package/src/components/ui/hover-card.tsx +66 -0
  436. package/src/components/ui/key-metrics-context.tsx +78 -0
  437. package/src/components/ui/key-metrics.tsx +1133 -0
  438. package/src/components/ui/list-page-view-frame.tsx +64 -0
  439. package/src/components/ui/page-header.tsx +244 -0
  440. package/src/components/ui/payment-card-fields.tsx +2 -2
  441. package/src/components/ui/resizable.tsx +68 -0
  442. package/src/components/ui/scroll-area.tsx +72 -0
  443. package/src/components/ui/selection-tile-grid.tsx +9 -2
  444. package/src/components/ui/sidebar.tsx +84 -12
  445. package/src/components/ui/slider.tsx +83 -0
  446. package/src/globals.css +2201 -7
  447. package/src/globals.d.ts +20 -0
  448. package/src/index.ts +68 -1
  449. package/src/lib/conditional-rule-match.ts +119 -0
  450. package/src/lib/data-list-display-options.ts +35 -0
  451. package/src/lib/data-list-view-registry.ts +104 -0
  452. package/src/lib/data-list-view-surface.ts +83 -0
  453. package/src/lib/data-list-view.ts +47 -0
  454. package/src/lib/dev-log.ts +10 -0
  455. package/src/lib/editable-target.ts +20 -0
  456. package/src/lib/list-page-table-properties.ts +48 -0
  457. package/src/lib/raf-throttle.ts +45 -0
  458. package/src/lib/row-height.ts +19 -0
  459. package/src/lib/table-properties-types.ts +98 -0
  460. package/template/.claude/skills/exxat-ds-skill/SKILL.md +8 -7
  461. package/template/.cursor/rules/exxat-accessibility.mdc +1 -1
  462. package/template/.cursor/rules/exxat-command-menu.mdc +2 -2
  463. package/template/.cursor/rules/exxat-dashboard-view-charts.mdc +7 -7
  464. package/template/.cursor/rules/exxat-data-tables.mdc +3 -3
  465. package/template/.cursor/rules/exxat-ds-agents.mdc +2 -2
  466. package/template/.cursor/rules/exxat-kbd-shortcuts.mdc +7 -7
  467. package/template/.cursor/rules/exxat-mono-ids.mdc +1 -1
  468. package/template/.cursor/rules/exxat-page-vs-drawer.mdc +1 -1
  469. package/template/.cursor/rules/exxat-table-properties-drawer.mdc +1 -1
  470. package/template/AGENTS.md +135 -103
  471. package/template/app/(app)/columns/page.tsx +11 -0
  472. package/template/app/(app)/dashboard/loading.tsx +15 -3
  473. package/template/app/(app)/dashboard/page.tsx +14 -2
  474. package/template/app/(app)/layout.tsx +17 -4
  475. package/template/app/(app)/library/all/page.tsx +11 -0
  476. package/template/app/(app)/library/find/page.tsx +12 -0
  477. package/template/app/(app)/{question-bank → library}/layout.tsx +17 -17
  478. package/template/app/(app)/library/list/page.tsx +12 -0
  479. package/template/app/(app)/library/new/page.tsx +45 -0
  480. package/template/app/(app)/library/page.tsx +11 -0
  481. package/template/app/(app)/loading.tsx +18 -1
  482. package/template/app/(app)/settings/page.tsx +5 -4
  483. package/template/app/(app)/tokens-themes/page.tsx +11 -0
  484. package/template/app/globals.css +14 -16
  485. package/template/components/ask-leo-composer.tsx +2 -2
  486. package/template/components/ask-leo-sidebar.tsx +5 -1
  487. package/template/components/brand-color-picker.tsx +2 -2
  488. package/template/components/charts-overview.tsx +1 -1
  489. package/template/components/columns-client.tsx +158 -0
  490. package/template/components/columns-showcase.tsx +541 -0
  491. package/template/components/dashboard-report-charts.tsx +1 -1
  492. package/template/components/dashboard-tabs.tsx +1 -1
  493. package/template/components/data-table/filter-date-calendar.tsx +1 -38
  494. package/template/components/data-table/filter-text-value-input.tsx +1 -77
  495. package/template/components/data-table/index.tsx +1 -1634
  496. package/template/components/data-table/pagination.tsx +1 -255
  497. package/template/components/data-table/types.ts +1 -94
  498. package/template/components/data-table/use-table-state.test.ts +420 -0
  499. package/template/components/data-table/use-table-state.ts +1 -758
  500. package/template/components/data-views/board-card-primitives.tsx +1 -93
  501. package/template/components/data-views/data-row-list.tsx +1 -183
  502. package/template/components/data-views/finder-panel-view.tsx +1 -405
  503. package/template/components/data-views/folder-grid-view.tsx +1 -86
  504. package/template/components/data-views/hub-table.tsx +1 -0
  505. package/template/components/data-views/index.ts +77 -38
  506. package/template/components/data-views/{question-bank-folder-tree-branch.tsx → library-folder-tree-branch.tsx} +19 -19
  507. package/template/components/data-views/list-page-board-card.tsx +1 -192
  508. package/template/components/data-views/list-page-board-template.tsx +1 -122
  509. package/template/components/data-views/list-page-connected-view-body.tsx +1 -66
  510. package/template/components/data-views/list-page-split-details-placeholder.tsx +1 -39
  511. package/template/components/data-views/list-page-split-hub-chrome.tsx +1 -68
  512. package/template/components/data-views/list-page-split-hub-tokens.ts +1 -16
  513. package/template/components/data-views/list-page-tree-column-header.tsx +1 -31
  514. package/template/components/data-views/list-page-tree-panel-shell.tsx +1 -91
  515. package/template/components/data-views/list-page-view-frame.tsx +5 -53
  516. package/template/components/data-views/os-folder-glyph.tsx +1 -129
  517. package/template/components/data-views/outline-tree-menu.tsx +1 -157
  518. package/template/components/data-views/table-cells.tsx +673 -0
  519. package/template/components/export-drawer.test.tsx +71 -0
  520. package/template/components/export-drawer.tsx +1 -375
  521. package/template/components/exxat-product-logo.tsx +5 -5
  522. package/template/components/folder-details-shell.tsx +11 -11
  523. package/template/components/hub-tree-panel-view.tsx +26 -26
  524. package/template/components/invite-collaborators-drawer.tsx +3 -3
  525. package/template/components/key-metrics-ask-leo-bridge.tsx +40 -0
  526. package/template/components/key-metrics.tsx +1 -1063
  527. package/template/components/leo-insight-indicator.tsx +2 -2
  528. package/template/components/{question-bank-board-view.tsx → library-board-view.tsx} +44 -44
  529. package/template/components/{question-bank-client.tsx → library-client.tsx} +83 -83
  530. package/template/components/{question-bank-dashboard-charts.tsx → library-dashboard-charts.tsx} +14 -14
  531. package/template/components/{question-bank-favorite-button.tsx → library-favorite-button.tsx} +7 -7
  532. package/template/components/{question-bank-hub-client.tsx → library-hub-client.tsx} +44 -44
  533. package/template/components/{question-bank-new-folder-sheet.tsx → library-new-folder-sheet.tsx} +16 -16
  534. package/template/components/{question-bank-os-folder-view.tsx → library-os-folder-view.tsx} +31 -31
  535. package/template/components/{question-bank-page-header.tsx → library-page-header.tsx} +6 -6
  536. package/template/components/library-panel-activator.tsx +8 -0
  537. package/template/components/{question-bank-secondary-nav.tsx → library-secondary-nav.tsx} +63 -63
  538. package/template/components/library-table.tsx +839 -0
  539. package/template/components/list-hub-status-badge.tsx +2 -2
  540. package/template/components/{new-question-composer.tsx → new-library-item-form.tsx} +489 -441
  541. package/template/components/onboarding/index.ts +9 -0
  542. package/template/components/onboarding/onboarding-01.tsx +1 -1
  543. package/template/components/onboarding/onboarding-02.tsx +1 -1
  544. package/template/components/onboarding/onboarding-03.tsx +1 -1
  545. package/template/components/onboarding/onboarding-04.tsx +1 -1
  546. package/template/components/page-header.tsx +8 -226
  547. package/template/components/product-switcher.tsx +3 -4
  548. package/template/components/product-wordmark.tsx +2 -1
  549. package/template/components/settings-appearance-card.tsx +3 -4
  550. package/template/components/settings-client.tsx +15 -59
  551. package/template/components/settings-form-row.tsx +4 -9
  552. package/template/components/{app-sidebar-dynamic.tsx → sidebar/app-sidebar-dynamic.tsx} +1 -1
  553. package/template/components/{app-sidebar.tsx → sidebar/app-sidebar.tsx} +114 -73
  554. package/template/components/sidebar/index.ts +16 -0
  555. package/template/components/{secondary-nav.tsx → sidebar/secondary-nav.tsx} +2 -2
  556. package/template/components/sidebar/secondary-panel.tsx +316 -0
  557. package/template/components/sidebar/sidebar-auto-collapse.tsx +27 -0
  558. package/template/components/{sidebar-auto-open.tsx → sidebar/sidebar-auto-open.tsx} +2 -1
  559. package/template/components/{sidebar-shell.tsx → sidebar/sidebar-shell.tsx} +1 -1
  560. package/template/components/site-header.tsx +1 -1
  561. package/template/components/table-properties/column-row.tsx +1 -90
  562. package/template/components/table-properties/draggable-list.ts +1 -49
  563. package/template/components/table-properties/drawer-button.tsx +1 -262
  564. package/template/components/table-properties/drawer.tsx +1 -1166
  565. package/template/components/table-properties/filter-card.tsx +1 -251
  566. package/template/components/table-properties/sort-card.tsx +1 -59
  567. package/template/components/table-properties/types.ts +28 -71
  568. package/template/components/templates/dedicated-search-landing-template.tsx +1 -124
  569. package/template/components/templates/dedicated-search-results-template.tsx +1 -19
  570. package/template/components/templates/discovery-hub-template.tsx +1 -1
  571. package/template/components/templates/list-page.tsx +1 -608
  572. package/template/components/templates/nested-secondary-panel-shell.tsx +1 -63
  573. package/template/components/templates/new-focus-template.tsx +659 -0
  574. package/template/components/templates/secondary-panel-hub-template.tsx +2 -2
  575. package/template/components/tokens-secondary-nav.tsx +192 -0
  576. package/template/components/tokens-themes-client.tsx +476 -0
  577. package/template/components/tokens-themes-section.tsx +386 -0
  578. package/template/components/ui/accordion.tsx +1 -0
  579. package/template/components/ui/alert-dialog.tsx +1 -0
  580. package/template/components/ui/context-menu.tsx +1 -0
  581. package/template/components/ui/dot-pattern.tsx +1 -183
  582. package/template/components/ui/hover-card.tsx +1 -0
  583. package/template/components/ui/resizable.tsx +1 -68
  584. package/template/components/ui/scroll-area.tsx +1 -0
  585. package/template/components/ui/slider.tsx +1 -0
  586. package/template/docs/HANDBOOK.md +187 -0
  587. package/template/docs/blueprints/README.md +86 -0
  588. package/template/docs/blueprints/_template.md +91 -0
  589. package/template/docs/blueprints/board-card.md +123 -0
  590. package/template/docs/blueprints/data-table.md +139 -0
  591. package/template/docs/blueprints/key-metrics.md +128 -0
  592. package/template/docs/blueprints/list-page-template.md +123 -0
  593. package/template/docs/blueprints/page-header.md +130 -0
  594. package/template/docs/collaboration-access-pattern.md +7 -7
  595. package/template/docs/command-menu-pattern.md +1 -1
  596. package/template/docs/component-selection-guide.md +224 -0
  597. package/template/docs/components-audit-2026-05.md +158 -0
  598. package/template/docs/data-views-pattern.md +31 -66
  599. package/template/docs/drawer-vs-dialog-pattern.md +1 -3
  600. package/template/docs/glossary.md +58 -0
  601. package/template/docs/kpi-flat-band-pattern.md +3 -3
  602. package/template/docs/kpi-trend-pattern.md +18 -3
  603. package/template/docs/large-dataset-strategy.md +155 -0
  604. package/template/docs/library-hub-header-pattern.md +25 -0
  605. package/template/docs/migrations/0001-brand-deep-alias-stabilization.md +95 -0
  606. package/template/docs/migrations/0002-exxat-token-namespace.md +154 -0
  607. package/template/docs/migrations/0003-globals-css-canonical.md +110 -0
  608. package/template/docs/migrations/README.md +100 -0
  609. package/template/docs/migrations/_template.md +64 -0
  610. package/template/docs/reference-implementations.md +151 -0
  611. package/template/docs/shell-surface-elevation-pattern.md +3 -5
  612. package/template/docs/token-taxonomy.md +416 -0
  613. package/template/docs/voice-and-tone.md +262 -0
  614. package/template/eslint.config.mjs +27 -0
  615. package/template/hooks/use-secondary-panel-hub-nav.ts +11 -11
  616. package/template/lib/ask-leo-route-context.ts +6 -18
  617. package/template/lib/coach-mark-registry.ts +0 -16
  618. package/template/lib/command-menu-config.ts +5 -13
  619. package/template/lib/command-menu-search-data.ts +8 -23
  620. package/template/lib/conditional-rule-match.ts +6 -97
  621. package/template/lib/data-list-display-options.ts +1 -49
  622. package/template/lib/data-list-view-registry.ts +1 -104
  623. package/template/lib/data-list-view-surface.ts +1 -83
  624. package/template/lib/data-list-view.ts +1 -47
  625. package/template/lib/data-view-dashboard-storage.ts +35 -38
  626. package/template/lib/dev-log.ts +1 -8
  627. package/template/lib/editable-target.ts +1 -10
  628. package/template/lib/{question-bank-authoring.ts → library-authoring.ts} +89 -88
  629. package/template/lib/library-dedicated-search.ts +19 -0
  630. package/template/lib/library-hub-search.ts +90 -0
  631. package/template/lib/library-nav.ts +477 -0
  632. package/template/lib/library-recent-searches.ts +22 -0
  633. package/template/lib/{question-bank-supported-views.ts → library-supported-views.ts} +2 -3
  634. package/template/lib/list-page-table-properties.ts +1 -48
  635. package/template/lib/list-status-badges.ts +16 -11
  636. package/template/lib/mock/dashboard.ts +1 -1
  637. package/template/lib/mock/{question-bank-folders.ts → library-folders.ts} +30 -30
  638. package/template/lib/mock/library-header-collaborators.ts +54 -0
  639. package/template/lib/mock/{question-bank-inspector.ts → library-inspector.ts} +29 -29
  640. package/template/lib/mock/{question-bank-kpi.ts → library-kpi.ts} +20 -20
  641. package/template/lib/mock/library.ts +249 -0
  642. package/template/lib/mock/navigation.tsx +32 -35
  643. package/template/lib/raf-throttle.ts +1 -45
  644. package/template/lib/row-height.ts +4 -10
  645. package/template/lib/sidebar-state-cookie.ts +11 -2
  646. package/template/lib/table-state-lifecycle.ts +3 -3
  647. package/template/next.config.mjs +7 -4
  648. package/template/package.json +1 -0
  649. package/template/tests/setup.ts +25 -0
  650. package/consumer-extras/AGENTS.md +0 -76
  651. package/consumer-extras/cursor-skills/exxat-consumer-app/SKILL.md +0 -37
  652. package/consumer-extras/cursor-skills/exxat-focused-workflow-page/SKILL.md +0 -57
  653. package/consumer-extras/patterns/consumer-app-pattern.md +0 -39
  654. package/consumer-extras/patterns/focused-workflow-page-pattern.md +0 -84
  655. package/src/components/ui/button-group.tsx +0 -81
  656. package/src/theme.css +0 -16
  657. package/src/tokens/README.md +0 -15
  658. package/src/tokens/base.css +0 -337
  659. package/src/tokens/high-contrast.css +0 -1195
  660. package/src/tokens/layers.css +0 -224
  661. package/src/tokens/tailwind-bridge.css +0 -118
  662. package/src/tokens/themes.css +0 -201
  663. package/template/app/(app)/data-list/layout.tsx +0 -43
  664. package/template/app/(app)/data-list/page.tsx +0 -10
  665. package/template/app/(app)/examples/focused-workflow/page.tsx +0 -5
  666. package/template/app/(app)/examples/page.tsx +0 -43
  667. package/template/app/(app)/question-bank/find/page.tsx +0 -13
  668. package/template/app/(app)/question-bank/library/page.tsx +0 -12
  669. package/template/app/(app)/question-bank/list/page.tsx +0 -13
  670. package/template/app/(app)/question-bank/new/page.tsx +0 -50
  671. package/template/app/(app)/question-bank/page.tsx +0 -12
  672. package/template/components/app-route-loading.tsx +0 -14
  673. package/template/components/dashboard-onboarding-gallery.tsx +0 -13
  674. package/template/components/dashboard-onboarding.tsx +0 -21
  675. package/template/components/data-views/list-page-calendar-view.tsx +0 -593
  676. package/template/components/data-views/list-page-folder-columns-panel.tsx +0 -345
  677. package/template/components/examples/focused-workflow-showcase.tsx +0 -183
  678. package/template/components/list-hub-board-view.tsx +0 -68
  679. package/template/components/list-hub-client.tsx +0 -186
  680. package/template/components/list-hub-list-view.tsx +0 -36
  681. package/template/components/list-hub-panel-activator.tsx +0 -8
  682. package/template/components/list-hub-secondary-nav.tsx +0 -121
  683. package/template/components/list-hub-table.tsx +0 -336
  684. package/template/components/question-bank-folder-columns-panel.tsx +0 -104
  685. package/template/components/question-bank-list-view.tsx +0 -53
  686. package/template/components/question-bank-panel-activator.tsx +0 -8
  687. package/template/components/question-bank-table.tsx +0 -729
  688. package/template/components/secondary-panel/nav-link-rows.tsx +0 -83
  689. package/template/components/secondary-panel.tsx +0 -220
  690. package/template/components/secondary-panels/list-hub-panel.tsx +0 -39
  691. package/template/components/secondary-panels/question-bank-panel.tsx +0 -39
  692. package/template/components/secondary-panels/registry.tsx +0 -15
  693. package/template/components/section-cards.tsx +0 -106
  694. package/template/components/sidebar-auto-collapse.tsx +0 -23
  695. package/template/components/templates/focused-workflow-layouts.tsx +0 -448
  696. package/template/components/templates/focused-workflow-page-template.tsx +0 -69
  697. package/template/components/templates/page-loading-shell.tsx +0 -262
  698. package/template/components/ui/button-group.tsx +0 -1
  699. package/template/docs/consumer-app-pattern.md +0 -39
  700. package/template/docs/focused-workflow-page-pattern.md +0 -84
  701. package/template/docs/question-bank-hub-header-pattern.md +0 -25
  702. package/template/lib/list-hub-nav.ts +0 -121
  703. package/template/lib/mock/list-hub-directory.ts +0 -27
  704. package/template/lib/mock/list-hub-kpi.ts +0 -27
  705. package/template/lib/mock/question-bank-header-collaborators.ts +0 -54
  706. package/template/lib/mock/question-bank.ts +0 -249
  707. package/template/lib/page-loading-variant.ts +0 -40
  708. package/template/lib/question-bank-dedicated-search.ts +0 -19
  709. package/template/lib/question-bank-hub-search.ts +0 -90
  710. package/template/lib/question-bank-nav.ts +0 -477
  711. package/template/lib/question-bank-recent-searches.ts +0 -22
  712. /package/template/components/{getting-started.tsx → onboarding/getting-started.tsx} +0 -0
  713. /package/template/components/{nav-documents.tsx → sidebar/nav-documents.tsx} +0 -0
  714. /package/template/components/{nav-main.tsx → sidebar/nav-main.tsx} +0 -0
  715. /package/template/components/{nav-secondary.tsx → sidebar/nav-secondary.tsx} +0 -0
  716. /package/template/components/{nav-user.tsx → sidebar/nav-user.tsx} +0 -0
@@ -0,0 +1,1658 @@
1
+ "use client";
2
+ import * as React9 from 'react';
3
+ import { useForm, FormProvider, Controller, useFormContext } from 'react-hook-form';
4
+ import { z } from 'zod';
5
+ import { zodResolver } from '@hookform/resolvers/zod';
6
+ import { cva } from 'class-variance-authority';
7
+ import { Slot, Label as Label$1, Checkbox as Checkbox$1, RadioGroup as RadioGroup$1, Dialog, Tooltip as Tooltip$1, Popover as Popover$1 } from 'radix-ui';
8
+ import { clsx } from 'clsx';
9
+ import { twMerge } from 'tailwind-merge';
10
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
+ import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from 'lucide-react';
12
+ import { getDefaultClassNames, DayPicker } from 'react-day-picker';
13
+ import { useMaskInput } from 'use-mask-input';
14
+
15
+ // src/lib/dev-log.ts
16
+ function devLog(...args) {
17
+ if (process.env.NODE_ENV === "development") {
18
+ console.log(...args);
19
+ }
20
+ }
21
+ function cn(...inputs) {
22
+ return twMerge(clsx(inputs));
23
+ }
24
+ var buttonVariants = cva(
25
+ "group/button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
26
+ {
27
+ variants: {
28
+ variant: {
29
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
30
+ outline: "border-input bg-background hover:bg-interactive-hover hover:text-interactive-hover-foreground aria-expanded:bg-interactive-hover aria-expanded:text-interactive-hover-foreground dark:bg-input/15 dark:hover:bg-input/25",
31
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
32
+ ghost: "hover:bg-interactive-hover hover:text-interactive-hover-foreground aria-expanded:bg-interactive-hover aria-expanded:text-interactive-hover-foreground dark:hover:bg-interactive-hover-subtle",
33
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
34
+ link: "text-primary underline-offset-4 hover:underline"
35
+ },
36
+ size: {
37
+ default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pe-2.5 has-data-[icon=inline-start]:ps-2.5",
38
+ xs: "h-6 gap-1 px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",
39
+ sm: "h-8 gap-1 px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2 [&_svg:not([class*='size-'])]:size-3.5",
40
+ lg: "h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pe-3.5 has-data-[icon=inline-start]:ps-3.5",
41
+ icon: "size-9",
42
+ "icon-xs": "size-6 in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
43
+ "icon-sm": "size-8 in-data-[slot=button-group]:rounded-lg",
44
+ "icon-lg": "size-10"
45
+ }
46
+ },
47
+ defaultVariants: {
48
+ variant: "default",
49
+ size: "default"
50
+ }
51
+ }
52
+ );
53
+ var Button = React9.forwardRef(({ className, variant = "default", size = "default", asChild = false, ...props }, ref) => {
54
+ const Comp = asChild ? Slot.Root : "button";
55
+ return /* @__PURE__ */ jsx(
56
+ Comp,
57
+ {
58
+ ref,
59
+ "data-slot": "button",
60
+ "data-variant": variant,
61
+ "data-size": size,
62
+ className: cn(buttonVariants({ variant, size }), className),
63
+ ...props
64
+ }
65
+ );
66
+ });
67
+ Button.displayName = "Button";
68
+ var Label = React9.forwardRef(function Label2({ className, ...props }, ref) {
69
+ return /* @__PURE__ */ jsx(
70
+ Label$1.Root,
71
+ {
72
+ ref,
73
+ "data-slot": "label",
74
+ className: cn(
75
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
76
+ className
77
+ ),
78
+ ...props
79
+ }
80
+ );
81
+ });
82
+ var checkboxVariants = cva(
83
+ [
84
+ "peer relative box-border flex shrink-0 items-center justify-center self-center rounded-[4px] border border-input",
85
+ "outline-none transition-[color,box-shadow,transform,background-color,border-color] duration-150",
86
+ "motion-reduce:transition-none",
87
+ "group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2",
88
+ "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",
89
+ "disabled:cursor-not-allowed disabled:opacity-50",
90
+ "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary",
91
+ "dark:bg-input/15 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
92
+ ].join(" "),
93
+ {
94
+ variants: {
95
+ variant: {
96
+ default: [
97
+ "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary",
98
+ "data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:data-[state=indeterminate]:bg-primary dark:data-[state=indeterminate]:text-primary-foreground"
99
+ ].join(" "),
100
+ outline: [
101
+ "bg-background",
102
+ "data-[state=checked]:border-primary data-[state=checked]:bg-background data-[state=checked]:text-primary data-[state=checked]:ring-2 data-[state=checked]:ring-primary/25",
103
+ "data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-background data-[state=indeterminate]:text-primary data-[state=indeterminate]:ring-2 data-[state=indeterminate]:ring-primary/25"
104
+ ].join(" "),
105
+ secondary: [
106
+ "data-[state=checked]:border-secondary data-[state=checked]:bg-secondary data-[state=checked]:text-secondary-foreground",
107
+ "data-[state=indeterminate]:border-secondary data-[state=indeterminate]:bg-secondary data-[state=indeterminate]:text-secondary-foreground"
108
+ ].join(" "),
109
+ success: [
110
+ "data-[state=checked]:border-chart-2 data-[state=checked]:bg-chart-2 data-[state=checked]:text-primary-foreground",
111
+ "data-[state=indeterminate]:border-chart-2 data-[state=indeterminate]:bg-chart-2 data-[state=indeterminate]:text-primary-foreground"
112
+ ].join(" "),
113
+ destructive: [
114
+ "data-[state=checked]:border-destructive data-[state=checked]:bg-destructive data-[state=checked]:text-destructive-foreground",
115
+ "data-[state=indeterminate]:border-destructive data-[state=indeterminate]:bg-destructive data-[state=indeterminate]:text-destructive-foreground"
116
+ ].join(" "),
117
+ warning: [
118
+ "data-[state=checked]:border-amber-500 data-[state=checked]:bg-amber-500 data-[state=checked]:text-amber-950",
119
+ "data-[state=indeterminate]:border-amber-500 data-[state=indeterminate]:bg-amber-500 data-[state=indeterminate]:text-amber-950"
120
+ ].join(" "),
121
+ muted: [
122
+ "data-[state=checked]:border-muted-foreground/50 data-[state=checked]:bg-muted data-[state=checked]:text-foreground",
123
+ "data-[state=indeterminate]:border-muted-foreground/50 data-[state=indeterminate]:bg-muted data-[state=indeterminate]:text-foreground"
124
+ ].join(" ")
125
+ },
126
+ size: {
127
+ sm: "size-3.5 max-h-3.5 max-w-3.5 min-h-3.5 min-w-3.5 rounded-[3px] [&_[data-slot=checkbox-indicator]_i]:text-[10px]",
128
+ default: "size-4 max-h-4 max-w-4 min-h-4 min-w-4 [&_[data-slot=checkbox-indicator]_i]:text-xs",
129
+ lg: "size-5 max-h-5 max-w-5 min-h-5 min-w-5 rounded-[5px] [&_[data-slot=checkbox-indicator]_i]:text-sm"
130
+ },
131
+ motion: {
132
+ none: "",
133
+ pop: [
134
+ "motion-safe:active:scale-95",
135
+ "data-[state=checked]:motion-safe:scale-[1.04] data-[state=indeterminate]:motion-safe:scale-[1.04]"
136
+ ].join(" "),
137
+ glow: [
138
+ "data-[state=checked]:shadow-[0_0_0_3px] data-[state=checked]:shadow-primary/35",
139
+ "data-[state=indeterminate]:shadow-[0_0_0_3px] data-[state=indeterminate]:shadow-primary/35"
140
+ ].join(" "),
141
+ "pop-glow": [
142
+ "motion-safe:active:scale-95",
143
+ "data-[state=checked]:motion-safe:scale-[1.04] data-[state=indeterminate]:motion-safe:scale-[1.04]",
144
+ "data-[state=checked]:shadow-[0_0_0_3px] data-[state=checked]:shadow-primary/35",
145
+ "data-[state=indeterminate]:shadow-[0_0_0_3px] data-[state=indeterminate]:shadow-primary/35"
146
+ ].join(" ")
147
+ }
148
+ },
149
+ defaultVariants: {
150
+ variant: "default",
151
+ size: "default",
152
+ motion: "none"
153
+ }
154
+ }
155
+ );
156
+ var checkboxIndicatorVariants = cva("grid place-content-center text-current", {
157
+ variants: {
158
+ motion: {
159
+ none: "transition-none",
160
+ pop: "motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-150",
161
+ glow: "",
162
+ "pop-glow": "motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-150"
163
+ }
164
+ },
165
+ defaultVariants: {
166
+ motion: "none"
167
+ }
168
+ });
169
+ var Checkbox = React9.forwardRef(
170
+ function Checkbox2({ className, variant, size, motion, checked, ...props }, ref) {
171
+ const m = motion ?? "none";
172
+ return /* @__PURE__ */ jsx(
173
+ Checkbox$1.Root,
174
+ {
175
+ ref,
176
+ "data-slot": "checkbox",
177
+ "data-variant": variant ?? "default",
178
+ "data-motion": m,
179
+ checked,
180
+ className: cn(checkboxVariants({ variant, size, motion: m }), className),
181
+ ...props,
182
+ children: /* @__PURE__ */ jsx(
183
+ Checkbox$1.Indicator,
184
+ {
185
+ "data-slot": "checkbox-indicator",
186
+ className: checkboxIndicatorVariants({ motion: m }),
187
+ children: checked === "indeterminate" ? /* @__PURE__ */ jsx("i", { className: "fa-solid fa-minus text-current", "aria-hidden": "true" }) : /* @__PURE__ */ jsx("i", { className: "fa-solid fa-check text-current", "aria-hidden": "true" })
188
+ }
189
+ )
190
+ }
191
+ );
192
+ }
193
+ );
194
+ function Tooltip({
195
+ ...props
196
+ }) {
197
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, { "data-slot": "tooltip", ...props });
198
+ }
199
+ function TooltipTrigger({
200
+ className,
201
+ ...props
202
+ }) {
203
+ return /* @__PURE__ */ jsx(
204
+ Tooltip$1.Trigger,
205
+ {
206
+ "data-slot": "tooltip-trigger",
207
+ suppressHydrationWarning: true,
208
+ className: cn("cursor-pointer", className),
209
+ ...props
210
+ }
211
+ );
212
+ }
213
+ function TooltipContent({
214
+ className,
215
+ sideOffset = 0,
216
+ children,
217
+ ...props
218
+ }) {
219
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsxs(
220
+ Tooltip$1.Content,
221
+ {
222
+ "data-slot": "tooltip-content",
223
+ sideOffset,
224
+ className: cn(
225
+ "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
226
+ className
227
+ ),
228
+ ...props,
229
+ children: [
230
+ children,
231
+ /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
232
+ ]
233
+ }
234
+ ) });
235
+ }
236
+ function Tip({ label, children, side = "top" }) {
237
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
238
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children }),
239
+ /* @__PURE__ */ jsx(TooltipContent, { side, className: "flex flex-wrap items-center gap-1.5", children: label })
240
+ ] });
241
+ }
242
+ function Kbd({
243
+ className,
244
+ variant = "tile",
245
+ "aria-hidden": ariaHidden,
246
+ ...props
247
+ }) {
248
+ const hidden = ariaHidden ?? (variant === "bare" ? true : void 0);
249
+ return /* @__PURE__ */ jsx(
250
+ "kbd",
251
+ {
252
+ "data-slot": "kbd",
253
+ "data-variant": variant,
254
+ "aria-hidden": hidden,
255
+ className: cn(
256
+ "pointer-events-none inline-flex h-5 min-w-5 select-none items-center justify-center gap-1 px-1 font-sans text-xs font-medium",
257
+ variant === "tile" && "bg-muted text-muted-foreground rounded-sm border",
258
+ variant === "bare" && "text-current/70 px-0",
259
+ className
260
+ ),
261
+ ...props
262
+ }
263
+ );
264
+ }
265
+ function KbdGroup({ className, ...props }) {
266
+ return /* @__PURE__ */ jsx(
267
+ "div",
268
+ {
269
+ "data-slot": "kbd-group",
270
+ className: cn("inline-flex items-center gap-1", className),
271
+ ...props
272
+ }
273
+ );
274
+ }
275
+ function Shortcut({
276
+ keys,
277
+ onInvoke,
278
+ disabled
279
+ }) {
280
+ useShortcut(keys, onInvoke, disabled);
281
+ return null;
282
+ }
283
+ function useShortcut(keys, onInvoke, disabled) {
284
+ const ref = React9.useRef(onInvoke);
285
+ React9.useEffect(() => {
286
+ ref.current = onInvoke;
287
+ }, [onInvoke]);
288
+ React9.useEffect(() => {
289
+ if (disabled) return;
290
+ const parsed = parseShortcut(keys);
291
+ if (!parsed) return;
292
+ function handler(e) {
293
+ if (!matchesShortcut(e, parsed)) return;
294
+ const t = e.target;
295
+ if (t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable)) return;
296
+ if (t && (parsed.key === "enter" || parsed.key === " ")) {
297
+ const role = t.getAttribute("role");
298
+ if (t.tagName === "BUTTON" || t.tagName === "A" || t.tagName === "SELECT" || role === "button" || role === "link" || role === "menuitem" || role === "tab" || role === "option" || role === "checkbox" || role === "radio" || role === "switch" || t.closest('[role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="option"]'))
299
+ return;
300
+ }
301
+ const openDialog = document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]');
302
+ if (openDialog && (!t || !openDialog.contains(t))) return;
303
+ e.preventDefault();
304
+ e.stopPropagation();
305
+ ref.current(e);
306
+ }
307
+ window.addEventListener("keydown", handler);
308
+ return () => window.removeEventListener("keydown", handler);
309
+ }, [keys, disabled]);
310
+ }
311
+ function mapKey(raw) {
312
+ const p = raw.toLowerCase();
313
+ if (raw === "\u232B") return "backspace";
314
+ if (raw === "\u2326") return "delete";
315
+ if (raw === "\u23CE" || p === "enter" || p === "return") return "enter";
316
+ if (raw === "\u2423" || p === "space") return " ";
317
+ if (p === "esc" || p === "escape") return "escape";
318
+ if (p === "tab") return "tab";
319
+ if (p === "up" || raw === "\u2191") return "arrowup";
320
+ if (p === "down" || raw === "\u2193") return "arrowdown";
321
+ if (p === "left" || raw === "\u2190") return "arrowleft";
322
+ if (p === "right" || raw === "\u2192") return "arrowright";
323
+ return p;
324
+ }
325
+ function parseShortcut(input) {
326
+ let s = input.trim();
327
+ if (!s) return null;
328
+ const out = { meta: false, ctrl: false, shift: false, alt: false, key: "" };
329
+ while (s.length) {
330
+ const c = s[0];
331
+ if (c === "\u2318") {
332
+ out.meta = true;
333
+ s = s.slice(1);
334
+ } else if (c === "\u2303") {
335
+ out.ctrl = true;
336
+ s = s.slice(1);
337
+ } else if (c === "\u21E7") {
338
+ out.shift = true;
339
+ s = s.slice(1);
340
+ } else if (c === "\u2325") {
341
+ out.alt = true;
342
+ s = s.slice(1);
343
+ } else break;
344
+ }
345
+ if (!s) return null;
346
+ if (/[+\s]/.test(s)) {
347
+ for (const raw of s.split(/[+\s]+/).filter(Boolean)) {
348
+ const p = raw.toLowerCase();
349
+ if (raw === "\u2318" || p === "cmd" || p === "meta" || p === "command") out.meta = true;
350
+ else if (raw === "\u2303" || p === "ctrl" || p === "control") out.ctrl = true;
351
+ else if (raw === "\u21E7" || p === "shift") out.shift = true;
352
+ else if (raw === "\u2325" || p === "alt" || p === "opt" || p === "option") out.alt = true;
353
+ else out.key = mapKey(raw);
354
+ }
355
+ } else {
356
+ out.key = mapKey(s);
357
+ }
358
+ return out.key ? out : null;
359
+ }
360
+ function matchesShortcut(e, s) {
361
+ if (e.metaKey !== s.meta) return false;
362
+ if (e.ctrlKey !== s.ctrl) return false;
363
+ if (e.altKey !== s.alt) return false;
364
+ if (e.shiftKey !== s.shift) return false;
365
+ return e.key.toLowerCase() === s.key;
366
+ }
367
+ var radioGroupItemVariants = cva(
368
+ [
369
+ "group/radio-group-item peer relative flex shrink-0 aspect-square rounded-full border border-input",
370
+ "outline-none transition-[color,box-shadow,transform,background-color,border-color] duration-150",
371
+ "motion-reduce:transition-none",
372
+ "group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2",
373
+ "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",
374
+ "disabled:cursor-not-allowed disabled:opacity-50",
375
+ "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:data-[state=checked]:border-primary",
376
+ "dark:bg-input/15 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
377
+ ].join(" "),
378
+ {
379
+ variants: {
380
+ variant: {
381
+ default: [
382
+ "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary"
383
+ ].join(" "),
384
+ outline: [
385
+ "bg-background",
386
+ "data-[state=checked]:border-primary data-[state=checked]:bg-background data-[state=checked]:text-primary data-[state=checked]:ring-2 data-[state=checked]:ring-primary/25"
387
+ ].join(" "),
388
+ secondary: [
389
+ "data-[state=checked]:border-secondary data-[state=checked]:bg-secondary data-[state=checked]:text-secondary-foreground"
390
+ ].join(" "),
391
+ success: [
392
+ "data-[state=checked]:border-chart-2 data-[state=checked]:bg-chart-2 data-[state=checked]:text-primary-foreground"
393
+ ].join(" "),
394
+ destructive: [
395
+ "data-[state=checked]:border-destructive data-[state=checked]:bg-destructive data-[state=checked]:text-destructive-foreground"
396
+ ].join(" "),
397
+ warning: [
398
+ "data-[state=checked]:border-amber-500 data-[state=checked]:bg-amber-500 data-[state=checked]:text-amber-950"
399
+ ].join(" "),
400
+ muted: [
401
+ "data-[state=checked]:border-muted-foreground/50 data-[state=checked]:bg-muted data-[state=checked]:text-foreground"
402
+ ].join(" ")
403
+ },
404
+ size: {
405
+ sm: "size-3.5 min-h-3.5 min-w-3.5 max-h-3.5 max-w-3.5",
406
+ default: "size-4 min-h-4 min-w-4 max-h-4 max-w-4",
407
+ lg: "size-5 min-h-5 min-w-5 max-h-5 max-w-5"
408
+ },
409
+ motion: {
410
+ none: "",
411
+ pop: [
412
+ "motion-safe:active:scale-95",
413
+ "data-[state=checked]:motion-safe:scale-[1.04]"
414
+ ].join(" "),
415
+ glow: "data-[state=checked]:shadow-[0_0_0_3px] data-[state=checked]:shadow-primary/35",
416
+ "pop-glow": [
417
+ "motion-safe:active:scale-95",
418
+ "data-[state=checked]:motion-safe:scale-[1.04]",
419
+ "data-[state=checked]:shadow-[0_0_0_3px] data-[state=checked]:shadow-primary/35"
420
+ ].join(" ")
421
+ }
422
+ },
423
+ defaultVariants: {
424
+ variant: "default",
425
+ size: "default",
426
+ motion: "none"
427
+ }
428
+ }
429
+ );
430
+ var radioIndicatorDotVariants = cva(
431
+ "pointer-events-none absolute top-1/2 start-1/2 -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 rounded-full",
432
+ {
433
+ variants: {
434
+ variant: {
435
+ default: "bg-primary-foreground",
436
+ outline: "bg-primary",
437
+ secondary: "bg-secondary-foreground",
438
+ success: "bg-primary-foreground",
439
+ destructive: "bg-destructive-foreground",
440
+ warning: "bg-amber-950",
441
+ muted: "bg-foreground"
442
+ },
443
+ size: {
444
+ sm: "size-1.5",
445
+ default: "size-2",
446
+ lg: "size-2.5"
447
+ }
448
+ },
449
+ defaultVariants: {
450
+ variant: "default",
451
+ size: "default"
452
+ }
453
+ }
454
+ );
455
+ var radioIndicatorWrapperVariants = cva("relative flex size-full items-center justify-center", {
456
+ variants: {
457
+ motion: {
458
+ none: "",
459
+ pop: "motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-150",
460
+ glow: "",
461
+ "pop-glow": "motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-150"
462
+ }
463
+ },
464
+ defaultVariants: { motion: "none" }
465
+ });
466
+ var RadioGroupItemChromeContext = React9.createContext({});
467
+ function RadioGroup({
468
+ className,
469
+ itemVariant,
470
+ itemSize,
471
+ itemMotion,
472
+ ...props
473
+ }) {
474
+ const ctx = React9.useMemo(
475
+ () => ({ itemVariant, itemSize, itemMotion }),
476
+ [itemVariant, itemSize, itemMotion]
477
+ );
478
+ return /* @__PURE__ */ jsx(RadioGroupItemChromeContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
479
+ RadioGroup$1.Root,
480
+ {
481
+ "data-slot": "radio-group",
482
+ className: cn("grid w-full gap-2", className),
483
+ ...props
484
+ }
485
+ ) });
486
+ }
487
+ var RadioGroupItem = React9.forwardRef(function RadioGroupItem2({ className, variant: variantProp, size: sizeProp, motion: motionProp, ...props }, ref) {
488
+ const ctx = React9.useContext(RadioGroupItemChromeContext);
489
+ const variant = variantProp ?? ctx.itemVariant;
490
+ const size = sizeProp ?? ctx.itemSize;
491
+ const motion = motionProp ?? ctx.itemMotion ?? "none";
492
+ const vResolved = variant ?? "default";
493
+ const sResolved = size ?? "default";
494
+ return /* @__PURE__ */ jsx(
495
+ RadioGroup$1.Item,
496
+ {
497
+ ref,
498
+ "data-slot": "radio-group-item",
499
+ "data-variant": vResolved,
500
+ "data-motion": motion,
501
+ className: cn(radioGroupItemVariants({ variant, size, motion }), className),
502
+ ...props,
503
+ children: /* @__PURE__ */ jsx(
504
+ RadioGroup$1.Indicator,
505
+ {
506
+ "data-slot": "radio-group-indicator",
507
+ className: radioIndicatorWrapperVariants({ motion }),
508
+ children: /* @__PURE__ */ jsx("span", { className: radioIndicatorDotVariants({ variant: vResolved, size: sResolved }) })
509
+ }
510
+ )
511
+ }
512
+ );
513
+ });
514
+ function RadioGroupLabel({ className, ...props }) {
515
+ return /* @__PURE__ */ jsx(
516
+ Label,
517
+ {
518
+ "data-slot": "radio-group-label",
519
+ className: cn(
520
+ "inline-flex min-h-11 cursor-pointer select-none items-center gap-2 py-1 -my-1 text-sm font-medium leading-snug",
521
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-60",
522
+ className
523
+ ),
524
+ ...props
525
+ }
526
+ );
527
+ }
528
+ function selectionTileClassNames(selected) {
529
+ return cn(
530
+ "flex aspect-square flex-col items-center justify-center gap-1.5 rounded-lg border px-2 py-3 text-xs leading-tight transition-colors",
531
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
532
+ selected ? "border-brand bg-brand/5 text-foreground font-medium shadow-sm" : "border-border bg-background text-muted-foreground hover:border-border/80 hover:text-interactive-hover-foreground"
533
+ );
534
+ }
535
+ function selectionTilePreviewClassNames(selected) {
536
+ return cn(
537
+ "relative box-border flex aspect-square w-full max-w-full flex-col rounded-lg border p-1 transition-colors",
538
+ selected ? "border-brand bg-brand/5 shadow-sm" : "border-border bg-background hover:border-border/80"
539
+ );
540
+ }
541
+ function SelectionTileGraphic({
542
+ option,
543
+ selected
544
+ }) {
545
+ if (option.leading != null) {
546
+ return /* @__PURE__ */ jsx("span", { className: "flex h-full min-h-0 w-full min-w-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:block [&_svg]:h-full [&_svg]:w-auto [&_svg]:max-h-full [&_svg]:max-w-full [&_svg]:object-contain [&_svg]:object-center", children: option.leading });
547
+ }
548
+ if (option.icon) {
549
+ return /* @__PURE__ */ jsx(
550
+ "i",
551
+ {
552
+ className: cn(
553
+ "fa-light shrink-0 text-[18px] leading-none",
554
+ option.icon,
555
+ selected && "text-brand"
556
+ ),
557
+ "aria-hidden": "true"
558
+ }
559
+ );
560
+ }
561
+ return null;
562
+ }
563
+ function SelectionTileLabelText({
564
+ option
565
+ }) {
566
+ return /* @__PURE__ */ jsx("span", { className: "text-center leading-tight", children: option.label });
567
+ }
568
+ function SelectionTileCaptionBelow({
569
+ option,
570
+ selected,
571
+ ariaHidden = false
572
+ }) {
573
+ return /* @__PURE__ */ jsx(
574
+ "span",
575
+ {
576
+ className: cn(
577
+ "max-w-full px-0.5 text-center text-xs leading-tight",
578
+ selected ? "font-medium text-foreground" : "text-muted-foreground"
579
+ ),
580
+ ...ariaHidden ? { "aria-hidden": true } : {},
581
+ children: option.label
582
+ }
583
+ );
584
+ }
585
+ function SelectionTileGrid({
586
+ sectionLabel,
587
+ options,
588
+ columns = 4,
589
+ value,
590
+ onValueChange,
591
+ interaction,
592
+ idPrefix = "tile",
593
+ className,
594
+ labelPlacement = "inside",
595
+ itemVariant,
596
+ itemSize,
597
+ itemMotion
598
+ }) {
599
+ const gridClass = cn(
600
+ "gap-2",
601
+ columns === 2 && "grid grid-cols-2",
602
+ columns === 3 && "grid grid-cols-3",
603
+ columns === 4 && "grid grid-cols-4"
604
+ );
605
+ if (interaction === "radio") {
606
+ return /* @__PURE__ */ jsxs("div", { className, children: [
607
+ sectionLabel ? /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-muted-foreground", children: sectionLabel }) : null,
608
+ /* @__PURE__ */ jsx(
609
+ RadioGroup,
610
+ {
611
+ value,
612
+ onValueChange: (v) => onValueChange(v),
613
+ className: gridClass,
614
+ itemVariant,
615
+ itemSize,
616
+ itemMotion,
617
+ children: options.map((opt) => {
618
+ const selected = value === opt.value;
619
+ const id = `${idPrefix}-${opt.value}`;
620
+ if (labelPlacement === "below") {
621
+ return /* @__PURE__ */ jsxs(
622
+ Label,
623
+ {
624
+ htmlFor: id,
625
+ className: cn(
626
+ "flex min-w-0 cursor-pointer flex-col items-center gap-1.5 rounded-lg focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background"
627
+ ),
628
+ children: [
629
+ /* @__PURE__ */ jsxs("span", { className: cn("flex w-full justify-center", selectionTilePreviewClassNames(selected)), children: [
630
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: opt.value, id, className: "sr-only" }),
631
+ /* @__PURE__ */ jsx("span", { className: "flex min-h-0 w-full min-w-0 flex-1 items-center justify-center", children: /* @__PURE__ */ jsx(SelectionTileGraphic, { option: opt, selected }) })
632
+ ] }),
633
+ /* @__PURE__ */ jsx(SelectionTileCaptionBelow, { option: opt, selected })
634
+ ]
635
+ },
636
+ opt.value
637
+ );
638
+ }
639
+ return /* @__PURE__ */ jsxs(
640
+ Label,
641
+ {
642
+ htmlFor: id,
643
+ className: cn(
644
+ "cursor-pointer rounded-lg focus-within:rounded-lg focus-within:ring-2 focus-within:ring-ring focus-within:outline-none",
645
+ selectionTileClassNames(selected)
646
+ ),
647
+ children: [
648
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: opt.value, id, className: "sr-only" }),
649
+ /* @__PURE__ */ jsx(SelectionTileGraphic, { option: opt, selected }),
650
+ /* @__PURE__ */ jsx(SelectionTileLabelText, { option: opt })
651
+ ]
652
+ },
653
+ opt.value
654
+ );
655
+ })
656
+ }
657
+ )
658
+ ] });
659
+ }
660
+ return /* @__PURE__ */ jsxs("div", { className, children: [
661
+ sectionLabel ? /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-muted-foreground", children: sectionLabel }) : null,
662
+ /* @__PURE__ */ jsx("div", { className: gridClass, children: options.map((opt) => {
663
+ const selected = value === opt.value;
664
+ if (labelPlacement === "below") {
665
+ return /* @__PURE__ */ jsxs(
666
+ "button",
667
+ {
668
+ type: "button",
669
+ "aria-label": opt.label,
670
+ "aria-pressed": selected,
671
+ onClick: () => onValueChange(opt.value),
672
+ className: "flex min-w-0 flex-col items-center gap-1.5 rounded-lg border-0 bg-transparent p-0 text-inherit focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
673
+ children: [
674
+ /* @__PURE__ */ jsx("span", { className: cn("flex w-full justify-center", selectionTilePreviewClassNames(selected)), children: /* @__PURE__ */ jsx("span", { className: "flex min-h-0 w-full min-w-0 flex-1 items-center justify-center", children: /* @__PURE__ */ jsx(SelectionTileGraphic, { option: opt, selected }) }) }),
675
+ /* @__PURE__ */ jsx(SelectionTileCaptionBelow, { option: opt, selected, ariaHidden: true })
676
+ ]
677
+ },
678
+ opt.value
679
+ );
680
+ }
681
+ return /* @__PURE__ */ jsxs(
682
+ "button",
683
+ {
684
+ type: "button",
685
+ "aria-label": opt.label,
686
+ "aria-pressed": selected,
687
+ onClick: () => onValueChange(opt.value),
688
+ className: selectionTileClassNames(selected),
689
+ children: [
690
+ /* @__PURE__ */ jsx(SelectionTileGraphic, { option: opt, selected }),
691
+ /* @__PURE__ */ jsx(SelectionTileLabelText, { option: opt })
692
+ ]
693
+ },
694
+ opt.value
695
+ );
696
+ }) })
697
+ ] });
698
+ }
699
+ function Calendar({
700
+ className,
701
+ classNames,
702
+ showOutsideDays = true,
703
+ captionLayout = "label",
704
+ buttonVariant = "ghost",
705
+ formatters,
706
+ components,
707
+ ...props
708
+ }) {
709
+ const defaultClassNames = getDefaultClassNames();
710
+ return /* @__PURE__ */ jsx(
711
+ DayPicker,
712
+ {
713
+ showOutsideDays,
714
+ className: cn(
715
+ "group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
716
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
717
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
718
+ className
719
+ ),
720
+ captionLayout,
721
+ formatters: {
722
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
723
+ ...formatters
724
+ },
725
+ classNames: {
726
+ root: cn("w-fit", defaultClassNames.root),
727
+ months: cn(
728
+ "relative flex flex-col gap-4 md:flex-row",
729
+ defaultClassNames.months
730
+ ),
731
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
732
+ nav: cn(
733
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
734
+ defaultClassNames.nav
735
+ ),
736
+ button_previous: cn(
737
+ buttonVariants({ variant: buttonVariant }),
738
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
739
+ defaultClassNames.button_previous
740
+ ),
741
+ button_next: cn(
742
+ buttonVariants({ variant: buttonVariant }),
743
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
744
+ defaultClassNames.button_next
745
+ ),
746
+ month_caption: cn(
747
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
748
+ defaultClassNames.month_caption
749
+ ),
750
+ dropdowns: cn(
751
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
752
+ defaultClassNames.dropdowns
753
+ ),
754
+ dropdown_root: cn(
755
+ "relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
756
+ defaultClassNames.dropdown_root
757
+ ),
758
+ dropdown: cn(
759
+ "absolute inset-0 bg-popover opacity-0",
760
+ defaultClassNames.dropdown
761
+ ),
762
+ caption_label: cn(
763
+ "font-medium select-none",
764
+ captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pe-1 ps-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
765
+ defaultClassNames.caption_label
766
+ ),
767
+ table: "w-full border-collapse",
768
+ weekdays: cn("flex", defaultClassNames.weekdays),
769
+ weekday: cn(
770
+ "flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
771
+ defaultClassNames.weekday
772
+ ),
773
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
774
+ week_number_header: cn(
775
+ "w-(--cell-size) select-none",
776
+ defaultClassNames.week_number_header
777
+ ),
778
+ week_number: cn(
779
+ "text-[0.8rem] text-muted-foreground select-none",
780
+ defaultClassNames.week_number
781
+ ),
782
+ day: cn(
783
+ "group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
784
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
785
+ defaultClassNames.day
786
+ ),
787
+ range_start: cn(
788
+ "rounded-l-md bg-accent",
789
+ defaultClassNames.range_start
790
+ ),
791
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
792
+ range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
793
+ today: cn(
794
+ "rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
795
+ defaultClassNames.today
796
+ ),
797
+ outside: cn(
798
+ "text-muted-foreground aria-selected:text-muted-foreground",
799
+ defaultClassNames.outside
800
+ ),
801
+ disabled: cn(
802
+ "text-muted-foreground opacity-50",
803
+ defaultClassNames.disabled
804
+ ),
805
+ hidden: cn("invisible", defaultClassNames.hidden),
806
+ ...classNames
807
+ },
808
+ components: {
809
+ Root: ({ className: className2, rootRef, ...props2 }) => {
810
+ return /* @__PURE__ */ jsx(
811
+ "div",
812
+ {
813
+ "data-slot": "calendar",
814
+ ref: rootRef,
815
+ className: cn(className2),
816
+ ...props2
817
+ }
818
+ );
819
+ },
820
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
821
+ if (orientation === "left") {
822
+ return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
823
+ }
824
+ if (orientation === "right") {
825
+ return /* @__PURE__ */ jsx(
826
+ ChevronRightIcon,
827
+ {
828
+ className: cn("size-4", className2),
829
+ ...props2
830
+ }
831
+ );
832
+ }
833
+ return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
834
+ },
835
+ DayButton: CalendarDayButton,
836
+ WeekNumber: ({ children, ...props2 }) => {
837
+ return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
838
+ },
839
+ ...components
840
+ },
841
+ ...props
842
+ }
843
+ );
844
+ }
845
+ function CalendarDayButton({
846
+ className,
847
+ day,
848
+ modifiers,
849
+ ...props
850
+ }) {
851
+ const defaultClassNames = getDefaultClassNames();
852
+ const ref = React9.useRef(null);
853
+ React9.useEffect(() => {
854
+ if (modifiers.focused) ref.current?.focus();
855
+ }, [modifiers.focused]);
856
+ return /* @__PURE__ */ jsx(
857
+ Button,
858
+ {
859
+ ref,
860
+ variant: "ghost",
861
+ size: "icon",
862
+ "data-day": day.date.toLocaleDateString(),
863
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
864
+ "data-range-start": modifiers.range_start,
865
+ "data-range-end": modifiers.range_end,
866
+ "data-range-middle": modifiers.range_middle,
867
+ className: cn(
868
+ "flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
869
+ defaultClassNames.day,
870
+ className
871
+ ),
872
+ ...props
873
+ }
874
+ );
875
+ }
876
+ var Input = React9.forwardRef(
877
+ function Input2({ className, type, ...props }, ref) {
878
+ return /* @__PURE__ */ jsx(
879
+ "input",
880
+ {
881
+ ref,
882
+ type,
883
+ "data-slot": "input",
884
+ className: cn(
885
+ "h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
886
+ className
887
+ ),
888
+ ...props
889
+ }
890
+ );
891
+ }
892
+ );
893
+ function InputGroup({ className, ...props }) {
894
+ return /* @__PURE__ */ jsx(
895
+ "div",
896
+ {
897
+ "data-slot": "input-group",
898
+ role: "group",
899
+ className: cn(
900
+ "group/input-group relative flex h-8 w-full min-w-0 items-center rounded-md border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5",
901
+ className
902
+ ),
903
+ ...props
904
+ }
905
+ );
906
+ }
907
+ var inputGroupAddonVariants = cva(
908
+ "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
909
+ {
910
+ variants: {
911
+ align: {
912
+ "inline-start": "order-first ps-2 has-[>button]:ms-[-0.3rem] has-[>kbd]:ms-[-0.15rem]",
913
+ "inline-end": "order-last pe-2 has-[>button]:me-[-0.3rem] has-[>kbd]:me-[-0.15rem]",
914
+ "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
915
+ "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
916
+ }
917
+ },
918
+ defaultVariants: {
919
+ align: "inline-start"
920
+ }
921
+ }
922
+ );
923
+ function InputGroupAddon({
924
+ className,
925
+ align = "inline-start",
926
+ ...props
927
+ }) {
928
+ return /* @__PURE__ */ jsx(
929
+ "div",
930
+ {
931
+ role: "group",
932
+ "data-slot": "input-group-addon",
933
+ "data-align": align,
934
+ className: cn(inputGroupAddonVariants({ align }), className),
935
+ onClick: (e) => {
936
+ if (e.target.closest("button")) {
937
+ return;
938
+ }
939
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
940
+ },
941
+ ...props
942
+ }
943
+ );
944
+ }
945
+ var inputGroupButtonVariants = cva(
946
+ "flex items-center gap-2 text-sm shadow-none",
947
+ {
948
+ variants: {
949
+ size: {
950
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
951
+ sm: "",
952
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
953
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
954
+ }
955
+ },
956
+ defaultVariants: {
957
+ size: "xs"
958
+ }
959
+ }
960
+ );
961
+ function InputGroupButton({
962
+ className,
963
+ type = "button",
964
+ variant = "ghost",
965
+ size = "xs",
966
+ ...props
967
+ }) {
968
+ return /* @__PURE__ */ jsx(
969
+ Button,
970
+ {
971
+ type,
972
+ "data-size": size,
973
+ variant,
974
+ className: cn(inputGroupButtonVariants({ size }), className),
975
+ ...props
976
+ }
977
+ );
978
+ }
979
+
980
+ // src/lib/compose-refs.ts
981
+ function composeRefs(...refs) {
982
+ return (node) => {
983
+ for (const ref of refs) {
984
+ if (ref == null) continue;
985
+ if (typeof ref === "function") {
986
+ ref(node);
987
+ } else {
988
+ ref.current = node;
989
+ }
990
+ }
991
+ };
992
+ }
993
+ var exxatInputMaskDefaults = {
994
+ placeholder: "_",
995
+ showMaskOnHover: false
996
+ };
997
+ var exxatMaskPatterns = {
998
+ /** US NANP 10-digit display */
999
+ phoneUS: "(999) 999-9999",
1000
+ /** US ZIP or ZIP+4 */
1001
+ zipUS: "99999[-9999]",
1002
+ /** Calendar-style date (validate separately). */
1003
+ dateMDY: "99/99/9999"};
1004
+ var MaskedInput = React9.forwardRef(function MaskedInput2({ mask, maskOptions, className, type = "text", ...props }, ref) {
1005
+ const maskRef = useMaskInput({
1006
+ mask,
1007
+ options: { ...exxatInputMaskDefaults, ...maskOptions }
1008
+ });
1009
+ return /* @__PURE__ */ jsx(
1010
+ Input,
1011
+ {
1012
+ ref: composeRefs(ref, maskRef),
1013
+ type,
1014
+ className: cn(className),
1015
+ ...props
1016
+ }
1017
+ );
1018
+ });
1019
+ function Popover({ ...props }) {
1020
+ return /* @__PURE__ */ jsx(Popover$1.Root, { ...props });
1021
+ }
1022
+ function PopoverTrigger({ className, ...props }) {
1023
+ return /* @__PURE__ */ jsx(Popover$1.Trigger, { className: cn("cursor-pointer", className), ...props });
1024
+ }
1025
+ function PopoverContent({
1026
+ className,
1027
+ align = "start",
1028
+ sideOffset = 4,
1029
+ ...props
1030
+ }) {
1031
+ return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
1032
+ Popover$1.Content,
1033
+ {
1034
+ "data-slot": "popover-content",
1035
+ align,
1036
+ sideOffset,
1037
+ className: cn(
1038
+ "z-50 rounded-lg border border-border bg-popover shadow-md outline-none",
1039
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
1040
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1041
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
1042
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
1043
+ "data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
1044
+ className
1045
+ ),
1046
+ ...props
1047
+ }
1048
+ ) });
1049
+ }
1050
+ var DATE_PICKER_ICON_CLASS = "fa-light fa-calendar";
1051
+ function parseMdyToLocalDate(raw) {
1052
+ const match = raw.trim().match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
1053
+ if (!match) return void 0;
1054
+ const month = Number(match[1]);
1055
+ const day = Number(match[2]);
1056
+ const year = Number(match[3]);
1057
+ if (month < 1 || month > 12 || day < 1 || day > 31) return void 0;
1058
+ const date = new Date(year, month - 1, day, 12, 0, 0, 0);
1059
+ if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) return void 0;
1060
+ return date;
1061
+ }
1062
+ function formatLocalDateToMdy(date) {
1063
+ const month = String(date.getMonth() + 1).padStart(2, "0");
1064
+ const day = String(date.getDate()).padStart(2, "0");
1065
+ const year = String(date.getFullYear());
1066
+ return `${month}/${day}/${year}`;
1067
+ }
1068
+ function DateTextInputField({
1069
+ value,
1070
+ onValueChange,
1071
+ "aria-label": ariaLabel,
1072
+ id,
1073
+ placeholder = "MM/DD/YYYY",
1074
+ className,
1075
+ inputClassName,
1076
+ autoFocus,
1077
+ disabled,
1078
+ fromYear = 2020,
1079
+ toYear = 2032,
1080
+ iconButtonVariant = "ghost",
1081
+ popoverAlign = "end",
1082
+ popoverClassName
1083
+ }) {
1084
+ return /* @__PURE__ */ jsxs(InputGroup, { className, children: [
1085
+ /* @__PURE__ */ jsx(
1086
+ MaskedInput,
1087
+ {
1088
+ "data-slot": "input-group-control",
1089
+ id,
1090
+ mask: exxatMaskPatterns.dateMDY,
1091
+ "aria-label": ariaLabel,
1092
+ placeholder,
1093
+ value,
1094
+ onChange: (event) => onValueChange(event.target.value),
1095
+ className: cn(
1096
+ "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
1097
+ inputClassName
1098
+ ),
1099
+ autoFocus,
1100
+ disabled
1101
+ }
1102
+ ),
1103
+ /* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxs(Popover, { children: [
1104
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
1105
+ InputGroupButton,
1106
+ {
1107
+ type: "button",
1108
+ variant: iconButtonVariant,
1109
+ size: "icon-xs",
1110
+ disabled,
1111
+ "aria-label": `${ariaLabel} pick date`,
1112
+ children: /* @__PURE__ */ jsx("i", { className: DATE_PICKER_ICON_CLASS, "aria-hidden": "true" })
1113
+ }
1114
+ ) }),
1115
+ /* @__PURE__ */ jsx(
1116
+ PopoverContent,
1117
+ {
1118
+ className: cn("z-[80] w-auto p-0", popoverClassName),
1119
+ align: popoverAlign,
1120
+ sideOffset: 6,
1121
+ children: /* @__PURE__ */ jsx(
1122
+ Calendar,
1123
+ {
1124
+ mode: "single",
1125
+ selected: parseMdyToLocalDate(value),
1126
+ onSelect: (next) => onValueChange(next ? formatLocalDateToMdy(next) : ""),
1127
+ initialFocus: true,
1128
+ fromYear,
1129
+ toYear,
1130
+ captionLayout: "dropdown"
1131
+ }
1132
+ )
1133
+ }
1134
+ )
1135
+ ] }) })
1136
+ ] });
1137
+ }
1138
+ var MASK_BY_KIND = {
1139
+ phone: exxatMaskPatterns.phoneUS,
1140
+ zip: exxatMaskPatterns.zipUS,
1141
+ dateMDY: exxatMaskPatterns.dateMDY
1142
+ };
1143
+ function FilterTextValueInput({
1144
+ id,
1145
+ mask,
1146
+ value,
1147
+ onValueChange,
1148
+ "aria-label": ariaLabel,
1149
+ placeholder,
1150
+ className,
1151
+ autoFocus
1152
+ }) {
1153
+ if (mask === "dateMDY") {
1154
+ return /* @__PURE__ */ jsx(
1155
+ DateTextInputField,
1156
+ {
1157
+ id,
1158
+ value,
1159
+ onValueChange,
1160
+ "aria-label": ariaLabel,
1161
+ placeholder,
1162
+ inputClassName: className,
1163
+ autoFocus,
1164
+ iconButtonVariant: "ghost",
1165
+ popoverAlign: "end"
1166
+ }
1167
+ );
1168
+ }
1169
+ if (mask) {
1170
+ return /* @__PURE__ */ jsx(
1171
+ MaskedInput,
1172
+ {
1173
+ id,
1174
+ mask: MASK_BY_KIND[mask],
1175
+ "aria-label": ariaLabel,
1176
+ placeholder,
1177
+ value,
1178
+ onChange: (e) => onValueChange(e.target.value),
1179
+ className,
1180
+ autoFocus
1181
+ }
1182
+ );
1183
+ }
1184
+ return /* @__PURE__ */ jsx(
1185
+ Input,
1186
+ {
1187
+ id,
1188
+ type: "text",
1189
+ "aria-label": ariaLabel,
1190
+ placeholder,
1191
+ value,
1192
+ onChange: (e) => onValueChange(e.target.value),
1193
+ className,
1194
+ autoFocus
1195
+ }
1196
+ );
1197
+ }
1198
+ function Sheet({ ...props }) {
1199
+ return /* @__PURE__ */ jsx(Dialog.Root, { "data-slot": "sheet", ...props });
1200
+ }
1201
+ function SheetPortal({
1202
+ ...props
1203
+ }) {
1204
+ return /* @__PURE__ */ jsx(Dialog.Portal, { "data-slot": "sheet-portal", ...props });
1205
+ }
1206
+ function SheetOverlay({
1207
+ className,
1208
+ ...props
1209
+ }) {
1210
+ return /* @__PURE__ */ jsx(
1211
+ Dialog.Overlay,
1212
+ {
1213
+ "data-slot": "sheet-overlay",
1214
+ className: cn(
1215
+ "fixed inset-0 z-50 bg-overlay duration-300 ease-out supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
1216
+ className
1217
+ ),
1218
+ ...props
1219
+ }
1220
+ );
1221
+ }
1222
+ function SheetContent({
1223
+ className,
1224
+ children,
1225
+ side = "right",
1226
+ showCloseButton = true,
1227
+ showOverlay = true,
1228
+ ...props
1229
+ }) {
1230
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
1231
+ showOverlay && /* @__PURE__ */ jsx(SheetOverlay, {}),
1232
+ /* @__PURE__ */ jsxs(
1233
+ Dialog.Content,
1234
+ {
1235
+ "data-slot": "sheet-content",
1236
+ "data-side": side,
1237
+ className: cn(
1238
+ "fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg outline-none duration-300 ease-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-6 data-[side=left]:data-open:slide-in-from-left-6 data-[side=right]:data-open:slide-in-from-right-6 data-[side=top]:data-open:slide-in-from-top-6 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-6 data-[side=left]:data-closed:slide-out-to-left-6 data-[side=right]:data-closed:slide-out-to-right-6 data-[side=top]:data-closed:slide-out-to-top-6",
1239
+ className
1240
+ ),
1241
+ ...props,
1242
+ children: [
1243
+ children,
1244
+ showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs(
1245
+ Button,
1246
+ {
1247
+ variant: "ghost",
1248
+ className: "absolute top-3 end-3",
1249
+ size: "icon-sm",
1250
+ children: [
1251
+ /* @__PURE__ */ jsx("i", { className: "fa-light fa-xmark", "aria-hidden": "true" }),
1252
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1253
+ ]
1254
+ }
1255
+ ) })
1256
+ ]
1257
+ }
1258
+ )
1259
+ ] });
1260
+ }
1261
+ function SheetTitle({
1262
+ className,
1263
+ ...props
1264
+ }) {
1265
+ return /* @__PURE__ */ jsx(
1266
+ Dialog.Title,
1267
+ {
1268
+ "data-slot": "sheet-title",
1269
+ className: cn(
1270
+ "text-base font-medium text-foreground",
1271
+ className
1272
+ ),
1273
+ ...props
1274
+ }
1275
+ );
1276
+ }
1277
+ var Form = FormProvider;
1278
+ var FormFieldContext = React9.createContext(
1279
+ {}
1280
+ );
1281
+ function FormField({ ...props }) {
1282
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
1283
+ }
1284
+ function useFormField() {
1285
+ const fieldContext = React9.useContext(FormFieldContext);
1286
+ const itemContext = React9.useContext(FormItemContext);
1287
+ const { getFieldState, formState } = useFormContext();
1288
+ const fieldState = getFieldState(fieldContext.name, formState);
1289
+ if (!fieldContext) throw new Error("useFormField must be used inside <FormField>");
1290
+ const { id } = itemContext;
1291
+ return {
1292
+ id,
1293
+ name: fieldContext.name,
1294
+ formItemId: `${id}-form-item`,
1295
+ formDescriptionId: `${id}-form-item-description`,
1296
+ formMessageId: `${id}-form-item-message`,
1297
+ ...fieldState
1298
+ };
1299
+ }
1300
+ var FormItemContext = React9.createContext({});
1301
+ function FormItem({ className, ...props }) {
1302
+ const id = React9.useId();
1303
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { "data-slot": "form-item", className: cn("flex flex-col gap-1.5", className), ...props }) });
1304
+ }
1305
+ function FormLabel({ className, ...props }) {
1306
+ const { error, formItemId } = useFormField();
1307
+ return /* @__PURE__ */ jsx(
1308
+ Label,
1309
+ {
1310
+ "data-slot": "form-label",
1311
+ "data-error": !!error,
1312
+ className: cn("data-[error=true]:text-destructive", className),
1313
+ htmlFor: formItemId,
1314
+ ...props
1315
+ }
1316
+ );
1317
+ }
1318
+ function FormControl({ ...props }) {
1319
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
1320
+ return /* @__PURE__ */ jsx(
1321
+ Slot.Root,
1322
+ {
1323
+ "data-slot": "form-control",
1324
+ id: formItemId,
1325
+ "aria-describedby": !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`,
1326
+ "aria-invalid": !!error,
1327
+ ...props
1328
+ }
1329
+ );
1330
+ }
1331
+ function FormDescription({ className, ...props }) {
1332
+ const { formDescriptionId } = useFormField();
1333
+ return /* @__PURE__ */ jsx(
1334
+ "p",
1335
+ {
1336
+ "data-slot": "form-description",
1337
+ id: formDescriptionId,
1338
+ className: cn("text-muted-foreground text-sm", className),
1339
+ ...props
1340
+ }
1341
+ );
1342
+ }
1343
+ function FormMessage({ className, children, ...props }) {
1344
+ const { error, formMessageId } = useFormField();
1345
+ const body = error ? String(error?.message ?? "") : children;
1346
+ if (!body) return null;
1347
+ return /* @__PURE__ */ jsx(
1348
+ "p",
1349
+ {
1350
+ "data-slot": "form-message",
1351
+ id: formMessageId,
1352
+ className: cn("text-destructive text-sm", className),
1353
+ ...props,
1354
+ children: body
1355
+ }
1356
+ );
1357
+ }
1358
+ function parseMdyToDate(raw) {
1359
+ if (!raw?.trim()) return void 0;
1360
+ const m = raw.trim().match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
1361
+ if (!m) return void 0;
1362
+ const month = Number(m[1]);
1363
+ const day = Number(m[2]);
1364
+ const year = Number(m[3]);
1365
+ if (month < 1 || month > 12 || day < 1 || day > 31) return void 0;
1366
+ const d = new Date(year, month - 1, day, 12, 0, 0, 0);
1367
+ if (d.getFullYear() !== year || d.getMonth() !== month - 1 || d.getDate() !== day) return void 0;
1368
+ return d;
1369
+ }
1370
+ var EXPORT_FORMAT_OPTIONS = [
1371
+ { value: "csv", label: "CSV", icon: "fa-file-csv" },
1372
+ { value: "excel", label: "Excel", icon: "fa-file-excel" },
1373
+ { value: "pdf", label: "PDF", icon: "fa-file-pdf" }
1374
+ ];
1375
+ var exportSchema = z.object({
1376
+ format: z.enum(["csv", "excel", "pdf"]),
1377
+ columns: z.enum(["all", "visible"]),
1378
+ dateFrom: z.string().optional(),
1379
+ dateTo: z.string().optional(),
1380
+ includeFilters: z.boolean()
1381
+ }).superRefine((data, ctx) => {
1382
+ const from = parseMdyToDate(data.dateFrom);
1383
+ const to = parseMdyToDate(data.dateTo);
1384
+ if (data.dateFrom?.trim() && !from) {
1385
+ ctx.addIssue({ code: "custom", message: "Enter a valid from date", path: ["dateFrom"] });
1386
+ }
1387
+ if (data.dateTo?.trim() && !to) {
1388
+ ctx.addIssue({ code: "custom", message: "Enter a valid to date", path: ["dateTo"] });
1389
+ }
1390
+ if (from && to && to < from) {
1391
+ ctx.addIssue({ code: "custom", message: "End date must be after start date", path: ["dateTo"] });
1392
+ }
1393
+ });
1394
+ function ExportDrawer({
1395
+ open,
1396
+ onOpenChange,
1397
+ totalRows = 0,
1398
+ visibleColumns
1399
+ }) {
1400
+ const form = useForm({
1401
+ resolver: zodResolver(exportSchema),
1402
+ defaultValues: {
1403
+ format: "csv",
1404
+ columns: "visible",
1405
+ dateFrom: "",
1406
+ dateTo: "",
1407
+ includeFilters: true
1408
+ }
1409
+ });
1410
+ const [isExporting, setIsExporting] = React9.useState(false);
1411
+ async function onSubmit(values) {
1412
+ setIsExporting(true);
1413
+ await new Promise((r) => setTimeout(r, 1200));
1414
+ devLog("Export:", {
1415
+ ...values,
1416
+ dateFrom: parseMdyToDate(values.dateFrom)?.toISOString(),
1417
+ dateTo: parseMdyToDate(values.dateTo)?.toISOString()
1418
+ });
1419
+ setIsExporting(false);
1420
+ onOpenChange(false);
1421
+ form.reset();
1422
+ }
1423
+ return /* @__PURE__ */ jsx(Sheet, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
1424
+ SheetContent,
1425
+ {
1426
+ "data-slot": "export-drawer",
1427
+ side: "right",
1428
+ showCloseButton: false,
1429
+ showOverlay: false,
1430
+ className: "z-[80] w-80 sm:max-w-80 p-0 gap-0 flex flex-col border border-border shadow-xl rounded-xl overflow-hidden",
1431
+ style: { top: "0.5rem", bottom: "0.5rem", right: "0.5rem", height: "calc(100vh - 1rem)" },
1432
+ children: [
1433
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 px-4 pt-5 pb-3", children: [
1434
+ /* @__PURE__ */ jsx(SheetTitle, { className: "text-base font-semibold leading-tight", children: "Export data" }),
1435
+ /* @__PURE__ */ jsx(Tip, { label: "Close", side: "bottom", children: /* @__PURE__ */ jsx(
1436
+ Button,
1437
+ {
1438
+ type: "button",
1439
+ variant: "ghost",
1440
+ size: "icon-sm",
1441
+ "aria-label": "Close",
1442
+ onClick: () => onOpenChange(false),
1443
+ children: /* @__PURE__ */ jsx("i", { className: "fa-light fa-xmark text-[13px]", "aria-hidden": "true" })
1444
+ }
1445
+ ) })
1446
+ ] }),
1447
+ /* @__PURE__ */ jsxs("p", { className: "px-4 pb-3 text-sm text-muted-foreground -mt-1", children: [
1448
+ totalRows,
1449
+ " record",
1450
+ totalRows !== 1 ? "s" : "",
1451
+ " available for export."
1452
+ ] }),
1453
+ /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsx(
1454
+ "form",
1455
+ {
1456
+ id: "export-form",
1457
+ onSubmit: form.handleSubmit(onSubmit),
1458
+ className: "flex-1 overflow-y-auto",
1459
+ children: /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4 space-y-5", children: [
1460
+ /* @__PURE__ */ jsx(
1461
+ FormField,
1462
+ {
1463
+ control: form.control,
1464
+ name: "format",
1465
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
1466
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
1467
+ SelectionTileGrid,
1468
+ {
1469
+ sectionLabel: "File format",
1470
+ options: EXPORT_FORMAT_OPTIONS,
1471
+ columns: 3,
1472
+ value: field.value,
1473
+ onValueChange: field.onChange,
1474
+ interaction: "radio",
1475
+ idPrefix: "export-fmt",
1476
+ itemVariant: "outline",
1477
+ itemMotion: "pop"
1478
+ }
1479
+ ) }),
1480
+ /* @__PURE__ */ jsx(FormMessage, {})
1481
+ ] })
1482
+ }
1483
+ ),
1484
+ /* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
1485
+ /* @__PURE__ */ jsxs("legend", { className: "text-sm font-medium leading-none mb-2", children: [
1486
+ "Date range",
1487
+ " ",
1488
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
1489
+ ] }),
1490
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
1491
+ /* @__PURE__ */ jsx(
1492
+ FormField,
1493
+ {
1494
+ control: form.control,
1495
+ name: "dateFrom",
1496
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "gap-1", children: [
1497
+ /* @__PURE__ */ jsx(FormLabel, { htmlFor: "export-date-from", className: "text-xs text-muted-foreground", children: "From" }),
1498
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
1499
+ FilterTextValueInput,
1500
+ {
1501
+ id: "export-date-from",
1502
+ mask: "dateMDY",
1503
+ "aria-label": "Export from date (optional)",
1504
+ placeholder: "MM/DD/YYYY",
1505
+ value: field.value ?? "",
1506
+ onValueChange: field.onChange,
1507
+ className: "h-8 text-sm"
1508
+ }
1509
+ ) }),
1510
+ /* @__PURE__ */ jsx(FormDescription, { className: "text-[11px]", children: "MM/DD/YYYY" }),
1511
+ /* @__PURE__ */ jsx(FormMessage, {})
1512
+ ] })
1513
+ }
1514
+ ),
1515
+ /* @__PURE__ */ jsx(
1516
+ FormField,
1517
+ {
1518
+ control: form.control,
1519
+ name: "dateTo",
1520
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "gap-1", children: [
1521
+ /* @__PURE__ */ jsx(FormLabel, { htmlFor: "export-date-to", className: "text-xs text-muted-foreground", children: "To" }),
1522
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
1523
+ FilterTextValueInput,
1524
+ {
1525
+ id: "export-date-to",
1526
+ mask: "dateMDY",
1527
+ "aria-label": "Export to date (optional)",
1528
+ placeholder: "MM/DD/YYYY",
1529
+ value: field.value ?? "",
1530
+ onValueChange: field.onChange,
1531
+ className: "h-8 text-sm"
1532
+ }
1533
+ ) }),
1534
+ /* @__PURE__ */ jsx(FormDescription, { className: "text-[11px]", children: "MM/DD/YYYY" }),
1535
+ /* @__PURE__ */ jsx(FormMessage, {})
1536
+ ] })
1537
+ }
1538
+ )
1539
+ ] })
1540
+ ] }),
1541
+ /* @__PURE__ */ jsx(
1542
+ FormField,
1543
+ {
1544
+ control: form.control,
1545
+ name: "columns",
1546
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
1547
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm font-medium", children: "Columns" }),
1548
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
1549
+ RadioGroup,
1550
+ {
1551
+ value: field.value,
1552
+ onValueChange: field.onChange,
1553
+ className: "space-y-1.5 mt-1",
1554
+ itemVariant: "outline",
1555
+ itemMotion: "pop",
1556
+ children: [
1557
+ { value: "all", label: "All columns", sub: null },
1558
+ { value: "visible", label: "Visible columns only", sub: visibleColumns !== void 0 ? `${visibleColumns} columns` : null }
1559
+ ].map((opt) => /* @__PURE__ */ jsxs(
1560
+ "div",
1561
+ {
1562
+ className: "flex items-center gap-2.5 rounded-lg border border-border px-3 py-2.5 transition-colors hover:bg-interactive-hover has-[[data-state=checked]]:border-brand has-[[data-state=checked]]:bg-brand/10 cursor-pointer",
1563
+ children: [
1564
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: opt.value, id: `col-${opt.value}` }),
1565
+ /* @__PURE__ */ jsxs(
1566
+ RadioGroupLabel,
1567
+ {
1568
+ htmlFor: `col-${opt.value}`,
1569
+ className: "min-h-0 flex-1 cursor-pointer py-0 text-sm font-normal leading-none",
1570
+ children: [
1571
+ opt.label,
1572
+ opt.sub && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground ms-1.5 font-normal", children: [
1573
+ "(",
1574
+ opt.sub,
1575
+ ")"
1576
+ ] })
1577
+ ]
1578
+ }
1579
+ )
1580
+ ]
1581
+ },
1582
+ opt.value
1583
+ ))
1584
+ }
1585
+ ) }),
1586
+ /* @__PURE__ */ jsx(FormMessage, {})
1587
+ ] })
1588
+ }
1589
+ ),
1590
+ /* @__PURE__ */ jsx(
1591
+ FormField,
1592
+ {
1593
+ control: form.control,
1594
+ name: "includeFilters",
1595
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
1596
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 rounded-lg border border-border px-3 py-2.5 transition-colors hover:bg-interactive-hover has-[[data-state=checked]]:border-primary", children: [
1597
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
1598
+ Checkbox,
1599
+ {
1600
+ id: "include-filters",
1601
+ checked: field.value,
1602
+ onCheckedChange: field.onChange,
1603
+ className: "mt-0.5 shrink-0"
1604
+ }
1605
+ ) }),
1606
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
1607
+ /* @__PURE__ */ jsx(Label, { htmlFor: "include-filters", className: "text-sm cursor-pointer font-medium leading-none", children: "Apply active filters" }),
1608
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "Export only rows matching current filters" })
1609
+ ] })
1610
+ ] }),
1611
+ /* @__PURE__ */ jsx(FormMessage, {})
1612
+ ] })
1613
+ }
1614
+ )
1615
+ ] })
1616
+ }
1617
+ ) }),
1618
+ /* @__PURE__ */ jsx(Shortcut, { keys: "Enter", disabled: isExporting, onInvoke: () => form.handleSubmit(onSubmit)() }),
1619
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 py-3 border-t border-border", children: [
1620
+ /* @__PURE__ */ jsxs(
1621
+ Button,
1622
+ {
1623
+ type: "button",
1624
+ variant: "outline",
1625
+ className: "flex-1",
1626
+ onClick: () => onOpenChange(false),
1627
+ children: [
1628
+ "Cancel",
1629
+ /* @__PURE__ */ jsx(KbdGroup, { className: "ms-1.5", children: /* @__PURE__ */ jsx(Kbd, { variant: "bare", children: "Esc" }) })
1630
+ ]
1631
+ }
1632
+ ),
1633
+ /* @__PURE__ */ jsx(
1634
+ Button,
1635
+ {
1636
+ type: "submit",
1637
+ form: "export-form",
1638
+ className: "flex-1",
1639
+ disabled: isExporting,
1640
+ children: isExporting ? /* @__PURE__ */ jsxs(Fragment, { children: [
1641
+ /* @__PURE__ */ jsx("i", { className: "fa-light fa-spinner-third fa-spin text-[13px]", "aria-hidden": "true" }),
1642
+ "Exporting\u2026"
1643
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1644
+ /* @__PURE__ */ jsx("i", { className: "fa-light fa-arrow-down-to-line text-[13px]", "aria-hidden": "true" }),
1645
+ "Export",
1646
+ /* @__PURE__ */ jsx(KbdGroup, { className: "ms-1.5", children: /* @__PURE__ */ jsx(Kbd, { variant: "bare", children: "\u23CE" }) })
1647
+ ] })
1648
+ }
1649
+ )
1650
+ ] })
1651
+ ]
1652
+ }
1653
+ ) });
1654
+ }
1655
+
1656
+ export { ExportDrawer };
1657
+ //# sourceMappingURL=export-drawer.js.map
1658
+ //# sourceMappingURL=export-drawer.js.map