@eifi1/ui-kit 0.33.0 → 0.34.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 (1539) hide show
  1. package/README.md +445 -283
  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 -100
  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 -100
  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 -100
  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 -100
  63. package/dist/admin/plan-change.js +17 -23
  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 -100
  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 -100
  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 -100
  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 -100
  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 -100
  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 +8 -108
  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 -100
  152. package/dist/billing/billing-labels.js.map +1 -1
  153. package/dist/billing/billing-lock.d.ts +10 -109
  154. package/dist/billing/billing-overview.d.ts +7 -108
  155. package/dist/billing/billing-standing.d.ts +6 -107
  156. package/dist/billing/checkout-processing.d.ts +8 -110
  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 +22 -119
  161. package/dist/billing/pay-page.js.map +1 -1
  162. package/dist/billing/plan-card.d.ts +14 -114
  163. package/dist/billing/plan-card.js +15 -13
  164. package/dist/billing/plan-card.js.map +1 -1
  165. package/dist/billing/plan-limit-notice.d.ts +8 -108
  166. package/dist/billing/plan-limit-notice.js +1 -1
  167. package/dist/billing/plan-limit-notice.js.map +1 -1
  168. package/dist/billing/plan-limit-toast.d.ts +6 -106
  169. package/dist/billing/plan-limit.d.ts +2 -4
  170. package/dist/billing/plan-price.d.ts +10 -12
  171. package/dist/billing/subscription-actions.d.ts +6 -108
  172. package/dist/billing/subscription-actions.js +2 -2
  173. package/dist/billing/subscription-actions.js.map +1 -1
  174. package/dist/billing/subscription-status-chip.d.ts +7 -107
  175. package/dist/chart.d.ts +12 -112
  176. package/dist/chart.js +4 -0
  177. package/dist/chart.js.map +1 -1
  178. package/dist/components/account-chips-labels.d.ts +10 -0
  179. package/dist/components/account-chips-labels.js +15 -0
  180. package/dist/components/account-chips-labels.js.map +1 -0
  181. package/dist/components/account-chips.d.ts +22 -44
  182. package/dist/components/account-chips.js +9 -14
  183. package/dist/components/account-chips.js.map +1 -1
  184. package/dist/components/alert-banner.d.ts +15 -11
  185. package/dist/components/alert-banner.js +28 -18
  186. package/dist/components/alert-banner.js.map +1 -1
  187. package/dist/components/amount-input.d.ts +66 -109
  188. package/dist/components/amount-input.js +259 -283
  189. package/dist/components/amount-input.js.map +1 -1
  190. package/dist/components/appearance-labels.d.ts +6 -10
  191. package/dist/components/appearance-labels.js.map +1 -1
  192. package/dist/components/authed-image-labels.d.ts +2 -0
  193. package/dist/components/authed-image-labels.js +10 -0
  194. package/dist/components/authed-image-labels.js.map +1 -0
  195. package/dist/components/authed-image.d.ts +11 -13
  196. package/dist/components/authed-image.js +2 -6
  197. package/dist/components/authed-image.js.map +1 -1
  198. package/dist/components/autocomplete.d.ts +13 -11
  199. package/dist/components/autocomplete.js +35 -30
  200. package/dist/components/autocomplete.js.map +1 -1
  201. package/dist/components/breadcrumbs-labels.d.ts +2 -0
  202. package/dist/components/breadcrumbs-labels.js +9 -0
  203. package/dist/components/breadcrumbs-labels.js.map +1 -0
  204. package/dist/components/breadcrumbs.d.ts +10 -12
  205. package/dist/components/breadcrumbs.js +7 -10
  206. package/dist/components/breadcrumbs.js.map +1 -1
  207. package/dist/components/bulk-action-bar-labels.d.ts +2 -0
  208. package/dist/components/bulk-action-bar-labels.js +10 -0
  209. package/dist/components/bulk-action-bar-labels.js.map +1 -0
  210. package/dist/components/bulk-action-bar.d.ts +10 -12
  211. package/dist/components/bulk-action-bar.js +9 -12
  212. package/dist/components/bulk-action-bar.js.map +1 -1
  213. package/dist/components/button-group.d.ts +7 -109
  214. package/dist/components/button-group.js +5 -5
  215. package/dist/components/button-group.js.map +1 -1
  216. package/dist/components/button-look.d.ts +88 -0
  217. package/dist/components/button-look.js +91 -0
  218. package/dist/components/button-look.js.map +1 -0
  219. package/dist/components/button.d.ts +153 -0
  220. package/dist/components/button.js +165 -0
  221. package/dist/components/button.js.map +1 -0
  222. package/dist/components/calculator.d.ts +8 -106
  223. package/dist/components/calculator.js +10 -7
  224. package/dist/components/calculator.js.map +1 -1
  225. package/dist/components/calendar-heatmap-labels.d.ts +3 -0
  226. package/dist/components/calendar-heatmap-labels.js +12 -0
  227. package/dist/components/calendar-heatmap-labels.js.map +1 -0
  228. package/dist/components/calendar-heatmap.d.ts +13 -16
  229. package/dist/components/calendar-heatmap.js +7 -13
  230. package/dist/components/calendar-heatmap.js.map +1 -1
  231. package/dist/components/card.d.ts +145 -0
  232. package/dist/components/card.js +186 -0
  233. package/dist/components/card.js.map +1 -0
  234. package/dist/components/chart-height.d.ts +4 -7
  235. package/dist/components/chart-zoom-core.d.ts +202 -0
  236. package/dist/components/chart-zoom-core.js +334 -0
  237. package/dist/components/chart-zoom-core.js.map +1 -0
  238. package/dist/components/chart-zoom.d.ts +39 -205
  239. package/dist/components/chart-zoom.js +15 -316
  240. package/dist/components/chart-zoom.js.map +1 -1
  241. package/dist/components/chart.d.ts +11 -15
  242. package/dist/components/chart.js +11 -11
  243. package/dist/components/chart.js.map +1 -1
  244. package/dist/components/checkbox-group.d.ts +6 -10
  245. package/dist/components/checkbox-group.js +10 -9
  246. package/dist/components/checkbox-group.js.map +1 -1
  247. package/dist/components/checkbox.d.ts +8 -12
  248. package/dist/components/checkbox.js +20 -18
  249. package/dist/components/checkbox.js.map +1 -1
  250. package/dist/components/chip-input.d.ts +73 -0
  251. package/dist/components/chip-input.js +224 -0
  252. package/dist/components/chip-input.js.map +1 -0
  253. package/dist/components/chip-labels.d.ts +2 -0
  254. package/dist/components/chip-labels.js +12 -0
  255. package/dist/components/chip-labels.js.map +1 -0
  256. package/dist/components/chip.d.ts +18 -93
  257. package/dist/components/chip.js +74 -426
  258. package/dist/components/chip.js.map +1 -1
  259. package/dist/components/choice-card.d.ts +21 -18
  260. package/dist/components/choice-card.js +45 -45
  261. package/dist/components/choice-card.js.map +1 -1
  262. package/dist/components/column-mapper-labels.d.ts +5 -0
  263. package/dist/components/column-mapper-labels.js +34 -0
  264. package/dist/components/column-mapper-labels.js.map +1 -0
  265. package/dist/components/column-mapper.d.ts +15 -17
  266. package/dist/components/column-mapper.js +11 -37
  267. package/dist/components/column-mapper.js.map +1 -1
  268. package/dist/components/combobox-core.d.ts +79 -40
  269. package/dist/components/combobox-core.js +189 -122
  270. package/dist/components/combobox-core.js.map +1 -1
  271. package/dist/components/combobox-suggestions.d.ts +76 -0
  272. package/dist/components/combobox-suggestions.js +56 -0
  273. package/dist/components/combobox-suggestions.js.map +1 -0
  274. package/dist/components/combobox.d.ts +14 -159
  275. package/dist/components/combobox.js +40 -507
  276. package/dist/components/combobox.js.map +1 -1
  277. package/dist/components/confirm-dialog-labels.d.ts +7 -0
  278. package/dist/components/confirm-dialog-labels.js +10 -0
  279. package/dist/components/confirm-dialog-labels.js.map +1 -0
  280. package/dist/components/confirm-dialog.d.ts +165 -100
  281. package/dist/components/confirm-dialog.js +2 -6
  282. package/dist/components/confirm-dialog.js.map +1 -1
  283. package/dist/components/copy-button-labels.d.ts +2 -0
  284. package/dist/components/copy-button-labels.js +12 -0
  285. package/dist/components/copy-button-labels.js.map +1 -0
  286. package/dist/components/copy-button.d.ts +70 -100
  287. package/dist/components/copy-button.js +4 -9
  288. package/dist/components/copy-button.js.map +1 -1
  289. package/dist/components/country-select-labels.d.ts +2 -0
  290. package/dist/components/country-select-labels.js +10 -0
  291. package/dist/components/country-select-labels.js.map +1 -0
  292. package/dist/components/country-select.d.ts +18 -15
  293. package/dist/components/country-select.js +49 -64
  294. package/dist/components/country-select.js.map +1 -1
  295. package/dist/components/currency-option-list.d.ts +63 -0
  296. package/dist/components/currency-option-list.js +135 -0
  297. package/dist/components/currency-option-list.js.map +1 -0
  298. package/dist/components/currency-select.d.ts +10 -30
  299. package/dist/components/currency-select.js +50 -133
  300. package/dist/components/currency-select.js.map +1 -1
  301. package/dist/components/danger-confirm-labels.d.ts +14 -0
  302. package/dist/components/danger-confirm-labels.js +17 -0
  303. package/dist/components/danger-confirm-labels.js.map +1 -0
  304. package/dist/components/danger-confirm.d.ts +448 -100
  305. package/dist/components/danger-confirm.js +40 -46
  306. package/dist/components/danger-confirm.js.map +1 -1
  307. package/dist/components/data-table-cells.d.ts +9 -24
  308. package/dist/components/data-table-cells.js +1 -1
  309. package/dist/components/data-table-cells.js.map +1 -1
  310. package/dist/components/data-table-column-settings.d.ts +16 -0
  311. package/dist/components/data-table-column-settings.js +119 -0
  312. package/dist/components/data-table-column-settings.js.map +1 -0
  313. package/dist/components/data-table-filter-popover.d.ts +5 -19
  314. package/dist/components/data-table-filter-popover.js +39 -22
  315. package/dist/components/data-table-filter-popover.js.map +1 -1
  316. package/dist/components/data-table-filters.d.ts +93 -15
  317. package/dist/components/data-table-filters.js +22 -7
  318. package/dist/components/data-table-filters.js.map +1 -1
  319. package/dist/components/data-table-head.d.ts +36 -0
  320. package/dist/components/data-table-head.js +190 -0
  321. package/dist/components/data-table-head.js.map +1 -0
  322. package/dist/components/data-table-labels.d.ts +124 -15
  323. package/dist/components/data-table-labels.js +9 -5
  324. package/dist/components/data-table-labels.js.map +1 -1
  325. package/dist/components/data-table-mobile.d.ts +106 -0
  326. package/dist/components/data-table-mobile.js +412 -0
  327. package/dist/components/data-table-mobile.js.map +1 -0
  328. package/dist/components/data-table-pagination.d.ts +6 -21
  329. package/dist/components/data-table-pagination.js +7 -7
  330. package/dist/components/data-table-pagination.js.map +1 -1
  331. package/dist/components/data-table-resize.d.ts +37 -0
  332. package/dist/components/data-table-resize.js +103 -0
  333. package/dist/components/data-table-resize.js.map +1 -0
  334. package/dist/components/data-table-row-actions.d.ts +24 -0
  335. package/dist/components/data-table-row-actions.js +95 -0
  336. package/dist/components/data-table-row-actions.js.map +1 -0
  337. package/dist/components/data-table-selection.d.ts +21 -0
  338. package/dist/components/data-table-selection.js +30 -0
  339. package/dist/components/data-table-selection.js.map +1 -0
  340. package/dist/components/data-table-shared.d.ts +77 -0
  341. package/dist/components/data-table-shared.js +77 -0
  342. package/dist/components/data-table-shared.js.map +1 -0
  343. package/dist/components/data-table-sort.d.ts +8 -10
  344. package/dist/components/data-table.d.ts +603 -15
  345. package/dist/components/data-table.js +134 -927
  346. package/dist/components/data-table.js.map +1 -1
  347. package/dist/components/date-field.d.ts +203 -0
  348. package/dist/components/date-field.js +270 -0
  349. package/dist/components/date-field.js.map +1 -0
  350. package/dist/components/date-picker.d.ts +6 -261
  351. package/dist/components/date-picker.js +24 -760
  352. package/dist/components/date-picker.js.map +1 -1
  353. package/dist/components/date-range-picker.d.ts +125 -0
  354. package/dist/components/date-range-picker.js +261 -0
  355. package/dist/components/date-range-picker.js.map +1 -0
  356. package/dist/components/description-list-labels.d.ts +2 -0
  357. package/dist/components/description-list-labels.js +8 -0
  358. package/dist/components/description-list-labels.js.map +1 -0
  359. package/dist/components/description-list.d.ts +13 -15
  360. package/dist/components/description-list.js +17 -11
  361. package/dist/components/description-list.js.map +1 -1
  362. package/dist/components/dialog-frame-labels.d.ts +2 -0
  363. package/dist/components/dialog-frame-labels.js +6 -0
  364. package/dist/components/dialog-frame-labels.js.map +1 -0
  365. package/dist/components/dialog-frame.d.ts +7 -11
  366. package/dist/components/dialog-frame.js +6 -6
  367. package/dist/components/dialog-frame.js.map +1 -1
  368. package/dist/components/disclosure.d.ts +6 -10
  369. package/dist/components/disclosure.js +11 -11
  370. package/dist/components/disclosure.js.map +1 -1
  371. package/dist/components/dropdown.d.ts +55 -27
  372. package/dist/components/dropdown.js +62 -31
  373. package/dist/components/dropdown.js.map +1 -1
  374. package/dist/components/empty-state.d.ts +64 -0
  375. package/dist/components/empty-state.js +70 -0
  376. package/dist/components/empty-state.js.map +1 -0
  377. package/dist/components/entity-combobox.d.ts +10 -11
  378. package/dist/components/entity-combobox.js +14 -13
  379. package/dist/components/entity-combobox.js.map +1 -1
  380. package/dist/components/error-boundary-labels.d.ts +2 -0
  381. package/dist/components/error-boundary-labels.js +19 -0
  382. package/dist/components/error-boundary-labels.js.map +1 -0
  383. package/dist/components/error-boundary.d.ts +17 -17
  384. package/dist/components/error-boundary.js +5 -17
  385. package/dist/components/error-boundary.js.map +1 -1
  386. package/dist/components/facing-pair.d.ts +7 -115
  387. package/dist/components/facing-pair.js +1 -1
  388. package/dist/components/facing-pair.js.map +1 -1
  389. package/dist/components/field-base.d.ts +260 -0
  390. package/dist/components/field-base.js +228 -0
  391. package/dist/components/field-base.js.map +1 -0
  392. package/dist/components/field-parts.d.ts +188 -87
  393. package/dist/components/field-parts.js +60 -33
  394. package/dist/components/field-parts.js.map +1 -1
  395. package/dist/components/field-strip.d.ts +19 -28
  396. package/dist/components/field-strip.js +2 -2
  397. package/dist/components/field-strip.js.map +1 -1
  398. package/dist/components/field-sync-labels.d.ts +2 -0
  399. package/dist/components/field-sync-labels.js +12 -0
  400. package/dist/components/field-sync-labels.js.map +1 -0
  401. package/dist/components/field-sync.d.ts +20 -19
  402. package/dist/components/field-sync.js +4 -10
  403. package/dist/components/field-sync.js.map +1 -1
  404. package/dist/components/field.d.ts +45 -10
  405. package/dist/components/field.js +10 -8
  406. package/dist/components/field.js.map +1 -1
  407. package/dist/components/file-button.d.ts +85 -100
  408. package/dist/components/file-button.js +23 -169
  409. package/dist/components/file-button.js.map +1 -1
  410. package/dist/components/file-dropzone.d.ts +9 -109
  411. package/dist/components/file-dropzone.js +22 -22
  412. package/dist/components/file-dropzone.js.map +1 -1
  413. package/dist/components/floating-panel-labels.d.ts +2 -0
  414. package/dist/components/floating-panel-labels.js +9 -0
  415. package/dist/components/floating-panel-labels.js.map +1 -0
  416. package/dist/components/floating-panel.d.ts +17 -21
  417. package/dist/components/floating-panel.js +19 -18
  418. package/dist/components/floating-panel.js.map +1 -1
  419. package/dist/components/focus-ring.d.ts +9 -6
  420. package/dist/components/focus-ring.js +2 -2
  421. package/dist/components/focus-ring.js.map +1 -1
  422. package/dist/components/form-actions-labels.d.ts +2 -0
  423. package/dist/components/form-actions-labels.js +10 -0
  424. package/dist/components/form-actions-labels.js.map +1 -0
  425. package/dist/components/form-actions.d.ts +280 -100
  426. package/dist/components/form-actions.js +10 -20
  427. package/dist/components/form-actions.js.map +1 -1
  428. package/dist/components/full-bleed-dialog.d.ts +7 -8
  429. package/dist/components/full-bleed-dialog.js +14 -13
  430. package/dist/components/full-bleed-dialog.js.map +1 -1
  431. package/dist/components/grouped-picker.d.ts +21 -16
  432. package/dist/components/grouped-picker.js +76 -62
  433. package/dist/components/grouped-picker.js.map +1 -1
  434. package/dist/components/help-popover.d.ts +60 -0
  435. package/dist/components/help-popover.js +48 -0
  436. package/dist/components/help-popover.js.map +1 -0
  437. package/dist/components/hover-menu.d.ts +17 -16
  438. package/dist/components/hover-menu.js +18 -17
  439. package/dist/components/hover-menu.js.map +1 -1
  440. package/dist/components/iban-input-labels.d.ts +2 -0
  441. package/dist/components/iban-input-labels.js +13 -0
  442. package/dist/components/iban-input-labels.js.map +1 -0
  443. package/dist/components/iban-input.d.ts +73 -100
  444. package/dist/components/iban-input.js +22 -15
  445. package/dist/components/iban-input.js.map +1 -1
  446. package/dist/components/icon-button.d.ts +300 -0
  447. package/dist/components/icon-button.js +465 -0
  448. package/dist/components/icon-button.js.map +1 -0
  449. package/dist/components/icon-picker-labels.d.ts +2 -0
  450. package/dist/components/icon-picker-labels.js +12 -0
  451. package/dist/components/icon-picker-labels.js.map +1 -0
  452. package/dist/components/icon-picker.d.ts +13 -13
  453. package/dist/components/icon-picker.js +18 -17
  454. package/dist/components/icon-picker.js.map +1 -1
  455. package/dist/components/image-grid-labels.d.ts +2 -0
  456. package/dist/components/image-grid-labels.js +10 -0
  457. package/dist/components/image-grid-labels.js.map +1 -0
  458. package/dist/components/image-grid.d.ts +12 -14
  459. package/dist/components/image-grid.js +6 -10
  460. package/dist/components/image-grid.js.map +1 -1
  461. package/dist/components/inline-edit-field-labels.d.ts +2 -0
  462. package/dist/components/inline-edit-field-labels.js +10 -0
  463. package/dist/components/inline-edit-field-labels.js.map +1 -0
  464. package/dist/components/inline-edit-field.d.ts +11 -13
  465. package/dist/components/inline-edit-field.js +11 -13
  466. package/dist/components/inline-edit-field.js.map +1 -1
  467. package/dist/components/inline-entity-combobox.d.ts +155 -0
  468. package/dist/components/inline-entity-combobox.js +467 -0
  469. package/dist/components/inline-entity-combobox.js.map +1 -0
  470. package/dist/components/input.d.ts +98 -0
  471. package/dist/components/input.js +219 -0
  472. package/dist/components/input.js.map +1 -0
  473. package/dist/components/jump-calendar.d.ts +8 -0
  474. package/dist/components/jump-calendar.js +274 -0
  475. package/dist/components/jump-calendar.js.map +1 -0
  476. package/dist/components/language-select.d.ts +20 -110
  477. package/dist/components/language-select.js +12 -7
  478. package/dist/components/language-select.js.map +1 -1
  479. package/dist/components/legal-labels.d.ts +2 -0
  480. package/dist/components/legal-labels.js +100 -0
  481. package/dist/components/legal-labels.js.map +1 -0
  482. package/dist/components/legal-page.d.ts +17 -117
  483. package/dist/components/legal-page.js +2 -2
  484. package/dist/components/legal-page.js.map +1 -1
  485. package/dist/components/legal.d.ts +353 -100
  486. package/dist/components/legal.js +7 -101
  487. package/dist/components/legal.js.map +1 -1
  488. package/dist/components/lightbox-labels.d.ts +2 -0
  489. package/dist/components/lightbox-labels.js +17 -0
  490. package/dist/components/lightbox-labels.js.map +1 -0
  491. package/dist/components/lightbox.d.ts +12 -14
  492. package/dist/components/lightbox.js +9 -19
  493. package/dist/components/lightbox.js.map +1 -1
  494. package/dist/components/line-items-labels.d.ts +2 -0
  495. package/dist/components/line-items-labels.js +13 -0
  496. package/dist/components/line-items-labels.js.map +1 -0
  497. package/dist/components/line-items.d.ts +16 -18
  498. package/dist/components/line-items.js +18 -26
  499. package/dist/components/line-items.js.map +1 -1
  500. package/dist/components/list-labels.d.ts +2 -0
  501. package/dist/components/list-labels.js +9 -0
  502. package/dist/components/list-labels.js.map +1 -0
  503. package/dist/components/list.d.ts +32 -21
  504. package/dist/components/list.js +41 -25
  505. package/dist/components/list.js.map +1 -1
  506. package/dist/components/loading-state.d.ts +5 -9
  507. package/dist/components/loading-state.js +2 -2
  508. package/dist/components/loading-state.js.map +1 -1
  509. package/dist/components/measured-grid-labels.d.ts +4 -0
  510. package/dist/components/measured-grid-labels.js +21 -0
  511. package/dist/components/measured-grid-labels.js.map +1 -0
  512. package/dist/components/measured-grid.d.ts +13 -17
  513. package/dist/components/measured-grid.js +31 -50
  514. package/dist/components/measured-grid.js.map +1 -1
  515. package/dist/components/menu-item.d.ts +10 -10
  516. package/dist/components/menu-item.js +9 -9
  517. package/dist/components/menu-item.js.map +1 -1
  518. package/dist/components/mini-calendar-labels.d.ts +4 -0
  519. package/dist/components/mini-calendar-labels.js +14 -0
  520. package/dist/components/mini-calendar-labels.js.map +1 -0
  521. package/dist/components/mini-calendar.d.ts +10 -14
  522. package/dist/components/mini-calendar.js +22 -29
  523. package/dist/components/mini-calendar.js.map +1 -1
  524. package/dist/components/modal.d.ts +26 -18
  525. package/dist/components/modal.js +8 -11
  526. package/dist/components/modal.js.map +1 -1
  527. package/dist/components/money-draft.d.ts +34 -0
  528. package/dist/components/money-draft.js +39 -0
  529. package/dist/components/money-draft.js.map +1 -0
  530. package/dist/components/money-field.d.ts +13 -110
  531. package/dist/components/money-field.js +6 -22
  532. package/dist/components/money-field.js.map +1 -1
  533. package/dist/components/month-picker-labels.d.ts +5 -0
  534. package/dist/components/month-picker-labels.js +18 -0
  535. package/dist/components/month-picker-labels.js.map +1 -0
  536. package/dist/components/month-picker.d.ts +15 -13
  537. package/dist/components/month-picker.js +34 -32
  538. package/dist/components/month-picker.js.map +1 -1
  539. package/dist/components/multi-entity-combobox.d.ts +9 -11
  540. package/dist/components/multi-entity-combobox.js +14 -13
  541. package/dist/components/multi-entity-combobox.js.map +1 -1
  542. package/dist/components/multi-select.d.ts +81 -21
  543. package/dist/components/multi-select.js +171 -197
  544. package/dist/components/multi-select.js.map +1 -1
  545. package/dist/components/nav-pills.d.ts +9 -10
  546. package/dist/components/nav-pills.js +53 -42
  547. package/dist/components/nav-pills.js.map +1 -1
  548. package/dist/components/number-field.d.ts +13 -110
  549. package/dist/components/number-field.js +2 -3
  550. package/dist/components/number-field.js.map +1 -1
  551. package/dist/components/number-input.d.ts +55 -109
  552. package/dist/components/number-input.js +50 -67
  553. package/dist/components/number-input.js.map +1 -1
  554. package/dist/components/numeric-field.d.ts +85 -0
  555. package/dist/components/numeric-field.js +71 -0
  556. package/dist/components/numeric-field.js.map +1 -0
  557. package/dist/components/numpad-sheet.d.ts +5 -107
  558. package/dist/components/numpad-sheet.js +7 -7
  559. package/dist/components/numpad-sheet.js.map +1 -1
  560. package/dist/components/one-time-code-input.d.ts +6 -7
  561. package/dist/components/one-time-code-input.js +119 -124
  562. package/dist/components/one-time-code-input.js.map +1 -1
  563. package/dist/components/page-contents-labels.d.ts +2 -0
  564. package/dist/components/page-contents-labels.js +8 -0
  565. package/dist/components/page-contents-labels.js.map +1 -0
  566. package/dist/components/page-contents.d.ts +13 -15
  567. package/dist/components/page-contents.js +7 -9
  568. package/dist/components/page-contents.js.map +1 -1
  569. package/dist/components/page-header.d.ts +10 -10
  570. package/dist/components/page-header.js +3 -3
  571. package/dist/components/page-header.js.map +1 -1
  572. package/dist/components/password-strength-labels.d.ts +2 -0
  573. package/dist/components/password-strength-labels.js +21 -0
  574. package/dist/components/password-strength-labels.js.map +1 -0
  575. package/dist/components/password-strength.d.ts +15 -17
  576. package/dist/components/password-strength.js +7 -22
  577. package/dist/components/password-strength.js.map +1 -1
  578. package/dist/components/phone-input-labels.d.ts +2 -0
  579. package/dist/components/phone-input-labels.js +9 -0
  580. package/dist/components/phone-input-labels.js.map +1 -0
  581. package/dist/components/phone-input.d.ts +75 -100
  582. package/dist/components/phone-input.js +20 -23
  583. package/dist/components/phone-input.js.map +1 -1
  584. package/dist/components/picker-sheet.d.ts +20 -8
  585. package/dist/components/picker-sheet.js +22 -11
  586. package/dist/components/picker-sheet.js.map +1 -1
  587. package/dist/components/pie-chart-labels.d.ts +2 -4
  588. package/dist/components/pie-chart.d.ts +8 -11
  589. package/dist/components/pie-chart.js +5 -5
  590. package/dist/components/pie-chart.js.map +1 -1
  591. package/dist/components/popover-labels.d.ts +2 -0
  592. package/dist/components/popover-labels.js +11 -0
  593. package/dist/components/popover-labels.js.map +1 -0
  594. package/dist/components/popover.d.ts +13 -11
  595. package/dist/components/popover.js +21 -23
  596. package/dist/components/popover.js.map +1 -1
  597. package/dist/components/progress-bar-labels.d.ts +2 -0
  598. package/dist/components/progress-bar-labels.js +9 -0
  599. package/dist/components/progress-bar-labels.js.map +1 -0
  600. package/dist/components/progress-bar.d.ts +16 -15
  601. package/dist/components/progress-bar.js +22 -20
  602. package/dist/components/progress-bar.js.map +1 -1
  603. package/dist/components/qr-code.d.ts +4 -8
  604. package/dist/components/qr-code.js.map +1 -1
  605. package/dist/components/reauth-dialog-labels.d.ts +2 -0
  606. package/dist/components/reauth-dialog-labels.js +12 -0
  607. package/dist/components/reauth-dialog-labels.js.map +1 -0
  608. package/dist/components/reauth-dialog.d.ts +8 -10
  609. package/dist/components/reauth-dialog.js +3 -8
  610. package/dist/components/reauth-dialog.js.map +1 -1
  611. package/dist/components/row-actions-labels.d.ts +2 -0
  612. package/dist/components/row-actions-labels.js +9 -0
  613. package/dist/components/row-actions-labels.js.map +1 -0
  614. package/dist/components/row-actions.d.ts +224 -100
  615. package/dist/components/row-actions.js +4 -5
  616. package/dist/components/row-actions.js.map +1 -1
  617. package/dist/components/scroll-area.d.ts +6 -9
  618. package/dist/components/scroll-area.js +4 -10
  619. package/dist/components/scroll-area.js.map +1 -1
  620. package/dist/components/search-field.d.ts +12 -27
  621. package/dist/components/search-field.js +13 -16
  622. package/dist/components/search-field.js.map +1 -1
  623. package/dist/components/select.d.ts +69 -0
  624. package/dist/components/select.js +164 -0
  625. package/dist/components/select.js.map +1 -0
  626. package/dist/components/separator.d.ts +3 -7
  627. package/dist/components/separator.js.map +1 -1
  628. package/dist/components/series-chart-axes.d.ts +120 -0
  629. package/dist/components/series-chart-axes.js +164 -0
  630. package/dist/components/series-chart-axes.js.map +1 -0
  631. package/dist/components/series-chart-budget.d.ts +8 -9
  632. package/dist/components/series-chart-labels.d.ts +2 -4
  633. package/dist/components/series-chart-thin.d.ts +34 -0
  634. package/dist/components/series-chart-thin.js +103 -0
  635. package/dist/components/series-chart-thin.js.map +1 -0
  636. package/dist/components/series-chart-ticks.d.ts +9 -11
  637. package/dist/components/series-chart.d.ts +64 -213
  638. package/dist/components/series-chart.js +69 -160
  639. package/dist/components/series-chart.js.map +1 -1
  640. package/dist/components/server-wake-labels.d.ts +2 -0
  641. package/dist/components/server-wake-labels.js +9 -0
  642. package/dist/components/server-wake-labels.js.map +1 -0
  643. package/dist/components/server-wake.d.ts +32 -23
  644. package/dist/components/server-wake.js +15 -35
  645. package/dist/components/server-wake.js.map +1 -1
  646. package/dist/components/settings-fields.d.ts +46 -117
  647. package/dist/components/settings-fields.js +13 -3
  648. package/dist/components/settings-fields.js.map +1 -1
  649. package/dist/components/share-card-labels.d.ts +2 -0
  650. package/dist/components/share-card-labels.js +29 -0
  651. package/dist/components/share-card-labels.js.map +1 -0
  652. package/dist/components/share-card.d.ts +188 -100
  653. package/dist/components/share-card.js +16 -34
  654. package/dist/components/share-card.js.map +1 -1
  655. package/dist/components/sign-chip-labels.d.ts +2 -0
  656. package/dist/components/sign-chip-labels.js +11 -0
  657. package/dist/components/sign-chip-labels.js.map +1 -0
  658. package/dist/components/sign-chip.d.ts +7 -9
  659. package/dist/components/sign-chip.js +2 -7
  660. package/dist/components/sign-chip.js.map +1 -1
  661. package/dist/components/signature-pad-labels.d.ts +2 -0
  662. package/dist/components/signature-pad-labels.js +23 -0
  663. package/dist/components/signature-pad-labels.js.map +1 -0
  664. package/dist/components/signature-pad.d.ts +16 -15
  665. package/dist/components/signature-pad.js +22 -35
  666. package/dist/components/signature-pad.js.map +1 -1
  667. package/dist/components/signed-amount-labels.d.ts +2 -0
  668. package/dist/components/signed-amount-labels.js +9 -0
  669. package/dist/components/signed-amount-labels.js.map +1 -0
  670. package/dist/components/signed-amount.d.ts +19 -21
  671. package/dist/components/signed-amount.js +12 -15
  672. package/dist/components/signed-amount.js.map +1 -1
  673. package/dist/components/skeleton.d.ts +13 -9
  674. package/dist/components/skeleton.js +1 -1
  675. package/dist/components/skeleton.js.map +1 -1
  676. package/dist/components/slider.d.ts +16 -11
  677. package/dist/components/slider.js +23 -18
  678. package/dist/components/slider.js.map +1 -1
  679. package/dist/components/sparkline-labels.d.ts +2 -0
  680. package/dist/components/sparkline-labels.js +13 -0
  681. package/dist/components/sparkline-labels.js.map +1 -0
  682. package/dist/components/sparkline.d.ts +10 -12
  683. package/dist/components/sparkline.js +10 -17
  684. package/dist/components/sparkline.js.map +1 -1
  685. package/dist/components/spinner.d.ts +45 -0
  686. package/dist/components/spinner.js +39 -0
  687. package/dist/components/spinner.js.map +1 -0
  688. package/dist/components/stat-tile-labels.d.ts +2 -0
  689. package/dist/components/stat-tile-labels.js +14 -0
  690. package/dist/components/stat-tile-labels.js.map +1 -0
  691. package/dist/components/stat-tile.d.ts +15 -17
  692. package/dist/components/stat-tile.js +25 -32
  693. package/dist/components/stat-tile.js.map +1 -1
  694. package/dist/components/status-dot.d.ts +8 -20
  695. package/dist/components/status-dot.js +13 -12
  696. package/dist/components/status-dot.js.map +1 -1
  697. package/dist/components/swatch-picker-labels.d.ts +2 -0
  698. package/dist/components/swatch-picker-labels.js +9 -0
  699. package/dist/components/swatch-picker-labels.js.map +1 -0
  700. package/dist/components/swatch-picker.d.ts +14 -14
  701. package/dist/components/swatch-picker.js +14 -8
  702. package/dist/components/swatch-picker.js.map +1 -1
  703. package/dist/components/swipeable-row.d.ts +14 -27
  704. package/dist/components/swipeable-row.js +2 -2
  705. package/dist/components/swipeable-row.js.map +1 -1
  706. package/dist/components/switch.d.ts +10 -13
  707. package/dist/components/switch.js +13 -12
  708. package/dist/components/switch.js.map +1 -1
  709. package/dist/components/table.d.ts +28 -31
  710. package/dist/components/table.js +15 -15
  711. package/dist/components/table.js.map +1 -1
  712. package/dist/components/tabs.d.ts +182 -0
  713. package/dist/components/tabs.js +312 -0
  714. package/dist/components/tabs.js.map +1 -0
  715. package/dist/components/text-link.d.ts +17 -118
  716. package/dist/components/text-link.js +7 -7
  717. package/dist/components/text-link.js.map +1 -1
  718. package/dist/components/text.d.ts +14 -13
  719. package/dist/components/text.js +5 -5
  720. package/dist/components/text.js.map +1 -1
  721. package/dist/components/textarea.d.ts +20 -0
  722. package/dist/components/textarea.js +161 -0
  723. package/dist/components/textarea.js.map +1 -0
  724. package/dist/components/tile-radio.d.ts +6 -10
  725. package/dist/components/tile-radio.js +6 -6
  726. package/dist/components/tile-radio.js.map +1 -1
  727. package/dist/components/time-input.d.ts +5 -107
  728. package/dist/components/time-input.js +14 -5
  729. package/dist/components/time-input.js.map +1 -1
  730. package/dist/components/toast-labels.d.ts +2 -0
  731. package/dist/components/toast-labels.js +11 -0
  732. package/dist/components/toast-labels.js.map +1 -0
  733. package/dist/components/toast.d.ts +21 -23
  734. package/dist/components/toast.js +1 -6
  735. package/dist/components/toast.js.map +1 -1
  736. package/dist/components/toggle-group.d.ts +26 -26
  737. package/dist/components/toggle-group.js +43 -19
  738. package/dist/components/toggle-group.js.map +1 -1
  739. package/dist/components/toggle-legend.d.ts +18 -21
  740. package/dist/components/toggle-legend.js +3 -3
  741. package/dist/components/toggle-legend.js.map +1 -1
  742. package/dist/components/tooltip.d.ts +16 -15
  743. package/dist/components/tooltip.js +4 -9
  744. package/dist/components/tooltip.js.map +1 -1
  745. package/dist/components/translation-review-editor.d.ts +8 -10
  746. package/dist/components/translation-review-editor.js +6 -5
  747. package/dist/components/translation-review-editor.js.map +1 -1
  748. package/dist/components/translation-review-labels.d.ts +4 -7
  749. package/dist/components/translation-review-parts.d.ts +19 -28
  750. package/dist/components/translation-review-parts.js +4 -7
  751. package/dist/components/translation-review-parts.js.map +1 -1
  752. package/dist/components/translation-review.d.ts +26 -24
  753. package/dist/components/translation-review.js +13 -10
  754. package/dist/components/translation-review.js.map +1 -1
  755. package/dist/components/tree-view.d.ts +7 -11
  756. package/dist/components/tree-view.js +8 -8
  757. package/dist/components/tree-view.js.map +1 -1
  758. package/dist/components/treemap.d.ts +9 -13
  759. package/dist/components/trigger-aria.d.ts +2 -4
  760. package/dist/components/ui-labels.d.ts +5 -0
  761. package/dist/components/ui-labels.js +20 -0
  762. package/dist/components/ui-labels.js.map +1 -0
  763. package/dist/components/use-anchor-dir.d.ts +3 -6
  764. package/dist/components/use-mobile-reveal.d.ts +2 -6
  765. package/dist/components/use-table-state.d.ts +154 -15
  766. package/dist/components/user-avatar.d.ts +8 -21
  767. package/dist/components/user-avatar.js +1 -1
  768. package/dist/components/user-avatar.js.map +1 -1
  769. package/dist/components/wizard-stepper.d.ts +6 -6
  770. package/dist/components/wizard-stepper.js +4 -3
  771. package/dist/components/wizard-stepper.js.map +1 -1
  772. package/dist/components/write-lock-labels.d.ts +2 -0
  773. package/dist/components/write-lock-labels.js +8 -0
  774. package/dist/components/write-lock-labels.js.map +1 -0
  775. package/dist/components/write-lock.d.ts +16 -18
  776. package/dist/components/write-lock.js +4 -8
  777. package/dist/components/write-lock.js.map +1 -1
  778. package/dist/data-table.d.ts +10 -18
  779. package/dist/data-table.js.map +1 -1
  780. package/dist/demo/demo-banner.d.ts +10 -13
  781. package/dist/demo/demo-banner.js +5 -19
  782. package/dist/demo/demo-banner.js.map +1 -1
  783. package/dist/demo/demo-countdown.d.ts +7 -9
  784. package/dist/demo/demo-ended.d.ts +10 -13
  785. package/dist/demo/demo-ended.js +4 -4
  786. package/dist/demo/demo-ended.js.map +1 -1
  787. package/dist/demo/demo-labels.d.ts +4 -5
  788. package/dist/demo/demo-labels.js.map +1 -1
  789. package/dist/demo/demo-session.d.ts +3 -5
  790. package/dist/demo/demo-start.d.ts +8 -11
  791. package/dist/demo/demo-start.js +3 -2
  792. package/dist/demo/demo-start.js.map +1 -1
  793. package/dist/feedback/feedback-attachment-labels.d.ts +16 -0
  794. package/dist/feedback/feedback-attachment-labels.js +17 -0
  795. package/dist/feedback/feedback-attachment-labels.js.map +1 -0
  796. package/dist/feedback/feedback-attachment.d.ts +312 -100
  797. package/dist/feedback/feedback-attachment.js +31 -42
  798. package/dist/feedback/feedback-attachment.js.map +1 -1
  799. package/dist/feedback/feedback-capture.d.ts +2 -4
  800. package/dist/feedback/feedback-context-labels.d.ts +2 -0
  801. package/dist/feedback/feedback-context-labels.js +9 -0
  802. package/dist/feedback/feedback-context-labels.js.map +1 -0
  803. package/dist/feedback/feedback-context.d.ts +110 -100
  804. package/dist/feedback/feedback-context.js +4 -7
  805. package/dist/feedback/feedback-context.js.map +1 -1
  806. package/dist/feedback/feedback-crash.d.ts +8 -109
  807. package/dist/feedback/feedback-dialog-labels.d.ts +12 -0
  808. package/dist/feedback/feedback-dialog-labels.js +17 -0
  809. package/dist/feedback/feedback-dialog-labels.js.map +1 -0
  810. package/dist/feedback/feedback-dialog.d.ts +186 -100
  811. package/dist/feedback/feedback-dialog.js +8 -18
  812. package/dist/feedback/feedback-dialog.js.map +1 -1
  813. package/dist/feedback/feedback-inbox.d.ts +236 -100
  814. package/dist/feedback/feedback-inbox.js +31 -141
  815. package/dist/feedback/feedback-inbox.js.map +1 -1
  816. package/dist/feedback/feedback-labels.d.ts +83 -100
  817. package/dist/feedback/feedback-labels.js.map +1 -1
  818. package/dist/feedback/feedback-menu-labels.d.ts +2 -0
  819. package/dist/feedback/feedback-menu-labels.js +10 -0
  820. package/dist/feedback/feedback-menu-labels.js.map +1 -0
  821. package/dist/feedback/feedback-menu.d.ts +83 -100
  822. package/dist/feedback/feedback-menu.js +3 -7
  823. package/dist/feedback/feedback-menu.js.map +1 -1
  824. package/dist/feedback/feedback-record.d.ts +239 -100
  825. package/dist/feedback/feedback-record.js +7 -2
  826. package/dist/feedback/feedback-record.js.map +1 -1
  827. package/dist/feedback/feedback-row-detail-labels.d.ts +2 -0
  828. package/dist/feedback/feedback-row-detail-labels.js +31 -0
  829. package/dist/feedback/feedback-row-detail-labels.js.map +1 -0
  830. package/dist/feedback/feedback-row-detail.d.ts +315 -100
  831. package/dist/feedback/feedback-row-detail.js +11 -37
  832. package/dist/feedback/feedback-row-detail.js.map +1 -1
  833. package/dist/feedback/feedback-status-undo.d.ts +66 -100
  834. package/dist/feedback/feedback-status-undo.js.map +1 -1
  835. package/dist/feedback/feedback-submit-dialog.d.ts +39 -0
  836. package/dist/feedback/feedback-submit-dialog.js +66 -0
  837. package/dist/feedback/feedback-submit-dialog.js.map +1 -0
  838. package/dist/feedback/feedback-submit.d.ts +13 -108
  839. package/dist/feedback/feedback-submit.js +19 -40
  840. package/dist/feedback/feedback-submit.js.map +1 -1
  841. package/dist/feedback/feedback-swipe.d.ts +9 -109
  842. package/dist/feedback/feedback-swipe.js +1 -1
  843. package/dist/feedback/feedback-swipe.js.map +1 -1
  844. package/dist/feedback/feedback-table-labels.d.ts +2 -0
  845. package/dist/feedback/feedback-table-labels.js +26 -0
  846. package/dist/feedback/feedback-table-labels.js.map +1 -0
  847. package/dist/feedback/feedback-table.d.ts +314 -100
  848. package/dist/feedback/feedback-table.js +11 -31
  849. package/dist/feedback/feedback-table.js.map +1 -1
  850. package/dist/feedback/feedback-thread-labels.d.ts +3 -0
  851. package/dist/feedback/feedback-thread-labels.js +21 -0
  852. package/dist/feedback/feedback-thread-labels.js.map +1 -0
  853. package/dist/feedback/feedback-thread.d.ts +378 -100
  854. package/dist/feedback/feedback-thread.js +32 -35
  855. package/dist/feedback/feedback-thread.js.map +1 -1
  856. package/dist/feedback/feedback-vocabulary.d.ts +98 -0
  857. package/dist/feedback/feedback-vocabulary.js +143 -0
  858. package/dist/feedback/feedback-vocabulary.js.map +1 -0
  859. package/dist/feedback.d.ts +15 -104
  860. package/dist/hooks/use-anchored-panel.d.ts +109 -17
  861. package/dist/hooks/use-anchored-panel.js +38 -6
  862. package/dist/hooks/use-anchored-panel.js.map +1 -1
  863. package/dist/hooks/use-anchored-rect.d.ts +15 -6
  864. package/dist/hooks/use-anchored-rect.js +2 -1
  865. package/dist/hooks/use-anchored-rect.js.map +1 -1
  866. package/dist/hooks/use-announce.d.ts +4 -6
  867. package/dist/hooks/use-authed-src.d.ts +5 -7
  868. package/dist/hooks/use-authed-src.js +3 -7
  869. package/dist/hooks/use-authed-src.js.map +1 -1
  870. package/dist/hooks/use-body-scroll-lock.d.ts +1 -3
  871. package/dist/hooks/use-breakpoint.d.ts +16 -17
  872. package/dist/hooks/use-breakpoint.js.map +1 -1
  873. package/dist/hooks/use-close-transition.d.ts +8 -8
  874. package/dist/hooks/use-close-transition.js +5 -4
  875. package/dist/hooks/use-close-transition.js.map +1 -1
  876. package/dist/hooks/use-copy-to-clipboard.d.ts +5 -7
  877. package/dist/hooks/use-debounce.d.ts +13 -6
  878. package/dist/hooks/use-debounce.js.map +1 -1
  879. package/dist/hooks/use-dismiss.d.ts +37 -11
  880. package/dist/hooks/use-dismiss.js +69 -10
  881. package/dist/hooks/use-dismiss.js.map +1 -1
  882. package/dist/hooks/use-file-drop.d.ts +8 -109
  883. package/dist/hooks/use-file-drop.js +1 -1
  884. package/dist/hooks/use-file-drop.js.map +1 -1
  885. package/dist/hooks/use-file-picker-labels.d.ts +2 -0
  886. package/dist/hooks/use-file-picker-labels.js +25 -0
  887. package/dist/hooks/use-file-picker-labels.js.map +1 -0
  888. package/dist/hooks/use-file-picker.d.ts +164 -0
  889. package/dist/hooks/use-file-picker.js +149 -0
  890. package/dist/hooks/use-file-picker.js.map +1 -0
  891. package/dist/hooks/use-focus-trap.d.ts +10 -4
  892. package/dist/hooks/use-focus-trap.js +19 -12
  893. package/dist/hooks/use-focus-trap.js.map +1 -1
  894. package/dist/hooks/use-hotkey.d.ts +7 -9
  895. package/dist/hooks/use-large-text.d.ts +3 -5
  896. package/dist/hooks/use-media-query.d.ts +1 -3
  897. package/dist/hooks/use-noindex.d.ts +1 -3
  898. package/dist/hooks/use-overlay-history.d.ts +1 -3
  899. package/dist/hooks/use-row-swipe.d.ts +5 -8
  900. package/dist/hooks/use-search-param-state.d.ts +10 -11
  901. package/dist/hooks/use-windowed-rows.d.ts +4 -7
  902. package/dist/i18n/defaults.d.ts +11 -104
  903. package/dist/i18n/defaults.js +82 -82
  904. package/dist/i18n/defaults.js.map +1 -1
  905. package/dist/i18n/german.d.ts +2 -104
  906. package/dist/i18n/german.js +56 -9
  907. package/dist/i18n/german.js.map +1 -1
  908. package/dist/i18n/kit-labels.d.ts +609 -100
  909. package/dist/i18n/kit-labels.js +22 -97
  910. package/dist/i18n/kit-labels.js.map +1 -1
  911. package/dist/i18n/languages.d.ts +197 -100
  912. package/dist/i18n/locales/de-CH.d.ts +3 -105
  913. package/dist/i18n/locales/en.d.ts +4 -104
  914. package/dist/i18n/locales/en.js +1834 -4
  915. package/dist/i18n/locales/en.js.map +7 -1
  916. package/dist/i18n/locales/es.d.ts +3 -105
  917. package/dist/i18n/locales/es.js +54 -9
  918. package/dist/i18n/locales/es.js.map +1 -1
  919. package/dist/i18n/locales/fr.d.ts +3 -105
  920. package/dist/i18n/locales/fr.js +56 -9
  921. package/dist/i18n/locales/fr.js.map +1 -1
  922. package/dist/i18n/locales/hu.d.ts +3 -105
  923. package/dist/i18n/locales/hu.js +56 -10
  924. package/dist/i18n/locales/hu.js.map +1 -1
  925. package/dist/i18n/locales/it.d.ts +3 -105
  926. package/dist/i18n/locales/it.js +55 -9
  927. package/dist/i18n/locales/it.js.map +1 -1
  928. package/dist/i18n/locales/zh.d.ts +3 -105
  929. package/dist/i18n/locales/zh.js +52 -8
  930. package/dist/i18n/locales/zh.js.map +1 -1
  931. package/dist/i18n/plurals.d.ts +20 -3
  932. package/dist/i18n/plurals.js +11 -0
  933. package/dist/i18n/plurals.js.map +1 -1
  934. package/dist/i18n/review.d.ts +5 -106
  935. package/dist/i18n/review.js +4 -0
  936. package/dist/i18n/review.js.map +1 -1
  937. package/dist/i18n/shared-labels.d.ts +17 -0
  938. package/dist/i18n/shared-labels.js +111 -0
  939. package/dist/i18n/shared-labels.js.map +1 -0
  940. package/dist/i18n/swiss.d.ts +1 -3
  941. package/dist/index.d.ts +329 -249
  942. package/dist/index.js +188 -215
  943. package/dist/index.js.map +1 -1
  944. package/dist/landing/access.d.ts +7 -9
  945. package/dist/landing/access.js.map +1 -1
  946. package/dist/landing/landing-actions.d.ts +9 -108
  947. package/dist/landing/landing-actions.js +1 -1
  948. package/dist/landing/landing-actions.js.map +1 -1
  949. package/dist/landing/landing-labels.d.ts +4 -5
  950. package/dist/landing/landing-labels.js.map +1 -1
  951. package/dist/landing/landing-sections.d.ts +21 -120
  952. package/dist/landing/landing-sections.js +15 -15
  953. package/dist/landing/landing-sections.js.map +1 -1
  954. package/dist/landing/page-seo.d.ts +7 -9
  955. package/dist/landing/public-header.d.ts +10 -110
  956. package/dist/landing/public-header.js +1 -1
  957. package/dist/landing/public-header.js.map +1 -1
  958. package/dist/landing/routing.d.ts +16 -119
  959. package/dist/landing/routing.js +2 -6
  960. package/dist/landing/routing.js.map +1 -1
  961. package/dist/lib/calc.d.ts +7 -9
  962. package/dist/lib/chip-edge-snap.d.ts +10 -0
  963. package/dist/lib/chip-edge-snap.js +131 -0
  964. package/dist/lib/chip-edge-snap.js.map +1 -0
  965. package/dist/lib/clipping.d.ts +2 -4
  966. package/dist/lib/cn.d.ts +2 -5
  967. package/dist/lib/cn.js +6 -1
  968. package/dist/lib/cn.js.map +1 -1
  969. package/dist/lib/column-mapping.d.ts +10 -13
  970. package/dist/lib/countries.d.ts +3 -5
  971. package/dist/lib/dates.d.ts +25 -25
  972. package/dist/lib/dates.js.map +1 -1
  973. package/dist/lib/decimal-marks.d.ts +8 -8
  974. package/dist/lib/decimal-marks.js +1 -1
  975. package/dist/lib/decimal-marks.js.map +1 -1
  976. package/dist/lib/direction.d.ts +4 -6
  977. package/dist/lib/document-navigation.d.ts +1 -3
  978. package/dist/lib/download.d.ts +67 -0
  979. package/dist/lib/download.js +89 -0
  980. package/dist/lib/download.js.map +1 -0
  981. package/dist/lib/floating-stack.d.ts +8 -6
  982. package/dist/lib/floating-stack.js.map +1 -1
  983. package/dist/lib/format.d.ts +24 -23
  984. package/dist/lib/format.js +3 -3
  985. package/dist/lib/format.js.map +1 -1
  986. package/dist/lib/iban.d.ts +9 -11
  987. package/dist/lib/ime.d.ts +17 -0
  988. package/dist/lib/ime.js +13 -0
  989. package/dist/lib/ime.js.map +1 -0
  990. package/dist/lib/isin.d.ts +3 -5
  991. package/dist/lib/logger.d.ts +4 -6
  992. package/dist/lib/person-name.d.ts +3 -5
  993. package/dist/lib/phone.d.ts +9 -11
  994. package/dist/lib/presence.d.ts +15 -0
  995. package/dist/lib/presence.js +8 -0
  996. package/dist/lib/presence.js.map +1 -0
  997. package/dist/lib/qr-encode.d.ts +4 -6
  998. package/dist/lib/reduced-motion.d.ts +18 -0
  999. package/dist/lib/reduced-motion.js +9 -0
  1000. package/dist/lib/reduced-motion.js.map +1 -0
  1001. package/dist/lib/round.d.ts +22 -0
  1002. package/dist/lib/round.js +15 -0
  1003. package/dist/lib/round.js.map +1 -0
  1004. package/dist/lib/safe-storage.d.ts +14 -4
  1005. package/dist/lib/safe-storage.js +24 -9
  1006. package/dist/lib/safe-storage.js.map +1 -1
  1007. package/dist/lib/server-wake.d.ts +13 -14
  1008. package/dist/lib/session-refresh.d.ts +200 -0
  1009. package/dist/lib/session-refresh.js +187 -0
  1010. package/dist/lib/session-refresh.js.map +1 -0
  1011. package/dist/lib/strip-fade.d.ts +10 -13
  1012. package/dist/lib/table-text.d.ts +14 -16
  1013. package/dist/lib/text-match.d.ts +41 -0
  1014. package/dist/lib/text-match.js +23 -0
  1015. package/dist/lib/text-match.js.map +1 -0
  1016. package/dist/lib/translation-review.d.ts +44 -45
  1017. package/dist/lib/translation-review.js +3 -2
  1018. package/dist/lib/translation-review.js.map +1 -1
  1019. package/dist/rhf/fields.d.ts +123 -188
  1020. package/dist/rhf/fields.js +46 -54
  1021. package/dist/rhf/fields.js.map +1 -1
  1022. package/dist/rhf/form-core.d.ts +153 -0
  1023. package/dist/rhf/form-core.js +143 -0
  1024. package/dist/rhf/form-core.js.map +1 -0
  1025. package/dist/rhf/form.d.ts +38 -174
  1026. package/dist/rhf/form.js +9 -131
  1027. package/dist/rhf/form.js.map +1 -1
  1028. package/dist/rhf/line-items.d.ts +40 -11
  1029. package/dist/rhf/line-items.js.map +1 -1
  1030. package/dist/rhf/use-rhf-wizard-step.d.ts +3 -6
  1031. package/dist/rhf.d.ts +4 -117
  1032. package/dist/rhf.js.map +1 -1
  1033. package/dist/search/command-palette-labels.d.ts +2 -0
  1034. package/dist/search/command-palette-labels.js +15 -0
  1035. package/dist/search/command-palette-labels.js.map +1 -0
  1036. package/dist/search/command-palette.d.ts +10 -13
  1037. package/dist/search/command-palette.js +25 -44
  1038. package/dist/search/command-palette.js.map +1 -1
  1039. package/dist/search/global-search-labels.d.ts +2 -0
  1040. package/dist/search/global-search-labels.js +12 -0
  1041. package/dist/search/global-search-labels.js.map +1 -0
  1042. package/dist/search/global-search.d.ts +17 -16
  1043. package/dist/search/global-search.js +12 -12
  1044. package/dist/search/global-search.js.map +1 -1
  1045. package/dist/search/search-index.d.ts +13 -14
  1046. package/dist/search/search-index.js +2 -1
  1047. package/dist/search/search-index.js.map +1 -1
  1048. package/dist/search/use-command-key.d.ts +9 -0
  1049. package/dist/search/use-command-key.js +18 -0
  1050. package/dist/search/use-command-key.js.map +1 -0
  1051. package/dist/search.d.ts +3 -4
  1052. package/dist/settings/settings-card-classes.d.ts +11 -0
  1053. package/dist/settings/settings-card-classes.js +8 -0
  1054. package/dist/settings/settings-card-classes.js.map +1 -0
  1055. package/dist/settings/settings-catalogue.d.ts +11 -14
  1056. package/dist/settings/settings-context.d.ts +4 -8
  1057. package/dist/settings/settings-heading.d.ts +8 -12
  1058. package/dist/settings/settings-heading.js +1 -1
  1059. package/dist/settings/settings-heading.js.map +1 -1
  1060. package/dist/settings/settings-labels.d.ts +6 -7
  1061. package/dist/settings/settings-labels.js.map +1 -1
  1062. package/dist/settings/settings-layout.d.ts +36 -13
  1063. package/dist/settings/settings-layout.js +25 -4
  1064. package/dist/settings/settings-layout.js.map +1 -1
  1065. package/dist/settings/settings-section.d.ts +4 -106
  1066. package/dist/settings/settings-section.js +2 -2
  1067. package/dist/settings/settings-section.js.map +1 -1
  1068. package/dist/settings/use-account-appearance.d.ts +11 -16
  1069. package/dist/settings/use-account-language.d.ts +8 -10
  1070. package/dist/settings/use-settings-focus.d.ts +3 -5
  1071. package/dist/settings/use-settings-focus.js +2 -4
  1072. package/dist/settings/use-settings-focus.js.map +1 -1
  1073. package/dist/settings/use-settings-route.d.ts +11 -16
  1074. package/dist/shell/app-shell-labels.d.ts +2 -0
  1075. package/dist/shell/app-shell-labels.js +9 -0
  1076. package/dist/shell/app-shell-labels.js.map +1 -0
  1077. package/dist/shell/app-shell.d.ts +216 -100
  1078. package/dist/shell/app-shell.js +51 -35
  1079. package/dist/shell/app-shell.js.map +1 -1
  1080. package/dist/shell/auth-layout.d.ts +6 -9
  1081. package/dist/shell/auth-layout.js +6 -6
  1082. package/dist/shell/auth-layout.js.map +1 -1
  1083. package/dist/shell/company-switcher-labels.d.ts +2 -0
  1084. package/dist/shell/company-switcher-labels.js +12 -0
  1085. package/dist/shell/company-switcher-labels.js.map +1 -0
  1086. package/dist/shell/company-switcher.d.ts +9 -11
  1087. package/dist/shell/company-switcher.js +3 -9
  1088. package/dist/shell/company-switcher.js.map +1 -1
  1089. package/dist/shell/option-switcher-menu.d.ts +19 -9
  1090. package/dist/shell/option-switcher-menu.js +6 -4
  1091. package/dist/shell/option-switcher-menu.js.map +1 -1
  1092. package/dist/shell/role-switcher.d.ts +5 -6
  1093. package/dist/shell/role-switcher.js +4 -3
  1094. package/dist/shell/role-switcher.js.map +1 -1
  1095. package/dist/shell/top-bar-brand.d.ts +4 -106
  1096. package/dist/shell/top-bar-brand.js +1 -1
  1097. package/dist/shell/top-bar-brand.js.map +1 -1
  1098. package/dist/shell/top-bar.d.ts +6 -9
  1099. package/dist/shell/top-bar.js +1 -1
  1100. package/dist/shell/top-bar.js.map +1 -1
  1101. package/dist/shell/topbar-action-menu.d.ts +30 -31
  1102. package/dist/shell/topbar-action-menu.js +12 -10
  1103. package/dist/shell/topbar-action-menu.js.map +1 -1
  1104. package/dist/shell/topbar-controls.d.ts +20 -18
  1105. package/dist/shell/topbar-controls.js +14 -11
  1106. package/dist/shell/topbar-controls.js.map +1 -1
  1107. package/dist/shell.d.ts +25 -115
  1108. package/dist/shell.js.map +1 -1
  1109. package/dist/table-text.d.ts +1 -1
  1110. package/dist/testing/css-variables.d.ts +4 -6
  1111. package/dist/testing/css-variables.generated.d.ts +2 -4
  1112. package/dist/testing/index.d.ts +2 -1
  1113. package/dist/testing/index.js +9 -1
  1114. package/dist/testing/index.js.map +1 -1
  1115. package/dist/testing/viewport.d.ts +93 -0
  1116. package/dist/testing/viewport.js +152 -0
  1117. package/dist/testing/viewport.js.map +1 -0
  1118. package/dist/theme/chart-palette.d.ts +7 -9
  1119. package/dist/theme/color.d.ts +14 -16
  1120. package/dist/theme/color.js +2 -1
  1121. package/dist/theme/color.js.map +1 -1
  1122. package/dist/theme/contrast-tokens.d.ts +13 -17
  1123. package/dist/theme/contrast.d.ts +22 -27
  1124. package/dist/theme/palette-derive.d.ts +16 -22
  1125. package/dist/theme/palette-derive.js +15 -7
  1126. package/dist/theme/palette-derive.js.map +1 -1
  1127. package/dist/theme/palette-presets.d.ts +25 -15
  1128. package/dist/theme/palette-presets.js +66 -66
  1129. package/dist/theme/palette-presets.js.map +1 -1
  1130. package/dist/theme/palette-store.d.ts +10 -13
  1131. package/dist/theme/text-size.d.ts +21 -26
  1132. package/dist/theme/theme-store.d.ts +9 -14
  1133. package/dist/tour/tour-labels.d.ts +2 -0
  1134. package/dist/tour/tour-labels.js +13 -0
  1135. package/dist/tour/tour-labels.js.map +1 -0
  1136. package/dist/tour/tour.d.ts +12 -14
  1137. package/dist/tour/tour.js +9 -20
  1138. package/dist/tour/tour.js.map +1 -1
  1139. package/dist/tour.d.ts +1 -2
  1140. package/dist/wizard/stepper-nav.d.ts +8 -107
  1141. package/dist/wizard/stepper-nav.js +15 -14
  1142. package/dist/wizard/stepper-nav.js.map +1 -1
  1143. package/dist/wizard/types.d.ts +18 -18
  1144. package/dist/wizard/types.js +1 -19
  1145. package/dist/wizard/types.js.map +1 -1
  1146. package/dist/wizard/use-wizard.d.ts +2 -6
  1147. package/dist/wizard/validation.d.ts +3 -7
  1148. package/dist/wizard/wizard-context.d.ts +7 -11
  1149. package/dist/wizard/wizard-labels.d.ts +4 -0
  1150. package/dist/wizard/wizard-labels.js +24 -0
  1151. package/dist/wizard/wizard-labels.js.map +1 -0
  1152. package/dist/wizard/wizard-step.d.ts +3 -7
  1153. package/dist/wizard/wizard-step.js +2 -2
  1154. package/dist/wizard/wizard-step.js.map +1 -1
  1155. package/dist/wizard/wizard-summary.d.ts +5 -8
  1156. package/dist/wizard/wizard-summary.js +6 -5
  1157. package/dist/wizard/wizard-summary.js.map +1 -1
  1158. package/dist/wizard.d.ts +7 -106
  1159. package/package.json +9 -6
  1160. package/src/account/account-parts.ts +3 -3
  1161. package/src/{components → account}/account-settings-labels.ts +11 -1
  1162. package/src/{components → account}/account-settings.tsx +145 -34
  1163. package/src/account/data-export-setting-labels.ts +20 -0
  1164. package/src/account/data-export-setting.tsx +19 -38
  1165. package/src/account/delete-account-setting-labels.ts +33 -0
  1166. package/src/account/delete-account-setting.tsx +13 -35
  1167. package/src/account/email-change-setting-labels.ts +32 -0
  1168. package/src/account/email-change-setting.tsx +17 -36
  1169. package/src/{components → account}/passkeys-setting.tsx +14 -9
  1170. package/src/account/sessions-setting-labels.ts +24 -0
  1171. package/src/account/sessions-setting.tsx +14 -28
  1172. package/src/admin/admin-action-confirm-labels.ts +19 -0
  1173. package/src/admin/admin-action-confirm.tsx +59 -38
  1174. package/src/admin/admin-action-log-labels.ts +74 -0
  1175. package/src/admin/admin-action-log.tsx +180 -54
  1176. package/src/admin/admin-parts.ts +0 -7
  1177. package/src/admin/invitations-panel-labels.ts +31 -0
  1178. package/src/admin/invitations-panel.tsx +16 -34
  1179. package/src/admin/plan-change-labels.ts +23 -0
  1180. package/src/admin/plan-change.tsx +89 -37
  1181. package/src/admin/reviewer-scope-editor-labels.ts +16 -0
  1182. package/src/admin/reviewer-scope-editor.tsx +9 -15
  1183. package/src/admin/role-select-labels.ts +16 -0
  1184. package/src/admin/role-select.tsx +13 -23
  1185. package/src/admin/transfer-ownership-dialog-labels.ts +20 -0
  1186. package/src/admin/transfer-ownership-dialog.tsx +7 -17
  1187. package/src/admin/user-roster-labels.ts +17 -0
  1188. package/src/admin/user-roster.tsx +9 -17
  1189. package/src/auth/accept-invitation-labels.ts +21 -0
  1190. package/src/auth/accept-invitation.tsx +9 -20
  1191. package/src/auth/auth-errors.ts +29 -13
  1192. package/src/auth/complete-name-dialog-labels.ts +16 -0
  1193. package/src/auth/complete-name-dialog.tsx +8 -13
  1194. package/src/auth/forgot-password-form-labels.ts +20 -0
  1195. package/src/auth/forgot-password-form.tsx +12 -20
  1196. package/src/auth/new-password-fields.tsx +1 -1
  1197. package/src/auth/not-found-page-labels.ts +12 -0
  1198. package/src/auth/not-found-page.tsx +11 -14
  1199. package/src/auth/register-form-labels.ts +31 -0
  1200. package/src/auth/register-form.tsx +18 -38
  1201. package/src/auth/reset-password-form-labels.ts +27 -0
  1202. package/src/auth/reset-password-form.tsx +12 -27
  1203. package/src/auth/sign-in-form-labels.ts +44 -0
  1204. package/src/auth/sign-in-form.tsx +18 -51
  1205. package/src/auth/status-parts.tsx +3 -3
  1206. package/src/auth/verify-email-labels.ts +26 -0
  1207. package/src/auth/verify-email.tsx +15 -30
  1208. package/src/billing/billing-banner.tsx +2 -1
  1209. package/src/billing/billing-labels.ts +1 -1
  1210. package/src/billing/checkout-processing.ts +2 -12
  1211. package/src/billing/pay-page.ts +9 -5
  1212. package/src/billing/plan-card.tsx +26 -27
  1213. package/src/billing/plan-limit-notice.tsx +1 -1
  1214. package/src/billing/subscription-actions.tsx +4 -4
  1215. package/src/chart.ts +7 -1
  1216. package/src/components/account-chips-labels.ts +16 -0
  1217. package/src/components/account-chips.tsx +13 -16
  1218. package/src/components/alert-banner.tsx +39 -19
  1219. package/src/components/amount-input.tsx +461 -405
  1220. package/src/components/appearance-labels.ts +2 -2
  1221. package/src/components/authed-image-labels.ts +11 -0
  1222. package/src/components/authed-image.tsx +6 -8
  1223. package/src/components/autocomplete.tsx +84 -80
  1224. package/src/components/breadcrumbs-labels.ts +10 -0
  1225. package/src/components/breadcrumbs.tsx +17 -14
  1226. package/src/components/bulk-action-bar-labels.ts +11 -0
  1227. package/src/components/bulk-action-bar.tsx +15 -16
  1228. package/src/components/button-group.tsx +7 -7
  1229. package/src/components/button-look.ts +230 -0
  1230. package/src/components/button.tsx +339 -0
  1231. package/src/components/calculator.tsx +18 -11
  1232. package/src/components/calendar-heatmap-labels.ts +15 -0
  1233. package/src/components/calendar-heatmap.tsx +13 -19
  1234. package/src/components/card.tsx +381 -0
  1235. package/src/components/chart-zoom-core.tsx +653 -0
  1236. package/src/components/chart-zoom.tsx +64 -648
  1237. package/src/components/chart.tsx +11 -11
  1238. package/src/components/checkbox-group.tsx +13 -10
  1239. package/src/components/checkbox.tsx +43 -42
  1240. package/src/components/chip-input.tsx +377 -0
  1241. package/src/components/chip-labels.ts +13 -0
  1242. package/src/components/chip.tsx +115 -711
  1243. package/src/components/choice-card.tsx +83 -85
  1244. package/src/components/column-mapper-labels.ts +45 -0
  1245. package/src/components/column-mapper.tsx +16 -51
  1246. package/src/components/combobox-core.tsx +351 -196
  1247. package/src/components/combobox-suggestions.tsx +129 -0
  1248. package/src/components/combobox.tsx +69 -893
  1249. package/src/components/confirm-dialog-labels.ts +13 -0
  1250. package/src/components/confirm-dialog.tsx +4 -8
  1251. package/src/components/copy-button-labels.ts +13 -0
  1252. package/src/components/copy-button.tsx +10 -12
  1253. package/src/components/country-select-labels.ts +11 -0
  1254. package/src/components/country-select.tsx +74 -89
  1255. package/src/components/currency-option-list.tsx +216 -0
  1256. package/src/components/currency-select.tsx +85 -196
  1257. package/src/components/danger-confirm-labels.ts +20 -0
  1258. package/src/components/danger-confirm.tsx +69 -77
  1259. package/src/components/data-table-cells.tsx +5 -5
  1260. package/src/components/data-table-column-settings.tsx +137 -0
  1261. package/src/components/data-table-filter-popover.tsx +49 -24
  1262. package/src/components/data-table-filters.ts +48 -11
  1263. package/src/components/data-table-head.tsx +258 -0
  1264. package/src/components/data-table-labels.ts +43 -11
  1265. package/src/components/data-table-mobile.tsx +594 -0
  1266. package/src/components/data-table-pagination.tsx +11 -10
  1267. package/src/components/data-table-resize.ts +187 -0
  1268. package/src/components/data-table-row-actions.tsx +152 -0
  1269. package/src/components/data-table-selection.ts +55 -0
  1270. package/src/components/data-table-shared.tsx +172 -0
  1271. package/src/components/data-table.tsx +178 -1300
  1272. package/src/components/date-field.tsx +627 -0
  1273. package/src/components/date-picker.tsx +58 -1446
  1274. package/src/components/date-range-picker.tsx +490 -0
  1275. package/src/components/description-list-labels.ts +9 -0
  1276. package/src/components/description-list.tsx +31 -15
  1277. package/src/components/dialog-frame-labels.ts +7 -0
  1278. package/src/components/dialog-frame.tsx +8 -6
  1279. package/src/components/disclosure.tsx +14 -14
  1280. package/src/components/dropdown.tsx +114 -42
  1281. package/src/components/empty-state.tsx +137 -0
  1282. package/src/components/entity-combobox.tsx +17 -12
  1283. package/src/components/error-boundary-labels.ts +20 -0
  1284. package/src/components/error-boundary.tsx +10 -20
  1285. package/src/components/facing-pair.ts +1 -1
  1286. package/src/components/field-base.tsx +615 -0
  1287. package/src/components/field-parts.tsx +206 -77
  1288. package/src/components/field-strip.tsx +16 -21
  1289. package/src/components/field-sync-labels.ts +13 -0
  1290. package/src/components/field-sync.tsx +11 -12
  1291. package/src/components/field.tsx +13 -11
  1292. package/src/components/file-button.tsx +64 -412
  1293. package/src/components/file-dropzone.tsx +36 -33
  1294. package/src/components/floating-panel-labels.ts +10 -0
  1295. package/src/components/floating-panel.tsx +32 -21
  1296. package/src/components/focus-ring.ts +9 -4
  1297. package/src/components/form-actions-labels.ts +11 -0
  1298. package/src/components/form-actions.tsx +17 -21
  1299. package/src/components/full-bleed-dialog.tsx +33 -25
  1300. package/src/components/grouped-picker.tsx +118 -96
  1301. package/src/components/help-popover.tsx +115 -0
  1302. package/src/components/hover-menu.tsx +46 -35
  1303. package/src/components/iban-input-labels.ts +15 -0
  1304. package/src/components/iban-input.tsx +25 -20
  1305. package/src/components/icon-button.tsx +945 -0
  1306. package/src/components/icon-picker-labels.ts +13 -0
  1307. package/src/components/icon-picker.tsx +27 -24
  1308. package/src/components/image-grid-labels.ts +11 -0
  1309. package/src/components/image-grid.tsx +13 -15
  1310. package/src/components/inline-edit-field-labels.ts +11 -0
  1311. package/src/components/inline-edit-field.tsx +20 -19
  1312. package/src/components/inline-entity-combobox.tsx +789 -0
  1313. package/src/components/input.tsx +380 -0
  1314. package/src/components/jump-calendar.tsx +385 -0
  1315. package/src/components/language-select.tsx +31 -16
  1316. package/src/components/legal-labels.ts +99 -0
  1317. package/src/components/legal-page.tsx +2 -2
  1318. package/src/components/legal.tsx +11 -101
  1319. package/src/components/lightbox-labels.ts +18 -0
  1320. package/src/components/lightbox.tsx +13 -21
  1321. package/src/components/line-items-labels.ts +14 -0
  1322. package/src/components/line-items.tsx +24 -31
  1323. package/src/components/list-labels.ts +10 -0
  1324. package/src/components/list.tsx +98 -75
  1325. package/src/components/loading-state.tsx +4 -4
  1326. package/src/components/measured-grid-labels.ts +25 -0
  1327. package/src/components/measured-grid.tsx +39 -62
  1328. package/src/components/menu-item.tsx +29 -26
  1329. package/src/components/mini-calendar-labels.ts +17 -0
  1330. package/src/components/mini-calendar.tsx +38 -45
  1331. package/src/components/modal.tsx +36 -18
  1332. package/src/components/money-draft.ts +72 -0
  1333. package/src/components/money-field.tsx +16 -30
  1334. package/src/components/month-picker-labels.ts +22 -0
  1335. package/src/components/month-picker.tsx +59 -45
  1336. package/src/components/multi-entity-combobox.tsx +17 -12
  1337. package/src/components/multi-select.tsx +313 -288
  1338. package/src/components/nav-pills.tsx +19 -8
  1339. package/src/components/number-field.tsx +14 -5
  1340. package/src/components/number-input.tsx +125 -90
  1341. package/src/components/numeric-field.ts +161 -0
  1342. package/src/components/numpad-sheet.tsx +16 -16
  1343. package/src/components/one-time-code-input.tsx +154 -169
  1344. package/src/components/page-contents-labels.ts +9 -0
  1345. package/src/components/page-contents.tsx +15 -15
  1346. package/src/components/page-header.tsx +9 -5
  1347. package/src/components/password-strength-labels.ts +23 -0
  1348. package/src/components/password-strength.tsx +13 -27
  1349. package/src/components/phone-input-labels.ts +10 -0
  1350. package/src/components/phone-input.tsx +42 -57
  1351. package/src/components/picker-sheet.tsx +47 -18
  1352. package/src/components/pie-chart.tsx +11 -9
  1353. package/src/components/popover-labels.ts +14 -0
  1354. package/src/components/popover.tsx +40 -39
  1355. package/src/components/progress-bar-labels.ts +10 -0
  1356. package/src/components/progress-bar.tsx +32 -23
  1357. package/src/components/qr-code.tsx +2 -2
  1358. package/src/components/reauth-dialog-labels.ts +13 -0
  1359. package/src/components/reauth-dialog.tsx +7 -10
  1360. package/src/components/row-actions-labels.ts +10 -0
  1361. package/src/components/row-actions.tsx +11 -10
  1362. package/src/components/scroll-area.tsx +4 -10
  1363. package/src/components/search-field.tsx +35 -49
  1364. package/src/components/select.tsx +302 -0
  1365. package/src/components/separator.tsx +2 -2
  1366. package/src/components/series-chart-axes.ts +329 -0
  1367. package/src/components/series-chart-thin.ts +180 -0
  1368. package/src/components/series-chart.tsx +124 -325
  1369. package/src/components/server-wake-labels.ts +11 -0
  1370. package/src/components/server-wake.tsx +42 -63
  1371. package/src/components/settings-fields.tsx +46 -17
  1372. package/src/components/share-card-labels.ts +30 -0
  1373. package/src/components/share-card.tsx +22 -37
  1374. package/src/components/sign-chip-labels.ts +12 -0
  1375. package/src/components/sign-chip.tsx +6 -9
  1376. package/src/components/signature-pad-labels.ts +24 -0
  1377. package/src/components/signature-pad.tsx +48 -57
  1378. package/src/components/signed-amount-labels.ts +10 -0
  1379. package/src/components/signed-amount.tsx +21 -22
  1380. package/src/components/skeleton.tsx +11 -3
  1381. package/src/components/slider.tsx +51 -39
  1382. package/src/components/sparkline-labels.ts +14 -0
  1383. package/src/components/sparkline.tsx +16 -21
  1384. package/src/components/spinner.tsx +81 -0
  1385. package/src/components/stat-tile-labels.ts +15 -0
  1386. package/src/components/stat-tile.tsx +32 -37
  1387. package/src/components/status-dot.tsx +17 -14
  1388. package/src/components/swatch-picker-labels.ts +10 -0
  1389. package/src/components/swatch-picker.tsx +23 -16
  1390. package/src/components/swipeable-row.tsx +7 -7
  1391. package/src/components/switch.tsx +33 -32
  1392. package/src/components/table.tsx +15 -15
  1393. package/src/components/tabs.tsx +660 -0
  1394. package/src/components/text-link.tsx +7 -7
  1395. package/src/components/text.tsx +10 -6
  1396. package/src/components/textarea.tsx +323 -0
  1397. package/src/components/tile-radio.tsx +6 -6
  1398. package/src/components/time-input.tsx +15 -7
  1399. package/src/components/toast-labels.ts +12 -0
  1400. package/src/components/toast.tsx +5 -8
  1401. package/src/components/toggle-group.tsx +105 -42
  1402. package/src/components/toggle-legend.tsx +6 -6
  1403. package/src/components/tooltip.tsx +10 -21
  1404. package/src/components/translation-review-editor.tsx +8 -7
  1405. package/src/components/translation-review-parts.tsx +9 -13
  1406. package/src/components/translation-review.tsx +26 -14
  1407. package/src/components/tree-view.tsx +14 -12
  1408. package/src/components/ui-labels.ts +22 -0
  1409. package/src/components/user-avatar.tsx +3 -3
  1410. package/src/components/wizard-stepper.tsx +10 -5
  1411. package/src/components/write-lock-labels.ts +9 -0
  1412. package/src/components/write-lock.tsx +10 -12
  1413. package/src/data-table.ts +4 -0
  1414. package/src/demo/demo-banner.tsx +9 -25
  1415. package/src/demo/demo-ended.tsx +8 -7
  1416. package/src/demo/demo-labels.ts +2 -2
  1417. package/src/demo/demo-start.tsx +7 -5
  1418. package/src/feedback/feedback-attachment-labels.ts +36 -0
  1419. package/src/feedback/feedback-attachment.tsx +42 -66
  1420. package/src/feedback/feedback-context-labels.ts +10 -0
  1421. package/src/feedback/feedback-context.tsx +8 -9
  1422. package/src/feedback/feedback-dialog-labels.ts +28 -0
  1423. package/src/feedback/feedback-dialog.tsx +14 -44
  1424. package/src/feedback/feedback-inbox.tsx +49 -252
  1425. package/src/feedback/feedback-labels.ts +5 -5
  1426. package/src/feedback/feedback-menu-labels.ts +11 -0
  1427. package/src/feedback/feedback-menu.tsx +13 -11
  1428. package/src/feedback/feedback-record.ts +21 -7
  1429. package/src/feedback/feedback-row-detail-labels.ts +33 -0
  1430. package/src/feedback/feedback-row-detail.tsx +30 -43
  1431. package/src/feedback/feedback-status-undo.ts +3 -2
  1432. package/src/feedback/feedback-submit-dialog.tsx +109 -0
  1433. package/src/feedback/feedback-submit.tsx +45 -55
  1434. package/src/feedback/feedback-swipe.tsx +1 -1
  1435. package/src/feedback/feedback-table-labels.ts +27 -0
  1436. package/src/feedback/feedback-table.tsx +24 -40
  1437. package/src/feedback/feedback-thread-labels.ts +22 -0
  1438. package/src/feedback/feedback-thread.tsx +68 -48
  1439. package/src/feedback/feedback-vocabulary.ts +252 -0
  1440. package/src/hooks/use-anchored-panel.ts +155 -9
  1441. package/src/hooks/use-anchored-rect.ts +11 -9
  1442. package/src/hooks/use-authed-src.ts +13 -7
  1443. package/src/hooks/use-breakpoint.ts +5 -4
  1444. package/src/hooks/use-close-transition.ts +9 -10
  1445. package/src/hooks/use-debounce.ts +9 -0
  1446. package/src/hooks/use-dismiss.ts +176 -19
  1447. package/src/hooks/use-file-drop.ts +2 -2
  1448. package/src/hooks/use-file-picker-labels.ts +29 -0
  1449. package/src/hooks/use-file-picker.tsx +363 -0
  1450. package/src/hooks/use-focus-trap.ts +74 -18
  1451. package/src/i18n/defaults.ts +91 -82
  1452. package/src/i18n/german.ts +54 -7
  1453. package/src/i18n/kit-labels.tsx +70 -119
  1454. package/src/i18n/locales/en.ts +46 -0
  1455. package/src/i18n/locales/es.ts +52 -7
  1456. package/src/i18n/locales/fr.ts +55 -8
  1457. package/src/i18n/locales/hu.ts +54 -8
  1458. package/src/i18n/locales/it.ts +53 -7
  1459. package/src/i18n/locales/zh.ts +50 -6
  1460. package/src/i18n/plurals.ts +29 -0
  1461. package/src/i18n/review.ts +4 -0
  1462. package/src/i18n/shared-labels.ts +135 -0
  1463. package/src/index.ts +412 -402
  1464. package/src/landing/access.ts +2 -1
  1465. package/src/landing/landing-actions.tsx +6 -5
  1466. package/src/landing/landing-labels.ts +2 -2
  1467. package/src/landing/landing-sections.tsx +24 -23
  1468. package/src/landing/public-header.tsx +3 -2
  1469. package/src/landing/routing.tsx +2 -7
  1470. package/src/lib/chip-edge-snap.ts +212 -0
  1471. package/src/lib/cn.ts +13 -1
  1472. package/src/lib/dates.ts +4 -2
  1473. package/src/lib/decimal-marks.ts +4 -2
  1474. package/src/lib/download.ts +172 -0
  1475. package/src/lib/floating-stack.ts +5 -1
  1476. package/src/lib/format.ts +5 -3
  1477. package/src/lib/ime.ts +24 -0
  1478. package/src/lib/presence.ts +18 -0
  1479. package/src/lib/reduced-motion.ts +21 -0
  1480. package/src/lib/round.ts +38 -0
  1481. package/src/lib/safe-storage.ts +35 -11
  1482. package/src/lib/session-refresh.ts +473 -0
  1483. package/src/lib/text-match.ts +60 -0
  1484. package/src/lib/translation-review.ts +7 -6
  1485. package/src/rhf/fields.tsx +131 -179
  1486. package/src/rhf/form-core.tsx +327 -0
  1487. package/src/rhf/form.tsx +46 -321
  1488. package/src/rhf/line-items.tsx +1 -1
  1489. package/src/rhf.ts +3 -2
  1490. package/src/search/command-palette-labels.ts +16 -0
  1491. package/src/search/command-palette.tsx +37 -50
  1492. package/src/search/global-search-labels.ts +13 -0
  1493. package/src/search/global-search.tsx +50 -24
  1494. package/src/search/search-index.ts +5 -6
  1495. package/src/search/use-command-key.ts +22 -0
  1496. package/src/settings/settings-card-classes.ts +11 -0
  1497. package/src/settings/settings-heading.tsx +1 -1
  1498. package/src/settings/settings-labels.ts +2 -2
  1499. package/src/settings/settings-layout.tsx +65 -6
  1500. package/src/settings/settings-section.tsx +5 -5
  1501. package/src/settings/use-settings-focus.ts +2 -5
  1502. package/src/shell/app-shell-labels.ts +10 -0
  1503. package/src/shell/app-shell.tsx +79 -53
  1504. package/src/shell/auth-layout.tsx +11 -10
  1505. package/src/shell/company-switcher-labels.ts +13 -0
  1506. package/src/shell/company-switcher.tsx +7 -11
  1507. package/src/shell/option-switcher-menu.tsx +25 -6
  1508. package/src/shell/role-switcher.tsx +7 -3
  1509. package/src/shell/top-bar-brand.tsx +1 -1
  1510. package/src/shell/top-bar.tsx +6 -5
  1511. package/src/shell/topbar-action-menu.tsx +39 -20
  1512. package/src/shell/topbar-controls.tsx +24 -12
  1513. package/src/shell.ts +1 -1
  1514. package/src/testing/index.ts +11 -0
  1515. package/src/testing/viewport.ts +251 -0
  1516. package/src/theme/color.ts +7 -1
  1517. package/src/theme/palette-derive.ts +29 -7
  1518. package/src/theme/palette-presets.ts +81 -68
  1519. package/src/tour/tour-labels.ts +14 -0
  1520. package/src/tour/tour.tsx +13 -23
  1521. package/src/wizard/stepper-nav.tsx +19 -18
  1522. package/src/wizard/types.ts +7 -22
  1523. package/src/wizard/wizard-labels.ts +29 -0
  1524. package/src/wizard/wizard-step.tsx +2 -2
  1525. package/src/wizard/wizard-summary.tsx +8 -7
  1526. package/tokens.css +63 -14
  1527. package/dist/components/account-settings-labels.js.map +0 -1
  1528. package/dist/components/account-settings.js.map +0 -1
  1529. package/dist/components/choice-parts.d.ts +0 -24
  1530. package/dist/components/choice-parts.js +0 -18
  1531. package/dist/components/choice-parts.js.map +0 -1
  1532. package/dist/components/passkeys-setting.js.map +0 -1
  1533. package/dist/components/ui.d.ts +0 -100
  1534. package/dist/components/ui.js +0 -1955
  1535. package/dist/components/ui.js.map +0 -1
  1536. package/dist/data-table-labels-BJ5JE_X2.d.ts +0 -923
  1537. package/dist/delete-account-setting-DiPX4Vue.d.ts +0 -8130
  1538. package/src/components/choice-parts.ts +0 -33
  1539. package/src/components/ui.tsx +0 -4233
@@ -1,14 +1,12 @@
1
- import * as react from 'react';
2
- import { ComponentPropsWithoutRef, ReactNode, KeyboardEvent, MouseEvent } from 'react';
3
- import { DialogParam } from '../hooks/use-search-param-state.js';
4
-
1
+ import type { ComponentPropsWithoutRef, KeyboardEvent, MouseEvent as ReactMouseEvent, ReactNode } from "react";
2
+ import { type DialogParam } from "../hooks/use-search-param-state.js";
5
3
  /**
6
4
  * The panel's own ANIMATED dismissal, for chrome rendered inside it. `DialogFrame`'s X
7
5
  * and its `actions(close)` read this, so a Cancel or an X lowers the panel exactly the
8
6
  * way Escape does — calling `onClose` from inside unmounts with no exit, which is the
9
7
  * documented limit of {@link useCloseTransition}. `null` outside a `Modal`.
10
8
  */
11
- declare const ModalCloseContext: react.Context<(() => void) | null>;
9
+ export declare const ModalCloseContext: import("react").Context<(() => void) | null>;
12
10
  /**
13
11
  * Backdrop handlers that close only when a press starts AND ends on the
14
12
  * backdrop itself. A plain onClick fires on mouseup, so dragging a text
@@ -16,9 +14,9 @@ declare const ModalCloseContext: react.Context<(() => void) | null>;
16
14
  * dismiss the dialog (feedback #254) — and the reverse drag would too, since
17
15
  * click targets the common ancestor of the down/up elements.
18
16
  */
19
- declare function useBackdropClose(onClose: () => void): {
20
- onMouseDown: (e: MouseEvent<HTMLDivElement>) => void;
21
- onMouseUp: (e: MouseEvent<HTMLDivElement>) => void;
17
+ export declare function useBackdropClose(onClose: () => void): {
18
+ onMouseDown: (e: ReactMouseEvent<HTMLDivElement>) => void;
19
+ onMouseUp: (e: ReactMouseEvent<HTMLDivElement>) => void;
22
20
  };
23
21
  /**
24
22
  * `extends ComponentPropsWithoutRef<"div">` so anything a `<div>` takes reaches the
@@ -26,7 +24,7 @@ declare function useBackdropClose(onClose: () => void): {
26
24
  * where a `data-tour` anchor, a test id, an `aria-describedby` or an `aria-label` has
27
25
  * to land; before this, a closed prop list dropped all four silently (audit §api-design).
28
26
  */
29
- interface ModalProps extends Omit<ComponentPropsWithoutRef<"div">, "role"> {
27
+ export interface ModalProps extends Omit<ComponentPropsWithoutRef<"div">, "role"> {
30
28
  /** Invoked on backdrop click and on Escape. */
31
29
  onClose: () => void;
32
30
  /**
@@ -57,7 +55,8 @@ interface ModalProps extends Omit<ComponentPropsWithoutRef<"div">, "role"> {
57
55
  role?: "dialog" | "alertdialog";
58
56
  children: ReactNode;
59
57
  /**
60
- * Panel max-width: `md` (28rem), `lg` (32rem), `xl` (48rem).
58
+ * Panel max-width: `md` (28rem), `lg` (32rem), `xl` (48rem), `2xl` (the display less
59
+ * the backdrop's margin, capped at 110rem).
61
60
  *
62
61
  * `xl` exists because two callers had already written `className="max-w-3xl"` to
63
62
  * reach it — the payee backfill's preview table and the price-merge dialog, both
@@ -65,19 +64,30 @@ interface ModalProps extends Omit<ComponentPropsWithoutRef<"div">, "role"> {
65
64
  * patching a missing size IS the signal that the size is missing, and a
66
65
  * hand-written width in a `className` is a width nothing else can line up with.
67
66
  *
67
+ * `2xl` is the same signal one size up (round 0.34 C3, KS U1): a dialog whose
68
+ * content is a TABLE to be read. Kurvenschmiede's five part dialogs hold a measured
69
+ * table pasted from a spreadsheet and had patched themselves to
70
+ * `w-[min(110rem,94vw)] max-w-none`; Keksdose's report drilldown passed `size="lg"`
71
+ * and then `max-w-5xl`. The cap is the generous one of the two, because a table
72
+ * squeezed into a box in the middle of a wide screen is a table scrolled sideways
73
+ * (KS feedback #16); below the cap the panel is as wide as the backdrop lets it be.
74
+ * In rem, so it grows with the text size until the screen stops it.
75
+ *
68
76
  * The panel is `w-full` under every one of them, so the cap only bites once the
69
- * viewport is wider than it: on a phone all three are the same full-width bottom
77
+ * viewport is wider than it: on a phone all four are the same full-width bottom
70
78
  * sheet. Nothing here may introduce a `min-w-*`, which is what would break that.
71
79
  */
72
- size?: "md" | "lg" | "xl";
80
+ size?: "md" | "lg" | "xl" | "2xl";
73
81
  /** Extra classes for the panel (e.g. `space-y-3` for form content spacing). */
74
82
  className?: string;
75
83
  /** id of the heading element, wired to `aria-labelledby`. */
76
84
  labelledBy?: string;
77
85
  /**
78
- * Extra key handling on the panel (e.g. Ctrl/Cmd+Enter to submit). Runs first;
79
- * if it calls `preventDefault()` the built-in Escape/Tab handling is skipped
80
- * for that event.
86
+ * Extra key handling on the panel (e.g. Ctrl/Cmd+Enter to submit). Runs first; a
87
+ * `preventDefault()` on Escape HERE keeps the dialog open — the owner's claim (see
88
+ * `use-dismiss.ts`). One a field inside makes does not, since 0.34: the rule
89
+ * `FullBleedDialog` already had, so a search box keeping Chromium from clearing itself
90
+ * no longer holds the dialog open (Wave 2, DUP-1).
81
91
  */
82
92
  onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;
83
93
  /**
@@ -129,6 +139,4 @@ interface ModalProps extends Omit<ComponentPropsWithoutRef<"div">, "role"> {
129
139
  * into the panel on open and back to the trigger on close, a Tab focus trap, and
130
140
  * `role="dialog"`/`aria-modal`.
131
141
  */
132
- declare function Modal(props: ModalProps): react.JSX.Element;
133
-
134
- export { Modal, ModalCloseContext, type ModalProps, useBackdropClose };
142
+ export declare function Modal(props: ModalProps): import("react").JSX.Element;
@@ -7,7 +7,8 @@ import { useFocusTrap } from "../hooks/use-focus-trap.js";
7
7
  import { useBodyScrollLock } from "../hooks/use-body-scroll-lock.js";
8
8
  import { useOverlayHistory } from "../hooks/use-overlay-history.js";
9
9
  import { useDialogParam } from "../hooks/use-search-param-state.js";
10
- import { OVERLAY_EXIT_MS, prefersReducedMotion, useCloseTransition } from "../hooks/use-close-transition.js";
10
+ import { OVERLAY_EXIT_MS, skipsExitAnimation, useCloseTransition } from "../hooks/use-close-transition.js";
11
+ import { runOwnKeyDown, takeEscape, useDismissLayer } from "../hooks/use-dismiss.js";
11
12
  function useDragOffset(enabled) {
12
13
  const [offset, setOffset] = useState(null);
13
14
  const from = useRef(null);
@@ -104,7 +105,7 @@ function ModalPanel({
104
105
  if (open !== prevOpen) {
105
106
  setPrevOpen(open);
106
107
  setDismissed(false);
107
- setExiting(open === false && prevOpen === true && !dismissed && !prefersReducedMotion());
108
+ setExiting(open === false && prevOpen === true && !dismissed && !skipsExitAnimation());
108
109
  if (open) drag.reset();
109
110
  }
110
111
  useEffect(() => {
@@ -122,14 +123,10 @@ function ModalPanel({
122
123
  useBodyScrollLock(active);
123
124
  useFocusTrap(panelRef, { active, initialFocus: "container" });
124
125
  const leaving = closing || exiting;
126
+ useDismissLayer(active, requestClose);
125
127
  const handleKeyDown = (e) => {
126
- onKeyDown?.(e);
127
- if (e.defaultPrevented) return;
128
- if (e.key === "Escape") {
129
- e.stopPropagation();
130
- if (active) requestClose();
131
- return;
132
- }
128
+ runOwnKeyDown(e, onKeyDown);
129
+ takeEscape(e);
133
130
  };
134
131
  if (!active && !exiting) return null;
135
132
  return createPortal(
@@ -160,8 +157,8 @@ function ModalPanel({
160
157
  style: { ...style, ...drag.style },
161
158
  className: cn(
162
159
  leaving ? "animate-sheet-out md:animate-none" : "animate-sheet md:animate-none",
163
- "w-full rounded-lg border border-[var(--border)] bg-[var(--bg-surface)] shadow-sm outline-none",
164
- { md: "max-w-md", lg: "max-w-lg", xl: "max-w-3xl" }[size],
160
+ "w-full rounded-lg border border-subtle bg-surface shadow-sm outline-none",
161
+ { md: "max-w-md", lg: "max-w-lg", xl: "max-w-3xl", "2xl": "max-w-[110rem]" }[size],
165
162
  // A panel taller than the screen has to scroll ITSELF. The backdrop is
166
163
  // `fixed inset-0` and the body is scroll-locked while a dialog is open, so
167
164
  // without this the overflow simply had nowhere to go: on a phone the panel
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/modal.tsx"],"sourcesContent":["import { createContext, useEffect, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport type {\n ComponentPropsWithoutRef,\n KeyboardEvent,\n MouseEvent as ReactMouseEvent,\n PointerEvent as ReactPointerEvent,\n ReactNode,\n} from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { useFocusTrap } from \"../hooks/use-focus-trap\";\nimport { useBodyScrollLock } from \"../hooks/use-body-scroll-lock\";\nimport { useOverlayHistory } from \"../hooks/use-overlay-history\";\nimport { useDialogParam, type DialogParam } from \"../hooks/use-search-param-state\";\nimport { OVERLAY_EXIT_MS, prefersReducedMotion, useCloseTransition } from \"../hooks/use-close-transition\";\n\n/**\n * Drag the panel by its top strip, in pointer space (dev#460).\n *\n * Deliberately not a library and not persisted: the offset is component state that\n * dies with the dialog. It starts only on a press that lands on the panel's own\n * chrome — never on a field, a button or a link, which is what keeps \"drag to select\n * text in the textarea\" working. Above `md` only: below it the panel is a\n * full-width bottom sheet with nothing beside it to uncover.\n *\n * The whole gesture stays on the PANEL — captured pointer, React handlers — rather than\n * on `window`. The first shape of this added `pointermove`/`pointerup` to `window` from\n * inside the `pointerdown` handler and took them off again from the `pointerup` handler,\n * so the teardown ran only if the gesture ended: React never sees a listener added from\n * an event handler, and an unmount mid-drag left a live `pointermove` on `window` for\n * the life of the page, pinning this hook's state with it. The one caller that enables\n * dragging is the feedback composer, which closes ITSELF on submit — a Ctrl+Enter sent\n * with the pointer still down is exactly that order of events, once per drag.\n */\nfunction useDragOffset(enabled: boolean) {\n const [offset, setOffset] = useState<{ x: number; y: number } | null>(null);\n const from = useRef<{ x: number; y: number; ox: number; oy: number } | null>(null);\n\n const endDrag = () => {\n from.current = null;\n };\n\n return {\n /** Back to where the panel opens. A `Modal` with an `open` prop outlives its own\n * closes, so \"the position resets when the dialog closes\" needs saying. */\n reset: () => setOffset(null),\n style: offset ? { transform: `translate(${offset.x}px, ${offset.y}px)` } : undefined,\n handlers: !enabled\n ? undefined\n : {\n onPointerDown: (e: ReactPointerEvent<HTMLDivElement>) => {\n if (e.button !== 0 || window.innerWidth < 768) return;\n const target = e.target as HTMLElement;\n // Only the panel itself and its non-interactive chrome start a drag; a\n // press inside any control belongs to that control.\n if (target.closest(\"input,textarea,select,button,a,[role='button']\")) return;\n from.current = { x: e.clientX, y: e.clientY, ox: offset?.x ?? 0, oy: offset?.y ?? 0 };\n try {\n // Capture is what lets the handlers live on the panel: every later\n // pointer event for this pointer retargets here, so the drag keeps\n // working once the pointer outruns the panel's own box — which it always\n // does, since the panel moves out from under it.\n e.currentTarget.setPointerCapture(e.pointerId);\n } catch {\n // jsdom implements no pointer capture, and a browser throws\n // NotFoundError for a pointerId that is already gone. Neither is worth\n // refusing the drag: uncaptured, the panel still gets the moves that\n // land on it.\n }\n },\n onPointerMove: (e: ReactPointerEvent<HTMLDivElement>) => {\n const start = from.current;\n if (!start) return;\n setOffset({ x: start.ox + e.clientX - start.x, y: start.oy + e.clientY - start.y });\n },\n onPointerUp: endDrag,\n // A cancel (the browser taking the pointer for a scroll or a gesture) and a\n // lost capture both mean no `pointerup` is coming. Without them the drag would\n // stay \"live\" and the next move over the panel would jump it.\n onPointerCancel: endDrag,\n onLostPointerCapture: endDrag,\n },\n };\n}\n\n/**\n * The panel's own ANIMATED dismissal, for chrome rendered inside it. `DialogFrame`'s X\n * and its `actions(close)` read this, so a Cancel or an X lowers the panel exactly the\n * way Escape does — calling `onClose` from inside unmounts with no exit, which is the\n * documented limit of {@link useCloseTransition}. `null` outside a `Modal`.\n */\nexport const ModalCloseContext = createContext<(() => void) | null>(null);\n\n/**\n * Backdrop handlers that close only when a press starts AND ends on the\n * backdrop itself. A plain onClick fires on mouseup, so dragging a text\n * selection that starts inside the panel and releases over the backdrop would\n * dismiss the dialog (feedback #254) — and the reverse drag would too, since\n * click targets the common ancestor of the down/up elements.\n */\nexport function useBackdropClose(onClose: () => void) {\n const pressStartedOnBackdrop = useRef(false);\n return {\n onMouseDown: (e: ReactMouseEvent<HTMLDivElement>) => {\n pressStartedOnBackdrop.current = e.target === e.currentTarget;\n },\n onMouseUp: (e: ReactMouseEvent<HTMLDivElement>) => {\n const started = pressStartedOnBackdrop.current;\n pressStartedOnBackdrop.current = false;\n if (started && e.target === e.currentTarget) onClose();\n },\n };\n}\n\n// Tab-cycle target set: the interactive descendants the focus trap rotates\n// through. Querying live (per keystroke) means dynamically rendered fields are\n// included automatically.\n/**\n * `extends ComponentPropsWithoutRef<\"div\">` so anything a `<div>` takes reaches the\n * PANEL — the element with `role=\"dialog\"`, which is the one a consumer means. That is\n * where a `data-tour` anchor, a test id, an `aria-describedby` or an `aria-label` has\n * to land; before this, a closed prop list dropped all four silently (audit §api-design).\n */\nexport interface ModalProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"role\"> {\n /** Invoked on backdrop click and on Escape. */\n onClose: () => void;\n /**\n * Who decides whether the dialog is up, when the caller wants to keep it MOUNTED.\n *\n * Left out, the dialog is open for as long as it is mounted — `{open && <Modal/>}`,\n * which is every caller before this prop and stays exactly as it was. That idiom has\n * one blind spot: a close the CALLER decides on (a save that succeeded, a\n * `setOpen(false)` from outside) unmounts the panel on the spot, with no exit,\n * because there is nothing left to animate. kastlan's `FormModal` was nothing but an\n * `if (!open) return null` gate in front of this.\n *\n * Passed, the component stays mounted while closed and renders nothing, and a flip\n * to `false` plays the same exit a dismissal does before the panel goes. The focus\n * trap, the scroll lock and the Back-gesture history entry are held only while\n * `open` is true — they are released the moment it turns false, so focus is back on\n * the trigger while the panel is still lowering. A dismissal (Escape, the backdrop,\n * Back, the frame's X) animates first and then calls `onClose`; the `false` that\n * comes back from it is not animated a second time.\n *\n * The body is unmounted once the exit has finished, as it is today, so a form inside\n * still starts fresh on the next open.\n */\n open?: boolean;\n /** `\"alertdialog\"` for a dialog that interrupts to ask a question the user must\n * answer (a confirmation) — screen readers announce it with more urgency. Only the\n * two dialog roles are allowed: the panel stays modal either way. */\n role?: \"dialog\" | \"alertdialog\";\n children: ReactNode;\n /**\n * Panel max-width: `md` (28rem), `lg` (32rem), `xl` (48rem).\n *\n * `xl` exists because two callers had already written `className=\"max-w-3xl\"` to\n * reach it — the payee backfill's preview table and the price-merge dialog, both\n * of which hold a list and several fields rather than one question. A caller\n * patching a missing size IS the signal that the size is missing, and a\n * hand-written width in a `className` is a width nothing else can line up with.\n *\n * The panel is `w-full` under every one of them, so the cap only bites once the\n * viewport is wider than it: on a phone all three are the same full-width bottom\n * sheet. Nothing here may introduce a `min-w-*`, which is what would break that.\n */\n size?: \"md\" | \"lg\" | \"xl\";\n /** Extra classes for the panel (e.g. `space-y-3` for form content spacing). */\n className?: string;\n /** id of the heading element, wired to `aria-labelledby`. */\n labelledBy?: string;\n /**\n * Extra key handling on the panel (e.g. Ctrl/Cmd+Enter to submit). Runs first;\n * if it calls `preventDefault()` the built-in Escape/Tab handling is skipped\n * for that event.\n */\n onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;\n /**\n * Drop the backdrop's mobile margin so the panel can reach the screen edges\n * (a full-screen sheet on phones). The panel still needs its own\n * `h-[100dvh] max-w-full rounded-none` classes via `className` to fill it; the\n * desktop `md:p-4` margin is kept. Defaults to false (padded on all sizes).\n */\n fullBleed?: boolean;\n /**\n * Let the user drag the panel out of the way by its top edge (Keksdose feedback\n * dev#460: *\"Make the feedback dialog draggable so I can see behind it if it\n * blocks something.\"*).\n *\n * Opt-in, because it only makes sense for a dialog whose content is ABOUT the page\n * behind it — the feedback composer is the case, an ordinary form is not, and a\n * draggable panel that has nothing to reveal is a control that can only get lost.\n *\n * Pointer-only by design: it is a \"move this out of the way\" gesture, not a layout\n * choice worth persisting, and the position resets when the dialog closes. On a\n * phone the panel is a bottom sheet the width of the screen, so dragging is\n * suppressed there — there is nothing beside it to see.\n */\n draggable?: boolean;\n /**\n * Bind the open state to a URL search param (0.12.0): `\"edit\"` is open while\n * `?edit` is in the query, `{ key: \"dialog\", value: \"create-lease\" }` while\n * `?dialog=create-lease` is. The URL is then the only state — `open` is ignored —\n * and the dialog opens from anywhere that sets the param: {@link useDialogParam}'s\n * setter, a `<Link>`, a shared link, a reload.\n *\n * kastlan's `useDialogParam` did this beside the dialog, so its open state could be\n * deep-linked and captured in a feedback report. Here it also owns the history:\n * opening through `useDialogParam` pushes an entry, so the Back gesture closes the\n * dialog by leaving it, and a close (Escape, the backdrop, the X) goes back over\n * that entry rather than stacking a second one. The dialog's own Back handling\n * ({@link useOverlayHistory}'s throwaway entry) stays off in this mode — the param's\n * entry already is one, and two would take two Back presses to close one dialog.\n *\n * `onClose` still runs, after the param is cleared. Requires a react-router Router.\n */\n urlParam?: DialogParam;\n}\n\n/**\n * The URL-bound dialog: the param is the open state, and closing clears it. A\n * component of its own so the router hook is only called by a `Modal` that asked for\n * it — a plain `Modal` must keep working with no Router above it.\n */\nfunction UrlParamModal({ urlParam, onClose, ...rest }: ModalProps & { urlParam: DialogParam }) {\n const [open, setOpen] = useDialogParam(urlParam);\n // Closed from here the moment the dismissal is decided. Going back is a traversal\n // the browser lands a task later, and between the two the param still says \"open\":\n // without this the panel, already lowered, would pop back up for that task.\n const [leaving, setLeaving] = useState(false);\n if (leaving && !open) setLeaving(false);\n return (\n <ModalPanel\n {...rest}\n open={open && !leaving}\n ownHistoryEntry={false}\n onClose={() => {\n setLeaving(true);\n setOpen(false);\n onClose();\n }}\n />\n );\n}\n\n/**\n * Centered (bottom-sheet on mobile) modal dialog: dimmed backdrop, single\n * rounded panel. Owns the overlay mechanics that the hand-rolled dialogs each\n * re-implemented or lacked — backdrop-click + Escape to close, the platform Back\n * gesture (Keksdose feedback #172), background scroll lock (feedback #204), focus\n * into the panel on open and back to the trigger on close, a Tab focus trap, and\n * `role=\"dialog\"`/`aria-modal`.\n */\nexport function Modal(props: ModalProps) {\n return props.urlParam !== undefined ? (\n <UrlParamModal {...props} urlParam={props.urlParam} />\n ) : (\n <ModalPanel {...props} />\n );\n}\n\nfunction ModalPanel({\n onClose,\n open,\n children,\n size = \"md\",\n className,\n labelledBy,\n onKeyDown,\n fullBleed,\n draggable,\n style,\n role = \"dialog\",\n urlParam: _urlParam,\n ownHistoryEntry = true,\n ...rest\n}: ModalProps & {\n /** False when the URL already holds an entry for this dialog — see `urlParam`. */\n ownHistoryEntry?: boolean;\n}) {\n const panelRef = useRef<HTMLDivElement>(null);\n const drag = useDragOffset(Boolean(draggable));\n // Without `open`, mounted means open — the constant `true` every hook below used to\n // be given. With it, `open` itself.\n const active = open ?? true;\n\n // Whether the last close came through `requestClose`, i.e. has ALREADY been\n // animated. Set in the same batch as the caller's `onClose`, so the render that sees\n // `open` turn false also sees this and does not lower the panel a second time.\n const [dismissed, setDismissed] = useState(false);\n // The exit of a close the caller decided on (only reachable with `open`). Adjusted\n // during render when `open` flips — `Collapse`'s pattern — so the very render that\n // closes it already paints the `-out` classes rather than a frame of nothing.\n const [exiting, setExiting] = useState(false);\n const [prevOpen, setPrevOpen] = useState(open);\n if (open !== prevOpen) {\n setPrevOpen(open);\n setDismissed(false);\n setExiting(open === false && prevOpen === true && !dismissed && !prefersReducedMotion());\n if (open) drag.reset();\n }\n useEffect(() => {\n if (!exiting) return;\n const timer = setTimeout(() => setExiting(false), OVERLAY_EXIT_MS);\n return () => clearTimeout(timer);\n }, [exiting]);\n\n // The panel lowers itself before the caller unmounts it (live #320 rework). Every\n // dismissal below goes through `requestClose`; `onClose` still does the closing, one\n // animation later. A caller that closes the dialog ITSELF — after a save, say —\n // unmounts with no exit unless it passes `open`, which is what that prop is for.\n const { closing, requestClose } = useCloseTransition(() => {\n setDismissed(true);\n onClose();\n });\n // A panel on its way out after `open` turned false is already closed: a press on\n // its fading backdrop must not report a second close.\n const backdropClose = useBackdropClose(active ? requestClose : () => {});\n // Back means the same as Escape here. On a phone Escape doesn't exist, so without\n // this the only way out of a dialog is finding its close button — and Back, the\n // gesture everyone reaches for, navigated the page underneath instead (#172).\n // Held only while open: a closed `open={false}` dialog must not own a history entry.\n useOverlayHistory(active && ownHistoryEntry, requestClose);\n\n // Through the shared hook and not by hand: this component's own save/restore copy\n // was one half of the pair that left the page permanently unscrollable when a dialog\n // containing an open sheet was closed — see the note in use-body-scroll-lock.ts.\n useBodyScrollLock(active);\n\n // Focus the panel itself (not the first field) so opening doesn't pop the mobile\n // keyboard, while still moving focus into the dialog for keyboard and screen-reader\n // users. Through the shared hook since this component is where it came from — the\n // hook adds per-keystroke recomputation, a guard on restoring to a detached node,\n // and nesting, none of which this copy had. Released when `open` turns false, which\n // hands focus back to the trigger while the panel is still on its way out.\n useFocusTrap(panelRef, { active, initialFocus: \"container\" });\n const leaving = closing || exiting;\n\n const handleKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e);\n if (e.defaultPrevented) return;\n if (e.key === \"Escape\") {\n e.stopPropagation();\n if (active) requestClose();\n return;\n }\n // Tab containment lives in useFocusTrap, which listens on the panel itself.\n };\n\n // Portal to <body> so the `fixed inset-0 z-50` overlay escapes whatever stacking\n // context its caller sits in. Rendered inline, a modal opened from e.g. the top\n // bar (a z-30 context) could paint BELOW a sibling z-30 sticky element like the\n // expanded transaction editor (feedback #320). The tour/command-palette overlays\n // already portal for the same reason.\n if (!active && !exiting) return null;\n return createPortal(\n <div\n // Out of the accessibility tree for the length of a caller-driven exit: focus is\n // already back on the page, and an `aria-modal` panel that is leaving would hide\n // that page from a screen reader for 220ms. Not `inert` — that would let a tap\n // fall through the fading backdrop to the row underneath.\n aria-hidden={exiting || undefined}\n className={cn(\n // Live #320. The panel below rises only where it is bottom-anchored: from md up\n // it is centred, and a centred box sliding up from off-screen reads as a\n // different component arriving rather than as the same one settling.\n leaving ? \"animate-overlay-out\" : \"animate-overlay\",\n \"fixed inset-0 z-50 flex items-end justify-center bg-black/40 md:items-center\",\n fullBleed ? \"p-0 md:p-4\" : \"p-4\",\n )}\n {...backdropClose}\n >\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions -- always\n role=\"dialog\" or \"alertdialog\" (the ternary hides that from the rule): `onKeyDown`\n is Escape-to-close per the APG dialog pattern, and the drag handlers are\n swipe-to-dismiss, whose keyboard path is that same Escape. */}\n <div\n // `...rest` FIRST, everything the dialog needs to be a dialog after it. A\n // wrapper that spreads its own props through to this one cannot then take away\n // the role, the modality or the `tabIndex={-1}` that `useFocusTrap` needs —\n // losing any of the three is silent, and the symptom (a dialog a screen reader\n // walks straight out of) shows up nowhere near the call site that caused it.\n {...rest}\n ref={panelRef}\n // Normalised at runtime too: an untyped caller's `role=\"presentation\"` must not\n // take the dialog role away (props-passthrough pins that).\n role={role === \"alertdialog\" ? \"alertdialog\" : \"dialog\"}\n aria-modal=\"true\"\n aria-labelledby={labelledBy}\n tabIndex={-1}\n onKeyDown={handleKeyDown}\n {...drag.handlers}\n // MERGED, not replaced: `drag.style` is undefined until a drag starts, so\n // assigning it outright would drop a caller's own `style` on every render but\n // the ones where the panel is being dragged.\n style={{ ...style, ...drag.style }}\n className={cn(\n leaving ? \"animate-sheet-out md:animate-none\" : \"animate-sheet md:animate-none\",\n \"w-full rounded-lg border border-[var(--border)] bg-[var(--bg-surface)] shadow-sm outline-none\",\n { md: \"max-w-md\", lg: \"max-w-lg\", xl: \"max-w-3xl\" }[size],\n // A panel taller than the screen has to scroll ITSELF. The backdrop is\n // `fixed inset-0` and the body is scroll-locked while a dialog is open, so\n // without this the overflow simply had nowhere to go: on a phone the panel\n // is bottom-anchored, so it grew UPWARD past the top edge and the part that\n // went past it could not be reached by any gesture (Keksdose live #254, on\n // the price-merge dialog — but it was every dialog with more than a screen\n // of content). `max-h-full` resolves against the backdrop's content box,\n // which is the viewport minus its own padding, so the panel stops exactly\n // where the screen does; `overscroll-contain` keeps the fling inside it.\n //\n // Three callers had already patched themselves with `max-h-[90vh]` +\n // an inner scroller. Those still win — `cn` is tailwind-merge — and this is\n // the default they should not have needed.\n \"max-h-full overflow-y-auto overscroll-contain\",\n \"p-4\",\n // The grab affordance sits on the panel's own top strip: a drag handle of\n // its own would be one more control in a dialog that is mostly one field.\n draggable && \"md:[&>*:first-child]:cursor-grab\",\n className,\n )}\n >\n <ModalCloseContext.Provider value={requestClose}>{children}</ModalCloseContext.Provider>\n </div>\n </div>,\n document.body,\n );\n}\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../../src/components/modal.tsx"],"sourcesContent":["import { createContext, useEffect, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport type {\n ComponentPropsWithoutRef,\n KeyboardEvent,\n MouseEvent as ReactMouseEvent,\n PointerEvent as ReactPointerEvent,\n ReactNode,\n} from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { useFocusTrap } from \"../hooks/use-focus-trap\";\nimport { useBodyScrollLock } from \"../hooks/use-body-scroll-lock\";\nimport { useOverlayHistory } from \"../hooks/use-overlay-history\";\nimport { useDialogParam, type DialogParam } from \"../hooks/use-search-param-state\";\nimport { OVERLAY_EXIT_MS, skipsExitAnimation, useCloseTransition } from \"../hooks/use-close-transition\";\nimport { runOwnKeyDown, takeEscape, useDismissLayer } from \"../hooks/use-dismiss\";\n\n/**\n * Drag the panel by its top strip, in pointer space (dev#460).\n *\n * Deliberately not a library and not persisted: the offset is component state that\n * dies with the dialog. It starts only on a press that lands on the panel's own\n * chrome — never on a field, a button or a link, which is what keeps \"drag to select\n * text in the textarea\" working. Above `md` only: below it the panel is a\n * full-width bottom sheet with nothing beside it to uncover.\n *\n * The whole gesture stays on the PANEL — captured pointer, React handlers — rather than\n * on `window`. The first shape of this added `pointermove`/`pointerup` to `window` from\n * inside the `pointerdown` handler and took them off again from the `pointerup` handler,\n * so the teardown ran only if the gesture ended: React never sees a listener added from\n * an event handler, and an unmount mid-drag left a live `pointermove` on `window` for\n * the life of the page, pinning this hook's state with it. The one caller that enables\n * dragging is the feedback composer, which closes ITSELF on submit — a Ctrl+Enter sent\n * with the pointer still down is exactly that order of events, once per drag.\n */\nfunction useDragOffset(enabled: boolean) {\n const [offset, setOffset] = useState<{ x: number; y: number } | null>(null);\n const from = useRef<{ x: number; y: number; ox: number; oy: number } | null>(null);\n\n const endDrag = () => {\n from.current = null;\n };\n\n return {\n /** Back to where the panel opens. A `Modal` with an `open` prop outlives its own\n * closes, so \"the position resets when the dialog closes\" needs saying. */\n reset: () => setOffset(null),\n style: offset ? { transform: `translate(${offset.x}px, ${offset.y}px)` } : undefined,\n handlers: !enabled\n ? undefined\n : {\n onPointerDown: (e: ReactPointerEvent<HTMLDivElement>) => {\n if (e.button !== 0 || window.innerWidth < 768) return;\n const target = e.target as HTMLElement;\n // Only the panel itself and its non-interactive chrome start a drag; a\n // press inside any control belongs to that control.\n if (target.closest(\"input,textarea,select,button,a,[role='button']\")) return;\n from.current = { x: e.clientX, y: e.clientY, ox: offset?.x ?? 0, oy: offset?.y ?? 0 };\n try {\n // Capture is what lets the handlers live on the panel: every later\n // pointer event for this pointer retargets here, so the drag keeps\n // working once the pointer outruns the panel's own box — which it always\n // does, since the panel moves out from under it.\n e.currentTarget.setPointerCapture(e.pointerId);\n } catch {\n // jsdom implements no pointer capture, and a browser throws\n // NotFoundError for a pointerId that is already gone. Neither is worth\n // refusing the drag: uncaptured, the panel still gets the moves that\n // land on it.\n }\n },\n onPointerMove: (e: ReactPointerEvent<HTMLDivElement>) => {\n const start = from.current;\n if (!start) return;\n setOffset({ x: start.ox + e.clientX - start.x, y: start.oy + e.clientY - start.y });\n },\n onPointerUp: endDrag,\n // A cancel (the browser taking the pointer for a scroll or a gesture) and a\n // lost capture both mean no `pointerup` is coming. Without them the drag would\n // stay \"live\" and the next move over the panel would jump it.\n onPointerCancel: endDrag,\n onLostPointerCapture: endDrag,\n },\n };\n}\n\n/**\n * The panel's own ANIMATED dismissal, for chrome rendered inside it. `DialogFrame`'s X\n * and its `actions(close)` read this, so a Cancel or an X lowers the panel exactly the\n * way Escape does — calling `onClose` from inside unmounts with no exit, which is the\n * documented limit of {@link useCloseTransition}. `null` outside a `Modal`.\n */\nexport const ModalCloseContext = createContext<(() => void) | null>(null);\n\n/**\n * Backdrop handlers that close only when a press starts AND ends on the\n * backdrop itself. A plain onClick fires on mouseup, so dragging a text\n * selection that starts inside the panel and releases over the backdrop would\n * dismiss the dialog (feedback #254) — and the reverse drag would too, since\n * click targets the common ancestor of the down/up elements.\n */\nexport function useBackdropClose(onClose: () => void) {\n const pressStartedOnBackdrop = useRef(false);\n return {\n onMouseDown: (e: ReactMouseEvent<HTMLDivElement>) => {\n pressStartedOnBackdrop.current = e.target === e.currentTarget;\n },\n onMouseUp: (e: ReactMouseEvent<HTMLDivElement>) => {\n const started = pressStartedOnBackdrop.current;\n pressStartedOnBackdrop.current = false;\n if (started && e.target === e.currentTarget) onClose();\n },\n };\n}\n\n// Tab-cycle target set: the interactive descendants the focus trap rotates\n// through. Querying live (per keystroke) means dynamically rendered fields are\n// included automatically.\n/**\n * `extends ComponentPropsWithoutRef<\"div\">` so anything a `<div>` takes reaches the\n * PANEL — the element with `role=\"dialog\"`, which is the one a consumer means. That is\n * where a `data-tour` anchor, a test id, an `aria-describedby` or an `aria-label` has\n * to land; before this, a closed prop list dropped all four silently (audit §api-design).\n */\nexport interface ModalProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"role\"> {\n /** Invoked on backdrop click and on Escape. */\n onClose: () => void;\n /**\n * Who decides whether the dialog is up, when the caller wants to keep it MOUNTED.\n *\n * Left out, the dialog is open for as long as it is mounted — `{open && <Modal/>}`,\n * which is every caller before this prop and stays exactly as it was. That idiom has\n * one blind spot: a close the CALLER decides on (a save that succeeded, a\n * `setOpen(false)` from outside) unmounts the panel on the spot, with no exit,\n * because there is nothing left to animate. kastlan's `FormModal` was nothing but an\n * `if (!open) return null` gate in front of this.\n *\n * Passed, the component stays mounted while closed and renders nothing, and a flip\n * to `false` plays the same exit a dismissal does before the panel goes. The focus\n * trap, the scroll lock and the Back-gesture history entry are held only while\n * `open` is true — they are released the moment it turns false, so focus is back on\n * the trigger while the panel is still lowering. A dismissal (Escape, the backdrop,\n * Back, the frame's X) animates first and then calls `onClose`; the `false` that\n * comes back from it is not animated a second time.\n *\n * The body is unmounted once the exit has finished, as it is today, so a form inside\n * still starts fresh on the next open.\n */\n open?: boolean;\n /** `\"alertdialog\"` for a dialog that interrupts to ask a question the user must\n * answer (a confirmation) — screen readers announce it with more urgency. Only the\n * two dialog roles are allowed: the panel stays modal either way. */\n role?: \"dialog\" | \"alertdialog\";\n children: ReactNode;\n /**\n * Panel max-width: `md` (28rem), `lg` (32rem), `xl` (48rem), `2xl` (the display less\n * the backdrop's margin, capped at 110rem).\n *\n * `xl` exists because two callers had already written `className=\"max-w-3xl\"` to\n * reach it — the payee backfill's preview table and the price-merge dialog, both\n * of which hold a list and several fields rather than one question. A caller\n * patching a missing size IS the signal that the size is missing, and a\n * hand-written width in a `className` is a width nothing else can line up with.\n *\n * `2xl` is the same signal one size up (round 0.34 C3, KS U1): a dialog whose\n * content is a TABLE to be read. Kurvenschmiede's five part dialogs hold a measured\n * table pasted from a spreadsheet and had patched themselves to\n * `w-[min(110rem,94vw)] max-w-none`; Keksdose's report drilldown passed `size=\"lg\"`\n * and then `max-w-5xl`. The cap is the generous one of the two, because a table\n * squeezed into a box in the middle of a wide screen is a table scrolled sideways\n * (KS feedback #16); below the cap the panel is as wide as the backdrop lets it be.\n * In rem, so it grows with the text size until the screen stops it.\n *\n * The panel is `w-full` under every one of them, so the cap only bites once the\n * viewport is wider than it: on a phone all four are the same full-width bottom\n * sheet. Nothing here may introduce a `min-w-*`, which is what would break that.\n */\n size?: \"md\" | \"lg\" | \"xl\" | \"2xl\";\n /** Extra classes for the panel (e.g. `space-y-3` for form content spacing). */\n className?: string;\n /** id of the heading element, wired to `aria-labelledby`. */\n labelledBy?: string;\n /**\n * Extra key handling on the panel (e.g. Ctrl/Cmd+Enter to submit). Runs first; a\n * `preventDefault()` on Escape HERE keeps the dialog open — the owner's claim (see\n * `use-dismiss.ts`). One a field inside makes does not, since 0.34: the rule\n * `FullBleedDialog` already had, so a search box keeping Chromium from clearing itself\n * no longer holds the dialog open (Wave 2, DUP-1).\n */\n onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;\n /**\n * Drop the backdrop's mobile margin so the panel can reach the screen edges\n * (a full-screen sheet on phones). The panel still needs its own\n * `h-[100dvh] max-w-full rounded-none` classes via `className` to fill it; the\n * desktop `md:p-4` margin is kept. Defaults to false (padded on all sizes).\n */\n fullBleed?: boolean;\n /**\n * Let the user drag the panel out of the way by its top edge (Keksdose feedback\n * dev#460: *\"Make the feedback dialog draggable so I can see behind it if it\n * blocks something.\"*).\n *\n * Opt-in, because it only makes sense for a dialog whose content is ABOUT the page\n * behind it — the feedback composer is the case, an ordinary form is not, and a\n * draggable panel that has nothing to reveal is a control that can only get lost.\n *\n * Pointer-only by design: it is a \"move this out of the way\" gesture, not a layout\n * choice worth persisting, and the position resets when the dialog closes. On a\n * phone the panel is a bottom sheet the width of the screen, so dragging is\n * suppressed there — there is nothing beside it to see.\n */\n draggable?: boolean;\n /**\n * Bind the open state to a URL search param (0.12.0): `\"edit\"` is open while\n * `?edit` is in the query, `{ key: \"dialog\", value: \"create-lease\" }` while\n * `?dialog=create-lease` is. The URL is then the only state — `open` is ignored —\n * and the dialog opens from anywhere that sets the param: {@link useDialogParam}'s\n * setter, a `<Link>`, a shared link, a reload.\n *\n * kastlan's `useDialogParam` did this beside the dialog, so its open state could be\n * deep-linked and captured in a feedback report. Here it also owns the history:\n * opening through `useDialogParam` pushes an entry, so the Back gesture closes the\n * dialog by leaving it, and a close (Escape, the backdrop, the X) goes back over\n * that entry rather than stacking a second one. The dialog's own Back handling\n * ({@link useOverlayHistory}'s throwaway entry) stays off in this mode — the param's\n * entry already is one, and two would take two Back presses to close one dialog.\n *\n * `onClose` still runs, after the param is cleared. Requires a react-router Router.\n */\n urlParam?: DialogParam;\n}\n\n/**\n * The URL-bound dialog: the param is the open state, and closing clears it. A\n * component of its own so the router hook is only called by a `Modal` that asked for\n * it — a plain `Modal` must keep working with no Router above it.\n */\nfunction UrlParamModal({ urlParam, onClose, ...rest }: ModalProps & { urlParam: DialogParam }) {\n const [open, setOpen] = useDialogParam(urlParam);\n // Closed from here the moment the dismissal is decided. Going back is a traversal\n // the browser lands a task later, and between the two the param still says \"open\":\n // without this the panel, already lowered, would pop back up for that task.\n const [leaving, setLeaving] = useState(false);\n if (leaving && !open) setLeaving(false);\n return (\n <ModalPanel\n {...rest}\n open={open && !leaving}\n ownHistoryEntry={false}\n onClose={() => {\n setLeaving(true);\n setOpen(false);\n onClose();\n }}\n />\n );\n}\n\n/**\n * Centered (bottom-sheet on mobile) modal dialog: dimmed backdrop, single\n * rounded panel. Owns the overlay mechanics that the hand-rolled dialogs each\n * re-implemented or lacked — backdrop-click + Escape to close, the platform Back\n * gesture (Keksdose feedback #172), background scroll lock (feedback #204), focus\n * into the panel on open and back to the trigger on close, a Tab focus trap, and\n * `role=\"dialog\"`/`aria-modal`.\n */\nexport function Modal(props: ModalProps) {\n return props.urlParam !== undefined ? (\n <UrlParamModal {...props} urlParam={props.urlParam} />\n ) : (\n <ModalPanel {...props} />\n );\n}\n\nfunction ModalPanel({\n onClose,\n open,\n children,\n size = \"md\",\n className,\n labelledBy,\n onKeyDown,\n fullBleed,\n draggable,\n style,\n role = \"dialog\",\n urlParam: _urlParam,\n ownHistoryEntry = true,\n ...rest\n}: ModalProps & {\n /** False when the URL already holds an entry for this dialog — see `urlParam`. */\n ownHistoryEntry?: boolean;\n}) {\n const panelRef = useRef<HTMLDivElement>(null);\n const drag = useDragOffset(Boolean(draggable));\n // Without `open`, mounted means open — the constant `true` every hook below used to\n // be given. With it, `open` itself.\n const active = open ?? true;\n\n // Whether the last close came through `requestClose`, i.e. has ALREADY been\n // animated. Set in the same batch as the caller's `onClose`, so the render that sees\n // `open` turn false also sees this and does not lower the panel a second time.\n const [dismissed, setDismissed] = useState(false);\n // The exit of a close the caller decided on (only reachable with `open`). Adjusted\n // during render when `open` flips — `Collapse`'s pattern — so the very render that\n // closes it already paints the `-out` classes rather than a frame of nothing.\n const [exiting, setExiting] = useState(false);\n const [prevOpen, setPrevOpen] = useState(open);\n if (open !== prevOpen) {\n setPrevOpen(open);\n setDismissed(false);\n setExiting(open === false && prevOpen === true && !dismissed && !skipsExitAnimation());\n if (open) drag.reset();\n }\n useEffect(() => {\n if (!exiting) return;\n const timer = setTimeout(() => setExiting(false), OVERLAY_EXIT_MS);\n return () => clearTimeout(timer);\n }, [exiting]);\n\n // The panel lowers itself before the caller unmounts it (live #320 rework). Every\n // dismissal below goes through `requestClose`; `onClose` still does the closing, one\n // animation later. A caller that closes the dialog ITSELF — after a save, say —\n // unmounts with no exit unless it passes `open`, which is what that prop is for.\n const { closing, requestClose } = useCloseTransition(() => {\n setDismissed(true);\n onClose();\n });\n // A panel on its way out after `open` turned false is already closed: a press on\n // its fading backdrop must not report a second close.\n const backdropClose = useBackdropClose(active ? requestClose : () => {});\n // Back means the same as Escape here. On a phone Escape doesn't exist, so without\n // this the only way out of a dialog is finding its close button — and Back, the\n // gesture everyone reaches for, navigated the page underneath instead (#172).\n // Held only while open: a closed `open={false}` dialog must not own a history entry.\n useOverlayHistory(active && ownHistoryEntry, requestClose);\n\n // Through the shared hook and not by hand: this component's own save/restore copy\n // was one half of the pair that left the page permanently unscrollable when a dialog\n // containing an open sheet was closed — see the note in use-body-scroll-lock.ts.\n useBodyScrollLock(active);\n\n // Focus the panel itself (not the first field) so opening doesn't pop the mobile\n // keyboard, while still moving focus into the dialog for keyboard and screen-reader\n // users. Through the shared hook since this component is where it came from — the\n // hook adds per-keystroke recomputation, a guard on restoring to a detached node,\n // and nesting, none of which this copy had. Released when `open` turns false, which\n // hands focus back to the trigger while the panel is still on its way out.\n //\n // \"The panel itself\" only when nothing inside asked for focus: a field the app\n // autofocuses on purpose keeps it (0.33.1, keksdose live #402 — the same trap took\n // an autofocused amount straight back in `FullBleedDialog`). Its keyboard is then the\n // one the app chose to show; the trigger still gets focus back on close.\n useFocusTrap(panelRef, { active, initialFocus: \"container\" });\n const leaving = closing || exiting;\n\n // One layer on the Escape stack while open (Wave 2, DUP-1): a list, a popover or a\n // tooltip opened inside takes the key before the dialog does, wherever focus is —\n // and the dialog gets it even when focus is not in the panel.\n useDismissLayer(active, requestClose);\n const handleKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n runOwnKeyDown(e, onKeyDown);\n // To whatever is on top — this dialog, unless something opened over it — and\n // stopped here. Tab containment lives in useFocusTrap, which listens on the panel.\n takeEscape(e);\n };\n\n // Portal to <body> so the `fixed inset-0 z-50` overlay escapes whatever stacking\n // context its caller sits in. Rendered inline, a modal opened from e.g. the top\n // bar (a z-30 context) could paint BELOW a sibling z-30 sticky element like the\n // expanded transaction editor (feedback #320). The tour/command-palette overlays\n // already portal for the same reason.\n if (!active && !exiting) return null;\n return createPortal(\n <div\n // Out of the accessibility tree for the length of a caller-driven exit: focus is\n // already back on the page, and an `aria-modal` panel that is leaving would hide\n // that page from a screen reader for 220ms. Not `inert` — that would let a tap\n // fall through the fading backdrop to the row underneath.\n aria-hidden={exiting || undefined}\n className={cn(\n // Live #320. The panel below rises only where it is bottom-anchored: from md up\n // it is centred, and a centred box sliding up from off-screen reads as a\n // different component arriving rather than as the same one settling.\n leaving ? \"animate-overlay-out\" : \"animate-overlay\",\n \"fixed inset-0 z-50 flex items-end justify-center bg-black/40 md:items-center\",\n fullBleed ? \"p-0 md:p-4\" : \"p-4\",\n )}\n {...backdropClose}\n >\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions -- always\n role=\"dialog\" or \"alertdialog\" (the ternary hides that from the rule): `onKeyDown`\n is Escape-to-close per the APG dialog pattern, and the drag handlers are\n swipe-to-dismiss, whose keyboard path is that same Escape. */}\n <div\n // `...rest` FIRST, everything the dialog needs to be a dialog after it. A\n // wrapper that spreads its own props through to this one cannot then take away\n // the role, the modality or the `tabIndex={-1}` that `useFocusTrap` needs —\n // losing any of the three is silent, and the symptom (a dialog a screen reader\n // walks straight out of) shows up nowhere near the call site that caused it.\n {...rest}\n ref={panelRef}\n // Normalised at runtime too: an untyped caller's `role=\"presentation\"` must not\n // take the dialog role away (props-passthrough pins that).\n role={role === \"alertdialog\" ? \"alertdialog\" : \"dialog\"}\n aria-modal=\"true\"\n aria-labelledby={labelledBy}\n tabIndex={-1}\n onKeyDown={handleKeyDown}\n {...drag.handlers}\n // MERGED, not replaced: `drag.style` is undefined until a drag starts, so\n // assigning it outright would drop a caller's own `style` on every render but\n // the ones where the panel is being dragged.\n style={{ ...style, ...drag.style }}\n className={cn(\n leaving ? \"animate-sheet-out md:animate-none\" : \"animate-sheet md:animate-none\",\n \"w-full rounded-lg border border-subtle bg-surface shadow-sm outline-none\",\n { md: \"max-w-md\", lg: \"max-w-lg\", xl: \"max-w-3xl\", \"2xl\": \"max-w-[110rem]\" }[size],\n // A panel taller than the screen has to scroll ITSELF. The backdrop is\n // `fixed inset-0` and the body is scroll-locked while a dialog is open, so\n // without this the overflow simply had nowhere to go: on a phone the panel\n // is bottom-anchored, so it grew UPWARD past the top edge and the part that\n // went past it could not be reached by any gesture (Keksdose live #254, on\n // the price-merge dialog — but it was every dialog with more than a screen\n // of content). `max-h-full` resolves against the backdrop's content box,\n // which is the viewport minus its own padding, so the panel stops exactly\n // where the screen does; `overscroll-contain` keeps the fling inside it.\n //\n // Three callers had already patched themselves with `max-h-[90vh]` +\n // an inner scroller. Those still win — `cn` is tailwind-merge — and this is\n // the default they should not have needed.\n \"max-h-full overflow-y-auto overscroll-contain\",\n \"p-4\",\n // The grab affordance sits on the panel's own top strip: a drag handle of\n // its own would be one more control in a dialog that is mostly one field.\n draggable && \"md:[&>*:first-child]:cursor-grab\",\n className,\n )}\n >\n <ModalCloseContext.Provider value={requestClose}>{children}</ModalCloseContext.Provider>\n </div>\n </div>,\n document.body,\n );\n}\n"],"mappings":"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","names":[]}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The draft-and-settle loop of a money field whose store is not AmountInput's text.
3
+ * Package-private — a module of its own so `money-field.tsx`'s `export *` in the barrel
4
+ * does not make it API.
5
+ */
6
+ /** The number an amount's text reads as — AmountInput reports dot-decimal text — `null`
7
+ * for empty, `undefined` for no number yet (a lone "-" or ".", a sum still being typed:
8
+ * "1200+"). */
9
+ export declare function readAmount(text: string): number | null | undefined;
10
+ /** {@link useMoneyDraft}'s answer. */
11
+ export interface MoneyDraft {
12
+ /** The text the field shows — AmountInput's `value`. */
13
+ draft: string;
14
+ /** AmountInput's `onChange`: keeps the typed text, and answers what it reads as — a
15
+ * number, `null` for empty, `undefined` for no number yet. */
16
+ change: (text: string) => number | null | undefined;
17
+ /** AmountInput's `onCommit`: what the settled text reads as. With no number in it (a
18
+ * lone "-") the draft goes back to the stored amount — rather than a guess, and rather
19
+ * than leaving "-" on screen while the store keeps the old figure — and the answer is
20
+ * `undefined`. A `"string"` store keeps what was typed: it holds that text too. */
21
+ settle: (text: string) => number | null | undefined;
22
+ }
23
+ /**
24
+ * The draft-and-settle loop of a money field whose store is a number, or text the store
25
+ * holds itself: `MoneyField`'s, and `RhfMoneyField`'s (`valueAs`). One copy since 0.34
26
+ * (DUP-9, refactor audit 2026-10): the twin's own kept a different parse and no
27
+ * snap-back, so a lone "-" stayed on screen while the form kept the old number.
28
+ *
29
+ * The text being typed lives here — a stored number cannot hold "12." or "12+5" — and is
30
+ * re-read from `value` only when `value` moves away from what the draft already says (a
31
+ * reset, another row's save, a `setValue`), so a commit's own echo keeps the typist's
32
+ * spelling ("12.50" stays "12.50" when 12.5 comes back).
33
+ */
34
+ export declare function useMoneyDraft(value: unknown, valueAs?: "number" | "string"): MoneyDraft;
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { useState } from "react";
3
+ function readAmount(text) {
4
+ const t = text.trim();
5
+ if (t === "") return null;
6
+ const n = Number(t);
7
+ return Number.isFinite(n) ? n : void 0;
8
+ }
9
+ function amountOf(value) {
10
+ if (value === null || value === void 0) return null;
11
+ return typeof value === "number" ? Number.isFinite(value) ? value : void 0 : readAmount(String(value));
12
+ }
13
+ function useMoneyDraft(value, valueAs = "number") {
14
+ const external = value === null || value === void 0 ? "" : String(value);
15
+ const [draft, setDraft] = useState(external);
16
+ const [seen, setSeen] = useState(value);
17
+ if (seen !== value) {
18
+ setSeen(value);
19
+ const same = valueAs === "string" ? draft === external : readAmount(draft) === amountOf(value);
20
+ if (!same) setDraft(external);
21
+ }
22
+ return {
23
+ draft,
24
+ change: (text) => {
25
+ setDraft(text);
26
+ return readAmount(text);
27
+ },
28
+ settle: (text) => {
29
+ const next = readAmount(text);
30
+ if (next === void 0 && valueAs === "number") setDraft(external);
31
+ return next;
32
+ }
33
+ };
34
+ }
35
+ export {
36
+ readAmount,
37
+ useMoneyDraft
38
+ };
39
+ //# sourceMappingURL=money-draft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/money-draft.ts"],"sourcesContent":["import { useState } from \"react\";\n\n/**\n * The draft-and-settle loop of a money field whose store is not AmountInput's text.\n * Package-private — a module of its own so `money-field.tsx`'s `export *` in the barrel\n * does not make it API.\n */\n\n/** The number an amount's text reads as — AmountInput reports dot-decimal text — `null`\n * for empty, `undefined` for no number yet (a lone \"-\" or \".\", a sum still being typed:\n * \"1200+\"). */\nexport function readAmount(text: string): number | null | undefined {\n const t = text.trim();\n if (t === \"\") return null;\n const n = Number(t);\n return Number.isFinite(n) ? n : undefined;\n}\n\n/** A stored amount as a number: a number as it is, a stored text read as an amount's\n * text is, nothing as `null`. */\nfunction amountOf(value: unknown): number | null | undefined {\n if (value === null || value === undefined) return null;\n return typeof value === \"number\" ? (Number.isFinite(value) ? value : undefined) : readAmount(String(value));\n}\n\n/** {@link useMoneyDraft}'s answer. */\nexport interface MoneyDraft {\n /** The text the field shows — AmountInput's `value`. */\n draft: string;\n /** AmountInput's `onChange`: keeps the typed text, and answers what it reads as — a\n * number, `null` for empty, `undefined` for no number yet. */\n change: (text: string) => number | null | undefined;\n /** AmountInput's `onCommit`: what the settled text reads as. With no number in it (a\n * lone \"-\") the draft goes back to the stored amount — rather than a guess, and rather\n * than leaving \"-\" on screen while the store keeps the old figure — and the answer is\n * `undefined`. A `\"string\"` store keeps what was typed: it holds that text too. */\n settle: (text: string) => number | null | undefined;\n}\n\n/**\n * The draft-and-settle loop of a money field whose store is a number, or text the store\n * holds itself: `MoneyField`'s, and `RhfMoneyField`'s (`valueAs`). One copy since 0.34\n * (DUP-9, refactor audit 2026-10): the twin's own kept a different parse and no\n * snap-back, so a lone \"-\" stayed on screen while the form kept the old number.\n *\n * The text being typed lives here — a stored number cannot hold \"12.\" or \"12+5\" — and is\n * re-read from `value` only when `value` moves away from what the draft already says (a\n * reset, another row's save, a `setValue`), so a commit's own echo keeps the typist's\n * spelling (\"12.50\" stays \"12.50\" when 12.5 comes back).\n */\nexport function useMoneyDraft(value: unknown, valueAs: \"number\" | \"string\" = \"number\"): MoneyDraft {\n const external = value === null || value === undefined ? \"\" : String(value);\n const [draft, setDraft] = useState(external);\n const [seen, setSeen] = useState<unknown>(value);\n if (seen !== value) {\n setSeen(value);\n const same = valueAs === \"string\" ? draft === external : readAmount(draft) === amountOf(value);\n if (!same) setDraft(external);\n }\n return {\n draft,\n change: (text) => {\n setDraft(text);\n return readAmount(text);\n },\n settle: (text) => {\n const next = readAmount(text);\n if (next === undefined && valueAs === \"number\") setDraft(external);\n return next;\n },\n };\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AAWlB,SAAS,WAAW,MAAyC;AAClE,QAAM,IAAI,KAAK,KAAK;AACpB,MAAI,MAAM,GAAI,QAAO;AACrB,QAAM,IAAI,OAAO,CAAC;AAClB,SAAO,OAAO,SAAS,CAAC,IAAI,IAAI;AAClC;AAIA,SAAS,SAAS,OAA2C;AAC3D,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,SAAO,OAAO,UAAU,WAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,SAAa,WAAW,OAAO,KAAK,CAAC;AAC5G;AA2BO,SAAS,cAAc,OAAgB,UAA+B,UAAsB;AACjG,QAAM,WAAW,UAAU,QAAQ,UAAU,SAAY,KAAK,OAAO,KAAK;AAC1E,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,QAAQ;AAC3C,QAAM,CAAC,MAAM,OAAO,IAAI,SAAkB,KAAK;AAC/C,MAAI,SAAS,OAAO;AAClB,YAAQ,KAAK;AACb,UAAM,OAAO,YAAY,WAAW,UAAU,WAAW,WAAW,KAAK,MAAM,SAAS,KAAK;AAC7F,QAAI,CAAC,KAAM,UAAS,QAAQ;AAAA,EAC9B;AACA,SAAO;AAAA,IACL;AAAA,IACA,QAAQ,CAAC,SAAS;AAChB,eAAS,IAAI;AACb,aAAO,WAAW,IAAI;AAAA,IACxB;AAAA,IACA,QAAQ,CAAC,SAAS;AAChB,YAAM,OAAO,WAAW,IAAI;AAC5B,UAAI,SAAS,UAAa,YAAY,SAAU,UAAS,QAAQ;AACjE,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[]}
@@ -1,110 +1,7 @@
1
- import * as react from 'react';
2
- import { ComponentProps, Ref } from 'react';
3
- import { AmountInput } from './amount-input.js';
4
- import './calculator.js';
5
- import '../delete-account-setting-DiPX4Vue.js';
6
- import './tooltip.js';
7
- import '../hooks/use-anchored-rect.js';
8
- import '../lib/clipping.js';
9
- import '../data-table-labels-BJ5JE_X2.js';
10
- import './data-table-sort.js';
11
- import './swipeable-row.js';
12
- import './status-dot.js';
13
- import './progress-bar.js';
14
- import './signed-amount.js';
15
- import './stat-tile.js';
16
- import './chip.js';
17
- import 'lucide-react';
18
- import './field-parts.js';
19
- import './write-lock.js';
20
- import './mini-calendar.js';
21
- import './calendar-heatmap.js';
22
- import './popover.js';
23
- import '../hooks/use-breakpoint.js';
24
- import './field-sync.js';
25
- import '../wizard/types.js';
26
- import '../tour/tour.js';
27
- import '../search/command-palette.js';
28
- import '../search/global-search.js';
29
- import '../search/search-index.js';
30
- import './month-picker.js';
31
- import './page-contents.js';
32
- import './series-chart-labels.js';
33
- import './pie-chart-labels.js';
34
- import './sparkline.js';
35
- import './signature-pad.js';
36
- import './password-strength.js';
37
- import './swatch-picker.js';
38
- import './tile-radio.js';
39
- import './icon-picker.js';
40
- import './dialog-frame.js';
41
- import './modal.js';
42
- import '../hooks/use-search-param-state.js';
43
- import './measured-grid.js';
44
- import './user-avatar.js';
45
- import '../lib/person-name.js';
46
- import '../shell/topbar-action-menu.js';
47
- import './menu-item.js';
48
- import './floating-panel.js';
49
- import '../hooks/use-authed-src.js';
50
- import './account-settings-labels.js';
51
- import './bulk-action-bar.js';
52
- import './list.js';
53
- import './breadcrumbs.js';
54
- import './toast.js';
55
- import './description-list.js';
56
- import './line-items.js';
57
- import './error-boundary.js';
58
- import './authed-image.js';
59
- import './image-grid.js';
60
- import './lightbox.js';
61
- import '../auth/sign-in-form.js';
62
- import '../landing/access.js';
63
- import '../landing/landing-labels.js';
64
- import '../shell/topbar-controls.js';
65
- import '../theme/palette-presets.js';
66
- import '../theme/chart-palette.js';
67
- import '../theme/theme-store.js';
68
- import 'zustand/middleware';
69
- import 'zustand';
70
- import '../auth/complete-name-dialog.js';
71
- import '../auth/forgot-password-form.js';
72
- import '../auth/status-parts.js';
73
- import '../auth/reset-password-form.js';
74
- import '../auth/verify-email.js';
75
- import '../auth/not-found-page.js';
76
- import '../auth/accept-invitation.js';
77
- import '../shell/company-switcher.js';
78
- import '../account/email-change-setting.js';
79
- import '../account/sessions-setting.js';
80
- import '../lib/format.js';
81
- import '../account/data-export-setting.js';
82
- import './account-chips.js';
83
- import '../admin/admin-parts.js';
84
- import '../admin/admin-action-log.js';
85
- import '../settings/settings-labels.js';
86
- import '../demo/demo-labels.js';
87
- import './appearance-labels.js';
88
- import '../theme/contrast.js';
89
- import '../theme/text-size.js';
90
- import './reauth-dialog.js';
91
- import './server-wake.js';
92
- import '../lib/server-wake.js';
93
- import './translation-review-labels.js';
94
- import '../lib/translation-review.js';
95
- import './country-select.js';
96
- import './inline-edit-field.js';
97
- import '../lib/iban.js';
98
- import '../lib/phone.js';
99
- import './sign-chip.js';
100
- import './column-mapper.js';
101
- import '../lib/column-mapping.js';
102
- import '../lib/table-text.js';
103
- import './focus-ring.js';
104
- import './numpad-sheet.js';
105
-
1
+ import type { ComponentProps, Ref } from "react";
2
+ import { AmountInput } from "./amount-input.js";
106
3
  type AmountInputProps = ComponentProps<typeof AmountInput>;
107
- interface MoneyFieldProps extends Omit<AmountInputProps, "value" | "onChange" | "onCommit" | "negative" | "onNegativeChange" | "ref"> {
4
+ export interface MoneyFieldProps extends Omit<AmountInputProps, "value" | "onChange" | "onCommit" | "negative" | "onNegativeChange" | "ref"> {
108
5
  /** The amount, or `null` for an empty field. */
109
6
  value: number | null;
110
7
  /**
@@ -138,15 +35,21 @@ interface MoneyFieldProps extends Omit<AmountInputProps, "value" | "onChange" |
138
35
  * `inputClassName` (0.23, keksdose G7) styles the `<input>` itself — `text-end` for a
139
36
  * money column — where `className` sizes the wrapper; see {@link AmountInput}'s.
140
37
  *
38
+ * LOCKED (0.34, round 0.34 C2): a row that saves itself passes `commit` (or a
39
+ * `disabledReason` of its own), AmountInput's — under a locked `WriteLockProvider` the
40
+ * field stays in the tab order showing its amount, `readOnly`, with the lock's reason in
41
+ * the kit Tooltip and its description; the calculator, the numpad and the currency
42
+ * picker are off, and `onCommit` is never called. `disabled` takes it out of the tab
43
+ * order, which is what a lock must not do.
44
+ *
141
45
  * This, not a `NumberField` with `digits={2}`, is the number-valued field for money:
142
46
  * it settles to the CURRENCY's minor unit (JPY 0, CHF 2) and `digits` takes a unit
143
47
  * price's finer scale (kastlan 5).
144
48
  *
145
49
  * ```tsx
146
- * <MoneyField ariaLabel="Amount" currency="CHF" value={row.amount}
50
+ * <MoneyField aria-label="Amount" currency="CHF" value={row.amount}
147
51
  * onCommit={(amount) => updateRow(row.id, { amount })} />
148
52
  * ```
149
53
  */
150
- declare function MoneyField({ value, onCommit, ref, ...props }: MoneyFieldProps): react.JSX.Element;
151
-
152
- export { MoneyField, type MoneyFieldProps };
54
+ export declare function MoneyField({ value, onCommit, ref, ...props }: MoneyFieldProps): import("react").JSX.Element;
55
+ export {};
@@ -1,35 +1,19 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { useState } from "react";
4
3
  import { AmountInput } from "./amount-input.js";
5
- function parseSettled(text) {
6
- const t = text.trim();
7
- if (t === "") return null;
8
- const n = Number(t);
9
- return Number.isFinite(n) ? n : void 0;
10
- }
4
+ import { useMoneyDraft } from "./money-draft.js";
11
5
  function MoneyField({ value, onCommit, ref, ...props }) {
12
- const external = value === null ? "" : String(value);
13
- const [draft, setDraft] = useState(external);
14
- const [seen, setSeen] = useState(value);
15
- if (seen !== value) {
16
- setSeen(value);
17
- if (parseSettled(draft) !== value) setDraft(external);
18
- }
6
+ const money = useMoneyDraft(value);
19
7
  return /* @__PURE__ */ jsx(
20
8
  AmountInput,
21
9
  {
22
10
  ...props,
23
11
  ref,
24
- value: draft,
25
- onChange: setDraft,
12
+ value: money.draft,
13
+ onChange: money.change,
26
14
  onCommit: (text) => {
27
- const next = parseSettled(text);
28
- if (next === void 0) {
29
- setDraft(external);
30
- return;
31
- }
32
- if (next !== value) onCommit(next);
15
+ const next = money.settle(text);
16
+ if (next !== void 0 && next !== value) onCommit(next);
33
17
  }
34
18
  }
35
19
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/money-field.tsx"],"sourcesContent":["import { useState, type ComponentProps, type Ref } from \"react\";\nimport { AmountInput } from \"./amount-input\";\n\ntype AmountInputProps = ComponentProps<typeof AmountInput>;\n\nexport interface MoneyFieldProps\n extends Omit<AmountInputProps, \"value\" | \"onChange\" | \"onCommit\" | \"negative\" | \"onNegativeChange\" | \"ref\"> {\n /** The amount, or `null` for an empty field. */\n value: number | null;\n /**\n * The settled amount — on blur, on Enter, on the numpad's \"=\" and on a calculator\n * result; never a half-typed \"1200+\". Rounded to the currency's minor unit (or\n * `digits`) and clamped to `min` / `max`, like {@link AmountInput}. `null` when the\n * field was emptied. Not fired when the settled amount equals `value`, so an\n * Enter-then-blur saves once.\n */\n onCommit: (value: number | null) => void;\n ref?: Ref<HTMLInputElement>;\n}\n\n/** The number a settled text reads as: `null` for empty, `undefined` for no number\n * (a lone \"-\" or \".\"). */\nfunction parseSettled(text: string): number | null | undefined {\n const t = text.trim();\n if (t === \"\") return null;\n const n = Number(t);\n return Number.isFinite(n) ? n : undefined;\n}\n\n/**\n * {@link AmountInput} with a NUMBER in and a number out, for money edited outside a\n * form — a budget row, a table cell (kastlan 52: new-budget-page edited a CHF amount per\n * row with `NumberField` because AmountInput is string-valued and reports every\n * keystroke, \"1200+\" included, so a number-state row needed its own parse-and-settle\n * glue). This is that glue, the same one `RhfMoneyField` has: the text being typed\n * lives here, and only a settled figure reaches `onCommit`.\n *\n * The currency chip, the calculator, the numpad, the locale's decimal mark, the\n * rounding to the currency's minor unit and `min` / `max` are AmountInput's. A caller-\n * owned sign (`negative`) is not offered: the figure here carries its own minus.\n *\n * So are two props a table cell needs (keksdose K4, K6): `error`, the message under the\n * field that paints and describes it like {@link Input}'s, and `calculator={false}`,\n * for an amount in a close-on-blur inline editor, where a click on the calculator icon\n * blurs the field and tears the editor down before the popover can open (typed\n * calculations still evaluate).\n *\n * `inputClassName` (0.23, keksdose G7) styles the `<input>` itself — `text-end` for a\n * money column — where `className` sizes the wrapper; see {@link AmountInput}'s.\n *\n * This, not a `NumberField` with `digits={2}`, is the number-valued field for money:\n * it settles to the CURRENCY's minor unit (JPY 0, CHF 2) and `digits` takes a unit\n * price's finer scale (kastlan 5).\n *\n * ```tsx\n * <MoneyField ariaLabel=\"Amount\" currency=\"CHF\" value={row.amount}\n * onCommit={(amount) => updateRow(row.id, { amount })} />\n * ```\n */\nexport function MoneyField({ value, onCommit, ref, ...props }: MoneyFieldProps) {\n const external = value === null ? \"\" : String(value);\n // The draft is re-read from `value` only when `value` moves away from what the draft\n // already says (a reset, another row's save), so a commit's own echo keeps the\n // typist's spelling (\"12.50\" stays \"12.50\" when 12.5 comes back).\n const [draft, setDraft] = useState(external);\n const [seen, setSeen] = useState(value);\n if (seen !== value) {\n setSeen(value);\n if (parseSettled(draft) !== value) setDraft(external);\n }\n return (\n <AmountInput\n {...props}\n ref={ref}\n value={draft}\n onChange={setDraft}\n onCommit={(text) => {\n const next = parseSettled(text);\n // No number (\"-\" alone): back to the stored amount rather than a guess.\n if (next === undefined) {\n setDraft(external);\n return;\n }\n if (next !== value) onCommit(next);\n }}\n />\n );\n}\n"],"mappings":";AAuEI;AAvEJ,SAAS,gBAA+C;AACxD,SAAS,mBAAmB;AAqB5B,SAAS,aAAa,MAAyC;AAC7D,QAAM,IAAI,KAAK,KAAK;AACpB,MAAI,MAAM,GAAI,QAAO;AACrB,QAAM,IAAI,OAAO,CAAC;AAClB,SAAO,OAAO,SAAS,CAAC,IAAI,IAAI;AAClC;AAgCO,SAAS,WAAW,EAAE,OAAO,UAAU,KAAK,GAAG,MAAM,GAAoB;AAC9E,QAAM,WAAW,UAAU,OAAO,KAAK,OAAO,KAAK;AAInD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,QAAQ;AAC3C,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,MAAI,SAAS,OAAO;AAClB,YAAQ,KAAK;AACb,QAAI,aAAa,KAAK,MAAM,MAAO,UAAS,QAAQ;AAAA,EACtD;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,MACP,UAAU;AAAA,MACV,UAAU,CAAC,SAAS;AAClB,cAAM,OAAO,aAAa,IAAI;AAE9B,YAAI,SAAS,QAAW;AACtB,mBAAS,QAAQ;AACjB;AAAA,QACF;AACA,YAAI,SAAS,MAAO,UAAS,IAAI;AAAA,MACnC;AAAA;AAAA,EACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/money-field.tsx"],"sourcesContent":["import type { ComponentProps, Ref } from \"react\";\nimport { AmountInput } from \"./amount-input\";\nimport { useMoneyDraft } from \"./money-draft\";\n\ntype AmountInputProps = ComponentProps<typeof AmountInput>;\n\nexport interface MoneyFieldProps\n extends Omit<AmountInputProps, \"value\" | \"onChange\" | \"onCommit\" | \"negative\" | \"onNegativeChange\" | \"ref\"> {\n /** The amount, or `null` for an empty field. */\n value: number | null;\n /**\n * The settled amount — on blur, on Enter, on the numpad's \"=\" and on a calculator\n * result; never a half-typed \"1200+\". Rounded to the currency's minor unit (or\n * `digits`) and clamped to `min` / `max`, like {@link AmountInput}. `null` when the\n * field was emptied. Not fired when the settled amount equals `value`, so an\n * Enter-then-blur saves once.\n */\n onCommit: (value: number | null) => void;\n ref?: Ref<HTMLInputElement>;\n}\n\n/**\n * {@link AmountInput} with a NUMBER in and a number out, for money edited outside a\n * form — a budget row, a table cell (kastlan 52: new-budget-page edited a CHF amount per\n * row with `NumberField` because AmountInput is string-valued and reports every\n * keystroke, \"1200+\" included, so a number-state row needed its own parse-and-settle\n * glue). This is that glue, the same one `RhfMoneyField` has: the text being typed\n * lives here, and only a settled figure reaches `onCommit`.\n *\n * The currency chip, the calculator, the numpad, the locale's decimal mark, the\n * rounding to the currency's minor unit and `min` / `max` are AmountInput's. A caller-\n * owned sign (`negative`) is not offered: the figure here carries its own minus.\n *\n * So are two props a table cell needs (keksdose K4, K6): `error`, the message under the\n * field that paints and describes it like {@link Input}'s, and `calculator={false}`,\n * for an amount in a close-on-blur inline editor, where a click on the calculator icon\n * blurs the field and tears the editor down before the popover can open (typed\n * calculations still evaluate).\n *\n * `inputClassName` (0.23, keksdose G7) styles the `<input>` itself — `text-end` for a\n * money column — where `className` sizes the wrapper; see {@link AmountInput}'s.\n *\n * LOCKED (0.34, round 0.34 C2): a row that saves itself passes `commit` (or a\n * `disabledReason` of its own), AmountInput's — under a locked `WriteLockProvider` the\n * field stays in the tab order showing its amount, `readOnly`, with the lock's reason in\n * the kit Tooltip and its description; the calculator, the numpad and the currency\n * picker are off, and `onCommit` is never called. `disabled` takes it out of the tab\n * order, which is what a lock must not do.\n *\n * This, not a `NumberField` with `digits={2}`, is the number-valued field for money:\n * it settles to the CURRENCY's minor unit (JPY 0, CHF 2) and `digits` takes a unit\n * price's finer scale (kastlan 5).\n *\n * ```tsx\n * <MoneyField aria-label=\"Amount\" currency=\"CHF\" value={row.amount}\n * onCommit={(amount) => updateRow(row.id, { amount })} />\n * ```\n */\nexport function MoneyField({ value, onCommit, ref, ...props }: MoneyFieldProps) {\n const money = useMoneyDraft(value);\n return (\n <AmountInput\n {...props}\n ref={ref}\n value={money.draft}\n onChange={money.change}\n onCommit={(text) => {\n // No number (\"-\" alone): the draft is back on the stored amount, nothing commits.\n const next = money.settle(text);\n if (next !== undefined && next !== value) onCommit(next);\n }}\n />\n );\n}\n"],"mappings":";AA6DI;AA5DJ,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAwDvB,SAAS,WAAW,EAAE,OAAO,UAAU,KAAK,GAAG,MAAM,GAAoB;AAC9E,QAAM,QAAQ,cAAc,KAAK;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,OAAO,MAAM;AAAA,MACb,UAAU,MAAM;AAAA,MAChB,UAAU,CAAC,SAAS;AAElB,cAAM,OAAO,MAAM,OAAO,IAAI;AAC9B,YAAI,SAAS,UAAa,SAAS,MAAO,UAAS,IAAI;AAAA,MACzD;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,5 @@
1
+ import type { MonthPickerLabels } from "./month-picker.js";
2
+ /** The English starting point every override is merged onto. Exported (unlike the
3
+ * calendar's) because it is asked for by name: a host building its own translation
4
+ * table can spread it rather than re-typing four keys to change one. */
5
+ export declare const DEFAULT_MONTH_PICKER_LABELS: MonthPickerLabels;
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ const DEFAULT_MONTH_PICKER_LABELS = {
3
+ previousYear: "Previous year",
4
+ nextYear: "Next year",
5
+ panel: "Choose a month",
6
+ month: (monthYear) => monthYear,
7
+ previousMonth: "Previous month",
8
+ nextMonth: "Next month",
9
+ today: "Today",
10
+ yearPanel: "Choose a year",
11
+ earlierYears: "Earlier years",
12
+ laterYears: "Later years",
13
+ thisYear: "This year"
14
+ };
15
+ export {
16
+ DEFAULT_MONTH_PICKER_LABELS
17
+ };
18
+ //# sourceMappingURL=month-picker-labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/month-picker-labels.ts"],"sourcesContent":["// The English words of ./month-picker, in a module with no component code: the English\n// catalogue (src/i18n/defaults.ts) imports them without the component, so `en` loads as one\n// chunk like the other languages (0.34, KS U8). ./month-picker re-exports them.\n\nimport type { MonthPickerLabels } from \"./month-picker\";\n\n/** The English starting point every override is merged onto. Exported (unlike the\n * calendar's) because it is asked for by name: a host building its own translation\n * table can spread it rather than re-typing four keys to change one. */\nexport const DEFAULT_MONTH_PICKER_LABELS: MonthPickerLabels = {\n previousYear: \"Previous year\",\n nextYear: \"Next year\",\n panel: \"Choose a month\",\n month: (monthYear) => monthYear,\n previousMonth: \"Previous month\",\n nextMonth: \"Next month\",\n today: \"Today\",\n yearPanel: \"Choose a year\",\n earlierYears: \"Earlier years\",\n laterYears: \"Later years\",\n thisYear: \"This year\",\n};\n"],"mappings":";AASO,MAAM,8BAAiD;AAAA,EAC5D,cAAc;AAAA,EACd,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO,CAAC,cAAc;AAAA,EACtB,eAAe;AAAA,EACf,WAAW;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,UAAU;AACZ;","names":[]}