@entifix/react-controls 0.18.2 → 0.20.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 +13 -5
- package/dist/i18n/catalog/en.d.ts.map +1 -1
- package/dist/i18n/catalog/en.js +68 -10
- package/dist/i18n/catalog/en.js.map +1 -1
- package/dist/i18n/catalog/es.d.ts +76 -5
- package/dist/i18n/catalog/es.d.ts.map +1 -1
- package/dist/i18n/catalog/es.js +74 -10
- package/dist/i18n/catalog/es.js.map +1 -1
- package/dist/i18n/catalog/index.d.ts +126 -10
- package/dist/i18n/catalog/index.d.ts.map +1 -1
- package/dist/i18n/entity-labels.d.ts +14 -0
- package/dist/i18n/entity-labels.d.ts.map +1 -1
- package/dist/i18n/entity-labels.js +15 -0
- package/dist/i18n/entity-labels.js.map +1 -1
- package/dist/i18n/i18n-context.js +2 -2
- package/dist/i18n/i18n-context.js.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/primitives.d.ts +7 -1
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +7 -1
- package/dist/primitives.js.map +1 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/theme-context.d.ts +35 -7
- package/dist/theme/theme-context.d.ts.map +1 -1
- package/dist/theme/theme-context.js +109 -21
- package/dist/theme/theme-context.js.map +1 -1
- package/dist/theme/theme-cookie.d.ts +9 -0
- package/dist/theme/theme-cookie.d.ts.map +1 -0
- package/dist/theme/theme-cookie.js +8 -0
- package/dist/theme/theme-cookie.js.map +1 -0
- package/dist/theme/theme-script.d.ts +8 -5
- package/dist/theme/theme-script.d.ts.map +1 -1
- package/dist/theme/theme-script.js +24 -10
- package/dist/theme/theme-script.js.map +1 -1
- package/dist/theme/types.d.ts +19 -3
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/types.js.map +1 -1
- package/dist/ui/actions/action-surfaces.d.ts +1 -1
- package/dist/ui/actions/action-surfaces.js +1 -1
- package/dist/ui/actions/action-surfaces.js.map +1 -1
- package/dist/ui/actions/error-actions.d.ts +32 -0
- package/dist/ui/actions/error-actions.d.ts.map +1 -0
- package/dist/ui/actions/error-actions.js +40 -0
- package/dist/ui/actions/error-actions.js.map +1 -0
- package/dist/ui/actions/index.d.ts +2 -0
- package/dist/ui/actions/index.d.ts.map +1 -1
- package/dist/ui/actions/index.js +2 -0
- package/dist/ui/actions/index.js.map +1 -1
- package/dist/ui/actions/shortcut.d.ts +13 -0
- package/dist/ui/actions/shortcut.d.ts.map +1 -0
- package/dist/ui/actions/shortcut.js +18 -0
- package/dist/ui/actions/shortcut.js.map +1 -0
- package/dist/ui/actions/use-verb-invoker.d.ts +50 -0
- package/dist/ui/actions/use-verb-invoker.d.ts.map +1 -0
- package/dist/ui/actions/use-verb-invoker.js +93 -0
- package/dist/ui/actions/use-verb-invoker.js.map +1 -0
- package/dist/ui/atoms/alert/alert-dismiss.d.ts +9 -0
- package/dist/ui/atoms/alert/alert-dismiss.d.ts.map +1 -0
- package/dist/ui/atoms/alert/alert-dismiss.js +28 -0
- package/dist/ui/atoms/alert/alert-dismiss.js.map +1 -0
- package/dist/ui/atoms/alert/alert.d.ts +24 -0
- package/dist/ui/atoms/alert/alert.d.ts.map +1 -0
- package/dist/ui/atoms/alert/alert.js +50 -0
- package/dist/ui/atoms/alert/alert.js.map +1 -0
- package/dist/ui/atoms/alert/index.d.ts +3 -0
- package/dist/ui/atoms/alert/index.d.ts.map +1 -0
- package/dist/ui/atoms/alert/index.js +4 -0
- package/dist/ui/atoms/alert/index.js.map +1 -0
- package/dist/ui/atoms/alert/tone.d.ts +8 -0
- package/dist/ui/atoms/alert/tone.d.ts.map +1 -0
- package/dist/ui/atoms/alert/tone.js +11 -0
- package/dist/ui/atoms/alert/tone.js.map +1 -0
- package/dist/ui/atoms/button/button-recipe.js +1 -1
- package/dist/ui/atoms/button/button-recipe.js.map +1 -1
- package/dist/ui/atoms/button/index.d.ts +1 -0
- package/dist/ui/atoms/button/index.d.ts.map +1 -1
- package/dist/ui/atoms/button/index.js +1 -0
- package/dist/ui/atoms/button/index.js.map +1 -1
- package/dist/ui/atoms/button/submit-button.d.ts +13 -0
- package/dist/ui/atoms/button/submit-button.d.ts.map +1 -0
- package/dist/ui/atoms/button/submit-button.js +29 -0
- package/dist/ui/atoms/button/submit-button.js.map +1 -0
- package/dist/ui/atoms/cell-value/cell-value.d.ts +6 -1
- package/dist/ui/atoms/cell-value/cell-value.d.ts.map +1 -1
- package/dist/ui/atoms/cell-value/cell-value.js +48 -16
- package/dist/ui/atoms/cell-value/cell-value.js.map +1 -1
- package/dist/ui/atoms/field/checkbox.d.ts.map +1 -1
- package/dist/ui/atoms/field/checkbox.js +21 -1
- package/dist/ui/atoms/field/checkbox.js.map +1 -1
- package/dist/ui/atoms/field/field.js +1 -1
- package/dist/ui/atoms/field/field.js.map +1 -1
- package/dist/ui/atoms/field-control/field-control.d.ts +7 -1
- package/dist/ui/atoms/field-control/field-control.d.ts.map +1 -1
- package/dist/ui/atoms/field-control/field-control.js +25 -3
- package/dist/ui/atoms/field-control/field-control.js.map +1 -1
- package/dist/ui/atoms/money/index.d.ts +4 -0
- package/dist/ui/atoms/money/index.d.ts.map +1 -0
- package/dist/ui/atoms/money/index.js +5 -0
- package/dist/ui/atoms/money/index.js.map +1 -0
- package/dist/ui/atoms/money/money-input.d.ts +19 -0
- package/dist/ui/atoms/money/money-input.d.ts.map +1 -0
- package/dist/ui/atoms/money/money-input.js +75 -0
- package/dist/ui/atoms/money/money-input.js.map +1 -0
- package/dist/ui/atoms/money/money-math.d.ts +21 -0
- package/dist/ui/atoms/money/money-math.d.ts.map +1 -0
- package/dist/ui/atoms/money/money-math.js +36 -0
- package/dist/ui/atoms/money/money-math.js.map +1 -0
- package/dist/ui/atoms/money/money.d.ts +19 -0
- package/dist/ui/atoms/money/money.d.ts.map +1 -0
- package/dist/ui/atoms/money/money.js +26 -0
- package/dist/ui/atoms/money/money.js.map +1 -0
- package/dist/ui/atoms/number-input/index.d.ts +3 -0
- package/dist/ui/atoms/number-input/index.d.ts.map +1 -0
- package/dist/ui/atoms/number-input/index.js +4 -0
- package/dist/ui/atoms/number-input/index.js.map +1 -0
- package/dist/ui/atoms/number-input/number-input.d.ts +10 -0
- package/dist/ui/atoms/number-input/number-input.d.ts.map +1 -0
- package/dist/ui/atoms/number-input/number-input.js +23 -0
- package/dist/ui/atoms/number-input/number-input.js.map +1 -0
- package/dist/ui/atoms/number-input/quantity-input.d.ts +29 -0
- package/dist/ui/atoms/number-input/quantity-input.d.ts.map +1 -0
- package/dist/ui/atoms/number-input/quantity-input.js +100 -0
- package/dist/ui/atoms/number-input/quantity-input.js.map +1 -0
- package/dist/ui/atoms/skeleton/skeleton.js +1 -1
- package/dist/ui/atoms/skeleton/skeleton.js.map +1 -1
- package/dist/ui/atoms/status-tag/index.d.ts +2 -0
- package/dist/ui/atoms/status-tag/index.d.ts.map +1 -0
- package/dist/ui/atoms/status-tag/index.js +3 -0
- package/dist/ui/atoms/status-tag/index.js.map +1 -0
- package/dist/ui/atoms/status-tag/status-tag.d.ts +17 -0
- package/dist/ui/atoms/status-tag/status-tag.d.ts.map +1 -0
- package/dist/ui/atoms/status-tag/status-tag.js +37 -0
- package/dist/ui/atoms/status-tag/status-tag.js.map +1 -0
- package/dist/ui/atoms/switch/switch.d.ts.map +1 -1
- package/dist/ui/atoms/switch/switch.js +6 -3
- package/dist/ui/atoms/switch/switch.js.map +1 -1
- package/dist/ui/atoms/table/table.d.ts +12 -3
- package/dist/ui/atoms/table/table.d.ts.map +1 -1
- package/dist/ui/atoms/table/table.js +59 -10
- package/dist/ui/atoms/table/table.js.map +1 -1
- package/dist/ui/atoms/text/text.d.ts +2 -2
- package/dist/ui/atoms/text/text.d.ts.map +1 -1
- package/dist/ui/atoms/text/text.js.map +1 -1
- package/dist/ui/molecules/action-bar/action-bar.d.ts +76 -0
- package/dist/ui/molecules/action-bar/action-bar.d.ts.map +1 -0
- package/dist/ui/molecules/action-bar/action-bar.js +218 -0
- package/dist/ui/molecules/action-bar/action-bar.js.map +1 -0
- package/dist/ui/molecules/action-bar/index.d.ts +2 -0
- package/dist/ui/molecules/action-bar/index.d.ts.map +1 -0
- package/dist/ui/molecules/action-bar/index.js +3 -0
- package/dist/ui/molecules/action-bar/index.js.map +1 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts +11 -2
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.js +9 -7
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.d.ts.map +1 -1
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js +8 -10
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js.map +1 -1
- package/dist/ui/molecules/bulk-result/bulk-result.d.ts +3 -3
- package/dist/ui/molecules/bulk-result/bulk-result.js +4 -4
- package/dist/ui/molecules/bulk-result/bulk-result.js.map +1 -1
- package/dist/ui/molecules/column-settings/column-settings.js +1 -1
- package/dist/ui/molecules/column-settings/column-settings.js.map +1 -1
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts +24 -9
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts.map +1 -1
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js +38 -13
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js.map +1 -1
- package/dist/ui/molecules/description-list/description-list.d.ts +17 -0
- package/dist/ui/molecules/description-list/description-list.d.ts.map +1 -0
- package/dist/ui/molecules/description-list/description-list.js +36 -0
- package/dist/ui/molecules/description-list/description-list.js.map +1 -0
- package/dist/ui/molecules/description-list/index.d.ts +2 -0
- package/dist/ui/molecules/description-list/index.d.ts.map +1 -0
- package/dist/ui/molecules/description-list/index.js +3 -0
- package/dist/ui/molecules/description-list/index.js.map +1 -0
- package/dist/ui/molecules/drawer/drawer.js +3 -3
- package/dist/ui/molecules/drawer/drawer.js.map +1 -1
- package/dist/ui/molecules/empty-state/empty-state.d.ts +15 -0
- package/dist/ui/molecules/empty-state/empty-state.d.ts.map +1 -0
- package/dist/ui/molecules/empty-state/empty-state.js +29 -0
- package/dist/ui/molecules/empty-state/empty-state.js.map +1 -0
- package/dist/ui/molecules/empty-state/index.d.ts +2 -0
- package/dist/ui/molecules/empty-state/index.d.ts.map +1 -0
- package/dist/ui/molecules/empty-state/index.js +3 -0
- package/dist/ui/molecules/empty-state/index.js.map +1 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts.map +1 -1
- package/dist/ui/molecules/entity-link-input/entity-link-input.js +7 -4
- package/dist/ui/molecules/entity-link-input/entity-link-input.js.map +1 -1
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js +2 -2
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js.map +1 -1
- package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts +33 -20
- package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts.map +1 -1
- package/dist/ui/molecules/entity-record-card/entity-record-card.js +53 -20
- package/dist/ui/molecules/entity-record-card/entity-record-card.js.map +1 -1
- package/dist/ui/molecules/filter-builder/filter-builder.d.ts +8 -2
- package/dist/ui/molecules/filter-builder/filter-builder.d.ts.map +1 -1
- package/dist/ui/molecules/filter-builder/filter-builder.js +14 -5
- package/dist/ui/molecules/filter-builder/filter-builder.js.map +1 -1
- package/dist/ui/molecules/filter-chips/filter-chips.d.ts +16 -0
- package/dist/ui/molecules/filter-chips/filter-chips.d.ts.map +1 -0
- package/dist/ui/molecules/filter-chips/filter-chips.js +73 -0
- package/dist/ui/molecules/filter-chips/filter-chips.js.map +1 -0
- package/dist/ui/molecules/filter-chips/index.d.ts +2 -0
- package/dist/ui/molecules/filter-chips/index.d.ts.map +1 -0
- package/dist/ui/molecules/filter-chips/index.js +3 -0
- package/dist/ui/molecules/filter-chips/index.js.map +1 -0
- package/dist/ui/molecules/media-gallery/index.d.ts +2 -0
- package/dist/ui/molecules/media-gallery/index.d.ts.map +1 -0
- package/dist/ui/molecules/media-gallery/index.js +3 -0
- package/dist/ui/molecules/media-gallery/index.js.map +1 -0
- package/dist/ui/molecules/media-gallery/media-gallery.d.ts +31 -0
- package/dist/ui/molecules/media-gallery/media-gallery.d.ts.map +1 -0
- package/dist/ui/molecules/media-gallery/media-gallery.js +64 -0
- package/dist/ui/molecules/media-gallery/media-gallery.js.map +1 -0
- package/dist/ui/molecules/menu/menu.d.ts +11 -1
- package/dist/ui/molecules/menu/menu.d.ts.map +1 -1
- package/dist/ui/molecules/menu/menu.js +68 -6
- package/dist/ui/molecules/menu/menu.js.map +1 -1
- package/dist/ui/molecules/nav-menu/nav-menu.js +4 -4
- package/dist/ui/molecules/nav-menu/nav-menu.js.map +1 -1
- package/dist/ui/molecules/pagination/pagination.d.ts +5 -0
- package/dist/ui/molecules/pagination/pagination.d.ts.map +1 -1
- package/dist/ui/molecules/pagination/pagination.js +35 -18
- package/dist/ui/molecules/pagination/pagination.js.map +1 -1
- package/dist/ui/molecules/region-state/index.d.ts +2 -0
- package/dist/ui/molecules/region-state/index.d.ts.map +1 -0
- package/dist/ui/molecules/region-state/index.js +3 -0
- package/dist/ui/molecules/region-state/index.js.map +1 -0
- package/dist/ui/molecules/region-state/region-state.d.ts +42 -0
- package/dist/ui/molecules/region-state/region-state.d.ts.map +1 -0
- package/dist/ui/molecules/region-state/region-state.js +83 -0
- package/dist/ui/molecules/region-state/region-state.js.map +1 -0
- package/dist/ui/molecules/segmented-nav/segment-classes.d.ts +3 -3
- package/dist/ui/molecules/segmented-nav/segment-classes.d.ts.map +1 -1
- package/dist/ui/molecules/segmented-nav/segment-classes.js +2 -2
- package/dist/ui/molecules/segmented-nav/segment-classes.js.map +1 -1
- package/dist/ui/molecules/segmented-nav/segmented-nav.d.ts +14 -4
- package/dist/ui/molecules/segmented-nav/segmented-nav.d.ts.map +1 -1
- package/dist/ui/molecules/segmented-nav/segmented-nav.js +6 -5
- package/dist/ui/molecules/segmented-nav/segmented-nav.js.map +1 -1
- package/dist/ui/molecules/split-view/split-view.js +3 -3
- package/dist/ui/molecules/split-view/split-view.js.map +1 -1
- package/dist/ui/molecules/tab-strip/tab-strip.d.ts +51 -12
- package/dist/ui/molecules/tab-strip/tab-strip.d.ts.map +1 -1
- package/dist/ui/molecules/tab-strip/tab-strip.js +125 -34
- package/dist/ui/molecules/tab-strip/tab-strip.js.map +1 -1
- package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts +3 -1
- package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts.map +1 -1
- package/dist/ui/molecules/table-toolbar/table-toolbar.js +3 -2
- package/dist/ui/molecules/table-toolbar/table-toolbar.js.map +1 -1
- package/dist/ui/molecules/toast-region/toast-region.d.ts +63 -19
- package/dist/ui/molecules/toast-region/toast-region.d.ts.map +1 -1
- package/dist/ui/molecules/toast-region/toast-region.js +129 -42
- package/dist/ui/molecules/toast-region/toast-region.js.map +1 -1
- package/dist/ui/organisms/command-palette/command-palette.d.ts.map +1 -1
- package/dist/ui/organisms/command-palette/command-palette.js +25 -18
- package/dist/ui/organisms/command-palette/command-palette.js.map +1 -1
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.d.ts.map +1 -1
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js +8 -3
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.d.ts +1 -1
- package/dist/ui/organisms/entity-form/entity-form.d.ts.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.js +325 -215
- package/dist/ui/organisms/entity-form/entity-form.js.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts +8 -0
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.types.js.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.d.ts +1 -1
- package/dist/ui/organisms/entity-table/entity-table.d.ts.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.js +334 -198
- package/dist/ui/organisms/entity-table/entity-table.js.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts +19 -4
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.types.js.map +1 -1
- package/dist/ui/organisms/entity-table/header-sort.d.ts +18 -0
- package/dist/ui/organisms/entity-table/header-sort.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/header-sort.js +54 -0
- package/dist/ui/organisms/entity-table/header-sort.js.map +1 -0
- package/dist/ui/organisms/entity-table/pivot.d.ts +25 -0
- package/dist/ui/organisms/entity-table/pivot.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/pivot.js +106 -0
- package/dist/ui/organisms/entity-table/pivot.js.map +1 -0
- package/dist/ui/organisms/entity-table/use-result-announcement.d.ts +13 -0
- package/dist/ui/organisms/entity-table/use-result-announcement.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/use-result-announcement.js +31 -0
- package/dist/ui/organisms/entity-table/use-result-announcement.js.map +1 -0
- package/dist/ui/organisms/top-bar/live-indicator.d.ts +11 -0
- package/dist/ui/organisms/top-bar/live-indicator.d.ts.map +1 -0
- package/dist/ui/organisms/top-bar/live-indicator.js +46 -0
- package/dist/ui/organisms/top-bar/live-indicator.js.map +1 -0
- package/dist/ui/organisms/top-bar/top-bar.d.ts +11 -2
- package/dist/ui/organisms/top-bar/top-bar.d.ts.map +1 -1
- package/dist/ui/organisms/top-bar/top-bar.js +14 -5
- package/dist/ui/organisms/top-bar/top-bar.js.map +1 -1
- package/dist/ui/organisms/wizard/wizard.d.ts +1 -1
- package/dist/ui/organisms/wizard/wizard.d.ts.map +1 -1
- package/dist/ui/organisms/wizard/wizard.js +7 -1
- package/dist/ui/organisms/wizard/wizard.js.map +1 -1
- package/dist/ui/organisms/wizard/wizard.types.d.ts +8 -0
- package/dist/ui/organisms/wizard/wizard.types.d.ts.map +1 -1
- package/dist/ui/organisms/wizard/wizard.types.js.map +1 -1
- package/dist/ui/utils/live-updates.d.ts +24 -0
- package/dist/ui/utils/live-updates.d.ts.map +1 -0
- package/dist/ui/utils/live-updates.js +20 -0
- package/dist/ui/utils/live-updates.js.map +1 -0
- package/dist/ui/utils/use-focus-on-arrival.d.ts +14 -0
- package/dist/ui/utils/use-focus-on-arrival.d.ts.map +1 -0
- package/dist/ui/utils/use-focus-on-arrival.js +42 -0
- package/dist/ui/utils/use-focus-on-arrival.js.map +1 -0
- package/dist/ui/utils/use-hotkey.d.ts +44 -25
- package/dist/ui/utils/use-hotkey.d.ts.map +1 -1
- package/dist/ui/utils/use-hotkey.js +80 -48
- package/dist/ui/utils/use-hotkey.js.map +1 -1
- package/package.json +5 -5
- package/dist/ui/molecules/split-button/index.d.ts +0 -2
- package/dist/ui/molecules/split-button/index.d.ts.map +0 -1
- package/dist/ui/molecules/split-button/index.js +0 -3
- package/dist/ui/molecules/split-button/index.js.map +0 -1
- package/dist/ui/molecules/split-button/split-button.d.ts +0 -21
- package/dist/ui/molecules/split-button/split-button.d.ts.map +0 -1
- package/dist/ui/molecules/split-button/split-button.js +0 -35
- package/dist/ui/molecules/split-button/split-button.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ui/actions/action-surfaces.ts"],"sourcesContent":["import {\n type UseCaseBinding,\n type UseCaseDescriptor,\n type UseCasePlacement,\n} from '@entifix/core';\n\n/**\n * Where a declared verb is rendered.\n *\n * The use-case descriptor has two independent axes, and at first only one\n * surface, so four of the nine cells had nowhere to go: `EntityForm` filtered\n * `binding === 'entity' && placement !== 'context-dependent'` and everything\n * else was dropped without a word. This is the map that closes it —\n * **placement decides the surface, binding decides the payload** — and it lives\n * in one module so no surface re-derives it and the two axes cannot drift\n * apart again.\n */\nexport const ACTION_SURFACES = [\n 'form-header',\n 'form-footer',\n 'row-menu',\n 'bulk-bar',\n 'table-toolbar',\n 'command-palette',\n] as const;\nexport type ActionSurface = (typeof ACTION_SURFACES)[number];\n\n/**\n * The nine cells, exhaustively.\n *\n * `collection` + `determining` is deliberately absent, and asking for it\n * throws rather than returning `undefined`. A determining action *finalizes a\n * page* — it is the footer that ends an object page — and a list screen has no\n * such thing to finalize, which is Fiori's own rule. Dropping it silently is\n * the fault this repo already writes an assertion against elsewhere: the verb\n * would be declared, granted, exported, pass every check a register runs,\n * and simply never appear, which reads to its author as \"the permission is\n * wrong\" and sends them looking in the wrong place entirely.\n */\nconst SURFACE_BY_CELL: Record<string, ActionSurface> = {\n 'entity:context-independent': 'form-header',\n 'entity:determining': 'form-footer',\n 'entity:context-dependent': 'row-menu',\n 'collection:context-dependent': 'bulk-bar',\n 'collection:context-independent': 'table-toolbar',\n 'unbound:context-dependent': 'command-palette',\n 'unbound:context-independent': 'command-palette',\n 'unbound:determining': 'command-palette',\n};\n\n/**\n * The overflow trigger's glyph.\n *\n * A constant rather than a literal in JSX, because `react/jsx-no-literals`\n * fails the build on written-in copy and is right to: it cannot tell a\n * typographic glyph from a forgotten Spanish string. The trigger's *name* is a\n * catalog key (`
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/actions/action-surfaces.ts"],"sourcesContent":["import {\n type UseCaseBinding,\n type UseCaseDescriptor,\n type UseCasePlacement,\n} from '@entifix/core';\n\n/**\n * Where a declared verb is rendered.\n *\n * The use-case descriptor has two independent axes, and at first only one\n * surface, so four of the nine cells had nowhere to go: `EntityForm` filtered\n * `binding === 'entity' && placement !== 'context-dependent'` and everything\n * else was dropped without a word. This is the map that closes it —\n * **placement decides the surface, binding decides the payload** — and it lives\n * in one module so no surface re-derives it and the two axes cannot drift\n * apart again.\n */\nexport const ACTION_SURFACES = [\n 'form-header',\n 'form-footer',\n 'row-menu',\n 'bulk-bar',\n 'table-toolbar',\n 'command-palette',\n] as const;\nexport type ActionSurface = (typeof ACTION_SURFACES)[number];\n\n/**\n * The nine cells, exhaustively.\n *\n * `collection` + `determining` is deliberately absent, and asking for it\n * throws rather than returning `undefined`. A determining action *finalizes a\n * page* — it is the footer that ends an object page — and a list screen has no\n * such thing to finalize, which is Fiori's own rule. Dropping it silently is\n * the fault this repo already writes an assertion against elsewhere: the verb\n * would be declared, granted, exported, pass every check a register runs,\n * and simply never appear, which reads to its author as \"the permission is\n * wrong\" and sends them looking in the wrong place entirely.\n */\nconst SURFACE_BY_CELL: Record<string, ActionSurface> = {\n 'entity:context-independent': 'form-header',\n 'entity:determining': 'form-footer',\n 'entity:context-dependent': 'row-menu',\n 'collection:context-dependent': 'bulk-bar',\n 'collection:context-independent': 'table-toolbar',\n 'unbound:context-dependent': 'command-palette',\n 'unbound:context-independent': 'command-palette',\n 'unbound:determining': 'command-palette',\n};\n\n/**\n * The overflow trigger's glyph.\n *\n * A constant rather than a literal in JSX, because `react/jsx-no-literals`\n * fails the build on written-in copy and is right to: it cannot tell a\n * typographic glyph from a forgotten Spanish string. The trigger's *name* is a\n * catalog key (`actions.more`, `actions.forRecord`) — this is only the mark,\n * and it is never read aloud.\n */\nexport const OVERFLOW_GLYPH = '\\u22ef';\n\n/** Which surface renders one cell. Throws on a cell no surface owns. */\nfunction surfaceForCell(\n key: string,\n binding: UseCaseBinding,\n placement: UseCasePlacement,\n): ActionSurface {\n const surface = SURFACE_BY_CELL[`${binding}:${placement}`];\n\n if (surface === undefined) {\n throw new Error(\n `The use case \"${key}\" is declared ${binding} + ${placement}, which no surface renders. ` +\n 'A `determining` action finalizes a page — it is an object page’s footer — and a list ' +\n 'screen has no page to finalize, so a collection-bound verb cannot be determining. ' +\n 'Declare it `context-dependent` to reach the bulk bar, or `context-independent` to sit ' +\n 'in the table toolbar.',\n );\n }\n\n return surface;\n}\n\n/**\n * Every surface this descriptor renders on.\n *\n * ⚠️ **A verb may name more than one cell**, and that is what makes publishing\n * reachable from a form header, a row menu and a selection without becoming\n * three permissions. The primary `binding` + `placement` come first, then\n * whatever `alsoAt` adds, and each is validated the same way — an illegal cell\n * in `alsoAt` throws exactly as one in the primary pair does.\n *\n * Duplicates are collapsed. A descriptor that named the same cell twice would\n * otherwise render the verb twice in one menu, which reads as a bug in the\n * screen rather than in the declaration.\n */\nexport function surfacesFor(\n descriptor: UseCaseDescriptor,\n): readonly ActionSurface[] {\n const cells = [\n { binding: descriptor.binding, placement: descriptor.placement },\n ...(descriptor.alsoAt ?? []),\n ];\n\n return [\n ...new Set(\n cells.map(cell =>\n surfaceForCell(descriptor.key, cell.binding, cell.placement),\n ),\n ),\n ];\n}\n\n/**\n * The single surface this descriptor renders on.\n *\n * Kept for the callers that genuinely have one — the command palette asks \"is\n * this mine?\" of an `unbound` verb, which can only ever be in one place. Any\n * caller that renders a *list* of verbs wants {@link surfacesFor}.\n */\nexport function surfaceFor(descriptor: UseCaseDescriptor): ActionSurface {\n return surfaceForCell(\n descriptor.key,\n descriptor.binding,\n descriptor.placement,\n );\n}\n\n/**\n * The descriptors one surface should render, in declaration order.\n *\n * Every descriptor is passed through {@link surfacesFor}, so an unrenderable\n * cell throws on the **first render of any surface** rather than only on the\n * one that would have shown it — the same reason\n * `assertLinkSourcesAreEditable` runs as one pass over the registry instead of\n * per row: a check that only fires on the screen that was already looking for\n * the verb is a check that fires after the bug is reported. A cell declared in\n * `alsoAt` is validated on that same first render, not on the surface it names.\n */\nexport function useCasesForSurface(\n surface: ActionSurface,\n useCases: readonly UseCaseDescriptor[] | undefined,\n): UseCaseDescriptor[] {\n return (useCases ?? []).filter(descriptor =>\n surfacesFor(descriptor).includes(surface),\n );\n}\n"],"names":["ACTION_SURFACES","SURFACE_BY_CELL","OVERFLOW_GLYPH","surfaceForCell","key","binding","placement","surface","undefined","Error","surfacesFor","descriptor","cells","alsoAt","Set","map","cell","surfaceFor","useCasesForSurface","useCases","filter","includes"],"mappings":"AAMA;;;;;;;;;;CAUC,GACD,OAAO,MAAMA,kBAAkB;IAC7B;IACA;IACA;IACA;IACA;IACA;CACD,CAAU;AAGX;;;;;;;;;;;CAWC,GACD,MAAMC,kBAAiD;IACrD,8BAA8B;IAC9B,sBAAsB;IACtB,4BAA4B;IAC5B,gCAAgC;IAChC,kCAAkC;IAClC,6BAA6B;IAC7B,+BAA+B;IAC/B,uBAAuB;AACzB;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,iBAAiB,SAAS;AAEvC,sEAAsE,GACtE,SAASC,eACPC,GAAW,EACXC,OAAuB,EACvBC,SAA2B;IAE3B,MAAMC,UAAUN,eAAe,CAAC,GAAGI,QAAQ,CAAC,EAAEC,WAAW,CAAC;IAE1D,IAAIC,YAAYC,WAAW;QACzB,MAAM,IAAIC,MACR,CAAC,cAAc,EAAEL,IAAI,cAAc,EAAEC,QAAQ,GAAG,EAAEC,UAAU,4BAA4B,CAAC,GACvF,0FACA,uFACA,2FACA;IAEN;IAEA,OAAOC;AACT;AAEA;;;;;;;;;;;;CAYC,GACD,OAAO,SAASG,YACdC,UAA6B;QAIvBA;IAFN,MAAMC,QAAQ;QACZ;YAAEP,SAASM,WAAWN,OAAO;YAAEC,WAAWK,WAAWL,SAAS;QAAC;YAC3DK,qBAAAA,WAAWE,MAAM,YAAjBF,qBAAqB,EAAE;KAC5B;IAED,OAAO;WACF,IAAIG,IACLF,MAAMG,GAAG,CAACC,CAAAA,OACRb,eAAeQ,WAAWP,GAAG,EAAEY,KAAKX,OAAO,EAAEW,KAAKV,SAAS;KAGhE;AACH;AAEA;;;;;;CAMC,GACD,OAAO,SAASW,WAAWN,UAA6B;IACtD,OAAOR,eACLQ,WAAWP,GAAG,EACdO,WAAWN,OAAO,EAClBM,WAAWL,SAAS;AAExB;AAEA;;;;;;;;;;CAUC,GACD,OAAO,SAASY,mBACdX,OAAsB,EACtBY,QAAkD;IAElD,OAAO,CAACA,mBAAAA,WAAY,EAAE,EAAEC,MAAM,CAACT,CAAAA,aAC7BD,YAAYC,YAAYU,QAAQ,CAACd;AAErC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** What a host can do about a failure, by the failure's `code`. */
|
|
3
|
+
export type ErrorActions = Readonly<Record<string, () => void>>;
|
|
4
|
+
/**
|
|
5
|
+
* Registers the host's next step for each failure code it can resolve —
|
|
6
|
+
* "Choose organization" for `noActiveOrganization` — so a region or a toast
|
|
7
|
+
* showing that failure can offer it ([ADR 0028](../../../../../../docs/adr/0028-states-an-organism-must-render.md)).
|
|
8
|
+
*/
|
|
9
|
+
export declare function ErrorActionsProvider({ actions, children, }: {
|
|
10
|
+
actions: ErrorActions;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
/** A failure as the organisms hold it. */
|
|
14
|
+
interface CodedFailure {
|
|
15
|
+
code?: unknown;
|
|
16
|
+
details?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
/** The action a failure offers: its label, and what it does. */
|
|
19
|
+
export interface ErrorAction {
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly onAction: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The next step for a failure, or `undefined`. Offered only when **both**
|
|
25
|
+
* exist: a handler the host registered for the failure's code, and the
|
|
26
|
+
* catalog's `errors:<code>Action` to name it — the code stays the catalog key,
|
|
27
|
+
* so a button never shows a key, and copy without a handler never shows a
|
|
28
|
+
* button that does nothing.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useErrorAction(): (failure: CodedFailure | undefined) => ErrorAction | undefined;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=error-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-actions.d.ts","sourceRoot":"","sources":["../../../src/ui/actions/error-actions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAIlE,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;AAIhE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAMA;AAED,0CAA0C;AAC1C,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,IAAI,CAChC,OAAO,EAAE,YAAY,GAAG,SAAS,KAC9B,WAAW,GAAG,SAAS,CAe3B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
import { useTranslateKey } from '../../i18n/index.js';
|
|
5
|
+
const ErrorActionsContext = /*#__PURE__*/ createContext({});
|
|
6
|
+
/**
|
|
7
|
+
* Registers the host's next step for each failure code it can resolve —
|
|
8
|
+
* "Choose organization" for `noActiveOrganization` — so a region or a toast
|
|
9
|
+
* showing that failure can offer it ([ADR 0028](../../../../../../docs/adr/0028-states-an-organism-must-render.md)).
|
|
10
|
+
*/ export function ErrorActionsProvider({ actions, children }) {
|
|
11
|
+
return /*#__PURE__*/ _jsx(ErrorActionsContext.Provider, {
|
|
12
|
+
value: actions,
|
|
13
|
+
children: children
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The next step for a failure, or `undefined`. Offered only when **both**
|
|
18
|
+
* exist: a handler the host registered for the failure's code, and the
|
|
19
|
+
* catalog's `errors:<code>Action` to name it — the code stays the catalog key,
|
|
20
|
+
* so a button never shows a key, and copy without a handler never shows a
|
|
21
|
+
* button that does nothing.
|
|
22
|
+
*/ export function useErrorAction() {
|
|
23
|
+
const actions = useContext(ErrorActionsContext);
|
|
24
|
+
const translateKey = useTranslateKey();
|
|
25
|
+
return (failure)=>{
|
|
26
|
+
var _failure_details;
|
|
27
|
+
const code = typeof (failure == null ? void 0 : failure.code) === 'string' ? failure.code : failure == null ? void 0 : (_failure_details = failure.details) == null ? void 0 : _failure_details['code'];
|
|
28
|
+
if (typeof code !== 'string') return undefined;
|
|
29
|
+
const onAction = actions[code];
|
|
30
|
+
if (onAction === undefined) return undefined;
|
|
31
|
+
// A missing key comes back as itself, without its namespace.
|
|
32
|
+
const label = translateKey(`errors:${code}Action`);
|
|
33
|
+
return label === `${code}Action` ? undefined : {
|
|
34
|
+
label,
|
|
35
|
+
onAction
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=error-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/actions/error-actions.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, type ReactNode, useContext } from 'react';\n\nimport { useTranslateKey } from '../../i18n/index.js';\n\n/** What a host can do about a failure, by the failure's `code`. */\nexport type ErrorActions = Readonly<Record<string, () => void>>;\n\nconst ErrorActionsContext = createContext<ErrorActions>({});\n\n/**\n * Registers the host's next step for each failure code it can resolve —\n * \"Choose organization\" for `noActiveOrganization` — so a region or a toast\n * showing that failure can offer it ([ADR 0028](../../../../../../docs/adr/0028-states-an-organism-must-render.md)).\n */\nexport function ErrorActionsProvider({\n actions,\n children,\n}: {\n actions: ErrorActions;\n children: ReactNode;\n}) {\n return (\n <ErrorActionsContext.Provider value={actions}>\n {children}\n </ErrorActionsContext.Provider>\n );\n}\n\n/** A failure as the organisms hold it. */\ninterface CodedFailure {\n code?: unknown;\n details?: Record<string, unknown>;\n}\n\n/** The action a failure offers: its label, and what it does. */\nexport interface ErrorAction {\n readonly label: string;\n readonly onAction: () => void;\n}\n\n/**\n * The next step for a failure, or `undefined`. Offered only when **both**\n * exist: a handler the host registered for the failure's code, and the\n * catalog's `errors:<code>Action` to name it — the code stays the catalog key,\n * so a button never shows a key, and copy without a handler never shows a\n * button that does nothing.\n */\nexport function useErrorAction(): (\n failure: CodedFailure | undefined,\n) => ErrorAction | undefined {\n const actions = useContext(ErrorActionsContext);\n const translateKey = useTranslateKey();\n return failure => {\n const code =\n typeof failure?.code === 'string'\n ? failure.code\n : failure?.details?.['code'];\n if (typeof code !== 'string') return undefined;\n const onAction = actions[code];\n if (onAction === undefined) return undefined;\n // A missing key comes back as itself, without its namespace.\n const label = translateKey(`errors:${code}Action`);\n return label === `${code}Action` ? undefined : { label, onAction };\n };\n}\n"],"names":["createContext","useContext","useTranslateKey","ErrorActionsContext","ErrorActionsProvider","actions","children","Provider","value","useErrorAction","translateKey","failure","code","details","undefined","onAction","label"],"mappings":"AAAA;;AAEA,SAASA,aAAa,EAAkBC,UAAU,QAAQ,QAAQ;AAElE,SAASC,eAAe,QAAQ,sBAAsB;AAKtD,MAAMC,oCAAsBH,cAA4B,CAAC;AAEzD;;;;CAIC,GACD,OAAO,SAASI,qBAAqB,EACnCC,OAAO,EACPC,QAAQ,EAIT;IACC,qBACE,KAACH,oBAAoBI,QAAQ;QAACC,OAAOH;kBAClCC;;AAGP;AAcA;;;;;;CAMC,GACD,OAAO,SAASG;IAGd,MAAMJ,UAAUJ,WAAWE;IAC3B,MAAMO,eAAeR;IACrB,OAAOS,CAAAA;YAICA;QAHN,MAAMC,OACJ,QAAOD,2BAAAA,QAASC,IAAI,MAAK,WACrBD,QAAQC,IAAI,GACZD,4BAAAA,mBAAAA,QAASE,OAAO,qBAAhBF,gBAAkB,CAAC,OAAO;QAChC,IAAI,OAAOC,SAAS,UAAU,OAAOE;QACrC,MAAMC,WAAWV,OAAO,CAACO,KAAK;QAC9B,IAAIG,aAAaD,WAAW,OAAOA;QACnC,6DAA6D;QAC7D,MAAME,QAAQN,aAAa,CAAC,OAAO,EAAEE,KAAK,MAAM,CAAC;QACjD,OAAOI,UAAU,GAAGJ,KAAK,MAAM,CAAC,GAAGE,YAAY;YAAEE;YAAOD;QAAS;IACnE;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
|
package/dist/ui/actions/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ui/actions/index.ts"],"sourcesContent":["export * from './action-surfaces.js';\nexport * from './render-link.js';\n"],"names":[],"mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,mBAAmB"}
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/actions/index.ts"],"sourcesContent":["export * from './action-surfaces.js';\nexport * from './error-actions.js';\nexport * from './render-link.js';\nexport * from './shortcut.js';\n"],"names":[],"mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,qBAAqB;AACnC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A declared chord as `aria-keyshortcuts` writes it: `Mod` is ⌘ on macOS and
|
|
3
|
+
* Ctrl elsewhere, and the attribute cannot know which machine it is read on, so
|
|
4
|
+
* it names both — `Mod+S` is `Control+S Meta+S`. A chord with no `Mod` is
|
|
5
|
+
* written once.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ariaKeyShortcuts(chord: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* A declared chord as a person reads it on their own machine: `⌘S` on a Mac,
|
|
10
|
+
* `Ctrl+S` elsewhere — what the command palette shows beside an action.
|
|
11
|
+
*/
|
|
12
|
+
export declare function shortcutLabel(chord: string, mac?: boolean): string;
|
|
13
|
+
//# sourceMappingURL=shortcut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcut.d.ts","sourceRoot":"","sources":["../../../src/ui/actions/shortcut.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQtD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,GAAG,UAA6C,GAC/C,MAAM,CAKR"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A declared chord as `aria-keyshortcuts` writes it: `Mod` is ⌘ on macOS and
|
|
3
|
+
* Ctrl elsewhere, and the attribute cannot know which machine it is read on, so
|
|
4
|
+
* it names both — `Mod+S` is `Control+S Meta+S`. A chord with no `Mod` is
|
|
5
|
+
* written once.
|
|
6
|
+
*/ export function ariaKeyShortcuts(chord) {
|
|
7
|
+
if (!chord.split('+').includes('Mod')) return chord;
|
|
8
|
+
const as = (modifier)=>chord.split('+').map((part)=>part === 'Mod' ? modifier : part).join('+');
|
|
9
|
+
return `${as('Control')} ${as('Meta')}`;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A declared chord as a person reads it on their own machine: `⌘S` on a Mac,
|
|
13
|
+
* `Ctrl+S` elsewhere — what the command palette shows beside an action.
|
|
14
|
+
*/ export function shortcutLabel(chord, mac = /Mac|iPhone|iPad/.test(navigator.platform)) {
|
|
15
|
+
return chord.split('+').map((part)=>part === 'Mod' ? mac ? '⌘' : 'Ctrl' : part).join(mac ? '' : '+');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=shortcut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/actions/shortcut.ts"],"sourcesContent":["/**\n * A declared chord as `aria-keyshortcuts` writes it: `Mod` is ⌘ on macOS and\n * Ctrl elsewhere, and the attribute cannot know which machine it is read on, so\n * it names both — `Mod+S` is `Control+S Meta+S`. A chord with no `Mod` is\n * written once.\n */\nexport function ariaKeyShortcuts(chord: string): string {\n if (!chord.split('+').includes('Mod')) return chord;\n const as = (modifier: string) =>\n chord\n .split('+')\n .map(part => (part === 'Mod' ? modifier : part))\n .join('+');\n return `${as('Control')} ${as('Meta')}`;\n}\n\n/**\n * A declared chord as a person reads it on their own machine: `⌘S` on a Mac,\n * `Ctrl+S` elsewhere — what the command palette shows beside an action.\n */\nexport function shortcutLabel(\n chord: string,\n mac = /Mac|iPhone|iPad/.test(navigator.platform),\n): string {\n return chord\n .split('+')\n .map(part => (part === 'Mod' ? (mac ? '⌘' : 'Ctrl') : part))\n .join(mac ? '' : '+');\n}\n"],"names":["ariaKeyShortcuts","chord","split","includes","as","modifier","map","part","join","shortcutLabel","mac","test","navigator","platform"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,iBAAiBC,KAAa;IAC5C,IAAI,CAACA,MAAMC,KAAK,CAAC,KAAKC,QAAQ,CAAC,QAAQ,OAAOF;IAC9C,MAAMG,KAAK,CAACC,WACVJ,MACGC,KAAK,CAAC,KACNI,GAAG,CAACC,CAAAA,OAASA,SAAS,QAAQF,WAAWE,MACzCC,IAAI,CAAC;IACV,OAAO,GAAGJ,GAAG,WAAW,CAAC,EAAEA,GAAG,SAAS;AACzC;AAEA;;;CAGC,GACD,OAAO,SAASK,cACdR,KAAa,EACbS,MAAM,kBAAkBC,IAAI,CAACC,UAAUC,QAAQ,CAAC;IAEhD,OAAOZ,MACJC,KAAK,CAAC,KACNI,GAAG,CAACC,CAAAA,OAASA,SAAS,QAASG,MAAM,MAAM,SAAUH,MACrDC,IAAI,CAACE,MAAM,KAAK;AACrB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { UseCaseDescriptor } from '@entifix/core';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* A `matching` selection larger than this asks for the count to be typed
|
|
5
|
+
* before a destructive verb runs over it.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TYPED_SELECTION_THRESHOLD = 1000;
|
|
8
|
+
/** One verb about to run, and what it runs on. */
|
|
9
|
+
export interface VerbRequest<TTarget> {
|
|
10
|
+
readonly descriptor: Pick<UseCaseDescriptor, 'key' | 'labelKey' | 'confirm' | 'reversible' | 'inverse'>;
|
|
11
|
+
readonly target: TTarget;
|
|
12
|
+
/** What it acts on, as the dialog names it: "Acme", "12 invoices". */
|
|
13
|
+
readonly object: string;
|
|
14
|
+
/** How many records; 1 for a single record. */
|
|
15
|
+
readonly count: number;
|
|
16
|
+
/** A selection of everything a filter matches, rather than ticked rows. */
|
|
17
|
+
readonly matching?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface VerbInvokerOptions<TTarget> {
|
|
20
|
+
/** Runs a verb — the descriptor's own, or its inverse on Undo — by key. */
|
|
21
|
+
readonly run: (key: string, target: TTarget) => void;
|
|
22
|
+
readonly busy?: boolean;
|
|
23
|
+
readonly typedThreshold?: number;
|
|
24
|
+
/**
|
|
25
|
+
* The verbs this caller may run — the served document's `useCases`, which
|
|
26
|
+
* leave out what the caller holds no grant for. Undo is offered only when
|
|
27
|
+
* its `inverse` is one of them. Without it, every verb may run.
|
|
28
|
+
*/
|
|
29
|
+
readonly served?: readonly Pick<UseCaseDescriptor, 'key'>[];
|
|
30
|
+
}
|
|
31
|
+
export interface VerbInvoker<TTarget> {
|
|
32
|
+
readonly invoke: (request: VerbRequest<TTarget>) => void;
|
|
33
|
+
/** The confirmation, while one is open. Render it once, anywhere. */
|
|
34
|
+
readonly dialog: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Where every surface sends a verb, so none can reach one around its safety
|
|
38
|
+
* ([ADR 0026](../../../../../../docs/adr/0026-actions-hierarchy-overflow-and-destructive-verbs.md)):
|
|
39
|
+
*
|
|
40
|
+
* - no `confirm` — it runs;
|
|
41
|
+
* - `reversible: 'undo'` — it runs, and a toast offers Undo, which runs its
|
|
42
|
+
* `inverse`. Without a toast region to offer Undo in, or an inverse this
|
|
43
|
+
* caller may run, it asks instead;
|
|
44
|
+
* - `confirm` — an alert dialog asks a question naming the object and the
|
|
45
|
+
* count, and the button repeats the verb with the count;
|
|
46
|
+
* - `typed`, or a `matching` selection over {@link TYPED_SELECTION_THRESHOLD}
|
|
47
|
+
* — the same dialog, and the name or the count has to be typed first.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useVerbInvoker<TTarget>({ run, busy, typedThreshold, served, }: VerbInvokerOptions<TTarget>): VerbInvoker<TTarget>;
|
|
50
|
+
//# sourceMappingURL=use-verb-invoker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-verb-invoker.d.ts","sourceRoot":"","sources":["../../../src/ui/actions/use-verb-invoker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAMjD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,kDAAkD;AAClD,MAAM,WAAW,WAAW,CAAC,OAAO;IAClC,QAAQ,CAAC,UAAU,EAAE,IAAI,CACvB,iBAAiB,EACjB,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAC1D,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB,CAAC,OAAO;IACzC,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;CAC7D;AAED,MAAM,WAAW,WAAW,CAAC,OAAO;IAClC,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACzD,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,EACtC,GAAG,EACH,IAAY,EACZ,cAA0C,EAC1C,MAAM,GACP,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAyEpD"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useT, useTranslateKey } from '../../i18n/index.js';
|
|
5
|
+
import { ConfirmDialog } from '../molecules/confirm-dialog/index.js';
|
|
6
|
+
import { useToasts } from '../molecules/toast-region/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* A `matching` selection larger than this asks for the count to be typed
|
|
9
|
+
* before a destructive verb runs over it.
|
|
10
|
+
*/ export const TYPED_SELECTION_THRESHOLD = 1000;
|
|
11
|
+
/**
|
|
12
|
+
* Where every surface sends a verb, so none can reach one around its safety
|
|
13
|
+
* ([ADR 0026](../../../../../../docs/adr/0026-actions-hierarchy-overflow-and-destructive-verbs.md)):
|
|
14
|
+
*
|
|
15
|
+
* - no `confirm` — it runs;
|
|
16
|
+
* - `reversible: 'undo'` — it runs, and a toast offers Undo, which runs its
|
|
17
|
+
* `inverse`. Without a toast region to offer Undo in, or an inverse this
|
|
18
|
+
* caller may run, it asks instead;
|
|
19
|
+
* - `confirm` — an alert dialog asks a question naming the object and the
|
|
20
|
+
* count, and the button repeats the verb with the count;
|
|
21
|
+
* - `typed`, or a `matching` selection over {@link TYPED_SELECTION_THRESHOLD}
|
|
22
|
+
* — the same dialog, and the name or the count has to be typed first.
|
|
23
|
+
*/ export function useVerbInvoker({ run, busy = false, typedThreshold = TYPED_SELECTION_THRESHOLD, served }) {
|
|
24
|
+
var _confirm_confirmLabelKey;
|
|
25
|
+
const t = useT();
|
|
26
|
+
const translateKey = useTranslateKey();
|
|
27
|
+
const toasts = useToasts();
|
|
28
|
+
const [pending, setPending] = useState(undefined);
|
|
29
|
+
const invoke = (request)=>{
|
|
30
|
+
const { descriptor, target, object } = request;
|
|
31
|
+
const { confirm, inverse } = descriptor;
|
|
32
|
+
if (confirm === undefined) {
|
|
33
|
+
run(descriptor.key, target);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (descriptor.reversible === 'undo' && inverse !== undefined && (served === undefined || served.some((useCase)=>useCase.key === inverse)) && toasts !== undefined) {
|
|
37
|
+
run(descriptor.key, target);
|
|
38
|
+
const verb = translateKey(descriptor.labelKey);
|
|
39
|
+
toasts.show({
|
|
40
|
+
tone: 'undo',
|
|
41
|
+
message: confirm.doneKey === undefined ? t('confirm.done', {
|
|
42
|
+
verb,
|
|
43
|
+
object
|
|
44
|
+
}) : translateKey(confirm.doneKey, {
|
|
45
|
+
object,
|
|
46
|
+
count: request.count
|
|
47
|
+
}),
|
|
48
|
+
action: {
|
|
49
|
+
label: t('confirm.undo'),
|
|
50
|
+
onAction: ()=>run(inverse, target)
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
setPending(request);
|
|
56
|
+
};
|
|
57
|
+
if (pending === undefined) return {
|
|
58
|
+
invoke,
|
|
59
|
+
dialog: undefined
|
|
60
|
+
};
|
|
61
|
+
const { descriptor, object, count } = pending;
|
|
62
|
+
const confirm = descriptor.confirm;
|
|
63
|
+
const verb = translateKey((_confirm_confirmLabelKey = confirm.confirmLabelKey) != null ? _confirm_confirmLabelKey : descriptor.labelKey);
|
|
64
|
+
const typed = descriptor.reversible === 'typed' || pending.matching === true && count > typedThreshold;
|
|
65
|
+
return {
|
|
66
|
+
invoke,
|
|
67
|
+
dialog: /*#__PURE__*/ _jsx(ConfirmDialog, {
|
|
68
|
+
open: true,
|
|
69
|
+
tone: confirm.tone,
|
|
70
|
+
title: t('confirm.question', {
|
|
71
|
+
verb: translateKey(descriptor.labelKey),
|
|
72
|
+
object
|
|
73
|
+
}),
|
|
74
|
+
message: translateKey(confirm.messageKey, {
|
|
75
|
+
object,
|
|
76
|
+
count
|
|
77
|
+
}),
|
|
78
|
+
confirmLabel: t('confirm.verbCount', {
|
|
79
|
+
verb,
|
|
80
|
+
count
|
|
81
|
+
}),
|
|
82
|
+
typed: typed ? count > 1 ? String(count) : object : undefined,
|
|
83
|
+
busy: busy,
|
|
84
|
+
onCancel: ()=>setPending(undefined),
|
|
85
|
+
onConfirm: ()=>{
|
|
86
|
+
setPending(undefined);
|
|
87
|
+
run(descriptor.key, pending.target);
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=use-verb-invoker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/actions/use-verb-invoker.tsx"],"sourcesContent":["'use client';\n\nimport type { UseCaseDescriptor } from '@entifix/core';\nimport { type ReactNode, useState } from 'react';\n\nimport { useT, useTranslateKey } from '../../i18n/index.js';\nimport { ConfirmDialog } from '../molecules/confirm-dialog/index.js';\nimport { useToasts } from '../molecules/toast-region/index.js';\n\n/**\n * A `matching` selection larger than this asks for the count to be typed\n * before a destructive verb runs over it.\n */\nexport const TYPED_SELECTION_THRESHOLD = 1000;\n\n/** One verb about to run, and what it runs on. */\nexport interface VerbRequest<TTarget> {\n readonly descriptor: Pick<\n UseCaseDescriptor,\n 'key' | 'labelKey' | 'confirm' | 'reversible' | 'inverse'\n >;\n readonly target: TTarget;\n /** What it acts on, as the dialog names it: \"Acme\", \"12 invoices\". */\n readonly object: string;\n /** How many records; 1 for a single record. */\n readonly count: number;\n /** A selection of everything a filter matches, rather than ticked rows. */\n readonly matching?: boolean;\n}\n\nexport interface VerbInvokerOptions<TTarget> {\n /** Runs a verb — the descriptor's own, or its inverse on Undo — by key. */\n readonly run: (key: string, target: TTarget) => void;\n readonly busy?: boolean;\n readonly typedThreshold?: number;\n /**\n * The verbs this caller may run — the served document's `useCases`, which\n * leave out what the caller holds no grant for. Undo is offered only when\n * its `inverse` is one of them. Without it, every verb may run.\n */\n readonly served?: readonly Pick<UseCaseDescriptor, 'key'>[];\n}\n\nexport interface VerbInvoker<TTarget> {\n readonly invoke: (request: VerbRequest<TTarget>) => void;\n /** The confirmation, while one is open. Render it once, anywhere. */\n readonly dialog: ReactNode;\n}\n\n/**\n * Where every surface sends a verb, so none can reach one around its safety\n * ([ADR 0026](../../../../../../docs/adr/0026-actions-hierarchy-overflow-and-destructive-verbs.md)):\n *\n * - no `confirm` — it runs;\n * - `reversible: 'undo'` — it runs, and a toast offers Undo, which runs its\n * `inverse`. Without a toast region to offer Undo in, or an inverse this\n * caller may run, it asks instead;\n * - `confirm` — an alert dialog asks a question naming the object and the\n * count, and the button repeats the verb with the count;\n * - `typed`, or a `matching` selection over {@link TYPED_SELECTION_THRESHOLD}\n * — the same dialog, and the name or the count has to be typed first.\n */\nexport function useVerbInvoker<TTarget>({\n run,\n busy = false,\n typedThreshold = TYPED_SELECTION_THRESHOLD,\n served,\n}: VerbInvokerOptions<TTarget>): VerbInvoker<TTarget> {\n const t = useT();\n const translateKey = useTranslateKey();\n const toasts = useToasts();\n const [pending, setPending] = useState<VerbRequest<TTarget> | undefined>(\n undefined,\n );\n\n const invoke = (request: VerbRequest<TTarget>) => {\n const { descriptor, target, object } = request;\n const { confirm, inverse } = descriptor;\n if (confirm === undefined) {\n run(descriptor.key, target);\n return;\n }\n if (\n descriptor.reversible === 'undo' &&\n inverse !== undefined &&\n (served === undefined ||\n served.some(useCase => useCase.key === inverse)) &&\n toasts !== undefined\n ) {\n run(descriptor.key, target);\n const verb = translateKey(descriptor.labelKey);\n toasts.show({\n tone: 'undo',\n message:\n confirm.doneKey === undefined\n ? t('confirm.done', { verb, object })\n : translateKey(confirm.doneKey, { object, count: request.count }),\n action: {\n label: t('confirm.undo'),\n onAction: () => run(inverse, target),\n },\n });\n return;\n }\n setPending(request);\n };\n\n if (pending === undefined) return { invoke, dialog: undefined };\n\n const { descriptor, object, count } = pending;\n const confirm = descriptor.confirm as NonNullable<\n UseCaseDescriptor['confirm']\n >;\n const verb = translateKey(confirm.confirmLabelKey ?? descriptor.labelKey);\n const typed =\n descriptor.reversible === 'typed' ||\n (pending.matching === true && count > typedThreshold);\n\n return {\n invoke,\n dialog: (\n <ConfirmDialog\n open\n tone={confirm.tone}\n title={t('confirm.question', {\n verb: translateKey(descriptor.labelKey),\n object,\n })}\n message={translateKey(confirm.messageKey, { object, count })}\n confirmLabel={t('confirm.verbCount', { verb, count })}\n typed={typed ? (count > 1 ? String(count) : object) : undefined}\n busy={busy}\n onCancel={() => setPending(undefined)}\n onConfirm={() => {\n setPending(undefined);\n run(descriptor.key, pending.target);\n }}\n />\n ),\n };\n}\n"],"names":["useState","useT","useTranslateKey","ConfirmDialog","useToasts","TYPED_SELECTION_THRESHOLD","useVerbInvoker","run","busy","typedThreshold","served","confirm","t","translateKey","toasts","pending","setPending","undefined","invoke","request","descriptor","target","object","inverse","key","reversible","some","useCase","verb","labelKey","show","tone","message","doneKey","count","action","label","onAction","dialog","confirmLabelKey","typed","matching","open","title","messageKey","confirmLabel","String","onCancel","onConfirm"],"mappings":"AAAA;;AAGA,SAAyBA,QAAQ,QAAQ,QAAQ;AAEjD,SAASC,IAAI,EAAEC,eAAe,QAAQ,sBAAsB;AAC5D,SAASC,aAAa,QAAQ,uCAAuC;AACrE,SAASC,SAAS,QAAQ,qCAAqC;AAE/D;;;CAGC,GACD,OAAO,MAAMC,4BAA4B,KAAK;AAoC9C;;;;;;;;;;;;CAYC,GACD,OAAO,SAASC,eAAwB,EACtCC,GAAG,EACHC,OAAO,KAAK,EACZC,iBAAiBJ,yBAAyB,EAC1CK,MAAM,EACsB;QA8CFC;IA7C1B,MAAMC,IAAIX;IACV,MAAMY,eAAeX;IACrB,MAAMY,SAASV;IACf,MAAM,CAACW,SAASC,WAAW,GAAGhB,SAC5BiB;IAGF,MAAMC,SAAS,CAACC;QACd,MAAM,EAAEC,UAAU,EAAEC,MAAM,EAAEC,MAAM,EAAE,GAAGH;QACvC,MAAM,EAAER,OAAO,EAAEY,OAAO,EAAE,GAAGH;QAC7B,IAAIT,YAAYM,WAAW;YACzBV,IAAIa,WAAWI,GAAG,EAAEH;YACpB;QACF;QACA,IACED,WAAWK,UAAU,KAAK,UAC1BF,YAAYN,aACXP,CAAAA,WAAWO,aACVP,OAAOgB,IAAI,CAACC,CAAAA,UAAWA,QAAQH,GAAG,KAAKD,QAAO,KAChDT,WAAWG,WACX;YACAV,IAAIa,WAAWI,GAAG,EAAEH;YACpB,MAAMO,OAAOf,aAAaO,WAAWS,QAAQ;YAC7Cf,OAAOgB,IAAI,CAAC;gBACVC,MAAM;gBACNC,SACErB,QAAQsB,OAAO,KAAKhB,YAChBL,EAAE,gBAAgB;oBAAEgB;oBAAMN;gBAAO,KACjCT,aAAaF,QAAQsB,OAAO,EAAE;oBAAEX;oBAAQY,OAAOf,QAAQe,KAAK;gBAAC;gBACnEC,QAAQ;oBACNC,OAAOxB,EAAE;oBACTyB,UAAU,IAAM9B,IAAIgB,SAASF;gBAC/B;YACF;YACA;QACF;QACAL,WAAWG;IACb;IAEA,IAAIJ,YAAYE,WAAW,OAAO;QAAEC;QAAQoB,QAAQrB;IAAU;IAE9D,MAAM,EAAEG,UAAU,EAAEE,MAAM,EAAEY,KAAK,EAAE,GAAGnB;IACtC,MAAMJ,UAAUS,WAAWT,OAAO;IAGlC,MAAMiB,OAAOf,cAAaF,2BAAAA,QAAQ4B,eAAe,YAAvB5B,2BAA2BS,WAAWS,QAAQ;IACxE,MAAMW,QACJpB,WAAWK,UAAU,KAAK,WACzBV,QAAQ0B,QAAQ,KAAK,QAAQP,QAAQzB;IAExC,OAAO;QACLS;QACAoB,sBACE,KAACnC;YACCuC,IAAI;YACJX,MAAMpB,QAAQoB,IAAI;YAClBY,OAAO/B,EAAE,oBAAoB;gBAC3BgB,MAAMf,aAAaO,WAAWS,QAAQ;gBACtCP;YACF;YACAU,SAASnB,aAAaF,QAAQiC,UAAU,EAAE;gBAAEtB;gBAAQY;YAAM;YAC1DW,cAAcjC,EAAE,qBAAqB;gBAAEgB;gBAAMM;YAAM;YACnDM,OAAOA,QAASN,QAAQ,IAAIY,OAAOZ,SAASZ,SAAUL;YACtDT,MAAMA;YACNuC,UAAU,IAAM/B,WAAWC;YAC3B+B,WAAW;gBACThC,WAAWC;gBACXV,IAAIa,WAAWI,GAAG,EAAET,QAAQM,MAAM;YACpC;;IAGN;AACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type AlertDismissProps = Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'type'>;
|
|
3
|
+
/**
|
|
4
|
+
* The × that dismisses an {@link Alert}, passed as its `action`. A client
|
|
5
|
+
* component of its own so `Alert` stays server-safe: dismissing is the one part
|
|
6
|
+
* of a message that needs a handler. Its name comes from the controls catalog.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AlertDismiss({ className, ...props }: AlertDismissProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=alert-dismiss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dismiss.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/alert/alert-dismiss.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAKtD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,wBAAwB,CAAC,QAAQ,CAAC,EAClC,UAAU,GAAG,MAAM,CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAetE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
3
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useT } from '../../../i18n/index.js';
|
|
6
|
+
import { cn } from '../../utils/cn.js';
|
|
7
|
+
/**
|
|
8
|
+
* The × that dismisses an {@link Alert}, passed as its `action`. A client
|
|
9
|
+
* component of its own so `Alert` stays server-safe: dismissing is the one part
|
|
10
|
+
* of a message that needs a handler. Its name comes from the controls catalog.
|
|
11
|
+
*/ export function AlertDismiss(_0) {
|
|
12
|
+
let { className } = _0, props = _object_without_properties_loose(_0, [
|
|
13
|
+
"className"
|
|
14
|
+
]);
|
|
15
|
+
const t = useT();
|
|
16
|
+
return /*#__PURE__*/ _jsx("button", _extends({
|
|
17
|
+
type: "button",
|
|
18
|
+
"aria-label": t('alert.dismiss'),
|
|
19
|
+
className: cn('flex min-h-(--target-min) min-w-(--target-min) items-center justify-center rounded-md focus-ring hover:bg-surface-elevated/60', className)
|
|
20
|
+
}, props, {
|
|
21
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
22
|
+
"aria-hidden": "true",
|
|
23
|
+
children: "×"
|
|
24
|
+
})
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=alert-dismiss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/alert/alert-dismiss.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { useT } from '../../../i18n/index.js';\nimport { cn } from '../../utils/cn.js';\n\nexport type AlertDismissProps = Omit<\n ComponentPropsWithoutRef<'button'>,\n 'children' | 'type'\n>;\n\n/**\n * The × that dismisses an {@link Alert}, passed as its `action`. A client\n * component of its own so `Alert` stays server-safe: dismissing is the one part\n * of a message that needs a handler. Its name comes from the controls catalog.\n */\nexport function AlertDismiss({ className, ...props }: AlertDismissProps) {\n const t = useT();\n return (\n <button\n type=\"button\"\n aria-label={t('alert.dismiss')}\n className={cn(\n 'flex min-h-(--target-min) min-w-(--target-min) items-center justify-center rounded-md focus-ring hover:bg-surface-elevated/60',\n className,\n )}\n {...props}\n >\n <span aria-hidden=\"true\">×</span>\n </button>\n );\n}\n"],"names":["useT","cn","AlertDismiss","className","props","t","button","type","aria-label","span","aria-hidden"],"mappings":"AAAA;;;;AAIA,SAASA,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,EAAE,QAAQ,oBAAoB;AAOvC;;;;CAIC,GACD,OAAO,SAASC,aAAa,EAA0C;QAA1C,EAAEC,SAAS,EAA+B,OAA1BC;;;IAC3C,MAAMC,IAAIL;IACV,qBACE,KAACM;QACCC,MAAK;QACLC,cAAYH,EAAE;QACdF,WAAWF,GACT,iIACAE;OAEEC;kBAEJ,cAAA,KAACK;YAAKC,eAAY;sBAAO;;;AAG/B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { type Tone } from './tone.js';
|
|
3
|
+
export type { Tone as AlertTone } from './tone.js';
|
|
4
|
+
export interface AlertProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title' | 'role'> {
|
|
5
|
+
tone: Tone;
|
|
6
|
+
/** A short heading in bold before the message. */
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
/** What to do about it: a link, a retry button, an {@link AlertDismiss}. */
|
|
9
|
+
action?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An inline message: something went wrong, needs attention, worked, or is
|
|
13
|
+
* worth knowing. It stays until the page changes; nothing dismisses it unless
|
|
14
|
+
* the caller passes an {@link AlertDismiss} as its `action`.
|
|
15
|
+
*
|
|
16
|
+
* `danger` is announced at once (`role="alert"`, assertive); every other tone
|
|
17
|
+
* waits its turn (`role="status"`, polite). Never both, and never neither: an
|
|
18
|
+
* inline message a screen reader is not told about is one only sighted users
|
|
19
|
+
* receive. Server-safe — no hooks, no client boundary.
|
|
20
|
+
*/
|
|
21
|
+
export declare function Alert({ tone, title, action, className, children, ...props }: AlertProps): import("react").JSX.Element;
|
|
22
|
+
/** The same message under the name some hosts look for. */
|
|
23
|
+
export declare const InlineMessage: typeof Alert;
|
|
24
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/alert/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,KAAK,IAAI,EAAgB,MAAM,WAAW,CAAC;AAEpD,YAAY,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAEnD,MAAM,WAAW,UAAW,SAAQ,IAAI,CACtC,wBAAwB,CAAC,KAAK,CAAC,EAC/B,OAAO,GAAG,MAAM,CACjB;IACC,IAAI,EAAE,IAAI,CAAC;IACX,kDAAkD;IAClD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,MAAM,EACN,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,UAAU,+BAmBZ;AAED,2DAA2D;AAC3D,eAAO,MAAM,aAAa,cAAQ,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
import { TONE_SURFACE } from './tone.js';
|
|
6
|
+
/**
|
|
7
|
+
* An inline message: something went wrong, needs attention, worked, or is
|
|
8
|
+
* worth knowing. It stays until the page changes; nothing dismisses it unless
|
|
9
|
+
* the caller passes an {@link AlertDismiss} as its `action`.
|
|
10
|
+
*
|
|
11
|
+
* `danger` is announced at once (`role="alert"`, assertive); every other tone
|
|
12
|
+
* waits its turn (`role="status"`, polite). Never both, and never neither: an
|
|
13
|
+
* inline message a screen reader is not told about is one only sighted users
|
|
14
|
+
* receive. Server-safe — no hooks, no client boundary.
|
|
15
|
+
*/ export function Alert(_0) {
|
|
16
|
+
let { tone, title, action, className, children } = _0, props = _object_without_properties_loose(_0, [
|
|
17
|
+
"tone",
|
|
18
|
+
"title",
|
|
19
|
+
"action",
|
|
20
|
+
"className",
|
|
21
|
+
"children"
|
|
22
|
+
]);
|
|
23
|
+
return /*#__PURE__*/ _jsxs("div", _extends({
|
|
24
|
+
role: tone === 'danger' ? 'alert' : 'status',
|
|
25
|
+
"data-tone": tone,
|
|
26
|
+
className: cn('flex items-start gap-s rounded-lg border-l-4 px-s py-xs text-step-sm', TONE_SURFACE[tone], className)
|
|
27
|
+
}, props, {
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
30
|
+
className: "min-w-0 flex flex-1 flex-col gap-3xs",
|
|
31
|
+
children: [
|
|
32
|
+
title !== undefined && /*#__PURE__*/ _jsx("p", {
|
|
33
|
+
className: "m-0 font-semibold",
|
|
34
|
+
children: title
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsx("div", {
|
|
37
|
+
children: children
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}),
|
|
41
|
+
action !== undefined && /*#__PURE__*/ _jsx("div", {
|
|
42
|
+
className: "shrink-0",
|
|
43
|
+
children: action
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
/** The same message under the name some hosts look for. */ export const InlineMessage = Alert;
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/alert/alert.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from 'react';\n\nimport { cn } from '../../utils/cn.js';\nimport { type Tone, TONE_SURFACE } from './tone.js';\n\nexport type { Tone as AlertTone } from './tone.js';\n\nexport interface AlertProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'title' | 'role'\n> {\n tone: Tone;\n /** A short heading in bold before the message. */\n title?: ReactNode;\n /** What to do about it: a link, a retry button, an {@link AlertDismiss}. */\n action?: ReactNode;\n}\n\n/**\n * An inline message: something went wrong, needs attention, worked, or is\n * worth knowing. It stays until the page changes; nothing dismisses it unless\n * the caller passes an {@link AlertDismiss} as its `action`.\n *\n * `danger` is announced at once (`role=\"alert\"`, assertive); every other tone\n * waits its turn (`role=\"status\"`, polite). Never both, and never neither: an\n * inline message a screen reader is not told about is one only sighted users\n * receive. Server-safe — no hooks, no client boundary.\n */\nexport function Alert({\n tone,\n title,\n action,\n className,\n children,\n ...props\n}: AlertProps) {\n return (\n <div\n role={tone === 'danger' ? 'alert' : 'status'}\n data-tone={tone}\n className={cn(\n 'flex items-start gap-s rounded-lg border-l-4 px-s py-xs text-step-sm',\n TONE_SURFACE[tone],\n className,\n )}\n {...props}\n >\n <div className=\"min-w-0 flex flex-1 flex-col gap-3xs\">\n {title !== undefined && <p className=\"m-0 font-semibold\">{title}</p>}\n <div>{children}</div>\n </div>\n {action !== undefined && <div className=\"shrink-0\">{action}</div>}\n </div>\n );\n}\n\n/** The same message under the name some hosts look for. */\nexport const InlineMessage = Alert;\n"],"names":["cn","TONE_SURFACE","Alert","tone","title","action","className","children","props","div","role","data-tone","undefined","p","InlineMessage"],"mappings":";;;AAEA,SAASA,EAAE,QAAQ,oBAAoB;AACvC,SAAoBC,YAAY,QAAQ,YAAY;AAepD;;;;;;;;;CASC,GACD,OAAO,SAASC,MAAM,EAOT;QAPS,EACpBC,IAAI,EACJC,KAAK,EACLC,MAAM,EACNC,SAAS,EACTC,QAAQ,EAEG,OADRC;;;;;;;IAEH,qBACE,MAACC;QACCC,MAAMP,SAAS,WAAW,UAAU;QACpCQ,aAAWR;QACXG,WAAWN,GACT,wEACAC,YAAY,CAACE,KAAK,EAClBG;OAEEE;;0BAEJ,MAACC;gBAAIH,WAAU;;oBACZF,UAAUQ,2BAAa,KAACC;wBAAEP,WAAU;kCAAqBF;;kCAC1D,KAACK;kCAAKF;;;;YAEPF,WAAWO,2BAAa,KAACH;gBAAIH,WAAU;0BAAYD;;;;AAG1D;AAEA,yDAAyD,GACzD,OAAO,MAAMS,gBAAgBZ,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/alert/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/alert/index.ts"],"sourcesContent":["export * from './alert.js';\nexport * from './alert-dismiss.js';\n"],"names":[],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,qBAAqB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** The four message tones of the token contract (ADR 0025). */
|
|
2
|
+
export type Tone = 'danger' | 'warning' | 'success' | 'info';
|
|
3
|
+
/**
|
|
4
|
+
* Each tone's text on its own `-subtle` surface: a pair the contract holds to
|
|
5
|
+
* 4.5:1 in every palette, so nothing here needs a contrast of its own.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TONE_SURFACE: Record<Tone, string>;
|
|
8
|
+
//# sourceMappingURL=tone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tone.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/alert/tone.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAK7C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The four message tones of the token contract (ADR 0025). */ /**
|
|
2
|
+
* Each tone's text on its own `-subtle` surface: a pair the contract holds to
|
|
3
|
+
* 4.5:1 in every palette, so nothing here needs a contrast of its own.
|
|
4
|
+
*/ export const TONE_SURFACE = {
|
|
5
|
+
danger: 'border-danger bg-danger-subtle text-danger',
|
|
6
|
+
warning: 'border-warning bg-warning-subtle text-warning',
|
|
7
|
+
success: 'border-success bg-success-subtle text-success',
|
|
8
|
+
info: 'border-info bg-info-subtle text-info'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=tone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/alert/tone.ts"],"sourcesContent":["/** The four message tones of the token contract (ADR 0025). */\nexport type Tone = 'danger' | 'warning' | 'success' | 'info';\n\n/**\n * Each tone's text on its own `-subtle` surface: a pair the contract holds to\n * 4.5:1 in every palette, so nothing here needs a contrast of its own.\n */\nexport const TONE_SURFACE: Record<Tone, string> = {\n danger: 'border-danger bg-danger-subtle text-danger',\n warning: 'border-warning bg-warning-subtle text-warning',\n success: 'border-success bg-success-subtle text-success',\n info: 'border-info bg-info-subtle text-info',\n};\n"],"names":["TONE_SURFACE","danger","warning","success","info"],"mappings":"AAAA,6DAA6D,GAG7D;;;CAGC,GACD,OAAO,MAAMA,eAAqC;IAChDC,QAAQ;IACRC,SAAS;IACTC,SAAS;IACTC,MAAM;AACR,EAAE"}
|
|
@@ -9,7 +9,7 @@ import { cva } from 'class-variance-authority';
|
|
|
9
9
|
* constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes
|
|
10
10
|
* and still render entirely on the server.
|
|
11
11
|
*/ export const button = cva([
|
|
12
|
-
'inline-flex items-center justify-center rounded-lg font-medium',
|
|
12
|
+
'inline-flex min-h-(--target-min) min-w-(--target-min) items-center justify-center rounded-lg font-medium',
|
|
13
13
|
'transition duration-200 ease-smooth active:scale-[0.97]',
|
|
14
14
|
'focus-ring',
|
|
15
15
|
'disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:scale-100'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/ui/atoms/button/button-recipe.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * The button's visual recipe, kept in its own module so it can be shared with\n * components that must **not** be client ones.\n *\n * `Button` is `'use client'` for a single reason — it renders HeadlessUI's\n * `Button` — and a server page that puts one inside every card in a grid pays a\n * client boundary per card. `cva` and the token classes have no such\n * constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes\n * and still render entirely on the server.\n */\nexport const button = cva(\n [\n 'inline-flex items-center justify-center rounded-lg font-medium',\n 'transition duration-200 ease-smooth active:scale-[0.97]',\n 'focus-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:scale-100',\n ],\n {\n variants: {\n variant: {\n primary:\n 'bg-primary text-primary-content shadow-raised hover:opacity-90 hover:shadow-card',\n secondary:\n 'border border-border bg-surface-elevated text-content shadow-edge hover:border-primary hover:shadow-raised',\n ghost: 'bg-transparent text-content hover:bg-surface-elevated',\n // For an act that destroys something — ending every session a user\n // holds, deleting a record. The `--color-danger*` tokens already\n // existed and were being reached for as raw classes at call sites; this\n // only gives them a name, so a destructive action looks the same\n // wherever it appears rather than depending on who wrote the screen.\n destructive:\n 'bg-danger text-danger-content shadow-raised hover:opacity-90 hover:shadow-card',\n },\n // Padding uses the fluid spacing tokens so buttons scale with the viewport.\n size: {\n sm: 'px-xs py-3xs text-step-0',\n md: 'px-s py-2xs text-step-0',\n lg: 'px-m py-xs text-step-1',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n },\n);\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof button>['variant']>;\nexport type ButtonSize = NonNullable<VariantProps<typeof button>['size']>;\nexport type ButtonVariantProps = VariantProps<typeof button>;\n"],"names":["cva","button","variants","variant","primary","secondary","ghost","destructive","size","sm","md","lg","defaultVariants"],"mappings":"AAAA,SAASA,GAAG,QAA2B,2BAA2B;AAElE;;;;;;;;;CASC,GACD,OAAO,MAAMC,SAASD,IACpB;IACE;IACA;IACA;IACA;CACD,EACD;IACEE,UAAU;QACRC,SAAS;YACPC,SACE;YACFC,WACE;YACFC,OAAO;YACP,mEAAmE;YACnE,iEAAiE;YACjE,wEAAwE;YACxE,iEAAiE;YACjE,qEAAqE;YACrEC,aACE;QACJ;QACA,4EAA4E;QAC5EC,MAAM;YACJC,IAAI;YACJC,IAAI;YACJC,IAAI;QACN;IACF;IACAC,iBAAiB;QACfT,SAAS;QACTK,MAAM;IACR;AACF,GACA"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/button/button-recipe.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * The button's visual recipe, kept in its own module so it can be shared with\n * components that must **not** be client ones.\n *\n * `Button` is `'use client'` for a single reason — it renders HeadlessUI's\n * `Button` — and a server page that puts one inside every card in a grid pays a\n * client boundary per card. `cva` and the token classes have no such\n * constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes\n * and still render entirely on the server.\n */\nexport const button = cva(\n [\n 'inline-flex min-h-(--target-min) min-w-(--target-min) items-center justify-center rounded-lg font-medium',\n 'transition duration-200 ease-smooth active:scale-[0.97]',\n 'focus-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:scale-100',\n ],\n {\n variants: {\n variant: {\n primary:\n 'bg-primary text-primary-content shadow-raised hover:opacity-90 hover:shadow-card',\n secondary:\n 'border border-border bg-surface-elevated text-content shadow-edge hover:border-primary hover:shadow-raised',\n ghost: 'bg-transparent text-content hover:bg-surface-elevated',\n // For an act that destroys something — ending every session a user\n // holds, deleting a record. The `--color-danger*` tokens already\n // existed and were being reached for as raw classes at call sites; this\n // only gives them a name, so a destructive action looks the same\n // wherever it appears rather than depending on who wrote the screen.\n destructive:\n 'bg-danger text-danger-content shadow-raised hover:opacity-90 hover:shadow-card',\n },\n // Padding uses the fluid spacing tokens so buttons scale with the viewport.\n size: {\n sm: 'px-xs py-3xs text-step-0',\n md: 'px-s py-2xs text-step-0',\n lg: 'px-m py-xs text-step-1',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n },\n);\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof button>['variant']>;\nexport type ButtonSize = NonNullable<VariantProps<typeof button>['size']>;\nexport type ButtonVariantProps = VariantProps<typeof button>;\n"],"names":["cva","button","variants","variant","primary","secondary","ghost","destructive","size","sm","md","lg","defaultVariants"],"mappings":"AAAA,SAASA,GAAG,QAA2B,2BAA2B;AAElE;;;;;;;;;CASC,GACD,OAAO,MAAMC,SAASD,IACpB;IACE;IACA;IACA;IACA;CACD,EACD;IACEE,UAAU;QACRC,SAAS;YACPC,SACE;YACFC,WACE;YACFC,OAAO;YACP,mEAAmE;YACnE,iEAAiE;YACjE,wEAAwE;YACxE,iEAAiE;YACjE,qEAAqE;YACrEC,aACE;QACJ;QACA,4EAA4E;QAC5EC,MAAM;YACJC,IAAI;YACJC,IAAI;YACJC,IAAI;QACN;IACF;IACAC,iBAAiB;QACfT,SAAS;QACTK,MAAM;IACR;AACF,GACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/ui/atoms/button/index.ts"],"sourcesContent":["export * from './button.js';\nexport * from './button-link.js';\nexport * from './button-recipe.js';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,mBAAmB;AACjC,cAAc,qBAAqB"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/button/index.ts"],"sourcesContent":["export * from './button.js';\nexport * from './button-link.js';\nexport * from './button-recipe.js';\nexport * from './submit-button.js';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,mBAAmB;AACjC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB"}
|