@hub-kit/core 0.3.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 (499) hide show
  1. package/README.md +125 -0
  2. package/cli/hub-kit.mjs +112 -0
  3. package/dist/adapters/bank-reconciliation.d.ts +100 -0
  4. package/dist/adapters/bank-reconciliation.js +1 -0
  5. package/dist/adapters/bank-sync-log.d.ts +46 -0
  6. package/dist/adapters/bank-sync-log.js +1 -0
  7. package/dist/adapters/category-rules.d.ts +94 -0
  8. package/dist/adapters/category-rules.js +1 -0
  9. package/dist/adapters/companies.d.ts +85 -0
  10. package/dist/adapters/companies.js +3 -0
  11. package/dist/adapters/customers.d.ts +71 -0
  12. package/dist/adapters/customers.js +1 -0
  13. package/dist/adapters/exclusion-rules.d.ts +34 -0
  14. package/dist/adapters/exclusion-rules.js +15 -0
  15. package/dist/adapters/file-naming.d.ts +36 -0
  16. package/dist/adapters/file-naming.js +1 -0
  17. package/dist/adapters/index.d.ts +24 -0
  18. package/dist/adapters/index.js +1 -0
  19. package/dist/adapters/invoice-detail.d.ts +126 -0
  20. package/dist/adapters/invoice-detail.js +1 -0
  21. package/dist/adapters/invoice-list.d.ts +63 -0
  22. package/dist/adapters/invoice-list.js +1 -0
  23. package/dist/adapters/invoice-upload.d.ts +26 -0
  24. package/dist/adapters/invoice-upload.js +1 -0
  25. package/dist/adapters/manual-bookings.d.ts +56 -0
  26. package/dist/adapters/manual-bookings.js +1 -0
  27. package/dist/adapters/notifications.d.ts +31 -0
  28. package/dist/adapters/notifications.js +1 -0
  29. package/dist/adapters/open-items.d.ts +42 -0
  30. package/dist/adapters/open-items.js +1 -0
  31. package/dist/adapters/opos-whitelist.d.ts +38 -0
  32. package/dist/adapters/opos-whitelist.js +1 -0
  33. package/dist/adapters/outgoing-invoices.d.ts +32 -0
  34. package/dist/adapters/outgoing-invoices.js +1 -0
  35. package/dist/adapters/overview.d.ts +68 -0
  36. package/dist/adapters/overview.js +1 -0
  37. package/dist/adapters/processing-log.d.ts +48 -0
  38. package/dist/adapters/processing-log.js +1 -0
  39. package/dist/adapters/properties.d.ts +87 -0
  40. package/dist/adapters/properties.js +1 -0
  41. package/dist/adapters/supplier-detail.d.ts +64 -0
  42. package/dist/adapters/supplier-detail.js +1 -0
  43. package/dist/adapters/supplier-list.d.ts +21 -0
  44. package/dist/adapters/supplier-list.js +1 -0
  45. package/dist/adapters/team.d.ts +79 -0
  46. package/dist/adapters/team.js +1 -0
  47. package/dist/adapters/trash.d.ts +26 -0
  48. package/dist/adapters/trash.js +1 -0
  49. package/dist/adapters/vat-rules.d.ts +83 -0
  50. package/dist/adapters/vat-rules.js +1 -0
  51. package/dist/components/access/index.d.ts +3 -0
  52. package/dist/components/access/index.js +3 -0
  53. package/dist/components/access/permission-checklist.d.ts +13 -0
  54. package/dist/components/access/permission-checklist.js +19 -0
  55. package/dist/components/access/permission-matrix.d.ts +12 -0
  56. package/dist/components/access/permission-matrix.js +18 -0
  57. package/dist/components/access/types.d.ts +15 -0
  58. package/dist/components/access/types.js +1 -0
  59. package/dist/components/dashboard/date-range-calendar.d.ts +19 -0
  60. package/dist/components/dashboard/date-range-calendar.js +97 -0
  61. package/dist/components/dashboard/index.d.ts +23 -0
  62. package/dist/components/dashboard/index.js +14 -0
  63. package/dist/components/dashboard/kpi-card.d.ts +13 -0
  64. package/dist/components/dashboard/kpi-card.js +7 -0
  65. package/dist/components/dashboard/money-cards-row.d.ts +29 -0
  66. package/dist/components/dashboard/money-cards-row.js +28 -0
  67. package/dist/components/dashboard/money-trend-chart.d.ts +13 -0
  68. package/dist/components/dashboard/money-trend-chart.js +16 -0
  69. package/dist/components/dashboard/panel.d.ts +9 -0
  70. package/dist/components/dashboard/panel.js +5 -0
  71. package/dist/components/dashboard/period-picker.d.ts +25 -0
  72. package/dist/components/dashboard/period-picker.js +82 -0
  73. package/dist/components/dashboard/periods.d.ts +13 -0
  74. package/dist/components/dashboard/periods.js +63 -0
  75. package/dist/components/dashboard/pipeline-stages-panel.d.ts +14 -0
  76. package/dist/components/dashboard/pipeline-stages-panel.js +12 -0
  77. package/dist/components/dashboard/processing-summary-panel.d.ts +34 -0
  78. package/dist/components/dashboard/processing-summary-panel.js +11 -0
  79. package/dist/components/dashboard/ranked-bars.d.ts +15 -0
  80. package/dist/components/dashboard/ranked-bars.js +16 -0
  81. package/dist/components/dashboard/ranked-list-panel.d.ts +14 -0
  82. package/dist/components/dashboard/ranked-list-panel.js +9 -0
  83. package/dist/components/dashboard/stage-tiles.d.ts +15 -0
  84. package/dist/components/dashboard/stage-tiles.js +6 -0
  85. package/dist/components/dashboard/stat-rows-panel.d.ts +25 -0
  86. package/dist/components/dashboard/stat-rows-panel.js +7 -0
  87. package/dist/components/dashboard/stat-tile.d.ts +20 -0
  88. package/dist/components/dashboard/stat-tile.js +9 -0
  89. package/dist/components/feedback/index.d.ts +4 -0
  90. package/dist/components/feedback/index.js +2 -0
  91. package/dist/components/feedback/query-states.d.ts +27 -0
  92. package/dist/components/feedback/query-states.js +38 -0
  93. package/dist/components/feedback/table-pagination.d.ts +20 -0
  94. package/dist/components/feedback/table-pagination.js +15 -0
  95. package/dist/components/invoice-queue/index.d.ts +5 -0
  96. package/dist/components/invoice-queue/index.js +3 -0
  97. package/dist/components/invoice-queue/next-action-cell.d.ts +5 -0
  98. package/dist/components/invoice-queue/next-action-cell.js +9 -0
  99. package/dist/components/invoice-queue/queue-kpi-card.d.ts +19 -0
  100. package/dist/components/invoice-queue/queue-kpi-card.js +31 -0
  101. package/dist/components/invoice-queue/queue-kpi-row.d.ts +22 -0
  102. package/dist/components/invoice-queue/queue-kpi-row.js +12 -0
  103. package/dist/components/notifications/alerts.d.ts +25 -0
  104. package/dist/components/notifications/alerts.js +66 -0
  105. package/dist/components/notifications/bell.d.ts +14 -0
  106. package/dist/components/notifications/bell.js +17 -0
  107. package/dist/components/notifications/highlight.d.ts +4 -0
  108. package/dist/components/notifications/highlight.js +7 -0
  109. package/dist/components/notifications/index.d.ts +7 -0
  110. package/dist/components/notifications/index.js +6 -0
  111. package/dist/components/notifications/reminder-dialog.d.ts +24 -0
  112. package/dist/components/notifications/reminder-dialog.js +54 -0
  113. package/dist/components/notifications/types.d.ts +27 -0
  114. package/dist/components/notifications/types.js +1 -0
  115. package/dist/components/notifications/use-notification-acks.d.ts +7 -0
  116. package/dist/components/notifications/use-notification-acks.js +37 -0
  117. package/dist/components/shell/breadcrumbs.d.ts +7 -0
  118. package/dist/components/shell/breadcrumbs.js +38 -0
  119. package/dist/components/shell/index.d.ts +3 -0
  120. package/dist/components/shell/index.js +3 -0
  121. package/dist/components/shell/shell.d.ts +30 -0
  122. package/dist/components/shell/shell.js +110 -0
  123. package/dist/components/shell/types.d.ts +23 -0
  124. package/dist/components/shell/types.js +3 -0
  125. package/dist/components/tour/find-target.d.ts +1 -0
  126. package/dist/components/tour/find-target.js +3 -0
  127. package/dist/components/tour/index.d.ts +14 -0
  128. package/dist/components/tour/index.js +8 -0
  129. package/dist/components/tour/labels.d.ts +10 -0
  130. package/dist/components/tour/labels.js +9 -0
  131. package/dist/components/tour/seen-store.d.ts +3 -0
  132. package/dist/components/tour/seen-store.js +34 -0
  133. package/dist/components/tour/tour-blocks.d.ts +4 -0
  134. package/dist/components/tour/tour-blocks.js +27 -0
  135. package/dist/components/tour/tour-button.d.ts +4 -0
  136. package/dist/components/tour/tour-button.js +12 -0
  137. package/dist/components/tour/tour-card.d.ts +11 -0
  138. package/dist/components/tour/tour-card.js +7 -0
  139. package/dist/components/tour/tour-context.d.ts +16 -0
  140. package/dist/components/tour/tour-context.js +2 -0
  141. package/dist/components/tour/tour-overlay.d.ts +1 -0
  142. package/dist/components/tour/tour-overlay.js +165 -0
  143. package/dist/components/tour/tour-provider.d.ts +9 -0
  144. package/dist/components/tour/tour-provider.js +80 -0
  145. package/dist/components/tour/types.d.ts +44 -0
  146. package/dist/components/tour/types.js +1 -0
  147. package/dist/components/tour/use-tour.d.ts +3 -0
  148. package/dist/components/tour/use-tour.js +9 -0
  149. package/dist/hooks/use-mobile.d.ts +1 -0
  150. package/dist/hooks/use-mobile.js +15 -0
  151. package/dist/i18n/index.d.ts +15 -0
  152. package/dist/i18n/index.js +15 -0
  153. package/dist/lib/bank-import/classify.d.ts +8 -0
  154. package/dist/lib/bank-import/classify.js +89 -0
  155. package/dist/lib/bank-import/column-guess.d.ts +2 -0
  156. package/dist/lib/bank-import/column-guess.js +40 -0
  157. package/dist/lib/bank-import/csv.d.ts +3 -0
  158. package/dist/lib/bank-import/csv.js +20 -0
  159. package/dist/lib/bank-import/duplicates.d.ts +2 -0
  160. package/dist/lib/bank-import/duplicates.js +21 -0
  161. package/dist/lib/bank-import/index.d.ts +12 -0
  162. package/dist/lib/bank-import/index.js +9 -0
  163. package/dist/lib/bank-import/mapping-storage.d.ts +3 -0
  164. package/dist/lib/bank-import/mapping-storage.js +29 -0
  165. package/dist/lib/bank-import/normalize.d.ts +4 -0
  166. package/dist/lib/bank-import/normalize.js +82 -0
  167. package/dist/lib/bank-import/parse-file.d.ts +7 -0
  168. package/dist/lib/bank-import/parse-file.js +23 -0
  169. package/dist/lib/bank-import/types.d.ts +31 -0
  170. package/dist/lib/bank-import/types.js +1 -0
  171. package/dist/lib/bank-import/xlsx.d.ts +2 -0
  172. package/dist/lib/bank-import/xlsx.js +25 -0
  173. package/dist/lib/class-names.d.ts +2 -0
  174. package/dist/lib/class-names.js +5 -0
  175. package/dist/lib/download.d.ts +2 -0
  176. package/dist/lib/download.js +14 -0
  177. package/dist/lib/formatters.d.ts +6 -0
  178. package/dist/lib/formatters.js +24 -0
  179. package/dist/lib/index.d.ts +9 -0
  180. package/dist/lib/index.js +6 -0
  181. package/dist/lib/opos-whitelist/index.d.ts +2 -0
  182. package/dist/lib/opos-whitelist/index.js +1 -0
  183. package/dist/lib/opos-whitelist/opos.d.ts +14 -0
  184. package/dist/lib/opos-whitelist/opos.js +49 -0
  185. package/dist/lib/query-result.d.ts +12 -0
  186. package/dist/lib/query-result.js +1 -0
  187. package/dist/lib/tour-placeholders/index.d.ts +2 -0
  188. package/dist/lib/tour-placeholders/index.js +1 -0
  189. package/dist/lib/tour-placeholders/overview.d.ts +12 -0
  190. package/dist/lib/tour-placeholders/overview.js +139 -0
  191. package/dist/pages/bank-accounts/BankAccountsPage.d.ts +7 -0
  192. package/dist/pages/bank-accounts/BankAccountsPage.js +21 -0
  193. package/dist/pages/bank-accounts/index.d.ts +4 -0
  194. package/dist/pages/bank-accounts/index.js +2 -0
  195. package/dist/pages/bank-accounts/labels.d.ts +15 -0
  196. package/dist/pages/bank-accounts/labels.js +14 -0
  197. package/dist/pages/bank-import/BankImportWizard.d.ts +9 -0
  198. package/dist/pages/bank-import/BankImportWizard.js +158 -0
  199. package/dist/pages/bank-import/index.d.ts +4 -0
  200. package/dist/pages/bank-import/index.js +2 -0
  201. package/dist/pages/bank-import/labels.d.ts +44 -0
  202. package/dist/pages/bank-import/labels.js +43 -0
  203. package/dist/pages/bank-sync-log/BankSyncLogPage.d.ts +7 -0
  204. package/dist/pages/bank-sync-log/BankSyncLogPage.js +77 -0
  205. package/dist/pages/bank-sync-log/index.d.ts +4 -0
  206. package/dist/pages/bank-sync-log/index.js +2 -0
  207. package/dist/pages/bank-sync-log/labels.d.ts +21 -0
  208. package/dist/pages/bank-sync-log/labels.js +20 -0
  209. package/dist/pages/bank-transactions/BankMatchPanel.d.ts +8 -0
  210. package/dist/pages/bank-transactions/BankMatchPanel.js +75 -0
  211. package/dist/pages/bank-transactions/BankTransactionsPage.d.ts +7 -0
  212. package/dist/pages/bank-transactions/BankTransactionsPage.js +59 -0
  213. package/dist/pages/bank-transactions/badges.d.ts +8 -0
  214. package/dist/pages/bank-transactions/badges.js +24 -0
  215. package/dist/pages/bank-transactions/index.d.ts +6 -0
  216. package/dist/pages/bank-transactions/index.js +4 -0
  217. package/dist/pages/bank-transactions/labels.d.ts +41 -0
  218. package/dist/pages/bank-transactions/labels.js +40 -0
  219. package/dist/pages/bank-transactions/sort-control.d.ts +17 -0
  220. package/dist/pages/bank-transactions/sort-control.js +8 -0
  221. package/dist/pages/bank-transactions/use-table-view.d.ts +23 -0
  222. package/dist/pages/bank-transactions/use-table-view.js +54 -0
  223. package/dist/pages/category-rules/CategoryRulesPage.d.ts +7 -0
  224. package/dist/pages/category-rules/CategoryRulesPage.js +160 -0
  225. package/dist/pages/category-rules/index.d.ts +4 -0
  226. package/dist/pages/category-rules/index.js +2 -0
  227. package/dist/pages/category-rules/labels.d.ts +66 -0
  228. package/dist/pages/category-rules/labels.js +72 -0
  229. package/dist/pages/companies/company-detail-page.d.ts +10 -0
  230. package/dist/pages/companies/company-detail-page.js +184 -0
  231. package/dist/pages/companies/company-form.d.ts +20 -0
  232. package/dist/pages/companies/company-form.js +23 -0
  233. package/dist/pages/companies/company-list-page.d.ts +9 -0
  234. package/dist/pages/companies/company-list-page.js +109 -0
  235. package/dist/pages/companies/known-spellings-card.d.ts +8 -0
  236. package/dist/pages/companies/known-spellings-card.js +65 -0
  237. package/dist/pages/companies/labels.d.ts +105 -0
  238. package/dist/pages/companies/labels.js +104 -0
  239. package/dist/pages/companies/sort-control.d.ts +17 -0
  240. package/dist/pages/companies/sort-control.js +8 -0
  241. package/dist/pages/companies/use-infinite-rows.d.ts +6 -0
  242. package/dist/pages/companies/use-infinite-rows.js +24 -0
  243. package/dist/pages/companies/use-table-view.d.ts +23 -0
  244. package/dist/pages/companies/use-table-view.js +56 -0
  245. package/dist/pages/customers/company-chip.d.ts +6 -0
  246. package/dist/pages/customers/company-chip.js +9 -0
  247. package/dist/pages/customers/copy-button.d.ts +6 -0
  248. package/dist/pages/customers/copy-button.js +31 -0
  249. package/dist/pages/customers/customer-detail-page.d.ts +10 -0
  250. package/dist/pages/customers/customer-detail-page.js +83 -0
  251. package/dist/pages/customers/customer-list-page.d.ts +9 -0
  252. package/dist/pages/customers/customer-list-page.js +65 -0
  253. package/dist/pages/customers/edit-customer-dialog.d.ts +9 -0
  254. package/dist/pages/customers/edit-customer-dialog.js +72 -0
  255. package/dist/pages/customers/form-hints.d.ts +6 -0
  256. package/dist/pages/customers/form-hints.js +9 -0
  257. package/dist/pages/customers/invoice-status-badge.d.ts +10 -0
  258. package/dist/pages/customers/invoice-status-badge.js +22 -0
  259. package/dist/pages/customers/labels.d.ts +116 -0
  260. package/dist/pages/customers/labels.js +117 -0
  261. package/dist/pages/customers/new-customer-dialog.d.ts +6 -0
  262. package/dist/pages/customers/new-customer-dialog.js +93 -0
  263. package/dist/pages/customers/sort-control.d.ts +14 -0
  264. package/dist/pages/customers/sort-control.js +9 -0
  265. package/dist/pages/customers/use-table-view.d.ts +23 -0
  266. package/dist/pages/customers/use-table-view.js +56 -0
  267. package/dist/pages/exclusion-rules/exclusion-rules-page.d.ts +7 -0
  268. package/dist/pages/exclusion-rules/exclusion-rules-page.js +114 -0
  269. package/dist/pages/exclusion-rules/labels.d.ts +53 -0
  270. package/dist/pages/exclusion-rules/labels.js +61 -0
  271. package/dist/pages/file-naming/build-filename.d.ts +3 -0
  272. package/dist/pages/file-naming/build-filename.js +82 -0
  273. package/dist/pages/file-naming/file-naming-page.d.ts +10 -0
  274. package/dist/pages/file-naming/file-naming-page.js +120 -0
  275. package/dist/pages/file-naming/labels.d.ts +44 -0
  276. package/dist/pages/file-naming/labels.js +44 -0
  277. package/dist/pages/index.d.ts +63 -0
  278. package/dist/pages/index.js +48 -0
  279. package/dist/pages/invoice-detail/InvoiceDetailPage.d.ts +11 -0
  280. package/dist/pages/invoice-detail/InvoiceDetailPage.js +292 -0
  281. package/dist/pages/invoice-detail/OutgoingInvoiceFlag.d.ts +26 -0
  282. package/dist/pages/invoice-detail/OutgoingInvoiceFlag.js +16 -0
  283. package/dist/pages/invoice-detail/ReviewBadge.d.ts +15 -0
  284. package/dist/pages/invoice-detail/ReviewBadge.js +23 -0
  285. package/dist/pages/invoice-detail/ReviewCard.d.ts +17 -0
  286. package/dist/pages/invoice-detail/ReviewCard.js +12 -0
  287. package/dist/pages/invoice-detail/SideBySide.d.ts +5 -0
  288. package/dist/pages/invoice-detail/SideBySide.js +5 -0
  289. package/dist/pages/invoice-detail/WorkflowHistoryList.d.ts +23 -0
  290. package/dist/pages/invoice-detail/WorkflowHistoryList.js +32 -0
  291. package/dist/pages/invoice-detail/WorkflowLadder.d.ts +20 -0
  292. package/dist/pages/invoice-detail/WorkflowLadder.js +16 -0
  293. package/dist/pages/invoice-detail/history.d.ts +23 -0
  294. package/dist/pages/invoice-detail/history.js +76 -0
  295. package/dist/pages/invoice-detail/index.d.ts +21 -0
  296. package/dist/pages/invoice-detail/index.js +11 -0
  297. package/dist/pages/invoice-detail/labels.d.ts +79 -0
  298. package/dist/pages/invoice-detail/labels.js +139 -0
  299. package/dist/pages/invoice-detail/pipeline-types.d.ts +58 -0
  300. package/dist/pages/invoice-detail/pipeline-types.js +1 -0
  301. package/dist/pages/invoice-detail/review-recheck.d.ts +8 -0
  302. package/dist/pages/invoice-detail/review-recheck.js +103 -0
  303. package/dist/pages/invoice-detail/review.d.ts +91 -0
  304. package/dist/pages/invoice-detail/review.js +310 -0
  305. package/dist/pages/invoice-list/badges.d.ts +23 -0
  306. package/dist/pages/invoice-list/badges.js +26 -0
  307. package/dist/pages/invoice-list/index.d.ts +5 -0
  308. package/dist/pages/invoice-list/index.js +3 -0
  309. package/dist/pages/invoice-list/invoice-list-page.d.ts +13 -0
  310. package/dist/pages/invoice-list/invoice-list-page.js +114 -0
  311. package/dist/pages/invoice-list/labels.d.ts +36 -0
  312. package/dist/pages/invoice-list/labels.js +29 -0
  313. package/dist/pages/invoice-list/sort-control.d.ts +17 -0
  314. package/dist/pages/invoice-list/sort-control.js +8 -0
  315. package/dist/pages/invoice-list/use-table-view.d.ts +23 -0
  316. package/dist/pages/invoice-list/use-table-view.js +54 -0
  317. package/dist/pages/invoice-upload/InvoiceUploadPage.d.ts +7 -0
  318. package/dist/pages/invoice-upload/InvoiceUploadPage.js +115 -0
  319. package/dist/pages/invoice-upload/index.d.ts +4 -0
  320. package/dist/pages/invoice-upload/index.js +2 -0
  321. package/dist/pages/invoice-upload/labels.d.ts +29 -0
  322. package/dist/pages/invoice-upload/labels.js +28 -0
  323. package/dist/pages/manual-bookings/ManualBookingsPage.d.ts +7 -0
  324. package/dist/pages/manual-bookings/ManualBookingsPage.js +161 -0
  325. package/dist/pages/manual-bookings/index.d.ts +4 -0
  326. package/dist/pages/manual-bookings/index.js +2 -0
  327. package/dist/pages/manual-bookings/labels.d.ts +53 -0
  328. package/dist/pages/manual-bookings/labels.js +52 -0
  329. package/dist/pages/notifications/labels.d.ts +22 -0
  330. package/dist/pages/notifications/labels.js +21 -0
  331. package/dist/pages/notifications/notifications-page.d.ts +14 -0
  332. package/dist/pages/notifications/notifications-page.js +81 -0
  333. package/dist/pages/open-items/OpenItemsPage.d.ts +11 -0
  334. package/dist/pages/open-items/OpenItemsPage.js +110 -0
  335. package/dist/pages/open-items/index.d.ts +6 -0
  336. package/dist/pages/open-items/index.js +3 -0
  337. package/dist/pages/open-items/labels.d.ts +37 -0
  338. package/dist/pages/open-items/labels.js +36 -0
  339. package/dist/pages/open-items/urgency.d.ts +8 -0
  340. package/dist/pages/open-items/urgency.js +27 -0
  341. package/dist/pages/opos-whitelist/OposWhitelistPage.d.ts +7 -0
  342. package/dist/pages/opos-whitelist/OposWhitelistPage.js +165 -0
  343. package/dist/pages/opos-whitelist/index.d.ts +4 -0
  344. package/dist/pages/opos-whitelist/index.js +2 -0
  345. package/dist/pages/opos-whitelist/labels.d.ts +56 -0
  346. package/dist/pages/opos-whitelist/labels.js +70 -0
  347. package/dist/pages/outgoing-invoices/OutgoingInvoicesPage.d.ts +7 -0
  348. package/dist/pages/outgoing-invoices/OutgoingInvoicesPage.js +169 -0
  349. package/dist/pages/outgoing-invoices/index.d.ts +4 -0
  350. package/dist/pages/outgoing-invoices/index.js +2 -0
  351. package/dist/pages/outgoing-invoices/labels.d.ts +43 -0
  352. package/dist/pages/outgoing-invoices/labels.js +42 -0
  353. package/dist/pages/outgoing-invoices/sort-control.d.ts +17 -0
  354. package/dist/pages/outgoing-invoices/sort-control.js +8 -0
  355. package/dist/pages/outgoing-invoices/use-table-view.d.ts +23 -0
  356. package/dist/pages/outgoing-invoices/use-table-view.js +54 -0
  357. package/dist/pages/overview/labels.d.ts +35 -0
  358. package/dist/pages/overview/labels.js +34 -0
  359. package/dist/pages/overview/overview-page.d.ts +22 -0
  360. package/dist/pages/overview/overview-page.js +127 -0
  361. package/dist/pages/processing-log/labels.d.ts +54 -0
  362. package/dist/pages/processing-log/labels.js +53 -0
  363. package/dist/pages/processing-log/mail-parsing.d.ts +21 -0
  364. package/dist/pages/processing-log/mail-parsing.js +52 -0
  365. package/dist/pages/processing-log/processing-log-page.d.ts +9 -0
  366. package/dist/pages/processing-log/processing-log-page.js +206 -0
  367. package/dist/pages/properties/badges.d.ts +20 -0
  368. package/dist/pages/properties/badges.js +45 -0
  369. package/dist/pages/properties/company-assignment-field.d.ts +11 -0
  370. package/dist/pages/properties/company-assignment-field.js +13 -0
  371. package/dist/pages/properties/form-field.d.ts +6 -0
  372. package/dist/pages/properties/form-field.js +9 -0
  373. package/dist/pages/properties/labels.d.ts +124 -0
  374. package/dist/pages/properties/labels.js +128 -0
  375. package/dist/pages/properties/name-variants-card.d.ts +7 -0
  376. package/dist/pages/properties/name-variants-card.js +60 -0
  377. package/dist/pages/properties/property-detail-page.d.ts +10 -0
  378. package/dist/pages/properties/property-detail-page.js +150 -0
  379. package/dist/pages/properties/property-list-page.d.ts +13 -0
  380. package/dist/pages/properties/property-list-page.js +201 -0
  381. package/dist/pages/properties/sort-control.d.ts +14 -0
  382. package/dist/pages/properties/sort-control.js +9 -0
  383. package/dist/pages/properties/use-infinite-rows.d.ts +6 -0
  384. package/dist/pages/properties/use-infinite-rows.js +26 -0
  385. package/dist/pages/properties/use-table-view.d.ts +23 -0
  386. package/dist/pages/properties/use-table-view.js +56 -0
  387. package/dist/pages/supplier-detail/SupplierDetailPage.d.ts +10 -0
  388. package/dist/pages/supplier-detail/SupplierDetailPage.js +157 -0
  389. package/dist/pages/supplier-detail/index.d.ts +4 -0
  390. package/dist/pages/supplier-detail/index.js +2 -0
  391. package/dist/pages/supplier-detail/labels.d.ts +46 -0
  392. package/dist/pages/supplier-detail/labels.js +45 -0
  393. package/dist/pages/supplier-list/SupplierListPage.d.ts +9 -0
  394. package/dist/pages/supplier-list/SupplierListPage.js +102 -0
  395. package/dist/pages/supplier-list/index.d.ts +4 -0
  396. package/dist/pages/supplier-list/index.js +2 -0
  397. package/dist/pages/supplier-list/labels.d.ts +33 -0
  398. package/dist/pages/supplier-list/labels.js +32 -0
  399. package/dist/pages/supplier-list/sort-control.d.ts +17 -0
  400. package/dist/pages/supplier-list/sort-control.js +8 -0
  401. package/dist/pages/supplier-list/use-table-view.d.ts +23 -0
  402. package/dist/pages/supplier-list/use-table-view.js +54 -0
  403. package/dist/pages/team/account-dialogs.d.ts +12 -0
  404. package/dist/pages/team/account-dialogs.js +49 -0
  405. package/dist/pages/team/employee-editor.d.ts +19 -0
  406. package/dist/pages/team/employee-editor.js +124 -0
  407. package/dist/pages/team/labels.d.ts +99 -0
  408. package/dist/pages/team/labels.js +98 -0
  409. package/dist/pages/team/new-employee.d.ts +8 -0
  410. package/dist/pages/team/new-employee.js +103 -0
  411. package/dist/pages/team/roles-tab.d.ts +6 -0
  412. package/dist/pages/team/roles-tab.js +46 -0
  413. package/dist/pages/team/team-page.d.ts +7 -0
  414. package/dist/pages/team/team-page.js +81 -0
  415. package/dist/pages/team/temp-password-dialog.d.ts +11 -0
  416. package/dist/pages/team/temp-password-dialog.js +23 -0
  417. package/dist/pages/trash/labels.d.ts +68 -0
  418. package/dist/pages/trash/labels.js +69 -0
  419. package/dist/pages/trash/trash-page.d.ts +9 -0
  420. package/dist/pages/trash/trash-page.js +259 -0
  421. package/dist/pages/vat-rules/labels.d.ts +110 -0
  422. package/dist/pages/vat-rules/labels.js +109 -0
  423. package/dist/pages/vat-rules/new-rule-dialog.d.ts +7 -0
  424. package/dist/pages/vat-rules/new-rule-dialog.js +134 -0
  425. package/dist/pages/vat-rules/rule-row.d.ts +20 -0
  426. package/dist/pages/vat-rules/rule-row.js +120 -0
  427. package/dist/pages/vat-rules/vat-rules-page.d.ts +9 -0
  428. package/dist/pages/vat-rules/vat-rules-page.js +61 -0
  429. package/dist/ui/alert-dialog.d.ts +20 -0
  430. package/dist/ui/alert-dialog.js +41 -0
  431. package/dist/ui/badge.d.ts +9 -0
  432. package/dist/ui/badge.js +20 -0
  433. package/dist/ui/breadcrumb.d.ts +19 -0
  434. package/dist/ui/breadcrumb.js +23 -0
  435. package/dist/ui/button.d.ts +11 -0
  436. package/dist/ui/button.js +33 -0
  437. package/dist/ui/calendar.d.ts +8 -0
  438. package/dist/ui/calendar.js +75 -0
  439. package/dist/ui/card.d.ts +8 -0
  440. package/dist/ui/card.js +16 -0
  441. package/dist/ui/chart.d.ts +62 -0
  442. package/dist/ui/chart.js +118 -0
  443. package/dist/ui/checkbox.d.ts +4 -0
  444. package/dist/ui/checkbox.js +11 -0
  445. package/dist/ui/collapsible.d.ts +5 -0
  446. package/dist/ui/collapsible.js +5 -0
  447. package/dist/ui/combobox.d.ts +24 -0
  448. package/dist/ui/combobox.js +55 -0
  449. package/dist/ui/command.d.ts +80 -0
  450. package/dist/ui/command.js +29 -0
  451. package/dist/ui/dialog.d.ts +19 -0
  452. package/dist/ui/dialog.js +58 -0
  453. package/dist/ui/dropdown-menu.d.ts +27 -0
  454. package/dist/ui/dropdown-menu.js +33 -0
  455. package/dist/ui/field-context.d.ts +4 -0
  456. package/dist/ui/field-context.js +6 -0
  457. package/dist/ui/field.d.ts +3 -0
  458. package/dist/ui/field.js +8 -0
  459. package/dist/ui/icon-action.d.ts +3 -0
  460. package/dist/ui/icon-action.js +8 -0
  461. package/dist/ui/index.d.ts +32 -0
  462. package/dist/ui/index.js +32 -0
  463. package/dist/ui/input.d.ts +3 -0
  464. package/dist/ui/input.js +11 -0
  465. package/dist/ui/label.d.ts +5 -0
  466. package/dist/ui/label.js +15 -0
  467. package/dist/ui/multi-combobox.d.ts +18 -0
  468. package/dist/ui/multi-combobox.js +40 -0
  469. package/dist/ui/popover.d.ts +9 -0
  470. package/dist/ui/popover.js +12 -0
  471. package/dist/ui/scroll-area.d.ts +5 -0
  472. package/dist/ui/scroll-area.js +9 -0
  473. package/dist/ui/scroll-shadow.d.ts +8 -0
  474. package/dist/ui/scroll-shadow.js +57 -0
  475. package/dist/ui/select.d.ts +13 -0
  476. package/dist/ui/select.js +31 -0
  477. package/dist/ui/separator.d.ts +4 -0
  478. package/dist/ui/separator.js +7 -0
  479. package/dist/ui/sheet.d.ts +25 -0
  480. package/dist/ui/sheet.js +40 -0
  481. package/dist/ui/sidebar.d.ts +65 -0
  482. package/dist/ui/sidebar.js +207 -0
  483. package/dist/ui/skeleton.d.ts +2 -0
  484. package/dist/ui/skeleton.js +6 -0
  485. package/dist/ui/sonner.d.ts +5 -0
  486. package/dist/ui/sonner.js +13 -0
  487. package/dist/ui/switch.d.ts +4 -0
  488. package/dist/ui/switch.js +7 -0
  489. package/dist/ui/table.d.ts +12 -0
  490. package/dist/ui/table.js +24 -0
  491. package/dist/ui/tabs.d.ts +7 -0
  492. package/dist/ui/tabs.js +12 -0
  493. package/dist/ui/textarea.d.ts +3 -0
  494. package/dist/ui/textarea.js +11 -0
  495. package/dist/ui/tooltip.d.ts +7 -0
  496. package/dist/ui/tooltip.js +11 -0
  497. package/package.json +80 -0
  498. package/themes/TOKENS.md +57 -0
  499. package/themes/default.css +60 -0
@@ -0,0 +1,118 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as RechartsPrimitive from "recharts";
4
+ import { cn } from "../lib/class-names.js";
5
+ const THEMES = { light: "", dark: ".dark" };
6
+ const ChartContext = React.createContext(null);
7
+ function useChart() {
8
+ const context = React.useContext(ChartContext);
9
+ if (!context) {
10
+ throw new Error("useChart must be used within a <ChartContainer />");
11
+ }
12
+ return context;
13
+ }
14
+ const ChartContainer = React.forwardRef(({ id, className, children, config, ...props }, ref) => {
15
+ const uniqueId = React.useId();
16
+ const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
17
+ return (_jsx(ChartContext.Provider, { value: { config }, children: _jsxs("div", { "data-chart": chartId, ref: ref, className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", className), ...props, children: [_jsx(ChartStyle, { id: chartId, config: config }), _jsx(RechartsPrimitive.ResponsiveContainer, { children: children })] }) }));
18
+ });
19
+ ChartContainer.displayName = "Chart";
20
+ const ChartStyle = ({ id, config }) => {
21
+ const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
22
+ if (!colorConfig.length) {
23
+ return null;
24
+ }
25
+ return (_jsx("style", { dangerouslySetInnerHTML: {
26
+ __html: Object.entries(THEMES)
27
+ .map(([theme, prefix]) => `
28
+ ${prefix} [data-chart=${id}] {
29
+ ${colorConfig
30
+ .map(([key, itemConfig]) => {
31
+ const color = itemConfig.theme?.[theme] || itemConfig.color;
32
+ return color ? ` --color-${key}: ${color};` : null;
33
+ })
34
+ .join("\n")}
35
+ }
36
+ `)
37
+ .join("\n"),
38
+ } }));
39
+ };
40
+ const ChartTooltip = RechartsPrimitive.Tooltip;
41
+ const ChartTooltipContent = React.forwardRef(({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }, ref) => {
42
+ const { config } = useChart();
43
+ const tooltipLabel = React.useMemo(() => {
44
+ if (hideLabel || !payload?.length) {
45
+ return null;
46
+ }
47
+ const [item] = payload;
48
+ const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
49
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
50
+ const value = !labelKey && typeof label === "string"
51
+ ? config[label]?.label || label
52
+ : itemConfig?.label;
53
+ if (labelFormatter) {
54
+ return (_jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) }));
55
+ }
56
+ if (!value) {
57
+ return null;
58
+ }
59
+ return _jsx("div", { className: cn("font-medium", labelClassName), children: value });
60
+ }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
61
+ if (!active || !payload?.length) {
62
+ return null;
63
+ }
64
+ const nestLabel = payload.length === 1 && indicator !== "dot";
65
+ return (_jsxs("div", { ref: ref, className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
66
+ .filter((item) => item.type !== "none")
67
+ .map((item, index) => {
68
+ const key = `${nameKey || item.name || item.dataKey || "value"}`;
69
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
70
+ const indicatorColor = color || item.payload.fill || item.color;
71
+ return (_jsx("div", { className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
72
+ "h-2.5 w-2.5": indicator === "dot",
73
+ "w-1": indicator === "line",
74
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
75
+ "my-0.5": nestLabel && indicator === "dashed",
76
+ }), style: {
77
+ "--color-bg": indicatorColor,
78
+ "--color-border": indicatorColor,
79
+ } }))), _jsxs("div", { className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })] }), item.value && (_jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() }))] })] })) }, item.dataKey));
80
+ }) })] }));
81
+ });
82
+ ChartTooltipContent.displayName = "ChartTooltip";
83
+ const ChartLegend = RechartsPrimitive.Legend;
84
+ const ChartLegendContent = React.forwardRef(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
85
+ const { config } = useChart();
86
+ if (!payload?.length) {
87
+ return null;
88
+ }
89
+ return (_jsx("div", { ref: ref, className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className), children: payload
90
+ .filter((item) => item.type !== "none")
91
+ .map((item) => {
92
+ const key = `${nameKey || item.dataKey || "value"}`;
93
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
94
+ return (_jsxs("div", { className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (_jsx("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: {
95
+ backgroundColor: item.color,
96
+ } })), itemConfig?.label] }, item.value));
97
+ }) }));
98
+ });
99
+ ChartLegendContent.displayName = "ChartLegend";
100
+ function getPayloadConfigFromPayload(config, payload, key) {
101
+ if (typeof payload !== "object" || payload === null) {
102
+ return undefined;
103
+ }
104
+ const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null
105
+ ? payload.payload
106
+ : undefined;
107
+ let configLabelKey = key;
108
+ if (key in payload && typeof payload[key] === "string") {
109
+ configLabelKey = payload[key];
110
+ }
111
+ else if (payloadPayload &&
112
+ key in payloadPayload &&
113
+ typeof payloadPayload[key] === "string") {
114
+ configLabelKey = payloadPayload[key];
115
+ }
116
+ return configLabelKey in config ? config[configLabelKey] : config[key];
117
+ }
118
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Checkbox };
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
4
+ import { Check, Minus } from "lucide-react";
5
+ import { cn } from "../lib/class-names.js";
6
+ // `checked="indeterminate"` (e.g. a tree node whose children are only partially selected) used to
7
+ // render the same checkmark as `checked={true}` — indistinguishable from "fully selected", which
8
+ // defeats the point of an indeterminate state. Now shows a dash instead, the standard convention.
9
+ const Checkbox = React.forwardRef(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center text-current"), children: props.checked === "indeterminate" ? (_jsx(Minus, { className: "h-4 w-4" })) : (_jsx(Check, { className: "h-4 w-4" })) }) })));
10
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
11
+ export { Checkbox };
@@ -0,0 +1,5 @@
1
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
+ declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
4
+ declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,5 @@
1
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
+ const Collapsible = CollapsiblePrimitive.Root;
3
+ const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
4
+ const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,24 @@
1
+ import * as React from "react";
2
+ export interface ComboboxOption {
3
+ value: string;
4
+ label: string;
5
+ keywords?: string;
6
+ disabled?: boolean;
7
+ /** Second line under the label, muted. Usually the reason a disabled option is disabled. */
8
+ hint?: string;
9
+ }
10
+ export declare function Combobox({ value, onValueChange, options, placeholder, searchPlaceholder, emptyText, disabled, invalid, className, contentClassName, id, ariaLabel, }: {
11
+ value: string | null | undefined;
12
+ onValueChange: (value: string) => void;
13
+ options: ComboboxOption[];
14
+ placeholder?: string;
15
+ searchPlaceholder?: string;
16
+ emptyText?: string;
17
+ disabled?: boolean;
18
+ invalid?: boolean;
19
+ className?: string;
20
+ contentClassName?: string;
21
+ /** Usually left off: inside a Field the id comes from the surrounding field. */
22
+ id?: string;
23
+ ariaLabel?: string;
24
+ }): React.JSX.Element;
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Check, ChevronsUpDown } from "lucide-react";
5
+ import { cn } from "../lib/class-names.js";
6
+ import { Button } from "./button.js";
7
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
8
+ import { useFieldId } from "./field-context.js";
9
+ import { Command, CommandEmpty, CommandInput, CommandItem, CommandList, } from "./command.js";
10
+ export function Combobox({ value, onValueChange, options, placeholder, searchPlaceholder, emptyText, disabled, invalid, className, contentClassName, id, ariaLabel, }) {
11
+ const [open, setOpen] = React.useState(false);
12
+ // The trigger IS the control here, so it carries the id the sibling Label points at. Without it
13
+ // a screen reader reads this dropdown as an unnamed combobox.
14
+ const fieldId = useFieldId();
15
+ // Scrolling the option list inside a Dialog.
16
+ //
17
+ // Radix Dialog locks scrolling to its own content subtree: it wraps DialogContent in
18
+ // react-remove-scroll with `shards: [contentRef]`, and wheel events whose target sits outside
19
+ // that subtree get swallowed. Our PopoverContent is portalled to the body, so it IS outside, and
20
+ // the list refuses to scroll with the wheel. Keyboard navigation still works, which is why the
21
+ // bug looks like "the dropdown is broken" rather than "the page is locked".
22
+ //
23
+ // A modal popover installs its own scroll lock and becomes the innermost one, so its content
24
+ // scrolls again. That is Radix's intended answer here.
25
+ //
26
+ // Applied ONLY inside a dialog. Modal everywhere would lock page scroll while any dropdown is
27
+ // open and swallow the first click on the next control, which on a filter bar with several
28
+ // dropdowns side by side is a worse bug than the one being fixed. Whether this combobox sits in
29
+ // a dialog cannot change after mount, so it is detected once.
30
+ const triggerRef = React.useRef(null);
31
+ const [inDialog, setInDialog] = React.useState(false);
32
+ React.useEffect(() => {
33
+ setInDialog(!!triggerRef.current?.closest('[role="dialog"], [role="alertdialog"]'));
34
+ }, []);
35
+ const selected = options.find((o) => o.value === value) ?? null;
36
+ // cmdk matches its highlighted value against each CommandItem's value string, so build the
37
+ // selected option's composite the same way the items below do.
38
+ const selectedValue = selected
39
+ ? `${selected.label} ${selected.keywords ?? ""} ${selected.value}`
40
+ : "";
41
+ // Drive cmdk's highlight so the list opens scrolled to the current selection (empty = top of list).
42
+ const [highlighted, setHighlighted] = React.useState(selectedValue);
43
+ return (_jsxs(Popover, { open: open, modal: inDialog, onOpenChange: (o) => {
44
+ setOpen(o);
45
+ if (o)
46
+ setHighlighted(selectedValue);
47
+ }, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { ref: triggerRef, id: id ?? fieldId ?? undefined, type: "button", variant: "outline", role: "combobox", "aria-label": ariaLabel, "aria-expanded": open, "aria-invalid": invalid, disabled: disabled, title: selected ? selected.label : undefined, className: cn("h-9 w-full cursor-pointer justify-between whitespace-nowrap px-3 py-2 text-left font-normal shadow-none", !selected && "text-muted-foreground", invalid && "border-destructive focus-visible:ring-destructive/30", className), children: [_jsx("span", { className: "min-w-0 truncate", children: selected ? selected.label : (placeholder ?? "Select …") }), _jsx(ChevronsUpDown, { className: "ml-2 size-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { align: "start", className: cn("w-[var(--radix-popover-trigger-width)] p-0", contentClassName), children: _jsxs(Command, { value: highlighted, onValueChange: setHighlighted, filter: (itemValue, search) => itemValue.toLowerCase().includes(search.toLowerCase()) ? 1 : 0, children: [_jsx(CommandInput, { placeholder: searchPlaceholder ?? "Search …" }), _jsxs(CommandList, { className: "scroll-py-3", children: [_jsx(CommandEmpty, { children: emptyText ?? "No match found." }), options.map((opt) => (_jsxs(CommandItem, {
48
+ // cmdk matches + dedupes on this string; include label + keywords + value.
49
+ value: `${opt.label} ${opt.keywords ?? ""} ${opt.value}`, disabled: opt.disabled, onSelect: () => {
50
+ if (opt.disabled)
51
+ return;
52
+ onValueChange(opt.value);
53
+ setOpen(false);
54
+ }, className: cn("whitespace-normal data-[selected=true]:bg-accent", opt.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"), children: [_jsx(Check, { className: cn("size-4 shrink-0", value === opt.value ? "opacity-100 text-brand" : "opacity-0") }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: cn("block", value === opt.value && "font-medium text-brand"), children: opt.label }), opt.hint && (_jsx("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: opt.hint }))] })] }, opt.value)))] })] }) })] }));
55
+ }
@@ -0,0 +1,80 @@
1
+ import * as React from "react";
2
+ import { type DialogProps } from "@radix-ui/react-dialog";
3
+ declare const Command: React.ForwardRefExoticComponent<Omit<{
4
+ children?: React.ReactNode;
5
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
6
+ ref?: React.Ref<HTMLDivElement>;
7
+ } & {
8
+ asChild?: boolean;
9
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
10
+ label?: string;
11
+ shouldFilter?: boolean;
12
+ filter?: (value: string, search: string, keywords?: string[]) => number;
13
+ defaultValue?: string;
14
+ value?: string;
15
+ onValueChange?: (value: string) => void;
16
+ loop?: boolean;
17
+ disablePointerSelection?: boolean;
18
+ vimBindings?: boolean;
19
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ declare const CommandDialog: ({ children, ...props }: DialogProps) => React.JSX.Element;
21
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
22
+ ref?: React.Ref<HTMLInputElement>;
23
+ } & {
24
+ asChild?: boolean;
25
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
26
+ value?: string;
27
+ onValueChange?: (search: string) => void;
28
+ } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
29
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
30
+ children?: React.ReactNode;
31
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
32
+ ref?: React.Ref<HTMLDivElement>;
33
+ } & {
34
+ asChild?: boolean;
35
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
36
+ label?: string;
37
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
38
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
39
+ children?: React.ReactNode;
40
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
41
+ ref?: React.Ref<HTMLDivElement>;
42
+ } & {
43
+ asChild?: boolean;
44
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
46
+ children?: React.ReactNode;
47
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
48
+ ref?: React.Ref<HTMLDivElement>;
49
+ } & {
50
+ asChild?: boolean;
51
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
52
+ heading?: React.ReactNode;
53
+ value?: string;
54
+ forceMount?: boolean;
55
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
57
+ ref?: React.Ref<HTMLDivElement>;
58
+ } & {
59
+ asChild?: boolean;
60
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
61
+ alwaysRender?: boolean;
62
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
63
+ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
64
+ children?: React.ReactNode;
65
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
66
+ ref?: React.Ref<HTMLDivElement>;
67
+ } & {
68
+ asChild?: boolean;
69
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
70
+ disabled?: boolean;
71
+ onSelect?: (value: string) => void;
72
+ value?: string;
73
+ keywords?: string[];
74
+ forceMount?: boolean;
75
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
76
+ declare const CommandShortcut: {
77
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
78
+ displayName: string;
79
+ };
80
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Command as CommandPrimitive } from "cmdk";
5
+ import { Search } from "lucide-react";
6
+ import { cn } from "../lib/class-names.js";
7
+ import { Dialog, DialogContent } from "./dialog.js";
8
+ const Command = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive, { ref: ref, className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className), ...props })));
9
+ Command.displayName = CommandPrimitive.displayName;
10
+ const CommandDialog = ({ children, ...props }) => {
11
+ return (_jsx(Dialog, { ...props, children: _jsx(DialogContent, { className: "overflow-hidden p-0", children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) }) }));
12
+ };
13
+ const CommandInput = React.forwardRef(({ className, ...props }, ref) => (_jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [_jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { ref: ref, className: cn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] })));
14
+ CommandInput.displayName = CommandPrimitive.Input.displayName;
15
+ const CommandList = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.List, { ref: ref, className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className), ...props })));
16
+ CommandList.displayName = CommandPrimitive.List.displayName;
17
+ const CommandEmpty = React.forwardRef((props, ref) => (_jsx(CommandPrimitive.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props })));
18
+ CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
19
+ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Group, { ref: ref, className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className), ...props })));
20
+ CommandGroup.displayName = CommandPrimitive.Group.displayName;
21
+ const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Separator, { ref: ref, className: cn("-mx-1 h-px bg-border", className), ...props })));
22
+ CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
23
+ const CommandItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props })));
24
+ CommandItem.displayName = CommandPrimitive.Item.displayName;
25
+ const CommandShortcut = ({ className, ...props }) => {
26
+ return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
27
+ };
28
+ CommandShortcut.displayName = "CommandShortcut";
29
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogHeader: {
10
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const DialogFooter: {
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
+ export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
5
+ import { X } from "lucide-react";
6
+ import { cn } from "../lib/class-names.js";
7
+ const Dialog = DialogPrimitive.Root;
8
+ const DialogTrigger = DialogPrimitive.Trigger;
9
+ const DialogPortal = DialogPrimitive.Portal;
10
+ const DialogClose = DialogPrimitive.Close;
11
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn(
12
+ // Scrim, not a blackout. bg-black/80 rendered a white page behind the modal as #333, so the
13
+ // app stopped being visible at all and a dialog read as a page change rather than as
14
+ // something sitting on top of what you were doing. Half strength plus a 2px blur keeps the
15
+ // context readable and still pushes it back.
16
+ "fixed inset-0 z-50 bg-black/50 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
17
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
18
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn(
19
+ // grid-cols-[minmax(0,1fr)], not the plain implicit column `grid` alone: a grid item's
20
+ // default min-width is `auto` (its own content's min-content size), not 0. Any dialog
21
+ // whose body contains one long unbreakable run of text — a Combobox showing a long
22
+ // selected option, here — silently stretched every row (header, footer, every field) out
23
+ // to match that one row's intrinsic width, pushing the whole dialog past the viewport on
24
+ // a phone even though `w-full max-w-lg` looks like it should have capped it. minmax(0,1fr)
25
+ // forces the track's minimum to 0 instead, so children truncate/wrap as their own classes
26
+ // already say to, rather than the grid silently overriding that.
27
+ //
28
+ // w-[calc(100%-2rem)], not w-full: `fixed` positioning's containing block is the viewport,
29
+ // so w-full was 100% of the SCREEN width — the dialog's own edge touched the screen edge
30
+ // on every phone width, regardless of max-w-lg (which only ever caps the upper end). The
31
+ // calc leaves a fixed 1rem gutter on each side at any width; max-w-lg still wins once the
32
+ // viewport is wide enough for it to be the smaller value.
33
+ // rounded-lg unconditionally, not sm:rounded-lg: that was deliberately square for the old
34
+ // edge-to-edge mobile layout (a rounded corner against a flush screen edge looks wrong).
35
+ // Now that w-[calc(100%-2rem)] above gives it a gutter on every width, it floats like a
36
+ // real card at every size and should read like one.
37
+ //
38
+ // max-h + overflow-y-auto is the vertical half of that same gutter: a tall dialog (any of
39
+ // the multi-field forms here) otherwise ran off both ends of a phone screen with its own
40
+ // top and bottom edges cropped away, and no way to reach the footer buttons. dvh, not vh,
41
+ // so the mobile browser's collapsing address bar doesn't push the footer out of reach.
42
+ "fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-lg grid-cols-[minmax(0,1fr)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
43
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
44
+ const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
45
+ DialogHeader.displayName = "DialogHeader";
46
+ const DialogFooter = ({ className, ...props }) => (
47
+ // Row + right-aligned + gap on every width, not just sm: and up — the old `flex-col-reverse`
48
+ // mobile default stacked the buttons with no vertical gap between them at all (nothing filled
49
+ // in for `sm:space-x-2` below that breakpoint), so they visually touched. flex-wrap is a safety
50
+ // net for a phone narrow enough that two full-width-ish buttons can't share one line — they drop
51
+ // to a second row instead of overflowing, still with the same gap.
52
+ _jsx("div", { className: cn("flex flex-row flex-wrap justify-end gap-2", className), ...props }));
53
+ DialogFooter.displayName = "DialogFooter";
54
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
55
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
56
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
57
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
58
+ export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
5
+ import { Check, ChevronRight, Circle } from "lucide-react";
6
+ import { cn } from "../lib/class-names.js";
7
+ const DropdownMenu = DropdownMenuPrimitive.Root;
8
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
9
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
10
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
11
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
12
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
13
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto" })] })));
14
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
15
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-(--radix-dropdown-menu-content-transform-origin)", className), ...props })));
16
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
17
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-(--radix-dropdown-menu-content-transform-origin)", className), ...props }) })));
18
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
19
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className), ...props })));
20
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
21
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
22
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
23
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
24
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
25
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
26
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
27
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
28
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
29
+ const DropdownMenuShortcut = ({ className, ...props }) => {
30
+ return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props }));
31
+ };
32
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
33
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ export declare const FieldContext: React.Context<string | null>;
3
+ /** The generated control id for the surrounding Field, or null outside one. */
4
+ export declare function useFieldId(): string | null;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export const FieldContext = React.createContext(null);
3
+ /** The generated control id for the surrounding Field, or null outside one. */
4
+ export function useFieldId() {
5
+ return React.useContext(FieldContext);
6
+ }
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare const Field: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ export { Field };
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { FieldContext } from "./field-context.js";
4
+ const Field = React.forwardRef(function Field({ children, ...props }, ref) {
5
+ const id = React.useId();
6
+ return (_jsx(FieldContext.Provider, { value: id, children: _jsx("div", { ref: ref, ...props, children: children }) }));
7
+ });
8
+ export { Field };
@@ -0,0 +1,3 @@
1
+ export declare const IconAction: import("react").ForwardRefExoticComponent<Omit<import("./button").ButtonProps & import("react").RefAttributes<HTMLButtonElement> & {
2
+ label: string;
3
+ }, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { Button } from "./button.js";
4
+ import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
5
+ // An icon-only button with a visible tooltip, so the icon is never a guessing game.
6
+ export const IconAction = forwardRef(function IconAction({ label, children, ...props }, ref) {
7
+ return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { ref: ref, variant: "ghost", size: "icon", "aria-label": label, ...props, children: children }) }), _jsx(TooltipContent, { children: label })] }));
8
+ });
@@ -0,0 +1,32 @@
1
+ export * from "./alert-dialog";
2
+ export * from "./badge";
3
+ export * from "./button";
4
+ export * from "./card";
5
+ export * from "./checkbox";
6
+ export * from "./combobox";
7
+ export * from "./command";
8
+ export * from "./dialog";
9
+ export * from "./dropdown-menu";
10
+ export * from "./field";
11
+ export * from "./field-context";
12
+ export * from "./input";
13
+ export * from "./label";
14
+ export * from "./popover";
15
+ export * from "./scroll-area";
16
+ export * from "./select";
17
+ export * from "./separator";
18
+ export * from "./skeleton";
19
+ export * from "./switch";
20
+ export * from "./table";
21
+ export * from "./tabs";
22
+ export * from "./textarea";
23
+ export * from "./tooltip";
24
+ export * from "./sheet";
25
+ export * from "./calendar";
26
+ export * from "./chart";
27
+ export * from "./multi-combobox";
28
+ export * from "./sidebar";
29
+ export * from "./breadcrumb";
30
+ export * from "./collapsible";
31
+ export * from "./sonner";
32
+ export { IconAction } from "./icon-action";
@@ -0,0 +1,32 @@
1
+ export * from "./alert-dialog.js";
2
+ export * from "./badge.js";
3
+ export * from "./button.js";
4
+ export * from "./card.js";
5
+ export * from "./checkbox.js";
6
+ export * from "./combobox.js";
7
+ export * from "./command.js";
8
+ export * from "./dialog.js";
9
+ export * from "./dropdown-menu.js";
10
+ export * from "./field.js";
11
+ export * from "./field-context.js";
12
+ export * from "./input.js";
13
+ export * from "./label.js";
14
+ export * from "./popover.js";
15
+ export * from "./scroll-area.js";
16
+ export * from "./select.js";
17
+ export * from "./separator.js";
18
+ export * from "./skeleton.js";
19
+ export * from "./switch.js";
20
+ export * from "./table.js";
21
+ export * from "./tabs.js";
22
+ export * from "./textarea.js";
23
+ export * from "./tooltip.js";
24
+ export * from "./sheet.js";
25
+ export * from "./calendar.js";
26
+ export * from "./chart.js";
27
+ export * from "./multi-combobox.js";
28
+ export * from "./sidebar.js";
29
+ export * from "./breadcrumb.js";
30
+ export * from "./collapsible.js";
31
+ export * from "./sonner.js";
32
+ export { IconAction } from "./icon-action.js";