@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
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The properties a role utility exists for, each with the Tailwind theme namespace it is
|
|
3
|
+
* declared in. `ring-width` and `outline-width` are a width typed `length:` —
|
|
4
|
+
* `ring-[length:var(--focus-ring-width)]` is `ring-focus`. `divide-*` and the side borders
|
|
5
|
+
* (`border-t-*`, `border-x-*` …) read `border`'s, as Tailwind does.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ROLE_NAMESPACES: {
|
|
8
|
+
readonly text: "text-color";
|
|
9
|
+
readonly bg: "background-color";
|
|
10
|
+
readonly border: "border-color";
|
|
11
|
+
readonly ring: "ring-color";
|
|
12
|
+
readonly "ring-offset": "ring-offset-color";
|
|
13
|
+
readonly outline: "outline-color";
|
|
14
|
+
readonly fill: "fill";
|
|
15
|
+
readonly stroke: "stroke";
|
|
16
|
+
readonly "ring-width": "ring-width";
|
|
17
|
+
readonly "outline-width": "outline-width";
|
|
18
|
+
};
|
|
19
|
+
export type RoleProperty = keyof typeof ROLE_NAMESPACES;
|
|
20
|
+
/**
|
|
21
|
+
* Per property, each token that has a role utility → the utility's name after the
|
|
22
|
+
* property's prefix: `border: { "--border": ["subtle"] }` is `border-subtle`. A list,
|
|
23
|
+
* because nothing stops two names from reading one token; one name is a fix, several a
|
|
24
|
+
* choice.
|
|
25
|
+
*/
|
|
26
|
+
export type RoleUtilityTable = {
|
|
27
|
+
readonly [P in RoleProperty]: Readonly<Record<string, readonly string[]>>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The table `tokens.css` declares: every `--<namespace>-<name>: var(--<token>)` in its
|
|
31
|
+
* `@theme inline` block, in block order. `null` when there is no such block — the role
|
|
32
|
+
* utilities are gone, or this parser is.
|
|
33
|
+
*/
|
|
34
|
+
export declare function roleUtilitiesFromCss(css: string): RoleUtilityTable | null;
|
|
35
|
+
export interface RoleClassHit {
|
|
36
|
+
/** Where the class starts in the scanned text, after its variants. */
|
|
37
|
+
index: number;
|
|
38
|
+
/** The class as written, without variants or opacity: `border-t-[var(--border)]`. */
|
|
39
|
+
found: string;
|
|
40
|
+
/** The role utilities that paint the same: `["border-t-subtle"]`. */
|
|
41
|
+
utilities: string[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Every `[var(--token)]` class in `text` whose token has a role utility on that property.
|
|
45
|
+
* A token with no utility there (`text-[var(--chart-1)]`, `--status-*`,
|
|
46
|
+
* `bg-[var(--border)]` as a divider's fill) is not a hit: `[var(--…)]` is right for it.
|
|
47
|
+
*/
|
|
48
|
+
export declare function findRoleClasses(text: string, table: RoleUtilityTable): RoleClassHit[];
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const ROLE_UTILITIES = {
|
|
3
|
+
"text": {
|
|
4
|
+
"--text-primary": ["primary"],
|
|
5
|
+
"--text-secondary": ["secondary"],
|
|
6
|
+
"--text-muted": ["muted"],
|
|
7
|
+
"--text-placeholder": ["placeholder"],
|
|
8
|
+
"--text-inverse": ["inverse"],
|
|
9
|
+
"--brand": ["brand"],
|
|
10
|
+
"--brand-muted": ["brand-muted"],
|
|
11
|
+
"--danger": ["danger"],
|
|
12
|
+
"--warning": ["warning"],
|
|
13
|
+
"--success": ["success"],
|
|
14
|
+
"--info": ["info"],
|
|
15
|
+
"--money-income": ["money-income"],
|
|
16
|
+
"--money-expense": ["money-expense"],
|
|
17
|
+
"--money-net": ["money-net"],
|
|
18
|
+
"--money-neutral": ["money-neutral"],
|
|
19
|
+
"--hue-blue": ["hue-blue"],
|
|
20
|
+
"--hue-indigo": ["hue-indigo"],
|
|
21
|
+
"--hue-purple": ["hue-purple"],
|
|
22
|
+
"--hue-teal": ["hue-teal"],
|
|
23
|
+
"--hue-orange": ["hue-orange"],
|
|
24
|
+
"--brand-contrast": ["brand-contrast"],
|
|
25
|
+
"--danger-contrast": ["danger-contrast"],
|
|
26
|
+
"--warning-contrast": ["warning-contrast"],
|
|
27
|
+
"--success-contrast": ["success-contrast"],
|
|
28
|
+
"--info-contrast": ["info-contrast"],
|
|
29
|
+
"--neutral-contrast": ["neutral-contrast"],
|
|
30
|
+
"--money-income-contrast": ["money-income-contrast"],
|
|
31
|
+
"--money-expense-contrast": ["money-expense-contrast"],
|
|
32
|
+
"--money-net-contrast": ["money-net-contrast"],
|
|
33
|
+
"--money-neutral-contrast": ["money-neutral-contrast"],
|
|
34
|
+
"--hue-blue-contrast": ["hue-blue-contrast"],
|
|
35
|
+
"--hue-indigo-contrast": ["hue-indigo-contrast"],
|
|
36
|
+
"--hue-purple-contrast": ["hue-purple-contrast"],
|
|
37
|
+
"--hue-teal-contrast": ["hue-teal-contrast"],
|
|
38
|
+
"--hue-orange-contrast": ["hue-orange-contrast"],
|
|
39
|
+
"--media-ink": ["media-ink"]
|
|
40
|
+
},
|
|
41
|
+
"bg": {
|
|
42
|
+
"--bg-page": ["page"],
|
|
43
|
+
"--bg-surface": ["surface"],
|
|
44
|
+
"--bg-surface-2": ["surface-2"],
|
|
45
|
+
"--bg-hover": ["hover"],
|
|
46
|
+
"--bg-active": ["active"],
|
|
47
|
+
"--bg-inverse": ["inverse"],
|
|
48
|
+
"--brand": ["brand"],
|
|
49
|
+
"--brand-hover": ["brand-hover"],
|
|
50
|
+
"--brand-bg": ["brand-soft"],
|
|
51
|
+
"--brand-bg-hover": ["brand-soft-hover"],
|
|
52
|
+
"--danger": ["danger"],
|
|
53
|
+
"--danger-hover": ["danger-hover"],
|
|
54
|
+
"--warning": ["warning"],
|
|
55
|
+
"--success": ["success"],
|
|
56
|
+
"--info": ["info"],
|
|
57
|
+
"--neutral": ["neutral"],
|
|
58
|
+
"--money-income": ["money-income"],
|
|
59
|
+
"--money-expense": ["money-expense"],
|
|
60
|
+
"--money-net": ["money-net"],
|
|
61
|
+
"--money-neutral": ["money-neutral"],
|
|
62
|
+
"--danger-bg": ["danger-soft"],
|
|
63
|
+
"--warning-bg": ["warning-soft"],
|
|
64
|
+
"--success-bg": ["success-soft"],
|
|
65
|
+
"--info-bg": ["info-soft"],
|
|
66
|
+
"--hue-blue": ["hue-blue"],
|
|
67
|
+
"--hue-indigo": ["hue-indigo"],
|
|
68
|
+
"--hue-purple": ["hue-purple"],
|
|
69
|
+
"--hue-teal": ["hue-teal"],
|
|
70
|
+
"--hue-orange": ["hue-orange"],
|
|
71
|
+
"--hue-blue-bg": ["hue-blue-soft"],
|
|
72
|
+
"--hue-indigo-bg": ["hue-indigo-soft"],
|
|
73
|
+
"--hue-purple-bg": ["hue-purple-soft"],
|
|
74
|
+
"--hue-teal-bg": ["hue-teal-soft"],
|
|
75
|
+
"--hue-orange-bg": ["hue-orange-soft"],
|
|
76
|
+
"--media-scrim": ["media-scrim"],
|
|
77
|
+
"--media-scrim-hover": ["media-scrim-hover"]
|
|
78
|
+
},
|
|
79
|
+
"border": {
|
|
80
|
+
"--border": ["subtle"],
|
|
81
|
+
"--border-strong": ["strong"],
|
|
82
|
+
"--brand": ["brand"],
|
|
83
|
+
"--danger-border": ["danger"],
|
|
84
|
+
"--warning-border": ["warning"],
|
|
85
|
+
"--success-border": ["success"],
|
|
86
|
+
"--info-border": ["info"],
|
|
87
|
+
"--danger-border-strong": ["danger-strong"],
|
|
88
|
+
"--warning-border-strong": ["warning-strong"],
|
|
89
|
+
"--hue-blue-border": ["hue-blue"],
|
|
90
|
+
"--hue-indigo-border": ["hue-indigo"],
|
|
91
|
+
"--hue-purple-border": ["hue-purple"],
|
|
92
|
+
"--hue-teal-border": ["hue-teal"],
|
|
93
|
+
"--hue-orange-border": ["hue-orange"],
|
|
94
|
+
"--media-ink": ["media-ink"]
|
|
95
|
+
},
|
|
96
|
+
"ring": {
|
|
97
|
+
"--border": ["subtle"],
|
|
98
|
+
"--border-strong": ["strong"],
|
|
99
|
+
"--brand": ["brand"],
|
|
100
|
+
"--brand-contrast": ["brand-contrast"],
|
|
101
|
+
"--danger-border-strong": ["danger-strong"],
|
|
102
|
+
"--warning-border-strong": ["warning-strong"],
|
|
103
|
+
"--media-ink": ["media-ink"]
|
|
104
|
+
},
|
|
105
|
+
"ring-offset": {
|
|
106
|
+
"--bg-page": ["page"],
|
|
107
|
+
"--bg-surface": ["surface"],
|
|
108
|
+
"--media-scrim-hover": ["media-scrim-hover"]
|
|
109
|
+
},
|
|
110
|
+
"outline": {
|
|
111
|
+
"--border": ["subtle"],
|
|
112
|
+
"--border-strong": ["strong"],
|
|
113
|
+
"--brand": ["brand"],
|
|
114
|
+
"--danger-border-strong": ["danger-strong"],
|
|
115
|
+
"--warning-border-strong": ["warning-strong"]
|
|
116
|
+
},
|
|
117
|
+
"fill": {
|
|
118
|
+
"--text-primary": ["primary"],
|
|
119
|
+
"--text-secondary": ["secondary"],
|
|
120
|
+
"--text-muted": ["muted"],
|
|
121
|
+
"--bg-surface": ["surface"],
|
|
122
|
+
"--border": ["subtle"],
|
|
123
|
+
"--border-strong": ["strong"]
|
|
124
|
+
},
|
|
125
|
+
"stroke": {
|
|
126
|
+
"--text-primary": ["primary"],
|
|
127
|
+
"--text-secondary": ["secondary"],
|
|
128
|
+
"--text-muted": ["muted"],
|
|
129
|
+
"--bg-surface": ["surface"],
|
|
130
|
+
"--border": ["subtle"],
|
|
131
|
+
"--border-strong": ["strong"]
|
|
132
|
+
},
|
|
133
|
+
"ring-width": {
|
|
134
|
+
"--focus-ring-width": ["focus"]
|
|
135
|
+
},
|
|
136
|
+
"outline-width": {
|
|
137
|
+
"--focus-ring-width": ["focus"]
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
export {
|
|
141
|
+
ROLE_UTILITIES
|
|
142
|
+
};
|
|
143
|
+
//# sourceMappingURL=role-utilities.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/eslint/role-utilities.generated.ts"],"sourcesContent":["// GENERATED by scripts/gen-role-utilities.mjs from tokens.css's `@theme inline` block — do\n// not edit. `npm run check:tokens` fails while it is stale; re-run the script.\n//\n// Per property, each token that has a role utility → the utility's name after the\n// property's prefix (`border`: `--border` → `subtle`, i.e. `border-subtle`). Read by\n// `@eifi1/ui-kit/eslint` and scripts/check-token-discipline.mjs (round 0.35 R5).\nimport type { RoleUtilityTable } from \"./role-utilities\";\n\nexport const ROLE_UTILITIES: RoleUtilityTable = {\n \"text\": {\n \"--text-primary\": [\"primary\"],\n \"--text-secondary\": [\"secondary\"],\n \"--text-muted\": [\"muted\"],\n \"--text-placeholder\": [\"placeholder\"],\n \"--text-inverse\": [\"inverse\"],\n \"--brand\": [\"brand\"],\n \"--brand-muted\": [\"brand-muted\"],\n \"--danger\": [\"danger\"],\n \"--warning\": [\"warning\"],\n \"--success\": [\"success\"],\n \"--info\": [\"info\"],\n \"--money-income\": [\"money-income\"],\n \"--money-expense\": [\"money-expense\"],\n \"--money-net\": [\"money-net\"],\n \"--money-neutral\": [\"money-neutral\"],\n \"--hue-blue\": [\"hue-blue\"],\n \"--hue-indigo\": [\"hue-indigo\"],\n \"--hue-purple\": [\"hue-purple\"],\n \"--hue-teal\": [\"hue-teal\"],\n \"--hue-orange\": [\"hue-orange\"],\n \"--brand-contrast\": [\"brand-contrast\"],\n \"--danger-contrast\": [\"danger-contrast\"],\n \"--warning-contrast\": [\"warning-contrast\"],\n \"--success-contrast\": [\"success-contrast\"],\n \"--info-contrast\": [\"info-contrast\"],\n \"--neutral-contrast\": [\"neutral-contrast\"],\n \"--money-income-contrast\": [\"money-income-contrast\"],\n \"--money-expense-contrast\": [\"money-expense-contrast\"],\n \"--money-net-contrast\": [\"money-net-contrast\"],\n \"--money-neutral-contrast\": [\"money-neutral-contrast\"],\n \"--hue-blue-contrast\": [\"hue-blue-contrast\"],\n \"--hue-indigo-contrast\": [\"hue-indigo-contrast\"],\n \"--hue-purple-contrast\": [\"hue-purple-contrast\"],\n \"--hue-teal-contrast\": [\"hue-teal-contrast\"],\n \"--hue-orange-contrast\": [\"hue-orange-contrast\"],\n \"--media-ink\": [\"media-ink\"],\n },\n \"bg\": {\n \"--bg-page\": [\"page\"],\n \"--bg-surface\": [\"surface\"],\n \"--bg-surface-2\": [\"surface-2\"],\n \"--bg-hover\": [\"hover\"],\n \"--bg-active\": [\"active\"],\n \"--bg-inverse\": [\"inverse\"],\n \"--brand\": [\"brand\"],\n \"--brand-hover\": [\"brand-hover\"],\n \"--brand-bg\": [\"brand-soft\"],\n \"--brand-bg-hover\": [\"brand-soft-hover\"],\n \"--danger\": [\"danger\"],\n \"--danger-hover\": [\"danger-hover\"],\n \"--warning\": [\"warning\"],\n \"--success\": [\"success\"],\n \"--info\": [\"info\"],\n \"--neutral\": [\"neutral\"],\n \"--money-income\": [\"money-income\"],\n \"--money-expense\": [\"money-expense\"],\n \"--money-net\": [\"money-net\"],\n \"--money-neutral\": [\"money-neutral\"],\n \"--danger-bg\": [\"danger-soft\"],\n \"--warning-bg\": [\"warning-soft\"],\n \"--success-bg\": [\"success-soft\"],\n \"--info-bg\": [\"info-soft\"],\n \"--hue-blue\": [\"hue-blue\"],\n \"--hue-indigo\": [\"hue-indigo\"],\n \"--hue-purple\": [\"hue-purple\"],\n \"--hue-teal\": [\"hue-teal\"],\n \"--hue-orange\": [\"hue-orange\"],\n \"--hue-blue-bg\": [\"hue-blue-soft\"],\n \"--hue-indigo-bg\": [\"hue-indigo-soft\"],\n \"--hue-purple-bg\": [\"hue-purple-soft\"],\n \"--hue-teal-bg\": [\"hue-teal-soft\"],\n \"--hue-orange-bg\": [\"hue-orange-soft\"],\n \"--media-scrim\": [\"media-scrim\"],\n \"--media-scrim-hover\": [\"media-scrim-hover\"],\n },\n \"border\": {\n \"--border\": [\"subtle\"],\n \"--border-strong\": [\"strong\"],\n \"--brand\": [\"brand\"],\n \"--danger-border\": [\"danger\"],\n \"--warning-border\": [\"warning\"],\n \"--success-border\": [\"success\"],\n \"--info-border\": [\"info\"],\n \"--danger-border-strong\": [\"danger-strong\"],\n \"--warning-border-strong\": [\"warning-strong\"],\n \"--hue-blue-border\": [\"hue-blue\"],\n \"--hue-indigo-border\": [\"hue-indigo\"],\n \"--hue-purple-border\": [\"hue-purple\"],\n \"--hue-teal-border\": [\"hue-teal\"],\n \"--hue-orange-border\": [\"hue-orange\"],\n \"--media-ink\": [\"media-ink\"],\n },\n \"ring\": {\n \"--border\": [\"subtle\"],\n \"--border-strong\": [\"strong\"],\n \"--brand\": [\"brand\"],\n \"--brand-contrast\": [\"brand-contrast\"],\n \"--danger-border-strong\": [\"danger-strong\"],\n \"--warning-border-strong\": [\"warning-strong\"],\n \"--media-ink\": [\"media-ink\"],\n },\n \"ring-offset\": {\n \"--bg-page\": [\"page\"],\n \"--bg-surface\": [\"surface\"],\n \"--media-scrim-hover\": [\"media-scrim-hover\"],\n },\n \"outline\": {\n \"--border\": [\"subtle\"],\n \"--border-strong\": [\"strong\"],\n \"--brand\": [\"brand\"],\n \"--danger-border-strong\": [\"danger-strong\"],\n \"--warning-border-strong\": [\"warning-strong\"],\n },\n \"fill\": {\n \"--text-primary\": [\"primary\"],\n \"--text-secondary\": [\"secondary\"],\n \"--text-muted\": [\"muted\"],\n \"--bg-surface\": [\"surface\"],\n \"--border\": [\"subtle\"],\n \"--border-strong\": [\"strong\"],\n },\n \"stroke\": {\n \"--text-primary\": [\"primary\"],\n \"--text-secondary\": [\"secondary\"],\n \"--text-muted\": [\"muted\"],\n \"--bg-surface\": [\"surface\"],\n \"--border\": [\"subtle\"],\n \"--border-strong\": [\"strong\"],\n },\n \"ring-width\": {\n \"--focus-ring-width\": [\"focus\"],\n },\n \"outline-width\": {\n \"--focus-ring-width\": [\"focus\"],\n },\n};\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const ROLE_NAMESPACES = {
|
|
3
|
+
text: "text-color",
|
|
4
|
+
bg: "background-color",
|
|
5
|
+
border: "border-color",
|
|
6
|
+
ring: "ring-color",
|
|
7
|
+
"ring-offset": "ring-offset-color",
|
|
8
|
+
outline: "outline-color",
|
|
9
|
+
fill: "fill",
|
|
10
|
+
stroke: "stroke",
|
|
11
|
+
"ring-width": "ring-width",
|
|
12
|
+
"outline-width": "outline-width"
|
|
13
|
+
};
|
|
14
|
+
function roleUtilitiesFromCss(css) {
|
|
15
|
+
const theme = /@theme inline\s*\{([^}]*)\}/.exec(css.replace(/\/\*[\s\S]*?\*\//g, ""))?.[1];
|
|
16
|
+
if (theme === void 0) return null;
|
|
17
|
+
const table = {};
|
|
18
|
+
for (const prop of Object.keys(ROLE_NAMESPACES)) {
|
|
19
|
+
const names = {};
|
|
20
|
+
const declared = new RegExp(`--${ROLE_NAMESPACES[prop]}-([a-z0-9-]+)\\s*:\\s*var\\((--[a-z0-9-]+)\\)`, "g");
|
|
21
|
+
for (const [, name, token] of theme.matchAll(declared)) (names[token] ??= []).push(name);
|
|
22
|
+
table[prop] = names;
|
|
23
|
+
}
|
|
24
|
+
return table;
|
|
25
|
+
}
|
|
26
|
+
const ROLE_CLASS = /(?<=^|[\s"'`:])(text|bg|border(?:-[xytrblse])?|divide|ring-offset|ring|outline|fill|stroke)-\[(length:)?var\((--[a-zA-Z0-9-]+)\)\]/g;
|
|
27
|
+
function findRoleClasses(text, table) {
|
|
28
|
+
if (!text.includes("var(--")) return [];
|
|
29
|
+
const hits = [];
|
|
30
|
+
for (const m of text.matchAll(ROLE_CLASS)) {
|
|
31
|
+
const [found, prop, length, token] = m;
|
|
32
|
+
const key = length ? `${prop}-width` : prop.startsWith("border-") || prop === "divide" ? "border" : prop;
|
|
33
|
+
const names = table[key]?.[token];
|
|
34
|
+
if (names?.length) hits.push({ index: m.index, found, utilities: names.map((name) => `${prop}-${name}`) });
|
|
35
|
+
}
|
|
36
|
+
return hits;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
ROLE_NAMESPACES,
|
|
40
|
+
findRoleClasses,
|
|
41
|
+
roleUtilitiesFromCss
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=role-utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/eslint/role-utilities.ts"],"sourcesContent":["// Which `[var(--token)]` classes have a role utility, and what it is called — the one\n// definition `@eifi1/ui-kit/eslint`'s `role-utilities` rule and `npm run check:tokens`\n// (scripts/check-token-discipline.mjs) both read (round 0.35 R5, Kurvenschmiede's Q6).\n//\n// The table itself is role-utilities.generated.ts, re-rendered from tokens.css's\n// `@theme inline` block by scripts/gen-role-utilities.mjs with the parser below; the\n// check fails while it is stale. So tokens.css stays the source: a role that gains a\n// utility there is flagged in the kit and in the apps from the next release on.\n//\n// This module imports NOTHING, and its TypeScript is erasable only (no enum, no\n// namespace, no parameter property): the check imports it from source under Node's type\n// stripping, before any build, and the plugin ships it to an app's ESLint, which is\n// plain Node with no React and no stylesheet.\n\n/**\n * The properties a role utility exists for, each with the Tailwind theme namespace it is\n * declared in. `ring-width` and `outline-width` are a width typed `length:` —\n * `ring-[length:var(--focus-ring-width)]` is `ring-focus`. `divide-*` and the side borders\n * (`border-t-*`, `border-x-*` …) read `border`'s, as Tailwind does.\n */\nexport const ROLE_NAMESPACES = {\n text: \"text-color\",\n bg: \"background-color\",\n border: \"border-color\",\n ring: \"ring-color\",\n \"ring-offset\": \"ring-offset-color\",\n outline: \"outline-color\",\n fill: \"fill\",\n stroke: \"stroke\",\n \"ring-width\": \"ring-width\",\n \"outline-width\": \"outline-width\",\n} as const;\n\nexport type RoleProperty = keyof typeof ROLE_NAMESPACES;\n\n/**\n * Per property, each token that has a role utility → the utility's name after the\n * property's prefix: `border: { \"--border\": [\"subtle\"] }` is `border-subtle`. A list,\n * because nothing stops two names from reading one token; one name is a fix, several a\n * choice.\n */\nexport type RoleUtilityTable = {\n readonly [P in RoleProperty]: Readonly<Record<string, readonly string[]>>;\n};\n\n/**\n * The table `tokens.css` declares: every `--<namespace>-<name>: var(--<token>)` in its\n * `@theme inline` block, in block order. `null` when there is no such block — the role\n * utilities are gone, or this parser is.\n */\nexport function roleUtilitiesFromCss(css: string): RoleUtilityTable | null {\n const theme = /@theme inline\\s*\\{([^}]*)\\}/.exec(css.replace(/\\/\\*[\\s\\S]*?\\*\\//g, \"\"))?.[1];\n if (theme === undefined) return null;\n const table = {} as Record<RoleProperty, Record<string, string[]>>;\n for (const prop of Object.keys(ROLE_NAMESPACES) as RoleProperty[]) {\n const names: Record<string, string[]> = {};\n const declared = new RegExp(`--${ROLE_NAMESPACES[prop]}-([a-z0-9-]+)\\\\s*:\\\\s*var\\\\((--[a-z0-9-]+)\\\\)`, \"g\");\n for (const [, name, token] of theme.matchAll(declared)) (names[token] ??= []).push(name);\n table[prop] = names;\n }\n return table;\n}\n\n/**\n * `text-[var(--text-muted)]`, `hover:bg-[var(--bg-hover)]`, `border-t-[var(--border)]`,\n * `focus-visible:ring-[var(--brand)]/40`, `ring-offset-[var(--bg-surface)]`,\n * `ring-[length:var(--focus-ring-width)]`. Preceded by a start, a space, a quote or a\n * variant's colon, which the match does not include — nor the variants before it or an\n * opacity or `!` after it — so replacing the match keeps all of them.\n */\nconst ROLE_CLASS =\n /(?<=^|[\\s\"'`:])(text|bg|border(?:-[xytrblse])?|divide|ring-offset|ring|outline|fill|stroke)-\\[(length:)?var\\((--[a-zA-Z0-9-]+)\\)\\]/g;\n\nexport interface RoleClassHit {\n /** Where the class starts in the scanned text, after its variants. */\n index: number;\n /** The class as written, without variants or opacity: `border-t-[var(--border)]`. */\n found: string;\n /** The role utilities that paint the same: `[\"border-t-subtle\"]`. */\n utilities: string[];\n}\n\n/**\n * Every `[var(--token)]` class in `text` whose token has a role utility on that property.\n * A token with no utility there (`text-[var(--chart-1)]`, `--status-*`,\n * `bg-[var(--border)]` as a divider's fill) is not a hit: `[var(--…)]` is right for it.\n */\nexport function findRoleClasses(text: string, table: RoleUtilityTable): RoleClassHit[] {\n if (!text.includes(\"var(--\")) return [];\n const hits: RoleClassHit[] = [];\n for (const m of text.matchAll(ROLE_CLASS)) {\n const [found, prop, length, token] = m;\n // `border-t` and `divide` read `border`'s names; a `length:` hint reads the widths.\n const key = length ? `${prop}-width` : prop.startsWith(\"border-\") || prop === \"divide\" ? \"border\" : prop;\n const names = (table as Partial<Record<string, Readonly<Record<string, readonly string[]>>>>)[key]?.[token];\n if (names?.length) hits.push({ index: m.index, found, utilities: names.map((name) => `${prop}-${name}`) });\n }\n return hits;\n}\n"],"mappings":";AAoBO,MAAM,kBAAkB;AAAA,EAC7B,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,eAAe;AAAA,EACf,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,iBAAiB;AACnB;AAmBO,SAAS,qBAAqB,KAAsC;AACzE,QAAM,QAAQ,8BAA8B,KAAK,IAAI,QAAQ,qBAAqB,EAAE,CAAC,IAAI,CAAC;AAC1F,MAAI,UAAU,OAAW,QAAO;AAChC,QAAM,QAAQ,CAAC;AACf,aAAW,QAAQ,OAAO,KAAK,eAAe,GAAqB;AACjE,UAAM,QAAkC,CAAC;AACzC,UAAM,WAAW,IAAI,OAAO,KAAK,gBAAgB,IAAI,CAAC,iDAAiD,GAAG;AAC1G,eAAW,CAAC,EAAE,MAAM,KAAK,KAAK,MAAM,SAAS,QAAQ,EAAG,EAAC,MAAM,KAAK,MAAM,CAAC,GAAG,KAAK,IAAI;AACvF,UAAM,IAAI,IAAI;AAAA,EAChB;AACA,SAAO;AACT;AASA,MAAM,aACJ;AAgBK,SAAS,gBAAgB,MAAc,OAAyC;AACrF,MAAI,CAAC,KAAK,SAAS,QAAQ,EAAG,QAAO,CAAC;AACtC,QAAM,OAAuB,CAAC;AAC9B,aAAW,KAAK,KAAK,SAAS,UAAU,GAAG;AACzC,UAAM,CAAC,OAAO,MAAM,QAAQ,KAAK,IAAI;AAErC,UAAM,MAAM,SAAS,GAAG,IAAI,WAAW,KAAK,WAAW,SAAS,KAAK,SAAS,WAAW,WAAW;AACpG,UAAM,QAAS,MAA+E,GAAG,IAAI,KAAK;AAC1G,QAAI,OAAO,OAAQ,MAAK,KAAK,EAAE,OAAO,EAAE,OAAO,OAAO,WAAW,MAAM,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;AAAA,EAC3G;AACA,SAAO;AACT;","names":[]}
|
|
@@ -47,8 +47,8 @@ export interface FeedbackMenuProps {
|
|
|
47
47
|
iconBadge?: UserAvatarBadge | null;
|
|
48
48
|
/** Prop > `<UiKitProvider labels={{ feedbackMenu }}>` > English. */
|
|
49
49
|
labels?: LabelOverride<FeedbackMenuLabels>;
|
|
50
|
-
/** Which edge of the trigger the panel lines up with
|
|
51
|
-
*
|
|
50
|
+
/** Which edge of the trigger the panel lines up with, `start` or `end` in the reading
|
|
51
|
+
* direction (see `HoverMenu`, whose type this is). Default `end`. */
|
|
52
52
|
align?: HoverMenuProps["align"];
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/feedback/feedback-menu.tsx"],"sourcesContent":["import { Inbox, MessageSquare } from \"lucide-react\";\nimport type { UserAvatarBadge } from \"../components/user-avatar\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { TopBarActionMenu, type TopBarMenuEntry } from \"../shell/topbar-action-menu\";\nimport type { HoverMenuProps } from \"../components/hover-menu\";\n// The vocabulary module, not the inbox: this menu is in every app's top bar, the inbox\n// is a page (MOD-1).\nimport { FEEDBACK_CATEGORY_META, type FeedbackCategory } from \"./feedback-vocabulary\";\nimport { useFeedbackCategoryLabels } from \"./feedback-labels\";\nimport { FEEDBACK_PICKABLE_CATEGORIES } from \"./feedback-record\";\nimport { DEFAULT_FEEDBACK_MENU_LABELS } from \"./feedback-menu-labels\";\n\n/**\n * `feedbackMenu` — the top-bar feedback menu's own words (0.27.0). The four category rows\n * are `feedbackCategory`'s, shared with the badges and the dialog's picker. de-CH canon\n * (keksdose `de-CH.json`): `trigger` \"Feedback senden\", `myFeedback` \"Mein Feedback\",\n * `viewFeedback` \"Feedback ansehen\".\n */\nexport interface FeedbackMenuLabels {\n /** The trigger's accessible name, and the menu's. keksdose `feedback.send`. */\n trigger: string;\n /** The link to the reporter's own reports — everyone but an admin. keksdose\n * `feedback.my_title`. */\n myFeedback: string;\n /** The link to the inbox — an admin's one list link, in place of \"My feedback\".\n * keksdose `feedback.view_all`. */\n viewFeedback: string;\n}\n\n// Defined in ./feedback-menu-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_MENU_LABELS };\n\nexport interface FeedbackMenuProps {\n /** A category row was chosen — open the submit dialog on it (`useFeedbackSubmit`'s\n * `open`). Never called with `CRASH`: there is no row for it. */\n onFile: (category: FeedbackCategory) => void;\n /** The list link is \"View feedback\" → {@link inboxHref} INSTEAD of \"My feedback\" (§4.1,\n * keksdose `top-bar.tsx:205-214`). The admin check is the app's (kastlan's is\n * company-scoped). Default `false`. */\n isAdmin?: boolean;\n /**\n * Rows of the app's own, between the divider and the list link — keksdose's\n * `Sparkles` Help assistant → `/assistant` and `MessagesSquare` Support chat →\n * `/support` with its unread chip. Any {@link TopBarMenuEntry}; keep their `key`s clear\n * of the menu's own (`BUG`, `IDEA`, `QUESTION`, `OTHER`, `feedback-divider`,\n * `my-feedback`, `view-feedback`).\n */\n extraEntries?: TopBarMenuEntry[];\n /** The user's own reports, linked for everyone but an admin. Default `\"/my-feedback\"`\n * (§2.3). */\n myFeedbackHref?: string;\n /** The admin inbox, linked for an admin. Default `\"/feedback\"` (§2.3). */\n inboxHref?: string;\n /** A dot on the trigger — keksdose's unread support replies (`tone: \"danger\"`). Its\n * `label` joins the trigger's name (\"Send feedback 2 unread\"). The words are the app's. */\n iconBadge?: UserAvatarBadge | null;\n /** Prop > `<UiKitProvider labels={{ feedbackMenu }}>` > English. */\n labels?: LabelOverride<FeedbackMenuLabels>;\n /** Which edge of the trigger the panel lines up with
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-menu.tsx"],"sourcesContent":["import { Inbox, MessageSquare } from \"lucide-react\";\nimport type { UserAvatarBadge } from \"../components/user-avatar\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { TopBarActionMenu, type TopBarMenuEntry } from \"../shell/topbar-action-menu\";\nimport type { HoverMenuProps } from \"../components/hover-menu\";\n// The vocabulary module, not the inbox: this menu is in every app's top bar, the inbox\n// is a page (MOD-1).\nimport { FEEDBACK_CATEGORY_META, type FeedbackCategory } from \"./feedback-vocabulary\";\nimport { useFeedbackCategoryLabels } from \"./feedback-labels\";\nimport { FEEDBACK_PICKABLE_CATEGORIES } from \"./feedback-record\";\nimport { DEFAULT_FEEDBACK_MENU_LABELS } from \"./feedback-menu-labels\";\n\n/**\n * `feedbackMenu` — the top-bar feedback menu's own words (0.27.0). The four category rows\n * are `feedbackCategory`'s, shared with the badges and the dialog's picker. de-CH canon\n * (keksdose `de-CH.json`): `trigger` \"Feedback senden\", `myFeedback` \"Mein Feedback\",\n * `viewFeedback` \"Feedback ansehen\".\n */\nexport interface FeedbackMenuLabels {\n /** The trigger's accessible name, and the menu's. keksdose `feedback.send`. */\n trigger: string;\n /** The link to the reporter's own reports — everyone but an admin. keksdose\n * `feedback.my_title`. */\n myFeedback: string;\n /** The link to the inbox — an admin's one list link, in place of \"My feedback\".\n * keksdose `feedback.view_all`. */\n viewFeedback: string;\n}\n\n// Defined in ./feedback-menu-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_MENU_LABELS };\n\nexport interface FeedbackMenuProps {\n /** A category row was chosen — open the submit dialog on it (`useFeedbackSubmit`'s\n * `open`). Never called with `CRASH`: there is no row for it. */\n onFile: (category: FeedbackCategory) => void;\n /** The list link is \"View feedback\" → {@link inboxHref} INSTEAD of \"My feedback\" (§4.1,\n * keksdose `top-bar.tsx:205-214`). The admin check is the app's (kastlan's is\n * company-scoped). Default `false`. */\n isAdmin?: boolean;\n /**\n * Rows of the app's own, between the divider and the list link — keksdose's\n * `Sparkles` Help assistant → `/assistant` and `MessagesSquare` Support chat →\n * `/support` with its unread chip. Any {@link TopBarMenuEntry}; keep their `key`s clear\n * of the menu's own (`BUG`, `IDEA`, `QUESTION`, `OTHER`, `feedback-divider`,\n * `my-feedback`, `view-feedback`).\n */\n extraEntries?: TopBarMenuEntry[];\n /** The user's own reports, linked for everyone but an admin. Default `\"/my-feedback\"`\n * (§2.3). */\n myFeedbackHref?: string;\n /** The admin inbox, linked for an admin. Default `\"/feedback\"` (§2.3). */\n inboxHref?: string;\n /** A dot on the trigger — keksdose's unread support replies (`tone: \"danger\"`). Its\n * `label` joins the trigger's name (\"Send feedback 2 unread\"). The words are the app's. */\n iconBadge?: UserAvatarBadge | null;\n /** Prop > `<UiKitProvider labels={{ feedbackMenu }}>` > English. */\n labels?: LabelOverride<FeedbackMenuLabels>;\n /** Which edge of the trigger the panel lines up with, `start` or `end` in the reading\n * direction (see `HoverMenu`, whose type this is). Default `end`. */\n align?: HoverMenuProps[\"align\"];\n}\n\n/**\n * The top-bar feedback menu, the same in every app (0.27.0, docs/feedback-harmonization.md\n * §4.1) — keksdose `frontend/src/app/top-bar.tsx:156` on the kit's `TopBarActionMenu`:\n *\n * 1. a `MessageSquare` trigger named \"Send feedback\", with an optional `iconBadge`;\n * 2. Bug · Idea · Question · Other (`Bug`, `Lightbulb`, `HelpCircle`, `MoreHorizontal` —\n * the category badges' own glyphs), each calling `onFile(category)`;\n * 3. a divider, always;\n * 4. the app's `extraEntries`;\n * 5. ONE list link, `Inbox`: an admin's is \"View feedback\" → `/feedback`, everyone\n * else's \"My feedback\" → `/my-feedback` — keksdose's (`top-bar.tsx:205-214`, feedback\n * #331: admins get the management view, everyone else their own submissions).\n *\n * WHY A PRESET. Three apps had drawn three menus on the same primitive and they disagreed:\n * kastlan headed it \"New submission\", Kurvenschmiede \"Send feedback\" with a single link\n * that changed its words by role, keksdose had no heading and one link by role. keksdose\n * is the source (§2.4, §7.11): no heading, one link — the inbox for an admin, who reaches\n * their own reports there too — and the kit draws it, so the row order, the icons and the\n * words cannot drift again. Where the menu sits in the bar stays each app's.\n *\n * `CRASH` has no row and never will: crash reports are filed by the error boundary with\n * the stack and a fingerprint (keksdose feedback #160), and a hand-filed \"crash\" would sort\n * to the top like one with none of what makes it actionable. The server refuses it with a\n * 422 anyway (§3.4).\n *\n * The menu forwards nothing to its trigger, as `TopBarActionMenu` does not: keksdose's\n * tour anchor (`data-tour=\"feedback-menu\"`) stays on a wrapping `<span>`. Needs a router,\n * as every `TopBarActionMenu` with link rows does.\n */\nexport function FeedbackMenu({\n onFile,\n isAdmin = false,\n extraEntries,\n myFeedbackHref = \"/my-feedback\",\n inboxHref = \"/feedback\",\n iconBadge,\n labels: labelsProp,\n align,\n}: FeedbackMenuProps) {\n const labels = useKitLabels(\"feedbackMenu\", DEFAULT_FEEDBACK_MENU_LABELS, labelsProp);\n const categoryLabels = useFeedbackCategoryLabels();\n const entries: TopBarMenuEntry[] = [\n ...FEEDBACK_PICKABLE_CATEGORIES.map((category): TopBarMenuEntry => {\n const Icon = FEEDBACK_CATEGORY_META[category].icon;\n return {\n key: category,\n icon: <Icon className=\"size-4\" />,\n label: categoryLabels[category],\n onSelect: () => onFile(category),\n };\n }),\n { kind: \"divider\", key: \"feedback-divider\" },\n ...(extraEntries ?? []),\n {\n kind: \"link\",\n key: isAdmin ? \"view-feedback\" : \"my-feedback\",\n to: isAdmin ? inboxHref : myFeedbackHref,\n icon: <Inbox className=\"size-4\" />,\n label: isAdmin ? labels.viewFeedback : labels.myFeedback,\n },\n ];\n return (\n <TopBarActionMenu\n icon={<MessageSquare className=\"size-5\" />}\n iconBadge={iconBadge}\n aria-label={labels.trigger}\n entries={entries}\n align={align}\n />\n );\n}\n"],"mappings":";AA6Gc;AA7Gd,SAAS,OAAO,qBAAqB;AAErC,SAAS,oBAAwC;AACjD,SAAS,wBAA8C;AAIvD,SAAS,8BAAqD;AAC9D,SAAS,iCAAiC;AAC1C,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAkFtC,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,EACR;AACF,GAAsB;AACpB,QAAM,SAAS,aAAa,gBAAgB,8BAA8B,UAAU;AACpF,QAAM,iBAAiB,0BAA0B;AACjD,QAAM,UAA6B;AAAA,IACjC,GAAG,6BAA6B,IAAI,CAAC,aAA8B;AACjE,YAAM,OAAO,uBAAuB,QAAQ,EAAE;AAC9C,aAAO;AAAA,QACL,KAAK;AAAA,QACL,MAAM,oBAAC,QAAK,WAAU,UAAS;AAAA,QAC/B,OAAO,eAAe,QAAQ;AAAA,QAC9B,UAAU,MAAM,OAAO,QAAQ;AAAA,MACjC;AAAA,IACF,CAAC;AAAA,IACD,EAAE,MAAM,WAAW,KAAK,mBAAmB;AAAA,IAC3C,GAAI,gBAAgB,CAAC;AAAA,IACrB;AAAA,MACE,MAAM;AAAA,MACN,KAAK,UAAU,kBAAkB;AAAA,MACjC,IAAI,UAAU,YAAY;AAAA,MAC1B,MAAM,oBAAC,SAAM,WAAU,UAAS;AAAA,MAChC,OAAO,UAAU,OAAO,eAAe,OAAO;AAAA,IAChD;AAAA,EACF;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,oBAAC,iBAAc,WAAU,UAAS;AAAA,MACxC;AAAA,MACA,cAAY,OAAO;AAAA,MACnB;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -330,7 +330,7 @@ export interface FeedbackComposerProps {
|
|
|
330
330
|
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
|
-
* What a {@link
|
|
333
|
+
* What a {@link ChatComposer} `ref` holds.
|
|
334
334
|
*
|
|
335
335
|
* keksdose F9: the support admin answers the same five questions all day and wants
|
|
336
336
|
* chips above the box ("Thanks, fixed in the next release") that drop their text in
|
|
@@ -358,15 +358,10 @@ export interface FeedbackComposerHandle {
|
|
|
358
358
|
* Named for what it is since 0.22 (keksdose K17): the component was never
|
|
359
359
|
* feedback-specific — a textarea, an optional picture or a host's upload slot, Send,
|
|
360
360
|
* `sendOn="enter"` for the chat way — and keksdose's assistant and support chat are
|
|
361
|
-
* chats, not reports. `FeedbackComposer
|
|
361
|
+
* chats, not reports. `FeedbackComposer`, its old name, was removed in 0.35 (refactor
|
|
362
|
+
* audit 2026-10, API-6d; deprecated in 0.34); its types keep theirs.
|
|
362
363
|
*/
|
|
363
364
|
export declare function ChatComposer({ onSend, pending, attachment, attachmentSlot, canSend: canSendProp, sendOn, disabledReason, commit, rows, maxLength, showCount, countLabels, placeholder, value, onValueChange, ref, labels: labelsProp, className, id, size, ...rest }: FeedbackComposerProps): import("react").JSX.Element;
|
|
364
|
-
/**
|
|
365
|
-
* @deprecated 0.34 — `ChatComposer`, the same function under the name that is not about
|
|
366
|
-
* feedback; removed in 0.35 (refactor audit 2026-10, API-6d). keksdose's support thread
|
|
367
|
-
* is the one app site.
|
|
368
|
-
*/
|
|
369
|
-
export declare const FeedbackComposer: typeof ChatComposer;
|
|
370
365
|
/** {@link FeedbackComposerProps}, for {@link ChatComposer}. */
|
|
371
366
|
export type ChatComposerProps = FeedbackComposerProps;
|
|
372
367
|
/** {@link FeedbackComposerHandle}, for {@link ChatComposer}. */
|
|
@@ -387,12 +387,10 @@ function dataAttributes(props) {
|
|
|
387
387
|
for (const [key, value] of Object.entries(props)) if (key.startsWith("data-")) out[key] = value;
|
|
388
388
|
return out;
|
|
389
389
|
}
|
|
390
|
-
const FeedbackComposer = ChatComposer;
|
|
391
390
|
export {
|
|
392
391
|
ChatComposer,
|
|
393
392
|
DEFAULT_FEEDBACK_COMPOSER_LABELS,
|
|
394
393
|
DEFAULT_FEEDBACK_THREAD_LABELS,
|
|
395
|
-
FeedbackComposer,
|
|
396
394
|
FeedbackThread
|
|
397
395
|
};
|
|
398
396
|
//# sourceMappingURL=feedback-thread.js.map
|