@eifi1/ui-kit 0.33.1 → 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 (1534) hide show
  1. package/README.md +444 -282
  2. package/dist/account/account-parts.d.ts +6 -8
  3. package/dist/account/account-parts.js +1 -2
  4. package/dist/account/account-parts.js.map +1 -1
  5. package/dist/{components → account}/account-settings-labels.d.ts +16 -10
  6. package/dist/{components → account}/account-settings-labels.js +3 -1
  7. package/dist/account/account-settings-labels.js.map +1 -0
  8. package/dist/{components → account}/account-settings.d.ts +53 -23
  9. package/dist/{components → account}/account-settings.js +97 -26
  10. package/dist/account/account-settings.js.map +1 -0
  11. package/dist/account/data-export-setting-labels.d.ts +2 -0
  12. package/dist/account/data-export-setting-labels.js +15 -0
  13. package/dist/account/data-export-setting-labels.js.map +1 -0
  14. package/dist/account/data-export-setting.d.ts +9 -11
  15. package/dist/account/data-export-setting.js +11 -27
  16. package/dist/account/data-export-setting.js.map +1 -1
  17. package/dist/account/delete-account-setting-labels.d.ts +2 -0
  18. package/dist/account/delete-account-setting-labels.js +23 -0
  19. package/dist/account/delete-account-setting-labels.js.map +1 -0
  20. package/dist/account/delete-account-setting.d.ts +132 -101
  21. package/dist/account/delete-account-setting.js +7 -23
  22. package/dist/account/delete-account-setting.js.map +1 -1
  23. package/dist/account/email-change-setting-labels.d.ts +2 -0
  24. package/dist/account/email-change-setting-labels.js +28 -0
  25. package/dist/account/email-change-setting-labels.js.map +1 -0
  26. package/dist/account/email-change-setting.d.ts +10 -12
  27. package/dist/account/email-change-setting.js +11 -30
  28. package/dist/account/email-change-setting.js.map +1 -1
  29. package/dist/{components → account}/passkeys-setting.d.ts +9 -12
  30. package/dist/{components → account}/passkeys-setting.js +10 -7
  31. package/dist/account/passkeys-setting.js.map +1 -0
  32. package/dist/account/sessions-setting-labels.d.ts +2 -0
  33. package/dist/account/sessions-setting-labels.js +22 -0
  34. package/dist/account/sessions-setting-labels.js.map +1 -0
  35. package/dist/account/sessions-setting.d.ts +12 -14
  36. package/dist/account/sessions-setting.js +8 -23
  37. package/dist/account/sessions-setting.js.map +1 -1
  38. package/dist/admin/admin-action-confirm-labels.d.ts +2 -0
  39. package/dist/admin/admin-action-confirm-labels.js +16 -0
  40. package/dist/admin/admin-action-confirm-labels.js.map +1 -0
  41. package/dist/admin/admin-action-confirm.d.ts +156 -101
  42. package/dist/admin/admin-action-confirm.js +17 -22
  43. package/dist/admin/admin-action-confirm.js.map +1 -1
  44. package/dist/admin/admin-action-log-labels.d.ts +2 -0
  45. package/dist/admin/admin-action-log-labels.js +73 -0
  46. package/dist/admin/admin-action-log-labels.js.map +1 -0
  47. package/dist/admin/admin-action-log.d.ts +98 -22
  48. package/dist/admin/admin-action-log.js +48 -45
  49. package/dist/admin/admin-action-log.js.map +1 -1
  50. package/dist/admin/admin-parts.d.ts +7 -14
  51. package/dist/admin/admin-parts.js +0 -4
  52. package/dist/admin/admin-parts.js.map +1 -1
  53. package/dist/admin/invitations-panel-labels.d.ts +2 -0
  54. package/dist/admin/invitations-panel-labels.js +29 -0
  55. package/dist/admin/invitations-panel-labels.js.map +1 -0
  56. package/dist/admin/invitations-panel.d.ts +167 -101
  57. package/dist/admin/invitations-panel.js +12 -31
  58. package/dist/admin/invitations-panel.js.map +1 -1
  59. package/dist/admin/plan-change-labels.d.ts +2 -0
  60. package/dist/admin/plan-change-labels.js +22 -0
  61. package/dist/admin/plan-change-labels.js.map +1 -0
  62. package/dist/admin/plan-change.d.ts +244 -101
  63. package/dist/admin/plan-change.js +16 -24
  64. package/dist/admin/plan-change.js.map +1 -1
  65. package/dist/admin/reviewer-scope-editor-labels.d.ts +2 -0
  66. package/dist/admin/reviewer-scope-editor-labels.js +14 -0
  67. package/dist/admin/reviewer-scope-editor-labels.js.map +1 -0
  68. package/dist/admin/reviewer-scope-editor.d.ts +95 -101
  69. package/dist/admin/reviewer-scope-editor.js +5 -13
  70. package/dist/admin/reviewer-scope-editor.js.map +1 -1
  71. package/dist/admin/role-select-labels.d.ts +2 -0
  72. package/dist/admin/role-select-labels.js +15 -0
  73. package/dist/admin/role-select-labels.js.map +1 -0
  74. package/dist/admin/role-select.d.ts +136 -101
  75. package/dist/admin/role-select.js +7 -18
  76. package/dist/admin/role-select.js.map +1 -1
  77. package/dist/admin/transfer-ownership-dialog-labels.d.ts +2 -0
  78. package/dist/admin/transfer-ownership-dialog-labels.js +18 -0
  79. package/dist/admin/transfer-ownership-dialog-labels.js.map +1 -0
  80. package/dist/admin/transfer-ownership-dialog.d.ts +81 -101
  81. package/dist/admin/transfer-ownership-dialog.js +3 -15
  82. package/dist/admin/transfer-ownership-dialog.js.map +1 -1
  83. package/dist/admin/user-roster-labels.d.ts +2 -0
  84. package/dist/admin/user-roster-labels.js +16 -0
  85. package/dist/admin/user-roster-labels.js.map +1 -0
  86. package/dist/admin/user-roster.d.ts +225 -101
  87. package/dist/admin/user-roster.js +4 -14
  88. package/dist/admin/user-roster.js.map +1 -1
  89. package/dist/auth/accept-invitation-labels.d.ts +2 -0
  90. package/dist/auth/accept-invitation-labels.js +20 -0
  91. package/dist/auth/accept-invitation-labels.js.map +1 -0
  92. package/dist/auth/accept-invitation.d.ts +11 -13
  93. package/dist/auth/accept-invitation.js +3 -16
  94. package/dist/auth/accept-invitation.js.map +1 -1
  95. package/dist/auth/auth-errors.d.ts +34 -23
  96. package/dist/auth/auth-errors.js +8 -4
  97. package/dist/auth/auth-errors.js.map +1 -1
  98. package/dist/auth/complete-name-dialog-labels.d.ts +2 -0
  99. package/dist/auth/complete-name-dialog-labels.js +14 -0
  100. package/dist/auth/complete-name-dialog-labels.js.map +1 -0
  101. package/dist/auth/complete-name-dialog.d.ts +9 -11
  102. package/dist/auth/complete-name-dialog.js +4 -11
  103. package/dist/auth/complete-name-dialog.js.map +1 -1
  104. package/dist/auth/email-tag.d.ts +2 -4
  105. package/dist/auth/forgot-password-form-labels.d.ts +3 -0
  106. package/dist/auth/forgot-password-form-labels.js +17 -0
  107. package/dist/auth/forgot-password-form-labels.js.map +1 -0
  108. package/dist/auth/forgot-password-form.d.ts +9 -12
  109. package/dist/auth/forgot-password-form.js +6 -15
  110. package/dist/auth/forgot-password-form.js.map +1 -1
  111. package/dist/auth/form-rules.d.ts +5 -7
  112. package/dist/auth/new-password-fields.d.ts +4 -8
  113. package/dist/auth/new-password-fields.js +1 -1
  114. package/dist/auth/new-password-fields.js.map +1 -1
  115. package/dist/auth/not-found-page-labels.d.ts +2 -0
  116. package/dist/auth/not-found-page-labels.js +11 -0
  117. package/dist/auth/not-found-page-labels.js.map +1 -0
  118. package/dist/auth/not-found-page.d.ts +9 -11
  119. package/dist/auth/not-found-page.js +5 -10
  120. package/dist/auth/not-found-page.js.map +1 -1
  121. package/dist/auth/register-form-labels.d.ts +3 -0
  122. package/dist/auth/register-form-labels.js +28 -0
  123. package/dist/auth/register-form-labels.js.map +1 -0
  124. package/dist/auth/register-form.d.ts +174 -101
  125. package/dist/auth/register-form.js +11 -31
  126. package/dist/auth/register-form.js.map +1 -1
  127. package/dist/auth/reset-password-form-labels.d.ts +3 -0
  128. package/dist/auth/reset-password-form-labels.js +24 -0
  129. package/dist/auth/reset-password-form-labels.js.map +1 -0
  130. package/dist/auth/reset-password-form.d.ts +12 -15
  131. package/dist/auth/reset-password-form.js +6 -22
  132. package/dist/auth/reset-password-form.js.map +1 -1
  133. package/dist/auth/sign-in-form-labels.d.ts +3 -0
  134. package/dist/auth/sign-in-form-labels.js +42 -0
  135. package/dist/auth/sign-in-form-labels.js.map +1 -0
  136. package/dist/auth/sign-in-form.d.ts +15 -19
  137. package/dist/auth/sign-in-form.js +12 -46
  138. package/dist/auth/sign-in-form.js.map +1 -1
  139. package/dist/auth/status-parts.d.ts +13 -17
  140. package/dist/auth/status-parts.js +3 -3
  141. package/dist/auth/status-parts.js.map +1 -1
  142. package/dist/auth/verify-email-labels.d.ts +2 -0
  143. package/dist/auth/verify-email-labels.js +25 -0
  144. package/dist/auth/verify-email-labels.js.map +1 -0
  145. package/dist/auth/verify-email.d.ts +15 -17
  146. package/dist/auth/verify-email.js +4 -21
  147. package/dist/auth/verify-email.js.map +1 -1
  148. package/dist/billing/billing-banner.d.ts +8 -109
  149. package/dist/billing/billing-banner.js +2 -1
  150. package/dist/billing/billing-banner.js.map +1 -1
  151. package/dist/billing/billing-labels.d.ts +168 -101
  152. package/dist/billing/billing-labels.js.map +1 -1
  153. package/dist/billing/billing-lock.d.ts +10 -110
  154. package/dist/billing/billing-overview.d.ts +7 -109
  155. package/dist/billing/billing-standing.d.ts +6 -108
  156. package/dist/billing/checkout-processing.d.ts +8 -111
  157. package/dist/billing/checkout-processing.js +2 -9
  158. package/dist/billing/checkout-processing.js.map +1 -1
  159. package/dist/billing/checkout-return.d.ts +5 -7
  160. package/dist/billing/pay-page.d.ts +15 -117
  161. package/dist/billing/plan-card.d.ts +14 -115
  162. package/dist/billing/plan-card.js +15 -13
  163. package/dist/billing/plan-card.js.map +1 -1
  164. package/dist/billing/plan-limit-notice.d.ts +8 -109
  165. package/dist/billing/plan-limit-notice.js +1 -1
  166. package/dist/billing/plan-limit-notice.js.map +1 -1
  167. package/dist/billing/plan-limit-toast.d.ts +6 -107
  168. package/dist/billing/plan-limit.d.ts +2 -4
  169. package/dist/billing/plan-price.d.ts +10 -12
  170. package/dist/billing/subscription-actions.d.ts +6 -109
  171. package/dist/billing/subscription-actions.js +2 -2
  172. package/dist/billing/subscription-actions.js.map +1 -1
  173. package/dist/billing/subscription-status-chip.d.ts +7 -108
  174. package/dist/chart.d.ts +12 -113
  175. package/dist/chart.js +4 -0
  176. package/dist/chart.js.map +1 -1
  177. package/dist/components/account-chips-labels.d.ts +10 -0
  178. package/dist/components/account-chips-labels.js +15 -0
  179. package/dist/components/account-chips-labels.js.map +1 -0
  180. package/dist/components/account-chips.d.ts +22 -44
  181. package/dist/components/account-chips.js +9 -14
  182. package/dist/components/account-chips.js.map +1 -1
  183. package/dist/components/alert-banner.d.ts +15 -11
  184. package/dist/components/alert-banner.js +28 -18
  185. package/dist/components/alert-banner.js.map +1 -1
  186. package/dist/components/amount-input.d.ts +66 -110
  187. package/dist/components/amount-input.js +259 -283
  188. package/dist/components/amount-input.js.map +1 -1
  189. package/dist/components/appearance-labels.d.ts +6 -10
  190. package/dist/components/appearance-labels.js.map +1 -1
  191. package/dist/components/authed-image-labels.d.ts +2 -0
  192. package/dist/components/authed-image-labels.js +10 -0
  193. package/dist/components/authed-image-labels.js.map +1 -0
  194. package/dist/components/authed-image.d.ts +11 -13
  195. package/dist/components/authed-image.js +2 -6
  196. package/dist/components/authed-image.js.map +1 -1
  197. package/dist/components/autocomplete.d.ts +13 -11
  198. package/dist/components/autocomplete.js +33 -28
  199. package/dist/components/autocomplete.js.map +1 -1
  200. package/dist/components/breadcrumbs-labels.d.ts +2 -0
  201. package/dist/components/breadcrumbs-labels.js +9 -0
  202. package/dist/components/breadcrumbs-labels.js.map +1 -0
  203. package/dist/components/breadcrumbs.d.ts +10 -12
  204. package/dist/components/breadcrumbs.js +7 -10
  205. package/dist/components/breadcrumbs.js.map +1 -1
  206. package/dist/components/bulk-action-bar-labels.d.ts +2 -0
  207. package/dist/components/bulk-action-bar-labels.js +10 -0
  208. package/dist/components/bulk-action-bar-labels.js.map +1 -0
  209. package/dist/components/bulk-action-bar.d.ts +10 -12
  210. package/dist/components/bulk-action-bar.js +9 -12
  211. package/dist/components/bulk-action-bar.js.map +1 -1
  212. package/dist/components/button-group.d.ts +7 -110
  213. package/dist/components/button-group.js +5 -5
  214. package/dist/components/button-group.js.map +1 -1
  215. package/dist/components/button-look.d.ts +88 -0
  216. package/dist/components/button-look.js +91 -0
  217. package/dist/components/button-look.js.map +1 -0
  218. package/dist/components/button.d.ts +153 -0
  219. package/dist/components/button.js +165 -0
  220. package/dist/components/button.js.map +1 -0
  221. package/dist/components/calculator.d.ts +8 -107
  222. package/dist/components/calculator.js +10 -7
  223. package/dist/components/calculator.js.map +1 -1
  224. package/dist/components/calendar-heatmap-labels.d.ts +3 -0
  225. package/dist/components/calendar-heatmap-labels.js +12 -0
  226. package/dist/components/calendar-heatmap-labels.js.map +1 -0
  227. package/dist/components/calendar-heatmap.d.ts +13 -16
  228. package/dist/components/calendar-heatmap.js +7 -13
  229. package/dist/components/calendar-heatmap.js.map +1 -1
  230. package/dist/components/card.d.ts +145 -0
  231. package/dist/components/card.js +186 -0
  232. package/dist/components/card.js.map +1 -0
  233. package/dist/components/chart-height.d.ts +4 -7
  234. package/dist/components/chart-zoom-core.d.ts +202 -0
  235. package/dist/components/chart-zoom-core.js +334 -0
  236. package/dist/components/chart-zoom-core.js.map +1 -0
  237. package/dist/components/chart-zoom.d.ts +39 -205
  238. package/dist/components/chart-zoom.js +15 -316
  239. package/dist/components/chart-zoom.js.map +1 -1
  240. package/dist/components/chart.d.ts +11 -15
  241. package/dist/components/chart.js +11 -11
  242. package/dist/components/chart.js.map +1 -1
  243. package/dist/components/checkbox-group.d.ts +6 -10
  244. package/dist/components/checkbox-group.js +10 -9
  245. package/dist/components/checkbox-group.js.map +1 -1
  246. package/dist/components/checkbox.d.ts +8 -12
  247. package/dist/components/checkbox.js +20 -18
  248. package/dist/components/checkbox.js.map +1 -1
  249. package/dist/components/chip-input.d.ts +73 -0
  250. package/dist/components/chip-input.js +224 -0
  251. package/dist/components/chip-input.js.map +1 -0
  252. package/dist/components/chip-labels.d.ts +2 -0
  253. package/dist/components/chip-labels.js +12 -0
  254. package/dist/components/chip-labels.js.map +1 -0
  255. package/dist/components/chip.d.ts +18 -93
  256. package/dist/components/chip.js +74 -426
  257. package/dist/components/chip.js.map +1 -1
  258. package/dist/components/choice-card.d.ts +21 -18
  259. package/dist/components/choice-card.js +45 -45
  260. package/dist/components/choice-card.js.map +1 -1
  261. package/dist/components/column-mapper-labels.d.ts +5 -0
  262. package/dist/components/column-mapper-labels.js +34 -0
  263. package/dist/components/column-mapper-labels.js.map +1 -0
  264. package/dist/components/column-mapper.d.ts +15 -17
  265. package/dist/components/column-mapper.js +11 -37
  266. package/dist/components/column-mapper.js.map +1 -1
  267. package/dist/components/combobox-core.d.ts +79 -40
  268. package/dist/components/combobox-core.js +187 -121
  269. package/dist/components/combobox-core.js.map +1 -1
  270. package/dist/components/combobox-suggestions.d.ts +76 -0
  271. package/dist/components/combobox-suggestions.js +56 -0
  272. package/dist/components/combobox-suggestions.js.map +1 -0
  273. package/dist/components/combobox.d.ts +14 -159
  274. package/dist/components/combobox.js +40 -507
  275. package/dist/components/combobox.js.map +1 -1
  276. package/dist/components/confirm-dialog-labels.d.ts +7 -0
  277. package/dist/components/confirm-dialog-labels.js +10 -0
  278. package/dist/components/confirm-dialog-labels.js.map +1 -0
  279. package/dist/components/confirm-dialog.d.ts +165 -101
  280. package/dist/components/confirm-dialog.js +2 -6
  281. package/dist/components/confirm-dialog.js.map +1 -1
  282. package/dist/components/copy-button-labels.d.ts +2 -0
  283. package/dist/components/copy-button-labels.js +12 -0
  284. package/dist/components/copy-button-labels.js.map +1 -0
  285. package/dist/components/copy-button.d.ts +70 -101
  286. package/dist/components/copy-button.js +4 -9
  287. package/dist/components/copy-button.js.map +1 -1
  288. package/dist/components/country-select-labels.d.ts +2 -0
  289. package/dist/components/country-select-labels.js +10 -0
  290. package/dist/components/country-select-labels.js.map +1 -0
  291. package/dist/components/country-select.d.ts +18 -15
  292. package/dist/components/country-select.js +49 -64
  293. package/dist/components/country-select.js.map +1 -1
  294. package/dist/components/currency-option-list.d.ts +63 -0
  295. package/dist/components/currency-option-list.js +135 -0
  296. package/dist/components/currency-option-list.js.map +1 -0
  297. package/dist/components/currency-select.d.ts +10 -30
  298. package/dist/components/currency-select.js +50 -133
  299. package/dist/components/currency-select.js.map +1 -1
  300. package/dist/components/danger-confirm-labels.d.ts +14 -0
  301. package/dist/components/danger-confirm-labels.js +17 -0
  302. package/dist/components/danger-confirm-labels.js.map +1 -0
  303. package/dist/components/danger-confirm.d.ts +448 -101
  304. package/dist/components/danger-confirm.js +40 -46
  305. package/dist/components/danger-confirm.js.map +1 -1
  306. package/dist/components/data-table-cells.d.ts +9 -24
  307. package/dist/components/data-table-cells.js +1 -1
  308. package/dist/components/data-table-cells.js.map +1 -1
  309. package/dist/components/data-table-column-settings.d.ts +16 -0
  310. package/dist/components/data-table-column-settings.js +119 -0
  311. package/dist/components/data-table-column-settings.js.map +1 -0
  312. package/dist/components/data-table-filter-popover.d.ts +5 -19
  313. package/dist/components/data-table-filter-popover.js +39 -22
  314. package/dist/components/data-table-filter-popover.js.map +1 -1
  315. package/dist/components/data-table-filters.d.ts +93 -15
  316. package/dist/components/data-table-filters.js +22 -7
  317. package/dist/components/data-table-filters.js.map +1 -1
  318. package/dist/components/data-table-head.d.ts +36 -0
  319. package/dist/components/data-table-head.js +190 -0
  320. package/dist/components/data-table-head.js.map +1 -0
  321. package/dist/components/data-table-labels.d.ts +124 -15
  322. package/dist/components/data-table-labels.js +9 -5
  323. package/dist/components/data-table-labels.js.map +1 -1
  324. package/dist/components/data-table-mobile.d.ts +106 -0
  325. package/dist/components/data-table-mobile.js +412 -0
  326. package/dist/components/data-table-mobile.js.map +1 -0
  327. package/dist/components/data-table-pagination.d.ts +6 -21
  328. package/dist/components/data-table-pagination.js +7 -7
  329. package/dist/components/data-table-pagination.js.map +1 -1
  330. package/dist/components/data-table-resize.d.ts +37 -0
  331. package/dist/components/data-table-resize.js +103 -0
  332. package/dist/components/data-table-resize.js.map +1 -0
  333. package/dist/components/data-table-row-actions.d.ts +24 -0
  334. package/dist/components/data-table-row-actions.js +95 -0
  335. package/dist/components/data-table-row-actions.js.map +1 -0
  336. package/dist/components/data-table-selection.d.ts +21 -0
  337. package/dist/components/data-table-selection.js +30 -0
  338. package/dist/components/data-table-selection.js.map +1 -0
  339. package/dist/components/data-table-shared.d.ts +77 -0
  340. package/dist/components/data-table-shared.js +77 -0
  341. package/dist/components/data-table-shared.js.map +1 -0
  342. package/dist/components/data-table-sort.d.ts +8 -10
  343. package/dist/components/data-table.d.ts +603 -15
  344. package/dist/components/data-table.js +134 -927
  345. package/dist/components/data-table.js.map +1 -1
  346. package/dist/components/date-field.d.ts +203 -0
  347. package/dist/components/date-field.js +270 -0
  348. package/dist/components/date-field.js.map +1 -0
  349. package/dist/components/date-picker.d.ts +6 -261
  350. package/dist/components/date-picker.js +24 -760
  351. package/dist/components/date-picker.js.map +1 -1
  352. package/dist/components/date-range-picker.d.ts +125 -0
  353. package/dist/components/date-range-picker.js +261 -0
  354. package/dist/components/date-range-picker.js.map +1 -0
  355. package/dist/components/description-list-labels.d.ts +2 -0
  356. package/dist/components/description-list-labels.js +8 -0
  357. package/dist/components/description-list-labels.js.map +1 -0
  358. package/dist/components/description-list.d.ts +13 -15
  359. package/dist/components/description-list.js +17 -11
  360. package/dist/components/description-list.js.map +1 -1
  361. package/dist/components/dialog-frame-labels.d.ts +2 -0
  362. package/dist/components/dialog-frame-labels.js +6 -0
  363. package/dist/components/dialog-frame-labels.js.map +1 -0
  364. package/dist/components/dialog-frame.d.ts +7 -11
  365. package/dist/components/dialog-frame.js +6 -6
  366. package/dist/components/dialog-frame.js.map +1 -1
  367. package/dist/components/disclosure.d.ts +6 -10
  368. package/dist/components/disclosure.js +11 -11
  369. package/dist/components/disclosure.js.map +1 -1
  370. package/dist/components/dropdown.d.ts +55 -27
  371. package/dist/components/dropdown.js +53 -30
  372. package/dist/components/dropdown.js.map +1 -1
  373. package/dist/components/empty-state.d.ts +64 -0
  374. package/dist/components/empty-state.js +70 -0
  375. package/dist/components/empty-state.js.map +1 -0
  376. package/dist/components/entity-combobox.d.ts +10 -11
  377. package/dist/components/entity-combobox.js +14 -13
  378. package/dist/components/entity-combobox.js.map +1 -1
  379. package/dist/components/error-boundary-labels.d.ts +2 -0
  380. package/dist/components/error-boundary-labels.js +19 -0
  381. package/dist/components/error-boundary-labels.js.map +1 -0
  382. package/dist/components/error-boundary.d.ts +17 -17
  383. package/dist/components/error-boundary.js +5 -17
  384. package/dist/components/error-boundary.js.map +1 -1
  385. package/dist/components/facing-pair.d.ts +7 -116
  386. package/dist/components/facing-pair.js +1 -1
  387. package/dist/components/facing-pair.js.map +1 -1
  388. package/dist/components/field-base.d.ts +260 -0
  389. package/dist/components/field-base.js +228 -0
  390. package/dist/components/field-base.js.map +1 -0
  391. package/dist/components/field-parts.d.ts +188 -87
  392. package/dist/components/field-parts.js +60 -33
  393. package/dist/components/field-parts.js.map +1 -1
  394. package/dist/components/field-strip.d.ts +19 -28
  395. package/dist/components/field-strip.js +2 -2
  396. package/dist/components/field-strip.js.map +1 -1
  397. package/dist/components/field-sync-labels.d.ts +2 -0
  398. package/dist/components/field-sync-labels.js +12 -0
  399. package/dist/components/field-sync-labels.js.map +1 -0
  400. package/dist/components/field-sync.d.ts +20 -19
  401. package/dist/components/field-sync.js +4 -10
  402. package/dist/components/field-sync.js.map +1 -1
  403. package/dist/components/field.d.ts +45 -10
  404. package/dist/components/field.js +10 -8
  405. package/dist/components/field.js.map +1 -1
  406. package/dist/components/file-button.d.ts +85 -101
  407. package/dist/components/file-button.js +23 -169
  408. package/dist/components/file-button.js.map +1 -1
  409. package/dist/components/file-dropzone.d.ts +9 -110
  410. package/dist/components/file-dropzone.js +22 -22
  411. package/dist/components/file-dropzone.js.map +1 -1
  412. package/dist/components/floating-panel-labels.d.ts +2 -0
  413. package/dist/components/floating-panel-labels.js +9 -0
  414. package/dist/components/floating-panel-labels.js.map +1 -0
  415. package/dist/components/floating-panel.d.ts +17 -21
  416. package/dist/components/floating-panel.js +19 -18
  417. package/dist/components/floating-panel.js.map +1 -1
  418. package/dist/components/focus-ring.d.ts +9 -6
  419. package/dist/components/focus-ring.js +2 -2
  420. package/dist/components/focus-ring.js.map +1 -1
  421. package/dist/components/form-actions-labels.d.ts +2 -0
  422. package/dist/components/form-actions-labels.js +10 -0
  423. package/dist/components/form-actions-labels.js.map +1 -0
  424. package/dist/components/form-actions.d.ts +280 -101
  425. package/dist/components/form-actions.js +10 -20
  426. package/dist/components/form-actions.js.map +1 -1
  427. package/dist/components/full-bleed-dialog.d.ts +7 -8
  428. package/dist/components/full-bleed-dialog.js +14 -13
  429. package/dist/components/full-bleed-dialog.js.map +1 -1
  430. package/dist/components/grouped-picker.d.ts +21 -16
  431. package/dist/components/grouped-picker.js +76 -62
  432. package/dist/components/grouped-picker.js.map +1 -1
  433. package/dist/components/help-popover.d.ts +60 -0
  434. package/dist/components/help-popover.js +48 -0
  435. package/dist/components/help-popover.js.map +1 -0
  436. package/dist/components/hover-menu.d.ts +17 -16
  437. package/dist/components/hover-menu.js +18 -17
  438. package/dist/components/hover-menu.js.map +1 -1
  439. package/dist/components/iban-input-labels.d.ts +2 -0
  440. package/dist/components/iban-input-labels.js +13 -0
  441. package/dist/components/iban-input-labels.js.map +1 -0
  442. package/dist/components/iban-input.d.ts +73 -101
  443. package/dist/components/iban-input.js +22 -15
  444. package/dist/components/iban-input.js.map +1 -1
  445. package/dist/components/icon-button.d.ts +300 -0
  446. package/dist/components/icon-button.js +465 -0
  447. package/dist/components/icon-button.js.map +1 -0
  448. package/dist/components/icon-picker-labels.d.ts +2 -0
  449. package/dist/components/icon-picker-labels.js +12 -0
  450. package/dist/components/icon-picker-labels.js.map +1 -0
  451. package/dist/components/icon-picker.d.ts +13 -13
  452. package/dist/components/icon-picker.js +18 -17
  453. package/dist/components/icon-picker.js.map +1 -1
  454. package/dist/components/image-grid-labels.d.ts +2 -0
  455. package/dist/components/image-grid-labels.js +10 -0
  456. package/dist/components/image-grid-labels.js.map +1 -0
  457. package/dist/components/image-grid.d.ts +12 -14
  458. package/dist/components/image-grid.js +6 -10
  459. package/dist/components/image-grid.js.map +1 -1
  460. package/dist/components/inline-edit-field-labels.d.ts +2 -0
  461. package/dist/components/inline-edit-field-labels.js +10 -0
  462. package/dist/components/inline-edit-field-labels.js.map +1 -0
  463. package/dist/components/inline-edit-field.d.ts +11 -13
  464. package/dist/components/inline-edit-field.js +11 -13
  465. package/dist/components/inline-edit-field.js.map +1 -1
  466. package/dist/components/inline-entity-combobox.d.ts +155 -0
  467. package/dist/components/inline-entity-combobox.js +467 -0
  468. package/dist/components/inline-entity-combobox.js.map +1 -0
  469. package/dist/components/input.d.ts +98 -0
  470. package/dist/components/input.js +219 -0
  471. package/dist/components/input.js.map +1 -0
  472. package/dist/components/jump-calendar.d.ts +8 -0
  473. package/dist/components/jump-calendar.js +274 -0
  474. package/dist/components/jump-calendar.js.map +1 -0
  475. package/dist/components/language-select.d.ts +20 -111
  476. package/dist/components/language-select.js +12 -7
  477. package/dist/components/language-select.js.map +1 -1
  478. package/dist/components/legal-labels.d.ts +2 -0
  479. package/dist/components/legal-labels.js +100 -0
  480. package/dist/components/legal-labels.js.map +1 -0
  481. package/dist/components/legal-page.d.ts +17 -118
  482. package/dist/components/legal-page.js +2 -2
  483. package/dist/components/legal-page.js.map +1 -1
  484. package/dist/components/legal.d.ts +353 -101
  485. package/dist/components/legal.js +7 -101
  486. package/dist/components/legal.js.map +1 -1
  487. package/dist/components/lightbox-labels.d.ts +2 -0
  488. package/dist/components/lightbox-labels.js +17 -0
  489. package/dist/components/lightbox-labels.js.map +1 -0
  490. package/dist/components/lightbox.d.ts +12 -14
  491. package/dist/components/lightbox.js +9 -19
  492. package/dist/components/lightbox.js.map +1 -1
  493. package/dist/components/line-items-labels.d.ts +2 -0
  494. package/dist/components/line-items-labels.js +13 -0
  495. package/dist/components/line-items-labels.js.map +1 -0
  496. package/dist/components/line-items.d.ts +16 -18
  497. package/dist/components/line-items.js +18 -26
  498. package/dist/components/line-items.js.map +1 -1
  499. package/dist/components/list-labels.d.ts +2 -0
  500. package/dist/components/list-labels.js +9 -0
  501. package/dist/components/list-labels.js.map +1 -0
  502. package/dist/components/list.d.ts +32 -21
  503. package/dist/components/list.js +41 -25
  504. package/dist/components/list.js.map +1 -1
  505. package/dist/components/loading-state.d.ts +5 -9
  506. package/dist/components/loading-state.js +2 -2
  507. package/dist/components/loading-state.js.map +1 -1
  508. package/dist/components/measured-grid-labels.d.ts +4 -0
  509. package/dist/components/measured-grid-labels.js +21 -0
  510. package/dist/components/measured-grid-labels.js.map +1 -0
  511. package/dist/components/measured-grid.d.ts +13 -17
  512. package/dist/components/measured-grid.js +31 -50
  513. package/dist/components/measured-grid.js.map +1 -1
  514. package/dist/components/menu-item.d.ts +10 -10
  515. package/dist/components/menu-item.js +9 -9
  516. package/dist/components/menu-item.js.map +1 -1
  517. package/dist/components/mini-calendar-labels.d.ts +4 -0
  518. package/dist/components/mini-calendar-labels.js +14 -0
  519. package/dist/components/mini-calendar-labels.js.map +1 -0
  520. package/dist/components/mini-calendar.d.ts +10 -14
  521. package/dist/components/mini-calendar.js +22 -29
  522. package/dist/components/mini-calendar.js.map +1 -1
  523. package/dist/components/modal.d.ts +26 -18
  524. package/dist/components/modal.js +8 -11
  525. package/dist/components/modal.js.map +1 -1
  526. package/dist/components/money-draft.d.ts +34 -0
  527. package/dist/components/money-draft.js +39 -0
  528. package/dist/components/money-draft.js.map +1 -0
  529. package/dist/components/money-field.d.ts +13 -111
  530. package/dist/components/money-field.js +6 -22
  531. package/dist/components/money-field.js.map +1 -1
  532. package/dist/components/month-picker-labels.d.ts +5 -0
  533. package/dist/components/month-picker-labels.js +18 -0
  534. package/dist/components/month-picker-labels.js.map +1 -0
  535. package/dist/components/month-picker.d.ts +15 -13
  536. package/dist/components/month-picker.js +34 -32
  537. package/dist/components/month-picker.js.map +1 -1
  538. package/dist/components/multi-entity-combobox.d.ts +9 -11
  539. package/dist/components/multi-entity-combobox.js +14 -13
  540. package/dist/components/multi-entity-combobox.js.map +1 -1
  541. package/dist/components/multi-select.d.ts +81 -21
  542. package/dist/components/multi-select.js +171 -197
  543. package/dist/components/multi-select.js.map +1 -1
  544. package/dist/components/nav-pills.d.ts +9 -10
  545. package/dist/components/nav-pills.js +53 -42
  546. package/dist/components/nav-pills.js.map +1 -1
  547. package/dist/components/number-field.d.ts +6 -111
  548. package/dist/components/number-field.js +2 -3
  549. package/dist/components/number-field.js.map +1 -1
  550. package/dist/components/number-input.d.ts +30 -111
  551. package/dist/components/number-input.js +34 -66
  552. package/dist/components/number-input.js.map +1 -1
  553. package/dist/components/numeric-field.d.ts +85 -0
  554. package/dist/components/numeric-field.js +71 -0
  555. package/dist/components/numeric-field.js.map +1 -0
  556. package/dist/components/numpad-sheet.d.ts +5 -108
  557. package/dist/components/numpad-sheet.js +7 -7
  558. package/dist/components/numpad-sheet.js.map +1 -1
  559. package/dist/components/one-time-code-input.d.ts +6 -7
  560. package/dist/components/one-time-code-input.js +119 -124
  561. package/dist/components/one-time-code-input.js.map +1 -1
  562. package/dist/components/page-contents-labels.d.ts +2 -0
  563. package/dist/components/page-contents-labels.js +8 -0
  564. package/dist/components/page-contents-labels.js.map +1 -0
  565. package/dist/components/page-contents.d.ts +13 -15
  566. package/dist/components/page-contents.js +7 -9
  567. package/dist/components/page-contents.js.map +1 -1
  568. package/dist/components/page-header.d.ts +10 -10
  569. package/dist/components/page-header.js +3 -3
  570. package/dist/components/page-header.js.map +1 -1
  571. package/dist/components/password-strength-labels.d.ts +2 -0
  572. package/dist/components/password-strength-labels.js +21 -0
  573. package/dist/components/password-strength-labels.js.map +1 -0
  574. package/dist/components/password-strength.d.ts +15 -17
  575. package/dist/components/password-strength.js +7 -22
  576. package/dist/components/password-strength.js.map +1 -1
  577. package/dist/components/phone-input-labels.d.ts +2 -0
  578. package/dist/components/phone-input-labels.js +9 -0
  579. package/dist/components/phone-input-labels.js.map +1 -0
  580. package/dist/components/phone-input.d.ts +75 -101
  581. package/dist/components/phone-input.js +20 -23
  582. package/dist/components/phone-input.js.map +1 -1
  583. package/dist/components/picker-sheet.d.ts +20 -8
  584. package/dist/components/picker-sheet.js +22 -11
  585. package/dist/components/picker-sheet.js.map +1 -1
  586. package/dist/components/pie-chart-labels.d.ts +2 -4
  587. package/dist/components/pie-chart.d.ts +8 -11
  588. package/dist/components/pie-chart.js +5 -5
  589. package/dist/components/pie-chart.js.map +1 -1
  590. package/dist/components/popover-labels.d.ts +2 -0
  591. package/dist/components/popover-labels.js +11 -0
  592. package/dist/components/popover-labels.js.map +1 -0
  593. package/dist/components/popover.d.ts +13 -11
  594. package/dist/components/popover.js +15 -21
  595. package/dist/components/popover.js.map +1 -1
  596. package/dist/components/progress-bar-labels.d.ts +2 -0
  597. package/dist/components/progress-bar-labels.js +9 -0
  598. package/dist/components/progress-bar-labels.js.map +1 -0
  599. package/dist/components/progress-bar.d.ts +16 -15
  600. package/dist/components/progress-bar.js +22 -20
  601. package/dist/components/progress-bar.js.map +1 -1
  602. package/dist/components/qr-code.d.ts +4 -8
  603. package/dist/components/qr-code.js.map +1 -1
  604. package/dist/components/reauth-dialog-labels.d.ts +2 -0
  605. package/dist/components/reauth-dialog-labels.js +12 -0
  606. package/dist/components/reauth-dialog-labels.js.map +1 -0
  607. package/dist/components/reauth-dialog.d.ts +8 -10
  608. package/dist/components/reauth-dialog.js +3 -8
  609. package/dist/components/reauth-dialog.js.map +1 -1
  610. package/dist/components/row-actions-labels.d.ts +2 -0
  611. package/dist/components/row-actions-labels.js +9 -0
  612. package/dist/components/row-actions-labels.js.map +1 -0
  613. package/dist/components/row-actions.d.ts +224 -101
  614. package/dist/components/row-actions.js +4 -5
  615. package/dist/components/row-actions.js.map +1 -1
  616. package/dist/components/scroll-area.d.ts +6 -9
  617. package/dist/components/scroll-area.js +4 -10
  618. package/dist/components/scroll-area.js.map +1 -1
  619. package/dist/components/search-field.d.ts +12 -27
  620. package/dist/components/search-field.js +13 -16
  621. package/dist/components/search-field.js.map +1 -1
  622. package/dist/components/select.d.ts +69 -0
  623. package/dist/components/select.js +164 -0
  624. package/dist/components/select.js.map +1 -0
  625. package/dist/components/separator.d.ts +3 -7
  626. package/dist/components/separator.js.map +1 -1
  627. package/dist/components/series-chart-axes.d.ts +120 -0
  628. package/dist/components/series-chart-axes.js +164 -0
  629. package/dist/components/series-chart-axes.js.map +1 -0
  630. package/dist/components/series-chart-budget.d.ts +8 -9
  631. package/dist/components/series-chart-labels.d.ts +2 -4
  632. package/dist/components/series-chart-thin.d.ts +34 -0
  633. package/dist/components/series-chart-thin.js +103 -0
  634. package/dist/components/series-chart-thin.js.map +1 -0
  635. package/dist/components/series-chart-ticks.d.ts +9 -11
  636. package/dist/components/series-chart.d.ts +64 -214
  637. package/dist/components/series-chart.js +69 -160
  638. package/dist/components/series-chart.js.map +1 -1
  639. package/dist/components/server-wake-labels.d.ts +2 -0
  640. package/dist/components/server-wake-labels.js +9 -0
  641. package/dist/components/server-wake-labels.js.map +1 -0
  642. package/dist/components/server-wake.d.ts +32 -23
  643. package/dist/components/server-wake.js +15 -35
  644. package/dist/components/server-wake.js.map +1 -1
  645. package/dist/components/settings-fields.d.ts +46 -118
  646. package/dist/components/settings-fields.js +13 -3
  647. package/dist/components/settings-fields.js.map +1 -1
  648. package/dist/components/share-card-labels.d.ts +2 -0
  649. package/dist/components/share-card-labels.js +29 -0
  650. package/dist/components/share-card-labels.js.map +1 -0
  651. package/dist/components/share-card.d.ts +188 -101
  652. package/dist/components/share-card.js +16 -34
  653. package/dist/components/share-card.js.map +1 -1
  654. package/dist/components/sign-chip-labels.d.ts +2 -0
  655. package/dist/components/sign-chip-labels.js +11 -0
  656. package/dist/components/sign-chip-labels.js.map +1 -0
  657. package/dist/components/sign-chip.d.ts +7 -9
  658. package/dist/components/sign-chip.js +2 -7
  659. package/dist/components/sign-chip.js.map +1 -1
  660. package/dist/components/signature-pad-labels.d.ts +2 -0
  661. package/dist/components/signature-pad-labels.js +23 -0
  662. package/dist/components/signature-pad-labels.js.map +1 -0
  663. package/dist/components/signature-pad.d.ts +16 -15
  664. package/dist/components/signature-pad.js +22 -35
  665. package/dist/components/signature-pad.js.map +1 -1
  666. package/dist/components/signed-amount-labels.d.ts +2 -0
  667. package/dist/components/signed-amount-labels.js +9 -0
  668. package/dist/components/signed-amount-labels.js.map +1 -0
  669. package/dist/components/signed-amount.d.ts +19 -21
  670. package/dist/components/signed-amount.js +12 -15
  671. package/dist/components/signed-amount.js.map +1 -1
  672. package/dist/components/skeleton.d.ts +5 -9
  673. package/dist/components/skeleton.js +1 -1
  674. package/dist/components/skeleton.js.map +1 -1
  675. package/dist/components/slider.d.ts +16 -11
  676. package/dist/components/slider.js +23 -18
  677. package/dist/components/slider.js.map +1 -1
  678. package/dist/components/sparkline-labels.d.ts +2 -0
  679. package/dist/components/sparkline-labels.js +13 -0
  680. package/dist/components/sparkline-labels.js.map +1 -0
  681. package/dist/components/sparkline.d.ts +10 -12
  682. package/dist/components/sparkline.js +10 -17
  683. package/dist/components/sparkline.js.map +1 -1
  684. package/dist/components/spinner.d.ts +45 -0
  685. package/dist/components/spinner.js +39 -0
  686. package/dist/components/spinner.js.map +1 -0
  687. package/dist/components/stat-tile-labels.d.ts +2 -0
  688. package/dist/components/stat-tile-labels.js +14 -0
  689. package/dist/components/stat-tile-labels.js.map +1 -0
  690. package/dist/components/stat-tile.d.ts +15 -17
  691. package/dist/components/stat-tile.js +25 -32
  692. package/dist/components/stat-tile.js.map +1 -1
  693. package/dist/components/status-dot.d.ts +8 -20
  694. package/dist/components/status-dot.js +13 -12
  695. package/dist/components/status-dot.js.map +1 -1
  696. package/dist/components/swatch-picker-labels.d.ts +2 -0
  697. package/dist/components/swatch-picker-labels.js +9 -0
  698. package/dist/components/swatch-picker-labels.js.map +1 -0
  699. package/dist/components/swatch-picker.d.ts +14 -14
  700. package/dist/components/swatch-picker.js +14 -8
  701. package/dist/components/swatch-picker.js.map +1 -1
  702. package/dist/components/swipeable-row.d.ts +14 -27
  703. package/dist/components/swipeable-row.js +2 -2
  704. package/dist/components/swipeable-row.js.map +1 -1
  705. package/dist/components/switch.d.ts +10 -13
  706. package/dist/components/switch.js +13 -12
  707. package/dist/components/switch.js.map +1 -1
  708. package/dist/components/table.d.ts +28 -31
  709. package/dist/components/table.js +15 -15
  710. package/dist/components/table.js.map +1 -1
  711. package/dist/components/tabs.d.ts +182 -0
  712. package/dist/components/tabs.js +312 -0
  713. package/dist/components/tabs.js.map +1 -0
  714. package/dist/components/text-link.d.ts +17 -119
  715. package/dist/components/text-link.js +7 -7
  716. package/dist/components/text-link.js.map +1 -1
  717. package/dist/components/text.d.ts +14 -13
  718. package/dist/components/text.js +5 -5
  719. package/dist/components/text.js.map +1 -1
  720. package/dist/components/textarea.d.ts +20 -0
  721. package/dist/components/textarea.js +161 -0
  722. package/dist/components/textarea.js.map +1 -0
  723. package/dist/components/tile-radio.d.ts +6 -10
  724. package/dist/components/tile-radio.js +6 -6
  725. package/dist/components/tile-radio.js.map +1 -1
  726. package/dist/components/time-input.d.ts +5 -108
  727. package/dist/components/time-input.js +14 -5
  728. package/dist/components/time-input.js.map +1 -1
  729. package/dist/components/toast-labels.d.ts +2 -0
  730. package/dist/components/toast-labels.js +11 -0
  731. package/dist/components/toast-labels.js.map +1 -0
  732. package/dist/components/toast.d.ts +21 -23
  733. package/dist/components/toast.js +1 -6
  734. package/dist/components/toast.js.map +1 -1
  735. package/dist/components/toggle-group.d.ts +26 -26
  736. package/dist/components/toggle-group.js +43 -19
  737. package/dist/components/toggle-group.js.map +1 -1
  738. package/dist/components/toggle-legend.d.ts +18 -21
  739. package/dist/components/toggle-legend.js +3 -3
  740. package/dist/components/toggle-legend.js.map +1 -1
  741. package/dist/components/tooltip.d.ts +16 -15
  742. package/dist/components/tooltip.js +4 -9
  743. package/dist/components/tooltip.js.map +1 -1
  744. package/dist/components/translation-review-editor.d.ts +8 -10
  745. package/dist/components/translation-review-editor.js +6 -5
  746. package/dist/components/translation-review-editor.js.map +1 -1
  747. package/dist/components/translation-review-labels.d.ts +4 -7
  748. package/dist/components/translation-review-parts.d.ts +19 -28
  749. package/dist/components/translation-review-parts.js +4 -7
  750. package/dist/components/translation-review-parts.js.map +1 -1
  751. package/dist/components/translation-review.d.ts +26 -24
  752. package/dist/components/translation-review.js +13 -10
  753. package/dist/components/translation-review.js.map +1 -1
  754. package/dist/components/tree-view.d.ts +7 -11
  755. package/dist/components/tree-view.js +8 -8
  756. package/dist/components/tree-view.js.map +1 -1
  757. package/dist/components/treemap.d.ts +9 -13
  758. package/dist/components/trigger-aria.d.ts +2 -4
  759. package/dist/components/ui-labels.d.ts +5 -0
  760. package/dist/components/ui-labels.js +20 -0
  761. package/dist/components/ui-labels.js.map +1 -0
  762. package/dist/components/use-anchor-dir.d.ts +3 -6
  763. package/dist/components/use-mobile-reveal.d.ts +2 -6
  764. package/dist/components/use-table-state.d.ts +154 -15
  765. package/dist/components/user-avatar.d.ts +8 -21
  766. package/dist/components/user-avatar.js +1 -1
  767. package/dist/components/user-avatar.js.map +1 -1
  768. package/dist/components/wizard-stepper.d.ts +6 -6
  769. package/dist/components/wizard-stepper.js +4 -3
  770. package/dist/components/wizard-stepper.js.map +1 -1
  771. package/dist/components/write-lock-labels.d.ts +2 -0
  772. package/dist/components/write-lock-labels.js +8 -0
  773. package/dist/components/write-lock-labels.js.map +1 -0
  774. package/dist/components/write-lock.d.ts +16 -18
  775. package/dist/components/write-lock.js +4 -8
  776. package/dist/components/write-lock.js.map +1 -1
  777. package/dist/data-table.d.ts +10 -18
  778. package/dist/data-table.js.map +1 -1
  779. package/dist/demo/demo-banner.d.ts +10 -13
  780. package/dist/demo/demo-banner.js +5 -19
  781. package/dist/demo/demo-banner.js.map +1 -1
  782. package/dist/demo/demo-countdown.d.ts +7 -9
  783. package/dist/demo/demo-ended.d.ts +10 -13
  784. package/dist/demo/demo-ended.js +4 -4
  785. package/dist/demo/demo-ended.js.map +1 -1
  786. package/dist/demo/demo-labels.d.ts +4 -5
  787. package/dist/demo/demo-labels.js.map +1 -1
  788. package/dist/demo/demo-session.d.ts +3 -5
  789. package/dist/demo/demo-start.d.ts +8 -11
  790. package/dist/demo/demo-start.js +3 -2
  791. package/dist/demo/demo-start.js.map +1 -1
  792. package/dist/feedback/feedback-attachment-labels.d.ts +16 -0
  793. package/dist/feedback/feedback-attachment-labels.js +17 -0
  794. package/dist/feedback/feedback-attachment-labels.js.map +1 -0
  795. package/dist/feedback/feedback-attachment.d.ts +312 -101
  796. package/dist/feedback/feedback-attachment.js +31 -42
  797. package/dist/feedback/feedback-attachment.js.map +1 -1
  798. package/dist/feedback/feedback-capture.d.ts +2 -4
  799. package/dist/feedback/feedback-context-labels.d.ts +2 -0
  800. package/dist/feedback/feedback-context-labels.js +9 -0
  801. package/dist/feedback/feedback-context-labels.js.map +1 -0
  802. package/dist/feedback/feedback-context.d.ts +110 -101
  803. package/dist/feedback/feedback-context.js +4 -7
  804. package/dist/feedback/feedback-context.js.map +1 -1
  805. package/dist/feedback/feedback-crash.d.ts +8 -110
  806. package/dist/feedback/feedback-dialog-labels.d.ts +12 -0
  807. package/dist/feedback/feedback-dialog-labels.js +17 -0
  808. package/dist/feedback/feedback-dialog-labels.js.map +1 -0
  809. package/dist/feedback/feedback-dialog.d.ts +186 -101
  810. package/dist/feedback/feedback-dialog.js +8 -18
  811. package/dist/feedback/feedback-dialog.js.map +1 -1
  812. package/dist/feedback/feedback-inbox.d.ts +236 -101
  813. package/dist/feedback/feedback-inbox.js +31 -141
  814. package/dist/feedback/feedback-inbox.js.map +1 -1
  815. package/dist/feedback/feedback-labels.d.ts +83 -101
  816. package/dist/feedback/feedback-labels.js.map +1 -1
  817. package/dist/feedback/feedback-menu-labels.d.ts +2 -0
  818. package/dist/feedback/feedback-menu-labels.js +10 -0
  819. package/dist/feedback/feedback-menu-labels.js.map +1 -0
  820. package/dist/feedback/feedback-menu.d.ts +83 -101
  821. package/dist/feedback/feedback-menu.js +3 -7
  822. package/dist/feedback/feedback-menu.js.map +1 -1
  823. package/dist/feedback/feedback-record.d.ts +239 -101
  824. package/dist/feedback/feedback-record.js +7 -2
  825. package/dist/feedback/feedback-record.js.map +1 -1
  826. package/dist/feedback/feedback-row-detail-labels.d.ts +2 -0
  827. package/dist/feedback/feedback-row-detail-labels.js +31 -0
  828. package/dist/feedback/feedback-row-detail-labels.js.map +1 -0
  829. package/dist/feedback/feedback-row-detail.d.ts +315 -101
  830. package/dist/feedback/feedback-row-detail.js +11 -37
  831. package/dist/feedback/feedback-row-detail.js.map +1 -1
  832. package/dist/feedback/feedback-status-undo.d.ts +66 -101
  833. package/dist/feedback/feedback-status-undo.js.map +1 -1
  834. package/dist/feedback/feedback-submit-dialog.d.ts +39 -0
  835. package/dist/feedback/feedback-submit-dialog.js +66 -0
  836. package/dist/feedback/feedback-submit-dialog.js.map +1 -0
  837. package/dist/feedback/feedback-submit.d.ts +13 -109
  838. package/dist/feedback/feedback-submit.js +19 -40
  839. package/dist/feedback/feedback-submit.js.map +1 -1
  840. package/dist/feedback/feedback-swipe.d.ts +9 -110
  841. package/dist/feedback/feedback-swipe.js +1 -1
  842. package/dist/feedback/feedback-swipe.js.map +1 -1
  843. package/dist/feedback/feedback-table-labels.d.ts +2 -0
  844. package/dist/feedback/feedback-table-labels.js +26 -0
  845. package/dist/feedback/feedback-table-labels.js.map +1 -0
  846. package/dist/feedback/feedback-table.d.ts +314 -101
  847. package/dist/feedback/feedback-table.js +11 -31
  848. package/dist/feedback/feedback-table.js.map +1 -1
  849. package/dist/feedback/feedback-thread-labels.d.ts +3 -0
  850. package/dist/feedback/feedback-thread-labels.js +21 -0
  851. package/dist/feedback/feedback-thread-labels.js.map +1 -0
  852. package/dist/feedback/feedback-thread.d.ts +378 -101
  853. package/dist/feedback/feedback-thread.js +27 -34
  854. package/dist/feedback/feedback-thread.js.map +1 -1
  855. package/dist/feedback/feedback-vocabulary.d.ts +98 -0
  856. package/dist/feedback/feedback-vocabulary.js +143 -0
  857. package/dist/feedback/feedback-vocabulary.js.map +1 -0
  858. package/dist/feedback.d.ts +15 -105
  859. package/dist/hooks/use-anchored-panel.d.ts +77 -15
  860. package/dist/hooks/use-anchored-panel.js +34 -1
  861. package/dist/hooks/use-anchored-panel.js.map +1 -1
  862. package/dist/hooks/use-anchored-rect.d.ts +15 -6
  863. package/dist/hooks/use-anchored-rect.js +2 -1
  864. package/dist/hooks/use-anchored-rect.js.map +1 -1
  865. package/dist/hooks/use-announce.d.ts +4 -6
  866. package/dist/hooks/use-authed-src.d.ts +5 -7
  867. package/dist/hooks/use-authed-src.js +3 -7
  868. package/dist/hooks/use-authed-src.js.map +1 -1
  869. package/dist/hooks/use-body-scroll-lock.d.ts +1 -3
  870. package/dist/hooks/use-breakpoint.d.ts +16 -17
  871. package/dist/hooks/use-breakpoint.js.map +1 -1
  872. package/dist/hooks/use-close-transition.d.ts +8 -8
  873. package/dist/hooks/use-close-transition.js +5 -4
  874. package/dist/hooks/use-close-transition.js.map +1 -1
  875. package/dist/hooks/use-copy-to-clipboard.d.ts +5 -7
  876. package/dist/hooks/use-debounce.d.ts +13 -6
  877. package/dist/hooks/use-debounce.js.map +1 -1
  878. package/dist/hooks/use-dismiss.d.ts +37 -11
  879. package/dist/hooks/use-dismiss.js +69 -10
  880. package/dist/hooks/use-dismiss.js.map +1 -1
  881. package/dist/hooks/use-file-drop.d.ts +8 -110
  882. package/dist/hooks/use-file-drop.js +1 -1
  883. package/dist/hooks/use-file-drop.js.map +1 -1
  884. package/dist/hooks/use-file-picker-labels.d.ts +2 -0
  885. package/dist/hooks/use-file-picker-labels.js +25 -0
  886. package/dist/hooks/use-file-picker-labels.js.map +1 -0
  887. package/dist/hooks/use-file-picker.d.ts +164 -0
  888. package/dist/hooks/use-file-picker.js +149 -0
  889. package/dist/hooks/use-file-picker.js.map +1 -0
  890. package/dist/hooks/use-focus-trap.d.ts +2 -4
  891. package/dist/hooks/use-focus-trap.js +2 -1
  892. package/dist/hooks/use-focus-trap.js.map +1 -1
  893. package/dist/hooks/use-hotkey.d.ts +7 -9
  894. package/dist/hooks/use-large-text.d.ts +3 -5
  895. package/dist/hooks/use-media-query.d.ts +1 -3
  896. package/dist/hooks/use-noindex.d.ts +1 -3
  897. package/dist/hooks/use-overlay-history.d.ts +1 -3
  898. package/dist/hooks/use-row-swipe.d.ts +5 -8
  899. package/dist/hooks/use-search-param-state.d.ts +10 -11
  900. package/dist/hooks/use-windowed-rows.d.ts +4 -7
  901. package/dist/i18n/defaults.d.ts +11 -105
  902. package/dist/i18n/defaults.js +82 -82
  903. package/dist/i18n/defaults.js.map +1 -1
  904. package/dist/i18n/german.d.ts +2 -105
  905. package/dist/i18n/german.js +52 -8
  906. package/dist/i18n/german.js.map +1 -1
  907. package/dist/i18n/kit-labels.d.ts +609 -101
  908. package/dist/i18n/kit-labels.js +22 -97
  909. package/dist/i18n/kit-labels.js.map +1 -1
  910. package/dist/i18n/languages.d.ts +197 -101
  911. package/dist/i18n/locales/de-CH.d.ts +3 -106
  912. package/dist/i18n/locales/en.d.ts +4 -105
  913. package/dist/i18n/locales/en.js +1834 -4
  914. package/dist/i18n/locales/en.js.map +7 -1
  915. package/dist/i18n/locales/es.d.ts +3 -106
  916. package/dist/i18n/locales/es.js +52 -8
  917. package/dist/i18n/locales/es.js.map +1 -1
  918. package/dist/i18n/locales/fr.d.ts +3 -106
  919. package/dist/i18n/locales/fr.js +53 -8
  920. package/dist/i18n/locales/fr.js.map +1 -1
  921. package/dist/i18n/locales/hu.d.ts +3 -106
  922. package/dist/i18n/locales/hu.js +52 -8
  923. package/dist/i18n/locales/hu.js.map +1 -1
  924. package/dist/i18n/locales/it.d.ts +3 -106
  925. package/dist/i18n/locales/it.js +53 -8
  926. package/dist/i18n/locales/it.js.map +1 -1
  927. package/dist/i18n/locales/zh.d.ts +3 -106
  928. package/dist/i18n/locales/zh.js +51 -8
  929. package/dist/i18n/locales/zh.js.map +1 -1
  930. package/dist/i18n/plurals.d.ts +3 -5
  931. package/dist/i18n/review.d.ts +5 -107
  932. package/dist/i18n/review.js +4 -0
  933. package/dist/i18n/review.js.map +1 -1
  934. package/dist/i18n/shared-labels.d.ts +17 -0
  935. package/dist/i18n/shared-labels.js +111 -0
  936. package/dist/i18n/shared-labels.js.map +1 -0
  937. package/dist/i18n/swiss.d.ts +1 -3
  938. package/dist/index.d.ts +329 -249
  939. package/dist/index.js +188 -215
  940. package/dist/index.js.map +1 -1
  941. package/dist/landing/access.d.ts +7 -9
  942. package/dist/landing/access.js.map +1 -1
  943. package/dist/landing/landing-actions.d.ts +9 -109
  944. package/dist/landing/landing-actions.js +1 -1
  945. package/dist/landing/landing-actions.js.map +1 -1
  946. package/dist/landing/landing-labels.d.ts +4 -5
  947. package/dist/landing/landing-labels.js.map +1 -1
  948. package/dist/landing/landing-sections.d.ts +21 -121
  949. package/dist/landing/landing-sections.js +15 -15
  950. package/dist/landing/landing-sections.js.map +1 -1
  951. package/dist/landing/page-seo.d.ts +7 -9
  952. package/dist/landing/public-header.d.ts +10 -111
  953. package/dist/landing/public-header.js +1 -1
  954. package/dist/landing/public-header.js.map +1 -1
  955. package/dist/landing/routing.d.ts +16 -120
  956. package/dist/landing/routing.js +2 -6
  957. package/dist/landing/routing.js.map +1 -1
  958. package/dist/lib/calc.d.ts +7 -9
  959. package/dist/lib/chip-edge-snap.d.ts +10 -0
  960. package/dist/lib/chip-edge-snap.js +131 -0
  961. package/dist/lib/chip-edge-snap.js.map +1 -0
  962. package/dist/lib/clipping.d.ts +2 -4
  963. package/dist/lib/cn.d.ts +2 -5
  964. package/dist/lib/cn.js +6 -1
  965. package/dist/lib/cn.js.map +1 -1
  966. package/dist/lib/column-mapping.d.ts +10 -13
  967. package/dist/lib/countries.d.ts +3 -5
  968. package/dist/lib/dates.d.ts +25 -25
  969. package/dist/lib/dates.js.map +1 -1
  970. package/dist/lib/decimal-marks.d.ts +8 -8
  971. package/dist/lib/decimal-marks.js +1 -1
  972. package/dist/lib/decimal-marks.js.map +1 -1
  973. package/dist/lib/direction.d.ts +4 -6
  974. package/dist/lib/document-navigation.d.ts +1 -3
  975. package/dist/lib/download.d.ts +67 -0
  976. package/dist/lib/download.js +89 -0
  977. package/dist/lib/download.js.map +1 -0
  978. package/dist/lib/floating-stack.d.ts +8 -6
  979. package/dist/lib/floating-stack.js.map +1 -1
  980. package/dist/lib/format.d.ts +24 -23
  981. package/dist/lib/format.js +3 -3
  982. package/dist/lib/format.js.map +1 -1
  983. package/dist/lib/iban.d.ts +9 -11
  984. package/dist/lib/ime.d.ts +17 -0
  985. package/dist/lib/ime.js +13 -0
  986. package/dist/lib/ime.js.map +1 -0
  987. package/dist/lib/isin.d.ts +3 -5
  988. package/dist/lib/logger.d.ts +4 -6
  989. package/dist/lib/person-name.d.ts +3 -5
  990. package/dist/lib/phone.d.ts +9 -11
  991. package/dist/lib/presence.d.ts +15 -0
  992. package/dist/lib/presence.js +8 -0
  993. package/dist/lib/presence.js.map +1 -0
  994. package/dist/lib/qr-encode.d.ts +4 -6
  995. package/dist/lib/reduced-motion.d.ts +18 -0
  996. package/dist/lib/reduced-motion.js +9 -0
  997. package/dist/lib/reduced-motion.js.map +1 -0
  998. package/dist/lib/round.d.ts +22 -0
  999. package/dist/lib/round.js +15 -0
  1000. package/dist/lib/round.js.map +1 -0
  1001. package/dist/lib/safe-storage.d.ts +14 -4
  1002. package/dist/lib/safe-storage.js +24 -9
  1003. package/dist/lib/safe-storage.js.map +1 -1
  1004. package/dist/lib/server-wake.d.ts +13 -14
  1005. package/dist/lib/session-refresh.d.ts +200 -0
  1006. package/dist/lib/session-refresh.js +187 -0
  1007. package/dist/lib/session-refresh.js.map +1 -0
  1008. package/dist/lib/strip-fade.d.ts +10 -13
  1009. package/dist/lib/table-text.d.ts +14 -16
  1010. package/dist/lib/text-match.d.ts +41 -0
  1011. package/dist/lib/text-match.js +23 -0
  1012. package/dist/lib/text-match.js.map +1 -0
  1013. package/dist/lib/translation-review.d.ts +44 -45
  1014. package/dist/lib/translation-review.js +3 -2
  1015. package/dist/lib/translation-review.js.map +1 -1
  1016. package/dist/rhf/fields.d.ts +123 -189
  1017. package/dist/rhf/fields.js +46 -54
  1018. package/dist/rhf/fields.js.map +1 -1
  1019. package/dist/rhf/form-core.d.ts +153 -0
  1020. package/dist/rhf/form-core.js +143 -0
  1021. package/dist/rhf/form-core.js.map +1 -0
  1022. package/dist/rhf/form.d.ts +38 -175
  1023. package/dist/rhf/form.js +9 -131
  1024. package/dist/rhf/form.js.map +1 -1
  1025. package/dist/rhf/line-items.d.ts +40 -11
  1026. package/dist/rhf/line-items.js.map +1 -1
  1027. package/dist/rhf/use-rhf-wizard-step.d.ts +3 -6
  1028. package/dist/rhf.d.ts +4 -118
  1029. package/dist/rhf.js.map +1 -1
  1030. package/dist/search/command-palette-labels.d.ts +2 -0
  1031. package/dist/search/command-palette-labels.js +15 -0
  1032. package/dist/search/command-palette-labels.js.map +1 -0
  1033. package/dist/search/command-palette.d.ts +10 -13
  1034. package/dist/search/command-palette.js +25 -44
  1035. package/dist/search/command-palette.js.map +1 -1
  1036. package/dist/search/global-search-labels.d.ts +2 -0
  1037. package/dist/search/global-search-labels.js +12 -0
  1038. package/dist/search/global-search-labels.js.map +1 -0
  1039. package/dist/search/global-search.d.ts +17 -16
  1040. package/dist/search/global-search.js +12 -12
  1041. package/dist/search/global-search.js.map +1 -1
  1042. package/dist/search/search-index.d.ts +13 -14
  1043. package/dist/search/search-index.js +2 -1
  1044. package/dist/search/search-index.js.map +1 -1
  1045. package/dist/search/use-command-key.d.ts +9 -0
  1046. package/dist/search/use-command-key.js +18 -0
  1047. package/dist/search/use-command-key.js.map +1 -0
  1048. package/dist/search.d.ts +3 -4
  1049. package/dist/settings/settings-card-classes.d.ts +11 -0
  1050. package/dist/settings/settings-card-classes.js +8 -0
  1051. package/dist/settings/settings-card-classes.js.map +1 -0
  1052. package/dist/settings/settings-catalogue.d.ts +11 -14
  1053. package/dist/settings/settings-context.d.ts +4 -8
  1054. package/dist/settings/settings-heading.d.ts +8 -12
  1055. package/dist/settings/settings-heading.js +1 -1
  1056. package/dist/settings/settings-heading.js.map +1 -1
  1057. package/dist/settings/settings-labels.d.ts +6 -7
  1058. package/dist/settings/settings-labels.js.map +1 -1
  1059. package/dist/settings/settings-layout.d.ts +36 -13
  1060. package/dist/settings/settings-layout.js +25 -4
  1061. package/dist/settings/settings-layout.js.map +1 -1
  1062. package/dist/settings/settings-section.d.ts +4 -107
  1063. package/dist/settings/settings-section.js +2 -2
  1064. package/dist/settings/settings-section.js.map +1 -1
  1065. package/dist/settings/use-account-appearance.d.ts +11 -16
  1066. package/dist/settings/use-account-language.d.ts +8 -10
  1067. package/dist/settings/use-settings-focus.d.ts +3 -5
  1068. package/dist/settings/use-settings-focus.js +2 -4
  1069. package/dist/settings/use-settings-focus.js.map +1 -1
  1070. package/dist/settings/use-settings-route.d.ts +11 -16
  1071. package/dist/shell/app-shell-labels.d.ts +2 -0
  1072. package/dist/shell/app-shell-labels.js +9 -0
  1073. package/dist/shell/app-shell-labels.js.map +1 -0
  1074. package/dist/shell/app-shell.d.ts +216 -101
  1075. package/dist/shell/app-shell.js +51 -35
  1076. package/dist/shell/app-shell.js.map +1 -1
  1077. package/dist/shell/auth-layout.d.ts +6 -9
  1078. package/dist/shell/auth-layout.js +6 -6
  1079. package/dist/shell/auth-layout.js.map +1 -1
  1080. package/dist/shell/company-switcher-labels.d.ts +2 -0
  1081. package/dist/shell/company-switcher-labels.js +12 -0
  1082. package/dist/shell/company-switcher-labels.js.map +1 -0
  1083. package/dist/shell/company-switcher.d.ts +9 -11
  1084. package/dist/shell/company-switcher.js +3 -9
  1085. package/dist/shell/company-switcher.js.map +1 -1
  1086. package/dist/shell/option-switcher-menu.d.ts +19 -9
  1087. package/dist/shell/option-switcher-menu.js +6 -4
  1088. package/dist/shell/option-switcher-menu.js.map +1 -1
  1089. package/dist/shell/role-switcher.d.ts +5 -6
  1090. package/dist/shell/role-switcher.js +4 -3
  1091. package/dist/shell/role-switcher.js.map +1 -1
  1092. package/dist/shell/top-bar-brand.d.ts +4 -107
  1093. package/dist/shell/top-bar-brand.js +1 -1
  1094. package/dist/shell/top-bar-brand.js.map +1 -1
  1095. package/dist/shell/top-bar.d.ts +6 -9
  1096. package/dist/shell/top-bar.js +1 -1
  1097. package/dist/shell/top-bar.js.map +1 -1
  1098. package/dist/shell/topbar-action-menu.d.ts +30 -31
  1099. package/dist/shell/topbar-action-menu.js +12 -10
  1100. package/dist/shell/topbar-action-menu.js.map +1 -1
  1101. package/dist/shell/topbar-controls.d.ts +20 -18
  1102. package/dist/shell/topbar-controls.js +14 -11
  1103. package/dist/shell/topbar-controls.js.map +1 -1
  1104. package/dist/shell.d.ts +25 -116
  1105. package/dist/shell.js.map +1 -1
  1106. package/dist/table-text.d.ts +1 -1
  1107. package/dist/testing/css-variables.d.ts +4 -6
  1108. package/dist/testing/css-variables.generated.d.ts +2 -4
  1109. package/dist/testing/index.d.ts +2 -1
  1110. package/dist/testing/index.js +9 -1
  1111. package/dist/testing/index.js.map +1 -1
  1112. package/dist/testing/viewport.d.ts +93 -0
  1113. package/dist/testing/viewport.js +152 -0
  1114. package/dist/testing/viewport.js.map +1 -0
  1115. package/dist/theme/chart-palette.d.ts +7 -9
  1116. package/dist/theme/color.d.ts +14 -16
  1117. package/dist/theme/color.js +2 -1
  1118. package/dist/theme/color.js.map +1 -1
  1119. package/dist/theme/contrast-tokens.d.ts +13 -17
  1120. package/dist/theme/contrast.d.ts +22 -27
  1121. package/dist/theme/palette-derive.d.ts +16 -22
  1122. package/dist/theme/palette-derive.js +15 -7
  1123. package/dist/theme/palette-derive.js.map +1 -1
  1124. package/dist/theme/palette-presets.d.ts +25 -15
  1125. package/dist/theme/palette-presets.js +66 -66
  1126. package/dist/theme/palette-presets.js.map +1 -1
  1127. package/dist/theme/palette-store.d.ts +10 -13
  1128. package/dist/theme/text-size.d.ts +21 -26
  1129. package/dist/theme/theme-store.d.ts +9 -14
  1130. package/dist/tour/tour-labels.d.ts +2 -0
  1131. package/dist/tour/tour-labels.js +13 -0
  1132. package/dist/tour/tour-labels.js.map +1 -0
  1133. package/dist/tour/tour.d.ts +12 -14
  1134. package/dist/tour/tour.js +9 -20
  1135. package/dist/tour/tour.js.map +1 -1
  1136. package/dist/tour.d.ts +1 -2
  1137. package/dist/wizard/stepper-nav.d.ts +8 -108
  1138. package/dist/wizard/stepper-nav.js +15 -14
  1139. package/dist/wizard/stepper-nav.js.map +1 -1
  1140. package/dist/wizard/types.d.ts +18 -18
  1141. package/dist/wizard/types.js +1 -19
  1142. package/dist/wizard/types.js.map +1 -1
  1143. package/dist/wizard/use-wizard.d.ts +2 -6
  1144. package/dist/wizard/validation.d.ts +3 -7
  1145. package/dist/wizard/wizard-context.d.ts +7 -11
  1146. package/dist/wizard/wizard-labels.d.ts +4 -0
  1147. package/dist/wizard/wizard-labels.js +24 -0
  1148. package/dist/wizard/wizard-labels.js.map +1 -0
  1149. package/dist/wizard/wizard-step.d.ts +3 -7
  1150. package/dist/wizard/wizard-step.js +2 -2
  1151. package/dist/wizard/wizard-step.js.map +1 -1
  1152. package/dist/wizard/wizard-summary.d.ts +5 -8
  1153. package/dist/wizard/wizard-summary.js +6 -5
  1154. package/dist/wizard/wizard-summary.js.map +1 -1
  1155. package/dist/wizard.d.ts +7 -107
  1156. package/package.json +9 -6
  1157. package/src/account/account-parts.ts +3 -3
  1158. package/src/{components → account}/account-settings-labels.ts +11 -1
  1159. package/src/{components → account}/account-settings.tsx +145 -34
  1160. package/src/account/data-export-setting-labels.ts +20 -0
  1161. package/src/account/data-export-setting.tsx +19 -38
  1162. package/src/account/delete-account-setting-labels.ts +33 -0
  1163. package/src/account/delete-account-setting.tsx +13 -35
  1164. package/src/account/email-change-setting-labels.ts +32 -0
  1165. package/src/account/email-change-setting.tsx +17 -36
  1166. package/src/{components → account}/passkeys-setting.tsx +14 -9
  1167. package/src/account/sessions-setting-labels.ts +24 -0
  1168. package/src/account/sessions-setting.tsx +14 -28
  1169. package/src/admin/admin-action-confirm-labels.ts +19 -0
  1170. package/src/admin/admin-action-confirm.tsx +59 -38
  1171. package/src/admin/admin-action-log-labels.ts +74 -0
  1172. package/src/admin/admin-action-log.tsx +180 -54
  1173. package/src/admin/admin-parts.ts +0 -7
  1174. package/src/admin/invitations-panel-labels.ts +31 -0
  1175. package/src/admin/invitations-panel.tsx +16 -34
  1176. package/src/admin/plan-change-labels.ts +23 -0
  1177. package/src/admin/plan-change.tsx +58 -34
  1178. package/src/admin/reviewer-scope-editor-labels.ts +16 -0
  1179. package/src/admin/reviewer-scope-editor.tsx +9 -15
  1180. package/src/admin/role-select-labels.ts +16 -0
  1181. package/src/admin/role-select.tsx +13 -23
  1182. package/src/admin/transfer-ownership-dialog-labels.ts +20 -0
  1183. package/src/admin/transfer-ownership-dialog.tsx +7 -17
  1184. package/src/admin/user-roster-labels.ts +17 -0
  1185. package/src/admin/user-roster.tsx +9 -17
  1186. package/src/auth/accept-invitation-labels.ts +21 -0
  1187. package/src/auth/accept-invitation.tsx +9 -20
  1188. package/src/auth/auth-errors.ts +29 -13
  1189. package/src/auth/complete-name-dialog-labels.ts +16 -0
  1190. package/src/auth/complete-name-dialog.tsx +8 -13
  1191. package/src/auth/forgot-password-form-labels.ts +20 -0
  1192. package/src/auth/forgot-password-form.tsx +12 -20
  1193. package/src/auth/new-password-fields.tsx +1 -1
  1194. package/src/auth/not-found-page-labels.ts +12 -0
  1195. package/src/auth/not-found-page.tsx +11 -14
  1196. package/src/auth/register-form-labels.ts +31 -0
  1197. package/src/auth/register-form.tsx +18 -38
  1198. package/src/auth/reset-password-form-labels.ts +27 -0
  1199. package/src/auth/reset-password-form.tsx +12 -27
  1200. package/src/auth/sign-in-form-labels.ts +44 -0
  1201. package/src/auth/sign-in-form.tsx +18 -51
  1202. package/src/auth/status-parts.tsx +3 -3
  1203. package/src/auth/verify-email-labels.ts +26 -0
  1204. package/src/auth/verify-email.tsx +15 -30
  1205. package/src/billing/billing-banner.tsx +2 -1
  1206. package/src/billing/billing-labels.ts +1 -1
  1207. package/src/billing/checkout-processing.ts +2 -12
  1208. package/src/billing/plan-card.tsx +26 -27
  1209. package/src/billing/plan-limit-notice.tsx +1 -1
  1210. package/src/billing/subscription-actions.tsx +4 -4
  1211. package/src/chart.ts +7 -1
  1212. package/src/components/account-chips-labels.ts +16 -0
  1213. package/src/components/account-chips.tsx +13 -16
  1214. package/src/components/alert-banner.tsx +39 -19
  1215. package/src/components/amount-input.tsx +461 -405
  1216. package/src/components/appearance-labels.ts +2 -2
  1217. package/src/components/authed-image-labels.ts +11 -0
  1218. package/src/components/authed-image.tsx +6 -8
  1219. package/src/components/autocomplete.tsx +79 -78
  1220. package/src/components/breadcrumbs-labels.ts +10 -0
  1221. package/src/components/breadcrumbs.tsx +17 -14
  1222. package/src/components/bulk-action-bar-labels.ts +11 -0
  1223. package/src/components/bulk-action-bar.tsx +15 -16
  1224. package/src/components/button-group.tsx +7 -7
  1225. package/src/components/button-look.ts +230 -0
  1226. package/src/components/button.tsx +339 -0
  1227. package/src/components/calculator.tsx +18 -11
  1228. package/src/components/calendar-heatmap-labels.ts +15 -0
  1229. package/src/components/calendar-heatmap.tsx +13 -19
  1230. package/src/components/card.tsx +381 -0
  1231. package/src/components/chart-zoom-core.tsx +653 -0
  1232. package/src/components/chart-zoom.tsx +64 -648
  1233. package/src/components/chart.tsx +11 -11
  1234. package/src/components/checkbox-group.tsx +13 -10
  1235. package/src/components/checkbox.tsx +43 -42
  1236. package/src/components/chip-input.tsx +377 -0
  1237. package/src/components/chip-labels.ts +13 -0
  1238. package/src/components/chip.tsx +115 -711
  1239. package/src/components/choice-card.tsx +83 -85
  1240. package/src/components/column-mapper-labels.ts +45 -0
  1241. package/src/components/column-mapper.tsx +16 -51
  1242. package/src/components/combobox-core.tsx +346 -194
  1243. package/src/components/combobox-suggestions.tsx +129 -0
  1244. package/src/components/combobox.tsx +69 -895
  1245. package/src/components/confirm-dialog-labels.ts +13 -0
  1246. package/src/components/confirm-dialog.tsx +4 -8
  1247. package/src/components/copy-button-labels.ts +13 -0
  1248. package/src/components/copy-button.tsx +10 -12
  1249. package/src/components/country-select-labels.ts +11 -0
  1250. package/src/components/country-select.tsx +74 -89
  1251. package/src/components/currency-option-list.tsx +216 -0
  1252. package/src/components/currency-select.tsx +85 -196
  1253. package/src/components/danger-confirm-labels.ts +20 -0
  1254. package/src/components/danger-confirm.tsx +69 -77
  1255. package/src/components/data-table-cells.tsx +5 -5
  1256. package/src/components/data-table-column-settings.tsx +137 -0
  1257. package/src/components/data-table-filter-popover.tsx +49 -24
  1258. package/src/components/data-table-filters.ts +48 -11
  1259. package/src/components/data-table-head.tsx +258 -0
  1260. package/src/components/data-table-labels.ts +43 -11
  1261. package/src/components/data-table-mobile.tsx +594 -0
  1262. package/src/components/data-table-pagination.tsx +11 -10
  1263. package/src/components/data-table-resize.ts +187 -0
  1264. package/src/components/data-table-row-actions.tsx +152 -0
  1265. package/src/components/data-table-selection.ts +55 -0
  1266. package/src/components/data-table-shared.tsx +172 -0
  1267. package/src/components/data-table.tsx +178 -1300
  1268. package/src/components/date-field.tsx +627 -0
  1269. package/src/components/date-picker.tsx +58 -1446
  1270. package/src/components/date-range-picker.tsx +490 -0
  1271. package/src/components/description-list-labels.ts +9 -0
  1272. package/src/components/description-list.tsx +31 -15
  1273. package/src/components/dialog-frame-labels.ts +7 -0
  1274. package/src/components/dialog-frame.tsx +8 -6
  1275. package/src/components/disclosure.tsx +14 -14
  1276. package/src/components/dropdown.tsx +102 -40
  1277. package/src/components/empty-state.tsx +137 -0
  1278. package/src/components/entity-combobox.tsx +17 -12
  1279. package/src/components/error-boundary-labels.ts +20 -0
  1280. package/src/components/error-boundary.tsx +10 -20
  1281. package/src/components/facing-pair.ts +1 -1
  1282. package/src/components/field-base.tsx +615 -0
  1283. package/src/components/field-parts.tsx +206 -77
  1284. package/src/components/field-strip.tsx +16 -21
  1285. package/src/components/field-sync-labels.ts +13 -0
  1286. package/src/components/field-sync.tsx +11 -12
  1287. package/src/components/field.tsx +13 -11
  1288. package/src/components/file-button.tsx +64 -412
  1289. package/src/components/file-dropzone.tsx +36 -33
  1290. package/src/components/floating-panel-labels.ts +10 -0
  1291. package/src/components/floating-panel.tsx +32 -21
  1292. package/src/components/focus-ring.ts +9 -4
  1293. package/src/components/form-actions-labels.ts +11 -0
  1294. package/src/components/form-actions.tsx +17 -21
  1295. package/src/components/full-bleed-dialog.tsx +27 -25
  1296. package/src/components/grouped-picker.tsx +118 -96
  1297. package/src/components/help-popover.tsx +115 -0
  1298. package/src/components/hover-menu.tsx +46 -35
  1299. package/src/components/iban-input-labels.ts +15 -0
  1300. package/src/components/iban-input.tsx +25 -20
  1301. package/src/components/icon-button.tsx +945 -0
  1302. package/src/components/icon-picker-labels.ts +13 -0
  1303. package/src/components/icon-picker.tsx +27 -24
  1304. package/src/components/image-grid-labels.ts +11 -0
  1305. package/src/components/image-grid.tsx +13 -15
  1306. package/src/components/inline-edit-field-labels.ts +11 -0
  1307. package/src/components/inline-edit-field.tsx +20 -19
  1308. package/src/components/inline-entity-combobox.tsx +789 -0
  1309. package/src/components/input.tsx +380 -0
  1310. package/src/components/jump-calendar.tsx +385 -0
  1311. package/src/components/language-select.tsx +31 -16
  1312. package/src/components/legal-labels.ts +99 -0
  1313. package/src/components/legal-page.tsx +2 -2
  1314. package/src/components/legal.tsx +11 -101
  1315. package/src/components/lightbox-labels.ts +18 -0
  1316. package/src/components/lightbox.tsx +13 -21
  1317. package/src/components/line-items-labels.ts +14 -0
  1318. package/src/components/line-items.tsx +24 -31
  1319. package/src/components/list-labels.ts +10 -0
  1320. package/src/components/list.tsx +98 -75
  1321. package/src/components/loading-state.tsx +4 -4
  1322. package/src/components/measured-grid-labels.ts +25 -0
  1323. package/src/components/measured-grid.tsx +39 -62
  1324. package/src/components/menu-item.tsx +29 -26
  1325. package/src/components/mini-calendar-labels.ts +17 -0
  1326. package/src/components/mini-calendar.tsx +38 -45
  1327. package/src/components/modal.tsx +31 -18
  1328. package/src/components/money-draft.ts +72 -0
  1329. package/src/components/money-field.tsx +16 -30
  1330. package/src/components/month-picker-labels.ts +22 -0
  1331. package/src/components/month-picker.tsx +59 -45
  1332. package/src/components/multi-entity-combobox.tsx +17 -12
  1333. package/src/components/multi-select.tsx +313 -288
  1334. package/src/components/nav-pills.tsx +19 -8
  1335. package/src/components/number-field.tsx +7 -5
  1336. package/src/components/number-input.tsx +72 -97
  1337. package/src/components/numeric-field.ts +161 -0
  1338. package/src/components/numpad-sheet.tsx +16 -16
  1339. package/src/components/one-time-code-input.tsx +154 -169
  1340. package/src/components/page-contents-labels.ts +9 -0
  1341. package/src/components/page-contents.tsx +15 -15
  1342. package/src/components/page-header.tsx +9 -5
  1343. package/src/components/password-strength-labels.ts +23 -0
  1344. package/src/components/password-strength.tsx +13 -27
  1345. package/src/components/phone-input-labels.ts +10 -0
  1346. package/src/components/phone-input.tsx +42 -57
  1347. package/src/components/picker-sheet.tsx +47 -18
  1348. package/src/components/pie-chart.tsx +11 -9
  1349. package/src/components/popover-labels.ts +14 -0
  1350. package/src/components/popover.tsx +34 -37
  1351. package/src/components/progress-bar-labels.ts +10 -0
  1352. package/src/components/progress-bar.tsx +32 -23
  1353. package/src/components/qr-code.tsx +2 -2
  1354. package/src/components/reauth-dialog-labels.ts +13 -0
  1355. package/src/components/reauth-dialog.tsx +7 -10
  1356. package/src/components/row-actions-labels.ts +10 -0
  1357. package/src/components/row-actions.tsx +11 -10
  1358. package/src/components/scroll-area.tsx +4 -10
  1359. package/src/components/search-field.tsx +35 -49
  1360. package/src/components/select.tsx +302 -0
  1361. package/src/components/separator.tsx +2 -2
  1362. package/src/components/series-chart-axes.ts +329 -0
  1363. package/src/components/series-chart-thin.ts +180 -0
  1364. package/src/components/series-chart.tsx +124 -325
  1365. package/src/components/server-wake-labels.ts +11 -0
  1366. package/src/components/server-wake.tsx +42 -63
  1367. package/src/components/settings-fields.tsx +46 -17
  1368. package/src/components/share-card-labels.ts +30 -0
  1369. package/src/components/share-card.tsx +22 -37
  1370. package/src/components/sign-chip-labels.ts +12 -0
  1371. package/src/components/sign-chip.tsx +6 -9
  1372. package/src/components/signature-pad-labels.ts +24 -0
  1373. package/src/components/signature-pad.tsx +48 -57
  1374. package/src/components/signed-amount-labels.ts +10 -0
  1375. package/src/components/signed-amount.tsx +21 -22
  1376. package/src/components/skeleton.tsx +1 -1
  1377. package/src/components/slider.tsx +51 -39
  1378. package/src/components/sparkline-labels.ts +14 -0
  1379. package/src/components/sparkline.tsx +16 -21
  1380. package/src/components/spinner.tsx +81 -0
  1381. package/src/components/stat-tile-labels.ts +15 -0
  1382. package/src/components/stat-tile.tsx +32 -37
  1383. package/src/components/status-dot.tsx +17 -14
  1384. package/src/components/swatch-picker-labels.ts +10 -0
  1385. package/src/components/swatch-picker.tsx +23 -16
  1386. package/src/components/swipeable-row.tsx +7 -7
  1387. package/src/components/switch.tsx +33 -32
  1388. package/src/components/table.tsx +15 -15
  1389. package/src/components/tabs.tsx +660 -0
  1390. package/src/components/text-link.tsx +7 -7
  1391. package/src/components/text.tsx +10 -6
  1392. package/src/components/textarea.tsx +323 -0
  1393. package/src/components/tile-radio.tsx +6 -6
  1394. package/src/components/time-input.tsx +15 -7
  1395. package/src/components/toast-labels.ts +12 -0
  1396. package/src/components/toast.tsx +5 -8
  1397. package/src/components/toggle-group.tsx +105 -42
  1398. package/src/components/toggle-legend.tsx +6 -6
  1399. package/src/components/tooltip.tsx +10 -21
  1400. package/src/components/translation-review-editor.tsx +8 -7
  1401. package/src/components/translation-review-parts.tsx +9 -13
  1402. package/src/components/translation-review.tsx +26 -14
  1403. package/src/components/tree-view.tsx +14 -12
  1404. package/src/components/ui-labels.ts +22 -0
  1405. package/src/components/user-avatar.tsx +3 -3
  1406. package/src/components/wizard-stepper.tsx +10 -5
  1407. package/src/components/write-lock-labels.ts +9 -0
  1408. package/src/components/write-lock.tsx +10 -12
  1409. package/src/data-table.ts +4 -0
  1410. package/src/demo/demo-banner.tsx +9 -25
  1411. package/src/demo/demo-ended.tsx +8 -7
  1412. package/src/demo/demo-labels.ts +2 -2
  1413. package/src/demo/demo-start.tsx +7 -5
  1414. package/src/feedback/feedback-attachment-labels.ts +36 -0
  1415. package/src/feedback/feedback-attachment.tsx +42 -66
  1416. package/src/feedback/feedback-context-labels.ts +10 -0
  1417. package/src/feedback/feedback-context.tsx +8 -9
  1418. package/src/feedback/feedback-dialog-labels.ts +28 -0
  1419. package/src/feedback/feedback-dialog.tsx +14 -44
  1420. package/src/feedback/feedback-inbox.tsx +49 -252
  1421. package/src/feedback/feedback-labels.ts +5 -5
  1422. package/src/feedback/feedback-menu-labels.ts +11 -0
  1423. package/src/feedback/feedback-menu.tsx +13 -11
  1424. package/src/feedback/feedback-record.ts +21 -7
  1425. package/src/feedback/feedback-row-detail-labels.ts +33 -0
  1426. package/src/feedback/feedback-row-detail.tsx +30 -43
  1427. package/src/feedback/feedback-status-undo.ts +3 -2
  1428. package/src/feedback/feedback-submit-dialog.tsx +109 -0
  1429. package/src/feedback/feedback-submit.tsx +45 -55
  1430. package/src/feedback/feedback-swipe.tsx +1 -1
  1431. package/src/feedback/feedback-table-labels.ts +27 -0
  1432. package/src/feedback/feedback-table.tsx +24 -40
  1433. package/src/feedback/feedback-thread-labels.ts +22 -0
  1434. package/src/feedback/feedback-thread.tsx +48 -47
  1435. package/src/feedback/feedback-vocabulary.ts +252 -0
  1436. package/src/hooks/use-anchored-panel.ts +102 -2
  1437. package/src/hooks/use-anchored-rect.ts +11 -9
  1438. package/src/hooks/use-authed-src.ts +13 -7
  1439. package/src/hooks/use-breakpoint.ts +5 -4
  1440. package/src/hooks/use-close-transition.ts +9 -10
  1441. package/src/hooks/use-debounce.ts +9 -0
  1442. package/src/hooks/use-dismiss.ts +176 -19
  1443. package/src/hooks/use-file-drop.ts +2 -2
  1444. package/src/hooks/use-file-picker-labels.ts +29 -0
  1445. package/src/hooks/use-file-picker.tsx +363 -0
  1446. package/src/hooks/use-focus-trap.ts +19 -6
  1447. package/src/i18n/defaults.ts +91 -82
  1448. package/src/i18n/german.ts +50 -6
  1449. package/src/i18n/kit-labels.tsx +70 -119
  1450. package/src/i18n/locales/en.ts +46 -0
  1451. package/src/i18n/locales/es.ts +50 -6
  1452. package/src/i18n/locales/fr.ts +52 -7
  1453. package/src/i18n/locales/hu.ts +50 -6
  1454. package/src/i18n/locales/it.ts +51 -6
  1455. package/src/i18n/locales/zh.ts +49 -6
  1456. package/src/i18n/review.ts +4 -0
  1457. package/src/i18n/shared-labels.ts +135 -0
  1458. package/src/index.ts +412 -404
  1459. package/src/landing/access.ts +2 -1
  1460. package/src/landing/landing-actions.tsx +6 -5
  1461. package/src/landing/landing-labels.ts +2 -2
  1462. package/src/landing/landing-sections.tsx +24 -23
  1463. package/src/landing/public-header.tsx +3 -2
  1464. package/src/landing/routing.tsx +2 -7
  1465. package/src/lib/chip-edge-snap.ts +212 -0
  1466. package/src/lib/cn.ts +13 -1
  1467. package/src/lib/dates.ts +4 -2
  1468. package/src/lib/decimal-marks.ts +4 -2
  1469. package/src/lib/download.ts +172 -0
  1470. package/src/lib/floating-stack.ts +5 -1
  1471. package/src/lib/format.ts +5 -3
  1472. package/src/lib/ime.ts +24 -0
  1473. package/src/lib/presence.ts +18 -0
  1474. package/src/lib/reduced-motion.ts +21 -0
  1475. package/src/lib/round.ts +38 -0
  1476. package/src/lib/safe-storage.ts +35 -11
  1477. package/src/lib/session-refresh.ts +473 -0
  1478. package/src/lib/text-match.ts +60 -0
  1479. package/src/lib/translation-review.ts +7 -6
  1480. package/src/rhf/fields.tsx +131 -179
  1481. package/src/rhf/form-core.tsx +327 -0
  1482. package/src/rhf/form.tsx +46 -321
  1483. package/src/rhf/line-items.tsx +1 -1
  1484. package/src/rhf.ts +3 -2
  1485. package/src/search/command-palette-labels.ts +16 -0
  1486. package/src/search/command-palette.tsx +37 -50
  1487. package/src/search/global-search-labels.ts +13 -0
  1488. package/src/search/global-search.tsx +50 -24
  1489. package/src/search/search-index.ts +5 -6
  1490. package/src/search/use-command-key.ts +22 -0
  1491. package/src/settings/settings-card-classes.ts +11 -0
  1492. package/src/settings/settings-heading.tsx +1 -1
  1493. package/src/settings/settings-labels.ts +2 -2
  1494. package/src/settings/settings-layout.tsx +65 -6
  1495. package/src/settings/settings-section.tsx +5 -5
  1496. package/src/settings/use-settings-focus.ts +2 -5
  1497. package/src/shell/app-shell-labels.ts +10 -0
  1498. package/src/shell/app-shell.tsx +79 -53
  1499. package/src/shell/auth-layout.tsx +11 -10
  1500. package/src/shell/company-switcher-labels.ts +13 -0
  1501. package/src/shell/company-switcher.tsx +7 -11
  1502. package/src/shell/option-switcher-menu.tsx +25 -6
  1503. package/src/shell/role-switcher.tsx +7 -3
  1504. package/src/shell/top-bar-brand.tsx +1 -1
  1505. package/src/shell/top-bar.tsx +6 -5
  1506. package/src/shell/topbar-action-menu.tsx +39 -20
  1507. package/src/shell/topbar-controls.tsx +24 -12
  1508. package/src/shell.ts +1 -1
  1509. package/src/testing/index.ts +11 -0
  1510. package/src/testing/viewport.ts +251 -0
  1511. package/src/theme/color.ts +7 -1
  1512. package/src/theme/palette-derive.ts +29 -7
  1513. package/src/theme/palette-presets.ts +81 -68
  1514. package/src/tour/tour-labels.ts +14 -0
  1515. package/src/tour/tour.tsx +13 -23
  1516. package/src/wizard/stepper-nav.tsx +19 -18
  1517. package/src/wizard/types.ts +7 -22
  1518. package/src/wizard/wizard-labels.ts +29 -0
  1519. package/src/wizard/wizard-step.tsx +2 -2
  1520. package/src/wizard/wizard-summary.tsx +8 -7
  1521. package/tokens.css +45 -14
  1522. package/dist/components/account-settings-labels.js.map +0 -1
  1523. package/dist/components/account-settings.js.map +0 -1
  1524. package/dist/components/choice-parts.d.ts +0 -24
  1525. package/dist/components/choice-parts.js +0 -18
  1526. package/dist/components/choice-parts.js.map +0 -1
  1527. package/dist/components/passkeys-setting.js.map +0 -1
  1528. package/dist/components/ui.d.ts +0 -101
  1529. package/dist/components/ui.js +0 -1955
  1530. package/dist/components/ui.js.map +0 -1
  1531. package/dist/data-table-labels-BJ5JE_X2.d.ts +0 -923
  1532. package/dist/delete-account-setting-DAgGBrbn.d.ts +0 -8167
  1533. package/src/components/choice-parts.ts +0 -33
  1534. package/src/components/ui.tsx +0 -4233
@@ -1,12 +1,17 @@
1
1
  "use client";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { Children, forwardRef, useCallback, useEffect, useId, useRef, useState } from "react";
3
+ import { Children, useCallback, useEffect, useId, useRef, useState } from "react";
4
4
  import { cn } from "../lib/cn.js";
5
+ import { hasContent } from "../lib/presence.js";
5
6
  import { useKitLabels } from "../i18n/kit-labels.js";
6
- import { Button, Input, Label, Spinner } from "./ui.js";
7
+ import { Button } from "./button.js";
8
+ import { Input } from "./input.js";
9
+ import { Label } from "./field-base.js";
10
+ import { Spinner } from "./spinner.js";
7
11
  import { Checkbox } from "./checkbox.js";
8
12
  import { Tooltip } from "./tooltip.js";
9
13
  import { useCommitReason } from "./write-lock.js";
14
+ import { DEFAULT_DANGER_CONFIRM_LABELS } from "./danger-confirm-labels.js";
10
15
  function typedMatches(typed, target, mode = "trim") {
11
16
  if (mode === "exact") return typed === target;
12
17
  if (mode === "trim") return typed.trim() === target;
@@ -38,32 +43,34 @@ function usePromisePending() {
38
43
  }, []);
39
44
  return { pending, run };
40
45
  }
41
- function hasContent(node) {
42
- return node !== void 0 && node !== null && node !== false && node !== "";
43
- }
44
- const CurrentPasswordInput = forwardRef(
45
- function CurrentPasswordInput2({ label, onValueChange, onChange, busy, readOnly, labels: labelsProp, ...rest }, ref) {
46
- const labels = useKitLabels("dangerConfirm", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);
47
- const namedOtherwise = rest["aria-label"] !== void 0 || rest["aria-labelledby"] !== void 0;
48
- return /* @__PURE__ */ jsx(
49
- Input,
50
- {
51
- ...rest,
52
- ref,
53
- type: "password",
54
- autoComplete: "current-password",
55
- label: label === void 0 ? namedOtherwise ? void 0 : labels.password : hasContent(label) ? label : void 0,
56
- readOnly: Boolean(busy) || readOnly,
57
- onChange: (e) => {
58
- onChange?.(e);
59
- onValueChange?.(e.target.value);
60
- }
46
+ function CurrentPasswordInput({
47
+ label,
48
+ onValueChange,
49
+ onChange,
50
+ busy,
51
+ readOnly,
52
+ labels: labelsProp,
53
+ ...rest
54
+ }) {
55
+ const labels = useKitLabels("dangerConfirm", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);
56
+ const namedOtherwise = rest["aria-label"] !== void 0 || rest["aria-labelledby"] !== void 0;
57
+ return /* @__PURE__ */ jsx(
58
+ Input,
59
+ {
60
+ ...rest,
61
+ type: "password",
62
+ autoComplete: "current-password",
63
+ label: label === void 0 ? namedOtherwise ? void 0 : labels.password : hasContent(label) ? label : void 0,
64
+ readOnly: Boolean(busy) || readOnly,
65
+ onChange: (e) => {
66
+ onChange?.(e);
67
+ onValueChange?.(e.target.value);
61
68
  }
62
- );
63
- }
64
- );
65
- CurrentPasswordInput.displayName = "CurrentPasswordInput";
66
- const TypedConfirmField = forwardRef(function TypedConfirmField2({
69
+ }
70
+ );
71
+ }
72
+ function TypedConfirmField({
73
+ ref,
67
74
  target,
68
75
  match = "trim",
69
76
  value: valueProp,
@@ -79,7 +86,7 @@ const TypedConfirmField = forwardRef(function TypedConfirmField2({
79
86
  id,
80
87
  className,
81
88
  ...rest
82
- }, ref) {
89
+ }) {
83
90
  const labels = useKitLabels("dangerConfirm", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);
84
91
  const [own, setOwn] = useState(defaultValue);
85
92
  const value = valueProp ?? own;
@@ -119,20 +126,7 @@ const TypedConfirmField = forwardRef(function TypedConfirmField2({
119
126
  );
120
127
  }
121
128
  return /* @__PURE__ */ jsx(Input, { ...fieldProps, label, className });
122
- });
123
- TypedConfirmField.displayName = "TypedConfirmField";
124
- const DEFAULT_DANGER_CONFIRM_LABELS = {
125
- arm: "Delete\u2026",
126
- confirm: "Delete",
127
- cancel: "Cancel",
128
- prompt: "This cannot be undone.",
129
- password: "Password",
130
- phrase: (phrase) => `Type \u201C${phrase}\u201D to confirm`,
131
- acknowledge: "I have read what this does and want to continue.",
132
- needsPhrase: (phrase) => `Type \u201C${phrase}\u201D to confirm`,
133
- needsAcknowledge: "Tick the box to confirm",
134
- needsPassword: "Enter your password to confirm"
135
- };
129
+ }
136
130
  const SLOT_FIELD = [
137
131
  'input:not([type="hidden"])',
138
132
  "select",
@@ -266,7 +260,7 @@ function DangerConfirm({
266
260
  const lines = (consequences ?? []).map(
267
261
  (item, index) => typeof item === "string" ? { key: item, text: item, severe: false } : { key: item.key ?? String(index), text: item.text, severe: Boolean(item.severe) }
268
262
  );
269
- const toneText = tone === "warning" ? "text-[var(--warning)]" : "text-[var(--danger)]";
263
+ const toneText = tone === "warning" ? "text-warning" : "text-danger";
270
264
  if (!armed) {
271
265
  const arm = /* @__PURE__ */ jsx(
272
266
  Button,
@@ -296,7 +290,7 @@ function DangerConfirm({
296
290
  // on every focus. A fragment is left as it is, so the bubble stays visual.
297
291
  /* @__PURE__ */ jsx(Tooltip, { label: lockedReason, portal: true, children: /* @__PURE__ */ jsx(Fragment, { children: arm }) })
298
292
  ) : arm,
299
- locked && /* @__PURE__ */ jsx("p", { id: reasonId, className: "text-xs text-[var(--text-muted)]", children: lockedReason })
293
+ locked && /* @__PURE__ */ jsx("p", { id: reasonId, className: "text-xs text-muted", children: lockedReason })
300
294
  ] });
301
295
  }
302
296
  return /* @__PURE__ */ jsx("div", { ...rest, className: cn("space-y-2", className), children: /* @__PURE__ */ jsxs(
@@ -309,7 +303,7 @@ function DangerConfirm({
309
303
  noValidate: true,
310
304
  children: [
311
305
  /* @__PURE__ */ jsx("p", { id: promptId, className: cn("text-xs font-medium", toneText), children: prompt ?? labels.prompt }),
312
- lines.length > 0 && /* @__PURE__ */ jsx("ul", { id: consequencesId, className: "list-disc space-y-1 ps-5 text-xs text-[var(--text-secondary)]", children: lines.map((line) => /* @__PURE__ */ jsx("li", { className: line.severe ? "text-[var(--danger)]" : void 0, children: line.text }, line.key)) }),
306
+ lines.length > 0 && /* @__PURE__ */ jsx("ul", { id: consequencesId, className: "list-disc space-y-1 ps-5 text-xs text-secondary", children: lines.map((line) => /* @__PURE__ */ jsx("li", { className: line.severe ? "text-danger" : void 0, children: line.text }, line.key)) }),
313
307
  hasFields && /* @__PURE__ */ jsx("div", { ref: slotRef, className: "space-y-2", children }),
314
308
  asksAcknowledge && /* @__PURE__ */ jsx(
315
309
  Checkbox,
@@ -362,7 +356,7 @@ function DangerConfirm({
362
356
  }
363
357
  )
364
358
  ] }),
365
- locked && /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--text-muted)]", children: lockedReason })
359
+ locked && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted", children: lockedReason })
366
360
  ]
367
361
  }
368
362
  ) });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/danger-confirm.tsx"],"sourcesContent":["import { Children, forwardRef, useCallback, useEffect, useId, useRef, useState } from \"react\";\nimport type { ChangeEvent, ComponentPropsWithoutRef, FormEvent, ReactNode } from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport { Button, Input, Label, Spinner } from \"./ui\";\nimport type { ButtonVariant, InputProps } from \"./ui\";\nimport { Checkbox } from \"./checkbox\";\nimport { Tooltip } from \"./tooltip\";\nimport { useCommitReason, type CommitScope } from \"./write-lock\";\n\n/**\n * How typed text is compared with the text it has to repeat — shared by\n * `DangerConfirm`'s `phraseMatch` and `useConfirm`'s `typedMatch`.\n *\n * - `\"trim\"` ignores spaces around the typed text — a phone keyboard's autocomplete\n * likes to add one. Case counts: \"delete\" is not \"DELETE\".\n * - `\"exact\"` compares character for character, spaces included.\n * - `\"caseless\"` trims AND ignores case: for an e-mail address, whose domain is\n * case-insensitive and whose local part every real mail server treats so. Both apps'\n * \"type the account's address\" rules (keksdose's `TYPE_EMAIL`, Kurvenschmiede's\n * `TypedConfirm`) compared `trim().toLowerCase()`, and a capital the user's keyboard\n * put at the start must not make the right row look like the wrong one.\n */\nexport type TypedMatch = \"trim\" | \"exact\" | \"caseless\";\n\n/** Whether `typed` repeats `target` under `mode` — see {@link TypedMatch}. Exported for\n * a caller that draws its own field (a dialog that also picks a recipient) and wants\n * the same rule as the kit's. */\nexport function typedMatches(typed: string, target: string, mode: TypedMatch = \"trim\"): boolean {\n if (mode === \"exact\") return typed === target;\n if (mode === \"trim\") return typed.trim() === target;\n // `toLowerCase`, not `toLocaleLowerCase`: the comparison must not change with the\n // reader's locale (a Turkish dotless i would otherwise fail an ASCII address).\n return typed.trim().toLowerCase() === target.trim().toLowerCase();\n}\n\n/**\n * Busy-while-a-promise-runs, for an action that MAY return one: `run(result, onResolved)`\n * marks the caller pending until `result` settles, calls `onResolved` if it fulfilled,\n * and only clears the flag if it rejected — the caller shows why and the user retries.\n * Nothing runs after unmount. Shared by `DangerConfirm` and `ReauthDialog`, whose\n * contract is the same: resolve = done, reject = stay put.\n *\n * @internal\n */\nexport function usePromisePending() {\n const [pending, setPending] = useState(false);\n const mounted = useRef(true);\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n const run = useCallback((result: unknown, onResolved: () => void): boolean => {\n if (!result || typeof (result as Promise<unknown>).then !== \"function\") return false;\n setPending(true);\n (result as Promise<unknown>).then(\n () => {\n if (!mounted.current) return;\n setPending(false);\n onResolved();\n },\n () => {\n if (mounted.current) setPending(false);\n },\n );\n return true;\n }, []);\n return { pending, run };\n}\n\n/** A label that is really there — `null`, `false` and `\"\"` are what a caller's\n * `cond && reason` evaluates to on the path where there is none. */\nfunction hasContent(node: ReactNode): boolean {\n return node !== undefined && node !== null && node !== false && node !== \"\";\n}\n\n/** The one word {@link CurrentPasswordInput} says on its own behalf — the\n * `dangerConfirm.password` label, shared with DangerConfirm's password field, so an\n * app translates \"Password\" once. */\nexport type CurrentPasswordInputLabels = Pick<DangerConfirmLabels, \"password\">;\n\n/**\n * Everything {@link Input} takes except what makes this field what it is: `type` is\n * always `\"password\"` and `autoComplete` always `\"current-password\"`.\n */\nexport interface CurrentPasswordInputProps extends Omit<InputProps, \"type\" | \"autoComplete\" | \"label\"> {\n /**\n * The visible label. Default `dangerConfirm.password` (\"Password\") — unless the field\n * is named another way (`aria-label` / `aria-labelledby`), which then stays the only\n * name. Pass the app's own word on a sign-in form (\"Password\", \"Your password\"), or\n * `null` for a field whose `<label htmlFor>` is drawn elsewhere (a form library's\n * `FormLabel`), which would otherwise be labelled twice.\n */\n label?: ReactNode;\n /** The value as a string — the `(next) => …` shape, so a caller holding it in\n * `useState` need not unwrap `event.target.value`. Fires alongside `onChange`,\n * never instead of it, so a form library's `onChange` keeps working. */\n onValueChange?: (value: string) => void;\n /**\n * A check is running (the sign-in request, the re-auth). The field turns `readOnly`,\n * NOT `disabled`: the field being submitted is usually the focused one (Enter was\n * pressed in it), and disabling a focused field drops focus to `<body>` — the user\n * lands nowhere when the \"wrong password\" answer comes back.\n */\n busy?: boolean;\n /** Per-instance override of `dangerConfirm.password`. */\n labels?: Partial<CurrentPasswordInputLabels>;\n}\n\n/**\n * The \"prove it is you\" field: a password input that a password manager fills with\n * the CURRENT password and never offers to generate a new one for.\n *\n * It is the field of a sign-in form, a re-auth step ({@link ReauthDialog} draws the same\n * field), and {@link DangerConfirm}'s `requirePassword`. Public since 0.22 for kastlan's\n * sign-in and re-auth (kastlan 1), which wrote `type=\"password\"` +\n * `autoComplete=\"current-password\"` by hand — and a sign-in field that forgets the\n * second half gets the browser's \"suggest a strong password\" offer on the one form where\n * a NEW password is never what is wanted. The reverse matters as much: a field that sets\n * a NEW password (a passphrase, a sign-up) must NOT be this one — keksdose #170 keeps\n * its passphrase doors on `new-password` / `off` for that reason.\n *\n * Everything else is {@link Input}: the reveal toggle, `error` (under the field,\n * `aria-describedby`, `aria-invalid`), `invalid`, `name`, `id`, `autoFocus`, `required`.\n * The ref is the `<input>`, so it works with `@eifi1/ui-kit/rhf`'s `FormControl` /\n * a `register()` spread, and controlled or uncontrolled.\n *\n * ```tsx\n * <CurrentPasswordInput name=\"password\" label={t(\"password\")} error={errors.password?.message}\n * busy={isSubmitting} {...register(\"password\")} />\n * ```\n */\nexport const CurrentPasswordInput = forwardRef<HTMLInputElement, CurrentPasswordInputProps>(\n function CurrentPasswordInput({ label, onValueChange, onChange, busy, readOnly, labels: labelsProp, ...rest }, ref) {\n const labels = useKitLabels(\"dangerConfirm\", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);\n const namedOtherwise = rest[\"aria-label\"] !== undefined || rest[\"aria-labelledby\"] !== undefined;\n return (\n <Input\n {...rest}\n ref={ref}\n // After the spread: a props object spread at the field must not turn it into a\n // text field, or into one the password manager offers a new password for.\n type=\"password\"\n autoComplete=\"current-password\"\n label={label === undefined ? (namedOtherwise ? undefined : labels.password) : hasContent(label) ? label : undefined}\n readOnly={Boolean(busy) || readOnly}\n onChange={(e) => {\n onChange?.(e);\n onValueChange?.(e.target.value);\n }}\n />\n );\n },\n);\nCurrentPasswordInput.displayName = \"CurrentPasswordInput\";\n\n/** The words {@link TypedConfirmField} says on its own behalf — the `dangerConfirm`\n * namespace's `phrase` and `phrasePlaceholder`, shared with DangerConfirm's own field,\n * so the sentence \"Type “X” to confirm\" is translated once. */\nexport type TypedConfirmFieldLabels = Pick<DangerConfirmLabels, \"phrase\" | \"phrasePlaceholder\">;\n\nexport interface TypedConfirmFieldProps\n extends Omit<InputProps, \"type\" | \"value\" | \"defaultValue\" | \"label\" | \"placeholder\"> {\n /** The text to repeat — a word (\"DELETE\"), a name, an e-mail address. */\n target: string;\n /** How the typed text is compared with `target` — {@link TypedMatch}. Default\n * `\"trim\"`, as {@link typedMatches}; `\"caseless\"` for an address or an\n * acknowledgement word a user may type in any case. */\n match?: TypedMatch;\n /** Controlled value. Left out, the field keeps its own (start: `defaultValue`). */\n value?: string;\n defaultValue?: string;\n /** The typed text as a string, on every keystroke. Fires alongside `onChange`. */\n onValueChange?: (value: string) => void;\n /**\n * The typed text started or stopped matching `target` — fired from the keystroke\n * that flipped it, so an uncontrolled field can still drive the button it guards. A\n * controlled caller that resets the value itself (on a close) knows the answer\n * already, and gets no call for that; it can also compute it with {@link typedMatches}.\n */\n onMatchedChange?: (matched: boolean) => void;\n /** The label. Default `dangerConfirm.phrase(target)` — \"Type “DELETE” to confirm\". */\n label?: ReactNode;\n /** Text inside the empty field. Default `dangerConfirm.phrasePlaceholder` (unset).\n * Given, the label moves ABOVE the field: a floating label occupies the empty\n * field, which is exactly where a placeholder shows. `\"\"` means none. */\n placeholder?: string;\n /** The guarded action is running: the field turns `readOnly` (not `disabled`, which\n * would drop the focus Enter left in it). */\n busy?: boolean;\n labels?: Partial<TypedConfirmFieldLabels>;\n}\n\n/**\n * The \"type this to confirm\" field — {@link DangerConfirm}'s `phrase` field and\n * `useConfirm({ requireTyped })`'s, on its own (keksdose K7).\n *\n * keksdose writes it by hand four times: the privacy enrol, upgrade and sweep dialogs\n * (type the acknowledgement word, then the key doors appear) and the admin's \"type the\n * user's address\" (`UserActionConfirm`), each an `Input` plus its own\n * `trim().toUpperCase()` / `toLowerCase()` comparison. None of those places is an\n * arm → confirm tile or a modal confirm — what is guarded is a whole form, or the\n * next step of a dialog — so the field had to stand alone. What it brings over a plain\n * `Input`: one match rule ({@link typedMatches}, which lower-cases locale-independently\n * on purpose), the label worded from the target in the app's language, and the\n * attributes a phone keyboard needs to leave the text alone (no autocomplete, no\n * auto-capital, no autocorrect, no spellcheck — a keyboard that \"corrects\" an e-mail\n * address makes the guard unpassable).\n *\n * The field reports whether it matches (`onMatchedChange`, and `data-matched` on the\n * `<input>` for styling); what the match unlocks is the caller's. The ref is the\n * `<input>`.\n *\n * ```tsx\n * const [ok, setOk] = useState(false);\n * <TypedConfirmField target={t(\"privacy.enroll_ack_word\")} match=\"caseless\" onMatchedChange={setOk} />\n * {ok && <KeyDoorsForm … />}\n * ```\n */\nexport const TypedConfirmField = forwardRef<HTMLInputElement, TypedConfirmFieldProps>(function TypedConfirmField(\n {\n target,\n match = \"trim\",\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onMatchedChange,\n onChange,\n label: labelProp,\n placeholder: placeholderProp,\n busy,\n readOnly,\n labels: labelsProp,\n id,\n className,\n ...rest\n },\n ref,\n) {\n const labels = useKitLabels(\"dangerConfirm\", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);\n const [own, setOwn] = useState(defaultValue);\n const value = valueProp ?? own;\n const matched = typedMatches(value, target, match);\n const generated = useId();\n const fieldId = id ?? generated;\n const label =\n labelProp !== undefined\n ? labelProp\n : typeof labels.phrase === \"function\"\n ? labels.phrase(target)\n : labels.phrase;\n const fromLabels =\n labels.phrasePlaceholder === undefined\n ? undefined\n : typeof labels.phrasePlaceholder === \"function\"\n ? labels.phrasePlaceholder(target)\n : labels.phrasePlaceholder;\n const placeholder = placeholderProp ?? fromLabels;\n\n const fieldProps = {\n ...rest,\n ref,\n id: fieldId,\n value,\n autoComplete: \"off\",\n autoCapitalize: \"off\",\n autoCorrect: \"off\",\n spellCheck: false,\n readOnly: Boolean(busy) || readOnly,\n \"data-matched\": matched || undefined,\n onChange: (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e);\n const next = e.target.value;\n if (valueProp === undefined) setOwn(next);\n onValueChange?.(next);\n const nextMatched = typedMatches(next, target, match);\n if (nextMatched !== matched) onMatchedChange?.(nextMatched);\n },\n };\n\n if (placeholder) {\n return (\n // A static label above, so the placeholder has the empty field to itself.\n <div className={cn(\"space-y-1.5\", className)}>\n <Label htmlFor={fieldId}>{label}</Label>\n <Input {...fieldProps} placeholder={placeholder} />\n </div>\n );\n }\n return <Input {...fieldProps} label={label} className={className} />;\n});\nTypedConfirmField.displayName = \"TypedConfirmField\";\n\n/**\n * Every string the tile renders — the `dangerConfirm` namespace of\n * `<UiKitProvider labels>`, overridable per instance through `labels`. The arm and\n * confirm buttons are usually worded per action (\"Delete budget\"), which is what the\n * `armLabel` / `confirmLabel` props are for; these are the fallbacks.\n */\nexport interface DangerConfirmLabels {\n /** The button that arms the tile. */\n arm: string;\n /** The button that runs the action once the guards are satisfied. */\n confirm: string;\n cancel: string;\n /** The warning above the fields, when no `prompt` is given. */\n prompt: string;\n /** Label of the password field (`requirePassword`). */\n password: string;\n /** Label of the type-to-confirm field. A FUNCTION of the phrase by default, like\n * every message that carries a value: where the phrase sits in the sentence moves\n * with the language. A plain STRING is taken as the finished label — for an app\n * whose catalogue already words it (\"Type DELETE to confirm\") and would otherwise\n * wrap it as `() => label`. */\n phrase: string | ((phrase: string) => string);\n /** Placeholder of the type-to-confirm field — a string, or a function of the\n * phrase (`(p) => p` echoes it). Optional and unset by default: the field keeps its\n * floating label, as before. Given, the label moves ABOVE the field (a floating\n * label occupies the empty field, which is exactly where a placeholder shows) and\n * the placeholder fills the field. An empty string means none. */\n phrasePlaceholder?: string | ((phrase: string) => string);\n /** 0.22: the checkbox `requireAcknowledge={true}` shows — \"I have read what this does\n * and want to continue\" (keksdose's `admin.users.confirm_ack`). */\n acknowledge: string;\n /**\n * 0.23: why the armed confirm is held while the typed phrase does not match yet — in\n * the confirm's tooltip and its description (keksdose G4a). A FUNCTION of the phrase\n * by default (\"Type “DELETE” to confirm\"), or a finished STRING, as `phrase`.\n */\n needsPhrase: string | ((phrase: string) => string);\n /** 0.23: why the armed confirm is held while the `requireAcknowledge` box is unticked\n * — \"Tick the box to confirm\". */\n needsAcknowledge: string;\n /** 0.23: why the armed confirm is held while the `requirePassword` field is empty —\n * \"Enter your password to confirm\". */\n needsPassword: string;\n}\n\n/** `satisfies` rather than a type annotation, so `DEFAULT_DANGER_CONFIRM_LABELS.phrase`\n * stays callable for a caller that composes its own label from it. */\nexport const DEFAULT_DANGER_CONFIRM_LABELS = {\n arm: \"Delete…\",\n confirm: \"Delete\",\n cancel: \"Cancel\",\n prompt: \"This cannot be undone.\",\n password: \"Password\",\n phrase: (phrase: string) => `Type “${phrase}” to confirm`,\n acknowledge: \"I have read what this does and want to continue.\",\n needsPhrase: (phrase: string) => `Type “${phrase}” to confirm`,\n needsAcknowledge: \"Tick the box to confirm\",\n needsPassword: \"Enter your password to confirm\",\n} satisfies DangerConfirmLabels;\n\n/**\n * What the guards were answered with — the second argument of\n * {@link DangerConfirmProps.onConfirm} (0.23, keksdose G4b). A key is there only when its\n * guard was asked for, so the object can go into a request body as it is.\n */\nexport interface DangerConfirmValues {\n /**\n * The text typed into the `phrase` field — as the match rule compared it: trimmed\n * under `phraseMatch` `\"trim\"` and `\"caseless\"` (the spaces a phone keyboard adds are\n * not part of it), exactly as typed under `\"exact\"`. The case is the user's, even\n * under `\"caseless\"`: a server that re-checks applies its own rule to it. Absent\n * without a `phrase`.\n */\n typed?: string;\n /** The entered password — the same value as the first argument. Absent without\n * `requirePassword`. */\n password?: string;\n /** `true` when the `requireAcknowledge` box was shown — it was ticked, since the\n * confirm is held until it is. Absent without one. */\n acknowledged?: true;\n}\n\n/**\n * One line of {@link DangerConfirmProps.consequences}: what the action will do. A plain\n * string, or this, for a key of its own and the `severe` mark.\n */\nexport interface DangerConsequence {\n /** React key — keksdose keys its lines by what they say (\"api_tokens\", \"only_door\").\n * Default: the text when it is a string, else the position. */\n key?: string;\n text: ReactNode;\n /** \"There is no way back\" — painted in the danger colour rather than the list's\n * muted one. keksdose reserves it for the one line that loses something for good. */\n severe?: boolean;\n}\n\nexport interface DangerConfirmProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"onChange\"> {\n /**\n * Runs the action, with the entered password when `requirePassword` is on.\n *\n * Return a promise and the tile manages itself: busy until it settles, disarmed\n * (fields wiped) when it resolves, still armed when it rejects — so the user can\n * correct a wrong password and retry. The rejection is not swallowed for you to\n * miss: handle it (and show why) in the caller, as with any mutation.\n *\n * 0.23: the second argument is what every guard was answered with — the typed phrase,\n * the password, the tick ({@link DangerConfirmValues}). keksdose G4b: its admin\n * actions send the address the admin TYPED, and the server re-checks it against the\n * account (`assert_confirmed`), so a client that put the wrong row's id in the request\n * is refused rather than obeyed; the tile kept the text to itself.\n *\n * onConfirm={(_password, { typed }) =>\n * reset.mutateAsync({ id, confirm: { acknowledged: true, confirm_email: typed ?? null } })}\n *\n * A second argument rather than one object in place of the password: every\n * `(password) => …` and `() => …` handler, and a `mutation.mutate` passed as it is,\n * keeps working unchanged, and a handler that needs one guard's answer names it.\n */\n onConfirm: (password: string | undefined, values: DangerConfirmValues) => void | Promise<unknown>;\n /** Show a password field; confirm is held until it is filled. */\n requirePassword?: boolean;\n /**\n * Show an \"I understand\" checkbox; confirm is held until it is ticked\n * (keksdose K7). `true` words it with `labels.acknowledge`; any other node IS the\n * checkbox's label (\"I understand Anna will be signed out everywhere\").\n *\n * The guard for an action whose risk is MIS-TARGETING less than carelessness:\n * keksdose's admin password reset asks for a typed address when the account has an\n * encrypted door to lose, and a tick otherwise (`UserActionConfirm`), and its plan\n * editor asks for the tick alone (`UserPlanEditor`). Both were hand-built beside this\n * tile because it had no tick. It combines with `phrase` and `requirePassword`: every\n * guard given must be satisfied.\n */\n requireAcknowledge?: ReactNode;\n /**\n * What the action will do, said before it happens — a list under the prompt, shown\n * once armed (keksdose K7, `UserActionConfirm`'s consequences). Strings, or\n * {@link DangerConsequence}s for a `severe` line in the danger colour.\n *\n * Derive them from the row's own facts rather than reciting the worst case: an admin\n * who reads the same paragraph on every row stops reading it (keksdose dev#488).\n */\n consequences?: readonly (string | DangerConsequence)[];\n /** Show a \"type <phrase> to confirm\" field; confirm is held until the field matches\n * (case-sensitive; surrounding spaces ignored unless `phraseMatch=\"exact\"`). */\n phrase?: string;\n /**\n * How the typed text is compared with `phrase`. `\"trim\"` (default) ignores spaces\n * around it — a phone keyboard's autocomplete likes to add one. `\"exact\"` compares\n * character for character, spaces included, for an app whose contract is \"type\n * exactly this\". `\"caseless\"` (0.18) also ignores case — for a phrase that is an\n * e-mail address (keksdose's \"type the user's address\" admin rule). See\n * {@link TypedMatch}.\n */\n phraseMatch?: TypedMatch;\n /** The warning above the fields. Defaults to `labels.prompt`. */\n prompt?: ReactNode;\n /** `\"danger\"` (default) for what cannot be undone; `\"warning\"` for what can, at a\n * cost (loading demo data over your own). Colours the prompt, and picks the arm\n * button's variant and — unless {@link DangerConfirmProps.confirmVariant} is\n * given — the confirm's. */\n tone?: \"danger\" | \"warning\";\n /**\n * The confirm button's variant, apart from `tone` (0.24, keksdose). Default: what\n * `tone` picks, as before — `\"danger\"` for `\"danger\"`, `\"primary\"` for `\"warning\"`.\n *\n * `tone` says how bad the outcome is; this says how loud the last press is, and the two\n * need not agree. keksdose's `UserActionConfirm` (an admin resets somebody else's\n * password) asks an AMBER question — what it guards against is mis-targeting, not data\n * loss, so the danger colour stays its one `severe` consequence's — and ends in a RED\n * Go, as its hand-built panel did before it moved onto this tile in 0.23; with only\n * `tone`, the amber question made Go the neutral primary fill. `tone=\"warning\"\n * confirmVariant=\"danger\"` is that panel again.\n */\n confirmVariant?: ButtonVariant;\n /**\n * Hold the armed confirm for a reason of the CALLER's own (0.24, keksdose) — the\n * tile's counterpart of FormActions' `submitDisabledReason`. While it has content the\n * confirm is held exactly as by the built-in guards: `aria-disabled` but focusable,\n * the reason in the kit {@link Tooltip} and its description, a press — or Enter in a\n * field — does nothing. Nothing else changes: the arm button stays usable, and no\n * line is printed under the buttons.\n *\n * keksdose's `UserPlanEditor` (\"move this account onto another plan\") must not confirm\n * the plan the account already holds — the request would only write FREE → FREE into\n * the audit trail. With no guard of its own to give, it passed \"Pick a different plan\"\n * as `lockedReason`, which is a LOCK: documented as \"the action is not available\",\n * spelled out under the buttons as well as in the tooltip, and meant for a write the\n * user cannot make land. A guard the user lifts by changing a field is this prop.\n *\n * Which reason the held confirm names: a write lock's first (`lockedReason`, `commit`\n * — nothing in the tile lifts it), then this one, then the built-in guards in the\n * order they are drawn (the tick, the phrase, the password). This one before the\n * built-ins because it is usually about a field in\n * {@link DangerConfirmProps.children}, which is drawn ABOVE them — the rule since 0.23\n * is \"the first open guard in the order the user meets it\" — and because it is about\n * WHAT is being confirmed (which plan), which has to be settled before acknowledging\n * it means anything. It is also the order keksdose's plan editor had, its\n * `lockedReason` winning over the tick.\n */\n confirmDisabledReason?: ReactNode;\n /**\n * Fields of the caller's own, drawn INSIDE the armed tile (0.24, keksdose): after the\n * prompt and the consequences, before the tick, the typed phrase and the password —\n * the order is \"what this does, what to do it with, then prove you mean it\". Nothing\n * is drawn for them while the tile is disarmed, and nothing at all without them, so a\n * tile without children is laid out exactly as before.\n *\n * keksdose's `UserPlanEditor` asks WHICH plan before it asks for the tick; with no\n * place inside the tile for the picker, the `Select` sat above it, and the tile's\n * prompt — the panel's title by rights — became the \"FREE → PRO\" line under the\n * picker. With the picker here, the prompt is the title again.\n *\n * The fields are the caller's: their values are not wiped on disarm (an uncontrolled\n * field starts over anyway — the slot unmounts), not passed to `onConfirm`, and a\n * guard on them is {@link DangerConfirmProps.confirmDisabledReason}. Arming moves\n * focus to their first form field (an input, a select, a combobox, a radio…), else to\n * the tile's own first field as before; Tab then goes on through the tick, the phrase\n * and the password to Cancel and the confirm. They sit inside the tile's `<form>`:\n * Enter in a text field confirms once every guard allows, and a {@link Button} among\n * them needs `type=\"button\"` — without one it SUBMITS the form, as a native button\n * does.\n */\n children?: ReactNode;\n /** Visible text of the arm button; defaults to `labels.arm`. */\n armLabel?: ReactNode;\n /** Visible text of the confirm button; defaults to `labels.confirm`. */\n confirmLabel?: ReactNode;\n /**\n * The action is running: confirm shows a spinner and nothing can be pressed — Cancel\n * included. For a caller that tracks the mutation itself (a `useMutation`'s\n * `isPending`); a promise returned from `onConfirm` does the same on its own.\n *\n * Cancel stays disabled ON PURPOSE, unlike FormActions' (keksdose asked in 0.24 why the\n * two differ). Once the request has left, nothing on the client can call it back —\n * not even an `AbortSignal`, which only stops the waiting, not the server — so a usable\n * Cancel could only collapse the tile while the action went on: \"Cancel\" pressed, and\n * the account reset anyway. Every way of settling what comes back is wrong somewhere: a\n * resolve after the Cancel did what the user called off; a reject finds the fields\n * wiped (a collapsed tile holds no password), so the 0.23 \"stay armed and retry\" is\n * gone; and re-arming while the first request runs is either a busy tile with empty\n * fields or — if the busy state went with the Cancel — a second destructive request\n * beside the first. FormActions' Cancel leaves an editor whose save is the user's own\n * edit landing, and a form can be edited again; the tile's action is the one that\n * cannot be undone, so it says nothing it cannot keep and waits — the wait is one\n * request long.\n *\n * When the action settles still armed (it failed) and the press on the confirm had\n * dropped the focus — a natively disabled button loses it — focus comes back to the\n * confirm, so a keyboard user can retry or Shift+Tab to the field to correct (0.24).\n */\n busy?: boolean;\n /** The arm button is disabled. */\n disabled?: boolean;\n /**\n * Why the action is not available — a read-only demo, a write lock, a missing\n * permission. Disables the arm button like `disabled`, and SAYS so: the sentence is\n * shown under the button and attached to it with `aria-describedby`, and the button\n * stays focusable (`aria-disabled`) so a keyboard user can land on it and hear why.\n *\n * On the ARM button rather than the confirm: arming asks for a password, and asking\n * for a password for a write that can never land is the worse of the two. A tile that\n * is ALREADY armed when the reason arrives (controlled `armed`, or a lock that landed\n * while it was open) keeps its fields but its confirm takes the reason the same way\n * — focusable, `aria-disabled`, the reason in its tooltip — and Enter does nothing.\n */\n lockedReason?: ReactNode;\n /**\n * This tile COMMITS — the 0.18 write-lock opt-in that {@link Button} has (keksdose\n * K3). Under a locked {@link WriteLockProvider} the lock's reason becomes\n * `lockedReason` (and wins over one of the tile's own), so a page that mounts the\n * provider no longer threads `lockedReason={lock.locked ? lock.reason : undefined}`\n * into every tile. No provider, or an unlocked one: no effect.\n */\n commit?: CommitScope;\n /** Controlled armed state. The parent can then collapse the tile from a mutation's\n * own `onSuccess` without returning a promise. */\n armed?: boolean;\n /** Called with the next armed state — on arm, cancel, and a resolved `onConfirm`. */\n onArmedChange?: (armed: boolean) => void;\n /** User-facing strings; see {@link DangerConfirmLabels}. */\n labels?: Partial<DangerConfirmLabels>;\n}\n\n/** What counts as a FIELD among the caller's `children` — what arming focuses. Not\n * any tabbable element: a \"see the plans\" link or a disclosure button before the\n * picker is not where the user starts. `[tabindex=\"-1\"]` is a roving radio group's\n * unselected option; the selected one (`0`) is the group's stop. */\nconst SLOT_FIELD = [\n 'input:not([type=\"hidden\"])',\n \"select\",\n \"textarea\",\n ...[\"combobox\", \"listbox\", \"radio\", \"checkbox\", \"switch\", \"slider\", \"spinbutton\", \"textbox\"].map(\n (role) => `[role=\"${role}\"]`,\n ),\n]\n .map((selector) => `${selector}:not(:disabled):not([tabindex=\"-1\"]):not([aria-hidden=\"true\"])`)\n .join(\", \");\n\n/** The first field among the caller's `children`, skipping a native radio that is not\n * the checked one of its group (Tab lands on the checked one). */\nfunction firstSlotField(slot: HTMLElement | null): HTMLElement | null {\n if (!slot) return null;\n for (const el of slot.querySelectorAll<HTMLElement>(SLOT_FIELD)) {\n if (el.closest(\"[hidden], [inert]\")) continue;\n if (el instanceof HTMLInputElement && el.type === \"radio\" && !el.checked && el.name) {\n const group = el.form?.elements.namedItem(el.name);\n const checked =\n group instanceof RadioNodeList && Array.from(group).some((r) => r instanceof HTMLInputElement && r.checked);\n if (checked) continue;\n }\n return el;\n }\n return null;\n}\n\n/**\n * An \"arm → confirm\" tile for destructive actions: one button, which expands into a\n * warning, an optional list of consequences, optional fields of the caller's own\n * (`children`, 0.24), an optional \"I understand\" tick, an optional type-to-confirm\n * field, an optional password field and a confirm that is held until every guard is\n * satisfied — the built-in ones, and the caller's `confirmDisabledReason` (0.24).\n *\n * A held confirm SAYS which guard is still open (0.23, keksdose G4a): it is\n * `aria-disabled` rather than `disabled` — still focusable, so a keyboard user can land\n * on it — with the reason in the kit {@link Tooltip} and its description (\"Type\n * “DELETE” to confirm\", \"Tick the box to confirm\", \"Enter your password to confirm\";\n * `labels.needs*`), the first open guard in the order they are drawn. FormActions'\n * `submitDisabledReason` does the same for a form's Save. Pressing it, or Enter in a\n * field, does nothing. A lock's reason wins over a guard's, the caller's guard over the\n * built-in ones; while the action runs the confirm is plainly disabled, its spinner\n * saying why — and so is Cancel, which cannot call back a request that has left (see\n * `busy`).\n *\n * Keksdose hand-rolled it three times (load demo data, wipe everything, reset a\n * budget) and then as `shared/components/danger-confirm.tsx`; the only app-specific\n * part was its write-lock hook, which is `lockedReason` here.\n *\n * The fields are a `<form>`, so Enter confirms once the guards allow it. They are\n * wiped every time the tile disarms — a password must not sit in a collapsed tile.\n * Arming moves focus to the first field (or Cancel, when there is none — never to the\n * destructive button itself), and disarming moves it back to the arm button, so the\n * keyboard user is never left on an element that just vanished.\n */\nexport function DangerConfirm({\n onConfirm,\n requirePassword,\n requireAcknowledge,\n consequences,\n phrase,\n phraseMatch = \"trim\",\n prompt,\n tone = \"danger\",\n confirmVariant,\n confirmDisabledReason,\n children,\n armLabel,\n confirmLabel,\n busy: busyProp,\n disabled,\n lockedReason: ownLockedReason,\n commit,\n armed: armedProp,\n onArmedChange,\n labels: labelsProp,\n className,\n ...rest\n}: DangerConfirmProps) {\n const labels = useKitLabels(\"dangerConfirm\", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);\n const lockedReason = useCommitReason(commit, ownLockedReason);\n const [armedState, setArmedState] = useState(false);\n const armed = armedProp ?? armedState;\n const [password, setPassword] = useState(\"\");\n const [typed, setTyped] = useState(\"\");\n const [acknowledged, setAcknowledged] = useState(false);\n const { pending, run } = usePromisePending();\n const busy = Boolean(busyProp) || pending;\n // `readOnly` rather than `disabled` on the fields while busy: disabling the field\n // that has focus (Enter was pressed in it) drops focus to <body>.\n const promptId = useId();\n const consequencesId = useId();\n const reasonId = useId();\n\n // The buttons focus is moved to are found by id.\n const armId = useId();\n const cancelId = useId();\n const confirmId = useId();\n const firstFieldRef = useRef<HTMLInputElement>(null);\n // The caller's fields (`children`), searched for their first form field on arm.\n const slotRef = useRef<HTMLDivElement>(null);\n // Focus moves only after a transition — never on mount, so a tile that renders armed\n // (controlled) does not take the page's focus merely by existing.\n const moveFocus = useRef(false);\n // A confirm from this tile is under way — see the focus return after a failure below.\n const confirmed = useRef(false);\n\n // A disarm from anywhere (cancel, a resolved confirm, the parent) wipes the fields.\n // During render, like NumberField's draft, so no frame shows a collapsed tile that\n // still holds a password.\n const [wasArmed, setWasArmed] = useState(armed);\n if (wasArmed !== armed) {\n setWasArmed(armed);\n if (!armed) {\n setPassword(\"\");\n setTyped(\"\");\n setAcknowledged(false);\n }\n }\n\n const prevArmed = useRef(armed);\n useEffect(() => {\n const changed = prevArmed.current !== armed;\n prevArmed.current = armed;\n const byUser = moveFocus.current;\n moveFocus.current = false;\n if (!changed) return;\n if (armed) {\n if (byUser) {\n // The caller's fields come first on the page, so first in focus too.\n (firstSlotField(slotRef.current) ?? firstFieldRef.current ?? document.getElementById(cancelId))?.focus();\n }\n return;\n }\n confirmed.current = false;\n // A controlled parent collapsing the tile from its own `onSuccess` did not go\n // through `setArmed`; if focus went down with the form, bring it back too.\n const lost = document.activeElement === null || document.activeElement === document.body;\n if (byUser || lost) document.getElementById(armId)?.focus();\n }, [armed, armId, cancelId]);\n\n // The action settled and the tile is still armed — it failed, and the user retries.\n // The confirm was natively disabled while it ran, and a focused button that turns\n // disabled drops the focus to <body>: bring it back to the button that was pressed.\n // Only after a confirm from THIS tile (`confirmed`), so a `busy` that comes and goes\n // on its own never pulls the page's focus in. (A resolve disarms, and the effect\n // above takes the focus to the arm button.)\n const wasBusy = useRef(busy);\n useEffect(() => {\n const settled = wasBusy.current && !busy;\n wasBusy.current = busy;\n if (!settled) return;\n const ours = confirmed.current;\n confirmed.current = false;\n if (!ours || !armed) return;\n if (document.activeElement === null || document.activeElement === document.body) {\n document.getElementById(confirmId)?.focus();\n }\n }, [busy, armed, confirmId]);\n\n const setArmed = (next: boolean) => {\n moveFocus.current = true;\n if (armedProp === undefined) setArmedState(next);\n onArmedChange?.(next);\n };\n\n const locked = hasContent(lockedReason);\n // `true` words the tick with the namespace; any other node is its label; `false`,\n // `null` and `\"\"` are no tick at all.\n const acknowledgeLabel: ReactNode =\n requireAcknowledge === true ? labels.acknowledge : hasContent(requireAcknowledge) ? requireAcknowledge : null;\n const asksAcknowledge = acknowledgeLabel !== null;\n const passwordOk = !requirePassword || password !== \"\";\n const phraseOk = phrase === undefined || typedMatches(typed, phrase, phraseMatch);\n const acknowledgeOk = !asksAcknowledge || acknowledged;\n const callerHeld = hasContent(confirmDisabledReason);\n // `{cond && <Select />}` and `[null, false]` are no fields: no wrapper, no gap.\n const hasFields = Children.toArray(children).some(hasContent);\n const canConfirm = passwordOk && phraseOk && acknowledgeOk && !callerHeld && !busy;\n // The first guard still open, in the order the fields are drawn — the one the user\n // meets next, so the sentence points at it.\n const guardReason: string | undefined = !acknowledgeOk\n ? labels.needsAcknowledge\n : !phraseOk\n ? typeof labels.needsPhrase === \"function\"\n ? labels.needsPhrase(phrase ?? \"\")\n : labels.needsPhrase\n : !passwordOk\n ? labels.needsPassword\n : undefined;\n // The lock first (no guard can lift it); none while busy, when the guards were met and\n // the spinner is the state; then the caller's guard — about the fields drawn above the\n // built-in ones, and about WHAT is confirmed — then the first built-in guard still open.\n const confirmReason: ReactNode = locked\n ? lockedReason\n : busy\n ? undefined\n : callerHeld\n ? confirmDisabledReason\n : guardReason;\n\n const submit = (e: FormEvent) => {\n e.preventDefault();\n // `locked` too: Enter in a field submits the form without the button's say (and\n // `canConfirm` holds the caller's guard the same way).\n if (!canConfirm || locked) return;\n const values: DangerConfirmValues = {\n ...(phrase !== undefined && { typed: phraseMatch === \"exact\" ? typed : typed.trim() }),\n ...(requirePassword && { password }),\n ...(asksAcknowledge && { acknowledged: true as const }),\n };\n confirmed.current = true;\n // Disarms when it resolves; a rejection leaves it armed, fields kept: the caller\n // shows why, the user retries.\n run(onConfirm(values.password, values), () => setArmed(false));\n };\n\n // The first field takes focus on arm: the tick, then the phrase, then the password —\n // the order they are drawn in.\n const firstField = asksAcknowledge ? \"acknowledge\" : phrase !== undefined ? \"phrase\" : \"password\";\n const lines = (consequences ?? []).map((item, index) =>\n typeof item === \"string\"\n ? { key: item, text: item as ReactNode, severe: false }\n : { key: item.key ?? String(index), text: item.text, severe: Boolean(item.severe) },\n );\n\n const toneText = tone === \"warning\" ? \"text-[var(--warning)]\" : \"text-[var(--danger)]\";\n\n if (!armed) {\n const arm = (\n <Button\n id={armId}\n type=\"button\"\n variant={tone === \"warning\" ? \"secondary\" : \"danger\"}\n disabled={disabled}\n aria-disabled={locked || undefined}\n aria-describedby={locked ? reasonId : undefined}\n onClick={() => {\n if (!locked) setArmed(true);\n }}\n className=\"aria-disabled:cursor-not-allowed aria-disabled:opacity-50\"\n >\n {armLabel ?? labels.arm}\n </Button>\n );\n return (\n <div {...rest} className={cn(\"space-y-1\", className)}>\n {locked ? (\n // The reason on the button itself too, where the pointer that tried it is —\n // the line below can sit out of view in a long settings card. Portalled, so\n // a card that scrolls neither clips it nor grows by it.\n //\n // The button in a FRAGMENT on purpose: Tooltip clones an element child to\n // add the bubble to its `aria-describedby`, and the button is already\n // described by the visible line below — the same sentence twice, read out\n // on every focus. A fragment is left as it is, so the bubble stays visual.\n <Tooltip label={lockedReason} portal>\n <>{arm}</>\n </Tooltip>\n ) : (\n arm\n )}\n {locked && (\n <p id={reasonId} className=\"text-xs text-[var(--text-muted)]\">\n {lockedReason}\n </p>\n )}\n </div>\n );\n }\n\n return (\n <div {...rest} className={cn(\"space-y-2\", className)}>\n <form\n className=\"space-y-2\"\n aria-describedby={lines.length > 0 ? `${promptId} ${consequencesId}` : promptId}\n aria-busy={busy || undefined}\n onSubmit={submit}\n noValidate\n >\n <p id={promptId} className={cn(\"text-xs font-medium\", toneText)}>\n {prompt ?? labels.prompt}\n </p>\n {lines.length > 0 && (\n <ul id={consequencesId} className=\"list-disc space-y-1 ps-5 text-xs text-[var(--text-secondary)]\">\n {lines.map((line) => (\n <li key={line.key} className={line.severe ? \"text-[var(--danger)]\" : undefined}>\n {line.text}\n </li>\n ))}\n </ul>\n )}\n {/* The caller's fields: after what the action does, before the proof that it is\n meant. No wrapper without them — a 0.23 tile's markup is unchanged. */}\n {hasFields && (\n <div ref={slotRef} className=\"space-y-2\">\n {children}\n </div>\n )}\n {asksAcknowledge && (\n <Checkbox\n ref={firstField === \"acknowledge\" ? firstFieldRef : undefined}\n label={acknowledgeLabel}\n checked={acknowledged}\n // Not `disabled` while busy, for the same reason the fields are readOnly:\n // the box may hold the focus. A change while busy is simply not taken.\n onCheckedChange={(next) => {\n if (!busy) setAcknowledged(next);\n }}\n />\n )}\n {phrase !== undefined && (\n <TypedConfirmField\n ref={firstField === \"phrase\" ? firstFieldRef : undefined}\n target={phrase}\n match={phraseMatch}\n value={typed}\n onValueChange={setTyped}\n busy={busy}\n // Already resolved through this tile's own `labels` prop; handed on so a\n // per-instance phrase wording reaches the field.\n labels={{ phrase: labels.phrase, phrasePlaceholder: labels.phrasePlaceholder }}\n />\n )}\n {requirePassword && (\n <CurrentPasswordInput\n ref={firstField === \"password\" ? firstFieldRef : undefined}\n label={labels.password}\n value={password}\n busy={busy}\n onValueChange={setPassword}\n />\n )}\n <div className=\"flex flex-wrap gap-2\">\n <Button id={cancelId} type=\"button\" variant=\"ghost\" disabled={busy} onClick={() => setArmed(false)}>\n {labels.cancel}\n </Button>\n <Button\n id={confirmId}\n type=\"submit\"\n variant={confirmVariant ?? (tone === \"warning\" ? \"primary\" : \"danger\")}\n disabled={!canConfirm}\n // Held by a guard (the caller's or a built-in one), or armed and then locked\n // (or rendered armed under a lock): the confirm says why the way Button\n // does — focusable, `aria-disabled`, the reason in its tooltip and\n // description, a press swallowed (the submit with it) — and the fields stay\n // as typed. Only busy is the native `disabled`.\n disabledReason={confirmReason}\n aria-busy={busy || undefined}\n >\n {busy && <Spinner label={null} className=\"h-4 w-4\" />}\n {confirmLabel ?? labels.confirm}\n </Button>\n </div>\n {locked && <p className=\"text-xs text-[var(--text-muted)]\">{lockedReason}</p>}\n </form>\n </div>\n );\n}\n"],"mappings":";AA2IM,SA8rBM,UA9rBN,KAkJA,YAlJA;AA3IN,SAAS,UAAU,YAAY,aAAa,WAAW,OAAO,QAAQ,gBAAgB;AAEtF,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAC7B,SAAS,QAAQ,OAAO,OAAO,eAAe;AAE9C,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,uBAAyC;AAoB3C,SAAS,aAAa,OAAe,QAAgB,OAAmB,QAAiB;AAC9F,MAAI,SAAS,QAAS,QAAO,UAAU;AACvC,MAAI,SAAS,OAAQ,QAAO,MAAM,KAAK,MAAM;AAG7C,SAAO,MAAM,KAAK,EAAE,YAAY,MAAM,OAAO,KAAK,EAAE,YAAY;AAClE;AAWO,SAAS,oBAAoB;AAClC,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,UAAU,OAAO,IAAI;AAC3B,YAAU,MAAM;AACd,YAAQ,UAAU;AAClB,WAAO,MAAM;AACX,cAAQ,UAAU;AAAA,IACpB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AAA,UAAC;AAAA;AAAA,YACC,KAAK,eAAe,aAAa,gBAAgB;AAAA,YACjD,OAAO,OAAO;AAAA,YACd,OAAO;AAAA,YACP;AAAA,YACA,eAAe;AAAA;AAAA,QACjB;AAAA,QAEF,qBAAC,SAAI,WAAU,wBACb;AAAA,8BAAC,UAAO,IAAI,UAAU,MAAK,UAAS,SAAQ,SAAQ,UAAU,MAAM,SAAS,MAAM,SAAS,KAAK,GAC9F,iBAAO,QACV;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,MAAK;AAAA,cACL,SAAS,mBAAmB,SAAS,YAAY,YAAY;AAAA,cAC7D,UAAU,CAAC;AAAA,cAMX,gBAAgB;AAAA,cAChB,aAAW,QAAQ;AAAA,cAElB;AAAA,wBAAQ,oBAAC,WAAQ,OAAO,MAAM,WAAU,WAAU;AAAA,gBAClD,gBAAgB,OAAO;AAAA;AAAA;AAAA,UAC1B;AAAA,WACF;AAAA,QACC,UAAU,oBAAC,OAAE,WAAU,oCAAoC,wBAAa;AAAA;AAAA;AAAA,EAC3E,GACF;AAEJ;","names":["CurrentPasswordInput","TypedConfirmField"]}
1
+ {"version":3,"sources":["../../src/components/danger-confirm.tsx"],"sourcesContent":["import { Children, useCallback, useEffect, useId, useRef, useState } from \"react\";\nimport type { ChangeEvent, ComponentPropsWithRef, FormEvent, ReactNode } from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { hasContent } from \"../lib/presence\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { Button } from \"./button\";\nimport { Input } from \"./input\";\nimport { Label } from \"./field-base\";\nimport { Spinner } from \"./spinner\";\nimport type { ButtonVariant } from \"./button-look\";\nimport type { InputProps } from \"./input\";\nimport { Checkbox } from \"./checkbox\";\nimport { Tooltip } from \"./tooltip\";\nimport { useCommitReason, type CommitScope } from \"./write-lock\";\nimport { DEFAULT_DANGER_CONFIRM_LABELS } from \"./danger-confirm-labels\";\n\n/**\n * How typed text is compared with the text it has to repeat — shared by\n * `DangerConfirm`'s `phraseMatch` and `useConfirm`'s `typedMatch`.\n *\n * - `\"trim\"` ignores spaces around the typed text — a phone keyboard's autocomplete\n * likes to add one. Case counts: \"delete\" is not \"DELETE\".\n * - `\"exact\"` compares character for character, spaces included.\n * - `\"caseless\"` trims AND ignores case: for an e-mail address, whose domain is\n * case-insensitive and whose local part every real mail server treats so. Both apps'\n * \"type the account's address\" rules (keksdose's `TYPE_EMAIL`, Kurvenschmiede's\n * `TypedConfirm`) compared `trim().toLowerCase()`, and a capital the user's keyboard\n * put at the start must not make the right row look like the wrong one.\n */\nexport type TypedMatch = \"trim\" | \"exact\" | \"caseless\";\n\n/** Whether `typed` repeats `target` under `mode` — see {@link TypedMatch}. Exported for\n * a caller that draws its own field (a dialog that also picks a recipient) and wants\n * the same rule as the kit's. */\nexport function typedMatches(typed: string, target: string, mode: TypedMatch = \"trim\"): boolean {\n if (mode === \"exact\") return typed === target;\n if (mode === \"trim\") return typed.trim() === target;\n // `toLowerCase`, not `toLocaleLowerCase`: the comparison must not change with the\n // reader's locale (a Turkish dotless i would otherwise fail an ASCII address).\n return typed.trim().toLowerCase() === target.trim().toLowerCase();\n}\n\n/**\n * Busy-while-a-promise-runs, for an action that MAY return one: `run(result, onResolved)`\n * marks the caller pending until `result` settles, calls `onResolved` if it fulfilled,\n * and only clears the flag if it rejected — the caller shows why and the user retries.\n * Nothing runs after unmount. Shared by `DangerConfirm` and `ReauthDialog`, whose\n * contract is the same: resolve = done, reject = stay put.\n *\n * @internal\n */\nexport function usePromisePending() {\n const [pending, setPending] = useState(false);\n const mounted = useRef(true);\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n const run = useCallback((result: unknown, onResolved: () => void): boolean => {\n if (!result || typeof (result as Promise<unknown>).then !== \"function\") return false;\n setPending(true);\n (result as Promise<unknown>).then(\n () => {\n if (!mounted.current) return;\n setPending(false);\n onResolved();\n },\n () => {\n if (mounted.current) setPending(false);\n },\n );\n return true;\n }, []);\n return { pending, run };\n}\n\n\n/** The one word {@link CurrentPasswordInput} says on its own behalf — the\n * `dangerConfirm.password` label, shared with DangerConfirm's password field, so an\n * app translates \"Password\" once. */\nexport type CurrentPasswordInputLabels = Pick<DangerConfirmLabels, \"password\">;\n\n/**\n * Everything {@link Input} takes except what makes this field what it is: `type` is\n * always `\"password\"` and `autoComplete` always `\"current-password\"`.\n */\nexport interface CurrentPasswordInputProps extends Omit<InputProps, \"type\" | \"autoComplete\" | \"label\"> {\n /**\n * The visible label. Default `dangerConfirm.password` (\"Password\") — unless the field\n * is named another way (`aria-label` / `aria-labelledby`), which then stays the only\n * name. Pass the app's own word on a sign-in form (\"Password\", \"Your password\"), or\n * `null` for a field whose `<label htmlFor>` is drawn elsewhere (a form library's\n * `FormLabel`), which would otherwise be labelled twice.\n */\n label?: ReactNode;\n /** The value as a string — the `(next) => …` shape, so a caller holding it in\n * `useState` need not unwrap `event.target.value`. Fires alongside `onChange`,\n * never instead of it, so a form library's `onChange` keeps working. */\n onValueChange?: (value: string) => void;\n /**\n * A check is running (the sign-in request, the re-auth). The field turns `readOnly`,\n * NOT `disabled`: the field being submitted is usually the focused one (Enter was\n * pressed in it), and disabling a focused field drops focus to `<body>` — the user\n * lands nowhere when the \"wrong password\" answer comes back.\n */\n busy?: boolean;\n /** Per-instance override of `dangerConfirm.password`. */\n labels?: LabelOverride<CurrentPasswordInputLabels>;\n}\n\n/**\n * The \"prove it is you\" field: a password input that a password manager fills with\n * the CURRENT password and never offers to generate a new one for.\n *\n * It is the field of a sign-in form, a re-auth step ({@link ReauthDialog} draws the same\n * field), and {@link DangerConfirm}'s `requirePassword`. Public since 0.22 for kastlan's\n * sign-in and re-auth (kastlan 1), which wrote `type=\"password\"` +\n * `autoComplete=\"current-password\"` by hand — and a sign-in field that forgets the\n * second half gets the browser's \"suggest a strong password\" offer on the one form where\n * a NEW password is never what is wanted. The reverse matters as much: a field that sets\n * a NEW password (a passphrase, a sign-up) must NOT be this one — keksdose #170 keeps\n * its passphrase doors on `new-password` / `off` for that reason.\n *\n * Everything else is {@link Input}: the reveal toggle, `error` (under the field,\n * `aria-describedby`, `aria-invalid`), `invalid`, `name`, `id`, `autoFocus`, `required`.\n * The ref is the `<input>`, so it works with `@eifi1/ui-kit/rhf`'s `FormControl` /\n * a `register()` spread, and controlled or uncontrolled.\n *\n * ```tsx\n * <CurrentPasswordInput name=\"password\" label={t(\"password\")} error={errors.password?.message}\n * busy={isSubmitting} {...register(\"password\")} />\n * ```\n */\nexport function CurrentPasswordInput({\n label,\n onValueChange,\n onChange,\n busy,\n readOnly,\n labels: labelsProp,\n ...rest\n}: CurrentPasswordInputProps) {\n const labels = useKitLabels(\"dangerConfirm\", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);\n const namedOtherwise = rest[\"aria-label\"] !== undefined || rest[\"aria-labelledby\"] !== undefined;\n return (\n <Input\n // `ref` (the `<input>`) rides along: a React 19 ref prop since 0.34 (MOD-4, refactor\n // audit 2026-10), where this was `forwardRef`.\n {...rest}\n // After the spread: a props object spread at the field must not turn it into a\n // text field, or into one the password manager offers a new password for.\n type=\"password\"\n autoComplete=\"current-password\"\n label={label === undefined ? (namedOtherwise ? undefined : labels.password) : hasContent(label) ? label : undefined}\n readOnly={Boolean(busy) || readOnly}\n onChange={(e) => {\n onChange?.(e);\n onValueChange?.(e.target.value);\n }}\n />\n );\n}\n\n/** The words {@link TypedConfirmField} says on its own behalf — the `dangerConfirm`\n * namespace's `phrase` and `phrasePlaceholder`, shared with DangerConfirm's own field,\n * so the sentence \"Type “X” to confirm\" is translated once. */\nexport type TypedConfirmFieldLabels = Pick<DangerConfirmLabels, \"phrase\" | \"phrasePlaceholder\">;\n\nexport interface TypedConfirmFieldProps\n extends Omit<InputProps, \"type\" | \"value\" | \"defaultValue\" | \"label\" | \"placeholder\"> {\n /** The text to repeat — a word (\"DELETE\"), a name, an e-mail address. */\n target: string;\n /** How the typed text is compared with `target` — {@link TypedMatch}. Default\n * `\"trim\"`, as {@link typedMatches}; `\"caseless\"` for an address or an\n * acknowledgement word a user may type in any case. */\n match?: TypedMatch;\n /** Controlled value. Left out, the field keeps its own (start: `defaultValue`). */\n value?: string;\n defaultValue?: string;\n /** The typed text as a string, on every keystroke. Fires alongside `onChange`. */\n onValueChange?: (value: string) => void;\n /**\n * The typed text started or stopped matching `target` — fired from the keystroke\n * that flipped it, so an uncontrolled field can still drive the button it guards. A\n * controlled caller that resets the value itself (on a close) knows the answer\n * already, and gets no call for that; it can also compute it with {@link typedMatches}.\n */\n onMatchedChange?: (matched: boolean) => void;\n /** The label. Default `dangerConfirm.phrase(target)` — \"Type “DELETE” to confirm\". */\n label?: ReactNode;\n /** Text inside the empty field. Default `dangerConfirm.phrasePlaceholder` (unset).\n * Given, the label moves ABOVE the field: a floating label occupies the empty\n * field, which is exactly where a placeholder shows. `\"\"` means none. */\n placeholder?: string;\n /** The guarded action is running: the field turns `readOnly` (not `disabled`, which\n * would drop the focus Enter left in it). */\n busy?: boolean;\n labels?: LabelOverride<TypedConfirmFieldLabels>;\n}\n\n/**\n * The \"type this to confirm\" field — {@link DangerConfirm}'s `phrase` field and\n * `useConfirm({ requireTyped })`'s, on its own (keksdose K7).\n *\n * keksdose writes it by hand four times: the privacy enrol, upgrade and sweep dialogs\n * (type the acknowledgement word, then the key doors appear) and the admin's \"type the\n * user's address\" (`UserActionConfirm`), each an `Input` plus its own\n * `trim().toUpperCase()` / `toLowerCase()` comparison. None of those places is an\n * arm → confirm tile or a modal confirm — what is guarded is a whole form, or the\n * next step of a dialog — so the field had to stand alone. What it brings over a plain\n * `Input`: one match rule ({@link typedMatches}, which lower-cases locale-independently\n * on purpose), the label worded from the target in the app's language, and the\n * attributes a phone keyboard needs to leave the text alone (no autocomplete, no\n * auto-capital, no autocorrect, no spellcheck — a keyboard that \"corrects\" an e-mail\n * address makes the guard unpassable).\n *\n * The field reports whether it matches (`onMatchedChange`, and `data-matched` on the\n * `<input>` for styling); what the match unlocks is the caller's. The ref is the\n * `<input>`.\n *\n * ```tsx\n * const [ok, setOk] = useState(false);\n * <TypedConfirmField target={t(\"privacy.enroll_ack_word\")} match=\"caseless\" onMatchedChange={setOk} />\n * {ok && <KeyDoorsForm … />}\n * ```\n */\nexport function TypedConfirmField({\n ref,\n target,\n match = \"trim\",\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onMatchedChange,\n onChange,\n label: labelProp,\n placeholder: placeholderProp,\n busy,\n readOnly,\n labels: labelsProp,\n id,\n className,\n ...rest\n}: TypedConfirmFieldProps) {\n const labels = useKitLabels(\"dangerConfirm\", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);\n const [own, setOwn] = useState(defaultValue);\n const value = valueProp ?? own;\n const matched = typedMatches(value, target, match);\n const generated = useId();\n const fieldId = id ?? generated;\n const label =\n labelProp !== undefined\n ? labelProp\n : typeof labels.phrase === \"function\"\n ? labels.phrase(target)\n : labels.phrase;\n const fromLabels =\n labels.phrasePlaceholder === undefined\n ? undefined\n : typeof labels.phrasePlaceholder === \"function\"\n ? labels.phrasePlaceholder(target)\n : labels.phrasePlaceholder;\n const placeholder = placeholderProp ?? fromLabels;\n\n const fieldProps = {\n ...rest,\n ref,\n id: fieldId,\n value,\n autoComplete: \"off\",\n autoCapitalize: \"off\",\n autoCorrect: \"off\",\n spellCheck: false,\n readOnly: Boolean(busy) || readOnly,\n \"data-matched\": matched || undefined,\n onChange: (e: ChangeEvent<HTMLInputElement>) => {\n onChange?.(e);\n const next = e.target.value;\n if (valueProp === undefined) setOwn(next);\n onValueChange?.(next);\n const nextMatched = typedMatches(next, target, match);\n if (nextMatched !== matched) onMatchedChange?.(nextMatched);\n },\n };\n\n if (placeholder) {\n return (\n // A static label above, so the placeholder has the empty field to itself.\n <div className={cn(\"space-y-1.5\", className)}>\n <Label htmlFor={fieldId}>{label}</Label>\n <Input {...fieldProps} placeholder={placeholder} />\n </div>\n );\n }\n return <Input {...fieldProps} label={label} className={className} />;\n}\n\n/**\n * Every string the tile renders — the `dangerConfirm` namespace of\n * `<UiKitProvider labels>`, overridable per instance through `labels`. The arm and\n * confirm buttons are usually worded per action (\"Delete budget\"), which is what the\n * `armLabel` / `confirmLabel` props are for; these are the fallbacks.\n */\nexport interface DangerConfirmLabels {\n /** The button that arms the tile. */\n arm: string;\n /** The button that runs the action once the guards are satisfied. */\n confirm: string;\n cancel: string;\n /** The warning above the fields, when no `prompt` is given. */\n prompt: string;\n /** Label of the password field (`requirePassword`). */\n password: string;\n /** Label of the type-to-confirm field. A FUNCTION of the phrase by default, like\n * every message that carries a value: where the phrase sits in the sentence moves\n * with the language. A plain STRING is taken as the finished label — for an app\n * whose catalogue already words it (\"Type DELETE to confirm\") and would otherwise\n * wrap it as `() => label`. */\n phrase: string | ((phrase: string) => string);\n /** Placeholder of the type-to-confirm field — a string, or a function of the\n * phrase (`(p) => p` echoes it). Optional and unset by default: the field keeps its\n * floating label, as before. Given, the label moves ABOVE the field (a floating\n * label occupies the empty field, which is exactly where a placeholder shows) and\n * the placeholder fills the field. An empty string means none. */\n phrasePlaceholder?: string | ((phrase: string) => string);\n /** 0.22: the checkbox `requireAcknowledge={true}` shows — \"I have read what this does\n * and want to continue\" (keksdose's `admin.users.confirm_ack`). */\n acknowledge: string;\n /**\n * 0.23: why the armed confirm is held while the typed phrase does not match yet — in\n * the confirm's tooltip and its description (keksdose G4a). A FUNCTION of the phrase\n * by default (\"Type “DELETE” to confirm\"), or a finished STRING, as `phrase`.\n */\n needsPhrase: string | ((phrase: string) => string);\n /** 0.23: why the armed confirm is held while the `requireAcknowledge` box is unticked\n * — \"Tick the box to confirm\". */\n needsAcknowledge: string;\n /** 0.23: why the armed confirm is held while the `requirePassword` field is empty —\n * \"Enter your password to confirm\". */\n needsPassword: string;\n}\n\n// Defined in ./danger-confirm-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_DANGER_CONFIRM_LABELS };\n\n/**\n * What the guards were answered with — the second argument of\n * {@link DangerConfirmProps.onConfirm} (0.23, keksdose G4b). A key is there only when its\n * guard was asked for, so the object can go into a request body as it is.\n */\nexport interface DangerConfirmValues {\n /**\n * The text typed into the `phrase` field — as the match rule compared it: trimmed\n * under `phraseMatch` `\"trim\"` and `\"caseless\"` (the spaces a phone keyboard adds are\n * not part of it), exactly as typed under `\"exact\"`. The case is the user's, even\n * under `\"caseless\"`: a server that re-checks applies its own rule to it. Absent\n * without a `phrase`.\n */\n typed?: string;\n /** The entered password — the same value as the first argument. Absent without\n * `requirePassword`. */\n password?: string;\n /** `true` when the `requireAcknowledge` box was shown — it was ticked, since the\n * confirm is held until it is. Absent without one. */\n acknowledged?: true;\n}\n\n/**\n * One line of {@link DangerConfirmProps.consequences}: what the action will do. A plain\n * string, or this, for a key of its own and the `severe` mark.\n */\nexport interface DangerConsequence {\n /** React key — keksdose keys its lines by what they say (\"api_tokens\", \"only_door\").\n * Default: the text when it is a string, else the position. */\n key?: string;\n text: ReactNode;\n /** \"There is no way back\" — painted in the danger colour rather than the list's\n * muted one. keksdose reserves it for the one line that loses something for good. */\n severe?: boolean;\n}\n\nexport interface DangerConfirmProps extends Omit<ComponentPropsWithRef<\"div\">, \"onChange\"> {\n /**\n * Runs the action, with the entered password when `requirePassword` is on.\n *\n * Return a promise and the tile manages itself: busy until it settles, disarmed\n * (fields wiped) when it resolves, still armed when it rejects — so the user can\n * correct a wrong password and retry. The rejection is not swallowed for you to\n * miss: handle it (and show why) in the caller, as with any mutation.\n *\n * 0.23: the second argument is what every guard was answered with — the typed phrase,\n * the password, the tick ({@link DangerConfirmValues}). keksdose G4b: its admin\n * actions send the address the admin TYPED, and the server re-checks it against the\n * account (`assert_confirmed`), so a client that put the wrong row's id in the request\n * is refused rather than obeyed; the tile kept the text to itself.\n *\n * onConfirm={(_password, { typed }) =>\n * reset.mutateAsync({ id, confirm: { acknowledged: true, confirm_email: typed ?? null } })}\n *\n * A second argument rather than one object in place of the password: every\n * `(password) => …` and `() => …` handler, and a `mutation.mutate` passed as it is,\n * keeps working unchanged, and a handler that needs one guard's answer names it.\n */\n onConfirm: (password: string | undefined, values: DangerConfirmValues) => void | Promise<unknown>;\n /** Show a password field; confirm is held until it is filled. */\n requirePassword?: boolean;\n /**\n * Show an \"I understand\" checkbox; confirm is held until it is ticked\n * (keksdose K7). `true` words it with `labels.acknowledge`; any other node IS the\n * checkbox's label (\"I understand Anna will be signed out everywhere\").\n *\n * The guard for an action whose risk is MIS-TARGETING less than carelessness:\n * keksdose's admin password reset asks for a typed address when the account has an\n * encrypted door to lose, and a tick otherwise (`UserActionConfirm`), and its plan\n * editor asks for the tick alone (`UserPlanEditor`). Both were hand-built beside this\n * tile because it had no tick. It combines with `phrase` and `requirePassword`: every\n * guard given must be satisfied.\n */\n requireAcknowledge?: ReactNode;\n /**\n * What the action will do, said before it happens — a list under the prompt, shown\n * once armed (keksdose K7, `UserActionConfirm`'s consequences). Strings, or\n * {@link DangerConsequence}s for a `severe` line in the danger colour.\n *\n * Derive them from the row's own facts rather than reciting the worst case: an admin\n * who reads the same paragraph on every row stops reading it (keksdose dev#488).\n */\n consequences?: readonly (string | DangerConsequence)[];\n /** Show a \"type <phrase> to confirm\" field; confirm is held until the field matches\n * (case-sensitive; surrounding spaces ignored unless `phraseMatch=\"exact\"`). */\n phrase?: string;\n /**\n * How the typed text is compared with `phrase`. `\"trim\"` (default) ignores spaces\n * around it — a phone keyboard's autocomplete likes to add one. `\"exact\"` compares\n * character for character, spaces included, for an app whose contract is \"type\n * exactly this\". `\"caseless\"` (0.18) also ignores case — for a phrase that is an\n * e-mail address (keksdose's \"type the user's address\" admin rule). See\n * {@link TypedMatch}.\n */\n phraseMatch?: TypedMatch;\n /** The warning above the fields. Defaults to `labels.prompt`. */\n prompt?: ReactNode;\n /** `\"danger\"` (default) for what cannot be undone; `\"warning\"` for what can, at a\n * cost (loading demo data over your own). Colours the prompt, and picks the arm\n * button's variant and — unless {@link DangerConfirmProps.confirmVariant} is\n * given — the confirm's. */\n tone?: \"danger\" | \"warning\";\n /**\n * The confirm button's variant, apart from `tone` (0.24, keksdose). Default: what\n * `tone` picks, as before — `\"danger\"` for `\"danger\"`, `\"primary\"` for `\"warning\"`.\n *\n * `tone` says how bad the outcome is; this says how loud the last press is, and the two\n * need not agree. keksdose's `UserActionConfirm` (an admin resets somebody else's\n * password) asks an AMBER question — what it guards against is mis-targeting, not data\n * loss, so the danger colour stays its one `severe` consequence's — and ends in a RED\n * Go, as its hand-built panel did before it moved onto this tile in 0.23; with only\n * `tone`, the amber question made Go the neutral primary fill. `tone=\"warning\"\n * confirmVariant=\"danger\"` is that panel again.\n */\n confirmVariant?: ButtonVariant;\n /**\n * Hold the armed confirm for a reason of the CALLER's own (0.24, keksdose) — the\n * tile's counterpart of FormActions' `submitDisabledReason`. While it has content the\n * confirm is held exactly as by the built-in guards: `aria-disabled` but focusable,\n * the reason in the kit {@link Tooltip} and its description, a press — or Enter in a\n * field — does nothing. Nothing else changes: the arm button stays usable, and no\n * line is printed under the buttons.\n *\n * keksdose's `UserPlanEditor` (\"move this account onto another plan\") must not confirm\n * the plan the account already holds — the request would only write FREE → FREE into\n * the audit trail. With no guard of its own to give, it passed \"Pick a different plan\"\n * as `lockedReason`, which is a LOCK: documented as \"the action is not available\",\n * spelled out under the buttons as well as in the tooltip, and meant for a write the\n * user cannot make land. A guard the user lifts by changing a field is this prop.\n *\n * Which reason the held confirm names: a write lock's first (`lockedReason`, `commit`\n * — nothing in the tile lifts it), then this one, then the built-in guards in the\n * order they are drawn (the tick, the phrase, the password). This one before the\n * built-ins because it is usually about a field in\n * {@link DangerConfirmProps.children}, which is drawn ABOVE them — the rule since 0.23\n * is \"the first open guard in the order the user meets it\" — and because it is about\n * WHAT is being confirmed (which plan), which has to be settled before acknowledging\n * it means anything. It is also the order keksdose's plan editor had, its\n * `lockedReason` winning over the tick.\n */\n confirmDisabledReason?: ReactNode;\n /**\n * Fields of the caller's own, drawn INSIDE the armed tile (0.24, keksdose): after the\n * prompt and the consequences, before the tick, the typed phrase and the password —\n * the order is \"what this does, what to do it with, then prove you mean it\". Nothing\n * is drawn for them while the tile is disarmed, and nothing at all without them, so a\n * tile without children is laid out exactly as before.\n *\n * keksdose's `UserPlanEditor` asks WHICH plan before it asks for the tick; with no\n * place inside the tile for the picker, the `Select` sat above it, and the tile's\n * prompt — the panel's title by rights — became the \"FREE → PRO\" line under the\n * picker. With the picker here, the prompt is the title again.\n *\n * The fields are the caller's: their values are not wiped on disarm (an uncontrolled\n * field starts over anyway — the slot unmounts), not passed to `onConfirm`, and a\n * guard on them is {@link DangerConfirmProps.confirmDisabledReason}. Arming moves\n * focus to their first form field (an input, a select, a combobox, a radio…), else to\n * the tile's own first field as before; Tab then goes on through the tick, the phrase\n * and the password to Cancel and the confirm. They sit inside the tile's `<form>`:\n * Enter in a text field confirms once every guard allows, and a {@link Button} among\n * them needs `type=\"button\"` — without one it SUBMITS the form, as a native button\n * does.\n */\n children?: ReactNode;\n /** Visible text of the arm button; defaults to `labels.arm`. */\n armLabel?: ReactNode;\n /** Visible text of the confirm button; defaults to `labels.confirm`. */\n confirmLabel?: ReactNode;\n /**\n * The action is running: confirm shows a spinner and nothing can be pressed — Cancel\n * included. For a caller that tracks the mutation itself (a `useMutation`'s\n * `isPending`); a promise returned from `onConfirm` does the same on its own.\n *\n * Cancel stays disabled ON PURPOSE, unlike FormActions' (keksdose asked in 0.24 why the\n * two differ). Once the request has left, nothing on the client can call it back —\n * not even an `AbortSignal`, which only stops the waiting, not the server — so a usable\n * Cancel could only collapse the tile while the action went on: \"Cancel\" pressed, and\n * the account reset anyway. Every way of settling what comes back is wrong somewhere: a\n * resolve after the Cancel did what the user called off; a reject finds the fields\n * wiped (a collapsed tile holds no password), so the 0.23 \"stay armed and retry\" is\n * gone; and re-arming while the first request runs is either a busy tile with empty\n * fields or — if the busy state went with the Cancel — a second destructive request\n * beside the first. FormActions' Cancel leaves an editor whose save is the user's own\n * edit landing, and a form can be edited again; the tile's action is the one that\n * cannot be undone, so it says nothing it cannot keep and waits — the wait is one\n * request long.\n *\n * When the action settles still armed (it failed) and the press on the confirm had\n * dropped the focus — a natively disabled button loses it — focus comes back to the\n * confirm, so a keyboard user can retry or Shift+Tab to the field to correct (0.24).\n */\n busy?: boolean;\n /** The arm button is disabled. */\n disabled?: boolean;\n /**\n * Why the action is not available — a read-only demo, a write lock, a missing\n * permission. Disables the arm button like `disabled`, and SAYS so: the sentence is\n * shown under the button and attached to it with `aria-describedby`, and the button\n * stays focusable (`aria-disabled`) so a keyboard user can land on it and hear why.\n *\n * On the ARM button rather than the confirm: arming asks for a password, and asking\n * for a password for a write that can never land is the worse of the two. A tile that\n * is ALREADY armed when the reason arrives (controlled `armed`, or a lock that landed\n * while it was open) keeps its fields but its confirm takes the reason the same way\n * — focusable, `aria-disabled`, the reason in its tooltip — and Enter does nothing.\n */\n lockedReason?: ReactNode;\n /**\n * This tile COMMITS — the 0.18 write-lock opt-in that {@link Button} has (keksdose\n * K3). Under a locked {@link WriteLockProvider} the lock's reason becomes\n * `lockedReason` (and wins over one of the tile's own), so a page that mounts the\n * provider no longer threads `lockedReason={lock.locked ? lock.reason : undefined}`\n * into every tile. No provider, or an unlocked one: no effect.\n */\n commit?: CommitScope;\n /** Controlled armed state. The parent can then collapse the tile from a mutation's\n * own `onSuccess` without returning a promise. */\n armed?: boolean;\n /** Called with the next armed state — on arm, cancel, and a resolved `onConfirm`. */\n onArmedChange?: (armed: boolean) => void;\n /** User-facing strings; see {@link DangerConfirmLabels}. */\n labels?: LabelOverride<DangerConfirmLabels>;\n}\n\n/** What counts as a FIELD among the caller's `children` — what arming focuses. Not\n * any tabbable element: a \"see the plans\" link or a disclosure button before the\n * picker is not where the user starts. `[tabindex=\"-1\"]` is a roving radio group's\n * unselected option; the selected one (`0`) is the group's stop. */\nconst SLOT_FIELD = [\n 'input:not([type=\"hidden\"])',\n \"select\",\n \"textarea\",\n ...[\"combobox\", \"listbox\", \"radio\", \"checkbox\", \"switch\", \"slider\", \"spinbutton\", \"textbox\"].map(\n (role) => `[role=\"${role}\"]`,\n ),\n]\n .map((selector) => `${selector}:not(:disabled):not([tabindex=\"-1\"]):not([aria-hidden=\"true\"])`)\n .join(\", \");\n\n/** The first field among the caller's `children`, skipping a native radio that is not\n * the checked one of its group (Tab lands on the checked one). */\nfunction firstSlotField(slot: HTMLElement | null): HTMLElement | null {\n if (!slot) return null;\n for (const el of slot.querySelectorAll<HTMLElement>(SLOT_FIELD)) {\n if (el.closest(\"[hidden], [inert]\")) continue;\n if (el instanceof HTMLInputElement && el.type === \"radio\" && !el.checked && el.name) {\n const group = el.form?.elements.namedItem(el.name);\n const checked =\n group instanceof RadioNodeList && Array.from(group).some((r) => r instanceof HTMLInputElement && r.checked);\n if (checked) continue;\n }\n return el;\n }\n return null;\n}\n\n/**\n * An \"arm → confirm\" tile for destructive actions: one button, which expands into a\n * warning, an optional list of consequences, optional fields of the caller's own\n * (`children`, 0.24), an optional \"I understand\" tick, an optional type-to-confirm\n * field, an optional password field and a confirm that is held until every guard is\n * satisfied — the built-in ones, and the caller's `confirmDisabledReason` (0.24).\n *\n * A held confirm SAYS which guard is still open (0.23, keksdose G4a): it is\n * `aria-disabled` rather than `disabled` — still focusable, so a keyboard user can land\n * on it — with the reason in the kit {@link Tooltip} and its description (\"Type\n * “DELETE” to confirm\", \"Tick the box to confirm\", \"Enter your password to confirm\";\n * `labels.needs*`), the first open guard in the order they are drawn. FormActions'\n * `submitDisabledReason` does the same for a form's Save. Pressing it, or Enter in a\n * field, does nothing. A lock's reason wins over a guard's, the caller's guard over the\n * built-in ones; while the action runs the confirm is plainly disabled, its spinner\n * saying why — and so is Cancel, which cannot call back a request that has left (see\n * `busy`).\n *\n * Keksdose hand-rolled it three times (load demo data, wipe everything, reset a\n * budget) and then as `shared/components/danger-confirm.tsx`; the only app-specific\n * part was its write-lock hook, which is `lockedReason` here.\n *\n * The fields are a `<form>`, so Enter confirms once the guards allow it. They are\n * wiped every time the tile disarms — a password must not sit in a collapsed tile.\n * Arming moves focus to the first field (or Cancel, when there is none — never to the\n * destructive button itself), and disarming moves it back to the arm button, so the\n * keyboard user is never left on an element that just vanished.\n */\nexport function DangerConfirm({\n onConfirm,\n requirePassword,\n requireAcknowledge,\n consequences,\n phrase,\n phraseMatch = \"trim\",\n prompt,\n tone = \"danger\",\n confirmVariant,\n confirmDisabledReason,\n children,\n armLabel,\n confirmLabel,\n busy: busyProp,\n disabled,\n lockedReason: ownLockedReason,\n commit,\n armed: armedProp,\n onArmedChange,\n labels: labelsProp,\n className,\n ...rest\n}: DangerConfirmProps) {\n const labels = useKitLabels(\"dangerConfirm\", DEFAULT_DANGER_CONFIRM_LABELS, labelsProp);\n const lockedReason = useCommitReason(commit, ownLockedReason);\n const [armedState, setArmedState] = useState(false);\n const armed = armedProp ?? armedState;\n const [password, setPassword] = useState(\"\");\n const [typed, setTyped] = useState(\"\");\n const [acknowledged, setAcknowledged] = useState(false);\n const { pending, run } = usePromisePending();\n const busy = Boolean(busyProp) || pending;\n // `readOnly` rather than `disabled` on the fields while busy: disabling the field\n // that has focus (Enter was pressed in it) drops focus to <body>.\n const promptId = useId();\n const consequencesId = useId();\n const reasonId = useId();\n\n // The buttons focus is moved to are found by id.\n const armId = useId();\n const cancelId = useId();\n const confirmId = useId();\n const firstFieldRef = useRef<HTMLInputElement>(null);\n // The caller's fields (`children`), searched for their first form field on arm.\n const slotRef = useRef<HTMLDivElement>(null);\n // Focus moves only after a transition — never on mount, so a tile that renders armed\n // (controlled) does not take the page's focus merely by existing.\n const moveFocus = useRef(false);\n // A confirm from this tile is under way — see the focus return after a failure below.\n const confirmed = useRef(false);\n\n // A disarm from anywhere (cancel, a resolved confirm, the parent) wipes the fields.\n // During render, like NumberField's draft, so no frame shows a collapsed tile that\n // still holds a password.\n const [wasArmed, setWasArmed] = useState(armed);\n if (wasArmed !== armed) {\n setWasArmed(armed);\n if (!armed) {\n setPassword(\"\");\n setTyped(\"\");\n setAcknowledged(false);\n }\n }\n\n const prevArmed = useRef(armed);\n useEffect(() => {\n const changed = prevArmed.current !== armed;\n prevArmed.current = armed;\n const byUser = moveFocus.current;\n moveFocus.current = false;\n if (!changed) return;\n if (armed) {\n if (byUser) {\n // The caller's fields come first on the page, so first in focus too.\n (firstSlotField(slotRef.current) ?? firstFieldRef.current ?? document.getElementById(cancelId))?.focus();\n }\n return;\n }\n confirmed.current = false;\n // A controlled parent collapsing the tile from its own `onSuccess` did not go\n // through `setArmed`; if focus went down with the form, bring it back too.\n const lost = document.activeElement === null || document.activeElement === document.body;\n if (byUser || lost) document.getElementById(armId)?.focus();\n }, [armed, armId, cancelId]);\n\n // The action settled and the tile is still armed — it failed, and the user retries.\n // The confirm was natively disabled while it ran, and a focused button that turns\n // disabled drops the focus to <body>: bring it back to the button that was pressed.\n // Only after a confirm from THIS tile (`confirmed`), so a `busy` that comes and goes\n // on its own never pulls the page's focus in. (A resolve disarms, and the effect\n // above takes the focus to the arm button.)\n const wasBusy = useRef(busy);\n useEffect(() => {\n const settled = wasBusy.current && !busy;\n wasBusy.current = busy;\n if (!settled) return;\n const ours = confirmed.current;\n confirmed.current = false;\n if (!ours || !armed) return;\n if (document.activeElement === null || document.activeElement === document.body) {\n document.getElementById(confirmId)?.focus();\n }\n }, [busy, armed, confirmId]);\n\n const setArmed = (next: boolean) => {\n moveFocus.current = true;\n if (armedProp === undefined) setArmedState(next);\n onArmedChange?.(next);\n };\n\n const locked = hasContent(lockedReason);\n // `true` words the tick with the namespace; any other node is its label; `false`,\n // `null` and `\"\"` are no tick at all.\n const acknowledgeLabel: ReactNode =\n requireAcknowledge === true ? labels.acknowledge : hasContent(requireAcknowledge) ? requireAcknowledge : null;\n const asksAcknowledge = acknowledgeLabel !== null;\n const passwordOk = !requirePassword || password !== \"\";\n const phraseOk = phrase === undefined || typedMatches(typed, phrase, phraseMatch);\n const acknowledgeOk = !asksAcknowledge || acknowledged;\n const callerHeld = hasContent(confirmDisabledReason);\n // `{cond && <Select />}` and `[null, false]` are no fields: no wrapper, no gap.\n const hasFields = Children.toArray(children).some(hasContent);\n const canConfirm = passwordOk && phraseOk && acknowledgeOk && !callerHeld && !busy;\n // The first guard still open, in the order the fields are drawn — the one the user\n // meets next, so the sentence points at it.\n const guardReason: string | undefined = !acknowledgeOk\n ? labels.needsAcknowledge\n : !phraseOk\n ? typeof labels.needsPhrase === \"function\"\n ? labels.needsPhrase(phrase ?? \"\")\n : labels.needsPhrase\n : !passwordOk\n ? labels.needsPassword\n : undefined;\n // The lock first (no guard can lift it); none while busy, when the guards were met and\n // the spinner is the state; then the caller's guard — about the fields drawn above the\n // built-in ones, and about WHAT is confirmed — then the first built-in guard still open.\n const confirmReason: ReactNode = locked\n ? lockedReason\n : busy\n ? undefined\n : callerHeld\n ? confirmDisabledReason\n : guardReason;\n\n const submit = (e: FormEvent) => {\n e.preventDefault();\n // `locked` too: Enter in a field submits the form without the button's say (and\n // `canConfirm` holds the caller's guard the same way).\n if (!canConfirm || locked) return;\n const values: DangerConfirmValues = {\n ...(phrase !== undefined && { typed: phraseMatch === \"exact\" ? typed : typed.trim() }),\n ...(requirePassword && { password }),\n ...(asksAcknowledge && { acknowledged: true as const }),\n };\n confirmed.current = true;\n // Disarms when it resolves; a rejection leaves it armed, fields kept: the caller\n // shows why, the user retries.\n run(onConfirm(values.password, values), () => setArmed(false));\n };\n\n // The first field takes focus on arm: the tick, then the phrase, then the password —\n // the order they are drawn in.\n const firstField = asksAcknowledge ? \"acknowledge\" : phrase !== undefined ? \"phrase\" : \"password\";\n const lines = (consequences ?? []).map((item, index) =>\n typeof item === \"string\"\n ? { key: item, text: item as ReactNode, severe: false }\n : { key: item.key ?? String(index), text: item.text, severe: Boolean(item.severe) },\n );\n\n const toneText = tone === \"warning\" ? \"text-warning\" : \"text-danger\";\n\n if (!armed) {\n const arm = (\n <Button\n id={armId}\n type=\"button\"\n variant={tone === \"warning\" ? \"secondary\" : \"danger\"}\n disabled={disabled}\n aria-disabled={locked || undefined}\n aria-describedby={locked ? reasonId : undefined}\n onClick={() => {\n if (!locked) setArmed(true);\n }}\n className=\"aria-disabled:cursor-not-allowed aria-disabled:opacity-50\"\n >\n {armLabel ?? labels.arm}\n </Button>\n );\n return (\n <div {...rest} className={cn(\"space-y-1\", className)}>\n {locked ? (\n // The reason on the button itself too, where the pointer that tried it is —\n // the line below can sit out of view in a long settings card. Portalled, so\n // a card that scrolls neither clips it nor grows by it.\n //\n // The button in a FRAGMENT on purpose: Tooltip clones an element child to\n // add the bubble to its `aria-describedby`, and the button is already\n // described by the visible line below — the same sentence twice, read out\n // on every focus. A fragment is left as it is, so the bubble stays visual.\n <Tooltip label={lockedReason} portal>\n <>{arm}</>\n </Tooltip>\n ) : (\n arm\n )}\n {locked && (\n <p id={reasonId} className=\"text-xs text-muted\">\n {lockedReason}\n </p>\n )}\n </div>\n );\n }\n\n return (\n <div {...rest} className={cn(\"space-y-2\", className)}>\n <form\n className=\"space-y-2\"\n aria-describedby={lines.length > 0 ? `${promptId} ${consequencesId}` : promptId}\n aria-busy={busy || undefined}\n onSubmit={submit}\n noValidate\n >\n <p id={promptId} className={cn(\"text-xs font-medium\", toneText)}>\n {prompt ?? labels.prompt}\n </p>\n {lines.length > 0 && (\n <ul id={consequencesId} className=\"list-disc space-y-1 ps-5 text-xs text-secondary\">\n {lines.map((line) => (\n <li key={line.key} className={line.severe ? \"text-danger\" : undefined}>\n {line.text}\n </li>\n ))}\n </ul>\n )}\n {/* The caller's fields: after what the action does, before the proof that it is\n meant. No wrapper without them — a 0.23 tile's markup is unchanged. */}\n {hasFields && (\n <div ref={slotRef} className=\"space-y-2\">\n {children}\n </div>\n )}\n {asksAcknowledge && (\n <Checkbox\n ref={firstField === \"acknowledge\" ? firstFieldRef : undefined}\n label={acknowledgeLabel}\n checked={acknowledged}\n // Not `disabled` while busy, for the same reason the fields are readOnly:\n // the box may hold the focus. A change while busy is simply not taken.\n onCheckedChange={(next) => {\n if (!busy) setAcknowledged(next);\n }}\n />\n )}\n {phrase !== undefined && (\n <TypedConfirmField\n ref={firstField === \"phrase\" ? firstFieldRef : undefined}\n target={phrase}\n match={phraseMatch}\n value={typed}\n onValueChange={setTyped}\n busy={busy}\n // Already resolved through this tile's own `labels` prop; handed on so a\n // per-instance phrase wording reaches the field.\n labels={{ phrase: labels.phrase, phrasePlaceholder: labels.phrasePlaceholder }}\n />\n )}\n {requirePassword && (\n <CurrentPasswordInput\n ref={firstField === \"password\" ? firstFieldRef : undefined}\n label={labels.password}\n value={password}\n busy={busy}\n onValueChange={setPassword}\n />\n )}\n <div className=\"flex flex-wrap gap-2\">\n <Button id={cancelId} type=\"button\" variant=\"ghost\" disabled={busy} onClick={() => setArmed(false)}>\n {labels.cancel}\n </Button>\n <Button\n id={confirmId}\n type=\"submit\"\n variant={confirmVariant ?? (tone === \"warning\" ? \"primary\" : \"danger\")}\n disabled={!canConfirm}\n // Held by a guard (the caller's or a built-in one), or armed and then locked\n // (or rendered armed under a lock): the confirm says why the way Button\n // does — focusable, `aria-disabled`, the reason in its tooltip and\n // description, a press swallowed (the submit with it) — and the fields stay\n // as typed. Only busy is the native `disabled`.\n disabledReason={confirmReason}\n aria-busy={busy || undefined}\n >\n {busy && <Spinner label={null} className=\"h-4 w-4\" />}\n {confirmLabel ?? labels.confirm}\n </Button>\n </div>\n {locked && <p className=\"text-xs text-muted\">{lockedReason}</p>}\n </form>\n </div>\n );\n}\n"],"mappings":";AAmJI,SA8qBQ,UA9qBR,KA+IE,YA/IF;AAnJJ,SAAS,UAAU,aAAa,WAAW,OAAO,QAAQ,gBAAgB;AAE1E,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,oBAAwC;AACjD,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,eAAe;AAGxB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,uBAAyC;AAClD,SAAS,qCAAqC;AAoBvC,SAAS,aAAa,OAAe,QAAgB,OAAmB,QAAiB;AAC9F,MAAI,SAAS,QAAS,QAAO,UAAU;AACvC,MAAI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;AAAA,QACjB;AAAA,QAEF,qBAAC,SAAI,WAAU,wBACb;AAAA,8BAAC,UAAO,IAAI,UAAU,MAAK,UAAS,SAAQ,SAAQ,UAAU,MAAM,SAAS,MAAM,SAAS,KAAK,GAC9F,iBAAO,QACV;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,MAAK;AAAA,cACL,SAAS,mBAAmB,SAAS,YAAY,YAAY;AAAA,cAC7D,UAAU,CAAC;AAAA,cAMX,gBAAgB;AAAA,cAChB,aAAW,QAAQ;AAAA,cAElB;AAAA,wBAAQ,oBAAC,WAAQ,OAAO,MAAM,WAAU,WAAU;AAAA,gBAClD,gBAAgB,OAAO;AAAA;AAAA;AAAA,UAC1B;AAAA,WACF;AAAA,QACC,UAAU,oBAAC,OAAE,WAAU,sBAAsB,wBAAa;AAAA;AAAA;AAAA,EAC7D,GACF;AAEJ;","names":[]}
@@ -1,21 +1,8 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
- import { d as DataTableColumn, f as DataTableLabels } from '../data-table-labels-BJ5JE_X2.js';
4
- import './data-table-sort.js';
5
- import './swipeable-row.js';
6
- import './status-dot.js';
7
- import './progress-bar.js';
8
- import './signed-amount.js';
9
- import './stat-tile.js';
10
- import './chip.js';
11
- import 'lucide-react';
12
- import './field-parts.js';
13
- import './tooltip.js';
14
- import '../hooks/use-anchored-rect.js';
15
- import '../lib/clipping.js';
16
- import './write-lock.js';
17
-
18
- interface BooleanMarkProps {
1
+ import type { ReactNode } from "react";
2
+ import { type LabelOverride } from "../i18n/kit-labels.js";
3
+ import { type DataTableLabels } from "./data-table-labels.js";
4
+ import type { DataTableColumn } from "./data-table.js";
5
+ export interface BooleanMarkProps {
19
6
  /** `true` → a check, `false` → a cross (or a dash, see `falseAs`), `null` /
20
7
  * `undefined` → a dash. */
21
8
  value: boolean | null | undefined;
@@ -28,7 +15,7 @@ interface BooleanMarkProps {
28
15
  falseAs?: "cross" | "dash";
29
16
  /** The spoken words, over `dataTable.booleanTrue` / `booleanFalse` / `booleanUnset`
30
17
  * from `<UiKitProvider labels>`. */
31
- labels?: Partial<Pick<DataTableLabels, "booleanTrue" | "booleanFalse" | "booleanUnset">>;
18
+ labels?: LabelOverride<Pick<DataTableLabels, "booleanTrue" | "booleanFalse" | "booleanUnset">>;
32
19
  className?: string;
33
20
  }
34
21
  /**
@@ -40,8 +27,8 @@ interface BooleanMarkProps {
40
27
  * no text, so a reader walking the table heard an empty cell for every row; the apps'
41
28
  * Yes/No chips were the other answer, and too loud for a column of them.
42
29
  */
43
- declare function BooleanMark({ value, falseAs, labels: labelsProp, className }: BooleanMarkProps): react.JSX.Element;
44
- interface BooleanColumnOptions<T> {
30
+ export declare function BooleanMark({ value, falseAs, labels: labelsProp, className }: BooleanMarkProps): import("react").JSX.Element;
31
+ export interface BooleanColumnOptions<T> {
45
32
  key: string;
46
33
  header: ReactNode;
47
34
  /** The value of this row. */
@@ -68,6 +55,4 @@ interface BooleanColumnOptions<T> {
68
55
  * A {@link DataTableColumn} for a yes/no field: {@link BooleanMark} cells,
69
56
  * sortable with `true` first, and optionally a Yes/No select filter.
70
57
  */
71
- declare function booleanColumn<T>({ key, header, value, falseAs, sortable, filterOptions, column, }: BooleanColumnOptions<T>): DataTableColumn<T>;
72
-
73
- export { type BooleanColumnOptions, BooleanMark, type BooleanMarkProps, booleanColumn };
58
+ export declare function booleanColumn<T>({ key, header, value, falseAs, sortable, filterOptions, column, }: BooleanColumnOptions<T>): DataTableColumn<T>;
@@ -16,7 +16,7 @@ function BooleanMark({ value, falseAs = "cross", labels: labelsProp, className }
16
16
  "aria-hidden": true,
17
17
  className: cn(
18
18
  "size-4",
19
- state === "true" ? "text-[var(--success)]" : state === "false" && falseAs === "cross" ? "text-[var(--text-muted)]" : "text-[var(--text-placeholder)]"
19
+ state === "true" ? "text-success" : state === "false" && falseAs === "cross" ? "text-muted" : "text-placeholder"
20
20
  )
21
21
  }
22
22
  ),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/data-table-cells.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Check, Minus, X } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport { DEFAULT_DATA_TABLE_LABELS, type DataTableLabels } from \"./data-table-labels\";\nimport type { DataTableColumn } from \"./data-table\";\n\nexport interface BooleanMarkProps {\n /** `true` → a check, `false` → a cross (or a dash, see `falseAs`), `null` /\n * `undefined` → a dash. */\n value: boolean | null | undefined;\n /**\n * How `false` is drawn. `\"cross\"` (default) when \"no\" is news worth seeing — a\n * failed check, a missing document. `\"dash\"` for a column that is mostly `false` and\n * reads as a list of the `true` ones (kastlan's BoolCell): a column of crosses is\n * noise. The screen-reader text says \"No\" either way.\n */\n falseAs?: \"cross\" | \"dash\";\n /** The spoken words, over `dataTable.booleanTrue` / `booleanFalse` / `booleanUnset`\n * from `<UiKitProvider labels>`. */\n labels?: Partial<Pick<DataTableLabels, \"booleanTrue\" | \"booleanFalse\" | \"booleanUnset\">>;\n className?: string;\n}\n\n/**\n * A yes/no value in a table cell: a green check, a muted cross, or a faint dash for\n * \"not set\" — with the word for a screen reader, since a glyph alone is announced as\n * nothing at all (or as \"image\").\n *\n * kastlan's `BoolCell` (shared/components/data-table/bool-cell.tsx) drew the icons with\n * no text, so a reader walking the table heard an empty cell for every row; the apps'\n * Yes/No chips were the other answer, and too loud for a column of them.\n */\nexport function BooleanMark({ value, falseAs = \"cross\", labels: labelsProp, className }: BooleanMarkProps) {\n const labels = useKitLabels(\"dataTable\", DEFAULT_DATA_TABLE_LABELS, labelsProp);\n const state = value === true ? \"true\" : value === false ? \"false\" : \"unset\";\n const text =\n state === \"true\" ? labels.booleanTrue : state === \"false\" ? labels.booleanFalse : labels.booleanUnset;\n const Icon = state === \"true\" ? Check : state === \"false\" && falseAs === \"cross\" ? X : Minus;\n return (\n <span data-value={state} className={cn(\"inline-flex items-center align-middle\", className)}>\n <Icon\n aria-hidden\n className={cn(\n \"size-4\",\n state === \"true\"\n ? \"text-[var(--success)]\"\n : state === \"false\" && falseAs === \"cross\"\n ? \"text-[var(--text-muted)]\"\n : \"text-[var(--text-placeholder)]\",\n )}\n />\n <span className=\"sr-only\">{text}</span>\n </span>\n );\n}\n\nexport interface BooleanColumnOptions<T> {\n key: string;\n header: ReactNode;\n /** The value of this row. */\n value: (row: T) => boolean | null | undefined;\n /** See {@link BooleanMarkProps.falseAs}. */\n falseAs?: \"cross\" | \"dash\";\n /** Sortable, `true` first on the first click (a column is sorted to find the yes\n * rows). Default true. */\n sortable?: boolean;\n /**\n * A select filter over the column, with these option labels — pass them translated.\n * Omitted: no filter. The option values are `\"true\"` / `\"false\"` (and `\"unset\"` when\n * `unset` is given), which is also what `filterHref` takes for this column.\n */\n filterOptions?: { true: string; false: string; unset?: string };\n /** Further column settings (`mobileHidden`, `headClassName`, …), merged over. */\n column?: Partial<DataTableColumn<T>>;\n}\n\n/**\n * A {@link DataTableColumn} for a yes/no field: {@link BooleanMark} cells,\n * sortable with `true` first, and optionally a Yes/No select filter.\n */\nexport function booleanColumn<T>({\n key,\n header,\n value,\n falseAs,\n sortable = true,\n filterOptions,\n column,\n}: BooleanColumnOptions<T>): DataTableColumn<T> {\n const asKey = (row: T) => {\n const v = value(row);\n return v === true ? \"true\" : v === false ? \"false\" : \"unset\";\n };\n return {\n key,\n header,\n cell: (row) => <BooleanMark value={value(row)} falseAs={falseAs} />,\n // 0 for yes, 1 for no, null for unset (which the table sorts last either way).\n sortBy: sortable\n ? (row) => {\n const v = value(row);\n return v == null ? null : v ? 0 : 1;\n }\n : undefined,\n filter: filterOptions\n ? {\n type: \"select\",\n getValue: asKey,\n options: [\n { value: \"true\", label: filterOptions.true },\n { value: \"false\", label: filterOptions.false },\n ...(filterOptions.unset !== undefined ? [{ value: \"unset\", label: filterOptions.unset }] : []),\n ],\n }\n : undefined,\n ...column,\n };\n}\n"],"mappings":";AAwCI,SACE,KADF;AAvCJ,SAA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,SAAS;AAAA,QACP,EAAE,OAAO,QAAQ,OAAO,cAAc,KAAK;AAAA,QAC3C,EAAE,OAAO,SAAS,OAAO,cAAc,MAAM;AAAA,QAC7C,GAAI,cAAc,UAAU,SAAY,CAAC,EAAE,OAAO,SAAS,OAAO,cAAc,MAAM,CAAC,IAAI,CAAC;AAAA,MAC9F;AAAA,IACF,IACA;AAAA,IACJ,GAAG;AAAA,EACL;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/components/data-table-cells.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Check, Minus, X } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { DEFAULT_DATA_TABLE_LABELS, type DataTableLabels } from \"./data-table-labels\";\nimport type { DataTableColumn } from \"./data-table\";\n\nexport interface BooleanMarkProps {\n /** `true` → a check, `false` → a cross (or a dash, see `falseAs`), `null` /\n * `undefined` → a dash. */\n value: boolean | null | undefined;\n /**\n * How `false` is drawn. `\"cross\"` (default) when \"no\" is news worth seeing — a\n * failed check, a missing document. `\"dash\"` for a column that is mostly `false` and\n * reads as a list of the `true` ones (kastlan's BoolCell): a column of crosses is\n * noise. The screen-reader text says \"No\" either way.\n */\n falseAs?: \"cross\" | \"dash\";\n /** The spoken words, over `dataTable.booleanTrue` / `booleanFalse` / `booleanUnset`\n * from `<UiKitProvider labels>`. */\n labels?: LabelOverride<Pick<DataTableLabels, \"booleanTrue\" | \"booleanFalse\" | \"booleanUnset\">>;\n className?: string;\n}\n\n/**\n * A yes/no value in a table cell: a green check, a muted cross, or a faint dash for\n * \"not set\" — with the word for a screen reader, since a glyph alone is announced as\n * nothing at all (or as \"image\").\n *\n * kastlan's `BoolCell` (shared/components/data-table/bool-cell.tsx) drew the icons with\n * no text, so a reader walking the table heard an empty cell for every row; the apps'\n * Yes/No chips were the other answer, and too loud for a column of them.\n */\nexport function BooleanMark({ value, falseAs = \"cross\", labels: labelsProp, className }: BooleanMarkProps) {\n const labels = useKitLabels(\"dataTable\", DEFAULT_DATA_TABLE_LABELS, labelsProp);\n const state = value === true ? \"true\" : value === false ? \"false\" : \"unset\";\n const text =\n state === \"true\" ? labels.booleanTrue : state === \"false\" ? labels.booleanFalse : labels.booleanUnset;\n const Icon = state === \"true\" ? Check : state === \"false\" && falseAs === \"cross\" ? X : Minus;\n return (\n <span data-value={state} className={cn(\"inline-flex items-center align-middle\", className)}>\n <Icon\n aria-hidden\n className={cn(\n \"size-4\",\n state === \"true\"\n ? \"text-success\"\n : state === \"false\" && falseAs === \"cross\"\n ? \"text-muted\"\n : \"text-placeholder\",\n )}\n />\n <span className=\"sr-only\">{text}</span>\n </span>\n );\n}\n\nexport interface BooleanColumnOptions<T> {\n key: string;\n header: ReactNode;\n /** The value of this row. */\n value: (row: T) => boolean | null | undefined;\n /** See {@link BooleanMarkProps.falseAs}. */\n falseAs?: \"cross\" | \"dash\";\n /** Sortable, `true` first on the first click (a column is sorted to find the yes\n * rows). Default true. */\n sortable?: boolean;\n /**\n * A select filter over the column, with these option labels — pass them translated.\n * Omitted: no filter. The option values are `\"true\"` / `\"false\"` (and `\"unset\"` when\n * `unset` is given), which is also what `filterHref` takes for this column.\n */\n filterOptions?: { true: string; false: string; unset?: string };\n /** Further column settings (`mobileHidden`, `headClassName`, …), merged over. */\n column?: Partial<DataTableColumn<T>>;\n}\n\n/**\n * A {@link DataTableColumn} for a yes/no field: {@link BooleanMark} cells,\n * sortable with `true` first, and optionally a Yes/No select filter.\n */\nexport function booleanColumn<T>({\n key,\n header,\n value,\n falseAs,\n sortable = true,\n filterOptions,\n column,\n}: BooleanColumnOptions<T>): DataTableColumn<T> {\n const asKey = (row: T) => {\n const v = value(row);\n return v === true ? \"true\" : v === false ? \"false\" : \"unset\";\n };\n return {\n key,\n header,\n cell: (row) => <BooleanMark value={value(row)} falseAs={falseAs} />,\n // 0 for yes, 1 for no, null for unset (which the table sorts last either way).\n sortBy: sortable\n ? (row) => {\n const v = value(row);\n return v == null ? null : v ? 0 : 1;\n }\n : undefined,\n filter: filterOptions\n ? {\n type: \"select\",\n getValue: asKey,\n options: [\n { value: \"true\", label: filterOptions.true },\n { value: \"false\", label: filterOptions.false },\n ...(filterOptions.unset !== undefined ? [{ value: \"unset\", label: filterOptions.unset }] : []),\n ],\n }\n : undefined,\n ...column,\n };\n}\n"],"mappings":";AAwCI,SACE,KADF;AAvCJ,SAAS,OAAO,OAAO,SAAS;AAChC,SAAS,UAAU;AACnB,SAAS,oBAAwC;AACjD,SAAS,iCAAuD;AA6BzD,SAAS,YAAY,EAAE,OAAO,UAAU,SAAS,QAAQ,YAAY,UAAU,GAAqB;AACzG,QAAM,SAAS,aAAa,aAAa,2BAA2B,UAAU;AAC9E,QAAM,QAAQ,UAAU,OAAO,SAAS,UAAU,QAAQ,UAAU;AACpE,QAAM,OACJ,UAAU,SAAS,OAAO,cAAc,UAAU,UAAU,OAAO,eAAe,OAAO;AAC3F,QAAM,OAAO,UAAU,SAAS,QAAQ,UAAU,WAAW,YAAY,UAAU,IAAI;AACvF,SACE,qBAAC,UAAK,cAAY,OAAO,WAAW,GAAG,yCAAyC,SAAS,GACvF;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,QACX,WAAW;AAAA,UACT;AAAA,UACA,UAAU,SACN,iBACA,UAAU,WAAW,YAAY,UAC/B,eACA;AAAA,QACR;AAAA;AAAA,IACF;AAAA,IACA,oBAAC,UAAK,WAAU,WAAW,gBAAK;AAAA,KAClC;AAEJ;AA0BO,SAAS,cAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,GAAgD;AAC9C,QAAM,QAAQ,CAAC,QAAW;AACxB,UAAM,IAAI,MAAM,GAAG;AACnB,WAAO,MAAM,OAAO,SAAS,MAAM,QAAQ,UAAU;AAAA,EACvD;AACA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,MAAM,CAAC,QAAQ,oBAAC,eAAY,OAAO,MAAM,GAAG,GAAG,SAAkB;AAAA;AAAA,IAEjE,QAAQ,WACJ,CAAC,QAAQ;AACP,YAAM,IAAI,MAAM,GAAG;AACnB,aAAO,KAAK,OAAO,OAAO,IAAI,IAAI;AAAA,IACpC,IACA;AAAA,IACJ,QAAQ,gBACJ;AAAA,MACE,MAAM;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,QACP,EAAE,OAAO,QAAQ,OAAO,cAAc,KAAK;AAAA,QAC3C,EAAE,OAAO,SAAS,OAAO,cAAc,MAAM;AAAA,QAC7C,GAAI,cAAc,UAAU,SAAY,CAAC,EAAE,OAAO,SAAS,OAAO,cAAc,MAAM,CAAC,IAAI,CAAC;AAAA,MAC9F;AAAA,IACF,IACA;AAAA,IACJ,GAAG;AAAA,EACL;AACF;","names":[]}
@@ -0,0 +1,16 @@
1
+ import type { Dispatch, SetStateAction } from "react";
2
+ import type { DataTableLabels } from "./data-table-labels.js";
3
+ import type { DataTableColumn } from "./data-table.js";
4
+ /** The "Columns" rail and its drawer (`columnSettings`). */
5
+ export declare function ColumnSettingsPanel<T>({ columns, hiddenCols, setHiddenCols, showSettings, setShowSettings, columnsCountLabel, labels, autoSizeAll, }: {
6
+ /** Every column, hidden ones included; the actions column is left out here. */
7
+ columns: DataTableColumn<T>[];
8
+ hiddenCols: Set<string>;
9
+ setHiddenCols: Dispatch<SetStateAction<Set<string>>>;
10
+ showSettings: boolean;
11
+ setShowSettings: (open: boolean) => void;
12
+ /** "Columns (n/m)", the rail's text and name. */
13
+ columnsCountLabel: string;
14
+ labels: DataTableLabels;
15
+ autoSizeAll: () => void;
16
+ }): import("react").JSX.Element;