@eifi1/ui-kit 0.32.2 → 0.33.1

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 (400) hide show
  1. package/README.md +17 -9
  2. package/dist/account/delete-account-setting.d.ts +11 -10
  3. package/dist/account/delete-account-setting.js +2 -1
  4. package/dist/account/delete-account-setting.js.map +1 -1
  5. package/dist/account/email-change-setting.d.ts +5 -0
  6. package/dist/account/email-change-setting.js +4 -3
  7. package/dist/account/email-change-setting.js.map +1 -1
  8. package/dist/account/sessions-setting.d.ts +4 -0
  9. package/dist/account/sessions-setting.js +3 -2
  10. package/dist/account/sessions-setting.js.map +1 -1
  11. package/dist/admin/admin-action-confirm.d.ts +11 -10
  12. package/dist/admin/admin-action-confirm.js.map +1 -1
  13. package/dist/admin/invitations-panel.d.ts +11 -10
  14. package/dist/admin/invitations-panel.js +4 -3
  15. package/dist/admin/invitations-panel.js.map +1 -1
  16. package/dist/admin/plan-change.d.ts +101 -0
  17. package/dist/admin/plan-change.js +210 -0
  18. package/dist/admin/plan-change.js.map +1 -0
  19. package/dist/admin/reviewer-scope-editor.d.ts +11 -10
  20. package/dist/admin/reviewer-scope-editor.js.map +1 -1
  21. package/dist/admin/role-select.d.ts +8 -7
  22. package/dist/admin/role-select.js.map +1 -1
  23. package/dist/admin/transfer-ownership-dialog.d.ts +11 -10
  24. package/dist/admin/user-roster.d.ts +8 -7
  25. package/dist/admin/user-roster.js +2 -2
  26. package/dist/admin/user-roster.js.map +1 -1
  27. package/dist/auth/auth-errors.d.ts +13 -2
  28. package/dist/auth/auth-errors.js +5 -1
  29. package/dist/auth/auth-errors.js.map +1 -1
  30. package/dist/auth/complete-name-dialog.d.ts +4 -1
  31. package/dist/auth/complete-name-dialog.js +2 -1
  32. package/dist/auth/complete-name-dialog.js.map +1 -1
  33. package/dist/auth/register-form.d.ts +11 -10
  34. package/dist/billing/billing-banner.d.ts +14 -11
  35. package/dist/billing/billing-banner.js.map +1 -1
  36. package/dist/billing/billing-labels.d.ts +11 -10
  37. package/dist/billing/billing-labels.js +10 -1
  38. package/dist/billing/billing-labels.js.map +1 -1
  39. package/dist/billing/billing-lock.d.ts +40 -12
  40. package/dist/billing/billing-lock.js +9 -3
  41. package/dist/billing/billing-lock.js.map +1 -1
  42. package/dist/billing/billing-overview.d.ts +155 -0
  43. package/dist/billing/billing-overview.js +2 -0
  44. package/dist/billing/billing-overview.js.map +1 -0
  45. package/dist/billing/billing-standing.d.ts +11 -10
  46. package/dist/billing/checkout-processing.d.ts +218 -0
  47. package/dist/billing/checkout-processing.js +198 -0
  48. package/dist/billing/checkout-processing.js.map +1 -0
  49. package/dist/billing/checkout-return.d.ts +51 -0
  50. package/dist/billing/checkout-return.js +43 -0
  51. package/dist/billing/checkout-return.js.map +1 -0
  52. package/dist/billing/pay-page.d.ts +215 -0
  53. package/dist/billing/pay-page.js +113 -0
  54. package/dist/billing/pay-page.js.map +1 -0
  55. package/dist/billing/plan-card.d.ts +11 -10
  56. package/dist/billing/plan-limit-notice.d.ts +11 -10
  57. package/dist/billing/plan-limit-toast.d.ts +144 -0
  58. package/dist/billing/plan-limit-toast.js +40 -0
  59. package/dist/billing/plan-limit-toast.js.map +1 -0
  60. package/dist/billing/subscription-actions.d.ts +39 -15
  61. package/dist/billing/subscription-actions.js +9 -2
  62. package/dist/billing/subscription-actions.js.map +1 -1
  63. package/dist/billing/subscription-status-chip.d.ts +10 -9
  64. package/dist/bin/eifi1-pay-page.mjs +166 -0
  65. package/dist/chart.d.ts +11 -10
  66. package/dist/components/account-chips.d.ts +6 -1
  67. package/dist/components/account-settings.d.ts +4 -1
  68. package/dist/components/account-settings.js +2 -1
  69. package/dist/components/account-settings.js.map +1 -1
  70. package/dist/components/amount-input.d.ts +11 -10
  71. package/dist/components/autocomplete.d.ts +2 -1
  72. package/dist/components/autocomplete.js +5 -3
  73. package/dist/components/autocomplete.js.map +1 -1
  74. package/dist/components/button-group.d.ts +11 -10
  75. package/dist/components/button-group.js +1 -1
  76. package/dist/components/button-group.js.map +1 -1
  77. package/dist/components/calculator.d.ts +11 -10
  78. package/dist/components/calculator.js +3 -3
  79. package/dist/components/calculator.js.map +1 -1
  80. package/dist/components/checkbox-group.d.ts +2 -1
  81. package/dist/components/checkbox-group.js.map +1 -1
  82. package/dist/components/checkbox.d.ts +2 -1
  83. package/dist/components/checkbox.js.map +1 -1
  84. package/dist/components/chip.d.ts +2 -1
  85. package/dist/components/chip.js +19 -17
  86. package/dist/components/chip.js.map +1 -1
  87. package/dist/components/choice-card.d.ts +3 -1
  88. package/dist/components/choice-card.js +1 -1
  89. package/dist/components/choice-card.js.map +1 -1
  90. package/dist/components/combobox-core.js +2 -1
  91. package/dist/components/combobox-core.js.map +1 -1
  92. package/dist/components/combobox.d.ts +4 -3
  93. package/dist/components/combobox.js +2 -2
  94. package/dist/components/combobox.js.map +1 -1
  95. package/dist/components/confirm-dialog.d.ts +11 -10
  96. package/dist/components/confirm-dialog.js +6 -3
  97. package/dist/components/confirm-dialog.js.map +1 -1
  98. package/dist/components/copy-button.d.ts +12 -11
  99. package/dist/components/country-select.d.ts +2 -1
  100. package/dist/components/country-select.js.map +1 -1
  101. package/dist/components/danger-confirm.d.ts +11 -10
  102. package/dist/components/danger-confirm.js.map +1 -1
  103. package/dist/components/data-table-cells.d.ts +12 -1
  104. package/dist/components/data-table-filter-popover.d.ts +12 -1
  105. package/dist/components/data-table-filters.d.ts +12 -1
  106. package/dist/components/data-table-labels.d.ts +12 -1
  107. package/dist/components/data-table-pagination.d.ts +12 -1
  108. package/dist/components/data-table.d.ts +12 -1
  109. package/dist/components/data-table.js +3 -3
  110. package/dist/components/data-table.js.map +1 -1
  111. package/dist/components/date-picker.js +6 -4
  112. package/dist/components/date-picker.js.map +1 -1
  113. package/dist/components/dropdown.js +9 -1
  114. package/dist/components/dropdown.js.map +1 -1
  115. package/dist/components/entity-combobox.d.ts +3 -2
  116. package/dist/components/entity-combobox.js.map +1 -1
  117. package/dist/components/facing-pair.d.ts +11 -10
  118. package/dist/components/field-parts.d.ts +32 -4
  119. package/dist/components/field-parts.js +54 -19
  120. package/dist/components/field-parts.js.map +1 -1
  121. package/dist/components/file-button.d.ts +11 -10
  122. package/dist/components/file-button.js +3 -2
  123. package/dist/components/file-button.js.map +1 -1
  124. package/dist/components/file-dropzone.d.ts +12 -11
  125. package/dist/components/file-dropzone.js.map +1 -1
  126. package/dist/components/floating-panel.js +5 -5
  127. package/dist/components/floating-panel.js.map +1 -1
  128. package/dist/components/form-actions.d.ts +10 -9
  129. package/dist/components/form-actions.js +3 -3
  130. package/dist/components/form-actions.js.map +1 -1
  131. package/dist/components/full-bleed-dialog.js.map +1 -1
  132. package/dist/components/iban-input.d.ts +11 -10
  133. package/dist/components/inline-edit-field.d.ts +2 -1
  134. package/dist/components/inline-edit-field.js +6 -6
  135. package/dist/components/inline-edit-field.js.map +1 -1
  136. package/dist/components/language-select.d.ts +11 -10
  137. package/dist/components/legal-page.d.ts +11 -10
  138. package/dist/components/legal.d.ts +11 -10
  139. package/dist/components/list.d.ts +2 -1
  140. package/dist/components/list.js +4 -5
  141. package/dist/components/list.js.map +1 -1
  142. package/dist/components/modal.js.map +1 -1
  143. package/dist/components/money-field.d.ts +11 -10
  144. package/dist/components/month-picker.js +54 -44
  145. package/dist/components/month-picker.js.map +1 -1
  146. package/dist/components/multi-entity-combobox.d.ts +3 -2
  147. package/dist/components/multi-entity-combobox.js.map +1 -1
  148. package/dist/components/number-field.d.ts +18 -10
  149. package/dist/components/number-field.js.map +1 -1
  150. package/dist/components/number-input.d.ts +37 -10
  151. package/dist/components/number-input.js +27 -12
  152. package/dist/components/number-input.js.map +1 -1
  153. package/dist/components/numpad-sheet.d.ts +11 -10
  154. package/dist/components/numpad-sheet.js +2 -2
  155. package/dist/components/numpad-sheet.js.map +1 -1
  156. package/dist/components/phone-input.d.ts +11 -10
  157. package/dist/components/popover.js +6 -2
  158. package/dist/components/popover.js.map +1 -1
  159. package/dist/components/row-actions.d.ts +6 -5
  160. package/dist/components/row-actions.js +130 -32
  161. package/dist/components/row-actions.js.map +1 -1
  162. package/dist/components/series-chart.d.ts +11 -10
  163. package/dist/components/settings-fields.d.ts +11 -10
  164. package/dist/components/share-card.d.ts +8 -7
  165. package/dist/components/share-card.js +26 -10
  166. package/dist/components/share-card.js.map +1 -1
  167. package/dist/components/skeleton.d.ts +10 -2
  168. package/dist/components/skeleton.js.map +1 -1
  169. package/dist/components/status-dot.d.ts +1 -0
  170. package/dist/components/status-dot.js +2 -2
  171. package/dist/components/status-dot.js.map +1 -1
  172. package/dist/components/swatch-picker.d.ts +2 -1
  173. package/dist/components/swatch-picker.js.map +1 -1
  174. package/dist/components/swipeable-row.d.ts +88 -17
  175. package/dist/components/swipeable-row.js +46 -9
  176. package/dist/components/swipeable-row.js.map +1 -1
  177. package/dist/components/switch.d.ts +2 -1
  178. package/dist/components/switch.js.map +1 -1
  179. package/dist/components/table.d.ts +2 -1
  180. package/dist/components/table.js +6 -0
  181. package/dist/components/table.js.map +1 -1
  182. package/dist/components/text-link.d.ts +10 -9
  183. package/dist/components/time-input.d.ts +11 -10
  184. package/dist/components/toggle-group.d.ts +2 -1
  185. package/dist/components/toggle-group.js +1 -1
  186. package/dist/components/toggle-group.js.map +1 -1
  187. package/dist/components/translation-review-editor.d.ts +4 -0
  188. package/dist/components/translation-review-editor.js +4 -3
  189. package/dist/components/translation-review-editor.js.map +1 -1
  190. package/dist/components/translation-review-parts.d.ts +1 -0
  191. package/dist/components/translation-review.d.ts +1 -0
  192. package/dist/components/translation-review.js +15 -18
  193. package/dist/components/translation-review.js.map +1 -1
  194. package/dist/components/ui.d.ts +10 -9
  195. package/dist/components/ui.js +47 -27
  196. package/dist/components/ui.js.map +1 -1
  197. package/dist/components/use-table-state.d.ts +12 -1
  198. package/dist/components/user-avatar.d.ts +1 -0
  199. package/dist/components/write-lock.d.ts +101 -13
  200. package/dist/components/write-lock.js +37 -13
  201. package/dist/components/write-lock.js.map +1 -1
  202. package/dist/{data-table-labels-kpAAVi6g.d.ts → data-table-labels-BJ5JE_X2.d.ts} +17 -0
  203. package/dist/data-table.d.ts +12 -1
  204. package/dist/{delete-account-setting-Dy4kJgUm.d.ts → delete-account-setting-DAgGBrbn.d.ts} +393 -42
  205. package/dist/feedback/feedback-attachment.d.ts +11 -10
  206. package/dist/feedback/feedback-attachment.js +7 -7
  207. package/dist/feedback/feedback-attachment.js.map +1 -1
  208. package/dist/feedback/feedback-context.d.ts +11 -10
  209. package/dist/feedback/feedback-crash.d.ts +11 -10
  210. package/dist/feedback/feedback-dialog.d.ts +11 -10
  211. package/dist/feedback/feedback-inbox.d.ts +10 -9
  212. package/dist/feedback/feedback-inbox.js +7 -3
  213. package/dist/feedback/feedback-inbox.js.map +1 -1
  214. package/dist/feedback/feedback-labels.d.ts +11 -10
  215. package/dist/feedback/feedback-menu.d.ts +4 -3
  216. package/dist/feedback/feedback-record.d.ts +11 -10
  217. package/dist/feedback/feedback-row-detail.d.ts +11 -10
  218. package/dist/feedback/feedback-row-detail.js.map +1 -1
  219. package/dist/feedback/feedback-status-undo.d.ts +11 -10
  220. package/dist/feedback/feedback-submit.d.ts +11 -10
  221. package/dist/feedback/feedback-swipe.d.ts +11 -10
  222. package/dist/feedback/feedback-swipe.js +3 -6
  223. package/dist/feedback/feedback-swipe.js.map +1 -1
  224. package/dist/feedback/feedback-table.d.ts +11 -10
  225. package/dist/feedback/feedback-table.js.map +1 -1
  226. package/dist/feedback/feedback-thread.d.ts +11 -10
  227. package/dist/feedback/feedback-thread.js +5 -1
  228. package/dist/feedback/feedback-thread.js.map +1 -1
  229. package/dist/feedback.d.ts +11 -10
  230. package/dist/hooks/use-anchored-panel.d.ts +37 -7
  231. package/dist/hooks/use-anchored-panel.js +6 -7
  232. package/dist/hooks/use-anchored-panel.js.map +1 -1
  233. package/dist/hooks/use-file-drop.d.ts +11 -10
  234. package/dist/hooks/use-focus-trap.d.ts +8 -0
  235. package/dist/hooks/use-focus-trap.js +17 -11
  236. package/dist/hooks/use-focus-trap.js.map +1 -1
  237. package/dist/i18n/defaults.d.ts +11 -10
  238. package/dist/i18n/defaults.js +2 -0
  239. package/dist/i18n/defaults.js.map +1 -1
  240. package/dist/i18n/german.d.ts +11 -10
  241. package/dist/i18n/german.js +37 -1
  242. package/dist/i18n/german.js.map +1 -1
  243. package/dist/i18n/kit-labels.d.ts +5 -4
  244. package/dist/i18n/kit-labels.js.map +1 -1
  245. package/dist/i18n/languages.d.ts +11 -10
  246. package/dist/i18n/locales/de-CH.d.ts +11 -10
  247. package/dist/i18n/locales/en.d.ts +11 -10
  248. package/dist/i18n/locales/es.d.ts +11 -10
  249. package/dist/i18n/locales/es.js +35 -1
  250. package/dist/i18n/locales/es.js.map +1 -1
  251. package/dist/i18n/locales/fr.d.ts +11 -10
  252. package/dist/i18n/locales/fr.js +37 -1
  253. package/dist/i18n/locales/fr.js.map +1 -1
  254. package/dist/i18n/locales/hu.d.ts +11 -10
  255. package/dist/i18n/locales/hu.js +38 -1
  256. package/dist/i18n/locales/hu.js.map +1 -1
  257. package/dist/i18n/locales/it.d.ts +11 -10
  258. package/dist/i18n/locales/it.js +35 -1
  259. package/dist/i18n/locales/it.js.map +1 -1
  260. package/dist/i18n/locales/zh.d.ts +11 -10
  261. package/dist/i18n/locales/zh.js +35 -1
  262. package/dist/i18n/locales/zh.js.map +1 -1
  263. package/dist/i18n/plurals.d.ts +20 -1
  264. package/dist/i18n/plurals.js +11 -0
  265. package/dist/i18n/plurals.js.map +1 -1
  266. package/dist/i18n/review.d.ts +11 -10
  267. package/dist/i18n/review.js +8 -1
  268. package/dist/i18n/review.js.map +1 -1
  269. package/dist/index.d.ts +11 -6
  270. package/dist/index.js +40 -2
  271. package/dist/index.js.map +1 -1
  272. package/dist/landing/landing-actions.d.ts +11 -10
  273. package/dist/landing/landing-sections.d.ts +11 -10
  274. package/dist/landing/public-header.d.ts +11 -10
  275. package/dist/landing/routing.d.ts +11 -10
  276. package/dist/pay/.well-known/apple-developer-merchantid-domain-association +1 -0
  277. package/dist/pay/index.html +30 -0
  278. package/dist/pay/pay.css +126 -0
  279. package/dist/pay/pay.js +198 -0
  280. package/dist/rhf/fields.d.ts +11 -10
  281. package/dist/rhf/form.d.ts +11 -10
  282. package/dist/rhf.d.ts +11 -10
  283. package/dist/settings/settings-section.d.ts +11 -10
  284. package/dist/shell/app-shell.d.ts +10 -9
  285. package/dist/shell/top-bar-brand.d.ts +11 -10
  286. package/dist/shell/topbar-action-menu.d.ts +1 -0
  287. package/dist/shell.d.ts +11 -10
  288. package/dist/testing/css-variables.d.ts +74 -0
  289. package/dist/testing/css-variables.generated.d.ts +7 -0
  290. package/dist/testing/css-variables.generated.js +8 -0
  291. package/dist/testing/css-variables.generated.js.map +1 -0
  292. package/dist/testing/css-variables.js +93 -0
  293. package/dist/testing/css-variables.js.map +1 -0
  294. package/dist/testing/index.d.ts +1 -0
  295. package/dist/testing/index.js +12 -0
  296. package/dist/testing/index.js.map +1 -0
  297. package/dist/theme/contrast-tokens.d.ts +44 -1
  298. package/dist/theme/contrast-tokens.js +21 -0
  299. package/dist/theme/contrast-tokens.js.map +1 -1
  300. package/dist/theme/contrast.d.ts +2 -2
  301. package/dist/theme/palette-derive.js +60 -11
  302. package/dist/theme/palette-derive.js.map +1 -1
  303. package/dist/theme/palette-presets.js +45 -43
  304. package/dist/theme/palette-presets.js.map +1 -1
  305. package/dist/wizard/stepper-nav.d.ts +12 -11
  306. package/dist/wizard/stepper-nav.js.map +1 -1
  307. package/dist/wizard.d.ts +11 -10
  308. package/package.json +10 -2
  309. package/src/account/delete-account-setting.tsx +6 -1
  310. package/src/account/email-change-setting.tsx +9 -3
  311. package/src/account/sessions-setting.tsx +7 -2
  312. package/src/admin/admin-action-confirm.tsx +2 -1
  313. package/src/admin/invitations-panel.tsx +9 -3
  314. package/src/admin/plan-change.tsx +487 -0
  315. package/src/admin/reviewer-scope-editor.tsx +2 -1
  316. package/src/admin/role-select.tsx +2 -1
  317. package/src/admin/user-roster.tsx +5 -3
  318. package/src/auth/auth-errors.ts +25 -2
  319. package/src/auth/complete-name-dialog.tsx +6 -2
  320. package/src/billing/billing-banner.tsx +3 -1
  321. package/src/billing/billing-labels.ts +45 -0
  322. package/src/billing/billing-lock.ts +36 -3
  323. package/src/billing/billing-overview.ts +58 -0
  324. package/src/billing/checkout-processing.ts +391 -0
  325. package/src/billing/checkout-return.ts +90 -0
  326. package/src/billing/pay-page.ts +246 -0
  327. package/src/billing/plan-limit-toast.tsx +91 -0
  328. package/src/billing/subscription-actions.tsx +41 -8
  329. package/src/components/account-settings.tsx +6 -2
  330. package/src/components/autocomplete.tsx +10 -4
  331. package/src/components/button-group.tsx +4 -1
  332. package/src/components/calculator.tsx +10 -6
  333. package/src/components/checkbox-group.tsx +2 -2
  334. package/src/components/checkbox.tsx +2 -1
  335. package/src/components/chip.tsx +37 -32
  336. package/src/components/choice-card.tsx +4 -2
  337. package/src/components/combobox-core.tsx +5 -2
  338. package/src/components/combobox.tsx +8 -6
  339. package/src/components/confirm-dialog.tsx +13 -6
  340. package/src/components/country-select.tsx +2 -2
  341. package/src/components/danger-confirm.tsx +2 -2
  342. package/src/components/data-table.tsx +20 -9
  343. package/src/components/date-picker.tsx +10 -7
  344. package/src/components/dropdown.tsx +12 -2
  345. package/src/components/entity-combobox.tsx +3 -3
  346. package/src/components/field-parts.tsx +61 -14
  347. package/src/components/file-button.tsx +5 -4
  348. package/src/components/file-dropzone.tsx +2 -2
  349. package/src/components/floating-panel.tsx +7 -5
  350. package/src/components/form-actions.tsx +12 -5
  351. package/src/components/full-bleed-dialog.tsx +6 -0
  352. package/src/components/inline-edit-field.tsx +13 -13
  353. package/src/components/list.tsx +10 -9
  354. package/src/components/modal.tsx +5 -0
  355. package/src/components/month-picker.tsx +8 -2
  356. package/src/components/multi-entity-combobox.tsx +3 -3
  357. package/src/components/number-field.tsx +7 -0
  358. package/src/components/number-input.tsx +71 -11
  359. package/src/components/numpad-sheet.tsx +8 -4
  360. package/src/components/popover.tsx +6 -2
  361. package/src/components/row-actions.tsx +208 -58
  362. package/src/components/share-card.tsx +67 -13
  363. package/src/components/skeleton.tsx +10 -2
  364. package/src/components/status-dot.tsx +7 -7
  365. package/src/components/swatch-picker.tsx +2 -2
  366. package/src/components/swipeable-row.tsx +138 -27
  367. package/src/components/switch.tsx +2 -1
  368. package/src/components/table.tsx +8 -1
  369. package/src/components/toggle-group.tsx +5 -3
  370. package/src/components/translation-review-editor.tsx +8 -3
  371. package/src/components/translation-review.tsx +18 -22
  372. package/src/components/ui.tsx +92 -43
  373. package/src/components/write-lock.tsx +150 -24
  374. package/src/feedback/feedback-attachment.tsx +13 -9
  375. package/src/feedback/feedback-inbox.tsx +10 -6
  376. package/src/feedback/feedback-row-detail.tsx +3 -2
  377. package/src/feedback/feedback-swipe.tsx +6 -11
  378. package/src/feedback/feedback-table.tsx +2 -1
  379. package/src/feedback/feedback-thread.tsx +20 -1
  380. package/src/hooks/use-anchored-panel.ts +60 -14
  381. package/src/hooks/use-focus-trap.ts +55 -12
  382. package/src/i18n/defaults.ts +2 -0
  383. package/src/i18n/german.ts +41 -0
  384. package/src/i18n/kit-labels.tsx +4 -0
  385. package/src/i18n/locales/es.ts +35 -0
  386. package/src/i18n/locales/fr.ts +41 -0
  387. package/src/i18n/locales/hu.ts +39 -0
  388. package/src/i18n/locales/it.ts +36 -0
  389. package/src/i18n/locales/zh.ts +34 -0
  390. package/src/i18n/plurals.ts +29 -0
  391. package/src/i18n/review.ts +7 -0
  392. package/src/index.ts +51 -5
  393. package/src/testing/css-variables.generated.ts +112 -0
  394. package/src/testing/css-variables.ts +191 -0
  395. package/src/testing/index.ts +13 -0
  396. package/src/theme/contrast-tokens.ts +53 -2
  397. package/src/theme/palette-derive.ts +87 -10
  398. package/src/theme/palette-presets.ts +45 -43
  399. package/src/wizard/stepper-nav.tsx +2 -1
  400. package/tokens.css +324 -46
@@ -1488,14 +1488,53 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
1488
1488
  // Both figures arrive formatted and stay bare, as `characterCount.count` (convention 3).
1489
1489
  usage: (used, limit) => `${used} / ${limit}`,
1490
1490
  contactSubject: (dimension) => `Csomagkorlát: ${dimension}`,
1491
+ // The toast's figure line (§14.11) and the plan change's over-limit lines (§14.12);
1492
+ // the figures bare, as `usage` (convention 3).
1493
+ limitUsageLine: (dimension, used, limit) => `${dimension}: ${used} / ${limit}`,
1491
1494
  manage: "Fizetés és számlák",
1492
1495
  cancel: "Előfizetés lemondása",
1496
+ // §14.5: no customer at the provider yet, so no portal to open.
1497
+ notAtProvider:
1498
+ "Egyelőre nincs mit kezelni. A fizetések és a számlák itt jelennek meg, amint fizetős csomagja lesz.",
1499
+ // §14.4: the pay page's lines, built into its bundle — in Hungarian, though Paddle's
1500
+ // checkout beside them is English (it has no Hungarian).
1501
+ payOpening: "A biztonságos fizetés megnyitása…",
1502
+ payNothing: "Itt nincs mit kifizetni. Csomag választásához térjen vissza az alkalmazásba.",
1503
+ payFailed: "A fizetést nem sikerült megnyitni. Kérjük, lépjen vissza, és próbálja újra egy kis idő múlva.",
1504
+ payBack: "A fizetés bezárult. Visszaléphet, vagy a megnyitásához töltse újra ezt az oldalt.",
1493
1505
  // No plural after a numeral (convention 2).
1494
1506
  waitingChanges: (count) => `${n(count)} módosítás csomagra vár`,
1495
1507
  // "Elvetés", as `wizard.cancelConfirmLabel`.
1496
1508
  discardWaiting: "Várakozó módosítások elvetése",
1497
1509
  notConfigured: "A fizetés még nincs beállítva. Kérjük, próbálja újra később.",
1498
1510
  disabled: "Az előfizetés itt nem érhető el.",
1511
+ // §14.2: server-kit 0.7's refusals. "Fizetés és számlák", as `manage`.
1512
+ providerUnavailable: "A fizetési szolgáltató jelenleg nem érhető el. Kérjük, próbálja újra egy kis idő múlva.",
1513
+ alreadySubscribed: "Már van előfizetése. A csomag módosításához nyissa meg a „Fizetés és számlák” részt.",
1514
+ planNotSold:
1515
+ "Ez a csomag ehhez a számlázási időszakhoz vagy pénznemhez nem érhető el. Kérjük, válasszon másikat.",
1516
+ },
1517
+ // 0.33.0 — docs/billing-harmonization.md §14.12: the operator's plan parts, "csomag"
1518
+ // as in `billing`. A plan's name takes no case ending: it follows a colon or an arrow.
1519
+ planChange: {
1520
+ column: "Csomag",
1521
+ title: "Csomag módosítása",
1522
+ confirm: "Csomag módosítása",
1523
+ plan: "Csomag",
1524
+ current: (plan) => `Jelenlegi csomag: ${plan}`,
1525
+ keepsItems: "A kisebb csomag csak újak létrehozását tiltja; semmi sem törlődik.",
1526
+ until: "Ingyenes eddig",
1527
+ untilHint: "Hagyja üresen, ha nincs vége. A futó béta megtartja a saját lejáratát.",
1528
+ needsChange: "Válasszon másik csomagot vagy egy záró dátumot.",
1529
+ changed: (from, to) => `Csomag módosítva: ${from} → ${to}.`,
1530
+ set: (to) => `Beállított csomag: ${to}.`,
1531
+ keptBeta: "A béta megtartja a lejáratát; csak a csomag változott.",
1532
+ untilDone: (date) => `Ingyenes eddig: ${date}.`,
1533
+ overLimit: "Az új csomag korlátja felett: semmi sem törlődik, de újak nem hozhatók létre.",
1534
+ // The figures bare, as `billing.usage` (convention 3), and the app's word after
1535
+ // them, as `dataTable.filterResults` ("1 / 5 költségvetés"): since 0.33.1 it is the
1536
+ // word as it reads after a number, which stays singular here (convention 2).
1537
+ usageOf: (used, limit, dimension) => `${used} / ${limit} ${dimension}`,
1499
1538
  },
1500
1539
  // 0.32.0 — docs/text-size-harmonization.md §6: the text-size and contrast settings in
1501
1540
  // the "Megjelenés" group.
@@ -1500,14 +1500,50 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
1500
1500
  // Both figures arrive formatted; "di", as `characterCount.count`.
1501
1501
  usage: (used, limit) => `${used} di ${limit}`,
1502
1502
  contactSubject: (dimension) => `Limite del piano: ${dimension}`,
1503
+ // The toast's figure line (§14.11) and the plan change's over-limit lines (§14.12).
1504
+ limitUsageLine: (dimension, used, limit) => `${dimension}: ${used} di ${limit}`,
1503
1505
  manage: "Pagamento e fatture",
1504
1506
  cancel: "Disdici l’abbonamento",
1507
+ // §14.5: no customer at the provider yet, so no portal to open.
1508
+ notAtProvider:
1509
+ "Ancora niente da gestire. Pagamenti e fatture compariranno qui quando avrà un piano a pagamento.",
1510
+ // §14.4: the pay page's lines, built into its bundle. "Lei".
1511
+ payOpening: "Apertura del pagamento sicuro…",
1512
+ payNothing: "Qui non c’è nulla da pagare. Per scegliere un piano, torni all’app.",
1513
+ payFailed: "Non è stato possibile aprire il pagamento. Torni indietro e riprovi tra un momento.",
1514
+ payBack: "Il pagamento è stato chiuso. Può tornare indietro, oppure ricaricare questa pagina per riaprirlo.",
1505
1515
  waitingChanges: (count) =>
1506
1516
  `${n(count)} ${plural(count, "modifica in attesa", "modifiche in attesa")} di un piano`,
1507
1517
  // "Scarta", as `wizard.cancelConfirmLabel`.
1508
1518
  discardWaiting: "Scarta le modifiche in attesa",
1509
1519
  notConfigured: "I pagamenti non sono ancora configurati. Riprovi più tardi.",
1510
1520
  disabled: "Gli abbonamenti non sono disponibili qui.",
1521
+ // §14.2: server-kit 0.7's refusals. "Pagamento e fatture", as `manage`. "Lei".
1522
+ providerUnavailable: "Il fornitore dei pagamenti non è raggiungibile al momento. Riprovi tra un momento.",
1523
+ alreadySubscribed: "Ha già un abbonamento. Per cambiare piano, vada su «Pagamento e fatture».",
1524
+ planNotSold:
1525
+ "Questo piano non è disponibile per questo periodo di fatturazione o questa valuta. Ne scelga un altro.",
1526
+ },
1527
+ // 0.33.0 — docs/billing-harmonization.md §14.12: the operator's plan parts, "piano" as
1528
+ // in `billing`. "Lei" in sentences, the imperative on the title and the button.
1529
+ planChange: {
1530
+ column: "Piano",
1531
+ title: "Cambia piano",
1532
+ confirm: "Cambia piano",
1533
+ plan: "Piano",
1534
+ current: (plan) => `Piano attuale: ${plan}`,
1535
+ keepsItems: "Un piano più piccolo blocca solo la creazione di nuovi elementi; non viene eliminato nulla.",
1536
+ until: "Gratuito fino al",
1537
+ untilHint: "Lasci vuoto per nessuna scadenza. Una beta in corso mantiene la propria scadenza.",
1538
+ needsChange: "Scelga un altro piano o una data di fine.",
1539
+ changed: (from, to) => `Piano cambiato da ${from} a ${to}.`,
1540
+ set: (to) => `Piano impostato su ${to}.`,
1541
+ keptBeta: "La beta mantiene la sua scadenza; è cambiato solo il piano.",
1542
+ untilDone: (date) => `Gratuito fino al ${date}.`,
1543
+ overLimit: "Oltre il limite del nuovo piano: non viene rimosso nulla, i nuovi elementi sono bloccati.",
1544
+ // Figures formatted; "di", as `billing.usage`. The app's word follows the limit,
1545
+ // in its form (0.33.1): "1 di 1 budget", "1 di 5 budget".
1546
+ usageOf: (used, limit, dimension) => `${used} di ${limit} ${dimension}`,
1511
1547
  },
1512
1548
  // 0.32.0 — docs/text-size-harmonization.md §6: the text-size and contrast settings in
1513
1549
  // the "Aspetto" group.
@@ -1425,13 +1425,47 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
1425
1425
  // Both figures arrive formatted; written as `characterCount.count` writes them.
1426
1426
  usage: (used, limit) => `${used}/${limit}`,
1427
1427
  contactSubject: (dimension) => `套餐上限:${dimension}`,
1428
+ // The toast's figure line (§14.11) and the plan change's over-limit lines (§14.12);
1429
+ // written as `usage` writes the figures.
1430
+ limitUsageLine: (dimension, used, limit) => `${dimension}:${used}/${limit}`,
1428
1431
  manage: "付款与发票",
1429
1432
  cancel: "取消订阅",
1433
+ // §14.5: no customer at the provider yet, so no portal to open.
1434
+ notAtProvider: "暂无可管理的内容。开通付费套餐后,付款和发票会显示在这里。",
1435
+ // §14.4: the pay page's lines, built into its bundle.
1436
+ payOpening: "正在打开安全支付页面…",
1437
+ payNothing: "这里没有需要支付的款项。如需选择套餐,请返回应用。",
1438
+ payFailed: "无法打开支付页面。请返回后稍候再试。",
1439
+ payBack: "支付页面已关闭。您可以返回,或重新加载此页面以再次打开。",
1430
1440
  waitingChanges: (count) => `${n(count)} 项修改正在等待套餐`,
1431
1441
  // "放弃", as `wizard.cancelConfirmLabel`.
1432
1442
  discardWaiting: "放弃等待中的修改",
1433
1443
  notConfigured: "付款尚未设置,请稍后再试。",
1434
1444
  disabled: "此处不提供订阅。",
1445
+ // §14.2: server-kit 0.7's refusals. "付款与发票", as `manage`.
1446
+ providerUnavailable: "暂时无法连接支付服务商,请稍后再试。",
1447
+ alreadySubscribed: "您已有订阅。如需更改套餐,请前往“付款与发票”。",
1448
+ planNotSold: "该套餐不支持此计费周期或货币,请选择其他套餐。",
1449
+ },
1450
+ // 0.33.0 — docs/billing-harmonization.md §14.12: the operator's plan parts, "套餐" as
1451
+ // in `billing`. "测试版", as `landing.beta`.
1452
+ planChange: {
1453
+ column: "套餐",
1454
+ title: "更改套餐",
1455
+ confirm: "更改套餐",
1456
+ plan: "套餐",
1457
+ current: (plan) => `当前套餐:${plan}`,
1458
+ keepsItems: "较小的套餐只会阻止新建更多内容,不会删除任何内容。",
1459
+ until: "免费至",
1460
+ untilHint: "留空表示没有结束日期。正在进行的测试版保留其自身的结束日期。",
1461
+ needsChange: "请选择其他套餐或结束日期。",
1462
+ changed: (from, to) => `套餐已从 ${from} 更改为 ${to}。`,
1463
+ set: (to) => `套餐已设为 ${to}。`,
1464
+ keptBeta: "测试版保留其结束日期;只更改了套餐。",
1465
+ untilDone: (date) => `免费至 ${date}。`,
1466
+ overLimit: "超出新套餐的上限:不会删除任何内容,但无法新建。",
1467
+ // No plural: the app's word reads the same after any number (0.33.1).
1468
+ usageOf: (used, limit, dimension) => `${used}/${limit} ${dimension}`,
1435
1469
  },
1436
1470
  // 0.32.0 — docs/text-size-harmonization.md §6: the text-size and contrast settings in
1437
1471
  // the "外观" group.
@@ -52,3 +52,32 @@ function pluralCategories(locale: string, type: Intl.PluralRuleType): readonly s
52
52
  return [];
53
53
  }
54
54
  }
55
+
56
+ /**
57
+ * A word in the plural forms a count can ask for, `other` required: an app's
58
+ * `key_one` / `key_other` pair, or any of CLDR's categories (`zero`, `one`, `two`, `few`,
59
+ * `many`). A category left out reads `other`, the stand-in {@link withAllPlurals} fills
60
+ * a catalogue with — so English's two forms serve every language, as in the apps'
61
+ * catalogues.
62
+ *
63
+ * { one: t("planUsage.budget_one"), other: t("planUsage.budget_other") }
64
+ */
65
+ export type PluralForms = { other: string } & Partial<Record<Intl.LDMLPluralRule, string>>;
66
+
67
+ /**
68
+ * The form of `forms` that `count` takes in `locale` — CLDR's cardinal category for it,
69
+ * through `Intl.PluralRules`, else `other`. A locale `Intl` cannot read reads as the
70
+ * runtime's, as everywhere the kit formats (and `undefined` is the runtime's). For the
71
+ * kit's own parts that put an app's word after a count: `planColumn`'s usage.
72
+ */
73
+ export function pluralForm(count: number, forms: PluralForms, locale?: string): string {
74
+ return forms[pluralCategory(count, locale)] ?? forms.other;
75
+ }
76
+
77
+ function pluralCategory(count: number, locale: string | undefined): Intl.LDMLPluralRule {
78
+ try {
79
+ return new Intl.PluralRules(locale).select(count);
80
+ } catch {
81
+ return new Intl.PluralRules().select(count);
82
+ }
83
+ }
@@ -366,4 +366,11 @@ export const KIT_LABEL_SAMPLES: Readonly<Record<string, readonly (readonly unkno
366
366
  "billing.usage": [["{{used}}", "{{limit}}"]],
367
367
  "billing.contactSubject": [["{{dimension}}"]],
368
368
  "billing.waitingChanges": one,
369
+ // 0.33.0: the limit's figure line (§14.11) and the operator's plan parts (§14.12).
370
+ "billing.limitUsageLine": [["{{dimension}}", "{{used}}", "{{limit}}"]],
371
+ "planChange.current": [["{{plan}}"]],
372
+ "planChange.changed": [["{{from}}", "{{to}}"]],
373
+ "planChange.set": [["{{to}}"]],
374
+ "planChange.untilDone": [["{{date}}"]],
375
+ "planChange.usageOf": [["{{used}}", "{{limit}}", "{{dimension}}"]],
369
376
  };
package/src/index.ts CHANGED
@@ -88,7 +88,7 @@ export * from "./components/search-field";
88
88
  export * from "./components/dropdown";
89
89
  export * from "./components/popover";
90
90
  export { SwipeableRow } from "./components/swipeable-row";
91
- export type { SwipeAction, SwipeableRowProps } from "./components/swipeable-row";
91
+ export type { SwipeAction, SwipePaint, SwipeTone, SwipeableRowProps } from "./components/swipeable-row";
92
92
  export * from "./components/calculator";
93
93
  export * from "./components/numpad-sheet";
94
94
  export * from "./components/number-input";
@@ -214,8 +214,11 @@ export * from "./components/description-list";
214
214
  export * from "./components/form-actions";
215
215
  // 0.18: lock every opted-in commit under one provider, the reason in its tooltip
216
216
  // (Kurvenschmiede 2). `useCommitReason` stays internal.
217
- export { WriteLockProvider, useWriteLock, DEFAULT_WRITE_LOCK_LABELS } from "./components/write-lock";
218
- export type { WriteLock, WriteLockLabels, WriteLockProviderProps } from "./components/write-lock";
217
+ // 0.33: a lock says its source, and a control can be exempt from one
218
+ // (docs/billing-harmonization.md §12.36): the kinds, the holds, `CommitScope`,
219
+ // `COMMIT_EXCEPT_BILLING` and the pure `writeLockFor`.
220
+ export { WriteLockProvider, useWriteLock, writeLockFor, COMMIT_EXCEPT_BILLING, DEFAULT_WRITE_LOCK_LABELS } from "./components/write-lock";
221
+ export type { WriteLock, WriteLockLabels, WriteLockProviderProps, WriteLockKind, WriteLockHold, CommitScope } from "./components/write-lock";
219
222
  // 0.18: the parts both apps' admin rosters repeat (Kurvenschmiede 6).
220
223
  export { RoleChip, AccountStateChip, DateMark, dateColumn, DEFAULT_ACCOUNT_STATE_LABELS, ACCOUNT_STATE_TONES } from "./components/account-chips";
221
224
  export type { RoleChipProps, RoleDefinition, RoleVocabulary, AccountState, AccountStateLabels, AccountStateChipProps, DateMarkProps, DateColumnOptions } from "./components/account-chips";
@@ -399,8 +402,10 @@ export { kitLabelStrings } from "./i18n/review";
399
402
  export type { KitLabelStringsOptions } from "./i18n/review";
400
403
  // The seven languages, how an app resolves one, and the kit catalogue loader for it.
401
404
  export * from "./i18n/languages";
402
- // CLDR plural categories for an app's i18next catalogue, filled from `_other`.
405
+ // CLDR plural categories for an app's i18next catalogue, filled from `_other`; and the
406
+ // forms of an app's word a kit part picks from by count (0.33.1, `PlanColumnUsage.label`).
403
407
  export { withAllPlurals } from "./i18n/plurals";
408
+ export type { PluralForms } from "./i18n/plurals";
404
409
  // Translation review (0.19): one contract for kastlan's and keksdose's review pages —
405
410
  // the pure rows/status/placeholder logic and the presentational page parts.
406
411
  export {
@@ -784,6 +789,7 @@ export type {
784
789
  RowActionsCollapse,
785
790
  RowActionsSize,
786
791
  RowActionsColumnOptions,
792
+ RowActionTone,
787
793
  } from "./components/row-actions";
788
794
  export { useLargeText, useCoarsePointer, useInlineFacts } from "./hooks/use-large-text";
789
795
  export type { AppearanceLabels } from "./components/appearance-labels";
@@ -803,12 +809,52 @@ export { PlanLimitNotice, planLimitMailto } from "./billing/plan-limit-notice";
803
809
  export type { PlanLimitNoticeProps } from "./billing/plan-limit-notice";
804
810
  export { isPlanLimit } from "./billing/plan-limit";
805
811
  export type { PlanLimitRefusal } from "./billing/plan-limit";
806
- export { combineWriteLocks, useBillingLockReason } from "./billing/billing-lock";
812
+ // 0.33.0: sources name their kind, the combined lock holds them all, and billing's is one
813
+ // hook (docs/billing-harmonization.md §12.36).
814
+ export { combineWriteLocks, useBillingLockReason, useBillingWriteLock } from "./billing/billing-lock";
807
815
  export type { WriteLockSource, CombinedWriteLock, BillingLockReasonOptions } from "./billing/billing-lock";
808
816
  export { billingLockAt, isBillingReadOnly, billingDaysLeft } from "./billing/billing-standing";
809
817
  export type { BillingStanding } from "./billing/billing-standing";
810
818
  export { SubscriptionActions } from "./billing/subscription-actions";
811
819
  export type { SubscriptionActionsProps } from "./billing/subscription-actions";
820
+ // ── 0.33.0: billing's round 0.33 (docs/billing-harmonization.md §14) ──
821
+ // The way back from a checkout and its "processing", router-agnostic (§14.4).
822
+ export {
823
+ CHECKOUT_RETURN_PARAM,
824
+ CHECKOUT_RETURN_VALUE,
825
+ isCheckoutReturn,
826
+ withoutCheckoutReturn,
827
+ checkoutReturnUrl,
828
+ } from "./billing/checkout-return";
829
+ export { checkoutFingerprint, checkoutLanded, noteCheckoutStarted, useCheckoutProcessing } from "./billing/checkout-processing";
830
+ export type { CheckoutOverview, CheckoutProcessingOptions } from "./billing/checkout-processing";
831
+ // The link to the pay page and Paddle's locale (§14.4); the page itself ships as dist/pay/.
832
+ export { PAY_PAGE_LANG_PARAM, paddleLocale, payPageUrl } from "./billing/pay-page";
833
+ export type { PaddleEnvironment } from "./billing/pay-page";
834
+ // The API's shapes the parts read, server-kit 0.7's (§4, §14.5), and the plan limit as
835
+ // a toast (§14.11).
836
+ export type { BillingOverview, SubscriptionSource, PortalTarget, PortalRequest } from "./billing/billing-overview";
837
+ export { usePlanLimitToast } from "./billing/plan-limit-toast";
838
+ export type { PlanLimitToastOptions } from "./billing/plan-limit-toast";
839
+ // The operator's plan parts (§14.12).
840
+ export {
841
+ planColumn,
842
+ usePlanColumn,
843
+ PlanChangeConfirm,
844
+ usePlanChangeResult,
845
+ DEFAULT_PLAN_CHANGE_LABELS,
846
+ } from "./admin/plan-change";
847
+ export type {
848
+ PlanChangeLabels,
849
+ PlanColumnOptions,
850
+ PlanColumnUsage,
851
+ PlanChange,
852
+ PlanChangeConfirmProps,
853
+ PlanChangeOutcome,
854
+ PlanChangeTone,
855
+ PlanChangeLine,
856
+ PlanChangeResultOptions,
857
+ } from "./admin/plan-change";
812
858
 
813
859
  // ── 0.22.0: the inputs round (kastlan's, keksdose's and Kurvenschmiede's audits) ──
814
860
  export * from "./components/checkbox-group";
@@ -0,0 +1,112 @@
1
+ // GENERATED by scripts/gen-kit-css-variables.mjs — do not edit by hand. Re-run it after
2
+ // changing tokens.css or upgrading Tailwind; src/__tests__/token-vars-declared.test.ts
3
+ // fails while this is stale.
4
+
5
+ /** Every custom property tokens.css declares, `@theme inline` names and `--app-nav-h`
6
+ * left out (100 names). */
7
+ export const KIT_NAMES =
8
+ "--bg-active --bg-hover --bg-inverse --bg-page --bg-surface --bg-surface-2 --border " +
9
+ "--border-strong --brand --brand-bg --brand-bg-hover --brand-contrast --brand-hover --brand-muted " +
10
+ "--breakpoint-3xl --chart-1 --chart-2 --chart-3 --chart-4 --chart-5 --chart-6 --chart-7 --chart-8 " +
11
+ "--chart-9 --danger --danger-bg --danger-border --danger-border-strong --danger-contrast " +
12
+ "--danger-hover --flyout-from --focus-ring-width --hue-blue --hue-blue-bg --hue-blue-border " +
13
+ "--hue-blue-contrast --hue-indigo --hue-indigo-bg --hue-indigo-border --hue-indigo-contrast " +
14
+ "--hue-orange --hue-orange-bg --hue-orange-border --hue-orange-contrast --hue-purple " +
15
+ "--hue-purple-bg --hue-purple-border --hue-purple-contrast --hue-teal --hue-teal-bg " +
16
+ "--hue-teal-border --hue-teal-contrast --info --info-bg --info-border --info-contrast --media-ink " +
17
+ "--media-scrim --media-scrim-hover --money-expense --money-expense-contrast --money-income " +
18
+ "--money-income-contrast --money-net --money-net-contrast --money-neutral " +
19
+ "--money-neutral-contrast --neutral --neutral-contrast --status-edited --status-error " +
20
+ "--status-pending --status-synced --success --success-bg --success-border --success-contrast " +
21
+ "--text-caption --text-inverse --text-micro --text-muted --text-placeholder --text-primary " +
22
+ "--text-secondary --toast-action-bg --toast-action-fg --toast-danger-bg --toast-danger-border " +
23
+ "--toast-info-bg --toast-info-border --toast-success-bg --toast-success-border --toast-warning-bg " +
24
+ "--toast-warning-border --warning --warning-bg --warning-border --warning-border-strong " +
25
+ "--warning-contrast --z-toast";
26
+
27
+ /** The theme variables of Tailwind 4.3.3's `theme.css` (413 names). */
28
+ export const TAILWIND_THEME_NAMES =
29
+ "--animate-bounce --animate-ping --animate-pulse --animate-spin --aspect-video --blur-2xl " +
30
+ "--blur-3xl --blur-lg --blur-md --blur-sm --blur-xl --blur-xs --breakpoint-2xl --breakpoint-lg " +
31
+ "--breakpoint-md --breakpoint-sm --breakpoint-xl --color-amber-100 --color-amber-200 " +
32
+ "--color-amber-300 --color-amber-400 --color-amber-50 --color-amber-500 --color-amber-600 " +
33
+ "--color-amber-700 --color-amber-800 --color-amber-900 --color-amber-950 --color-black " +
34
+ "--color-blue-100 --color-blue-200 --color-blue-300 --color-blue-400 --color-blue-50 " +
35
+ "--color-blue-500 --color-blue-600 --color-blue-700 --color-blue-800 --color-blue-900 " +
36
+ "--color-blue-950 --color-cyan-100 --color-cyan-200 --color-cyan-300 --color-cyan-400 " +
37
+ "--color-cyan-50 --color-cyan-500 --color-cyan-600 --color-cyan-700 --color-cyan-800 " +
38
+ "--color-cyan-900 --color-cyan-950 --color-emerald-100 --color-emerald-200 --color-emerald-300 " +
39
+ "--color-emerald-400 --color-emerald-50 --color-emerald-500 --color-emerald-600 " +
40
+ "--color-emerald-700 --color-emerald-800 --color-emerald-900 --color-emerald-950 " +
41
+ "--color-fuchsia-100 --color-fuchsia-200 --color-fuchsia-300 --color-fuchsia-400 " +
42
+ "--color-fuchsia-50 --color-fuchsia-500 --color-fuchsia-600 --color-fuchsia-700 " +
43
+ "--color-fuchsia-800 --color-fuchsia-900 --color-fuchsia-950 --color-gray-100 --color-gray-200 " +
44
+ "--color-gray-300 --color-gray-400 --color-gray-50 --color-gray-500 --color-gray-600 " +
45
+ "--color-gray-700 --color-gray-800 --color-gray-900 --color-gray-950 --color-green-100 " +
46
+ "--color-green-200 --color-green-300 --color-green-400 --color-green-50 --color-green-500 " +
47
+ "--color-green-600 --color-green-700 --color-green-800 --color-green-900 --color-green-950 " +
48
+ "--color-indigo-100 --color-indigo-200 --color-indigo-300 --color-indigo-400 --color-indigo-50 " +
49
+ "--color-indigo-500 --color-indigo-600 --color-indigo-700 --color-indigo-800 --color-indigo-900 " +
50
+ "--color-indigo-950 --color-lime-100 --color-lime-200 --color-lime-300 --color-lime-400 " +
51
+ "--color-lime-50 --color-lime-500 --color-lime-600 --color-lime-700 --color-lime-800 " +
52
+ "--color-lime-900 --color-lime-950 --color-mauve-100 --color-mauve-200 --color-mauve-300 " +
53
+ "--color-mauve-400 --color-mauve-50 --color-mauve-500 --color-mauve-600 --color-mauve-700 " +
54
+ "--color-mauve-800 --color-mauve-900 --color-mauve-950 --color-mist-100 --color-mist-200 " +
55
+ "--color-mist-300 --color-mist-400 --color-mist-50 --color-mist-500 --color-mist-600 " +
56
+ "--color-mist-700 --color-mist-800 --color-mist-900 --color-mist-950 --color-neutral-100 " +
57
+ "--color-neutral-200 --color-neutral-300 --color-neutral-400 --color-neutral-50 " +
58
+ "--color-neutral-500 --color-neutral-600 --color-neutral-700 --color-neutral-800 " +
59
+ "--color-neutral-900 --color-neutral-950 --color-olive-100 --color-olive-200 --color-olive-300 " +
60
+ "--color-olive-400 --color-olive-50 --color-olive-500 --color-olive-600 --color-olive-700 " +
61
+ "--color-olive-800 --color-olive-900 --color-olive-950 --color-orange-100 --color-orange-200 " +
62
+ "--color-orange-300 --color-orange-400 --color-orange-50 --color-orange-500 --color-orange-600 " +
63
+ "--color-orange-700 --color-orange-800 --color-orange-900 --color-orange-950 --color-pink-100 " +
64
+ "--color-pink-200 --color-pink-300 --color-pink-400 --color-pink-50 --color-pink-500 " +
65
+ "--color-pink-600 --color-pink-700 --color-pink-800 --color-pink-900 --color-pink-950 " +
66
+ "--color-purple-100 --color-purple-200 --color-purple-300 --color-purple-400 --color-purple-50 " +
67
+ "--color-purple-500 --color-purple-600 --color-purple-700 --color-purple-800 --color-purple-900 " +
68
+ "--color-purple-950 --color-red-100 --color-red-200 --color-red-300 --color-red-400 " +
69
+ "--color-red-50 --color-red-500 --color-red-600 --color-red-700 --color-red-800 --color-red-900 " +
70
+ "--color-red-950 --color-rose-100 --color-rose-200 --color-rose-300 --color-rose-400 " +
71
+ "--color-rose-50 --color-rose-500 --color-rose-600 --color-rose-700 --color-rose-800 " +
72
+ "--color-rose-900 --color-rose-950 --color-sky-100 --color-sky-200 --color-sky-300 " +
73
+ "--color-sky-400 --color-sky-50 --color-sky-500 --color-sky-600 --color-sky-700 --color-sky-800 " +
74
+ "--color-sky-900 --color-sky-950 --color-slate-100 --color-slate-200 --color-slate-300 " +
75
+ "--color-slate-400 --color-slate-50 --color-slate-500 --color-slate-600 --color-slate-700 " +
76
+ "--color-slate-800 --color-slate-900 --color-slate-950 --color-stone-100 --color-stone-200 " +
77
+ "--color-stone-300 --color-stone-400 --color-stone-50 --color-stone-500 --color-stone-600 " +
78
+ "--color-stone-700 --color-stone-800 --color-stone-900 --color-stone-950 --color-taupe-100 " +
79
+ "--color-taupe-200 --color-taupe-300 --color-taupe-400 --color-taupe-50 --color-taupe-500 " +
80
+ "--color-taupe-600 --color-taupe-700 --color-taupe-800 --color-taupe-900 --color-taupe-950 " +
81
+ "--color-teal-100 --color-teal-200 --color-teal-300 --color-teal-400 --color-teal-50 " +
82
+ "--color-teal-500 --color-teal-600 --color-teal-700 --color-teal-800 --color-teal-900 " +
83
+ "--color-teal-950 --color-violet-100 --color-violet-200 --color-violet-300 --color-violet-400 " +
84
+ "--color-violet-50 --color-violet-500 --color-violet-600 --color-violet-700 --color-violet-800 " +
85
+ "--color-violet-900 --color-violet-950 --color-white --color-yellow-100 --color-yellow-200 " +
86
+ "--color-yellow-300 --color-yellow-400 --color-yellow-50 --color-yellow-500 --color-yellow-600 " +
87
+ "--color-yellow-700 --color-yellow-800 --color-yellow-900 --color-yellow-950 --color-zinc-100 " +
88
+ "--color-zinc-200 --color-zinc-300 --color-zinc-400 --color-zinc-50 --color-zinc-500 " +
89
+ "--color-zinc-600 --color-zinc-700 --color-zinc-800 --color-zinc-900 --color-zinc-950 " +
90
+ "--container-2xl --container-2xs --container-3xl --container-3xs --container-4xl --container-5xl " +
91
+ "--container-6xl --container-7xl --container-lg --container-md --container-sm --container-xl " +
92
+ "--container-xs --default-font-family --default-font-feature-settings " +
93
+ "--default-font-variation-settings --default-mono-font-family " +
94
+ "--default-mono-font-feature-settings --default-mono-font-variation-settings " +
95
+ "--default-transition-duration --default-transition-timing-function --drop-shadow-2xl " +
96
+ "--drop-shadow-lg --drop-shadow-md --drop-shadow-sm --drop-shadow-xl --drop-shadow-xs --ease-in " +
97
+ "--ease-in-out --ease-out --font-mono --font-sans --font-serif --font-weight-black " +
98
+ "--font-weight-bold --font-weight-extrabold --font-weight-extralight --font-weight-light " +
99
+ "--font-weight-medium --font-weight-normal --font-weight-semibold --font-weight-thin " +
100
+ "--inset-shadow-2xs --inset-shadow-sm --inset-shadow-xs --leading-loose --leading-normal " +
101
+ "--leading-relaxed --leading-snug --leading-tight --perspective-distant --perspective-dramatic " +
102
+ "--perspective-midrange --perspective-near --perspective-normal --radius-2xl --radius-3xl " +
103
+ "--radius-4xl --radius-lg --radius-md --radius-sm --radius-xl --radius-xs --shadow-2xl " +
104
+ "--shadow-2xs --shadow-lg --shadow-md --shadow-sm --shadow-xl --shadow-xs --spacing --text-2xl " +
105
+ "--text-2xl--line-height --text-3xl --text-3xl--line-height --text-4xl --text-4xl--line-height " +
106
+ "--text-5xl --text-5xl--line-height --text-6xl --text-6xl--line-height --text-7xl " +
107
+ "--text-7xl--line-height --text-8xl --text-8xl--line-height --text-9xl --text-9xl--line-height " +
108
+ "--text-base --text-base--line-height --text-lg --text-lg--line-height --text-shadow-2xs " +
109
+ "--text-shadow-lg --text-shadow-md --text-shadow-sm --text-shadow-xs --text-sm " +
110
+ "--text-sm--line-height --text-xl --text-xl--line-height --text-xs --text-xs--line-height " +
111
+ "--tracking-normal --tracking-tight --tracking-tighter --tracking-wide --tracking-wider " +
112
+ "--tracking-widest";
@@ -0,0 +1,191 @@
1
+ import { KIT_NAMES, TAILWIND_THEME_NAMES } from "./css-variables.generated";
2
+
3
+ /**
4
+ * The guard against an undeclared CSS custom property (0.33,
5
+ * docs/colour-roles-harmonization.md §8, §12.5).
6
+ *
7
+ * A `var(--name)` with no fallback, where nothing declares `--name`, makes the whole
8
+ * declaration invalid at computed-value time: `fill` inherits, `color` inherits, a
9
+ * background goes transparent. Kurvenschmiede's control diagram painted
10
+ * `fill-[var(--surface)]` — a token that never existed (the kit's is `--bg-surface`) —
11
+ * and drew black boxes on a public page. The class compiled, the build passed, the type
12
+ * checker had no opinion, and nothing in any suite noticed. This is the check that
13
+ * notices, run from an app's own test over the source texts the app collects.
14
+ *
15
+ * Browser-safe on purpose, like the rest of the kit: it takes TEXTS, not paths, so an app
16
+ * reads its files however its setup allows (`import.meta.glob` with `?raw`, or `node:fs`)
17
+ * and the kit carries no `node:fs`.
18
+ */
19
+
20
+ /** Every custom property the installed kit declares or publishes to apps.
21
+ *
22
+ * Generated from `tokens.css` when the kit is built (scripts/gen-kit-css-variables.mjs),
23
+ * so it is always the installed version's, and an app never searches `node_modules`.
24
+ * It leaves out two kinds of name on purpose:
25
+ * - a name declared only in an `@theme inline` block (`--text-color-muted`,
26
+ * `--background-color-surface`): Tailwind emits no variable for it, so
27
+ * `var(--text-color-muted)` would pass a guard that counted it and paint nothing;
28
+ * - AppShell's measured `--app-nav-h`, which exists only while an AppShell is mounted —
29
+ * on a landing, legal, sign-in or pay page it is undefined. Read it with a fallback,
30
+ * `var(--app-nav-h,0px)`, as every kit read does.
31
+ * Everything `applyTokenSet` and More contrast write on `<html>` is in, through the
32
+ * stylesheet's `:root` / `.dark` mirror. Component internals (`--slider-fill`, `--fp-*`,
33
+ * `--icon-button-tone`, `--label-strip-edge`) are not: an app that reads one depends on
34
+ * the kit's internals, and the guard says so. */
35
+ export const KIT_CSS_VARIABLES: ReadonlySet<string> = new Set(KIT_NAMES.split(" "));
36
+
37
+ /** Tailwind's own theme variables (`--color-rose-500`, `--spacing`, `--text-sm` …), from
38
+ * the `tailwindcss/theme.css` the kit builds with. Tailwind emits one when a scanned file
39
+ * names it, so a `var()` of it resolves. */
40
+ const TAILWIND_THEME: ReadonlySet<string> = new Set(TAILWIND_THEME_NAMES.split(" "));
41
+
42
+ /** A Tailwind PALETTE colour: a hue with a shade, black or white. `refusePalette` reports
43
+ * these although they resolve — an app that has no palette lint asks this test to be
44
+ * its refusal. */
45
+ const PALETTE_VARIABLE = /^--color-(?:[a-z]+-\d{2,3}|black|white)$/;
46
+
47
+ /** Read only where it is set: the guard accepts it in a fallback use, never bare. */
48
+ const APP_NAV_H = "--app-nav-h";
49
+
50
+ export interface UndeclaredCssVariablesOptions {
51
+ /** Variables a library writes at runtime, as names or patterns:
52
+ * `["--radix-collapsible-content-height"]`. An app's own writes are found in its
53
+ * source and need no listing. */
54
+ runtime?: readonly (string | RegExp)[];
55
+ /** Also check `var(--x, …)`. Off by default: a fallback says what happens when the
56
+ * name is missing. `--app-nav-h` counts as declared only here. */
57
+ checkFallbacks?: boolean;
58
+ /** Report Tailwind palette variables (`--color-red-500`, `--color-white`) although
59
+ * they resolve. Default false. */
60
+ refusePalette?: boolean;
61
+ }
62
+
63
+ /** Comments are not CSS. `/* *\/` in both; `//` in TS only (not after a `:`, so a URL in a
64
+ * string survives). Replaced by spaces of the same shape, so line numbers hold. */
65
+ function stripComments(text: string, isCss: boolean): string {
66
+ const blank = (m: string) => m.replace(/[^\n]/g, " ");
67
+ const noBlocks = text.replace(/\/\*[\s\S]*?\*\//g, blank);
68
+ return isCss ? noBlocks : noBlocks.replace(/(^|[^:])(\/\/[^\n]*)/g, (_, pre: string, c: string) => pre + blank(c));
69
+ }
70
+
71
+ /** The text with every `@theme … inline … { … }` block blanked out, braces and all. */
72
+ function withoutInlineTheme(css: string): string {
73
+ let out = css;
74
+ for (const m of css.matchAll(/@theme\b[^{;]*\binline\b[^{;]*\{/g)) {
75
+ let depth = 0;
76
+ let end = m.index + m[0].length - 1;
77
+ for (; end < css.length; end++) {
78
+ if (css[end] === "{") depth++;
79
+ else if (css[end] === "}" && --depth === 0) break;
80
+ }
81
+ out = out.slice(0, m.index) + css.slice(m.index, end + 1).replace(/[^\n]/g, " ") + out.slice(end + 1);
82
+ }
83
+ return out;
84
+ }
85
+
86
+ /**
87
+ * Every custom property a stylesheet declares (`--name:`), in any block — except a name
88
+ * declared only inside `@theme inline`, which Tailwind never emits as a variable. Comments
89
+ * are skipped. The same rule builds {@link KIT_CSS_VARIABLES} from `tokens.css`.
90
+ */
91
+ export function declaredCustomProperties(css: string): Set<string> {
92
+ const code = withoutInlineTheme(stripComments(css, true));
93
+ return new Set([...code.matchAll(/(--[a-zA-Z0-9_-]+)\s*:/g)].map((m) => m[1]));
94
+ }
95
+
96
+ /** What an app's source writes at runtime: `setProperty("--name"`, a React style key
97
+ * `"--name":`, a Tailwind arbitrary property `[--name:…]`. */
98
+ function runtimeWrites(code: string): string[] {
99
+ return [
100
+ ...code.matchAll(/setProperty\(\s*["'`](--[a-zA-Z0-9_-]+)["'`]/g),
101
+ ...code.matchAll(/["'](--[a-zA-Z0-9_-]+)["']\s*:/g),
102
+ ...code.matchAll(/\[(--[a-zA-Z0-9_-]+):/g),
103
+ ].map((m) => m[1]);
104
+ }
105
+
106
+ /** A chart series' colour (`var(--color-total)`) is declared in a file with a `total: {`
107
+ * config entry: the kit's ChartContainer writes `--color-<key>` for each key. */
108
+ function chartKeys(code: string): Set<string> {
109
+ return new Set([...code.matchAll(/(?:^|[\s{,])["']?([A-Za-z_][\w-]*)["']?\s*:\s*\{/g)].map((m) => m[1]));
110
+ }
111
+
112
+ const isCssPath = (path: string) => /\.css(?:\?|$)/.test(path);
113
+
114
+ /**
115
+ * Every `var(--name)` without a fallback that nothing declares, as `"path:line --name"`.
116
+ *
117
+ * `sources` maps a path to its text: the app's `.ts`, `.tsx` and `.css` source, tests
118
+ * left out. A name counts as declared when it is:
119
+ * 1. the kit's ({@link KIT_CSS_VARIABLES});
120
+ * 2. declared in any `.css` entry of `sources` (outside `@theme inline`);
121
+ * 3. written by the source at runtime (`setProperty`, a style key, `[--name:…]`);
122
+ * 4. one of Tailwind's theme variables — unless `refusePalette` and it is a palette colour;
123
+ * 5. a chart series' `--color-<key>`, in a file with a `<key>: {` entry;
124
+ * 6. listed in `options.runtime`.
125
+ *
126
+ * Not counted: comments; a use with a fallback, unless `checkFallbacks`; a name built at
127
+ * runtime (`` `var(--chart-${n})` `` — a name must be followed by `)` or `,`).
128
+ *
129
+ * It REFUSES A VACUOUS RUN: it throws when `sources` holds fewer than ten files, or when
130
+ * a `.css` entry is empty. Vitest stubs every stylesheet with an empty string by default,
131
+ * `?raw` included, so an app that reads its CSS that way without opting it out of the stub
132
+ * (`test.css.include`) would otherwise lose every declaration and every use in it, and
133
+ * this would pass or fail for the wrong reason.
134
+ */
135
+ export function undeclaredCssVariables(
136
+ sources: Record<string, string>,
137
+ options: UndeclaredCssVariablesOptions = {},
138
+ ): string[] {
139
+ const { runtime = [], checkFallbacks = false, refusePalette = false } = options;
140
+ const entries = Object.entries(sources);
141
+ if (entries.length < 10) {
142
+ throw new Error(
143
+ `undeclaredCssVariables: only ${entries.length} source file(s) — the glob or the file list found ` +
144
+ `(almost) nothing, and a check over nothing passes. Pass the app's .ts/.tsx/.css source.`,
145
+ );
146
+ }
147
+ const emptyCss = entries.filter(([path, text]) => isCssPath(path) && text.trim() === "").map(([path]) => path);
148
+ if (emptyCss.length) {
149
+ throw new Error(
150
+ `undeclaredCssVariables: ${emptyCss.join(", ")} read as empty. Vitest stubs stylesheets with "" ` +
151
+ `(\`?raw\` too) unless the file is listed in \`test.css.include\`.`,
152
+ );
153
+ }
154
+
155
+ const code = entries.map(([path, text]) => [path, stripComments(text, isCssPath(path))] as const);
156
+ const declared = new Set<string>();
157
+ for (const [path, text] of code) {
158
+ if (isCssPath(path)) for (const name of declaredCustomProperties(text)) declared.add(name);
159
+ for (const name of runtimeWrites(text)) declared.add(name);
160
+ }
161
+ const listed = (name: string) =>
162
+ runtime.some((r) => (typeof r === "string" ? r === name : r.test(name)));
163
+
164
+ const out: string[] = [];
165
+ for (const [path, text] of code) {
166
+ let keys: Set<string> | null = null;
167
+ for (const m of text.matchAll(/var\(\s*(--[a-zA-Z0-9_-]+)\s*([,)])/g)) {
168
+ const [, name, next] = m;
169
+ const fallback = next === ",";
170
+ if (fallback && !checkFallbacks) continue;
171
+ if (KIT_CSS_VARIABLES.has(name) || declared.has(name) || listed(name)) continue;
172
+ if (fallback && name === APP_NAV_H) continue;
173
+ if (TAILWIND_THEME.has(name)) {
174
+ if (refusePalette && PALETTE_VARIABLE.test(name)) {
175
+ out.push(`${path}:${lineOf(text, m.index)} ${name} (a Tailwind palette colour; refusePalette is on)`);
176
+ }
177
+ continue;
178
+ }
179
+ const chart = /^--color-([A-Za-z_][\w-]*)$/.exec(name);
180
+ if (chart && (keys ??= chartKeys(text)).has(chart[1])) continue;
181
+ out.push(`${path}:${lineOf(text, m.index)} ${name}`);
182
+ }
183
+ }
184
+ return out;
185
+ }
186
+
187
+ function lineOf(text: string, index: number): number {
188
+ let line = 1;
189
+ for (let i = 0; i < index; i++) if (text.charCodeAt(i) === 10) line++;
190
+ return line;
191
+ }
@@ -0,0 +1,13 @@
1
+ // `@eifi1/ui-kit/testing` — helpers an app runs from its OWN test suite (0.33).
2
+ //
3
+ // Not part of the main barrel: nothing here renders, and an app's production bundle has
4
+ // no business carrying it. Browser-safe like the rest of the kit (no `node:fs`): each
5
+ // helper takes texts, so an app collects them with `import.meta.glob` or `node:fs`, as
6
+ // its setup allows. The first content is the guard against undeclared CSS custom
7
+ // properties (docs/colour-roles-harmonization.md §8).
8
+ export {
9
+ KIT_CSS_VARIABLES,
10
+ declaredCustomProperties,
11
+ undeclaredCssVariables,
12
+ type UndeclaredCssVariablesOptions,
13
+ } from "./css-variables";