@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,575 +1,32 @@
1
- import { useEffect, useId, useMemo, useRef, useState } from "react";
2
- import type { ComponentPropsWithoutRef, ComponentType, KeyboardEvent, ReactNode, RefObject } from "react";
3
- import { Calendar, CalendarClock, ChevronDown, ChevronLeft, ChevronRight, X } from "lucide-react";
1
+ import type { ComponentType } from "react";
2
+ import { CalendarClock, ChevronLeft, ChevronRight } from "lucide-react";
4
3
  import { cn } from "../lib/cn";
5
- import { dirOf, horizontalStep, type Direction } from "../lib/direction";
6
- import { addDaysIso, monthKey, pad, parseIsoDate } from "../lib/dates";
7
- import {
8
- DEFAULT_DATE_PICKER_LABELS,
9
- DEFAULT_PICKER_SHEET_LABELS,
10
- useKitDateFormatter,
11
- useKitLabels,
12
- useKitLocale,
13
- type DatePickerLabels,
14
- type KitDateFormatContext,
15
- } from "../i18n/kit-labels";
4
+ import { addDaysIso } from "../lib/dates";
5
+ import { useKitLocale } from "../i18n/kit-labels";
16
6
  import { splitTriggerAria } from "./trigger-aria";
17
- import type { TriggerAria } from "./trigger-aria";
18
- import { Button, FIELD_BASE, FIELD_TRIGGER, FIELD_FLOATING_PAD, FIELD_INVALID } from "./ui";
19
- import { FOCUS_RING_WIDTH } from "./focus-ring";
20
- import { FieldBox, FieldLabelLine, LABEL_ABOVE_BOX, useFieldMessages } from "./field-parts";
21
- import { FullBleedDialog } from "./full-bleed-dialog";
22
- import { usePhoneLayout, type RemLength } from "../hooks/use-breakpoint";
23
- import { DEFAULT_MINI_CALENDAR_LABELS, MiniCalendar, type MiniCalendarProps } from "./mini-calendar";
24
- import { DEFAULT_MONTH_PICKER_LABELS } from "./month-picker";
25
- import { Popover } from "./popover";
7
+ import { FIELD_BASE } from "./field-base";
8
+ import { FieldBox, useFieldMessages } from "./field-parts";
26
9
  import { Tooltip } from "./tooltip";
27
-
28
- /**
29
- * What both pickers share — and, through `ComponentPropsWithoutRef<"div">`, everything a
30
- * `<div>` takes, so a `data-tour` anchor, a test id or an `aria-describedby` reaches the
31
- * field's root element instead of being dropped (audit §api-design).
32
- *
33
- * `onChange` is omitted from those attributes: the DOM event of that name carries a
34
- * `FormEvent`, while both pickers answer with ISO date strings. Each declares its own
35
- * below.
36
- */
37
- interface DatePickerBaseProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
38
- /** BCP 47 tag for the trigger's date and the calendar. Falls back to
39
- * `<UiKitProvider locale>`, then to the runtime's default. */
40
- locale?: string;
41
- /** Embedded top-boundary label, matching the native Input/Select fields. */
42
- label?: ReactNode;
43
- placeholder?: string;
44
- /** Inclusive ISO bounds for selectable days. */
45
- min?: string;
46
- max?: string;
47
- /** Show an X to clear the value (emits `""`). */
48
- clearable?: boolean;
49
- /** Accessible name of the clear button. Wins over `datePicker.clear` from
50
- * `<UiKitProvider labels>`; kept as a prop because it predates the provider. */
51
- clearLabel?: string;
52
- disabled?: boolean;
53
- /** Required and unanswered — {@link FIELD_INVALID}. See {@link Input}'s `invalid`. */
54
- invalid?: boolean;
55
- /**
56
- * Standing advice for the field (keksdose K4, "uniform field anatomy"), as on a
57
- * {@link Select}: plain TEXT is a caption under the field, attached with
58
- * `aria-describedby`; a {@link FieldHint} rides the label line (or, unlabelled, sits
59
- * at the field's end, outside the box).
60
- */
61
- hint?: ReactNode;
62
- /**
63
- * What is wrong with the date, in the caller's words ("The due date is before the
64
- * invoice date") — {@link Input}'s `error` (keksdose K4: DateField errors had no slot).
65
- * Rendered under the field (under the whole row, with `step` / `today`), attached to
66
- * the trigger with `aria-describedby` — merged with any the caller passed, after the
67
- * caption — and implies `invalid`. Passing the key at all keeps the field's box while
68
- * there is no message, so the trigger is never remounted as one comes and goes.
69
- */
70
- error?: ReactNode;
71
- className?: string;
72
- /** Intl options for the trigger's formatted date (default: locale short date). Win
73
- * over the provider's `formatDate`. */
74
- formatOptions?: Intl.DateTimeFormatOptions;
75
- /** Render the trigger's text for an ISO date yourself; wins over `formatOptions` and
76
- * over the provider's `formatDate`.
77
- * For a host whose date rendering is more than one `Intl` call can say — Keksdose
78
- * puts the weekday's name in the UI language beside digits ordered by a separate
79
- * format preference, two locales in one string. `locale` still drives the calendar.
80
- * Set that rendering once with `<UiKitProvider formatDate>` (keksdose K12) and this
81
- * is for the one field that differs. */
82
- formatValue?: (iso: string) => string;
83
- /** Passed through to the {@link MiniCalendar} this opens. Its month arrows are
84
- * icon-only, so their `aria-label` is the only name they have — and the package
85
- * ships English defaults, which a translating host has to be able to replace.
86
- * Usually unnecessary now: the calendar reads `miniCalendar` from the provider. */
87
- calendarLabels?: MiniCalendarProps["labels"];
88
- /**
89
- * Make the panel's caption ("July 2026") a button that opens the year's twelve
90
- * months, with ‹ › stepping a year; picking a month returns to its days. Far dates
91
- * stop being a march of month arrows.
92
- *
93
- * kastlan is why: its service-charge period runs July to June, and with one month on
94
- * screen and ‹ › the only way across, the end of the period was eleven clicks past
95
- * the start — so kastlan kept two date fields instead of `RhfDateRangePicker`. With
96
- * the jump the whole period is open, caption, Jul, 1, caption, next year, Jun, 30.
97
- *
98
- * What it adds, for the keyboard and a screen reader:
99
- * - the caption is a disclosure button (`aria-expanded`). Its name is the month it
100
- * shows, so speech input can say what it sees; it is `aria-live`, as the
101
- * calendar's caption was, so paging months still says where you landed; and it is
102
- * described by `monthPicker.panel` ("Choose a month").
103
- * - the month grid is `MonthPicker`'s grid: one tab stop, arrows walk the months
104
- * (across the year's edge), Home/End the row, PageUp/PageDown a year, Enter or a
105
- * click picks. Focus opens on the month on show and comes back on its days — the
106
- * selected day if it is in that month, else the 1st. Months outside `min`/`max`
107
- * are `aria-disabled`, and a year arrow is once the whole year beyond is.
108
- * - Escape in the month grid goes back to the days without closing the panel (focus
109
- * on the caption); in the days, Escape closes the panel as before.
110
- *
111
- * No new strings: the month arrows keep `miniCalendar.previousMonth` / `nextMonth`
112
- * (`calendarLabels`), and the month grid speaks with `MonthPicker`'s words —
113
- * `monthPicker.previousYear` / `nextYear` / `month` / `panel` — because it is that
114
- * grid, and a host that translated it once should not have to again.
115
- *
116
- * Off by default: the caption becomes one more stop in the panel's tab order, which a
117
- * 0.x minor does not spring on a form. Works in the popover and in
118
- * `DateRangePicker`'s phone sheet alike, beside presets and in `commit="apply"`
119
- * (a preset picked while the months are open goes back to the days, on its start).
120
- *
121
- * Why not a two-month panel (`months={2}`) instead, or beside it: for a twelve-month
122
- * period it still pages six times where this takes one year step, and two
123
- * `MiniCalendar`s side by side each follow the value on their own — picking the end
124
- * in the right-hand month would pull the left one onto it — so the calendar would
125
- * have to learn to share a month first. Not worth that for a saving of one arrow on a
126
- * range across a single month boundary.
127
- */
128
- monthJump?: boolean;
129
- }
130
-
131
- /** Format an ISO date for the trigger. `lib/dates`' `formatIsoDate` insists on a
132
- * locale, and here there may be none — no prop and no provider — which `Intl` reads
133
- * as "the runtime's default", as every other kit formatter does. */
134
- function formatDate(iso: string, locale: string | undefined, options?: Intl.DateTimeFormatOptions) {
135
- return parseIsoDate(iso)?.toLocaleDateString(locale, options) ?? "";
136
- }
137
-
138
- /**
139
- * The trigger's date renderer, in the kit's order of precedence: the picker's own
140
- * `formatValue`, then its `formatOptions` (an explicit `Intl` look for this field),
141
- * then the provider's `formatDate` (keksdose K12), then the locale's short date. A
142
- * provider formatter that answers `""` falls through to the default for that date.
143
- */
144
- function useTriggerFormat(
145
- source: KitDateFormatContext["source"],
146
- locale: string | undefined,
147
- formatOptions: Intl.DateTimeFormatOptions | undefined,
148
- formatValue: ((iso: string) => string) | undefined,
149
- ): (iso: string) => string {
150
- const fromProvider = useKitDateFormatter();
151
- if (formatValue) return formatValue;
152
- return (iso) => {
153
- if (formatOptions === undefined && fromProvider) {
154
- // A single date stands alone, where the weekday helps; a range's two ends do not.
155
- const text = fromProvider(iso, { unit: "day", source, locale, weekday: source === "datePicker" });
156
- if (text) return text;
157
- }
158
- return formatDate(iso, locale, formatOptions);
159
- };
160
- }
161
-
162
- /**
163
- * Everything the kit's own trigger button carries, handed to a custom one
164
- * ({@link DateRangePickerProps.renderTrigger}) to spread onto its `<button>`. Spread
165
- * it WHOLE: the ref is how focus comes back when the panel closes, the id pair and
166
- * `aria-labelledby` are the 0.5.1 naming (an external `<label htmlFor>`, a form
167
- * library's `aria-describedby`), and `role`/`aria-haspopup`/`aria-controls`/
168
- * `aria-expanded` are what tell a screen reader this opens a calendar and whether it
169
- * is open. `className` is the kit's field look (42px with a label, `pe-9` for the
170
- * glyph the field draws at its end) — merge yours after it with `cn`.
171
- */
172
- export interface DateTriggerAttributes {
173
- ref: RefObject<HTMLButtonElement | null>;
174
- type: "button";
175
- id?: string;
176
- role: "combobox";
177
- "aria-haspopup": "dialog";
178
- "aria-controls": string;
179
- "aria-expanded": boolean;
180
- "aria-labelledby"?: string;
181
- "aria-label"?: string;
182
- "aria-describedby"?: string;
183
- "aria-invalid"?: true;
184
- /** The field's required state — `Field required` hands it down with the id pair. */
185
- "aria-required"?: boolean | "true" | "false";
186
- disabled?: boolean;
187
- onClick: () => void;
188
- className: string;
189
- }
190
-
191
- /** A custom trigger, as `DateField` calls it; each picker adapts it to its own props. */
192
- type TriggerRenderer = (attrs: DateTriggerAttributes, valueId: string) => ReactNode;
193
-
194
- /** A caller's trigger, as an element of its own: the attributes carry the trigger's
195
- * ref, and a ref is handed to a child as a prop, not passed to a function in the
196
- * middle of the parent's render. */
197
- function CustomTrigger({
198
- render,
199
- attrs,
200
- valueId,
201
- }: {
202
- render: TriggerRenderer;
203
- attrs: DateTriggerAttributes;
204
- valueId: string;
205
- }) {
206
- return render(attrs, valueId);
207
- }
208
-
209
- /**
210
- * The trigger's value wraps instead of truncating at Large and Extra large (0.32.1, the
211
- * 360 px Extra-large sweep; docs/text-size-harmonization.md §4 "nothing truncates"). A
212
- * range ("01/09/2026 – 30/09/2026") is 312 px at 150 %, and on a 360 px phone it read
213
- * "01/09/2026 – 30/…" — its end, the half a reader needs, was the half cut off. A
214
- * `large:` class, so Normal keeps its one-line field: since 0.33 (§10.17) the kit's one
215
- * `truncate-until-large` (tokens.css) in place of this file's own `truncate` +
216
- * `large:whitespace-normal large:break-words`.
217
- */
218
- const VALUE_TRUNCATE = "truncate-until-large";
219
-
220
- /**
221
- * The field-shaped button that opens the calendar.
222
- *
223
- * A component of its own rather than JSX inline in `Popover`'s `trigger` render prop,
224
- * because handing focus back to it is an effect and a render prop is not somewhere a
225
- * hook can go.
226
- */
227
- function DateFieldTrigger({
228
- open,
229
- toggle,
230
- triggerRef,
231
- triggerText,
232
- hasValue,
233
- labelledBy,
234
- valueId,
235
- padded,
236
- disabled,
237
- invalid,
238
- required,
239
- panelId,
240
- aria,
241
- renderTrigger,
242
- }: {
243
- /** The caller's naming/description attributes, routed here from the field. */
244
- aria: TriggerAria;
245
- /** Draw the button yourself, with these attributes — see {@link DateTriggerAttributes}. */
246
- renderTrigger?: TriggerRenderer;
247
- open: boolean;
248
- toggle: () => void;
249
- triggerRef: RefObject<HTMLButtonElement | null>;
250
- /** The panel's id — `role="combobox"` requires `aria-controls`. */
251
- panelId: string;
252
- triggerText: string;
253
- hasValue: boolean;
254
- /** ids of the hidden label twin + the value span, in the order they are spoken. */
255
- labelledBy?: string;
256
- valueId: string;
257
- padded: boolean;
258
- disabled?: boolean;
259
- invalid?: boolean;
260
- /** `aria-required`, on the trigger with the rest of the field's ARIA. */
261
- required?: boolean | "true" | "false";
262
- }) {
263
- const wasOpen = useRef(false);
264
- useEffect(() => {
265
- const justClosed = wasOpen.current && !open;
266
- wasOpen.current = open;
267
- if (!justClosed) return;
268
- // Only when the panel still HAD focus. The day the user was standing on has just
269
- // been unmounted with the panel, which drops focus to <body> and leaves a
270
- // keyboard user back at the top of the document with no idea where they were.
271
- // But an outside click closes this panel too, and that click has already given
272
- // focus to whatever it landed on — dragging it back here would be worse than the
273
- // bug, so a focus that is somewhere real is left alone.
274
- const active = document.activeElement;
275
- if (!active || active === document.body) triggerRef.current?.focus();
276
- // Here rather than through `useFocusTrap`'s `restoreFocus`, and not only because
277
- // `Popover` runs no trap to carry it: that option restores to whatever held focus
278
- // when the panel opened, and on Safari — and on Firefox on macOS — clicking a
279
- // button does not focus it, so "whatever held focus" is the page. The requirement
280
- // is this trigger, every time, however the panel was opened.
281
- }, [open, triggerRef]);
282
-
283
- // One attribute object, worn either by the kit's own button below or by a caller's
284
- // (`renderTrigger`) — so a custom trigger cannot quietly fall out of step with the
285
- // naming and state this one announces.
286
- const isInvalid = Boolean(invalid) || aria["aria-invalid"] === true || aria["aria-invalid"] === "true";
287
- const attrs: DateTriggerAttributes = {
288
- ref: triggerRef,
289
- type: "button",
290
- disabled,
291
- onClick: toggle,
292
- // The name has to carry the VALUE. A bare `aria-label={label}` — which is what
293
- // this was — replaces the button's text outright, so the one field in the form
294
- // whose entire job is to show a date announced "Due date" and stopped there,
295
- // and a screen-reader user could not read back what they had picked without
296
- // opening the calendar and hunting for the selected day.
297
- //
298
- // Two ids rather than one composed string (`common.fieldValue`): "label: value"
299
- // is a sentence, and a name reference is spoken as the two texts in order with
300
- // no punctuation to translate at all. The hidden twin of the FieldLabel lives
301
- // in DateField, next to the label it copies.
302
- id: aria.id,
303
- "aria-labelledby": aria["aria-label"] && !aria["aria-labelledby"] ? undefined : labelledBy,
304
- "aria-label": aria["aria-label"],
305
- "aria-describedby": aria["aria-describedby"],
306
- // `role="combobox"` on a button that opens a calendar is the APG date-picker
307
- // shape, and it is what makes the next two lines legal: `button` supports
308
- // neither `aria-expanded` nor `aria-invalid`, so the previous markup set an
309
- // invalid state that announced nothing (ESLint's `role-supports-aria-props`).
310
- //
311
- // `aria-haspopup="dialog"` is now honest — it was not when this comment first
312
- // said so. `Popover` gained a real `role="dialog"` in the same wave, so the
313
- // trigger's promise and the panel's role finally agree. The phone sheet is a
314
- // `role="dialog"` too, and carries the same id.
315
- role: "combobox",
316
- "aria-haspopup": "dialog",
317
- "aria-controls": panelId,
318
- "aria-expanded": open,
319
- "aria-invalid": isInvalid || undefined,
320
- "aria-required": required,
321
- className: cn(
322
- FIELD_TRIGGER,
323
- "pe-9",
324
- padded && FIELD_FLOATING_PAD,
325
- disabled && "cursor-not-allowed opacity-50",
326
- // An `aria-invalid` from a Field spread paints too, as on Input and AmountInput.
327
- isInvalid && FIELD_INVALID,
328
- ),
329
- };
330
- if (renderTrigger) return <CustomTrigger render={renderTrigger} attrs={attrs} valueId={valueId} />;
331
-
332
- return (
333
- <button {...attrs}>
334
- <span id={valueId} className={cn(VALUE_TRUNCATE, !hasValue && "text-[var(--text-placeholder)]")}>
335
- {/* `|| " "` (a NON-BREAKING space) — triggerText is "" when there is no value and no
336
- placeholder was passed. An empty span has no line box, so the
337
- trigger collapses to its padding and sits shorter than every
338
- other field beside it.
339
-
340
- It has to be a NON-BREAKING space. This read `|| " "` first, and
341
- that fix did nothing at all: an ordinary space is collapsible
342
- white space, and white space at the start and end of a line is
343
- removed — so the span rendered with height 0 and the trigger
344
- stayed 22px against the 42px of the fields either side of it
345
- (Keksdose live #294, measured in the browser: `span.textContent`
346
- WAS `" "` and `getBoundingClientRect().height` was 0). U+00A0 is
347
- not collapsible, so it holds the line. */}
348
- {triggerText || " "}
349
- </span>
350
- </button>
351
- );
352
- }
353
-
354
- /**
355
- * How a panel's body and its action row are put on screen — the popover stacks them,
356
- * the phone sheet pins the actions in its footer. Handed to the panel rather than
357
- * applied around it because the actions belong to the panel's own draft state
358
- * (`RangePanel`), while the frame they sit in belongs to the field.
359
- */
360
- type PanelFrame = (body: ReactNode, actions?: ReactNode) => ReactNode;
361
-
362
- const popoverFrame: PanelFrame = (body, actions) =>
363
- actions ? (
364
- <div className="flex flex-col gap-2">
365
- {body}
366
- <div className="flex items-center justify-end gap-2 border-t border-[var(--border)] pt-2">{actions}</div>
367
- </div>
368
- ) : (
369
- body
370
- );
371
-
372
- /** A field-styled trigger that opens a portalled MiniCalendar. Shared by the
373
- * single- and range-date pickers below. */
374
- function DateField({
375
- triggerText,
376
- hasValue,
377
- label,
378
- disabled,
379
- clearable,
380
- clearLabel,
381
- panelLabel,
382
- className,
383
- width,
384
- onClear,
385
- invalid,
386
- sheet = false,
387
- sheetBackCloses = true,
388
- renderTrigger,
389
- labelHint,
390
- children,
391
- // The trigger's, not the wrapper's: `Field`'s render-prop spreads it with the id
392
- // pair, and a required date read as optional while it sat on the role-less div.
393
- // Taken here rather than in `splitTriggerAria`, which MonthPicker shares.
394
- "aria-required": ariaRequired,
395
- ...rest
396
- }: Omit<ComponentPropsWithoutRef<"div">, "children"> & {
397
- triggerText: string;
398
- hasValue: boolean;
399
- label?: ReactNode;
400
- /** A `FieldHint` for the label line, beside the label. */
401
- labelHint?: ReactNode;
402
- disabled?: boolean;
403
- clearable?: boolean;
404
- /** Already resolved by the picker (prop > provider > English). */
405
- clearLabel: string;
406
- /** The popover panel's accessible name, resolved likewise. */
407
- panelLabel: string;
408
- invalid?: boolean;
409
- className?: string;
410
- /** Popover panel width; omit for the default (a bare calendar). In rem so it grows
411
- * with the text size, like the Popover's own default (§3.2). */
412
- width?: number | RemLength;
413
- onClear: () => void;
414
- /** Open as a full-screen sheet instead of the popover — the picker decides when
415
- * (in the phone layout, `usePhoneLayout()`). */
416
- sheet?: boolean;
417
- /** The sheet's `FullBleedDialog backCloses`. */
418
- sheetBackCloses?: boolean;
419
- renderTrigger?: TriggerRenderer;
420
- children: (close: () => void, frame: PanelFrame) => ReactNode;
421
- }) {
422
- const showClear = Boolean(clearable && hasValue && !disabled);
423
- const [aria, wrapperRest] = splitTriggerAria(rest);
424
- // The panel is portalled to <body> and leaves the subtree whose `dir` it inherited,
425
- // so a calendar in an RTL form opened LTR — the grid's columns, its arrow keys and
426
- // its chevrons all the wrong way round. Read at the moment of opening (the only way
427
- // the popover opens is through `toggle`) and put back on the panel.
428
- const rootRef = useRef<HTMLDivElement>(null);
429
- const [dir, setDir] = useState<Direction>("ltr");
430
- const id = useId();
431
- const labelId = `${id}-label`;
432
- const valueId = `${id}-value`;
433
- const panelId = `${id}-panel`;
434
- // Only a STRING label can be reused as a name; a ReactNode may be a whole row with
435
- // its own interactive "?" hint in it, and naming a button with that reads the hint
436
- // out as part of the field's name.
437
- const named = typeof label === "string";
438
- // The sheet's open flag. Only the phone branch owns one: on desktop `Popover` owns
439
- // it, so the two can never disagree about what is on screen.
440
- const [sheetOpen, setSheetOpen] = useState(false);
441
- const sheetTriggerRef = useRef<HTMLButtonElement>(null);
442
- const closeSheet = () => setSheetOpen(false);
443
- const sheetLabels = useKitLabels("pickerSheet", DEFAULT_PICKER_SHEET_LABELS);
444
- const sheetFrame: PanelFrame = (body, actions) => (
445
- <FullBleedDialog
446
- open
447
- onClose={closeSheet}
448
- // The same id the popover panel wears, so the trigger's `aria-controls` holds in
449
- // both presentations; named the way the popover is.
450
- id={panelId}
451
- aria-label={panelLabel}
452
- header={panelLabel}
453
- // `pickerSheet.close`: the one "close this full-screen picker" string the kit
454
- // already translates, rather than a second key saying the same thing.
455
- closeLabel={sheetLabels.close}
456
- backCloses={sheetBackCloses}
457
- dir={dir}
458
- // Portalled to <body>, the sheet is not inside the field's wrapper, so a
459
- // document-level "outside click" listener — a Popover or dropdown this field
460
- // sits in — would read a tap on a day as outside and unmount the cell before
461
- // its click (Keksdose dev#477, the fix `PickerSheet` carries).
462
- onMouseDown={(e) => e.stopPropagation()}
463
- footer={actions}
464
- >
465
- {body}
466
- </FullBleedDialog>
467
- );
468
- const fieldTrigger = ({
469
- open,
470
- toggle,
471
- ref,
472
- }: {
473
- open: boolean;
474
- toggle: () => void;
475
- ref: RefObject<HTMLButtonElement | null>;
476
- }) => (
477
- <DateFieldTrigger
478
- open={open}
479
- toggle={() => {
480
- setDir(dirOf(rootRef.current));
481
- toggle();
482
- }}
483
- triggerRef={ref}
484
- triggerText={triggerText}
485
- hasValue={hasValue}
486
- // ALWAYS a name reference, never `undefined`. A `<button>` takes its
487
- // accessible name from its contents, so an unlabelled trigger used to
488
- // announce its own date text for free. `role="combobox"` does not —
489
- // content is excluded from name computation for that role — so leaving
490
- // this undefined made an unlabelled date field announce nothing at all.
491
- // Named: "label, value". Unnamed: the value alone, which is what the
492
- // button was saying before.
493
- //
494
- // A caller's own reference comes first. And when the caller gives the field
495
- // an `id` (so an external `<label htmlFor>` can point at it), the trigger
496
- // lists ITSELF first: a self-reference in `aria-labelledby` is resolved
497
- // from the element's native label (accname 2B → 2D), so "Due date" from
498
- // that <label> is spoken before the value, instead of being overridden.
499
- labelledBy={[
500
- aria["aria-labelledby"],
501
- named ? labelId : !aria["aria-labelledby"] && aria.id ? aria.id : undefined,
502
- valueId,
503
- ]
504
- .filter(Boolean)
505
- .join(" ")}
506
- aria={aria}
507
- panelId={panelId}
508
- valueId={valueId}
509
- padded={label !== undefined}
510
- disabled={disabled}
511
- invalid={invalid}
512
- required={ariaRequired}
513
- renderTrigger={renderTrigger}
514
- />
515
- );
516
- return (
517
- // The caller's attributes land here, on the field's own box — the trigger inside is
518
- // named by `aria-labelledby` and must keep the id pair it is given.
519
- // At Large a labelled box is a grid: the label above, the calendar glyph and the
520
- // clear × measured against the trigger's row (LABEL_ABOVE_BOX, 0.33 §10.17).
521
- <div {...wrapperRest} ref={rootRef} className={cn("relative", label !== undefined && LABEL_ABOVE_BOX, className)}>
522
- {label !== undefined && <FieldLabelLine label={label} hint={labelHint} />}
523
- {/* The visible FieldLabel is a plain span, not a `<label htmlFor>`, so it names
524
- nothing on its own — this hidden twin is what the trigger is named by.
525
- `aria-hidden` because a name reference reads a hidden element deliberately
526
- (accname §4.3.1), and without it the label would be announced twice: once as
527
- loose text before the button, once inside the button's own name.
528
- `sr-only-fixed` rather than `sr-only` — see the note on the class in
529
- tokens.css. */}
530
- {named && (
531
- <span id={labelId} aria-hidden className="sr-only-fixed">
532
- {label}
533
- </span>
534
- )}
535
- {sheet ? (
536
- <>
537
- {fieldTrigger({ open: sheetOpen, toggle: () => setSheetOpen((v) => !v), ref: sheetTriggerRef })}
538
- {/* Mounted only while open, like the popover's children: the panel's draft is
539
- born with it, so every open starts again from the committed value. */}
540
- {sheetOpen && children(closeSheet, sheetFrame)}
541
- </>
542
- ) : (
543
- <Popover
544
- width={width}
545
- panelId={panelId}
546
- // Named for what it is. Unnamed, it fell back to `popover.panel`, and a date
547
- // field announced its calendar as "Popover" — in English, in every language.
548
- labels={{ panel: panelLabel }}
549
- dir={dir}
550
- trigger={fieldTrigger}
551
- >
552
- {(close) => children(close, popoverFrame)}
553
- </Popover>
554
- )}
555
- {showClear ? (
556
- <button
557
- type="button"
558
- aria-label={clearLabel}
559
- onClick={onClear}
560
- className="absolute end-1.5 top-1/2 -translate-y-1/2 rounded p-1 text-[var(--text-placeholder)] hover:text-[var(--text-secondary)]"
561
- >
562
- <X className="size-4" />
563
- </button>
564
- ) : (
565
- <Calendar
566
- aria-hidden
567
- className="pointer-events-none absolute end-2.5 top-1/2 size-4 -translate-y-1/2 text-[var(--text-placeholder)]"
568
- />
569
- )}
570
- </div>
571
- );
572
- }
10
+ import {
11
+ DateField,
12
+ useDatePickerLabels,
13
+ useTriggerFormat,
14
+ withEndHint,
15
+ type DatePickerBaseProps,
16
+ } from "./date-field";
17
+ import { PanelCalendar } from "./jump-calendar";
18
+ // The shared field, the month-jump calendar and the range picker live in date-field.tsx,
19
+ // jump-calendar.tsx and date-range-picker.tsx (MOD-9); their public names are still this
20
+ // module's, so the barrel exports them as before.
21
+ export type { DateTriggerAttributes } from "./date-field";
22
+ export { DateRangePicker } from "./date-range-picker";
23
+ export type {
24
+ DateRangeCommit,
25
+ DateRangeDraftSummary,
26
+ DateRangePickerPreset,
27
+ DateRangePickerProps,
28
+ DateRangeTriggerRenderProps,
29
+ } from "./date-range-picker";
573
30
 
574
31
  /**
575
32
  * The ‹ date › (today) row on a phone at Large and Extra large (0.32.1, the 360 px
@@ -588,6 +45,28 @@ const STEP_ROW_STACK_AT_LARGE = cn(
588
45
  "large:max-sm:[&>span]:flex-1 large:max-sm:[&>span>button]:w-full",
589
46
  );
590
47
 
48
+ // The focused part of the ‹ date › (today) row framed 2px wide, not 1 (keksdose live
49
+ // #394, fourth round; kk K5). The row raises the focused part over the neighbour it
50
+ // overlaps (`[&>*:focus-within]:z-20`), so all four of its sides are its own brand
51
+ // border — but at a fractional device-pixel ratio a 1px line covers 1.25 device pixels
52
+ // (at 125 %), and on whichever sides fall across a pixel boundary it is spread over two
53
+ // pixels at partial strength: ‹'s left side and the date field's right read grey beside
54
+ // the crisp ones (dark theme, measured: 82,87,146 against 139,147,248).
55
+ //
56
+ // A 1px INSET ring in the focus colour beside the 1px border doubles the line inward, so
57
+ // every side keeps at least one fully covered device pixel at any scale — FIELD_INVALID's
58
+ // border-plus-ring, for the same reason (live #295). A box-shadow, and inset: nothing
59
+ // outside the part moves or is covered. `focus`, not `focus-visible`, as the row's
60
+ // raise: a tap focuses too.
61
+ //
62
+ // 0.34 drew it here, on the parts — `focus:ring-1 focus:ring-inset` on each step and
63
+ // `[&_[role=combobox]:focus]:…` from the row — and the K5 follow-up then moved that very
64
+ // ring into FIELD_BASE for every field (keksdose run 78). Each part of this row is
65
+ // FIELD_BASE, the steps directly and the trigger through FIELD_TRIGGER, so the copies went
66
+ // (round 0.34 Wave 2). Not on every button in the row: keksdose's local fix
67
+ // (`[&_button:focus]:ring-1 [&_button:focus]:ring-inset` on the row) also reached the
68
+ // label's "?" and thinned its 2px focus frame to 1.
69
+
591
70
  /** One ‹ / › day-step button, sized to sit flush beside the field. */
592
71
  function StepButton({
593
72
  icon: Icon,
@@ -618,11 +97,13 @@ function StepButton({
618
97
  FIELD_BASE,
619
98
  // FIELD_BASE is `block w-full` for text inputs; a step button is neither, and
620
99
  // px-3 would make it wider than it needs to be. twMerge lets these win.
621
- "relative flex h-full w-10 shrink-0 items-center justify-center px-0 text-[var(--text-muted)]",
622
- "hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)]",
100
+ "relative flex h-full w-10 shrink-0 items-center justify-center px-0 text-muted",
101
+ "hover:bg-hover hover:text-secondary",
623
102
  // Dimmed ICON, not a dimmed box: at 40% opacity the whole button — border
624
103
  // included — faded out of the group and read as a broken, detached control.
625
- "disabled:cursor-not-allowed disabled:text-[var(--text-placeholder)] disabled:opacity-60 disabled:hover:bg-[var(--bg-surface)]",
104
+ "disabled:cursor-not-allowed disabled:text-placeholder disabled:opacity-60 disabled:hover:bg-surface",
105
+ // A part of a joined row: FIELD_BASE's 2px focus line, whole at 125 % (K5, the
106
+ // note above this function).
626
107
  className,
627
108
  )}
628
109
  >
@@ -632,375 +113,6 @@ function StepButton({
632
113
  );
633
114
  }
634
115
 
635
- // ── Month jump (`monthJump`, kastlan) ─────────────────────────────────────
636
-
637
- /** A "YYYY-MM" key as a count of months, and back: month arithmetic with no `Date`
638
- * rollover to step around. */
639
- const monthIndex = (key: string) => Number(key.slice(0, 4)) * 12 + Number(key.slice(5, 7)) - 1;
640
- const keyOfIndex = (index: number) =>
641
- `${String(Math.floor(index / 12)).padStart(4, "0")}-${pad((index % 12) + 1)}`;
642
- const shiftKey = (key: string, delta: number) => keyOfIndex(monthIndex(key) + delta);
643
- /** The 1st of a "YYYY-MM" month, for `Intl` to name. */
644
- const firstOfKey = (key: string) => new Date(Number(key.slice(0, 4)), Number(key.slice(5, 7)) - 1, 1);
645
-
646
- /** Upper-case the first letter only, as `MonthPicker` does: "julio de 2026" heads a
647
- * panel as "Julio de 2026" — not "Julio De 2026", which CSS `capitalize` would write. */
648
- const upperFirst = (text: string, locale: string | undefined) =>
649
- text.charAt(0).toLocaleUpperCase(locale) + text.slice(1);
650
-
651
- /** Months per row of the month grid — `MonthPicker`'s 4×3. */
652
- const MONTH_COLUMNS = 3;
653
-
654
- /**
655
- * The month `MiniCalendar` opens on — the selection, or today, pulled inside the
656
- * bounds — worked out the way it does, so the caption drawn over a calendar that was
657
- * given no `month` names the month that calendar is showing.
658
- */
659
- function openingMonth(from: string, to: string, lo: Date | null, hi: Date | null): string {
660
- const start = parseIsoDate(from) ?? parseIsoDate(to) ?? new Date();
661
- if (lo && start < lo) return monthKey(lo);
662
- if (hi && start > hi) return monthKey(hi);
663
- return monthKey(start);
664
- }
665
-
666
- type PanelCalendarProps = Pick<
667
- MiniCalendarProps,
668
- "mode" | "from" | "to" | "locale" | "min" | "max" | "labels" | "onSelect" | "focusOnOpen"
669
- > & {
670
- /** See {@link DatePickerBaseProps.monthJump}. */
671
- monthJump?: boolean;
672
- };
673
-
674
- /** The panel's calendar: the plain {@link MiniCalendar}, exactly as before — or, with
675
- * `monthJump`, the same calendar under a caption that opens a month grid. */
676
- function PanelCalendar({ monthJump, ...calendar }: PanelCalendarProps) {
677
- return monthJump ? <JumpCalendar {...calendar} /> : <MiniCalendar {...calendar} />;
678
- }
679
-
680
- /** How the day grid is mounted: `key` remounts it, `month` is the month it follows
681
- * (left out until the panel first moves, so it opens exactly where it always has), and
682
- * `focus` is its `focusOnOpen`. */
683
- interface DayGridMount {
684
- key: number;
685
- month?: string;
686
- focus: boolean;
687
- }
688
-
689
- /**
690
- * {@link MiniCalendar} with its navigation drawn here — ‹ caption › — so the caption can
691
- * be a button that swaps the days for a month grid ({@link DatePickerBaseProps.monthJump}).
692
- *
693
- * Built on the calendar's own `hideNavigation` / `month` / `onMonthChange`, not a fork
694
- * of it: the days, their keys, the range band and every announcement stay the
695
- * calendar's. What this keeps is `shown`, the month on screen, for the caption — fed by
696
- * the arrows here, by the calendar's `onMonthChange` (PageUp, arrowing off the edge),
697
- * and by the value, whose changes the calendar follows WITHOUT reporting them (a preset
698
- * in `commit="apply"` moves the grid to its start). That last one is mirrored below with
699
- * the calendar's own rule, and when it lands in another month the day grid is remounted
700
- * there rather than steered by `month`: a `month` that changes in the same render as the
701
- * value would win over the value's day, and the grid's tab stop would land on the
702
- * month's same-numbered day instead of the preset's start.
703
- *
704
- * The month grid is `MonthPicker`'s, redrawn here because that one is internal to its
705
- * file; same roles, keys and words (`monthPicker` labels).
706
- */
707
- function JumpCalendar({
708
- from = "",
709
- to = "",
710
- mode = "range",
711
- locale,
712
- min,
713
- max,
714
- labels,
715
- onSelect,
716
- focusOnOpen,
717
- }: Omit<PanelCalendarProps, "monthJump">) {
718
- // The month arrows say what they said when the calendar drew them; the month grid
719
- // says what `MonthPicker`'s says.
720
- const calendarText = useKitLabels("miniCalendar", DEFAULT_MINI_CALENDAR_LABELS, labels);
721
- const monthText = useKitLabels("monthPicker", DEFAULT_MONTH_PICKER_LABELS);
722
- const id = useId();
723
- const captionId = `${id}-caption`;
724
- const hintId = `${id}-hint`;
725
- const captionRef = useRef<HTMLButtonElement>(null);
726
- const monthsRef = useRef<HTMLDivElement>(null);
727
-
728
- const lo = min ? parseIsoDate(min) : null;
729
- const hi = max ? parseIsoDate(max) : null;
730
- const minKey = lo ? monthKey(lo) : null;
731
- const maxKey = hi ? monthKey(hi) : null;
732
- const outOfBounds = (key: string) => Boolean((minKey && key < minKey) || (maxKey && key > maxKey));
733
- const clampKey = (key: string) => (minKey && key < minKey ? minKey : maxKey && key > maxKey ? maxKey : key);
734
-
735
- const [view, setView] = useState<"days" | "months">("days");
736
- const [shown, setShown] = useState(() => openingMonth(from, to, lo, hi));
737
- const [dayGrid, setDayGrid] = useState<DayGridMount>(() => ({ key: 0, focus: Boolean(focusOnOpen) }));
738
- // The month holding the month grid's tab stop — and with it the year on show.
739
- const [active, setActive] = useState(shown);
740
-
741
- // The value moved from outside the day grid (a preset, a reset): follow the end that
742
- // changed, by the calendar's own rule, and remount the days there — see above. Also
743
- // what takes an open month grid back to the days when a preset is picked beside it.
744
- const [lastValue, setLastValue] = useState({ from, to });
745
- if (lastValue.from !== from || lastValue.to !== to) {
746
- const changed = lastValue.from !== from ? from : to;
747
- setLastValue({ from, to });
748
- const next = parseIsoDate(changed) ?? parseIsoDate(from) ?? parseIsoDate(to);
749
- const key = next ? monthKey(next) : null;
750
- if (key && (key !== shown || view === "months")) {
751
- setShown(key);
752
- setView("days");
753
- setDayGrid((d) => ({ key: d.key + 1, month: key, focus: false }));
754
- }
755
- }
756
-
757
- // A month cell that has to take focus once it exists: opening the grid, and arrowing
758
- // across a year's edge, which relabels the same twelve buttons.
759
- const pendingFocus = useRef<string | null>(null);
760
- useEffect(() => {
761
- const key = pendingFocus.current;
762
- if (!key) return;
763
- pendingFocus.current = null;
764
- monthsRef.current?.querySelector<HTMLElement>(`[data-month="${key}"]`)?.focus();
765
- });
766
-
767
- const showMonth = (key: string) => {
768
- setShown(key);
769
- // Follows by `month`: the calendar keeps the day of the month (clamped), and the
770
- // focus stays on the arrow being pressed.
771
- setDayGrid((d) => ({ ...d, month: key }));
772
- };
773
- const openMonths = () => {
774
- const start = clampKey(shown);
775
- pendingFocus.current = start;
776
- setActive(start);
777
- setView("months");
778
- };
779
- const closeMonths = (focusCaption: boolean) => {
780
- setView("days");
781
- setDayGrid((d) => ({ ...d, month: shown, focus: false }));
782
- if (focusCaption) captionRef.current?.focus();
783
- };
784
- const pick = (key: string) => {
785
- setShown(key);
786
- setView("days");
787
- // Picked to go there: the focus goes with it, onto the days.
788
- setDayGrid((d) => ({ key: d.key + 1, month: key, focus: true }));
789
- };
790
- const moveActive = (key: string, focus: boolean) => {
791
- if (focus) pendingFocus.current = key;
792
- setActive(key);
793
- };
794
-
795
- const inDays = view === "days";
796
- // Escape in the month grid is "back", not "close": the month grid is a step INSIDE the
797
- // panel, and losing the half-made range to a key meant to undo that step would be the
798
- // worse surprise. Stopped here, so neither the popover nor the phone sheet sees it.
799
- const escapeToDays = (e: KeyboardEvent<HTMLElement>) => {
800
- if (e.key !== "Escape" || inDays) return;
801
- e.preventDefault();
802
- e.stopPropagation();
803
- closeMonths(true);
804
- };
805
-
806
- const onMonthKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {
807
- if (e.key === "Escape") return escapeToDays(e);
808
- // Left and right are visual: the grid runs the other way in a right-to-left panel.
809
- const step = horizontalStep(e.key, e.currentTarget);
810
- const col = (monthIndex(active) % 12) % MONTH_COLUMNS;
811
- let delta: number;
812
- switch (step ? "horizontal" : e.key) {
813
- case "horizontal":
814
- delta = step;
815
- break;
816
- case "ArrowUp":
817
- delta = -MONTH_COLUMNS;
818
- break;
819
- case "ArrowDown":
820
- delta = MONTH_COLUMNS;
821
- break;
822
- case "Home":
823
- delta = -col;
824
- break;
825
- case "End":
826
- delta = MONTH_COLUMNS - 1 - col;
827
- break;
828
- case "PageUp":
829
- delta = -12;
830
- break;
831
- case "PageDown":
832
- delta = 12;
833
- break;
834
- default:
835
- return;
836
- }
837
- // Before the no-op check: these keys also scroll the panel.
838
- e.preventDefault();
839
- if (delta !== 0) moveActive(shiftKey(active, delta), true);
840
- };
841
-
842
- const year = Number(active.slice(0, 4));
843
- // A year arrow is dead once every month of the year it leads to is out of bounds.
844
- const prevYearBlocked = Boolean(minKey && year - 1 < Number(minKey.slice(0, 4)));
845
- const nextYearBlocked = Boolean(maxKey && year + 1 > Number(maxKey.slice(0, 4)));
846
- const prevBlocked = !inDays && prevYearBlocked;
847
- const nextBlocked = !inDays && nextYearBlocked;
848
-
849
- const longName = useMemo(() => new Intl.DateTimeFormat(locale, { month: "long", year: "numeric" }), [locale]);
850
- const shortNames = useMemo(() => {
851
- const fmt = new Intl.DateTimeFormat(locale, { month: "short" });
852
- return Array.from({ length: 12 }, (_, i) => upperFirst(fmt.format(new Date(2000, i, 1)), locale));
853
- }, [locale]);
854
- const caption = inDays
855
- ? upperFirst(longName.format(firstOfKey(shown)), locale)
856
- : new Intl.DateTimeFormat(locale, { year: "numeric" }).format(new Date(year, 0, 1));
857
-
858
- // The selection, as months: both ends, and the months between (a range's band).
859
- const fromDate = parseIsoDate(from);
860
- const toDate = parseIsoDate(to);
861
- const fromKey = fromDate ? monthKey(fromDate) : null;
862
- const toKey = toDate ? monthKey(toDate) : null;
863
- const low = fromKey ?? toKey;
864
- const high = toKey ?? fromKey;
865
- const currentKey = monthKey(new Date());
866
-
867
- // Aria-disabled rather than disabled, like the day cells: a focused button that
868
- // turns `disabled` drops the focus to <body>, mid-panel.
869
- const arrow =
870
- "rounded p-1 text-[var(--text-muted)] hover:bg-[var(--bg-hover)] aria-disabled:cursor-not-allowed aria-disabled:opacity-30 aria-disabled:hover:bg-transparent";
871
-
872
- return (
873
- <div className="select-none">
874
- {/* The calendar's own row, redrawn: the same arrows in the same places. Each
875
- button stays mounted across the two views and changes what it steps, so a
876
- press never pulls the element out from under the pointer or the focus. */}
877
- <div className="flex items-center justify-between gap-1 pb-1">
878
- <button
879
- type="button"
880
- aria-label={inDays ? calendarText.previousMonth : monthText.previousYear}
881
- aria-disabled={prevBlocked || undefined}
882
- onClick={() => {
883
- if (inDays) showMonth(shiftKey(shown, -1));
884
- else if (!prevBlocked) moveActive(shiftKey(active, -12), false);
885
- }}
886
- onKeyDown={escapeToDays}
887
- className={arrow}
888
- >
889
- {/* Mirrored in RTL: "previous" points to the reading START, which is right. */}
890
- <ChevronLeft className="size-4 rtl:-scale-x-100" aria-hidden />
891
- </button>
892
- <button
893
- ref={captionRef}
894
- type="button"
895
- aria-expanded={!inDays}
896
- aria-describedby={inDays ? hintId : undefined}
897
- onClick={inDays ? openMonths : () => closeMonths(false)}
898
- onKeyDown={escapeToDays}
899
- className="inline-flex min-w-0 items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"
900
- >
901
- {/* The name is the text, so it says what is on screen; `aria-live` because
902
- pressing an arrow leaves focus ON the arrow, and this is the only thing
903
- that says where it went. It also names the month grid. */}
904
- <span id={captionId} aria-live="polite" className="truncate">
905
- {caption}
906
- </span>
907
- <ChevronDown
908
- aria-hidden
909
- className={cn("size-3.5 shrink-0 text-[var(--text-muted)]", !inDays && "rotate-180")}
910
- />
911
- </button>
912
- <button
913
- type="button"
914
- aria-label={inDays ? calendarText.nextMonth : monthText.nextYear}
915
- aria-disabled={nextBlocked || undefined}
916
- onClick={() => {
917
- if (inDays) showMonth(shiftKey(shown, 1));
918
- else if (!nextBlocked) moveActive(shiftKey(active, 12), false);
919
- }}
920
- onKeyDown={escapeToDays}
921
- className={arrow}
922
- >
923
- <ChevronRight className="size-4 rtl:-scale-x-100" aria-hidden />
924
- </button>
925
- </div>
926
- {/* The caption's description — read through the reference, never on its own. */}
927
- <span id={hintId} hidden>
928
- {monthText.panel}
929
- </span>
930
- {inDays ? (
931
- <MiniCalendar
932
- key={dayGrid.key}
933
- mode={mode}
934
- from={from}
935
- to={to}
936
- locale={locale}
937
- min={min}
938
- max={max}
939
- labels={labels}
940
- onSelect={onSelect}
941
- focusOnOpen={dayGrid.focus}
942
- hideNavigation
943
- month={dayGrid.month}
944
- onMonthChange={showMonth}
945
- />
946
- ) : (
947
- <div ref={monthsRef} role="grid" aria-labelledby={captionId} className="grid gap-1">
948
- {Array.from({ length: 12 / MONTH_COLUMNS }, (_, row) => (
949
- <div key={row} role="row" className="grid grid-cols-3 gap-1">
950
- {Array.from({ length: MONTH_COLUMNS }, (_, c) => {
951
- const index = row * MONTH_COLUMNS + c;
952
- const key = keyOfIndex(year * 12 + index);
953
- const disabled = outOfBounds(key);
954
- const selected = low !== null && high !== null && key >= low && key <= high;
955
- const end = key === fromKey || key === toKey;
956
- const current = key === currentKey;
957
- return (
958
- <button
959
- key={c}
960
- type="button"
961
- role="gridcell"
962
- data-month={key}
963
- tabIndex={key === active ? 0 : -1}
964
- aria-label={monthText.month(longName.format(firstOfKey(key)))}
965
- aria-selected={selected}
966
- aria-disabled={disabled || undefined}
967
- aria-current={current ? "date" : undefined}
968
- onClick={() => {
969
- // The guard `disabled` would have been: out-of-bounds months stay
970
- // focusable, so the roving tab stop never falls into a hole.
971
- if (!disabled) pick(key);
972
- }}
973
- onKeyDown={onMonthKeyDown}
974
- className={cn(
975
- // 44px rows: the touch-target size, and four of them stand as tall
976
- // as a month of days, so the panel does not jump as the views swap.
977
- "h-11 rounded px-1 text-sm tabular-nums transition-colors",
978
- FOCUS_RING_WIDTH,
979
- "focus-visible:outline-none focus-visible:ring-inset",
980
- // A --brand ring on a --brand fill exists only in the DOM.
981
- end && !disabled ? "focus-visible:ring-[var(--brand-contrast)]" : "focus-visible:ring-[var(--brand)]",
982
- disabled
983
- ? "cursor-not-allowed text-[var(--text-placeholder)]"
984
- : end
985
- ? "bg-[var(--brand)] text-[var(--brand-contrast)] hover:bg-[var(--brand-hover)]"
986
- : selected
987
- ? "bg-[var(--brand-bg)] font-medium text-[var(--brand-muted)] hover:bg-[var(--brand-bg-hover)]"
988
- : "text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",
989
- current && !selected && !disabled && "ring-1 ring-inset ring-[var(--border-strong)]",
990
- )}
991
- >
992
- {shortNames[index]}
993
- </button>
994
- );
995
- })}
996
- </div>
997
- ))}
998
- </div>
999
- )}
1000
- </div>
1001
- );
1002
- }
1003
-
1004
116
  export interface DatePickerProps extends DatePickerBaseProps {
1005
117
  /** ISO "YYYY-MM-DD", or "" for empty. */
1006
118
  value: string;
@@ -1034,44 +146,6 @@ export interface DatePickerProps extends DatePickerBaseProps {
1034
146
  todayLabel?: string;
1035
147
  }
1036
148
 
1037
- /**
1038
- * The picker's own label props, folded into one `datePicker` override so they sit at
1039
- * the top of the same precedence chain as everything else: prop > provider > English.
1040
- * They predate the provider and stay public API, which is why they are not simply
1041
- * replaced by a `labels` prop.
1042
- */
1043
- function useDatePickerLabels(
1044
- clearLabel: string | undefined,
1045
- stepLabels: { prev: string; next: string } | undefined,
1046
- todayLabel: string | undefined,
1047
- ): DatePickerLabels {
1048
- const prev = stepLabels?.prev;
1049
- const next = stepLabels?.next;
1050
- const fromProps = useMemo(() => {
1051
- const out: Partial<DatePickerLabels> = {};
1052
- if (clearLabel !== undefined) out.clear = clearLabel;
1053
- if (prev !== undefined) out.previousDay = prev;
1054
- if (next !== undefined) out.nextDay = next;
1055
- if (todayLabel !== undefined) out.today = todayLabel;
1056
- return out;
1057
- }, [clearLabel, prev, next, todayLabel]);
1058
- return useKitLabels("datePicker", DEFAULT_DATE_PICKER_LABELS, fromProps);
1059
- }
1060
-
1061
- /**
1062
- * The caller's `hint` when it has no label line to ride: at the end of the field,
1063
- * outside the box, as an unlabelled {@link Select} places its FieldHint (0.15.5 P8).
1064
- */
1065
- function withEndHint(field: ReactNode, hint: ReactNode): ReactNode {
1066
- if (hint === undefined) return field;
1067
- return (
1068
- <div className="flex items-center gap-1.5">
1069
- <div className="min-w-0 flex-1">{field}</div>
1070
- <span className="flex shrink-0 items-center">{hint}</span>
1071
- </div>
1072
- );
1073
- }
1074
-
1075
149
  /** Single-date picker: a field showing the formatted date, opening a calendar. */
1076
150
  export function DatePicker(props: DatePickerProps) {
1077
151
  const {
@@ -1100,6 +174,8 @@ export function DatePicker(props: DatePickerProps) {
1100
174
  // Named so it reaches the field (and so its trigger) when a step/today row is the
1101
175
  // root and takes the rest of the caller's props.
1102
176
  "aria-required": ariaRequired,
177
+ // The trigger's, wherever the rest go (API-3).
178
+ ref,
1103
179
  ...rest
1104
180
  } = props;
1105
181
  const locale = useKitLocale(localeProp);
@@ -1125,6 +201,7 @@ export function DatePicker(props: DatePickerProps) {
1125
201
  // With step/today buttons the flex row is the root and takes the caller's props —
1126
202
  // except the ones that name the field, which still belong on its trigger.
1127
203
  {...(wrapped ? triggerAria : rest)}
204
+ fieldRef={ref}
1128
205
  aria-describedby={messages.describedBy}
1129
206
  aria-required={ariaRequired}
1130
207
  label={label}
@@ -1206,6 +283,8 @@ export function DatePicker(props: DatePickerProps) {
1206
283
  // the trigger, which raising the trigger alone covered. Hover raises nothing: it
1207
284
  // changes no border, and would let a hovered › cover a focused field's edge.
1208
285
  "[&>*:focus-within]:z-20 [&>*:active]:z-20 [&>*:has([aria-invalid=true])]:z-10",
286
+ // …and its line is 2px, so no side of it reads half-strength at 125 % (live #394,
287
+ // fourth round): FIELD_BASE's inset ring, which every part of the row carries.
1209
288
  STEP_ROW_STACK_AT_LARGE,
1210
289
  className,
1211
290
  )}
@@ -1250,470 +329,3 @@ export function DatePicker(props: DatePickerProps) {
1250
329
  </FieldBox>
1251
330
  );
1252
331
  }
1253
-
1254
- export interface DateRangePickerPreset {
1255
- /**
1256
- * The preset's identity, independent of its dates — `"last_3_months"`, not two ISO
1257
- * strings. Optional for the 0.x callers that pass anonymous pairs.
1258
- *
1259
- * keksdose's report range field (report-range-field.tsx, "Why this is app-level")
1260
- * is why it exists: its URL stores `?preset=last_3_months` and recomputes the dates
1261
- * from today on every read, so a preset that is only its dates froze "last 3 months"
1262
- * at whatever day the panel rendered, and two presets that happen to cover the same
1263
- * days (this week and today, on a Monday) could not be told apart. With an `id` the
1264
- * choice is reported to `onChange` and shown as selected for as long as the range
1265
- * still matches it. Recompute `from`/`to` on every render (`calendarMonthPresets()`,
1266
- * `dateRangePresets()`) and pass the key as the id.
1267
- */
1268
- id?: string;
1269
- label: ReactNode;
1270
- from: string;
1271
- to: string;
1272
- }
1273
-
1274
- /**
1275
- * When the picker hands its range to `onChange`.
1276
- *
1277
- * - `"immediate"` (the default, and all of 0.7): a preset click commits and closes,
1278
- * and each calendar click is reported as it happens — the half-made `(from, "")`
1279
- * included. The right shape for quick ranges on a filter, where one click is one
1280
- * answer.
1281
- * - `"apply"`: the panel works on a DRAFT. A preset ARMS the calendar instead of
1282
- * committing, days can then be nudged ("last 3 months, but end it last Friday"),
1283
- * and nothing reaches `onChange` until Apply — which stays disabled until both ends
1284
- * exist. Cancel, Escape and an outside click discard the draft, and every open
1285
- * starts again from the committed value. keksdose's report range asked for exactly
1286
- * this: each commit there re-runs a whole page of charts, so an intermediate state
1287
- * must never escape the panel.
1288
- */
1289
- export type DateRangeCommit = "immediate" | "apply";
1290
-
1291
- export interface DateRangePickerProps extends DatePickerBaseProps {
1292
- from: string;
1293
- to: string;
1294
- /** The committed range. `presetId` is the chosen preset's `id` when a preset
1295
- * produced it (and the range was not nudged since), `undefined` for days picked by
1296
- * hand. A 0.x two-argument handler simply ignores it. */
1297
- onChange: (from: string, to: string, presetId?: string) => void;
1298
- /** Separator between the two formatted dates in the trigger (default " – "). */
1299
- separator?: string;
1300
- /** Optional named ranges rendered as a start-side column (last month / YTD / …). */
1301
- presets?: DateRangePickerPreset[];
1302
- /**
1303
- * The active preset's `id`, controlled — e.g. straight from keksdose's `?preset=`.
1304
- * `null` (or an id no preset has, such as `"custom"`) says "no preset": nothing in
1305
- * the column is marked even if a preset happens to cover the same days. A preset is
1306
- * marked only while its dates still equal `from`/`to`.
1307
- *
1308
- * Leave it `undefined` and the picker remembers the last preset it committed
1309
- * itself; with no memory at all it falls back to the first preset whose dates match.
1310
- */
1311
- preset?: string | null;
1312
- /** See {@link DateRangeCommit}. Default `"immediate"`. */
1313
- commit?: DateRangeCommit;
1314
- /**
1315
- * Draw the trigger yourself. keksdose's report range field
1316
- * (reports/report-range-field.tsx, "Why this is app-level") is why: its trigger
1317
- * NAMES the active preset ("Last 3 months", the window as a muted suffix) where the
1318
- * kit's shows two dates, sits inside a Tooltip, and is squared off on one side so the
1319
- * granularity control can join it flush at the field's 42px.
1320
- *
1321
- * Spread `props.triggerProps` onto a `<button>` whole and put `props.valueProps` on
1322
- * the element that shows the value — see {@link DateTriggerAttributes} for what each
1323
- * part is for. The field around it (label, hidden name twin, clear/calendar glyph,
1324
- * popover or phone sheet) is unchanged.
1325
- */
1326
- renderTrigger?: (props: DateRangeTriggerRenderProps) => ReactNode;
1327
- /**
1328
- * In the phone layout (`usePhoneLayout()`) the panel opens as a full-screen sheet (`FullBleedDialog`)
1329
- * with presets in a grid above the calendar and Apply pinned in the footer, instead
1330
- * of the 440px popover that hung off a 360px screen (keksdose's report range field,
1331
- * which hand-rolled exactly this). This is its `backCloses`: on by default, so Back
1332
- * dismisses the sheet; off for a caller whose commit rewrites the URL with
1333
- * `replaceState` in the same tick — keksdose's `?preset/from/to` — where the router
1334
- * would overwrite the sheet's history marker.
1335
- */
1336
- sheetBackCloses?: boolean;
1337
- /**
1338
- * With `commit="apply"`: a line above the calendar saying what Apply would commit —
1339
- * keksdose's report range writes "Custom · 1 Mar 2026 – …" there
1340
- * (report-range-field.tsx), the one place a preset armed and then nudged by a day is
1341
- * seen to have become "Custom", and a half-made range to still lack its end. Called
1342
- * with the DRAFT on every change, in the popover and the phone sheet alike; `preset`
1343
- * is the preset the column marks for it (none once a day was picked by hand), `to` is
1344
- * `""` until the second click. The line is a polite live region, so a screen reader
1345
- * hears the draft change as the calendar is used.
1346
- *
1347
- * Ignored in `"immediate"` mode, where there is no draft: every click is the value.
1348
- */
1349
- renderDraftSummary?: (draft: DateRangeDraftSummary) => ReactNode;
1350
- }
1351
-
1352
- /** What {@link DateRangePickerProps.renderDraftSummary} is called with. */
1353
- export interface DateRangeDraftSummary {
1354
- from: string;
1355
- to: string;
1356
- /** The preset the column marks for the draft, if any. */
1357
- preset: DateRangePickerPreset | undefined;
1358
- }
1359
-
1360
- /** What {@link DateRangePickerProps.renderTrigger} is called with. */
1361
- export interface DateRangeTriggerRenderProps {
1362
- /** Spread onto the `<button>`, whole. Merge your class after `triggerProps.className`. */
1363
- triggerProps: DateTriggerAttributes;
1364
- /** Put on the element showing the value: the trigger is named "label, value" by
1365
- * reference to this id. Without it the name is the label alone. */
1366
- valueProps: { id: string };
1367
- open: boolean;
1368
- from: string;
1369
- to: string;
1370
- /** The preset the column marks for the committed range, if any — the one to name. */
1371
- preset: DateRangePickerPreset | undefined;
1372
- /** What the kit's own trigger would show: the formatted range, or the placeholder. */
1373
- text: string;
1374
- }
1375
-
1376
- interface RangeDraft {
1377
- from: string;
1378
- to: string;
1379
- presetId: string | undefined;
1380
- }
1381
-
1382
- /** Which preset (by index) the column marks, or -1. See `DateRangePickerProps.preset`. */
1383
- function markedPreset(
1384
- presets: readonly DateRangePickerPreset[],
1385
- from: string,
1386
- to: string,
1387
- activeId: string | null | undefined,
1388
- controlled: boolean,
1389
- ): number {
1390
- const matches = (p: DateRangePickerPreset) => p.from === from && p.to === to;
1391
- if (activeId != null) {
1392
- const byId = presets.findIndex((p) => p.id === activeId && matches(p));
1393
- if (byId !== -1 || controlled) return byId;
1394
- } else if (controlled) {
1395
- return -1;
1396
- }
1397
- return presets.findIndex(matches);
1398
- }
1399
-
1400
- /**
1401
- * The preset column: a named group of toggle buttons, `aria-pressed` on the marked one.
1402
- * Pressed-state rather than colour alone, because "which range is this" is the one
1403
- * thing a screen-reader user opening the panel needs to hear.
1404
- */
1405
- function PresetColumn({
1406
- presets,
1407
- marked,
1408
- label,
1409
- onPick,
1410
- sheet,
1411
- }: {
1412
- presets: readonly DateRangePickerPreset[];
1413
- marked: number;
1414
- label: string;
1415
- onPick: (p: DateRangePickerPreset) => void;
1416
- /** The phone sheet's shape: a two-column grid ABOVE the calendar with 44px rows —
1417
- * a 128px column beside a month grid leaves the grid ~200px on a 360px screen. */
1418
- sheet?: boolean;
1419
- }) {
1420
- return (
1421
- // `border-e`/`pe`, not `-r`: the preset column is on the START side, and the rule
1422
- // between it and the calendar has to follow it in a right-to-left UI.
1423
- <div
1424
- role="group"
1425
- aria-label={label}
1426
- className={
1427
- sheet
1428
- ? "grid grid-cols-2 gap-0.5"
1429
- : "flex w-32 shrink-0 flex-col gap-0.5 border-e border-[var(--border)] pe-2"
1430
- }
1431
- >
1432
- {presets.map((p, i) => {
1433
- const selected = i === marked;
1434
- return (
1435
- <button
1436
- key={p.id ?? i}
1437
- type="button"
1438
- aria-pressed={selected}
1439
- data-preset={p.id}
1440
- onClick={() => onPick(p)}
1441
- className={cn(
1442
- "rounded px-2 text-start",
1443
- // 44px on a phone: the kit's touch-target size (`SHEET_ROW_CLASS`).
1444
- sheet ? "min-h-11 py-2 text-sm" : "py-1.5 text-xs",
1445
- selected
1446
- ? "bg-[var(--bg-active)] font-medium text-[var(--text-primary)]"
1447
- : "text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]",
1448
- )}
1449
- >
1450
- {p.label}
1451
- </button>
1452
- );
1453
- })}
1454
- </div>
1455
- );
1456
- }
1457
-
1458
- /**
1459
- * The panel's body. A component of its own so `commit="apply"` can keep its draft in
1460
- * state that is born when the panel opens: `Popover` unmounts its children on close,
1461
- * so the draft is re-seeded from the committed value on every open, and an abandoned
1462
- * half-selection cannot survive into the next one.
1463
- */
1464
- function RangePanel({
1465
- from,
1466
- to,
1467
- presets,
1468
- activeId,
1469
- controlled,
1470
- commit,
1471
- close,
1472
- frame,
1473
- sheet,
1474
- commitRange,
1475
- calendarProps,
1476
- labels,
1477
- renderDraftSummary,
1478
- }: {
1479
- from: string;
1480
- to: string;
1481
- presets: readonly DateRangePickerPreset[] | undefined;
1482
- activeId: string | null | undefined;
1483
- controlled: boolean;
1484
- commit: DateRangeCommit;
1485
- close: () => void;
1486
- /** Where the body and the Apply row go — see `PanelFrame`. */
1487
- frame: PanelFrame;
1488
- sheet: boolean;
1489
- commitRange: (from: string, to: string, presetId: string | undefined) => void;
1490
- calendarProps: Pick<PanelCalendarProps, "locale" | "min" | "max" | "labels" | "monthJump">;
1491
- labels: DatePickerLabels;
1492
- renderDraftSummary?: DateRangePickerProps["renderDraftSummary"];
1493
- }) {
1494
- const drafting = commit === "apply";
1495
- const [draft, setDraft] = useState<RangeDraft>({
1496
- from,
1497
- to,
1498
- presetId: activeId ?? undefined,
1499
- });
1500
- // What the panel SHOWS: the draft while drafting, the committed value otherwise.
1501
- const shown = drafting ? draft : { from, to, presetId: activeId ?? undefined };
1502
- const marked = presets
1503
- ? markedPreset(presets, shown.from, shown.to, drafting ? draft.presetId : activeId, drafting || controlled)
1504
- : -1;
1505
- const complete = Boolean(draft.from && draft.to);
1506
-
1507
- const summary =
1508
- drafting && renderDraftSummary
1509
- ? renderDraftSummary({ from: draft.from, to: draft.to, preset: presets?.[marked] })
1510
- : null;
1511
-
1512
- const picker = (
1513
- <PanelCalendar
1514
- {...calendarProps}
1515
- focusOnOpen
1516
- from={shown.from}
1517
- to={shown.to}
1518
- onSelect={(f, t) => {
1519
- if (drafting) {
1520
- setDraft({ from: f, to: t, presetId: undefined });
1521
- return;
1522
- }
1523
- commitRange(f, t, undefined);
1524
- // Two-click range: only dismiss once both ends are chosen.
1525
- if (f && t) close();
1526
- }}
1527
- />
1528
- );
1529
- // The summary heads the CALENDAR's column, not the panel: beside a preset column it
1530
- // reads as the calendar's caption, and in the sheet it sits between the presets and
1531
- // the month it describes. `null` renders no line — a caller may opt out per draft —
1532
- // but keeps the wrapper, so the calendar is not remounted (and its month and focus
1533
- // lost) when a line comes or goes.
1534
- const calendar =
1535
- drafting && renderDraftSummary ? (
1536
- <div className="flex flex-col gap-2">
1537
- {summary != null && (
1538
- <div aria-live="polite" data-draft-summary="" className="text-xs text-[var(--text-muted)]">
1539
- {summary}
1540
- </div>
1541
- )}
1542
- {picker}
1543
- </div>
1544
- ) : (
1545
- picker
1546
- );
1547
-
1548
- const body =
1549
- presets && presets.length > 0 ? (
1550
- <div className={sheet ? "flex flex-col gap-3" : "flex gap-3"}>
1551
- <PresetColumn
1552
- sheet={sheet}
1553
- presets={presets}
1554
- marked={marked}
1555
- label={labels.presets}
1556
- onPick={(p) => {
1557
- if (drafting) {
1558
- setDraft({ from: p.from, to: p.to, presetId: p.id });
1559
- return;
1560
- }
1561
- commitRange(p.from, p.to, p.id);
1562
- close();
1563
- }}
1564
- />
1565
- {/* `flex-1`: the calendar takes the rest of the panel. Content-sized it was
1566
- seven tiny cells beside a wide preset column. */}
1567
- <div className="min-w-0 flex-1">{calendar}</div>
1568
- </div>
1569
- ) : (
1570
- calendar
1571
- );
1572
-
1573
- if (!drafting) return frame(body);
1574
- return frame(
1575
- body,
1576
- <>
1577
- {/* `flex-1` in the sheet: two thumb-wide halves of the footer, not two small
1578
- buttons in its corner. */}
1579
- <Button type="button" variant="ghost" className={sheet ? "flex-1" : undefined} onClick={close}>
1580
- {labels.cancel}
1581
- </Button>
1582
- <Button
1583
- type="button"
1584
- className={sheet ? "flex-1" : undefined}
1585
- // A half-made `(from, "")` would commit a window with no end — a blank
1586
- // report, one click into a two-click gesture.
1587
- disabled={!complete}
1588
- onClick={() => {
1589
- if (!complete) return;
1590
- commitRange(draft.from, draft.to, draft.presetId);
1591
- close();
1592
- }}
1593
- >
1594
- {labels.apply}
1595
- </Button>
1596
- </>,
1597
- );
1598
- }
1599
-
1600
- /** Two-date range picker: click a start then an end; closes once both are set.
1601
- * With `presets`, a column of named ranges is shown beside the calendar; with
1602
- * `commit="apply"` the panel drafts and commits on Apply (see {@link DateRangeCommit}). */
1603
- export function DateRangePicker(props: DateRangePickerProps) {
1604
- const {
1605
- from,
1606
- to,
1607
- onChange,
1608
- locale: localeProp,
1609
- placeholder,
1610
- min,
1611
- max,
1612
- formatOptions,
1613
- formatValue,
1614
- separator = " – ",
1615
- presets,
1616
- preset,
1617
- commit = "immediate",
1618
- renderTrigger,
1619
- sheetBackCloses,
1620
- renderDraftSummary,
1621
- calendarLabels,
1622
- monthJump,
1623
- label,
1624
- clearable,
1625
- clearLabel,
1626
- disabled,
1627
- invalid,
1628
- hint,
1629
- error,
1630
- ...rest
1631
- } = props;
1632
- const locale = useKitLocale(localeProp);
1633
- const text = useDatePickerLabels(clearLabel, undefined, undefined);
1634
- const render = useTriggerFormat("dateRangePicker", locale, formatOptions, formatValue);
1635
- const messages = useFieldMessages({
1636
- hint,
1637
- error,
1638
- invalid,
1639
- describedBy: rest["aria-describedby"],
1640
- ariaInvalid: rest["aria-invalid"],
1641
- });
1642
- // The preset this picker committed itself, for a caller that does not control
1643
- // `preset`. Cleared by a hand-picked range or a clear.
1644
- const [ownPreset, setOwnPreset] = useState<string | undefined>(undefined);
1645
- const controlled = preset !== undefined;
1646
- const activeId = controlled ? preset : ownPreset;
1647
- const a = from ? render(from) : "";
1648
- const b = to ? render(to) : "";
1649
- const triggerText = from
1650
- ? to
1651
- ? `${a}${separator}${b}`
1652
- : `${a}${separator}…`
1653
- : (placeholder ?? "");
1654
- const hasPresets = Boolean(presets && presets.length > 0);
1655
- const sheet = usePhoneLayout();
1656
- const commitRange = (f: string, t: string, presetId: string | undefined) => {
1657
- setOwnPreset(presetId);
1658
- // Two arguments when no preset is involved — exactly the 0.7 call, so a caller's
1659
- // `toHaveBeenCalledWith(from, to)` and a variadic handler see no difference.
1660
- if (presetId === undefined) onChange(f, t);
1661
- else onChange(f, t, presetId);
1662
- };
1663
- const field = (
1664
- <DateField
1665
- {...rest}
1666
- aria-describedby={messages.describedBy}
1667
- label={label}
1668
- labelHint={messages.labelHint}
1669
- clearable={clearable}
1670
- clearLabel={text.clear}
1671
- panelLabel={text.rangePanel}
1672
- disabled={disabled}
1673
- invalid={messages.isInvalid}
1674
- // Widen so the preset column sits beside the calendar (default otherwise).
1675
- width={hasPresets ? "27.5rem" : undefined}
1676
- hasValue={Boolean(from || to)}
1677
- triggerText={triggerText}
1678
- onClear={() => commitRange("", "", undefined)}
1679
- sheet={sheet}
1680
- sheetBackCloses={sheetBackCloses}
1681
- renderTrigger={
1682
- renderTrigger &&
1683
- ((triggerProps, valueId) =>
1684
- renderTrigger({
1685
- triggerProps,
1686
- valueProps: { id: valueId },
1687
- open: triggerProps["aria-expanded"],
1688
- from,
1689
- to,
1690
- preset: presets?.[markedPreset(presets, from, to, activeId, controlled)],
1691
- text: triggerText,
1692
- }))
1693
- }
1694
- >
1695
- {(close, frame) => (
1696
- <RangePanel
1697
- from={from}
1698
- to={to}
1699
- presets={presets}
1700
- activeId={activeId}
1701
- controlled={controlled}
1702
- commit={commit}
1703
- close={close}
1704
- frame={frame}
1705
- sheet={sheet}
1706
- commitRange={commitRange}
1707
- calendarProps={{ locale, min, max, labels: calendarLabels, monthJump }}
1708
- labels={text}
1709
- renderDraftSummary={renderDraftSummary}
1710
- />
1711
- )}
1712
- </DateField>
1713
- );
1714
- return (
1715
- <FieldBox below={messages.below} reserve={"error" in props || "hint" in props}>
1716
- {withEndHint(field, label === undefined ? messages.labelHint : undefined)}
1717
- </FieldBox>
1718
- );
1719
- }