@eifi1/ui-kit 0.51.4 → 0.51.5

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 (757) hide show
  1. package/README.md +3 -3
  2. package/dist/account/account-settings-labels.js.map +1 -1
  3. package/dist/account/account-settings.js +11 -9
  4. package/dist/account/account-settings.js.map +1 -1
  5. package/dist/account/delete-account-setting.js +56 -65
  6. package/dist/account/delete-account-setting.js.map +1 -1
  7. package/dist/account/email-change-setting-labels.js.map +1 -1
  8. package/dist/account/email-change-setting.js.map +1 -1
  9. package/dist/account/passkeys-setting.js.map +1 -1
  10. package/dist/account/sessions-setting.js.map +1 -1
  11. package/dist/admin/admin-action-confirm.js +1 -3
  12. package/dist/admin/admin-action-confirm.js.map +1 -1
  13. package/dist/admin/admin-action-log.js.map +1 -1
  14. package/dist/admin/admin-area-labels.js +4 -1
  15. package/dist/admin/admin-area-labels.js.map +1 -1
  16. package/dist/admin/admin-overview.js +19 -11
  17. package/dist/admin/admin-overview.js.map +1 -1
  18. package/dist/admin/admin-sections.js.map +1 -1
  19. package/dist/admin/admin-tool-links.d.ts +1 -1
  20. package/dist/admin/admin-tool-links.js +7 -1
  21. package/dist/admin/admin-tool-links.js.map +1 -1
  22. package/dist/admin/invitations-panel.js +2 -13
  23. package/dist/admin/invitations-panel.js.map +1 -1
  24. package/dist/admin/mail-test-card.js.map +1 -1
  25. package/dist/admin/reviewer-scope-editor.js +4 -11
  26. package/dist/admin/reviewer-scope-editor.js.map +1 -1
  27. package/dist/admin/role-select.js.map +1 -1
  28. package/dist/admin/user-roster.js +1 -9
  29. package/dist/admin/user-roster.js.map +1 -1
  30. package/dist/auth/accept-invitation.js.map +1 -1
  31. package/dist/auth/auth-errors.js.map +1 -1
  32. package/dist/auth/forgot-password-form.js +23 -31
  33. package/dist/auth/forgot-password-form.js.map +1 -1
  34. package/dist/auth/register-form.js.map +1 -1
  35. package/dist/auth/reset-password-form.js.map +1 -1
  36. package/dist/auth/sign-in-form.js +13 -5
  37. package/dist/auth/sign-in-form.js.map +1 -1
  38. package/dist/auth/verify-email.js +1 -8
  39. package/dist/auth/verify-email.js.map +1 -1
  40. package/dist/billing/billing-banner.js.map +1 -1
  41. package/dist/billing/billing-labels.js.map +1 -1
  42. package/dist/billing/checkout-processing.js.map +1 -1
  43. package/dist/billing/plan-card.js +91 -85
  44. package/dist/billing/plan-card.js.map +1 -1
  45. package/dist/billing/plan-limit-toast.js.map +1 -1
  46. package/dist/billing/plan-limit.js.map +1 -1
  47. package/dist/billing/plan-price.js.map +1 -1
  48. package/dist/billing/plan-switch.js.map +1 -1
  49. package/dist/billing/subscription-actions.js.map +1 -1
  50. package/dist/bin/eifi1-pay-page.mjs +6 -1
  51. package/dist/components/account-chips.js.map +1 -1
  52. package/dist/components/alert-banner.js +1 -5
  53. package/dist/components/alert-banner.js.map +1 -1
  54. package/dist/components/amount-input.js +29 -12
  55. package/dist/components/amount-input.js.map +1 -1
  56. package/dist/components/authed-image.js.map +1 -1
  57. package/dist/components/autocomplete.js.map +1 -1
  58. package/dist/components/bulk-action-bar.js +1 -4
  59. package/dist/components/bulk-action-bar.js.map +1 -1
  60. package/dist/components/button-group.js.map +1 -1
  61. package/dist/components/button-look.js.map +1 -1
  62. package/dist/components/button.js +1 -7
  63. package/dist/components/button.js.map +1 -1
  64. package/dist/components/calculator.js +5 -5
  65. package/dist/components/calculator.js.map +1 -1
  66. package/dist/components/calendar-heatmap.js +4 -10
  67. package/dist/components/calendar-heatmap.js.map +1 -1
  68. package/dist/components/card.js +1 -8
  69. package/dist/components/card.js.map +1 -1
  70. package/dist/components/chart-zoom-core.js +3 -17
  71. package/dist/components/chart-zoom-core.js.map +1 -1
  72. package/dist/components/chart.d.ts +1 -1
  73. package/dist/components/chart.js +4 -22
  74. package/dist/components/chart.js.map +1 -1
  75. package/dist/components/checkbox-group.js +1 -4
  76. package/dist/components/checkbox-group.js.map +1 -1
  77. package/dist/components/chip-input.js +4 -1
  78. package/dist/components/chip-input.js.map +1 -1
  79. package/dist/components/chip.js +10 -5
  80. package/dist/components/chip.js.map +1 -1
  81. package/dist/components/choice-card.js +58 -74
  82. package/dist/components/choice-card.js.map +1 -1
  83. package/dist/components/column-mapper-labels.js.map +1 -1
  84. package/dist/components/column-mapper.js +167 -227
  85. package/dist/components/column-mapper.js.map +1 -1
  86. package/dist/components/combobox-core.js +1 -4
  87. package/dist/components/combobox-core.js.map +1 -1
  88. package/dist/components/combobox.js +1 -4
  89. package/dist/components/combobox.js.map +1 -1
  90. package/dist/components/confirm-dialog.js.map +1 -1
  91. package/dist/components/copy-button.js.map +1 -1
  92. package/dist/components/country-select.d.ts +5 -4
  93. package/dist/components/country-select.js +3 -19
  94. package/dist/components/country-select.js.map +1 -1
  95. package/dist/components/currency-option-list.js +10 -8
  96. package/dist/components/currency-option-list.js.map +1 -1
  97. package/dist/components/currency-select.js +1 -6
  98. package/dist/components/currency-select.js.map +1 -1
  99. package/dist/components/danger-confirm.js.map +1 -1
  100. package/dist/components/data-table-cells.js.map +1 -1
  101. package/dist/components/data-table-column-settings.js.map +1 -1
  102. package/dist/components/data-table-filter-popover.js +2 -18
  103. package/dist/components/data-table-filter-popover.js.map +1 -1
  104. package/dist/components/data-table-filters.js.map +1 -1
  105. package/dist/components/data-table-fit.js.map +1 -1
  106. package/dist/components/data-table-groups.js +3 -1
  107. package/dist/components/data-table-groups.js.map +1 -1
  108. package/dist/components/data-table-head.js +44 -56
  109. package/dist/components/data-table-head.js.map +1 -1
  110. package/dist/components/data-table-mobile.js +31 -44
  111. package/dist/components/data-table-mobile.js.map +1 -1
  112. package/dist/components/data-table-pagination.js.map +1 -1
  113. package/dist/components/data-table-row-actions.js +19 -16
  114. package/dist/components/data-table-row-actions.js.map +1 -1
  115. package/dist/components/data-table-row.js.map +1 -1
  116. package/dist/components/data-table-shared.js.map +1 -1
  117. package/dist/components/data-table-sort.js.map +1 -1
  118. package/dist/components/data-table-virtual.js +4 -1
  119. package/dist/components/data-table-virtual.js.map +1 -1
  120. package/dist/components/data-table.js +30 -39
  121. package/dist/components/data-table.js.map +1 -1
  122. package/dist/components/date-picker.js +1 -6
  123. package/dist/components/date-picker.js.map +1 -1
  124. package/dist/components/date-range-picker.js.map +1 -1
  125. package/dist/components/description-list.js +10 -10
  126. package/dist/components/description-list.js.map +1 -1
  127. package/dist/components/dialog-frame.js +9 -2
  128. package/dist/components/dialog-frame.js.map +1 -1
  129. package/dist/components/disclosure.js +17 -27
  130. package/dist/components/disclosure.js.map +1 -1
  131. package/dist/components/dropdown.js +25 -35
  132. package/dist/components/dropdown.js.map +1 -1
  133. package/dist/components/empty-state.js.map +1 -1
  134. package/dist/components/entity-combobox.js.map +1 -1
  135. package/dist/components/error-boundary.js.map +1 -1
  136. package/dist/components/field-base.js +5 -5
  137. package/dist/components/field-base.js.map +1 -1
  138. package/dist/components/field-parts.d.ts +1 -1
  139. package/dist/components/field-parts.js +10 -14
  140. package/dist/components/field-parts.js.map +1 -1
  141. package/dist/components/field-sync.js +8 -10
  142. package/dist/components/field-sync.js.map +1 -1
  143. package/dist/components/file-button.js.map +1 -1
  144. package/dist/components/file-dropzone.js.map +1 -1
  145. package/dist/components/floating-panel.js +4 -1
  146. package/dist/components/floating-panel.js.map +1 -1
  147. package/dist/components/focus-ring.js.map +1 -1
  148. package/dist/components/form-actions.js.map +1 -1
  149. package/dist/components/grouped-picker.js +6 -8
  150. package/dist/components/grouped-picker.js.map +1 -1
  151. package/dist/components/hover-menu.js +1 -4
  152. package/dist/components/hover-menu.js.map +1 -1
  153. package/dist/components/iban-input-labels.js.map +1 -1
  154. package/dist/components/icon-button.js +4 -1
  155. package/dist/components/icon-button.js.map +1 -1
  156. package/dist/components/icon-picker.js +2 -7
  157. package/dist/components/icon-picker.js.map +1 -1
  158. package/dist/components/image-grid.js +41 -50
  159. package/dist/components/image-grid.js.map +1 -1
  160. package/dist/components/inline-edit-field.js.map +1 -1
  161. package/dist/components/inline-entity-combobox.js +2 -8
  162. package/dist/components/inline-entity-combobox.js.map +1 -1
  163. package/dist/components/input.js +14 -2
  164. package/dist/components/input.js.map +1 -1
  165. package/dist/components/jump-calendar.js +1 -7
  166. package/dist/components/jump-calendar.js.map +1 -1
  167. package/dist/components/legal-labels.js.map +1 -1
  168. package/dist/components/legal-page.js +14 -2
  169. package/dist/components/legal-page.js.map +1 -1
  170. package/dist/components/legal.js +12 -2
  171. package/dist/components/legal.js.map +1 -1
  172. package/dist/components/lightbox.js.map +1 -1
  173. package/dist/components/line-items.js +26 -36
  174. package/dist/components/line-items.js.map +1 -1
  175. package/dist/components/list.js +22 -10
  176. package/dist/components/list.js.map +1 -1
  177. package/dist/components/measured-grid.js +29 -53
  178. package/dist/components/measured-grid.js.map +1 -1
  179. package/dist/components/menu-item.js.map +1 -1
  180. package/dist/components/mini-calendar.js +13 -31
  181. package/dist/components/mini-calendar.js.map +1 -1
  182. package/dist/components/money-field.js.map +1 -1
  183. package/dist/components/month-picker.js +10 -21
  184. package/dist/components/month-picker.js.map +1 -1
  185. package/dist/components/multi-entity-combobox.js +3 -16
  186. package/dist/components/multi-entity-combobox.js.map +1 -1
  187. package/dist/components/multi-select.js.map +1 -1
  188. package/dist/components/nav-pills.js +10 -1
  189. package/dist/components/nav-pills.js.map +1 -1
  190. package/dist/components/number-field.js.map +1 -1
  191. package/dist/components/number-input.js +1 -7
  192. package/dist/components/number-input.js.map +1 -1
  193. package/dist/components/numpad-sheet.js +1 -4
  194. package/dist/components/numpad-sheet.js.map +1 -1
  195. package/dist/components/one-time-code-input.js +1 -7
  196. package/dist/components/one-time-code-input.js.map +1 -1
  197. package/dist/components/page-contents.js +13 -22
  198. package/dist/components/page-contents.js.map +1 -1
  199. package/dist/components/page-header.js +1 -11
  200. package/dist/components/page-header.js.map +1 -1
  201. package/dist/components/password-strength-labels.js.map +1 -1
  202. package/dist/components/password-strength.js +2 -8
  203. package/dist/components/password-strength.js.map +1 -1
  204. package/dist/components/phone-input.js +42 -57
  205. package/dist/components/phone-input.js.map +1 -1
  206. package/dist/components/picker-sheet.js.map +1 -1
  207. package/dist/components/pie-chart.js +1 -8
  208. package/dist/components/pie-chart.js.map +1 -1
  209. package/dist/components/popover.js.map +1 -1
  210. package/dist/components/progress-bar.js +16 -9
  211. package/dist/components/progress-bar.js.map +1 -1
  212. package/dist/components/qr-code.js +1 -8
  213. package/dist/components/qr-code.js.map +1 -1
  214. package/dist/components/row-actions.js +5 -1
  215. package/dist/components/row-actions.js.map +1 -1
  216. package/dist/components/search-field.js.map +1 -1
  217. package/dist/components/select.js +28 -38
  218. package/dist/components/select.js.map +1 -1
  219. package/dist/components/separator.js +1 -5
  220. package/dist/components/separator.js.map +1 -1
  221. package/dist/components/series-chart-axes.js +4 -1
  222. package/dist/components/series-chart-axes.js.map +1 -1
  223. package/dist/components/series-chart-budget.js.map +1 -1
  224. package/dist/components/series-chart-ticks.js.map +1 -1
  225. package/dist/components/series-chart.js +29 -45
  226. package/dist/components/series-chart.js.map +1 -1
  227. package/dist/components/settings-fields.js +21 -17
  228. package/dist/components/settings-fields.js.map +1 -1
  229. package/dist/components/share-card.js +4 -9
  230. package/dist/components/share-card.js.map +1 -1
  231. package/dist/components/sign-chip.js.map +1 -1
  232. package/dist/components/signature-pad.js +4 -13
  233. package/dist/components/signature-pad.js.map +1 -1
  234. package/dist/components/signed-amount.js +12 -5
  235. package/dist/components/signed-amount.js.map +1 -1
  236. package/dist/components/skeleton.js +2 -17
  237. package/dist/components/skeleton.js.map +1 -1
  238. package/dist/components/slider.js +13 -36
  239. package/dist/components/slider.js.map +1 -1
  240. package/dist/components/sparkline.js.map +1 -1
  241. package/dist/components/stat-tile.js +14 -10
  242. package/dist/components/stat-tile.js.map +1 -1
  243. package/dist/components/swatch-picker.js +14 -4
  244. package/dist/components/swatch-picker.js.map +1 -1
  245. package/dist/components/swipeable-row.d.ts +1 -1
  246. package/dist/components/swipeable-row.js +1 -8
  247. package/dist/components/swipeable-row.js.map +1 -1
  248. package/dist/components/table-skeleton.js +4 -1
  249. package/dist/components/table-skeleton.js.map +1 -1
  250. package/dist/components/table.js +12 -9
  251. package/dist/components/table.js.map +1 -1
  252. package/dist/components/tabs.js +5 -24
  253. package/dist/components/tabs.js.map +1 -1
  254. package/dist/components/text-link.js.map +1 -1
  255. package/dist/components/text.js.map +1 -1
  256. package/dist/components/tile-radio.js +1 -7
  257. package/dist/components/tile-radio.js.map +1 -1
  258. package/dist/components/time-input.js.map +1 -1
  259. package/dist/components/toast.js.map +1 -1
  260. package/dist/components/toggle-group.js +6 -1
  261. package/dist/components/toggle-group.js.map +1 -1
  262. package/dist/components/toggle-legend.js +2 -11
  263. package/dist/components/toggle-legend.js.map +1 -1
  264. package/dist/components/tooltip.js +2 -22
  265. package/dist/components/tooltip.js.map +1 -1
  266. package/dist/components/translation-review-editor.js +1 -4
  267. package/dist/components/translation-review-editor.js.map +1 -1
  268. package/dist/components/translation-review-parts.d.ts +1 -1
  269. package/dist/components/translation-review-parts.js +7 -1
  270. package/dist/components/translation-review-parts.js.map +1 -1
  271. package/dist/components/translation-review.js +18 -7
  272. package/dist/components/translation-review.js.map +1 -1
  273. package/dist/components/tree-view.js +14 -10
  274. package/dist/components/tree-view.js.map +1 -1
  275. package/dist/components/treemap.js +1 -13
  276. package/dist/components/treemap.js.map +1 -1
  277. package/dist/components/trigger-aria.js.map +1 -1
  278. package/dist/components/use-table-state.js +14 -11
  279. package/dist/components/use-table-state.js.map +1 -1
  280. package/dist/components/user-avatar.js +3 -26
  281. package/dist/components/user-avatar.js.map +1 -1
  282. package/dist/demo/demo-start.js +8 -4
  283. package/dist/demo/demo-start.js.map +1 -1
  284. package/dist/eslint/index.js +1 -1
  285. package/dist/feedback/feedback-attachment-labels.js.map +1 -1
  286. package/dist/feedback/feedback-attachment.js +1 -8
  287. package/dist/feedback/feedback-attachment.js.map +1 -1
  288. package/dist/feedback/feedback-capture.d.ts +1 -1
  289. package/dist/feedback/feedback-capture.js +3 -1
  290. package/dist/feedback/feedback-capture.js.map +1 -1
  291. package/dist/feedback/feedback-comment-thread.js +27 -13
  292. package/dist/feedback/feedback-comment-thread.js.map +1 -1
  293. package/dist/feedback/feedback-context.js +1 -4
  294. package/dist/feedback/feedback-context.js.map +1 -1
  295. package/dist/feedback/feedback-dialog.js.map +1 -1
  296. package/dist/feedback/feedback-inbox.js.map +1 -1
  297. package/dist/feedback/feedback-public-list.js +7 -1
  298. package/dist/feedback/feedback-public-list.js.map +1 -1
  299. package/dist/feedback/feedback-record.js +1 -5
  300. package/dist/feedback/feedback-record.js.map +1 -1
  301. package/dist/feedback/feedback-replies.js +25 -10
  302. package/dist/feedback/feedback-replies.js.map +1 -1
  303. package/dist/feedback/feedback-row-detail.js.map +1 -1
  304. package/dist/feedback/feedback-status-undo.js.map +1 -1
  305. package/dist/feedback/feedback-submit-dialog.js.map +1 -1
  306. package/dist/feedback/feedback-table.js +4 -1
  307. package/dist/feedback/feedback-table.js.map +1 -1
  308. package/dist/feedback/feedback-thread.js +2 -13
  309. package/dist/feedback/feedback-thread.js.map +1 -1
  310. package/dist/feedback/feedback-vocabulary.js.map +1 -1
  311. package/dist/feedback/feedback-vote-button.js.map +1 -1
  312. package/dist/hooks/use-anchored-rect.js.map +1 -1
  313. package/dist/hooks/use-document-title.js.map +1 -1
  314. package/dist/hooks/use-file-drop.js.map +1 -1
  315. package/dist/hooks/use-file-picker-labels.js.map +1 -1
  316. package/dist/hooks/use-file-picker.js.map +1 -1
  317. package/dist/hooks/use-focus-trap.js.map +1 -1
  318. package/dist/hooks/use-overlay-history.js +10 -5
  319. package/dist/hooks/use-overlay-history.js.map +1 -1
  320. package/dist/hooks/use-row-swipe.d.ts +1 -1
  321. package/dist/hooks/use-row-swipe.js +1 -6
  322. package/dist/hooks/use-row-swipe.js.map +1 -1
  323. package/dist/i18n/defaults.js +1 -4
  324. package/dist/i18n/defaults.js.map +1 -1
  325. package/dist/i18n/german.js +4 -1
  326. package/dist/i18n/german.js.map +1 -1
  327. package/dist/i18n/kit-labels.js +2 -8
  328. package/dist/i18n/kit-labels.js.map +1 -1
  329. package/dist/i18n/languages.js.map +1 -1
  330. package/dist/i18n/locales/en.js +4 -1
  331. package/dist/i18n/locales/en.js.map +2 -2
  332. package/dist/i18n/locales/es.js +4 -1
  333. package/dist/i18n/locales/es.js.map +1 -1
  334. package/dist/i18n/locales/fr.js +4 -1
  335. package/dist/i18n/locales/fr.js.map +1 -1
  336. package/dist/i18n/locales/hu.js +4 -1
  337. package/dist/i18n/locales/hu.js.map +1 -1
  338. package/dist/i18n/locales/it.js +4 -1
  339. package/dist/i18n/locales/it.js.map +1 -1
  340. package/dist/i18n/locales/zh.js.map +1 -1
  341. package/dist/i18n/plurals.js.map +1 -1
  342. package/dist/i18n/review.js +13 -7
  343. package/dist/i18n/review.js.map +1 -1
  344. package/dist/i18n/shared-labels.js.map +1 -1
  345. package/dist/index.d.ts +16 -16
  346. package/dist/index.js +40 -23
  347. package/dist/index.js.map +1 -1
  348. package/dist/landing/access.js +1 -4
  349. package/dist/landing/access.js.map +1 -1
  350. package/dist/landing/landing-sections.js +35 -38
  351. package/dist/landing/landing-sections.js.map +1 -1
  352. package/dist/landing/page-seo.js.map +1 -1
  353. package/dist/lib/calc.js.map +1 -1
  354. package/dist/lib/clipboard-minus.js.map +1 -1
  355. package/dist/lib/dates.js.map +1 -1
  356. package/dist/lib/decimal-marks.js.map +1 -1
  357. package/dist/lib/device-settings.js +2 -1
  358. package/dist/lib/device-settings.js.map +1 -1
  359. package/dist/lib/direction.js.map +1 -1
  360. package/dist/lib/iban.js.map +1 -1
  361. package/dist/lib/logger.js +1 -5
  362. package/dist/lib/logger.js.map +1 -1
  363. package/dist/lib/person-name.js.map +1 -1
  364. package/dist/lib/phone.js.map +1 -1
  365. package/dist/lib/qr-encode.js +344 -8
  366. package/dist/lib/qr-encode.js.map +1 -1
  367. package/dist/lib/session-refresh.js.map +1 -1
  368. package/dist/lib/table-text.js +15 -3
  369. package/dist/lib/table-text.js.map +1 -1
  370. package/dist/lib/text-match.d.ts +4 -0
  371. package/dist/lib/text-match.js.map +1 -1
  372. package/dist/lib/translation-review.js.map +1 -1
  373. package/dist/notifications/notification-inbox.js +63 -44
  374. package/dist/notifications/notification-inbox.js.map +1 -1
  375. package/dist/notifications/notification-parts.js.map +1 -1
  376. package/dist/notifications/notification-types-setting.js.map +1 -1
  377. package/dist/notifications/notifications-labels.js.map +1 -1
  378. package/dist/notifications/push-device-setting.js +6 -1
  379. package/dist/notifications/push-device-setting.js.map +1 -1
  380. package/dist/notifications/push-devices-setting.js.map +1 -1
  381. package/dist/notifications/push-worker.js.map +1 -1
  382. package/dist/notifications/quiet-hours-setting.js.map +1 -1
  383. package/dist/notifications/use-push-device.js +4 -1
  384. package/dist/notifications/use-push-device.js.map +1 -1
  385. package/dist/offline/pwa-update-prompt.d.ts +1 -1
  386. package/dist/offline/pwa-update-prompt.js +7 -1
  387. package/dist/offline/pwa-update-prompt.js.map +1 -1
  388. package/dist/offline/query-persistence.js.map +1 -1
  389. package/dist/offline.d.ts +1 -1
  390. package/dist/offline.js +6 -1
  391. package/dist/offline.js.map +1 -1
  392. package/dist/pay/pay.css +8 -1
  393. package/dist/rhf/fields.d.ts +1 -2
  394. package/dist/rhf/fields.js +1 -10
  395. package/dist/rhf/fields.js.map +1 -1
  396. package/dist/rhf/form-core.js +1 -4
  397. package/dist/rhf/form-core.js.map +1 -1
  398. package/dist/rhf/line-items.js.map +1 -1
  399. package/dist/rhf/use-rhf-wizard-step.js.map +1 -1
  400. package/dist/search/command-palette.js +71 -62
  401. package/dist/search/command-palette.js.map +1 -1
  402. package/dist/search/global-search.js +34 -5
  403. package/dist/search/global-search.js.map +1 -1
  404. package/dist/search/search-index.js.map +1 -1
  405. package/dist/settings/device-reset-setting.js +1 -6
  406. package/dist/settings/device-reset-setting.js.map +1 -1
  407. package/dist/settings/settings-heading.js.map +1 -1
  408. package/dist/settings/settings-layout.js +9 -20
  409. package/dist/settings/settings-layout.js.map +1 -1
  410. package/dist/settings/use-settings-route.js.map +1 -1
  411. package/dist/shell/app-shell.js +62 -31
  412. package/dist/shell/app-shell.js.map +1 -1
  413. package/dist/shell/auth-layout.js +1 -10
  414. package/dist/shell/auth-layout.js.map +1 -1
  415. package/dist/shell/dev-menu.js +12 -6
  416. package/dist/shell/dev-menu.js.map +1 -1
  417. package/dist/shell/option-switcher-menu.js.map +1 -1
  418. package/dist/shell/sync-status-indicator.js +7 -6
  419. package/dist/shell/sync-status-indicator.js.map +1 -1
  420. package/dist/shell/top-bar-parts-labels.js.map +1 -1
  421. package/dist/shell/topbar-action-menu.js.map +1 -1
  422. package/dist/shell/topbar-controls.js +1 -10
  423. package/dist/shell/topbar-controls.js.map +1 -1
  424. package/dist/shell/tour-menu.js +9 -1
  425. package/dist/shell/tour-menu.js.map +1 -1
  426. package/dist/sync/db.js.map +1 -1
  427. package/dist/sync/engine.js +24 -6
  428. package/dist/sync/engine.js.map +1 -1
  429. package/dist/sync.d.ts +2 -2
  430. package/dist/sync.js +7 -1
  431. package/dist/sync.js.map +1 -1
  432. package/dist/testing/css-variables.js.map +1 -1
  433. package/dist/testing/index.d.ts +1 -1
  434. package/dist/testing/index.js +1 -3
  435. package/dist/testing/index.js.map +1 -1
  436. package/dist/testing/react.js.map +1 -1
  437. package/dist/testing/viewport.js +7 -4
  438. package/dist/testing/viewport.js.map +1 -1
  439. package/dist/theme/contrast-tokens.js +13 -2
  440. package/dist/theme/contrast-tokens.js.map +1 -1
  441. package/dist/theme/palette-derive.d.ts +1 -1
  442. package/dist/theme/palette-derive.js +18 -29
  443. package/dist/theme/palette-derive.js.map +1 -1
  444. package/dist/theme/palette-presets.js.map +1 -1
  445. package/dist/theme/palette-store.js.map +1 -1
  446. package/dist/theme/text-size.js.map +1 -1
  447. package/dist/theme/theme-store.js +1 -3
  448. package/dist/theme/theme-store.js.map +1 -1
  449. package/dist/tour/tour-catalogue.js.map +1 -1
  450. package/dist/tour/tour-dock.js +5 -1
  451. package/dist/tour/tour-dock.js.map +1 -1
  452. package/dist/tour/tour-engine.js +1 -4
  453. package/dist/tour/tour-engine.js.map +1 -1
  454. package/dist/tour/tour.js +21 -12
  455. package/dist/tour/tour.js.map +1 -1
  456. package/dist/tour/use-tour-progress.js.map +1 -1
  457. package/dist/tour/use-tour-url-sync.js.map +1 -1
  458. package/dist/wizard/stepper-nav.js +3 -24
  459. package/dist/wizard/stepper-nav.js.map +1 -1
  460. package/dist/wizard/types.js.map +1 -1
  461. package/dist/wizard/use-wizard.js +24 -28
  462. package/dist/wizard/use-wizard.js.map +1 -1
  463. package/dist/wizard/validation.js.map +1 -1
  464. package/dist/wizard/wizard-context.js.map +1 -1
  465. package/dist/wizard/wizard-step.d.ts +1 -1
  466. package/dist/wizard/wizard-step.js +1 -8
  467. package/dist/wizard/wizard-step.js.map +1 -1
  468. package/dist/wizard/wizard-summary.js.map +1 -1
  469. package/package.json +5 -2
  470. package/src/account/account-settings-labels.ts +1 -2
  471. package/src/account/account-settings.tsx +11 -17
  472. package/src/account/delete-account-setting.tsx +1 -6
  473. package/src/account/email-change-setting-labels.ts +1 -2
  474. package/src/account/email-change-setting.tsx +3 -1
  475. package/src/account/passkeys-setting.tsx +1 -3
  476. package/src/account/sessions-setting.tsx +4 -2
  477. package/src/admin/admin-action-confirm.tsx +4 -7
  478. package/src/admin/admin-action-log.tsx +29 -29
  479. package/src/admin/admin-area-labels.ts +4 -1
  480. package/src/admin/admin-overview.tsx +8 -2
  481. package/src/admin/admin-sections.tsx +3 -1
  482. package/src/admin/admin-tool-links.tsx +7 -1
  483. package/src/admin/invitations-panel.tsx +5 -11
  484. package/src/admin/mail-test-card.tsx +1 -2
  485. package/src/admin/reviewer-scope-editor.tsx +4 -9
  486. package/src/admin/role-select.tsx +4 -2
  487. package/src/admin/user-roster.tsx +2 -11
  488. package/src/auth/accept-invitation.tsx +1 -7
  489. package/src/auth/auth-errors.ts +1 -6
  490. package/src/auth/forgot-password-form.tsx +2 -7
  491. package/src/auth/register-form.tsx +7 -8
  492. package/src/auth/reset-password-form.tsx +2 -5
  493. package/src/auth/sign-in-form.tsx +15 -14
  494. package/src/auth/verify-email.tsx +2 -7
  495. package/src/billing/billing-banner.tsx +3 -7
  496. package/src/billing/billing-labels.ts +6 -4
  497. package/src/billing/checkout-processing.ts +0 -1
  498. package/src/billing/plan-card.tsx +9 -8
  499. package/src/billing/plan-limit-toast.tsx +1 -2
  500. package/src/billing/plan-limit.ts +1 -2
  501. package/src/billing/plan-price.ts +1 -4
  502. package/src/billing/plan-switch.tsx +1 -2
  503. package/src/billing/subscription-actions.tsx +5 -2
  504. package/src/components/account-chips.tsx +1 -7
  505. package/src/components/alert-banner.tsx +2 -8
  506. package/src/components/amount-input.tsx +206 -178
  507. package/src/components/authed-image.tsx +7 -4
  508. package/src/components/autocomplete.tsx +7 -9
  509. package/src/components/bulk-action-bar.tsx +2 -7
  510. package/src/components/button-group.tsx +1 -2
  511. package/src/components/button-look.ts +6 -17
  512. package/src/components/button.tsx +1 -4
  513. package/src/components/calculator.tsx +6 -9
  514. package/src/components/calendar-heatmap.tsx +5 -10
  515. package/src/components/card.tsx +9 -13
  516. package/src/components/chart-zoom-core.tsx +6 -33
  517. package/src/components/chart.tsx +8 -31
  518. package/src/components/checkbox-group.tsx +1 -4
  519. package/src/components/chip-input.tsx +6 -6
  520. package/src/components/chip.tsx +14 -26
  521. package/src/components/choice-card.tsx +4 -18
  522. package/src/components/column-mapper-labels.ts +3 -10
  523. package/src/components/column-mapper.tsx +33 -122
  524. package/src/components/combobox-core.tsx +12 -42
  525. package/src/components/combobox.tsx +2 -6
  526. package/src/components/confirm-dialog.tsx +1 -3
  527. package/src/components/copy-button.tsx +2 -4
  528. package/src/components/country-select.tsx +9 -21
  529. package/src/components/currency-option-list.tsx +13 -14
  530. package/src/components/currency-select.tsx +2 -7
  531. package/src/components/danger-confirm.tsx +8 -9
  532. package/src/components/data-table-cells.tsx +1 -2
  533. package/src/components/data-table-column-settings.tsx +1 -3
  534. package/src/components/data-table-filter-popover.tsx +5 -19
  535. package/src/components/data-table-filters.ts +1 -6
  536. package/src/components/data-table-fit.ts +1 -3
  537. package/src/components/data-table-groups.tsx +3 -1
  538. package/src/components/data-table-head.tsx +27 -45
  539. package/src/components/data-table-mobile.tsx +99 -108
  540. package/src/components/data-table-pagination.tsx +2 -6
  541. package/src/components/data-table-row-actions.tsx +25 -24
  542. package/src/components/data-table-row.tsx +16 -17
  543. package/src/components/data-table-shared.tsx +10 -16
  544. package/src/components/data-table-sort.ts +1 -2
  545. package/src/components/data-table-virtual.ts +9 -4
  546. package/src/components/data-table.tsx +489 -501
  547. package/src/components/date-picker.tsx +1 -7
  548. package/src/components/date-range-picker.tsx +3 -13
  549. package/src/components/description-list.tsx +7 -13
  550. package/src/components/dialog-frame.tsx +12 -3
  551. package/src/components/disclosure.tsx +8 -12
  552. package/src/components/dropdown.tsx +3 -11
  553. package/src/components/empty-state.tsx +1 -3
  554. package/src/components/entity-combobox.tsx +2 -6
  555. package/src/components/error-boundary.tsx +7 -7
  556. package/src/components/field-base.tsx +8 -14
  557. package/src/components/field-parts.tsx +12 -23
  558. package/src/components/field-sync.tsx +7 -11
  559. package/src/components/file-button.tsx +7 -3
  560. package/src/components/file-dropzone.tsx +7 -12
  561. package/src/components/floating-panel.tsx +44 -51
  562. package/src/components/focus-ring.ts +1 -2
  563. package/src/components/form-actions.tsx +1 -4
  564. package/src/components/grouped-picker.tsx +6 -8
  565. package/src/components/hover-menu.tsx +1 -4
  566. package/src/components/iban-input-labels.ts +1 -2
  567. package/src/components/icon-button.tsx +46 -48
  568. package/src/components/icon-picker.tsx +4 -17
  569. package/src/components/image-grid.tsx +1 -6
  570. package/src/components/inline-edit-field.tsx +1 -5
  571. package/src/components/inline-entity-combobox.tsx +6 -21
  572. package/src/components/input.tsx +14 -2
  573. package/src/components/jump-calendar.tsx +2 -6
  574. package/src/components/legal-labels.ts +1 -2
  575. package/src/components/legal-page.tsx +18 -7
  576. package/src/components/legal.tsx +14 -5
  577. package/src/components/lightbox.tsx +1 -3
  578. package/src/components/line-items.tsx +7 -15
  579. package/src/components/list.tsx +29 -25
  580. package/src/components/measured-grid.tsx +8 -30
  581. package/src/components/menu-item.tsx +1 -3
  582. package/src/components/mini-calendar.tsx +129 -159
  583. package/src/components/money-field.tsx +4 -2
  584. package/src/components/month-picker.tsx +14 -21
  585. package/src/components/multi-entity-combobox.tsx +6 -26
  586. package/src/components/multi-select.tsx +5 -9
  587. package/src/components/nav-pills.tsx +10 -2
  588. package/src/components/number-field.tsx +18 -15
  589. package/src/components/number-input.tsx +3 -19
  590. package/src/components/numpad-sheet.tsx +9 -13
  591. package/src/components/one-time-code-input.tsx +6 -11
  592. package/src/components/page-contents.tsx +2 -9
  593. package/src/components/page-header.tsx +5 -10
  594. package/src/components/password-strength-labels.ts +1 -2
  595. package/src/components/password-strength.tsx +6 -9
  596. package/src/components/phone-input.tsx +2 -13
  597. package/src/components/picker-sheet.tsx +2 -5
  598. package/src/components/pie-chart.tsx +6 -12
  599. package/src/components/popover.tsx +2 -1
  600. package/src/components/progress-bar.tsx +16 -25
  601. package/src/components/qr-code.tsx +2 -9
  602. package/src/components/row-actions.tsx +9 -1
  603. package/src/components/search-field.tsx +4 -5
  604. package/src/components/select.tsx +2 -10
  605. package/src/components/separator.tsx +1 -5
  606. package/src/components/series-chart-axes.ts +5 -5
  607. package/src/components/series-chart-budget.ts +1 -4
  608. package/src/components/series-chart-ticks.ts +1 -4
  609. package/src/components/series-chart.tsx +43 -83
  610. package/src/components/settings-fields.tsx +20 -15
  611. package/src/components/share-card.tsx +6 -14
  612. package/src/components/sign-chip.tsx +16 -16
  613. package/src/components/signature-pad.tsx +21 -13
  614. package/src/components/signed-amount.tsx +6 -14
  615. package/src/components/skeleton.tsx +2 -13
  616. package/src/components/slider.tsx +9 -20
  617. package/src/components/sparkline.tsx +2 -13
  618. package/src/components/stat-tile.tsx +13 -24
  619. package/src/components/swatch-picker.tsx +8 -3
  620. package/src/components/swipeable-row.tsx +2 -11
  621. package/src/components/table-skeleton.tsx +4 -1
  622. package/src/components/table.tsx +12 -8
  623. package/src/components/tabs.tsx +24 -39
  624. package/src/components/text-link.tsx +6 -6
  625. package/src/components/text.tsx +1 -2
  626. package/src/components/tile-radio.tsx +6 -19
  627. package/src/components/time-input.tsx +4 -5
  628. package/src/components/toast.tsx +3 -12
  629. package/src/components/toggle-group.tsx +9 -9
  630. package/src/components/toggle-legend.tsx +4 -16
  631. package/src/components/tooltip.tsx +9 -48
  632. package/src/components/translation-review-editor.tsx +4 -4
  633. package/src/components/translation-review-parts.tsx +7 -1
  634. package/src/components/translation-review.tsx +15 -16
  635. package/src/components/tree-view.tsx +17 -20
  636. package/src/components/treemap.tsx +3 -15
  637. package/src/components/trigger-aria.ts +1 -4
  638. package/src/components/use-table-state.ts +16 -17
  639. package/src/components/user-avatar.tsx +4 -21
  640. package/src/demo/demo-start.tsx +8 -4
  641. package/src/feedback/feedback-attachment-labels.ts +2 -1
  642. package/src/feedback/feedback-attachment.tsx +16 -29
  643. package/src/feedback/feedback-capture.ts +3 -1
  644. package/src/feedback/feedback-comment-thread.tsx +9 -6
  645. package/src/feedback/feedback-context.tsx +1 -4
  646. package/src/feedback/feedback-dialog.tsx +3 -4
  647. package/src/feedback/feedback-inbox.tsx +3 -9
  648. package/src/feedback/feedback-public-list.tsx +7 -1
  649. package/src/feedback/feedback-record.ts +6 -14
  650. package/src/feedback/feedback-replies.tsx +10 -5
  651. package/src/feedback/feedback-row-detail.tsx +2 -5
  652. package/src/feedback/feedback-status-undo.ts +1 -4
  653. package/src/feedback/feedback-submit-dialog.tsx +4 -4
  654. package/src/feedback/feedback-table.tsx +12 -8
  655. package/src/feedback/feedback-thread.tsx +4 -16
  656. package/src/feedback/feedback-vocabulary.ts +72 -82
  657. package/src/feedback/feedback-vote-button.tsx +9 -8
  658. package/src/hooks/use-anchored-rect.ts +1 -4
  659. package/src/hooks/use-document-title.ts +3 -1
  660. package/src/hooks/use-file-drop.ts +1 -3
  661. package/src/hooks/use-file-picker-labels.ts +1 -2
  662. package/src/hooks/use-file-picker.tsx +1 -5
  663. package/src/hooks/use-focus-trap.ts +1 -2
  664. package/src/hooks/use-overlay-history.ts +10 -5
  665. package/src/hooks/use-row-swipe.ts +1 -6
  666. package/src/i18n/defaults.ts +1 -4
  667. package/src/i18n/german.ts +33 -49
  668. package/src/i18n/kit-labels.tsx +5 -20
  669. package/src/i18n/languages.ts +2 -8
  670. package/src/i18n/locales/en.ts +11 -31
  671. package/src/i18n/locales/es.ts +35 -49
  672. package/src/i18n/locales/fr.ts +34 -51
  673. package/src/i18n/locales/hu.ts +26 -37
  674. package/src/i18n/locales/it.ts +35 -52
  675. package/src/i18n/locales/zh.ts +14 -32
  676. package/src/i18n/plurals.ts +4 -1
  677. package/src/i18n/review.ts +18 -7
  678. package/src/i18n/shared-labels.ts +1 -2
  679. package/src/index.ts +106 -32
  680. package/src/landing/access.ts +2 -7
  681. package/src/landing/landing-sections.tsx +14 -15
  682. package/src/landing/page-seo.ts +1 -3
  683. package/src/lib/calc.ts +4 -1
  684. package/src/lib/clipboard-minus.ts +4 -1
  685. package/src/lib/dates.ts +2 -10
  686. package/src/lib/decimal-marks.ts +1 -3
  687. package/src/lib/device-settings.ts +2 -1
  688. package/src/lib/direction.ts +1 -3
  689. package/src/lib/iban.ts +89 -9
  690. package/src/lib/logger.ts +1 -5
  691. package/src/lib/person-name.ts +1 -3
  692. package/src/lib/phone.ts +5 -8
  693. package/src/lib/qr-encode.ts +32 -8
  694. package/src/lib/session-refresh.ts +5 -6
  695. package/src/lib/table-text.ts +24 -6
  696. package/src/lib/text-match.ts +15 -3
  697. package/src/lib/translation-review.ts +1 -3
  698. package/src/notifications/notification-inbox.tsx +17 -4
  699. package/src/notifications/notification-parts.tsx +1 -2
  700. package/src/notifications/notification-types-setting.tsx +19 -18
  701. package/src/notifications/notifications-labels.ts +1 -2
  702. package/src/notifications/push-device-setting.tsx +7 -1
  703. package/src/notifications/push-devices-setting.tsx +7 -3
  704. package/src/notifications/push-worker.ts +10 -2
  705. package/src/notifications/quiet-hours-setting.tsx +4 -1
  706. package/src/notifications/use-push-device.ts +4 -1
  707. package/src/offline/pwa-update-prompt.tsx +7 -1
  708. package/src/offline/query-persistence.ts +9 -6
  709. package/src/offline.ts +6 -1
  710. package/src/rhf/fields.tsx +50 -19
  711. package/src/rhf/form-core.tsx +2 -6
  712. package/src/rhf/line-items.tsx +5 -7
  713. package/src/rhf/use-rhf-wizard-step.ts +3 -12
  714. package/src/search/command-palette.tsx +15 -23
  715. package/src/search/global-search.tsx +38 -8
  716. package/src/search/search-index.ts +5 -1
  717. package/src/settings/device-reset-setting.tsx +5 -8
  718. package/src/settings/settings-heading.tsx +3 -1
  719. package/src/settings/settings-layout.tsx +6 -13
  720. package/src/settings/use-settings-route.ts +4 -3
  721. package/src/shell/app-shell.tsx +48 -24
  722. package/src/shell/auth-layout.tsx +1 -6
  723. package/src/shell/dev-menu.tsx +12 -6
  724. package/src/shell/option-switcher-menu.tsx +1 -3
  725. package/src/shell/sync-status-indicator.tsx +14 -12
  726. package/src/shell/top-bar-parts-labels.ts +1 -3
  727. package/src/shell/topbar-action-menu.tsx +9 -8
  728. package/src/shell/topbar-controls.tsx +5 -19
  729. package/src/shell/tour-menu.tsx +9 -1
  730. package/src/sync/db.ts +5 -1
  731. package/src/sync/engine.ts +44 -12
  732. package/src/sync.ts +16 -2
  733. package/src/testing/css-variables.ts +1 -2
  734. package/src/testing/index.ts +1 -6
  735. package/src/testing/react.ts +1 -2
  736. package/src/testing/viewport.ts +9 -9
  737. package/src/theme/contrast-tokens.ts +13 -2
  738. package/src/theme/palette-derive.ts +24 -50
  739. package/src/theme/palette-presets.ts +0 -1
  740. package/src/theme/palette-store.ts +1 -4
  741. package/src/theme/text-size.ts +1 -1
  742. package/src/theme/theme-store.ts +2 -6
  743. package/src/tour/tour-catalogue.tsx +4 -2
  744. package/src/tour/tour-dock.ts +5 -1
  745. package/src/tour/tour-engine.ts +2 -6
  746. package/src/tour/tour.tsx +28 -12
  747. package/src/tour/use-tour-progress.ts +8 -2
  748. package/src/tour/use-tour-url-sync.ts +3 -1
  749. package/src/vite-env.d.ts +1 -4
  750. package/src/wizard/stepper-nav.tsx +10 -35
  751. package/src/wizard/types.ts +1 -4
  752. package/src/wizard/use-wizard.ts +28 -43
  753. package/src/wizard/validation.ts +1 -5
  754. package/src/wizard/wizard-context.tsx +2 -6
  755. package/src/wizard/wizard-step.tsx +1 -8
  756. package/src/wizard/wizard-summary.tsx +2 -6
  757. package/tokens.css +393 -152
@@ -149,7 +149,13 @@ function Input(props) {
149
149
  "aria-describedby": describedBy,
150
150
  onClick: handleClick,
151
151
  onChange,
152
- className: cn(FIELD_BASE, ownClass, inputClassName, isInvalid && FIELD_INVALID, locked && "cursor-not-allowed")
152
+ className: cn(
153
+ FIELD_BASE,
154
+ ownClass,
155
+ inputClassName,
156
+ isInvalid && FIELD_INVALID,
157
+ locked && "cursor-not-allowed"
158
+ )
153
159
  }
154
160
  ) })
155
161
  ) });
@@ -168,7 +174,13 @@ function Input(props) {
168
174
  "aria-invalid": isInvalid || rest["aria-invalid"] || void 0,
169
175
  "aria-describedby": describedBy,
170
176
  onChange,
171
- className: cn(FIELD_BASE, "pe-9", inputClassName, isInvalid && FIELD_INVALID, locked && "cursor-not-allowed")
177
+ className: cn(
178
+ FIELD_BASE,
179
+ "pe-9",
180
+ inputClassName,
181
+ isInvalid && FIELD_INVALID,
182
+ locked && "cursor-not-allowed"
183
+ )
172
184
  }
173
185
  ),
174
186
  revealToggle
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/input.tsx"],"sourcesContent":["import { useId, useState } from \"react\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport type { ChangeEvent, InputHTMLAttributes, KeyboardEvent, MouseEvent, ReactNode, Ref } from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { FOCUS_RING } from \"./focus-ring\";\nimport { usePhoneLayout } from \"../hooks/use-breakpoint\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport type { CommitScope } from \"./write-lock\";\nimport {\n EndHintRow,\n FieldCaption,\n LockedReason,\n mergeDescribedBy,\n type DisabledReasonDisplay,\n type FieldHelpProps,\n useFieldError,\n useFieldHint,\n useLockReason,\n} from \"./field-parts\";\nimport { DEFAULT_PASSWORD_REVEAL_LABELS } from \"./ui-labels\";\nimport {\n CharacterCount,\n FIELD_BASE,\n FIELD_DISPLAY,\n FIELD_INVALID,\n FieldGroup,\n FloatingField,\n FLOATING_INPUT_CLASS,\n FLOATING_PLACEHOLDER_ON_FOCUS,\n fieldBelow,\n hasPlaceholderText,\n useCharacterCountLabels,\n useTypedLength,\n type CharacterCountLabels,\n type PasswordRevealLabels,\n} from \"./field-base\";\n\n// Native date/time inputs only reveal the calendar via the tiny trailing icon;\n// open the picker on a click anywhere in the field instead (feedback #224).\nconst PICKER_TYPES = new Set([\"date\", \"datetime-local\", \"month\", \"time\", \"week\"]);\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement>, FieldHelpProps {\n label?: ReactNode;\n /** Classes for the `<input>` itself, as distinct from `className`, which\n * styles the field WRAPPER once a `label` turns this into a FloatingField.\n * Without it a labelled Input had no way to reach its own element — so\n * `tabular-nums` on a numeric text field, which NumberInput has supported\n * all along through the identically named prop, was simply unavailable. */\n inputClassName?: string;\n /** {@link FIELD_DISPLAY} — on a phone, drop the chrome and set the value as a\n * heading. For the one field a form is about (a feedback subject, an account\n * name), never for a stack of them. Labelled fields only: the label is what\n * the placeholder falls back to once it goes `sr-only`. */\n variant?: \"field\" | \"display\";\n /** The field is required and unanswered, or holds something that cannot be\n * saved — {@link FIELD_INVALID}, the same rose border/ring `Select` has worn\n * since feedback #235.\n *\n * It exists here because writing `aria-invalid` by hand did NOT do this. The\n * attribute spreads onto the element and nothing styles it — there is no\n * `[aria-invalid]` rule in this package or in either consumer's stylesheet —\n * so three Keksdose dialogs flagged a mismatched passphrase to a screen reader\n * and painted the field exactly as if it were fine. Setting the prop sets the\n * attribute too, so the two can no longer be spelled separately. */\n invalid?: boolean;\n /** What is wrong with the value, in the caller's own words (\"That IBAN has 21\n * digits\"). Rendered under the field, pointed at by the control's\n * `aria-describedby` — MERGED with any the caller already passed — and implies\n * `invalid`, so the field paints as well as announces. `invalid` alone still\n * covers the case where the message lives elsewhere. See {@link useFieldError}. */\n error?: ReactNode;\n /**\n * Standing advice for the field (keksdose K4: Input had `error` but no `hint`, so the\n * app built the caption by hand under each field, and half of those never reached a\n * screen reader). The {@link Select} rule, so every field reads alike:\n * - plain TEXT (a string or a number) is a caption UNDER the field, attached with\n * `aria-describedby` — after the caller's own ids, before the error's;\n * - anything else (a {@link FieldHint} \"?\") rides the label line beside the\n * animated label, as NumberInput's does — or, on a field with no label, sits at the\n * field's end edge outside the box, and `className` then styles that row.\n */\n hint?: ReactNode;\n /**\n * A live \"12/80\" under the field, with `maxLength` (keksdose K11 — the broadcast,\n * support and handoff-note fields counted by hand). Read with the field as \"12 of 80\n * characters\", and announced politely only on entering the last stretch and on\n * reaching the limit — never on every keystroke. See {@link CharacterCount}. Ignored\n * without a `maxLength`: a count with no limit is not what this answers. Counts\n * UTF-16 code units, as `maxLength` itself does. Controlled, it counts `value`;\n * uncontrolled, `defaultValue` and then every change event — a value written from\n * outside without one (a form library's `reset`) shows from the next keystroke.\n */\n showCount?: boolean;\n /** The counter's words. See {@link CharacterCountLabels}. */\n countLabels?: Partial<CharacterCountLabels>;\n /** Names for the password reveal toggle, English by default — it is the one\n * string this component renders on its own behalf, and a German form was\n * reading it out in English. See {@link PasswordRevealLabels}. */\n passwordLabels?: Partial<PasswordRevealLabels>;\n /**\n * Why the value cannot be changed — {@link Button}'s `disabledReason`, for a text field\n * that SAVES itself: a name committed on blur (0.34, KS U10 — Kurvenschmiede's segment\n * and profile names, behind a local `CommitInput`). `disabled` takes the field out of\n * the tab order, so the reason never reached a keyboard.\n *\n * With a reason the field stays in the tab order and shows its value, `readOnly` (the\n * settled grey FIELD_BASE gives a `[readonly]` field) and `aria-disabled` — NumberInput's\n * lock (0.33.1), Autocomplete's. Nothing a save listens to is reported: not `onChange`,\n * not `onBlur` (on a field that saves itself, blur IS the save), and not Enter, which is\n * swallowed so the field does not submit the form around it; the caller's `onKeyDown`\n * still hears every other key. The reason is a line under the field at Large and on a\n * touch screen, else in the kit {@link Tooltip} (`disabledReasonDisplay`), and on the\n * input's `aria-describedby`, between the caption and the error. Wins over `disabled`.\n */\n disabledReason?: ReactNode;\n /**\n * Where the reason shows — {@link Button}'s `disabledReasonDisplay`: by default a line\n * under the field at Large and on a touch screen, the tooltip otherwise (§4 \"No fact\n * only in a tooltip\"; DUP-3, refactor audit 2026-10).\n */\n disabledReasonDisplay?: DisabledReasonDisplay;\n /**\n * This field COMMITS — {@link Button}'s `commit`: under a locked\n * {@link WriteLockProvider} it is locked the `disabledReason` way with the lock's reason\n * (which wins over its own). A field whose value only reaches the server through its\n * form's Save leaves this off and stays editable under the lock — the Save takes\n * `commit`. No provider, or an unlocked one: no effect.\n */\n commit?: CommitScope;\n /** The `<input>`. A React 19 ref prop since 0.34 (MOD-4, refactor audit 2026-10): as\n * `forwardRef`, with a `displayName` line beside it, this module could not drop an\n * unused component, and `{ Spinner }` brought Input, Select and Textarea along. */\n ref?: Ref<HTMLInputElement>;\n}\n\n/** What a locked {@link Input} swallows of a key: Enter, which would submit the form. */\nfunction swallowEnter(onKeyDown: ((e: KeyboardEvent<HTMLInputElement>) => void) | undefined) {\n return (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n return;\n }\n onKeyDown?.(e);\n };\n}\n\nexport function Input(props: InputProps) {\n const {\n ref,\n className,\n inputClassName,\n label,\n id,\n placeholder,\n type,\n variant = \"field\",\n invalid,\n error,\n hint,\n help,\n showCount,\n countLabels,\n passwordLabels,\n disabledReason,\n disabledReasonDisplay,\n commit,\n ...rest\n } = props;\n // Passed at all — even as `undefined` — the field keeps its box; see FieldGroup. The\n // same for `hint` and `showCount` (keksdose, 0.22): a caption coming and going under\n // the control must not rebuild it, or focus and the caret are lost mid-edit.\n const reserve = \"error\" in props || \"hint\" in props || \"showCount\" in props;\n const generated = useId();\n const fieldId = id ?? generated;\n const countId = useId();\n const hintParts = useFieldHint(hint, rest[\"aria-describedby\"], { help, name: label ?? rest[\"aria-label\"] });\n const maxLength = rest.maxLength;\n const counting = Boolean(showCount) && typeof maxLength === \"number\" && maxLength > 0;\n const length = useTypedLength(rest.value, rest.defaultValue);\n const countText = useCharacterCountLabels(countLabels);\n // The lock (0.34, KS U10): focusable, `readOnly`, nothing a save listens to is\n // reported — see `disabledReason`.\n const lock = useLockReason(commit, disabledReason);\n const locked = lock.locked;\n const { isInvalid, describedBy, errorEl } = useFieldError(\n error,\n invalid,\n // Caller's, caption, count, a lock's reason — then the error, appended by the hook.\n mergeDescribedBy(hintParts.describedBy, counting && countId, locked && lock.reasonId),\n rest[\"aria-invalid\"],\n );\n const counter = counting ? (\n <CharacterCount\n id={countId}\n used={length.used}\n max={maxLength}\n labels={countText}\n caption={<FieldCaption parts={hintParts} className=\"mt-0\" />}\n />\n ) : null;\n const below = fieldBelow(hintParts, counter, errorEl);\n const onChange = locked\n ? undefined\n : counting\n ? (e: ChangeEvent<HTMLInputElement>) => {\n length.track(e.target.value);\n rest.onChange?.(e);\n }\n : rest.onChange;\n // Locked, these win over what the caller's spread carried: focusable rather than\n // `disabled`, `readOnly`, no blur reported (blur is a self-saving field's save), and\n // Enter swallowed. Spread AFTER `rest` on every branch's input.\n const lockProps = locked\n ? {\n disabled: undefined,\n readOnly: true,\n \"aria-disabled\": true as const,\n onBlur: undefined,\n onKeyDown: swallowEnter(rest.onKeyDown),\n }\n : undefined;\n // While locked the field sits in the reason's frame (the line, or the Tooltip), which\n // becomes its outermost box — so `className` (a width, a flex or grid cell) moves onto\n // that, as on Select, and the form keeps its layout. `block` so a full-width field\n // stays full width in it.\n const boxClass = locked ? undefined : className;\n const withReason = (box: ReactNode) =>\n locked ? (\n <LockedReason lock={lock} display={disabledReasonDisplay} className={cn(\"block\", className)}>\n {box}\n </LockedReason>\n ) : (\n box\n );\n const asDisplay = usePhoneLayout() && variant === \"display\";\n // Password fields get a reveal toggle so users can check what they typed.\n const isPassword = type === \"password\";\n const [revealed, setRevealed] = useState(false);\n const effectiveType = isPassword && revealed ? \"text\" : type;\n const handleClick = PICKER_TYPES.has(type ?? \"\")\n ? (e: MouseEvent<HTMLInputElement>) => {\n rest.onClick?.(e);\n try {\n // showPicker throws if unsupported or not user-activated — a click is\n // a valid activation, so this is safe; guard for older browsers.\n (e.currentTarget as HTMLInputElement & { showPicker?: () => void }).showPicker?.();\n } catch {\n /* ignore */\n }\n }\n : rest.onClick;\n const passwordText = useKitLabels(\"passwordReveal\", DEFAULT_PASSWORD_REVEAL_LABELS, passwordLabels);\n const revealToggle = isPassword ? (\n <button\n type=\"button\"\n // `tabIndex={-1}` sat here, which made this a painted, clickable control that\n // Tab stepped straight over — on the one field whose value cannot be checked by\n // looking at it. There is no mouse-only case for a reveal toggle; the people who\n // cannot see what they typed are exactly who it is for. It is a tab stop now,\n // and it needs a focus ring of its own, because FIELD_BASE's ring belongs to the\n // input underneath and stays put while focus moves onto the button on top of it.\n onClick={() => setRevealed((v) => !v)}\n // …and since it is a tab stop, a field the user may not edit must not hand the\n // keyboard a control that shows what is in it — a locked one included.\n disabled={rest.disabled || locked}\n aria-label={revealed ? passwordText.hide : passwordText.show}\n aria-pressed={revealed}\n className={cn(\n \"absolute inset-y-0 end-0 flex items-center rounded-e-md px-2.5 text-placeholder transition-colors hover:text-secondary focus:outline-none disabled:cursor-default disabled:opacity-50\",\n FOCUS_RING,\n )}\n >\n {revealed ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n </button>\n ) : null;\n if (label === undefined) {\n // A \"?\" with no label line to ride goes at the end edge, outside the box, and\n // `className` moves to that row (see `hint`); without one nothing moves.\n const endHint = hintParts.labelHint;\n const ownClass = endHint === undefined ? boxClass : undefined;\n if (!isPassword) {\n return (\n <FieldGroup errorEl={below} reserve={reserve}>\n {withReason(\n <EndHintRow hint={endHint} className={boxClass}>\n <input\n ref={ref}\n id={id}\n type={type}\n placeholder={placeholder}\n {...rest}\n {...lockProps}\n // AFTER the spread, so the prop wins — but OR-ed with whatever the spread\n // carried, or setting `invalid` would have quietly deleted a caller's own\n // `aria-invalid`. The prop is the one that also paints; a bare attribute\n // still announces, which is all it ever did.\n aria-invalid={isInvalid || rest[\"aria-invalid\"] || undefined}\n // Likewise merged rather than replaced — see {@link useFieldError}.\n aria-describedby={describedBy}\n onClick={handleClick}\n onChange={onChange}\n className={cn(FIELD_BASE, ownClass, inputClassName, isInvalid && FIELD_INVALID, locked && \"cursor-not-allowed\")}\n />\n </EndHintRow>,\n )}\n </FieldGroup>\n );\n }\n return (\n <FieldGroup errorEl={below} reserve={reserve}>\n {withReason(\n <EndHintRow hint={endHint} className={boxClass}>\n <div className={cn(\"relative\", ownClass)}>\n <input\n ref={ref}\n id={id}\n type={effectiveType}\n placeholder={placeholder}\n {...rest}\n {...lockProps}\n aria-invalid={isInvalid || rest[\"aria-invalid\"] || undefined}\n aria-describedby={describedBy}\n onChange={onChange}\n className={cn(FIELD_BASE, \"pe-9\", inputClassName, isInvalid && FIELD_INVALID, locked && \"cursor-not-allowed\")}\n />\n {revealToggle}\n </div>\n </EndHintRow>,\n )}\n </FieldGroup>\n );\n }\n const ownPlaceholder = hasPlaceholderText(placeholder);\n return (\n <FieldGroup errorEl={below} reserve={reserve}>\n {withReason(\n <FloatingField\n className={boxClass}\n htmlFor={fieldId}\n label={label}\n srOnlyLabel={asDisplay}\n hint={hintParts.labelHint}\n >\n <input\n ref={ref}\n id={fieldId}\n type={effectiveType}\n // A labelled field with no placeholder of its own gets a single space, which\n // feeds the floating label's peer-placeholder-shown trick. A caller's own is\n // kept and shown on focus, once the label has floated out of its way (kastlan\n // 8) — see FLOATING_PLACEHOLDER_ON_FOCUS. With the label sr-only there is no\n // float left to drive, and an empty borderless line would say nothing at all\n // — so there the label text is the placeholder when the caller gave none.\n placeholder={\n asDisplay\n ? (placeholder ?? (typeof label === \"string\" ? label : \" \"))\n : ownPlaceholder\n ? placeholder\n : \" \"\n }\n {...rest}\n {...lockProps}\n aria-invalid={isInvalid || rest[\"aria-invalid\"] || undefined}\n aria-describedby={describedBy}\n onClick={handleClick}\n onChange={onChange}\n className={cn(\n asDisplay\n ? cn(FIELD_DISPLAY, \"text-xl font-semibold leading-snug\")\n : cn(FLOATING_INPUT_CLASS, ownPlaceholder && FLOATING_PLACEHOLDER_ON_FOCUS),\n isPassword && \"pe-9\",\n inputClassName,\n isInvalid && FIELD_INVALID,\n locked && \"cursor-not-allowed\",\n )}\n />\n {revealToggle}\n </FloatingField>,\n )}\n </FieldGroup>\n );\n}\n"],"mappings":";AAqMe,cAmHH,YAnHG;AArMf,SAAS,OAAO,gBAAgB;AAChC,SAAS,KAAK,cAAc;AAE5B,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sCAAsC;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAIP,MAAM,eAAe,oBAAI,IAAI,CAAC,QAAQ,kBAAkB,SAAS,QAAQ,MAAM,CAAC;AAiGhF,SAAS,aAAa,WAAuE;AAC3F,SAAO,CAAC,MAAuC;AAC7C,QAAI,EAAE,QAAQ,SAAS;AACrB,QAAE,eAAe;AACjB;AAAA,IACF;AACA,gBAAY,CAAC;AAAA,EACf;AACF;AAEO,SAAS,MAAM,OAAmB;AACvC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;A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kB,6BAA6B;AAAA,gBAC5E,cAAc;AAAA,gBACd;AAAA,gBACA,aAAa;AAAA,gBACb,UAAU;AAAA,cACZ;AAAA;AAAA,UACF;AAAA,UACC;AAAA;AAAA;AAAA,IACH;AAAA,EACF,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/input.tsx"],"sourcesContent":["import { useId, useState } from \"react\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport type { ChangeEvent, InputHTMLAttributes, KeyboardEvent, MouseEvent, ReactNode, Ref } from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { FOCUS_RING } from \"./focus-ring\";\nimport { usePhoneLayout } from \"../hooks/use-breakpoint\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport type { CommitScope } from \"./write-lock\";\nimport {\n EndHintRow,\n FieldCaption,\n LockedReason,\n mergeDescribedBy,\n type DisabledReasonDisplay,\n type FieldHelpProps,\n useFieldError,\n useFieldHint,\n useLockReason,\n} from \"./field-parts\";\nimport { DEFAULT_PASSWORD_REVEAL_LABELS } from \"./ui-labels\";\nimport {\n CharacterCount,\n FIELD_BASE,\n FIELD_DISPLAY,\n FIELD_INVALID,\n FieldGroup,\n FloatingField,\n FLOATING_INPUT_CLASS,\n FLOATING_PLACEHOLDER_ON_FOCUS,\n fieldBelow,\n hasPlaceholderText,\n useCharacterCountLabels,\n useTypedLength,\n type CharacterCountLabels,\n type PasswordRevealLabels,\n} from \"./field-base\";\n\n// Native date/time inputs only reveal the calendar via the tiny trailing icon;\n// open the picker on a click anywhere in the field instead (feedback #224).\nconst PICKER_TYPES = new Set([\"date\", \"datetime-local\", \"month\", \"time\", \"week\"]);\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement>, FieldHelpProps {\n label?: ReactNode;\n /** Classes for the `<input>` itself, as distinct from `className`, which\n * styles the field WRAPPER once a `label` turns this into a FloatingField.\n * Without it a labelled Input had no way to reach its own element — so\n * `tabular-nums` on a numeric text field, which NumberInput has supported\n * all along through the identically named prop, was simply unavailable. */\n inputClassName?: string;\n /** {@link FIELD_DISPLAY} — on a phone, drop the chrome and set the value as a\n * heading. For the one field a form is about (a feedback subject, an account\n * name), never for a stack of them. Labelled fields only: the label is what\n * the placeholder falls back to once it goes `sr-only`. */\n variant?: \"field\" | \"display\";\n /** The field is required and unanswered, or holds something that cannot be\n * saved — {@link FIELD_INVALID}, the same rose border/ring `Select` has worn\n * since feedback #235.\n *\n * It exists here because writing `aria-invalid` by hand did NOT do this. The\n * attribute spreads onto the element and nothing styles it — there is no\n * `[aria-invalid]` rule in this package or in either consumer's stylesheet —\n * so three Keksdose dialogs flagged a mismatched passphrase to a screen reader\n * and painted the field exactly as if it were fine. Setting the prop sets the\n * attribute too, so the two can no longer be spelled separately. */\n invalid?: boolean;\n /** What is wrong with the value, in the caller's own words (\"That IBAN has 21\n * digits\"). Rendered under the field, pointed at by the control's\n * `aria-describedby` — MERGED with any the caller already passed — and implies\n * `invalid`, so the field paints as well as announces. `invalid` alone still\n * covers the case where the message lives elsewhere. See {@link useFieldError}. */\n error?: ReactNode;\n /**\n * Standing advice for the field (keksdose K4: Input had `error` but no `hint`, so the\n * app built the caption by hand under each field, and half of those never reached a\n * screen reader). The {@link Select} rule, so every field reads alike:\n * - plain TEXT (a string or a number) is a caption UNDER the field, attached with\n * `aria-describedby` — after the caller's own ids, before the error's;\n * - anything else (a {@link FieldHint} \"?\") rides the label line beside the\n * animated label, as NumberInput's does — or, on a field with no label, sits at the\n * field's end edge outside the box, and `className` then styles that row.\n */\n hint?: ReactNode;\n /**\n * A live \"12/80\" under the field, with `maxLength` (keksdose K11 — the broadcast,\n * support and handoff-note fields counted by hand). Read with the field as \"12 of 80\n * characters\", and announced politely only on entering the last stretch and on\n * reaching the limit — never on every keystroke. See {@link CharacterCount}. Ignored\n * without a `maxLength`: a count with no limit is not what this answers. Counts\n * UTF-16 code units, as `maxLength` itself does. Controlled, it counts `value`;\n * uncontrolled, `defaultValue` and then every change event — a value written from\n * outside without one (a form library's `reset`) shows from the next keystroke.\n */\n showCount?: boolean;\n /** The counter's words. See {@link CharacterCountLabels}. */\n countLabels?: Partial<CharacterCountLabels>;\n /** Names for the password reveal toggle, English by default — it is the one\n * string this component renders on its own behalf, and a German form was\n * reading it out in English. See {@link PasswordRevealLabels}. */\n passwordLabels?: Partial<PasswordRevealLabels>;\n /**\n * Why the value cannot be changed — {@link Button}'s `disabledReason`, for a text field\n * that SAVES itself: a name committed on blur (0.34, KS U10 — Kurvenschmiede's segment\n * and profile names, behind a local `CommitInput`). `disabled` takes the field out of\n * the tab order, so the reason never reached a keyboard.\n *\n * With a reason the field stays in the tab order and shows its value, `readOnly` (the\n * settled grey FIELD_BASE gives a `[readonly]` field) and `aria-disabled` — NumberInput's\n * lock (0.33.1), Autocomplete's. Nothing a save listens to is reported: not `onChange`,\n * not `onBlur` (on a field that saves itself, blur IS the save), and not Enter, which is\n * swallowed so the field does not submit the form around it; the caller's `onKeyDown`\n * still hears every other key. The reason is a line under the field at Large and on a\n * touch screen, else in the kit {@link Tooltip} (`disabledReasonDisplay`), and on the\n * input's `aria-describedby`, between the caption and the error. Wins over `disabled`.\n */\n disabledReason?: ReactNode;\n /**\n * Where the reason shows — {@link Button}'s `disabledReasonDisplay`: by default a line\n * under the field at Large and on a touch screen, the tooltip otherwise (§4 \"No fact\n * only in a tooltip\"; DUP-3, refactor audit 2026-10).\n */\n disabledReasonDisplay?: DisabledReasonDisplay;\n /**\n * This field COMMITS — {@link Button}'s `commit`: under a locked\n * {@link WriteLockProvider} it is locked the `disabledReason` way with the lock's reason\n * (which wins over its own). A field whose value only reaches the server through its\n * form's Save leaves this off and stays editable under the lock — the Save takes\n * `commit`. No provider, or an unlocked one: no effect.\n */\n commit?: CommitScope;\n /** The `<input>`. A React 19 ref prop since 0.34 (MOD-4, refactor audit 2026-10): as\n * `forwardRef`, with a `displayName` line beside it, this module could not drop an\n * unused component, and `{ Spinner }` brought Input, Select and Textarea along. */\n ref?: Ref<HTMLInputElement>;\n}\n\n/** What a locked {@link Input} swallows of a key: Enter, which would submit the form. */\nfunction swallowEnter(onKeyDown: ((e: KeyboardEvent<HTMLInputElement>) => void) | undefined) {\n return (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n return;\n }\n onKeyDown?.(e);\n };\n}\n\nexport function Input(props: InputProps) {\n const {\n ref,\n className,\n inputClassName,\n label,\n id,\n placeholder,\n type,\n variant = \"field\",\n invalid,\n error,\n hint,\n help,\n showCount,\n countLabels,\n passwordLabels,\n disabledReason,\n disabledReasonDisplay,\n commit,\n ...rest\n } = props;\n // Passed at all — even as `undefined` — the field keeps its box; see FieldGroup. The\n // same for `hint` and `showCount` (keksdose, 0.22): a caption coming and going under\n // the control must not rebuild it, or focus and the caret are lost mid-edit.\n const reserve = \"error\" in props || \"hint\" in props || \"showCount\" in props;\n const generated = useId();\n const fieldId = id ?? generated;\n const countId = useId();\n const hintParts = useFieldHint(hint, rest[\"aria-describedby\"], { help, name: label ?? rest[\"aria-label\"] });\n const maxLength = rest.maxLength;\n const counting = Boolean(showCount) && typeof maxLength === \"number\" && maxLength > 0;\n const length = useTypedLength(rest.value, rest.defaultValue);\n const countText = useCharacterCountLabels(countLabels);\n // The lock (0.34, KS U10): focusable, `readOnly`, nothing a save listens to is\n // reported — see `disabledReason`.\n const lock = useLockReason(commit, disabledReason);\n const locked = lock.locked;\n const { isInvalid, describedBy, errorEl } = useFieldError(\n error,\n invalid,\n // Caller's, caption, count, a lock's reason — then the error, appended by the hook.\n mergeDescribedBy(hintParts.describedBy, counting && countId, locked && lock.reasonId),\n rest[\"aria-invalid\"],\n );\n const counter = counting ? (\n <CharacterCount\n id={countId}\n used={length.used}\n max={maxLength}\n labels={countText}\n caption={<FieldCaption parts={hintParts} className=\"mt-0\" />}\n />\n ) : null;\n const below = fieldBelow(hintParts, counter, errorEl);\n const onChange = locked\n ? undefined\n : counting\n ? (e: ChangeEvent<HTMLInputElement>) => {\n length.track(e.target.value);\n rest.onChange?.(e);\n }\n : rest.onChange;\n // Locked, these win over what the caller's spread carried: focusable rather than\n // `disabled`, `readOnly`, no blur reported (blur is a self-saving field's save), and\n // Enter swallowed. Spread AFTER `rest` on every branch's input.\n const lockProps = locked\n ? {\n disabled: undefined,\n readOnly: true,\n \"aria-disabled\": true as const,\n onBlur: undefined,\n onKeyDown: swallowEnter(rest.onKeyDown),\n }\n : undefined;\n // While locked the field sits in the reason's frame (the line, or the Tooltip), which\n // becomes its outermost box — so `className` (a width, a flex or grid cell) moves onto\n // that, as on Select, and the form keeps its layout. `block` so a full-width field\n // stays full width in it.\n const boxClass = locked ? undefined : className;\n const withReason = (box: ReactNode) =>\n locked ? (\n <LockedReason lock={lock} display={disabledReasonDisplay} className={cn(\"block\", className)}>\n {box}\n </LockedReason>\n ) : (\n box\n );\n const asDisplay = usePhoneLayout() && variant === \"display\";\n // Password fields get a reveal toggle so users can check what they typed.\n const isPassword = type === \"password\";\n const [revealed, setRevealed] = useState(false);\n const effectiveType = isPassword && revealed ? \"text\" : type;\n const handleClick = PICKER_TYPES.has(type ?? \"\")\n ? (e: MouseEvent<HTMLInputElement>) => {\n rest.onClick?.(e);\n try {\n // showPicker throws if unsupported or not user-activated — a click is\n // a valid activation, so this is safe; guard for older browsers.\n (e.currentTarget as HTMLInputElement & { showPicker?: () => void }).showPicker?.();\n } catch {\n /* ignore */\n }\n }\n : rest.onClick;\n const passwordText = useKitLabels(\"passwordReveal\", DEFAULT_PASSWORD_REVEAL_LABELS, passwordLabels);\n const revealToggle = isPassword ? (\n <button\n type=\"button\"\n // `tabIndex={-1}` sat here, which made this a painted, clickable control that\n // Tab stepped straight over — on the one field whose value cannot be checked by\n // looking at it. There is no mouse-only case for a reveal toggle; the people who\n // cannot see what they typed are exactly who it is for. It is a tab stop now,\n // and it needs a focus ring of its own, because FIELD_BASE's ring belongs to the\n // input underneath and stays put while focus moves onto the button on top of it.\n onClick={() => setRevealed((v) => !v)}\n // …and since it is a tab stop, a field the user may not edit must not hand the\n // keyboard a control that shows what is in it — a locked one included.\n disabled={rest.disabled || locked}\n aria-label={revealed ? passwordText.hide : passwordText.show}\n aria-pressed={revealed}\n className={cn(\n \"absolute inset-y-0 end-0 flex items-center rounded-e-md px-2.5 text-placeholder transition-colors hover:text-secondary focus:outline-none disabled:cursor-default disabled:opacity-50\",\n FOCUS_RING,\n )}\n >\n {revealed ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n </button>\n ) : null;\n if (label === undefined) {\n // A \"?\" with no label line to ride goes at the end edge, outside the box, and\n // `className` moves to that row (see `hint`); without one nothing moves.\n const endHint = hintParts.labelHint;\n const ownClass = endHint === undefined ? boxClass : undefined;\n if (!isPassword) {\n return (\n <FieldGroup errorEl={below} reserve={reserve}>\n {withReason(\n <EndHintRow hint={endHint} className={boxClass}>\n <input\n ref={ref}\n id={id}\n type={type}\n placeholder={placeholder}\n {...rest}\n {...lockProps}\n // AFTER the spread, so the prop wins — but OR-ed with whatever the spread\n // carried, or setting `invalid` would have quietly deleted a caller's own\n // `aria-invalid`. The prop is the one that also paints; a bare attribute\n // still announces, which is all it ever did.\n aria-invalid={isInvalid || rest[\"aria-invalid\"] || undefined}\n // Likewise merged rather than replaced — see {@link useFieldError}.\n aria-describedby={describedBy}\n onClick={handleClick}\n onChange={onChange}\n className={cn(\n FIELD_BASE,\n ownClass,\n inputClassName,\n isInvalid && FIELD_INVALID,\n locked && \"cursor-not-allowed\",\n )}\n />\n </EndHintRow>,\n )}\n </FieldGroup>\n );\n }\n return (\n <FieldGroup errorEl={below} reserve={reserve}>\n {withReason(\n <EndHintRow hint={endHint} className={boxClass}>\n <div className={cn(\"relative\", ownClass)}>\n <input\n ref={ref}\n id={id}\n type={effectiveType}\n placeholder={placeholder}\n {...rest}\n {...lockProps}\n aria-invalid={isInvalid || rest[\"aria-invalid\"] || undefined}\n aria-describedby={describedBy}\n onChange={onChange}\n className={cn(\n FIELD_BASE,\n \"pe-9\",\n inputClassName,\n isInvalid && FIELD_INVALID,\n locked && \"cursor-not-allowed\",\n )}\n />\n {revealToggle}\n </div>\n </EndHintRow>,\n )}\n </FieldGroup>\n );\n }\n const ownPlaceholder = hasPlaceholderText(placeholder);\n return (\n <FieldGroup errorEl={below} reserve={reserve}>\n {withReason(\n <FloatingField\n className={boxClass}\n htmlFor={fieldId}\n label={label}\n srOnlyLabel={asDisplay}\n hint={hintParts.labelHint}\n >\n <input\n ref={ref}\n id={fieldId}\n type={effectiveType}\n // A labelled field with no placeholder of its own gets a single space, which\n // feeds the floating label's peer-placeholder-shown trick. A caller's own is\n // kept and shown on focus, once the label has floated out of its way (kastlan\n // 8) — see FLOATING_PLACEHOLDER_ON_FOCUS. With the label sr-only there is no\n // float left to drive, and an empty borderless line would say nothing at all\n // — so there the label text is the placeholder when the caller gave none.\n placeholder={\n asDisplay\n ? (placeholder ?? (typeof label === \"string\" ? label : \" \"))\n : ownPlaceholder\n ? placeholder\n : \" \"\n }\n {...rest}\n {...lockProps}\n aria-invalid={isInvalid || rest[\"aria-invalid\"] || undefined}\n aria-describedby={describedBy}\n onClick={handleClick}\n onChange={onChange}\n className={cn(\n asDisplay\n ? cn(FIELD_DISPLAY, \"text-xl font-semibold leading-snug\")\n : cn(FLOATING_INPUT_CLASS, ownPlaceholder && FLOATING_PLACEHOLDER_ON_FOCUS),\n isPassword && \"pe-9\",\n inputClassName,\n isInvalid && FIELD_INVALID,\n locked && \"cursor-not-allowed\",\n )}\n />\n {revealToggle}\n </FloatingField>,\n )}\n </FieldGroup>\n );\n}\n"],"mappings":";AAqMe,cAyHH,YAzHG;AArMf,SAAS,OAAO,gBAAgB;AAChC,SAAS,KAAK,cAAc;AAE5B,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sCAAsC;AAC/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iBAAiB,mBAAmB,WAAW;AACrD,SACE,oBAAC,cAAW,SAAS,OAAO,SACzB;AAAA,IACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,QACX,SAAS;AAAA,QACT;AAAA,QACA,aAAa;AAAA,QACb,MAAM,UAAU;AAAA,QAEhB;AAAA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,IAAI;AAAA,cACJ,MAAM;AAAA,cAON,aACE,YACK,gBAAgB,OAAO,UAAU,WAAW,QAAQ,OACrD,iBACE,cACA;AAAA,cAEP,GAAG;AAAA,cACH,GAAG;AAAA,cACJ,gBAAc,aAAa,KAAK,cAAc,KAAK;AAAA,cACnD,oBAAkB;AAAA,cAClB,SAAS;AAAA,cACT;AAAA,cACA,WAAW;AAAA,gBACT,YACI,GAAG,eAAe,oCAAoC,IACtD,GAAG,sBAAsB,kBAAkB,6BAA6B;AAAA,gBAC5E,cAAc;AAAA,gBACd;AAAA,gBACA,aAAa;AAAA,gBACb,UAAU;AAAA,cACZ;AAAA;AAAA,UACF;AAAA,UACC;AAAA;AAAA;AAAA,IACH;AAAA,EACF,GACF;AAEJ;","names":[]}
@@ -184,13 +184,7 @@ function JumpCalendar({
184
184
  className: "inline-flex min-w-0 items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium text-secondary hover:bg-hover",
185
185
  children: [
186
186
  /* @__PURE__ */ jsx("span", { id: captionId, "aria-live": "polite", className: "truncate", children: caption }),
187
- /* @__PURE__ */ jsx(
188
- ChevronDown,
189
- {
190
- "aria-hidden": true,
191
- className: cn("size-3.5 shrink-0 text-muted", !inDays && "rotate-180")
192
- }
193
- )
187
+ /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": true, className: cn("size-3.5 shrink-0 text-muted", !inDays && "rotate-180") })
194
188
  ]
195
189
  }
196
190
  ),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/jump-calendar.tsx"],"sourcesContent":["// The date pickers' calendar with a month jump (`monthJump`, kastlan): MiniCalendar\n// under a ‹ caption › whose caption opens a month grid. Moved out of date-picker.tsx as\n// it was (MOD-9, refactor audit 2026-10); internal, both pickers reach it through\n// `PanelCalendar`.\nimport { useEffect, useId, useMemo, useRef, useState } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport { ChevronDown, ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { horizontalStep } from \"../lib/direction\";\nimport { monthKey, pad, parseIsoDate } from \"../lib/dates\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport { FOCUS_RING_WIDTH } from \"./focus-ring\";\nimport { DEFAULT_MINI_CALENDAR_LABELS, MiniCalendar, type MiniCalendarProps } from \"./mini-calendar\";\nimport { DEFAULT_MONTH_PICKER_LABELS } from \"./month-picker\";\nimport { claimEscape } from \"../hooks/use-dismiss\";\n\n// ── Month jump (`monthJump`, kastlan) ─────────────────────────────────────\n\n/** A \"YYYY-MM\" key as a count of months, and back: month arithmetic with no `Date`\n * rollover to step around. */\nconst monthIndex = (key: string) => Number(key.slice(0, 4)) * 12 + Number(key.slice(5, 7)) - 1;\nconst keyOfIndex = (index: number) =>\n `${String(Math.floor(index / 12)).padStart(4, \"0\")}-${pad((index % 12) + 1)}`;\nconst shiftKey = (key: string, delta: number) => keyOfIndex(monthIndex(key) + delta);\n/** The 1st of a \"YYYY-MM\" month, for `Intl` to name. */\nconst firstOfKey = (key: string) => new Date(Number(key.slice(0, 4)), Number(key.slice(5, 7)) - 1, 1);\n\n/** Upper-case the first letter only, as `MonthPicker` does: \"julio de 2026\" heads a\n * panel as \"Julio de 2026\" — not \"Julio De 2026\", which CSS `capitalize` would write. */\nconst upperFirst = (text: string, locale: string | undefined) =>\n text.charAt(0).toLocaleUpperCase(locale) + text.slice(1);\n\n/** Months per row of the month grid — `MonthPicker`'s 4×3. */\nconst MONTH_COLUMNS = 3;\n\n/**\n * The month `MiniCalendar` opens on — the selection, or today, pulled inside the\n * bounds — worked out the way it does, so the caption drawn over a calendar that was\n * given no `month` names the month that calendar is showing.\n */\nfunction openingMonth(from: string, to: string, lo: Date | null, hi: Date | null): string {\n const start = parseIsoDate(from) ?? parseIsoDate(to) ?? new Date();\n if (lo && start < lo) return monthKey(lo);\n if (hi && start > hi) return monthKey(hi);\n return monthKey(start);\n}\n\nexport type PanelCalendarProps = Pick<\n MiniCalendarProps,\n \"mode\" | \"from\" | \"to\" | \"locale\" | \"min\" | \"max\" | \"labels\" | \"onSelect\" | \"focusOnOpen\"\n> & {\n /** See {@link DatePickerBaseProps.monthJump}. */\n monthJump?: boolean;\n};\n\n/** The panel's calendar: the plain {@link MiniCalendar}, exactly as before — or, with\n * `monthJump`, the same calendar under a caption that opens a month grid. */\nexport function PanelCalendar({ monthJump, ...calendar }: PanelCalendarProps) {\n return monthJump ? <JumpCalendar {...calendar} /> : <MiniCalendar {...calendar} />;\n}\n\n/** How the day grid is mounted: `key` remounts it, `month` is the month it follows\n * (left out until the panel first moves, so it opens exactly where it always has), and\n * `focus` is its `focusOnOpen`. */\ninterface DayGridMount {\n key: number;\n month?: string;\n focus: boolean;\n}\n\n/**\n * {@link MiniCalendar} with its navigation drawn here — ‹ caption › — so the caption can\n * be a button that swaps the days for a month grid ({@link DatePickerBaseProps.monthJump}).\n *\n * Built on the calendar's own `hideNavigation` / `month` / `onMonthChange`, not a fork\n * of it: the days, their keys, the range band and every announcement stay the\n * calendar's. What this keeps is `shown`, the month on screen, for the caption — fed by\n * the arrows here, by the calendar's `onMonthChange` (PageUp, arrowing off the edge),\n * and by the value, whose changes the calendar follows WITHOUT reporting them (a preset\n * in `commit=\"apply\"` moves the grid to its start). That last one is mirrored below with\n * the calendar's own rule, and when it lands in another month the day grid is remounted\n * there rather than steered by `month`: a `month` that changes in the same render as the\n * value would win over the value's day, and the grid's tab stop would land on the\n * month's same-numbered day instead of the preset's start.\n *\n * The month grid is `MonthPicker`'s, redrawn here because that one is internal to its\n * file; same roles, keys and words (`monthPicker` labels).\n */\nfunction JumpCalendar({\n from = \"\",\n to = \"\",\n mode = \"range\",\n locale,\n min,\n max,\n labels,\n onSelect,\n focusOnOpen,\n}: Omit<PanelCalendarProps, \"monthJump\">) {\n // The month arrows say what they said when the calendar drew them; the month grid\n // says what `MonthPicker`'s says.\n const calendarText = useKitLabels(\"miniCalendar\", DEFAULT_MINI_CALENDAR_LABELS, labels);\n const monthText = useKitLabels(\"monthPicker\", DEFAULT_MONTH_PICKER_LABELS);\n const id = useId();\n const captionId = `${id}-caption`;\n const hintId = `${id}-hint`;\n const captionRef = useRef<HTMLButtonElement>(null);\n const monthsRef = useRef<HTMLDivElement>(null);\n\n const lo = min ? parseIsoDate(min) : null;\n const hi = max ? parseIsoDate(max) : null;\n const minKey = lo ? monthKey(lo) : null;\n const maxKey = hi ? monthKey(hi) : null;\n const outOfBounds = (key: string) => Boolean((minKey && key < minKey) || (maxKey && key > maxKey));\n const clampKey = (key: string) => (minKey && key < minKey ? minKey : maxKey && key > maxKey ? maxKey : key);\n\n const [view, setView] = useState<\"days\" | \"months\">(\"days\");\n const [shown, setShown] = useState(() => openingMonth(from, to, lo, hi));\n const [dayGrid, setDayGrid] = useState<DayGridMount>(() => ({ key: 0, focus: Boolean(focusOnOpen) }));\n // The month holding the month grid's tab stop — and with it the year on show.\n const [active, setActive] = useState(shown);\n\n // The value moved from outside the day grid (a preset, a reset): follow the end that\n // changed, by the calendar's own rule, and remount the days there — see above. Also\n // what takes an open month grid back to the days when a preset is picked beside it.\n const [lastValue, setLastValue] = useState({ from, to });\n if (lastValue.from !== from || lastValue.to !== to) {\n const changed = lastValue.from !== from ? from : to;\n setLastValue({ from, to });\n const next = parseIsoDate(changed) ?? parseIsoDate(from) ?? parseIsoDate(to);\n const key = next ? monthKey(next) : null;\n if (key && (key !== shown || view === \"months\")) {\n setShown(key);\n setView(\"days\");\n setDayGrid((d) => ({ key: d.key + 1, month: key, focus: false }));\n }\n }\n\n // A month cell that has to take focus once it exists: opening the grid, and arrowing\n // across a year's edge, which relabels the same twelve buttons.\n const pendingFocus = useRef<string | null>(null);\n useEffect(() => {\n const key = pendingFocus.current;\n if (!key) return;\n pendingFocus.current = null;\n monthsRef.current?.querySelector<HTMLElement>(`[data-month=\"${key}\"]`)?.focus();\n });\n\n const showMonth = (key: string) => {\n setShown(key);\n // Follows by `month`: the calendar keeps the day of the month (clamped), and the\n // focus stays on the arrow being pressed.\n setDayGrid((d) => ({ ...d, month: key }));\n };\n const openMonths = () => {\n const start = clampKey(shown);\n pendingFocus.current = start;\n setActive(start);\n setView(\"months\");\n };\n const closeMonths = (focusCaption: boolean) => {\n setView(\"days\");\n setDayGrid((d) => ({ ...d, month: shown, focus: false }));\n if (focusCaption) captionRef.current?.focus();\n };\n const pick = (key: string) => {\n setShown(key);\n setView(\"days\");\n // Picked to go there: the focus goes with it, onto the days.\n setDayGrid((d) => ({ key: d.key + 1, month: key, focus: true }));\n };\n const moveActive = (key: string, focus: boolean) => {\n if (focus) pendingFocus.current = key;\n setActive(key);\n };\n\n const inDays = view === \"days\";\n // Escape in the month grid is \"back\", not \"close\": the month grid is a step INSIDE the\n // panel, and losing the half-made range to a key meant to undo that step would be the\n // worse surprise. Claimed on the kit's Escape stack (Wave 2, DUP-1) and stopped here,\n // so neither the popover nor the phone sheet nor a dialog around them closes.\n const escapeToDays = (e: KeyboardEvent<HTMLElement>) => {\n if (e.key !== \"Escape\" || inDays) return;\n claimEscape(e);\n e.stopPropagation();\n closeMonths(true);\n };\n\n const onMonthKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {\n if (e.key === \"Escape\") return escapeToDays(e);\n // Left and right are visual: the grid runs the other way in a right-to-left panel.\n const step = horizontalStep(e.key, e.currentTarget);\n const col = (monthIndex(active) % 12) % MONTH_COLUMNS;\n let delta: number;\n switch (step ? \"horizontal\" : e.key) {\n case \"horizontal\":\n delta = step;\n break;\n case \"ArrowUp\":\n delta = -MONTH_COLUMNS;\n break;\n case \"ArrowDown\":\n delta = MONTH_COLUMNS;\n break;\n case \"Home\":\n delta = -col;\n break;\n case \"End\":\n delta = MONTH_COLUMNS - 1 - col;\n break;\n case \"PageUp\":\n delta = -12;\n break;\n case \"PageDown\":\n delta = 12;\n break;\n default:\n return;\n }\n // Before the no-op check: these keys also scroll the panel.\n e.preventDefault();\n if (delta !== 0) moveActive(shiftKey(active, delta), true);\n };\n\n const year = Number(active.slice(0, 4));\n // A year arrow is dead once every month of the year it leads to is out of bounds.\n const prevYearBlocked = Boolean(minKey && year - 1 < Number(minKey.slice(0, 4)));\n const nextYearBlocked = Boolean(maxKey && year + 1 > Number(maxKey.slice(0, 4)));\n const prevBlocked = !inDays && prevYearBlocked;\n const nextBlocked = !inDays && nextYearBlocked;\n\n const longName = useMemo(() => new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }), [locale]);\n const shortNames = useMemo(() => {\n const fmt = new Intl.DateTimeFormat(locale, { month: \"short\" });\n return Array.from({ length: 12 }, (_, i) => upperFirst(fmt.format(new Date(2000, i, 1)), locale));\n }, [locale]);\n const caption = inDays\n ? upperFirst(longName.format(firstOfKey(shown)), locale)\n : new Intl.DateTimeFormat(locale, { year: \"numeric\" }).format(new Date(year, 0, 1));\n\n // The selection, as months: both ends, and the months between (a range's band).\n const fromDate = parseIsoDate(from);\n const toDate = parseIsoDate(to);\n const fromKey = fromDate ? monthKey(fromDate) : null;\n const toKey = toDate ? monthKey(toDate) : null;\n const low = fromKey ?? toKey;\n const high = toKey ?? fromKey;\n const currentKey = monthKey(new Date());\n\n // Aria-disabled rather than disabled, like the day cells: a focused button that\n // turns `disabled` drops the focus to <body>, mid-panel.\n const arrow =\n \"rounded p-1 text-muted hover:bg-hover aria-disabled:cursor-not-allowed aria-disabled:opacity-30 aria-disabled:hover:bg-transparent\";\n\n return (\n <div className=\"select-none\">\n {/* The calendar's own row, redrawn: the same arrows in the same places. Each\n button stays mounted across the two views and changes what it steps, so a\n press never pulls the element out from under the pointer or the focus. */}\n <div className=\"flex items-center justify-between gap-1 pb-1\">\n <button\n type=\"button\"\n aria-label={inDays ? calendarText.previousMonth : monthText.previousYear}\n aria-disabled={prevBlocked || undefined}\n onClick={() => {\n if (inDays) showMonth(shiftKey(shown, -1));\n else if (!prevBlocked) moveActive(shiftKey(active, -12), false);\n }}\n onKeyDown={escapeToDays}\n className={arrow}\n >\n {/* Mirrored in RTL: \"previous\" points to the reading START, which is right. */}\n <ChevronLeft className=\"size-4 rtl:-scale-x-100\" aria-hidden />\n </button>\n <button\n ref={captionRef}\n type=\"button\"\n aria-expanded={!inDays}\n aria-describedby={inDays ? hintId : undefined}\n onClick={inDays ? openMonths : () => closeMonths(false)}\n onKeyDown={escapeToDays}\n className=\"inline-flex min-w-0 items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium text-secondary hover:bg-hover\"\n >\n {/* The name is the text, so it says what is on screen; `aria-live` because\n pressing an arrow leaves focus ON the arrow, and this is the only thing\n that says where it went. It also names the month grid. */}\n <span id={captionId} aria-live=\"polite\" className=\"truncate\">\n {caption}\n </span>\n <ChevronDown\n aria-hidden\n className={cn(\"size-3.5 shrink-0 text-muted\", !inDays && \"rotate-180\")}\n />\n </button>\n <button\n type=\"button\"\n aria-label={inDays ? calendarText.nextMonth : monthText.nextYear}\n aria-disabled={nextBlocked || undefined}\n onClick={() => {\n if (inDays) showMonth(shiftKey(shown, 1));\n else if (!nextBlocked) moveActive(shiftKey(active, 12), false);\n }}\n onKeyDown={escapeToDays}\n className={arrow}\n >\n <ChevronRight className=\"size-4 rtl:-scale-x-100\" aria-hidden />\n </button>\n </div>\n {/* The caption's description — read through the reference, never on its own. */}\n <span id={hintId} hidden>\n {monthText.panel}\n </span>\n {inDays ? (\n <MiniCalendar\n key={dayGrid.key}\n mode={mode}\n from={from}\n to={to}\n locale={locale}\n min={min}\n max={max}\n labels={labels}\n onSelect={onSelect}\n focusOnOpen={dayGrid.focus}\n hideNavigation\n month={dayGrid.month}\n onMonthChange={showMonth}\n />\n ) : (\n <div ref={monthsRef} role=\"grid\" aria-labelledby={captionId} className=\"grid gap-1\">\n {Array.from({ length: 12 / MONTH_COLUMNS }, (_, row) => (\n <div key={row} role=\"row\" className=\"grid grid-cols-3 gap-1\">\n {Array.from({ length: MONTH_COLUMNS }, (_, c) => {\n const index = row * MONTH_COLUMNS + c;\n const key = keyOfIndex(year * 12 + index);\n const disabled = outOfBounds(key);\n const selected = low !== null && high !== null && key >= low && key <= high;\n const end = key === fromKey || key === toKey;\n const current = key === currentKey;\n return (\n <button\n key={c}\n type=\"button\"\n role=\"gridcell\"\n data-month={key}\n tabIndex={key === active ? 0 : -1}\n aria-label={monthText.month(longName.format(firstOfKey(key)))}\n aria-selected={selected}\n aria-disabled={disabled || undefined}\n aria-current={current ? \"date\" : undefined}\n onClick={() => {\n // The guard `disabled` would have been: out-of-bounds months stay\n // focusable, so the roving tab stop never falls into a hole.\n if (!disabled) pick(key);\n }}\n onKeyDown={onMonthKeyDown}\n className={cn(\n // 44px rows: the touch-target size, and four of them stand as tall\n // as a month of days, so the panel does not jump as the views swap.\n \"h-11 rounded px-1 text-sm tabular-nums transition-colors\",\n FOCUS_RING_WIDTH,\n \"focus-visible:outline-none focus-visible:ring-inset\",\n // A --brand ring on a --brand fill exists only in the DOM.\n end && !disabled ? \"focus-visible:ring-brand-contrast\" : \"focus-visible:ring-brand\",\n disabled\n ? \"cursor-not-allowed text-placeholder\"\n : end\n ? \"bg-brand text-brand-contrast hover:bg-brand-hover\"\n : selected\n ? \"bg-brand-soft font-medium text-brand-muted hover:bg-brand-soft-hover\"\n : \"text-primary hover:bg-hover\",\n current && !selected && !disabled && \"ring-1 ring-inset ring-strong\",\n )}\n >\n {shortNames[index]}\n </button>\n );\n })}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";AA0DqB,cAwNb,YAxNa;AAtDrB,SAAS,WAAW,OAAO,SAAS,QAAQ,gBAAgB;AAE5D,SAAS,aAAa,aAAa,oBAAoB;AACvD,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAC/B,SAAS,UAAU,K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AAA,UAEC,MAAK;AAAA,UACL,MAAK;AAAA,UACL,cAAY;AAAA,UACZ,UAAU,QAAQ,SAAS,IAAI;AAAA,UAC/B,cAAY,UAAU,MAAM,SAAS,OAAO,WAAW,GAAG,CAAC,CAAC;AAAA,UAC5D,iBAAe;AAAA,UACf,iBAAe,YAAY;AAAA,UAC3B,gBAAc,UAAU,SAAS;AAAA,UACjC,SAAS,MAAM;AAGb,gBAAI,CAAC,SAAU,MAAK,GAAG;AAAA,UACzB;AAAA,UACA,WAAW;AAAA,UACX,WAAW;AAAA;AAAA;AAAA,YAGT;AAAA,YACA;AAAA,YACA;AAAA;AAAA,YAEA,OAAO,CAAC,WAAW,sCAAsC;AAAA,YACzD,WACI,wCACA,MACE,sDACA,WACE,yEACA;AAAA,YACR,WAAW,CAAC,YAAY,CAAC,YAAY;AAAA,UACvC;AAAA,UAEC,qBAAW,KAAK;AAAA;AAAA,QAjCZ;AAAA,MAkCP;AAAA,IAEJ,CAAC,KA9CO,GA+CV,CACD,GACH;AAAA,KAEJ;AAEJ;","names":["_"]}
1
+ {"version":3,"sources":["../../src/components/jump-calendar.tsx"],"sourcesContent":["// The date pickers' calendar with a month jump (`monthJump`, kastlan): MiniCalendar\n// under a ‹ caption › whose caption opens a month grid. Moved out of date-picker.tsx as\n// it was (MOD-9, refactor audit 2026-10); internal, both pickers reach it through\n// `PanelCalendar`.\nimport { useEffect, useId, useMemo, useRef, useState } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport { ChevronDown, ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { horizontalStep } from \"../lib/direction\";\nimport { monthKey, pad, parseIsoDate } from \"../lib/dates\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport { FOCUS_RING_WIDTH } from \"./focus-ring\";\nimport { DEFAULT_MINI_CALENDAR_LABELS, MiniCalendar, type MiniCalendarProps } from \"./mini-calendar\";\nimport { DEFAULT_MONTH_PICKER_LABELS } from \"./month-picker\";\nimport { claimEscape } from \"../hooks/use-dismiss\";\n\n// ── Month jump (`monthJump`, kastlan) ─────────────────────────────────────\n\n/** A \"YYYY-MM\" key as a count of months, and back: month arithmetic with no `Date`\n * rollover to step around. */\nconst monthIndex = (key: string) => Number(key.slice(0, 4)) * 12 + Number(key.slice(5, 7)) - 1;\nconst keyOfIndex = (index: number) => `${String(Math.floor(index / 12)).padStart(4, \"0\")}-${pad((index % 12) + 1)}`;\nconst shiftKey = (key: string, delta: number) => keyOfIndex(monthIndex(key) + delta);\n/** The 1st of a \"YYYY-MM\" month, for `Intl` to name. */\nconst firstOfKey = (key: string) => new Date(Number(key.slice(0, 4)), Number(key.slice(5, 7)) - 1, 1);\n\n/** Upper-case the first letter only, as `MonthPicker` does: \"julio de 2026\" heads a\n * panel as \"Julio de 2026\" — not \"Julio De 2026\", which CSS `capitalize` would write. */\nconst upperFirst = (text: string, locale: string | undefined) =>\n text.charAt(0).toLocaleUpperCase(locale) + text.slice(1);\n\n/** Months per row of the month grid — `MonthPicker`'s 4×3. */\nconst MONTH_COLUMNS = 3;\n\n/**\n * The month `MiniCalendar` opens on — the selection, or today, pulled inside the\n * bounds — worked out the way it does, so the caption drawn over a calendar that was\n * given no `month` names the month that calendar is showing.\n */\nfunction openingMonth(from: string, to: string, lo: Date | null, hi: Date | null): string {\n const start = parseIsoDate(from) ?? parseIsoDate(to) ?? new Date();\n if (lo && start < lo) return monthKey(lo);\n if (hi && start > hi) return monthKey(hi);\n return monthKey(start);\n}\n\nexport type PanelCalendarProps = Pick<\n MiniCalendarProps,\n \"mode\" | \"from\" | \"to\" | \"locale\" | \"min\" | \"max\" | \"labels\" | \"onSelect\" | \"focusOnOpen\"\n> & {\n /** See {@link DatePickerBaseProps.monthJump}. */\n monthJump?: boolean;\n};\n\n/** The panel's calendar: the plain {@link MiniCalendar}, exactly as before — or, with\n * `monthJump`, the same calendar under a caption that opens a month grid. */\nexport function PanelCalendar({ monthJump, ...calendar }: PanelCalendarProps) {\n return monthJump ? <JumpCalendar {...calendar} /> : <MiniCalendar {...calendar} />;\n}\n\n/** How the day grid is mounted: `key` remounts it, `month` is the month it follows\n * (left out until the panel first moves, so it opens exactly where it always has), and\n * `focus` is its `focusOnOpen`. */\ninterface DayGridMount {\n key: number;\n month?: string;\n focus: boolean;\n}\n\n/**\n * {@link MiniCalendar} with its navigation drawn here — ‹ caption › — so the caption can\n * be a button that swaps the days for a month grid ({@link DatePickerBaseProps.monthJump}).\n *\n * Built on the calendar's own `hideNavigation` / `month` / `onMonthChange`, not a fork\n * of it: the days, their keys, the range band and every announcement stay the\n * calendar's. What this keeps is `shown`, the month on screen, for the caption — fed by\n * the arrows here, by the calendar's `onMonthChange` (PageUp, arrowing off the edge),\n * and by the value, whose changes the calendar follows WITHOUT reporting them (a preset\n * in `commit=\"apply\"` moves the grid to its start). That last one is mirrored below with\n * the calendar's own rule, and when it lands in another month the day grid is remounted\n * there rather than steered by `month`: a `month` that changes in the same render as the\n * value would win over the value's day, and the grid's tab stop would land on the\n * month's same-numbered day instead of the preset's start.\n *\n * The month grid is `MonthPicker`'s, redrawn here because that one is internal to its\n * file; same roles, keys and words (`monthPicker` labels).\n */\nfunction JumpCalendar({\n from = \"\",\n to = \"\",\n mode = \"range\",\n locale,\n min,\n max,\n labels,\n onSelect,\n focusOnOpen,\n}: Omit<PanelCalendarProps, \"monthJump\">) {\n // The month arrows say what they said when the calendar drew them; the month grid\n // says what `MonthPicker`'s says.\n const calendarText = useKitLabels(\"miniCalendar\", DEFAULT_MINI_CALENDAR_LABELS, labels);\n const monthText = useKitLabels(\"monthPicker\", DEFAULT_MONTH_PICKER_LABELS);\n const id = useId();\n const captionId = `${id}-caption`;\n const hintId = `${id}-hint`;\n const captionRef = useRef<HTMLButtonElement>(null);\n const monthsRef = useRef<HTMLDivElement>(null);\n\n const lo = min ? parseIsoDate(min) : null;\n const hi = max ? parseIsoDate(max) : null;\n const minKey = lo ? monthKey(lo) : null;\n const maxKey = hi ? monthKey(hi) : null;\n const outOfBounds = (key: string) => Boolean((minKey && key < minKey) || (maxKey && key > maxKey));\n const clampKey = (key: string) => (minKey && key < minKey ? minKey : maxKey && key > maxKey ? maxKey : key);\n\n const [view, setView] = useState<\"days\" | \"months\">(\"days\");\n const [shown, setShown] = useState(() => openingMonth(from, to, lo, hi));\n const [dayGrid, setDayGrid] = useState<DayGridMount>(() => ({ key: 0, focus: Boolean(focusOnOpen) }));\n // The month holding the month grid's tab stop — and with it the year on show.\n const [active, setActive] = useState(shown);\n\n // The value moved from outside the day grid (a preset, a reset): follow the end that\n // changed, by the calendar's own rule, and remount the days there — see above. Also\n // what takes an open month grid back to the days when a preset is picked beside it.\n const [lastValue, setLastValue] = useState({ from, to });\n if (lastValue.from !== from || lastValue.to !== to) {\n const changed = lastValue.from !== from ? from : to;\n setLastValue({ from, to });\n const next = parseIsoDate(changed) ?? parseIsoDate(from) ?? parseIsoDate(to);\n const key = next ? monthKey(next) : null;\n if (key && (key !== shown || view === \"months\")) {\n setShown(key);\n setView(\"days\");\n setDayGrid((d) => ({ key: d.key + 1, month: key, focus: false }));\n }\n }\n\n // A month cell that has to take focus once it exists: opening the grid, and arrowing\n // across a year's edge, which relabels the same twelve buttons.\n const pendingFocus = useRef<string | null>(null);\n useEffect(() => {\n const key = pendingFocus.current;\n if (!key) return;\n pendingFocus.current = null;\n monthsRef.current?.querySelector<HTMLElement>(`[data-month=\"${key}\"]`)?.focus();\n });\n\n const showMonth = (key: string) => {\n setShown(key);\n // Follows by `month`: the calendar keeps the day of the month (clamped), and the\n // focus stays on the arrow being pressed.\n setDayGrid((d) => ({ ...d, month: key }));\n };\n const openMonths = () => {\n const start = clampKey(shown);\n pendingFocus.current = start;\n setActive(start);\n setView(\"months\");\n };\n const closeMonths = (focusCaption: boolean) => {\n setView(\"days\");\n setDayGrid((d) => ({ ...d, month: shown, focus: false }));\n if (focusCaption) captionRef.current?.focus();\n };\n const pick = (key: string) => {\n setShown(key);\n setView(\"days\");\n // Picked to go there: the focus goes with it, onto the days.\n setDayGrid((d) => ({ key: d.key + 1, month: key, focus: true }));\n };\n const moveActive = (key: string, focus: boolean) => {\n if (focus) pendingFocus.current = key;\n setActive(key);\n };\n\n const inDays = view === \"days\";\n // Escape in the month grid is \"back\", not \"close\": the month grid is a step INSIDE the\n // panel, and losing the half-made range to a key meant to undo that step would be the\n // worse surprise. Claimed on the kit's Escape stack (Wave 2, DUP-1) and stopped here,\n // so neither the popover nor the phone sheet nor a dialog around them closes.\n const escapeToDays = (e: KeyboardEvent<HTMLElement>) => {\n if (e.key !== \"Escape\" || inDays) return;\n claimEscape(e);\n e.stopPropagation();\n closeMonths(true);\n };\n\n const onMonthKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {\n if (e.key === \"Escape\") return escapeToDays(e);\n // Left and right are visual: the grid runs the other way in a right-to-left panel.\n const step = horizontalStep(e.key, e.currentTarget);\n const col = (monthIndex(active) % 12) % MONTH_COLUMNS;\n let delta: number;\n switch (step ? \"horizontal\" : e.key) {\n case \"horizontal\":\n delta = step;\n break;\n case \"ArrowUp\":\n delta = -MONTH_COLUMNS;\n break;\n case \"ArrowDown\":\n delta = MONTH_COLUMNS;\n break;\n case \"Home\":\n delta = -col;\n break;\n case \"End\":\n delta = MONTH_COLUMNS - 1 - col;\n break;\n case \"PageUp\":\n delta = -12;\n break;\n case \"PageDown\":\n delta = 12;\n break;\n default:\n return;\n }\n // Before the no-op check: these keys also scroll the panel.\n e.preventDefault();\n if (delta !== 0) moveActive(shiftKey(active, delta), true);\n };\n\n const year = Number(active.slice(0, 4));\n // A year arrow is dead once every month of the year it leads to is out of bounds.\n const prevYearBlocked = Boolean(minKey && year - 1 < Number(minKey.slice(0, 4)));\n const nextYearBlocked = Boolean(maxKey && year + 1 > Number(maxKey.slice(0, 4)));\n const prevBlocked = !inDays && prevYearBlocked;\n const nextBlocked = !inDays && nextYearBlocked;\n\n const longName = useMemo(() => new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }), [locale]);\n const shortNames = useMemo(() => {\n const fmt = new Intl.DateTimeFormat(locale, { month: \"short\" });\n return Array.from({ length: 12 }, (_, i) => upperFirst(fmt.format(new Date(2000, i, 1)), locale));\n }, [locale]);\n const caption = inDays\n ? upperFirst(longName.format(firstOfKey(shown)), locale)\n : new Intl.DateTimeFormat(locale, { year: \"numeric\" }).format(new Date(year, 0, 1));\n\n // The selection, as months: both ends, and the months between (a range's band).\n const fromDate = parseIsoDate(from);\n const toDate = parseIsoDate(to);\n const fromKey = fromDate ? monthKey(fromDate) : null;\n const toKey = toDate ? monthKey(toDate) : null;\n const low = fromKey ?? toKey;\n const high = toKey ?? fromKey;\n const currentKey = monthKey(new Date());\n\n // Aria-disabled rather than disabled, like the day cells: a focused button that\n // turns `disabled` drops the focus to <body>, mid-panel.\n const arrow =\n \"rounded p-1 text-muted hover:bg-hover aria-disabled:cursor-not-allowed aria-disabled:opacity-30 aria-disabled:hover:bg-transparent\";\n\n return (\n <div className=\"select-none\">\n {/* The calendar's own row, redrawn: the same arrows in the same places. Each\n button stays mounted across the two views and changes what it steps, so a\n press never pulls the element out from under the pointer or the focus. */}\n <div className=\"flex items-center justify-between gap-1 pb-1\">\n <button\n type=\"button\"\n aria-label={inDays ? calendarText.previousMonth : monthText.previousYear}\n aria-disabled={prevBlocked || undefined}\n onClick={() => {\n if (inDays) showMonth(shiftKey(shown, -1));\n else if (!prevBlocked) moveActive(shiftKey(active, -12), false);\n }}\n onKeyDown={escapeToDays}\n className={arrow}\n >\n {/* Mirrored in RTL: \"previous\" points to the reading START, which is right. */}\n <ChevronLeft className=\"size-4 rtl:-scale-x-100\" aria-hidden />\n </button>\n <button\n ref={captionRef}\n type=\"button\"\n aria-expanded={!inDays}\n aria-describedby={inDays ? hintId : undefined}\n onClick={inDays ? openMonths : () => closeMonths(false)}\n onKeyDown={escapeToDays}\n className=\"inline-flex min-w-0 items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium text-secondary hover:bg-hover\"\n >\n {/* The name is the text, so it says what is on screen; `aria-live` because\n pressing an arrow leaves focus ON the arrow, and this is the only thing\n that says where it went. It also names the month grid. */}\n <span id={captionId} aria-live=\"polite\" className=\"truncate\">\n {caption}\n </span>\n <ChevronDown aria-hidden className={cn(\"size-3.5 shrink-0 text-muted\", !inDays && \"rotate-180\")} />\n </button>\n <button\n type=\"button\"\n aria-label={inDays ? calendarText.nextMonth : monthText.nextYear}\n aria-disabled={nextBlocked || undefined}\n onClick={() => {\n if (inDays) showMonth(shiftKey(shown, 1));\n else if (!nextBlocked) moveActive(shiftKey(active, 12), false);\n }}\n onKeyDown={escapeToDays}\n className={arrow}\n >\n <ChevronRight className=\"size-4 rtl:-scale-x-100\" aria-hidden />\n </button>\n </div>\n {/* The caption's description — read through the reference, never on its own. */}\n <span id={hintId} hidden>\n {monthText.panel}\n </span>\n {inDays ? (\n <MiniCalendar\n key={dayGrid.key}\n mode={mode}\n from={from}\n to={to}\n locale={locale}\n min={min}\n max={max}\n labels={labels}\n onSelect={onSelect}\n focusOnOpen={dayGrid.focus}\n hideNavigation\n month={dayGrid.month}\n onMonthChange={showMonth}\n />\n ) : (\n <div ref={monthsRef} role=\"grid\" aria-labelledby={captionId} className=\"grid gap-1\">\n {Array.from({ length: 12 / MONTH_COLUMNS }, (_, row) => (\n <div key={row} role=\"row\" className=\"grid grid-cols-3 gap-1\">\n {Array.from({ length: MONTH_COLUMNS }, (_, c) => {\n const index = row * MONTH_COLUMNS + c;\n const key = keyOfIndex(year * 12 + index);\n const disabled = outOfBounds(key);\n const selected = low !== null && high !== null && key >= low && key <= high;\n const end = key === fromKey || key === toKey;\n const current = key === currentKey;\n return (\n <button\n key={c}\n type=\"button\"\n role=\"gridcell\"\n data-month={key}\n tabIndex={key === active ? 0 : -1}\n aria-label={monthText.month(longName.format(firstOfKey(key)))}\n aria-selected={selected}\n aria-disabled={disabled || undefined}\n aria-current={current ? \"date\" : undefined}\n onClick={() => {\n // The guard `disabled` would have been: out-of-bounds months stay\n // focusable, so the roving tab stop never falls into a hole.\n if (!disabled) pick(key);\n }}\n onKeyDown={onMonthKeyDown}\n className={cn(\n // 44px rows: the touch-target size, and four of them stand as tall\n // as a month of days, so the panel does not jump as the views swap.\n \"h-11 rounded px-1 text-sm tabular-nums transition-colors\",\n FOCUS_RING_WIDTH,\n \"focus-visible:outline-none focus-visible:ring-inset\",\n // A --brand ring on a --brand fill exists only in the DOM.\n end && !disabled ? \"focus-visible:ring-brand-contrast\" : \"focus-visible:ring-brand\",\n disabled\n ? \"cursor-not-allowed text-placeholder\"\n : end\n ? \"bg-brand text-brand-contrast hover:bg-brand-hover\"\n : selected\n ? \"bg-brand-soft font-medium text-brand-muted hover:bg-brand-soft-hover\"\n : \"text-primary hover:bg-hover\",\n current && !selected && !disabled && \"ring-1 ring-inset ring-strong\",\n )}\n >\n {shortNames[index]}\n </button>\n );\n })}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";AAyDqB,cAwNb,YAxNa;AArDrB,SAAS,WAAW,OAAO,SAAS,QAAQ,gBAAgB;AAE5D,SAAS,aAAa,aAAa,oBAAoB;AACvD,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAC/B,SAAS,UAAU,KAAK,oBAAoB;AAC5C,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,8BAA8B,oBAA4C;AACnF,SAAS,mCAAmC;AAC5C,SAAS,mBAAmB;AAM5B,MAAM,aAAa,CAAC,QAAgB,OAAO,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI;AAC7F,MAAM,aAAa,CAAC,UAAkB,GAAG,OAAO,KAAK,MAAM,QAAQ,EAAE,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,IAAK,QAAQ,KAAM,CAAC,CAAC;AACjH,MAAM,WAAW,CAAC,KAAa,UAAkB,WAAW,WAAW,GAAG,IAAI,KAAK;AAEnF,MAAM,aAAa,CAAC,QAAgB,I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AAA,UAEC,qBAAW,KAAK;AAAA;AAAA,QAjCZ;AAAA,MAkCP;AAAA,IAEJ,CAAC,KA9CO,GA+CV,CACD,GACH;AAAA,KAEJ;AAEJ;","names":["_"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/legal-labels.ts"],"sourcesContent":["// The English words of ./legal, in a module with no component code: the English catalogue\n// (src/i18n/defaults.ts) imports them without the component, so `en` loads as one chunk\n// like the other languages (0.34, KS U8). ./legal re-exports them.\n\nimport type { LegalLabels } from \"./legal\";\n\nexport const DEFAULT_LEGAL_LABELS: LegalLabels = {\n navLabel: \"Legal\",\n links: {\n impressum: \"Imprint\",\n privacy: \"Privacy Policy\",\n terms: \"Terms\",\n security: \"Security\",\n accessibility: \"Accessibility\",\n },\n titles: {\n impressum: \"Imprint\",\n privacy: \"Privacy Policy\",\n terms: \"Terms of Service\",\n },\n backHome: \"Back to home\",\n accept: \"I accept the {terms} and the {privacy}\",\n notice: {\n beta: \"Closed beta. These texts have not been reviewed by a lawyer yet and will be before a public launch.\",\n privacy:\n \"Closed beta. The legal wording below has not been reviewed by a lawyer yet and will be before a public launch. The technical descriptions — what is stored, where, and who can read it — describe what the software actually does today, and are meant to be checked against it.\",\n },\n translation: {\n note: (o) =>\n `This is a translation for your convenience. The ${o.bindingLanguage} version is binding.`,\n show: (o) => `Show the ${o.bindingLanguage} version`,\n },\n updated: (date) => `Last updated: ${date}`,\n summary: {\n title: \"In short\",\n note: \"This summary is for orientation; only the full text is binding.\",\n },\n sections: {\n impressum: {\n operator: {\n title: \"Operator\",\n body: (o) =>\n `${o.name}\\n${o.postalCode} ${o.city}\\n${o.country}\\n\\nThe full postal address is supplied on request to anyone with a legitimate legal interest; write to the contact address below.`,\n },\n contact: {\n title: \"Contact\",\n body: (o) => `Email: ${o.email}`,\n },\n disclaimer: {\n title: \"Liability for content and links\",\n body: \"This is a private, non-commercial project offered during a closed beta, without warranty. External sites we link to are the responsibility of their respective operators; we have no control over their content.\",\n commercial:\n \"This is a commercial service. Paid plans are sold by our reseller, which acts as the Merchant of Record: it sells the subscription in its own name, takes the payment, issues the invoice and handles VAT, and its terms of sale apply to the purchase. We take care that the content of this service is accurate, but cannot guarantee that it is complete or up to date. External sites we link to are the responsibility of their respective operators; we have no control over their content.\",\n },\n },\n privacy: {\n controller: {\n title: \"Controller\",\n body: (o) =>\n `The party responsible for processing personal data in this service is:\\n${o.name}\\n${o.postalCode} ${o.city}, ${o.country}\\nEmail: ${o.email}\\n\\nThe full postal address is supplied on request to data subjects and supervisory authorities.`,\n },\n legal_basis: {\n title: \"Legal basis\",\n body: \"As the operator is based in Switzerland, processing is governed by the Swiss Federal Act on Data Protection (FADP). Where the EU General Data Protection Regulation (GDPR) applies to you, we rely on the performance of a contract to provide the service (Art. 6(1)(b) GDPR) and our legitimate interest in operating and securing it (Art. 6(1)(f) GDPR).\",\n },\n browser: {\n title: \"What your browser stores\",\n lead: \"No cookies. The app keeps the following in your browser's storage:\",\n tail: \"None of it is used to track you. Entries waiting to be sent are sent to us as soon as they can be; everything else stays on your device. All of it disappears when you clear the site's data, and signing out removes the sign-in tokens.\",\n },\n rights: {\n title: \"Your rights\",\n lead: \"You have the right to access, rectification, erasure, restriction, data portability and objection.\",\n tail: \"If you are in Switzerland you may contact the Federal Data Protection and Information Commissioner (FDPIC); if you are in the EU you may lodge a complaint with your local supervisory authority.\",\n },\n contact: {\n title: \"Contact for data protection\",\n body: (o) => `For any privacy request, contact: ${o.email}`,\n },\n },\n terms: {\n warranty: {\n title: \"No warranty\",\n body: 'The service is provided \"as is\" and \"as available\", without warranties of any kind to the extent permitted by law. As a beta it may contain errors, change, or be interrupted at any time — keep your own backups of important data.',\n },\n liability: {\n title: \"Limitation of liability\",\n body: \"To the extent permitted by applicable law, the operator is not liable for any indirect or consequential damage arising from the use of, or inability to use, the service. Nothing here limits liability that cannot be limited by law.\",\n },\n changes: {\n title: \"Changes to these terms\",\n body: \"We may update these terms as the service evolves. We announce a material change at least 30 days before it takes effect, by email and in the app, together with the new text. If you do not agree, you can object or delete your account before that date, and you can export your data until then. If you keep using the service after that date, the changed terms apply. Changes that only benefit you, or that the law requires, apply without this notice and cannot be objected to. If you object to a change, we may end your account on the date it takes effect. If you have paid for a period that runs beyond that date, we refund the unused part.\",\n },\n language: {\n title: \"Language\",\n body: (o) =>\n `These terms are written in ${o.bindingLanguage}. Translations into other languages are provided for convenience only; where a translation differs, the ${o.bindingLanguage} version prevails.`,\n },\n law: {\n title: \"Governing law\",\n body: (o) =>\n `These terms are governed by Swiss law, excluding its conflict-of-laws rules. As far as legally permissible, the place of jurisdiction is ${o.city} (${o.region}), ${o.country}.`,\n },\n },\n },\n};\n"],"mappings":";AAMO,MAAM,uBAAoC;AAAA,EAC/C,UAAU;AAAA,EACV,OAAO;AAAA,IACL,WAAW;AAAA,IACX,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA,EACjB;AAAA,EACA,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA,aAAa;AAAA,IACX,MAAM,CAAC,MACL,mDAAmD,EAAE,eAAe;AAAA,IACtE,MAAM,CAAC,MAAM,YAAY,EAAE,eAAe;AAAA,EAC5C;AAAA,EACA,SAAS,CAAC,SAAS,iBAAiB,IAAI;AAAA,EACxC,SAAS;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,WAAW;AAAA,MACT,UAAU;AAAA,QACR,OAAO;AAAA,QACP,MAAM,CAAC,MACL,GAAG,EAAE,IAAI;AAAA,EAAK,EAAE,UAAU,IAAI,EAAE,IAAI;AAAA,EAAK,EAAE,OAAO;AAAA;AAAA;AAAA,MACtD;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM,CAAC,MAAM,UAAU,EAAE,KAAK;AAAA,MAChC;AAAA,MACA,YAAY;AAAA,QACV,OAAO;AAAA,QACP,MAAM;AAAA,QACN,YACE;AAAA,MACJ;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,YAAY;AAAA,QACV,OAAO;AAAA,QACP,MAAM,CAAC,MACL;AAAA,EAA2E,EAAE,IAAI;AAAA,EAAK,EAAE,UAAU,IAAI,EAAE,IAAI,KAAK,EAAE,OAAO;AAAA,SAAY,EAAE,KAAK;AAAA;AAAA;AAAA,MACjJ;AAAA,MACA,aAAa;AAAA,QACX,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM,CAAC,MAAM,qCAAqC,EAAE,KAAK;AAAA,MAC3D;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,QACR,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,WAAW;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,UAAU;AAAA,QACR,OAAO;AAAA,QACP,MAAM,CAAC,MACL,8BAA8B,EAAE,eAAe,2GAA2G,EAAE,eAAe;AAAA,MAC/K;AAAA,MACA,KAAK;AAAA,QACH,OAAO;AAAA,QACP,MAAM,CAAC,MACL,4IAA4I,EAAE,IAAI,KAAK,EAAE,MAAM,MAAM,EAAE,OAAO;AAAA,MAClL;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/components/legal-labels.ts"],"sourcesContent":["// The English words of ./legal, in a module with no component code: the English catalogue\n// (src/i18n/defaults.ts) imports them without the component, so `en` loads as one chunk\n// like the other languages (0.34, KS U8). ./legal re-exports them.\n\nimport type { LegalLabels } from \"./legal\";\n\nexport const DEFAULT_LEGAL_LABELS: LegalLabels = {\n navLabel: \"Legal\",\n links: {\n impressum: \"Imprint\",\n privacy: \"Privacy Policy\",\n terms: \"Terms\",\n security: \"Security\",\n accessibility: \"Accessibility\",\n },\n titles: {\n impressum: \"Imprint\",\n privacy: \"Privacy Policy\",\n terms: \"Terms of Service\",\n },\n backHome: \"Back to home\",\n accept: \"I accept the {terms} and the {privacy}\",\n notice: {\n beta: \"Closed beta. These texts have not been reviewed by a lawyer yet and will be before a public launch.\",\n privacy:\n \"Closed beta. The legal wording below has not been reviewed by a lawyer yet and will be before a public launch. The technical descriptions — what is stored, where, and who can read it — describe what the software actually does today, and are meant to be checked against it.\",\n },\n translation: {\n note: (o) => `This is a translation for your convenience. The ${o.bindingLanguage} version is binding.`,\n show: (o) => `Show the ${o.bindingLanguage} version`,\n },\n updated: (date) => `Last updated: ${date}`,\n summary: {\n title: \"In short\",\n note: \"This summary is for orientation; only the full text is binding.\",\n },\n sections: {\n impressum: {\n operator: {\n title: \"Operator\",\n body: (o) =>\n `${o.name}\\n${o.postalCode} ${o.city}\\n${o.country}\\n\\nThe full postal address is supplied on request to anyone with a legitimate legal interest; write to the contact address below.`,\n },\n contact: {\n title: \"Contact\",\n body: (o) => `Email: ${o.email}`,\n },\n disclaimer: {\n title: \"Liability for content and links\",\n body: \"This is a private, non-commercial project offered during a closed beta, without warranty. External sites we link to are the responsibility of their respective operators; we have no control over their content.\",\n commercial:\n \"This is a commercial service. Paid plans are sold by our reseller, which acts as the Merchant of Record: it sells the subscription in its own name, takes the payment, issues the invoice and handles VAT, and its terms of sale apply to the purchase. We take care that the content of this service is accurate, but cannot guarantee that it is complete or up to date. External sites we link to are the responsibility of their respective operators; we have no control over their content.\",\n },\n },\n privacy: {\n controller: {\n title: \"Controller\",\n body: (o) =>\n `The party responsible for processing personal data in this service is:\\n${o.name}\\n${o.postalCode} ${o.city}, ${o.country}\\nEmail: ${o.email}\\n\\nThe full postal address is supplied on request to data subjects and supervisory authorities.`,\n },\n legal_basis: {\n title: \"Legal basis\",\n body: \"As the operator is based in Switzerland, processing is governed by the Swiss Federal Act on Data Protection (FADP). Where the EU General Data Protection Regulation (GDPR) applies to you, we rely on the performance of a contract to provide the service (Art. 6(1)(b) GDPR) and our legitimate interest in operating and securing it (Art. 6(1)(f) GDPR).\",\n },\n browser: {\n title: \"What your browser stores\",\n lead: \"No cookies. The app keeps the following in your browser's storage:\",\n tail: \"None of it is used to track you. Entries waiting to be sent are sent to us as soon as they can be; everything else stays on your device. All of it disappears when you clear the site's data, and signing out removes the sign-in tokens.\",\n },\n rights: {\n title: \"Your rights\",\n lead: \"You have the right to access, rectification, erasure, restriction, data portability and objection.\",\n tail: \"If you are in Switzerland you may contact the Federal Data Protection and Information Commissioner (FDPIC); if you are in the EU you may lodge a complaint with your local supervisory authority.\",\n },\n contact: {\n title: \"Contact for data protection\",\n body: (o) => `For any privacy request, contact: ${o.email}`,\n },\n },\n terms: {\n warranty: {\n title: \"No warranty\",\n body: 'The service is provided \"as is\" and \"as available\", without warranties of any kind to the extent permitted by law. As a beta it may contain errors, change, or be interrupted at any time — keep your own backups of important data.',\n },\n liability: {\n title: \"Limitation of liability\",\n body: \"To the extent permitted by applicable law, the operator is not liable for any indirect or consequential damage arising from the use of, or inability to use, the service. Nothing here limits liability that cannot be limited by law.\",\n },\n changes: {\n title: \"Changes to these terms\",\n body: \"We may update these terms as the service evolves. We announce a material change at least 30 days before it takes effect, by email and in the app, together with the new text. If you do not agree, you can object or delete your account before that date, and you can export your data until then. If you keep using the service after that date, the changed terms apply. Changes that only benefit you, or that the law requires, apply without this notice and cannot be objected to. If you object to a change, we may end your account on the date it takes effect. If you have paid for a period that runs beyond that date, we refund the unused part.\",\n },\n language: {\n title: \"Language\",\n body: (o) =>\n `These terms are written in ${o.bindingLanguage}. Translations into other languages are provided for convenience only; where a translation differs, the ${o.bindingLanguage} version prevails.`,\n },\n law: {\n title: \"Governing law\",\n body: (o) =>\n `These terms are governed by Swiss law, excluding its conflict-of-laws rules. As far as legally permissible, the place of jurisdiction is ${o.city} (${o.region}), ${o.country}.`,\n },\n },\n },\n};\n"],"mappings":";AAMO,MAAM,uBAAoC;AAAA,EAC/C,UAAU;AAAA,EACV,OAAO;AAAA,IACL,WAAW;AAAA,IACX,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA,EACjB;AAAA,EACA,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA,aAAa;AAAA,IACX,MAAM,CAAC,MAAM,mDAAmD,EAAE,eAAe;AAAA,IACjF,MAAM,CAAC,MAAM,YAAY,EAAE,eAAe;AAAA,EAC5C;AAAA,EACA,SAAS,CAAC,SAAS,iBAAiB,IAAI;AAAA,EACxC,SAAS;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,WAAW;AAAA,MACT,UAAU;AAAA,QACR,OAAO;AAAA,QACP,MAAM,CAAC,MACL,GAAG,EAAE,IAAI;AAAA,EAAK,EAAE,UAAU,IAAI,EAAE,IAAI;AAAA,EAAK,EAAE,OAAO;AAAA;AAAA;AAAA,MACtD;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM,CAAC,MAAM,UAAU,EAAE,KAAK;AAAA,MAChC;AAAA,MACA,YAAY;AAAA,QACV,OAAO;AAAA,QACP,MAAM;AAAA,QACN,YACE;AAAA,MACJ;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,YAAY;AAAA,QACV,OAAO;AAAA,QACP,MAAM,CAAC,MACL;AAAA,EAA2E,EAAE,IAAI;AAAA,EAAK,EAAE,UAAU,IAAI,EAAE,IAAI,KAAK,EAAE,OAAO;AAAA,SAAY,EAAE,KAAK;AAAA;AAAA;AAAA,MACjJ;AAAA,MACA,aAAa;AAAA,QACX,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM,CAAC,MAAM,qCAAqC,EAAE,KAAK;AAAA,MAC3D;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,QACR,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,WAAW;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,UAAU;AAAA,QACR,OAAO;AAAA,QACP,MAAM,CAAC,MACL,8BAA8B,EAAE,eAAe,2GAA2G,EAAE,eAAe;AAAA,MAC/K;AAAA,MACA,KAAK;AAAA,QACH,OAAO;AAAA,QACP,MAAM,CAAC,MACL,4IAA4I,EAAE,IAAI,KAAK,EAAE,MAAM,MAAM,EAAE,OAAO;AAAA,MAClL;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -171,7 +171,9 @@ function slotSections(children, page, labels) {
171
171
  const number = numbered ? count : void 0;
172
172
  if (section.key !== void 0) {
173
173
  if (targets.has(section.key)) {
174
- warnLegalOnce(`two sections of the ${page} page share the key "${section.key}"; {ref:${section.key}} names the first.`);
174
+ warnLegalOnce(
175
+ `two sections of the ${page} page share the key "${section.key}"; {ref:${section.key}} names the first.`
176
+ );
175
177
  } else {
176
178
  targets.set(section.key, { number, heading: section.heading });
177
179
  }
@@ -220,7 +222,17 @@ function LegalPage({
220
222
  labels.translation.note(operatorText),
221
223
  onShowBindingLanguage && /* @__PURE__ */ jsxs(Fragment, { children: [
222
224
  " ",
223
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "link", size: "sm", className: "h-auto p-0 align-baseline", onClick: onShowBindingLanguage, children: labels.translation.show(operatorText) })
225
+ /* @__PURE__ */ jsx(
226
+ Button,
227
+ {
228
+ type: "button",
229
+ variant: "link",
230
+ size: "sm",
231
+ className: "h-auto p-0 align-baseline",
232
+ onClick: onShowBindingLanguage,
233
+ children: labels.translation.show(operatorText)
234
+ }
235
+ )
224
236
  ] })
225
237
  ] }) : void 0;
226
238
  const updatedValid = updated !== void 0 && parseIsoDate(updated) !== null;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/legal-page.tsx"],"sourcesContent":["import { Fragment, isValidElement, useContext, useMemo } from \"react\";\nimport type { ReactNode, Ref } from \"react\";\nimport { ArrowLeft } from \"lucide-react\";\n\nimport { UiKitProvider, useKitLocale } from \"../i18n/kit-labels\";\nimport type { LabelOverride, UiKitLabelOverrides } from \"../i18n/kit-labels\";\nimport { useNoIndex } from \"../hooks/use-noindex\";\nimport { cn } from \"../lib/cn\";\nimport { parseIsoDate } from \"../lib/dates\";\nimport { formatDate } from \"../lib/format\";\nimport { Checkbox } from \"./checkbox\";\nimport type { CheckboxProps } from \"./checkbox\";\nimport {\n DEFAULT_LEGAL_LABELS,\n LEGAL_HREFS,\n baseLanguage,\n LegalFooter,\n LegalLayout,\n LegalPageContext,\n LegalSection,\n LegalSlotContext,\n LegalText,\n legalOperatorText,\n resolveLegalRefs,\n useLegalLabels,\n warnLegalOnce,\n} from \"./legal\";\nimport type {\n LegalDisclaimerSectionLabels,\n LegalFramedSectionLabels,\n LegalLabels,\n LegalOperator,\n LegalOperatorSectionLabels,\n LegalOperatorText,\n LegalPageContextValue,\n LegalPageKey,\n LegalRefTarget,\n LegalSectionProps,\n LegalTextSectionLabels,\n} from \"./legal\";\nimport { TextLink } from \"./text-link\";\nimport { Button } from \"./button\";\n\n/**\n * The legal pages' frame and the kit's own sections — docs/legal-harmonization.md §3\n * and §4, the 0.28 round. The labels, the column, `LegalSection`, the links and the\n * footer are in `./legal`.\n */\n\n// ── The skeleton (§4.2) ───────────────────────────────────────────────────────\n\n/** Who writes a section: the kit's wording, the app's own, or the kit's wording with an\n * app paragraph in a fixed slot. */\nexport type LegalSectionOwner = \"kit\" | \"app\" | \"kit+app\";\n\nexport interface LegalSkeletonEntry {\n /** The section key — its `id` and its catalogue key. `\"*\"` is the slot where the\n * app's own sections go (zero or more: keksdose's `credits`, `price_pool`, …). */\n key: string;\n owner: LegalSectionOwner;\n}\n\nexport interface LegalSkeletonPage {\n /** Whether the page numbers its sections (\"3. Legal basis\"). The imprint does not. */\n numbered: boolean;\n /** The sections in their order. */\n sections: readonly LegalSkeletonEntry[];\n}\n\n/**\n * The section order every app's legal pages follow (§4.2), as data — so an app's test\n * can assert that its pages do, and so the order lives in one place, not in three apps'\n * reading of a table. `LegalPage` reads `numbered` from it.\n *\n * An app's test, given the section ids its page rendered in order:\n *\n * const fixed = LEGAL_SKELETON.privacy.sections.map((s) => s.key).filter((k) => k !== \"*\");\n * expect(ids.filter((id) => fixed.includes(id))).toEqual(fixed);\n *\n * Every fixed key is there, in the skeleton's order; the ids that are not in it are the\n * app's own sections, which belong where `\"*\"` stands.\n */\nexport const LEGAL_SKELETON: Readonly<Record<LegalPageKey, LegalSkeletonPage>> = Object.freeze({\n impressum: Object.freeze({\n numbered: false,\n sections: Object.freeze([\n { key: \"operator\", owner: \"kit\" },\n { key: \"contact\", owner: \"kit\" },\n { key: \"disclaimer\", owner: \"kit\" },\n { key: \"*\", owner: \"app\" },\n ] as const),\n }),\n privacy: Object.freeze({\n numbered: true,\n sections: Object.freeze([\n { key: \"controller\", owner: \"kit\" },\n { key: \"data\", owner: \"app\" },\n { key: \"legal_basis\", owner: \"kit+app\" },\n { key: \"third_parties\", owner: \"app\" },\n { key: \"*\", owner: \"app\" },\n { key: \"browser\", owner: \"kit+app\" },\n { key: \"transfers\", owner: \"app\" },\n { key: \"retention\", owner: \"app\" },\n { key: \"rights\", owner: \"kit+app\" },\n { key: \"contact\", owner: \"kit\" },\n ] as const),\n }),\n terms: Object.freeze({\n numbered: true,\n sections: Object.freeze([\n { key: \"scope\", owner: \"app\" },\n { key: \"no_advice\", owner: \"app\" },\n { key: \"*\", owner: \"app\" },\n { key: \"warranty\", owner: \"kit\" },\n { key: \"liability\", owner: \"kit\" },\n { key: \"changes\", owner: \"kit\" },\n // 0.28.1: which language's version prevails (the operator's `bindingLanguage`).\n { key: \"language\", owner: \"kit\" },\n { key: \"law\", owner: \"kit\" },\n ] as const),\n }),\n});\n\n/** The sections the kit writes (§4.3), on whichever page they sit. `contact` is on two\n * pages, with two texts; the page decides which. */\nexport type LegalKitSectionKey =\n | \"operator\"\n | \"contact\"\n | \"disclaimer\"\n | \"controller\"\n | \"legal_basis\"\n | \"browser\"\n | \"rights\"\n | \"warranty\"\n | \"liability\"\n | \"changes\"\n | \"language\"\n | \"law\";\n\n/** The kit's sections of one page, in the skeleton's order. */\nfunction kitSectionsOf(page: LegalPageKey): string[] {\n return LEGAL_SKELETON[page].sections.filter((s) => s.owner !== \"app\").map((s) => s.key);\n}\n\nconst PAGES: readonly LegalPageKey[] = [\"impressum\", \"privacy\", \"terms\"];\n\n// ── Kit sections ──────────────────────────────────────────────────────────────\n\ninterface LegalKitSectionBase {\n /** Default: the enclosing {@link LegalPage}'s page — needed outside one, and for\n * `contact` only (it is on two pages). */\n page?: LegalPageKey;\n /** Default: the enclosing {@link LegalPage}'s operator — needed outside one, by the\n * sections that name it (operator, both contacts, controller, law). */\n operator?: LegalOperator;\n /** Default: one level below the page's title (`h2` under an `h1`). */\n headingAs?: \"h2\" | \"h3\";\n labels?: LabelOverride<LegalLabels>;\n}\n\n/**\n * One of the kit's sections, by key. `children` is the app's paragraph where §4.2 says\n * \"kit + app\" — and only there, which the type holds an app to: the other sections'\n * wording is identical in every app, and an app that needs to say more says it in a\n * section of its own. `browser` takes the app's list of what it keeps, as `entries`.\n */\nexport type LegalKitSectionProps = LegalKitSectionBase &\n (\n | {\n section: \"browser\";\n variant?: never;\n /** What this app keeps in the browser, one entry per item — rendered as a `<ul>`\n * between the kit's two sentences. The app's words, in every language it serves. */\n entries: readonly string[];\n /** After the kit's text: what sign-out removes beyond the tokens, what stays. */\n children?: ReactNode;\n }\n | {\n section: \"legal_basis\" | \"rights\";\n variant?: never;\n entries?: never;\n /** `legal_basis`: after the kit's paragraph (consent, where an app relies on\n * it). `rights`: between the list of rights and the supervisory authorities\n * (how to export, how to delete). A plain string keeps its line breaks and has\n * its `{ref:key}` tokens resolved. */\n children?: ReactNode;\n }\n | {\n section: \"disclaimer\";\n /**\n * 0.32.0 (docs/billing-harmonization.md §8, legal decision 7): which disclaimer.\n * `non-commercial` (default) is the beta's \"private, non-commercial project\";\n * `commercial` is for an app that charges, sold through a Merchant of Record —\n * chosen per app, in the release that turns its billing on.\n */\n variant?: LegalDisclaimerVariant;\n entries?: never;\n children?: never;\n }\n | {\n section: Exclude<LegalKitSectionKey, \"browser\" | \"legal_basis\" | \"rights\" | \"disclaimer\">;\n variant?: never;\n entries?: never;\n children?: never;\n }\n );\n\n/** 0.32.0: the imprint disclaimer's two texts — see {@link LegalKitSectionProps}. */\nexport type LegalDisclaimerVariant = \"non-commercial\" | \"commercial\";\n\n/** The app's paragraph: a plain string as running text (line breaks kept, refs\n * resolved), anything else as it is. */\nfunction appPart(children: ReactNode): ReactNode {\n if (children === undefined || children === null || children === false) return null;\n if (typeof children === \"string\") return <LegalText key=\"app\" text={children} />;\n return <Fragment key=\"app\">{children}</Fragment>;\n}\n\n/**\n * One of the kit's sections (§4.3) — `<LegalKitSection section=\"warranty\" />` — with its\n * heading, its `id` (the key: `/terms#warranty`) and, on a numbered page, its number.\n *\n * The words are the kit's, in the `legal` labels, filled in with the operator; an app\n * adds only what §4.2 gives it a slot for. Inside a {@link LegalPage} the page and the\n * operator come from it, so a page reads as its section list:\n *\n * <LegalPage page=\"privacy\" operator={OPERATOR}>\n * <LegalKitSection section=\"controller\" />\n * <LegalSection key=\"data\" heading={t(\"legal.privacy.data.title\")} body={…} />\n * <LegalKitSection section=\"legal_basis\">{t(\"legal.privacy.legal_basis.app\")}</LegalKitSection>\n * …\n * </LegalPage>\n *\n * A key that is not one of the page's kit sections throws, naming the ones that are: it\n * is a typo in code, not a state a user can reach.\n */\nexport function LegalKitSection(props: LegalKitSectionProps) {\n const { section, headingAs, labels: labelsProp } = props;\n const context = useContext(LegalPageContext);\n const labels = useLegalLabels(labelsProp);\n const kitLocale = useKitLocale();\n\n const page = props.page ?? context?.page ?? onlyPageOf(section);\n const kitSections = kitSectionsOf(page);\n if (!kitSections.includes(section)) {\n throw new Error(\n `LegalKitSection: \"${section}\" is not one of the kit's sections of the ${page} page (${kitSections.join(\", \")}).`,\n );\n }\n const entry = (labels.sections[page] as Record<string, SectionLabels>)[section];\n const operator = props.operator ? legalOperatorText(props.operator, kitLocale) : context?.operator;\n const fill = (body: string | ((o: LegalOperatorText) => string)): string => {\n if (typeof body === \"string\") return body;\n if (!operator) {\n throw new Error(\n `LegalKitSection \"${section}\" names the operator: render it inside <LegalPage operator={…}>, or pass operator.`,\n );\n }\n if (section === \"language\" && !operator.bindingLanguage) {\n throw new Error(\n `LegalKitSection \"language\" names the binding language: give the operator a bindingLanguage (\"de-CH\").`,\n );\n }\n return body(operator);\n };\n\n const app = appPart(props.children);\n let parts: ReactNode[];\n if (\"lead\" in entry) {\n const lead = <LegalText key=\"lead\" text={entry.lead} />;\n const tail = <LegalText key=\"tail\" text={entry.tail} />;\n if (props.section === \"browser\") {\n const list =\n props.entries.length > 0 ? (\n <ul key=\"entries\" className=\"list-disc space-y-1 ps-5\">\n {props.entries.map((item, i) => (\n <li key={i}>{item}</li>\n ))}\n </ul>\n ) : null;\n parts = [lead, list, tail, app];\n } else {\n // `rights`: the app's paragraph sits between the rights and the authorities.\n parts = [lead, app, tail];\n }\n } else {\n // The imprint's commercial disclaimer (0.32.0): its own body under the same title.\n const commercial =\n props.section === \"disclaimer\" && props.variant === \"commercial\"\n ? ((entry as LegalDisclaimerSectionLabels).commercial ??\n DEFAULT_LEGAL_LABELS.sections.impressum.disclaimer.commercial)\n : undefined;\n parts = [<LegalText key=\"body\" text={commercial ?? fill(entry.body)} />, app];\n }\n\n return (\n <LegalSection id={section} heading={entry.title} headingAs={headingAs}>\n <div className=\"space-y-[1lh]\">{parts}</div>\n </LegalSection>\n );\n}\n\ntype SectionLabels = LegalTextSectionLabels | LegalOperatorSectionLabels | LegalFramedSectionLabels;\n\n/** The one page a kit section key is on; `contact` is on two, so it needs the page. */\nfunction onlyPageOf(section: string): LegalPageKey {\n const pages = PAGES.filter((p) => kitSectionsOf(p).includes(section));\n if (pages.length === 1) return pages[0];\n throw new Error(\n pages.length === 0\n ? `LegalKitSection: \"${section}\" is not one of the kit's sections.`\n : `LegalKitSection: \"${section}\" is on more than one page (${pages.join(\", \")}) — render it inside a LegalPage, or pass page.`,\n );\n}\n\n// ── The page ──────────────────────────────────────────────────────────────────\n\nexport interface LegalPageProps {\n /** Which page: the title, the default notice, whether the sections are numbered. */\n page: LegalPageKey;\n /** Who runs the app — the values the kit's sections name. The same in every app's\n * three pages; the kit holds none (§5). */\n operator: LegalOperator;\n /**\n * The sections, in reading order: {@link LegalKitSection}s and {@link LegalSection}s.\n *\n * They must be DIRECT children — or inside fragments, or in an array\n * (`SECTIONS.map(…)`). The page reads them before they render, to know every\n * section's number in advance: that is what lets a `{ref:key}` point forward\n * (keksdose's section 2 refers to section 10). A section wrapped in a component of the\n * app's own is invisible to that walk and renders unnumbered, with no key.\n */\n children: ReactNode;\n /** The app's public header — the one a signed-out visitor already sees (keksdose's\n * `LandingHeader`, Kurvenschmiede's `AppTopBar` without the shell). */\n header?: ReactNode;\n /** Default: `<LegalFooter />` with this page marked. `null` for none. */\n footer?: ReactNode;\n /** The back link's target. Default `/`, which takes a signed-in user into the app and\n * a signed-out one to the landing or sign-in page. */\n homeHref?: string;\n /** Default: the kit's beta notice on the imprint and the terms, its privacy notice on\n * the privacy policy (§3.2). `null` for none. */\n notice?: ReactNode;\n /**\n * 0.51.3: the day this page's text last changed, \"YYYY-MM-DD\" (legal benchmark\n * 2026-10-29, gap 8). Shown under the title as `legal.updated` — \"Last updated:\n * 29 October 2026\", \"Stand: 29. Oktober 2026\" — with the date written out in `locale`,\n * so it follows the page's language like every other kit word, the switch to the\n * binding version included. Left out, no line. One date per page: the imprint, the\n * privacy policy and the terms change on their own days.\n *\n * An app that records which terms someone accepted (keksdose) stores the terms page's\n * date: it is the version the reader saw.\n *\n * The kit's sections are part of the page, so the date moves with their words too: a\n * kit release that changes them says so in its adoption note (\"Legal wording\"), and\n * the app sets the page's date to the day it ships that bump (§2, decision 10).\n */\n updated?: string;\n /**\n * 0.51.4: a plain-language summary before the first section (legal benchmark, Marcel\n * 2026-10-29) — the app's three to six points, each a sentence. The kit draws them as a\n * list under `legal.summary.title` (\"In short\", \"Das Wichtigste in Kürze\") and adds\n * `legal.summary.note`: the summary orients, only the full text binds. Worded without\n * \"below\", because on a translated page the text below is a translation too.\n *\n * A string point is running text with its `{ref:key}` resolved, as in a section:\n * \"You can delete your account at any time (section {ref:ending}).\" Unnumbered, with\n * the id `summary`; the sections' numbers do not count it. Left out or empty, nothing.\n */\n summary?: readonly ReactNode[];\n /**\n * 0.28.1: switches the app to the operator's `bindingLanguage` — the button after the\n * translation note on a page read in another language. Without it the note stands\n * alone; the app's own language switcher is in its header anyway.\n */\n onShowBindingLanguage?: () => void;\n /** The language the operator's country is named in. Default: the `<UiKitProvider\n * locale>`, else English. */\n locale?: string;\n /** The title's element. Default `h1`; `h2` for a page shown inside another (a\n * preview), whose sections then take `h3`. */\n headingAs?: \"h1\" | \"h2\";\n /** `false` draws the column as a `<div>` instead of `<main>` — for a page embedded in\n * one that has its own `<main>`. Default true. */\n landmark?: boolean;\n /** Default true: {@link useNoIndex}. `false` only where the page is not the page — a\n * preview inside another page. */\n noIndex?: boolean;\n /** On the outermost element (a full-height column). */\n className?: string;\n /** The `legal` labels for this page and everything in it — sections, footer,\n * checkbox — on top of the provider's. */\n labels?: LabelOverride<LegalLabels>;\n}\n\ninterface FlatNode {\n node: ReactNode;\n /** A stable React key from the node's place in the tree the app wrote. */\n path: string;\n}\n\n/** The children as a flat list, arrays and fragments opened — the sections the page can\n * see, in render order. */\nfunction flatten(node: ReactNode, path: string, out: FlatNode[]): void {\n if (node === null || node === undefined || typeof node === \"boolean\") return;\n if (isValidElement(node)) {\n if (node.type === Fragment) {\n flatten((node.props as { children?: ReactNode }).children, path, out);\n } else {\n out.push({ node, path: path || \"/\" });\n }\n return;\n }\n if (typeof node === \"object\" && Symbol.iterator in node) {\n Array.from(node as Iterable<ReactNode>).forEach((child, i) => {\n const step = isValidElement(child) && child.key !== null ? `$${child.key}` : `#${i}`;\n flatten(child, `${path}/${step}`, out);\n });\n return;\n }\n out.push({ node, path: path || \"/\" });\n}\n\n/** A section the walk found: its key (`undefined` when it has none) and heading. */\nfunction sectionOf(\n node: ReactNode,\n page: LegalPageKey,\n labels: LegalLabels,\n): { key: string | undefined; heading: ReactNode } | null {\n if (!isValidElement(node)) return null;\n if (node.type === LegalKitSection) {\n const { section } = node.props as LegalKitSectionProps;\n const entry = (labels.sections[page] as Record<string, SectionLabels | undefined>)[section];\n return { key: section, heading: entry?.title ?? section };\n }\n if (node.type === LegalSection) {\n const props = node.props as LegalSectionProps;\n return { key: props.id ?? node.key ?? undefined, heading: props.heading };\n }\n return null;\n}\n\n/**\n * The page's sections, each in a slot that tells it its key and number, and the map a\n * `{ref:key}` is resolved from — built from the children BEFORE they render.\n */\nfunction slotSections(\n children: ReactNode,\n page: LegalPageKey,\n labels: LegalLabels,\n): { nodes: ReactNode[]; targets: Map<string, LegalRefTarget> } {\n const flat: FlatNode[] = [];\n flatten(children, \"\", flat);\n const numbered = LEGAL_SKELETON[page].numbered;\n const targets = new Map<string, LegalRefTarget>();\n let count = 0;\n const nodes = flat.map(({ node, path }) => {\n const section = sectionOf(node, page, labels);\n if (!section) return <Fragment key={path}>{node}</Fragment>;\n count += 1;\n const number = numbered ? count : undefined;\n if (section.key !== undefined) {\n if (targets.has(section.key)) {\n warnLegalOnce(`two sections of the ${page} page share the key \"${section.key}\"; {ref:${section.key}} names the first.`);\n } else {\n targets.set(section.key, { number, heading: section.heading });\n }\n }\n return (\n <LegalSlotContext.Provider key={path} value={{ id: section.key, number }}>\n {node}\n </LegalSlotContext.Provider>\n );\n });\n return { nodes, targets };\n}\n\n/**\n * A legal page — Imprint, Privacy Policy or Terms — in the frame every app uses (§3.2):\n * the app's public header, the kit's column (back link, title, notice, sections) and the\n * public footer. keksdose's `features/legal/legal-layout.tsx`, the reference: its\n * `LegalPage` drew exactly this around the kit's `LegalLayout`, and kastlan and\n * Kurvenschmiede each drew a different frame (an auth card, the signed-in app shell).\n * Signed-in users see the same frame: the pages are public and outside the app shell.\n *\n * What it adds to the column:\n * - the title, from `legal.titles`, and \"← Back to home\" pointing at `homeHref`;\n * - the as-of line under the title, from `updated` (0.51.3);\n * - the plain-language summary before the sections, from `summary` (0.51.4);\n * - the default notice per page — the beta notice, or the privacy notice on the privacy\n * policy, whose technical sections describe running code (§3.2, §7.3);\n * - numbers: the privacy and terms sections are \"N. Title\" in render order, the\n * imprint's are not (§4.1). The titles in the catalogues carry no number, so a\n * section added in the middle renumbers the rest instead of leaving them wrong;\n * - ids: every section's `id` is its key (`/privacy#rights`), which keeps\n * Kurvenschmiede's deep links working;\n * - `{ref:key}` in a section's text becomes that section's number, linked — forward\n * references included, since the page knows the order before any section renders\n * (see `children` for what that asks of the tree);\n * - `useNoIndex()`.\n */\nexport function LegalPage({\n page,\n operator,\n children,\n header,\n footer,\n homeHref = \"/\",\n notice,\n updated,\n summary,\n onShowBindingLanguage,\n locale: localeProp,\n headingAs = \"h1\",\n landmark = true,\n noIndex = true,\n className,\n labels: labelsProp,\n}: LegalPageProps) {\n useNoIndex(noIndex);\n const labels = useLegalLabels(labelsProp);\n const locale = useKitLocale(localeProp) ?? \"en\";\n // Not memoised: `countryName` keeps one `Intl.DisplayNames` per locale, so naming the\n // country again is a lookup, and the context is rebuilt with the children anyway.\n const operatorText = legalOperatorText(operator, locale);\n const overrides = useMemo<UiKitLabelOverrides | undefined>(\n () => (labelsProp ? { legal: labelsProp } : undefined),\n [labelsProp],\n );\n\n const { nodes, targets } = slotSections(children, page, labels);\n const context: LegalPageContextValue = {\n page,\n operator: operatorText,\n sectionHeading: headingAs === \"h1\" ? \"h2\" : \"h3\",\n targets,\n };\n const Main = landmark ? \"main\" : \"div\";\n const shownNotice =\n notice !== undefined ? notice : page === \"privacy\" ? labels.notice.privacy : labels.notice.beta;\n // 0.28.1 (Marcel): one language is binding and the lawyer reviews that one; a page read\n // in any other says so, with a way to the binding version.\n const translated =\n operator.bindingLanguage !== undefined && baseLanguage(operator.bindingLanguage) !== baseLanguage(locale);\n const translationNote = translated ? (\n <p className=\"text-sm text-secondary\">\n {labels.translation.note(operatorText)}\n {onShowBindingLanguage && (\n <>\n {\" \"}\n <Button type=\"button\" variant=\"link\" size=\"sm\" className=\"h-auto p-0 align-baseline\" onClick={onShowBindingLanguage}>\n {labels.translation.show(operatorText)}\n </Button>\n </>\n )}\n </p>\n ) : undefined;\n // A calendar day, written out in the page's language; `formatDate` reads a bare\n // \"YYYY-MM-DD\" as that day in every zone. A malformed date shows no line rather than a\n // made-up one (\"2026-02-30\" would roll over into March).\n const updatedValid = updated !== undefined && parseIsoDate(updated) !== null;\n if (updated !== undefined && !updatedValid) {\n warnLegalOnce(`LegalPage: updated=\"${updated}\" is not a \"YYYY-MM-DD\" date; no \"Last updated\" line is shown.`);\n }\n const updatedLine = updatedValid ? (\n <time dateTime={updated}>\n {(labels.updated ?? DEFAULT_LEGAL_LABELS.updated!)(formatDate(updated, \"long\", { locale }))}\n </time>\n ) : undefined;\n const summaryLabels = labels.summary ?? DEFAULT_LEGAL_LABELS.summary!;\n const SummaryHeading = context.sectionHeading;\n const summaryBox =\n summary !== undefined && summary.length > 0 ? (\n <section id=\"summary\" className=\"rounded-lg border border-subtle bg-surface p-4 sm:p-5\">\n <SummaryHeading className=\"text-lg font-semibold break-words text-primary\">{summaryLabels.title}</SummaryHeading>\n <ul className=\"mt-3 space-y-2\">\n {summary.map((point, i) => (\n <li key={i} className=\"flex gap-2.5 text-sm leading-relaxed text-secondary\">\n <span aria-hidden className=\"mt-2 size-1.5 shrink-0 rounded-full bg-brand\" />\n <span className=\"min-w-0 break-words\">\n {typeof point === \"string\" ? resolveLegalRefs(point, context) : point}\n </span>\n </li>\n ))}\n </ul>\n <p className=\"mt-3 text-xs text-muted\">{summaryLabels.note}</p>\n </section>\n ) : undefined;\n\n return (\n <UiKitProvider labels={overrides}>\n <div className={cn(\"flex min-h-full flex-col\", className)}>\n {header}\n <Main className=\"flex-1\">\n <LegalPageContext.Provider value={context}>\n <LegalLayout\n back={\n <TextLink href={homeHref} icon={ArrowLeft}>\n {labels.backHome}\n </TextLink>\n }\n title={labels.titles[page]}\n notice={shownNotice}\n updated={updatedLine}\n translationNote={translationNote}\n summary={summaryBox}\n headingAs={headingAs}\n >\n {nodes}\n </LegalLayout>\n </LegalPageContext.Provider>\n </Main>\n {footer === undefined ? <LegalFooter currentHref={LEGAL_HREFS[page]} /> : footer}\n </div>\n </UiKitProvider>\n );\n}\n\n// ── Terms acceptance (§3.4) ───────────────────────────────────────────────────\n\nexport interface LegalAcceptCheckboxProps\n extends Omit<CheckboxProps, \"label\" | \"checked\" | \"onCheckedChange\" | \"required\"> {\n checked: boolean;\n onCheckedChange: (checked: boolean) => void;\n /** Default `/terms`. */\n termsHref?: string;\n /** Default `/privacy`. */\n privacyHref?: string;\n labels?: LabelOverride<LegalLabels>;\n ref?: Ref<HTMLInputElement>;\n}\n\n/** `legal.accept` with its `{terms}` and `{privacy}` as links named by the page titles.\n * Split, not interpolated: the text between the placeholders is the template's own,\n * to the character — nothing is added around a link. */\nfunction acceptLabel(labels: LegalLabels, termsHref: string, privacyHref: string): ReactNode[] {\n const template = labels.accept;\n for (const placeholder of [\"{terms}\", \"{privacy}\"]) {\n if (!template.includes(placeholder)) warnLegalOnce(`legal.accept has no ${placeholder}: \"${template}\".`);\n }\n return template\n .split(/(\\{terms\\}|\\{privacy\\})/)\n .filter((part) => part !== \"\")\n .map((part, i) =>\n part === \"{terms}\" ? (\n <TextLink key={i} href={termsHref} tone=\"primary\">\n {labels.titles.terms}\n </TextLink>\n ) : part === \"{privacy}\" ? (\n <TextLink key={i} href={privacyHref} tone=\"primary\">\n {labels.titles.privacy}\n </TextLink>\n ) : (\n part\n ),\n );\n}\n\n/**\n * The register page's \"I accept the [Terms of Service] and the [Privacy Policy]\" (§3.4):\n * keksdose's checkbox (features/auth/register-page.tsx), for every app.\n *\n * A REQUIRED kit `Checkbox` — not a Switch: a form answer that waits for the submit\n * button. The app keeps its submit disabled while it is unticked, so there is never a\n * failed attempt and no `error` to show. The checkbox itself sends nothing and asks for\n * no re-acceptance (Marcel, §2.4). An app that records which terms someone accepted\n * stores, with the account, the terms page's `updated` date — the version the reader\n * saw — on its own (keksdose since 2026-10-29; §3.4).\n *\n * The label is ONE template, `legal.accept`, so a language puts the links where its\n * grammar needs them, articles included — fr \"J’accepte les {terms} et la {privacy}\",\n * it \"Accetto le {terms} e l’{privacy}\" with no space after the elided article. The link\n * texts are the page titles (`legal.titles`), as on the pages themselves.\n */\nexport function LegalAcceptCheckbox({\n checked,\n onCheckedChange,\n termsHref = LEGAL_HREFS.terms,\n privacyHref = LEGAL_HREFS.privacy,\n labels: labelsProp,\n ref,\n ...rest\n}: LegalAcceptCheckboxProps) {\n const labels = useLegalLabels(labelsProp);\n return (\n <Checkbox\n {...rest}\n ref={ref}\n checked={checked}\n onCheckedChange={onCheckedChange}\n required\n label={acceptLabel(labels, termsHref, privacyHref)}\n />\n );\n}\n"],"mappings":";AAsN2C,SAgVnC,UAhVmC,K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IAAI,CAAC,MAAM,MACV,SAAS,YACP,oBAAC,YAAiB,MAAM,WAAW,MAAK,WACrC,iBAAO,OAAO,SADF,CAEf,IACE,SAAS,cACX,oBAAC,YAAiB,MAAM,aAAa,MAAK,WACvC,iBAAO,OAAO,WADF,CAEf,IAEA;AAAA,EAEJ;AACJ;AAkBO,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA,YAAY,YAAY;AAAA,EACxB,cAAc,YAAY;AAAA,EAC1B,QAAQ;AAAA,EACR;AAAA,EACA,GAAG;AACL,GAA6B;AAC3B,QAAM,SAAS,eAAe,UAAU;AACxC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAQ;AAAA,MACR,OAAO,YAAY,QAAQ,WAAW,WAAW;AAAA;AAAA,EACnD;AAEJ;","names":["Fragment"]}
1
+ {"version":3,"sources":["../../src/components/legal-page.tsx"],"sourcesContent":["import { Fragment, isValidElement, useContext, useMemo } from \"react\";\nimport type { ReactNode, Ref } from \"react\";\nimport { ArrowLeft } from \"lucide-react\";\n\nimport { UiKitProvider, useKitLocale } from \"../i18n/kit-labels\";\nimport type { LabelOverride, UiKitLabelOverrides } from \"../i18n/kit-labels\";\nimport { useNoIndex } from \"../hooks/use-noindex\";\nimport { cn } from \"../lib/cn\";\nimport { parseIsoDate } from \"../lib/dates\";\nimport { formatDate } from \"../lib/format\";\nimport { Checkbox } from \"./checkbox\";\nimport type { CheckboxProps } from \"./checkbox\";\nimport {\n DEFAULT_LEGAL_LABELS,\n LEGAL_HREFS,\n baseLanguage,\n LegalFooter,\n LegalLayout,\n LegalPageContext,\n LegalSection,\n LegalSlotContext,\n LegalText,\n legalOperatorText,\n resolveLegalRefs,\n useLegalLabels,\n warnLegalOnce,\n} from \"./legal\";\nimport type {\n LegalDisclaimerSectionLabels,\n LegalFramedSectionLabels,\n LegalLabels,\n LegalOperator,\n LegalOperatorSectionLabels,\n LegalOperatorText,\n LegalPageContextValue,\n LegalPageKey,\n LegalRefTarget,\n LegalSectionProps,\n LegalTextSectionLabels,\n} from \"./legal\";\nimport { TextLink } from \"./text-link\";\nimport { Button } from \"./button\";\n\n/**\n * The legal pages' frame and the kit's own sections — docs/legal-harmonization.md §3\n * and §4, the 0.28 round. The labels, the column, `LegalSection`, the links and the\n * footer are in `./legal`.\n */\n\n// ── The skeleton (§4.2) ───────────────────────────────────────────────────────\n\n/** Who writes a section: the kit's wording, the app's own, or the kit's wording with an\n * app paragraph in a fixed slot. */\nexport type LegalSectionOwner = \"kit\" | \"app\" | \"kit+app\";\n\nexport interface LegalSkeletonEntry {\n /** The section key — its `id` and its catalogue key. `\"*\"` is the slot where the\n * app's own sections go (zero or more: keksdose's `credits`, `price_pool`, …). */\n key: string;\n owner: LegalSectionOwner;\n}\n\nexport interface LegalSkeletonPage {\n /** Whether the page numbers its sections (\"3. Legal basis\"). The imprint does not. */\n numbered: boolean;\n /** The sections in their order. */\n sections: readonly LegalSkeletonEntry[];\n}\n\n/**\n * The section order every app's legal pages follow (§4.2), as data — so an app's test\n * can assert that its pages do, and so the order lives in one place, not in three apps'\n * reading of a table. `LegalPage` reads `numbered` from it.\n *\n * An app's test, given the section ids its page rendered in order:\n *\n * const fixed = LEGAL_SKELETON.privacy.sections.map((s) => s.key).filter((k) => k !== \"*\");\n * expect(ids.filter((id) => fixed.includes(id))).toEqual(fixed);\n *\n * Every fixed key is there, in the skeleton's order; the ids that are not in it are the\n * app's own sections, which belong where `\"*\"` stands.\n */\nexport const LEGAL_SKELETON: Readonly<Record<LegalPageKey, LegalSkeletonPage>> = Object.freeze({\n impressum: Object.freeze({\n numbered: false,\n sections: Object.freeze([\n { key: \"operator\", owner: \"kit\" },\n { key: \"contact\", owner: \"kit\" },\n { key: \"disclaimer\", owner: \"kit\" },\n { key: \"*\", owner: \"app\" },\n ] as const),\n }),\n privacy: Object.freeze({\n numbered: true,\n sections: Object.freeze([\n { key: \"controller\", owner: \"kit\" },\n { key: \"data\", owner: \"app\" },\n { key: \"legal_basis\", owner: \"kit+app\" },\n { key: \"third_parties\", owner: \"app\" },\n { key: \"*\", owner: \"app\" },\n { key: \"browser\", owner: \"kit+app\" },\n { key: \"transfers\", owner: \"app\" },\n { key: \"retention\", owner: \"app\" },\n { key: \"rights\", owner: \"kit+app\" },\n { key: \"contact\", owner: \"kit\" },\n ] as const),\n }),\n terms: Object.freeze({\n numbered: true,\n sections: Object.freeze([\n { key: \"scope\", owner: \"app\" },\n { key: \"no_advice\", owner: \"app\" },\n { key: \"*\", owner: \"app\" },\n { key: \"warranty\", owner: \"kit\" },\n { key: \"liability\", owner: \"kit\" },\n { key: \"changes\", owner: \"kit\" },\n // 0.28.1: which language's version prevails (the operator's `bindingLanguage`).\n { key: \"language\", owner: \"kit\" },\n { key: \"law\", owner: \"kit\" },\n ] as const),\n }),\n});\n\n/** The sections the kit writes (§4.3), on whichever page they sit. `contact` is on two\n * pages, with two texts; the page decides which. */\nexport type LegalKitSectionKey =\n | \"operator\"\n | \"contact\"\n | \"disclaimer\"\n | \"controller\"\n | \"legal_basis\"\n | \"browser\"\n | \"rights\"\n | \"warranty\"\n | \"liability\"\n | \"changes\"\n | \"language\"\n | \"law\";\n\n/** The kit's sections of one page, in the skeleton's order. */\nfunction kitSectionsOf(page: LegalPageKey): string[] {\n return LEGAL_SKELETON[page].sections.filter((s) => s.owner !== \"app\").map((s) => s.key);\n}\n\nconst PAGES: readonly LegalPageKey[] = [\"impressum\", \"privacy\", \"terms\"];\n\n// ── Kit sections ──────────────────────────────────────────────────────────────\n\ninterface LegalKitSectionBase {\n /** Default: the enclosing {@link LegalPage}'s page — needed outside one, and for\n * `contact` only (it is on two pages). */\n page?: LegalPageKey;\n /** Default: the enclosing {@link LegalPage}'s operator — needed outside one, by the\n * sections that name it (operator, both contacts, controller, law). */\n operator?: LegalOperator;\n /** Default: one level below the page's title (`h2` under an `h1`). */\n headingAs?: \"h2\" | \"h3\";\n labels?: LabelOverride<LegalLabels>;\n}\n\n/**\n * One of the kit's sections, by key. `children` is the app's paragraph where §4.2 says\n * \"kit + app\" — and only there, which the type holds an app to: the other sections'\n * wording is identical in every app, and an app that needs to say more says it in a\n * section of its own. `browser` takes the app's list of what it keeps, as `entries`.\n */\nexport type LegalKitSectionProps = LegalKitSectionBase &\n (\n | {\n section: \"browser\";\n variant?: never;\n /** What this app keeps in the browser, one entry per item — rendered as a `<ul>`\n * between the kit's two sentences. The app's words, in every language it serves. */\n entries: readonly string[];\n /** After the kit's text: what sign-out removes beyond the tokens, what stays. */\n children?: ReactNode;\n }\n | {\n section: \"legal_basis\" | \"rights\";\n variant?: never;\n entries?: never;\n /** `legal_basis`: after the kit's paragraph (consent, where an app relies on\n * it). `rights`: between the list of rights and the supervisory authorities\n * (how to export, how to delete). A plain string keeps its line breaks and has\n * its `{ref:key}` tokens resolved. */\n children?: ReactNode;\n }\n | {\n section: \"disclaimer\";\n /**\n * 0.32.0 (docs/billing-harmonization.md §8, legal decision 7): which disclaimer.\n * `non-commercial` (default) is the beta's \"private, non-commercial project\";\n * `commercial` is for an app that charges, sold through a Merchant of Record —\n * chosen per app, in the release that turns its billing on.\n */\n variant?: LegalDisclaimerVariant;\n entries?: never;\n children?: never;\n }\n | {\n section: Exclude<LegalKitSectionKey, \"browser\" | \"legal_basis\" | \"rights\" | \"disclaimer\">;\n variant?: never;\n entries?: never;\n children?: never;\n }\n );\n\n/** 0.32.0: the imprint disclaimer's two texts — see {@link LegalKitSectionProps}. */\nexport type LegalDisclaimerVariant = \"non-commercial\" | \"commercial\";\n\n/** The app's paragraph: a plain string as running text (line breaks kept, refs\n * resolved), anything else as it is. */\nfunction appPart(children: ReactNode): ReactNode {\n if (children === undefined || children === null || children === false) return null;\n if (typeof children === \"string\") return <LegalText key=\"app\" text={children} />;\n return <Fragment key=\"app\">{children}</Fragment>;\n}\n\n/**\n * One of the kit's sections (§4.3) — `<LegalKitSection section=\"warranty\" />` — with its\n * heading, its `id` (the key: `/terms#warranty`) and, on a numbered page, its number.\n *\n * The words are the kit's, in the `legal` labels, filled in with the operator; an app\n * adds only what §4.2 gives it a slot for. Inside a {@link LegalPage} the page and the\n * operator come from it, so a page reads as its section list:\n *\n * <LegalPage page=\"privacy\" operator={OPERATOR}>\n * <LegalKitSection section=\"controller\" />\n * <LegalSection key=\"data\" heading={t(\"legal.privacy.data.title\")} body={…} />\n * <LegalKitSection section=\"legal_basis\">{t(\"legal.privacy.legal_basis.app\")}</LegalKitSection>\n * …\n * </LegalPage>\n *\n * A key that is not one of the page's kit sections throws, naming the ones that are: it\n * is a typo in code, not a state a user can reach.\n */\nexport function LegalKitSection(props: LegalKitSectionProps) {\n const { section, headingAs, labels: labelsProp } = props;\n const context = useContext(LegalPageContext);\n const labels = useLegalLabels(labelsProp);\n const kitLocale = useKitLocale();\n\n const page = props.page ?? context?.page ?? onlyPageOf(section);\n const kitSections = kitSectionsOf(page);\n if (!kitSections.includes(section)) {\n throw new Error(\n `LegalKitSection: \"${section}\" is not one of the kit's sections of the ${page} page (${kitSections.join(\", \")}).`,\n );\n }\n const entry = (labels.sections[page] as Record<string, SectionLabels>)[section];\n const operator = props.operator ? legalOperatorText(props.operator, kitLocale) : context?.operator;\n const fill = (body: string | ((o: LegalOperatorText) => string)): string => {\n if (typeof body === \"string\") return body;\n if (!operator) {\n throw new Error(\n `LegalKitSection \"${section}\" names the operator: render it inside <LegalPage operator={…}>, or pass operator.`,\n );\n }\n if (section === \"language\" && !operator.bindingLanguage) {\n throw new Error(\n `LegalKitSection \"language\" names the binding language: give the operator a bindingLanguage (\"de-CH\").`,\n );\n }\n return body(operator);\n };\n\n const app = appPart(props.children);\n let parts: ReactNode[];\n if (\"lead\" in entry) {\n const lead = <LegalText key=\"lead\" text={entry.lead} />;\n const tail = <LegalText key=\"tail\" text={entry.tail} />;\n if (props.section === \"browser\") {\n const list =\n props.entries.length > 0 ? (\n <ul key=\"entries\" className=\"list-disc space-y-1 ps-5\">\n {props.entries.map((item, i) => (\n <li key={i}>{item}</li>\n ))}\n </ul>\n ) : null;\n parts = [lead, list, tail, app];\n } else {\n // `rights`: the app's paragraph sits between the rights and the authorities.\n parts = [lead, app, tail];\n }\n } else {\n // The imprint's commercial disclaimer (0.32.0): its own body under the same title.\n const commercial =\n props.section === \"disclaimer\" && props.variant === \"commercial\"\n ? ((entry as LegalDisclaimerSectionLabels).commercial ??\n DEFAULT_LEGAL_LABELS.sections.impressum.disclaimer.commercial)\n : undefined;\n parts = [<LegalText key=\"body\" text={commercial ?? fill(entry.body)} />, app];\n }\n\n return (\n <LegalSection id={section} heading={entry.title} headingAs={headingAs}>\n <div className=\"space-y-[1lh]\">{parts}</div>\n </LegalSection>\n );\n}\n\ntype SectionLabels = LegalTextSectionLabels | LegalOperatorSectionLabels | LegalFramedSectionLabels;\n\n/** The one page a kit section key is on; `contact` is on two, so it needs the page. */\nfunction onlyPageOf(section: string): LegalPageKey {\n const pages = PAGES.filter((p) => kitSectionsOf(p).includes(section));\n if (pages.length === 1) return pages[0];\n throw new Error(\n pages.length === 0\n ? `LegalKitSection: \"${section}\" is not one of the kit's sections.`\n : `LegalKitSection: \"${section}\" is on more than one page (${pages.join(\", \")}) — render it inside a LegalPage, or pass page.`,\n );\n}\n\n// ── The page ──────────────────────────────────────────────────────────────────\n\nexport interface LegalPageProps {\n /** Which page: the title, the default notice, whether the sections are numbered. */\n page: LegalPageKey;\n /** Who runs the app — the values the kit's sections name. The same in every app's\n * three pages; the kit holds none (§5). */\n operator: LegalOperator;\n /**\n * The sections, in reading order: {@link LegalKitSection}s and {@link LegalSection}s.\n *\n * They must be DIRECT children — or inside fragments, or in an array\n * (`SECTIONS.map(…)`). The page reads them before they render, to know every\n * section's number in advance: that is what lets a `{ref:key}` point forward\n * (keksdose's section 2 refers to section 10). A section wrapped in a component of the\n * app's own is invisible to that walk and renders unnumbered, with no key.\n */\n children: ReactNode;\n /** The app's public header — the one a signed-out visitor already sees (keksdose's\n * `LandingHeader`, Kurvenschmiede's `AppTopBar` without the shell). */\n header?: ReactNode;\n /** Default: `<LegalFooter />` with this page marked. `null` for none. */\n footer?: ReactNode;\n /** The back link's target. Default `/`, which takes a signed-in user into the app and\n * a signed-out one to the landing or sign-in page. */\n homeHref?: string;\n /** Default: the kit's beta notice on the imprint and the terms, its privacy notice on\n * the privacy policy (§3.2). `null` for none. */\n notice?: ReactNode;\n /**\n * 0.51.3: the day this page's text last changed, \"YYYY-MM-DD\" (legal benchmark\n * 2026-10-29, gap 8). Shown under the title as `legal.updated` — \"Last updated:\n * 29 October 2026\", \"Stand: 29. Oktober 2026\" — with the date written out in `locale`,\n * so it follows the page's language like every other kit word, the switch to the\n * binding version included. Left out, no line. One date per page: the imprint, the\n * privacy policy and the terms change on their own days.\n *\n * An app that records which terms someone accepted (keksdose) stores the terms page's\n * date: it is the version the reader saw.\n *\n * The kit's sections are part of the page, so the date moves with their words too: a\n * kit release that changes them says so in its adoption note (\"Legal wording\"), and\n * the app sets the page's date to the day it ships that bump (§2, decision 10).\n */\n updated?: string;\n /**\n * 0.51.4: a plain-language summary before the first section (legal benchmark, Marcel\n * 2026-10-29) — the app's three to six points, each a sentence. The kit draws them as a\n * list under `legal.summary.title` (\"In short\", \"Das Wichtigste in Kürze\") and adds\n * `legal.summary.note`: the summary orients, only the full text binds. Worded without\n * \"below\", because on a translated page the text below is a translation too.\n *\n * A string point is running text with its `{ref:key}` resolved, as in a section:\n * \"You can delete your account at any time (section {ref:ending}).\" Unnumbered, with\n * the id `summary`; the sections' numbers do not count it. Left out or empty, nothing.\n */\n summary?: readonly ReactNode[];\n /**\n * 0.28.1: switches the app to the operator's `bindingLanguage` — the button after the\n * translation note on a page read in another language. Without it the note stands\n * alone; the app's own language switcher is in its header anyway.\n */\n onShowBindingLanguage?: () => void;\n /** The language the operator's country is named in. Default: the `<UiKitProvider\n * locale>`, else English. */\n locale?: string;\n /** The title's element. Default `h1`; `h2` for a page shown inside another (a\n * preview), whose sections then take `h3`. */\n headingAs?: \"h1\" | \"h2\";\n /** `false` draws the column as a `<div>` instead of `<main>` — for a page embedded in\n * one that has its own `<main>`. Default true. */\n landmark?: boolean;\n /** Default true: {@link useNoIndex}. `false` only where the page is not the page — a\n * preview inside another page. */\n noIndex?: boolean;\n /** On the outermost element (a full-height column). */\n className?: string;\n /** The `legal` labels for this page and everything in it — sections, footer,\n * checkbox — on top of the provider's. */\n labels?: LabelOverride<LegalLabels>;\n}\n\ninterface FlatNode {\n node: ReactNode;\n /** A stable React key from the node's place in the tree the app wrote. */\n path: string;\n}\n\n/** The children as a flat list, arrays and fragments opened — the sections the page can\n * see, in render order. */\nfunction flatten(node: ReactNode, path: string, out: FlatNode[]): void {\n if (node === null || node === undefined || typeof node === \"boolean\") return;\n if (isValidElement(node)) {\n if (node.type === Fragment) {\n flatten((node.props as { children?: ReactNode }).children, path, out);\n } else {\n out.push({ node, path: path || \"/\" });\n }\n return;\n }\n if (typeof node === \"object\" && Symbol.iterator in node) {\n Array.from(node as Iterable<ReactNode>).forEach((child, i) => {\n const step = isValidElement(child) && child.key !== null ? `$${child.key}` : `#${i}`;\n flatten(child, `${path}/${step}`, out);\n });\n return;\n }\n out.push({ node, path: path || \"/\" });\n}\n\n/** A section the walk found: its key (`undefined` when it has none) and heading. */\nfunction sectionOf(\n node: ReactNode,\n page: LegalPageKey,\n labels: LegalLabels,\n): { key: string | undefined; heading: ReactNode } | null {\n if (!isValidElement(node)) return null;\n if (node.type === LegalKitSection) {\n const { section } = node.props as LegalKitSectionProps;\n const entry = (labels.sections[page] as Record<string, SectionLabels | undefined>)[section];\n return { key: section, heading: entry?.title ?? section };\n }\n if (node.type === LegalSection) {\n const props = node.props as LegalSectionProps;\n return { key: props.id ?? node.key ?? undefined, heading: props.heading };\n }\n return null;\n}\n\n/**\n * The page's sections, each in a slot that tells it its key and number, and the map a\n * `{ref:key}` is resolved from — built from the children BEFORE they render.\n */\nfunction slotSections(\n children: ReactNode,\n page: LegalPageKey,\n labels: LegalLabels,\n): { nodes: ReactNode[]; targets: Map<string, LegalRefTarget> } {\n const flat: FlatNode[] = [];\n flatten(children, \"\", flat);\n const numbered = LEGAL_SKELETON[page].numbered;\n const targets = new Map<string, LegalRefTarget>();\n let count = 0;\n const nodes = flat.map(({ node, path }) => {\n const section = sectionOf(node, page, labels);\n if (!section) return <Fragment key={path}>{node}</Fragment>;\n count += 1;\n const number = numbered ? count : undefined;\n if (section.key !== undefined) {\n if (targets.has(section.key)) {\n warnLegalOnce(\n `two sections of the ${page} page share the key \"${section.key}\"; {ref:${section.key}} names the first.`,\n );\n } else {\n targets.set(section.key, { number, heading: section.heading });\n }\n }\n return (\n <LegalSlotContext.Provider key={path} value={{ id: section.key, number }}>\n {node}\n </LegalSlotContext.Provider>\n );\n });\n return { nodes, targets };\n}\n\n/**\n * A legal page — Imprint, Privacy Policy or Terms — in the frame every app uses (§3.2):\n * the app's public header, the kit's column (back link, title, notice, sections) and the\n * public footer. keksdose's `features/legal/legal-layout.tsx`, the reference: its\n * `LegalPage` drew exactly this around the kit's `LegalLayout`, and kastlan and\n * Kurvenschmiede each drew a different frame (an auth card, the signed-in app shell).\n * Signed-in users see the same frame: the pages are public and outside the app shell.\n *\n * What it adds to the column:\n * - the title, from `legal.titles`, and \"← Back to home\" pointing at `homeHref`;\n * - the as-of line under the title, from `updated` (0.51.3);\n * - the plain-language summary before the sections, from `summary` (0.51.4);\n * - the default notice per page — the beta notice, or the privacy notice on the privacy\n * policy, whose technical sections describe running code (§3.2, §7.3);\n * - numbers: the privacy and terms sections are \"N. Title\" in render order, the\n * imprint's are not (§4.1). The titles in the catalogues carry no number, so a\n * section added in the middle renumbers the rest instead of leaving them wrong;\n * - ids: every section's `id` is its key (`/privacy#rights`), which keeps\n * Kurvenschmiede's deep links working;\n * - `{ref:key}` in a section's text becomes that section's number, linked — forward\n * references included, since the page knows the order before any section renders\n * (see `children` for what that asks of the tree);\n * - `useNoIndex()`.\n */\nexport function LegalPage({\n page,\n operator,\n children,\n header,\n footer,\n homeHref = \"/\",\n notice,\n updated,\n summary,\n onShowBindingLanguage,\n locale: localeProp,\n headingAs = \"h1\",\n landmark = true,\n noIndex = true,\n className,\n labels: labelsProp,\n}: LegalPageProps) {\n useNoIndex(noIndex);\n const labels = useLegalLabels(labelsProp);\n const locale = useKitLocale(localeProp) ?? \"en\";\n // Not memoised: `countryName` keeps one `Intl.DisplayNames` per locale, so naming the\n // country again is a lookup, and the context is rebuilt with the children anyway.\n const operatorText = legalOperatorText(operator, locale);\n const overrides = useMemo<UiKitLabelOverrides | undefined>(\n () => (labelsProp ? { legal: labelsProp } : undefined),\n [labelsProp],\n );\n\n const { nodes, targets } = slotSections(children, page, labels);\n const context: LegalPageContextValue = {\n page,\n operator: operatorText,\n sectionHeading: headingAs === \"h1\" ? \"h2\" : \"h3\",\n targets,\n };\n const Main = landmark ? \"main\" : \"div\";\n const shownNotice = notice !== undefined ? notice : page === \"privacy\" ? labels.notice.privacy : labels.notice.beta;\n // 0.28.1 (Marcel): one language is binding and the lawyer reviews that one; a page read\n // in any other says so, with a way to the binding version.\n const translated =\n operator.bindingLanguage !== undefined && baseLanguage(operator.bindingLanguage) !== baseLanguage(locale);\n const translationNote = translated ? (\n <p className=\"text-sm text-secondary\">\n {labels.translation.note(operatorText)}\n {onShowBindingLanguage && (\n <>\n {\" \"}\n <Button\n type=\"button\"\n variant=\"link\"\n size=\"sm\"\n className=\"h-auto p-0 align-baseline\"\n onClick={onShowBindingLanguage}\n >\n {labels.translation.show(operatorText)}\n </Button>\n </>\n )}\n </p>\n ) : undefined;\n // A calendar day, written out in the page's language; `formatDate` reads a bare\n // \"YYYY-MM-DD\" as that day in every zone. A malformed date shows no line rather than a\n // made-up one (\"2026-02-30\" would roll over into March).\n const updatedValid = updated !== undefined && parseIsoDate(updated) !== null;\n if (updated !== undefined && !updatedValid) {\n warnLegalOnce(`LegalPage: updated=\"${updated}\" is not a \"YYYY-MM-DD\" date; no \"Last updated\" line is shown.`);\n }\n const updatedLine = updatedValid ? (\n <time dateTime={updated}>\n {(labels.updated ?? DEFAULT_LEGAL_LABELS.updated!)(formatDate(updated, \"long\", { locale }))}\n </time>\n ) : undefined;\n const summaryLabels = labels.summary ?? DEFAULT_LEGAL_LABELS.summary!;\n const SummaryHeading = context.sectionHeading;\n const summaryBox =\n summary !== undefined && summary.length > 0 ? (\n <section id=\"summary\" className=\"rounded-lg border border-subtle bg-surface p-4 sm:p-5\">\n <SummaryHeading className=\"text-lg font-semibold break-words text-primary\">\n {summaryLabels.title}\n </SummaryHeading>\n <ul className=\"mt-3 space-y-2\">\n {summary.map((point, i) => (\n <li key={i} className=\"flex gap-2.5 text-sm leading-relaxed text-secondary\">\n <span aria-hidden className=\"mt-2 size-1.5 shrink-0 rounded-full bg-brand\" />\n <span className=\"min-w-0 break-words\">\n {typeof point === \"string\" ? resolveLegalRefs(point, context) : point}\n </span>\n </li>\n ))}\n </ul>\n <p className=\"mt-3 text-xs text-muted\">{summaryLabels.note}</p>\n </section>\n ) : undefined;\n\n return (\n <UiKitProvider labels={overrides}>\n <div className={cn(\"flex min-h-full flex-col\", className)}>\n {header}\n <Main className=\"flex-1\">\n <LegalPageContext.Provider value={context}>\n <LegalLayout\n back={\n <TextLink href={homeHref} icon={ArrowLeft}>\n {labels.backHome}\n </TextLink>\n }\n title={labels.titles[page]}\n notice={shownNotice}\n updated={updatedLine}\n translationNote={translationNote}\n summary={summaryBox}\n headingAs={headingAs}\n >\n {nodes}\n </LegalLayout>\n </LegalPageContext.Provider>\n </Main>\n {footer === undefined ? <LegalFooter currentHref={LEGAL_HREFS[page]} /> : footer}\n </div>\n </UiKitProvider>\n );\n}\n\n// ── Terms acceptance (§3.4) ───────────────────────────────────────────────────\n\nexport interface LegalAcceptCheckboxProps extends Omit<\n CheckboxProps,\n \"label\" | \"checked\" | \"onCheckedChange\" | \"required\"\n> {\n checked: boolean;\n onCheckedChange: (checked: boolean) => void;\n /** Default `/terms`. */\n termsHref?: string;\n /** Default `/privacy`. */\n privacyHref?: string;\n labels?: LabelOverride<LegalLabels>;\n ref?: Ref<HTMLInputElement>;\n}\n\n/** `legal.accept` with its `{terms}` and `{privacy}` as links named by the page titles.\n * Split, not interpolated: the text between the placeholders is the template's own,\n * to the character — nothing is added around a link. */\nfunction acceptLabel(labels: LegalLabels, termsHref: string, privacyHref: string): ReactNode[] {\n const template = labels.accept;\n for (const placeholder of [\"{terms}\", \"{privacy}\"]) {\n if (!template.includes(placeholder)) warnLegalOnce(`legal.accept has no ${placeholder}: \"${template}\".`);\n }\n return template\n .split(/(\\{terms\\}|\\{privacy\\})/)\n .filter((part) => part !== \"\")\n .map((part, i) =>\n part === \"{terms}\" ? (\n <TextLink key={i} href={termsHref} tone=\"primary\">\n {labels.titles.terms}\n </TextLink>\n ) : part === \"{privacy}\" ? (\n <TextLink key={i} href={privacyHref} tone=\"primary\">\n {labels.titles.privacy}\n </TextLink>\n ) : (\n part\n ),\n );\n}\n\n/**\n * The register page's \"I accept the [Terms of Service] and the [Privacy Policy]\" (§3.4):\n * keksdose's checkbox (features/auth/register-page.tsx), for every app.\n *\n * A REQUIRED kit `Checkbox` — not a Switch: a form answer that waits for the submit\n * button. The app keeps its submit disabled while it is unticked, so there is never a\n * failed attempt and no `error` to show. The checkbox itself sends nothing and asks for\n * no re-acceptance (Marcel, §2.4). An app that records which terms someone accepted\n * stores, with the account, the terms page's `updated` date — the version the reader\n * saw — on its own (keksdose since 2026-10-29; §3.4).\n *\n * The label is ONE template, `legal.accept`, so a language puts the links where its\n * grammar needs them, articles included — fr \"J’accepte les {terms} et la {privacy}\",\n * it \"Accetto le {terms} e l’{privacy}\" with no space after the elided article. The link\n * texts are the page titles (`legal.titles`), as on the pages themselves.\n */\nexport function LegalAcceptCheckbox({\n checked,\n onCheckedChange,\n termsHref = LEGAL_HREFS.terms,\n privacyHref = LEGAL_HREFS.privacy,\n labels: labelsProp,\n ref,\n ...rest\n}: LegalAcceptCheckboxProps) {\n const labels = useLegalLabels(labelsProp);\n return (\n <Checkbox\n {...rest}\n ref={ref}\n checked={checked}\n onCheckedChange={onCheckedChange}\n required\n label={acceptLabel(labels, termsHref, privacyHref)}\n />\n );\n}\n"],"mappings":";AAsN2C,SAiVnC,UAjVmC,KAiVnC,YAjVmC;AAtN3C,SAAS,YAAAA,WAAU,gBAAgB,YAAY,eAAe;AAE9D,SAAS,iBAAiB;AAE1B,SAAS,eAAe,oBAAoB;AAE5C,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AAEzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAcP,SAAS,gBAAgB;AACzB,SAAS,cAAc;AAyChB,MAAM,iBAAoE,OAAO,OAAO;AAAA,EAC7F,WAAW,OAAO,OAAO;AAAA,IACvB,UAAU;AAAA,IACV,UAAU,OAAO,OAAO;AAAA,MACtB,EAAE,KAAK,YAAY,OAAO,MAAM;AAAA,MAChC,EAAE,KAAK,WAAW,OAAO,MAAM;AAAA,MAC/B,EAAE,KAAK,cAAc,OAAO,MAAM;AAAA,MAClC,EAAE,KAAK,KAAK,OAAO,MAAM;AAAA,IAC3B,CAAU;AAAA,EACZ,CAAC;AAAA,EACD,SAAS,OAAO,OAAO;AAAA,IACrB,UAAU;AAAA,IACV,UAAU,OAAO,OAAO;AAAA,MACtB,EAAE,KAAK,cAAc,OAAO,MAAM;AAAA,MAClC,EAAE,KAAK,QAAQ,OAAO,MAAM;AAAA,MAC5B,EAAE,KAAK,eAAe,OAAO,UAAU;AAAA,MACvC,EAAE,KAAK,iBAAiB,OAAO,MAAM;AAAA,MACrC,EAAE,KAAK,KAAK,OAAO,MAAM;AAAA,MACzB,EAAE,KAAK,WAAW,OAAO,UAAU;AAAA,MACnC,EAAE,KAAK,aAAa,OAAO,MAAM;AAAA,M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I,CAAC,SAAS,SAAS,WAAW,EAAG,eAAc,uBAAuB,WAAW,MAAM,QAAQ,IAAI;AAAA,EACzG;AACA,SAAO,SACJ,MAAM,yBAAyB,EAC/B,OAAO,CAAC,SAAS,SAAS,EAAE,EAC5B;AAAA,IAAI,CAAC,MAAM,MACV,SAAS,YACP,oBAAC,YAAiB,MAAM,WAAW,MAAK,WACrC,iBAAO,OAAO,SADF,CAEf,IACE,SAAS,cACX,oBAAC,YAAiB,MAAM,aAAa,MAAK,WACvC,iBAAO,OAAO,WADF,CAEf,IAEA;AAAA,EAEJ;AACJ;AAkBO,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA,YAAY,YAAY;AAAA,EACxB,cAAc,YAAY;AAAA,EAC1B,QAAQ;AAAA,EACR;AAAA,EACA,GAAG;AACL,GAA6B;AAC3B,QAAM,SAAS,eAAe,UAAU;AACxC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAQ;AAAA,MACR,OAAO,YAAY,QAAQ,WAAW,WAAW;AAAA;AAAA,EACnD;AAEJ;","names":["Fragment"]}
@@ -109,7 +109,9 @@ function LegalLinks({
109
109
  ...infoLinks(labels, { security: securityHref, accessibility: accessibilityHref })
110
110
  ];
111
111
  const items = shown.flatMap((link, i) => [
112
- ...i > 0 ? [/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\xB7" }, `sep-${link.href}`)] : [],
112
+ ...i > 0 ? [
113
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\xB7" }, `sep-${link.href}`)
114
+ ] : [],
113
115
  /* @__PURE__ */ jsx(TextLink, { href: link.href, tone: "muted", current: link.href === currentHref, onClick: onLinkClick, children: link.label }, link.href)
114
116
  ]);
115
117
  const rowClass = cn("flex flex-wrap items-center gap-x-4 gap-y-1 text-xs", className);
@@ -183,7 +185,15 @@ function LegalLayout({
183
185
  summary,
184
186
  children
185
187
  ] }),
186
- links !== void 0 && links.length > 0 && /* @__PURE__ */ jsx(LegalLinks, { links, currentHref, labels, className: "mt-12 border-t border-subtle pt-4" })
188
+ links !== void 0 && links.length > 0 && /* @__PURE__ */ jsx(
189
+ LegalLinks,
190
+ {
191
+ links,
192
+ currentHref,
193
+ labels,
194
+ className: "mt-12 border-t border-subtle pt-4"
195
+ }
196
+ )
187
197
  ] });
188
198
  }
189
199
  export {