@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.
- package/README.md +115 -41
- package/dist/admin/role-select.d.ts +3 -2
- package/dist/admin/role-select.js +2 -0
- package/dist/admin/role-select.js.map +1 -1
- package/dist/billing/billing-banner.d.ts +5 -2
- package/dist/billing/billing-banner.js.map +1 -1
- package/dist/billing/plan-limit-notice.d.ts +5 -2
- package/dist/billing/plan-limit-notice.js.map +1 -1
- package/dist/chart.js.map +1 -1
- package/dist/components/amount-input.d.ts +2 -5
- package/dist/components/amount-input.js +2 -2
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +2 -1
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/button-look.d.ts +1 -1
- package/dist/components/button-look.js +9 -4
- package/dist/components/button-look.js.map +1 -1
- package/dist/components/calculator.d.ts +1 -4
- package/dist/components/calculator.js +1 -3
- package/dist/components/calculator.js.map +1 -1
- package/dist/components/chart-zoom.d.ts +0 -37
- package/dist/components/chart-zoom.js +1 -28
- package/dist/components/chart-zoom.js.map +1 -1
- package/dist/components/checkbox-group.d.ts +5 -2
- package/dist/components/checkbox-group.js +15 -4
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/chip-input.d.ts +0 -4
- package/dist/components/chip-input.js +1 -5
- package/dist/components/chip-input.js.map +1 -1
- package/dist/components/column-mapper.d.ts +5 -3
- package/dist/components/column-mapper.js +2 -0
- package/dist/components/column-mapper.js.map +1 -1
- package/dist/components/combobox.d.ts +3 -3
- package/dist/components/combobox.js +2 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/copy-button.d.ts +5 -1
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/country-select.d.ts +3 -3
- package/dist/components/country-select.js +3 -0
- package/dist/components/country-select.js.map +1 -1
- package/dist/components/currency-option-list.d.ts +3 -8
- package/dist/components/currency-option-list.js +1 -29
- package/dist/components/currency-option-list.js.map +1 -1
- package/dist/components/currency-select.d.ts +3 -2
- package/dist/components/currency-select.js +10 -1
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/danger-confirm.d.ts +3 -3
- package/dist/components/danger-confirm.js.map +1 -1
- package/dist/components/data-table-filter-popover.d.ts +1 -1
- package/dist/components/data-table-filter-popover.js +1 -1
- package/dist/components/data-table-filter-popover.js.map +1 -1
- package/dist/components/data-table-labels.d.ts +1 -42
- package/dist/components/data-table-labels.js +2 -31
- package/dist/components/data-table-labels.js.map +1 -1
- package/dist/components/data-table-shared.d.ts +17 -1
- package/dist/components/data-table-shared.js +22 -0
- package/dist/components/data-table-shared.js.map +1 -1
- package/dist/components/data-table.d.ts +12 -2
- package/dist/components/data-table.js +18 -14
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-field.d.ts +2 -1
- package/dist/components/date-field.js.map +1 -1
- package/dist/components/date-picker.js +3 -0
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-range-picker.js +3 -0
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog-frame.d.ts +3 -1
- package/dist/components/dialog-frame.js.map +1 -1
- package/dist/components/dropdown.d.ts +18 -15
- package/dist/components/dropdown.js +11 -3
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/entity-combobox.d.ts +3 -3
- package/dist/components/entity-combobox.js +2 -1
- package/dist/components/entity-combobox.js.map +1 -1
- package/dist/components/field-base.d.ts +0 -5
- package/dist/components/field-base.js +0 -5
- package/dist/components/field-base.js.map +1 -1
- package/dist/components/field-parts.d.ts +69 -22
- package/dist/components/field-parts.js +33 -19
- package/dist/components/field-parts.js.map +1 -1
- package/dist/components/field-strip.d.ts +9 -23
- package/dist/components/field-strip.js +26 -23
- package/dist/components/field-strip.js.map +1 -1
- package/dist/components/field-sync.d.ts +0 -4
- package/dist/components/field-sync.js +0 -4
- package/dist/components/field-sync.js.map +1 -1
- package/dist/components/field.d.ts +7 -6
- package/dist/components/field.js +24 -15
- package/dist/components/field.js.map +1 -1
- package/dist/components/full-bleed-dialog.js +2 -2
- package/dist/components/full-bleed-dialog.js.map +1 -1
- package/dist/components/help-popover.d.ts +9 -7
- package/dist/components/help-popover.js.map +1 -1
- package/dist/components/hover-menu.d.ts +6 -13
- package/dist/components/hover-menu.js +3 -3
- package/dist/components/hover-menu.js.map +1 -1
- package/dist/components/icon-picker.d.ts +3 -2
- package/dist/components/icon-picker.js +3 -0
- package/dist/components/icon-picker.js.map +1 -1
- package/dist/components/inline-entity-combobox.d.ts +3 -3
- package/dist/components/inline-entity-combobox.js +2 -1
- package/dist/components/inline-entity-combobox.js.map +1 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +2 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/modal.d.ts +9 -1
- package/dist/components/modal.js +7 -4
- package/dist/components/modal.js.map +1 -1
- package/dist/components/month-picker.d.ts +2 -1
- package/dist/components/month-picker.js +8 -1
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/multi-entity-combobox.d.ts +2 -2
- package/dist/components/multi-entity-combobox.js +2 -1
- package/dist/components/multi-entity-combobox.js.map +1 -1
- package/dist/components/multi-select.d.ts +7 -18
- package/dist/components/multi-select.js +8 -10
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/number-input.d.ts +2 -5
- package/dist/components/number-input.js +2 -4
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/numeric-field.d.ts +5 -2
- package/dist/components/numeric-field.js +4 -1
- package/dist/components/numeric-field.js.map +1 -1
- package/dist/components/one-time-code-input.d.ts +2 -1
- package/dist/components/one-time-code-input.js +2 -1
- package/dist/components/one-time-code-input.js.map +1 -1
- package/dist/components/phone-input.d.ts +1 -1
- package/dist/components/phone-input.js +4 -0
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/popover.js +3 -3
- package/dist/components/popover.js.map +1 -1
- package/dist/components/select.d.ts +4 -3
- package/dist/components/select.js +2 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/server-wake.d.ts +0 -6
- package/dist/components/server-wake.js.map +1 -1
- package/dist/components/settings-fields.d.ts +4 -2
- package/dist/components/settings-fields.js.map +1 -1
- package/dist/components/slider.d.ts +3 -2
- package/dist/components/slider.js +7 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/stat-tile.d.ts +8 -2
- package/dist/components/stat-tile.js +2 -11
- package/dist/components/stat-tile.js.map +1 -1
- package/dist/components/swatch-picker.d.ts +3 -2
- package/dist/components/swatch-picker.js +3 -0
- package/dist/components/swatch-picker.js.map +1 -1
- package/dist/components/swipeable-row.d.ts +2 -17
- package/dist/components/swipeable-row.js +11 -16
- package/dist/components/swipeable-row.js.map +1 -1
- package/dist/components/text-link.js +3 -1
- package/dist/components/text-link.js.map +1 -1
- package/dist/components/textarea.d.ts +2 -1
- package/dist/components/textarea.js +9 -3
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group.js +7 -3
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/tooltip.d.ts +9 -1
- package/dist/components/tooltip.js +20 -5
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/translation-review.d.ts +10 -2
- package/dist/components/translation-review.js +11 -3
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/use-table-state.d.ts +31 -3
- package/dist/components/use-table-state.js +53 -8
- package/dist/components/use-table-state.js.map +1 -1
- package/dist/components/user-avatar.d.ts +2 -2
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/components/wizard-stepper.d.ts +1 -4
- package/dist/components/wizard-stepper.js +2 -3
- package/dist/components/wizard-stepper.js.map +1 -1
- package/dist/currencies.d.ts +23 -0
- package/dist/currencies.js +38 -0
- package/dist/currencies.js.map +1 -0
- package/dist/demo/demo-banner.d.ts +7 -2
- package/dist/demo/demo-banner.js.map +1 -1
- package/dist/eslint/index.d.ts +83 -0
- package/dist/eslint/index.js +69 -0
- package/dist/eslint/index.js.map +1 -0
- package/dist/eslint/role-utilities.d.ts +48 -0
- package/dist/eslint/role-utilities.generated.d.ts +2 -0
- package/dist/eslint/role-utilities.generated.js +143 -0
- package/dist/eslint/role-utilities.generated.js.map +1 -0
- package/dist/eslint/role-utilities.js +43 -0
- package/dist/eslint/role-utilities.js.map +1 -0
- package/dist/feedback/feedback-menu.d.ts +2 -2
- package/dist/feedback/feedback-menu.js.map +1 -1
- package/dist/feedback/feedback-thread.d.ts +3 -8
- package/dist/feedback/feedback-thread.js +0 -2
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/hooks/use-dismiss.d.ts +16 -3
- package/dist/hooks/use-dismiss.js +14 -2
- package/dist/hooks/use-dismiss.js.map +1 -1
- package/dist/i18n/defaults.js +5 -1
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.js +97 -1
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +29 -4
- package/dist/i18n/kit-labels.js +21 -1
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/locales/en.js +104 -3
- package/dist/i18n/locales/en.js.map +3 -3
- package/dist/i18n/locales/es.js +95 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +99 -3
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +95 -1
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +99 -3
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +95 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.js +13 -0
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/shared-labels.js +3 -1
- package/dist/i18n/shared-labels.js.map +1 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +40 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/device-settings.d.ts +72 -0
- package/dist/lib/device-settings.js +64 -0
- package/dist/lib/device-settings.js.map +1 -0
- package/dist/lib/plain-text.d.ts +11 -0
- package/dist/lib/plain-text.js +16 -0
- package/dist/lib/plain-text.js.map +1 -0
- package/dist/lib/refs.d.ts +13 -0
- package/dist/lib/refs.js +15 -0
- package/dist/lib/refs.js.map +1 -0
- package/dist/lib/safe-storage.d.ts +6 -0
- package/dist/lib/safe-storage.js +11 -0
- package/dist/lib/safe-storage.js.map +1 -1
- package/dist/notifications/notification-parts.d.ts +39 -0
- package/dist/notifications/notification-parts.js +47 -0
- package/dist/notifications/notification-parts.js.map +1 -0
- package/dist/notifications/notification-types-setting.d.ts +62 -0
- package/dist/notifications/notification-types-setting.js +192 -0
- package/dist/notifications/notification-types-setting.js.map +1 -0
- package/dist/notifications/notification-types.d.ts +75 -0
- package/dist/notifications/notification-types.js +2 -0
- package/dist/notifications/notification-types.js.map +1 -0
- package/dist/notifications/notifications-labels.d.ts +131 -0
- package/dist/notifications/notifications-labels.js +83 -0
- package/dist/notifications/notifications-labels.js.map +1 -0
- package/dist/notifications/push-device-setting.d.ts +37 -0
- package/dist/notifications/push-device-setting.js +164 -0
- package/dist/notifications/push-device-setting.js.map +1 -0
- package/dist/notifications/push-devices-setting.d.ts +44 -0
- package/dist/notifications/push-devices-setting.js +203 -0
- package/dist/notifications/push-devices-setting.js.map +1 -0
- package/dist/notifications/quiet-hours-setting.d.ts +47 -0
- package/dist/notifications/quiet-hours-setting.js +131 -0
- package/dist/notifications/quiet-hours-setting.js.map +1 -0
- package/dist/notifications/time-zone-select.d.ts +50 -0
- package/dist/notifications/time-zone-select.js +76 -0
- package/dist/notifications/time-zone-select.js.map +1 -0
- package/dist/notifications/unsubscribe-panel.d.ts +53 -0
- package/dist/notifications/unsubscribe-panel.js +139 -0
- package/dist/notifications/unsubscribe-panel.js.map +1 -0
- package/dist/notifications/use-push-device.d.ts +122 -0
- package/dist/notifications/use-push-device.js +230 -0
- package/dist/notifications/use-push-device.js.map +1 -0
- package/dist/rhf/fields.d.ts +36 -29
- package/dist/rhf/fields.js +51 -22
- package/dist/rhf/fields.js.map +1 -1
- package/dist/rhf/form-core.d.ts +5 -4
- package/dist/rhf/form-core.js.map +1 -1
- package/dist/rhf/form.d.ts +7 -36
- package/dist/rhf/form.js +1 -16
- package/dist/rhf/form.js.map +1 -1
- package/dist/rhf/line-items.d.ts +1 -1
- package/dist/rhf/line-items.js.map +1 -1
- package/dist/rhf/use-rhf-wizard-step.js.map +1 -1
- package/dist/rhf.js.map +1 -1
- package/dist/settings/device-reset-setting-labels.d.ts +3 -0
- package/dist/settings/device-reset-setting-labels.js +15 -0
- package/dist/settings/device-reset-setting-labels.js.map +1 -0
- package/dist/settings/device-reset-setting.d.ts +58 -0
- package/dist/settings/device-reset-setting.js +51 -0
- package/dist/settings/device-reset-setting.js.map +1 -0
- package/dist/shell/app-shell.js +5 -0
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/option-switcher-menu.d.ts +5 -17
- package/dist/shell/option-switcher-menu.js +1 -3
- package/dist/shell/option-switcher-menu.js.map +1 -1
- package/dist/shell/role-switcher.d.ts +1 -4
- package/dist/shell/role-switcher.js +2 -3
- package/dist/shell/role-switcher.js.map +1 -1
- package/dist/shell/topbar-action-menu.d.ts +7 -19
- package/dist/shell/topbar-action-menu.js +1 -3
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell/topbar-controls.d.ts +3 -12
- package/dist/shell/topbar-controls.js +6 -9
- package/dist/shell/topbar-controls.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +2 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/viewport.d.ts +25 -2
- package/dist/testing/viewport.js +61 -10
- package/dist/testing/viewport.js.map +1 -1
- package/dist/theme/contrast-tokens.d.ts +42 -4
- package/dist/theme/contrast-tokens.js +56 -9
- package/dist/theme/contrast-tokens.js.map +1 -1
- package/dist/theme/contrast.d.ts +4 -2
- package/dist/theme/contrast.js +13 -0
- package/dist/theme/contrast.js.map +1 -1
- package/dist/theme/palette-derive.d.ts +15 -1
- package/dist/theme/palette-derive.js +37 -8
- package/dist/theme/palette-derive.js.map +1 -1
- package/dist/theme/palette-presets.d.ts +2 -8
- package/dist/theme/palette-presets.js +5 -284
- package/dist/theme/palette-presets.js.map +1 -1
- package/dist/theme/palette-store.js +6 -0
- package/dist/theme/palette-store.js.map +1 -1
- package/dist/theme/text-size.js +6 -0
- package/dist/theme/text-size.js.map +1 -1
- package/dist/theme/theme-store.js +6 -0
- package/dist/theme/theme-store.js.map +1 -1
- package/dist/wizard/types.d.ts +0 -5
- package/dist/wizard/types.js +1 -5
- package/dist/wizard/types.js.map +1 -1
- package/package.json +9 -1
- package/src/admin/role-select.tsx +4 -1
- package/src/billing/billing-banner.tsx +5 -2
- package/src/billing/plan-limit-notice.tsx +5 -2
- package/src/chart.ts +5 -3
- package/src/components/amount-input.tsx +4 -7
- package/src/components/autocomplete.tsx +5 -2
- package/src/components/button-look.ts +15 -5
- package/src/components/calculator.tsx +2 -7
- package/src/components/chart-zoom.tsx +4 -47
- package/src/components/checkbox-group.tsx +22 -4
- package/src/components/chip-input.tsx +0 -7
- package/src/components/column-mapper.tsx +6 -2
- package/src/components/combobox.tsx +6 -3
- package/src/components/copy-button.tsx +5 -1
- package/src/components/country-select.tsx +6 -1
- package/src/components/currency-option-list.tsx +8 -42
- package/src/components/currency-select.tsx +12 -3
- package/src/components/danger-confirm.tsx +3 -3
- package/src/components/data-table-filter-popover.tsx +2 -1
- package/src/components/data-table-labels.ts +2 -84
- package/src/components/data-table-shared.tsx +55 -2
- package/src/components/data-table.tsx +29 -17
- package/src/components/date-field.tsx +2 -2
- package/src/components/date-picker.tsx +3 -0
- package/src/components/date-range-picker.tsx +3 -0
- package/src/components/dialog-frame.tsx +3 -1
- package/src/components/dropdown.tsx +42 -18
- package/src/components/entity-combobox.tsx +6 -3
- package/src/components/field-base.tsx +0 -11
- package/src/components/field-parts.tsx +112 -38
- package/src/components/field-strip.tsx +12 -27
- package/src/components/field-sync.tsx +0 -7
- package/src/components/field.tsx +32 -19
- package/src/components/full-bleed-dialog.tsx +4 -3
- package/src/components/help-popover.tsx +9 -7
- package/src/components/hover-menu.tsx +12 -16
- package/src/components/icon-picker.tsx +8 -3
- package/src/components/inline-entity-combobox.tsx +6 -3
- package/src/components/input.tsx +4 -2
- package/src/components/modal.tsx +20 -4
- package/src/components/month-picker.tsx +10 -3
- package/src/components/multi-entity-combobox.tsx +5 -2
- package/src/components/multi-select.tsx +19 -31
- package/src/components/number-input.tsx +5 -10
- package/src/components/numeric-field.ts +10 -2
- package/src/components/one-time-code-input.tsx +5 -3
- package/src/components/phone-input.tsx +4 -0
- package/src/components/popover.tsx +8 -4
- package/src/components/select.tsx +6 -3
- package/src/components/series-chart.tsx +1 -1
- package/src/components/server-wake.tsx +0 -6
- package/src/components/settings-fields.tsx +4 -2
- package/src/components/slider.tsx +10 -3
- package/src/components/stat-tile.tsx +11 -20
- package/src/components/swatch-picker.tsx +9 -4
- package/src/components/swipeable-row.tsx +15 -37
- package/src/components/text-link.tsx +3 -1
- package/src/components/textarea.tsx +11 -4
- package/src/components/toggle-group.tsx +21 -5
- package/src/components/tooltip.tsx +37 -6
- package/src/components/translation-review.tsx +25 -7
- package/src/components/use-table-state.ts +91 -10
- package/src/components/user-avatar.tsx +2 -2
- package/src/components/wizard-stepper.tsx +2 -6
- package/src/currencies.ts +70 -0
- package/src/demo/demo-banner.tsx +7 -2
- package/src/eslint/index.ts +161 -0
- package/src/eslint/role-utilities.generated.ts +146 -0
- package/src/eslint/role-utilities.ts +99 -0
- package/src/feedback/feedback-menu.tsx +2 -2
- package/src/feedback/feedback-thread.tsx +3 -8
- package/src/hooks/use-dismiss.ts +39 -4
- package/src/i18n/defaults.ts +4 -0
- package/src/i18n/german.ts +113 -0
- package/src/i18n/kit-labels.tsx +66 -6
- package/src/i18n/locales/en.ts +6 -0
- package/src/i18n/locales/es.ts +106 -0
- package/src/i18n/locales/fr.ts +109 -2
- package/src/i18n/locales/hu.ts +104 -0
- package/src/i18n/locales/it.ts +108 -2
- package/src/i18n/locales/zh.ts +96 -0
- package/src/i18n/review.ts +13 -0
- package/src/i18n/shared-labels.ts +2 -0
- package/src/index.ts +53 -1
- package/src/lib/device-settings.ts +146 -0
- package/src/lib/plain-text.ts +22 -0
- package/src/lib/refs.ts +22 -0
- package/src/lib/safe-storage.ts +16 -0
- package/src/notifications/notification-parts.tsx +83 -0
- package/src/notifications/notification-types-setting.tsx +309 -0
- package/src/notifications/notification-types.ts +80 -0
- package/src/notifications/notifications-labels.ts +238 -0
- package/src/notifications/push-device-setting.tsx +224 -0
- package/src/notifications/push-devices-setting.tsx +306 -0
- package/src/notifications/quiet-hours-setting.tsx +185 -0
- package/src/notifications/time-zone-select.tsx +126 -0
- package/src/notifications/unsubscribe-panel.tsx +203 -0
- package/src/notifications/use-push-device.ts +392 -0
- package/src/rhf/fields.tsx +87 -39
- package/src/rhf/form-core.tsx +5 -4
- package/src/rhf/form.tsx +7 -43
- package/src/rhf/line-items.tsx +1 -1
- package/src/rhf/use-rhf-wizard-step.ts +4 -4
- package/src/rhf.ts +3 -2
- package/src/settings/device-reset-setting-labels.ts +20 -0
- package/src/settings/device-reset-setting.tsx +119 -0
- package/src/shell/app-shell.tsx +8 -0
- package/src/shell/option-switcher-menu.tsx +5 -22
- package/src/shell/role-switcher.tsx +2 -6
- package/src/shell/topbar-action-menu.tsx +7 -24
- package/src/shell/topbar-controls.tsx +6 -18
- package/src/testing/index.ts +3 -1
- package/src/testing/viewport.ts +125 -19
- package/src/theme/contrast-tokens.ts +106 -12
- package/src/theme/contrast.ts +30 -4
- package/src/theme/palette-derive.ts +68 -7
- package/src/theme/palette-presets.ts +16 -299
- package/src/theme/palette-store.ts +12 -0
- package/src/theme/text-size.ts +8 -0
- package/src/theme/theme-store.ts +10 -0
- package/src/wizard/types.ts +0 -8
- package/tokens.css +38 -4
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
LockedReason,
|
|
37
37
|
mergeRefs,
|
|
38
38
|
type DisabledReasonDisplay,
|
|
39
|
+
type FieldHelpProps,
|
|
39
40
|
type LockReason,
|
|
40
41
|
} from "./field-parts";
|
|
41
42
|
import { useEndWidth, useNumericField } from "./numeric-field";
|
|
@@ -43,7 +44,7 @@ import type { CommitScope } from "./write-lock";
|
|
|
43
44
|
|
|
44
45
|
/** {@link AmountInput}'s props — exported since 0.34 (refactor audit 2026-10, API-9): a
|
|
45
46
|
* wrapper typed itself off `ComponentProps<typeof AmountInput>` until then. */
|
|
46
|
-
export interface AmountInputProps {
|
|
47
|
+
export interface AmountInputProps extends FieldHelpProps {
|
|
47
48
|
value: string;
|
|
48
49
|
onChange: (value: string) => void;
|
|
49
50
|
currency?: string;
|
|
@@ -100,9 +101,6 @@ export interface AmountInputProps {
|
|
|
100
101
|
id?: string;
|
|
101
102
|
/** Names the field when it has no visible `label` (a table cell, the display shape). */
|
|
102
103
|
"aria-label"?: string;
|
|
103
|
-
/** @deprecated 0.34 — use `aria-label`; removed in 0.35 (refactor audit 2026-10, API-1).
|
|
104
|
-
* Names the field only when `aria-label` is absent. */
|
|
105
|
-
ariaLabel?: string;
|
|
106
104
|
/**
|
|
107
105
|
* Set on the `<input>`, with `id` above. Declared so `Field`'s render-prop spread —
|
|
108
106
|
* `{(ids) => <AmountInput {...ids} … />}` — is typed and reaches the input: the
|
|
@@ -382,7 +380,7 @@ function isResultOf(previous: string, text: string, settle: (text: string) => st
|
|
|
382
380
|
}
|
|
383
381
|
|
|
384
382
|
export function AmountInput(props: AmountInputProps) {
|
|
385
|
-
const { ref, value, onChange, currency, onCurrencyChange, placeholder, label, className, inputClassName, id, "aria-label":
|
|
383
|
+
const { ref, value, onChange, currency, onCurrencyChange, placeholder, label, className, inputClassName, id, "aria-label": ariaLabel, "aria-required": ariaRequired, autoFocus, tone = "neutral", negative = false, onNegativeChange, align = "start", labels, currencyNames, currencyOptions, digits: digitsProp, min, max, onCommit, disabledReasonDisplay } = props;
|
|
386
384
|
const generatedId = useId();
|
|
387
385
|
const fieldId = id ?? generatedId;
|
|
388
386
|
// The sign is DISPLAYED, not stored (live #201 rework). `value` is the
|
|
@@ -556,8 +554,7 @@ export function AmountInput(props: AmountInputProps) {
|
|
|
556
554
|
<input
|
|
557
555
|
ref={setRefs}
|
|
558
556
|
id={fieldId}
|
|
559
|
-
|
|
560
|
-
aria-label={ariaLabelAttr ?? ariaLabelProp}
|
|
557
|
+
aria-label={ariaLabel}
|
|
561
558
|
type="text"
|
|
562
559
|
// eslint-disable-next-line jsx-a11y/no-autofocus -- opt-in per call site (feedback #70)
|
|
563
560
|
autoFocus={autoFocus}
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
useFieldHint,
|
|
33
33
|
useLockReason,
|
|
34
34
|
type DisabledReasonDisplay,
|
|
35
|
+
type FieldHelpProps,
|
|
35
36
|
} from "./field-parts";
|
|
36
37
|
import type { CommitScope } from "./write-lock";
|
|
37
38
|
|
|
@@ -44,7 +45,8 @@ export interface AutocompleteProps<V extends string | number = string>
|
|
|
44
45
|
extends Omit<
|
|
45
46
|
ComponentPropsWithoutRef<"input">,
|
|
46
47
|
"value" | "defaultValue" | "onChange" | "onSelect" | "children" | "type" | "size"
|
|
47
|
-
|
|
48
|
+
>,
|
|
49
|
+
FieldHelpProps {
|
|
48
50
|
/** What is in the field. Controlled, and never reset by the component: opening,
|
|
49
51
|
* closing and a failed lookup all leave it exactly as typed. */
|
|
50
52
|
value: string;
|
|
@@ -220,6 +222,7 @@ export function Autocomplete<V extends string | number = string>(props: Autocomp
|
|
|
220
222
|
invalid,
|
|
221
223
|
error,
|
|
222
224
|
hint,
|
|
225
|
+
help,
|
|
223
226
|
status,
|
|
224
227
|
emptyLabel,
|
|
225
228
|
loadErrorLabel,
|
|
@@ -252,7 +255,7 @@ export function Autocomplete<V extends string | number = string>(props: Autocomp
|
|
|
252
255
|
noResults: emptyLabel,
|
|
253
256
|
loadError: loadErrorLabel,
|
|
254
257
|
});
|
|
255
|
-
const hintParts = useFieldHint(hint, ariaDescribedBy);
|
|
258
|
+
const hintParts = useFieldHint(hint, ariaDescribedBy, { help, name: label ?? ariaLabel });
|
|
256
259
|
// A form library's `aria-invalid` paints as well as announces (DUP-8: it only
|
|
257
260
|
// announced, through the spread below).
|
|
258
261
|
const field = useFieldError(error, invalid, hintParts.describedBy, rest["aria-invalid"]);
|
|
@@ -100,8 +100,13 @@ export const buttonVariantClasses: Record<ButtonVariant, string> = {
|
|
|
100
100
|
// the base's focus ring stays: those copies had `outline-none` and no ring, so
|
|
101
101
|
// a keyboard user tabbing onto them saw nothing at all. `rounded-sm` keeps that
|
|
102
102
|
// ring hugging the word instead of drawing a pill round it.
|
|
103
|
+
//
|
|
104
|
+
// Under More contrast the word reads `--brand-muted`, the brand AS TEXT (0.36,
|
|
105
|
+
// colour-roles §13.3 decision 8): `--brand` is solved as a mark (3:1), and on More
|
|
106
|
+
// contrast's darker light well Moss's read 3.68:1; the derived dark brands sit at 3.0
|
|
107
|
+
// as text too. Both modes, since `contrast:` does not split them.
|
|
103
108
|
link:
|
|
104
|
-
"rounded-sm p-0 bg-transparent text-brand underline-offset-4 hover:underline focus-visible:ring-brand",
|
|
109
|
+
"rounded-sm p-0 bg-transparent text-brand underline-offset-4 hover:underline focus-visible:ring-brand contrast:text-brand-muted",
|
|
105
110
|
};
|
|
106
111
|
|
|
107
112
|
/**
|
|
@@ -132,11 +137,14 @@ export const buttonVariantClasses: Record<ButtonVariant, string> = {
|
|
|
132
137
|
*/
|
|
133
138
|
export type ButtonTone = "default" | "muted" | "danger";
|
|
134
139
|
|
|
140
|
+
// `contrast:text-secondary` restates the tone's own colour under the `contrast:` variant,
|
|
141
|
+
// so tailwind-merge drops the link's `contrast:text-brand-muted` (0.36): a quiet link
|
|
142
|
+
// stays quiet under More contrast. On `ghost` it reads the same either way.
|
|
135
143
|
const BUTTON_TONES: Record<Exclude<ButtonTone, "default">, string> = {
|
|
136
144
|
muted:
|
|
137
|
-
"text-secondary hover:text-primary disabled:hover:text-secondary",
|
|
145
|
+
"text-secondary hover:text-primary disabled:hover:text-secondary contrast:text-secondary",
|
|
138
146
|
danger:
|
|
139
|
-
"text-secondary hover:text-danger focus-visible:ring-danger-strong disabled:hover:text-secondary",
|
|
147
|
+
"text-secondary hover:text-danger focus-visible:ring-danger-strong disabled:hover:text-secondary contrast:text-secondary",
|
|
140
148
|
};
|
|
141
149
|
|
|
142
150
|
/** Only the two transparent variants take every tone; see {@link ButtonTone}. */
|
|
@@ -158,9 +166,11 @@ const BUTTON_BOXED_DANGER: Partial<Record<ButtonVariant, string>> = {
|
|
|
158
166
|
|
|
159
167
|
// `pressed` on a `link`: the brand colour and a heavier weight, which is exactly what
|
|
160
168
|
// lenkbank's "All speeds" toggle paints by hand (gear/hysteresis-charts.tsx:482). After
|
|
161
|
-
// the tone, so a pressed muted link is brand, and an unpressed one is quiet grey.
|
|
169
|
+
// the tone, so a pressed muted link is brand, and an unpressed one is quiet grey. Under
|
|
170
|
+
// More contrast the brand as text, `--brand-muted`, at rest and hovered (0.36, as the
|
|
171
|
+
// `link` variant), whatever the tone.
|
|
162
172
|
export const BUTTON_LINK_PRESSED =
|
|
163
|
-
"font-medium text-brand hover:text-brand disabled:hover:text-brand";
|
|
173
|
+
"font-medium text-brand hover:text-brand disabled:hover:text-brand contrast:text-brand-muted contrast:hover:text-brand-muted contrast:disabled:hover:text-brand-muted";
|
|
164
174
|
|
|
165
175
|
/** The second argument of {@link buttonClasses} in its options form. */
|
|
166
176
|
export interface ButtonClassesOptions {
|
|
@@ -37,9 +37,6 @@ interface CalculatorButtonProps {
|
|
|
37
37
|
className?: string;
|
|
38
38
|
/** The trigger's accessible name; wins over `calculator.open` from the provider. */
|
|
39
39
|
"aria-label"?: string;
|
|
40
|
-
/** @deprecated 0.34 — use `aria-label`; removed in 0.35 (refactor audit 2026-10, API-1).
|
|
41
|
-
* Names the trigger only when `aria-label` is absent. */
|
|
42
|
-
ariaLabel?: string;
|
|
43
40
|
/** Screen-reader names for the panel's own controls. `aria-label` above already
|
|
44
41
|
* covers the trigger; these three were hardcoded English inside the popover,
|
|
45
42
|
* which a translating host had no way to reach. */
|
|
@@ -229,13 +226,11 @@ export function CalculatorButton({
|
|
|
229
226
|
value,
|
|
230
227
|
onChange,
|
|
231
228
|
className,
|
|
232
|
-
"aria-label":
|
|
233
|
-
ariaLabel: ariaLabelProp,
|
|
229
|
+
"aria-label": ariaLabel,
|
|
234
230
|
labels: labelsProp,
|
|
235
231
|
}: CalculatorButtonProps) {
|
|
236
232
|
// prop > provider > English, with the name prop folded in as the `open` key it has
|
|
237
|
-
// always been.
|
|
238
|
-
const ariaLabel = ariaLabelAttr ?? ariaLabelProp;
|
|
233
|
+
// always been.
|
|
239
234
|
const fromProps = useMemo(
|
|
240
235
|
() => (ariaLabel === undefined ? labelsProp : { ...labelsProp, open: ariaLabel }),
|
|
241
236
|
[ariaLabel, labelsProp],
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
// axes). `SeriesChart` is how an app zooms; `SharedXZoom` gives a column of charts one x
|
|
4
4
|
// window.
|
|
5
5
|
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// own tests used them
|
|
9
|
-
//
|
|
10
|
-
import * as core from "./chart-zoom-core";
|
|
11
|
-
|
|
6
|
+
// Those two and the zoom's types are all that is public. The arithmetic and the HOC were
|
|
7
|
+
// too until 0.35 (refactor audit 2026-10, API-6b = MOD-10; deprecated in 0.34): exported
|
|
8
|
+
// because lenkbank's, later Kurvenschmiede's, own tests used them, and named by no file in
|
|
9
|
+
// any of the three apps since. The kit's own modules import them from the core.
|
|
12
10
|
export { SharedXZoom } from "./chart-zoom-core";
|
|
13
11
|
export type {
|
|
14
12
|
ZoomAxes,
|
|
@@ -22,44 +20,3 @@ export type {
|
|
|
22
20
|
ZoomState,
|
|
23
21
|
ZoomTarget,
|
|
24
22
|
} from "./chart-zoom-core";
|
|
25
|
-
|
|
26
|
-
/* ── Deprecated 0.34, removed in 0.35 ─────────────────────────────────────
|
|
27
|
-
* Each is the core's own value under its old public name: SeriesChart draws the zoom
|
|
28
|
-
* these compute, and a chart's `zoomAxes` prop is what an app sets. */
|
|
29
|
-
|
|
30
|
-
/** @deprecated 0.34 — a series without `axis` is on the chart's single y axis, `"y"`;
|
|
31
|
-
* removed in 0.35 (API-6b). */
|
|
32
|
-
export const DEFAULT_Y_AXIS = core.DEFAULT_Y_AXIS;
|
|
33
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which reads it; removed in 0.35 (API-6b). */
|
|
34
|
-
export const ZOOM_SQUARE_ENOUGH = core.ZOOM_SQUARE_ENOUGH;
|
|
35
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which reads it; removed in 0.35 (API-6b). */
|
|
36
|
-
export const ZOOM_MIN_DRAG = core.ZOOM_MIN_DRAG;
|
|
37
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which reads a drag this way; removed in 0.35
|
|
38
|
-
* (API-6b). */
|
|
39
|
-
export const zoomAxesFor = core.zoomAxesFor;
|
|
40
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which reads a drag this way; removed in 0.35
|
|
41
|
-
* (API-6b). */
|
|
42
|
-
export const selectionFromDrag = core.selectionFromDrag;
|
|
43
|
-
/** @deprecated 0.34 — SeriesChart fits its axes with it; removed in 0.35 (API-6b). */
|
|
44
|
-
export const axisExtent = core.axisExtent;
|
|
45
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which refits the axes a drag did not name;
|
|
46
|
-
* removed in 0.35 (API-6b). */
|
|
47
|
-
export const fitYToX = core.fitYToX;
|
|
48
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which refits the axes a drag did not name;
|
|
49
|
-
* removed in 0.35 (API-6b). */
|
|
50
|
-
export const fitXToY = core.fitXToY;
|
|
51
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which keeps its own state; removed in 0.35
|
|
52
|
-
* (API-6b). */
|
|
53
|
-
export const NO_ZOOM = core.NO_ZOOM;
|
|
54
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which keeps its own state; removed in 0.35
|
|
55
|
-
* (API-6b). */
|
|
56
|
-
export const zoomAfter = core.zoomAfter;
|
|
57
|
-
/** @deprecated 0.34 — SeriesChart's zoom, which keeps its own state; removed in 0.35
|
|
58
|
-
* (API-6b). */
|
|
59
|
-
export const zoomDomains = core.zoomDomains;
|
|
60
|
-
/** @deprecated 0.34 — SeriesChart's `zoomAxes` prop, which says what its default is;
|
|
61
|
-
* removed in 0.35 (API-6b). */
|
|
62
|
-
export const defaultZoomAxes = core.defaultZoomAxes;
|
|
63
|
-
/** @deprecated 0.34 — SeriesChart, which is a chart wrapped in it, and SharedXZoom;
|
|
64
|
-
* removed in 0.35 (API-6b). */
|
|
65
|
-
export const withChartZoom = core.withChartZoom;
|
|
@@ -4,7 +4,14 @@ import { cn } from "../lib/cn";
|
|
|
4
4
|
import { Checkbox } from "./checkbox";
|
|
5
5
|
import { hasContent } from "../lib/presence";
|
|
6
6
|
import { useCommitReason, type CommitScope } from "./write-lock";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
FIELD_ERROR_CLASS,
|
|
9
|
+
fieldHelpMark,
|
|
10
|
+
mergeDescribedBy,
|
|
11
|
+
RequiredStarOnLegend,
|
|
12
|
+
useInlineHint,
|
|
13
|
+
type FieldHelpProps,
|
|
14
|
+
} from "./field-parts";
|
|
8
15
|
|
|
9
16
|
/** One box of a {@link CheckboxGroup}. */
|
|
10
17
|
export interface CheckboxGroupOption<T extends string = string> {
|
|
@@ -22,7 +29,7 @@ export interface CheckboxGroupOption<T extends string = string> {
|
|
|
22
29
|
* reader where the dialog's title already says it to the eye. */
|
|
23
30
|
export type CheckboxGroupLegendVisibility = "visible" | "sr-only";
|
|
24
31
|
|
|
25
|
-
export interface CheckboxGroupProps<T extends string = string> {
|
|
32
|
+
export interface CheckboxGroupProps<T extends string = string> extends FieldHelpProps {
|
|
26
33
|
/** The question the boxes answer — the fieldset's `<legend>`, which names the group.
|
|
27
34
|
* Without one, pass `aria-label`. */
|
|
28
35
|
legend?: ReactNode;
|
|
@@ -64,6 +71,8 @@ export interface CheckboxGroupProps<T extends string = string> {
|
|
|
64
71
|
/**
|
|
65
72
|
* Standing advice for the group, under the boxes, attached to the fieldset with
|
|
66
73
|
* `aria-describedby` before the error — the field anatomy every kit field keeps.
|
|
74
|
+
* A `help` beside it (0.36) is a "?" after the legend — with a visible legend only —
|
|
75
|
+
* and names nothing: the fieldset is then named by the legend's words alone.
|
|
67
76
|
*/
|
|
68
77
|
hint?: ReactNode;
|
|
69
78
|
/** What is wrong with the set, in the caller's words. Under the boxes, on the
|
|
@@ -128,6 +137,7 @@ export function CheckboxGroup<T extends string = string>({
|
|
|
128
137
|
disabled,
|
|
129
138
|
required,
|
|
130
139
|
hint,
|
|
140
|
+
help,
|
|
131
141
|
error,
|
|
132
142
|
invalid,
|
|
133
143
|
commit,
|
|
@@ -142,7 +152,11 @@ export function CheckboxGroup<T extends string = string>({
|
|
|
142
152
|
const errorId = `${generated}-error`;
|
|
143
153
|
// §4: a FieldHint under the group is its words at Large and on a touch screen, not a
|
|
144
154
|
// lone "?" (DUP-2, refactor audit 2026-10). A HelpPopover stays a "?".
|
|
145
|
-
|
|
155
|
+
// A `help` "?" after a VISIBLE legend (0.36): the label line a group has. Its FieldHint
|
|
156
|
+
// hint is then its words at every size, as everywhere a help stands beside one.
|
|
157
|
+
const helpMark = fieldHelpMark(legend !== undefined && legendVisibility === "visible" ? help : undefined, legend);
|
|
158
|
+
const legendTextId = `${generated}-legend`;
|
|
159
|
+
const shownHint = useInlineHint(hint, helpMark !== undefined);
|
|
146
160
|
const showHint = hasContent(shownHint);
|
|
147
161
|
const showError = hasContent(error);
|
|
148
162
|
const isInvalid = Boolean(invalid) || showError;
|
|
@@ -169,6 +183,9 @@ export function CheckboxGroup<T extends string = string>({
|
|
|
169
183
|
<fieldset
|
|
170
184
|
id={id}
|
|
171
185
|
aria-label={ariaLabel}
|
|
186
|
+
// With a help "?" inside the legend, the legend's WORDS name the group: a legend
|
|
187
|
+
// names its fieldset by its whole content, the "?"'s "About …" included.
|
|
188
|
+
aria-labelledby={helpMark !== undefined && ariaLabel === undefined ? legendTextId : undefined}
|
|
172
189
|
aria-describedby={mergeDescribedBy(ariaDescribedBy, showHint && hintId, showError && errorId)}
|
|
173
190
|
disabled={disabled && !locked}
|
|
174
191
|
// `relative` holds an `sr-only` legend (sr-only-containment.test); `min-w-0`
|
|
@@ -184,12 +201,13 @@ export function CheckboxGroup<T extends string = string>({
|
|
|
184
201
|
: cn("mb-2 p-0 text-sm font-medium text-primary", (disabled || locked) && "opacity-60")
|
|
185
202
|
}
|
|
186
203
|
>
|
|
187
|
-
{legend}
|
|
204
|
+
{helpMark === undefined ? legend : <span id={legendTextId}>{legend}</span>}
|
|
188
205
|
{required && (
|
|
189
206
|
<span aria-hidden className="ms-0.5 text-danger">
|
|
190
207
|
*
|
|
191
208
|
</span>
|
|
192
209
|
)}
|
|
210
|
+
{helpMark !== undefined && <span className="ms-1 inline-flex align-middle font-normal">{helpMark}</span>}
|
|
193
211
|
</legend>
|
|
194
212
|
)}
|
|
195
213
|
<RequiredStarOnLegend.Provider value={true}>
|
|
@@ -32,13 +32,6 @@ export interface ChipInputLabels {
|
|
|
32
32
|
// Defined in ./chip-labels, which holds no component code (0.34, KS U8).
|
|
33
33
|
export { DEFAULT_CHIP_INPUT_LABELS };
|
|
34
34
|
|
|
35
|
-
/** @deprecated 0.34 — `useKitLabels("chipInput", DEFAULT_CHIP_INPUT_LABELS, labels)`, which
|
|
36
|
-
* the provider reaches too, or ChipInput's own `labels`; removed in 0.35 (refactor audit
|
|
37
|
-
* 2026-10, API-6a). A merge from before the provider, which no kit component calls. */
|
|
38
|
-
export function resolveChipInputLabels(labels?: Partial<ChipInputLabels>): ChipInputLabels {
|
|
39
|
-
return labels ? { ...DEFAULT_CHIP_INPUT_LABELS, ...labels } : DEFAULT_CHIP_INPUT_LABELS;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
35
|
/**
|
|
43
36
|
* `onChange` is the field's own — the whole LIST, not a DOM event — so the wrapper
|
|
44
37
|
* div's `onChange` is omitted rather than shadowed. `placeholder` is likewise this
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
TableHeaderCell,
|
|
32
32
|
TableRow,
|
|
33
33
|
} from "./table";
|
|
34
|
+
import type { FieldHelpProps } from "./field-parts";
|
|
34
35
|
import { Select } from "./select";
|
|
35
36
|
import { Textarea } from "./textarea";
|
|
36
37
|
import { DEFAULT_COLUMN_MAPPER_LABELS, markedShort } from "./column-mapper-labels";
|
|
@@ -425,7 +426,7 @@ export function ColumnRoleTable<
|
|
|
425
426
|
|
|
426
427
|
// ── ColumnMapper ──────────────────────────────────────────────────────────────
|
|
427
428
|
|
|
428
|
-
export interface ColumnMapperProps<R extends string> {
|
|
429
|
+
export interface ColumnMapperProps<R extends string> extends FieldHelpProps {
|
|
429
430
|
/** The parts the columns play — translated labels, which are required, which must
|
|
430
431
|
* be numbers. See {@link ColumnRole}. */
|
|
431
432
|
roles: readonly ColumnRole<R>[];
|
|
@@ -440,7 +441,8 @@ export interface ColumnMapperProps<R extends string> {
|
|
|
440
441
|
onChange: (result: ColumnMapperResult<R> | null) => void;
|
|
441
442
|
/** The paste box's label. Default: `labels.paste`. */
|
|
442
443
|
label?: ReactNode;
|
|
443
|
-
/** The caption under the paste box. Default: `labels.pasteHint`.
|
|
444
|
+
/** The caption under the paste box. Default: `labels.pasteHint`. The paste box's
|
|
445
|
+
* `help` (0.36) is `help`. */
|
|
444
446
|
hint?: ReactNode;
|
|
445
447
|
/** What the file dialog offers, and what a drop is checked against. Default:
|
|
446
448
|
* `.csv,.tsv,.txt,.dat,.asc`. */
|
|
@@ -503,6 +505,7 @@ export function ColumnMapper<R extends string>({
|
|
|
503
505
|
onChange,
|
|
504
506
|
label,
|
|
505
507
|
hint,
|
|
508
|
+
help,
|
|
506
509
|
accept = DEFAULT_ACCEPT,
|
|
507
510
|
maxSize,
|
|
508
511
|
defaultText = "",
|
|
@@ -605,6 +608,7 @@ export function ColumnMapper<R extends string>({
|
|
|
605
608
|
<Textarea
|
|
606
609
|
label={label ?? labels.paste}
|
|
607
610
|
hint={hint ?? labels.pasteHint}
|
|
611
|
+
help={help}
|
|
608
612
|
rows={5}
|
|
609
613
|
wrap="off"
|
|
610
614
|
spellCheck={false}
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
useFieldHint,
|
|
23
23
|
useLockReason,
|
|
24
24
|
type DisabledReasonDisplay,
|
|
25
|
+
type FieldHelpProps,
|
|
25
26
|
} from "./field-parts";
|
|
26
27
|
import type { CommitScope } from "./write-lock";
|
|
27
28
|
import { lockedKeyDown, rowClass, SuggestionList, usePrimaryPressOnly } from "./combobox-suggestions";
|
|
@@ -38,7 +39,8 @@ export type { InlineEntityComboboxProps } from "./inline-entity-combobox";
|
|
|
38
39
|
* the DOM events of the wrapper. Everything else a wrapper needs reaches the root.
|
|
39
40
|
*/
|
|
40
41
|
export interface ComboboxProps
|
|
41
|
-
extends Omit<ComponentPropsWithoutRef<"div">, "id" | "onChange" | "onBlur" | "onSubmit"
|
|
42
|
+
extends Omit<ComponentPropsWithoutRef<"div">, "id" | "onChange" | "onBlur" | "onSubmit">,
|
|
43
|
+
FieldHelpProps {
|
|
42
44
|
value: string;
|
|
43
45
|
onChange: (v: string) => void;
|
|
44
46
|
/** Suggestion pool (e.g. existing payee names). */
|
|
@@ -125,7 +127,7 @@ export interface ComboboxProps
|
|
|
125
127
|
closeLabel?: string;
|
|
126
128
|
/**
|
|
127
129
|
* The phone sheet's heading — and, as a string, the dialog's accessible name — for a
|
|
128
|
-
* field whose label is drawn by someone else: a
|
|
130
|
+
* field whose label is drawn by someone else: a bound field's label above it,
|
|
129
131
|
* which `RhfTextCombobox` hands over here (0.24). Default: `label`. Without either, the
|
|
130
132
|
* full-screen sheet opened untitled and unnamed, the one screen on a phone that has to
|
|
131
133
|
* say what it is asking for (live #200).
|
|
@@ -186,6 +188,7 @@ export function Combobox(props: ComboboxProps) {
|
|
|
186
188
|
invalid,
|
|
187
189
|
error,
|
|
188
190
|
hint,
|
|
191
|
+
help,
|
|
189
192
|
disabled,
|
|
190
193
|
disabledReason,
|
|
191
194
|
disabledReasonDisplay,
|
|
@@ -204,7 +207,7 @@ export function Combobox(props: ComboboxProps) {
|
|
|
204
207
|
"aria-required": ariaRequired,
|
|
205
208
|
...rest
|
|
206
209
|
} = props;
|
|
207
|
-
const hintParts = useFieldHint(hint, ariaDescribedBy);
|
|
210
|
+
const hintParts = useFieldHint(hint, ariaDescribedBy, { help, name: label ?? ariaLabel });
|
|
208
211
|
const field = useFieldError(error, invalid, hintParts.describedBy, ariaInvalid);
|
|
209
212
|
const generated = useId();
|
|
210
213
|
const fieldId = id ?? generated;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ButtonHTMLAttributes } from "react";
|
|
1
|
+
import type { ButtonHTMLAttributes, Ref } from "react";
|
|
2
2
|
import { Check, Copy, X } from "lucide-react";
|
|
3
3
|
import { cn } from "../lib/cn";
|
|
4
4
|
import { useKitLabels, type LabelOverride } from "../i18n/kit-labels";
|
|
@@ -62,6 +62,10 @@ export interface CopyButtonProps
|
|
|
62
62
|
/** Called with the real outcome once the copy settles. */
|
|
63
63
|
onCopied?: (ok: boolean) => void;
|
|
64
64
|
labels?: LabelOverride<CopyButtonLabels>;
|
|
65
|
+
/** The `<button>` in either variant — the {@link IconButton}'s or the {@link Button}'s,
|
|
66
|
+
* never the tooltip's wrapper round it (0.35, round 0.35 R4, the follow-up to API-2).
|
|
67
|
+
* It rides the rest of the props on to that kit button, whose own ref it is. */
|
|
68
|
+
ref?: Ref<HTMLButtonElement>;
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
const ICONS: Record<CopyState, typeof Copy> = { idle: Copy, copied: Check, failed: X };
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
useFieldMessages,
|
|
20
20
|
useLockReason,
|
|
21
21
|
type DisabledReasonDisplay,
|
|
22
|
+
type FieldHelpProps,
|
|
22
23
|
} from "./field-parts";
|
|
23
24
|
import { CurrencyFlag } from "./currency-select";
|
|
24
25
|
import { ComboboxPanel, useComboboxCore, type ComboOption } from "./combobox-core";
|
|
@@ -66,7 +67,8 @@ export { DEFAULT_COUNTRY_SELECT_LABELS };
|
|
|
66
67
|
* `null` of a clear cannot reach a handler that was never told about it.
|
|
67
68
|
*/
|
|
68
69
|
export interface CountrySelectProps<Clearable extends boolean = false>
|
|
69
|
-
extends Omit<ComponentPropsWithoutRef<"div">, "onChange" | "defaultValue"
|
|
70
|
+
extends Omit<ComponentPropsWithoutRef<"div">, "onChange" | "defaultValue">,
|
|
71
|
+
FieldHelpProps {
|
|
70
72
|
/** The chosen country as an ISO 3166-1 alpha-2 code ("CH"), in either case;
|
|
71
73
|
* `null`, `undefined` or `""` when none is. A code outside the list still shows
|
|
72
74
|
* its name — the list restricts what can be PICKED, not what can be shown. */
|
|
@@ -249,6 +251,7 @@ export function CountrySelect<Clearable extends boolean = false>({
|
|
|
249
251
|
flags = false,
|
|
250
252
|
label,
|
|
251
253
|
hint,
|
|
254
|
+
help,
|
|
252
255
|
error,
|
|
253
256
|
invalid,
|
|
254
257
|
placeholder,
|
|
@@ -359,6 +362,8 @@ export function CountrySelect<Clearable extends boolean = false>({
|
|
|
359
362
|
// the error — Select's order. Through useFieldMessages since 0.34 (DUP-2, DUP-8).
|
|
360
363
|
const field = useFieldMessages({
|
|
361
364
|
hint,
|
|
365
|
+
help,
|
|
366
|
+
name: label ?? ariaLabel,
|
|
362
367
|
error,
|
|
363
368
|
invalid,
|
|
364
369
|
describedBy: ariaDescribedBy,
|
|
@@ -3,49 +3,15 @@ import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
|
3
3
|
import { cn } from "../lib/cn";
|
|
4
4
|
import { foldForSearch } from "../lib/text-match";
|
|
5
5
|
import { ComboboxPanel, type ComboboxCore, type ComboOption } from "./combobox-core";
|
|
6
|
+
import { CURRENCIES, type CurrencyOption } from "../currencies";
|
|
6
7
|
|
|
7
|
-
// The
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
name: string;
|
|
15
|
-
symbol: string;
|
|
16
|
-
/** ISO 3166-1 alpha-2 country code (lowercase) used by flag-icons. */
|
|
17
|
-
country: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const CURRENCIES: CurrencyOption[] = [
|
|
21
|
-
{ code: "EUR", name: "Euro", symbol: "€", country: "eu" },
|
|
22
|
-
{ code: "USD", name: "US Dollar", symbol: "$", country: "us" },
|
|
23
|
-
{ code: "GBP", name: "British Pound", symbol: "£", country: "gb" },
|
|
24
|
-
{ code: "CHF", name: "Swiss Franc", symbol: "CHF", country: "ch" },
|
|
25
|
-
{ code: "JPY", name: "Japanese Yen", symbol: "¥", country: "jp" },
|
|
26
|
-
{ code: "CAD", name: "Canadian Dollar", symbol: "CA$", country: "ca" },
|
|
27
|
-
{ code: "AUD", name: "Australian Dollar", symbol: "A$", country: "au" },
|
|
28
|
-
{ code: "NZD", name: "New Zealand Dollar", symbol: "NZ$", country: "nz" },
|
|
29
|
-
{ code: "SEK", name: "Swedish Krona", symbol: "kr", country: "se" },
|
|
30
|
-
{ code: "NOK", name: "Norwegian Krone", symbol: "kr", country: "no" },
|
|
31
|
-
{ code: "DKK", name: "Danish Krone", symbol: "kr", country: "dk" },
|
|
32
|
-
{ code: "PLN", name: "Polish Zloty", symbol: "zł", country: "pl" },
|
|
33
|
-
{ code: "CZK", name: "Czech Koruna", symbol: "Kč", country: "cz" },
|
|
34
|
-
{ code: "HUF", name: "Hungarian Forint", symbol: "Ft", country: "hu" },
|
|
35
|
-
{ code: "RON", name: "Romanian Leu", symbol: "lei", country: "ro" },
|
|
36
|
-
{ code: "BGN", name: "Bulgarian Lev", symbol: "лв", country: "bg" },
|
|
37
|
-
{ code: "TRY", name: "Turkish Lira", symbol: "₺", country: "tr" },
|
|
38
|
-
{ code: "RUB", name: "Russian Ruble", symbol: "₽", country: "ru" },
|
|
39
|
-
{ code: "CNY", name: "Chinese Yuan", symbol: "¥", country: "cn" },
|
|
40
|
-
{ code: "HKD", name: "Hong Kong Dollar", symbol: "HK$", country: "hk" },
|
|
41
|
-
{ code: "SGD", name: "Singapore Dollar", symbol: "S$", country: "sg" },
|
|
42
|
-
{ code: "INR", name: "Indian Rupee", symbol: "₹", country: "in" },
|
|
43
|
-
{ code: "BRL", name: "Brazilian Real", symbol: "R$", country: "br" },
|
|
44
|
-
{ code: "MXN", name: "Mexican Peso", symbol: "MX$", country: "mx" },
|
|
45
|
-
{ code: "ZAR", name: "South African Rand", symbol: "R", country: "za" },
|
|
46
|
-
{ code: "ILS", name: "Israeli Shekel", symbol: "₪", country: "il" },
|
|
47
|
-
{ code: "AED", name: "UAE Dirham", symbol: "د.إ", country: "ae" },
|
|
48
|
-
];
|
|
8
|
+
// The one list both currency pickers render (round 0.34 Wave 2, DUP-4). CurrencySelect
|
|
9
|
+
// re-exports the data under its own name, as it always has; the list is package-private.
|
|
10
|
+
// Its own module, so AmountInput can render the list without a cycle through
|
|
11
|
+
// currency-select. The data itself is ../currencies since 0.35: an entry of its own that
|
|
12
|
+
// imports nothing, which an app's build can read in Node (keksdose's flag subset).
|
|
13
|
+
export { CURRENCIES };
|
|
14
|
+
export type { CurrencyOption };
|
|
49
15
|
|
|
50
16
|
export interface CurrencyFlagProps extends ComponentPropsWithRef<"span"> {
|
|
51
17
|
/** ISO 3166-1 alpha-2, lowercase — the class flag-icons keys its sprite by. */
|
|
@@ -2,7 +2,7 @@ import { useCallback, useId } from "react";
|
|
|
2
2
|
import type { ComponentPropsWithoutRef, ReactNode, Ref } from "react";
|
|
3
3
|
import { FieldChevron, FIELD_TRIGGER, FIELD_INVALID, FIELD_FLOATING_PAD } from "./field-base";
|
|
4
4
|
import { FieldLabel } from "./field-parts";
|
|
5
|
-
import { assignRef, EndHintRow, useFieldMessages } from "./field-parts";
|
|
5
|
+
import { assignRef, EndHintRow, useFieldMessages, type FieldHelpProps } from "./field-parts";
|
|
6
6
|
import { cn } from "../lib/cn";
|
|
7
7
|
import { useComboboxCore } from "./combobox-core";
|
|
8
8
|
import {
|
|
@@ -29,7 +29,7 @@ export type { CurrencyFlagProps, CurrencyOption };
|
|
|
29
29
|
|
|
30
30
|
/** `onChange` is the kit's — "a currency was picked", carrying the code — rather
|
|
31
31
|
* than the div's form event. */
|
|
32
|
-
export interface CurrencySelectProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange"
|
|
32
|
+
export interface CurrencySelectProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange">, FieldHelpProps {
|
|
33
33
|
value: string;
|
|
34
34
|
onChange: (code: string) => void;
|
|
35
35
|
placeholder?: string;
|
|
@@ -106,6 +106,7 @@ export function CurrencySelect({
|
|
|
106
106
|
invalid,
|
|
107
107
|
error,
|
|
108
108
|
hint,
|
|
109
|
+
help,
|
|
109
110
|
labels,
|
|
110
111
|
currencyNames,
|
|
111
112
|
"aria-label": ariaLabel,
|
|
@@ -143,7 +144,15 @@ export function CurrencySelect({
|
|
|
143
144
|
// on the wrapper `<div>` through the spread, where nothing reads it. The caller's ids
|
|
144
145
|
// first, then the caption, then the error — Select's order, through useFieldMessages
|
|
145
146
|
// since 0.34 (DUP-2, DUP-8).
|
|
146
|
-
const field = useFieldMessages({
|
|
147
|
+
const field = useFieldMessages({
|
|
148
|
+
hint,
|
|
149
|
+
help,
|
|
150
|
+
name: label ?? ariaLabel,
|
|
151
|
+
error,
|
|
152
|
+
invalid,
|
|
153
|
+
describedBy: ariaDescribedBy,
|
|
154
|
+
ariaInvalid,
|
|
155
|
+
});
|
|
147
156
|
const { labelHint, describedBy, isInvalid } = field;
|
|
148
157
|
|
|
149
158
|
// The trigger's NAME. A combobox does not take its name from its content, and the
|
|
@@ -92,7 +92,7 @@ export interface CurrentPasswordInputProps extends Omit<InputProps, "type" | "au
|
|
|
92
92
|
* is named another way (`aria-label` / `aria-labelledby`), which then stays the only
|
|
93
93
|
* name. Pass the app's own word on a sign-in form ("Password", "Your password"), or
|
|
94
94
|
* `null` for a field whose `<label htmlFor>` is drawn elsewhere (a form library's
|
|
95
|
-
*
|
|
95
|
+
* label), which would otherwise be labelled twice.
|
|
96
96
|
*/
|
|
97
97
|
label?: ReactNode;
|
|
98
98
|
/** The value as a string — the `(next) => …` shape, so a caller holding it in
|
|
@@ -125,8 +125,8 @@ export interface CurrentPasswordInputProps extends Omit<InputProps, "type" | "au
|
|
|
125
125
|
*
|
|
126
126
|
* Everything else is {@link Input}: the reveal toggle, `error` (under the field,
|
|
127
127
|
* `aria-describedby`, `aria-invalid`), `invalid`, `name`, `id`, `autoFocus`, `required`.
|
|
128
|
-
* The ref is the `<input>`, so it works with `@eifi1/ui-kit/rhf`'s `
|
|
129
|
-
*
|
|
128
|
+
* The ref is the `<input>`, so it works with `@eifi1/ui-kit/rhf`'s `RhfField` / a
|
|
129
|
+
* `register()` spread, and controlled or uncontrolled.
|
|
130
130
|
*
|
|
131
131
|
* ```tsx
|
|
132
132
|
* <CurrentPasswordInput name="password" label={t("password")} error={errors.password?.message}
|
|
@@ -9,7 +9,8 @@ import { dateRangePresets } from "../lib/dates";
|
|
|
9
9
|
import { resolveFilter } from "./data-table-filters";
|
|
10
10
|
import type { FilterValue } from "./data-table-filters";
|
|
11
11
|
import type { DataTableColumn } from "./data-table";
|
|
12
|
-
import {
|
|
12
|
+
import type { DataTableLabels } from "./data-table-labels";
|
|
13
|
+
import { resolveDataTableLabels } from "./data-table-shared";
|
|
13
14
|
import { useKitLabelOverrides, useKitLocale } from "../i18n/kit-labels";
|
|
14
15
|
|
|
15
16
|
interface FilterPopoverProps<T> {
|