@eifi1/ui-kit 0.34.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/README.md +115 -41
  2. package/dist/admin/role-select.d.ts +3 -2
  3. package/dist/admin/role-select.js +2 -0
  4. package/dist/admin/role-select.js.map +1 -1
  5. package/dist/billing/billing-banner.d.ts +5 -2
  6. package/dist/billing/billing-banner.js.map +1 -1
  7. package/dist/billing/plan-limit-notice.d.ts +5 -2
  8. package/dist/billing/plan-limit-notice.js.map +1 -1
  9. package/dist/chart.js.map +1 -1
  10. package/dist/components/amount-input.d.ts +2 -5
  11. package/dist/components/amount-input.js +2 -2
  12. package/dist/components/amount-input.js.map +1 -1
  13. package/dist/components/autocomplete.d.ts +2 -2
  14. package/dist/components/autocomplete.js +2 -1
  15. package/dist/components/autocomplete.js.map +1 -1
  16. package/dist/components/button-look.d.ts +1 -1
  17. package/dist/components/button-look.js +9 -4
  18. package/dist/components/button-look.js.map +1 -1
  19. package/dist/components/calculator.d.ts +1 -4
  20. package/dist/components/calculator.js +1 -3
  21. package/dist/components/calculator.js.map +1 -1
  22. package/dist/components/chart-zoom.d.ts +0 -37
  23. package/dist/components/chart-zoom.js +1 -28
  24. package/dist/components/chart-zoom.js.map +1 -1
  25. package/dist/components/checkbox-group.d.ts +5 -2
  26. package/dist/components/checkbox-group.js +15 -4
  27. package/dist/components/checkbox-group.js.map +1 -1
  28. package/dist/components/chip-input.d.ts +0 -4
  29. package/dist/components/chip-input.js +1 -5
  30. package/dist/components/chip-input.js.map +1 -1
  31. package/dist/components/column-mapper.d.ts +5 -3
  32. package/dist/components/column-mapper.js +2 -0
  33. package/dist/components/column-mapper.js.map +1 -1
  34. package/dist/components/combobox.d.ts +3 -3
  35. package/dist/components/combobox.js +2 -1
  36. package/dist/components/combobox.js.map +1 -1
  37. package/dist/components/copy-button.d.ts +5 -1
  38. package/dist/components/copy-button.js.map +1 -1
  39. package/dist/components/country-select.d.ts +3 -3
  40. package/dist/components/country-select.js +3 -0
  41. package/dist/components/country-select.js.map +1 -1
  42. package/dist/components/currency-option-list.d.ts +3 -8
  43. package/dist/components/currency-option-list.js +1 -29
  44. package/dist/components/currency-option-list.js.map +1 -1
  45. package/dist/components/currency-select.d.ts +3 -2
  46. package/dist/components/currency-select.js +10 -1
  47. package/dist/components/currency-select.js.map +1 -1
  48. package/dist/components/danger-confirm.d.ts +3 -3
  49. package/dist/components/danger-confirm.js.map +1 -1
  50. package/dist/components/data-table-filter-popover.d.ts +1 -1
  51. package/dist/components/data-table-filter-popover.js +1 -1
  52. package/dist/components/data-table-filter-popover.js.map +1 -1
  53. package/dist/components/data-table-labels.d.ts +1 -42
  54. package/dist/components/data-table-labels.js +2 -31
  55. package/dist/components/data-table-labels.js.map +1 -1
  56. package/dist/components/data-table-shared.d.ts +17 -1
  57. package/dist/components/data-table-shared.js +22 -0
  58. package/dist/components/data-table-shared.js.map +1 -1
  59. package/dist/components/data-table.d.ts +12 -2
  60. package/dist/components/data-table.js +18 -14
  61. package/dist/components/data-table.js.map +1 -1
  62. package/dist/components/date-field.d.ts +2 -1
  63. package/dist/components/date-field.js.map +1 -1
  64. package/dist/components/date-picker.js +3 -0
  65. package/dist/components/date-picker.js.map +1 -1
  66. package/dist/components/date-range-picker.js +3 -0
  67. package/dist/components/date-range-picker.js.map +1 -1
  68. package/dist/components/dialog-frame.d.ts +3 -1
  69. package/dist/components/dialog-frame.js.map +1 -1
  70. package/dist/components/dropdown.d.ts +18 -15
  71. package/dist/components/dropdown.js +11 -3
  72. package/dist/components/dropdown.js.map +1 -1
  73. package/dist/components/entity-combobox.d.ts +3 -3
  74. package/dist/components/entity-combobox.js +2 -1
  75. package/dist/components/entity-combobox.js.map +1 -1
  76. package/dist/components/field-base.d.ts +0 -5
  77. package/dist/components/field-base.js +0 -5
  78. package/dist/components/field-base.js.map +1 -1
  79. package/dist/components/field-parts.d.ts +69 -22
  80. package/dist/components/field-parts.js +33 -19
  81. package/dist/components/field-parts.js.map +1 -1
  82. package/dist/components/field-strip.d.ts +9 -23
  83. package/dist/components/field-strip.js +26 -23
  84. package/dist/components/field-strip.js.map +1 -1
  85. package/dist/components/field-sync.d.ts +0 -4
  86. package/dist/components/field-sync.js +0 -4
  87. package/dist/components/field-sync.js.map +1 -1
  88. package/dist/components/field.d.ts +7 -6
  89. package/dist/components/field.js +24 -15
  90. package/dist/components/field.js.map +1 -1
  91. package/dist/components/full-bleed-dialog.js +2 -2
  92. package/dist/components/full-bleed-dialog.js.map +1 -1
  93. package/dist/components/help-popover.d.ts +9 -7
  94. package/dist/components/help-popover.js.map +1 -1
  95. package/dist/components/hover-menu.d.ts +6 -13
  96. package/dist/components/hover-menu.js +3 -3
  97. package/dist/components/hover-menu.js.map +1 -1
  98. package/dist/components/icon-picker.d.ts +3 -2
  99. package/dist/components/icon-picker.js +3 -0
  100. package/dist/components/icon-picker.js.map +1 -1
  101. package/dist/components/inline-entity-combobox.d.ts +3 -3
  102. package/dist/components/inline-entity-combobox.js +2 -1
  103. package/dist/components/inline-entity-combobox.js.map +1 -1
  104. package/dist/components/input.d.ts +2 -2
  105. package/dist/components/input.js +2 -1
  106. package/dist/components/input.js.map +1 -1
  107. package/dist/components/modal.d.ts +9 -1
  108. package/dist/components/modal.js +7 -4
  109. package/dist/components/modal.js.map +1 -1
  110. package/dist/components/month-picker.d.ts +2 -1
  111. package/dist/components/month-picker.js +8 -1
  112. package/dist/components/month-picker.js.map +1 -1
  113. package/dist/components/multi-entity-combobox.d.ts +2 -2
  114. package/dist/components/multi-entity-combobox.js +2 -1
  115. package/dist/components/multi-entity-combobox.js.map +1 -1
  116. package/dist/components/multi-select.d.ts +7 -18
  117. package/dist/components/multi-select.js +8 -10
  118. package/dist/components/multi-select.js.map +1 -1
  119. package/dist/components/number-input.d.ts +2 -5
  120. package/dist/components/number-input.js +2 -4
  121. package/dist/components/number-input.js.map +1 -1
  122. package/dist/components/numeric-field.d.ts +5 -2
  123. package/dist/components/numeric-field.js +4 -1
  124. package/dist/components/numeric-field.js.map +1 -1
  125. package/dist/components/one-time-code-input.d.ts +2 -1
  126. package/dist/components/one-time-code-input.js +2 -1
  127. package/dist/components/one-time-code-input.js.map +1 -1
  128. package/dist/components/phone-input.d.ts +1 -1
  129. package/dist/components/phone-input.js +4 -0
  130. package/dist/components/phone-input.js.map +1 -1
  131. package/dist/components/popover.js +3 -3
  132. package/dist/components/popover.js.map +1 -1
  133. package/dist/components/select.d.ts +4 -3
  134. package/dist/components/select.js +2 -1
  135. package/dist/components/select.js.map +1 -1
  136. package/dist/components/series-chart.js.map +1 -1
  137. package/dist/components/server-wake.d.ts +0 -6
  138. package/dist/components/server-wake.js.map +1 -1
  139. package/dist/components/settings-fields.d.ts +4 -2
  140. package/dist/components/settings-fields.js.map +1 -1
  141. package/dist/components/slider.d.ts +3 -2
  142. package/dist/components/slider.js +7 -1
  143. package/dist/components/slider.js.map +1 -1
  144. package/dist/components/stat-tile.d.ts +8 -2
  145. package/dist/components/stat-tile.js +2 -11
  146. package/dist/components/stat-tile.js.map +1 -1
  147. package/dist/components/swatch-picker.d.ts +3 -2
  148. package/dist/components/swatch-picker.js +3 -0
  149. package/dist/components/swatch-picker.js.map +1 -1
  150. package/dist/components/swipeable-row.d.ts +2 -17
  151. package/dist/components/swipeable-row.js +11 -16
  152. package/dist/components/swipeable-row.js.map +1 -1
  153. package/dist/components/text-link.js +3 -1
  154. package/dist/components/text-link.js.map +1 -1
  155. package/dist/components/textarea.d.ts +2 -1
  156. package/dist/components/textarea.js +9 -3
  157. package/dist/components/textarea.js.map +1 -1
  158. package/dist/components/toggle-group.d.ts +2 -2
  159. package/dist/components/toggle-group.js +7 -3
  160. package/dist/components/toggle-group.js.map +1 -1
  161. package/dist/components/tooltip.d.ts +9 -1
  162. package/dist/components/tooltip.js +20 -5
  163. package/dist/components/tooltip.js.map +1 -1
  164. package/dist/components/translation-review.d.ts +10 -2
  165. package/dist/components/translation-review.js +11 -3
  166. package/dist/components/translation-review.js.map +1 -1
  167. package/dist/components/use-table-state.d.ts +31 -3
  168. package/dist/components/use-table-state.js +53 -8
  169. package/dist/components/use-table-state.js.map +1 -1
  170. package/dist/components/user-avatar.d.ts +2 -2
  171. package/dist/components/user-avatar.js.map +1 -1
  172. package/dist/components/wizard-stepper.d.ts +1 -4
  173. package/dist/components/wizard-stepper.js +2 -3
  174. package/dist/components/wizard-stepper.js.map +1 -1
  175. package/dist/currencies.d.ts +23 -0
  176. package/dist/currencies.js +38 -0
  177. package/dist/currencies.js.map +1 -0
  178. package/dist/demo/demo-banner.d.ts +7 -2
  179. package/dist/demo/demo-banner.js.map +1 -1
  180. package/dist/eslint/index.d.ts +83 -0
  181. package/dist/eslint/index.js +69 -0
  182. package/dist/eslint/index.js.map +1 -0
  183. package/dist/eslint/role-utilities.d.ts +48 -0
  184. package/dist/eslint/role-utilities.generated.d.ts +2 -0
  185. package/dist/eslint/role-utilities.generated.js +143 -0
  186. package/dist/eslint/role-utilities.generated.js.map +1 -0
  187. package/dist/eslint/role-utilities.js +43 -0
  188. package/dist/eslint/role-utilities.js.map +1 -0
  189. package/dist/feedback/feedback-menu.d.ts +2 -2
  190. package/dist/feedback/feedback-menu.js.map +1 -1
  191. package/dist/feedback/feedback-thread.d.ts +3 -8
  192. package/dist/feedback/feedback-thread.js +0 -2
  193. package/dist/feedback/feedback-thread.js.map +1 -1
  194. package/dist/hooks/use-dismiss.d.ts +16 -3
  195. package/dist/hooks/use-dismiss.js +14 -2
  196. package/dist/hooks/use-dismiss.js.map +1 -1
  197. package/dist/i18n/defaults.js +5 -1
  198. package/dist/i18n/defaults.js.map +1 -1
  199. package/dist/i18n/german.js +97 -1
  200. package/dist/i18n/german.js.map +1 -1
  201. package/dist/i18n/kit-labels.d.ts +29 -4
  202. package/dist/i18n/kit-labels.js +21 -1
  203. package/dist/i18n/kit-labels.js.map +1 -1
  204. package/dist/i18n/locales/en.js +104 -3
  205. package/dist/i18n/locales/en.js.map +3 -3
  206. package/dist/i18n/locales/es.js +95 -1
  207. package/dist/i18n/locales/es.js.map +1 -1
  208. package/dist/i18n/locales/fr.js +99 -3
  209. package/dist/i18n/locales/fr.js.map +1 -1
  210. package/dist/i18n/locales/hu.js +95 -1
  211. package/dist/i18n/locales/hu.js.map +1 -1
  212. package/dist/i18n/locales/it.js +99 -3
  213. package/dist/i18n/locales/it.js.map +1 -1
  214. package/dist/i18n/locales/zh.js +95 -1
  215. package/dist/i18n/locales/zh.js.map +1 -1
  216. package/dist/i18n/review.js +13 -0
  217. package/dist/i18n/review.js.map +1 -1
  218. package/dist/i18n/shared-labels.js +3 -1
  219. package/dist/i18n/shared-labels.js.map +1 -1
  220. package/dist/index.d.ts +23 -1
  221. package/dist/index.js +40 -2
  222. package/dist/index.js.map +1 -1
  223. package/dist/lib/device-settings.d.ts +72 -0
  224. package/dist/lib/device-settings.js +64 -0
  225. package/dist/lib/device-settings.js.map +1 -0
  226. package/dist/lib/plain-text.d.ts +11 -0
  227. package/dist/lib/plain-text.js +16 -0
  228. package/dist/lib/plain-text.js.map +1 -0
  229. package/dist/lib/refs.d.ts +13 -0
  230. package/dist/lib/refs.js +15 -0
  231. package/dist/lib/refs.js.map +1 -0
  232. package/dist/lib/safe-storage.d.ts +6 -0
  233. package/dist/lib/safe-storage.js +11 -0
  234. package/dist/lib/safe-storage.js.map +1 -1
  235. package/dist/notifications/notification-parts.d.ts +39 -0
  236. package/dist/notifications/notification-parts.js +47 -0
  237. package/dist/notifications/notification-parts.js.map +1 -0
  238. package/dist/notifications/notification-types-setting.d.ts +62 -0
  239. package/dist/notifications/notification-types-setting.js +192 -0
  240. package/dist/notifications/notification-types-setting.js.map +1 -0
  241. package/dist/notifications/notification-types.d.ts +75 -0
  242. package/dist/notifications/notification-types.js +2 -0
  243. package/dist/notifications/notification-types.js.map +1 -0
  244. package/dist/notifications/notifications-labels.d.ts +131 -0
  245. package/dist/notifications/notifications-labels.js +83 -0
  246. package/dist/notifications/notifications-labels.js.map +1 -0
  247. package/dist/notifications/push-device-setting.d.ts +37 -0
  248. package/dist/notifications/push-device-setting.js +164 -0
  249. package/dist/notifications/push-device-setting.js.map +1 -0
  250. package/dist/notifications/push-devices-setting.d.ts +44 -0
  251. package/dist/notifications/push-devices-setting.js +203 -0
  252. package/dist/notifications/push-devices-setting.js.map +1 -0
  253. package/dist/notifications/quiet-hours-setting.d.ts +47 -0
  254. package/dist/notifications/quiet-hours-setting.js +131 -0
  255. package/dist/notifications/quiet-hours-setting.js.map +1 -0
  256. package/dist/notifications/time-zone-select.d.ts +50 -0
  257. package/dist/notifications/time-zone-select.js +76 -0
  258. package/dist/notifications/time-zone-select.js.map +1 -0
  259. package/dist/notifications/unsubscribe-panel.d.ts +53 -0
  260. package/dist/notifications/unsubscribe-panel.js +139 -0
  261. package/dist/notifications/unsubscribe-panel.js.map +1 -0
  262. package/dist/notifications/use-push-device.d.ts +122 -0
  263. package/dist/notifications/use-push-device.js +230 -0
  264. package/dist/notifications/use-push-device.js.map +1 -0
  265. package/dist/rhf/fields.d.ts +36 -29
  266. package/dist/rhf/fields.js +51 -22
  267. package/dist/rhf/fields.js.map +1 -1
  268. package/dist/rhf/form-core.d.ts +5 -4
  269. package/dist/rhf/form-core.js.map +1 -1
  270. package/dist/rhf/form.d.ts +7 -36
  271. package/dist/rhf/form.js +1 -16
  272. package/dist/rhf/form.js.map +1 -1
  273. package/dist/rhf/line-items.d.ts +1 -1
  274. package/dist/rhf/line-items.js.map +1 -1
  275. package/dist/rhf/use-rhf-wizard-step.js.map +1 -1
  276. package/dist/rhf.js.map +1 -1
  277. package/dist/settings/device-reset-setting-labels.d.ts +3 -0
  278. package/dist/settings/device-reset-setting-labels.js +15 -0
  279. package/dist/settings/device-reset-setting-labels.js.map +1 -0
  280. package/dist/settings/device-reset-setting.d.ts +58 -0
  281. package/dist/settings/device-reset-setting.js +51 -0
  282. package/dist/settings/device-reset-setting.js.map +1 -0
  283. package/dist/shell/app-shell.js +5 -0
  284. package/dist/shell/app-shell.js.map +1 -1
  285. package/dist/shell/option-switcher-menu.d.ts +5 -17
  286. package/dist/shell/option-switcher-menu.js +1 -3
  287. package/dist/shell/option-switcher-menu.js.map +1 -1
  288. package/dist/shell/role-switcher.d.ts +1 -4
  289. package/dist/shell/role-switcher.js +2 -3
  290. package/dist/shell/role-switcher.js.map +1 -1
  291. package/dist/shell/topbar-action-menu.d.ts +7 -19
  292. package/dist/shell/topbar-action-menu.js +1 -3
  293. package/dist/shell/topbar-action-menu.js.map +1 -1
  294. package/dist/shell/topbar-controls.d.ts +3 -12
  295. package/dist/shell/topbar-controls.js +6 -9
  296. package/dist/shell/topbar-controls.js.map +1 -1
  297. package/dist/testing/index.d.ts +1 -1
  298. package/dist/testing/index.js +2 -0
  299. package/dist/testing/index.js.map +1 -1
  300. package/dist/testing/viewport.d.ts +25 -2
  301. package/dist/testing/viewport.js +61 -10
  302. package/dist/testing/viewport.js.map +1 -1
  303. package/dist/theme/contrast-tokens.d.ts +42 -4
  304. package/dist/theme/contrast-tokens.js +56 -9
  305. package/dist/theme/contrast-tokens.js.map +1 -1
  306. package/dist/theme/contrast.d.ts +4 -2
  307. package/dist/theme/contrast.js +13 -0
  308. package/dist/theme/contrast.js.map +1 -1
  309. package/dist/theme/palette-derive.d.ts +15 -1
  310. package/dist/theme/palette-derive.js +37 -8
  311. package/dist/theme/palette-derive.js.map +1 -1
  312. package/dist/theme/palette-presets.d.ts +2 -8
  313. package/dist/theme/palette-presets.js +5 -284
  314. package/dist/theme/palette-presets.js.map +1 -1
  315. package/dist/theme/palette-store.js +6 -0
  316. package/dist/theme/palette-store.js.map +1 -1
  317. package/dist/theme/text-size.js +6 -0
  318. package/dist/theme/text-size.js.map +1 -1
  319. package/dist/theme/theme-store.js +6 -0
  320. package/dist/theme/theme-store.js.map +1 -1
  321. package/dist/wizard/types.d.ts +0 -5
  322. package/dist/wizard/types.js +1 -5
  323. package/dist/wizard/types.js.map +1 -1
  324. package/package.json +9 -1
  325. package/src/admin/role-select.tsx +4 -1
  326. package/src/billing/billing-banner.tsx +5 -2
  327. package/src/billing/plan-limit-notice.tsx +5 -2
  328. package/src/chart.ts +5 -3
  329. package/src/components/amount-input.tsx +4 -7
  330. package/src/components/autocomplete.tsx +5 -2
  331. package/src/components/button-look.ts +15 -5
  332. package/src/components/calculator.tsx +2 -7
  333. package/src/components/chart-zoom.tsx +4 -47
  334. package/src/components/checkbox-group.tsx +22 -4
  335. package/src/components/chip-input.tsx +0 -7
  336. package/src/components/column-mapper.tsx +6 -2
  337. package/src/components/combobox.tsx +6 -3
  338. package/src/components/copy-button.tsx +5 -1
  339. package/src/components/country-select.tsx +6 -1
  340. package/src/components/currency-option-list.tsx +8 -42
  341. package/src/components/currency-select.tsx +12 -3
  342. package/src/components/danger-confirm.tsx +3 -3
  343. package/src/components/data-table-filter-popover.tsx +2 -1
  344. package/src/components/data-table-labels.ts +2 -84
  345. package/src/components/data-table-shared.tsx +55 -2
  346. package/src/components/data-table.tsx +29 -17
  347. package/src/components/date-field.tsx +2 -2
  348. package/src/components/date-picker.tsx +3 -0
  349. package/src/components/date-range-picker.tsx +3 -0
  350. package/src/components/dialog-frame.tsx +3 -1
  351. package/src/components/dropdown.tsx +42 -18
  352. package/src/components/entity-combobox.tsx +6 -3
  353. package/src/components/field-base.tsx +0 -11
  354. package/src/components/field-parts.tsx +112 -38
  355. package/src/components/field-strip.tsx +12 -27
  356. package/src/components/field-sync.tsx +0 -7
  357. package/src/components/field.tsx +32 -19
  358. package/src/components/full-bleed-dialog.tsx +4 -3
  359. package/src/components/help-popover.tsx +9 -7
  360. package/src/components/hover-menu.tsx +12 -16
  361. package/src/components/icon-picker.tsx +8 -3
  362. package/src/components/inline-entity-combobox.tsx +6 -3
  363. package/src/components/input.tsx +4 -2
  364. package/src/components/modal.tsx +20 -4
  365. package/src/components/month-picker.tsx +10 -3
  366. package/src/components/multi-entity-combobox.tsx +5 -2
  367. package/src/components/multi-select.tsx +19 -31
  368. package/src/components/number-input.tsx +5 -10
  369. package/src/components/numeric-field.ts +10 -2
  370. package/src/components/one-time-code-input.tsx +5 -3
  371. package/src/components/phone-input.tsx +4 -0
  372. package/src/components/popover.tsx +8 -4
  373. package/src/components/select.tsx +6 -3
  374. package/src/components/series-chart.tsx +1 -1
  375. package/src/components/server-wake.tsx +0 -6
  376. package/src/components/settings-fields.tsx +4 -2
  377. package/src/components/slider.tsx +10 -3
  378. package/src/components/stat-tile.tsx +11 -20
  379. package/src/components/swatch-picker.tsx +9 -4
  380. package/src/components/swipeable-row.tsx +15 -37
  381. package/src/components/text-link.tsx +3 -1
  382. package/src/components/textarea.tsx +11 -4
  383. package/src/components/toggle-group.tsx +21 -5
  384. package/src/components/tooltip.tsx +37 -6
  385. package/src/components/translation-review.tsx +25 -7
  386. package/src/components/use-table-state.ts +91 -10
  387. package/src/components/user-avatar.tsx +2 -2
  388. package/src/components/wizard-stepper.tsx +2 -6
  389. package/src/currencies.ts +70 -0
  390. package/src/demo/demo-banner.tsx +7 -2
  391. package/src/eslint/index.ts +161 -0
  392. package/src/eslint/role-utilities.generated.ts +146 -0
  393. package/src/eslint/role-utilities.ts +99 -0
  394. package/src/feedback/feedback-menu.tsx +2 -2
  395. package/src/feedback/feedback-thread.tsx +3 -8
  396. package/src/hooks/use-dismiss.ts +39 -4
  397. package/src/i18n/defaults.ts +4 -0
  398. package/src/i18n/german.ts +113 -0
  399. package/src/i18n/kit-labels.tsx +66 -6
  400. package/src/i18n/locales/en.ts +6 -0
  401. package/src/i18n/locales/es.ts +106 -0
  402. package/src/i18n/locales/fr.ts +109 -2
  403. package/src/i18n/locales/hu.ts +104 -0
  404. package/src/i18n/locales/it.ts +108 -2
  405. package/src/i18n/locales/zh.ts +96 -0
  406. package/src/i18n/review.ts +13 -0
  407. package/src/i18n/shared-labels.ts +2 -0
  408. package/src/index.ts +53 -1
  409. package/src/lib/device-settings.ts +146 -0
  410. package/src/lib/plain-text.ts +22 -0
  411. package/src/lib/refs.ts +22 -0
  412. package/src/lib/safe-storage.ts +16 -0
  413. package/src/notifications/notification-parts.tsx +83 -0
  414. package/src/notifications/notification-types-setting.tsx +309 -0
  415. package/src/notifications/notification-types.ts +80 -0
  416. package/src/notifications/notifications-labels.ts +238 -0
  417. package/src/notifications/push-device-setting.tsx +224 -0
  418. package/src/notifications/push-devices-setting.tsx +306 -0
  419. package/src/notifications/quiet-hours-setting.tsx +185 -0
  420. package/src/notifications/time-zone-select.tsx +126 -0
  421. package/src/notifications/unsubscribe-panel.tsx +203 -0
  422. package/src/notifications/use-push-device.ts +392 -0
  423. package/src/rhf/fields.tsx +87 -39
  424. package/src/rhf/form-core.tsx +5 -4
  425. package/src/rhf/form.tsx +7 -43
  426. package/src/rhf/line-items.tsx +1 -1
  427. package/src/rhf/use-rhf-wizard-step.ts +4 -4
  428. package/src/rhf.ts +3 -2
  429. package/src/settings/device-reset-setting-labels.ts +20 -0
  430. package/src/settings/device-reset-setting.tsx +119 -0
  431. package/src/shell/app-shell.tsx +8 -0
  432. package/src/shell/option-switcher-menu.tsx +5 -22
  433. package/src/shell/role-switcher.tsx +2 -6
  434. package/src/shell/topbar-action-menu.tsx +7 -24
  435. package/src/shell/topbar-controls.tsx +6 -18
  436. package/src/testing/index.ts +3 -1
  437. package/src/testing/viewport.ts +125 -19
  438. package/src/theme/contrast-tokens.ts +106 -12
  439. package/src/theme/contrast.ts +30 -4
  440. package/src/theme/palette-derive.ts +68 -7
  441. package/src/theme/palette-presets.ts +16 -299
  442. package/src/theme/palette-store.ts +12 -0
  443. package/src/theme/text-size.ts +8 -0
  444. package/src/theme/theme-store.ts +10 -0
  445. package/src/wizard/types.ts +0 -8
  446. package/tokens.css +38 -4
@@ -257,6 +257,8 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
257
257
  noResults: "Nincs találat",
258
258
  fieldValue: (field, value) => `${field}: ${value}`,
259
259
  opensInNewTab: "új lapon nyílik meg",
260
+ aboutField: (field) => `Súgó: ${field}`,
261
+ help: "Súgó",
260
262
  },
261
263
  dataTable: {
262
264
  columns: "Oszlopok",
@@ -1058,6 +1060,94 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
1058
1060
  rateLimited,
1059
1061
  failed: "Ez nem sikerült. Kérjük, próbálja újra.",
1060
1062
  },
1063
+ // 0.36.0 — docs/notifications-harmonization.md §4.2: the notification cards.
1064
+ notifications: {
1065
+ typesTitle: "Értesítést kérek ezekről",
1066
+ typesDescription: "Válassza ki, miről és hogyan kapjon értesítést.",
1067
+ byEmail: "E-mailben",
1068
+ emailUnverified: "Erősítse meg a címét, hogy megkapja ezeket.",
1069
+ digestCadence: "Gyakoriság",
1070
+ digestWeekly: "Hetente",
1071
+ digestMonthly: "Havonta",
1072
+ typesLoading: "Értesítési beállítások betöltése…",
1073
+ typesEmpty: "Ehhez a fiókhoz nincsenek értesítések.",
1074
+ quietTitle: "Csendes órák",
1075
+ quietDescription: (inbox) =>
1076
+ inbox
1077
+ ? "Ebben az idősávban nem érkeznek push-értesítések. A beérkezett értesítések közé így is bekerülnek."
1078
+ : "Ebben az idősávban nem érkeznek push-értesítések.",
1079
+ quietFrom: "Ettől",
1080
+ quietUntil: "Eddig",
1081
+ quietIncomplete:
1082
+ "Adjon meg kezdő és záró időpontot is. A csendes órák csak akkor lépnek életbe, ha mindkettő be van állítva.",
1083
+ timeZone: "Időzóna",
1084
+ deviceZone: (zone) => `Ez az eszköz ebben az időzónában van: ${zone}.`,
1085
+ useDeviceZone: "Ezt használom",
1086
+ regions: {
1087
+ Africa: "Afrika",
1088
+ America: "Amerika",
1089
+ Antarctica: "Antarktisz",
1090
+ Arctic: "Északi-sarkvidék",
1091
+ Asia: "Ázsia",
1092
+ Atlantic: "Atlanti-óceán",
1093
+ Australia: "Ausztrália",
1094
+ Europe: "Európa",
1095
+ Indian: "Indiai-óceán",
1096
+ Pacific: "Csendes-óceán",
1097
+ },
1098
+ pushTitle: "Push-értesítések",
1099
+ pushDescription: "Értesítések ezen az eszközön, akkor is, ha az alkalmazás be van zárva.",
1100
+ unsupported: "Ez a böngésző nem támogatja a push-értesítéseket.",
1101
+ iosInstall: (app) =>
1102
+ `iPhone-on vagy iPaden előbb adja hozzá a(z) ${app} alkalmazást a kezdőképernyőhöz: az iOS csak a telepített alkalmazásnak kézbesít értesítéseket.`,
1103
+ notConfigured: "A push-értesítések nincsenek beállítva ezen a szerveren.",
1104
+ blocked: "Az értesítések le vannak tiltva ennek a böngészőnek a beállításaiban.",
1105
+ on: "Az értesítések be vannak kapcsolva ezen az eszközön.",
1106
+ off: "Az értesítések ki vannak kapcsolva ezen az eszközön.",
1107
+ otherAccount:
1108
+ "Ez a böngésző egy másik fiók értesítéseit kapja. Kapcsolja be itt, hogy a bejelentkezett fiók értesítéseit kapja.",
1109
+ enable: "Értesítések bekapcsolása",
1110
+ disable: "Kikapcsolás",
1111
+ sendTest: "Teszt küldése",
1112
+ enableFailed: "Az értesítéseket nem sikerült bekapcsolni.",
1113
+ noServiceWorker: "Az alkalmazás service workere nem érhető el. Töltse újra az oldalt, és próbálja újra.",
1114
+ pushTimeout: "A böngésző push-szolgáltatása nem válaszolt. Ellenőrizze a kapcsolatot, és próbálja újra.",
1115
+ testSent: (count) => `Teszt elküldve ${n(count)} eszközre`,
1116
+ testNone: "Egyik eszköz sem fogadta a tesztet. Előbb kapcsolja be az értesítéseket ezen az eszközön.",
1117
+ testFailed: "A tesztértesítést nem sikerült elküldeni.",
1118
+ explainerTitle: "Bekapcsolja az értesítéseket?",
1119
+ explainerBody: (app) =>
1120
+ `A(z) ${app} csak arról küld értesítést, amit Ön kiválaszt, és bármikor kikapcsolhatja őket.`,
1121
+ explainerHint: "Ezután a böngésző engedélyt kér.",
1122
+ explainerContinue: "Tovább",
1123
+ devicesTitle: "Értesítési eszközök",
1124
+ devicesDescription:
1125
+ "Minden eszköz, amely push-értesítéseket kap a fiókjához. Távolítsa el azokat, amelyeket már nem használ.",
1126
+ devicesLoading: "Eszközök betöltése…",
1127
+ devicesEmpty: "Még egy eszköz sem kap értesítéseket.",
1128
+ unknownDevice: "Ismeretlen eszköz",
1129
+ thisDevice: "Ez az eszköz",
1130
+ added: (date) => `Hozzáadva: ${date}`,
1131
+ lastDelivery: (date) => `Utolsó kézbesítés: ${date}`,
1132
+ noDelivery: "Még nem volt kézbesítés",
1133
+ failures: (count) => `${n(count)} sikertelen kézbesítés egymás után`,
1134
+ remove: "Eltávolítás",
1135
+ // Starts with `remove`, the button's visible text, for voice control.
1136
+ removeItem: (device) => `Eltávolítás: ${device}`,
1137
+ removePrompt: "Leállítja az értesítések küldését erre az eszközre?",
1138
+ unsubscribeTitle: "E-mail-értesítések",
1139
+ unsubscribeAbout: (type) => `E-maileket kap erről: ${type}.`,
1140
+ unsubscribeGeneric: "Értesítő e-maileket kap.",
1141
+ stopThese: "Leiratkozás ezekről az e-mailekről",
1142
+ stopAll: (app) => `Leiratkozás a(z) ${app} összes értesítő e-mailjéről`,
1143
+ stoppedThese: "Kész. Ezeket az e-maileket többé nem kapja meg.",
1144
+ stoppedAll: (app) => `Kész. A(z) ${app} értesítő e-mailjeit többé nem kapja meg.`,
1145
+ accountMail: "A fiókjával kapcsolatos e-maileket továbbra is megkapja.",
1146
+ turnBackOn: "A beállításokban bármikor újra bekapcsolhatja őket.",
1147
+ openSettings: "Beállítások megnyitása",
1148
+ invalidLink: "Ez a link már nem működik. Az e-maileket a beállításokban is kikapcsolhatja.",
1149
+ failed: "Ez nem sikerült. Kérjük, próbálja újra.",
1150
+ },
1061
1151
  sessions: {
1062
1152
  title: "Munkamenetek",
1063
1153
  description:
@@ -1592,6 +1682,20 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
1592
1682
  contrastModes: { system: "Rendszer", standard: "Normál", more: "Fokozott" },
1593
1683
  saveFailed: "Nem sikerült menteni a fiókjába. Ezen az eszközön ettől még érvényes.",
1594
1684
  },
1685
+ // 0.36.0 — docs/settings-harmonization.md §11.3: resetting this device's settings, the
1686
+ // last card of "Megjelenés". "Ön", as the rest of the catalogue.
1687
+ deviceReset: {
1688
+ title: "Az eszköz visszaállítása",
1689
+ description:
1690
+ "Visszaállítja az alapértékekre ennek az eszköznek a megjelenését, és azt, ahogyan a táblázatai és panelei maradtak. Fiókját, adatait és bejelentkezését ez nem érinti.",
1691
+ action: "Az eszköz beállításainak visszaállítása",
1692
+ confirmTitle: "Visszaállítja ennek az eszköznek a beállításait?",
1693
+ confirmBody:
1694
+ "A téma, a színek, a szövegméret, a kontraszt és a nyelv itt visszaáll az alapértékre, a táblázatok és a panelek pedig úgy nyílnak meg, mint először. Ha a fiókjában van beállított nyelv, szövegméret vagy kontraszt, ez az eszköz ismét azt követi. Fiókja és többi eszköze változatlan marad.",
1695
+ confirmAction: "Visszaállítás",
1696
+ done: "Az eszköz beállításai visszaálltak az alapértékekre.",
1697
+ keywords: "visszaállítás alapértelmezett alapérték eszköz helyreállítás megjelenés táblázatok elrendezés",
1698
+ },
1595
1699
  rowActions: {
1596
1700
  actions: "Műveletek",
1597
1701
  actionsFor: (name) => `${name} – műveletek`,
@@ -261,6 +261,8 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
261
261
  noResults: "Nessun risultato",
262
262
  fieldValue: (field, value) => `${field}: ${value}`,
263
263
  opensInNewTab: "si apre in una nuova scheda",
264
+ aboutField: (field) => `Informazioni su «${field}»`,
265
+ help: "Aiuto",
264
266
  },
265
267
  dataTable: {
266
268
  columns: "Colonne",
@@ -762,10 +764,11 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
762
764
  submit: "Continua",
763
765
  cancel: "Annulla",
764
766
  },
767
+ // 0.35: keksdose's reviewed Italian (its `boot.slow` / `boot.waking`), which is canon.
765
768
  serverWake: {
766
- slow: "Caricamento in corso: ci vuole più del solito.",
769
+ slow: "Sta ancora caricando: ci vuole più del solito.",
767
770
  waking: (appName) =>
768
- `Il server va in sospensione quando nessuno usa ${appName ?? "l’app"}, quindi la prima richiesta dopo una pausa deve riavviarlo. Può volerci un momento: non si perde nulla, la pagina si completa da sola.`,
771
+ `Il server si addormenta quando nessuno usa ${appName ?? "l’app"}, perciò la prima richiesta dopo una pausa deve prima riavviarlo. Può volerci un momento: non va perso nulla, la pagina si riempie da sola.`,
769
772
  },
770
773
  // 0.28.0 — docs/legal-harmonization.md §4.3/§4.4: keksdose's reviewed Italian, and
771
774
  // Kurvenschmiede's for the browser section and the beta notice; formal, "Lei" and
@@ -1057,6 +1060,95 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
1057
1060
  rateLimited,
1058
1061
  failed: "Non ha funzionato. Riprovi.",
1059
1062
  },
1063
+ // 0.36.0 — docs/notifications-harmonization.md §4.2: the notification cards. The push
1064
+ // and device words follow keksdose's reviewed Italian.
1065
+ notifications: {
1066
+ typesTitle: "Avvisami per",
1067
+ typesDescription: "Scelga di cosa essere avvisato, e come.",
1068
+ byEmail: "Per e-mail",
1069
+ emailUnverified: "Confermi il Suo indirizzo per riceverle.",
1070
+ digestCadence: "Frequenza",
1071
+ digestWeekly: "Settimanale",
1072
+ digestMonthly: "Mensile",
1073
+ typesLoading: "Caricamento delle impostazioni di notifica…",
1074
+ typesEmpty: "Non ci sono notifiche per questo account.",
1075
+ quietTitle: "Ore di silenzio",
1076
+ quietDescription: (inbox) =>
1077
+ inbox
1078
+ ? "Nessuna notifica push in questa fascia oraria. Arrivano comunque nella Sua casella."
1079
+ : "Nessuna notifica push in questa fascia oraria.",
1080
+ quietFrom: "Dalle",
1081
+ quietUntil: "Alle",
1082
+ quietIncomplete:
1083
+ "Imposti sia l’ora di inizio sia quella di fine. Le ore di silenzio valgono solo quando sono impostate entrambe.",
1084
+ timeZone: "Fuso orario",
1085
+ deviceZone: (zone) => `Questo dispositivo è nel fuso ${zone}.`,
1086
+ useDeviceZone: "Usa questo",
1087
+ regions: {
1088
+ Africa: "Africa",
1089
+ America: "Americhe",
1090
+ Antarctica: "Antartide",
1091
+ Arctic: "Artide",
1092
+ Asia: "Asia",
1093
+ Atlantic: "Atlantico",
1094
+ Australia: "Australia",
1095
+ Europe: "Europa",
1096
+ Indian: "Oceano Indiano",
1097
+ Pacific: "Pacifico",
1098
+ },
1099
+ pushTitle: "Notifiche push",
1100
+ pushDescription: "Notifiche su questo dispositivo, anche quando l’app è chiusa.",
1101
+ unsupported: "Questo browser non supporta le notifiche push.",
1102
+ iosInstall: (app) =>
1103
+ `Su iPhone o iPad aggiunga prima ${app} alla schermata Home: iOS recapita le notifiche solo all’app installata.`,
1104
+ notConfigured: "Le notifiche push non sono configurate su questo server.",
1105
+ blocked: "Le notifiche sono bloccate nelle impostazioni di questo browser.",
1106
+ on: "Le notifiche sono attive per questo dispositivo.",
1107
+ off: "Le notifiche sono disattivate per questo dispositivo.",
1108
+ otherAccount:
1109
+ "Questo browser riceve le notifiche di un altro account. Le attivi qui per riceverle sull’account con cui ha effettuato l’accesso.",
1110
+ enable: "Attiva notifiche",
1111
+ disable: "Disattiva",
1112
+ sendTest: "Invia un test",
1113
+ enableFailed: "Impossibile attivare le notifiche.",
1114
+ noServiceWorker: "Impossibile raggiungere il service worker dell’app. Ricarichi la pagina e riprovi.",
1115
+ pushTimeout: "Il servizio push del browser non ha risposto. Controlli la connessione e riprovi.",
1116
+ testSent: (count) => `Test inviato a ${n(count)} ${plural(count, "dispositivo", "dispositivi")}`,
1117
+ testNone: "Nessun dispositivo ha accettato il test. Attivi prima le notifiche per questo dispositivo.",
1118
+ testFailed: "Impossibile inviare la notifica di prova.",
1119
+ explainerTitle: "Attivare le notifiche?",
1120
+ explainerBody: (app) =>
1121
+ `${app} invia notifiche solo per ciò che sceglie Lei, e può disattivarle in qualsiasi momento.`,
1122
+ explainerHint: "Il browser Le chiederà poi il permesso.",
1123
+ explainerContinue: "Continua",
1124
+ devicesTitle: "Dispositivi di notifica",
1125
+ devicesDescription:
1126
+ "Tutti i dispositivi che ricevono notifiche push per il Suo account. Rimuova quelli che non usa più.",
1127
+ devicesLoading: "Caricamento dei dispositivi…",
1128
+ devicesEmpty: "Nessun dispositivo riceve ancora notifiche.",
1129
+ unknownDevice: "Dispositivo sconosciuto",
1130
+ thisDevice: "Questo dispositivo",
1131
+ added: (date) => `Aggiunto il ${date}`,
1132
+ lastDelivery: (date) => `Ultimo recapito il ${date}`,
1133
+ noDelivery: "Ancora nessun recapito",
1134
+ failures: (count) => `${n(count)} ${plural(count, "recapito fallito", "recapiti falliti")} di fila`,
1135
+ remove: "Rimuovi",
1136
+ // Starts with `remove`, the button's visible text, for voice control.
1137
+ removeItem: (device) => `Rimuovi ${device}`,
1138
+ removePrompt: "Smettere di inviare notifiche a questo dispositivo?",
1139
+ unsubscribeTitle: "Notifiche via e-mail",
1140
+ unsubscribeAbout: (type) => `Riceve e-mail su: ${type}.`,
1141
+ unsubscribeGeneric: "Riceve e-mail di notifica.",
1142
+ stopThese: "Non ricevere più queste e-mail",
1143
+ stopAll: (app) => `Non ricevere più e-mail di notifica da ${app}`,
1144
+ stoppedThese: "Fatto. Non riceverà più queste e-mail.",
1145
+ stoppedAll: (app) => `Fatto. Non riceverà più e-mail di notifica da ${app}.`,
1146
+ accountMail: "Le e-mail sul Suo account continuano ad arrivare.",
1147
+ turnBackOn: "Può riattivarle in qualsiasi momento nelle impostazioni.",
1148
+ openSettings: "Apri le impostazioni",
1149
+ invalidLink: "Questo link non funziona più. Può disattivare le e-mail nelle impostazioni.",
1150
+ failed: "Non ha funzionato. Riprovi.",
1151
+ },
1060
1152
  sessions: {
1061
1153
  title: "Sessioni",
1062
1154
  description:
@@ -1602,6 +1694,20 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
1602
1694
  contrastModes: { system: "Sistema", standard: "Standard", more: "Aumentato" },
1603
1695
  saveFailed: "Non è stato possibile salvarlo nel Suo account. Su questo dispositivo vale comunque.",
1604
1696
  },
1697
+ // 0.36.0 — docs/settings-harmonization.md §11.3: resetting this device's settings, the
1698
+ // last card of "Aspetto". "Lei", capitalised as the rest of the catalogue.
1699
+ deviceReset: {
1700
+ title: "Ripristina questo dispositivo",
1701
+ description:
1702
+ "Riporta ai valori predefiniti l’aspetto di questo dispositivo e il modo in cui sono state lasciate le sue tabelle e i suoi pannelli. Il Suo account, i Suoi dati e il Suo accesso restano invariati.",
1703
+ action: "Ripristina le impostazioni di questo dispositivo",
1704
+ confirmTitle: "Ripristinare le impostazioni di questo dispositivo?",
1705
+ confirmBody:
1706
+ "Tema, colori, dimensione del testo, contrasto e lingua tornano qui ai valori predefiniti, e tabelle e pannelli si aprono come la prima volta. Se il Suo account ha una lingua, una dimensione del testo o un contrasto, questo dispositivo torna a seguirli. Il Suo account e i Suoi altri dispositivi restano come sono.",
1707
+ confirmAction: "Ripristina",
1708
+ done: "Le impostazioni di questo dispositivo sono tornate ai valori predefiniti.",
1709
+ keywords: "ripristina predefiniti dispositivo reimposta aspetto tabelle layout",
1710
+ },
1605
1711
  rowActions: {
1606
1712
  actions: "Azioni",
1607
1713
  actionsFor: (name) => `Azioni per ${name}`,
@@ -249,6 +249,8 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
249
249
  // Full-width colon, no space after it.
250
250
  fieldValue: (field, value) => `${field}:${value}`,
251
251
  opensInNewTab: "在新标签页中打开",
252
+ aboutField: (field) => `关于“${field}”`,
253
+ help: "帮助",
252
254
  },
253
255
  dataTable: {
254
256
  columns: "列",
@@ -1018,6 +1020,87 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
1018
1020
  rateLimited,
1019
1021
  failed: "操作未成功,请重试。",
1020
1022
  },
1023
+ // 0.36.0 — docs/notifications-harmonization.md §4.2: the notification cards.
1024
+ notifications: {
1025
+ typesTitle: "通知我以下内容",
1026
+ typesDescription: "选择要接收哪些通知,以及接收方式。",
1027
+ byEmail: "通过电子邮件",
1028
+ emailUnverified: "请先确认您的邮箱地址,才能收到这些邮件。",
1029
+ digestCadence: "频率",
1030
+ digestWeekly: "每周",
1031
+ digestMonthly: "每月",
1032
+ typesLoading: "正在加载通知设置…",
1033
+ typesEmpty: "此账户没有可用的通知。",
1034
+ quietTitle: "免打扰时段",
1035
+ quietDescription: (inbox) =>
1036
+ inbox ? "此时段内不发送推送通知。通知仍会进入您的收件箱。" : "此时段内不发送推送通知。",
1037
+ quietFrom: "从",
1038
+ quietUntil: "到",
1039
+ quietIncomplete: "请同时设置开始和结束时间。两者都设置后,免打扰时段才会生效。",
1040
+ timeZone: "时区",
1041
+ deviceZone: (zone) => `此设备位于 ${zone} 时区。`,
1042
+ useDeviceZone: "使用此时区",
1043
+ regions: {
1044
+ Africa: "非洲",
1045
+ America: "美洲",
1046
+ Antarctica: "南极洲",
1047
+ Arctic: "北极",
1048
+ Asia: "亚洲",
1049
+ Atlantic: "大西洋",
1050
+ Australia: "澳大利亚",
1051
+ Europe: "欧洲",
1052
+ Indian: "印度洋",
1053
+ Pacific: "太平洋",
1054
+ },
1055
+ pushTitle: "推送通知",
1056
+ pushDescription: "在此设备上接收通知,即使应用已关闭。",
1057
+ unsupported: "此浏览器不支持推送通知。",
1058
+ iosInstall: (app) => `在 iPhone 或 iPad 上,请先将 ${app} 添加到主屏幕:iOS 只向已安装的应用发送通知。`,
1059
+ notConfigured: "此服务器尚未设置推送通知。",
1060
+ blocked: "此浏览器的设置已阻止通知。",
1061
+ on: "此设备的通知已开启。",
1062
+ off: "此设备的通知已关闭。",
1063
+ otherAccount: "此浏览器正在接收另一个账户的通知。在此开启,即可接收您当前登录账户的通知。",
1064
+ enable: "开启通知",
1065
+ disable: "关闭",
1066
+ sendTest: "发送测试",
1067
+ enableFailed: "无法开启通知。",
1068
+ noServiceWorker: "无法连接应用的 Service Worker。请重新加载页面后重试。",
1069
+ pushTimeout: "浏览器的推送服务没有响应。请检查网络连接后重试。",
1070
+ testSent: (count) => `测试已发送到 ${n(count)} 台设备`,
1071
+ testNone: "没有设备接收此测试。请先为此设备开启通知。",
1072
+ testFailed: "无法发送测试通知。",
1073
+ explainerTitle: "开启通知?",
1074
+ explainerBody: (app) => `${app} 只会就您选择的内容发送通知,您可以随时关闭。`,
1075
+ explainerHint: "接下来浏览器会请求您的许可。",
1076
+ explainerContinue: "继续",
1077
+ devicesTitle: "通知设备",
1078
+ devicesDescription: "为您的账户接收推送通知的所有设备。请移除不再使用的设备。",
1079
+ devicesLoading: "正在加载设备…",
1080
+ devicesEmpty: "还没有设备接收通知。",
1081
+ unknownDevice: "未知设备",
1082
+ thisDevice: "此设备",
1083
+ added: (date) => `添加于 ${date}`,
1084
+ lastDelivery: (date) => `上次送达:${date}`,
1085
+ noDelivery: "尚未送达",
1086
+ failures: (count) => `连续 ${n(count)} 次送达失败`,
1087
+ remove: "移除",
1088
+ // Starts with `remove`, the button's visible text, for voice control.
1089
+ removeItem: (device) => `移除:${device}`,
1090
+ removePrompt: "停止向此设备发送通知?",
1091
+ unsubscribeTitle: "电子邮件通知",
1092
+ unsubscribeAbout: (type) => `您会收到有关以下内容的邮件:${type}。`,
1093
+ unsubscribeGeneric: "您会收到通知邮件。",
1094
+ stopThese: "停止接收这些邮件",
1095
+ stopAll: (app) => `停止接收来自 ${app} 的所有通知邮件`,
1096
+ stoppedThese: "已完成。您将不再收到这些邮件。",
1097
+ stoppedAll: (app) => `已完成。您将不再收到来自 ${app} 的通知邮件。`,
1098
+ accountMail: "有关您账户的邮件仍会照常发送。",
1099
+ turnBackOn: "您可以随时在“设置”中重新开启。",
1100
+ openSettings: "打开设置",
1101
+ invalidLink: "此链接已失效。您可以改为在“设置”中关闭这些邮件。",
1102
+ failed: "操作未成功,请重试。",
1103
+ },
1021
1104
  sessions: {
1022
1105
  title: "会话",
1023
1106
  description: "在不再使用或不信任的设备上登录过?请在所有设备上退出登录。",
@@ -1521,6 +1604,19 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
1521
1604
  contrastModes: { system: "跟随系统", standard: "标准", more: "增强" },
1522
1605
  saveFailed: "无法保存到您的账户。此设备上仍然生效。",
1523
1606
  },
1607
+ // 0.36.0 — docs/settings-harmonization.md §11.3: resetting this device's settings, the
1608
+ // last card of "外观".
1609
+ deviceReset: {
1610
+ title: "重置此设备",
1611
+ description: "将此设备的外观,以及表格和面板上次留下的状态,恢复为默认值。您的账户、数据和登录状态不受影响。",
1612
+ action: "重置此设备的设置",
1613
+ confirmTitle: "要重置此设备的设置吗?",
1614
+ confirmBody:
1615
+ "主题、颜色、文字大小、对比度和语言将在此设备上恢复为默认值,表格和面板会像第一次打开时那样显示。如果您的账户设置了语言、文字大小或对比度,此设备会重新沿用这些设置。您的账户和其他设备保持不变。",
1616
+ confirmAction: "重置",
1617
+ done: "此设备的设置已恢复为默认值。",
1618
+ keywords: "重置 默认 设备 恢复 外观 表格 布局",
1619
+ },
1524
1620
  rowActions: {
1525
1621
  actions: "操作",
1526
1622
  actionsFor: (name) => `${name} 的操作`,
@@ -119,6 +119,7 @@ const operatorSample = [[LEGAL_OPERATOR_SAMPLE]] as const;
119
119
  */
120
120
  export const KIT_LABEL_SAMPLES: Readonly<Record<string, readonly (readonly unknown[])[]>> = {
121
121
  "common.fieldValue": [["{{field}}", "{{value}}"]],
122
+ "common.aboutField": [["{{field}}"]],
122
123
  "dataTable.filterResults": [
123
124
  [1, 1],
124
125
  [3, 12],
@@ -324,6 +325,18 @@ export const KIT_LABEL_SAMPLES: Readonly<Record<string, readonly (readonly unkno
324
325
  "sessions.lastActive": [["{{when}}"]],
325
326
  "sessions.ip": [["{{address}}"]],
326
327
  "sessions.revokeItem": [["{{device}}"]],
328
+ "notifications.quietDescription": [[false], [true]],
329
+ "notifications.deviceZone": [["{{zone}}"]],
330
+ "notifications.iosInstall": [["{{app}}"]],
331
+ "notifications.testSent": one,
332
+ "notifications.explainerBody": [["{{app}}"]],
333
+ "notifications.added": [["{{date}}"]],
334
+ "notifications.lastDelivery": [["{{date}}"]],
335
+ "notifications.failures": one,
336
+ "notifications.removeItem": [["{{device}}"]],
337
+ "notifications.unsubscribeAbout": [["{{type}}"]],
338
+ "notifications.stopAll": [["{{app}}"]],
339
+ "notifications.stoppedAll": [["{{app}}"]],
327
340
  "deleteAccount.afterDays": [[1], [30]],
328
341
  "deleteAccount.handOver": [[1], [3]],
329
342
  "deleteAccount.lastAdminOf": [["{{companies}}"]],
@@ -37,6 +37,8 @@ export const DEFAULT_COMMON_LABELS: CommonLabels = {
37
37
  fieldValue: (field, value) => `${field}: ${value}`,
38
38
  dismiss: "Dismiss",
39
39
  opensInNewTab: "opens in a new tab",
40
+ aboutField: (field) => `About ${field}`,
41
+ help: "Help",
40
42
  };
41
43
 
42
44
  export const DEFAULT_DATE_PICKER_LABELS: DatePickerLabels = {
package/src/index.ts CHANGED
@@ -245,7 +245,6 @@ export {
245
245
  FloatingField,
246
246
  Label,
247
247
  DEFAULT_PASSWORD_REVEAL_LABELS,
248
- resolvePasswordRevealLabels,
249
248
  DEFAULT_CHARACTER_COUNT_LABELS,
250
249
  type FieldChevronProps,
251
250
  type FloatingFieldProps,
@@ -291,6 +290,9 @@ export * from "./components/calculator";
291
290
  export * from "./components/numpad-sheet";
292
291
  export * from "./components/number-input";
293
292
  export * from "./components/currency-select";
293
+ // 0.35: each currency's flag-icons country. `CURRENCIES` and it are also the pure-data
294
+ // entry "@eifi1/ui-kit/currencies", which imports nothing, for an app's build in Node.
295
+ export { CURRENCY_COUNTRIES } from "./currencies";
294
296
  export * from "./components/amount-input";
295
297
  export * from "./components/money-field";
296
298
  export * from "./components/combobox";
@@ -854,6 +856,13 @@ export type { PlanLimitToastOptions } from "./billing/plan-limit-toast";
854
856
  // come with `./shell` above (also `@eifi1/ui-kit/shell`).
855
857
  export { DEFAULT_SETTINGS_LABELS, useSettingsLabels } from "./settings/settings-labels";
856
858
  export type { SettingsLabels, SettingsGroupLabels, SettingsCoreGroup } from "./settings/settings-labels";
859
+ // 0.36.0 (§11): "Reset this device's settings" — the registry the kit's stores, provider
860
+ // and shell join on their own and an app adds its own device keys to, and the card, the
861
+ // appearance group's last.
862
+ export { registerDeviceSetting, deviceSettings, resetDeviceSettings } from "./lib/device-settings";
863
+ export type { DeviceSetting, DeviceSettingKind } from "./lib/device-settings";
864
+ export { DeviceResetSetting, DEVICE_RESET_ANCHOR, DEFAULT_DEVICE_RESET_LABELS } from "./settings/device-reset-setting";
865
+ export type { DeviceResetSettingProps, DeviceResetLabels } from "./settings/device-reset-setting";
857
866
  // The language follows the account (§6.2); since 0.32 so do the text size and the
858
867
  // contrast (useAccountAppearance below, docs/text-size-harmonization.md §6).
859
868
  export { useAccountLanguage, resolveAccountLanguage, matchOfferedLanguage } from "./settings/use-account-language";
@@ -875,6 +884,49 @@ export type {
875
884
  AccountAppearance,
876
885
  } from "./settings/use-account-appearance";
877
886
 
887
+ // ── notifications ────────────────────────────────────────────────────────────
888
+ // 0.36.0 (docs/notifications-harmonization.md §4.2): the notification cards — the types
889
+ // the server answers (the kit keeps no list of its own), quiet hours with the zone picker,
890
+ // this device's push on its hook, the device list — and the signed-out unsubscribe page.
891
+ // Each card takes the app's request functions; the kit makes no request itself.
892
+ export { DEFAULT_NOTIFICATIONS_LABELS } from "./notifications/notifications-labels";
893
+ export type { NotificationsLabels, NotificationRegionLabels } from "./notifications/notifications-labels";
894
+ export type {
895
+ DigestCadence,
896
+ NotificationSwitches,
897
+ NotificationTypesValue,
898
+ NotificationTypeEntry,
899
+ NotificationTypeGroup,
900
+ NotificationSettingsPatch,
901
+ PushDeviceItem,
902
+ } from "./notifications/notification-types";
903
+ export { NotificationTypesSetting } from "./notifications/notification-types-setting";
904
+ export type { NotificationTypesSettingProps } from "./notifications/notification-types-setting";
905
+ export { QuietHoursSetting } from "./notifications/quiet-hours-setting";
906
+ export type { QuietHoursSettingProps } from "./notifications/quiet-hours-setting";
907
+ export { TimeZoneSelect, timeZoneOptions, deviceTimeZone } from "./notifications/time-zone-select";
908
+ export type { TimeZoneSelectProps } from "./notifications/time-zone-select";
909
+ export {
910
+ usePushDevice,
911
+ PUSH_SUBSCRIPTION_CHANGED,
912
+ notifyPushSubscriptionChanged,
913
+ pushSupported,
914
+ PushDeviceError,
915
+ } from "./notifications/use-push-device";
916
+ export type {
917
+ PushDevice,
918
+ UsePushDeviceOptions,
919
+ PushSubscriptionInput,
920
+ PushPermission,
921
+ PushDeviceErrorCode,
922
+ } from "./notifications/use-push-device";
923
+ export { PushDeviceSetting } from "./notifications/push-device-setting";
924
+ export type { PushDeviceSettingProps, PushDeviceAction } from "./notifications/push-device-setting";
925
+ export { PushDevicesSetting, describeUserAgent } from "./notifications/push-devices-setting";
926
+ export type { PushDevicesSettingProps } from "./notifications/push-devices-setting";
927
+ export { UnsubscribePanel, unsubscribeTokenType } from "./notifications/unsubscribe-panel";
928
+ export type { UnsubscribePanelProps } from "./notifications/unsubscribe-panel";
929
+
878
930
  // ── landing ──────────────────────────────────────────────────────────────────
879
931
  // 0.31.0 (docs/landing-demo-harmonization.md): the public landing page. Its router-aware parts — the header and the resume (RootEntry,
880
932
  // RedirectIfAuthed, the last-visited page) — come with `./shell` above.
@@ -0,0 +1,146 @@
1
+ import { readSessionStored, readStored, removeStored, storedKeys, writeSessionStored } from "./safe-storage";
2
+
3
+ /**
4
+ * What this device keeps of how it shows the app, and the one action that puts it all
5
+ * back: "Reset this device's settings" (docs/settings-harmonization.md §11).
6
+ *
7
+ * A registry, because no one part knows every key. The kit's own stores and components
8
+ * join it themselves — the theme, palette, text-size and contrast stores when they are
9
+ * created, `UiKitProvider` (the prefix its tables keep their views under) and `AppShell`
10
+ * (the sidebar's folded state) while they are mounted — and an app adds its own keys
11
+ * beside the store or accessor that owns each (keksdose's date format, kastlan's
12
+ * language, Kurvenschmiede's curve channels). {@link resetDeviceSettings} then clears
13
+ * exactly what joined, and nothing else: the sign-in, the session, what waits to be sent
14
+ * and the account never join (§11.2 decision 2), so a key nobody registered survives.
15
+ *
16
+ * No React and no router: a store joins at module scope, when it is created. Here in
17
+ * `src/lib` beside `safe-storage.ts`, which the stores and the shell already import, so
18
+ * `src/theme` and `src/shell` do not import `src/settings`. One module instance, one
19
+ * module-level list.
20
+ */
21
+
22
+ /** What a reset of this device's settings clears (§11.2 decision 1): how the app looks
23
+ * here, and how its tables and panels were left. An app's own list may add a third kind
24
+ * of its own for what never goes (Kurvenschmiede's "never"). */
25
+ export type DeviceSettingKind = "appearance" | "view";
26
+
27
+ export interface DeviceSetting {
28
+ /** The storage key; with `prefix`, every key that starts with it. */
29
+ key: string;
30
+ /** `true`: `key` is a prefix (a table's views, keksdose's display currency per budget).
31
+ * It matches by `startsWith`: `budget.displayCurrency.` does not take the legacy
32
+ * `budget.displayCurrency`. */
33
+ prefix?: boolean;
34
+ /** Default `"local"`. */
35
+ storage?: "local" | "session";
36
+ kind: DeviceSettingKind;
37
+ /**
38
+ * Puts the live value back to its default through the store's own setter, the one its
39
+ * control calls, so whatever that setter also does still happens — never
40
+ * `setState(getInitialState())`, which skips it. REQUIRED for anything held in memory:
41
+ * every persisted zustand store (removing its key alone, it writes its value back on its
42
+ * next change), a mounted component's state. With `reset` the key is left to it (a
43
+ * persisted store writes its default itself); without, the key, or every key under the
44
+ * prefix, is removed — for what is read where it is next used (a table at its mount, a
45
+ * plain accessor).
46
+ */
47
+ reset?: () => void;
48
+ }
49
+
50
+ /** Whoever joined one key, in join order; the last one's entry is the key's entry. */
51
+ type Holders = { entry: DeviceSetting }[];
52
+
53
+ /** One slot per key and storage area, in the order each was first joined. */
54
+ const slots = new Map<string, Holders>();
55
+
56
+ const areaOf = (entry: DeviceSetting): "local" | "session" => (entry.storage === "session" ? "session" : "local");
57
+ const slotOf = (entry: DeviceSetting) => `${areaOf(entry)}:${entry.key}`;
58
+
59
+ /**
60
+ * Join the registry; answers the leave function. A store joins once, at creation, and
61
+ * never leaves; a component joins while mounted and leaves in its effect's cleanup.
62
+ *
63
+ * **One entry per key** (and storage area): joining a key again replaces its entry and
64
+ * adds a holder, and a leave drops its holder — the entry goes with the last one, and
65
+ * until then the latest remaining holder's entry is the key's. So a module evaluated twice
66
+ * (a test, a hot reload) does not reset twice, and two nested providers with one prefix
67
+ * keep their entry until the outer one unmounts.
68
+ */
69
+ export function registerDeviceSetting(entry: DeviceSetting): () => void {
70
+ const slot = slotOf(entry);
71
+ const holder = { entry: { ...entry } };
72
+ const holders = slots.get(slot);
73
+ if (holders) holders.push(holder);
74
+ else slots.set(slot, [holder]);
75
+ let left = false;
76
+ return () => {
77
+ if (left) return;
78
+ left = true;
79
+ // A holder that has not left is in its slot: only its own leave takes it out, and a
80
+ // slot goes only once it is empty.
81
+ const current = slots.get(slot) as Holders;
82
+ current.splice(current.indexOf(holder), 1);
83
+ if (current.length === 0) slots.delete(slot);
84
+ };
85
+ }
86
+
87
+ /** Every entry, in join order: for an app's own test (Kurvenschmiede holds it to its
88
+ * `STORAGE` list) or its privacy page. */
89
+ export function deviceSettings(): readonly DeviceSetting[] {
90
+ return [...slots.values()].map((holders) => holders[holders.length - 1].entry);
91
+ }
92
+
93
+ /** Is this a development build? `import.meta.env` is a Vite injection, absent under Node. */
94
+ function devBuild(): boolean {
95
+ return Boolean(import.meta.env?.DEV);
96
+ }
97
+
98
+ /** The keys an entry covers now: a prefix's keys found under it, else its own key. */
99
+ function keysOf(entry: DeviceSetting): string[] {
100
+ return entry.prefix ? storedKeys(entry.key, areaOf(entry)) : [entry.key];
101
+ }
102
+
103
+ /** Remove what `entry` covers; answers the keys that were there. */
104
+ function removeEntry(entry: DeviceSetting): string[] {
105
+ const session = areaOf(entry) === "session";
106
+ const present = keysOf(entry).filter((key) => (session ? readSessionStored(key) : readStored(key)) !== null);
107
+ for (const key of present) {
108
+ if (session) writeSessionStored(key, null);
109
+ else removeStored(key);
110
+ }
111
+ return present;
112
+ }
113
+
114
+ /**
115
+ * Reset every entry, at once; answers the keys it reset or removed, prefixes expanded.
116
+ *
117
+ * Synchronous, in two passes: first every `reset`, in join order, so each live store puts
118
+ * its value back (and writes its default); then the keys of the entries without one. A
119
+ * `reset` that throws is caught (`console.error` in development), its key is removed
120
+ * instead, and the rest still run. It never reloads, navigates or sends a request, and
121
+ * never touches a key nobody registered. Where the browser refuses storage, the live
122
+ * values still reset and nothing throws.
123
+ *
124
+ * The answer: an entry with a `reset` lists its key (a prefix, the keys found under it);
125
+ * an entry without lists the keys it removed, those that were there.
126
+ */
127
+ export function resetDeviceSettings(): string[] {
128
+ const keys: string[] = [];
129
+ const remove: DeviceSetting[] = [];
130
+ for (const entry of deviceSettings()) {
131
+ if (!entry.reset) {
132
+ remove.push(entry);
133
+ continue;
134
+ }
135
+ const covered = keysOf(entry);
136
+ try {
137
+ entry.reset();
138
+ keys.push(...covered);
139
+ } catch (error) {
140
+ if (devBuild()) console.error(`resetDeviceSettings: the reset of "${entry.key}" threw; its key is removed instead.`, error);
141
+ remove.push(entry);
142
+ }
143
+ }
144
+ for (const entry of remove) keys.push(...removeEntry(entry));
145
+ return [...new Set(keys)];
146
+ }