@eifi1/ui-kit 0.33.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1539) hide show
  1. package/README.md +445 -283
  2. package/dist/account/account-parts.d.ts +6 -8
  3. package/dist/account/account-parts.js +1 -2
  4. package/dist/account/account-parts.js.map +1 -1
  5. package/dist/{components → account}/account-settings-labels.d.ts +16 -10
  6. package/dist/{components → account}/account-settings-labels.js +3 -1
  7. package/dist/account/account-settings-labels.js.map +1 -0
  8. package/dist/{components → account}/account-settings.d.ts +53 -23
  9. package/dist/{components → account}/account-settings.js +97 -26
  10. package/dist/account/account-settings.js.map +1 -0
  11. package/dist/account/data-export-setting-labels.d.ts +2 -0
  12. package/dist/account/data-export-setting-labels.js +15 -0
  13. package/dist/account/data-export-setting-labels.js.map +1 -0
  14. package/dist/account/data-export-setting.d.ts +9 -11
  15. package/dist/account/data-export-setting.js +11 -27
  16. package/dist/account/data-export-setting.js.map +1 -1
  17. package/dist/account/delete-account-setting-labels.d.ts +2 -0
  18. package/dist/account/delete-account-setting-labels.js +23 -0
  19. package/dist/account/delete-account-setting-labels.js.map +1 -0
  20. package/dist/account/delete-account-setting.d.ts +132 -100
  21. package/dist/account/delete-account-setting.js +7 -23
  22. package/dist/account/delete-account-setting.js.map +1 -1
  23. package/dist/account/email-change-setting-labels.d.ts +2 -0
  24. package/dist/account/email-change-setting-labels.js +28 -0
  25. package/dist/account/email-change-setting-labels.js.map +1 -0
  26. package/dist/account/email-change-setting.d.ts +10 -12
  27. package/dist/account/email-change-setting.js +11 -30
  28. package/dist/account/email-change-setting.js.map +1 -1
  29. package/dist/{components → account}/passkeys-setting.d.ts +9 -12
  30. package/dist/{components → account}/passkeys-setting.js +10 -7
  31. package/dist/account/passkeys-setting.js.map +1 -0
  32. package/dist/account/sessions-setting-labels.d.ts +2 -0
  33. package/dist/account/sessions-setting-labels.js +22 -0
  34. package/dist/account/sessions-setting-labels.js.map +1 -0
  35. package/dist/account/sessions-setting.d.ts +12 -14
  36. package/dist/account/sessions-setting.js +8 -23
  37. package/dist/account/sessions-setting.js.map +1 -1
  38. package/dist/admin/admin-action-confirm-labels.d.ts +2 -0
  39. package/dist/admin/admin-action-confirm-labels.js +16 -0
  40. package/dist/admin/admin-action-confirm-labels.js.map +1 -0
  41. package/dist/admin/admin-action-confirm.d.ts +156 -100
  42. package/dist/admin/admin-action-confirm.js +17 -22
  43. package/dist/admin/admin-action-confirm.js.map +1 -1
  44. package/dist/admin/admin-action-log-labels.d.ts +2 -0
  45. package/dist/admin/admin-action-log-labels.js +73 -0
  46. package/dist/admin/admin-action-log-labels.js.map +1 -0
  47. package/dist/admin/admin-action-log.d.ts +98 -22
  48. package/dist/admin/admin-action-log.js +48 -45
  49. package/dist/admin/admin-action-log.js.map +1 -1
  50. package/dist/admin/admin-parts.d.ts +7 -14
  51. package/dist/admin/admin-parts.js +0 -4
  52. package/dist/admin/admin-parts.js.map +1 -1
  53. package/dist/admin/invitations-panel-labels.d.ts +2 -0
  54. package/dist/admin/invitations-panel-labels.js +29 -0
  55. package/dist/admin/invitations-panel-labels.js.map +1 -0
  56. package/dist/admin/invitations-panel.d.ts +167 -100
  57. package/dist/admin/invitations-panel.js +12 -31
  58. package/dist/admin/invitations-panel.js.map +1 -1
  59. package/dist/admin/plan-change-labels.d.ts +2 -0
  60. package/dist/admin/plan-change-labels.js +22 -0
  61. package/dist/admin/plan-change-labels.js.map +1 -0
  62. package/dist/admin/plan-change.d.ts +244 -100
  63. package/dist/admin/plan-change.js +17 -23
  64. package/dist/admin/plan-change.js.map +1 -1
  65. package/dist/admin/reviewer-scope-editor-labels.d.ts +2 -0
  66. package/dist/admin/reviewer-scope-editor-labels.js +14 -0
  67. package/dist/admin/reviewer-scope-editor-labels.js.map +1 -0
  68. package/dist/admin/reviewer-scope-editor.d.ts +95 -100
  69. package/dist/admin/reviewer-scope-editor.js +5 -13
  70. package/dist/admin/reviewer-scope-editor.js.map +1 -1
  71. package/dist/admin/role-select-labels.d.ts +2 -0
  72. package/dist/admin/role-select-labels.js +15 -0
  73. package/dist/admin/role-select-labels.js.map +1 -0
  74. package/dist/admin/role-select.d.ts +136 -100
  75. package/dist/admin/role-select.js +7 -18
  76. package/dist/admin/role-select.js.map +1 -1
  77. package/dist/admin/transfer-ownership-dialog-labels.d.ts +2 -0
  78. package/dist/admin/transfer-ownership-dialog-labels.js +18 -0
  79. package/dist/admin/transfer-ownership-dialog-labels.js.map +1 -0
  80. package/dist/admin/transfer-ownership-dialog.d.ts +81 -100
  81. package/dist/admin/transfer-ownership-dialog.js +3 -15
  82. package/dist/admin/transfer-ownership-dialog.js.map +1 -1
  83. package/dist/admin/user-roster-labels.d.ts +2 -0
  84. package/dist/admin/user-roster-labels.js +16 -0
  85. package/dist/admin/user-roster-labels.js.map +1 -0
  86. package/dist/admin/user-roster.d.ts +225 -100
  87. package/dist/admin/user-roster.js +4 -14
  88. package/dist/admin/user-roster.js.map +1 -1
  89. package/dist/auth/accept-invitation-labels.d.ts +2 -0
  90. package/dist/auth/accept-invitation-labels.js +20 -0
  91. package/dist/auth/accept-invitation-labels.js.map +1 -0
  92. package/dist/auth/accept-invitation.d.ts +11 -13
  93. package/dist/auth/accept-invitation.js +3 -16
  94. package/dist/auth/accept-invitation.js.map +1 -1
  95. package/dist/auth/auth-errors.d.ts +34 -23
  96. package/dist/auth/auth-errors.js +8 -4
  97. package/dist/auth/auth-errors.js.map +1 -1
  98. package/dist/auth/complete-name-dialog-labels.d.ts +2 -0
  99. package/dist/auth/complete-name-dialog-labels.js +14 -0
  100. package/dist/auth/complete-name-dialog-labels.js.map +1 -0
  101. package/dist/auth/complete-name-dialog.d.ts +9 -11
  102. package/dist/auth/complete-name-dialog.js +4 -11
  103. package/dist/auth/complete-name-dialog.js.map +1 -1
  104. package/dist/auth/email-tag.d.ts +2 -4
  105. package/dist/auth/forgot-password-form-labels.d.ts +3 -0
  106. package/dist/auth/forgot-password-form-labels.js +17 -0
  107. package/dist/auth/forgot-password-form-labels.js.map +1 -0
  108. package/dist/auth/forgot-password-form.d.ts +9 -12
  109. package/dist/auth/forgot-password-form.js +6 -15
  110. package/dist/auth/forgot-password-form.js.map +1 -1
  111. package/dist/auth/form-rules.d.ts +5 -7
  112. package/dist/auth/new-password-fields.d.ts +4 -8
  113. package/dist/auth/new-password-fields.js +1 -1
  114. package/dist/auth/new-password-fields.js.map +1 -1
  115. package/dist/auth/not-found-page-labels.d.ts +2 -0
  116. package/dist/auth/not-found-page-labels.js +11 -0
  117. package/dist/auth/not-found-page-labels.js.map +1 -0
  118. package/dist/auth/not-found-page.d.ts +9 -11
  119. package/dist/auth/not-found-page.js +5 -10
  120. package/dist/auth/not-found-page.js.map +1 -1
  121. package/dist/auth/register-form-labels.d.ts +3 -0
  122. package/dist/auth/register-form-labels.js +28 -0
  123. package/dist/auth/register-form-labels.js.map +1 -0
  124. package/dist/auth/register-form.d.ts +174 -100
  125. package/dist/auth/register-form.js +11 -31
  126. package/dist/auth/register-form.js.map +1 -1
  127. package/dist/auth/reset-password-form-labels.d.ts +3 -0
  128. package/dist/auth/reset-password-form-labels.js +24 -0
  129. package/dist/auth/reset-password-form-labels.js.map +1 -0
  130. package/dist/auth/reset-password-form.d.ts +12 -15
  131. package/dist/auth/reset-password-form.js +6 -22
  132. package/dist/auth/reset-password-form.js.map +1 -1
  133. package/dist/auth/sign-in-form-labels.d.ts +3 -0
  134. package/dist/auth/sign-in-form-labels.js +42 -0
  135. package/dist/auth/sign-in-form-labels.js.map +1 -0
  136. package/dist/auth/sign-in-form.d.ts +15 -19
  137. package/dist/auth/sign-in-form.js +12 -46
  138. package/dist/auth/sign-in-form.js.map +1 -1
  139. package/dist/auth/status-parts.d.ts +13 -17
  140. package/dist/auth/status-parts.js +3 -3
  141. package/dist/auth/status-parts.js.map +1 -1
  142. package/dist/auth/verify-email-labels.d.ts +2 -0
  143. package/dist/auth/verify-email-labels.js +25 -0
  144. package/dist/auth/verify-email-labels.js.map +1 -0
  145. package/dist/auth/verify-email.d.ts +15 -17
  146. package/dist/auth/verify-email.js +4 -21
  147. package/dist/auth/verify-email.js.map +1 -1
  148. package/dist/billing/billing-banner.d.ts +8 -108
  149. package/dist/billing/billing-banner.js +2 -1
  150. package/dist/billing/billing-banner.js.map +1 -1
  151. package/dist/billing/billing-labels.d.ts +168 -100
  152. package/dist/billing/billing-labels.js.map +1 -1
  153. package/dist/billing/billing-lock.d.ts +10 -109
  154. package/dist/billing/billing-overview.d.ts +7 -108
  155. package/dist/billing/billing-standing.d.ts +6 -107
  156. package/dist/billing/checkout-processing.d.ts +8 -110
  157. package/dist/billing/checkout-processing.js +2 -9
  158. package/dist/billing/checkout-processing.js.map +1 -1
  159. package/dist/billing/checkout-return.d.ts +5 -7
  160. package/dist/billing/pay-page.d.ts +22 -119
  161. package/dist/billing/pay-page.js.map +1 -1
  162. package/dist/billing/plan-card.d.ts +14 -114
  163. package/dist/billing/plan-card.js +15 -13
  164. package/dist/billing/plan-card.js.map +1 -1
  165. package/dist/billing/plan-limit-notice.d.ts +8 -108
  166. package/dist/billing/plan-limit-notice.js +1 -1
  167. package/dist/billing/plan-limit-notice.js.map +1 -1
  168. package/dist/billing/plan-limit-toast.d.ts +6 -106
  169. package/dist/billing/plan-limit.d.ts +2 -4
  170. package/dist/billing/plan-price.d.ts +10 -12
  171. package/dist/billing/subscription-actions.d.ts +6 -108
  172. package/dist/billing/subscription-actions.js +2 -2
  173. package/dist/billing/subscription-actions.js.map +1 -1
  174. package/dist/billing/subscription-status-chip.d.ts +7 -107
  175. package/dist/chart.d.ts +12 -112
  176. package/dist/chart.js +4 -0
  177. package/dist/chart.js.map +1 -1
  178. package/dist/components/account-chips-labels.d.ts +10 -0
  179. package/dist/components/account-chips-labels.js +15 -0
  180. package/dist/components/account-chips-labels.js.map +1 -0
  181. package/dist/components/account-chips.d.ts +22 -44
  182. package/dist/components/account-chips.js +9 -14
  183. package/dist/components/account-chips.js.map +1 -1
  184. package/dist/components/alert-banner.d.ts +15 -11
  185. package/dist/components/alert-banner.js +28 -18
  186. package/dist/components/alert-banner.js.map +1 -1
  187. package/dist/components/amount-input.d.ts +66 -109
  188. package/dist/components/amount-input.js +259 -283
  189. package/dist/components/amount-input.js.map +1 -1
  190. package/dist/components/appearance-labels.d.ts +6 -10
  191. package/dist/components/appearance-labels.js.map +1 -1
  192. package/dist/components/authed-image-labels.d.ts +2 -0
  193. package/dist/components/authed-image-labels.js +10 -0
  194. package/dist/components/authed-image-labels.js.map +1 -0
  195. package/dist/components/authed-image.d.ts +11 -13
  196. package/dist/components/authed-image.js +2 -6
  197. package/dist/components/authed-image.js.map +1 -1
  198. package/dist/components/autocomplete.d.ts +13 -11
  199. package/dist/components/autocomplete.js +35 -30
  200. package/dist/components/autocomplete.js.map +1 -1
  201. package/dist/components/breadcrumbs-labels.d.ts +2 -0
  202. package/dist/components/breadcrumbs-labels.js +9 -0
  203. package/dist/components/breadcrumbs-labels.js.map +1 -0
  204. package/dist/components/breadcrumbs.d.ts +10 -12
  205. package/dist/components/breadcrumbs.js +7 -10
  206. package/dist/components/breadcrumbs.js.map +1 -1
  207. package/dist/components/bulk-action-bar-labels.d.ts +2 -0
  208. package/dist/components/bulk-action-bar-labels.js +10 -0
  209. package/dist/components/bulk-action-bar-labels.js.map +1 -0
  210. package/dist/components/bulk-action-bar.d.ts +10 -12
  211. package/dist/components/bulk-action-bar.js +9 -12
  212. package/dist/components/bulk-action-bar.js.map +1 -1
  213. package/dist/components/button-group.d.ts +7 -109
  214. package/dist/components/button-group.js +5 -5
  215. package/dist/components/button-group.js.map +1 -1
  216. package/dist/components/button-look.d.ts +88 -0
  217. package/dist/components/button-look.js +91 -0
  218. package/dist/components/button-look.js.map +1 -0
  219. package/dist/components/button.d.ts +153 -0
  220. package/dist/components/button.js +165 -0
  221. package/dist/components/button.js.map +1 -0
  222. package/dist/components/calculator.d.ts +8 -106
  223. package/dist/components/calculator.js +10 -7
  224. package/dist/components/calculator.js.map +1 -1
  225. package/dist/components/calendar-heatmap-labels.d.ts +3 -0
  226. package/dist/components/calendar-heatmap-labels.js +12 -0
  227. package/dist/components/calendar-heatmap-labels.js.map +1 -0
  228. package/dist/components/calendar-heatmap.d.ts +13 -16
  229. package/dist/components/calendar-heatmap.js +7 -13
  230. package/dist/components/calendar-heatmap.js.map +1 -1
  231. package/dist/components/card.d.ts +145 -0
  232. package/dist/components/card.js +186 -0
  233. package/dist/components/card.js.map +1 -0
  234. package/dist/components/chart-height.d.ts +4 -7
  235. package/dist/components/chart-zoom-core.d.ts +202 -0
  236. package/dist/components/chart-zoom-core.js +334 -0
  237. package/dist/components/chart-zoom-core.js.map +1 -0
  238. package/dist/components/chart-zoom.d.ts +39 -205
  239. package/dist/components/chart-zoom.js +15 -316
  240. package/dist/components/chart-zoom.js.map +1 -1
  241. package/dist/components/chart.d.ts +11 -15
  242. package/dist/components/chart.js +11 -11
  243. package/dist/components/chart.js.map +1 -1
  244. package/dist/components/checkbox-group.d.ts +6 -10
  245. package/dist/components/checkbox-group.js +10 -9
  246. package/dist/components/checkbox-group.js.map +1 -1
  247. package/dist/components/checkbox.d.ts +8 -12
  248. package/dist/components/checkbox.js +20 -18
  249. package/dist/components/checkbox.js.map +1 -1
  250. package/dist/components/chip-input.d.ts +73 -0
  251. package/dist/components/chip-input.js +224 -0
  252. package/dist/components/chip-input.js.map +1 -0
  253. package/dist/components/chip-labels.d.ts +2 -0
  254. package/dist/components/chip-labels.js +12 -0
  255. package/dist/components/chip-labels.js.map +1 -0
  256. package/dist/components/chip.d.ts +18 -93
  257. package/dist/components/chip.js +74 -426
  258. package/dist/components/chip.js.map +1 -1
  259. package/dist/components/choice-card.d.ts +21 -18
  260. package/dist/components/choice-card.js +45 -45
  261. package/dist/components/choice-card.js.map +1 -1
  262. package/dist/components/column-mapper-labels.d.ts +5 -0
  263. package/dist/components/column-mapper-labels.js +34 -0
  264. package/dist/components/column-mapper-labels.js.map +1 -0
  265. package/dist/components/column-mapper.d.ts +15 -17
  266. package/dist/components/column-mapper.js +11 -37
  267. package/dist/components/column-mapper.js.map +1 -1
  268. package/dist/components/combobox-core.d.ts +79 -40
  269. package/dist/components/combobox-core.js +189 -122
  270. package/dist/components/combobox-core.js.map +1 -1
  271. package/dist/components/combobox-suggestions.d.ts +76 -0
  272. package/dist/components/combobox-suggestions.js +56 -0
  273. package/dist/components/combobox-suggestions.js.map +1 -0
  274. package/dist/components/combobox.d.ts +14 -159
  275. package/dist/components/combobox.js +40 -507
  276. package/dist/components/combobox.js.map +1 -1
  277. package/dist/components/confirm-dialog-labels.d.ts +7 -0
  278. package/dist/components/confirm-dialog-labels.js +10 -0
  279. package/dist/components/confirm-dialog-labels.js.map +1 -0
  280. package/dist/components/confirm-dialog.d.ts +165 -100
  281. package/dist/components/confirm-dialog.js +2 -6
  282. package/dist/components/confirm-dialog.js.map +1 -1
  283. package/dist/components/copy-button-labels.d.ts +2 -0
  284. package/dist/components/copy-button-labels.js +12 -0
  285. package/dist/components/copy-button-labels.js.map +1 -0
  286. package/dist/components/copy-button.d.ts +70 -100
  287. package/dist/components/copy-button.js +4 -9
  288. package/dist/components/copy-button.js.map +1 -1
  289. package/dist/components/country-select-labels.d.ts +2 -0
  290. package/dist/components/country-select-labels.js +10 -0
  291. package/dist/components/country-select-labels.js.map +1 -0
  292. package/dist/components/country-select.d.ts +18 -15
  293. package/dist/components/country-select.js +49 -64
  294. package/dist/components/country-select.js.map +1 -1
  295. package/dist/components/currency-option-list.d.ts +63 -0
  296. package/dist/components/currency-option-list.js +135 -0
  297. package/dist/components/currency-option-list.js.map +1 -0
  298. package/dist/components/currency-select.d.ts +10 -30
  299. package/dist/components/currency-select.js +50 -133
  300. package/dist/components/currency-select.js.map +1 -1
  301. package/dist/components/danger-confirm-labels.d.ts +14 -0
  302. package/dist/components/danger-confirm-labels.js +17 -0
  303. package/dist/components/danger-confirm-labels.js.map +1 -0
  304. package/dist/components/danger-confirm.d.ts +448 -100
  305. package/dist/components/danger-confirm.js +40 -46
  306. package/dist/components/danger-confirm.js.map +1 -1
  307. package/dist/components/data-table-cells.d.ts +9 -24
  308. package/dist/components/data-table-cells.js +1 -1
  309. package/dist/components/data-table-cells.js.map +1 -1
  310. package/dist/components/data-table-column-settings.d.ts +16 -0
  311. package/dist/components/data-table-column-settings.js +119 -0
  312. package/dist/components/data-table-column-settings.js.map +1 -0
  313. package/dist/components/data-table-filter-popover.d.ts +5 -19
  314. package/dist/components/data-table-filter-popover.js +39 -22
  315. package/dist/components/data-table-filter-popover.js.map +1 -1
  316. package/dist/components/data-table-filters.d.ts +93 -15
  317. package/dist/components/data-table-filters.js +22 -7
  318. package/dist/components/data-table-filters.js.map +1 -1
  319. package/dist/components/data-table-head.d.ts +36 -0
  320. package/dist/components/data-table-head.js +190 -0
  321. package/dist/components/data-table-head.js.map +1 -0
  322. package/dist/components/data-table-labels.d.ts +124 -15
  323. package/dist/components/data-table-labels.js +9 -5
  324. package/dist/components/data-table-labels.js.map +1 -1
  325. package/dist/components/data-table-mobile.d.ts +106 -0
  326. package/dist/components/data-table-mobile.js +412 -0
  327. package/dist/components/data-table-mobile.js.map +1 -0
  328. package/dist/components/data-table-pagination.d.ts +6 -21
  329. package/dist/components/data-table-pagination.js +7 -7
  330. package/dist/components/data-table-pagination.js.map +1 -1
  331. package/dist/components/data-table-resize.d.ts +37 -0
  332. package/dist/components/data-table-resize.js +103 -0
  333. package/dist/components/data-table-resize.js.map +1 -0
  334. package/dist/components/data-table-row-actions.d.ts +24 -0
  335. package/dist/components/data-table-row-actions.js +95 -0
  336. package/dist/components/data-table-row-actions.js.map +1 -0
  337. package/dist/components/data-table-selection.d.ts +21 -0
  338. package/dist/components/data-table-selection.js +30 -0
  339. package/dist/components/data-table-selection.js.map +1 -0
  340. package/dist/components/data-table-shared.d.ts +77 -0
  341. package/dist/components/data-table-shared.js +77 -0
  342. package/dist/components/data-table-shared.js.map +1 -0
  343. package/dist/components/data-table-sort.d.ts +8 -10
  344. package/dist/components/data-table.d.ts +603 -15
  345. package/dist/components/data-table.js +134 -927
  346. package/dist/components/data-table.js.map +1 -1
  347. package/dist/components/date-field.d.ts +203 -0
  348. package/dist/components/date-field.js +270 -0
  349. package/dist/components/date-field.js.map +1 -0
  350. package/dist/components/date-picker.d.ts +6 -261
  351. package/dist/components/date-picker.js +24 -760
  352. package/dist/components/date-picker.js.map +1 -1
  353. package/dist/components/date-range-picker.d.ts +125 -0
  354. package/dist/components/date-range-picker.js +261 -0
  355. package/dist/components/date-range-picker.js.map +1 -0
  356. package/dist/components/description-list-labels.d.ts +2 -0
  357. package/dist/components/description-list-labels.js +8 -0
  358. package/dist/components/description-list-labels.js.map +1 -0
  359. package/dist/components/description-list.d.ts +13 -15
  360. package/dist/components/description-list.js +17 -11
  361. package/dist/components/description-list.js.map +1 -1
  362. package/dist/components/dialog-frame-labels.d.ts +2 -0
  363. package/dist/components/dialog-frame-labels.js +6 -0
  364. package/dist/components/dialog-frame-labels.js.map +1 -0
  365. package/dist/components/dialog-frame.d.ts +7 -11
  366. package/dist/components/dialog-frame.js +6 -6
  367. package/dist/components/dialog-frame.js.map +1 -1
  368. package/dist/components/disclosure.d.ts +6 -10
  369. package/dist/components/disclosure.js +11 -11
  370. package/dist/components/disclosure.js.map +1 -1
  371. package/dist/components/dropdown.d.ts +55 -27
  372. package/dist/components/dropdown.js +62 -31
  373. package/dist/components/dropdown.js.map +1 -1
  374. package/dist/components/empty-state.d.ts +64 -0
  375. package/dist/components/empty-state.js +70 -0
  376. package/dist/components/empty-state.js.map +1 -0
  377. package/dist/components/entity-combobox.d.ts +10 -11
  378. package/dist/components/entity-combobox.js +14 -13
  379. package/dist/components/entity-combobox.js.map +1 -1
  380. package/dist/components/error-boundary-labels.d.ts +2 -0
  381. package/dist/components/error-boundary-labels.js +19 -0
  382. package/dist/components/error-boundary-labels.js.map +1 -0
  383. package/dist/components/error-boundary.d.ts +17 -17
  384. package/dist/components/error-boundary.js +5 -17
  385. package/dist/components/error-boundary.js.map +1 -1
  386. package/dist/components/facing-pair.d.ts +7 -115
  387. package/dist/components/facing-pair.js +1 -1
  388. package/dist/components/facing-pair.js.map +1 -1
  389. package/dist/components/field-base.d.ts +260 -0
  390. package/dist/components/field-base.js +228 -0
  391. package/dist/components/field-base.js.map +1 -0
  392. package/dist/components/field-parts.d.ts +188 -87
  393. package/dist/components/field-parts.js +60 -33
  394. package/dist/components/field-parts.js.map +1 -1
  395. package/dist/components/field-strip.d.ts +19 -28
  396. package/dist/components/field-strip.js +2 -2
  397. package/dist/components/field-strip.js.map +1 -1
  398. package/dist/components/field-sync-labels.d.ts +2 -0
  399. package/dist/components/field-sync-labels.js +12 -0
  400. package/dist/components/field-sync-labels.js.map +1 -0
  401. package/dist/components/field-sync.d.ts +20 -19
  402. package/dist/components/field-sync.js +4 -10
  403. package/dist/components/field-sync.js.map +1 -1
  404. package/dist/components/field.d.ts +45 -10
  405. package/dist/components/field.js +10 -8
  406. package/dist/components/field.js.map +1 -1
  407. package/dist/components/file-button.d.ts +85 -100
  408. package/dist/components/file-button.js +23 -169
  409. package/dist/components/file-button.js.map +1 -1
  410. package/dist/components/file-dropzone.d.ts +9 -109
  411. package/dist/components/file-dropzone.js +22 -22
  412. package/dist/components/file-dropzone.js.map +1 -1
  413. package/dist/components/floating-panel-labels.d.ts +2 -0
  414. package/dist/components/floating-panel-labels.js +9 -0
  415. package/dist/components/floating-panel-labels.js.map +1 -0
  416. package/dist/components/floating-panel.d.ts +17 -21
  417. package/dist/components/floating-panel.js +19 -18
  418. package/dist/components/floating-panel.js.map +1 -1
  419. package/dist/components/focus-ring.d.ts +9 -6
  420. package/dist/components/focus-ring.js +2 -2
  421. package/dist/components/focus-ring.js.map +1 -1
  422. package/dist/components/form-actions-labels.d.ts +2 -0
  423. package/dist/components/form-actions-labels.js +10 -0
  424. package/dist/components/form-actions-labels.js.map +1 -0
  425. package/dist/components/form-actions.d.ts +280 -100
  426. package/dist/components/form-actions.js +10 -20
  427. package/dist/components/form-actions.js.map +1 -1
  428. package/dist/components/full-bleed-dialog.d.ts +7 -8
  429. package/dist/components/full-bleed-dialog.js +14 -13
  430. package/dist/components/full-bleed-dialog.js.map +1 -1
  431. package/dist/components/grouped-picker.d.ts +21 -16
  432. package/dist/components/grouped-picker.js +76 -62
  433. package/dist/components/grouped-picker.js.map +1 -1
  434. package/dist/components/help-popover.d.ts +60 -0
  435. package/dist/components/help-popover.js +48 -0
  436. package/dist/components/help-popover.js.map +1 -0
  437. package/dist/components/hover-menu.d.ts +17 -16
  438. package/dist/components/hover-menu.js +18 -17
  439. package/dist/components/hover-menu.js.map +1 -1
  440. package/dist/components/iban-input-labels.d.ts +2 -0
  441. package/dist/components/iban-input-labels.js +13 -0
  442. package/dist/components/iban-input-labels.js.map +1 -0
  443. package/dist/components/iban-input.d.ts +73 -100
  444. package/dist/components/iban-input.js +22 -15
  445. package/dist/components/iban-input.js.map +1 -1
  446. package/dist/components/icon-button.d.ts +300 -0
  447. package/dist/components/icon-button.js +465 -0
  448. package/dist/components/icon-button.js.map +1 -0
  449. package/dist/components/icon-picker-labels.d.ts +2 -0
  450. package/dist/components/icon-picker-labels.js +12 -0
  451. package/dist/components/icon-picker-labels.js.map +1 -0
  452. package/dist/components/icon-picker.d.ts +13 -13
  453. package/dist/components/icon-picker.js +18 -17
  454. package/dist/components/icon-picker.js.map +1 -1
  455. package/dist/components/image-grid-labels.d.ts +2 -0
  456. package/dist/components/image-grid-labels.js +10 -0
  457. package/dist/components/image-grid-labels.js.map +1 -0
  458. package/dist/components/image-grid.d.ts +12 -14
  459. package/dist/components/image-grid.js +6 -10
  460. package/dist/components/image-grid.js.map +1 -1
  461. package/dist/components/inline-edit-field-labels.d.ts +2 -0
  462. package/dist/components/inline-edit-field-labels.js +10 -0
  463. package/dist/components/inline-edit-field-labels.js.map +1 -0
  464. package/dist/components/inline-edit-field.d.ts +11 -13
  465. package/dist/components/inline-edit-field.js +11 -13
  466. package/dist/components/inline-edit-field.js.map +1 -1
  467. package/dist/components/inline-entity-combobox.d.ts +155 -0
  468. package/dist/components/inline-entity-combobox.js +467 -0
  469. package/dist/components/inline-entity-combobox.js.map +1 -0
  470. package/dist/components/input.d.ts +98 -0
  471. package/dist/components/input.js +219 -0
  472. package/dist/components/input.js.map +1 -0
  473. package/dist/components/jump-calendar.d.ts +8 -0
  474. package/dist/components/jump-calendar.js +274 -0
  475. package/dist/components/jump-calendar.js.map +1 -0
  476. package/dist/components/language-select.d.ts +20 -110
  477. package/dist/components/language-select.js +12 -7
  478. package/dist/components/language-select.js.map +1 -1
  479. package/dist/components/legal-labels.d.ts +2 -0
  480. package/dist/components/legal-labels.js +100 -0
  481. package/dist/components/legal-labels.js.map +1 -0
  482. package/dist/components/legal-page.d.ts +17 -117
  483. package/dist/components/legal-page.js +2 -2
  484. package/dist/components/legal-page.js.map +1 -1
  485. package/dist/components/legal.d.ts +353 -100
  486. package/dist/components/legal.js +7 -101
  487. package/dist/components/legal.js.map +1 -1
  488. package/dist/components/lightbox-labels.d.ts +2 -0
  489. package/dist/components/lightbox-labels.js +17 -0
  490. package/dist/components/lightbox-labels.js.map +1 -0
  491. package/dist/components/lightbox.d.ts +12 -14
  492. package/dist/components/lightbox.js +9 -19
  493. package/dist/components/lightbox.js.map +1 -1
  494. package/dist/components/line-items-labels.d.ts +2 -0
  495. package/dist/components/line-items-labels.js +13 -0
  496. package/dist/components/line-items-labels.js.map +1 -0
  497. package/dist/components/line-items.d.ts +16 -18
  498. package/dist/components/line-items.js +18 -26
  499. package/dist/components/line-items.js.map +1 -1
  500. package/dist/components/list-labels.d.ts +2 -0
  501. package/dist/components/list-labels.js +9 -0
  502. package/dist/components/list-labels.js.map +1 -0
  503. package/dist/components/list.d.ts +32 -21
  504. package/dist/components/list.js +41 -25
  505. package/dist/components/list.js.map +1 -1
  506. package/dist/components/loading-state.d.ts +5 -9
  507. package/dist/components/loading-state.js +2 -2
  508. package/dist/components/loading-state.js.map +1 -1
  509. package/dist/components/measured-grid-labels.d.ts +4 -0
  510. package/dist/components/measured-grid-labels.js +21 -0
  511. package/dist/components/measured-grid-labels.js.map +1 -0
  512. package/dist/components/measured-grid.d.ts +13 -17
  513. package/dist/components/measured-grid.js +31 -50
  514. package/dist/components/measured-grid.js.map +1 -1
  515. package/dist/components/menu-item.d.ts +10 -10
  516. package/dist/components/menu-item.js +9 -9
  517. package/dist/components/menu-item.js.map +1 -1
  518. package/dist/components/mini-calendar-labels.d.ts +4 -0
  519. package/dist/components/mini-calendar-labels.js +14 -0
  520. package/dist/components/mini-calendar-labels.js.map +1 -0
  521. package/dist/components/mini-calendar.d.ts +10 -14
  522. package/dist/components/mini-calendar.js +22 -29
  523. package/dist/components/mini-calendar.js.map +1 -1
  524. package/dist/components/modal.d.ts +26 -18
  525. package/dist/components/modal.js +8 -11
  526. package/dist/components/modal.js.map +1 -1
  527. package/dist/components/money-draft.d.ts +34 -0
  528. package/dist/components/money-draft.js +39 -0
  529. package/dist/components/money-draft.js.map +1 -0
  530. package/dist/components/money-field.d.ts +13 -110
  531. package/dist/components/money-field.js +6 -22
  532. package/dist/components/money-field.js.map +1 -1
  533. package/dist/components/month-picker-labels.d.ts +5 -0
  534. package/dist/components/month-picker-labels.js +18 -0
  535. package/dist/components/month-picker-labels.js.map +1 -0
  536. package/dist/components/month-picker.d.ts +15 -13
  537. package/dist/components/month-picker.js +34 -32
  538. package/dist/components/month-picker.js.map +1 -1
  539. package/dist/components/multi-entity-combobox.d.ts +9 -11
  540. package/dist/components/multi-entity-combobox.js +14 -13
  541. package/dist/components/multi-entity-combobox.js.map +1 -1
  542. package/dist/components/multi-select.d.ts +81 -21
  543. package/dist/components/multi-select.js +171 -197
  544. package/dist/components/multi-select.js.map +1 -1
  545. package/dist/components/nav-pills.d.ts +9 -10
  546. package/dist/components/nav-pills.js +53 -42
  547. package/dist/components/nav-pills.js.map +1 -1
  548. package/dist/components/number-field.d.ts +13 -110
  549. package/dist/components/number-field.js +2 -3
  550. package/dist/components/number-field.js.map +1 -1
  551. package/dist/components/number-input.d.ts +55 -109
  552. package/dist/components/number-input.js +50 -67
  553. package/dist/components/number-input.js.map +1 -1
  554. package/dist/components/numeric-field.d.ts +85 -0
  555. package/dist/components/numeric-field.js +71 -0
  556. package/dist/components/numeric-field.js.map +1 -0
  557. package/dist/components/numpad-sheet.d.ts +5 -107
  558. package/dist/components/numpad-sheet.js +7 -7
  559. package/dist/components/numpad-sheet.js.map +1 -1
  560. package/dist/components/one-time-code-input.d.ts +6 -7
  561. package/dist/components/one-time-code-input.js +119 -124
  562. package/dist/components/one-time-code-input.js.map +1 -1
  563. package/dist/components/page-contents-labels.d.ts +2 -0
  564. package/dist/components/page-contents-labels.js +8 -0
  565. package/dist/components/page-contents-labels.js.map +1 -0
  566. package/dist/components/page-contents.d.ts +13 -15
  567. package/dist/components/page-contents.js +7 -9
  568. package/dist/components/page-contents.js.map +1 -1
  569. package/dist/components/page-header.d.ts +10 -10
  570. package/dist/components/page-header.js +3 -3
  571. package/dist/components/page-header.js.map +1 -1
  572. package/dist/components/password-strength-labels.d.ts +2 -0
  573. package/dist/components/password-strength-labels.js +21 -0
  574. package/dist/components/password-strength-labels.js.map +1 -0
  575. package/dist/components/password-strength.d.ts +15 -17
  576. package/dist/components/password-strength.js +7 -22
  577. package/dist/components/password-strength.js.map +1 -1
  578. package/dist/components/phone-input-labels.d.ts +2 -0
  579. package/dist/components/phone-input-labels.js +9 -0
  580. package/dist/components/phone-input-labels.js.map +1 -0
  581. package/dist/components/phone-input.d.ts +75 -100
  582. package/dist/components/phone-input.js +20 -23
  583. package/dist/components/phone-input.js.map +1 -1
  584. package/dist/components/picker-sheet.d.ts +20 -8
  585. package/dist/components/picker-sheet.js +22 -11
  586. package/dist/components/picker-sheet.js.map +1 -1
  587. package/dist/components/pie-chart-labels.d.ts +2 -4
  588. package/dist/components/pie-chart.d.ts +8 -11
  589. package/dist/components/pie-chart.js +5 -5
  590. package/dist/components/pie-chart.js.map +1 -1
  591. package/dist/components/popover-labels.d.ts +2 -0
  592. package/dist/components/popover-labels.js +11 -0
  593. package/dist/components/popover-labels.js.map +1 -0
  594. package/dist/components/popover.d.ts +13 -11
  595. package/dist/components/popover.js +21 -23
  596. package/dist/components/popover.js.map +1 -1
  597. package/dist/components/progress-bar-labels.d.ts +2 -0
  598. package/dist/components/progress-bar-labels.js +9 -0
  599. package/dist/components/progress-bar-labels.js.map +1 -0
  600. package/dist/components/progress-bar.d.ts +16 -15
  601. package/dist/components/progress-bar.js +22 -20
  602. package/dist/components/progress-bar.js.map +1 -1
  603. package/dist/components/qr-code.d.ts +4 -8
  604. package/dist/components/qr-code.js.map +1 -1
  605. package/dist/components/reauth-dialog-labels.d.ts +2 -0
  606. package/dist/components/reauth-dialog-labels.js +12 -0
  607. package/dist/components/reauth-dialog-labels.js.map +1 -0
  608. package/dist/components/reauth-dialog.d.ts +8 -10
  609. package/dist/components/reauth-dialog.js +3 -8
  610. package/dist/components/reauth-dialog.js.map +1 -1
  611. package/dist/components/row-actions-labels.d.ts +2 -0
  612. package/dist/components/row-actions-labels.js +9 -0
  613. package/dist/components/row-actions-labels.js.map +1 -0
  614. package/dist/components/row-actions.d.ts +224 -100
  615. package/dist/components/row-actions.js +4 -5
  616. package/dist/components/row-actions.js.map +1 -1
  617. package/dist/components/scroll-area.d.ts +6 -9
  618. package/dist/components/scroll-area.js +4 -10
  619. package/dist/components/scroll-area.js.map +1 -1
  620. package/dist/components/search-field.d.ts +12 -27
  621. package/dist/components/search-field.js +13 -16
  622. package/dist/components/search-field.js.map +1 -1
  623. package/dist/components/select.d.ts +69 -0
  624. package/dist/components/select.js +164 -0
  625. package/dist/components/select.js.map +1 -0
  626. package/dist/components/separator.d.ts +3 -7
  627. package/dist/components/separator.js.map +1 -1
  628. package/dist/components/series-chart-axes.d.ts +120 -0
  629. package/dist/components/series-chart-axes.js +164 -0
  630. package/dist/components/series-chart-axes.js.map +1 -0
  631. package/dist/components/series-chart-budget.d.ts +8 -9
  632. package/dist/components/series-chart-labels.d.ts +2 -4
  633. package/dist/components/series-chart-thin.d.ts +34 -0
  634. package/dist/components/series-chart-thin.js +103 -0
  635. package/dist/components/series-chart-thin.js.map +1 -0
  636. package/dist/components/series-chart-ticks.d.ts +9 -11
  637. package/dist/components/series-chart.d.ts +64 -213
  638. package/dist/components/series-chart.js +69 -160
  639. package/dist/components/series-chart.js.map +1 -1
  640. package/dist/components/server-wake-labels.d.ts +2 -0
  641. package/dist/components/server-wake-labels.js +9 -0
  642. package/dist/components/server-wake-labels.js.map +1 -0
  643. package/dist/components/server-wake.d.ts +32 -23
  644. package/dist/components/server-wake.js +15 -35
  645. package/dist/components/server-wake.js.map +1 -1
  646. package/dist/components/settings-fields.d.ts +46 -117
  647. package/dist/components/settings-fields.js +13 -3
  648. package/dist/components/settings-fields.js.map +1 -1
  649. package/dist/components/share-card-labels.d.ts +2 -0
  650. package/dist/components/share-card-labels.js +29 -0
  651. package/dist/components/share-card-labels.js.map +1 -0
  652. package/dist/components/share-card.d.ts +188 -100
  653. package/dist/components/share-card.js +16 -34
  654. package/dist/components/share-card.js.map +1 -1
  655. package/dist/components/sign-chip-labels.d.ts +2 -0
  656. package/dist/components/sign-chip-labels.js +11 -0
  657. package/dist/components/sign-chip-labels.js.map +1 -0
  658. package/dist/components/sign-chip.d.ts +7 -9
  659. package/dist/components/sign-chip.js +2 -7
  660. package/dist/components/sign-chip.js.map +1 -1
  661. package/dist/components/signature-pad-labels.d.ts +2 -0
  662. package/dist/components/signature-pad-labels.js +23 -0
  663. package/dist/components/signature-pad-labels.js.map +1 -0
  664. package/dist/components/signature-pad.d.ts +16 -15
  665. package/dist/components/signature-pad.js +22 -35
  666. package/dist/components/signature-pad.js.map +1 -1
  667. package/dist/components/signed-amount-labels.d.ts +2 -0
  668. package/dist/components/signed-amount-labels.js +9 -0
  669. package/dist/components/signed-amount-labels.js.map +1 -0
  670. package/dist/components/signed-amount.d.ts +19 -21
  671. package/dist/components/signed-amount.js +12 -15
  672. package/dist/components/signed-amount.js.map +1 -1
  673. package/dist/components/skeleton.d.ts +13 -9
  674. package/dist/components/skeleton.js +1 -1
  675. package/dist/components/skeleton.js.map +1 -1
  676. package/dist/components/slider.d.ts +16 -11
  677. package/dist/components/slider.js +23 -18
  678. package/dist/components/slider.js.map +1 -1
  679. package/dist/components/sparkline-labels.d.ts +2 -0
  680. package/dist/components/sparkline-labels.js +13 -0
  681. package/dist/components/sparkline-labels.js.map +1 -0
  682. package/dist/components/sparkline.d.ts +10 -12
  683. package/dist/components/sparkline.js +10 -17
  684. package/dist/components/sparkline.js.map +1 -1
  685. package/dist/components/spinner.d.ts +45 -0
  686. package/dist/components/spinner.js +39 -0
  687. package/dist/components/spinner.js.map +1 -0
  688. package/dist/components/stat-tile-labels.d.ts +2 -0
  689. package/dist/components/stat-tile-labels.js +14 -0
  690. package/dist/components/stat-tile-labels.js.map +1 -0
  691. package/dist/components/stat-tile.d.ts +15 -17
  692. package/dist/components/stat-tile.js +25 -32
  693. package/dist/components/stat-tile.js.map +1 -1
  694. package/dist/components/status-dot.d.ts +8 -20
  695. package/dist/components/status-dot.js +13 -12
  696. package/dist/components/status-dot.js.map +1 -1
  697. package/dist/components/swatch-picker-labels.d.ts +2 -0
  698. package/dist/components/swatch-picker-labels.js +9 -0
  699. package/dist/components/swatch-picker-labels.js.map +1 -0
  700. package/dist/components/swatch-picker.d.ts +14 -14
  701. package/dist/components/swatch-picker.js +14 -8
  702. package/dist/components/swatch-picker.js.map +1 -1
  703. package/dist/components/swipeable-row.d.ts +14 -27
  704. package/dist/components/swipeable-row.js +2 -2
  705. package/dist/components/swipeable-row.js.map +1 -1
  706. package/dist/components/switch.d.ts +10 -13
  707. package/dist/components/switch.js +13 -12
  708. package/dist/components/switch.js.map +1 -1
  709. package/dist/components/table.d.ts +28 -31
  710. package/dist/components/table.js +15 -15
  711. package/dist/components/table.js.map +1 -1
  712. package/dist/components/tabs.d.ts +182 -0
  713. package/dist/components/tabs.js +312 -0
  714. package/dist/components/tabs.js.map +1 -0
  715. package/dist/components/text-link.d.ts +17 -118
  716. package/dist/components/text-link.js +7 -7
  717. package/dist/components/text-link.js.map +1 -1
  718. package/dist/components/text.d.ts +14 -13
  719. package/dist/components/text.js +5 -5
  720. package/dist/components/text.js.map +1 -1
  721. package/dist/components/textarea.d.ts +20 -0
  722. package/dist/components/textarea.js +161 -0
  723. package/dist/components/textarea.js.map +1 -0
  724. package/dist/components/tile-radio.d.ts +6 -10
  725. package/dist/components/tile-radio.js +6 -6
  726. package/dist/components/tile-radio.js.map +1 -1
  727. package/dist/components/time-input.d.ts +5 -107
  728. package/dist/components/time-input.js +14 -5
  729. package/dist/components/time-input.js.map +1 -1
  730. package/dist/components/toast-labels.d.ts +2 -0
  731. package/dist/components/toast-labels.js +11 -0
  732. package/dist/components/toast-labels.js.map +1 -0
  733. package/dist/components/toast.d.ts +21 -23
  734. package/dist/components/toast.js +1 -6
  735. package/dist/components/toast.js.map +1 -1
  736. package/dist/components/toggle-group.d.ts +26 -26
  737. package/dist/components/toggle-group.js +43 -19
  738. package/dist/components/toggle-group.js.map +1 -1
  739. package/dist/components/toggle-legend.d.ts +18 -21
  740. package/dist/components/toggle-legend.js +3 -3
  741. package/dist/components/toggle-legend.js.map +1 -1
  742. package/dist/components/tooltip.d.ts +16 -15
  743. package/dist/components/tooltip.js +4 -9
  744. package/dist/components/tooltip.js.map +1 -1
  745. package/dist/components/translation-review-editor.d.ts +8 -10
  746. package/dist/components/translation-review-editor.js +6 -5
  747. package/dist/components/translation-review-editor.js.map +1 -1
  748. package/dist/components/translation-review-labels.d.ts +4 -7
  749. package/dist/components/translation-review-parts.d.ts +19 -28
  750. package/dist/components/translation-review-parts.js +4 -7
  751. package/dist/components/translation-review-parts.js.map +1 -1
  752. package/dist/components/translation-review.d.ts +26 -24
  753. package/dist/components/translation-review.js +13 -10
  754. package/dist/components/translation-review.js.map +1 -1
  755. package/dist/components/tree-view.d.ts +7 -11
  756. package/dist/components/tree-view.js +8 -8
  757. package/dist/components/tree-view.js.map +1 -1
  758. package/dist/components/treemap.d.ts +9 -13
  759. package/dist/components/trigger-aria.d.ts +2 -4
  760. package/dist/components/ui-labels.d.ts +5 -0
  761. package/dist/components/ui-labels.js +20 -0
  762. package/dist/components/ui-labels.js.map +1 -0
  763. package/dist/components/use-anchor-dir.d.ts +3 -6
  764. package/dist/components/use-mobile-reveal.d.ts +2 -6
  765. package/dist/components/use-table-state.d.ts +154 -15
  766. package/dist/components/user-avatar.d.ts +8 -21
  767. package/dist/components/user-avatar.js +1 -1
  768. package/dist/components/user-avatar.js.map +1 -1
  769. package/dist/components/wizard-stepper.d.ts +6 -6
  770. package/dist/components/wizard-stepper.js +4 -3
  771. package/dist/components/wizard-stepper.js.map +1 -1
  772. package/dist/components/write-lock-labels.d.ts +2 -0
  773. package/dist/components/write-lock-labels.js +8 -0
  774. package/dist/components/write-lock-labels.js.map +1 -0
  775. package/dist/components/write-lock.d.ts +16 -18
  776. package/dist/components/write-lock.js +4 -8
  777. package/dist/components/write-lock.js.map +1 -1
  778. package/dist/data-table.d.ts +10 -18
  779. package/dist/data-table.js.map +1 -1
  780. package/dist/demo/demo-banner.d.ts +10 -13
  781. package/dist/demo/demo-banner.js +5 -19
  782. package/dist/demo/demo-banner.js.map +1 -1
  783. package/dist/demo/demo-countdown.d.ts +7 -9
  784. package/dist/demo/demo-ended.d.ts +10 -13
  785. package/dist/demo/demo-ended.js +4 -4
  786. package/dist/demo/demo-ended.js.map +1 -1
  787. package/dist/demo/demo-labels.d.ts +4 -5
  788. package/dist/demo/demo-labels.js.map +1 -1
  789. package/dist/demo/demo-session.d.ts +3 -5
  790. package/dist/demo/demo-start.d.ts +8 -11
  791. package/dist/demo/demo-start.js +3 -2
  792. package/dist/demo/demo-start.js.map +1 -1
  793. package/dist/feedback/feedback-attachment-labels.d.ts +16 -0
  794. package/dist/feedback/feedback-attachment-labels.js +17 -0
  795. package/dist/feedback/feedback-attachment-labels.js.map +1 -0
  796. package/dist/feedback/feedback-attachment.d.ts +312 -100
  797. package/dist/feedback/feedback-attachment.js +31 -42
  798. package/dist/feedback/feedback-attachment.js.map +1 -1
  799. package/dist/feedback/feedback-capture.d.ts +2 -4
  800. package/dist/feedback/feedback-context-labels.d.ts +2 -0
  801. package/dist/feedback/feedback-context-labels.js +9 -0
  802. package/dist/feedback/feedback-context-labels.js.map +1 -0
  803. package/dist/feedback/feedback-context.d.ts +110 -100
  804. package/dist/feedback/feedback-context.js +4 -7
  805. package/dist/feedback/feedback-context.js.map +1 -1
  806. package/dist/feedback/feedback-crash.d.ts +8 -109
  807. package/dist/feedback/feedback-dialog-labels.d.ts +12 -0
  808. package/dist/feedback/feedback-dialog-labels.js +17 -0
  809. package/dist/feedback/feedback-dialog-labels.js.map +1 -0
  810. package/dist/feedback/feedback-dialog.d.ts +186 -100
  811. package/dist/feedback/feedback-dialog.js +8 -18
  812. package/dist/feedback/feedback-dialog.js.map +1 -1
  813. package/dist/feedback/feedback-inbox.d.ts +236 -100
  814. package/dist/feedback/feedback-inbox.js +31 -141
  815. package/dist/feedback/feedback-inbox.js.map +1 -1
  816. package/dist/feedback/feedback-labels.d.ts +83 -100
  817. package/dist/feedback/feedback-labels.js.map +1 -1
  818. package/dist/feedback/feedback-menu-labels.d.ts +2 -0
  819. package/dist/feedback/feedback-menu-labels.js +10 -0
  820. package/dist/feedback/feedback-menu-labels.js.map +1 -0
  821. package/dist/feedback/feedback-menu.d.ts +83 -100
  822. package/dist/feedback/feedback-menu.js +3 -7
  823. package/dist/feedback/feedback-menu.js.map +1 -1
  824. package/dist/feedback/feedback-record.d.ts +239 -100
  825. package/dist/feedback/feedback-record.js +7 -2
  826. package/dist/feedback/feedback-record.js.map +1 -1
  827. package/dist/feedback/feedback-row-detail-labels.d.ts +2 -0
  828. package/dist/feedback/feedback-row-detail-labels.js +31 -0
  829. package/dist/feedback/feedback-row-detail-labels.js.map +1 -0
  830. package/dist/feedback/feedback-row-detail.d.ts +315 -100
  831. package/dist/feedback/feedback-row-detail.js +11 -37
  832. package/dist/feedback/feedback-row-detail.js.map +1 -1
  833. package/dist/feedback/feedback-status-undo.d.ts +66 -100
  834. package/dist/feedback/feedback-status-undo.js.map +1 -1
  835. package/dist/feedback/feedback-submit-dialog.d.ts +39 -0
  836. package/dist/feedback/feedback-submit-dialog.js +66 -0
  837. package/dist/feedback/feedback-submit-dialog.js.map +1 -0
  838. package/dist/feedback/feedback-submit.d.ts +13 -108
  839. package/dist/feedback/feedback-submit.js +19 -40
  840. package/dist/feedback/feedback-submit.js.map +1 -1
  841. package/dist/feedback/feedback-swipe.d.ts +9 -109
  842. package/dist/feedback/feedback-swipe.js +1 -1
  843. package/dist/feedback/feedback-swipe.js.map +1 -1
  844. package/dist/feedback/feedback-table-labels.d.ts +2 -0
  845. package/dist/feedback/feedback-table-labels.js +26 -0
  846. package/dist/feedback/feedback-table-labels.js.map +1 -0
  847. package/dist/feedback/feedback-table.d.ts +314 -100
  848. package/dist/feedback/feedback-table.js +11 -31
  849. package/dist/feedback/feedback-table.js.map +1 -1
  850. package/dist/feedback/feedback-thread-labels.d.ts +3 -0
  851. package/dist/feedback/feedback-thread-labels.js +21 -0
  852. package/dist/feedback/feedback-thread-labels.js.map +1 -0
  853. package/dist/feedback/feedback-thread.d.ts +378 -100
  854. package/dist/feedback/feedback-thread.js +32 -35
  855. package/dist/feedback/feedback-thread.js.map +1 -1
  856. package/dist/feedback/feedback-vocabulary.d.ts +98 -0
  857. package/dist/feedback/feedback-vocabulary.js +143 -0
  858. package/dist/feedback/feedback-vocabulary.js.map +1 -0
  859. package/dist/feedback.d.ts +15 -104
  860. package/dist/hooks/use-anchored-panel.d.ts +109 -17
  861. package/dist/hooks/use-anchored-panel.js +38 -6
  862. package/dist/hooks/use-anchored-panel.js.map +1 -1
  863. package/dist/hooks/use-anchored-rect.d.ts +15 -6
  864. package/dist/hooks/use-anchored-rect.js +2 -1
  865. package/dist/hooks/use-anchored-rect.js.map +1 -1
  866. package/dist/hooks/use-announce.d.ts +4 -6
  867. package/dist/hooks/use-authed-src.d.ts +5 -7
  868. package/dist/hooks/use-authed-src.js +3 -7
  869. package/dist/hooks/use-authed-src.js.map +1 -1
  870. package/dist/hooks/use-body-scroll-lock.d.ts +1 -3
  871. package/dist/hooks/use-breakpoint.d.ts +16 -17
  872. package/dist/hooks/use-breakpoint.js.map +1 -1
  873. package/dist/hooks/use-close-transition.d.ts +8 -8
  874. package/dist/hooks/use-close-transition.js +5 -4
  875. package/dist/hooks/use-close-transition.js.map +1 -1
  876. package/dist/hooks/use-copy-to-clipboard.d.ts +5 -7
  877. package/dist/hooks/use-debounce.d.ts +13 -6
  878. package/dist/hooks/use-debounce.js.map +1 -1
  879. package/dist/hooks/use-dismiss.d.ts +37 -11
  880. package/dist/hooks/use-dismiss.js +69 -10
  881. package/dist/hooks/use-dismiss.js.map +1 -1
  882. package/dist/hooks/use-file-drop.d.ts +8 -109
  883. package/dist/hooks/use-file-drop.js +1 -1
  884. package/dist/hooks/use-file-drop.js.map +1 -1
  885. package/dist/hooks/use-file-picker-labels.d.ts +2 -0
  886. package/dist/hooks/use-file-picker-labels.js +25 -0
  887. package/dist/hooks/use-file-picker-labels.js.map +1 -0
  888. package/dist/hooks/use-file-picker.d.ts +164 -0
  889. package/dist/hooks/use-file-picker.js +149 -0
  890. package/dist/hooks/use-file-picker.js.map +1 -0
  891. package/dist/hooks/use-focus-trap.d.ts +10 -4
  892. package/dist/hooks/use-focus-trap.js +19 -12
  893. package/dist/hooks/use-focus-trap.js.map +1 -1
  894. package/dist/hooks/use-hotkey.d.ts +7 -9
  895. package/dist/hooks/use-large-text.d.ts +3 -5
  896. package/dist/hooks/use-media-query.d.ts +1 -3
  897. package/dist/hooks/use-noindex.d.ts +1 -3
  898. package/dist/hooks/use-overlay-history.d.ts +1 -3
  899. package/dist/hooks/use-row-swipe.d.ts +5 -8
  900. package/dist/hooks/use-search-param-state.d.ts +10 -11
  901. package/dist/hooks/use-windowed-rows.d.ts +4 -7
  902. package/dist/i18n/defaults.d.ts +11 -104
  903. package/dist/i18n/defaults.js +82 -82
  904. package/dist/i18n/defaults.js.map +1 -1
  905. package/dist/i18n/german.d.ts +2 -104
  906. package/dist/i18n/german.js +56 -9
  907. package/dist/i18n/german.js.map +1 -1
  908. package/dist/i18n/kit-labels.d.ts +609 -100
  909. package/dist/i18n/kit-labels.js +22 -97
  910. package/dist/i18n/kit-labels.js.map +1 -1
  911. package/dist/i18n/languages.d.ts +197 -100
  912. package/dist/i18n/locales/de-CH.d.ts +3 -105
  913. package/dist/i18n/locales/en.d.ts +4 -104
  914. package/dist/i18n/locales/en.js +1834 -4
  915. package/dist/i18n/locales/en.js.map +7 -1
  916. package/dist/i18n/locales/es.d.ts +3 -105
  917. package/dist/i18n/locales/es.js +54 -9
  918. package/dist/i18n/locales/es.js.map +1 -1
  919. package/dist/i18n/locales/fr.d.ts +3 -105
  920. package/dist/i18n/locales/fr.js +56 -9
  921. package/dist/i18n/locales/fr.js.map +1 -1
  922. package/dist/i18n/locales/hu.d.ts +3 -105
  923. package/dist/i18n/locales/hu.js +56 -10
  924. package/dist/i18n/locales/hu.js.map +1 -1
  925. package/dist/i18n/locales/it.d.ts +3 -105
  926. package/dist/i18n/locales/it.js +55 -9
  927. package/dist/i18n/locales/it.js.map +1 -1
  928. package/dist/i18n/locales/zh.d.ts +3 -105
  929. package/dist/i18n/locales/zh.js +52 -8
  930. package/dist/i18n/locales/zh.js.map +1 -1
  931. package/dist/i18n/plurals.d.ts +20 -3
  932. package/dist/i18n/plurals.js +11 -0
  933. package/dist/i18n/plurals.js.map +1 -1
  934. package/dist/i18n/review.d.ts +5 -106
  935. package/dist/i18n/review.js +4 -0
  936. package/dist/i18n/review.js.map +1 -1
  937. package/dist/i18n/shared-labels.d.ts +17 -0
  938. package/dist/i18n/shared-labels.js +111 -0
  939. package/dist/i18n/shared-labels.js.map +1 -0
  940. package/dist/i18n/swiss.d.ts +1 -3
  941. package/dist/index.d.ts +329 -249
  942. package/dist/index.js +188 -215
  943. package/dist/index.js.map +1 -1
  944. package/dist/landing/access.d.ts +7 -9
  945. package/dist/landing/access.js.map +1 -1
  946. package/dist/landing/landing-actions.d.ts +9 -108
  947. package/dist/landing/landing-actions.js +1 -1
  948. package/dist/landing/landing-actions.js.map +1 -1
  949. package/dist/landing/landing-labels.d.ts +4 -5
  950. package/dist/landing/landing-labels.js.map +1 -1
  951. package/dist/landing/landing-sections.d.ts +21 -120
  952. package/dist/landing/landing-sections.js +15 -15
  953. package/dist/landing/landing-sections.js.map +1 -1
  954. package/dist/landing/page-seo.d.ts +7 -9
  955. package/dist/landing/public-header.d.ts +10 -110
  956. package/dist/landing/public-header.js +1 -1
  957. package/dist/landing/public-header.js.map +1 -1
  958. package/dist/landing/routing.d.ts +16 -119
  959. package/dist/landing/routing.js +2 -6
  960. package/dist/landing/routing.js.map +1 -1
  961. package/dist/lib/calc.d.ts +7 -9
  962. package/dist/lib/chip-edge-snap.d.ts +10 -0
  963. package/dist/lib/chip-edge-snap.js +131 -0
  964. package/dist/lib/chip-edge-snap.js.map +1 -0
  965. package/dist/lib/clipping.d.ts +2 -4
  966. package/dist/lib/cn.d.ts +2 -5
  967. package/dist/lib/cn.js +6 -1
  968. package/dist/lib/cn.js.map +1 -1
  969. package/dist/lib/column-mapping.d.ts +10 -13
  970. package/dist/lib/countries.d.ts +3 -5
  971. package/dist/lib/dates.d.ts +25 -25
  972. package/dist/lib/dates.js.map +1 -1
  973. package/dist/lib/decimal-marks.d.ts +8 -8
  974. package/dist/lib/decimal-marks.js +1 -1
  975. package/dist/lib/decimal-marks.js.map +1 -1
  976. package/dist/lib/direction.d.ts +4 -6
  977. package/dist/lib/document-navigation.d.ts +1 -3
  978. package/dist/lib/download.d.ts +67 -0
  979. package/dist/lib/download.js +89 -0
  980. package/dist/lib/download.js.map +1 -0
  981. package/dist/lib/floating-stack.d.ts +8 -6
  982. package/dist/lib/floating-stack.js.map +1 -1
  983. package/dist/lib/format.d.ts +24 -23
  984. package/dist/lib/format.js +3 -3
  985. package/dist/lib/format.js.map +1 -1
  986. package/dist/lib/iban.d.ts +9 -11
  987. package/dist/lib/ime.d.ts +17 -0
  988. package/dist/lib/ime.js +13 -0
  989. package/dist/lib/ime.js.map +1 -0
  990. package/dist/lib/isin.d.ts +3 -5
  991. package/dist/lib/logger.d.ts +4 -6
  992. package/dist/lib/person-name.d.ts +3 -5
  993. package/dist/lib/phone.d.ts +9 -11
  994. package/dist/lib/presence.d.ts +15 -0
  995. package/dist/lib/presence.js +8 -0
  996. package/dist/lib/presence.js.map +1 -0
  997. package/dist/lib/qr-encode.d.ts +4 -6
  998. package/dist/lib/reduced-motion.d.ts +18 -0
  999. package/dist/lib/reduced-motion.js +9 -0
  1000. package/dist/lib/reduced-motion.js.map +1 -0
  1001. package/dist/lib/round.d.ts +22 -0
  1002. package/dist/lib/round.js +15 -0
  1003. package/dist/lib/round.js.map +1 -0
  1004. package/dist/lib/safe-storage.d.ts +14 -4
  1005. package/dist/lib/safe-storage.js +24 -9
  1006. package/dist/lib/safe-storage.js.map +1 -1
  1007. package/dist/lib/server-wake.d.ts +13 -14
  1008. package/dist/lib/session-refresh.d.ts +200 -0
  1009. package/dist/lib/session-refresh.js +187 -0
  1010. package/dist/lib/session-refresh.js.map +1 -0
  1011. package/dist/lib/strip-fade.d.ts +10 -13
  1012. package/dist/lib/table-text.d.ts +14 -16
  1013. package/dist/lib/text-match.d.ts +41 -0
  1014. package/dist/lib/text-match.js +23 -0
  1015. package/dist/lib/text-match.js.map +1 -0
  1016. package/dist/lib/translation-review.d.ts +44 -45
  1017. package/dist/lib/translation-review.js +3 -2
  1018. package/dist/lib/translation-review.js.map +1 -1
  1019. package/dist/rhf/fields.d.ts +123 -188
  1020. package/dist/rhf/fields.js +46 -54
  1021. package/dist/rhf/fields.js.map +1 -1
  1022. package/dist/rhf/form-core.d.ts +153 -0
  1023. package/dist/rhf/form-core.js +143 -0
  1024. package/dist/rhf/form-core.js.map +1 -0
  1025. package/dist/rhf/form.d.ts +38 -174
  1026. package/dist/rhf/form.js +9 -131
  1027. package/dist/rhf/form.js.map +1 -1
  1028. package/dist/rhf/line-items.d.ts +40 -11
  1029. package/dist/rhf/line-items.js.map +1 -1
  1030. package/dist/rhf/use-rhf-wizard-step.d.ts +3 -6
  1031. package/dist/rhf.d.ts +4 -117
  1032. package/dist/rhf.js.map +1 -1
  1033. package/dist/search/command-palette-labels.d.ts +2 -0
  1034. package/dist/search/command-palette-labels.js +15 -0
  1035. package/dist/search/command-palette-labels.js.map +1 -0
  1036. package/dist/search/command-palette.d.ts +10 -13
  1037. package/dist/search/command-palette.js +25 -44
  1038. package/dist/search/command-palette.js.map +1 -1
  1039. package/dist/search/global-search-labels.d.ts +2 -0
  1040. package/dist/search/global-search-labels.js +12 -0
  1041. package/dist/search/global-search-labels.js.map +1 -0
  1042. package/dist/search/global-search.d.ts +17 -16
  1043. package/dist/search/global-search.js +12 -12
  1044. package/dist/search/global-search.js.map +1 -1
  1045. package/dist/search/search-index.d.ts +13 -14
  1046. package/dist/search/search-index.js +2 -1
  1047. package/dist/search/search-index.js.map +1 -1
  1048. package/dist/search/use-command-key.d.ts +9 -0
  1049. package/dist/search/use-command-key.js +18 -0
  1050. package/dist/search/use-command-key.js.map +1 -0
  1051. package/dist/search.d.ts +3 -4
  1052. package/dist/settings/settings-card-classes.d.ts +11 -0
  1053. package/dist/settings/settings-card-classes.js +8 -0
  1054. package/dist/settings/settings-card-classes.js.map +1 -0
  1055. package/dist/settings/settings-catalogue.d.ts +11 -14
  1056. package/dist/settings/settings-context.d.ts +4 -8
  1057. package/dist/settings/settings-heading.d.ts +8 -12
  1058. package/dist/settings/settings-heading.js +1 -1
  1059. package/dist/settings/settings-heading.js.map +1 -1
  1060. package/dist/settings/settings-labels.d.ts +6 -7
  1061. package/dist/settings/settings-labels.js.map +1 -1
  1062. package/dist/settings/settings-layout.d.ts +36 -13
  1063. package/dist/settings/settings-layout.js +25 -4
  1064. package/dist/settings/settings-layout.js.map +1 -1
  1065. package/dist/settings/settings-section.d.ts +4 -106
  1066. package/dist/settings/settings-section.js +2 -2
  1067. package/dist/settings/settings-section.js.map +1 -1
  1068. package/dist/settings/use-account-appearance.d.ts +11 -16
  1069. package/dist/settings/use-account-language.d.ts +8 -10
  1070. package/dist/settings/use-settings-focus.d.ts +3 -5
  1071. package/dist/settings/use-settings-focus.js +2 -4
  1072. package/dist/settings/use-settings-focus.js.map +1 -1
  1073. package/dist/settings/use-settings-route.d.ts +11 -16
  1074. package/dist/shell/app-shell-labels.d.ts +2 -0
  1075. package/dist/shell/app-shell-labels.js +9 -0
  1076. package/dist/shell/app-shell-labels.js.map +1 -0
  1077. package/dist/shell/app-shell.d.ts +216 -100
  1078. package/dist/shell/app-shell.js +51 -35
  1079. package/dist/shell/app-shell.js.map +1 -1
  1080. package/dist/shell/auth-layout.d.ts +6 -9
  1081. package/dist/shell/auth-layout.js +6 -6
  1082. package/dist/shell/auth-layout.js.map +1 -1
  1083. package/dist/shell/company-switcher-labels.d.ts +2 -0
  1084. package/dist/shell/company-switcher-labels.js +12 -0
  1085. package/dist/shell/company-switcher-labels.js.map +1 -0
  1086. package/dist/shell/company-switcher.d.ts +9 -11
  1087. package/dist/shell/company-switcher.js +3 -9
  1088. package/dist/shell/company-switcher.js.map +1 -1
  1089. package/dist/shell/option-switcher-menu.d.ts +19 -9
  1090. package/dist/shell/option-switcher-menu.js +6 -4
  1091. package/dist/shell/option-switcher-menu.js.map +1 -1
  1092. package/dist/shell/role-switcher.d.ts +5 -6
  1093. package/dist/shell/role-switcher.js +4 -3
  1094. package/dist/shell/role-switcher.js.map +1 -1
  1095. package/dist/shell/top-bar-brand.d.ts +4 -106
  1096. package/dist/shell/top-bar-brand.js +1 -1
  1097. package/dist/shell/top-bar-brand.js.map +1 -1
  1098. package/dist/shell/top-bar.d.ts +6 -9
  1099. package/dist/shell/top-bar.js +1 -1
  1100. package/dist/shell/top-bar.js.map +1 -1
  1101. package/dist/shell/topbar-action-menu.d.ts +30 -31
  1102. package/dist/shell/topbar-action-menu.js +12 -10
  1103. package/dist/shell/topbar-action-menu.js.map +1 -1
  1104. package/dist/shell/topbar-controls.d.ts +20 -18
  1105. package/dist/shell/topbar-controls.js +14 -11
  1106. package/dist/shell/topbar-controls.js.map +1 -1
  1107. package/dist/shell.d.ts +25 -115
  1108. package/dist/shell.js.map +1 -1
  1109. package/dist/table-text.d.ts +1 -1
  1110. package/dist/testing/css-variables.d.ts +4 -6
  1111. package/dist/testing/css-variables.generated.d.ts +2 -4
  1112. package/dist/testing/index.d.ts +2 -1
  1113. package/dist/testing/index.js +9 -1
  1114. package/dist/testing/index.js.map +1 -1
  1115. package/dist/testing/viewport.d.ts +93 -0
  1116. package/dist/testing/viewport.js +152 -0
  1117. package/dist/testing/viewport.js.map +1 -0
  1118. package/dist/theme/chart-palette.d.ts +7 -9
  1119. package/dist/theme/color.d.ts +14 -16
  1120. package/dist/theme/color.js +2 -1
  1121. package/dist/theme/color.js.map +1 -1
  1122. package/dist/theme/contrast-tokens.d.ts +13 -17
  1123. package/dist/theme/contrast.d.ts +22 -27
  1124. package/dist/theme/palette-derive.d.ts +16 -22
  1125. package/dist/theme/palette-derive.js +15 -7
  1126. package/dist/theme/palette-derive.js.map +1 -1
  1127. package/dist/theme/palette-presets.d.ts +25 -15
  1128. package/dist/theme/palette-presets.js +66 -66
  1129. package/dist/theme/palette-presets.js.map +1 -1
  1130. package/dist/theme/palette-store.d.ts +10 -13
  1131. package/dist/theme/text-size.d.ts +21 -26
  1132. package/dist/theme/theme-store.d.ts +9 -14
  1133. package/dist/tour/tour-labels.d.ts +2 -0
  1134. package/dist/tour/tour-labels.js +13 -0
  1135. package/dist/tour/tour-labels.js.map +1 -0
  1136. package/dist/tour/tour.d.ts +12 -14
  1137. package/dist/tour/tour.js +9 -20
  1138. package/dist/tour/tour.js.map +1 -1
  1139. package/dist/tour.d.ts +1 -2
  1140. package/dist/wizard/stepper-nav.d.ts +8 -107
  1141. package/dist/wizard/stepper-nav.js +15 -14
  1142. package/dist/wizard/stepper-nav.js.map +1 -1
  1143. package/dist/wizard/types.d.ts +18 -18
  1144. package/dist/wizard/types.js +1 -19
  1145. package/dist/wizard/types.js.map +1 -1
  1146. package/dist/wizard/use-wizard.d.ts +2 -6
  1147. package/dist/wizard/validation.d.ts +3 -7
  1148. package/dist/wizard/wizard-context.d.ts +7 -11
  1149. package/dist/wizard/wizard-labels.d.ts +4 -0
  1150. package/dist/wizard/wizard-labels.js +24 -0
  1151. package/dist/wizard/wizard-labels.js.map +1 -0
  1152. package/dist/wizard/wizard-step.d.ts +3 -7
  1153. package/dist/wizard/wizard-step.js +2 -2
  1154. package/dist/wizard/wizard-step.js.map +1 -1
  1155. package/dist/wizard/wizard-summary.d.ts +5 -8
  1156. package/dist/wizard/wizard-summary.js +6 -5
  1157. package/dist/wizard/wizard-summary.js.map +1 -1
  1158. package/dist/wizard.d.ts +7 -106
  1159. package/package.json +9 -6
  1160. package/src/account/account-parts.ts +3 -3
  1161. package/src/{components → account}/account-settings-labels.ts +11 -1
  1162. package/src/{components → account}/account-settings.tsx +145 -34
  1163. package/src/account/data-export-setting-labels.ts +20 -0
  1164. package/src/account/data-export-setting.tsx +19 -38
  1165. package/src/account/delete-account-setting-labels.ts +33 -0
  1166. package/src/account/delete-account-setting.tsx +13 -35
  1167. package/src/account/email-change-setting-labels.ts +32 -0
  1168. package/src/account/email-change-setting.tsx +17 -36
  1169. package/src/{components → account}/passkeys-setting.tsx +14 -9
  1170. package/src/account/sessions-setting-labels.ts +24 -0
  1171. package/src/account/sessions-setting.tsx +14 -28
  1172. package/src/admin/admin-action-confirm-labels.ts +19 -0
  1173. package/src/admin/admin-action-confirm.tsx +59 -38
  1174. package/src/admin/admin-action-log-labels.ts +74 -0
  1175. package/src/admin/admin-action-log.tsx +180 -54
  1176. package/src/admin/admin-parts.ts +0 -7
  1177. package/src/admin/invitations-panel-labels.ts +31 -0
  1178. package/src/admin/invitations-panel.tsx +16 -34
  1179. package/src/admin/plan-change-labels.ts +23 -0
  1180. package/src/admin/plan-change.tsx +89 -37
  1181. package/src/admin/reviewer-scope-editor-labels.ts +16 -0
  1182. package/src/admin/reviewer-scope-editor.tsx +9 -15
  1183. package/src/admin/role-select-labels.ts +16 -0
  1184. package/src/admin/role-select.tsx +13 -23
  1185. package/src/admin/transfer-ownership-dialog-labels.ts +20 -0
  1186. package/src/admin/transfer-ownership-dialog.tsx +7 -17
  1187. package/src/admin/user-roster-labels.ts +17 -0
  1188. package/src/admin/user-roster.tsx +9 -17
  1189. package/src/auth/accept-invitation-labels.ts +21 -0
  1190. package/src/auth/accept-invitation.tsx +9 -20
  1191. package/src/auth/auth-errors.ts +29 -13
  1192. package/src/auth/complete-name-dialog-labels.ts +16 -0
  1193. package/src/auth/complete-name-dialog.tsx +8 -13
  1194. package/src/auth/forgot-password-form-labels.ts +20 -0
  1195. package/src/auth/forgot-password-form.tsx +12 -20
  1196. package/src/auth/new-password-fields.tsx +1 -1
  1197. package/src/auth/not-found-page-labels.ts +12 -0
  1198. package/src/auth/not-found-page.tsx +11 -14
  1199. package/src/auth/register-form-labels.ts +31 -0
  1200. package/src/auth/register-form.tsx +18 -38
  1201. package/src/auth/reset-password-form-labels.ts +27 -0
  1202. package/src/auth/reset-password-form.tsx +12 -27
  1203. package/src/auth/sign-in-form-labels.ts +44 -0
  1204. package/src/auth/sign-in-form.tsx +18 -51
  1205. package/src/auth/status-parts.tsx +3 -3
  1206. package/src/auth/verify-email-labels.ts +26 -0
  1207. package/src/auth/verify-email.tsx +15 -30
  1208. package/src/billing/billing-banner.tsx +2 -1
  1209. package/src/billing/billing-labels.ts +1 -1
  1210. package/src/billing/checkout-processing.ts +2 -12
  1211. package/src/billing/pay-page.ts +9 -5
  1212. package/src/billing/plan-card.tsx +26 -27
  1213. package/src/billing/plan-limit-notice.tsx +1 -1
  1214. package/src/billing/subscription-actions.tsx +4 -4
  1215. package/src/chart.ts +7 -1
  1216. package/src/components/account-chips-labels.ts +16 -0
  1217. package/src/components/account-chips.tsx +13 -16
  1218. package/src/components/alert-banner.tsx +39 -19
  1219. package/src/components/amount-input.tsx +461 -405
  1220. package/src/components/appearance-labels.ts +2 -2
  1221. package/src/components/authed-image-labels.ts +11 -0
  1222. package/src/components/authed-image.tsx +6 -8
  1223. package/src/components/autocomplete.tsx +84 -80
  1224. package/src/components/breadcrumbs-labels.ts +10 -0
  1225. package/src/components/breadcrumbs.tsx +17 -14
  1226. package/src/components/bulk-action-bar-labels.ts +11 -0
  1227. package/src/components/bulk-action-bar.tsx +15 -16
  1228. package/src/components/button-group.tsx +7 -7
  1229. package/src/components/button-look.ts +230 -0
  1230. package/src/components/button.tsx +339 -0
  1231. package/src/components/calculator.tsx +18 -11
  1232. package/src/components/calendar-heatmap-labels.ts +15 -0
  1233. package/src/components/calendar-heatmap.tsx +13 -19
  1234. package/src/components/card.tsx +381 -0
  1235. package/src/components/chart-zoom-core.tsx +653 -0
  1236. package/src/components/chart-zoom.tsx +64 -648
  1237. package/src/components/chart.tsx +11 -11
  1238. package/src/components/checkbox-group.tsx +13 -10
  1239. package/src/components/checkbox.tsx +43 -42
  1240. package/src/components/chip-input.tsx +377 -0
  1241. package/src/components/chip-labels.ts +13 -0
  1242. package/src/components/chip.tsx +115 -711
  1243. package/src/components/choice-card.tsx +83 -85
  1244. package/src/components/column-mapper-labels.ts +45 -0
  1245. package/src/components/column-mapper.tsx +16 -51
  1246. package/src/components/combobox-core.tsx +351 -196
  1247. package/src/components/combobox-suggestions.tsx +129 -0
  1248. package/src/components/combobox.tsx +69 -893
  1249. package/src/components/confirm-dialog-labels.ts +13 -0
  1250. package/src/components/confirm-dialog.tsx +4 -8
  1251. package/src/components/copy-button-labels.ts +13 -0
  1252. package/src/components/copy-button.tsx +10 -12
  1253. package/src/components/country-select-labels.ts +11 -0
  1254. package/src/components/country-select.tsx +74 -89
  1255. package/src/components/currency-option-list.tsx +216 -0
  1256. package/src/components/currency-select.tsx +85 -196
  1257. package/src/components/danger-confirm-labels.ts +20 -0
  1258. package/src/components/danger-confirm.tsx +69 -77
  1259. package/src/components/data-table-cells.tsx +5 -5
  1260. package/src/components/data-table-column-settings.tsx +137 -0
  1261. package/src/components/data-table-filter-popover.tsx +49 -24
  1262. package/src/components/data-table-filters.ts +48 -11
  1263. package/src/components/data-table-head.tsx +258 -0
  1264. package/src/components/data-table-labels.ts +43 -11
  1265. package/src/components/data-table-mobile.tsx +594 -0
  1266. package/src/components/data-table-pagination.tsx +11 -10
  1267. package/src/components/data-table-resize.ts +187 -0
  1268. package/src/components/data-table-row-actions.tsx +152 -0
  1269. package/src/components/data-table-selection.ts +55 -0
  1270. package/src/components/data-table-shared.tsx +172 -0
  1271. package/src/components/data-table.tsx +178 -1300
  1272. package/src/components/date-field.tsx +627 -0
  1273. package/src/components/date-picker.tsx +58 -1446
  1274. package/src/components/date-range-picker.tsx +490 -0
  1275. package/src/components/description-list-labels.ts +9 -0
  1276. package/src/components/description-list.tsx +31 -15
  1277. package/src/components/dialog-frame-labels.ts +7 -0
  1278. package/src/components/dialog-frame.tsx +8 -6
  1279. package/src/components/disclosure.tsx +14 -14
  1280. package/src/components/dropdown.tsx +114 -42
  1281. package/src/components/empty-state.tsx +137 -0
  1282. package/src/components/entity-combobox.tsx +17 -12
  1283. package/src/components/error-boundary-labels.ts +20 -0
  1284. package/src/components/error-boundary.tsx +10 -20
  1285. package/src/components/facing-pair.ts +1 -1
  1286. package/src/components/field-base.tsx +615 -0
  1287. package/src/components/field-parts.tsx +206 -77
  1288. package/src/components/field-strip.tsx +16 -21
  1289. package/src/components/field-sync-labels.ts +13 -0
  1290. package/src/components/field-sync.tsx +11 -12
  1291. package/src/components/field.tsx +13 -11
  1292. package/src/components/file-button.tsx +64 -412
  1293. package/src/components/file-dropzone.tsx +36 -33
  1294. package/src/components/floating-panel-labels.ts +10 -0
  1295. package/src/components/floating-panel.tsx +32 -21
  1296. package/src/components/focus-ring.ts +9 -4
  1297. package/src/components/form-actions-labels.ts +11 -0
  1298. package/src/components/form-actions.tsx +17 -21
  1299. package/src/components/full-bleed-dialog.tsx +33 -25
  1300. package/src/components/grouped-picker.tsx +118 -96
  1301. package/src/components/help-popover.tsx +115 -0
  1302. package/src/components/hover-menu.tsx +46 -35
  1303. package/src/components/iban-input-labels.ts +15 -0
  1304. package/src/components/iban-input.tsx +25 -20
  1305. package/src/components/icon-button.tsx +945 -0
  1306. package/src/components/icon-picker-labels.ts +13 -0
  1307. package/src/components/icon-picker.tsx +27 -24
  1308. package/src/components/image-grid-labels.ts +11 -0
  1309. package/src/components/image-grid.tsx +13 -15
  1310. package/src/components/inline-edit-field-labels.ts +11 -0
  1311. package/src/components/inline-edit-field.tsx +20 -19
  1312. package/src/components/inline-entity-combobox.tsx +789 -0
  1313. package/src/components/input.tsx +380 -0
  1314. package/src/components/jump-calendar.tsx +385 -0
  1315. package/src/components/language-select.tsx +31 -16
  1316. package/src/components/legal-labels.ts +99 -0
  1317. package/src/components/legal-page.tsx +2 -2
  1318. package/src/components/legal.tsx +11 -101
  1319. package/src/components/lightbox-labels.ts +18 -0
  1320. package/src/components/lightbox.tsx +13 -21
  1321. package/src/components/line-items-labels.ts +14 -0
  1322. package/src/components/line-items.tsx +24 -31
  1323. package/src/components/list-labels.ts +10 -0
  1324. package/src/components/list.tsx +98 -75
  1325. package/src/components/loading-state.tsx +4 -4
  1326. package/src/components/measured-grid-labels.ts +25 -0
  1327. package/src/components/measured-grid.tsx +39 -62
  1328. package/src/components/menu-item.tsx +29 -26
  1329. package/src/components/mini-calendar-labels.ts +17 -0
  1330. package/src/components/mini-calendar.tsx +38 -45
  1331. package/src/components/modal.tsx +36 -18
  1332. package/src/components/money-draft.ts +72 -0
  1333. package/src/components/money-field.tsx +16 -30
  1334. package/src/components/month-picker-labels.ts +22 -0
  1335. package/src/components/month-picker.tsx +59 -45
  1336. package/src/components/multi-entity-combobox.tsx +17 -12
  1337. package/src/components/multi-select.tsx +313 -288
  1338. package/src/components/nav-pills.tsx +19 -8
  1339. package/src/components/number-field.tsx +14 -5
  1340. package/src/components/number-input.tsx +125 -90
  1341. package/src/components/numeric-field.ts +161 -0
  1342. package/src/components/numpad-sheet.tsx +16 -16
  1343. package/src/components/one-time-code-input.tsx +154 -169
  1344. package/src/components/page-contents-labels.ts +9 -0
  1345. package/src/components/page-contents.tsx +15 -15
  1346. package/src/components/page-header.tsx +9 -5
  1347. package/src/components/password-strength-labels.ts +23 -0
  1348. package/src/components/password-strength.tsx +13 -27
  1349. package/src/components/phone-input-labels.ts +10 -0
  1350. package/src/components/phone-input.tsx +42 -57
  1351. package/src/components/picker-sheet.tsx +47 -18
  1352. package/src/components/pie-chart.tsx +11 -9
  1353. package/src/components/popover-labels.ts +14 -0
  1354. package/src/components/popover.tsx +40 -39
  1355. package/src/components/progress-bar-labels.ts +10 -0
  1356. package/src/components/progress-bar.tsx +32 -23
  1357. package/src/components/qr-code.tsx +2 -2
  1358. package/src/components/reauth-dialog-labels.ts +13 -0
  1359. package/src/components/reauth-dialog.tsx +7 -10
  1360. package/src/components/row-actions-labels.ts +10 -0
  1361. package/src/components/row-actions.tsx +11 -10
  1362. package/src/components/scroll-area.tsx +4 -10
  1363. package/src/components/search-field.tsx +35 -49
  1364. package/src/components/select.tsx +302 -0
  1365. package/src/components/separator.tsx +2 -2
  1366. package/src/components/series-chart-axes.ts +329 -0
  1367. package/src/components/series-chart-thin.ts +180 -0
  1368. package/src/components/series-chart.tsx +124 -325
  1369. package/src/components/server-wake-labels.ts +11 -0
  1370. package/src/components/server-wake.tsx +42 -63
  1371. package/src/components/settings-fields.tsx +46 -17
  1372. package/src/components/share-card-labels.ts +30 -0
  1373. package/src/components/share-card.tsx +22 -37
  1374. package/src/components/sign-chip-labels.ts +12 -0
  1375. package/src/components/sign-chip.tsx +6 -9
  1376. package/src/components/signature-pad-labels.ts +24 -0
  1377. package/src/components/signature-pad.tsx +48 -57
  1378. package/src/components/signed-amount-labels.ts +10 -0
  1379. package/src/components/signed-amount.tsx +21 -22
  1380. package/src/components/skeleton.tsx +11 -3
  1381. package/src/components/slider.tsx +51 -39
  1382. package/src/components/sparkline-labels.ts +14 -0
  1383. package/src/components/sparkline.tsx +16 -21
  1384. package/src/components/spinner.tsx +81 -0
  1385. package/src/components/stat-tile-labels.ts +15 -0
  1386. package/src/components/stat-tile.tsx +32 -37
  1387. package/src/components/status-dot.tsx +17 -14
  1388. package/src/components/swatch-picker-labels.ts +10 -0
  1389. package/src/components/swatch-picker.tsx +23 -16
  1390. package/src/components/swipeable-row.tsx +7 -7
  1391. package/src/components/switch.tsx +33 -32
  1392. package/src/components/table.tsx +15 -15
  1393. package/src/components/tabs.tsx +660 -0
  1394. package/src/components/text-link.tsx +7 -7
  1395. package/src/components/text.tsx +10 -6
  1396. package/src/components/textarea.tsx +323 -0
  1397. package/src/components/tile-radio.tsx +6 -6
  1398. package/src/components/time-input.tsx +15 -7
  1399. package/src/components/toast-labels.ts +12 -0
  1400. package/src/components/toast.tsx +5 -8
  1401. package/src/components/toggle-group.tsx +105 -42
  1402. package/src/components/toggle-legend.tsx +6 -6
  1403. package/src/components/tooltip.tsx +10 -21
  1404. package/src/components/translation-review-editor.tsx +8 -7
  1405. package/src/components/translation-review-parts.tsx +9 -13
  1406. package/src/components/translation-review.tsx +26 -14
  1407. package/src/components/tree-view.tsx +14 -12
  1408. package/src/components/ui-labels.ts +22 -0
  1409. package/src/components/user-avatar.tsx +3 -3
  1410. package/src/components/wizard-stepper.tsx +10 -5
  1411. package/src/components/write-lock-labels.ts +9 -0
  1412. package/src/components/write-lock.tsx +10 -12
  1413. package/src/data-table.ts +4 -0
  1414. package/src/demo/demo-banner.tsx +9 -25
  1415. package/src/demo/demo-ended.tsx +8 -7
  1416. package/src/demo/demo-labels.ts +2 -2
  1417. package/src/demo/demo-start.tsx +7 -5
  1418. package/src/feedback/feedback-attachment-labels.ts +36 -0
  1419. package/src/feedback/feedback-attachment.tsx +42 -66
  1420. package/src/feedback/feedback-context-labels.ts +10 -0
  1421. package/src/feedback/feedback-context.tsx +8 -9
  1422. package/src/feedback/feedback-dialog-labels.ts +28 -0
  1423. package/src/feedback/feedback-dialog.tsx +14 -44
  1424. package/src/feedback/feedback-inbox.tsx +49 -252
  1425. package/src/feedback/feedback-labels.ts +5 -5
  1426. package/src/feedback/feedback-menu-labels.ts +11 -0
  1427. package/src/feedback/feedback-menu.tsx +13 -11
  1428. package/src/feedback/feedback-record.ts +21 -7
  1429. package/src/feedback/feedback-row-detail-labels.ts +33 -0
  1430. package/src/feedback/feedback-row-detail.tsx +30 -43
  1431. package/src/feedback/feedback-status-undo.ts +3 -2
  1432. package/src/feedback/feedback-submit-dialog.tsx +109 -0
  1433. package/src/feedback/feedback-submit.tsx +45 -55
  1434. package/src/feedback/feedback-swipe.tsx +1 -1
  1435. package/src/feedback/feedback-table-labels.ts +27 -0
  1436. package/src/feedback/feedback-table.tsx +24 -40
  1437. package/src/feedback/feedback-thread-labels.ts +22 -0
  1438. package/src/feedback/feedback-thread.tsx +68 -48
  1439. package/src/feedback/feedback-vocabulary.ts +252 -0
  1440. package/src/hooks/use-anchored-panel.ts +155 -9
  1441. package/src/hooks/use-anchored-rect.ts +11 -9
  1442. package/src/hooks/use-authed-src.ts +13 -7
  1443. package/src/hooks/use-breakpoint.ts +5 -4
  1444. package/src/hooks/use-close-transition.ts +9 -10
  1445. package/src/hooks/use-debounce.ts +9 -0
  1446. package/src/hooks/use-dismiss.ts +176 -19
  1447. package/src/hooks/use-file-drop.ts +2 -2
  1448. package/src/hooks/use-file-picker-labels.ts +29 -0
  1449. package/src/hooks/use-file-picker.tsx +363 -0
  1450. package/src/hooks/use-focus-trap.ts +74 -18
  1451. package/src/i18n/defaults.ts +91 -82
  1452. package/src/i18n/german.ts +54 -7
  1453. package/src/i18n/kit-labels.tsx +70 -119
  1454. package/src/i18n/locales/en.ts +46 -0
  1455. package/src/i18n/locales/es.ts +52 -7
  1456. package/src/i18n/locales/fr.ts +55 -8
  1457. package/src/i18n/locales/hu.ts +54 -8
  1458. package/src/i18n/locales/it.ts +53 -7
  1459. package/src/i18n/locales/zh.ts +50 -6
  1460. package/src/i18n/plurals.ts +29 -0
  1461. package/src/i18n/review.ts +4 -0
  1462. package/src/i18n/shared-labels.ts +135 -0
  1463. package/src/index.ts +412 -402
  1464. package/src/landing/access.ts +2 -1
  1465. package/src/landing/landing-actions.tsx +6 -5
  1466. package/src/landing/landing-labels.ts +2 -2
  1467. package/src/landing/landing-sections.tsx +24 -23
  1468. package/src/landing/public-header.tsx +3 -2
  1469. package/src/landing/routing.tsx +2 -7
  1470. package/src/lib/chip-edge-snap.ts +212 -0
  1471. package/src/lib/cn.ts +13 -1
  1472. package/src/lib/dates.ts +4 -2
  1473. package/src/lib/decimal-marks.ts +4 -2
  1474. package/src/lib/download.ts +172 -0
  1475. package/src/lib/floating-stack.ts +5 -1
  1476. package/src/lib/format.ts +5 -3
  1477. package/src/lib/ime.ts +24 -0
  1478. package/src/lib/presence.ts +18 -0
  1479. package/src/lib/reduced-motion.ts +21 -0
  1480. package/src/lib/round.ts +38 -0
  1481. package/src/lib/safe-storage.ts +35 -11
  1482. package/src/lib/session-refresh.ts +473 -0
  1483. package/src/lib/text-match.ts +60 -0
  1484. package/src/lib/translation-review.ts +7 -6
  1485. package/src/rhf/fields.tsx +131 -179
  1486. package/src/rhf/form-core.tsx +327 -0
  1487. package/src/rhf/form.tsx +46 -321
  1488. package/src/rhf/line-items.tsx +1 -1
  1489. package/src/rhf.ts +3 -2
  1490. package/src/search/command-palette-labels.ts +16 -0
  1491. package/src/search/command-palette.tsx +37 -50
  1492. package/src/search/global-search-labels.ts +13 -0
  1493. package/src/search/global-search.tsx +50 -24
  1494. package/src/search/search-index.ts +5 -6
  1495. package/src/search/use-command-key.ts +22 -0
  1496. package/src/settings/settings-card-classes.ts +11 -0
  1497. package/src/settings/settings-heading.tsx +1 -1
  1498. package/src/settings/settings-labels.ts +2 -2
  1499. package/src/settings/settings-layout.tsx +65 -6
  1500. package/src/settings/settings-section.tsx +5 -5
  1501. package/src/settings/use-settings-focus.ts +2 -5
  1502. package/src/shell/app-shell-labels.ts +10 -0
  1503. package/src/shell/app-shell.tsx +79 -53
  1504. package/src/shell/auth-layout.tsx +11 -10
  1505. package/src/shell/company-switcher-labels.ts +13 -0
  1506. package/src/shell/company-switcher.tsx +7 -11
  1507. package/src/shell/option-switcher-menu.tsx +25 -6
  1508. package/src/shell/role-switcher.tsx +7 -3
  1509. package/src/shell/top-bar-brand.tsx +1 -1
  1510. package/src/shell/top-bar.tsx +6 -5
  1511. package/src/shell/topbar-action-menu.tsx +39 -20
  1512. package/src/shell/topbar-controls.tsx +24 -12
  1513. package/src/shell.ts +1 -1
  1514. package/src/testing/index.ts +11 -0
  1515. package/src/testing/viewport.ts +251 -0
  1516. package/src/theme/color.ts +7 -1
  1517. package/src/theme/palette-derive.ts +29 -7
  1518. package/src/theme/palette-presets.ts +81 -68
  1519. package/src/tour/tour-labels.ts +14 -0
  1520. package/src/tour/tour.tsx +13 -23
  1521. package/src/wizard/stepper-nav.tsx +19 -18
  1522. package/src/wizard/types.ts +7 -22
  1523. package/src/wizard/wizard-labels.ts +29 -0
  1524. package/src/wizard/wizard-step.tsx +2 -2
  1525. package/src/wizard/wizard-summary.tsx +8 -7
  1526. package/tokens.css +63 -14
  1527. package/dist/components/account-settings-labels.js.map +0 -1
  1528. package/dist/components/account-settings.js.map +0 -1
  1529. package/dist/components/choice-parts.d.ts +0 -24
  1530. package/dist/components/choice-parts.js +0 -18
  1531. package/dist/components/choice-parts.js.map +0 -1
  1532. package/dist/components/passkeys-setting.js.map +0 -1
  1533. package/dist/components/ui.d.ts +0 -100
  1534. package/dist/components/ui.js +0 -1955
  1535. package/dist/components/ui.js.map +0 -1
  1536. package/dist/data-table-labels-BJ5JE_X2.d.ts +0 -923
  1537. package/dist/delete-account-setting-DiPX4Vue.d.ts +0 -8130
  1538. package/src/components/choice-parts.ts +0 -33
  1539. package/src/components/ui.tsx +0 -4233
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/chip.tsx"],"sourcesContent":["import { forwardRef, isValidElement, useCallback, useId, useLayoutEffect, useRef, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from \"react\";\nimport { Check, X } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { horizontalStep } from \"../lib/direction\";\nimport { FIELD_INVALID, FIELD_TOUCH_TEXT, TOUCH_TARGET_LARGE } from \"./ui\";\nimport { FOCUS_RING } from \"./focus-ring\";\nimport { DisabledReasonLine, useDisabledReasonLine, type DisabledReasonDisplay } from \"./field-parts\";\nimport { DEFAULT_COMMON_LABELS, useKitLabels, useKitLink, useKitLocale } from \"../i18n/kit-labels\";\nimport { pickLinkRenderer } from \"./text-link\";\nimport { Tooltip } from \"./tooltip\";\nimport { useCommitReason, type CommitScope } from \"./write-lock\";\n\n/**\n * A chip: a compact pill carrying one value.\n *\n * Three jobs, deliberately one component. A chip can be inert (a tag on a row), a link\n * (a jump to a section), or a toggle (a filter that is on or off) — and the difference is\n * which prop you pass, not which component you pick. Keeping them together is what stops\n * an app growing three near-identical pills that drift apart; it is the shape this kit\n * already uses for `Button`, which is a link when it is given an href.\n *\n * A chip is not a `Button`. It is smaller, it is rounded to a pill, and it reads as a\n * VALUE rather than as an action — which matters because a row of eight buttons says\n * \"choose one of eight things to do\" and a row of eight chips says \"here are eight\n * things\". Using `Button` for both is the mistake this exists to prevent.\n */\n\nexport type ChipTone =\n | \"neutral\"\n | \"brand\"\n | \"danger\"\n | \"warning\"\n | \"success\"\n | \"info\"\n | \"income\"\n | \"expense\"\n | ChipHue;\n/**\n * Categorical hues (0.10.0): colour that says \"a different value\" and nothing more —\n * kastlan's status-badge.tsx paints ~15 enums in 9 Tailwind hues by hand. Four of those\n * nine are semantic and already tones (green = `success`, yellow = `warning`, red =\n * `danger`, gray = `neutral`); these five are the rest, each a `--hue-*` token triple\n * in tokens.css with a light and a dark value. Use a semantic tone when the value HAS a\n * meaning (overdue is `danger`), a hue when it only needs telling apart (sent vs\n * accepted vs invoiced).\n */\nexport type ChipHue = \"blue\" | \"indigo\" | \"purple\" | \"teal\" | \"orange\";\n/** `lg` is the 44px touch target (`min-h-11`) a phone surface wants; `md` is ~28px.\n * `xs` (0.10.0) is 11px type at `px-1.5` — keksdose's goal markers and budget-cell\n * badges, which sit inside a figure's line and must not make it taller. */\nexport type ChipSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n/**\n * How much of the tone the chip wears.\n *\n * - `soft` (default): the tinted surface every chip has had.\n * - `outline`: the tone's border and text on NO surface — keksdose's DEV badge in the\n * account menu and kastlan's 27 shadcn `variant=\"outline\"` badges, which sit on\n * coloured rows where a second tint would muddy the row.\n * - `solid`: the tone as a fill under contrasting text — the \"count\" pill (unread\n * messages, open tasks). It centres its content and sets figures tabular, so a\n * one-digit count is a round dot and \"9\" → \"10\" does not jiggle the row.\n * - `dot` (0.10.0): no pill at all — a dot in the tone's colour before plain text, for\n * a status in a dense list or a table column where eight tinted pills in a column\n * would outshout the figures beside them (kastlan's unit picker already draws its\n * UnitStatus this way, from a separate `dotColor` map).\n */\nexport type ChipVariant = \"soft\" | \"outline\" | \"solid\" | \"dot\";\n/** `pill` (default) is fully rounded; `square` has the small radius of a field or a\n * button — for a chip that sits in a table cell or beside square controls. */\nexport type ChipShape = \"pill\" | \"square\";\n\nconst TONE: Record<ChipTone, { idle: string; selected: string }> = {\n neutral: {\n idle: \"border-[var(--border)] bg-[var(--bg-surface-2)] text-[var(--text-secondary)]\",\n selected: \"border-[var(--border-strong)] bg-[var(--bg-active)] text-[var(--text-primary)]\",\n },\n brand: {\n idle: \"border-[var(--border)] bg-[var(--brand-bg)] text-[var(--brand-muted)]\",\n selected: \"border-[var(--brand)] bg-[var(--brand)] text-[var(--brand-contrast)]\",\n },\n danger: {\n idle: \"border-[var(--danger-border)] bg-[var(--danger-bg)] text-[var(--danger)]\",\n selected: \"border-[var(--danger)] bg-[var(--danger)] text-[var(--danger-contrast)]\",\n },\n warning: {\n idle: \"border-[var(--warning-border)] bg-[var(--warning-bg)] text-[var(--warning)]\",\n selected: \"border-[var(--warning)] bg-[var(--warning-bg)] text-[var(--warning)]\",\n },\n success: {\n idle: \"border-[var(--success-border)] bg-[var(--success-bg)] text-[var(--success)]\",\n selected: \"border-[var(--success)] bg-[var(--success-bg)] text-[var(--success)]\",\n },\n info: {\n idle: \"border-[var(--info-border)] bg-[var(--info-bg)] text-[var(--info)]\",\n selected: \"border-[var(--info)] bg-[var(--info-bg)] text-[var(--info)]\",\n },\n // The money pair (Keksdose's direction toggle). Only the TEXT and the BORDER carry\n // the tint, on the neutral chip's own surfaces: the money tokens are chosen for text\n // contrast, and a filled amber pill beside an amber figure reads as one smear.\n // `border-current` takes its hue from the text, so the two cannot drift apart.\n income: {\n idle: \"border-current/40 bg-[var(--bg-surface-2)] text-[var(--money-income)]\",\n selected: \"border-current bg-[var(--bg-active)] text-[var(--money-income)]\",\n },\n expense: {\n idle: \"border-current/40 bg-[var(--bg-surface-2)] text-[var(--money-expense)]\",\n selected: \"border-current bg-[var(--bg-active)] text-[var(--money-expense)]\",\n },\n // The categorical hues: the `info` recipe with its own token triple, so a hue chip\n // and a status chip in one row carry the same weight.\n blue: {\n idle: \"border-[var(--hue-blue-border)] bg-[var(--hue-blue-bg)] text-[var(--hue-blue)]\",\n selected: \"border-[var(--hue-blue)] bg-[var(--hue-blue-bg)] text-[var(--hue-blue)]\",\n },\n indigo: {\n idle: \"border-[var(--hue-indigo-border)] bg-[var(--hue-indigo-bg)] text-[var(--hue-indigo)]\",\n selected: \"border-[var(--hue-indigo)] bg-[var(--hue-indigo-bg)] text-[var(--hue-indigo)]\",\n },\n purple: {\n idle: \"border-[var(--hue-purple-border)] bg-[var(--hue-purple-bg)] text-[var(--hue-purple)]\",\n selected: \"border-[var(--hue-purple)] bg-[var(--hue-purple-bg)] text-[var(--hue-purple)]\",\n },\n teal: {\n idle: \"border-[var(--hue-teal-border)] bg-[var(--hue-teal-bg)] text-[var(--hue-teal)]\",\n selected: \"border-[var(--hue-teal)] bg-[var(--hue-teal-bg)] text-[var(--hue-teal)]\",\n },\n orange: {\n idle: \"border-[var(--hue-orange-border)] bg-[var(--hue-orange-bg)] text-[var(--hue-orange)]\",\n selected: \"border-[var(--hue-orange)] bg-[var(--hue-orange-bg)] text-[var(--hue-orange)]\",\n },\n};\n\n// `outline` idle looks: the tone's border and text, the surface left to whatever the\n// chip sits on. Selected still takes the tone's `selected` look (below), because an\n// outline toggle that stays an outline when on has no visible state.\nconst OUTLINE: Record<ChipTone, string> = {\n neutral: \"border-[var(--border-strong)] bg-transparent text-[var(--text-secondary)]\",\n // The brand AS TEXT is `--brand-muted` (0.33): `--brand` itself is solved to 3:1, a\n // fill's boundary, and as text it fell to 3.0:1 in the derived dark presets.\n brand: \"border-[var(--brand)] bg-transparent text-brand-muted\",\n danger: \"border-[var(--danger-border)] bg-transparent text-[var(--danger)]\",\n warning: \"border-[var(--warning-border)] bg-transparent text-[var(--warning)]\",\n success: \"border-[var(--success-border)] bg-transparent text-[var(--success)]\",\n info: \"border-[var(--info-border)] bg-transparent text-[var(--info)]\",\n income: \"border-current/60 bg-transparent text-[var(--money-income)]\",\n expense: \"border-current/60 bg-transparent text-[var(--money-expense)]\",\n blue: \"border-[var(--hue-blue-border)] bg-transparent text-[var(--hue-blue)]\",\n indigo: \"border-[var(--hue-indigo-border)] bg-transparent text-[var(--hue-indigo)]\",\n purple: \"border-[var(--hue-purple-border)] bg-transparent text-[var(--hue-purple)]\",\n teal: \"border-[var(--hue-teal-border)] bg-transparent text-[var(--hue-teal)]\",\n orange: \"border-[var(--hue-orange-border)] bg-transparent text-[var(--hue-orange)]\",\n};\n\n// `solid`: the fill under its own foreground, `<fill>-contrast` (0.33, colour-roles\n// §5.1): white in light, the tone's 950 (the page, for money) on the dark theme's\n// pastels. Until 0.33 only brand and danger had one and the rest borrowed\n// `--text-inverse`, the surface colour — which left light warning at 4.24:1 and orange\n// at 4.38:1. Neutral keeps the inverse pair: a count pill, louder than the neutral\n// fill. The border goes transparent rather than away, so a solid chip is exactly as\n// tall as a soft one.\nconst SOLID: Record<ChipTone, string> = {\n neutral: \"border-transparent bg-inverse text-inverse\",\n brand: \"border-transparent bg-brand text-brand-contrast\",\n danger: \"border-transparent bg-danger text-danger-contrast\",\n warning: \"border-transparent bg-warning text-warning-contrast\",\n success: \"border-transparent bg-success text-success-contrast\",\n info: \"border-transparent bg-info text-info-contrast\",\n income: \"border-transparent bg-money-pos text-money-income-contrast\",\n expense: \"border-transparent bg-money-neg text-money-expense-contrast\",\n blue: \"border-transparent bg-hue-blue text-hue-blue-contrast\",\n indigo: \"border-transparent bg-hue-indigo text-hue-indigo-contrast\",\n purple: \"border-transparent bg-hue-purple text-hue-purple-contrast\",\n teal: \"border-transparent bg-hue-teal text-hue-teal-contrast\",\n orange: \"border-transparent bg-hue-orange text-hue-orange-contrast\",\n};\n\n/** `dot`: the fill of the dot itself — the tone's strongest colour, which is the one\n * chosen to read on the page surface in both themes. Neutral takes the muted ink: a\n * grey dot is \"no particular state\", not a darker black. */\nconst DOT: Record<ChipTone, string> = {\n neutral: \"bg-[var(--text-muted)]\",\n brand: \"bg-[var(--brand)]\",\n danger: \"bg-[var(--danger)]\",\n warning: \"bg-[var(--warning)]\",\n success: \"bg-[var(--success)]\",\n info: \"bg-[var(--info)]\",\n income: \"bg-[var(--money-income)]\",\n expense: \"bg-[var(--money-expense)]\",\n blue: \"bg-[var(--hue-blue)]\",\n indigo: \"bg-[var(--hue-indigo)]\",\n purple: \"bg-[var(--hue-purple)]\",\n teal: \"bg-[var(--hue-teal)]\",\n orange: \"bg-[var(--hue-orange)]\",\n};\n\n/** Per size: the dot's diameter. */\nconst DOT_SIZE: Record<ChipSize, string> = { xs: \"size-1.5\", sm: \"size-2\", md: \"size-2\", lg: \"size-2.5\" };\n\n/** The status-badge type (`caps`): a size step down, heavier and tracked, because\n * capitals at body size shout and capitals untracked run together. Per size, so it\n * replaces the size's own `text-*` through tailwind-merge. */\nconst CAPS: Record<ChipSize, string> = {\n xs: \"text-micro font-semibold uppercase tracking-wider\",\n sm: \"text-micro font-semibold uppercase tracking-wider\",\n md: \"text-caption font-semibold uppercase tracking-wider\",\n lg: \"text-xs font-semibold uppercase tracking-wider\",\n};\n\nfunction surfaceOf(tone: ChipTone, variant: ChipVariant, selected: boolean | undefined): string {\n const palette = TONE[tone];\n if (variant === \"dot\") {\n // No surface and no border colour: the dot carries the tone, the text stays ink.\n // The border goes transparent rather than away, so a dot chip lines up with a pill.\n return selected\n ? \"border-transparent bg-transparent font-medium text-[var(--text-primary)]\"\n : \"border-transparent bg-transparent text-[var(--text-secondary)]\";\n }\n if (variant === \"solid\") {\n // A solid chip is already the strongest look there is, so \"on\" is a ring round it.\n return cn(SOLID[tone], selected && \"ring-2 ring-[var(--border-strong)] ring-offset-1 ring-offset-[var(--bg-surface)]\");\n }\n if (selected) return palette.selected;\n return variant === \"outline\" ? OUTLINE[tone] : palette.idle;\n}\n\n/** What {@link ChipProps.renderLink} is handed: everything the chip would have put on\n * its own `<a>`. Spread it onto your router's link, mapping `href` to what the link\n * calls it — `renderLink={({ href, ...p }) => <Link to={href} {...p} />}`. */\nexport interface ChipLinkProps {\n href: string;\n /** The chip's whole look — keep it, or the pill is a bare link. */\n className: string;\n children: ReactNode;\n /** The chip's forwarded ref. React 19 passes it to a function component as a prop. */\n ref?: Ref<HTMLAnchorElement>;\n \"aria-current\"?: \"true\";\n /**\n * The chip's `onClick`, when it was given one — spread it onto the link with the\n * rest. Carried here so a caller need not close over it twice: keksdose's admin pill\n * in the account menu closes the menu on the way to /admin (account-menu.tsx), and\n * with `onClick` on the Chip its `renderLink` stays the one-liner\n * `({ href, ...p }) => <Link to={href} {...p} />`.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n id?: string;\n title?: string;\n [key: `aria-${string}`]: string | boolean | number | undefined;\n [key: `data-${string}`]: unknown;\n}\n\n/**\n * `body` is the whole pill when the chip is ONE element. When a link or a button also has\n * a dismiss control, the pill is a wrapper holding two siblings (see the note on\n * {@link Chip}): `split` is then the interactive part's own padding — the full start\n * inset, a short end one before the ×; `tail` is the wrapper's end inset after the ×.\n */\nconst SIZE: Record<\n ChipSize,\n { body: string; split: string; tail: string; icon: string; remove: string }\n> = {\n xs: {\n body: \"gap-1 px-1.5 py-0 text-caption leading-4\",\n split: \"gap-1 ps-1.5 pe-0.5 py-0 text-caption leading-4\",\n tail: \"pe-1\",\n icon: \"size-3\",\n remove: \"size-2.5\",\n },\n sm: {\n body: \"gap-1 px-2 py-0.5 text-xs\",\n split: \"gap-1 ps-2 pe-1 py-0.5 text-xs\",\n tail: \"pe-1.5\",\n icon: \"size-3\",\n remove: \"size-3\",\n },\n md: {\n body: \"gap-1.5 px-2.5 py-1 text-sm\",\n split: \"gap-1.5 ps-2.5 pe-1.5 py-1 text-sm\",\n tail: \"pe-2\",\n icon: \"size-3.5\",\n remove: \"size-3.5\",\n },\n lg: {\n body: \"min-h-11 gap-2 px-4 py-2 text-sm\",\n split: \"min-h-11 gap-2 ps-4 pe-2 py-2 text-sm\",\n tail: \"min-h-11 pe-3.5\",\n icon: \"size-4\",\n remove: \"size-4\",\n },\n};\n\n/* ── Edge snapping (fractional device-pixel ratios) ──────────────────────────\n *\n * WHY. At a device-pixel ratio of 1.25 (a 125 % Windows display, or 125 % browser\n * zoom) Chrome snaps a box to whole CSS pixels and only then scales it, so a 1px\n * border is 1.25 device pixels wide and starts at a quarter-pixel phase that depends\n * on where the edge lands. A chip's left edge follows whatever stands before it, its\n * right edge follows its own text, so the two land on unrelated phases: one rasterises\n * as a crisp pixel, the other as a two-pixel smear at half strength — and a 60 %-alpha\n * border (`--danger-border`) makes the smeared side read as a THINNER line (keksdose\n * dev #576).\n *\n * WHAT FIXES IT. The two edges rasterise as mirror images exactly when their device\n * positions sum to a whole number: `(2·left + width) · dpr` integral, `left` being the\n * edge's snapped CSS x. Rounding the WIDTH alone to the ratio's grid (4px at 1.25)\n * makes the phases EQUAL, which is not the same thing: measured with keksdose's\n * playwright harness across every left phase at 1.25, width-only rounding mirrored the\n * edges at two of the four phases and left the other two as lopsided as before (mean\n * peak asymmetry 16.5, worse than the unsnapped 10.9 a random width gets by luck); the\n * position-aware width below took it to 0 at every phase. Inset rings, whole-pixel\n * starts, compositing hints and fractional border widths were measured by keksdose\n * and do not help — Chrome rounds a sub-pixel border back up to 1px.\n *\n * So the fix needs the chip's position, which is why it is opt-in (`snapEdges`): it\n * reads layout. Cheaply — every snapped chip on the page shares one ResizeObserver,\n * one `resize` listener and one resolution media query, and a pass is batched into a\n * frame as read-all / write-all, not a forced layout per chip. At an integer ratio,\n * and at a half one (1.5, 2.5: grid 2 — measured symmetric already, both edges a\n * pixel and a half on the same pattern), there is nothing to fix and a pass\n * writes nothing.\n */\n\n/** The smallest whole CSS-pixel count `n` with `n × dpr` whole — 4 at 1.25, 2 at 1.5,\n * 1 at an integer ratio. 0 for a ratio no step up to 4px fits (110 % zoom wants 10px;\n * a chip growing by up to 9px is a layout change, not a hairline fix). */\nfunction chipEdgeGrid(dpr: number): number {\n for (let n = 1; n <= 4; n++) if (Math.abs(n * dpr - Math.round(n * dpr)) < 1e-3) return n;\n return 0;\n}\n\n/**\n * The width (whole CSS px, at least `natural`) that mirrors a box's two edges at\n * `dpr`, for a box whose left edge sits at CSS x `left`. `natural` back when the ratio\n * needs nothing.\n */\nfunction snappedChipEdgeWidth(natural: number, left: number, dpr: number): number {\n const n = chipEdgeGrid(dpr);\n if (n <= 2) return natural;\n const l = Math.round(left);\n // A hair under a whole pixel is that pixel: 59.999 is a 60px chip, not a 61px one.\n let w = Math.ceil(natural - 0.01);\n while ((((2 * l + w) % n) + n) % n !== 0) w++;\n return w;\n}\n\nconst snapped = new Set<HTMLElement>();\n/** The min-width each chip was given by a pass — so a pass only ever clears its own. */\nconst written = new WeakMap<HTMLElement, string>();\nlet snapFrame = 0;\nlet snapObserver: ResizeObserver | null = null;\nlet ratioQuery: MediaQueryList | null = null;\n\nfunction clearOwn(el: HTMLElement) {\n const own = written.get(el);\n if (own !== undefined && el.style.minWidth === own) el.style.minWidth = \"\";\n written.delete(el);\n}\n\n/**\n * Re-snap every chip rendered with `snapEdges`, now. The kit already re-snaps when a\n * chip renders, resizes, or the window or the ratio changes; call this after moving\n * chips some other way (a side panel sliding in beside a table of status chips),\n * since a move is not something an observer can see.\n */\nexport function refreshChipEdges(): void {\n if (snapFrame) {\n cancelAnimationFrame(snapFrame);\n snapFrame = 0;\n }\n if (typeof window === \"undefined\" || !snapped.size) return;\n const dpr = window.devicePixelRatio || 1;\n const els = [...snapped];\n // Write: back to the natural width, so what is read below is the chip, not our pin.\n for (const el of els) clearOwn(el);\n const n = chipEdgeGrid(dpr);\n if (n <= 2) return;\n // A chip whose own end decides where it starts (RTL, `justify-end`) moves when it\n // grows, so a pass re-reads what it wrote and steps on by a pixel until the edges\n // agree — `n` steps cover every residue. Each pass is ONE layout for every chip\n // together. A chip that never agrees (a centred one moves both edges at once) is\n // given its natural width back rather than kept wider for nothing.\n let pending = els;\n for (let pass = 0; pass <= n && pending.length; pass++) {\n const reads = pending.map((el) => {\n const r = el.getBoundingClientRect();\n // The text label (CHIP_LABEL_TRUNCATE; `.truncate` before 0.33).\n const label = el.querySelector<HTMLElement>(\".truncate-until-large\");\n // Not laid out (a hidden ancestor, jsdom), or truncated at its container's edge,\n // where a wider chip would overflow: leave it alone. So too a label wrapped onto\n // a second line at Large (0.32.1): the chip is already as wide as its row lets it\n // be, and a min-width past that would push it over the edge just the same.\n if (!r.width || (label && (label.scrollWidth > label.clientWidth || labelWraps(label)))) return null;\n const width = Math.round(r.width * 64) / 64;\n const target = snappedChipEdgeWidth(width, r.left + window.scrollX, dpr);\n return target === width ? null : target;\n });\n const next: HTMLElement[] = [];\n pending.forEach((el, i) => {\n const target = reads[i];\n if (target == null) return;\n if (pass === n) {\n clearOwn(el);\n return;\n }\n const own = written.get(el);\n const value = `${pass > 0 && own !== undefined ? parseFloat(own) + 1 : target}px`;\n el.style.minWidth = value;\n written.set(el, value);\n next.push(el);\n });\n pending = next;\n }\n}\n\n/** Whether a chip's label runs to more than one line — taller than one and a half of\n * its line height. A line height of `normal` (no number to compare) counts as one line. */\nfunction labelWraps(label: HTMLElement): boolean {\n const line = Number.parseFloat(getComputedStyle(label).lineHeight);\n return line > 0 && label.clientHeight > 1.5 * line;\n}\n\nfunction scheduleChipEdges() {\n if (snapFrame || typeof requestAnimationFrame === \"undefined\") return;\n snapFrame = requestAnimationFrame(() => {\n snapFrame = 0;\n refreshChipEdges();\n });\n}\n\n/** The resolution query for the CURRENT ratio: it stops matching when the ratio\n * changes (a window dragged to another display), which a `resize` need not fire. */\nfunction watchRatio() {\n ratioQuery?.removeEventListener(\"change\", onRatioChange);\n ratioQuery =\n typeof window.matchMedia === \"function\"\n ? window.matchMedia(`(resolution: ${window.devicePixelRatio || 1}dppx)`)\n : null;\n ratioQuery?.addEventListener(\"change\", onRatioChange);\n}\n\nfunction onRatioChange() {\n watchRatio();\n scheduleChipEdges();\n}\n\nfunction registerSnap(el: HTMLElement) {\n if (snapped.has(el)) return;\n if (!snapped.size) {\n if (typeof ResizeObserver !== \"undefined\") snapObserver = new ResizeObserver(scheduleChipEdges);\n window.addEventListener(\"resize\", scheduleChipEdges);\n watchRatio();\n }\n snapped.add(el);\n snapObserver?.observe(el);\n scheduleChipEdges();\n}\n\nfunction unregisterSnap(el: HTMLElement) {\n if (!snapped.delete(el)) return;\n snapObserver?.unobserve(el);\n clearOwn(el);\n if (snapped.size) return;\n snapObserver?.disconnect();\n snapObserver = null;\n window.removeEventListener(\"resize\", scheduleChipEdges);\n ratioQuery?.removeEventListener(\"change\", onRatioChange);\n ratioQuery = null;\n}\n\n/** The ref a chip hangs on its visible pill, plus a re-snap after every render (its\n * label or its neighbours may have changed). */\nfunction useSnapEdges(on: boolean) {\n const node = useRef<HTMLElement | null>(null);\n const ref = useCallback(\n (el: HTMLElement | null) => {\n if (el === node.current) return;\n const prev = node.current;\n node.current = el;\n // React detaches and re-attaches a ref whose callback changed identity (a\n // consumer's inline ref) — the same element, a moment apart. Unregistering on\n // the detach would clear the pin and paint one frame unsnapped, so the drop\n // waits a microtask and is skipped if the element came straight back.\n if (prev) queueMicrotask(() => node.current !== prev && unregisterSnap(prev));\n if (el && on) registerSnap(el);\n },\n [on],\n );\n useLayoutEffect(() => {\n const el = node.current;\n if (!el) return;\n if (on) {\n registerSnap(el);\n scheduleChipEdges();\n } else unregisterSnap(el);\n });\n return ref;\n}\n\nfunction assignRef<T>(target: Ref<T> | undefined, value: T | null) {\n if (typeof target === \"function\") target(value);\n else if (target) (target as { current: T | null }).current = value;\n}\n\nconst CHIP_PILL = \"inline-flex max-w-full items-center rounded-full border transition-colors\";\n\n// `focus-visible`, not `focus`: a chip commonly receives focus programmatically (the\n// ChipInput moves focus onto one after a removal) and a ring that appears on a\n// pointer click reads as a stuck selection.\nconst CHIP_RING = `${FOCUS_RING} focus-visible:ring-offset-1 focus-visible:ring-offset-[var(--bg-surface)]`;\nconst CHIP_BASE = `${CHIP_PILL} ${CHIP_RING}`;\n\n/**\n * A text chip's label at Large and Extra large (0.32.1, keksdose's 0.32 report;\n * docs/text-size-harmonization.md §4 \"nothing truncates\"): it wraps instead of ending in\n * \"…\". keksdose's \"Zur Prüfung zurücklegen\" read \"Zur Prüfung zu…\" on a phone at Extra\n * large, which is a different instruction. No size has a fixed height (padding and\n * `min-h-*` only), so the pill grows with its lines; the mark before the text stays\n * centred on them, as in a pill. A `large:` rule, so Normal keeps its one-line chip.\n *\n * 0.33 (§10.17): the kit's one `truncate-until-large` (tokens.css) in place of this\n * file's own `truncate` + `large:whitespace-normal large:break-words`, as StatusDot's\n * label took it. The utility breaks with `overflow-wrap: anywhere`, which lowers the\n * label's min-content width to one letter: a status chip in an auto-sized table column\n * wants the column given a width at Large, or it is squeezed to a letter per line\n * (StatusDot's label was, in the showcase's tone table at 360 px, Extra large).\n */\nconst CHIP_LABEL_TRUNCATE = \"truncate-until-large\";\n\n/**\n * An interactive chip's touch target at Large and Extra large (docs/text-size-harmonization.md\n * §4: \"touch targets at least 48 px … for buttons, inputs, chips\"): a link or toggle chip\n * grows its pill to 48 px, as Button `sm` does, and centres what is in it once the\n * minimum width is what sizes it. An inert chip (a tag on a row) is no target and keeps\n * its size; a disabled one is no target either.\n */\nconst CHIP_TOUCH_LARGE = `${TOUCH_TARGET_LARGE} large:justify-center`;\n\n/**\n * The ×'s 48 px hit area at Large (§4) — IconButton's `2xs` pattern: a box that cannot\n * grow without growing the chip around it keeps its size and gets an invisible\n * `::after`, 48 px square and centred on it, which takes the taps a finger lands round\n * the glyph. On an inert removable chip (ChipInput's values) the × is the only target.\n */\nconst REMOVE_HIT_AREA_LARGE =\n \"relative large:after:absolute large:after:inset-[calc((100%-48px)/2)] large:after:content-['']\";\n\ninterface ChipBaseProps {\n children: ReactNode;\n tone?: ChipTone;\n size?: ChipSize;\n /** See {@link ChipVariant}. Default `soft`. */\n variant?: ChipVariant;\n /** See {@link ChipShape}. Default `pill`. */\n shape?: ChipShape;\n /**\n * The uppercase, tracked \"status badge\" type — keksdose's ~25 PAID / DRAFT /\n * OVERDUE / ADMIN badges, each spelling `uppercase tracking-wide text-[10px]` by\n * hand. A flag rather than a fourth `variant` because it is TYPE, not surface: a\n * status badge is soft, outlined or solid as the row needs, and a `variant=\"tag\"`\n * would have had to pick one. Screen readers read the text as written, not as\n * drawn, so write it in normal case.\n */\n caps?: boolean;\n /**\n * The leading glyph: a lucide component (`icon={Check}`, drawn at the chip's size), or\n * — since 0.15.4 — a ready element (`icon={<Check className=\"text-[var(--success)]\" />}`)\n * for a glyph whose colour or stroke carries a state; it is sized to the same box\n * (keksdose live #358 built that slot by hand inside `children`).\n */\n icon?: LucideIcon | ReactElement;\n /**\n * Marks the chip as the current one — `aria-current` on a link, `aria-pressed` on a\n * toggle.\n *\n * On an ON/OFF toggle, keep the LABEL the same in both states and let `selected`\n * carry the state. A label that flips with it (\"Skip this month\" / \"Ask again this\n * month\") is announced together with \"pressed\", and then says the opposite of what\n * it does.\n *\n * A control that switches between two NAMED states (outflow ⇄ inflow) is not a\n * toggle but an ACTION button: leave `selected` out, let the visible label and the\n * tone follow the state (\"− Outflow\" / \"+ Inflow\"), and name the action in\n * `aria-label` (\"Direction: outflow — tap for inflow\"). Without `selected` the chip\n * reports no pressed state at all. A fixed label there contradicts the figure beside\n * it — \"+ Outflow\" in green next to an inflow (keksdose #417).\n */\n selected?: boolean;\n /**\n * Checkbox mode (0.10.0), for a toggle chip (`onClick` + `selected`): a small box\n * at the start that shows a tick when `selected`, and the button reports\n * `role=\"checkbox\"` + `aria-checked` instead of `aria-pressed`. For a set of\n * include/exclude choices where \"on\" must read as TICKED, not merely tinted —\n * keksdose's add-group-card (the \"which categories come along\" pills), which put a\n * real `<Checkbox>` inside a `<label>` pill by hand. The box is drawn in both\n * states so ticking one never shifts its label.\n */\n checkbox?: boolean;\n /** Renders a dismiss affordance. Works alongside `href`/`onClick` — see the note below. */\n onRemove?: () => void;\n /** Accessible name for the dismiss button. Default: `common.remove` from the\n * {@link UiKitProvider}, else \"Remove\". */\n removeLabel?: string;\n /** Disables the × ONLY — the chip itself stays a working link or toggle. For the\n * value that may not be removed right now (the last filter of a required set, a\n * tag the user may read but not edit) where `disabled` would also kill the chip's\n * own action. */\n removeDisabled?: boolean;\n disabled?: boolean;\n className?: string;\n /**\n * Roving focus, for a container that manages a row of chips (see {@link ChipInput}).\n * A chip with no `href`/`onClick` is inert and unfocusable by default; give it a\n * `tabIndex` and a `role` and it becomes the thing arrow keys move between.\n */\n tabIndex?: number;\n role?: string;\n onKeyDown?: (e: KeyboardEvent<HTMLElement>) => void;\n onFocus?: () => void;\n /** Accessible name, when the visible text is not the whole story. */\n \"aria-label\"?: string;\n /** Any other ARIA attribute — `aria-describedby`, `aria-expanded`, `aria-controls`,\n * `aria-haspopup` — reaches the chip's interactive element. */\n [key: `aria-${string}`]: string | boolean | number | undefined;\n /** A test id, a `data-tour` anchor, or any other data attribute. */\n [key: `data-${string}`]: unknown;\n id?: string;\n /** A native tooltip. For anything a user must read, prefer the kit's `Tooltip`. */\n title?: string;\n /**\n * Even hairlines on fractional-ratio displays (0.18.0). At a device-pixel ratio of\n * 1.25 — a 125 % Windows display, or 125 % zoom — Chrome draws a chip's two 1px\n * side borders on different sub-pixel phases, one crisp and one a half-strength\n * smear that reads as a thinner line (worst on the 60 %-alpha `danger` border).\n * `snapEdges` widens the chip by under 4px, from where it sits, so the two edges\n * rasterise as mirror images, and centres its content in the extra.\n *\n * Off by default: it reads the chip's position (batched for every snapped chip into\n * one pass a frame, through one shared observer), and the fix is only as fresh as the\n * last pass — it re-snaps on render, resize, zoom and ratio change, but not when\n * something else moves the chip; call {@link refreshChipEdges} then. At an integer\n * ratio, and at 1.5, it writes nothing. Turn it on for status chips that sit in a\n * column and are compared side by side; a chip with no visible border (`dot`) has\n * nothing to snap.\n */\n snapEdges?: boolean;\n}\n\n/**\n * A chip is a link OR a button, never both — so the types say so. Before 0.7.0 both were\n * accepted and `onClick` was silently dropped whenever `href` was set. A LINK may still\n * run code on its way (close the menu it sits in): that is an `onClick` typed for the\n * anchor, on the link shape, and the pill stays a link — no `aria-pressed`, no button.\n * That shape wants a definite `href` string, so a bare `onClick` is always the\n * button's, with a button's event.\n */\nexport type ChipProps = ChipBaseProps &\n (\n | {\n /** Renders the chip as a link. */\n href?: string;\n onClick?: never;\n /**\n * Renders the link for `href` — pass your router's `<Link>` here, since a\n * plain `<a>` reloads a single-page app (keksdose's account-menu admin pill).\n * Default: the `<UiKitProvider linkComponent>`, then `<a>`. Ignored without\n * `href`.\n *\n * A render function rather than an `as={Link}`, for three reasons. It is the\n * API `StatTile` already has (`renderLink`), so a consumer learns it once.\n * Router links do not take `href` — react-router's takes `to` — so an `as`\n * would either have to pass props through untyped or teach the kit about one\n * router; here the caller maps `href` onto its own link in one line, fully\n * typed. And it keeps `href` as THE link prop, which is what the `href` /\n * `onClick` exclusion below is typed on: the pill is a link because it has an\n * href, whichever element draws it.\n */\n renderLink?: (props: ChipLinkProps) => ReactElement;\n commit?: never;\n disabledReason?: never;\n disabledReasonDisplay?: never;\n }\n | {\n /** The link shape again, with an `onClick`. `href` is a required string here,\n * which is what lets TypeScript tell this shape from the button's: a bare\n * `onClick` can only be the button's, and keeps its button event. */\n href: string;\n /** Runs on the link's click, before the navigation — keksdose's admin pill\n * closes the account menu with it. Reaches a `renderLink` link as\n * {@link ChipLinkProps.onClick}. Not called on a disabled chip, which renders\n * no link. */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n /** See the link shape above. */\n renderLink?: (props: ChipLinkProps) => ReactElement;\n commit?: never;\n disabledReason?: never;\n disabledReasonDisplay?: never;\n }\n | {\n href?: never;\n renderLink?: never;\n /** Renders the chip as a toggle button. Mutually exclusive with `href`. Receives\n * the click, so a chip inside a clickable row can `stopPropagation()`. */\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n /**\n * Why the toggle cannot be pressed right now — {@link Button}'s\n * `disabledReason`, on the chip's button shape (keksdose K3: a filter or flag\n * chip that saves on press, under a read-only lock). The chip stays focusable\n * and `aria-disabled`, a press (and its `onRemove` ×) does nothing, and the\n * reason describes the chip — as a line under it at Large and on a touch\n * screen, in the kit {@link Tooltip} otherwise (see `disabledReasonDisplay`).\n * Wins over `disabled`. A link chip navigates rather than commits, so it takes\n * neither this nor `commit`; an inert chip has nothing to refuse.\n */\n disabledReason?: ReactNode;\n /**\n * Where `disabledReason` shows (0.32, docs/text-size-harmonization.md §4 \"No fact\n * only in a tooltip\") — {@link Button}'s `disabledReasonDisplay`: by default a line\n * under the chip at Large and Extra large and on a touch screen, where a bubble\n * cannot be hovered open, and the tooltip otherwise and inside\n * `CompactControls`. `\"line\"` / `\"tooltip\"` force one. See\n * {@link DisabledReasonDisplay}.\n */\n disabledReasonDisplay?: DisabledReasonDisplay;\n /** This chip COMMITS — pressing it saves. Under a locked\n * {@link WriteLockProvider} it takes the `disabledReason` path with the lock's\n * reason, as {@link Button}'s `commit` does. */\n commit?: CommitScope;\n }\n );\n\n/**\n * Note on `onRemove` with `href`/`onClick`: a button cannot be nested inside a button or\n * a link, so when both are present the chip renders a wrapper holding TWO siblings — the\n * interactive body and the dismiss control. The WRAPPER is the visual pill (border, tone,\n * `className`) and the two sit inside it, so the × reads as part of the chip; the body's\n * focus ring is drawn on the body alone, and `ref`, `id` and the ARIA props still reach\n * the body — the interactive element.\n */\nexport const Chip = forwardRef<HTMLElement, ChipProps>(function Chip(\n {\n children,\n tone = \"neutral\",\n size = \"md\",\n variant = \"soft\",\n shape = \"pill\",\n caps = false,\n icon: Icon,\n selected,\n checkbox = false,\n href,\n renderLink,\n onClick,\n onRemove,\n removeLabel,\n removeDisabled = false,\n disabled = false,\n className,\n tabIndex,\n role,\n onKeyDown,\n onFocus,\n snapEdges = false,\n disabledReason: ownDisabledReason,\n disabledReasonDisplay,\n commit,\n ...rest\n },\n ref,\n) {\n const common = useKitLabels(\"common\", DEFAULT_COMMON_LABELS, { remove: removeLabel });\n const reasonId = useId();\n const disabledReason = useCommitReason(commit, ownDisabledReason);\n // Only the BUTTON shape commits: a link navigates, an inert chip does nothing.\n const locked = Boolean(onClick) && !href && hasReason(disabledReason);\n const kitLink = useKitLink();\n const s = SIZE[size];\n const interactive = !!href || !!onClick;\n // One radius for every rounded piece — the pill, the body inside a split pill, the ×\n // — so a square chip has no round focus ring inside it.\n const radius =\n shape === \"square\" ? (size === \"sm\" || size === \"xs\" ? \"rounded\" : \"rounded-md\") : \"rounded-full\";\n const dot = variant === \"dot\";\n const type = cn(caps && CAPS[size], variant === \"solid\" && \"justify-center tabular-nums\");\n const surface = cn(\n surfaceOf(tone, variant, selected),\n // A reason wins over `disabled`: the focusable kind of disabled, with the cursor\n // that says \"refused\" rather than \"nothing here\".\n disabled && !locked && \"cursor-default opacity-50\",\n locked && \"cursor-not-allowed opacity-50\",\n );\n const snap = snapEdges && !dot;\n // A finger's target at Large (§4): what can be pressed, refused or not — see\n // CHIP_TOUCH_LARGE. A disabled link renders as the inert span below and is none.\n const target = interactive && (!disabled || locked);\n const snapRef = useSnapEdges(snap);\n // The visible pill carries the snap: the whole chip, or the wrapper of a split one\n // (whose body gets the forwarded ref instead).\n const ownRef = useCallback(\n (el: HTMLElement | null) => {\n snapRef(el);\n assignRef(ref, el);\n },\n [snapRef, ref],\n );\n const look = cn(\n CHIP_BASE,\n s.body,\n type,\n radius,\n surface,\n interactive && !disabled && !locked && \"cursor-pointer hover:brightness-[0.97] dark:hover:brightness-110\",\n // §4: a link or toggle is a 48 px target at Large — a locked one too, since it is\n // still focusable and still says why when pressed.\n target && CHIP_TOUCH_LARGE,\n // An inert dot chip is text in a column: no inset, so it aligns with the header.\n dot && !interactive && \"px-0\",\n // The under-4px a snap adds is split between the two sides, not stacked at the end.\n snap && \"justify-center\",\n className,\n );\n\n // The checkbox box, only on the toggle shape it has meaning on.\n const isCheckbox = checkbox && !!onClick && !href;\n const body = (\n <>\n {isCheckbox && (\n <span\n aria-hidden\n data-chip-check=\"\"\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-sm border\",\n s.icon,\n selected ? \"border-current bg-current/15\" : \"border-current/50\",\n )}\n >\n {selected && <Check className=\"size-full\" strokeWidth={3} />}\n </span>\n )}\n {dot && <span aria-hidden data-chip-dot=\"\" className={cn(\"shrink-0 rounded-full\", DOT_SIZE[size], DOT[tone])} />}\n {Icon &&\n (isValidElement(Icon) ? (\n <span aria-hidden className={cn(s.icon, \"inline-flex shrink-0 [&>svg]:size-full\")}>\n {Icon}\n </span>\n ) : (\n <Icon className={cn(s.icon, \"shrink-0\")} aria-hidden />\n ))}\n {/* Text truncates at Normal and wraps at Large (CHIP_LABEL_TRUNCATE). Mixed\n children (an icon and a word) sit in a row instead: as a plain span, the svg —\n a block under Tailwind's preflight — stacked above the text (keksdose live\n #358). */}\n <span\n className={cn(\n \"min-w-0\",\n typeof children === \"string\" || typeof children === \"number\"\n ? CHIP_LABEL_TRUNCATE\n : \"inline-flex items-center gap-1 [&>svg]:size-[1em] [&>svg]:shrink-0\",\n )}\n >\n {children}\n </span>\n </>\n );\n\n const remove = onRemove ? (\n <button\n type=\"button\"\n // The name carries WHAT is being removed, not just \"Remove\" — a screen-reader user\n // tabbing a row of eight dismiss buttons otherwise hears the same word eight times\n // with no way to tell which one they are on.\n // Composed through `common.fieldValue` because the punctuation between the two\n // halves is the language's, not ours. A chip whose content is not plain text\n // has no value to name, and gets the bare verb rather than a dangling colon.\n aria-label={\n typeof children === \"string\" && children\n ? common.fieldValue(common.remove, children)\n : common.remove\n }\n onClick={(e) => {\n // The chip may itself be a link; removing it must not also follow it.\n e.preventDefault();\n e.stopPropagation();\n // Removing a value from a chip that commits is a commit too.\n if (locked) return;\n onRemove();\n }}\n disabled={(disabled && !locked) || removeDisabled}\n aria-disabled={locked || undefined}\n aria-describedby={locked ? reasonId : undefined}\n className={cn(\n // Logical margins: the × sits at the END of the pill, which is the left in RTL.\n \"-me-0.5 ms-0.5 shrink-0 p-0.5 transition-colors\",\n shape === \"square\" ? \"rounded-sm\" : \"rounded-full\",\n FOCUS_RING,\n // §4: the × is a 48 px target at Large without growing the chip around it.\n REMOVE_HIT_AREA_LARGE,\n !locked && \"hover:bg-[var(--bg-active)]\",\n locked && \"cursor-not-allowed\",\n ((disabled && !locked) || removeDisabled) && \"pointer-events-none\",\n // A disabled chip is already dimmed as a whole; dimming the × again on top\n // would take it to a quarter. `removeDisabled` alone dims just the ×.\n removeDisabled && !disabled && \"opacity-40\",\n )}\n >\n <X className={s.remove} aria-hidden />\n </button>\n ) : null;\n\n // ── The combined shape: one pill, two interactive siblings inside it.\n const pill = (inner: ReactNode) => (\n <span\n ref={snap ? snapRef : undefined}\n // The pill is the target's box here (§4): the body inside stretches to its height.\n className={cn(CHIP_PILL, s.tail, radius, surface, target && CHIP_TOUCH_LARGE, snap && \"justify-center\", className)}\n >\n {inner}\n {remove}\n </span>\n );\n // The body inside a pill: no border or surface of its own (the pill has them), a\n // hover wash in the text's own hue so it works on every tone.\n const inner = cn(\n \"inline-flex min-w-0 items-center self-stretch transition-colors\",\n radius,\n CHIP_RING,\n s.split,\n type,\n !disabled && !locked && \"cursor-pointer hover:bg-current/10\",\n disabled && !locked && \"cursor-default\",\n locked && \"cursor-not-allowed\",\n );\n\n // ── The three shapes.\n if (href && !disabled) {\n // On this shape `onClick` is the link shape's, typed for the anchor.\n const onLinkClick = onClick as ChipLinkProps[\"onClick\"];\n const linkProps: ChipLinkProps = {\n ...rest,\n ref: (remove ? ref : ownRef) as Ref<HTMLAnchorElement>,\n href,\n onClick: onLinkClick,\n \"aria-current\": selected ? \"true\" : undefined,\n className: remove ? inner : look,\n children: body,\n };\n const render = pickLinkRenderer(renderLink, kitLink, href);\n const link = render ? (\n // Through a component rather than called here, so the forwarded ref arrives as\n // an ordinary prop of an element and is never handed to a function mid-render.\n <RenderedLink render={render} {...linkProps} />\n ) : (\n <a\n ref={(remove ? ref : ownRef) as React.Ref<HTMLAnchorElement>}\n href={href}\n aria-current={selected ? \"true\" : undefined}\n onClick={onLinkClick}\n className={remove ? inner : look}\n {...rest}\n >\n {body}\n </a>\n );\n return remove ? pill(link) : link;\n }\n\n // `!href`: a DISABLED link renders no link, and its link-shaped `onClick` must not\n // turn it into a button instead — it falls through to the inert span, as before.\n if (onClick && !href) {\n const onButtonClick = onClick as (event: MouseEvent<HTMLButtonElement>) => void;\n const ownDescribedBy = rest[\"aria-describedby\"];\n const button = (\n <button\n ref={(remove ? ref : ownRef) as React.Ref<HTMLButtonElement>}\n type=\"button\"\n onClick={(e) => {\n // Locked: the press is swallowed — the chip saves on press, and a lock that\n // let it through would toggle a state that is never stored.\n if (locked) {\n e.preventDefault();\n return;\n }\n onButtonClick(e);\n }}\n disabled={disabled && !locked}\n // Only when `selected` is PASSED: a chip with `onClick` and no `selected` is an\n // action button (it does something), not a toggle (it is on or off), and\n // announcing it \"not pressed\" would claim a state it does not have.\n // A checkbox chip says \"checked\", not \"pressed\" — the same state in the words\n // of the control it looks like.\n role={isCheckbox ? \"checkbox\" : undefined}\n aria-pressed={isCheckbox ? undefined : selected}\n aria-checked={isCheckbox ? !!selected : undefined}\n className={remove ? inner : look}\n {...rest}\n // After the spread, merged with it: the lock's state and reason are not the\n // caller's to drop by passing an `aria-describedby` of their own.\n aria-disabled={locked || (rest[\"aria-disabled\"] as boolean | \"true\" | \"false\" | undefined)}\n aria-describedby={\n locked ? [ownDescribedBy, reasonId].filter(Boolean).join(\" \") : (ownDescribedBy as string | undefined)\n }\n >\n {body}\n </button>\n );\n const shaped = remove ? pill(button) : button;\n if (!locked) return shaped;\n return (\n <ChipReasonFrame reason={disabledReason} reasonId={reasonId} display={disabledReasonDisplay}>\n {shaped}\n </ChipReasonFrame>\n );\n }\n\n return (\n /* eslint-disable-next-line jsx-a11y/no-static-element-interactions -- the handlers are\n the roving-focus hooks, live only when the container passes `role` and `tabIndex`\n (ChipInput does); the role is a prop, so the rule cannot see it. */\n <span\n ref={ownRef as React.Ref<HTMLSpanElement>}\n className={look}\n tabIndex={tabIndex}\n role={role}\n onKeyDown={onKeyDown}\n onFocus={onFocus}\n {...rest}\n >\n {body}\n {remove}\n </span>\n );\n});\n\n/**\n * A locked chip and its reason (0.32, docs/text-size-harmonization.md §4): a line under\n * the chip at Large and on touch, else the kit {@link Tooltip} — Button's `ReasonFrame`,\n * see {@link DisabledReasonDisplay}. A component of its own so only a LOCKED chip asks\n * the text size and the pointer; the unlocked chips of a filter row subscribe to nothing.\n *\n * Tooltip form: the chip in a FRAGMENT, as a locked Button is — the bubble is visual, and\n * the hidden copy beside it is what the chip (and its ×) is described by. Line form: the\n * line is that description, under the chip, and no bubble repeats it.\n */\nfunction ChipReasonFrame({\n reason,\n reasonId,\n display,\n children,\n}: {\n reason: ReactNode;\n reasonId: string;\n display: DisabledReasonDisplay | undefined;\n children: ReactNode;\n}) {\n const line = useDisabledReasonLine(display);\n if (line) {\n return (\n <DisabledReasonLine id={reasonId} reason={reason}>\n {children}\n </DisabledReasonLine>\n );\n }\n return (\n <Tooltip label={reason}>\n <>\n {children}\n <span id={reasonId} hidden>\n {reason}\n </span>\n </>\n </Tooltip>\n );\n}\n\n/** `null`, `false` and `\"\"` are what a `cond && reason` gives on the happy path — no\n * reason, so no lock. */\nfunction hasReason(node: ReactNode): boolean {\n return node !== undefined && node !== null && node !== false && node !== \"\";\n}\n\n/** Calls a chip's `renderLink` with the props it was given — see its call site. */\nfunction RenderedLink({\n render,\n ...props\n}: ChipLinkProps & { render: (props: ChipLinkProps) => ReactElement }) {\n return render(props);\n}\n\n/* ── ChipInput ────────────────────────────────────────────────────────────── */\n\nexport interface ChipInputLabels {\n /** Announced after a value is added. Receives the value. */\n added: (value: string) => string;\n /** Announced after a value is removed. Receives the value. */\n removed: (value: string) => string;\n /** Accessible name for each chip's dismiss button. */\n remove: string;\n /** Shown when `max` is reached. Receives the limit. */\n atLimit: (max: number) => string;\n /** Shown when a duplicate is rejected. Receives the value. */\n duplicate: (value: string) => string;\n}\n\nexport const DEFAULT_CHIP_INPUT_LABELS: ChipInputLabels = {\n added: (v) => `${v} added`,\n removed: (v) => `${v} removed`,\n remove: \"Remove\",\n atLimit: (max) => `Limit of ${max} reached`,\n duplicate: (v) => `${v} is already in the list`,\n};\n\nexport function resolveChipInputLabels(labels?: Partial<ChipInputLabels>): ChipInputLabels {\n return labels ? { ...DEFAULT_CHIP_INPUT_LABELS, ...labels } : DEFAULT_CHIP_INPUT_LABELS;\n}\n\n/**\n * `onChange` is the field's own — the whole LIST, not a DOM event — so the wrapper\n * div's `onChange` is omitted rather than shadowed. `placeholder` is likewise this\n * component's, forwarded to the inner `<input>`; the div has none of its own.\n */\nexport interface ChipInputProps\n extends Omit<ComponentPropsWithoutRef<\"div\">, \"onChange\" | \"placeholder\" | \"children\"> {\n value: string[];\n onChange: (next: string[]) => void;\n placeholder?: string;\n /** Visible label, rendered above the field. Without one, name the field with\n * `aria-label`. */\n label?: string;\n /**\n * @deprecated Pass `aria-label` instead — the DOM spelling the rest of this kit\n * now uses. Still honoured, and still second to `aria-label` when both are given.\n */\n ariaLabel?: string;\n /** Reject or rewrite a value on commit. Return a string to reject WITH that message. */\n validate?: (raw: string) => string | null;\n /** Characters that commit the current text, besides Enter. Default: comma. */\n separators?: string[];\n allowDuplicates?: boolean;\n max?: number;\n tone?: ChipTone;\n size?: ChipSize;\n disabled?: boolean;\n invalid?: boolean;\n /** Error text. Wires `aria-describedby` and implies `invalid`. */\n error?: ReactNode;\n labels?: Partial<ChipInputLabels>;\n className?: string;\n}\n\n/**\n * A field whose value is a LIST, entered as chips.\n *\n * The keyboard model is the whole component; the pills are the easy part. Per the WAI\n * pattern for a \"tag\" input:\n *\n * Enter, or any separator commit the typed text\n * Backspace on empty text move focus to the last chip (does NOT delete it)\n * ← → while on a chip move between chips, in reading order (mirrored in RTL)\n * Backspace / Delete remove the focused chip, focus its neighbour\n * Escape clear what is typed but keep the committed chips\n * paste splits on the separators, so a pasted CSV becomes chips\n *\n * The Backspace-on-empty behaviour is the one worth arguing about. Deleting immediately\n * is more common and is a trap: it is a destructive action with no feedback on a key\n * people hit by reflex, and the value it destroys may have taken a while to type. Moving\n * focus first makes the second Backspace a deliberate one, and it is what lets a\n * keyboard user reach a chip at all.\n */\nexport function ChipInput({\n value,\n onChange,\n placeholder,\n label,\n ariaLabel,\n validate,\n separators = [\",\"],\n allowDuplicates = false,\n max,\n tone = \"neutral\",\n size = \"md\",\n disabled = false,\n invalid = false,\n error,\n labels,\n className,\n \"aria-label\": ariaLabelAttr,\n ...rest\n}: ChipInputProps) {\n // `labels` over the provider's `chipInput` over English — the same order\n // `resolveChipInputLabels` gives outside a provider.\n const text = useKitLabels(\"chipInput\", DEFAULT_CHIP_INPUT_LABELS, labels);\n // A batch of pasted values is announced as one list, joined the way the language\n // joins a list in a sentence (\"a, b and c added\") — hence the long conjunction,\n // where a trigger's summary would use the narrow one.\n const locale = useKitLocale();\n const [draft, setDraft] = useState(\"\");\n const [message, setMessage] = useState(\"\");\n // The last refusal, shown under the field until the next edit. The live region alone\n // told only a screen-reader user why Enter did nothing; everyone else saw the text\n // simply stay put.\n const [rejected, setRejected] = useState<string | null>(null);\n const [focusedChip, setFocusedChip] = useState<number | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const chipRefs = useRef<Array<HTMLElement | null>>([]);\n const id = useId();\n const listId = `${id}-list`;\n const errorId = `${id}-error`;\n const rejectedId = `${id}-rejected`;\n const isInvalid = invalid || !!error;\n const describedBy = [error ? errorId : null, rejected ? rejectedId : null]\n .filter(Boolean)\n .join(\" \");\n\n const focusChip = (index: number | null) => {\n setFocusedChip(index);\n if (index === null) inputRef.current?.focus();\n else chipRefs.current[index]?.focus();\n };\n\n /**\n * Try to add every candidate, as ONE change.\n *\n * Batched rather than looped for a reason that bites immediately: `commit` closes over\n * `value`, so calling it once per pasted item makes every call compute its result from\n * the list as it was BEFORE the paste, and each `onChange` overwrites the last. A\n * pasted \"one,two,three\" left only \"three\". Accumulating locally and emitting once is\n * also the correct behaviour for an undo stack — a paste is one action.\n */\n const commitMany = (raws: string[]): { added: string[]; rejection: string | null } => {\n const next = [...value];\n const added: string[] = [];\n let rejection: string | null = null;\n\n for (const raw of raws) {\n const candidate = raw.trim();\n if (!candidate) continue;\n if (max !== undefined && next.length >= max) {\n rejection ??= text.atLimit(max);\n break;\n }\n if (!allowDuplicates && next.includes(candidate)) {\n rejection ??= text.duplicate(candidate);\n continue;\n }\n const invalidReason = validate?.(candidate);\n if (invalidReason) {\n rejection ??= invalidReason;\n continue;\n }\n next.push(candidate);\n added.push(candidate);\n }\n\n if (added.length) onChange(next);\n // A rejection is the more useful thing to say: \"three added\" is obvious from the\n // chips appearing, whereas \"already in the list\" is the only sign of what did not.\n const addedList = new Intl.ListFormat(locale, { type: \"conjunction\", style: \"long\" });\n setMessage(rejection ?? (added.length ? text.added(addedList.format(added)) : \"\"));\n setRejected(rejection);\n return { added, rejection };\n };\n\n const commit = (raw: string): boolean => commitMany([raw]).added.length > 0;\n\n const removeAt = (index: number) => {\n const removed = value[index];\n onChange(value.filter((_, i) => i !== index));\n setMessage(text.removed(removed));\n setRejected(null);\n // Focus the neighbour that takes its place, or the input when the list empties —\n // dropping focus to <body> here is how a keyboard user loses the field entirely.\n const next = index >= value.length - 1 ? null : index;\n requestAnimationFrame(() => focusChip(value.length - 1 === 0 ? null : next));\n };\n\n const onInputKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Enter\") {\n // Only when there is something to commit: an empty Enter belongs to the form.\n if (draft.trim()) {\n e.preventDefault();\n if (commit(draft)) setDraft(\"\");\n }\n return;\n }\n if (separators.includes(e.key)) {\n e.preventDefault();\n if (commit(draft)) setDraft(\"\");\n return;\n }\n if (e.key === \"Escape\" && draft) {\n e.preventDefault();\n setDraft(\"\");\n return;\n }\n if (e.key === \"Backspace\" && !draft && value.length) {\n e.preventDefault();\n focusChip(value.length - 1);\n }\n };\n\n const onChipKeyDown = (e: KeyboardEvent<HTMLElement>, index: number) => {\n if (e.key === \"Backspace\" || e.key === \"Delete\") {\n e.preventDefault();\n removeAt(index);\n return;\n }\n // ←/→ follow the reading direction, not DOM order: in RTL the previous chip is to\n // the RIGHT, and ArrowLeft moves on towards the input.\n const step = horizontalStep(e.key, e.currentTarget);\n if (step === -1 && index > 0) {\n e.preventDefault();\n focusChip(index - 1);\n return;\n }\n if (step === 1) {\n e.preventDefault();\n focusChip(index === value.length - 1 ? null : index + 1);\n return;\n }\n if (e.key === \"Escape\") {\n e.preventDefault();\n focusChip(null);\n }\n };\n\n return (\n // The rest lands on the OUTER box — the thing a `data-tour` step or a test id\n // wants to point at — while the accessible name below goes on the `<input>`,\n // because that is what a screen-reader user actually lands in. Spreading the two\n // to the same element would have named a decorative wrapper and left the field\n // anonymous.\n <div {...rest} className={cn(\"space-y-1\", className)}>\n {label && (\n <label htmlFor={`${id}-input`} className=\"block text-sm text-[var(--text-secondary)]\">\n {label}\n </label>\n )}\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- a\n pointer convenience that widens the input's hit area to the whole field; the\n keyboard path is the <input> itself, which is in the tab order. */}\n <div\n // `relative` so the live region below can be `sr-only` without escaping to the\n // initial containing block and inflating the document height.\n className={cn(\n \"relative flex flex-wrap items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--bg-surface)] px-2 py-1.5 shadow-sm\",\n \"focus-within:border-[var(--brand)] focus-within:ring-1 focus-within:ring-[var(--brand)]\",\n disabled && \"cursor-default bg-[var(--bg-surface-2)]\",\n isInvalid && FIELD_INVALID,\n )}\n onClick={() => !disabled && inputRef.current?.focus()}\n >\n {/* `display: contents` on the wrappers so the chips participate in the field's\n own flex wrap rather than forming a nested row. The list semantics are\n restored with explicit roles, because `contents` removes the ul/li boxes from\n the accessibility tree in several engines. */}\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- NOT redundant here: the\n `contents` display below removes the ul and li boxes from the box tree, and\n several engines drop the list semantics with them. The explicit role is what\n puts \"list, 3 items\" back. */}\n <ul id={listId} role=\"list\" className=\"contents\">\n {value.map((v, i) => (\n <li key={`${v}-${i}`} role=\"presentation\" className=\"contents\">\n <Chip\n ref={(el: HTMLElement | null) => {\n chipRefs.current[i] = el;\n }}\n tone={tone}\n size={size}\n disabled={disabled}\n removeLabel={text.remove}\n onRemove={disabled ? undefined : () => removeAt(i)}\n // A ROVING tabIndex: only the focused chip is tabbable, so Tab leaves\n // the field instead of walking through every value in it — the reason a\n // list of twenty tags is otherwise a twenty-stop detour for a keyboard.\n tabIndex={focusedChip === i ? 0 : -1}\n role=\"listitem\"\n aria-label={v}\n onKeyDown={(e) => onChipKeyDown(e, i)}\n onFocus={() => setFocusedChip(i)}\n data-chip-index={i}\n >\n {v}\n </Chip>\n </li>\n ))}\n </ul>\n <input\n id={`${id}-input`}\n ref={inputRef}\n value={draft}\n onChange={(e) => {\n setDraft(e.target.value);\n setMessage(\"\");\n setRejected(null);\n }}\n onKeyDown={onInputKeyDown}\n onBlur={() => {\n // Commit on blur: a value typed and then clicked away from is a value the\n // user meant to add, and losing it silently is the commonest complaint\n // about this pattern.\n if (draft.trim() && commit(draft)) setDraft(\"\");\n }}\n onPaste={(e) => {\n const pasted = e.clipboardData.getData(\"text\");\n const pattern = new RegExp(`[${separators.map((s) => `\\\\${s}`).join(\"\")}\\n\\r]`);\n if (!pattern.test(pasted)) return;\n e.preventDefault();\n if (commitMany(pasted.split(pattern)).added.length) setDraft(\"\");\n }}\n placeholder={value.length ? undefined : placeholder}\n disabled={disabled}\n // A visible `label` is already wired through `htmlFor`, so adding a name\n // here would give the field two. Failing that, the DOM spelling wins and\n // the deprecated `ariaLabel` is the fallback.\n aria-label={label ? undefined : (ariaLabelAttr ?? ariaLabel)}\n aria-describedby={describedBy || undefined}\n aria-invalid={isInvalid || !!rejected || undefined}\n // `w-0` with flex-1: without a width the browser's default input size (20\n // characters) became the field's minimum width and pushed it past a 240 px\n // phone at 150 % (0.32's screenshot run).\n className={cn(\"w-0 min-w-[6rem] flex-1 bg-transparent py-0.5 text-sm text-[var(--text-primary)] outline-none placeholder:text-[var(--text-placeholder)] disabled:cursor-default\", FIELD_TOUCH_TEXT)}\n />\n {/* Additions, removals and rejections move no focus, so nothing would announce\n them. `sr-only-fixed` rather than `sr-only`: this sits inside a consumer's\n markup and must not extend the document height. */}\n <span role=\"status\" aria-live=\"polite\" aria-atomic className=\"sr-only-fixed\">\n {message}\n </span>\n </div>\n {error && (\n <p id={errorId} className=\"text-xs text-[var(--danger)]\">\n {error}\n </p>\n )}\n {rejected && (\n <p id={rejectedId} className=\"text-xs text-[var(--danger)]\" data-chip-input-rejected=\"\">\n {rejected}\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";AAyzBI,mBAWmB,KAXnB;AAzzBJ,SAAS,YAAY,gBAAgB,aAAa,OAAO,iBAAiB,QAAQ,gBAAgB;AAElG,SAAS,OAAO,SAAS;AAEzB,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAC/B,SAAS,eAAe,kBAAkB,0BAA0B;AACpE,SAAS,kBAAkB;AAC3B,SAAS,oB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D,mBACH;AAAA;AAAA;AAAA,MACF;AAAA,MACC,SACC,oBAAC,OAAE,IAAI,SAAS,WAAU,gCACvB,iBACH;AAAA,MAED,YACC,oBAAC,OAAE,IAAI,YAAY,WAAU,gCAA+B,4BAAyB,IAClF,oBACH;AAAA,OAEJ;AAAA;AAEJ;","names":["Chip","inner"]}
1
+ {"version":3,"sources":["../../src/components/chip.tsx"],"sourcesContent":["import { isValidElement, useCallback, useId } from \"react\";\nimport type { KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from \"react\";\nimport { Check, X } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { TOUCH_TARGET_LARGE } from \"./button-look\";\nimport { FOCUS_RING } from \"./focus-ring\";\nimport { assignRef, LockedReason, type DisabledReasonDisplay } from \"./field-parts\";\nimport { hasContent } from \"../lib/presence\";\nimport { DEFAULT_COMMON_LABELS, useKitLabels, useKitLink } from \"../i18n/kit-labels\";\nimport { pickLinkRenderer } from \"./text-link\";\nimport { useCommitReason, type CommitScope } from \"./write-lock\";\nimport { useSnapEdges } from \"../lib/chip-edge-snap\";\n// The edge-snap engine lives in lib/chip-edge-snap.ts and ChipInput in chip-input.tsx\n// (MOD-9). `refreshChipEdges` is still this module's; of ChipInput only the types are,\n// since a runtime re-export would make chip ⇄ chip-input a cycle — the barrel exports\n// chip-input itself.\nexport { refreshChipEdges } from \"../lib/chip-edge-snap\";\nexport type { ChipInputLabels, ChipInputProps } from \"./chip-input\";\n\n/**\n * A chip: a compact pill carrying one value.\n *\n * Three jobs, deliberately one component. A chip can be inert (a tag on a row), a link\n * (a jump to a section), or a toggle (a filter that is on or off) — and the difference is\n * which prop you pass, not which component you pick. Keeping them together is what stops\n * an app growing three near-identical pills that drift apart; it is the shape this kit\n * already uses for `Button`, which is a link when it is given an href.\n *\n * A chip is not a `Button`. It is smaller, it is rounded to a pill, and it reads as a\n * VALUE rather than as an action — which matters because a row of eight buttons says\n * \"choose one of eight things to do\" and a row of eight chips says \"here are eight\n * things\". Using `Button` for both is the mistake this exists to prevent.\n */\n\nexport type ChipTone =\n | \"neutral\"\n | \"brand\"\n | \"danger\"\n | \"warning\"\n | \"success\"\n | \"info\"\n | \"income\"\n | \"expense\"\n | ChipHue;\n/**\n * Categorical hues (0.10.0): colour that says \"a different value\" and nothing more —\n * kastlan's status-badge.tsx paints ~15 enums in 9 Tailwind hues by hand. Four of those\n * nine are semantic and already tones (green = `success`, yellow = `warning`, red =\n * `danger`, gray = `neutral`); these five are the rest, each a `--hue-*` token triple\n * in tokens.css with a light and a dark value. Use a semantic tone when the value HAS a\n * meaning (overdue is `danger`), a hue when it only needs telling apart (sent vs\n * accepted vs invoiced).\n */\nexport type ChipHue = \"blue\" | \"indigo\" | \"purple\" | \"teal\" | \"orange\";\n/** `lg` is the 44px touch target (`min-h-11`) a phone surface wants; `md` is ~28px.\n * `xs` (0.10.0) is 11px type at `px-1.5` — keksdose's goal markers and budget-cell\n * badges, which sit inside a figure's line and must not make it taller. */\nexport type ChipSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n/**\n * How much of the tone the chip wears.\n *\n * - `soft` (default): the tinted surface every chip has had.\n * - `outline`: the tone's border and text on NO surface — keksdose's DEV badge in the\n * account menu and kastlan's 27 shadcn `variant=\"outline\"` badges, which sit on\n * coloured rows where a second tint would muddy the row.\n * - `solid`: the tone as a fill under contrasting text — the \"count\" pill (unread\n * messages, open tasks). It centres its content and sets figures tabular, so a\n * one-digit count is a round dot and \"9\" → \"10\" does not jiggle the row.\n * - `dot` (0.10.0): no pill at all — a dot in the tone's colour before plain text, for\n * a status in a dense list or a table column where eight tinted pills in a column\n * would outshout the figures beside them (kastlan's unit picker already draws its\n * UnitStatus this way, from a separate `dotColor` map).\n */\nexport type ChipVariant = \"soft\" | \"outline\" | \"solid\" | \"dot\";\n/** `pill` (default) is fully rounded; `square` has the small radius of a field or a\n * button — for a chip that sits in a table cell or beside square controls. */\nexport type ChipShape = \"pill\" | \"square\";\n\nconst TONE: Record<ChipTone, { idle: string; selected: string }> = {\n neutral: {\n idle: \"border-subtle bg-surface-2 text-secondary\",\n selected: \"border-strong bg-active text-primary\",\n },\n brand: {\n idle: \"border-subtle bg-brand-soft text-brand-muted\",\n selected: \"border-brand bg-brand text-brand-contrast\",\n },\n danger: {\n idle: \"border-danger bg-danger-soft text-danger\",\n selected: \"border-[var(--danger)] bg-danger text-danger-contrast\",\n },\n warning: {\n idle: \"border-warning bg-warning-soft text-warning\",\n selected: \"border-[var(--warning)] bg-warning-soft text-warning\",\n },\n success: {\n idle: \"border-success bg-success-soft text-success\",\n selected: \"border-[var(--success)] bg-success-soft text-success\",\n },\n info: {\n idle: \"border-info bg-info-soft text-info\",\n selected: \"border-[var(--info)] bg-info-soft text-info\",\n },\n // The money pair (Keksdose's direction toggle). Only the TEXT and the BORDER carry\n // the tint, on the neutral chip's own surfaces: the money tokens are chosen for text\n // contrast, and a filled amber pill beside an amber figure reads as one smear.\n // `border-current` takes its hue from the text, so the two cannot drift apart.\n income: {\n idle: \"border-current/40 bg-surface-2 text-money-income\",\n selected: \"border-current bg-active text-money-income\",\n },\n expense: {\n idle: \"border-current/40 bg-surface-2 text-money-expense\",\n selected: \"border-current bg-active text-money-expense\",\n },\n // The categorical hues: the `info` recipe with its own token triple, so a hue chip\n // and a status chip in one row carry the same weight.\n blue: {\n idle: \"border-hue-blue bg-hue-blue-soft text-hue-blue\",\n selected: \"border-[var(--hue-blue)] bg-hue-blue-soft text-hue-blue\",\n },\n indigo: {\n idle: \"border-hue-indigo bg-hue-indigo-soft text-hue-indigo\",\n selected: \"border-[var(--hue-indigo)] bg-hue-indigo-soft text-hue-indigo\",\n },\n purple: {\n idle: \"border-hue-purple bg-hue-purple-soft text-hue-purple\",\n selected: \"border-[var(--hue-purple)] bg-hue-purple-soft text-hue-purple\",\n },\n teal: {\n idle: \"border-hue-teal bg-hue-teal-soft text-hue-teal\",\n selected: \"border-[var(--hue-teal)] bg-hue-teal-soft text-hue-teal\",\n },\n orange: {\n idle: \"border-hue-orange bg-hue-orange-soft text-hue-orange\",\n selected: \"border-[var(--hue-orange)] bg-hue-orange-soft text-hue-orange\",\n },\n};\n\n// `outline` idle looks: the tone's border and text, the surface left to whatever the\n// chip sits on. Selected still takes the tone's `selected` look (below), because an\n// outline toggle that stays an outline when on has no visible state.\nconst OUTLINE: Record<ChipTone, string> = {\n neutral: \"border-strong bg-transparent text-secondary\",\n // The brand AS TEXT is `--brand-muted` (0.33): `--brand` itself is solved to 3:1, a\n // fill's boundary, and as text it fell to 3.0:1 in the derived dark presets.\n brand: \"border-brand bg-transparent text-brand-muted\",\n danger: \"border-danger bg-transparent text-danger\",\n warning: \"border-warning bg-transparent text-warning\",\n success: \"border-success bg-transparent text-success\",\n info: \"border-info bg-transparent text-info\",\n income: \"border-current/60 bg-transparent text-money-income\",\n expense: \"border-current/60 bg-transparent text-money-expense\",\n blue: \"border-hue-blue bg-transparent text-hue-blue\",\n indigo: \"border-hue-indigo bg-transparent text-hue-indigo\",\n purple: \"border-hue-purple bg-transparent text-hue-purple\",\n teal: \"border-hue-teal bg-transparent text-hue-teal\",\n orange: \"border-hue-orange bg-transparent text-hue-orange\",\n};\n\n// `solid`: the fill under its own foreground, `<fill>-contrast` (0.33, colour-roles\n// §5.1): white in light, the tone's 950 (the page, for money) on the dark theme's\n// pastels. Until 0.33 only brand and danger had one and the rest borrowed\n// `--text-inverse`, the surface colour — which left light warning at 4.24:1 and orange\n// at 4.38:1. Neutral keeps the inverse pair: a count pill, louder than the neutral\n// fill. The border goes transparent rather than away, so a solid chip is exactly as\n// tall as a soft one.\nconst SOLID: Record<ChipTone, string> = {\n neutral: \"border-transparent bg-inverse text-inverse\",\n brand: \"border-transparent bg-brand text-brand-contrast\",\n danger: \"border-transparent bg-danger text-danger-contrast\",\n warning: \"border-transparent bg-warning text-warning-contrast\",\n success: \"border-transparent bg-success text-success-contrast\",\n info: \"border-transparent bg-info text-info-contrast\",\n income: \"border-transparent bg-money-pos text-money-income-contrast\",\n expense: \"border-transparent bg-money-neg text-money-expense-contrast\",\n blue: \"border-transparent bg-hue-blue text-hue-blue-contrast\",\n indigo: \"border-transparent bg-hue-indigo text-hue-indigo-contrast\",\n purple: \"border-transparent bg-hue-purple text-hue-purple-contrast\",\n teal: \"border-transparent bg-hue-teal text-hue-teal-contrast\",\n orange: \"border-transparent bg-hue-orange text-hue-orange-contrast\",\n};\n\n/** `dot`: the fill of the dot itself — the tone's strongest colour, which is the one\n * chosen to read on the page surface in both themes. Neutral takes the muted ink: a\n * grey dot is \"no particular state\", not a darker black. */\nconst DOT: Record<ChipTone, string> = {\n neutral: \"bg-[var(--text-muted)]\",\n brand: \"bg-brand\",\n danger: \"bg-danger\",\n warning: \"bg-warning\",\n success: \"bg-success\",\n info: \"bg-info\",\n income: \"bg-money-income\",\n expense: \"bg-money-expense\",\n blue: \"bg-hue-blue\",\n indigo: \"bg-hue-indigo\",\n purple: \"bg-hue-purple\",\n teal: \"bg-hue-teal\",\n orange: \"bg-hue-orange\",\n};\n\n/** Per size: the dot's diameter. */\nconst DOT_SIZE: Record<ChipSize, string> = { xs: \"size-1.5\", sm: \"size-2\", md: \"size-2\", lg: \"size-2.5\" };\n\n/** The status-badge type (`caps`): a size step down, heavier and tracked, because\n * capitals at body size shout and capitals untracked run together. Per size, so it\n * replaces the size's own `text-*` through tailwind-merge. */\nconst CAPS: Record<ChipSize, string> = {\n xs: \"text-micro font-semibold uppercase tracking-wider\",\n sm: \"text-micro font-semibold uppercase tracking-wider\",\n md: \"text-caption font-semibold uppercase tracking-wider\",\n lg: \"text-xs font-semibold uppercase tracking-wider\",\n};\n\nfunction surfaceOf(tone: ChipTone, variant: ChipVariant, selected: boolean | undefined): string {\n const palette = TONE[tone];\n if (variant === \"dot\") {\n // No surface and no border colour: the dot carries the tone, the text stays ink.\n // The border goes transparent rather than away, so a dot chip lines up with a pill.\n return selected\n ? \"border-transparent bg-transparent font-medium text-primary\"\n : \"border-transparent bg-transparent text-secondary\";\n }\n if (variant === \"solid\") {\n // A solid chip is already the strongest look there is, so \"on\" is a ring round it.\n return cn(SOLID[tone], selected && \"ring-2 ring-strong ring-offset-1 ring-offset-surface\");\n }\n if (selected) return palette.selected;\n return variant === \"outline\" ? OUTLINE[tone] : palette.idle;\n}\n\n/** What {@link ChipProps.renderLink} is handed: everything the chip would have put on\n * its own `<a>`. Spread it onto your router's link, mapping `href` to what the link\n * calls it — `renderLink={({ href, ...p }) => <Link to={href} {...p} />}`. */\nexport interface ChipLinkProps {\n href: string;\n /** The chip's whole look — keep it, or the pill is a bare link. */\n className: string;\n children: ReactNode;\n /** The chip's forwarded ref. React 19 passes it to a function component as a prop. */\n ref?: Ref<HTMLAnchorElement>;\n \"aria-current\"?: \"true\";\n /**\n * The chip's `onClick`, when it was given one — spread it onto the link with the\n * rest. Carried here so a caller need not close over it twice: keksdose's admin pill\n * in the account menu closes the menu on the way to /admin (account-menu.tsx), and\n * with `onClick` on the Chip its `renderLink` stays the one-liner\n * `({ href, ...p }) => <Link to={href} {...p} />`.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n id?: string;\n title?: string;\n [key: `aria-${string}`]: string | boolean | number | undefined;\n [key: `data-${string}`]: unknown;\n}\n\n/**\n * `body` is the whole pill when the chip is ONE element. When a link or a button also has\n * a dismiss control, the pill is a wrapper holding two siblings (see the note on\n * {@link Chip}): `split` is then the interactive part's own padding — the full start\n * inset, a short end one before the ×; `tail` is the wrapper's end inset after the ×.\n */\nconst SIZE: Record<\n ChipSize,\n { body: string; split: string; tail: string; icon: string; remove: string }\n> = {\n xs: {\n body: \"gap-1 px-1.5 py-0 text-caption leading-4\",\n split: \"gap-1 ps-1.5 pe-0.5 py-0 text-caption leading-4\",\n tail: \"pe-1\",\n icon: \"size-3\",\n remove: \"size-2.5\",\n },\n sm: {\n body: \"gap-1 px-2 py-0.5 text-xs\",\n split: \"gap-1 ps-2 pe-1 py-0.5 text-xs\",\n tail: \"pe-1.5\",\n icon: \"size-3\",\n remove: \"size-3\",\n },\n md: {\n body: \"gap-1.5 px-2.5 py-1 text-sm\",\n split: \"gap-1.5 ps-2.5 pe-1.5 py-1 text-sm\",\n tail: \"pe-2\",\n icon: \"size-3.5\",\n remove: \"size-3.5\",\n },\n lg: {\n body: \"min-h-11 gap-2 px-4 py-2 text-sm\",\n split: \"min-h-11 gap-2 ps-4 pe-2 py-2 text-sm\",\n tail: \"min-h-11 pe-3.5\",\n icon: \"size-4\",\n remove: \"size-4\",\n },\n};\n\nconst CHIP_PILL = \"inline-flex max-w-full items-center rounded-full border transition-colors\";\n\n// `focus-visible`, not `focus`: a chip commonly receives focus programmatically (the\n// ChipInput moves focus onto one after a removal) and a ring that appears on a\n// pointer click reads as a stuck selection.\nconst CHIP_RING = `${FOCUS_RING} focus-visible:ring-offset-1 focus-visible:ring-offset-surface`;\nconst CHIP_BASE = `${CHIP_PILL} ${CHIP_RING}`;\n\n/**\n * A text chip's label at Large and Extra large (0.32.1, keksdose's 0.32 report;\n * docs/text-size-harmonization.md §4 \"nothing truncates\"): it wraps instead of ending in\n * \"…\". keksdose's \"Zur Prüfung zurücklegen\" read \"Zur Prüfung zu…\" on a phone at Extra\n * large, which is a different instruction. No size has a fixed height (padding and\n * `min-h-*` only), so the pill grows with its lines; the mark before the text stays\n * centred on them, as in a pill. A `large:` rule, so Normal keeps its one-line chip.\n *\n * 0.33 (§10.17): the kit's one `truncate-until-large` (tokens.css) in place of this\n * file's own `truncate` + `large:whitespace-normal large:break-words`, as StatusDot's\n * label took it. The utility breaks with `overflow-wrap: anywhere`, which lowers the\n * label's min-content width to one letter: a status chip in an auto-sized table column\n * wants the column given a width at Large, or it is squeezed to a letter per line\n * (StatusDot's label was, in the showcase's tone table at 360 px, Extra large).\n */\nconst CHIP_LABEL_TRUNCATE = \"truncate-until-large\";\n\n/**\n * An interactive chip's touch target at Large and Extra large (docs/text-size-harmonization.md\n * §4: \"touch targets at least 48 px … for buttons, inputs, chips\"): a link or toggle chip\n * grows its pill to 48 px, as Button `sm` does, and centres what is in it once the\n * minimum width is what sizes it. An inert chip (a tag on a row) is no target and keeps\n * its size; a disabled one is no target either.\n */\nconst CHIP_TOUCH_LARGE = `${TOUCH_TARGET_LARGE} large:justify-center`;\n\n/**\n * The ×'s 48 px hit area at Large (§4) — IconButton's `2xs` pattern: a box that cannot\n * grow without growing the chip around it keeps its size and gets an invisible\n * `::after`, 48 px square and centred on it, which takes the taps a finger lands round\n * the glyph. On an inert removable chip (ChipInput's values) the × is the only target.\n */\nconst REMOVE_HIT_AREA_LARGE =\n \"relative large:after:absolute large:after:inset-[calc((100%-48px)/2)] large:after:content-['']\";\n\ninterface ChipBaseProps {\n children: ReactNode;\n tone?: ChipTone;\n size?: ChipSize;\n /** See {@link ChipVariant}. Default `soft`. */\n variant?: ChipVariant;\n /** See {@link ChipShape}. Default `pill`. */\n shape?: ChipShape;\n /**\n * The uppercase, tracked \"status badge\" type — keksdose's ~25 PAID / DRAFT /\n * OVERDUE / ADMIN badges, each spelling `uppercase tracking-wide text-[10px]` by\n * hand. A flag rather than a fourth `variant` because it is TYPE, not surface: a\n * status badge is soft, outlined or solid as the row needs, and a `variant=\"tag\"`\n * would have had to pick one. Screen readers read the text as written, not as\n * drawn, so write it in normal case.\n */\n caps?: boolean;\n /**\n * The leading glyph: a lucide component (`icon={Check}`, drawn at the chip's size), or\n * — since 0.15.4 — a ready element (`icon={<Check className=\"text-success\" />}`)\n * for a glyph whose colour or stroke carries a state; it is sized to the same box\n * (keksdose live #358 built that slot by hand inside `children`).\n */\n icon?: LucideIcon | ReactElement;\n /**\n * Marks the chip as the current one — `aria-current` on a link, `aria-pressed` on a\n * toggle.\n *\n * On an ON/OFF toggle, keep the LABEL the same in both states and let `selected`\n * carry the state. A label that flips with it (\"Skip this month\" / \"Ask again this\n * month\") is announced together with \"pressed\", and then says the opposite of what\n * it does.\n *\n * A control that switches between two NAMED states (outflow ⇄ inflow) is not a\n * toggle but an ACTION button: leave `selected` out, let the visible label and the\n * tone follow the state (\"− Outflow\" / \"+ Inflow\"), and name the action in\n * `aria-label` (\"Direction: outflow — tap for inflow\"). Without `selected` the chip\n * reports no pressed state at all. A fixed label there contradicts the figure beside\n * it — \"+ Outflow\" in green next to an inflow (keksdose #417).\n */\n selected?: boolean;\n /**\n * Checkbox mode (0.10.0), for a toggle chip (`onClick` + `selected`): a small box\n * at the start that shows a tick when `selected`, and the button reports\n * `role=\"checkbox\"` + `aria-checked` instead of `aria-pressed`. For a set of\n * include/exclude choices where \"on\" must read as TICKED, not merely tinted —\n * keksdose's add-group-card (the \"which categories come along\" pills), which put a\n * real `<Checkbox>` inside a `<label>` pill by hand. The box is drawn in both\n * states so ticking one never shifts its label.\n */\n checkbox?: boolean;\n /** Renders a dismiss affordance. Works alongside `href`/`onClick` — see the note below. */\n onRemove?: () => void;\n /** Accessible name for the dismiss button. Default: `common.remove` from the\n * {@link UiKitProvider}, else \"Remove\". */\n removeLabel?: string;\n /** Disables the × ONLY — the chip itself stays a working link or toggle. For the\n * value that may not be removed right now (the last filter of a required set, a\n * tag the user may read but not edit) where `disabled` would also kill the chip's\n * own action. */\n removeDisabled?: boolean;\n disabled?: boolean;\n className?: string;\n /**\n * Roving focus, for a container that manages a row of chips (see {@link ChipInput}).\n * A chip with no `href`/`onClick` is inert and unfocusable by default; give it a\n * `tabIndex` and a `role` and it becomes the thing arrow keys move between.\n */\n tabIndex?: number;\n role?: string;\n onKeyDown?: (e: KeyboardEvent<HTMLElement>) => void;\n onFocus?: () => void;\n /** Accessible name, when the visible text is not the whole story. */\n \"aria-label\"?: string;\n /** Any other ARIA attribute — `aria-describedby`, `aria-expanded`, `aria-controls`,\n * `aria-haspopup` — reaches the chip's interactive element. */\n [key: `aria-${string}`]: string | boolean | number | undefined;\n /** A test id, a `data-tour` anchor, or any other data attribute. */\n [key: `data-${string}`]: unknown;\n id?: string;\n /** A native tooltip. For anything a user must read, prefer the kit's `Tooltip`. */\n title?: string;\n /**\n * Even hairlines on fractional-ratio displays (0.18.0). At a device-pixel ratio of\n * 1.25 — a 125 % Windows display, or 125 % zoom — Chrome draws a chip's two 1px\n * side borders on different sub-pixel phases, one crisp and one a half-strength\n * smear that reads as a thinner line (worst on the 60 %-alpha `danger` border).\n * `snapEdges` widens the chip by under 4px, from where it sits, so the two edges\n * rasterise as mirror images, and centres its content in the extra.\n *\n * Off by default: it reads the chip's position (batched for every snapped chip into\n * one pass a frame, through one shared observer), and the fix is only as fresh as the\n * last pass — it re-snaps on render, resize, zoom and ratio change, but not when\n * something else moves the chip; call {@link refreshChipEdges} then. At an integer\n * ratio, and at 1.5, it writes nothing. Turn it on for status chips that sit in a\n * column and are compared side by side; a chip with no visible border (`dot`) has\n * nothing to snap.\n */\n snapEdges?: boolean;\n /** The interactive element — the pill, or a split pill's body. A React 19 ref prop\n * since 0.34 (MOD-4, refactor audit 2026-10); it was `forwardRef`. */\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * A chip is a link OR a button, never both — so the types say so. Before 0.7.0 both were\n * accepted and `onClick` was silently dropped whenever `href` was set. A LINK may still\n * run code on its way (close the menu it sits in): that is an `onClick` typed for the\n * anchor, on the link shape, and the pill stays a link — no `aria-pressed`, no button.\n * That shape wants a definite `href` string, so a bare `onClick` is always the\n * button's, with a button's event.\n */\nexport type ChipProps = ChipBaseProps &\n (\n | {\n /** Renders the chip as a link. */\n href?: string;\n onClick?: never;\n /**\n * Renders the link for `href` — pass your router's `<Link>` here, since a\n * plain `<a>` reloads a single-page app (keksdose's account-menu admin pill).\n * Default: the `<UiKitProvider linkComponent>`, then `<a>`. Ignored without\n * `href`.\n *\n * A render function rather than an `as={Link}`, for three reasons. It is the\n * API `StatTile` already has (`renderLink`), so a consumer learns it once.\n * Router links do not take `href` — react-router's takes `to` — so an `as`\n * would either have to pass props through untyped or teach the kit about one\n * router; here the caller maps `href` onto its own link in one line, fully\n * typed. And it keeps `href` as THE link prop, which is what the `href` /\n * `onClick` exclusion below is typed on: the pill is a link because it has an\n * href, whichever element draws it.\n */\n renderLink?: (props: ChipLinkProps) => ReactElement;\n commit?: never;\n disabledReason?: never;\n disabledReasonDisplay?: never;\n }\n | {\n /** The link shape again, with an `onClick`. `href` is a required string here,\n * which is what lets TypeScript tell this shape from the button's: a bare\n * `onClick` can only be the button's, and keeps its button event. */\n href: string;\n /** Runs on the link's click, before the navigation — keksdose's admin pill\n * closes the account menu with it. Reaches a `renderLink` link as\n * {@link ChipLinkProps.onClick}. Not called on a disabled chip, which renders\n * no link. */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n /** See the link shape above. */\n renderLink?: (props: ChipLinkProps) => ReactElement;\n commit?: never;\n disabledReason?: never;\n disabledReasonDisplay?: never;\n }\n | {\n href?: never;\n renderLink?: never;\n /** Renders the chip as a toggle button. Mutually exclusive with `href`. Receives\n * the click, so a chip inside a clickable row can `stopPropagation()`. */\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n /**\n * Why the toggle cannot be pressed right now — {@link Button}'s\n * `disabledReason`, on the chip's button shape (keksdose K3: a filter or flag\n * chip that saves on press, under a read-only lock). The chip stays focusable\n * and `aria-disabled`, a press (and its `onRemove` ×) does nothing, and the\n * reason describes the chip — as a line under it at Large and on a touch\n * screen, in the kit {@link Tooltip} otherwise (see `disabledReasonDisplay`).\n * Wins over `disabled`. A link chip navigates rather than commits, so it takes\n * neither this nor `commit`; an inert chip has nothing to refuse.\n */\n disabledReason?: ReactNode;\n /**\n * Where `disabledReason` shows (0.32, docs/text-size-harmonization.md §4 \"No fact\n * only in a tooltip\") — {@link Button}'s `disabledReasonDisplay`: by default a line\n * under the chip at Large and Extra large and on a touch screen, where a bubble\n * cannot be hovered open, and the tooltip otherwise and inside\n * `CompactControls`. `\"line\"` / `\"tooltip\"` force one. See\n * {@link DisabledReasonDisplay}.\n */\n disabledReasonDisplay?: DisabledReasonDisplay;\n /** This chip COMMITS — pressing it saves. Under a locked\n * {@link WriteLockProvider} it takes the `disabledReason` path with the lock's\n * reason, as {@link Button}'s `commit` does. */\n commit?: CommitScope;\n }\n );\n\n/**\n * Note on `onRemove` with `href`/`onClick`: a button cannot be nested inside a button or\n * a link, so when both are present the chip renders a wrapper holding TWO siblings — the\n * interactive body and the dismiss control. The WRAPPER is the visual pill (border, tone,\n * `className`) and the two sit inside it, so the × reads as part of the chip; the body's\n * focus ring is drawn on the body alone, and `ref`, `id` and the ARIA props still reach\n * the body — the interactive element.\n */\nexport function Chip({\n ref,\n children,\n tone = \"neutral\",\n size = \"md\",\n variant = \"soft\",\n shape = \"pill\",\n caps = false,\n icon: Icon,\n selected,\n checkbox = false,\n href,\n renderLink,\n onClick,\n onRemove,\n removeLabel,\n removeDisabled = false,\n disabled = false,\n className,\n tabIndex,\n role,\n onKeyDown,\n onFocus,\n snapEdges = false,\n disabledReason: ownDisabledReason,\n disabledReasonDisplay,\n commit,\n ...rest\n}: ChipProps) {\n const common = useKitLabels(\"common\", DEFAULT_COMMON_LABELS, { remove: removeLabel });\n const reasonId = useId();\n const disabledReason = useCommitReason(commit, ownDisabledReason);\n // Only the BUTTON shape commits: a link navigates, an inert chip does nothing.\n const locked = Boolean(onClick) && !href && hasContent(disabledReason);\n const kitLink = useKitLink();\n const s = SIZE[size];\n const interactive = !!href || !!onClick;\n // One radius for every rounded piece — the pill, the body inside a split pill, the ×\n // — so a square chip has no round focus ring inside it.\n const radius =\n shape === \"square\" ? (size === \"sm\" || size === \"xs\" ? \"rounded\" : \"rounded-md\") : \"rounded-full\";\n const dot = variant === \"dot\";\n const type = cn(caps && CAPS[size], variant === \"solid\" && \"justify-center tabular-nums\");\n const surface = cn(\n surfaceOf(tone, variant, selected),\n // A reason wins over `disabled`: the focusable kind of disabled, with the cursor\n // that says \"refused\" rather than \"nothing here\".\n disabled && !locked && \"cursor-default opacity-50\",\n locked && \"cursor-not-allowed opacity-50\",\n );\n const snap = snapEdges && !dot;\n // A finger's target at Large (§4): what can be pressed, refused or not — see\n // CHIP_TOUCH_LARGE. A disabled link renders as the inert span below and is none.\n const target = interactive && (!disabled || locked);\n const snapRef = useSnapEdges(snap);\n // The visible pill carries the snap: the whole chip, or the wrapper of a split one\n // (whose body gets the forwarded ref instead).\n const ownRef = useCallback(\n (el: HTMLElement | null) => {\n snapRef(el);\n assignRef(ref, el);\n },\n [snapRef, ref],\n );\n const look = cn(\n CHIP_BASE,\n s.body,\n type,\n radius,\n surface,\n interactive && !disabled && !locked && \"cursor-pointer hover:brightness-[0.97] dark:hover:brightness-110\",\n // §4: a link or toggle is a 48 px target at Large — a locked one too, since it is\n // still focusable and still says why when pressed.\n target && CHIP_TOUCH_LARGE,\n // An inert dot chip is text in a column: no inset, so it aligns with the header.\n dot && !interactive && \"px-0\",\n // The under-4px a snap adds is split between the two sides, not stacked at the end.\n snap && \"justify-center\",\n className,\n );\n\n // The tone as data on the visible pill (0.34, refactor audit 2026-10, TST-9): a stable\n // hook for a test or a caller's selector, where the surface classes are the kit's to\n // change. On the pill wrapper of a split chip, else on the chip itself; before the\n // caller's props, so a `data-tone` of their own wins.\n const toneData = { \"data-tone\": onRemove ? undefined : tone } as Record<string, string | undefined>;\n\n // The checkbox box, only on the toggle shape it has meaning on.\n const isCheckbox = checkbox && !!onClick && !href;\n const body = (\n <>\n {isCheckbox && (\n <span\n aria-hidden\n data-chip-check=\"\"\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-sm border\",\n s.icon,\n selected ? \"border-current bg-current/15\" : \"border-current/50\",\n )}\n >\n {selected && <Check className=\"size-full\" strokeWidth={3} />}\n </span>\n )}\n {dot && <span aria-hidden data-chip-dot=\"\" className={cn(\"shrink-0 rounded-full\", DOT_SIZE[size], DOT[tone])} />}\n {Icon &&\n (isValidElement(Icon) ? (\n <span aria-hidden className={cn(s.icon, \"inline-flex shrink-0 [&>svg]:size-full\")}>\n {Icon}\n </span>\n ) : (\n <Icon className={cn(s.icon, \"shrink-0\")} aria-hidden />\n ))}\n {/* Text truncates at Normal and wraps at Large (CHIP_LABEL_TRUNCATE). Mixed\n children (an icon and a word) sit in a row instead: as a plain span, the svg —\n a block under Tailwind's preflight — stacked above the text (keksdose live\n #358). */}\n <span\n className={cn(\n \"min-w-0\",\n typeof children === \"string\" || typeof children === \"number\"\n ? CHIP_LABEL_TRUNCATE\n : \"inline-flex items-center gap-1 [&>svg]:size-[1em] [&>svg]:shrink-0\",\n )}\n >\n {children}\n </span>\n </>\n );\n\n const remove = onRemove ? (\n <button\n type=\"button\"\n // The name carries WHAT is being removed, not just \"Remove\" — a screen-reader user\n // tabbing a row of eight dismiss buttons otherwise hears the same word eight times\n // with no way to tell which one they are on.\n // Composed through `common.fieldValue` because the punctuation between the two\n // halves is the language's, not ours. A chip whose content is not plain text\n // has no value to name, and gets the bare verb rather than a dangling colon.\n aria-label={\n typeof children === \"string\" && children\n ? common.fieldValue(common.remove, children)\n : common.remove\n }\n onClick={(e) => {\n // The chip may itself be a link; removing it must not also follow it.\n e.preventDefault();\n e.stopPropagation();\n // Removing a value from a chip that commits is a commit too.\n if (locked) return;\n onRemove();\n }}\n disabled={(disabled && !locked) || removeDisabled}\n aria-disabled={locked || undefined}\n aria-describedby={locked ? reasonId : undefined}\n className={cn(\n // Logical margins: the × sits at the END of the pill, which is the left in RTL.\n \"-me-0.5 ms-0.5 shrink-0 p-0.5 transition-colors\",\n shape === \"square\" ? \"rounded-sm\" : \"rounded-full\",\n FOCUS_RING,\n // §4: the × is a 48 px target at Large without growing the chip around it.\n REMOVE_HIT_AREA_LARGE,\n !locked && \"hover:bg-active\",\n locked && \"cursor-not-allowed\",\n ((disabled && !locked) || removeDisabled) && \"pointer-events-none\",\n // A disabled chip is already dimmed as a whole; dimming the × again on top\n // would take it to a quarter. `removeDisabled` alone dims just the ×.\n removeDisabled && !disabled && \"opacity-40\",\n )}\n >\n <X className={s.remove} aria-hidden />\n </button>\n ) : null;\n\n // ── The combined shape: one pill, two interactive siblings inside it.\n const pill = (inner: ReactNode) => (\n <span\n ref={snap ? snapRef : undefined}\n data-tone={tone}\n // The pill is the target's box here (§4): the body inside stretches to its height.\n className={cn(CHIP_PILL, s.tail, radius, surface, target && CHIP_TOUCH_LARGE, snap && \"justify-center\", className)}\n >\n {inner}\n {remove}\n </span>\n );\n // The body inside a pill: no border or surface of its own (the pill has them), a\n // hover wash in the text's own hue so it works on every tone.\n const inner = cn(\n \"inline-flex min-w-0 items-center self-stretch transition-colors\",\n radius,\n CHIP_RING,\n s.split,\n type,\n !disabled && !locked && \"cursor-pointer hover:bg-current/10\",\n disabled && !locked && \"cursor-default\",\n locked && \"cursor-not-allowed\",\n );\n\n // ── The three shapes.\n if (href && !disabled) {\n // On this shape `onClick` is the link shape's, typed for the anchor.\n const onLinkClick = onClick as ChipLinkProps[\"onClick\"];\n const linkProps: ChipLinkProps = {\n ...toneData,\n ...rest,\n ref: (remove ? ref : ownRef) as Ref<HTMLAnchorElement>,\n href,\n onClick: onLinkClick,\n \"aria-current\": selected ? \"true\" : undefined,\n className: remove ? inner : look,\n children: body,\n };\n const render = pickLinkRenderer(renderLink, kitLink, href);\n const link = render ? (\n // Through a component rather than called here, so the forwarded ref arrives as\n // an ordinary prop of an element and is never handed to a function mid-render.\n <RenderedLink render={render} {...linkProps} />\n ) : (\n <a\n ref={(remove ? ref : ownRef) as React.Ref<HTMLAnchorElement>}\n {...toneData}\n href={href}\n aria-current={selected ? \"true\" : undefined}\n onClick={onLinkClick}\n className={remove ? inner : look}\n {...rest}\n >\n {body}\n </a>\n );\n return remove ? pill(link) : link;\n }\n\n // `!href`: a DISABLED link renders no link, and its link-shaped `onClick` must not\n // turn it into a button instead — it falls through to the inert span, as before.\n if (onClick && !href) {\n const onButtonClick = onClick as (event: MouseEvent<HTMLButtonElement>) => void;\n const ownDescribedBy = rest[\"aria-describedby\"];\n const button = (\n <button\n ref={(remove ? ref : ownRef) as React.Ref<HTMLButtonElement>}\n {...toneData}\n type=\"button\"\n onClick={(e) => {\n // Locked: the press is swallowed — the chip saves on press, and a lock that\n // let it through would toggle a state that is never stored.\n if (locked) {\n e.preventDefault();\n return;\n }\n onButtonClick(e);\n }}\n disabled={disabled && !locked}\n // Only when `selected` is PASSED: a chip with `onClick` and no `selected` is an\n // action button (it does something), not a toggle (it is on or off), and\n // announcing it \"not pressed\" would claim a state it does not have.\n // A checkbox chip says \"checked\", not \"pressed\" — the same state in the words\n // of the control it looks like.\n role={isCheckbox ? \"checkbox\" : undefined}\n aria-pressed={isCheckbox ? undefined : selected}\n aria-checked={isCheckbox ? !!selected : undefined}\n className={remove ? inner : look}\n {...rest}\n // After the spread, merged with it: the lock's state and reason are not the\n // caller's to drop by passing an `aria-describedby` of their own.\n aria-disabled={locked || (rest[\"aria-disabled\"] as boolean | \"true\" | \"false\" | undefined)}\n aria-describedby={\n locked ? [ownDescribedBy, reasonId].filter(Boolean).join(\" \") : (ownDescribedBy as string | undefined)\n }\n >\n {body}\n </button>\n );\n const shaped = remove ? pill(button) : button;\n if (!locked) return shaped;\n return (\n <LockedReason lock={{ reason: disabledReason, reasonId }} display={disabledReasonDisplay}>\n {shaped}\n </LockedReason>\n );\n }\n\n return (\n /* eslint-disable-next-line jsx-a11y/no-static-element-interactions -- the handlers are\n the roving-focus hooks, live only when the container passes `role` and `tabIndex`\n (ChipInput does); the role is a prop, so the rule cannot see it. */\n <span\n ref={ownRef as React.Ref<HTMLSpanElement>}\n {...toneData}\n className={look}\n tabIndex={tabIndex}\n role={role}\n onKeyDown={onKeyDown}\n onFocus={onFocus}\n {...rest}\n >\n {body}\n {remove}\n </span>\n );\n}\n\n/** Calls a chip's `renderLink` with the props it was given — see its call site. */\nfunction RenderedLink({\n render,\n ...props\n}: ChipLinkProps & { render: (props: ChipLinkProps) => ReactElement }) {\n return render(props);\n}\n"],"mappings":";AAknBI,mBAWmB,KAXnB;AAlnBJ,SAAS,gBAAgB,aAAa,aAAa;AAEnD,SAAS,OAAO,SAAS;AAEzB,SAAS,UAAU;AACnB,SAAS,0BAA0B;AACnC,SAAS,kBAAkB;AAC3B,SAAS,WAAW,oBAAgD;AACpE,SAAS,kB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GJ,iBAAe,UAAW,KAAK,eAAe;AAAA,QAC9C,oBACE,SAAS,CAAC,gBAAgB,QAAQ,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,IAAK;AAAA,QAGlE;AAAA;AAAA,IACH;AAEF,UAAM,SAAS,SAAS,KAAK,MAAM,IAAI;AACvC,QAAI,CAAC,OAAQ,QAAO;AACpB,WACE,oBAAC,gBAAa,MAAM,EAAE,QAAQ,gBAAgB,SAAS,GAAG,SAAS,uBAChE,kBACH;AAAA,EAEJ;AAEA;AAAA;AAAA;AAAA;AAAA,IAIE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACJ,GAAG;AAAA,QACJ,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,UACA;AAAA;AAAA;AAAA,IACH;AAAA;AAEJ;AAGA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,GAAG;AACL,GAAuE;AACrE,SAAO,OAAO,KAAK;AACrB;","names":["inner"]}
@@ -1,6 +1,4 @@
1
- import * as react from 'react';
2
- import { InputHTMLAttributes, ReactNode, ComponentType, ButtonHTMLAttributes, Ref, MouseEvent, ReactElement } from 'react';
3
-
1
+ import type { ButtonHTMLAttributes, ComponentType, InputHTMLAttributes, MouseEvent, ReactElement, ReactNode, Ref } from "react";
4
2
  /**
5
3
  * A checkbox or a radio, presented as a bordered card: a title, a line of description,
6
4
  * an optional icon — and the whole card is the hit area.
@@ -21,8 +19,8 @@ import { InputHTMLAttributes, ReactNode, ComponentType, ButtonHTMLAttributes, Re
21
19
  * Checked is said three ways, none of them colour alone: the box's tick (or the
22
20
  * radio's dot), a heavier border, and the brand-tinted surface.
23
21
  */
24
- type ChoiceCardType = "checkbox" | "radio";
25
- interface ChoiceCardProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "title"> {
22
+ export type ChoiceCardType = "checkbox" | "radio";
23
+ export interface ChoiceCardProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "title"> {
26
24
  /** "checkbox" (default) for an on/off option or one of several; "radio" for one of
27
25
  * a set — give every card of the set the same `name`, or use {@link ChoiceCardGroup}. */
28
26
  type?: ChoiceCardType;
@@ -54,18 +52,21 @@ interface ChoiceCardProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "t
54
52
  * {@link ChoiceCardGroup} the star goes on the legend instead, once.
55
53
  */
56
54
  required?: boolean;
55
+ /** The `<input>`. A React 19 ref prop since 0.34 (MOD-4, refactor audit 2026-10); it
56
+ * was `forwardRef`. */
57
+ ref?: Ref<HTMLInputElement>;
57
58
  }
58
- declare const ChoiceCard: react.ForwardRefExoticComponent<ChoiceCardProps & react.RefAttributes<HTMLInputElement>>;
59
+ export declare function ChoiceCard({ ref, type, title, description, icon: Icon, indeterminate, invalid, error, onCheckedChange, onChange, className, inputClassName, id, disabled, required, ...rest }: ChoiceCardProps): import("react").JSX.Element;
59
60
  /** The colour of {@link ActionCardProps.meta}. */
60
- type ActionCardMetaTone = "muted" | "warning" | "danger" | "info" | "success";
61
+ export type ActionCardMetaTone = "muted" | "warning" | "danger" | "info" | "success";
61
62
  /** The colour of {@link ActionCardProps.icon}. `default` is the secondary text colour
62
63
  * the icon has always had; `brand` tints it (keksdose's privacy enrolment) with the
63
64
  * brand as text, `--brand-muted` (0.33, docs/colour-roles-harmonization.md §5.5):
64
65
  * `--brand` read 3.03:1 on the card's hover in the derived dark presets. */
65
- type ActionCardIconTone = "default" | "muted" | "brand" | "warning" | "danger" | "info" | "success";
66
+ export type ActionCardIconTone = "default" | "muted" | "brand" | "warning" | "danger" | "info" | "success";
66
67
  /** What {@link ActionCardProps.renderLink} (and the provider's `linkComponent`) is
67
68
  * handed. Spread it onto your router's link — `({ href, ...p }) => <Link to={href} {...p} />`. */
68
- interface ActionCardLinkProps {
69
+ export interface ActionCardLinkProps {
69
70
  href: string;
70
71
  /** The card's whole look — keep it. */
71
72
  className: string;
@@ -76,7 +77,7 @@ interface ActionCardLinkProps {
76
77
  [key: `aria-${string}`]: string | boolean | number | undefined;
77
78
  [key: `data-${string}`]: unknown;
78
79
  }
79
- interface ActionCardProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "title"> {
80
+ export interface ActionCardProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "title"> {
80
81
  /** What the card does — the button's accessible name. */
81
82
  title: ReactNode;
82
83
  /** A line or two on what it means. Attached with `aria-describedby`. */
@@ -107,6 +108,9 @@ interface ActionCardProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,
107
108
  /** Your router's link for an in-app `href`. Default: the `<UiKitProvider
108
109
  * linkComponent>`, then a plain `<a>`. Ignored without `href`. */
109
110
  renderLink?: (props: ActionCardLinkProps) => ReactElement;
111
+ /** The `<button>` — or, with `href`, the `<a>`. A React 19 ref prop since 0.34 (MOD-4,
112
+ * refactor audit 2026-10); it was `forwardRef`. */
113
+ ref?: Ref<HTMLButtonElement>;
110
114
  }
111
115
  /**
112
116
  * A {@link ChoiceCard} that ACTS rather than holds a state: a `<button>` with the
@@ -121,8 +125,8 @@ interface ActionCardProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,
121
125
  * Named by the title alone and described by the rest, so a screen reader hears
122
126
  * "Keep the key yourself, button" and then the explanation, not one long name.
123
127
  */
124
- declare const ActionCard: react.ForwardRefExoticComponent<ActionCardProps & react.RefAttributes<HTMLButtonElement>>;
125
- interface ChoiceCardOption<T extends string> {
128
+ export declare function ActionCard({ ref, title, description, meta, metaTone, icon: Icon, iconTone, iconClassName, href, renderLink, className, id, type, ...rest }: ActionCardProps): import("react").JSX.Element;
129
+ export interface ChoiceCardOption<T extends string> {
126
130
  value: T;
127
131
  title: ReactNode;
128
132
  description?: ReactNode;
@@ -158,18 +162,18 @@ interface ChoiceCardGroupBaseProps<T extends string> {
158
162
  required?: boolean;
159
163
  }
160
164
  /** One of the set: radios. `value` is `null` while nothing is chosen. */
161
- interface ChoiceCardSingleProps<T extends string> extends ChoiceCardGroupBaseProps<T> {
165
+ export interface ChoiceCardSingleProps<T extends string> extends ChoiceCardGroupBaseProps<T> {
162
166
  multiple?: false;
163
167
  value: T | null;
164
168
  onChange: (value: T) => void;
165
169
  }
166
170
  /** Any of the set: checkboxes. */
167
- interface ChoiceCardMultipleProps<T extends string> extends ChoiceCardGroupBaseProps<T> {
171
+ export interface ChoiceCardMultipleProps<T extends string> extends ChoiceCardGroupBaseProps<T> {
168
172
  multiple: true;
169
173
  value: T[];
170
174
  onChange: (value: T[]) => void;
171
175
  }
172
- type ChoiceCardGroupProps<T extends string> = ChoiceCardSingleProps<T> | ChoiceCardMultipleProps<T>;
176
+ export type ChoiceCardGroupProps<T extends string> = ChoiceCardSingleProps<T> | ChoiceCardMultipleProps<T>;
173
177
  /**
174
178
  * A set of {@link ChoiceCard}s answering one question, in a `<fieldset>`.
175
179
  *
@@ -178,6 +182,5 @@ type ChoiceCardGroupProps<T extends string> = ChoiceCardSingleProps<T> | ChoiceC
178
182
  * in the order of `options`, not the order the boxes were ticked, so a list saved
179
183
  * from it does not depend on the order someone clicked in.
180
184
  */
181
- declare function ChoiceCardGroup<T extends string>(props: ChoiceCardGroupProps<T>): react.JSX.Element;
182
-
183
- export { ActionCard, type ActionCardIconTone, type ActionCardLinkProps, type ActionCardMetaTone, type ActionCardProps, ChoiceCard, ChoiceCardGroup, type ChoiceCardGroupProps, type ChoiceCardMultipleProps, type ChoiceCardOption, type ChoiceCardProps, type ChoiceCardSingleProps, type ChoiceCardType };
185
+ export declare function ChoiceCardGroup<T extends string>(props: ChoiceCardGroupProps<T>): import("react").JSX.Element;
186
+ export {};