@eifi1/ui-kit 0.33.1 → 0.35.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 (1559) hide show
  1. package/README.md +512 -306
  2. package/dist/account/account-parts.d.ts +6 -8
  3. package/dist/account/account-parts.js +1 -2
  4. package/dist/account/account-parts.js.map +1 -1
  5. package/dist/{components → account}/account-settings-labels.d.ts +16 -10
  6. package/dist/{components → account}/account-settings-labels.js +3 -1
  7. package/dist/account/account-settings-labels.js.map +1 -0
  8. package/dist/{components → account}/account-settings.d.ts +53 -23
  9. package/dist/{components → account}/account-settings.js +97 -26
  10. package/dist/account/account-settings.js.map +1 -0
  11. package/dist/account/data-export-setting-labels.d.ts +2 -0
  12. package/dist/account/data-export-setting-labels.js +15 -0
  13. package/dist/account/data-export-setting-labels.js.map +1 -0
  14. package/dist/account/data-export-setting.d.ts +9 -11
  15. package/dist/account/data-export-setting.js +11 -27
  16. package/dist/account/data-export-setting.js.map +1 -1
  17. package/dist/account/delete-account-setting-labels.d.ts +2 -0
  18. package/dist/account/delete-account-setting-labels.js +23 -0
  19. package/dist/account/delete-account-setting-labels.js.map +1 -0
  20. package/dist/account/delete-account-setting.d.ts +132 -101
  21. package/dist/account/delete-account-setting.js +7 -23
  22. package/dist/account/delete-account-setting.js.map +1 -1
  23. package/dist/account/email-change-setting-labels.d.ts +2 -0
  24. package/dist/account/email-change-setting-labels.js +28 -0
  25. package/dist/account/email-change-setting-labels.js.map +1 -0
  26. package/dist/account/email-change-setting.d.ts +10 -12
  27. package/dist/account/email-change-setting.js +11 -30
  28. package/dist/account/email-change-setting.js.map +1 -1
  29. package/dist/{components → account}/passkeys-setting.d.ts +9 -12
  30. package/dist/{components → account}/passkeys-setting.js +10 -7
  31. package/dist/account/passkeys-setting.js.map +1 -0
  32. package/dist/account/sessions-setting-labels.d.ts +2 -0
  33. package/dist/account/sessions-setting-labels.js +22 -0
  34. package/dist/account/sessions-setting-labels.js.map +1 -0
  35. package/dist/account/sessions-setting.d.ts +12 -14
  36. package/dist/account/sessions-setting.js +8 -23
  37. package/dist/account/sessions-setting.js.map +1 -1
  38. package/dist/admin/admin-action-confirm-labels.d.ts +2 -0
  39. package/dist/admin/admin-action-confirm-labels.js +16 -0
  40. package/dist/admin/admin-action-confirm-labels.js.map +1 -0
  41. package/dist/admin/admin-action-confirm.d.ts +156 -101
  42. package/dist/admin/admin-action-confirm.js +17 -22
  43. package/dist/admin/admin-action-confirm.js.map +1 -1
  44. package/dist/admin/admin-action-log-labels.d.ts +2 -0
  45. package/dist/admin/admin-action-log-labels.js +73 -0
  46. package/dist/admin/admin-action-log-labels.js.map +1 -0
  47. package/dist/admin/admin-action-log.d.ts +98 -22
  48. package/dist/admin/admin-action-log.js +48 -45
  49. package/dist/admin/admin-action-log.js.map +1 -1
  50. package/dist/admin/admin-parts.d.ts +7 -14
  51. package/dist/admin/admin-parts.js +0 -4
  52. package/dist/admin/admin-parts.js.map +1 -1
  53. package/dist/admin/invitations-panel-labels.d.ts +2 -0
  54. package/dist/admin/invitations-panel-labels.js +29 -0
  55. package/dist/admin/invitations-panel-labels.js.map +1 -0
  56. package/dist/admin/invitations-panel.d.ts +167 -101
  57. package/dist/admin/invitations-panel.js +12 -31
  58. package/dist/admin/invitations-panel.js.map +1 -1
  59. package/dist/admin/plan-change-labels.d.ts +2 -0
  60. package/dist/admin/plan-change-labels.js +22 -0
  61. package/dist/admin/plan-change-labels.js.map +1 -0
  62. package/dist/admin/plan-change.d.ts +244 -101
  63. package/dist/admin/plan-change.js +16 -24
  64. package/dist/admin/plan-change.js.map +1 -1
  65. package/dist/admin/reviewer-scope-editor-labels.d.ts +2 -0
  66. package/dist/admin/reviewer-scope-editor-labels.js +14 -0
  67. package/dist/admin/reviewer-scope-editor-labels.js.map +1 -0
  68. package/dist/admin/reviewer-scope-editor.d.ts +95 -101
  69. package/dist/admin/reviewer-scope-editor.js +5 -13
  70. package/dist/admin/reviewer-scope-editor.js.map +1 -1
  71. package/dist/admin/role-select-labels.d.ts +2 -0
  72. package/dist/admin/role-select-labels.js +15 -0
  73. package/dist/admin/role-select-labels.js.map +1 -0
  74. package/dist/admin/role-select.d.ts +136 -101
  75. package/dist/admin/role-select.js +7 -18
  76. package/dist/admin/role-select.js.map +1 -1
  77. package/dist/admin/transfer-ownership-dialog-labels.d.ts +2 -0
  78. package/dist/admin/transfer-ownership-dialog-labels.js +18 -0
  79. package/dist/admin/transfer-ownership-dialog-labels.js.map +1 -0
  80. package/dist/admin/transfer-ownership-dialog.d.ts +81 -101
  81. package/dist/admin/transfer-ownership-dialog.js +3 -15
  82. package/dist/admin/transfer-ownership-dialog.js.map +1 -1
  83. package/dist/admin/user-roster-labels.d.ts +2 -0
  84. package/dist/admin/user-roster-labels.js +16 -0
  85. package/dist/admin/user-roster-labels.js.map +1 -0
  86. package/dist/admin/user-roster.d.ts +225 -101
  87. package/dist/admin/user-roster.js +4 -14
  88. package/dist/admin/user-roster.js.map +1 -1
  89. package/dist/auth/accept-invitation-labels.d.ts +2 -0
  90. package/dist/auth/accept-invitation-labels.js +20 -0
  91. package/dist/auth/accept-invitation-labels.js.map +1 -0
  92. package/dist/auth/accept-invitation.d.ts +11 -13
  93. package/dist/auth/accept-invitation.js +3 -16
  94. package/dist/auth/accept-invitation.js.map +1 -1
  95. package/dist/auth/auth-errors.d.ts +34 -23
  96. package/dist/auth/auth-errors.js +8 -4
  97. package/dist/auth/auth-errors.js.map +1 -1
  98. package/dist/auth/complete-name-dialog-labels.d.ts +2 -0
  99. package/dist/auth/complete-name-dialog-labels.js +14 -0
  100. package/dist/auth/complete-name-dialog-labels.js.map +1 -0
  101. package/dist/auth/complete-name-dialog.d.ts +9 -11
  102. package/dist/auth/complete-name-dialog.js +4 -11
  103. package/dist/auth/complete-name-dialog.js.map +1 -1
  104. package/dist/auth/email-tag.d.ts +2 -4
  105. package/dist/auth/forgot-password-form-labels.d.ts +3 -0
  106. package/dist/auth/forgot-password-form-labels.js +17 -0
  107. package/dist/auth/forgot-password-form-labels.js.map +1 -0
  108. package/dist/auth/forgot-password-form.d.ts +9 -12
  109. package/dist/auth/forgot-password-form.js +6 -15
  110. package/dist/auth/forgot-password-form.js.map +1 -1
  111. package/dist/auth/form-rules.d.ts +5 -7
  112. package/dist/auth/new-password-fields.d.ts +4 -8
  113. package/dist/auth/new-password-fields.js +1 -1
  114. package/dist/auth/new-password-fields.js.map +1 -1
  115. package/dist/auth/not-found-page-labels.d.ts +2 -0
  116. package/dist/auth/not-found-page-labels.js +11 -0
  117. package/dist/auth/not-found-page-labels.js.map +1 -0
  118. package/dist/auth/not-found-page.d.ts +9 -11
  119. package/dist/auth/not-found-page.js +5 -10
  120. package/dist/auth/not-found-page.js.map +1 -1
  121. package/dist/auth/register-form-labels.d.ts +3 -0
  122. package/dist/auth/register-form-labels.js +28 -0
  123. package/dist/auth/register-form-labels.js.map +1 -0
  124. package/dist/auth/register-form.d.ts +174 -101
  125. package/dist/auth/register-form.js +11 -31
  126. package/dist/auth/register-form.js.map +1 -1
  127. package/dist/auth/reset-password-form-labels.d.ts +3 -0
  128. package/dist/auth/reset-password-form-labels.js +24 -0
  129. package/dist/auth/reset-password-form-labels.js.map +1 -0
  130. package/dist/auth/reset-password-form.d.ts +12 -15
  131. package/dist/auth/reset-password-form.js +6 -22
  132. package/dist/auth/reset-password-form.js.map +1 -1
  133. package/dist/auth/sign-in-form-labels.d.ts +3 -0
  134. package/dist/auth/sign-in-form-labels.js +42 -0
  135. package/dist/auth/sign-in-form-labels.js.map +1 -0
  136. package/dist/auth/sign-in-form.d.ts +15 -19
  137. package/dist/auth/sign-in-form.js +12 -46
  138. package/dist/auth/sign-in-form.js.map +1 -1
  139. package/dist/auth/status-parts.d.ts +13 -17
  140. package/dist/auth/status-parts.js +3 -3
  141. package/dist/auth/status-parts.js.map +1 -1
  142. package/dist/auth/verify-email-labels.d.ts +2 -0
  143. package/dist/auth/verify-email-labels.js +25 -0
  144. package/dist/auth/verify-email-labels.js.map +1 -0
  145. package/dist/auth/verify-email.d.ts +15 -17
  146. package/dist/auth/verify-email.js +4 -21
  147. package/dist/auth/verify-email.js.map +1 -1
  148. package/dist/billing/billing-banner.d.ts +12 -110
  149. package/dist/billing/billing-banner.js +2 -1
  150. package/dist/billing/billing-banner.js.map +1 -1
  151. package/dist/billing/billing-labels.d.ts +168 -101
  152. package/dist/billing/billing-labels.js.map +1 -1
  153. package/dist/billing/billing-lock.d.ts +10 -110
  154. package/dist/billing/billing-overview.d.ts +7 -109
  155. package/dist/billing/billing-standing.d.ts +6 -108
  156. package/dist/billing/checkout-processing.d.ts +8 -111
  157. package/dist/billing/checkout-processing.js +2 -9
  158. package/dist/billing/checkout-processing.js.map +1 -1
  159. package/dist/billing/checkout-return.d.ts +5 -7
  160. package/dist/billing/pay-page.d.ts +15 -117
  161. package/dist/billing/plan-card.d.ts +14 -115
  162. package/dist/billing/plan-card.js +15 -13
  163. package/dist/billing/plan-card.js.map +1 -1
  164. package/dist/billing/plan-limit-notice.d.ts +12 -110
  165. package/dist/billing/plan-limit-notice.js +1 -1
  166. package/dist/billing/plan-limit-notice.js.map +1 -1
  167. package/dist/billing/plan-limit-toast.d.ts +6 -107
  168. package/dist/billing/plan-limit.d.ts +2 -4
  169. package/dist/billing/plan-price.d.ts +10 -12
  170. package/dist/billing/subscription-actions.d.ts +6 -109
  171. package/dist/billing/subscription-actions.js +2 -2
  172. package/dist/billing/subscription-actions.js.map +1 -1
  173. package/dist/billing/subscription-status-chip.d.ts +7 -108
  174. package/dist/chart.d.ts +12 -113
  175. package/dist/chart.js +4 -0
  176. package/dist/chart.js.map +1 -1
  177. package/dist/components/account-chips-labels.d.ts +10 -0
  178. package/dist/components/account-chips-labels.js +15 -0
  179. package/dist/components/account-chips-labels.js.map +1 -0
  180. package/dist/components/account-chips.d.ts +22 -44
  181. package/dist/components/account-chips.js +9 -14
  182. package/dist/components/account-chips.js.map +1 -1
  183. package/dist/components/alert-banner.d.ts +15 -11
  184. package/dist/components/alert-banner.js +28 -18
  185. package/dist/components/alert-banner.js.map +1 -1
  186. package/dist/components/amount-input.d.ts +64 -111
  187. package/dist/components/amount-input.js +259 -283
  188. package/dist/components/amount-input.js.map +1 -1
  189. package/dist/components/appearance-labels.d.ts +6 -10
  190. package/dist/components/appearance-labels.js.map +1 -1
  191. package/dist/components/authed-image-labels.d.ts +2 -0
  192. package/dist/components/authed-image-labels.js +10 -0
  193. package/dist/components/authed-image-labels.js.map +1 -0
  194. package/dist/components/authed-image.d.ts +11 -13
  195. package/dist/components/authed-image.js +2 -6
  196. package/dist/components/authed-image.js.map +1 -1
  197. package/dist/components/autocomplete.d.ts +13 -11
  198. package/dist/components/autocomplete.js +33 -28
  199. package/dist/components/autocomplete.js.map +1 -1
  200. package/dist/components/breadcrumbs-labels.d.ts +2 -0
  201. package/dist/components/breadcrumbs-labels.js +9 -0
  202. package/dist/components/breadcrumbs-labels.js.map +1 -0
  203. package/dist/components/breadcrumbs.d.ts +10 -12
  204. package/dist/components/breadcrumbs.js +7 -10
  205. package/dist/components/breadcrumbs.js.map +1 -1
  206. package/dist/components/bulk-action-bar-labels.d.ts +2 -0
  207. package/dist/components/bulk-action-bar-labels.js +10 -0
  208. package/dist/components/bulk-action-bar-labels.js.map +1 -0
  209. package/dist/components/bulk-action-bar.d.ts +10 -12
  210. package/dist/components/bulk-action-bar.js +9 -12
  211. package/dist/components/bulk-action-bar.js.map +1 -1
  212. package/dist/components/button-group.d.ts +7 -110
  213. package/dist/components/button-group.js +5 -5
  214. package/dist/components/button-group.js.map +1 -1
  215. package/dist/components/button-look.d.ts +88 -0
  216. package/dist/components/button-look.js +91 -0
  217. package/dist/components/button-look.js.map +1 -0
  218. package/dist/components/button.d.ts +153 -0
  219. package/dist/components/button.js +165 -0
  220. package/dist/components/button.js.map +1 -0
  221. package/dist/components/calculator.d.ts +6 -108
  222. package/dist/components/calculator.js +8 -7
  223. package/dist/components/calculator.js.map +1 -1
  224. package/dist/components/calendar-heatmap-labels.d.ts +3 -0
  225. package/dist/components/calendar-heatmap-labels.js +12 -0
  226. package/dist/components/calendar-heatmap-labels.js.map +1 -0
  227. package/dist/components/calendar-heatmap.d.ts +13 -16
  228. package/dist/components/calendar-heatmap.js +7 -13
  229. package/dist/components/calendar-heatmap.js.map +1 -1
  230. package/dist/components/card.d.ts +145 -0
  231. package/dist/components/card.js +186 -0
  232. package/dist/components/card.js.map +1 -0
  233. package/dist/components/chart-height.d.ts +4 -7
  234. package/dist/components/chart-zoom-core.d.ts +202 -0
  235. package/dist/components/chart-zoom-core.js +334 -0
  236. package/dist/components/chart-zoom-core.js.map +1 -0
  237. package/dist/components/chart-zoom.d.ts +2 -205
  238. package/dist/components/chart-zoom.js +2 -330
  239. package/dist/components/chart-zoom.js.map +1 -1
  240. package/dist/components/chart.d.ts +11 -15
  241. package/dist/components/chart.js +11 -11
  242. package/dist/components/chart.js.map +1 -1
  243. package/dist/components/checkbox-group.d.ts +6 -10
  244. package/dist/components/checkbox-group.js +10 -9
  245. package/dist/components/checkbox-group.js.map +1 -1
  246. package/dist/components/checkbox.d.ts +8 -12
  247. package/dist/components/checkbox.js +20 -18
  248. package/dist/components/checkbox.js.map +1 -1
  249. package/dist/components/chip-input.d.ts +69 -0
  250. package/dist/components/chip-input.js +220 -0
  251. package/dist/components/chip-input.js.map +1 -0
  252. package/dist/components/chip-labels.d.ts +2 -0
  253. package/dist/components/chip-labels.js +12 -0
  254. package/dist/components/chip-labels.js.map +1 -0
  255. package/dist/components/chip.d.ts +18 -93
  256. package/dist/components/chip.js +74 -426
  257. package/dist/components/chip.js.map +1 -1
  258. package/dist/components/choice-card.d.ts +21 -18
  259. package/dist/components/choice-card.js +45 -45
  260. package/dist/components/choice-card.js.map +1 -1
  261. package/dist/components/column-mapper-labels.d.ts +5 -0
  262. package/dist/components/column-mapper-labels.js +34 -0
  263. package/dist/components/column-mapper-labels.js.map +1 -0
  264. package/dist/components/column-mapper.d.ts +15 -17
  265. package/dist/components/column-mapper.js +11 -37
  266. package/dist/components/column-mapper.js.map +1 -1
  267. package/dist/components/combobox-core.d.ts +79 -40
  268. package/dist/components/combobox-core.js +187 -121
  269. package/dist/components/combobox-core.js.map +1 -1
  270. package/dist/components/combobox-suggestions.d.ts +76 -0
  271. package/dist/components/combobox-suggestions.js +56 -0
  272. package/dist/components/combobox-suggestions.js.map +1 -0
  273. package/dist/components/combobox.d.ts +15 -160
  274. package/dist/components/combobox.js +40 -507
  275. package/dist/components/combobox.js.map +1 -1
  276. package/dist/components/confirm-dialog-labels.d.ts +7 -0
  277. package/dist/components/confirm-dialog-labels.js +10 -0
  278. package/dist/components/confirm-dialog-labels.js.map +1 -0
  279. package/dist/components/confirm-dialog.d.ts +165 -101
  280. package/dist/components/confirm-dialog.js +2 -6
  281. package/dist/components/confirm-dialog.js.map +1 -1
  282. package/dist/components/copy-button-labels.d.ts +2 -0
  283. package/dist/components/copy-button-labels.js +12 -0
  284. package/dist/components/copy-button-labels.js.map +1 -0
  285. package/dist/components/copy-button.d.ts +74 -101
  286. package/dist/components/copy-button.js +4 -9
  287. package/dist/components/copy-button.js.map +1 -1
  288. package/dist/components/country-select-labels.d.ts +2 -0
  289. package/dist/components/country-select-labels.js +10 -0
  290. package/dist/components/country-select-labels.js.map +1 -0
  291. package/dist/components/country-select.d.ts +18 -15
  292. package/dist/components/country-select.js +49 -64
  293. package/dist/components/country-select.js.map +1 -1
  294. package/dist/components/currency-option-list.d.ts +58 -0
  295. package/dist/components/currency-option-list.js +107 -0
  296. package/dist/components/currency-option-list.js.map +1 -0
  297. package/dist/components/currency-select.d.ts +10 -30
  298. package/dist/components/currency-select.js +50 -133
  299. package/dist/components/currency-select.js.map +1 -1
  300. package/dist/components/danger-confirm-labels.d.ts +14 -0
  301. package/dist/components/danger-confirm-labels.js +17 -0
  302. package/dist/components/danger-confirm-labels.js.map +1 -0
  303. package/dist/components/danger-confirm.d.ts +448 -101
  304. package/dist/components/danger-confirm.js +40 -46
  305. package/dist/components/danger-confirm.js.map +1 -1
  306. package/dist/components/data-table-cells.d.ts +9 -24
  307. package/dist/components/data-table-cells.js +1 -1
  308. package/dist/components/data-table-cells.js.map +1 -1
  309. package/dist/components/data-table-column-settings.d.ts +16 -0
  310. package/dist/components/data-table-column-settings.js +119 -0
  311. package/dist/components/data-table-column-settings.js.map +1 -0
  312. package/dist/components/data-table-filter-popover.d.ts +5 -19
  313. package/dist/components/data-table-filter-popover.js +40 -23
  314. package/dist/components/data-table-filter-popover.js.map +1 -1
  315. package/dist/components/data-table-filters.d.ts +93 -15
  316. package/dist/components/data-table-filters.js +22 -7
  317. package/dist/components/data-table-filters.js.map +1 -1
  318. package/dist/components/data-table-head.d.ts +36 -0
  319. package/dist/components/data-table-head.js +190 -0
  320. package/dist/components/data-table-head.js.map +1 -0
  321. package/dist/components/data-table-labels.d.ts +83 -15
  322. package/dist/components/data-table-labels.js +4 -29
  323. package/dist/components/data-table-labels.js.map +1 -1
  324. package/dist/components/data-table-mobile.d.ts +106 -0
  325. package/dist/components/data-table-mobile.js +412 -0
  326. package/dist/components/data-table-mobile.js.map +1 -0
  327. package/dist/components/data-table-pagination.d.ts +6 -21
  328. package/dist/components/data-table-pagination.js +7 -7
  329. package/dist/components/data-table-pagination.js.map +1 -1
  330. package/dist/components/data-table-resize.d.ts +37 -0
  331. package/dist/components/data-table-resize.js +103 -0
  332. package/dist/components/data-table-resize.js.map +1 -0
  333. package/dist/components/data-table-row-actions.d.ts +24 -0
  334. package/dist/components/data-table-row-actions.js +95 -0
  335. package/dist/components/data-table-row-actions.js.map +1 -0
  336. package/dist/components/data-table-selection.d.ts +21 -0
  337. package/dist/components/data-table-selection.js +30 -0
  338. package/dist/components/data-table-selection.js.map +1 -0
  339. package/dist/components/data-table-shared.d.ts +93 -0
  340. package/dist/components/data-table-shared.js +99 -0
  341. package/dist/components/data-table-shared.js.map +1 -0
  342. package/dist/components/data-table-sort.d.ts +8 -10
  343. package/dist/components/data-table.d.ts +613 -15
  344. package/dist/components/data-table.js +150 -939
  345. package/dist/components/data-table.js.map +1 -1
  346. package/dist/components/date-field.d.ts +203 -0
  347. package/dist/components/date-field.js +270 -0
  348. package/dist/components/date-field.js.map +1 -0
  349. package/dist/components/date-picker.d.ts +6 -261
  350. package/dist/components/date-picker.js +24 -760
  351. package/dist/components/date-picker.js.map +1 -1
  352. package/dist/components/date-range-picker.d.ts +125 -0
  353. package/dist/components/date-range-picker.js +261 -0
  354. package/dist/components/date-range-picker.js.map +1 -0
  355. package/dist/components/description-list-labels.d.ts +2 -0
  356. package/dist/components/description-list-labels.js +8 -0
  357. package/dist/components/description-list-labels.js.map +1 -0
  358. package/dist/components/description-list.d.ts +13 -15
  359. package/dist/components/description-list.js +17 -11
  360. package/dist/components/description-list.js.map +1 -1
  361. package/dist/components/dialog-frame-labels.d.ts +2 -0
  362. package/dist/components/dialog-frame-labels.js +6 -0
  363. package/dist/components/dialog-frame-labels.js.map +1 -0
  364. package/dist/components/dialog-frame.d.ts +10 -12
  365. package/dist/components/dialog-frame.js +6 -6
  366. package/dist/components/dialog-frame.js.map +1 -1
  367. package/dist/components/disclosure.d.ts +6 -10
  368. package/dist/components/disclosure.js +11 -11
  369. package/dist/components/disclosure.js.map +1 -1
  370. package/dist/components/dropdown.d.ts +61 -30
  371. package/dist/components/dropdown.js +61 -30
  372. package/dist/components/dropdown.js.map +1 -1
  373. package/dist/components/empty-state.d.ts +64 -0
  374. package/dist/components/empty-state.js +70 -0
  375. package/dist/components/empty-state.js.map +1 -0
  376. package/dist/components/entity-combobox.d.ts +11 -12
  377. package/dist/components/entity-combobox.js +14 -13
  378. package/dist/components/entity-combobox.js.map +1 -1
  379. package/dist/components/error-boundary-labels.d.ts +2 -0
  380. package/dist/components/error-boundary-labels.js +19 -0
  381. package/dist/components/error-boundary-labels.js.map +1 -0
  382. package/dist/components/error-boundary.d.ts +17 -17
  383. package/dist/components/error-boundary.js +5 -17
  384. package/dist/components/error-boundary.js.map +1 -1
  385. package/dist/components/facing-pair.d.ts +7 -116
  386. package/dist/components/facing-pair.js +1 -1
  387. package/dist/components/facing-pair.js.map +1 -1
  388. package/dist/components/field-base.d.ts +255 -0
  389. package/dist/components/field-base.js +223 -0
  390. package/dist/components/field-base.js.map +1 -0
  391. package/dist/components/field-parts.d.ts +180 -87
  392. package/dist/components/field-parts.js +52 -33
  393. package/dist/components/field-parts.js.map +1 -1
  394. package/dist/components/field-strip.d.ts +12 -36
  395. package/dist/components/field-strip.js +24 -22
  396. package/dist/components/field-strip.js.map +1 -1
  397. package/dist/components/field-sync-labels.d.ts +2 -0
  398. package/dist/components/field-sync-labels.js +12 -0
  399. package/dist/components/field-sync-labels.js.map +1 -0
  400. package/dist/components/field-sync.d.ts +16 -19
  401. package/dist/components/field-sync.js +4 -14
  402. package/dist/components/field-sync.js.map +1 -1
  403. package/dist/components/field.d.ts +45 -10
  404. package/dist/components/field.js +10 -8
  405. package/dist/components/field.js.map +1 -1
  406. package/dist/components/file-button.d.ts +85 -101
  407. package/dist/components/file-button.js +23 -169
  408. package/dist/components/file-button.js.map +1 -1
  409. package/dist/components/file-dropzone.d.ts +9 -110
  410. package/dist/components/file-dropzone.js +22 -22
  411. package/dist/components/file-dropzone.js.map +1 -1
  412. package/dist/components/floating-panel-labels.d.ts +2 -0
  413. package/dist/components/floating-panel-labels.js +9 -0
  414. package/dist/components/floating-panel-labels.js.map +1 -0
  415. package/dist/components/floating-panel.d.ts +17 -21
  416. package/dist/components/floating-panel.js +19 -18
  417. package/dist/components/floating-panel.js.map +1 -1
  418. package/dist/components/focus-ring.d.ts +9 -6
  419. package/dist/components/focus-ring.js +2 -2
  420. package/dist/components/focus-ring.js.map +1 -1
  421. package/dist/components/form-actions-labels.d.ts +2 -0
  422. package/dist/components/form-actions-labels.js +10 -0
  423. package/dist/components/form-actions-labels.js.map +1 -0
  424. package/dist/components/form-actions.d.ts +280 -101
  425. package/dist/components/form-actions.js +10 -20
  426. package/dist/components/form-actions.js.map +1 -1
  427. package/dist/components/full-bleed-dialog.d.ts +7 -8
  428. package/dist/components/full-bleed-dialog.js +14 -13
  429. package/dist/components/full-bleed-dialog.js.map +1 -1
  430. package/dist/components/grouped-picker.d.ts +21 -16
  431. package/dist/components/grouped-picker.js +76 -62
  432. package/dist/components/grouped-picker.js.map +1 -1
  433. package/dist/components/help-popover.d.ts +60 -0
  434. package/dist/components/help-popover.js +48 -0
  435. package/dist/components/help-popover.js.map +1 -0
  436. package/dist/components/hover-menu.d.ts +12 -18
  437. package/dist/components/hover-menu.js +19 -18
  438. package/dist/components/hover-menu.js.map +1 -1
  439. package/dist/components/iban-input-labels.d.ts +2 -0
  440. package/dist/components/iban-input-labels.js +13 -0
  441. package/dist/components/iban-input-labels.js.map +1 -0
  442. package/dist/components/iban-input.d.ts +73 -101
  443. package/dist/components/iban-input.js +22 -15
  444. package/dist/components/iban-input.js.map +1 -1
  445. package/dist/components/icon-button.d.ts +300 -0
  446. package/dist/components/icon-button.js +465 -0
  447. package/dist/components/icon-button.js.map +1 -0
  448. package/dist/components/icon-picker-labels.d.ts +2 -0
  449. package/dist/components/icon-picker-labels.js +12 -0
  450. package/dist/components/icon-picker-labels.js.map +1 -0
  451. package/dist/components/icon-picker.d.ts +13 -13
  452. package/dist/components/icon-picker.js +18 -17
  453. package/dist/components/icon-picker.js.map +1 -1
  454. package/dist/components/image-grid-labels.d.ts +2 -0
  455. package/dist/components/image-grid-labels.js +10 -0
  456. package/dist/components/image-grid-labels.js.map +1 -0
  457. package/dist/components/image-grid.d.ts +12 -14
  458. package/dist/components/image-grid.js +6 -10
  459. package/dist/components/image-grid.js.map +1 -1
  460. package/dist/components/inline-edit-field-labels.d.ts +2 -0
  461. package/dist/components/inline-edit-field-labels.js +10 -0
  462. package/dist/components/inline-edit-field-labels.js.map +1 -0
  463. package/dist/components/inline-edit-field.d.ts +11 -13
  464. package/dist/components/inline-edit-field.js +11 -13
  465. package/dist/components/inline-edit-field.js.map +1 -1
  466. package/dist/components/inline-entity-combobox.d.ts +155 -0
  467. package/dist/components/inline-entity-combobox.js +467 -0
  468. package/dist/components/inline-entity-combobox.js.map +1 -0
  469. package/dist/components/input.d.ts +98 -0
  470. package/dist/components/input.js +219 -0
  471. package/dist/components/input.js.map +1 -0
  472. package/dist/components/jump-calendar.d.ts +8 -0
  473. package/dist/components/jump-calendar.js +274 -0
  474. package/dist/components/jump-calendar.js.map +1 -0
  475. package/dist/components/language-select.d.ts +20 -111
  476. package/dist/components/language-select.js +12 -7
  477. package/dist/components/language-select.js.map +1 -1
  478. package/dist/components/legal-labels.d.ts +2 -0
  479. package/dist/components/legal-labels.js +100 -0
  480. package/dist/components/legal-labels.js.map +1 -0
  481. package/dist/components/legal-page.d.ts +17 -118
  482. package/dist/components/legal-page.js +2 -2
  483. package/dist/components/legal-page.js.map +1 -1
  484. package/dist/components/legal.d.ts +353 -101
  485. package/dist/components/legal.js +7 -101
  486. package/dist/components/legal.js.map +1 -1
  487. package/dist/components/lightbox-labels.d.ts +2 -0
  488. package/dist/components/lightbox-labels.js +17 -0
  489. package/dist/components/lightbox-labels.js.map +1 -0
  490. package/dist/components/lightbox.d.ts +12 -14
  491. package/dist/components/lightbox.js +9 -19
  492. package/dist/components/lightbox.js.map +1 -1
  493. package/dist/components/line-items-labels.d.ts +2 -0
  494. package/dist/components/line-items-labels.js +13 -0
  495. package/dist/components/line-items-labels.js.map +1 -0
  496. package/dist/components/line-items.d.ts +16 -18
  497. package/dist/components/line-items.js +18 -26
  498. package/dist/components/line-items.js.map +1 -1
  499. package/dist/components/list-labels.d.ts +2 -0
  500. package/dist/components/list-labels.js +9 -0
  501. package/dist/components/list-labels.js.map +1 -0
  502. package/dist/components/list.d.ts +32 -21
  503. package/dist/components/list.js +41 -25
  504. package/dist/components/list.js.map +1 -1
  505. package/dist/components/loading-state.d.ts +5 -9
  506. package/dist/components/loading-state.js +2 -2
  507. package/dist/components/loading-state.js.map +1 -1
  508. package/dist/components/measured-grid-labels.d.ts +4 -0
  509. package/dist/components/measured-grid-labels.js +21 -0
  510. package/dist/components/measured-grid-labels.js.map +1 -0
  511. package/dist/components/measured-grid.d.ts +13 -17
  512. package/dist/components/measured-grid.js +31 -50
  513. package/dist/components/measured-grid.js.map +1 -1
  514. package/dist/components/menu-item.d.ts +10 -10
  515. package/dist/components/menu-item.js +9 -9
  516. package/dist/components/menu-item.js.map +1 -1
  517. package/dist/components/mini-calendar-labels.d.ts +4 -0
  518. package/dist/components/mini-calendar-labels.js +14 -0
  519. package/dist/components/mini-calendar-labels.js.map +1 -0
  520. package/dist/components/mini-calendar.d.ts +10 -14
  521. package/dist/components/mini-calendar.js +22 -29
  522. package/dist/components/mini-calendar.js.map +1 -1
  523. package/dist/components/modal.d.ts +34 -18
  524. package/dist/components/modal.js +13 -13
  525. package/dist/components/modal.js.map +1 -1
  526. package/dist/components/money-draft.d.ts +34 -0
  527. package/dist/components/money-draft.js +39 -0
  528. package/dist/components/money-draft.js.map +1 -0
  529. package/dist/components/money-field.d.ts +13 -111
  530. package/dist/components/money-field.js +6 -22
  531. package/dist/components/money-field.js.map +1 -1
  532. package/dist/components/month-picker-labels.d.ts +5 -0
  533. package/dist/components/month-picker-labels.js +18 -0
  534. package/dist/components/month-picker-labels.js.map +1 -0
  535. package/dist/components/month-picker.d.ts +15 -13
  536. package/dist/components/month-picker.js +34 -32
  537. package/dist/components/month-picker.js.map +1 -1
  538. package/dist/components/multi-entity-combobox.d.ts +9 -11
  539. package/dist/components/multi-entity-combobox.js +14 -13
  540. package/dist/components/multi-entity-combobox.js.map +1 -1
  541. package/dist/components/multi-select.d.ts +74 -25
  542. package/dist/components/multi-select.js +166 -197
  543. package/dist/components/multi-select.js.map +1 -1
  544. package/dist/components/nav-pills.d.ts +9 -10
  545. package/dist/components/nav-pills.js +53 -42
  546. package/dist/components/nav-pills.js.map +1 -1
  547. package/dist/components/number-field.d.ts +6 -111
  548. package/dist/components/number-field.js +2 -3
  549. package/dist/components/number-field.js.map +1 -1
  550. package/dist/components/number-input.d.ts +28 -112
  551. package/dist/components/number-input.js +33 -67
  552. package/dist/components/number-input.js.map +1 -1
  553. package/dist/components/numeric-field.d.ts +85 -0
  554. package/dist/components/numeric-field.js +71 -0
  555. package/dist/components/numeric-field.js.map +1 -0
  556. package/dist/components/numpad-sheet.d.ts +5 -108
  557. package/dist/components/numpad-sheet.js +7 -7
  558. package/dist/components/numpad-sheet.js.map +1 -1
  559. package/dist/components/one-time-code-input.d.ts +6 -7
  560. package/dist/components/one-time-code-input.js +119 -124
  561. package/dist/components/one-time-code-input.js.map +1 -1
  562. package/dist/components/page-contents-labels.d.ts +2 -0
  563. package/dist/components/page-contents-labels.js +8 -0
  564. package/dist/components/page-contents-labels.js.map +1 -0
  565. package/dist/components/page-contents.d.ts +13 -15
  566. package/dist/components/page-contents.js +7 -9
  567. package/dist/components/page-contents.js.map +1 -1
  568. package/dist/components/page-header.d.ts +10 -10
  569. package/dist/components/page-header.js +3 -3
  570. package/dist/components/page-header.js.map +1 -1
  571. package/dist/components/password-strength-labels.d.ts +2 -0
  572. package/dist/components/password-strength-labels.js +21 -0
  573. package/dist/components/password-strength-labels.js.map +1 -0
  574. package/dist/components/password-strength.d.ts +15 -17
  575. package/dist/components/password-strength.js +7 -22
  576. package/dist/components/password-strength.js.map +1 -1
  577. package/dist/components/phone-input-labels.d.ts +2 -0
  578. package/dist/components/phone-input-labels.js +9 -0
  579. package/dist/components/phone-input-labels.js.map +1 -0
  580. package/dist/components/phone-input.d.ts +75 -101
  581. package/dist/components/phone-input.js +20 -23
  582. package/dist/components/phone-input.js.map +1 -1
  583. package/dist/components/picker-sheet.d.ts +20 -8
  584. package/dist/components/picker-sheet.js +22 -11
  585. package/dist/components/picker-sheet.js.map +1 -1
  586. package/dist/components/pie-chart-labels.d.ts +2 -4
  587. package/dist/components/pie-chart.d.ts +8 -11
  588. package/dist/components/pie-chart.js +5 -5
  589. package/dist/components/pie-chart.js.map +1 -1
  590. package/dist/components/popover-labels.d.ts +2 -0
  591. package/dist/components/popover-labels.js +11 -0
  592. package/dist/components/popover-labels.js.map +1 -0
  593. package/dist/components/popover.d.ts +13 -11
  594. package/dist/components/popover.js +15 -21
  595. package/dist/components/popover.js.map +1 -1
  596. package/dist/components/progress-bar-labels.d.ts +2 -0
  597. package/dist/components/progress-bar-labels.js +9 -0
  598. package/dist/components/progress-bar-labels.js.map +1 -0
  599. package/dist/components/progress-bar.d.ts +16 -15
  600. package/dist/components/progress-bar.js +22 -20
  601. package/dist/components/progress-bar.js.map +1 -1
  602. package/dist/components/qr-code.d.ts +4 -8
  603. package/dist/components/qr-code.js.map +1 -1
  604. package/dist/components/reauth-dialog-labels.d.ts +2 -0
  605. package/dist/components/reauth-dialog-labels.js +12 -0
  606. package/dist/components/reauth-dialog-labels.js.map +1 -0
  607. package/dist/components/reauth-dialog.d.ts +8 -10
  608. package/dist/components/reauth-dialog.js +3 -8
  609. package/dist/components/reauth-dialog.js.map +1 -1
  610. package/dist/components/row-actions-labels.d.ts +2 -0
  611. package/dist/components/row-actions-labels.js +9 -0
  612. package/dist/components/row-actions-labels.js.map +1 -0
  613. package/dist/components/row-actions.d.ts +224 -101
  614. package/dist/components/row-actions.js +4 -5
  615. package/dist/components/row-actions.js.map +1 -1
  616. package/dist/components/scroll-area.d.ts +6 -9
  617. package/dist/components/scroll-area.js +4 -10
  618. package/dist/components/scroll-area.js.map +1 -1
  619. package/dist/components/search-field.d.ts +12 -27
  620. package/dist/components/search-field.js +13 -16
  621. package/dist/components/search-field.js.map +1 -1
  622. package/dist/components/select.d.ts +69 -0
  623. package/dist/components/select.js +164 -0
  624. package/dist/components/select.js.map +1 -0
  625. package/dist/components/separator.d.ts +3 -7
  626. package/dist/components/separator.js.map +1 -1
  627. package/dist/components/series-chart-axes.d.ts +120 -0
  628. package/dist/components/series-chart-axes.js +164 -0
  629. package/dist/components/series-chart-axes.js.map +1 -0
  630. package/dist/components/series-chart-budget.d.ts +8 -9
  631. package/dist/components/series-chart-labels.d.ts +2 -4
  632. package/dist/components/series-chart-thin.d.ts +34 -0
  633. package/dist/components/series-chart-thin.js +103 -0
  634. package/dist/components/series-chart-thin.js.map +1 -0
  635. package/dist/components/series-chart-ticks.d.ts +9 -11
  636. package/dist/components/series-chart.d.ts +64 -214
  637. package/dist/components/series-chart.js +69 -160
  638. package/dist/components/series-chart.js.map +1 -1
  639. package/dist/components/server-wake-labels.d.ts +2 -0
  640. package/dist/components/server-wake-labels.js +9 -0
  641. package/dist/components/server-wake-labels.js.map +1 -0
  642. package/dist/components/server-wake.d.ts +29 -26
  643. package/dist/components/server-wake.js +15 -35
  644. package/dist/components/server-wake.js.map +1 -1
  645. package/dist/components/settings-fields.d.ts +50 -120
  646. package/dist/components/settings-fields.js +13 -3
  647. package/dist/components/settings-fields.js.map +1 -1
  648. package/dist/components/share-card-labels.d.ts +2 -0
  649. package/dist/components/share-card-labels.js +29 -0
  650. package/dist/components/share-card-labels.js.map +1 -0
  651. package/dist/components/share-card.d.ts +188 -101
  652. package/dist/components/share-card.js +16 -34
  653. package/dist/components/share-card.js.map +1 -1
  654. package/dist/components/sign-chip-labels.d.ts +2 -0
  655. package/dist/components/sign-chip-labels.js +11 -0
  656. package/dist/components/sign-chip-labels.js.map +1 -0
  657. package/dist/components/sign-chip.d.ts +7 -9
  658. package/dist/components/sign-chip.js +2 -7
  659. package/dist/components/sign-chip.js.map +1 -1
  660. package/dist/components/signature-pad-labels.d.ts +2 -0
  661. package/dist/components/signature-pad-labels.js +23 -0
  662. package/dist/components/signature-pad-labels.js.map +1 -0
  663. package/dist/components/signature-pad.d.ts +16 -15
  664. package/dist/components/signature-pad.js +22 -35
  665. package/dist/components/signature-pad.js.map +1 -1
  666. package/dist/components/signed-amount-labels.d.ts +2 -0
  667. package/dist/components/signed-amount-labels.js +9 -0
  668. package/dist/components/signed-amount-labels.js.map +1 -0
  669. package/dist/components/signed-amount.d.ts +19 -21
  670. package/dist/components/signed-amount.js +12 -15
  671. package/dist/components/signed-amount.js.map +1 -1
  672. package/dist/components/skeleton.d.ts +5 -9
  673. package/dist/components/skeleton.js +1 -1
  674. package/dist/components/skeleton.js.map +1 -1
  675. package/dist/components/slider.d.ts +16 -11
  676. package/dist/components/slider.js +23 -18
  677. package/dist/components/slider.js.map +1 -1
  678. package/dist/components/sparkline-labels.d.ts +2 -0
  679. package/dist/components/sparkline-labels.js +13 -0
  680. package/dist/components/sparkline-labels.js.map +1 -0
  681. package/dist/components/sparkline.d.ts +10 -12
  682. package/dist/components/sparkline.js +10 -17
  683. package/dist/components/sparkline.js.map +1 -1
  684. package/dist/components/spinner.d.ts +45 -0
  685. package/dist/components/spinner.js +39 -0
  686. package/dist/components/spinner.js.map +1 -0
  687. package/dist/components/stat-tile-labels.d.ts +2 -0
  688. package/dist/components/stat-tile-labels.js +14 -0
  689. package/dist/components/stat-tile-labels.js.map +1 -0
  690. package/dist/components/stat-tile.d.ts +21 -17
  691. package/dist/components/stat-tile.js +25 -32
  692. package/dist/components/stat-tile.js.map +1 -1
  693. package/dist/components/status-dot.d.ts +8 -20
  694. package/dist/components/status-dot.js +13 -12
  695. package/dist/components/status-dot.js.map +1 -1
  696. package/dist/components/swatch-picker-labels.d.ts +2 -0
  697. package/dist/components/swatch-picker-labels.js +9 -0
  698. package/dist/components/swatch-picker-labels.js.map +1 -0
  699. package/dist/components/swatch-picker.d.ts +14 -14
  700. package/dist/components/swatch-picker.js +14 -8
  701. package/dist/components/swatch-picker.js.map +1 -1
  702. package/dist/components/swipeable-row.d.ts +11 -39
  703. package/dist/components/swipeable-row.js +13 -18
  704. package/dist/components/swipeable-row.js.map +1 -1
  705. package/dist/components/switch.d.ts +10 -13
  706. package/dist/components/switch.js +13 -12
  707. package/dist/components/switch.js.map +1 -1
  708. package/dist/components/table.d.ts +28 -31
  709. package/dist/components/table.js +15 -15
  710. package/dist/components/table.js.map +1 -1
  711. package/dist/components/tabs.d.ts +182 -0
  712. package/dist/components/tabs.js +312 -0
  713. package/dist/components/tabs.js.map +1 -0
  714. package/dist/components/text-link.d.ts +17 -119
  715. package/dist/components/text-link.js +7 -7
  716. package/dist/components/text-link.js.map +1 -1
  717. package/dist/components/text.d.ts +14 -13
  718. package/dist/components/text.js +5 -5
  719. package/dist/components/text.js.map +1 -1
  720. package/dist/components/textarea.d.ts +20 -0
  721. package/dist/components/textarea.js +161 -0
  722. package/dist/components/textarea.js.map +1 -0
  723. package/dist/components/tile-radio.d.ts +6 -10
  724. package/dist/components/tile-radio.js +6 -6
  725. package/dist/components/tile-radio.js.map +1 -1
  726. package/dist/components/time-input.d.ts +5 -108
  727. package/dist/components/time-input.js +14 -5
  728. package/dist/components/time-input.js.map +1 -1
  729. package/dist/components/toast-labels.d.ts +2 -0
  730. package/dist/components/toast-labels.js +11 -0
  731. package/dist/components/toast-labels.js.map +1 -0
  732. package/dist/components/toast.d.ts +21 -23
  733. package/dist/components/toast.js +1 -6
  734. package/dist/components/toast.js.map +1 -1
  735. package/dist/components/toggle-group.d.ts +26 -26
  736. package/dist/components/toggle-group.js +43 -19
  737. package/dist/components/toggle-group.js.map +1 -1
  738. package/dist/components/toggle-legend.d.ts +18 -21
  739. package/dist/components/toggle-legend.js +3 -3
  740. package/dist/components/toggle-legend.js.map +1 -1
  741. package/dist/components/tooltip.d.ts +24 -15
  742. package/dist/components/tooltip.js +24 -14
  743. package/dist/components/tooltip.js.map +1 -1
  744. package/dist/components/translation-review-editor.d.ts +8 -10
  745. package/dist/components/translation-review-editor.js +6 -5
  746. package/dist/components/translation-review-editor.js.map +1 -1
  747. package/dist/components/translation-review-labels.d.ts +4 -7
  748. package/dist/components/translation-review-parts.d.ts +19 -28
  749. package/dist/components/translation-review-parts.js +4 -7
  750. package/dist/components/translation-review-parts.js.map +1 -1
  751. package/dist/components/translation-review.d.ts +35 -25
  752. package/dist/components/translation-review.js +24 -13
  753. package/dist/components/translation-review.js.map +1 -1
  754. package/dist/components/tree-view.d.ts +7 -11
  755. package/dist/components/tree-view.js +8 -8
  756. package/dist/components/tree-view.js.map +1 -1
  757. package/dist/components/treemap.d.ts +9 -13
  758. package/dist/components/trigger-aria.d.ts +2 -4
  759. package/dist/components/ui-labels.d.ts +5 -0
  760. package/dist/components/ui-labels.js +20 -0
  761. package/dist/components/ui-labels.js.map +1 -0
  762. package/dist/components/use-anchor-dir.d.ts +3 -6
  763. package/dist/components/use-mobile-reveal.d.ts +2 -6
  764. package/dist/components/use-table-state.d.ts +182 -15
  765. package/dist/components/use-table-state.js +53 -8
  766. package/dist/components/use-table-state.js.map +1 -1
  767. package/dist/components/user-avatar.d.ts +10 -23
  768. package/dist/components/user-avatar.js +1 -1
  769. package/dist/components/user-avatar.js.map +1 -1
  770. package/dist/components/wizard-stepper.d.ts +4 -7
  771. package/dist/components/wizard-stepper.js +3 -3
  772. package/dist/components/wizard-stepper.js.map +1 -1
  773. package/dist/components/write-lock-labels.d.ts +2 -0
  774. package/dist/components/write-lock-labels.js +8 -0
  775. package/dist/components/write-lock-labels.js.map +1 -0
  776. package/dist/components/write-lock.d.ts +16 -18
  777. package/dist/components/write-lock.js +4 -8
  778. package/dist/components/write-lock.js.map +1 -1
  779. package/dist/currencies.d.ts +23 -0
  780. package/dist/currencies.js +38 -0
  781. package/dist/currencies.js.map +1 -0
  782. package/dist/data-table.d.ts +10 -18
  783. package/dist/data-table.js.map +1 -1
  784. package/dist/demo/demo-banner.d.ts +15 -13
  785. package/dist/demo/demo-banner.js +5 -19
  786. package/dist/demo/demo-banner.js.map +1 -1
  787. package/dist/demo/demo-countdown.d.ts +7 -9
  788. package/dist/demo/demo-ended.d.ts +10 -13
  789. package/dist/demo/demo-ended.js +4 -4
  790. package/dist/demo/demo-ended.js.map +1 -1
  791. package/dist/demo/demo-labels.d.ts +4 -5
  792. package/dist/demo/demo-labels.js.map +1 -1
  793. package/dist/demo/demo-session.d.ts +3 -5
  794. package/dist/demo/demo-start.d.ts +8 -11
  795. package/dist/demo/demo-start.js +3 -2
  796. package/dist/demo/demo-start.js.map +1 -1
  797. package/dist/eslint/index.d.ts +83 -0
  798. package/dist/eslint/index.js +69 -0
  799. package/dist/eslint/index.js.map +1 -0
  800. package/dist/eslint/role-utilities.d.ts +48 -0
  801. package/dist/eslint/role-utilities.generated.d.ts +2 -0
  802. package/dist/eslint/role-utilities.generated.js +143 -0
  803. package/dist/eslint/role-utilities.generated.js.map +1 -0
  804. package/dist/eslint/role-utilities.js +43 -0
  805. package/dist/eslint/role-utilities.js.map +1 -0
  806. package/dist/feedback/feedback-attachment-labels.d.ts +16 -0
  807. package/dist/feedback/feedback-attachment-labels.js +17 -0
  808. package/dist/feedback/feedback-attachment-labels.js.map +1 -0
  809. package/dist/feedback/feedback-attachment.d.ts +312 -101
  810. package/dist/feedback/feedback-attachment.js +31 -42
  811. package/dist/feedback/feedback-attachment.js.map +1 -1
  812. package/dist/feedback/feedback-capture.d.ts +2 -4
  813. package/dist/feedback/feedback-context-labels.d.ts +2 -0
  814. package/dist/feedback/feedback-context-labels.js +9 -0
  815. package/dist/feedback/feedback-context-labels.js.map +1 -0
  816. package/dist/feedback/feedback-context.d.ts +110 -101
  817. package/dist/feedback/feedback-context.js +4 -7
  818. package/dist/feedback/feedback-context.js.map +1 -1
  819. package/dist/feedback/feedback-crash.d.ts +8 -110
  820. package/dist/feedback/feedback-dialog-labels.d.ts +12 -0
  821. package/dist/feedback/feedback-dialog-labels.js +17 -0
  822. package/dist/feedback/feedback-dialog-labels.js.map +1 -0
  823. package/dist/feedback/feedback-dialog.d.ts +186 -101
  824. package/dist/feedback/feedback-dialog.js +8 -18
  825. package/dist/feedback/feedback-dialog.js.map +1 -1
  826. package/dist/feedback/feedback-inbox.d.ts +236 -101
  827. package/dist/feedback/feedback-inbox.js +31 -141
  828. package/dist/feedback/feedback-inbox.js.map +1 -1
  829. package/dist/feedback/feedback-labels.d.ts +83 -101
  830. package/dist/feedback/feedback-labels.js.map +1 -1
  831. package/dist/feedback/feedback-menu-labels.d.ts +2 -0
  832. package/dist/feedback/feedback-menu-labels.js +10 -0
  833. package/dist/feedback/feedback-menu-labels.js.map +1 -0
  834. package/dist/feedback/feedback-menu.d.ts +83 -101
  835. package/dist/feedback/feedback-menu.js +3 -7
  836. package/dist/feedback/feedback-menu.js.map +1 -1
  837. package/dist/feedback/feedback-record.d.ts +239 -101
  838. package/dist/feedback/feedback-record.js +7 -2
  839. package/dist/feedback/feedback-record.js.map +1 -1
  840. package/dist/feedback/feedback-row-detail-labels.d.ts +2 -0
  841. package/dist/feedback/feedback-row-detail-labels.js +31 -0
  842. package/dist/feedback/feedback-row-detail-labels.js.map +1 -0
  843. package/dist/feedback/feedback-row-detail.d.ts +315 -101
  844. package/dist/feedback/feedback-row-detail.js +11 -37
  845. package/dist/feedback/feedback-row-detail.js.map +1 -1
  846. package/dist/feedback/feedback-status-undo.d.ts +66 -101
  847. package/dist/feedback/feedback-status-undo.js.map +1 -1
  848. package/dist/feedback/feedback-submit-dialog.d.ts +39 -0
  849. package/dist/feedback/feedback-submit-dialog.js +66 -0
  850. package/dist/feedback/feedback-submit-dialog.js.map +1 -0
  851. package/dist/feedback/feedback-submit.d.ts +13 -109
  852. package/dist/feedback/feedback-submit.js +19 -40
  853. package/dist/feedback/feedback-submit.js.map +1 -1
  854. package/dist/feedback/feedback-swipe.d.ts +9 -110
  855. package/dist/feedback/feedback-swipe.js +1 -1
  856. package/dist/feedback/feedback-swipe.js.map +1 -1
  857. package/dist/feedback/feedback-table-labels.d.ts +2 -0
  858. package/dist/feedback/feedback-table-labels.js +26 -0
  859. package/dist/feedback/feedback-table-labels.js.map +1 -0
  860. package/dist/feedback/feedback-table.d.ts +314 -101
  861. package/dist/feedback/feedback-table.js +11 -31
  862. package/dist/feedback/feedback-table.js.map +1 -1
  863. package/dist/feedback/feedback-thread-labels.d.ts +3 -0
  864. package/dist/feedback/feedback-thread-labels.js +21 -0
  865. package/dist/feedback/feedback-thread-labels.js.map +1 -0
  866. package/dist/feedback/feedback-thread.d.ts +373 -101
  867. package/dist/feedback/feedback-thread.js +26 -35
  868. package/dist/feedback/feedback-thread.js.map +1 -1
  869. package/dist/feedback/feedback-vocabulary.d.ts +98 -0
  870. package/dist/feedback/feedback-vocabulary.js +143 -0
  871. package/dist/feedback/feedback-vocabulary.js.map +1 -0
  872. package/dist/feedback.d.ts +15 -105
  873. package/dist/hooks/use-anchored-panel.d.ts +77 -15
  874. package/dist/hooks/use-anchored-panel.js +34 -1
  875. package/dist/hooks/use-anchored-panel.js.map +1 -1
  876. package/dist/hooks/use-anchored-rect.d.ts +15 -6
  877. package/dist/hooks/use-anchored-rect.js +2 -1
  878. package/dist/hooks/use-anchored-rect.js.map +1 -1
  879. package/dist/hooks/use-announce.d.ts +4 -6
  880. package/dist/hooks/use-authed-src.d.ts +5 -7
  881. package/dist/hooks/use-authed-src.js +3 -7
  882. package/dist/hooks/use-authed-src.js.map +1 -1
  883. package/dist/hooks/use-body-scroll-lock.d.ts +1 -3
  884. package/dist/hooks/use-breakpoint.d.ts +16 -17
  885. package/dist/hooks/use-breakpoint.js.map +1 -1
  886. package/dist/hooks/use-close-transition.d.ts +8 -8
  887. package/dist/hooks/use-close-transition.js +5 -4
  888. package/dist/hooks/use-close-transition.js.map +1 -1
  889. package/dist/hooks/use-copy-to-clipboard.d.ts +5 -7
  890. package/dist/hooks/use-debounce.d.ts +13 -6
  891. package/dist/hooks/use-debounce.js.map +1 -1
  892. package/dist/hooks/use-dismiss.d.ts +50 -11
  893. package/dist/hooks/use-dismiss.js +80 -9
  894. package/dist/hooks/use-dismiss.js.map +1 -1
  895. package/dist/hooks/use-file-drop.d.ts +8 -110
  896. package/dist/hooks/use-file-drop.js +1 -1
  897. package/dist/hooks/use-file-drop.js.map +1 -1
  898. package/dist/hooks/use-file-picker-labels.d.ts +2 -0
  899. package/dist/hooks/use-file-picker-labels.js +25 -0
  900. package/dist/hooks/use-file-picker-labels.js.map +1 -0
  901. package/dist/hooks/use-file-picker.d.ts +164 -0
  902. package/dist/hooks/use-file-picker.js +149 -0
  903. package/dist/hooks/use-file-picker.js.map +1 -0
  904. package/dist/hooks/use-focus-trap.d.ts +2 -4
  905. package/dist/hooks/use-focus-trap.js +2 -1
  906. package/dist/hooks/use-focus-trap.js.map +1 -1
  907. package/dist/hooks/use-hotkey.d.ts +7 -9
  908. package/dist/hooks/use-large-text.d.ts +3 -5
  909. package/dist/hooks/use-media-query.d.ts +1 -3
  910. package/dist/hooks/use-noindex.d.ts +1 -3
  911. package/dist/hooks/use-overlay-history.d.ts +1 -3
  912. package/dist/hooks/use-row-swipe.d.ts +5 -8
  913. package/dist/hooks/use-search-param-state.d.ts +10 -11
  914. package/dist/hooks/use-windowed-rows.d.ts +4 -7
  915. package/dist/i18n/defaults.d.ts +11 -105
  916. package/dist/i18n/defaults.js +82 -82
  917. package/dist/i18n/defaults.js.map +1 -1
  918. package/dist/i18n/german.d.ts +2 -105
  919. package/dist/i18n/german.js +52 -8
  920. package/dist/i18n/german.js.map +1 -1
  921. package/dist/i18n/kit-labels.d.ts +619 -101
  922. package/dist/i18n/kit-labels.js +22 -97
  923. package/dist/i18n/kit-labels.js.map +1 -1
  924. package/dist/i18n/languages.d.ts +197 -101
  925. package/dist/i18n/locales/de-CH.d.ts +3 -106
  926. package/dist/i18n/locales/en.d.ts +4 -105
  927. package/dist/i18n/locales/en.js +1834 -4
  928. package/dist/i18n/locales/en.js.map +7 -1
  929. package/dist/i18n/locales/es.d.ts +3 -106
  930. package/dist/i18n/locales/es.js +52 -8
  931. package/dist/i18n/locales/es.js.map +1 -1
  932. package/dist/i18n/locales/fr.d.ts +3 -106
  933. package/dist/i18n/locales/fr.js +56 -10
  934. package/dist/i18n/locales/fr.js.map +1 -1
  935. package/dist/i18n/locales/hu.d.ts +3 -106
  936. package/dist/i18n/locales/hu.js +52 -8
  937. package/dist/i18n/locales/hu.js.map +1 -1
  938. package/dist/i18n/locales/it.d.ts +3 -106
  939. package/dist/i18n/locales/it.js +56 -10
  940. package/dist/i18n/locales/it.js.map +1 -1
  941. package/dist/i18n/locales/zh.d.ts +3 -106
  942. package/dist/i18n/locales/zh.js +51 -8
  943. package/dist/i18n/locales/zh.js.map +1 -1
  944. package/dist/i18n/plurals.d.ts +3 -5
  945. package/dist/i18n/review.d.ts +5 -107
  946. package/dist/i18n/review.js +4 -0
  947. package/dist/i18n/review.js.map +1 -1
  948. package/dist/i18n/shared-labels.d.ts +17 -0
  949. package/dist/i18n/shared-labels.js +111 -0
  950. package/dist/i18n/shared-labels.js.map +1 -0
  951. package/dist/i18n/swiss.d.ts +1 -3
  952. package/dist/index.d.ts +330 -249
  953. package/dist/index.js +188 -215
  954. package/dist/index.js.map +1 -1
  955. package/dist/landing/access.d.ts +7 -9
  956. package/dist/landing/access.js.map +1 -1
  957. package/dist/landing/landing-actions.d.ts +9 -109
  958. package/dist/landing/landing-actions.js +1 -1
  959. package/dist/landing/landing-actions.js.map +1 -1
  960. package/dist/landing/landing-labels.d.ts +4 -5
  961. package/dist/landing/landing-labels.js.map +1 -1
  962. package/dist/landing/landing-sections.d.ts +21 -121
  963. package/dist/landing/landing-sections.js +15 -15
  964. package/dist/landing/landing-sections.js.map +1 -1
  965. package/dist/landing/page-seo.d.ts +7 -9
  966. package/dist/landing/public-header.d.ts +10 -111
  967. package/dist/landing/public-header.js +1 -1
  968. package/dist/landing/public-header.js.map +1 -1
  969. package/dist/landing/routing.d.ts +16 -120
  970. package/dist/landing/routing.js +2 -6
  971. package/dist/landing/routing.js.map +1 -1
  972. package/dist/lib/calc.d.ts +7 -9
  973. package/dist/lib/chip-edge-snap.d.ts +10 -0
  974. package/dist/lib/chip-edge-snap.js +131 -0
  975. package/dist/lib/chip-edge-snap.js.map +1 -0
  976. package/dist/lib/clipping.d.ts +2 -4
  977. package/dist/lib/cn.d.ts +2 -5
  978. package/dist/lib/cn.js +6 -1
  979. package/dist/lib/cn.js.map +1 -1
  980. package/dist/lib/column-mapping.d.ts +10 -13
  981. package/dist/lib/countries.d.ts +3 -5
  982. package/dist/lib/dates.d.ts +25 -25
  983. package/dist/lib/dates.js.map +1 -1
  984. package/dist/lib/decimal-marks.d.ts +8 -8
  985. package/dist/lib/decimal-marks.js +1 -1
  986. package/dist/lib/decimal-marks.js.map +1 -1
  987. package/dist/lib/direction.d.ts +4 -6
  988. package/dist/lib/document-navigation.d.ts +1 -3
  989. package/dist/lib/download.d.ts +67 -0
  990. package/dist/lib/download.js +89 -0
  991. package/dist/lib/download.js.map +1 -0
  992. package/dist/lib/floating-stack.d.ts +8 -6
  993. package/dist/lib/floating-stack.js.map +1 -1
  994. package/dist/lib/format.d.ts +24 -23
  995. package/dist/lib/format.js +3 -3
  996. package/dist/lib/format.js.map +1 -1
  997. package/dist/lib/iban.d.ts +9 -11
  998. package/dist/lib/ime.d.ts +17 -0
  999. package/dist/lib/ime.js +13 -0
  1000. package/dist/lib/ime.js.map +1 -0
  1001. package/dist/lib/isin.d.ts +3 -5
  1002. package/dist/lib/logger.d.ts +4 -6
  1003. package/dist/lib/person-name.d.ts +3 -5
  1004. package/dist/lib/phone.d.ts +9 -11
  1005. package/dist/lib/presence.d.ts +15 -0
  1006. package/dist/lib/presence.js +8 -0
  1007. package/dist/lib/presence.js.map +1 -0
  1008. package/dist/lib/qr-encode.d.ts +4 -6
  1009. package/dist/lib/reduced-motion.d.ts +18 -0
  1010. package/dist/lib/reduced-motion.js +9 -0
  1011. package/dist/lib/reduced-motion.js.map +1 -0
  1012. package/dist/lib/refs.d.ts +13 -0
  1013. package/dist/lib/refs.js +15 -0
  1014. package/dist/lib/refs.js.map +1 -0
  1015. package/dist/lib/round.d.ts +22 -0
  1016. package/dist/lib/round.js +15 -0
  1017. package/dist/lib/round.js.map +1 -0
  1018. package/dist/lib/safe-storage.d.ts +14 -4
  1019. package/dist/lib/safe-storage.js +24 -9
  1020. package/dist/lib/safe-storage.js.map +1 -1
  1021. package/dist/lib/server-wake.d.ts +13 -14
  1022. package/dist/lib/session-refresh.d.ts +200 -0
  1023. package/dist/lib/session-refresh.js +187 -0
  1024. package/dist/lib/session-refresh.js.map +1 -0
  1025. package/dist/lib/strip-fade.d.ts +10 -13
  1026. package/dist/lib/table-text.d.ts +14 -16
  1027. package/dist/lib/text-match.d.ts +41 -0
  1028. package/dist/lib/text-match.js +23 -0
  1029. package/dist/lib/text-match.js.map +1 -0
  1030. package/dist/lib/translation-review.d.ts +44 -45
  1031. package/dist/lib/translation-review.js +3 -2
  1032. package/dist/lib/translation-review.js.map +1 -1
  1033. package/dist/rhf/fields.d.ts +131 -197
  1034. package/dist/rhf/fields.js +46 -54
  1035. package/dist/rhf/fields.js.map +1 -1
  1036. package/dist/rhf/form-core.d.ts +154 -0
  1037. package/dist/rhf/form-core.js +143 -0
  1038. package/dist/rhf/form-core.js.map +1 -0
  1039. package/dist/rhf/form.d.ts +9 -175
  1040. package/dist/rhf/form.js +2 -139
  1041. package/dist/rhf/form.js.map +1 -1
  1042. package/dist/rhf/line-items.d.ts +40 -11
  1043. package/dist/rhf/line-items.js.map +1 -1
  1044. package/dist/rhf/use-rhf-wizard-step.d.ts +3 -6
  1045. package/dist/rhf/use-rhf-wizard-step.js.map +1 -1
  1046. package/dist/rhf.d.ts +4 -118
  1047. package/dist/rhf.js.map +1 -1
  1048. package/dist/search/command-palette-labels.d.ts +2 -0
  1049. package/dist/search/command-palette-labels.js +15 -0
  1050. package/dist/search/command-palette-labels.js.map +1 -0
  1051. package/dist/search/command-palette.d.ts +10 -13
  1052. package/dist/search/command-palette.js +25 -44
  1053. package/dist/search/command-palette.js.map +1 -1
  1054. package/dist/search/global-search-labels.d.ts +2 -0
  1055. package/dist/search/global-search-labels.js +12 -0
  1056. package/dist/search/global-search-labels.js.map +1 -0
  1057. package/dist/search/global-search.d.ts +17 -16
  1058. package/dist/search/global-search.js +12 -12
  1059. package/dist/search/global-search.js.map +1 -1
  1060. package/dist/search/search-index.d.ts +13 -14
  1061. package/dist/search/search-index.js +2 -1
  1062. package/dist/search/search-index.js.map +1 -1
  1063. package/dist/search/use-command-key.d.ts +9 -0
  1064. package/dist/search/use-command-key.js +18 -0
  1065. package/dist/search/use-command-key.js.map +1 -0
  1066. package/dist/search.d.ts +3 -4
  1067. package/dist/settings/settings-card-classes.d.ts +11 -0
  1068. package/dist/settings/settings-card-classes.js +8 -0
  1069. package/dist/settings/settings-card-classes.js.map +1 -0
  1070. package/dist/settings/settings-catalogue.d.ts +11 -14
  1071. package/dist/settings/settings-context.d.ts +4 -8
  1072. package/dist/settings/settings-heading.d.ts +8 -12
  1073. package/dist/settings/settings-heading.js +1 -1
  1074. package/dist/settings/settings-heading.js.map +1 -1
  1075. package/dist/settings/settings-labels.d.ts +6 -7
  1076. package/dist/settings/settings-labels.js.map +1 -1
  1077. package/dist/settings/settings-layout.d.ts +36 -13
  1078. package/dist/settings/settings-layout.js +25 -4
  1079. package/dist/settings/settings-layout.js.map +1 -1
  1080. package/dist/settings/settings-section.d.ts +4 -107
  1081. package/dist/settings/settings-section.js +2 -2
  1082. package/dist/settings/settings-section.js.map +1 -1
  1083. package/dist/settings/use-account-appearance.d.ts +11 -16
  1084. package/dist/settings/use-account-language.d.ts +8 -10
  1085. package/dist/settings/use-settings-focus.d.ts +3 -5
  1086. package/dist/settings/use-settings-focus.js +2 -4
  1087. package/dist/settings/use-settings-focus.js.map +1 -1
  1088. package/dist/settings/use-settings-route.d.ts +11 -16
  1089. package/dist/shell/app-shell-labels.d.ts +2 -0
  1090. package/dist/shell/app-shell-labels.js +9 -0
  1091. package/dist/shell/app-shell-labels.js.map +1 -0
  1092. package/dist/shell/app-shell.d.ts +216 -101
  1093. package/dist/shell/app-shell.js +51 -35
  1094. package/dist/shell/app-shell.js.map +1 -1
  1095. package/dist/shell/auth-layout.d.ts +6 -9
  1096. package/dist/shell/auth-layout.js +6 -6
  1097. package/dist/shell/auth-layout.js.map +1 -1
  1098. package/dist/shell/company-switcher-labels.d.ts +2 -0
  1099. package/dist/shell/company-switcher-labels.js +12 -0
  1100. package/dist/shell/company-switcher-labels.js.map +1 -0
  1101. package/dist/shell/company-switcher.d.ts +9 -11
  1102. package/dist/shell/company-switcher.js +3 -9
  1103. package/dist/shell/company-switcher.js.map +1 -1
  1104. package/dist/shell/option-switcher-menu.d.ts +7 -9
  1105. package/dist/shell/option-switcher-menu.js +4 -4
  1106. package/dist/shell/option-switcher-menu.js.map +1 -1
  1107. package/dist/shell/role-switcher.d.ts +3 -7
  1108. package/dist/shell/role-switcher.js +3 -3
  1109. package/dist/shell/role-switcher.js.map +1 -1
  1110. package/dist/shell/top-bar-brand.d.ts +4 -107
  1111. package/dist/shell/top-bar-brand.js +1 -1
  1112. package/dist/shell/top-bar-brand.js.map +1 -1
  1113. package/dist/shell/top-bar.d.ts +6 -9
  1114. package/dist/shell/top-bar.js +1 -1
  1115. package/dist/shell/top-bar.js.map +1 -1
  1116. package/dist/shell/topbar-action-menu.d.ts +18 -31
  1117. package/dist/shell/topbar-action-menu.js +10 -10
  1118. package/dist/shell/topbar-action-menu.js.map +1 -1
  1119. package/dist/shell/topbar-controls.d.ts +14 -21
  1120. package/dist/shell/topbar-controls.js +11 -11
  1121. package/dist/shell/topbar-controls.js.map +1 -1
  1122. package/dist/shell.d.ts +25 -116
  1123. package/dist/shell.js.map +1 -1
  1124. package/dist/table-text.d.ts +1 -1
  1125. package/dist/testing/css-variables.d.ts +4 -6
  1126. package/dist/testing/css-variables.generated.d.ts +2 -4
  1127. package/dist/testing/index.d.ts +2 -1
  1128. package/dist/testing/index.js +11 -1
  1129. package/dist/testing/index.js.map +1 -1
  1130. package/dist/testing/viewport.d.ts +116 -0
  1131. package/dist/testing/viewport.js +203 -0
  1132. package/dist/testing/viewport.js.map +1 -0
  1133. package/dist/theme/chart-palette.d.ts +7 -9
  1134. package/dist/theme/color.d.ts +14 -16
  1135. package/dist/theme/color.js +2 -1
  1136. package/dist/theme/color.js.map +1 -1
  1137. package/dist/theme/contrast-tokens.d.ts +13 -17
  1138. package/dist/theme/contrast.d.ts +22 -27
  1139. package/dist/theme/palette-derive.d.ts +16 -22
  1140. package/dist/theme/palette-derive.js +15 -7
  1141. package/dist/theme/palette-derive.js.map +1 -1
  1142. package/dist/theme/palette-presets.d.ts +18 -15
  1143. package/dist/theme/palette-presets.js +66 -345
  1144. package/dist/theme/palette-presets.js.map +1 -1
  1145. package/dist/theme/palette-store.d.ts +10 -13
  1146. package/dist/theme/text-size.d.ts +21 -26
  1147. package/dist/theme/theme-store.d.ts +9 -14
  1148. package/dist/tour/tour-labels.d.ts +2 -0
  1149. package/dist/tour/tour-labels.js +13 -0
  1150. package/dist/tour/tour-labels.js.map +1 -0
  1151. package/dist/tour/tour.d.ts +12 -14
  1152. package/dist/tour/tour.js +9 -20
  1153. package/dist/tour/tour.js.map +1 -1
  1154. package/dist/tour.d.ts +1 -2
  1155. package/dist/wizard/stepper-nav.d.ts +8 -108
  1156. package/dist/wizard/stepper-nav.js +15 -14
  1157. package/dist/wizard/stepper-nav.js.map +1 -1
  1158. package/dist/wizard/types.d.ts +13 -18
  1159. package/dist/wizard/types.js +2 -24
  1160. package/dist/wizard/types.js.map +1 -1
  1161. package/dist/wizard/use-wizard.d.ts +2 -6
  1162. package/dist/wizard/validation.d.ts +3 -7
  1163. package/dist/wizard/wizard-context.d.ts +7 -11
  1164. package/dist/wizard/wizard-labels.d.ts +4 -0
  1165. package/dist/wizard/wizard-labels.js +24 -0
  1166. package/dist/wizard/wizard-labels.js.map +1 -0
  1167. package/dist/wizard/wizard-step.d.ts +3 -7
  1168. package/dist/wizard/wizard-step.js +2 -2
  1169. package/dist/wizard/wizard-step.js.map +1 -1
  1170. package/dist/wizard/wizard-summary.d.ts +5 -8
  1171. package/dist/wizard/wizard-summary.js +6 -5
  1172. package/dist/wizard/wizard-summary.js.map +1 -1
  1173. package/dist/wizard.d.ts +7 -107
  1174. package/package.json +17 -6
  1175. package/src/account/account-parts.ts +3 -3
  1176. package/src/{components → account}/account-settings-labels.ts +11 -1
  1177. package/src/{components → account}/account-settings.tsx +145 -34
  1178. package/src/account/data-export-setting-labels.ts +20 -0
  1179. package/src/account/data-export-setting.tsx +19 -38
  1180. package/src/account/delete-account-setting-labels.ts +33 -0
  1181. package/src/account/delete-account-setting.tsx +13 -35
  1182. package/src/account/email-change-setting-labels.ts +32 -0
  1183. package/src/account/email-change-setting.tsx +17 -36
  1184. package/src/{components → account}/passkeys-setting.tsx +14 -9
  1185. package/src/account/sessions-setting-labels.ts +24 -0
  1186. package/src/account/sessions-setting.tsx +14 -28
  1187. package/src/admin/admin-action-confirm-labels.ts +19 -0
  1188. package/src/admin/admin-action-confirm.tsx +59 -38
  1189. package/src/admin/admin-action-log-labels.ts +74 -0
  1190. package/src/admin/admin-action-log.tsx +180 -54
  1191. package/src/admin/admin-parts.ts +0 -7
  1192. package/src/admin/invitations-panel-labels.ts +31 -0
  1193. package/src/admin/invitations-panel.tsx +16 -34
  1194. package/src/admin/plan-change-labels.ts +23 -0
  1195. package/src/admin/plan-change.tsx +58 -34
  1196. package/src/admin/reviewer-scope-editor-labels.ts +16 -0
  1197. package/src/admin/reviewer-scope-editor.tsx +9 -15
  1198. package/src/admin/role-select-labels.ts +16 -0
  1199. package/src/admin/role-select.tsx +13 -23
  1200. package/src/admin/transfer-ownership-dialog-labels.ts +20 -0
  1201. package/src/admin/transfer-ownership-dialog.tsx +7 -17
  1202. package/src/admin/user-roster-labels.ts +17 -0
  1203. package/src/admin/user-roster.tsx +9 -17
  1204. package/src/auth/accept-invitation-labels.ts +21 -0
  1205. package/src/auth/accept-invitation.tsx +9 -20
  1206. package/src/auth/auth-errors.ts +29 -13
  1207. package/src/auth/complete-name-dialog-labels.ts +16 -0
  1208. package/src/auth/complete-name-dialog.tsx +8 -13
  1209. package/src/auth/forgot-password-form-labels.ts +20 -0
  1210. package/src/auth/forgot-password-form.tsx +12 -20
  1211. package/src/auth/new-password-fields.tsx +1 -1
  1212. package/src/auth/not-found-page-labels.ts +12 -0
  1213. package/src/auth/not-found-page.tsx +11 -14
  1214. package/src/auth/register-form-labels.ts +31 -0
  1215. package/src/auth/register-form.tsx +18 -38
  1216. package/src/auth/reset-password-form-labels.ts +27 -0
  1217. package/src/auth/reset-password-form.tsx +12 -27
  1218. package/src/auth/sign-in-form-labels.ts +44 -0
  1219. package/src/auth/sign-in-form.tsx +18 -51
  1220. package/src/auth/status-parts.tsx +3 -3
  1221. package/src/auth/verify-email-labels.ts +26 -0
  1222. package/src/auth/verify-email.tsx +15 -30
  1223. package/src/billing/billing-banner.tsx +7 -3
  1224. package/src/billing/billing-labels.ts +1 -1
  1225. package/src/billing/checkout-processing.ts +2 -12
  1226. package/src/billing/plan-card.tsx +26 -27
  1227. package/src/billing/plan-limit-notice.tsx +6 -3
  1228. package/src/billing/subscription-actions.tsx +4 -4
  1229. package/src/chart.ts +9 -1
  1230. package/src/components/account-chips-labels.ts +16 -0
  1231. package/src/components/account-chips.tsx +13 -16
  1232. package/src/components/alert-banner.tsx +39 -19
  1233. package/src/components/amount-input.tsx +458 -406
  1234. package/src/components/appearance-labels.ts +2 -2
  1235. package/src/components/authed-image-labels.ts +11 -0
  1236. package/src/components/authed-image.tsx +6 -8
  1237. package/src/components/autocomplete.tsx +79 -78
  1238. package/src/components/breadcrumbs-labels.ts +10 -0
  1239. package/src/components/breadcrumbs.tsx +17 -14
  1240. package/src/components/bulk-action-bar-labels.ts +11 -0
  1241. package/src/components/bulk-action-bar.tsx +15 -16
  1242. package/src/components/button-group.tsx +7 -7
  1243. package/src/components/button-look.ts +230 -0
  1244. package/src/components/button.tsx +339 -0
  1245. package/src/components/calculator.tsx +14 -12
  1246. package/src/components/calendar-heatmap-labels.ts +15 -0
  1247. package/src/components/calendar-heatmap.tsx +13 -19
  1248. package/src/components/card.tsx +381 -0
  1249. package/src/components/chart-zoom-core.tsx +653 -0
  1250. package/src/components/chart-zoom.tsx +21 -648
  1251. package/src/components/chart.tsx +11 -11
  1252. package/src/components/checkbox-group.tsx +13 -10
  1253. package/src/components/checkbox.tsx +43 -42
  1254. package/src/components/chip-input.tsx +370 -0
  1255. package/src/components/chip-labels.ts +13 -0
  1256. package/src/components/chip.tsx +115 -711
  1257. package/src/components/choice-card.tsx +83 -85
  1258. package/src/components/column-mapper-labels.ts +45 -0
  1259. package/src/components/column-mapper.tsx +16 -51
  1260. package/src/components/combobox-core.tsx +346 -194
  1261. package/src/components/combobox-suggestions.tsx +129 -0
  1262. package/src/components/combobox.tsx +70 -896
  1263. package/src/components/confirm-dialog-labels.ts +13 -0
  1264. package/src/components/confirm-dialog.tsx +4 -8
  1265. package/src/components/copy-button-labels.ts +13 -0
  1266. package/src/components/copy-button.tsx +15 -13
  1267. package/src/components/country-select-labels.ts +11 -0
  1268. package/src/components/country-select.tsx +74 -89
  1269. package/src/components/currency-option-list.tsx +182 -0
  1270. package/src/components/currency-select.tsx +85 -196
  1271. package/src/components/danger-confirm-labels.ts +20 -0
  1272. package/src/components/danger-confirm.tsx +72 -80
  1273. package/src/components/data-table-cells.tsx +5 -5
  1274. package/src/components/data-table-column-settings.tsx +137 -0
  1275. package/src/components/data-table-filter-popover.tsx +51 -25
  1276. package/src/components/data-table-filters.ts +48 -11
  1277. package/src/components/data-table-head.tsx +258 -0
  1278. package/src/components/data-table-labels.ts +21 -71
  1279. package/src/components/data-table-mobile.tsx +594 -0
  1280. package/src/components/data-table-pagination.tsx +11 -10
  1281. package/src/components/data-table-resize.ts +187 -0
  1282. package/src/components/data-table-row-actions.tsx +152 -0
  1283. package/src/components/data-table-selection.ts +55 -0
  1284. package/src/components/data-table-shared.tsx +225 -0
  1285. package/src/components/data-table.tsx +205 -1315
  1286. package/src/components/date-field.tsx +627 -0
  1287. package/src/components/date-picker.tsx +58 -1446
  1288. package/src/components/date-range-picker.tsx +490 -0
  1289. package/src/components/description-list-labels.ts +9 -0
  1290. package/src/components/description-list.tsx +31 -15
  1291. package/src/components/dialog-frame-labels.ts +7 -0
  1292. package/src/components/dialog-frame.tsx +11 -7
  1293. package/src/components/disclosure.tsx +14 -14
  1294. package/src/components/dropdown.tsx +129 -43
  1295. package/src/components/empty-state.tsx +137 -0
  1296. package/src/components/entity-combobox.tsx +18 -13
  1297. package/src/components/error-boundary-labels.ts +20 -0
  1298. package/src/components/error-boundary.tsx +10 -20
  1299. package/src/components/facing-pair.ts +1 -1
  1300. package/src/components/field-base.tsx +604 -0
  1301. package/src/components/field-parts.tsx +192 -77
  1302. package/src/components/field-strip.tsx +12 -33
  1303. package/src/components/field-sync-labels.ts +13 -0
  1304. package/src/components/field-sync.tsx +8 -16
  1305. package/src/components/field.tsx +17 -15
  1306. package/src/components/file-button.tsx +64 -412
  1307. package/src/components/file-dropzone.tsx +36 -33
  1308. package/src/components/floating-panel-labels.ts +10 -0
  1309. package/src/components/floating-panel.tsx +32 -21
  1310. package/src/components/focus-ring.ts +9 -4
  1311. package/src/components/form-actions-labels.ts +11 -0
  1312. package/src/components/form-actions.tsx +17 -21
  1313. package/src/components/full-bleed-dialog.tsx +28 -25
  1314. package/src/components/grouped-picker.tsx +118 -96
  1315. package/src/components/help-popover.tsx +115 -0
  1316. package/src/components/hover-menu.tsx +45 -38
  1317. package/src/components/iban-input-labels.ts +15 -0
  1318. package/src/components/iban-input.tsx +25 -20
  1319. package/src/components/icon-button.tsx +945 -0
  1320. package/src/components/icon-picker-labels.ts +13 -0
  1321. package/src/components/icon-picker.tsx +27 -24
  1322. package/src/components/image-grid-labels.ts +11 -0
  1323. package/src/components/image-grid.tsx +13 -15
  1324. package/src/components/inline-edit-field-labels.ts +11 -0
  1325. package/src/components/inline-edit-field.tsx +20 -19
  1326. package/src/components/inline-entity-combobox.tsx +789 -0
  1327. package/src/components/input.tsx +380 -0
  1328. package/src/components/jump-calendar.tsx +385 -0
  1329. package/src/components/language-select.tsx +31 -16
  1330. package/src/components/legal-labels.ts +99 -0
  1331. package/src/components/legal-page.tsx +2 -2
  1332. package/src/components/legal.tsx +11 -101
  1333. package/src/components/lightbox-labels.ts +18 -0
  1334. package/src/components/lightbox.tsx +13 -21
  1335. package/src/components/line-items-labels.ts +14 -0
  1336. package/src/components/line-items.tsx +24 -31
  1337. package/src/components/list-labels.ts +10 -0
  1338. package/src/components/list.tsx +98 -75
  1339. package/src/components/loading-state.tsx +4 -4
  1340. package/src/components/measured-grid-labels.ts +25 -0
  1341. package/src/components/measured-grid.tsx +39 -62
  1342. package/src/components/menu-item.tsx +29 -26
  1343. package/src/components/mini-calendar-labels.ts +17 -0
  1344. package/src/components/mini-calendar.tsx +38 -45
  1345. package/src/components/modal.tsx +49 -20
  1346. package/src/components/money-draft.ts +72 -0
  1347. package/src/components/money-field.tsx +16 -30
  1348. package/src/components/month-picker-labels.ts +22 -0
  1349. package/src/components/month-picker.tsx +59 -45
  1350. package/src/components/multi-entity-combobox.tsx +17 -12
  1351. package/src/components/multi-select.tsx +300 -292
  1352. package/src/components/nav-pills.tsx +19 -8
  1353. package/src/components/number-field.tsx +7 -5
  1354. package/src/components/number-input.tsx +69 -99
  1355. package/src/components/numeric-field.ts +161 -0
  1356. package/src/components/numpad-sheet.tsx +16 -16
  1357. package/src/components/one-time-code-input.tsx +154 -169
  1358. package/src/components/page-contents-labels.ts +9 -0
  1359. package/src/components/page-contents.tsx +15 -15
  1360. package/src/components/page-header.tsx +9 -5
  1361. package/src/components/password-strength-labels.ts +23 -0
  1362. package/src/components/password-strength.tsx +13 -27
  1363. package/src/components/phone-input-labels.ts +10 -0
  1364. package/src/components/phone-input.tsx +42 -57
  1365. package/src/components/picker-sheet.tsx +47 -18
  1366. package/src/components/pie-chart.tsx +11 -9
  1367. package/src/components/popover-labels.ts +14 -0
  1368. package/src/components/popover.tsx +36 -37
  1369. package/src/components/progress-bar-labels.ts +10 -0
  1370. package/src/components/progress-bar.tsx +32 -23
  1371. package/src/components/qr-code.tsx +2 -2
  1372. package/src/components/reauth-dialog-labels.ts +13 -0
  1373. package/src/components/reauth-dialog.tsx +7 -10
  1374. package/src/components/row-actions-labels.ts +10 -0
  1375. package/src/components/row-actions.tsx +11 -10
  1376. package/src/components/scroll-area.tsx +4 -10
  1377. package/src/components/search-field.tsx +35 -49
  1378. package/src/components/select.tsx +302 -0
  1379. package/src/components/separator.tsx +2 -2
  1380. package/src/components/series-chart-axes.ts +329 -0
  1381. package/src/components/series-chart-thin.ts +180 -0
  1382. package/src/components/series-chart.tsx +125 -326
  1383. package/src/components/server-wake-labels.ts +11 -0
  1384. package/src/components/server-wake.tsx +39 -66
  1385. package/src/components/settings-fields.tsx +50 -19
  1386. package/src/components/share-card-labels.ts +30 -0
  1387. package/src/components/share-card.tsx +22 -37
  1388. package/src/components/sign-chip-labels.ts +12 -0
  1389. package/src/components/sign-chip.tsx +6 -9
  1390. package/src/components/signature-pad-labels.ts +24 -0
  1391. package/src/components/signature-pad.tsx +48 -57
  1392. package/src/components/signed-amount-labels.ts +10 -0
  1393. package/src/components/signed-amount.tsx +21 -22
  1394. package/src/components/skeleton.tsx +1 -1
  1395. package/src/components/slider.tsx +51 -39
  1396. package/src/components/sparkline-labels.ts +14 -0
  1397. package/src/components/sparkline.tsx +16 -21
  1398. package/src/components/spinner.tsx +81 -0
  1399. package/src/components/stat-tile-labels.ts +15 -0
  1400. package/src/components/stat-tile.tsx +39 -38
  1401. package/src/components/status-dot.tsx +17 -14
  1402. package/src/components/swatch-picker-labels.ts +10 -0
  1403. package/src/components/swatch-picker.tsx +23 -16
  1404. package/src/components/swipeable-row.tsx +17 -39
  1405. package/src/components/switch.tsx +33 -32
  1406. package/src/components/table.tsx +15 -15
  1407. package/src/components/tabs.tsx +660 -0
  1408. package/src/components/text-link.tsx +7 -7
  1409. package/src/components/text.tsx +10 -6
  1410. package/src/components/textarea.tsx +323 -0
  1411. package/src/components/tile-radio.tsx +6 -6
  1412. package/src/components/time-input.tsx +15 -7
  1413. package/src/components/toast-labels.ts +12 -0
  1414. package/src/components/toast.tsx +5 -8
  1415. package/src/components/toggle-group.tsx +105 -42
  1416. package/src/components/toggle-legend.tsx +6 -6
  1417. package/src/components/tooltip.tsx +47 -27
  1418. package/src/components/translation-review-editor.tsx +8 -7
  1419. package/src/components/translation-review-parts.tsx +9 -13
  1420. package/src/components/translation-review.tsx +50 -20
  1421. package/src/components/tree-view.tsx +14 -12
  1422. package/src/components/ui-labels.ts +22 -0
  1423. package/src/components/use-table-state.ts +91 -10
  1424. package/src/components/user-avatar.tsx +5 -5
  1425. package/src/components/wizard-stepper.tsx +7 -6
  1426. package/src/components/write-lock-labels.ts +9 -0
  1427. package/src/components/write-lock.tsx +10 -12
  1428. package/src/currencies.ts +70 -0
  1429. package/src/data-table.ts +4 -0
  1430. package/src/demo/demo-banner.tsx +16 -27
  1431. package/src/demo/demo-ended.tsx +8 -7
  1432. package/src/demo/demo-labels.ts +2 -2
  1433. package/src/demo/demo-start.tsx +7 -5
  1434. package/src/eslint/index.ts +161 -0
  1435. package/src/eslint/role-utilities.generated.ts +146 -0
  1436. package/src/eslint/role-utilities.ts +99 -0
  1437. package/src/feedback/feedback-attachment-labels.ts +36 -0
  1438. package/src/feedback/feedback-attachment.tsx +42 -66
  1439. package/src/feedback/feedback-context-labels.ts +10 -0
  1440. package/src/feedback/feedback-context.tsx +8 -9
  1441. package/src/feedback/feedback-dialog-labels.ts +28 -0
  1442. package/src/feedback/feedback-dialog.tsx +14 -44
  1443. package/src/feedback/feedback-inbox.tsx +49 -252
  1444. package/src/feedback/feedback-labels.ts +5 -5
  1445. package/src/feedback/feedback-menu-labels.ts +11 -0
  1446. package/src/feedback/feedback-menu.tsx +13 -11
  1447. package/src/feedback/feedback-record.ts +21 -7
  1448. package/src/feedback/feedback-row-detail-labels.ts +33 -0
  1449. package/src/feedback/feedback-row-detail.tsx +30 -43
  1450. package/src/feedback/feedback-status-undo.ts +3 -2
  1451. package/src/feedback/feedback-submit-dialog.tsx +109 -0
  1452. package/src/feedback/feedback-submit.tsx +45 -55
  1453. package/src/feedback/feedback-swipe.tsx +1 -1
  1454. package/src/feedback/feedback-table-labels.ts +27 -0
  1455. package/src/feedback/feedback-table.tsx +24 -40
  1456. package/src/feedback/feedback-thread-labels.ts +22 -0
  1457. package/src/feedback/feedback-thread.tsx +46 -50
  1458. package/src/feedback/feedback-vocabulary.ts +252 -0
  1459. package/src/hooks/use-anchored-panel.ts +102 -2
  1460. package/src/hooks/use-anchored-rect.ts +11 -9
  1461. package/src/hooks/use-authed-src.ts +13 -7
  1462. package/src/hooks/use-breakpoint.ts +5 -4
  1463. package/src/hooks/use-close-transition.ts +9 -10
  1464. package/src/hooks/use-debounce.ts +9 -0
  1465. package/src/hooks/use-dismiss.ts +210 -18
  1466. package/src/hooks/use-file-drop.ts +2 -2
  1467. package/src/hooks/use-file-picker-labels.ts +29 -0
  1468. package/src/hooks/use-file-picker.tsx +363 -0
  1469. package/src/hooks/use-focus-trap.ts +19 -6
  1470. package/src/i18n/defaults.ts +91 -82
  1471. package/src/i18n/german.ts +50 -6
  1472. package/src/i18n/kit-labels.tsx +85 -124
  1473. package/src/i18n/locales/en.ts +46 -0
  1474. package/src/i18n/locales/es.ts +50 -6
  1475. package/src/i18n/locales/fr.ts +55 -9
  1476. package/src/i18n/locales/hu.ts +50 -6
  1477. package/src/i18n/locales/it.ts +54 -8
  1478. package/src/i18n/locales/zh.ts +49 -6
  1479. package/src/i18n/review.ts +4 -0
  1480. package/src/i18n/shared-labels.ts +135 -0
  1481. package/src/index.ts +414 -404
  1482. package/src/landing/access.ts +2 -1
  1483. package/src/landing/landing-actions.tsx +6 -5
  1484. package/src/landing/landing-labels.ts +2 -2
  1485. package/src/landing/landing-sections.tsx +24 -23
  1486. package/src/landing/public-header.tsx +3 -2
  1487. package/src/landing/routing.tsx +2 -7
  1488. package/src/lib/chip-edge-snap.ts +212 -0
  1489. package/src/lib/cn.ts +13 -1
  1490. package/src/lib/dates.ts +4 -2
  1491. package/src/lib/decimal-marks.ts +4 -2
  1492. package/src/lib/download.ts +172 -0
  1493. package/src/lib/floating-stack.ts +5 -1
  1494. package/src/lib/format.ts +5 -3
  1495. package/src/lib/ime.ts +24 -0
  1496. package/src/lib/presence.ts +18 -0
  1497. package/src/lib/reduced-motion.ts +21 -0
  1498. package/src/lib/refs.ts +22 -0
  1499. package/src/lib/round.ts +38 -0
  1500. package/src/lib/safe-storage.ts +35 -11
  1501. package/src/lib/session-refresh.ts +473 -0
  1502. package/src/lib/text-match.ts +60 -0
  1503. package/src/lib/translation-review.ts +7 -6
  1504. package/src/rhf/fields.tsx +141 -189
  1505. package/src/rhf/form-core.tsx +328 -0
  1506. package/src/rhf/form.tsx +9 -320
  1507. package/src/rhf/line-items.tsx +2 -2
  1508. package/src/rhf/use-rhf-wizard-step.ts +4 -4
  1509. package/src/rhf.ts +4 -2
  1510. package/src/search/command-palette-labels.ts +16 -0
  1511. package/src/search/command-palette.tsx +37 -50
  1512. package/src/search/global-search-labels.ts +13 -0
  1513. package/src/search/global-search.tsx +50 -24
  1514. package/src/search/search-index.ts +5 -6
  1515. package/src/search/use-command-key.ts +22 -0
  1516. package/src/settings/settings-card-classes.ts +11 -0
  1517. package/src/settings/settings-heading.tsx +1 -1
  1518. package/src/settings/settings-labels.ts +2 -2
  1519. package/src/settings/settings-layout.tsx +65 -6
  1520. package/src/settings/settings-section.tsx +5 -5
  1521. package/src/settings/use-settings-focus.ts +2 -5
  1522. package/src/shell/app-shell-labels.ts +10 -0
  1523. package/src/shell/app-shell.tsx +79 -53
  1524. package/src/shell/auth-layout.tsx +11 -10
  1525. package/src/shell/company-switcher-labels.ts +13 -0
  1526. package/src/shell/company-switcher.tsx +7 -11
  1527. package/src/shell/option-switcher-menu.tsx +7 -5
  1528. package/src/shell/role-switcher.tsx +4 -4
  1529. package/src/shell/top-bar-brand.tsx +1 -1
  1530. package/src/shell/top-bar.tsx +6 -5
  1531. package/src/shell/topbar-action-menu.tsx +21 -19
  1532. package/src/shell/topbar-controls.tsx +15 -15
  1533. package/src/shell.ts +1 -1
  1534. package/src/testing/index.ts +13 -0
  1535. package/src/testing/viewport.ts +357 -0
  1536. package/src/theme/color.ts +7 -1
  1537. package/src/theme/palette-derive.ts +29 -7
  1538. package/src/theme/palette-presets.ts +82 -355
  1539. package/src/tour/tour-labels.ts +14 -0
  1540. package/src/tour/tour.tsx +13 -23
  1541. package/src/wizard/stepper-nav.tsx +19 -18
  1542. package/src/wizard/types.ts +3 -26
  1543. package/src/wizard/wizard-labels.ts +29 -0
  1544. package/src/wizard/wizard-step.tsx +2 -2
  1545. package/src/wizard/wizard-summary.tsx +8 -7
  1546. package/tokens.css +45 -14
  1547. package/dist/components/account-settings-labels.js.map +0 -1
  1548. package/dist/components/account-settings.js.map +0 -1
  1549. package/dist/components/choice-parts.d.ts +0 -24
  1550. package/dist/components/choice-parts.js +0 -18
  1551. package/dist/components/choice-parts.js.map +0 -1
  1552. package/dist/components/passkeys-setting.js.map +0 -1
  1553. package/dist/components/ui.d.ts +0 -101
  1554. package/dist/components/ui.js +0 -1955
  1555. package/dist/components/ui.js.map +0 -1
  1556. package/dist/data-table-labels-BJ5JE_X2.d.ts +0 -923
  1557. package/dist/delete-account-setting-DAgGBrbn.d.ts +0 -8167
  1558. package/src/components/choice-parts.ts +0 -33
  1559. package/src/components/ui.tsx +0 -4233
@@ -1,47 +1,37 @@
1
- import { Fragment, isValidElement, useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
2
- import type { CSSProperties, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from "react";
3
- import { createPortal } from "react-dom";
1
+ import { Fragment, useEffect, useId, useMemo, useRef, useState } from "react";
2
+ import type { ReactNode, TdHTMLAttributes, ThHTMLAttributes } from "react";
3
+ import { Card } from "./card";
4
+ import { Spinner } from "./spinner";
5
+ import { ROW_ACTIONS_KEY, useRowActionColumn } from "./data-table-row-actions";
6
+ import { useColumnResize } from "./data-table-resize";
7
+ import { useRangeSelection } from "./data-table-selection";
4
8
  import {
5
- ArrowDown,
6
- ArrowDownWideNarrow,
7
- ArrowUp,
8
- ArrowUpDown,
9
- ArrowUpNarrowWide,
10
- ChevronDown,
11
- ChevronRight,
12
- Filter,
13
- Pencil,
14
- Trash2,
15
- X,
16
- } from "lucide-react";
17
- import { Card, FOCUS_RING, IconButton, Select, Spinner } from "./ui";
18
- import { RowActions, type RowAction } from "./row-actions";
9
+ RowLink,
10
+ cleanAttrs,
11
+ columnLabel,
12
+ fromOutside,
13
+ logicalAlign,
14
+ resolveDataTableLabels,
15
+ splitCellProps,
16
+ } from "./data-table-shared";
17
+ import { MobileFilters, MobileRow, MobileSort, StackedFields } from "./data-table-mobile";
18
+ import { DataTableHead } from "./data-table-head";
19
+ import { ColumnSettingsPanel } from "./data-table-column-settings";
19
20
  import { useLargeText } from "../hooks/use-large-text";
20
21
  import { cn } from "../lib/cn";
21
- import {
22
- defaultFilterState,
23
- isFilterActive,
24
- resolveFilter,
25
- rowMatches,
26
- } from "./data-table-filters";
22
+ import { isFilterActive, resolveFilter, rowMatches } from "./data-table-filters";
27
23
  import type { ColumnFilter, FilterValue } from "./data-table-filters";
28
24
  import { nextSorts } from "./data-table-sort";
29
25
  import type { SortCycle, SortDir, SortState } from "./data-table-sort";
30
- import { FilterPopover } from "./data-table-filter-popover";
31
26
  import { Pagination } from "./data-table-pagination";
32
- import { SwipeableRow, type SwipeAction } from "./swipeable-row";
33
- import { useBackdropClose } from "./modal";
34
- import { useBodyScrollLock } from "../hooks/use-body-scroll-lock";
35
- import { useOverlayHistory } from "../hooks/use-overlay-history";
27
+ import type { SwipeAction } from "./swipeable-row";
36
28
  import { FullBleedDialog } from "./full-bleed-dialog";
37
- import { Popover } from "./popover";
38
29
  import { usePhoneLayout } from "../hooks/use-breakpoint";
39
30
  import { useAnnounce } from "../hooks/use-announce";
40
- import { DEFAULT_DATA_TABLE_LABELS, resolveDataTableLabels, type DataTableLabels } from "./data-table-labels";
41
- import { useKitLabelOverrides, useKitLocale } from "../i18n/kit-labels";
42
- import { Tooltip } from "./tooltip";
31
+ import { DEFAULT_DATA_TABLE_LABELS, type DataTableLabels } from "./data-table-labels";
32
+ import { useKitLabelOverrides, useKitLocale, useKitTableStorageKeyPrefix, type LabelOverride } from "../i18n/kit-labels";
43
33
  import { useEdgeFade } from "../lib/strip-fade";
44
- import { dirOf, isRtl, type Direction } from "../lib/direction";
34
+ import { dirOf, type Direction } from "../lib/direction";
45
35
 
46
36
  // ---------- Types ----------
47
37
 
@@ -145,58 +135,6 @@ export type DataTableCellProps = TdHTMLAttributes<HTMLTableCellElement> & DataAt
145
135
  /** What {@link DataTableColumn.headProps} takes. */
146
136
  export type DataTableHeadProps = ThHTMLAttributes<HTMLTableCellElement> & DataAttributes;
147
137
 
148
- /**
149
- * Split a caller's cell attributes into what may reach the element and what the kit
150
- * owns. `role` and `data-col` are dropped outright (see `cellProps`); `className` and
151
- * `style` come back separately so the kit can merge rather than replace them.
152
- */
153
- function splitCellProps(
154
- props: DataTableCellProps | DataTableHeadProps | undefined,
155
- ): { attrs: Record<string, unknown>; className?: string; style?: CSSProperties } {
156
- if (!props) return { attrs: {} };
157
- const {
158
- className,
159
- style,
160
- role: _role,
161
- "data-col": _col,
162
- ...attrs
163
- } = props as DataTableCellProps & { "data-col"?: unknown };
164
- return { attrs, className, style };
165
- }
166
-
167
- /** Only the `data-*` attributes of a cell's props — what a phone card field takes. */
168
- function dataAttrsOf(props: DataTableCellProps | undefined): Record<string, unknown> | undefined {
169
- if (!props) return undefined;
170
- const out: Record<string, unknown> = {};
171
- for (const [k, v] of Object.entries(props)) if (k.startsWith("data-") && k !== "data-col") out[k] = v;
172
- return out;
173
- }
174
-
175
- /** A column resize in flight. Held in a ref rather than in state: the live width is
176
- * written straight onto the column's cells, so a drag costs zero renders and the
177
- * one `setWidths` happens when the pointer comes up. */
178
- interface Resize {
179
- key: string;
180
- pointerId: number;
181
- startX: number;
182
- startWidth: number;
183
- /** +1 when a drag to the right widens the column, -1 in a right-to-left table,
184
- * where the handle sits on the column's LEFT edge and widening is a drag left. */
185
- sign: 1 | -1;
186
- /** What React last rendered this column at, so a CANCELLED drag can put the header
187
- * back — React cannot, it never saw the inline width the drag wrote. */
188
- hadWidth: number | undefined;
189
- /** The header and the body cells under it, collected ONCE when the drag starts.
190
- * A `<th>` alone cannot shrink a column whose `<td>`s already carry a pinned
191
- * width — and nothing re-renders during a drag, so the list cannot go stale. */
192
- cells: HTMLElement[];
193
- width: number;
194
- /** A press with no drag in it is not a resize — the handle is also the
195
- * double-click target that CLEARS a width, and committing the header's current
196
- * size on the way past would pin every column the user ever brushed. */
197
- moved: boolean;
198
- }
199
-
200
138
  export interface ServerPagination {
201
139
  page: number; // 0-based
202
140
  pageSize: number;
@@ -248,7 +186,7 @@ export interface DataTableProps<T> {
248
186
  isExpanded?: (row: T) => boolean;
249
187
  /**
250
188
  * Extra classes for a row — the `<tr>` on desktop, the card on mobile. Merged last,
251
- * so a `hover:` fill here replaces the row's own `hover:bg-[var(--bg-hover)]`.
189
+ * so a `hover:` fill here replaces the row's own `hover:bg-hover`.
252
190
  *
253
191
  * **A row you paint has to pick its own hover** (0.33, docs/colour-roles-harmonization.md
254
192
  * §12.2): the kit cannot see your rest colour, and `--bg-hover` is mixed against the
@@ -302,6 +240,10 @@ export interface DataTableProps<T> {
302
240
  * phone the card list is the scroller instead, with the filter button pinned above
303
241
  * it; an unbounded parent simply lets either layout grow to its content. The parent must give it a bounded height (e.g. a flex
304
242
  * column inside the viewport-locked app shell). See feedback #207.
243
+ *
244
+ * The cure for TWO SCROLLBARS (round 0.34 C14, kastlan feedback 55): the default
245
+ * `maxBodyHeight` scrolls the body inside a page that scrolls too. How a page fills
246
+ * the height is in {@link DataTableProps.maxBodyHeight}'s note.
305
247
  */
306
248
  fillHeight?: boolean;
307
249
  /** How tall the scrolling body may get before it scrolls, as a CSS length.
@@ -314,7 +256,25 @@ export interface DataTableProps<T> {
314
256
  * elements there should in best case be no scrolling necessary".
315
257
  *
316
258
  * Ignored under `fillHeight`, which bounds the body by its flex parent
317
- * instead and is the stronger statement of the same intent. */
259
+ * instead and is the stronger statement of the same intent.
260
+ *
261
+ * **Two scrollbars** (round 0.34 C14, kastlan feedback 55). The cap scrolls the
262
+ * body INSIDE a page that, in most shells, scrolls itself: a table taller than
263
+ * the cap on a page with anything else on it shows two scrollbars side by side,
264
+ * and the wheel moves whichever is under the pointer. For a list page whose table
265
+ * is the point, fill the height instead, from `md` up (a phone scrolls the page
266
+ * and its card list as one):
267
+ *
268
+ * 1. the shell's content column becomes a flex column of the main area's height
269
+ * when the page asks — kastlan's
270
+ * `md:has-[>[data-fill-height]]:flex md:has-[>[data-fill-height]]:h-full md:has-[>[data-fill-height]]:flex-col`;
271
+ * 2. the page's root asks, and is a flex column that may shrink:
272
+ * `data-fill-height` and `md:flex md:min-h-0 md:flex-1 md:flex-col`;
273
+ * 3. the table takes the rest: `<DataTable fillHeight>`.
274
+ *
275
+ * Only the body then scrolls, under its pinned header, and every other page grows
276
+ * with its content as before (kastlan e3985c9, its leases list). A short table that
277
+ * is the last thing on its page can instead drop the cap: `maxBodyHeight="none"`. */
318
278
  maxBodyHeight?: string;
319
279
  /**
320
280
  * When provided, the table renders the supplied rows as-is (no client-side
@@ -342,6 +302,16 @@ export interface DataTableProps<T> {
342
302
  onFiltersChange?: (next: FilterState) => void;
343
303
  sorts?: SortState[];
344
304
  onSortsChange?: (next: SortState[]) => void;
305
+ /**
306
+ * Controlled page size, as `sorts` above: the table pages by it and hands its pager's
307
+ * choice to `onPageSizeChange` (`Infinity` is "All"). For tables that page ALIKE —
308
+ * `TranslationReviewPanel`'s groups share one page size as they share one sort
309
+ * (0.35). Left out, the table keeps its own, from `defaultPageSize`, the URL and
310
+ * `storageKey`. A change of value sends a client-side table back to page 1. In
311
+ * `serverPagination` mode the page size is `serverPagination.pageSize`.
312
+ */
313
+ pageSize?: number;
314
+ onPageSizeChange?: (pageSize: number) => void;
345
315
  /**
346
316
  * Opt-in multi-row selection (desktop table only). When provided, a leading
347
317
  * checkbox column is rendered with a select-all box in the header; the owner
@@ -373,12 +343,13 @@ export interface DataTableProps<T> {
373
343
  /** User-facing strings (English defaults); pass translated overrides. Merged over
374
344
  * `dataTable` from `<UiKitProvider labels>`, so a call site only states what
375
345
  * differs for THIS table — typically `table`, its accessible name. */
376
- labels?: Partial<DataTableLabels>;
346
+ labels?: LabelOverride<DataTableLabels>;
377
347
  /** BCP-47 locale for the date filter's calendar and the pager's numbers. Falls
378
348
  * back to `<UiKitProvider locale>`, then to the runtime's default. */
379
349
  locale?: string;
380
- /** localStorage namespace prefix for `storageKey` persistence. Defaults to
381
- * "hbui-table:"; pass your app's own prefix to keep a stable namespace. */
350
+ /** localStorage namespace prefix for `storageKey` persistence: the stored key is this
351
+ * plus `storageKey`. Falls back to `<UiKitProvider tableStorageKeyPrefix>` (0.34, set
352
+ * your app's prefix there once), then to "hbui-table:". This prop wins over both. */
382
353
  storageKeyPrefix?: string;
383
354
  /**
384
355
  * On phones, surface the expanded row's detail in a full-screen dialog instead
@@ -603,7 +574,7 @@ export interface DataTableProps<T> {
603
574
  * On a phone it heads the summary card, which is also named by it.
604
575
  *
605
576
  * There is no built-in default word: a new kit label key is a silent English string
606
- * in every translated app (see `missingDataTableLabels`), and the caller has the
577
+ * in every translated app (see `missingKitLabels`), and the caller has the
607
578
  * word in its own catalogue already. Without it the row is unlabelled on screen —
608
579
  * pass one.
609
580
  */
@@ -643,56 +614,6 @@ export interface DataTableRowAction<T> {
643
614
  swipe?: "start" | "end" | false;
644
615
  }
645
616
 
646
- /** The actions column's key. Not a column a caller declares, so it is kept out of the
647
- * column-settings panel. */
648
- const ROW_ACTIONS_KEY = "__rowActions";
649
-
650
- interface ResolvedRowAction<T> {
651
- key: string;
652
- label: string;
653
- icon: ReactNode;
654
- tone: "default" | "danger";
655
- swipe: "start" | "end" | false;
656
- action: DataTableRowAction<T>;
657
- }
658
-
659
- function resolveRowAction<T>(
660
- action: DataTableRowAction<T>,
661
- index: number,
662
- labels: DataTableLabels,
663
- ): ResolvedRowAction<T> {
664
- const tone = action.tone ?? (action.kind === "delete" ? "danger" : "default");
665
- return {
666
- key: action.kind ?? `${index}:${action.label ?? ""}`,
667
- label: action.label ?? (action.kind === "edit" ? labels.edit : action.kind === "delete" ? labels.delete : ""),
668
- icon:
669
- action.icon ??
670
- (action.kind === "edit" ? <Pencil /> : action.kind === "delete" ? <Trash2 /> : null),
671
- tone,
672
- swipe: action.swipe ?? (tone === "danger" ? "start" : "end"),
673
- action,
674
- };
675
- }
676
-
677
- /** Ask, then act. */
678
- async function runRowAction<T>(action: DataTableRowAction<T>, row: T): Promise<void> {
679
- if (action.confirm && !(await action.confirm(row))) return;
680
- action.onAction(row);
681
- }
682
-
683
- /** A resolved row action as {@link RowActions} takes it. Its `icon` is any node; a
684
- * non-element one (a string glyph) is wrapped, since RowAction wants an element. */
685
- function toRowAction<T>(a: ResolvedRowAction<T>, row: T): RowAction {
686
- return {
687
- key: a.key,
688
- label: a.label,
689
- icon: isValidElement(a.icon) ? a.icon : a.icon != null && a.icon !== false ? <>{a.icon}</> : undefined,
690
- tone: a.tone,
691
- disabledReason: a.action.disabledReason?.(row),
692
- onSelect: () => void runRowAction(a.action, row),
693
- };
694
- }
695
-
696
617
  /** See {@link DataTableProps.chrome}. */
697
618
  export type DataTableChrome = "full" | "minimal";
698
619
 
@@ -714,44 +635,6 @@ export interface MobileSwipeActions {
714
635
  right?: SwipeAction[];
715
636
  }
716
637
 
717
- /** The logical sides onto the physical drag directions {@link SwipeableRow} takes. */
718
- function physicalSwipe(
719
- actions: MobileSwipeActions,
720
- dir: Direction,
721
- ): { left?: SwipeAction[]; right?: SwipeAction[] } {
722
- const rtl = dir === "rtl";
723
- return {
724
- left: (rtl ? actions.end : actions.start) ?? actions.left,
725
- right: (rtl ? actions.start : actions.end) ?? actions.right,
726
- };
727
- }
728
-
729
- // A bare `text-right` / `text-left` token, with or without variant prefixes
730
- // (`md:text-right`). Deliberately NOT `text-right-…` or an arbitrary value.
731
- const PHYSICAL_ALIGN = /(^|\s)((?:[\w-]+:)*)text-(left|right)(?=\s|$)/g;
732
-
733
- /**
734
- * A column's `className`/`headClassName` with physical text alignment rewritten to
735
- * logical: `text-right` → `text-end`, `text-left` → `text-start`.
736
- *
737
- * Every numeric column written before 0.7.0 says `text-right`, and that is what it
738
- * MEANT: the end of the line, where digits line up. Rendered as written, a
739
- * right-to-left table puts those numbers on the far side from their own header's
740
- * sort button. Rewriting keeps each existing call site correct in both directions
741
- * with no change on its side; a caller who genuinely wants the physical side in RTL
742
- * too can say `ltr:text-right rtl:text-right`, which this leaves alone.
743
- */
744
- function logicalAlign(className: string | undefined): string | undefined {
745
- return className?.replace(
746
- PHYSICAL_ALIGN,
747
- (token: string, lead: string, variants: string, side: string) =>
748
- // Already scoped to one direction: that is a caller choosing the physical side.
749
- /(^|:)(ltr|rtl):/.test(variants)
750
- ? token
751
- : `${lead}${variants}text-${side === "right" ? "end" : "start"}`,
752
- );
753
- }
754
-
755
638
  /**
756
639
  * A totals-row cell: pinned to the scroller's bottom edge, on the header's surface.
757
640
  * The rule above it is an inset shadow rather than a `border-t`: the table collapses
@@ -759,83 +642,15 @@ function logicalAlign(className: string | undefined): string | undefined {
759
642
  * behind at the bottom of the rows while the sticky cell rides over them.
760
643
  */
761
644
  const FOOTER_CELL =
762
- "sticky bottom-0 z-10 bg-[var(--bg-surface-2)] shadow-[inset_0_2px_0_var(--border-strong)]";
763
-
764
- /** Whether a column is end-aligned — the header then puts its filter button first. */
765
- const END_ALIGN = /(^|\s)text-end(?=\s|$)/;
766
-
767
- /** Drop the undefined entries of a {@link DataTableProps.rowAttributes} map, so a
768
- * caller can write `{ "data-x": cond ? "y" : undefined }` and get no attribute
769
- * at all rather than the string "undefined" in the DOM. */
770
- function cleanAttrs(
771
- attrs: Record<string, string | undefined> | undefined,
772
- ): Record<string, string> | undefined {
773
- if (!attrs) return undefined;
774
- const out: Record<string, string> = {};
775
- for (const [k, v] of Object.entries(attrs)) if (v !== undefined) out[k] = v;
776
- return out;
777
- }
778
-
779
- /**
780
- * A column's name as a plain string.
781
- *
782
- * `header` is a ReactNode — an icon, a unit suffix, a tooltip-wrapped span — and
783
- * neither a live region nor the column-settings checklist can speak a React element.
784
- * The `key` fallback is the one the settings panel has always used; a column whose
785
- * header is not a string and whose key is not human-readable is a call site that
786
- * should pass a string header, and that is visible in what gets announced.
787
- */
788
- function columnLabel<T>(col: DataTableColumn<T>, labels?: DataTableLabels): string {
789
- if (col.key === ROW_ACTIONS_KEY && labels) return labels.actions;
790
- return col.headerText ?? (typeof col.header === "string" ? col.header : col.key);
791
- }
792
-
793
- // ---------- Phone card at Large (0.32) ----------
794
-
795
- /**
796
- * §4 "nothing truncates" in a phone card at Large and Extra large: a cell's own
797
- * `truncate` (a kit cell, a chip, the app's span) wraps instead — and breaks inside a
798
- * word too long for the card rather than running out of it. A descendant rule, so it
799
- * reaches the cells without the table knowing what they render; `large:`, so Normal
800
- * keeps every ellipsis it had.
801
- */
802
- const CARD_NO_TRUNCATE =
803
- "large:[&_.truncate]:whitespace-normal large:[&_.truncate]:[overflow-wrap:anywhere]";
804
-
805
- /**
806
- * Columns as label-above-value pairs: the phone card's fields at Large (§4), and the
807
- * opened row's `mobileDetailsInRow` at every size. Each pair is a `<div>` in the
808
- * `<dl>` — the grouping HTML allows — so a pair keeps together and the gap falls
809
- * BETWEEN facts rather than between a label and its own value. `relative` holds a
810
- * header's `sr-only` text (an actions column's), as every kit container must.
811
- */
812
- function StackedFields<T>({ columns, row, compact }: { columns: DataTableColumn<T>[]; row: T; compact: boolean }) {
813
- return (
814
- <dl
815
- data-card-fields="stacked"
816
- className={cn("relative flex min-w-0 flex-col", compact ? "gap-1.5 text-xs" : "gap-2.5 text-sm", CARD_NO_TRUNCATE)}
817
- >
818
- {columns.map((col) => (
819
- <div key={col.key} className="min-w-0">
820
- <dt className="text-xs uppercase tracking-wide text-[var(--text-muted)]">{col.header}</dt>
821
- <dd
822
- {...dataAttrsOf(col.cellProps?.(row))}
823
- className="mt-0.5 min-w-0 break-words text-[var(--text-secondary)]"
824
- >
825
- {col.cell(row)}
826
- </dd>
827
- </div>
828
- ))}
829
- </dl>
830
- );
831
- }
645
+ "sticky bottom-0 z-10 bg-surface-2 shadow-[inset_0_2px_0_var(--border-strong)]";
832
646
 
833
647
  // ---------- Phone sort control (keksdose K10) ----------
834
648
 
835
649
  /**
836
650
  * The phone sort control's strings (keksdose K10). They are `dataTable` strings —
837
651
  * read from the table's resolved labels, so the `labels` prop and the provider's
838
- * `dataTable` namespace reach them — and are declared here, beside the control, with
652
+ * `dataTable` namespace reach them — and are declared here, with the table's other
653
+ * public types (the control itself, `MobileSort`, is in data-table-mobile.tsx), with
839
654
  * English defaults until `DataTableLabels` declares them itself.
840
655
  */
841
656
  export interface DataTableSortLabels {
@@ -860,91 +675,6 @@ export const DEFAULT_DATA_TABLE_SORT_LABELS: DataTableSortLabels = {
860
675
 
861
676
  const flipDir = (d: SortDir): SortDir => (d === "asc" ? "desc" : "asc");
862
677
 
863
- /**
864
- * The card list's sort control: a "Sort by" select and a direction button.
865
- *
866
- * keksdose K10 (inputs audit 2026-10-02 §5; its aggregated report tables, #258): a
867
- * table is sorted by its header row and the phone card list has none, so the two
868
- * decisions the header carries — which column, which direction — were unreachable
869
- * below the breakpoint. keksdose hand-built this row over its DataTable to answer
870
- * "who did I pay the most" on the device it was asked on; this is that row, driven by
871
- * the SAME sort state as the headers (controlled `sorts` included), so turning the
872
- * phone sideways keeps the order and a sort chosen here is the one the URL and the
873
- * storage key hold.
874
- *
875
- * The rules are the header's: a newly picked column starts in its `firstSort`, the
876
- * direction button flips the primary sort (secondary ones stay), and "Default order"
877
- * — the third click of a `"tri"` cycle — is offered only under `"tri"`, since a
878
- * `"toggle"` table promises it is always ranked by something. The select's label is
879
- * a real `<label>` beside it, and the button sits outside that label: a click inside
880
- * a label is forwarded to the control it names, so a nested button would flip AND
881
- * open the select.
882
- */
883
- function MobileSort<T>({
884
- columns,
885
- sorts,
886
- sortCycle,
887
- compact,
888
- labels,
889
- onPick,
890
- onFlip,
891
- }: {
892
- columns: DataTableColumn<T>[];
893
- sorts: SortState[];
894
- sortCycle: SortCycle;
895
- compact: boolean;
896
- labels: DataTableLabels;
897
- onPick: (key: string | null) => void;
898
- onFlip: () => void;
899
- }) {
900
- const selectId = useId();
901
- const sortLabels: DataTableSortLabels = labels;
902
- if (columns.length === 0) return null;
903
- // A persisted or URL sort can name a column with no `sortBy` (or a hidden one): the
904
- // sort chain drops it, and so does the control rather than claiming it.
905
- const primary = sorts[0] && columns.some((c) => c.key === sorts[0].key) ? sorts[0] : null;
906
- const offerDefault = sortCycle === "tri" || primary === null;
907
- const desc = primary?.dir === "desc";
908
- return (
909
- <div
910
- data-table-mobile-sort=""
911
- className={cn(
912
- // At Large the direction button shows its words (IconButton's label, §4); the
913
- // row wraps so the select keeps a usable width on a 240 px card.
914
- "flex flex-wrap items-center gap-2 border-b border-[var(--border)]",
915
- compact ? "px-3 py-1.5" : "px-4 py-2",
916
- )}
917
- >
918
- <label htmlFor={selectId} className="shrink-0 text-xs text-[var(--text-muted)]">
919
- {sortLabels.sortBy}
920
- </label>
921
- <Select
922
- id={selectId}
923
- size={compact ? "sm" : "md"}
924
- className="min-w-0 flex-1 large:basis-40"
925
- value={primary?.key ?? ""}
926
- onChange={(e) => onPick(e.target.value || null)}
927
- >
928
- {offerDefault && <option value="">{sortLabels.sortDefault}</option>}
929
- {columns.map((col) => (
930
- <option key={col.key} value={col.key}>
931
- {columnLabel(col, labels)}
932
- </option>
933
- ))}
934
- </Select>
935
- <IconButton
936
- size={compact ? "xs" : "md"}
937
- variant="secondary"
938
- label={desc ? sortLabels.sortDescending : sortLabels.sortAscending}
939
- disabled={primary === null}
940
- onClick={onFlip}
941
- >
942
- {desc ? <ArrowDownWideNarrow /> : <ArrowUpNarrowWide />}
943
- </IconButton>
944
- </div>
945
- );
946
- }
947
-
948
678
  /**
949
679
  * What counts as a control of its own inside a clickable row: a click or key press
950
680
  * that lands on one of these belongs to it, not to the row's `onRowClick`. The row's
@@ -953,20 +683,6 @@ function MobileSort<T>({
953
683
  const OWN_CONTROL =
954
684
  'a[href],button,input,select,textarea,label,summary,[role="button"],[role="link"],[role="checkbox"],[role="switch"],[role="menuitem"],[role="option"],[contenteditable=""],[contenteditable="true"],[tabindex]:not([tabindex="-1"])';
955
685
 
956
- /**
957
- * Whether a click that reached `row`'s handler did not start in the row's own DOM.
958
- *
959
- * React bubbles an event through the COMPONENT tree, portals included: a popover, a
960
- * menu or a dialog a cell (or the expansion under it) opens renders at `<body>` but
961
- * still reports its clicks to every React ancestor — the row among them. So a click
962
- * in a cell's portalled date picker opened the row it came from, and a page wrapped
963
- * such content in `<div onClick={(e) => e.stopPropagation()}>` to stop it (kastlan's
964
- * feedback page did, round its comments). The row owns the clicks on the row.
965
- */
966
- function fromOutside(target: EventTarget | null, row: HTMLElement): boolean {
967
- return !(target instanceof Node) || !row.contains(target);
968
- }
969
-
970
686
  /** Whether an event on `row` started on a control nested inside it. */
971
687
  function fromOwnControl(target: EventTarget | null, row: HTMLElement): boolean {
972
688
  if (!(target instanceof Element)) return false;
@@ -1001,83 +717,6 @@ function moveRowFocus(from: HTMLElement, key: string): boolean {
1001
717
  }
1002
718
  const ROW_NAV_KEYS = { ArrowDown: 1, ArrowUp: 1, Home: 1, End: 1 } as const;
1003
719
 
1004
- /** A click the APP owns. Anything else — middle, ⌘/Ctrl, Shift, Alt — belongs to
1005
- * the browser, and the whole feature is not touching it. */
1006
- const isPlainLeftClick = (e: React.MouseEvent) =>
1007
- e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey;
1008
-
1009
- /**
1010
- * The anchor a linkable row is opened through (Keksdose feedback #451).
1011
- *
1012
- * The plain left click is OURS: cancelled, then handed to the row's own handler, so
1013
- * clicking a row still expands it in place instead of reloading the page. Every
1014
- * other click — middle, ⌘/Ctrl, Shift, Alt — is left completely untouched, which is
1015
- * the entire point of using an anchor rather than an `onAuxClick` + `window.open`:
1016
- * that imitation buys back the middle click and still loses ⌘/Ctrl-click, "copy link
1017
- * address", the status-bar preview and the phone's long-press menu.
1018
- *
1019
- * Modified clicks DO stop propagating: on a table with `selection`, ⌘/Ctrl-click and
1020
- * Shift-click on a row mean "select" (feedback #289), and a row must not change its
1021
- * selection while the browser is opening a tab. The rest of the row still selects —
1022
- * the link is one cell, not the row.
1023
- *
1024
- * `draggable={false}` because an anchor otherwise hijacks a horizontal mouse drag as
1025
- * a link-drag: that is both drag-to-select-text on the desktop table and the mouse
1026
- * path through SwipeableRow's gesture on the mobile card.
1027
- */
1028
- function RowLink({
1029
- href,
1030
- onActivate,
1031
- className,
1032
- children,
1033
- ...rest
1034
- }: {
1035
- href: string;
1036
- /** Runs on a plain left click. Omit it where an ANCESTOR already handles the
1037
- * click (the desktop `<tr>`), or the row would toggle twice. */
1038
- onActivate?: () => void;
1039
- className?: string;
1040
- children: ReactNode;
1041
- } & Omit<
1042
- React.AnchorHTMLAttributes<HTMLAnchorElement>,
1043
- "href" | "className" | "children" | "onClick" | "onClickCapture"
1044
- >) {
1045
- return (
1046
- <a
1047
- {...rest}
1048
- href={href}
1049
- draggable={false}
1050
- className={className}
1051
- // CAPTURE phase, and it has to be: on the mobile card the whole card is the
1052
- // anchor, so a nested control sits INSIDE it — and the ones that matter
1053
- // (the feedback row's status toggles) stop the click propagating so the row
1054
- // won't also expand. A bubble-phase handler would never run for those, and
1055
- // the browser would follow the link out from under the button press. Cancelling
1056
- // here happens before any descendant can silence the event; `stopPropagation`
1057
- // does not undo a `preventDefault`.
1058
- onClickCapture={(e) => {
1059
- // A click in a portal a descendant opened is not a click on the link: leave
1060
- // it (and a link inside it) alone. See `fromOutside`.
1061
- if (fromOutside(e.target, e.currentTarget)) return;
1062
- if (isPlainLeftClick(e)) e.preventDefault();
1063
- }}
1064
- onClick={(e) => {
1065
- if (fromOutside(e.target, e.currentTarget)) return;
1066
- if (!isPlainLeftClick(e)) {
1067
- e.stopPropagation();
1068
- return;
1069
- }
1070
- // Already cancelled above; this phase only decides what opens. A nested
1071
- // control that stopped propagation deliberately never reaches it, which is
1072
- // exactly how the row behaved before it became a link.
1073
- onActivate?.();
1074
- }}
1075
- >
1076
- {children}
1077
- </a>
1078
- );
1079
- }
1080
-
1081
720
  // ---------- Main DataTable ----------
1082
721
 
1083
722
 
@@ -1107,10 +746,12 @@ export function DataTable<T>({
1107
746
  onFiltersChange,
1108
747
  sorts: sortsProp,
1109
748
  onSortsChange,
749
+ pageSize: pageSizeProp,
750
+ onPageSizeChange,
1110
751
  selection,
1111
752
  labels: labelsProp,
1112
753
  locale: localeProp,
1113
- storageKeyPrefix = DEFAULT_PERSIST_PREFIX,
754
+ storageKeyPrefix: storageKeyPrefixProp,
1114
755
  mobileExpandAsDialog = false,
1115
756
  mobileDetailsInRow = false,
1116
757
  rowName,
@@ -1149,82 +790,24 @@ export function DataTable<T>({
1149
790
  // other ten. Memoised because the announcement effects below list `labels` as a
1150
791
  // dependency, and a fresh object every render would re-run them for nothing.
1151
792
  const labelOverrides = useKitLabelOverrides("dataTable");
1152
- const labels = useMemo(
1153
- () =>
1154
- resolveDataTableLabels(
1155
- labelOverrides || labelsProp
1156
- ? {
1157
- ...labelOverrides,
1158
- ...labelsProp,
1159
- presets: { ...labelOverrides?.presets, ...labelsProp?.presets },
1160
- }
1161
- : undefined,
1162
- ),
1163
- [labelOverrides, labelsProp],
1164
- );
793
+ // prop > provider > the kit's default, the order every kit setting resolves in (round
794
+ // 0.34 C5, KS U4): one prefix on the provider reaches the tables an app cannot pass a
795
+ // prop to, `TranslationReviewPanel`'s among them.
796
+ const providerStorageKeyPrefix = useKitTableStorageKeyPrefix();
797
+ const storageKeyPrefix = storageKeyPrefixProp ?? providerStorageKeyPrefix ?? DEFAULT_PERSIST_PREFIX;
798
+ const labels = useMemo(() => resolveDataTableLabels(labelOverrides, labelsProp), [labelOverrides, labelsProp]);
1165
799
  const locale = useKitLocale(localeProp);
1166
800
 
1167
- // ---- Row actions ----
1168
- // The actions column is appended to the caller's columns rather than drawn as a
1169
- // second special case beside the selection column: it then gets the cell padding,
1170
- // the widths and the phone rules (`mobileHidden`) every other column gets.
1171
- const rowActionsFor = useCallback(
1172
- (row: T): ResolvedRowAction<T>[] =>
1173
- rowActions
1174
- ? (typeof rowActions === "function" ? rowActions(row) : rowActions)
1175
- .filter((a) => !a.hidden?.(row))
1176
- .map((a, i) => resolveRowAction(a, i, labels))
1177
- : [],
1178
- [rowActions, labels],
1179
- );
1180
- const columns = useMemo<DataTableColumn<T>[]>(
1181
- () =>
1182
- rowActions
1183
- ? [
1184
- ...columnsProp,
1185
- {
1186
- key: ROW_ACTIONS_KEY,
1187
- header: <span className="sr-only">{labels.actions}</span>,
1188
- // Through RowActions (0.32, §10.8): the icons inline at Normal, one "⋯"
1189
- // menu at Large once there are two — every label at once does not fit a
1190
- // row. Each control stops its own click: the row's handler already skips
1191
- // its controls, and this is for the caller who wraps the table in a
1192
- // clickable element of their own.
1193
- cell: (row) => (
1194
- <RowActions
1195
- actions={rowActionsFor(row).map((a) => toRowAction(a, row))}
1196
- name={rowName?.(row)}
1197
- size={density === "compact" ? "2xs" : "xs"}
1198
- labels={{ actions: labels.actions }}
1199
- className="justify-end"
1200
- />
1201
- ),
1202
- className: "w-px whitespace-nowrap text-end",
1203
- headClassName: "w-px",
1204
- // On a phone the same actions are the card's swipes.
1205
- mobileHidden: true,
1206
- noRowLink: true,
1207
- },
1208
- ]
1209
- : columnsProp,
1210
- [columnsProp, rowActions, rowActionsFor, rowName, labels.actions, density],
1211
- );
1212
- const swipesFromActions = (row: T): MobileSwipeActions | null => {
1213
- const swipes = rowActionsFor(row).filter((a) => a.swipe && !a.action.disabledReason?.(row));
1214
- if (!swipes.length) return null;
1215
- const toSwipe = (a: ResolvedRowAction<T>): SwipeAction => ({
1216
- label: a.label,
1217
- icon: a.icon,
1218
- onCommit: () => void runRowAction(a.action, row),
1219
- // The row action's tone, painted by SwipeableRow: its soft wash idle, its fill
1220
- // and that fill's foreground armed (0.33).
1221
- tone: a.tone === "danger" ? "danger" : "brand",
1222
- });
1223
- return {
1224
- start: swipes.filter((a) => a.swipe === "start").map(toSwipe),
1225
- end: swipes.filter((a) => a.swipe === "end").map(toSwipe),
1226
- };
1227
- };
801
+ // ---- Row actions ---- (data-table-row-actions.tsx)
802
+ // The actions column joins the caller's columns; on a phone the same actions are the
803
+ // card's swipes, unless the caller's own `mobileSwipeActions` says otherwise.
804
+ const { columns, swipesFromActions } = useRowActionColumn({
805
+ columns: columnsProp,
806
+ rowActions,
807
+ rowName,
808
+ labels,
809
+ density,
810
+ });
1228
811
  const swipeActionsFor = mobileSwipeActions ?? (rowActions ? swipesFromActions : undefined);
1229
812
 
1230
813
  // Sorting, filtering and paging all change WHICH rows are on screen without
@@ -1255,6 +838,8 @@ export function DataTable<T>({
1255
838
  defaultPageSize,
1256
839
  sortsProp,
1257
840
  filtersProp,
841
+ // Ignored in `serverPagination` mode, where the owner's is the page size.
842
+ pageSizeProp: isServer ? undefined : pageSizeProp,
1258
843
  });
1259
844
 
1260
845
  // With the controls that change them switched off, persisted widths and hidden
@@ -1507,139 +1092,15 @@ export function DataTable<T>({
1507
1092
  visibleColumns.find((c) => !c.noRowLink))
1508
1093
  : undefined;
1509
1094
 
1510
- // ---- Column resize ----
1511
- //
1512
- // Pointer events with capture, rather than a `mousemove`/`mouseup` pair on `window`.
1513
- // Three defects in one eleven-line handler (audit 2026-09-22):
1514
- //
1515
- // * a `setWidths` per `mousemove` re-rendered every row of the table on every pixel
1516
- // of the drag — on a 500-row table that is the whole body, sixty times a second;
1517
- // * the two `window` listeners were added from inside an event handler, so nothing
1518
- // removed them if the table unmounted mid-drag (the row beneath opens a route),
1519
- // and `document.body.style` stayed at `user-select: none; cursor: col-resize` for
1520
- // the rest of the session — the whole page unselectable, with the wrong cursor;
1521
- // * `mousedown` is a mouse. Under a finger the handle did nothing at all.
1522
- //
1523
- // `setPointerCapture` answers all three: the handle itself receives every move and
1524
- // the terminating `pointerup`/`pointercancel` wherever the pointer travels, so there
1525
- // is nothing global to leak, and a touch drag works because a finger is a pointer.
1526
- // The live width is written straight onto the column's own cells — the same three
1527
- // properties the render sets, so the drag and the commit cannot disagree — and
1528
- // `setWidths` is called once, when the drag ends.
1529
- const resizing = useRef<Resize | null>(null);
1530
-
1531
- /** Every cell in one column, header first, totals row included. `data-col` rather than a cell index:
1532
- * an expanded row holds a single `colSpan` cell, so the nth `<td>` of a row is
1533
- * not reliably the nth column. */
1534
- const columnCells = (key: string): HTMLElement[] => {
1535
- const th = headRefs.get(key);
1536
- if (!th) return [];
1537
- const table = th.closest("table");
1538
- if (!table) return [th];
1539
- return [
1540
- th,
1541
- ...Array.from(table.querySelectorAll<HTMLElement>("tbody [data-col], tfoot [data-col]")).filter(
1542
- (el) => el.dataset.col === key,
1543
- ),
1544
- ];
1545
- };
1546
-
1547
- const applyLiveWidth = (cells: HTMLElement[], width: number | undefined) => {
1548
- const px = width == null ? "" : `${width}px`;
1549
- for (const el of cells) {
1550
- el.style.width = px;
1551
- el.style.minWidth = px;
1552
- el.style.maxWidth = px;
1553
- }
1554
- };
1555
-
1556
- const releaseResizeChrome = (handle: Element, pointerId: number) => {
1557
- document.body.style.userSelect = "";
1558
- document.body.style.cursor = "";
1559
- // Optional calls: jsdom implements neither, and the handlers sit on the handle
1560
- // itself, so a run without capture behaves the same for anything that stays
1561
- // inside the element.
1562
- if (handle.hasPointerCapture?.(pointerId)) handle.releasePointerCapture?.(pointerId);
1563
- };
1564
-
1565
- const startResize = (e: React.PointerEvent<HTMLElement>, key: string) => {
1566
- // Secondary buttons open menus; only a primary press starts a drag.
1567
- if (e.button !== 0) return;
1568
- e.preventDefault();
1569
- e.stopPropagation();
1570
- const th = headRefs.get(key);
1571
- const startWidth = th?.getBoundingClientRect().width ?? 100;
1572
- resizing.current = {
1573
- key,
1574
- pointerId: e.pointerId,
1575
- startX: e.clientX,
1576
- startWidth,
1577
- sign: isRtl(e.currentTarget) ? -1 : 1,
1578
- hadWidth: widths[key],
1579
- cells: columnCells(key),
1580
- width: startWidth,
1581
- moved: false,
1582
- };
1583
- e.currentTarget.setPointerCapture?.(e.pointerId);
1584
- document.body.style.userSelect = "none";
1585
- document.body.style.cursor = "col-resize";
1586
- };
1587
-
1588
- const moveResize = (e: React.PointerEvent<HTMLElement>) => {
1589
- const drag = resizing.current;
1590
- if (!drag || drag.pointerId !== e.pointerId) return;
1591
- drag.width = Math.max(40, Math.round(drag.startWidth + drag.sign * (e.clientX - drag.startX)));
1592
- drag.moved = true;
1593
- applyLiveWidth(drag.cells, drag.width);
1594
- };
1595
-
1596
- const finishResize = (e: React.PointerEvent<HTMLElement>, commit: boolean) => {
1597
- const drag = resizing.current;
1598
- // Before the early return: the page gets its selection and its cursor back even
1599
- // for a pointer we were not tracking.
1600
- releaseResizeChrome(e.currentTarget, e.pointerId);
1601
- if (!drag || drag.pointerId !== e.pointerId) return;
1602
- resizing.current = null;
1603
- if (commit && drag.moved) {
1604
- setWidths((w) => ({ ...w, [drag.key]: drag.width }));
1605
- return;
1606
- }
1607
- // Cancelled — the browser took the pointer for a system gesture — or the press
1608
- // never became a drag. Either way the column goes back to the width React last
1609
- // rendered it at, which nothing else can do: the inline width the drag wrote is
1610
- // invisible to React, so a re-render with an unchanged `widths` would keep it.
1611
- applyLiveWidth(drag.cells, drag.hadWidth);
1612
- };
1613
-
1614
- // The last exit path. A table that unmounts mid-drag takes the handle, and with it
1615
- // every handler above, out of the document — this is the only place left to hand the
1616
- // page back its text selection and its cursor.
1617
- useEffect(
1618
- () => () => {
1619
- if (!resizing.current) return;
1620
- resizing.current = null;
1621
- document.body.style.userSelect = "";
1622
- document.body.style.cursor = "";
1623
- },
1624
- [],
1625
- );
1626
-
1627
- const autoSizeAll = () => {
1628
- // Clear widths so the table reflows to natural sizes, then snapshot each
1629
- // column's width and write it back — except for the last visible column,
1630
- // which is left unconstrained so it absorbs any remaining horizontal space.
1631
- setWidths({});
1632
- requestAnimationFrame(() => {
1633
- const next: Record<string, number> = {};
1634
- const cols = columns.filter((c) => !hiddenCols.has(c.key));
1635
- cols.forEach((col, idx) => {
1636
- if (idx === cols.length - 1) return;
1637
- const th = headRefs.get(col.key);
1638
- if (th) next[col.key] = Math.ceil(th.getBoundingClientRect().width);
1639
- });
1640
- setWidths(next);
1641
- });
1642
- };
1095
+ // ---- Column resize ---- (data-table-resize.ts: pointer capture, one `setWidths` per
1096
+ // drag, and the page's cursor and selection handed back on an unmount mid-drag)
1097
+ const { startResize, moveResize, finishResize, autoSizeAll } = useColumnResize({
1098
+ headRefs,
1099
+ widths,
1100
+ setWidths,
1101
+ columns,
1102
+ hiddenCols,
1103
+ });
1643
1104
 
1644
1105
  const visibleCount = visibleColumns.length;
1645
1106
  const totalCount = columns.length;
@@ -1660,6 +1121,8 @@ export function DataTable<T>({
1660
1121
  : undefined;
1661
1122
  const footerValue = (col: DataTableColumn<T>) => col.footer?.(sorted, slice);
1662
1123
  const footerHeadingId = useId();
1124
+ // Each open row's detail row, for its disclosure button's `aria-controls`.
1125
+ const detailIdBase = useId();
1663
1126
  // The actions column is the table's own, not one the user can hide: out of the count.
1664
1127
  const columnsCountLabel = rowActions
1665
1128
  ? labels.columnsCount(visibleCount - 1, totalCount - 1)
@@ -1734,12 +1197,13 @@ export function DataTable<T>({
1734
1197
  unpaged,
1735
1198
  defaultPageSize,
1736
1199
  });
1737
- // The row whose selection was last toggled, so Shift+click can select the range up
1738
- // to it (feedback #289). Held as its KEY, not as an index into `slice`: the slice is
1739
- // re-derived from the current sort, filter and page, so an index taken before a
1740
- // header was clicked addresses a different row afterwards — and the range then ran
1741
- // from a row the user had never touched.
1742
- const selectionAnchor = useRef<string | number | null>(null);
1200
+ // ---- Shift+click range selection ---- (data-table-selection.ts; feedback #289,
1201
+ // anchored on the row's KEY so a sort, filter or page change cannot move it)
1202
+ const { selectionAnchor, rangeClick, canSelect, selectRange } = useRangeSelection({
1203
+ selection,
1204
+ slice,
1205
+ rowKey,
1206
+ });
1743
1207
  // ---- Keyboard-activatable rows ----
1744
1208
  //
1745
1209
  // A desktop row with `onRowClick` opened on a mouse click and on nothing else: no
@@ -1767,28 +1231,6 @@ export function DataTable<T>({
1767
1231
  : slice.length
1768
1232
  ? rowKey(slice[0])
1769
1233
  : null;
1770
- /** The checkbox click that drew a range, so its `onChange` can be told apart. */
1771
- const rangeClick = useRef<Event | null>(null);
1772
- const canSelect = (row: T) => !!selection && (selection.isSelectable?.(row) ?? true);
1773
- const selectRange = (toIndex: number) => {
1774
- if (!selection || selectionAnchor.current === null) return false;
1775
- const fromIndex = slice.findIndex((r) => rowKey(r) === selectionAnchor.current);
1776
- // The anchor has been filtered, sorted or paged off the screen: there is no range
1777
- // on display to draw, so the click falls through to the plain single-row toggle.
1778
- if (fromIndex < 0) return false;
1779
- const [lo, hi] = [fromIndex, toIndex].sort((a, b) => a - b);
1780
- const range: T[] = [];
1781
- for (let i = lo; i <= hi; i++) {
1782
- const r = slice[i];
1783
- if (r && canSelect(r)) range.push(r);
1784
- }
1785
- // One call where the owner can take one. See `selection.onToggleMany`: the row-by-
1786
- // row loop below is the fallback for an owner that has not adopted it, not the
1787
- // shape this should be in.
1788
- if (selection.onToggleMany) selection.onToggleMany(range, true);
1789
- else for (const r of range) selection.onToggle(r, true);
1790
- return true;
1791
- };
1792
1234
 
1793
1235
  // When dialog-mode is on, the expanded row's detail goes into a bottom-sheet
1794
1236
  // modal instead of unfolding inline. Only one row is ever expanded at a time.
@@ -1804,205 +1246,30 @@ export function DataTable<T>({
1804
1246
  if (mobileDialogRow) onRowClick?.(mobileDialogRow);
1805
1247
  };
1806
1248
 
1807
- // One mobile card. Extracted so the flat list and the grouped list (below)
1808
- // share identical row markup.
1809
- const renderMobileRow = (row: T) => {
1810
- const expanded = isExpanded?.(row) ?? false;
1811
- const expansion = expanded ? openedRowContent(row) : null;
1812
- const tint = rowClassName?.(row);
1813
- // Use div+role="button" rather than a real <button> so cells that
1814
- // contain their own interactive controls (status toggles, action
1815
- // icons) don't end up as illegal nested buttons.
1816
- const interactive = !!onRowClick;
1817
- // Say that the card OPENS something (Keksdose feedback #163). A phone card had
1818
- // only a cursor and a tap-tint to advertise its editor — on the invoice review
1819
- // screen, whose entire purpose is correcting mis-read lines, that read as "these
1820
- // values are not editable". A chevron is the affordance every list on a phone
1821
- // uses for exactly this, and it points the way the row actually opens: right into
1822
- // a sheet, or down into an inline panel that flips it when expanded.
1823
- const opensDetail = interactive && opensRow;
1824
- const swipeActions = swipeActionsFor?.(row);
1825
- const swipe = swipeActions ? physicalSwipe(swipeActions, mobileDir) : null;
1826
- // An expanded row never swipes: the editor below it owns the horizontal space,
1827
- // and dragging the header away from its own form reads as a glitch.
1828
- const swipeEnabled = !!swipe && !expanded;
1829
- const href = mobileCardLinkable ? rowHref?.(row) : undefined;
1830
- const cardClass = cn(
1831
- "w-full text-start flex items-center",
1832
- // §4: more room per row at Large — a taller row is a bigger tap target too.
1833
- compact ? "px-3 py-2 gap-2 text-sm large:py-3" : "px-4 py-3 gap-3 large:py-4",
1834
- // Live #320's other half: the card acknowledges the touch before the sheet
1835
- // arrives. On a cold route the data can take a beat, and an unacknowledged tap
1836
- // reads as "did that register?" — which is most of what "abrupt" means here.
1837
- // `origin-center` + a 0.5% squeeze is deliberately almost subliminal: this fires
1838
- // on every row of a long list, so anything larger becomes the list's personality
1839
- // rather than feedback. `transition-transform` alone, so the existing background
1840
- // flip stays instant.
1841
- interactive &&
1842
- "cursor-pointer transition-transform duration-100 active:scale-[0.995] active:bg-[var(--bg-active)] motion-reduce:transition-none motion-reduce:active:scale-100",
1843
- // The keyboard's frame drawn INSIDE the card, as the desktop row's is (keksdose live
1844
- // #394): the browser's own ring and tap highlight sit on the card's outer edge, and
1845
- // three ancestors clip it — SwipeableRow's `overflow-hidden`, the card list, and
1846
- // AppShell main's `overflow-x-clip` — so the frame went missing on one side. A press
1847
- // keeps the fill and the squeeze above; an outline on every tap of a long list would
1848
- // be louder than the acknowledgement it replaces.
1849
- interactive && cn("[-webkit-tap-highlight-color:transparent] focus-visible:ring-inset", FOCUS_RING),
1850
- );
1851
- // The card's content is written once and worn by either tag below. Note that
1852
- // the primary cell is rendered RAW here, never through `linkColumn` — the card
1853
- // itself is the anchor, and routing it through `linkColumn` too would nest an
1854
- // <a> inside an <a>. Desktop and mobile are mutually exclusive (`isMdUp`), so
1855
- // exactly one anchor exists per row.
1856
- const cardInner = (
1857
- <>
1858
- {/* The card's own content keeps the column it always had; the chevron sits
1859
- beside it rather than inside, so a caller's `mobileCard` is untouched. */}
1860
- <div
1861
- className={cn(
1862
- "flex min-w-0 flex-1 flex-col",
1863
- compact ? "gap-1 large:gap-2" : "gap-2 large:gap-3",
1864
- // §4 "nothing truncates": at Large a cell's own `truncate` wraps instead —
1865
- // the reader who chose bigger type is the one an ellipsis fails. A caller's
1866
- // `mobileCard` is its own layout and keeps what it chose.
1867
- !mobileCard && CARD_NO_TRUNCATE,
1868
- )}
1869
- >
1870
- {mobileCard ? (
1871
- mobileCard(row)
1872
- ) : (
1873
- <>
1874
- {/* Only the `data-*` half of `cellProps` — see its note. */}
1875
- {mobilePrimaryCol && (
1876
- <div {...dataAttrsOf(mobilePrimaryCol.cellProps?.(row))} className="min-w-0 break-words font-medium">
1877
- {mobilePrimaryCol.cell(row)}
1878
- </div>
1879
- )}
1880
- {mobileSecondaryColumns.length > 0 && large ? (
1881
- // §4: each label ABOVE its value at Large. Side by side, a label column
1882
- // sized to the widest label leaves a value a sliver of a 240 px card.
1883
- <StackedFields columns={mobileSecondaryColumns} row={row} compact={compact} />
1884
- ) : mobileSecondaryColumns.length > 0 && (
1885
- <dl
1886
- className={cn(
1887
- "grid grid-cols-[auto_1fr] gap-x-3",
1888
- compact ? "gap-y-0.5 text-xs" : "gap-y-1 text-sm",
1889
- )}
1890
- >
1891
- {mobileSecondaryColumns.map((col) => (
1892
- <Fragment key={col.key}>
1893
- <dt className="text-xs uppercase tracking-wide text-[var(--text-muted)] self-center">
1894
- {col.header}
1895
- </dt>
1896
- <dd
1897
- {...dataAttrsOf(col.cellProps?.(row))}
1898
- className="min-w-0 text-[var(--text-secondary)] self-center"
1899
- >
1900
- {col.cell(row)}
1901
- </dd>
1902
- </Fragment>
1903
- ))}
1904
- </dl>
1905
- )}
1906
- </>
1907
- )}
1908
- </div>
1909
- {opensDetail &&
1910
- // `aria-hidden`: the row already announces itself as a button with
1911
- // `aria-expanded`, so the icon would only add a second, wordless stop.
1912
- (mobileExpandAsDialog ? (
1913
- // Points INTO the sheet, which is the reading-forward direction.
1914
- <ChevronRight
1915
- aria-hidden
1916
- className="size-4 shrink-0 text-[var(--text-placeholder)] rtl:-scale-x-100"
1917
- />
1918
- ) : (
1919
- <ChevronDown
1920
- aria-hidden
1921
- className={cn(
1922
- "size-4 shrink-0 text-[var(--text-placeholder)] transition-transform",
1923
- expanded && "rotate-180",
1924
- )}
1925
- />
1926
- ))}
1927
- </>
1928
- );
1929
- const body =
1930
- interactive && href ? (
1931
- // A card with a URL of its own is a LINK, not a div wearing role="button"
1932
- // (feedback #451): the phone's long-press "open in new tab" and a screen
1933
- // reader's link semantics both come free, and the fake role goes away.
1934
- <RowLink
1935
- href={href}
1936
- onActivate={() => onRowClick!(row)}
1937
- aria-expanded={opensRow ? expanded : undefined}
1938
- className={cardClass}
1939
- // Enter already activates a link natively, and that routes through
1940
- // RowLink's own onClick — handling it here too would open the row twice.
1941
- // Space is the only key left, and only so it opens the row instead of
1942
- // scrolling the list.
1943
- onKeyDown={(e) => {
1944
- if (e.key !== " ") return;
1945
- e.preventDefault();
1946
- onRowClick!(row);
1947
- }}
1948
- >
1949
- {cardInner}
1950
- </RowLink>
1951
- ) : (
1952
- /* eslint-disable-next-line jsx-a11y/no-static-element-interactions -- the handlers are
1953
- only attached when `interactive`, and then so are role="button", tabIndex 0 and the
1954
- Enter/Space handler below; the rule cannot follow the conditional role. */
1955
- <div
1956
- role={interactive ? "button" : undefined}
1957
- tabIndex={interactive ? 0 : undefined}
1958
- onClick={
1959
- interactive
1960
- ? (e) => {
1961
- if (fromOutside(e.target, e.currentTarget)) return;
1962
- onRowClick!(row);
1963
- }
1964
- : undefined
1965
- }
1966
- onKeyDown={
1967
- interactive
1968
- ? (e) => {
1969
- // A key press inside a nested control is that control's.
1970
- if (e.target !== e.currentTarget) return;
1971
- if (e.key === "Enter" || e.key === " ") {
1972
- e.preventDefault();
1973
- onRowClick!(row);
1974
- }
1975
- }
1976
- : undefined
1977
- }
1978
- aria-expanded={opensRow ? expanded : undefined}
1979
- className={cardClass}
1980
- >
1981
- {cardInner}
1982
- </div>
1983
- );
1984
- return (
1985
- <li key={rowKey(row)} className={cn(tint)} {...cleanAttrs(rowAttributes?.(row))}>
1986
- {swipeEnabled ? (
1987
- <SwipeableRow enabled left={swipe!.left} right={swipe!.right}>
1988
- {body}
1989
- </SwipeableRow>
1990
- ) : (
1991
- body
1992
- )}
1993
- {expansion && !mobileExpandAsDialog && (
1994
- <div
1995
- className={cn(
1996
- "bg-[var(--bg-surface-2)] border-t border-[var(--border)]",
1997
- compact ? "px-3 py-2" : "px-4 py-3",
1998
- )}
1999
- >
2000
- {expansion}
2001
- </div>
2002
- )}
2003
- </li>
2004
- );
2005
- };
1249
+ // One mobile card (`MobileRow`, data-table-mobile.tsx). A function so the flat list
1250
+ // and the grouped list (below) share identical row markup.
1251
+ const renderMobileRow = (row: T) => (
1252
+ <MobileRow
1253
+ key={rowKey(row)}
1254
+ row={row}
1255
+ isExpanded={isExpanded}
1256
+ openedRowContent={openedRowContent}
1257
+ opensRow={opensRow}
1258
+ rowClassName={rowClassName}
1259
+ rowAttributes={rowAttributes}
1260
+ onRowClick={onRowClick}
1261
+ rowHref={rowHref}
1262
+ swipeActionsFor={swipeActionsFor}
1263
+ mobileDir={mobileDir}
1264
+ mobileCardLinkable={mobileCardLinkable}
1265
+ mobileCard={mobileCard}
1266
+ mobilePrimaryCol={mobilePrimaryCol}
1267
+ mobileSecondaryColumns={mobileSecondaryColumns}
1268
+ mobileExpandAsDialog={mobileExpandAsDialog}
1269
+ compact={compact}
1270
+ large={large}
1271
+ />
1272
+ );
2006
1273
 
2007
1274
  // Consecutive grouping of the (already-sorted) mobile slice into labelled
2008
1275
  // sections for the "assistance"-style list (feedback #317). Null unless the
@@ -2054,7 +1321,7 @@ export function DataTable<T>({
2054
1321
  className={cn(
2055
1322
  "flex flex-wrap items-center gap-2",
2056
1323
  frame
2057
- ? cn("border-b border-[var(--border)]", compact ? "px-2 py-1.5" : "px-3 py-2")
1324
+ ? cn("border-b border-subtle", compact ? "px-2 py-1.5" : "px-3 py-2")
2058
1325
  : "pb-3",
2059
1326
  )}
2060
1327
  >
@@ -2108,7 +1375,7 @@ export function DataTable<T>({
2108
1375
  )}
2109
1376
  <ul
2110
1377
  className={cn(
2111
- "divide-y divide-[var(--border)]",
1378
+ "divide-y divide-subtle",
2112
1379
  // Under `fillHeight` the list is the scroller, as the table body is on a
2113
1380
  // wide screen: the filter button stays above it and a server pager below.
2114
1381
  // The endless-scroll sentinel still fires in here — an
@@ -2122,7 +1389,7 @@ export function DataTable<T>({
2122
1389
  {mobileGroups
2123
1390
  ? mobileGroups.map((g) => (
2124
1391
  <Fragment key={`hb-group:${g.key}`}>
2125
- <li className="sticky top-0 z-10 bg-[var(--bg-surface-2)] px-4 py-1.5 text-xs font-semibold uppercase tracking-wide text-[var(--text-muted)] backdrop-blur">
1392
+ <li className="sticky top-0 z-10 bg-surface-2 px-4 py-1.5 text-xs font-semibold uppercase tracking-wide text-muted backdrop-blur">
2126
1393
  {mobileGroupLabel ? mobileGroupLabel(g.key) : g.key}
2127
1394
  </li>
2128
1395
  {g.rows.map(renderMobileRow)}
@@ -2132,7 +1399,7 @@ export function DataTable<T>({
2132
1399
  {mobileSlice.length === 0 && (
2133
1400
  <li
2134
1401
  className={cn(
2135
- "text-center text-[var(--text-muted)]",
1402
+ "text-center text-muted",
2136
1403
  compact ? "px-3 py-3 text-xs" : "px-4 py-6 text-sm",
2137
1404
  )}
2138
1405
  >
@@ -2144,7 +1411,7 @@ export function DataTable<T>({
2144
1411
  {canRevealMoreMobile && (
2145
1412
  <li
2146
1413
  ref={loadMoreRef}
2147
- className="px-4 py-4 text-center text-xs text-[var(--text-placeholder)]"
1414
+ className="px-4 py-4 text-center text-xs text-placeholder"
2148
1415
  >
2149
1416
  {/* Isolated for the reason spelled out on LoadingText. */}
2150
1417
  <bdi>{labels.loading}</bdi>
@@ -2163,7 +1430,7 @@ export function DataTable<T>({
2163
1430
  data-table-footer=""
2164
1431
  aria-labelledby={footerLabel != null ? footerHeadingId : undefined}
2165
1432
  className={cn(
2166
- "border-t-2 border-[var(--border-strong)] bg-[var(--bg-surface-2)]",
1433
+ "border-t-2 border-strong bg-surface-2",
2167
1434
  compact ? "px-3 py-2" : "px-4 py-3",
2168
1435
  isLoading && "opacity-60 transition-opacity",
2169
1436
  )}
@@ -2183,10 +1450,10 @@ export function DataTable<T>({
2183
1450
  .filter((c) => c.footer)
2184
1451
  .map((col) => (
2185
1452
  <Fragment key={col.key}>
2186
- <dt className="self-center text-xs uppercase tracking-wide text-[var(--text-muted)]">
1453
+ <dt className="self-center text-xs uppercase tracking-wide text-muted">
2187
1454
  {col.header}
2188
1455
  </dt>
2189
- <dd className="min-w-0 self-center font-semibold text-[var(--text-primary)]">
1456
+ <dd className="min-w-0 self-center font-semibold text-primary">
2190
1457
  {footerValue(col)}
2191
1458
  </dd>
2192
1459
  </Fragment>
@@ -2263,189 +1530,36 @@ export function DataTable<T>({
2263
1530
  only sideways and lets the header ride away on page scroll). The
2264
1531
  header then stays put as you scroll the rows. position:sticky on
2265
1532
  <thead> isn't reliable across browsers, so we put it on each <th>
2266
- (see headClassName below). */}
2267
- <thead className="bg-[var(--bg-surface-2)] text-[var(--text-secondary)]">
2268
- <tr className="text-start">
2269
- {selection && (
2270
- <th
2271
- scope="col"
2272
- className={cn(
2273
- "sticky top-0 z-10 bg-[var(--bg-surface-2)] align-middle backdrop-blur-sm",
2274
- compact ? "w-8 px-2 py-1" : "w-10 px-3 py-2",
2275
- )}
2276
- >
2277
- <input
2278
- type="checkbox"
2279
- className={cn("align-middle accent-indigo-600", compact ? "size-3.5" : "size-4")}
2280
- checked={selection.allSelected}
2281
- ref={(el) => {
2282
- if (el) el.indeterminate = selection.someSelected && !selection.allSelected;
2283
- }}
2284
- onChange={(e) => selection.onToggleAll(e.target.checked)}
2285
- aria-label={labels.selectAllRows}
2286
- />
2287
- </th>
2288
- )}
2289
- {visibleColumns.map((col) => {
2290
- // In server mode the utilities stay hidden unless the caller
2291
- // takes them over and feeds them back into the server query.
2292
- const sortable = (!isServer || !!onSortsChange) && !!col.sortBy;
2293
- const filter = !isServer || onFiltersChange ? resolveFilter(col) : null;
2294
- const filterState = filters[col.key] ?? (filter ? defaultFilterState(filter) : undefined);
2295
- const sortIdx = sorts.findIndex((s) => s.key === col.key);
2296
- const active = sortIdx !== -1;
2297
- const Icon = active ? (sorts[sortIdx].dir === "asc" ? ArrowUp : ArrowDown) : ArrowUpDown;
2298
- const filterActive = filterState && isFilterActive(filterState);
2299
- // Logical, and a legacy `text-right` still counts — see `logicalAlign`.
2300
- const headClass = logicalAlign(col.headClassName);
2301
- const isEndAligned = !!headClass && END_ALIGN.test(headClass);
2302
- const width = widths[col.key];
2303
- const ownHead = splitCellProps(col.headProps);
2304
- const pinnedHead = width ? { width, minWidth: width, maxWidth: width } : undefined;
2305
- return (
2306
- <th
2307
- {...ownHead.attrs}
2308
- key={col.key}
2309
- ref={(el) => {
2310
- if (el) headRefs.set(col.key, el);
2311
- else headRefs.delete(col.key);
2312
- }}
2313
- scope="col"
2314
- // Only a header the user can actually sort says anything: an
2315
- // `aria-sort` on a plain column is a control that is not there,
2316
- // and a persisted or URL sort can name a column with no `sortBy`
2317
- // (the sort chain drops it silently) — which would otherwise
2318
- // claim a sort the table is not applying.
2319
- //
2320
- // "none" on the rest is the half that was missing. Without it a
2321
- // sortable header is indistinguishable from a plain one until the
2322
- // user presses it. Secondary criteria read "none" too: ARIA allows
2323
- // exactly one sorted column, and the priority is carried by the
2324
- // badge and by what the header button announces on press.
2325
- aria-sort={
2326
- sortable
2327
- ? sortIdx === 0
2328
- ? sorts[0].dir === "asc"
2329
- ? "ascending"
2330
- : "descending"
2331
- : "none"
2332
- : undefined
2333
- }
2334
- style={ownHead.style || pinnedHead ? { ...ownHead.style, ...pinnedHead } : undefined}
2335
- className={cn(
2336
- "relative font-medium align-middle whitespace-nowrap",
2337
- compact ? "px-2 py-1" : "px-3 py-2",
2338
- // Keep the header visible while the user scrolls the page.
2339
- // Each <th> carries its own bg so the row doesn't render
2340
- // transparent over the data rows underneath.
2341
- "sticky top-0 z-10 bg-[var(--bg-surface-2)] backdrop-blur-sm",
2342
- logicalAlign(ownHead.className),
2343
- headClass,
2344
- )}
2345
- >
2346
- <div
2347
- className={cn(
2348
- "flex items-center gap-1",
2349
- isEndAligned && "flex-row-reverse",
2350
- )}
2351
- >
2352
- <Tooltip label={sortable && multiSort ? labels.sortHint : undefined} portal>
2353
- <button
2354
- type="button"
2355
- onClick={(e) => sortable && toggleSort(col.key, e.shiftKey)}
2356
- disabled={!sortable}
2357
- className={cn(
2358
- "flex items-center gap-1 text-start",
2359
- sortable && "hover:text-[var(--text-primary)]",
2360
- )}
2361
- >
2362
- <span>{col.header}</span>
2363
- {sortable && (
2364
- <Icon className={cn("size-3", active ? "opacity-100" : "opacity-40")} />
2365
- )}
2366
- {/* Priority badge, only meaningful with 2+ sort keys */}
2367
- {active && sorts.length > 1 && (
2368
- <span className="text-micro font-semibold leading-none text-brand">
2369
- {sortIdx + 1}
2370
- </span>
2371
- )}
2372
- </button>
2373
- </Tooltip>
2374
- {filter && (
2375
- <Popover
2376
- // 420 px at Normal, in rem so the calendar grows with its
2377
- // text (§3.2); Popover caps it at the viewport.
2378
- width={filter.type === "date" ? "26.25rem" : undefined}
2379
- // The panel is the column's filter, and says so. Unnamed it
2380
- // was announced as the kit-wide fallback, "Popover".
2381
- labels={{ panel: labels.filter }}
2382
- trigger={({ toggle, ref }) => (
2383
- <button
2384
- type="button"
2385
- ref={ref}
2386
- onClick={toggle}
2387
- aria-label={labels.filter}
2388
- className={cn(
2389
- "rounded p-1 transition-colors",
2390
- filterActive
2391
- ? "bg-[var(--brand-bg)] text-[var(--brand-muted)]"
2392
- : "text-[var(--text-placeholder)] hover:text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]",
2393
- )}
2394
- >
2395
- <Filter className="size-3" />
2396
- </button>
2397
- )}
2398
- >
2399
- {() => (
2400
- <FilterPopover
2401
- column={col}
2402
- state={filterState ?? defaultFilterState(filter)}
2403
- onChange={(next) => setFilterValue(col.key, next)}
2404
- onClear={() => clearFilter(col.key)}
2405
- selectOptions={selectOptionsByKey[col.key] ?? []}
2406
- labels={labels}
2407
- locale={locale}
2408
- />
2409
- )}
2410
- </Popover>
2411
- )}
2412
- </div>
2413
- {resizable && col.key !== ROW_ACTIONS_KEY && (
2414
- /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- a
2415
- pointer-only drag handle for a visual preference (column width); it is
2416
- deliberately not a tab stop, and no content or action depends on it. */
2417
- <span
2418
- role="separator"
2419
- aria-orientation="vertical"
2420
- onPointerDown={(e) => startResize(e, col.key)}
2421
- onPointerMove={moveResize}
2422
- onPointerUp={(e) => finishResize(e, true)}
2423
- onPointerCancel={(e) => finishResize(e, false)}
2424
- onDoubleClick={(e) => {
2425
- e.preventDefault();
2426
- setWidths((w) => {
2427
- const next = { ...w };
2428
- delete next[col.key];
2429
- return next;
2430
- });
2431
- }}
2432
- // `touch-none`: without it the browser claims a finger drag for
2433
- // scrolling before the first `pointermove` ever arrives.
2434
- // `end-0` and a translate that flips with it: the handle sits on the column's
2435
- // trailing edge, which is its left one in a right-to-left table.
2436
- className="absolute end-0 top-0 z-10 h-full w-1.5 -translate-x-1/2 rtl:translate-x-1/2 cursor-col-resize select-none touch-none hover:bg-[var(--brand-bg-hover)]"
2437
- />
2438
- )}
2439
- </th>
2440
- );
2441
- })}
2442
- </tr>
2443
- </thead>
1533
+ (see DataTableHead, data-table-head.tsx). */}
1534
+ <DataTableHead
1535
+ visibleColumns={visibleColumns}
1536
+ selection={selection}
1537
+ compact={compact}
1538
+ labels={labels}
1539
+ locale={locale}
1540
+ isServer={isServer}
1541
+ hasSortCallback={!!onSortsChange}
1542
+ hasFilterCallback={!!onFiltersChange}
1543
+ sorts={sorts}
1544
+ filters={filters}
1545
+ selectOptionsByKey={selectOptionsByKey}
1546
+ multiSort={multiSort}
1547
+ resizable={resizable}
1548
+ widths={widths}
1549
+ setWidths={setWidths}
1550
+ headRefs={headRefs}
1551
+ toggleSort={toggleSort}
1552
+ setFilterValue={setFilterValue}
1553
+ clearFilter={clearFilter}
1554
+ startResize={startResize}
1555
+ moveResize={moveResize}
1556
+ finishResize={finishResize}
1557
+ />
2444
1558
  <tbody
2445
1559
  className={cn(isLoading && slice.length > 0 && "opacity-60 transition-opacity")}
2446
1560
  >
2447
1561
  {leadingRow && (
2448
- <tr className="border-t border-[var(--border)]">
1562
+ <tr className="border-t border-subtle">
2449
1563
  <td colSpan={totalColSpan} className="p-0">
2450
1564
  {leadingRow}
2451
1565
  </td>
@@ -2457,13 +1571,34 @@ export function DataTable<T>({
2457
1571
  const rowInteractive = !!onRowClick || !!selection;
2458
1572
  const href = rowHref?.(row);
2459
1573
  const key = rowKey(row);
1574
+ const detailId = `${detailIdBase}-${rowIndex}`;
1575
+ // Whether the row is open, said where ARIA allows it (round 0.34, the
1576
+ // showcase's axe check): `aria-expanded` belongs to a treegrid's row, not a
1577
+ // table's, and the <tr> wore it. A disclosure button in the first cell carries
1578
+ // it now, with `aria-controls` on the detail row while that is there.
1579
+ // Visually hidden and not a tab stop: the row stays the one roving stop, with
1580
+ // Enter/Space and the whole-row click — this is the screen reader cursor's
1581
+ // way in, and where it hears the state. Named by `aria-label`, so the cell's
1582
+ // text stays the cell's own.
1583
+ const disclosure =
1584
+ rowsFocusable && expandedRow ? (
1585
+ <button
1586
+ type="button"
1587
+ tabIndex={-1}
1588
+ className="sr-only-fixed"
1589
+ aria-label={labels.rowDetails}
1590
+ aria-expanded={expanded}
1591
+ aria-controls={expansion ? detailId : undefined}
1592
+ // The row's own handler leaves a click on a control inside it alone.
1593
+ onClick={() => onRowClick!(row)}
1594
+ />
1595
+ ) : null;
2460
1596
  return (
2461
1597
  <Fragment key={key}>
2462
1598
  <tr
2463
1599
  {...cleanAttrs(rowAttributes?.(row))}
2464
1600
  data-row-nav={rowsFocusable ? "" : undefined}
2465
1601
  tabIndex={rowsFocusable ? (key === tabRowKey ? 0 : -1) : undefined}
2466
- aria-expanded={rowsFocusable && expandedRow ? expanded : undefined}
2467
1602
  onFocus={
2468
1603
  rowsFocusable
2469
1604
  ? (e) => {
@@ -2491,13 +1626,13 @@ export function DataTable<T>({
2491
1626
  : undefined
2492
1627
  }
2493
1628
  className={cn(
2494
- "border-t border-[var(--border)]",
2495
- rowInteractive && "cursor-pointer hover:bg-[var(--bg-hover)]",
1629
+ "border-t border-subtle",
1630
+ rowInteractive && "cursor-pointer hover:bg-hover",
2496
1631
  // The kit's focus frame width (§5, `--focus-ring-width`), drawn as an
2497
1632
  // OUTLINE rather than FOCUS_RING's box-shadow: a shadow on a `<tr>`
2498
1633
  // is not painted by every engine, an outline is.
2499
1634
  rowsFocusable &&
2500
- "focus-visible:bg-[var(--bg-hover)] focus-visible:outline-[length:var(--focus-ring-width)] focus-visible:-outline-offset-2 focus-visible:outline-[var(--brand)]",
1635
+ "focus-visible:bg-hover focus-visible:outline-focus focus-visible:-outline-offset-2 focus-visible:outline-brand",
2501
1636
  rowClassName?.(row),
2502
1637
  )}
2503
1638
  onClick={
@@ -2580,7 +1715,7 @@ export function DataTable<T>({
2580
1715
  )}
2581
1716
  </td>
2582
1717
  )}
2583
- {visibleColumns.map((col) => {
1718
+ {visibleColumns.map((col, colIndex) => {
2584
1719
  const width = widths[col.key];
2585
1720
  // The caller's first, the table's over it — see `cellProps`.
2586
1721
  const own = splitCellProps(col.cellProps?.(row));
@@ -2599,6 +1734,7 @@ export function DataTable<T>({
2599
1734
  logicalAlign(col.className),
2600
1735
  )}
2601
1736
  >
1737
+ {colIndex === 0 && disclosure}
2602
1738
  {col === linkColumn && href ? (
2603
1739
  // No `onActivate`: the click is left to bubble to the
2604
1740
  // <tr> handler above, which already owns expand-vs-select.
@@ -2614,7 +1750,7 @@ export function DataTable<T>({
2614
1750
  })}
2615
1751
  </tr>
2616
1752
  {expansion && (
2617
- <tr className="bg-[var(--bg-surface-2)] border-t border-[var(--border)]">
1753
+ <tr id={disclosure ? detailId : undefined} className="bg-surface-2 border-t border-subtle">
2618
1754
  {/* The detail panel spans every column. In an `auto` table
2619
1755
  layout (the default here — columns only get fixed style
2620
1756
  widths once the user resizes/auto-sizes them) the cell's
@@ -2640,7 +1776,7 @@ export function DataTable<T>({
2640
1776
  <tr>
2641
1777
  <td
2642
1778
  colSpan={totalColSpan}
2643
- className={cn("text-center text-[var(--text-muted)]", compact ? "px-2 py-2" : "px-3 py-4")}
1779
+ className={cn("text-center text-muted", compact ? "px-2 py-2" : "px-3 py-4")}
2644
1780
  >
2645
1781
  {/* Nothing is not the same as not-yet: "no results" while the first
2646
1782
  page is still in flight is a claim the table cannot make. */}
@@ -2658,7 +1794,7 @@ export function DataTable<T>({
2658
1794
  <tfoot
2659
1795
  data-table-footer=""
2660
1796
  className={cn(
2661
- "font-semibold text-[var(--text-primary)]",
1797
+ "font-semibold text-primary",
2662
1798
  isLoading && "opacity-60 transition-opacity",
2663
1799
  )}
2664
1800
  >
@@ -2715,7 +1851,9 @@ export function DataTable<T>({
2715
1851
  isServer
2716
1852
  ? serverPagination!.onPageSizeChange
2717
1853
  : (n) => {
2718
- setPageSize(n);
1854
+ // To the owner when it holds the page size, as `commitSorts` does.
1855
+ if (onPageSizeChange) onPageSizeChange(n);
1856
+ else setPageSize(n);
2719
1857
  setPage(0);
2720
1858
  }
2721
1859
  }
@@ -2726,89 +1864,16 @@ export function DataTable<T>({
2726
1864
  )}
2727
1865
  </div>
2728
1866
  {columnSettings && (
2729
- <>
2730
- <Tooltip label={columnsCountLabel} portal>
2731
- <button
2732
- type="button"
2733
- onClick={() => setShowSettings(true)}
2734
- aria-label={columnsCountLabel}
2735
- aria-hidden={showSettings}
2736
- tabIndex={showSettings ? -1 : 0}
2737
- className={cn(
2738
- "group flex shrink-0 items-start justify-center overflow-hidden pt-3 transition-[width] duration-200 ease-out",
2739
- "border-s border-[var(--border)]",
2740
- "hover:bg-[var(--bg-hover)]",
2741
- showSettings ? "w-0 border-s-0" : "w-8 cursor-pointer",
2742
- )}
2743
- >
2744
- <span
2745
- className="whitespace-nowrap text-xs font-medium tracking-wide text-[var(--text-muted)] group-hover:text-[var(--text-secondary)]"
2746
- style={{ writingMode: "vertical-rl", transform: "rotate(180deg)" }}
2747
- >
2748
- {columnsCountLabel}
2749
- </span>
2750
- </button>
2751
- </Tooltip>
2752
- <div
2753
- className={cn(
2754
- "shrink-0 overflow-hidden transition-[width] duration-200 ease-out",
2755
- showSettings ? "w-56" : "w-0",
2756
- )}
2757
- >
2758
- <div className="flex w-56 flex-col border-s border-[var(--border)] p-2">
2759
- <div className="mb-2 flex items-center justify-between gap-1">
2760
- <div className="text-xs font-medium uppercase tracking-wide text-[var(--text-muted)]">
2761
- {columnsCountLabel}
2762
- </div>
2763
- <Tooltip label={labels.close} portal>
2764
- <button
2765
- type="button"
2766
- onClick={() => setShowSettings(false)}
2767
- aria-label={labels.close}
2768
- className="rounded p-0.5 text-[var(--text-placeholder)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)]"
2769
- >
2770
- <X className="size-4" />
2771
- </button>
2772
- </Tooltip>
2773
- </div>
2774
- <button
2775
- type="button"
2776
- onClick={autoSizeAll}
2777
- className="mb-2 rounded border border-[var(--border)] px-2 py-1 text-xs font-medium text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"
2778
- >
2779
- {labels.autoSize}
2780
- </button>
2781
- <div className="flex flex-col gap-0.5">
2782
- {columns.map((col) => {
2783
- if (col.key === ROW_ACTIONS_KEY) return null;
2784
- const checked = !hiddenCols.has(col.key);
2785
- const headerLabel = columnLabel(col);
2786
- return (
2787
- <label
2788
- key={col.key}
2789
- className="inline-flex cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-xs hover:bg-[var(--bg-hover)]"
2790
- >
2791
- <input
2792
- type="checkbox"
2793
- className="size-3.5"
2794
- checked={checked}
2795
- onChange={(e) => {
2796
- setHiddenCols((s) => {
2797
- const next = new Set(s);
2798
- if (e.target.checked) next.delete(col.key);
2799
- else next.add(col.key);
2800
- return next;
2801
- });
2802
- }}
2803
- />
2804
- <span className="truncate">{headerLabel}</span>
2805
- </label>
2806
- );
2807
- })}
2808
- </div>
2809
- </div>
2810
- </div>
2811
- </>
1867
+ <ColumnSettingsPanel
1868
+ columns={columns}
1869
+ hiddenCols={hiddenCols}
1870
+ setHiddenCols={setHiddenCols}
1871
+ showSettings={showSettings}
1872
+ setShowSettings={setShowSettings}
1873
+ columnsCountLabel={columnsCountLabel}
1874
+ labels={labels}
1875
+ autoSizeAll={autoSizeAll}
1876
+ />
2812
1877
  )}
2813
1878
  </div>
2814
1879
  )}
@@ -2844,178 +1909,3 @@ function LoadingText({ label }: { label: string }) {
2844
1909
  </span>
2845
1910
  );
2846
1911
  }
2847
-
2848
- // ---------- Mobile filter sheet ----------
2849
-
2850
- /**
2851
- * Filter access for the mobile card list (feedback #299). The desktop table
2852
- * houses per-column filters in its header; the card list has no header, so the
2853
- * same filters were unreachable on phones. This renders a compact "Filters" bar
2854
- * that opens a bottom sheet listing each filterable column as a collapsible
2855
- * section, reusing the very same {@link FilterPopover} and filter state the
2856
- * desktop table drives — so it filters identically and stays URL-synced.
2857
- */
2858
- function MobileFilters<T>({
2859
- columns,
2860
- filters,
2861
- selectOptionsByKey,
2862
- isServer,
2863
- hasFilterCallback,
2864
- onSetFilter,
2865
- onClearFilter,
2866
- onClearAll,
2867
- labels,
2868
- locale,
2869
- }: {
2870
- columns: DataTableColumn<T>[];
2871
- filters: FilterState;
2872
- selectOptionsByKey: Record<string, { value: string; label: string }[]>;
2873
- isServer: boolean;
2874
- hasFilterCallback: boolean;
2875
- onSetFilter: (key: string, value: FilterValue) => void;
2876
- onClearFilter: (key: string) => void;
2877
- onClearAll: () => void;
2878
- labels: DataTableLabels;
2879
- locale?: string;
2880
- }) {
2881
- const [open, setOpen] = useState(false);
2882
- // The sheet is portalled to <body>, out from under whatever `dir` the table sits
2883
- // in, so it carries the trigger's direction with it — read at the moment of opening,
2884
- // from the element the user actually pressed.
2885
- const [dir, setDir] = useState<Direction>("ltr");
2886
- const [expanded, setExpanded] = useState<string | null>(null);
2887
- const backdropClose = useBackdropClose(() => setOpen(false));
2888
- useBodyScrollLock(open);
2889
- // Back dismisses the filter sheet too (Keksdose feedback #172) — it is the same
2890
- // full-screen surface, and the filters it sets are already in the URL, so closing
2891
- // it never loses anything.
2892
- useOverlayHistory(open, () => setOpen(false));
2893
-
2894
- const filterable = useMemo(
2895
- () =>
2896
- columns
2897
- .map((col) => ({ col, filter: !isServer || hasFilterCallback ? resolveFilter(col) : null }))
2898
- .filter((x): x is { col: DataTableColumn<T>; filter: ColumnFilter<T> } => !!x.filter),
2899
- [columns, isServer, hasFilterCallback],
2900
- );
2901
-
2902
- if (filterable.length === 0) return null;
2903
-
2904
- const activeCount = filterable.filter(({ col }) => {
2905
- const s = filters[col.key];
2906
- return s && isFilterActive(s);
2907
- }).length;
2908
-
2909
- return (
2910
- <div className="flex items-center justify-between gap-2 border-b border-[var(--border)] px-4 py-2">
2911
- <button
2912
- type="button"
2913
- onClick={(e) => {
2914
- setDir(dirOf(e.currentTarget));
2915
- setOpen(true);
2916
- }}
2917
- className="inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"
2918
- >
2919
- <Filter className="size-4" />
2920
- <span>{labels.filters}</span>
2921
- {activeCount > 0 && (
2922
- <span className="inline-flex min-w-4 items-center justify-center rounded-full bg-[var(--info-bg)] px-1 text-caption font-semibold text-[var(--info)]">
2923
- {activeCount}
2924
- </span>
2925
- )}
2926
- </button>
2927
- {activeCount > 0 && (
2928
- <button
2929
- type="button"
2930
- onClick={onClearAll}
2931
- className="text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)]"
2932
- >
2933
- {labels.clearAll}
2934
- </button>
2935
- )}
2936
- {open &&
2937
- createPortal(
2938
- <div
2939
- className="fixed inset-0 z-50 flex items-end justify-center bg-black/40"
2940
- role="dialog"
2941
- aria-modal="true"
2942
- dir={dir}
2943
- {...backdropClose}
2944
- >
2945
- <div className="flex max-h-[85vh] w-full flex-col overflow-hidden rounded-t-2xl bg-[var(--bg-surface)] shadow-xl">
2946
- <div className="flex items-center justify-between gap-2 border-b border-[var(--border)] px-4 py-3">
2947
- <div className="font-medium">{labels.filters}</div>
2948
- <button
2949
- type="button"
2950
- onClick={() => setOpen(false)}
2951
- aria-label={labels.close}
2952
- className="-me-1 rounded p-1.5 text-[var(--text-muted)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)]"
2953
- >
2954
- <X className="size-5" />
2955
- </button>
2956
- </div>
2957
- <div className="flex-1 divide-y divide-[var(--border)] overflow-y-auto overscroll-contain">
2958
- {filterable.map(({ col, filter }) => {
2959
- const state = filters[col.key];
2960
- const active = !!state && isFilterActive(state);
2961
- const isItemOpen = expanded === col.key;
2962
- return (
2963
- <div key={col.key}>
2964
- <button
2965
- type="button"
2966
- onClick={() => setExpanded(isItemOpen ? null : col.key)}
2967
- aria-expanded={isItemOpen}
2968
- className="flex w-full items-center justify-between gap-2 px-4 py-3 text-start"
2969
- >
2970
- <span className="flex items-center gap-2 text-sm font-medium text-[var(--text-secondary)]">
2971
- {col.header}
2972
- {active && <span className="size-1.5 rounded-full bg-brand" />}
2973
- </span>
2974
- <ChevronDown
2975
- className={cn(
2976
- "size-4 shrink-0 text-[var(--text-placeholder)] transition-transform",
2977
- isItemOpen && "rotate-180",
2978
- )}
2979
- />
2980
- </button>
2981
- {isItemOpen && (
2982
- <div className="px-4 pb-3">
2983
- <FilterPopover
2984
- column={col}
2985
- state={state ?? defaultFilterState(filter)}
2986
- onChange={(next) => onSetFilter(col.key, next)}
2987
- onClear={() => onClearFilter(col.key)}
2988
- selectOptions={selectOptionsByKey[col.key] ?? []}
2989
- labels={labels}
2990
- locale={locale}
2991
- />
2992
- </div>
2993
- )}
2994
- </div>
2995
- );
2996
- })}
2997
- </div>
2998
- <div className="flex items-center justify-between gap-2 border-t border-[var(--border)] px-4 py-3">
2999
- <button
3000
- type="button"
3001
- onClick={onClearAll}
3002
- disabled={activeCount === 0}
3003
- className="text-sm text-[var(--text-muted)] hover:text-[var(--text-secondary)] disabled:opacity-40"
3004
- >
3005
- {labels.clearAll}
3006
- </button>
3007
- <button
3008
- type="button"
3009
- onClick={() => setOpen(false)}
3010
- className="rounded-md bg-[var(--bg-inverse)] px-4 py-2 text-sm font-medium text-[var(--text-inverse)]"
3011
- >
3012
- {labels.done}
3013
- </button>
3014
- </div>
3015
- </div>
3016
- </div>,
3017
- document.body,
3018
- )}
3019
- </div>
3020
- );
3021
- }