@eifi1/ui-kit 0.10.0 → 0.12.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 (382) hide show
  1. package/README.md +66 -37
  2. package/dist/chart.d.ts +3 -1
  3. package/dist/chart.js +2 -0
  4. package/dist/chart.js.map +1 -1
  5. package/dist/components/account-settings-labels.d.ts +105 -0
  6. package/dist/components/account-settings-labels.js +81 -0
  7. package/dist/components/account-settings-labels.js.map +1 -0
  8. package/dist/components/account-settings.d.ts +36 -52
  9. package/dist/components/account-settings.js +44 -8
  10. package/dist/components/account-settings.js.map +1 -1
  11. package/dist/components/alert-banner.d.ts +26 -1
  12. package/dist/components/alert-banner.js +10 -7
  13. package/dist/components/alert-banner.js.map +1 -1
  14. package/dist/components/amount-input.d.ts +26 -4
  15. package/dist/components/amount-input.js +5 -2
  16. package/dist/components/amount-input.js.map +1 -1
  17. package/dist/components/authed-image.d.ts +68 -0
  18. package/dist/components/authed-image.js +117 -0
  19. package/dist/components/authed-image.js.map +1 -0
  20. package/dist/components/breadcrumbs.d.ts +2 -1
  21. package/dist/components/breadcrumbs.js +5 -2
  22. package/dist/components/breadcrumbs.js.map +1 -1
  23. package/dist/components/bulk-action-bar.d.ts +51 -5
  24. package/dist/components/bulk-action-bar.js +88 -41
  25. package/dist/components/bulk-action-bar.js.map +1 -1
  26. package/dist/components/button-group.d.ts +107 -3
  27. package/dist/components/button-group.js +60 -5
  28. package/dist/components/button-group.js.map +1 -1
  29. package/dist/components/calculator.d.ts +17 -4
  30. package/dist/components/calendar-heatmap.d.ts +162 -0
  31. package/dist/components/calendar-heatmap.js +336 -0
  32. package/dist/components/calendar-heatmap.js.map +1 -0
  33. package/dist/components/chip.d.ts +2 -1
  34. package/dist/components/chip.js +6 -3
  35. package/dist/components/chip.js.map +1 -1
  36. package/dist/components/choice-card.d.ts +66 -2
  37. package/dist/components/choice-card.js +108 -1
  38. package/dist/components/choice-card.js.map +1 -1
  39. package/dist/components/combobox-core.js +2 -0
  40. package/dist/components/combobox-core.js.map +1 -1
  41. package/dist/components/combobox.d.ts +2 -2
  42. package/dist/components/combobox.js +31 -9
  43. package/dist/components/combobox.js.map +1 -1
  44. package/dist/components/copy-button.d.ts +52 -70
  45. package/dist/components/copy-button.js +1 -1
  46. package/dist/components/copy-button.js.map +1 -1
  47. package/dist/components/data-table-cells.d.ts +63 -0
  48. package/dist/components/data-table-cells.js +64 -0
  49. package/dist/components/data-table-cells.js.map +1 -0
  50. package/dist/components/data-table-filter-popover.d.ts +1 -1
  51. package/dist/components/data-table-filters.d.ts +1 -1
  52. package/dist/components/data-table-filters.js +31 -1
  53. package/dist/components/data-table-filters.js.map +1 -1
  54. package/dist/components/data-table-labels.d.ts +13 -0
  55. package/dist/components/data-table-labels.js +8 -1
  56. package/dist/components/data-table-labels.js.map +1 -1
  57. package/dist/components/data-table.d.ts +1 -1
  58. package/dist/components/data-table.js +104 -12
  59. package/dist/components/data-table.js.map +1 -1
  60. package/dist/components/date-picker.d.ts +3 -1
  61. package/dist/components/date-picker.js +15 -2
  62. package/dist/components/date-picker.js.map +1 -1
  63. package/dist/components/description-list.d.ts +23 -3
  64. package/dist/components/description-list.js +23 -3
  65. package/dist/components/description-list.js.map +1 -1
  66. package/dist/components/dialog-frame.d.ts +1 -0
  67. package/dist/components/entity-combobox.d.ts +1 -1
  68. package/dist/components/entity-combobox.js +18 -3
  69. package/dist/components/entity-combobox.js.map +1 -1
  70. package/dist/components/error-boundary.d.ts +92 -0
  71. package/dist/components/error-boundary.js +111 -0
  72. package/dist/components/error-boundary.js.map +1 -0
  73. package/dist/components/field.d.ts +69 -0
  74. package/dist/components/field.js +75 -0
  75. package/dist/components/field.js.map +1 -0
  76. package/dist/components/file-button.d.ts +51 -208
  77. package/dist/components/file-dropzone.d.ts +50 -2
  78. package/dist/components/floating-panel.d.ts +156 -4
  79. package/dist/components/floating-panel.js +193 -29
  80. package/dist/components/floating-panel.js.map +1 -1
  81. package/dist/components/form-actions.d.ts +53 -0
  82. package/dist/components/form-actions.js +98 -0
  83. package/dist/components/form-actions.js.map +1 -0
  84. package/dist/components/image-grid.d.ts +67 -0
  85. package/dist/components/image-grid.js +112 -0
  86. package/dist/components/image-grid.js.map +1 -0
  87. package/dist/components/lightbox.d.ts +104 -0
  88. package/dist/components/lightbox.js +229 -0
  89. package/dist/components/lightbox.js.map +1 -0
  90. package/dist/components/line-items.d.ts +114 -0
  91. package/dist/components/line-items.js +238 -0
  92. package/dist/components/line-items.js.map +1 -0
  93. package/dist/components/list.d.ts +37 -3
  94. package/dist/components/list.js +39 -14
  95. package/dist/components/list.js.map +1 -1
  96. package/dist/components/loading-state.d.ts +24 -0
  97. package/dist/components/loading-state.js +32 -0
  98. package/dist/components/loading-state.js.map +1 -0
  99. package/dist/components/menu-item.d.ts +13 -2
  100. package/dist/components/menu-item.js +11 -2
  101. package/dist/components/menu-item.js.map +1 -1
  102. package/dist/components/mini-calendar.d.ts +82 -5
  103. package/dist/components/mini-calendar.js +212 -64
  104. package/dist/components/mini-calendar.js.map +1 -1
  105. package/dist/components/modal.d.ts +20 -1
  106. package/dist/components/modal.js +26 -2
  107. package/dist/components/modal.js.map +1 -1
  108. package/dist/components/month-picker.d.ts +21 -1
  109. package/dist/components/month-picker.js +139 -26
  110. package/dist/components/month-picker.js.map +1 -1
  111. package/dist/components/multi-entity-combobox.d.ts +1 -1
  112. package/dist/components/multi-entity-combobox.js +19 -3
  113. package/dist/components/multi-entity-combobox.js.map +1 -1
  114. package/dist/components/nav-pills.d.ts +67 -0
  115. package/dist/components/nav-pills.js +69 -0
  116. package/dist/components/nav-pills.js.map +1 -0
  117. package/dist/components/number-field.d.ts +26 -5
  118. package/dist/components/number-field.js +5 -7
  119. package/dist/components/number-field.js.map +1 -1
  120. package/dist/components/number-input.d.ts +27 -5
  121. package/dist/components/number-input.js +7 -1
  122. package/dist/components/number-input.js.map +1 -1
  123. package/dist/components/numpad-sheet.d.ts +17 -4
  124. package/dist/components/passkeys-setting.d.ts +67 -0
  125. package/dist/components/passkeys-setting.js +214 -0
  126. package/dist/components/passkeys-setting.js.map +1 -0
  127. package/dist/components/picker-sheet.js +2 -1
  128. package/dist/components/picker-sheet.js.map +1 -1
  129. package/dist/components/pie-chart-labels.d.ts +20 -0
  130. package/dist/components/pie-chart-labels.js +12 -0
  131. package/dist/components/pie-chart-labels.js.map +1 -0
  132. package/dist/components/pie-chart.d.ts +101 -0
  133. package/dist/components/pie-chart.js +283 -0
  134. package/dist/components/pie-chart.js.map +1 -0
  135. package/dist/components/progress-bar.d.ts +73 -3
  136. package/dist/components/progress-bar.js +110 -8
  137. package/dist/components/progress-bar.js.map +1 -1
  138. package/dist/components/qr-code.d.ts +34 -0
  139. package/dist/components/qr-code.js +57 -0
  140. package/dist/components/qr-code.js.map +1 -0
  141. package/dist/components/search-field.d.ts +15 -3
  142. package/dist/components/search-field.js +5 -1
  143. package/dist/components/search-field.js.map +1 -1
  144. package/dist/components/series-chart.d.ts +16 -0
  145. package/dist/components/series-chart.js +4 -1
  146. package/dist/components/series-chart.js.map +1 -1
  147. package/dist/components/settings-fields.d.ts +50 -1
  148. package/dist/components/signed-amount.d.ts +121 -0
  149. package/dist/components/signed-amount.js +152 -0
  150. package/dist/components/signed-amount.js.map +1 -0
  151. package/dist/components/skeleton.d.ts +10 -3
  152. package/dist/components/skeleton.js +12 -2
  153. package/dist/components/skeleton.js.map +1 -1
  154. package/dist/components/stat-tile.d.ts +2 -1
  155. package/dist/components/stat-tile.js +5 -2
  156. package/dist/components/stat-tile.js.map +1 -1
  157. package/dist/components/status-dot.d.ts +6 -2
  158. package/dist/components/status-dot.js +6 -1
  159. package/dist/components/status-dot.js.map +1 -1
  160. package/dist/components/table.d.ts +77 -11
  161. package/dist/components/table.js +85 -17
  162. package/dist/components/table.js.map +1 -1
  163. package/dist/components/text-link.d.ts +176 -0
  164. package/dist/components/text-link.js +109 -0
  165. package/dist/components/text-link.js.map +1 -0
  166. package/dist/components/text.d.ts +8 -1
  167. package/dist/components/text.js +1 -0
  168. package/dist/components/text.js.map +1 -1
  169. package/dist/components/time-input.d.ts +50 -1
  170. package/dist/components/toggle-group.d.ts +28 -0
  171. package/dist/components/toggle-group.js +58 -9
  172. package/dist/components/toggle-group.js.map +1 -1
  173. package/dist/components/toggle-legend.d.ts +36 -3
  174. package/dist/components/toggle-legend.js +49 -0
  175. package/dist/components/toggle-legend.js.map +1 -1
  176. package/dist/components/tooltip.d.ts +11 -3
  177. package/dist/components/tooltip.js +2 -0
  178. package/dist/components/tooltip.js.map +1 -1
  179. package/dist/components/ui.d.ts +52 -729
  180. package/dist/components/ui.js +296 -27
  181. package/dist/components/ui.js.map +1 -1
  182. package/dist/components/use-table-state.d.ts +3 -52
  183. package/dist/components/use-table-state.js +128 -30
  184. package/dist/components/use-table-state.js.map +1 -1
  185. package/dist/components/user-avatar.d.ts +25 -3
  186. package/dist/components/user-avatar.js +32 -3
  187. package/dist/components/user-avatar.js.map +1 -1
  188. package/dist/{data-table-filters-Dh9uF_S-.d.ts → data-table-Drun8Fk9.d.ts} +305 -61
  189. package/dist/data-table.d.ts +2 -1
  190. package/dist/data-table.js +5 -1
  191. package/dist/data-table.js.map +1 -1
  192. package/dist/feedback/feedback-dialog.d.ts +26 -3
  193. package/dist/feedback/feedback-dialog.js +16 -2
  194. package/dist/feedback/feedback-dialog.js.map +1 -1
  195. package/dist/feedback/feedback-thread.d.ts +133 -0
  196. package/dist/feedback/feedback-thread.js +237 -0
  197. package/dist/feedback/feedback-thread.js.map +1 -0
  198. package/dist/feedback.d.ts +2 -1
  199. package/dist/feedback.js +1 -0
  200. package/dist/feedback.js.map +1 -1
  201. package/dist/hooks/use-authed-src.d.ts +71 -0
  202. package/dist/hooks/use-authed-src.js +63 -0
  203. package/dist/hooks/use-authed-src.js.map +1 -0
  204. package/dist/hooks/use-file-drop.d.ts +50 -2
  205. package/dist/hooks/use-hotkey.d.ts +59 -0
  206. package/dist/hooks/use-hotkey.js +105 -0
  207. package/dist/hooks/use-hotkey.js.map +1 -0
  208. package/dist/hooks/use-search-param-state.d.ts +83 -0
  209. package/dist/hooks/use-search-param-state.js +94 -0
  210. package/dist/hooks/use-search-param-state.js.map +1 -0
  211. package/dist/i18n/defaults.d.ts +17 -4
  212. package/dist/i18n/defaults.js +33 -1
  213. package/dist/i18n/defaults.js.map +1 -1
  214. package/dist/i18n/kit-labels.d.ts +47 -310
  215. package/dist/i18n/kit-labels.js +20 -5
  216. package/dist/i18n/kit-labels.js.map +1 -1
  217. package/dist/i18n/locales/de-CH-informal.d.ts +17 -4
  218. package/dist/i18n/locales/de-CH.d.ts +17 -4
  219. package/dist/i18n/locales/de-informal.d.ts +17 -4
  220. package/dist/i18n/locales/de.d.ts +17 -4
  221. package/dist/i18n/locales/de.js +165 -4
  222. package/dist/i18n/locales/de.js.map +1 -1
  223. package/dist/i18n/locales/es.d.ts +17 -4
  224. package/dist/i18n/locales/es.js +162 -4
  225. package/dist/i18n/locales/es.js.map +1 -1
  226. package/dist/i18n/locales/fr.d.ts +17 -4
  227. package/dist/i18n/locales/fr.js +162 -4
  228. package/dist/i18n/locales/fr.js.map +1 -1
  229. package/dist/i18n/locales/hu.d.ts +17 -4
  230. package/dist/i18n/locales/hu.js +162 -4
  231. package/dist/i18n/locales/hu.js.map +1 -1
  232. package/dist/i18n/locales/it.d.ts +17 -4
  233. package/dist/i18n/locales/it.js +162 -4
  234. package/dist/i18n/locales/it.js.map +1 -1
  235. package/dist/i18n/locales/zh.d.ts +17 -4
  236. package/dist/i18n/locales/zh.js +162 -4
  237. package/dist/i18n/locales/zh.js.map +1 -1
  238. package/dist/index.d.ts +45 -21
  239. package/dist/index.js +43 -1
  240. package/dist/index.js.map +1 -1
  241. package/dist/kit-labels-v3biUF1L.d.ts +1645 -0
  242. package/dist/lib/clipping.d.ts +21 -5
  243. package/dist/lib/clipping.js +3 -0
  244. package/dist/lib/clipping.js.map +1 -1
  245. package/dist/lib/dates.d.ts +17 -1
  246. package/dist/lib/dates.js +19 -0
  247. package/dist/lib/dates.js.map +1 -1
  248. package/dist/lib/format.d.ts +144 -0
  249. package/dist/lib/format.js +149 -0
  250. package/dist/lib/format.js.map +1 -0
  251. package/dist/lib/qr-encode.d.ts +44 -0
  252. package/dist/lib/qr-encode.js +338 -0
  253. package/dist/lib/qr-encode.js.map +1 -0
  254. package/dist/rhf/fields.d.ts +241 -0
  255. package/dist/rhf/fields.js +601 -0
  256. package/dist/rhf/fields.js.map +1 -0
  257. package/dist/rhf/form.d.ts +50 -1
  258. package/dist/rhf/line-items.d.ts +31 -0
  259. package/dist/rhf/line-items.js +59 -0
  260. package/dist/rhf/line-items.js.map +1 -0
  261. package/dist/rhf/use-rhf-wizard-step.d.ts +22 -0
  262. package/dist/rhf/use-rhf-wizard-step.js +38 -0
  263. package/dist/rhf/use-rhf-wizard-step.js.map +1 -0
  264. package/dist/rhf.d.ts +63 -1
  265. package/dist/rhf.js +3 -0
  266. package/dist/rhf.js.map +1 -1
  267. package/dist/shell/app-shell.d.ts +99 -2
  268. package/dist/shell/app-shell.js +58 -3
  269. package/dist/shell/app-shell.js.map +1 -1
  270. package/dist/shell/auth-layout.d.ts +74 -0
  271. package/dist/shell/auth-layout.js +97 -0
  272. package/dist/shell/auth-layout.js.map +1 -0
  273. package/dist/shell/top-bar-brand.d.ts +81 -0
  274. package/dist/shell/top-bar-brand.js +47 -0
  275. package/dist/shell/top-bar-brand.js.map +1 -0
  276. package/dist/shell/topbar-action-menu.d.ts +84 -3
  277. package/dist/shell/topbar-action-menu.js +115 -27
  278. package/dist/shell/topbar-action-menu.js.map +1 -1
  279. package/dist/shell.d.ts +58 -2
  280. package/dist/shell.js +2 -0
  281. package/dist/shell.js.map +1 -1
  282. package/dist/wizard/stepper-nav.d.ts +49 -1
  283. package/dist/wizard/wizard-context.d.ts +30 -1
  284. package/dist/wizard/wizard-context.js +23 -2
  285. package/dist/wizard/wizard-context.js.map +1 -1
  286. package/dist/wizard/wizard-step.d.ts +20 -5
  287. package/dist/wizard/wizard-step.js +16 -3
  288. package/dist/wizard/wizard-step.js.map +1 -1
  289. package/dist/wizard.d.ts +51 -3
  290. package/package.json +1 -1
  291. package/src/chart.ts +4 -0
  292. package/src/components/account-settings-labels.ts +190 -0
  293. package/src/components/account-settings.tsx +110 -63
  294. package/src/components/alert-banner.tsx +36 -7
  295. package/src/components/amount-input.tsx +13 -1
  296. package/src/components/authed-image.tsx +190 -0
  297. package/src/components/breadcrumbs.tsx +8 -2
  298. package/src/components/bulk-action-bar.tsx +163 -57
  299. package/src/components/button-group.tsx +129 -4
  300. package/src/components/calendar-heatmap.tsx +599 -0
  301. package/src/components/chip.tsx +8 -4
  302. package/src/components/choice-card.tsx +208 -1
  303. package/src/components/combobox-core.tsx +5 -0
  304. package/src/components/combobox.tsx +31 -9
  305. package/src/components/copy-button.tsx +3 -2
  306. package/src/components/data-table-cells.tsx +119 -0
  307. package/src/components/data-table-filters.ts +77 -0
  308. package/src/components/data-table-labels.ts +23 -0
  309. package/src/components/data-table.tsx +231 -13
  310. package/src/components/date-picker.tsx +19 -3
  311. package/src/components/description-list.tsx +52 -3
  312. package/src/components/entity-combobox.tsx +18 -3
  313. package/src/components/error-boundary.tsx +216 -0
  314. package/src/components/field.tsx +188 -0
  315. package/src/components/floating-panel.tsx +380 -16
  316. package/src/components/form-actions.tsx +191 -0
  317. package/src/components/image-grid.tsx +181 -0
  318. package/src/components/lightbox.tsx +374 -0
  319. package/src/components/line-items.tsx +385 -0
  320. package/src/components/list.tsx +93 -18
  321. package/src/components/loading-state.tsx +47 -0
  322. package/src/components/menu-item.tsx +29 -3
  323. package/src/components/mini-calendar.tsx +317 -57
  324. package/src/components/modal.tsx +61 -3
  325. package/src/components/month-picker.tsx +181 -26
  326. package/src/components/multi-entity-combobox.tsx +19 -3
  327. package/src/components/nav-pills.tsx +152 -0
  328. package/src/components/number-field.tsx +15 -10
  329. package/src/components/number-input.tsx +16 -1
  330. package/src/components/passkeys-setting.tsx +331 -0
  331. package/src/components/picker-sheet.tsx +7 -1
  332. package/src/components/pie-chart-labels.ts +32 -0
  333. package/src/components/pie-chart.tsx +479 -0
  334. package/src/components/progress-bar.tsx +241 -13
  335. package/src/components/qr-code.tsx +83 -0
  336. package/src/components/search-field.tsx +20 -4
  337. package/src/components/series-chart.tsx +21 -0
  338. package/src/components/signed-amount.tsx +286 -0
  339. package/src/components/skeleton.tsx +21 -3
  340. package/src/components/stat-tile.tsx +8 -2
  341. package/src/components/status-dot.tsx +10 -2
  342. package/src/components/table.tsx +186 -23
  343. package/src/components/text-link.tsx +248 -0
  344. package/src/components/text.tsx +9 -1
  345. package/src/components/toggle-group.tsx +106 -13
  346. package/src/components/toggle-legend.tsx +87 -2
  347. package/src/components/tooltip.tsx +17 -3
  348. package/src/components/ui.tsx +572 -44
  349. package/src/components/use-table-state.ts +265 -33
  350. package/src/components/user-avatar.tsx +57 -3
  351. package/src/data-table.ts +10 -0
  352. package/src/feedback/feedback-dialog.tsx +42 -3
  353. package/src/feedback/feedback-thread.tsx +434 -0
  354. package/src/feedback.ts +1 -0
  355. package/src/hooks/use-authed-src.ts +161 -0
  356. package/src/hooks/use-hotkey.ts +172 -0
  357. package/src/hooks/use-search-param-state.ts +187 -0
  358. package/src/i18n/defaults.ts +32 -0
  359. package/src/i18n/kit-labels.tsx +104 -8
  360. package/src/i18n/locales/de.ts +162 -0
  361. package/src/i18n/locales/es.ts +159 -0
  362. package/src/i18n/locales/fr.ts +162 -0
  363. package/src/i18n/locales/hu.ts +160 -0
  364. package/src/i18n/locales/it.ts +160 -0
  365. package/src/i18n/locales/zh.ts +159 -0
  366. package/src/index.ts +64 -0
  367. package/src/lib/clipping.ts +22 -4
  368. package/src/lib/dates.ts +37 -0
  369. package/src/lib/format.ts +325 -0
  370. package/src/lib/qr-encode.ts +420 -0
  371. package/src/rhf/fields.tsx +1054 -0
  372. package/src/rhf/line-items.tsx +130 -0
  373. package/src/rhf/use-rhf-wizard-step.ts +113 -0
  374. package/src/rhf.ts +8 -0
  375. package/src/shell/app-shell.tsx +147 -2
  376. package/src/shell/auth-layout.tsx +190 -0
  377. package/src/shell/top-bar-brand.tsx +76 -0
  378. package/src/shell/topbar-action-menu.tsx +260 -49
  379. package/src/shell.ts +2 -0
  380. package/src/wizard/wizard-context.tsx +50 -1
  381. package/src/wizard/wizard-step.tsx +43 -6
  382. package/tokens.css +12 -0
@@ -0,0 +1,81 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { ay as KitLinkProps, ax as KitLinkComponent } from '../kit-labels-v3biUF1L.js';
4
+ import '../components/data-table-labels.js';
5
+ import '../components/mini-calendar.js';
6
+ import '../components/calendar-heatmap.js';
7
+ import '../components/popover.js';
8
+ import '../components/chip.js';
9
+ import 'lucide-react';
10
+ import '../components/field-sync.js';
11
+ import '../components/tooltip.js';
12
+ import '../hooks/use-anchored-rect.js';
13
+ import '../lib/clipping.js';
14
+ import '../wizard/types.js';
15
+ import '../tour/tour.js';
16
+ import '../search/command-palette.js';
17
+ import '../search/global-search.js';
18
+ import '../search/search-index.js';
19
+ import '../components/month-picker.js';
20
+ import '../components/page-contents.js';
21
+ import '../components/series-chart-labels.js';
22
+ import '../components/pie-chart-labels.js';
23
+ import '../components/sparkline.js';
24
+ import '../components/stat-tile.js';
25
+ import '../components/signature-pad.js';
26
+ import '../components/password-strength.js';
27
+ import '../components/danger-confirm.js';
28
+ import '../components/swatch-picker.js';
29
+ import '../components/tile-radio.js';
30
+ import '../components/icon-picker.js';
31
+ import '../components/dialog-frame.js';
32
+ import '../components/modal.js';
33
+ import '../hooks/use-search-param-state.js';
34
+ import '../components/measured-grid.js';
35
+ import '../feedback/feedback-attachment.js';
36
+ import '../feedback/feedback-dialog.js';
37
+ import '../feedback/feedback-thread.js';
38
+ import '../feedback/feedback-inbox.js';
39
+ import '../components/account-settings-labels.js';
40
+ import '../components/confirm-dialog.js';
41
+ import '../components/floating-panel.js';
42
+ import '../components/bulk-action-bar.js';
43
+ import '../components/list.js';
44
+ import '../components/breadcrumbs.js';
45
+ import '../components/toast.js';
46
+ import '../components/description-list.js';
47
+ import '../components/line-items.js';
48
+ import '../components/progress-bar.js';
49
+ import '../components/signed-amount.js';
50
+ import '../components/error-boundary.js';
51
+ import '../components/authed-image.js';
52
+ import '../hooks/use-authed-src.js';
53
+ import '../components/image-grid.js';
54
+ import '../components/lightbox.js';
55
+
56
+ interface TopBarBrandProps extends Omit<KitLinkProps, "href" | "children"> {
57
+ /** The brand mark — an SVG, sized by the caller or `h-6 w-auto` by default. */
58
+ logo: ReactNode;
59
+ /** The product name beside the logo, and the link's accessible name. */
60
+ name: ReactNode;
61
+ /** Where the brand links to. Default `/`. */
62
+ to?: string;
63
+ /** Hide the name below `sm` (default) or `md`; `false` always shows it. It is
64
+ * visually hidden, not removed, so the link keeps its name on a phone. */
65
+ collapseBelow?: "sm" | "md" | false;
66
+ /** The app's router link for this one link. Default: the provider's
67
+ * `linkComponent`, else react-router's `Link`. */
68
+ renderLink?: KitLinkComponent;
69
+ }
70
+ /**
71
+ * The top bar's home link: logo + product name, collapsing to the logo on a phone.
72
+ * Pass it as {@link TopBar}'s `brand`.
73
+ *
74
+ * kastlan's (top-bar.tsx:66) hid nothing and truncated the name instead — on a phone
75
+ * with five actions that left "Ka…" beside the logo — and needed an `aria-label`
76
+ * because the name could be cut. Here the name is `sr-only` below the breakpoint, so
77
+ * the logo is the whole visible link there and the name is still what it is called.
78
+ */
79
+ declare function TopBarBrand({ logo, name, to, collapseBelow, renderLink, className, ...rest }: TopBarBrandProps): react.JSX.Element;
80
+
81
+ export { TopBarBrand, type TopBarBrandProps };
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Link as RouterLink } from "react-router";
4
+ import { cn } from "../lib/cn.js";
5
+ import { useKitLink } from "../i18n/kit-labels.js";
6
+ import { pickLinkRenderer } from "../components/text-link.js";
7
+ const routerLink = ({ href, ...p }) => /* @__PURE__ */ jsx(RouterLink, { to: href, ...p });
8
+ const plainLink = ({ children, ...p }) => /* @__PURE__ */ jsx("a", { ...p, children });
9
+ const COLLAPSE = {
10
+ sm: "sr-only sm:not-sr-only sm:truncate",
11
+ md: "sr-only md:not-sr-only md:truncate"
12
+ };
13
+ function TopBarBrand({
14
+ logo,
15
+ name,
16
+ to = "/",
17
+ collapseBelow = "sm",
18
+ renderLink,
19
+ className,
20
+ ...rest
21
+ }) {
22
+ const kitLink = useKitLink();
23
+ return /* @__PURE__ */ jsxs(
24
+ RenderedLink,
25
+ {
26
+ render: pickLinkRenderer(renderLink, kitLink ?? routerLink, to) ?? plainLink,
27
+ ...rest,
28
+ href: to,
29
+ className: cn(
30
+ // `relative` contains the sr-only name.
31
+ "relative flex min-w-0 items-center gap-2 rounded-md font-semibold text-[var(--text-primary)] hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand)]",
32
+ className
33
+ ),
34
+ children: [
35
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "flex shrink-0 items-center [&_svg]:h-6 [&_svg]:w-auto", children: logo }),
36
+ /* @__PURE__ */ jsx("span", { className: collapseBelow ? COLLAPSE[collapseBelow] : "truncate", children: name })
37
+ ]
38
+ }
39
+ );
40
+ }
41
+ function RenderedLink({ render, ...props }) {
42
+ return render(props);
43
+ }
44
+ export {
45
+ TopBarBrand
46
+ };
47
+ //# sourceMappingURL=top-bar-brand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/shell/top-bar-brand.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Link as RouterLink } from \"react-router\";\nimport { cn } from \"../lib/cn\";\nimport { useKitLink } from \"../i18n/kit-labels\";\nimport { pickLinkRenderer } from \"../components/text-link\";\nimport type { KitLinkComponent, KitLinkProps } from \"../i18n/kit-labels\";\n\nconst routerLink: KitLinkComponent = ({ href, ...p }) => <RouterLink to={href} {...p} />;\nconst plainLink: KitLinkComponent = ({ children, ...p }) => <a {...p}>{children}</a>;\n\n/** Below which width only the logo shows. The name stays in the link's accessible\n * name at every width. */\nconst COLLAPSE = {\n sm: \"sr-only sm:not-sr-only sm:truncate\",\n md: \"sr-only md:not-sr-only md:truncate\",\n} as const;\n\nexport interface TopBarBrandProps extends Omit<KitLinkProps, \"href\" | \"children\"> {\n /** The brand mark — an SVG, sized by the caller or `h-6 w-auto` by default. */\n logo: ReactNode;\n /** The product name beside the logo, and the link's accessible name. */\n name: ReactNode;\n /** Where the brand links to. Default `/`. */\n to?: string;\n /** Hide the name below `sm` (default) or `md`; `false` always shows it. It is\n * visually hidden, not removed, so the link keeps its name on a phone. */\n collapseBelow?: \"sm\" | \"md\" | false;\n /** The app's router link for this one link. Default: the provider's\n * `linkComponent`, else react-router's `Link`. */\n renderLink?: KitLinkComponent;\n}\n\n/**\n * The top bar's home link: logo + product name, collapsing to the logo on a phone.\n * Pass it as {@link TopBar}'s `brand`.\n *\n * kastlan's (top-bar.tsx:66) hid nothing and truncated the name instead — on a phone\n * with five actions that left \"Ka…\" beside the logo — and needed an `aria-label`\n * because the name could be cut. Here the name is `sr-only` below the breakpoint, so\n * the logo is the whole visible link there and the name is still what it is called.\n */\nexport function TopBarBrand({\n logo,\n name,\n to = \"/\",\n collapseBelow = \"sm\",\n renderLink,\n className,\n ...rest\n}: TopBarBrandProps) {\n const kitLink = useKitLink();\n return (\n <RenderedLink\n // The kit's one link rule (`pickLinkRenderer`): an external `to` or an in-page\n // `#anchor` is a plain `<a>`, never the router's link.\n render={pickLinkRenderer(renderLink, kitLink ?? routerLink, to) ?? plainLink}\n {...rest}\n href={to}\n className={cn(\n // `relative` contains the sr-only name.\n \"relative flex min-w-0 items-center gap-2 rounded-md font-semibold text-[var(--text-primary)] hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand)]\",\n className,\n )}\n >\n <span aria-hidden className=\"flex shrink-0 items-center [&_svg]:h-6 [&_svg]:w-auto\">\n {logo}\n </span>\n <span className={collapseBelow ? COLLAPSE[collapseBelow] : \"truncate\"}>{name}</span>\n </RenderedLink>\n );\n}\n\n/** Calls the link renderer as a component, so a router link's hooks are its own. */\nfunction RenderedLink({ render, ...props }: KitLinkProps & { render: KitLinkComponent }) {\n return render(props);\n}\n"],"mappings":";AAOyD,cA6CrD,YA7CqD;AANzD,SAAS,QAAQ,kBAAkB;AACnC,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AAGjC,MAAM,aAA+B,CAAC,EAAE,MAAM,GAAG,EAAE,MAAM,oBAAC,cAAW,IAAI,MAAO,GAAG,GAAG;AACtF,MAAM,YAA8B,CAAC,EAAE,UAAU,GAAG,EAAE,MAAM,oBAAC,OAAG,GAAG,GAAI,UAAS;AAIhF,MAAM,WAAW;AAAA,EACf,IAAI;AAAA,EACJ,IAAI;AACN;AA0BO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,KAAK;AAAA,EACL,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAqB;AACnB,QAAM,UAAU,WAAW;AAC3B,SACE;AAAA,IAAC;AAAA;AAAA,MAGC,QAAQ,iBAAiB,YAAY,WAAW,YAAY,EAAE,KAAK;AAAA,MAClE,GAAG;AAAA,MACJ,MAAM;AAAA,MACN,WAAW;AAAA;AAAA,QAET;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,4BAAC,UAAK,eAAW,MAAC,WAAU,yDACzB,gBACH;AAAA,QACA,oBAAC,UAAK,WAAW,gBAAgB,SAAS,aAAa,IAAI,YAAa,gBAAK;AAAA;AAAA;AAAA,EAC/E;AAEJ;AAGA,SAAS,aAAa,EAAE,QAAQ,GAAG,MAAM,GAAgD;AACvF,SAAO,OAAO,KAAK;AACrB;","names":[]}
@@ -1,11 +1,21 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
+ import { MenuItemTone } from '../components/menu-item.js';
4
+ import { UserAvatarBadge } from '../components/user-avatar.js';
5
+ import 'lucide-react';
6
+ import '../components/status-dot.js';
7
+ import '../components/progress-bar.js';
8
+ import '../components/chip.js';
3
9
 
4
10
  /**
5
11
  * One row of a {@link TopBarActionMenu}. An `action` (default) runs `onSelect`, a
6
12
  * `link` navigates via react-router, and a `divider` draws a rule. Non-divider
7
13
  * rows close the menu automatically when chosen. `kind` may be omitted for
8
14
  * actions, keeping the common case terse.
15
+ *
16
+ * The rows are {@link MenuItem}s, so they take its options: `tone: "danger"` for the
17
+ * log-out row, `checked` (+ `checkable`) for a choice, `current` for the link to the
18
+ * page already open, `disabled`.
9
19
  */
10
20
  type TopBarMenuEntry = {
11
21
  kind?: "action";
@@ -14,6 +24,12 @@ type TopBarMenuEntry = {
14
24
  label: ReactNode;
15
25
  trailing?: ReactNode;
16
26
  onSelect: () => void;
27
+ tone?: MenuItemTone;
28
+ /** Makes the row a choice (`menuitemradio`, or `menuitemcheckbox` with
29
+ * `checkable: "checkbox"`) and says whether it is chosen. */
30
+ checked?: boolean;
31
+ checkable?: "radio" | "checkbox";
32
+ disabled?: boolean;
17
33
  } | {
18
34
  kind: "link";
19
35
  key: string;
@@ -21,10 +37,28 @@ type TopBarMenuEntry = {
21
37
  label: ReactNode;
22
38
  trailing?: ReactNode;
23
39
  to: string;
40
+ tone?: MenuItemTone;
41
+ /** The link to the page already open: `aria-current="page"` and a check mark. */
42
+ current?: boolean;
43
+ disabled?: boolean;
24
44
  } | {
25
45
  kind: "divider";
26
46
  key: string;
27
47
  };
48
+ /**
49
+ * The non-interactive identity block at the top of an account menu — kastlan's name +
50
+ * role, keksdose's display name + email + role chip. It is text, not a `menuitem`: the
51
+ * arrow keys pass over it.
52
+ */
53
+ interface TopBarMenuHeader {
54
+ /** The first line — the user's name. */
55
+ title: ReactNode;
56
+ /** The muted second line — an email, a role. */
57
+ subtitle?: ReactNode;
58
+ /** Anything below — a role chip. A link or button here stays out of the arrow keys
59
+ * and in the Tab order, like the footer's. */
60
+ extra?: ReactNode;
61
+ }
28
62
  /**
29
63
  * A top-bar icon button that opens a {@link HoverMenu} of actions and/or links,
30
64
  * with an optional uppercase heading and divider rules. Generic glue over the
@@ -32,13 +66,60 @@ type TopBarMenuEntry = {
32
66
  * so those call sites describe their rows as data instead of rebuilding the
33
67
  * trigger + list markup. For a checkmarked value-switcher use
34
68
  * {@link OptionSwitcherMenu} instead.
69
+ *
70
+ * It is also the ACCOUNT menu kastlan and keksdose each hand-build on `HoverMenu`: a
71
+ * custom `trigger` (the avatar), a `header` (name + role / email), the rows, and a
72
+ * free-content `footer` (the legal links).
35
73
  */
36
- declare function TopBarActionMenu({ icon, ariaLabel, heading, entries, panelClassName, }: {
37
- icon: ReactNode;
74
+ declare function TopBarActionMenu({ icon, iconBadge, trigger, triggerClassName, ariaLabel, heading, header, entries, children, footer, footerLabel, align, panelClassName, }: {
75
+ /** The trigger's face for the usual icon button. Ignored when `trigger` is given. */
76
+ icon?: ReactNode;
77
+ /**
78
+ * A status dot in the top-end corner of `icon` — keksdose's unread-support dot on the
79
+ * feedback trigger. Like `UserAvatar`'s `badge`, its `label` joins the trigger's name
80
+ * ("Send feedback 2 unread"), so the dot is not something only the eye is told about.
81
+ * Ignored with `trigger`: give the face its own badge there.
82
+ */
83
+ iconBadge?: UserAvatarBadge | null;
84
+ /**
85
+ * A face of your own for the trigger — the account menu's `UserAvatar`. It is drawn
86
+ * INSIDE the kit's button, which keeps the wiring: `aria-haspopup`, `aria-expanded`,
87
+ * the toggle, the keyboard. `open` is there for a chevron that turns.
88
+ *
89
+ * The button is named by `ariaLabel` followed by any readable text in the face — a
90
+ * `UserAvatar` `badge` label reaches a screen reader that way ("Account menu 3
91
+ * unread"), where an `aria-label` on the button would have hidden it. A
92
+ * `UserAvatar`'s initials are `aria-hidden`, so the person's name is only in the
93
+ * name if `ariaLabel` carries it ("Marcel Eifert, account menu").
94
+ */
95
+ trigger?: (state: {
96
+ open: boolean;
97
+ }) => ReactNode;
98
+ /** Extra classes for the trigger button — `rounded-full` round an avatar. */
99
+ triggerClassName?: string;
100
+ /** Names the trigger and the menu. */
38
101
  ariaLabel: string;
39
102
  heading?: string;
103
+ /** A non-interactive identity block above the rows. */
104
+ header?: TopBarMenuHeader;
40
105
  entries: TopBarMenuEntry[];
106
+ /**
107
+ * Rows the entry data cannot describe (a `Disclosure` sub-list, an app's own
108
+ * section), after `entries`. Render `<li>`s holding `MenuItem`s or plain controls;
109
+ * `close` shuts the menu.
110
+ */
111
+ children?: (close: () => void) => ReactNode;
112
+ /**
113
+ * Free content below the rows, behind a rule — the legal links. Its links and
114
+ * buttons are NOT menu rows: the arrow keys skip them and Tab reaches them. Pass a
115
+ * function to get `close` for the links' `onClick`.
116
+ */
117
+ footer?: ReactNode | ((close: () => void) => ReactNode);
118
+ /** Wraps the footer in a `<nav>` with this name ("Legal"). Without it, a plain block. */
119
+ footerLabel?: string;
120
+ /** Which edge of the trigger the panel lines up with (see `HoverMenu`). Default `end`. */
121
+ align?: "start" | "end" | "left" | "right";
41
122
  panelClassName?: string;
42
123
  }): react.JSX.Element;
43
124
 
44
- export { TopBarActionMenu, type TopBarMenuEntry };
125
+ export { TopBarActionMenu, type TopBarMenuEntry, type TopBarMenuHeader };
@@ -1,46 +1,134 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useLayoutEffect, useRef } from "react";
3
4
  import { Link } from "react-router";
4
5
  import { cn } from "../lib/cn.js";
5
6
  import { HoverMenu } from "../components/hover-menu.js";
6
- import { TOPBAR_MENU_ITEM_CLASS, TOPBAR_TRIGGER_CLASS } from "./topbar-controls.js";
7
+ import { MenuItem } from "../components/menu-item.js";
8
+ import { StatusDot } from "../components/status-dot.js";
9
+ import { TOPBAR_TRIGGER_CLASS } from "./topbar-controls.js";
10
+ const SECTION_CONTROLS = "a[href]:not([role]),button:not([role])";
11
+ const TABBABLE = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]";
12
+ function MenuSection({ className, children }) {
13
+ const ref = useRef(null);
14
+ useLayoutEffect(() => {
15
+ const el = ref.current;
16
+ if (!el) return;
17
+ for (const c of el.querySelectorAll(SECTION_CONTROLS)) {
18
+ c.setAttribute("role", c.tagName === "A" ? "link" : "button");
19
+ }
20
+ for (const l of el.querySelectorAll("ul:not([role]),ol:not([role])")) l.setAttribute("role", "list");
21
+ for (const l of el.querySelectorAll("li:not([role])")) l.setAttribute("role", "listitem");
22
+ });
23
+ return /* @__PURE__ */ jsx("li", { ref, role: "none", className, children });
24
+ }
25
+ function keepTabInsidePanel(e) {
26
+ if (e.key !== "Tab") return;
27
+ const from = e.target;
28
+ const stops = Array.from(e.currentTarget.querySelectorAll(TABBABLE)).filter(
29
+ (el) => el.getAttribute("tabindex") !== "-1"
30
+ );
31
+ const way = e.shiftKey ? Node.DOCUMENT_POSITION_PRECEDING : Node.DOCUMENT_POSITION_FOLLOWING;
32
+ if (stops.some((el) => el !== from && from.compareDocumentPosition(el) & way)) e.stopPropagation();
33
+ }
7
34
  function TopBarActionMenu({
8
35
  icon,
36
+ iconBadge,
37
+ trigger,
38
+ triggerClassName,
9
39
  ariaLabel,
10
40
  heading,
41
+ header,
11
42
  entries,
43
+ children,
44
+ footer,
45
+ footerLabel,
46
+ align,
12
47
  panelClassName
13
48
  }) {
14
49
  return /* @__PURE__ */ jsx(
15
50
  HoverMenu,
16
51
  {
17
52
  ariaLabel,
18
- trigger: ({ toggle }) => /* @__PURE__ */ jsx("button", { type: "button", onClick: toggle, "aria-label": ariaLabel, className: TOPBAR_TRIGGER_CLASS, children: icon }),
19
- children: (close) => /* @__PURE__ */ jsxs("ul", { className: cn("py-1", panelClassName), children: [
20
- heading && /* @__PURE__ */ jsx("li", { className: "px-3 py-1 text-[10px] font-semibold uppercase tracking-wide text-[var(--text-placeholder)]", children: heading }),
21
- entries.map((entry) => {
22
- if (entry.kind === "divider") {
23
- return /* @__PURE__ */ jsx("li", { className: "my-1 border-t border-[var(--border)]" }, entry.key);
24
- }
25
- const content = /* @__PURE__ */ jsxs("span", { className: "flex w-full items-center gap-2", children: [
26
- entry.icon,
27
- entry.label,
28
- entry.trailing && /* @__PURE__ */ jsx("span", { className: "ms-auto ps-2", children: entry.trailing })
29
- ] });
30
- return /* @__PURE__ */ jsx("li", { children: entry.kind === "link" ? /* @__PURE__ */ jsx(Link, { to: entry.to, onClick: close, className: TOPBAR_MENU_ITEM_CLASS, children: content }) : /* @__PURE__ */ jsx(
31
- "button",
32
- {
33
- type: "button",
34
- onClick: () => {
35
- entry.onSelect();
36
- close();
37
- },
38
- className: TOPBAR_MENU_ITEM_CLASS,
39
- children: content
40
- }
41
- ) }, entry.key);
42
- })
43
- ] })
53
+ align,
54
+ trigger: ({ open, toggle }) => trigger ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: toggle, className: cn(TOPBAR_TRIGGER_CLASS, "relative", triggerClassName), children: [
55
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: ariaLabel }),
56
+ " ",
57
+ trigger({ open })
58
+ ] }) : iconBadge ? (
59
+ // Named by its content, like the custom-trigger branch, so the badge label is
60
+ // part of the name; an `aria-label` would have hidden it.
61
+ /* @__PURE__ */ jsxs("button", { type: "button", onClick: toggle, className: cn(TOPBAR_TRIGGER_CLASS, "relative", triggerClassName), children: [
62
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: ariaLabel }),
63
+ " ",
64
+ /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative inline-flex", children: [
65
+ icon,
66
+ /* @__PURE__ */ jsx(StatusDot, { ring: true, tone: iconBadge.tone ?? "danger", className: "absolute -end-0.5 -top-0.5" })
67
+ ] }),
68
+ " ",
69
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: iconBadge.label })
70
+ ] })
71
+ ) : /* @__PURE__ */ jsx(
72
+ "button",
73
+ {
74
+ type: "button",
75
+ onClick: toggle,
76
+ "aria-label": ariaLabel,
77
+ className: cn(TOPBAR_TRIGGER_CLASS, triggerClassName),
78
+ children: icon
79
+ }
80
+ ),
81
+ children: (close) => {
82
+ const footerBody = typeof footer === "function" ? footer(close) : footer;
83
+ const footerClass = "flex flex-wrap gap-x-3 gap-y-1 text-xs text-[var(--text-muted)] [&_a:hover]:text-[var(--text-primary)] [&_a]:rounded-sm [&_a:focus-visible]:outline-none [&_a:focus-visible]:ring-2 [&_a:focus-visible]:ring-[var(--brand)]";
84
+ return (
85
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- a Tab bubbling up from a row or footer link, see keepTabInsidePanel
86
+ /* @__PURE__ */ jsxs("ul", { className: cn("py-1", panelClassName), onKeyDown: keepTabInsidePanel, children: [
87
+ header && /* @__PURE__ */ jsxs(MenuSection, { className: "mb-1 border-b border-[var(--border)] px-3 py-2", children: [
88
+ /* @__PURE__ */ jsx("div", { className: "truncate text-sm font-medium text-[var(--text-primary)]", children: header.title }),
89
+ header.subtitle != null && /* @__PURE__ */ jsx("div", { className: "truncate text-xs text-[var(--text-muted)]", children: header.subtitle }),
90
+ header.extra != null && /* @__PURE__ */ jsx("div", { className: "mt-1", children: header.extra })
91
+ ] }),
92
+ heading && /* @__PURE__ */ jsx("li", { className: "px-3 py-1 text-[10px] font-semibold uppercase tracking-wide text-[var(--text-placeholder)]", children: heading }),
93
+ entries.map((entry) => {
94
+ if (entry.kind === "divider") {
95
+ return /* @__PURE__ */ jsx("li", { className: "my-1 border-t border-[var(--border)]" }, entry.key);
96
+ }
97
+ return /* @__PURE__ */ jsx("li", { children: entry.kind === "link" ? /* @__PURE__ */ jsx(
98
+ MenuItem,
99
+ {
100
+ href: entry.to,
101
+ renderLink: ({ href, ...p }) => /* @__PURE__ */ jsx(Link, { to: href, ...p }),
102
+ onClick: close,
103
+ leading: entry.icon,
104
+ trailing: entry.trailing,
105
+ tone: entry.tone,
106
+ current: entry.current,
107
+ disabled: entry.disabled,
108
+ children: entry.label
109
+ }
110
+ ) : /* @__PURE__ */ jsx(
111
+ MenuItem,
112
+ {
113
+ onClick: () => {
114
+ entry.onSelect();
115
+ close();
116
+ },
117
+ leading: entry.icon,
118
+ trailing: entry.trailing,
119
+ tone: entry.tone,
120
+ checked: entry.checked,
121
+ checkable: entry.checkable,
122
+ disabled: entry.disabled,
123
+ children: entry.label
124
+ }
125
+ ) }, entry.key);
126
+ }),
127
+ children?.(close),
128
+ footerBody != null && footerBody !== false && /* @__PURE__ */ jsx(MenuSection, { className: "mt-1 border-t border-[var(--border)] px-3 py-2", children: footerLabel ? /* @__PURE__ */ jsx("nav", { "aria-label": footerLabel, className: footerClass, children: footerBody }) : /* @__PURE__ */ jsx("div", { className: footerClass, children: footerBody }) })
129
+ ] })
130
+ );
131
+ }
44
132
  }
45
133
  );
46
134
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shell/topbar-action-menu.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Link } from \"react-router\";\nimport { cn } from \"../lib/cn\";\nimport { HoverMenu } from \"../components/hover-menu\";\nimport { TOPBAR_MENU_ITEM_CLASS, TOPBAR_TRIGGER_CLASS } from \"./topbar-controls\";\n\n/**\n * One row of a {@link TopBarActionMenu}. An `action` (default) runs `onSelect`, a\n * `link` navigates via react-router, and a `divider` draws a rule. Non-divider\n * rows close the menu automatically when chosen. `kind` may be omitted for\n * actions, keeping the common case terse.\n */\nexport type TopBarMenuEntry =\n | { kind?: \"action\"; key: string; icon?: ReactNode; label: ReactNode; trailing?: ReactNode; onSelect: () => void }\n | { kind: \"link\"; key: string; icon?: ReactNode; label: ReactNode; trailing?: ReactNode; to: string }\n | { kind: \"divider\"; key: string };\n\n/**\n * A top-bar icon button that opens a {@link HoverMenu} of actions and/or links,\n * with an optional uppercase heading and divider rules. Generic glue over the\n * shared top-bar chrome — e.g. the feedback launcher or the guided-tours menu —\n * so those call sites describe their rows as data instead of rebuilding the\n * trigger + list markup. For a checkmarked value-switcher use\n * {@link OptionSwitcherMenu} instead.\n */\nexport function TopBarActionMenu({\n icon,\n ariaLabel,\n heading,\n entries,\n panelClassName,\n}: {\n icon: ReactNode;\n ariaLabel: string;\n heading?: string;\n entries: TopBarMenuEntry[];\n panelClassName?: string;\n}) {\n return (\n <HoverMenu\n ariaLabel={ariaLabel}\n trigger={({ toggle }) => (\n <button type=\"button\" onClick={toggle} aria-label={ariaLabel} className={TOPBAR_TRIGGER_CLASS}>\n {icon}\n </button>\n )}\n >\n {(close) => (\n <ul className={cn(\"py-1\", panelClassName)}>\n {heading && (\n <li className=\"px-3 py-1 text-[10px] font-semibold uppercase tracking-wide text-[var(--text-placeholder)]\">\n {heading}\n </li>\n )}\n {entries.map((entry) => {\n if (entry.kind === \"divider\") {\n return <li key={entry.key} className=\"my-1 border-t border-[var(--border)]\" />;\n }\n const content = (\n <span className=\"flex w-full items-center gap-2\">\n {entry.icon}\n {entry.label}\n {entry.trailing && <span className=\"ms-auto ps-2\">{entry.trailing}</span>}\n </span>\n );\n return (\n <li key={entry.key}>\n {entry.kind === \"link\" ? (\n <Link to={entry.to} onClick={close} className={TOPBAR_MENU_ITEM_CLASS}>\n {content}\n </Link>\n ) : (\n <button\n type=\"button\"\n onClick={() => {\n entry.onSelect();\n close();\n }}\n className={TOPBAR_MENU_ITEM_CLASS}\n >\n {content}\n </button>\n )}\n </li>\n );\n })}\n </ul>\n )}\n </HoverMenu>\n );\n}\n"],"mappings":";AA0CQ,cAiBM,YAjBN;AAzCR,SAAS,YAAY;AACrB,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB,4BAA4B;AAqBtD,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAMG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAS,CAAC,EAAE,OAAO,MACjB,oBAAC,YAAO,MAAK,UAAS,SAAS,QAAQ,cAAY,WAAW,WAAW,sBACtE,gBACH;AAAA,MAGD,WAAC,UACA,qBAAC,QAAG,WAAW,GAAG,QAAQ,cAAc,GACrC;AAAA,mBACC,oBAAC,QAAG,WAAU,8FACX,mBACH;AAAA,QAED,QAAQ,IAAI,CAAC,UAAU;AACtB,cAAI,MAAM,SAAS,WAAW;AAC5B,mBAAO,oBAAC,QAAmB,WAAU,0CAArB,MAAM,GAAsD;AAAA,UAC9E;AACA,gBAAM,UACJ,qBAAC,UAAK,WAAU,kCACb;AAAA,kBAAM;AAAA,YACN,MAAM;AAAA,YACN,MAAM,YAAY,oBAAC,UAAK,WAAU,gBAAgB,gBAAM,UAAS;AAAA,aACpE;AAEF,iBACE,oBAAC,QACE,gBAAM,SAAS,SACd,oBAAC,QAAK,IAAI,MAAM,IAAI,SAAS,OAAO,WAAW,wBAC5C,mBACH,IAEA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,SAAS,MAAM;AACb,sBAAM,SAAS;AACf,sBAAM;AAAA,cACR;AAAA,cACA,WAAW;AAAA,cAEV;AAAA;AAAA,UACH,KAfK,MAAM,GAiBf;AAAA,QAEJ,CAAC;AAAA,SACH;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/shell/topbar-action-menu.tsx"],"sourcesContent":["import { useLayoutEffect, useRef } from \"react\";\nimport type { KeyboardEvent as ReactKeyboardEvent, ReactNode } from \"react\";\nimport { Link } from \"react-router\";\nimport { cn } from \"../lib/cn\";\nimport { HoverMenu } from \"../components/hover-menu\";\nimport { MenuItem } from \"../components/menu-item\";\nimport type { MenuItemTone } from \"../components/menu-item\";\nimport { StatusDot } from \"../components/status-dot\";\nimport type { UserAvatarBadge } from \"../components/user-avatar\";\nimport { TOPBAR_TRIGGER_CLASS } from \"./topbar-controls\";\n\n/**\n * One row of a {@link TopBarActionMenu}. An `action` (default) runs `onSelect`, a\n * `link` navigates via react-router, and a `divider` draws a rule. Non-divider\n * rows close the menu automatically when chosen. `kind` may be omitted for\n * actions, keeping the common case terse.\n *\n * The rows are {@link MenuItem}s, so they take its options: `tone: \"danger\"` for the\n * log-out row, `checked` (+ `checkable`) for a choice, `current` for the link to the\n * page already open, `disabled`.\n */\nexport type TopBarMenuEntry =\n | {\n kind?: \"action\";\n key: string;\n icon?: ReactNode;\n label: ReactNode;\n trailing?: ReactNode;\n onSelect: () => void;\n tone?: MenuItemTone;\n /** Makes the row a choice (`menuitemradio`, or `menuitemcheckbox` with\n * `checkable: \"checkbox\"`) and says whether it is chosen. */\n checked?: boolean;\n checkable?: \"radio\" | \"checkbox\";\n disabled?: boolean;\n }\n | {\n kind: \"link\";\n key: string;\n icon?: ReactNode;\n label: ReactNode;\n trailing?: ReactNode;\n to: string;\n tone?: MenuItemTone;\n /** The link to the page already open: `aria-current=\"page\"` and a check mark. */\n current?: boolean;\n disabled?: boolean;\n }\n | { kind: \"divider\"; key: string };\n\n/**\n * The non-interactive identity block at the top of an account menu — kastlan's name +\n * role, keksdose's display name + email + role chip. It is text, not a `menuitem`: the\n * arrow keys pass over it.\n */\nexport interface TopBarMenuHeader {\n /** The first line — the user's name. */\n title: ReactNode;\n /** The muted second line — an email, a role. */\n subtitle?: ReactNode;\n /** Anything below — a role chip. A link or button here stays out of the arrow keys\n * and in the Tab order, like the footer's. */\n extra?: ReactNode;\n}\n\n/** What a control is, as far as `HoverMenu` is concerned, when it lives in the header\n * or the footer: not a menu row. */\nconst SECTION_CONTROLS = \"a[href]:not([role]),button:not([role])\";\nconst TABBABLE = 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]';\n\n/**\n * A header or footer inside the menu panel.\n *\n * `HoverMenu` promotes EVERY role-less button and link in its panel to a `menuitem` out\n * of the Tab order, and turns every list into `role=\"none\"` — right for the rows, wrong\n * for a footer of legal links, which would join the arrow-key cycle and drop out of Tab.\n * So before it looks (a child's layout effect runs before its parent's), the controls\n * in here get their own role spelled out, which `HoverMenu` leaves alone, and any list\n * keeps its list semantics.\n */\nfunction MenuSection({ className, children }: { className: string; children: ReactNode }) {\n const ref = useRef<HTMLLIElement>(null);\n useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n for (const c of el.querySelectorAll<HTMLElement>(SECTION_CONTROLS)) {\n c.setAttribute(\"role\", c.tagName === \"A\" ? \"link\" : \"button\");\n }\n for (const l of el.querySelectorAll<HTMLElement>(\"ul:not([role]),ol:not([role])\")) l.setAttribute(\"role\", \"list\");\n for (const l of el.querySelectorAll<HTMLElement>(\"li:not([role])\")) l.setAttribute(\"role\", \"listitem\");\n });\n return (\n <li ref={ref} role=\"none\" className={className}>\n {children}\n </li>\n );\n}\n\n/**\n * `HoverMenu` closes on any Tab inside the panel — right when Tab leaves it, wrong when\n * Tab is on its way from a row to a footer link, or from one footer link to the next:\n * the panel would unmount under the focus. So a Tab whose next stop is still inside the\n * panel stops here and the browser moves focus; one that leaves reaches `HoverMenu`,\n * which closes.\n */\nfunction keepTabInsidePanel(e: ReactKeyboardEvent<HTMLUListElement>) {\n if (e.key !== \"Tab\") return;\n const from = e.target as HTMLElement;\n const stops = Array.from(e.currentTarget.querySelectorAll<HTMLElement>(TABBABLE)).filter(\n (el) => el.getAttribute(\"tabindex\") !== \"-1\",\n );\n const way = e.shiftKey ? Node.DOCUMENT_POSITION_PRECEDING : Node.DOCUMENT_POSITION_FOLLOWING;\n if (stops.some((el) => el !== from && from.compareDocumentPosition(el) & way)) e.stopPropagation();\n}\n\n/**\n * A top-bar icon button that opens a {@link HoverMenu} of actions and/or links,\n * with an optional uppercase heading and divider rules. Generic glue over the\n * shared top-bar chrome — e.g. the feedback launcher or the guided-tours menu —\n * so those call sites describe their rows as data instead of rebuilding the\n * trigger + list markup. For a checkmarked value-switcher use\n * {@link OptionSwitcherMenu} instead.\n *\n * It is also the ACCOUNT menu kastlan and keksdose each hand-build on `HoverMenu`: a\n * custom `trigger` (the avatar), a `header` (name + role / email), the rows, and a\n * free-content `footer` (the legal links).\n */\nexport function TopBarActionMenu({\n icon,\n iconBadge,\n trigger,\n triggerClassName,\n ariaLabel,\n heading,\n header,\n entries,\n children,\n footer,\n footerLabel,\n align,\n panelClassName,\n}: {\n /** The trigger's face for the usual icon button. Ignored when `trigger` is given. */\n icon?: ReactNode;\n /**\n * A status dot in the top-end corner of `icon` — keksdose's unread-support dot on the\n * feedback trigger. Like `UserAvatar`'s `badge`, its `label` joins the trigger's name\n * (\"Send feedback 2 unread\"), so the dot is not something only the eye is told about.\n * Ignored with `trigger`: give the face its own badge there.\n */\n iconBadge?: UserAvatarBadge | null;\n /**\n * A face of your own for the trigger — the account menu's `UserAvatar`. It is drawn\n * INSIDE the kit's button, which keeps the wiring: `aria-haspopup`, `aria-expanded`,\n * the toggle, the keyboard. `open` is there for a chevron that turns.\n *\n * The button is named by `ariaLabel` followed by any readable text in the face — a\n * `UserAvatar` `badge` label reaches a screen reader that way (\"Account menu 3\n * unread\"), where an `aria-label` on the button would have hidden it. A\n * `UserAvatar`'s initials are `aria-hidden`, so the person's name is only in the\n * name if `ariaLabel` carries it (\"Marcel Eifert, account menu\").\n */\n trigger?: (state: { open: boolean }) => ReactNode;\n /** Extra classes for the trigger button — `rounded-full` round an avatar. */\n triggerClassName?: string;\n /** Names the trigger and the menu. */\n ariaLabel: string;\n heading?: string;\n /** A non-interactive identity block above the rows. */\n header?: TopBarMenuHeader;\n entries: TopBarMenuEntry[];\n /**\n * Rows the entry data cannot describe (a `Disclosure` sub-list, an app's own\n * section), after `entries`. Render `<li>`s holding `MenuItem`s or plain controls;\n * `close` shuts the menu.\n */\n children?: (close: () => void) => ReactNode;\n /**\n * Free content below the rows, behind a rule — the legal links. Its links and\n * buttons are NOT menu rows: the arrow keys skip them and Tab reaches them. Pass a\n * function to get `close` for the links' `onClick`.\n */\n footer?: ReactNode | ((close: () => void) => ReactNode);\n /** Wraps the footer in a `<nav>` with this name (\"Legal\"). Without it, a plain block. */\n footerLabel?: string;\n /** Which edge of the trigger the panel lines up with (see `HoverMenu`). Default `end`. */\n align?: \"start\" | \"end\" | \"left\" | \"right\";\n panelClassName?: string;\n}) {\n return (\n <HoverMenu\n ariaLabel={ariaLabel}\n align={align}\n trigger={({ open, toggle }) =>\n trigger ? (\n <button type=\"button\" onClick={toggle} className={cn(TOPBAR_TRIGGER_CLASS, \"relative\", triggerClassName)}>\n <span className=\"sr-only\">{ariaLabel}</span>\n {/* The space keeps the name from running into the face's text (\"Account\n menu3 unread\"); as a flex item it takes no room. */}\n {\" \"}\n {trigger({ open })}\n </button>\n ) : iconBadge ? (\n // Named by its content, like the custom-trigger branch, so the badge label is\n // part of the name; an `aria-label` would have hidden it.\n <button type=\"button\" onClick={toggle} className={cn(TOPBAR_TRIGGER_CLASS, \"relative\", triggerClassName)}>\n <span className=\"sr-only\">{ariaLabel}</span>{\" \"}\n <span aria-hidden className=\"relative inline-flex\">\n {icon}\n <StatusDot ring tone={iconBadge.tone ?? \"danger\"} className=\"absolute -end-0.5 -top-0.5\" />\n </span>{\" \"}\n <span className=\"sr-only\">{iconBadge.label}</span>\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={toggle}\n aria-label={ariaLabel}\n className={cn(TOPBAR_TRIGGER_CLASS, triggerClassName)}\n >\n {icon}\n </button>\n )\n }\n >\n {(close) => {\n const footerBody = typeof footer === \"function\" ? footer(close) : footer;\n const footerClass =\n \"flex flex-wrap gap-x-3 gap-y-1 text-xs text-[var(--text-muted)] [&_a:hover]:text-[var(--text-primary)] [&_a]:rounded-sm [&_a:focus-visible]:outline-none [&_a:focus-visible]:ring-2 [&_a:focus-visible]:ring-[var(--brand)]\";\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- a Tab bubbling up from a row or footer link, see keepTabInsidePanel\n <ul className={cn(\"py-1\", panelClassName)} onKeyDown={keepTabInsidePanel}>\n {header && (\n <MenuSection className=\"mb-1 border-b border-[var(--border)] px-3 py-2\">\n <div className=\"truncate text-sm font-medium text-[var(--text-primary)]\">{header.title}</div>\n {header.subtitle != null && (\n <div className=\"truncate text-xs text-[var(--text-muted)]\">{header.subtitle}</div>\n )}\n {header.extra != null && <div className=\"mt-1\">{header.extra}</div>}\n </MenuSection>\n )}\n {heading && (\n <li className=\"px-3 py-1 text-[10px] font-semibold uppercase tracking-wide text-[var(--text-placeholder)]\">\n {heading}\n </li>\n )}\n {entries.map((entry) => {\n if (entry.kind === \"divider\") {\n return <li key={entry.key} className=\"my-1 border-t border-[var(--border)]\" />;\n }\n return (\n <li key={entry.key}>\n {entry.kind === \"link\" ? (\n <MenuItem\n href={entry.to}\n renderLink={({ href, ...p }) => <Link to={href} {...p} />}\n onClick={close}\n leading={entry.icon}\n trailing={entry.trailing}\n tone={entry.tone}\n current={entry.current}\n disabled={entry.disabled}\n >\n {entry.label}\n </MenuItem>\n ) : (\n <MenuItem\n onClick={() => {\n entry.onSelect();\n close();\n }}\n leading={entry.icon}\n trailing={entry.trailing}\n tone={entry.tone}\n checked={entry.checked}\n checkable={entry.checkable}\n disabled={entry.disabled}\n >\n {entry.label}\n </MenuItem>\n )}\n </li>\n );\n })}\n {children?.(close)}\n {footerBody != null && footerBody !== false && (\n <MenuSection className=\"mt-1 border-t border-[var(--border)] px-3 py-2\">\n {footerLabel ? (\n <nav aria-label={footerLabel} className={footerClass}>\n {footerBody}\n </nav>\n ) : (\n <div className={footerClass}>{footerBody}</div>\n )}\n </MenuSection>\n )}\n </ul>\n );\n }}\n </HoverMenu>\n );\n}\n"],"mappings":"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","names":[]}
package/dist/shell.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  export { LanguageMenu, LanguageOption, PaletteMenu, TOPBAR_MENU_ITEM_CLASS, TOPBAR_TRIGGER_CLASS, ThemeToggle } from './shell/topbar-controls.js';
2
2
  export { TopBar, TopBarProps } from './shell/top-bar.js';
3
- export { AppShell, AppShellNavItem, AppShellProps, AppShellSubItem } from './shell/app-shell.js';
3
+ export { AppShell, AppShellNavItem, AppShellProps, AppShellSidebarFooterItem, AppShellSubItem } from './shell/app-shell.js';
4
4
  export { OptionSwitcherMenu, OptionSwitcherOption } from './shell/option-switcher-menu.js';
5
5
  export { RoleSwitcher, RoleSwitcherProps } from './shell/role-switcher.js';
6
- export { TopBarActionMenu, TopBarMenuEntry } from './shell/topbar-action-menu.js';
6
+ export { TopBarActionMenu, TopBarMenuEntry, TopBarMenuHeader } from './shell/topbar-action-menu.js';
7
+ export { TopBarBrand, TopBarBrandProps } from './shell/top-bar-brand.js';
8
+ export { AuthLayout, AuthLayoutProps } from './shell/auth-layout.js';
7
9
  import 'react';
8
10
  import './theme/palette-presets.js';
9
11
  import './theme/chart-palette.js';
@@ -11,3 +13,57 @@ import './theme/theme-store.js';
11
13
  import 'zustand/middleware';
12
14
  import 'zustand';
13
15
  import 'lucide-react';
16
+ import './kit-labels-v3biUF1L.js';
17
+ import './components/data-table-labels.js';
18
+ import './components/mini-calendar.js';
19
+ import './components/calendar-heatmap.js';
20
+ import './components/popover.js';
21
+ import './components/chip.js';
22
+ import './components/field-sync.js';
23
+ import './components/tooltip.js';
24
+ import './hooks/use-anchored-rect.js';
25
+ import './lib/clipping.js';
26
+ import './wizard/types.js';
27
+ import './tour/tour.js';
28
+ import './search/command-palette.js';
29
+ import './search/global-search.js';
30
+ import './search/search-index.js';
31
+ import './components/month-picker.js';
32
+ import './components/page-contents.js';
33
+ import './components/series-chart-labels.js';
34
+ import './components/pie-chart-labels.js';
35
+ import './components/sparkline.js';
36
+ import './components/stat-tile.js';
37
+ import './components/signature-pad.js';
38
+ import './components/password-strength.js';
39
+ import './components/danger-confirm.js';
40
+ import './components/swatch-picker.js';
41
+ import './components/tile-radio.js';
42
+ import './components/icon-picker.js';
43
+ import './components/dialog-frame.js';
44
+ import './components/modal.js';
45
+ import './hooks/use-search-param-state.js';
46
+ import './components/measured-grid.js';
47
+ import './feedback/feedback-attachment.js';
48
+ import './feedback/feedback-dialog.js';
49
+ import './feedback/feedback-thread.js';
50
+ import './feedback/feedback-inbox.js';
51
+ import './components/account-settings-labels.js';
52
+ import './components/confirm-dialog.js';
53
+ import './components/floating-panel.js';
54
+ import './components/bulk-action-bar.js';
55
+ import './components/list.js';
56
+ import './components/breadcrumbs.js';
57
+ import './components/toast.js';
58
+ import './components/description-list.js';
59
+ import './components/line-items.js';
60
+ import './components/progress-bar.js';
61
+ import './components/signed-amount.js';
62
+ import './components/error-boundary.js';
63
+ import './components/authed-image.js';
64
+ import './hooks/use-authed-src.js';
65
+ import './components/image-grid.js';
66
+ import './components/lightbox.js';
67
+ import './components/menu-item.js';
68
+ import './components/user-avatar.js';
69
+ import './components/status-dot.js';
package/dist/shell.js CHANGED
@@ -5,4 +5,6 @@ export * from "./shell/app-shell.js";
5
5
  export * from "./shell/option-switcher-menu.js";
6
6
  export * from "./shell/role-switcher.js";
7
7
  export * from "./shell/topbar-action-menu.js";
8
+ export * from "./shell/top-bar-brand.js";
9
+ export * from "./shell/auth-layout.js";
8
10
  //# sourceMappingURL=shell.js.map
package/dist/shell.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shell.ts"],"sourcesContent":["// `@eifi1/ui-kit/shell` — the composable app chrome.\n//\n// A re-slicing of the main barrel, not a new API. This entry point requires\n// `react-router`: AppShell renders NavLink and TopBarActionMenu renders Link.\nexport * from \"./shell/topbar-controls\";\nexport * from \"./shell/top-bar\";\nexport * from \"./shell/app-shell\";\nexport * from \"./shell/option-switcher-menu\";\nexport * from \"./shell/role-switcher\";\nexport * from \"./shell/topbar-action-menu\";\n"],"mappings":";AAIA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/shell.ts"],"sourcesContent":["// `@eifi1/ui-kit/shell` — the composable app chrome.\n//\n// A re-slicing of the main barrel, not a new API. This entry point requires\n// `react-router`: AppShell renders NavLink and TopBarActionMenu renders Link.\nexport * from \"./shell/topbar-controls\";\nexport * from \"./shell/top-bar\";\nexport * from \"./shell/app-shell\";\nexport * from \"./shell/option-switcher-menu\";\nexport * from \"./shell/role-switcher\";\nexport * from \"./shell/topbar-action-menu\";\nexport * from \"./shell/top-bar-brand\";\nexport * from \"./shell/auth-layout\";\n"],"mappings":";AAIA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -1,9 +1,57 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ReactElement } from 'react';
3
- import { ButtonVariant } from '../components/ui.js';
3
+ import { f as ButtonVariant } from '../kit-labels-v3biUF1L.js';
4
4
  import { UseWizardReturn, WizardLabels } from './types.js';
5
+ import '../components/data-table-labels.js';
6
+ import '../components/mini-calendar.js';
7
+ import '../components/calendar-heatmap.js';
8
+ import '../components/popover.js';
9
+ import '../components/chip.js';
10
+ import 'lucide-react';
11
+ import '../components/field-sync.js';
5
12
  import '../components/tooltip.js';
6
13
  import '../hooks/use-anchored-rect.js';
14
+ import '../lib/clipping.js';
15
+ import '../tour/tour.js';
16
+ import '../search/command-palette.js';
17
+ import '../search/global-search.js';
18
+ import '../search/search-index.js';
19
+ import '../components/month-picker.js';
20
+ import '../components/page-contents.js';
21
+ import '../components/series-chart-labels.js';
22
+ import '../components/pie-chart-labels.js';
23
+ import '../components/sparkline.js';
24
+ import '../components/stat-tile.js';
25
+ import '../components/signature-pad.js';
26
+ import '../components/password-strength.js';
27
+ import '../components/danger-confirm.js';
28
+ import '../components/swatch-picker.js';
29
+ import '../components/tile-radio.js';
30
+ import '../components/icon-picker.js';
31
+ import '../components/dialog-frame.js';
32
+ import '../components/modal.js';
33
+ import '../hooks/use-search-param-state.js';
34
+ import '../components/measured-grid.js';
35
+ import '../feedback/feedback-attachment.js';
36
+ import '../feedback/feedback-dialog.js';
37
+ import '../feedback/feedback-thread.js';
38
+ import '../feedback/feedback-inbox.js';
39
+ import '../components/account-settings-labels.js';
40
+ import '../components/confirm-dialog.js';
41
+ import '../components/floating-panel.js';
42
+ import '../components/bulk-action-bar.js';
43
+ import '../components/list.js';
44
+ import '../components/breadcrumbs.js';
45
+ import '../components/toast.js';
46
+ import '../components/description-list.js';
47
+ import '../components/line-items.js';
48
+ import '../components/progress-bar.js';
49
+ import '../components/signed-amount.js';
50
+ import '../components/error-boundary.js';
51
+ import '../components/authed-image.js';
52
+ import '../hooks/use-authed-src.js';
53
+ import '../components/image-grid.js';
54
+ import '../components/lightbox.js';
7
55
 
8
56
  /**
9
57
  * The chrome around a wizard: the step indicator, the step content, and the