themelia-react-ui 2.0.4 → 2.0.6
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/CHANGELOG.md +211 -0
- package/MIGRATION.md +119 -0
- package/README.md +122 -20
- package/dist/{accordion-96o0pN62.js → accordion-0tQUZ20r.js} +13 -13
- package/dist/accordion-0tQUZ20r.js.map +1 -0
- package/dist/{action-menu-CHgs8vmj.js → action-menu-C0gjzLyE.js} +48 -45
- package/dist/action-menu-C0gjzLyE.js.map +1 -0
- package/dist/{affordance-geometry.generated-B8yGOr8-.js → affordance-geometry.generated-P-aVJisu.js} +36 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-BZUGwBq6.js → ai-artifact-CGGpQryR.js} +281 -230
- package/dist/ai-artifact-CGGpQryR.js.map +1 -0
- package/dist/app-shell-EHuuRDGy.js +321 -0
- package/dist/app-shell-EHuuRDGy.js.map +1 -0
- package/dist/{attachment-DkoqHPPl.js → attachment-BCpA4e7i.js} +10 -10
- package/dist/{attachment-DkoqHPPl.js.map → attachment-BCpA4e7i.js.map} +1 -1
- package/dist/{auth-D2FVZ1MH.js → auth-B0girIk_.js} +49 -52
- package/dist/auth-B0girIk_.js.map +1 -0
- package/dist/{avatar-DWO_HHhB.js → avatar-B9Jnp-T-.js} +8 -8
- package/dist/avatar-B9Jnp-T-.js.map +1 -0
- package/dist/{badge-DErMA7ul.js → badge-wWauMgAt.js} +5 -5
- package/dist/{badge-DErMA7ul.js.map → badge-wWauMgAt.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +200 -193
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +8 -8
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +6 -6
- package/dist/base/spinner.js.map +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +36 -36
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-CdfIkCsV.js → batch-action-bar-BoqWIIpV.js} +7 -7
- package/dist/batch-action-bar-BoqWIIpV.js.map +1 -0
- package/dist/blocks/admin.js +21 -21
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +267 -247
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +537 -543
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1330 -1250
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-B-WFKecD.js → breadcrumbs-Bp9Ke7kd.js} +7 -7
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
- package/dist/{button-DkmK-z8E.js → button-ChBovTx0.js} +3 -3
- package/dist/button-ChBovTx0.js.map +1 -0
- package/dist/{buttons-BbfzgczK.js → buttons-DeW0bQeK.js} +16 -16
- package/dist/buttons-DeW0bQeK.js.map +1 -0
- package/dist/cards-CNXnmvV5.js +69 -0
- package/dist/cards-CNXnmvV5.js.map +1 -0
- package/dist/cascader-CrAl9zD5.js +439 -0
- package/dist/cascader-CrAl9zD5.js.map +1 -0
- package/dist/chart-I7ROnsl8.js +162 -0
- package/dist/chart-I7ROnsl8.js.map +1 -0
- package/dist/{checkbox-CzYUTPeJ.js → checkbox-MoyHIAPs.js} +3 -3
- package/dist/{checkbox-CzYUTPeJ.js.map → checkbox-MoyHIAPs.js.map} +1 -1
- package/dist/choice-inputs-DHGtx0QV.js +789 -0
- package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
- package/dist/{code-block-CGNaUtAE.js → code-block-BSJyq9e-.js} +9 -9
- package/dist/code-block-BSJyq9e-.js.map +1 -0
- package/dist/{collapsible-Do4G0zcC.js → collapsible-BzJ91LUG.js} +5 -5
- package/dist/{collapsible-Do4G0zcC.js.map → collapsible-BzJ91LUG.js.map} +1 -1
- package/dist/{collection-content-C0e8SsTm.js → collection-content-CSnwtOTH.js} +3 -3
- package/dist/{collection-content-C0e8SsTm.js.map → collection-content-CSnwtOTH.js.map} +1 -1
- package/dist/combobox-Bcvu5J8O.js +363 -0
- package/dist/combobox-Bcvu5J8O.js.map +1 -0
- package/dist/combobox-C2JiSQPc.js +915 -0
- package/dist/combobox-C2JiSQPc.js.map +1 -0
- package/dist/{command-D8NrBj-b.js → command-9e52NPgK.js} +11 -11
- package/dist/command-9e52NPgK.js.map +1 -0
- package/dist/{comments-Di4w0H_S.js → comments-BsgErEqd.js} +44 -39
- package/dist/comments-BsgErEqd.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +7 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +6 -4
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +3 -4
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/choice-types.d.ts +5 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
- package/dist/components/base/combobox/combobox-field.d.ts +2 -2
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
- package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -1
- package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
- package/dist/components/base/forms/form-field.d.ts +7 -2
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/workflow.d.ts +7 -1
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +8 -1
- package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
- package/dist/components/base/metadata-list/metadata-list.d.ts +1 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/language-switcher.d.ts +12 -4
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +10 -3
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +29 -5
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/upload/avatar-upload.d.ts +2 -1
- package/dist/components/base/upload/image-upload.d.ts +2 -1
- package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +5 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
- package/dist/components/blocks/analytics/types.d.ts +2 -2
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
- package/dist/components/features/activities/activities.types.d.ts +26 -13
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
- package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
- package/dist/components/features/combobox/combobox.d.ts +2 -2
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
- package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
- package/dist/components/features/combobox/types.d.ts +37 -8
- package/dist/components/features/email-composer/types.d.ts +3 -1
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
- package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +6 -3
- package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +5 -3
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +25 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +8 -0
- package/dist/components/features/media-library/media-library.types.d.ts +50 -12
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +4 -4
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +45 -8
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +6 -2
- package/dist/components/features/resource/resource.types.d.ts +14 -1
- package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
- package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -0
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table-body.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +6 -3
- package/dist/components/features/table/table.strings.d.ts +3 -0
- package/dist/components/features/table/table.types.d.ts +18 -2
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +9 -8
- package/dist/components/layout/layout.types.d.ts +5 -3
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/navigation/side-nav.d.ts +3 -2
- package/dist/components/layout/normalize-layout-path.d.ts +1 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +10 -3
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +38 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +6 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +50 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/primitives/link.d.ts +3 -2
- package/dist/components/primitives/money.d.ts +1 -1
- package/dist/components/primitives/number.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/{containers-CRmHf7GP.js → containers-CSdc32h9.js} +26 -18
- package/dist/containers-CSdc32h9.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-CnGCZdX4.js → copyable-3fdHfMR3.js} +7 -7
- package/dist/{copyable-CnGCZdX4.js.map → copyable-3fdHfMR3.js.map} +1 -1
- package/dist/{data-display-D4oujtx0.js → data-display-Cmj-xZYl.js} +271 -279
- package/dist/data-display-Cmj-xZYl.js.map +1 -0
- package/dist/{date-Q7jnXxpk.js → date-Br0FicVv.js} +5 -5
- package/dist/{date-Q7jnXxpk.js.map → date-Br0FicVv.js.map} +1 -1
- package/dist/date-picker-CyQlFYsP.js +1617 -0
- package/dist/date-picker-CyQlFYsP.js.map +1 -0
- package/dist/date-pickers-tj2MXmXd.js +185 -0
- package/dist/date-pickers-tj2MXmXd.js.map +1 -0
- package/dist/{display-BB4BL_-K.js → display-CT_N2a3w.js} +9 -9
- package/dist/{display-BB4BL_-K.js.map → display-CT_N2a3w.js.map} +1 -1
- package/dist/dropdown-menu-C08iIugv.js +194 -0
- package/dist/dropdown-menu-C08iIugv.js.map +1 -0
- package/dist/features/activities.js +388 -326
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +46 -32
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +130 -130
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +243 -239
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +197 -199
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +168 -143
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +19 -30
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +369 -343
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1202 -975
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +2 -2
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1270 -1183
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +160 -153
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +119 -113
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +28 -19
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +297 -256
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +57 -50
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +470 -470
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-Dzo1xtAU.js +246 -0
- package/dist/feedback-Dzo1xtAU.js.map +1 -0
- package/dist/{field-affordance-recipes-DjwGx8eM.js → field-affordance-recipes-D6H7tVJi.js} +5 -5
- package/dist/field-affordance-recipes-D6H7tVJi.js.map +1 -0
- package/dist/field-control-attributes-B6i335wr.js +18 -0
- package/dist/field-control-attributes-B6i335wr.js.map +1 -0
- package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
- package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
- package/dist/filters-Dl80yYtN.js +2415 -0
- package/dist/filters-Dl80yYtN.js.map +1 -0
- package/dist/form-field-CAPdwdnZ.js +74 -0
- package/dist/form-field-CAPdwdnZ.js.map +1 -0
- package/dist/{form-sizing-NXgjkmBG.js → form-sizing-CgcrUbLU.js} +5 -5
- package/dist/form-sizing-CgcrUbLU.js.map +1 -0
- package/dist/{forms-BV5m5aQF.js → forms-B3W8CH7-.js} +17 -13
- package/dist/forms-B3W8CH7-.js.map +1 -0
- package/dist/forms-numeric-CwjQJe-O.js +991 -0
- package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
- package/dist/{header-BA697l4a.js → header-ZIIsRKxP.js} +145 -141
- package/dist/header-ZIIsRKxP.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-BQ-L7Uu2.js → hooks-BitHSh-Y.js} +27 -15
- package/dist/hooks-BitHSh-Y.js.map +1 -0
- package/dist/{icon-badge-COWbCCWu.js → icon-badge-npxF1SLX.js} +4 -4
- package/dist/{icon-badge-COWbCCWu.js.map → icon-badge-npxF1SLX.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/{input-Cdw4k0fb.js → input-7KAc7XQL.js} +9 -9
- package/dist/{input-Cdw4k0fb.js.map → input-7KAc7XQL.js.map} +1 -1
- package/dist/input-DIREVYHs.js +21 -0
- package/dist/input-DIREVYHs.js.map +1 -0
- package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
- package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
- package/dist/item-FfWnaYST.js +278 -0
- package/dist/item-FfWnaYST.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +12 -12
- package/dist/layout.types-E_GAApzO.js +30 -0
- package/dist/layout.types-E_GAApzO.js.map +1 -0
- package/dist/lib/affordance-geometry.generated.d.ts +35 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/field-control-attributes.d.ts +11 -0
- package/dist/lib/field-state-recipes.d.ts +2 -0
- package/dist/lib/format.d.ts +1 -0
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/surface-recipes.d.ts +1 -1
- package/dist/lib/token-merge.generated.d.ts +18 -15
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-CSl5W1Fy.js → media-gallery-C81DAnKI.js} +6 -6
- package/dist/{media-gallery-CSl5W1Fy.js.map → media-gallery-C81DAnKI.js.map} +1 -1
- package/dist/{mentions-RKOQaaIB.js → mentions-qOnedSt4.js} +237 -168
- package/dist/mentions-qOnedSt4.js.map +1 -0
- package/dist/message-BJHnn43M.js +135 -0
- package/dist/message-BJHnn43M.js.map +1 -0
- package/dist/{metadata-list-qVV7AVxa.js → metadata-list-XkqZ_UXH.js} +64 -64
- package/dist/metadata-list-XkqZ_UXH.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-BgtPJAhi.js +288 -0
- package/dist/navigation-BgtPJAhi.js.map +1 -0
- package/dist/navigation-Bt-v7rWP.js +261 -0
- package/dist/navigation-Bt-v7rWP.js.map +1 -0
- package/dist/{navigation-row-recipes-WZEs-hYo.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
- package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
- package/dist/{number-E_OiIfJz.js → number-CYqBcrSj.js} +79 -87
- package/dist/number-CYqBcrSj.js.map +1 -0
- package/dist/overflow-tab-bar-BQCA2Zn2.js +172 -0
- package/dist/overflow-tab-bar-BQCA2Zn2.js.map +1 -0
- package/dist/overlays-CC8zI3Du.js +1017 -0
- package/dist/overlays-CC8zI3Du.js.map +1 -0
- package/dist/page-BoQ1VaFJ.js +331 -0
- package/dist/page-BoQ1VaFJ.js.map +1 -0
- package/dist/page-header-commands-DIKspJfx.js +193 -0
- package/dist/page-header-commands-DIKspJfx.js.map +1 -0
- package/dist/{pagination-Ch8X_47u.js → pagination-Br8TdV9A.js} +7 -7
- package/dist/{pagination-Ch8X_47u.js.map → pagination-Br8TdV9A.js.map} +1 -1
- package/dist/popover-k8TdUcAt.js +201 -0
- package/dist/popover-k8TdUcAt.js.map +1 -0
- package/dist/{popover-menu-BYaCdFhf.js → popover-menu-yn-o0kyA.js} +7 -7
- package/dist/{popover-menu-BYaCdFhf.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DJ0AkUan.js} +19 -12
- package/dist/popover.recipes-DJ0AkUan.js.map +1 -0
- package/dist/portal-recipes-DyUXqUtD.js +9 -0
- package/dist/portal-recipes-DyUXqUtD.js.map +1 -0
- package/dist/{primitives-Du64iDbb.js → primitives-BkkQjYl7.js} +23 -18
- package/dist/primitives-BkkQjYl7.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-BvF2oCdV.js → progress-DZFXXzPs.js} +9 -9
- package/dist/{progress-BvF2oCdV.js.map → progress-DZFXXzPs.js.map} +1 -1
- package/dist/{receipt-D789Jwyy.js → receipt-C7LhOg7Q.js} +7 -7
- package/dist/receipt-C7LhOg7Q.js.map +1 -0
- package/dist/rich-text-BnTzZjIo.js +45 -0
- package/dist/rich-text-BnTzZjIo.js.map +1 -0
- package/dist/{rich-text-editor-Cm1dpUpQ.js → rich-text-editor-CAurDwT5.js} +501 -424
- package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js +99 -0
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
- package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
- package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
- package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
- package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
- package/dist/{scroll-area-La5RXsEk.js → scroll-area-Bj6CRUif.js} +2 -2
- package/dist/{scroll-area-La5RXsEk.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
- package/dist/{separator-DAEV0w65.js → separator-B9ewiCGO.js} +2 -2
- package/dist/{separator-DAEV0w65.js.map → separator-B9ewiCGO.js.map} +1 -1
- package/dist/{separator-GNfPG-90.js → separator-DM6gs2vu.js} +3 -3
- package/dist/{separator-GNfPG-90.js.map → separator-DM6gs2vu.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-DZPHgpx4.js +155 -0
- package/dist/settings-DZPHgpx4.js.map +1 -0
- package/dist/sheet-C4DHsgLk.js +250 -0
- package/dist/sheet-C4DHsgLk.js.map +1 -0
- package/dist/sidebar-C8BnDwTH.js +709 -0
- package/dist/sidebar-C8BnDwTH.js.map +1 -0
- package/dist/sidebar-CmD6a-HK.js +1004 -0
- package/dist/sidebar-CmD6a-HK.js.map +1 -0
- package/dist/skeleton-DDgdhmu9.js +265 -0
- package/dist/skeleton-DDgdhmu9.js.map +1 -0
- package/dist/smart-card-B6vLxqa_.js +617 -0
- package/dist/smart-card-B6vLxqa_.js.map +1 -0
- package/dist/{structure-C0V0_Fyf.js → structure-DZJ2wbAU.js} +2 -2
- package/dist/{structure-C0V0_Fyf.js.map → structure-DZJ2wbAU.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
- package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
- package/dist/{table-DH7rozUv.js → table-CBonSdTp.js} +573 -519
- package/dist/table-CBonSdTp.js.map +1 -0
- package/dist/{table-CpvnzJn9.js → table-CXSPHH25.js} +75 -71
- package/dist/table-CXSPHH25.js.map +1 -0
- package/dist/tabs-C4Kr_hCr.js +192 -0
- package/dist/tabs-C4Kr_hCr.js.map +1 -0
- package/dist/{text-inputs-DXItiR0O.js → text-inputs-jdkS3ReG.js} +18 -18
- package/dist/text-inputs-jdkS3ReG.js.map +1 -0
- package/dist/theme.css +40 -37
- package/dist/{timelines-DmtztAY_.js → timelines-CoPwdJP0.js} +13 -12
- package/dist/timelines-CoPwdJP0.js.map +1 -0
- package/dist/tooltip-31NwIpTo.js +113 -0
- package/dist/tooltip-31NwIpTo.js.map +1 -0
- package/dist/{tree-CV11PURP.js → tree-CeYVzdFE.js} +9 -9
- package/dist/{tree-CV11PURP.js.map → tree-CeYVzdFE.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-CSyJrh28.js → typography-C7-YMW1S.js} +12 -12
- package/dist/{typography-CSyJrh28.js.map → typography-C7-YMW1S.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-C9SA0X-8.js → upload-Hdm5gObf.js} +309 -296
- package/dist/upload-Hdm5gObf.js.map +1 -0
- package/dist/{upload-queue-DhQJiSRc.js → upload-queue-D0sYPuqo.js} +16 -14
- package/dist/upload-queue-D0sYPuqo.js.map +1 -0
- package/dist/{usage-card-DVTRDmGz.js → usage-card-9s8hLDfn.js} +24 -17
- package/dist/usage-card-9s8hLDfn.js.map +1 -0
- package/dist/{utils-CF3c95Io.js → utils-DhuoqFy4.js} +255 -165
- package/dist/utils-DhuoqFy4.js.map +1 -0
- package/dist/value-inputs-D3aPgq9H.js +980 -0
- package/dist/value-inputs-D3aPgq9H.js.map +1 -0
- package/dist/{value-typography-ClupF0Gz.js → value-typography-uSzzG9Gf.js} +32 -26
- package/dist/value-typography-uSzzG9Gf.js.map +1 -0
- package/dist/{workspace-9EFVXUyk.js → workspace-CC8Vchiu.js} +51 -50
- package/dist/workspace-CC8Vchiu.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +4 -3
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +52 -1
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +3 -3
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +38 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +1 -1
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +24 -11
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +21 -19
- package/docs/consumer-skill/references/analytics.md +33 -1
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +21249 -14205
- package/docs/consumer-skill/references/composition-mapping.md +17 -3
- package/docs/consumer-skill/references/composition.md +177 -32
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +12 -9
- package/docs/consumer-skill/references/discovery.md +27 -3
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +62 -8
- package/docs/consumer-skill/references/integration.md +59 -1
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +3044 -445
- package/docs/consumer-skill/references/review.md +87 -10
- package/docs/consumer-skill/references/rhf-workflows.md +79 -0
- package/docs/consumer-skill/references/screen-archetypes.md +19 -7
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +24 -20
- package/docs/consumer-skill/references/tokens.json +9 -9
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +7 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +176 -26
- package/docs/consumer-skill/scripts/composition-schema.mjs +1 -1
- package/docs/consumer-skill/scripts/composition.mjs +61 -5
- package/docs/consumer-skill/scripts/discovery.mjs +54 -0
- package/docs/consumer-skill/scripts/inspect-component.mjs +1 -1
- package/docs/consumer-skill/scripts/inspection.mjs +73 -18
- package/docs/consumer-skill/scripts/setup-skills.mjs +79 -7
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +14 -13
- package/docs/consumer-skills/themelia-composition/SKILL.md +16 -17
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +2 -1
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +24 -17
- package/package.json +4 -2
- package/templates/admin-shell-template.tsx +1 -2
- package/templates/customers-template.tsx +18 -16
- package/dist/accordion-96o0pN62.js.map +0 -1
- package/dist/action-menu-CHgs8vmj.js.map +0 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +0 -1
- package/dist/ai-artifact-BZUGwBq6.js.map +0 -1
- package/dist/app-shell-D63ATkIK.js +0 -237
- package/dist/app-shell-D63ATkIK.js.map +0 -1
- package/dist/auth-D2FVZ1MH.js.map +0 -1
- package/dist/avatar-DWO_HHhB.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-CdfIkCsV.js.map +0 -1
- package/dist/breadcrumbs-B-WFKecD.js.map +0 -1
- package/dist/button-DkmK-z8E.js.map +0 -1
- package/dist/buttons-BbfzgczK.js.map +0 -1
- package/dist/cards-4JTWqvVe.js +0 -68
- package/dist/cards-4JTWqvVe.js.map +0 -1
- package/dist/chart-C19flDQb.js +0 -155
- package/dist/chart-C19flDQb.js.map +0 -1
- package/dist/choice-inputs-JLtij2y4.js +0 -776
- package/dist/choice-inputs-JLtij2y4.js.map +0 -1
- package/dist/code-block-CGNaUtAE.js.map +0 -1
- package/dist/combobox-CBJDs6w_.js +0 -877
- package/dist/combobox-CBJDs6w_.js.map +0 -1
- package/dist/combobox-hbhSS18O.js +0 -355
- package/dist/combobox-hbhSS18O.js.map +0 -1
- package/dist/command-D8NrBj-b.js.map +0 -1
- package/dist/comments-Di4w0H_S.js.map +0 -1
- package/dist/containers-CRmHf7GP.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-D4oujtx0.js.map +0 -1
- package/dist/date-picker-zOt1oNss.js +0 -1542
- package/dist/date-picker-zOt1oNss.js.map +0 -1
- package/dist/date-pickers-cj8IXbDC.js +0 -179
- package/dist/date-pickers-cj8IXbDC.js.map +0 -1
- package/dist/dropdown-menu-CjY8Vt7W.js +0 -193
- package/dist/dropdown-menu-CjY8Vt7W.js.map +0 -1
- package/dist/feedback-DZNL5Lg1.js +0 -239
- package/dist/feedback-DZNL5Lg1.js.map +0 -1
- package/dist/field-affordance-recipes-DjwGx8eM.js.map +0 -1
- package/dist/filters-BcT-uoFy.js +0 -2209
- package/dist/filters-BcT-uoFy.js.map +0 -1
- package/dist/form-field-CsgRmdit.js +0 -63
- package/dist/form-field-CsgRmdit.js.map +0 -1
- package/dist/form-sizing-NXgjkmBG.js.map +0 -1
- package/dist/forms-BV5m5aQF.js.map +0 -1
- package/dist/forms-numeric-Cd33AKbD.js +0 -906
- package/dist/forms-numeric-Cd33AKbD.js.map +0 -1
- package/dist/header-BA697l4a.js.map +0 -1
- package/dist/hooks-BQ-L7Uu2.js.map +0 -1
- package/dist/input-DOPL5_QE.js +0 -21
- package/dist/input-DOPL5_QE.js.map +0 -1
- package/dist/item-BvZ2DR_x.js +0 -277
- package/dist/item-BvZ2DR_x.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/mentions-RKOQaaIB.js.map +0 -1
- package/dist/message-INU2xsxu.js +0 -128
- package/dist/message-INU2xsxu.js.map +0 -1
- package/dist/metadata-list-qVV7AVxa.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-BQNcg1jT.js +0 -269
- package/dist/navigation-BQNcg1jT.js.map +0 -1
- package/dist/navigation-DLF3E1IC.js +0 -145
- package/dist/navigation-DLF3E1IC.js.map +0 -1
- package/dist/navigation-row-recipes-WZEs-hYo.js.map +0 -1
- package/dist/number-E_OiIfJz.js.map +0 -1
- package/dist/overflow-tab-bar-CrbqMteP.js +0 -284
- package/dist/overflow-tab-bar-CrbqMteP.js.map +0 -1
- package/dist/overlays-BlKynmde.js +0 -1004
- package/dist/overlays-BlKynmde.js.map +0 -1
- package/dist/page-CIwNUtGr.js +0 -227
- package/dist/page-CIwNUtGr.js.map +0 -1
- package/dist/page-header-commands-DFMlNYzN.js +0 -128
- package/dist/page-header-commands-DFMlNYzN.js.map +0 -1
- package/dist/popover-uwzX2vo7.js +0 -198
- package/dist/popover-uwzX2vo7.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/primitives-Du64iDbb.js.map +0 -1
- package/dist/receipt-D789Jwyy.js.map +0 -1
- package/dist/rich-text-CLJEf76s.js +0 -78
- package/dist/rich-text-CLJEf76s.js.map +0 -1
- package/dist/rich-text-editor-Cm1dpUpQ.js.map +0 -1
- package/dist/rich-text-editor-toolbar-L__e4x47.js +0 -94
- package/dist/rich-text-editor-toolbar-L__e4x47.js.map +0 -1
- package/dist/safe-image-src-C6kQSMBZ.js +0 -17
- package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
- package/dist/sanitize-html-DsQmI48u.js.map +0 -1
- package/dist/settings-BA2iboic.js +0 -174
- package/dist/settings-BA2iboic.js.map +0 -1
- package/dist/sheet-DoAxTb2J.js +0 -213
- package/dist/sheet-DoAxTb2J.js.map +0 -1
- package/dist/sidebar-ByqKR_W5.js +0 -512
- package/dist/sidebar-ByqKR_W5.js.map +0 -1
- package/dist/sidebar-D2iSnGJ7.js +0 -619
- package/dist/sidebar-D2iSnGJ7.js.map +0 -1
- package/dist/skeleton-CUj8O5Bd.js +0 -264
- package/dist/skeleton-CUj8O5Bd.js.map +0 -1
- package/dist/smart-card-CqkzQsK-.js +0 -614
- package/dist/smart-card-CqkzQsK-.js.map +0 -1
- package/dist/table-CpvnzJn9.js.map +0 -1
- package/dist/table-DH7rozUv.js.map +0 -1
- package/dist/tabs-eqVsJZWO.js +0 -191
- package/dist/tabs-eqVsJZWO.js.map +0 -1
- package/dist/text-inputs-DXItiR0O.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-DmtztAY_.js.map +0 -1
- package/dist/tooltip-B4hjKtoV.js +0 -111
- package/dist/tooltip-B4hjKtoV.js.map +0 -1
- package/dist/ui-provider-CQCuCBcy.js +0 -136
- package/dist/ui-provider-CQCuCBcy.js.map +0 -1
- package/dist/upload-C9SA0X-8.js.map +0 -1
- package/dist/upload-queue-DhQJiSRc.js.map +0 -1
- package/dist/usage-card-DVTRDmGz.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-CF3c95Io.js.map +0 -1
- package/dist/value-inputs-C0o70p-U.js +0 -980
- package/dist/value-inputs-C0o70p-U.js.map +0 -1
- package/dist/value-typography-ClupF0Gz.js.map +0 -1
- package/dist/workspace-9EFVXUyk.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questionnaire.js","names":["_Fragment","useDensityConfig","resolveComponentScale","cn","Button","Text","Stack","Progress","formLabelSizeClasses","Input","FormField","Textarea","Select","CardRadioGroup","choiceControlTrackClasses","Checkbox","Fragment$1","QuestionnaireControl","context","checkTrack","defaultScale","common","error","labelId","descriptionId","question","answer","onAnswerChange","event","values","optionId","index","disabled","option","checked","entry","Label","defaultQuestionnaireStrings","current","total","getVisibleQuestions","questions","answers","getQuestionnaireAnswer","id","validateQuestion","value","empty","strings","selected","url","result","getSubmissionAnswers","emptyAnswers","Questionnaire","forwardRef","controlledValue","stringsProp","formProps","props","controlled","stepControlled","internalValue","setInternalValue","useState","defaultValue","answersRef","useRef","visible","internalId","setInternalId","defaultQuestionId","requestedId","questionId","position","errors","setErrors","submitError","setSubmitError","busy","setBusy","completed","setCompleted","submission","resetTimer","mounted","stageRef","useStrings","useId","locked","cancelReset","cancel","goTo","nextId","onQuestionChange","setAnswer","next","onValueChange","previous","useEffect","advance","submit","validation","firstInvalid","controller","snapshot","onSubmit","onComplete","formatSubmitError","onError","currentError","description","className","nativeEvent","initialVisible","initialQuestion","headerSlot","completionSlot","Heading","emptySlot"],"sources":["../../src/components/features/questionnaire/questionnaire-control.tsx","../../src/components/features/questionnaire/questionnaire.types.ts","../../src/components/features/questionnaire/questionnaire.utils.ts","../../src/components/features/questionnaire/questionnaire.tsx"],"sourcesContent":["import { CardRadioGroup, Checkbox, Select } from '../../base/choice-inputs';\nimport { choiceControlTrackClasses } from '../../base/choice-inputs/choice-types';\nimport { formLabelSizeClasses } from '../../base/forms/form-sizing';\nimport { Input, Textarea } from '../../base/text-inputs';\nimport { Stack } from '../../base/structure';\nimport { Label, Text } from '../../typography';\nimport { useDensityConfig } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\nimport type { QuestionnaireQuestionContext } from './questionnaire.types';\n\n/** All interactive behavior remains with public Base UI-backed field owners. */\nexport function QuestionnaireControl({ question, answer, disabled, error, labelId, descriptionId, onAnswerChange, ...context }: QuestionnaireQuestionContext) {\n\tconst { defaultScale } = useDensityConfig();\n\t// Each checkbox sits in a track one Label line tall, so it centres on the\n\t// option's first line whether or not the label wraps.\n\tconst checkTrack = cn('questionnaire--check', choiceControlTrackClasses, formLabelSizeClasses[resolveComponentScale(undefined, defaultScale)]);\n\tconst common = { disabled, invalid: Boolean(error), 'aria-labelledby': labelId, 'aria-describedby': descriptionId, required: question.required };\n\tif (question.type === 'custom') return question.render({ ...context, question, answer, disabled, error, labelId, descriptionId, onAnswerChange });\n\tif (question.type === 'text') return <Input {...common} type={question.inputType ?? 'text'} maxLength={question.maxLength} placeholder={question.placeholder} value={typeof answer === 'string' ? answer : ''} onChange={(event) => onAnswerChange(event.target.value)} />;\n\tif (question.type === 'textarea') return <Textarea {...common} rows={question.rows ?? 4} maxLength={question.maxLength} placeholder={question.placeholder} value={typeof answer === 'string' ? answer : ''} onChange={(event) => onAnswerChange(event.target.value)} />;\n\tif (question.type === 'select') return <Select {...common} options={question.options} value={typeof answer === 'string' ? answer : null} onValueChange={onAnswerChange} />;\n\tif (question.type === 'single') return <fieldset aria-labelledby={labelId} aria-describedby={descriptionId} className=\"questionnaire--choices m-0 min-w-0 border-0 p-0\"><CardRadioGroup options={question.options} value={typeof answer === 'string' ? answer : ''} disabled={disabled} invalid={Boolean(error)} onValueChange={onAnswerChange} columns={1} /></fieldset>;\n\tif (question.type === 'multiple') return <fieldset aria-labelledby={labelId} aria-describedby={descriptionId} className=\"questionnaire--choices m-0 min-w-0 border-0 p-0\"><Stack gap=\"sm\">{question.options.map((option, index) => {\n\t\tconst values = Array.isArray(answer) ? answer : [];\n\t\tconst optionId = `${labelId}-option-${index}`;\n\t\treturn <Stack key={option.value} direction=\"horizontal\" align=\"start\" gap=\"sm\">\n\t\t\t<span className={checkTrack}><Checkbox id={optionId} disabled={disabled || option.disabled} aria-invalid={Boolean(error) || undefined} aria-describedby={[descriptionId, option.description ? `${optionId}-description` : undefined].filter(Boolean).join(' ') || undefined} checked={values.includes(option.value)} onCheckedChange={(checked) => onAnswerChange(checked ? [...values, option.value] : values.filter((entry) => entry !== option.value))} /></span>\n\t\t\t<Stack gap=\"dense\"><Label htmlFor={optionId} className=\"text-inherit\">{option.label}</Label>{option.description && <Text id={`${optionId}-description`} size=\"xs\" type=\"secondary\">{option.description}</Text>}</Stack>\n\t\t</Stack>;\n\t})}</Stack></fieldset>;\n\tif (question.type === 'boolean') return <Stack direction=\"horizontal\" align=\"start\" gap=\"sm\"><span className={checkTrack}><Checkbox {...common} aria-labelledby={undefined} id={`${labelId}-checkbox`} checked={answer === true} onCheckedChange={(checked) => onAnswerChange(checked)} /></span><Label htmlFor={`${labelId}-checkbox`} className=\"text-inherit\">{question.label ?? question.title}</Label></Stack>;\n\treturn null;\n}\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport type { StringsProp } from '../../../lib/strings';\n\nexport type QuestionnaireAnswer = string | string[] | boolean | undefined;\nexport type QuestionnaireAnswers = Record<string, QuestionnaireAnswer>;\nexport interface QuestionnaireOption { value: string; label: string; description?: string; disabled?: boolean }\nexport interface QuestionnaireQuestionBase {\n\t/** Unique stable key, used to retain answers across conditional visibility changes. */\n\tid: string;\n\ttitle: string;\n\tdescription?: string;\n\trequired?: boolean;\n\tdisabled?: boolean;\n\t/** Hidden answers are retained for editing, but excluded from validation/submission. */\n\twhen?: (answers: QuestionnaireAnswers) => boolean;\n\t/** Return an error message, or undefined/true for a valid answer. */\n\tvalidate?: (answer: QuestionnaireAnswer, answers: QuestionnaireAnswers) => string | true | undefined;\n}\nexport interface QuestionnaireTextQuestion extends QuestionnaireQuestionBase {\n\ttype: 'text' | 'textarea';\n\tplaceholder?: string;\n\t/** Native text input type. */\n\tinputType?: 'text' | 'email' | 'url' | 'tel';\n\trows?: number;\n\tmaxLength?: number;\n}\nexport interface QuestionnaireChoiceQuestion extends QuestionnaireQuestionBase {\n\ttype: 'single' | 'multiple' | 'select';\n\toptions: QuestionnaireOption[];\n}\nexport interface QuestionnaireBooleanQuestion extends QuestionnaireQuestionBase { type: 'boolean'; label?: string }\nexport interface QuestionnaireCustomQuestion extends QuestionnaireQuestionBase {\n\ttype: 'custom';\n\trender: (context: QuestionnaireQuestionContext) => ReactNode;\n}\nexport type QuestionnaireQuestion = QuestionnaireTextQuestion | QuestionnaireChoiceQuestion | QuestionnaireBooleanQuestion | QuestionnaireCustomQuestion;\nexport interface QuestionnaireQuestionContext {\n\tquestion: QuestionnaireQuestion;\n\tanswer: QuestionnaireAnswer;\n\tanswers: QuestionnaireAnswers;\n\tdisabled: boolean;\n\terror?: string;\n\t/** Connect custom controls to the visible title and description/error. */\n\tlabelId: string;\n\tdescriptionId?: string;\n\tonAnswerChange: (answer: QuestionnaireAnswer) => void;\n}\nexport interface QuestionnaireSubmitContext { signal: AbortSignal }\nexport interface QuestionnaireStrings {\n\tprevious: string; next: string; submit: string; retry: string; cancel: string;\n\tsubmitting: string; submitted: string; editAnswers: string; empty: string;\n\trequired: string; invalidChoice: string; invalidFormat: string; progress: string;\n\tstep: (current: number, total: number) => string;\n\tsubmitError: string;\n}\nexport const defaultQuestionnaireStrings: QuestionnaireStrings = {\n\tprevious: 'Previous', next: 'Next', submit: 'Submit answers', retry: 'Try again', cancel: 'Cancel submission',\n\tsubmitting: 'Submitting answers…', submitted: 'Your answers have been submitted.', editAnswers: 'Edit answers',\n\tempty: 'There are no questions to answer.', required: 'Please answer this question.', invalidChoice: 'Choose an available option.',\n\tinvalidFormat: 'Enter a valid answer.', progress: 'Questionnaire progress', step: (current, total) => `Question ${current} of ${total}`,\n\tsubmitError: 'Answers could not be submitted. Please try again.',\n};\nexport interface QuestionnaireProps extends Omit<ComponentPropsWithoutRef<'form'>, 'children' | 'onSubmit' | 'defaultValue' | 'onChange'> {\n\tquestions: readonly QuestionnaireQuestion[];\n\t/** Controlled answers. */\n\tvalue?: QuestionnaireAnswers;\n\t/** Initial answers for uncontrolled use. */\n\tdefaultValue?: QuestionnaireAnswers;\n\tonValueChange?: (answers: QuestionnaireAnswers) => void;\n\t/** Controlled active question key. */\n\tquestionId?: string;\n\tdefaultQuestionId?: string;\n\tonQuestionChange?: (id: string) => void;\n\tdisabled?: boolean;\n\t/** Receives only visible, enabled questions. Respect signal to cancel application requests. */\n\tonSubmit?: (answers: QuestionnaireAnswers, context: QuestionnaireSubmitContext) => void | Promise<void>;\n\tonComplete?: (answers: QuestionnaireAnswers) => void;\n\tonError?: (error: unknown) => void;\n\tformatSubmitError?: (error: unknown) => string;\n\theaderSlot?: ReactNode;\n\temptySlot?: ReactNode;\n\t/** Replaces the completion state; default includes an edit-answers action. */\n\tcompletionSlot?: ReactNode;\n\tstrings?: StringsProp<QuestionnaireStrings>;\n}\n","import type { QuestionnaireAnswers, QuestionnaireQuestion, QuestionnaireStrings } from './questionnaire.types';\n\nexport function getVisibleQuestions(questions: readonly QuestionnaireQuestion[], answers: QuestionnaireAnswers) {\n\treturn questions.filter((question) => !question.when || question.when(answers));\n}\nexport function getQuestionnaireAnswer(answers: QuestionnaireAnswers, id: string) {\n\treturn Object.hasOwn(answers, id) ? answers[id] : undefined;\n}\nexport function validateQuestion(question: QuestionnaireQuestion, answers: QuestionnaireAnswers, strings: QuestionnaireStrings): string | undefined {\n\tif (question.disabled) return;\n\tconst value = getQuestionnaireAnswer(answers, question.id);\n\tconst empty = value === undefined || (typeof value === 'string' && !value.trim()) || (Array.isArray(value) && value.length === 0);\n\tif (question.required && (empty || (question.type === 'boolean' && value !== true))) return strings.required;\n\tif (value !== undefined) {\n\t\tif ((question.type === 'text' || question.type === 'textarea') && typeof value !== 'string') return strings.invalidFormat;\n\t\tif (question.type === 'boolean' && typeof value !== 'boolean') return strings.invalidFormat;\n\t\tif ((question.type === 'multiple' && !Array.isArray(value)) || ((question.type === 'single' || question.type === 'select') && typeof value !== 'string')) return strings.invalidChoice;\n\t}\n\tif (!empty) {\n\t\tif (question.type === 'single' || question.type === 'select' || question.type === 'multiple') {\n\t\t\tconst selected = Array.isArray(value) ? value : [value];\n\t\t\tif ((question.type === 'multiple' ? !Array.isArray(value) : typeof value !== 'string') || selected.some((entry) => !question.options.some((option) => option.value === entry && !option.disabled))) return strings.invalidChoice;\n\t\t} else if (question.type === 'text' || question.type === 'textarea') {\n\t\t\tif (typeof value !== 'string' || (question.maxLength !== undefined && value.length > question.maxLength)) return strings.invalidFormat;\n\t\t\tif (question.inputType === 'email' && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) return strings.invalidFormat;\n\t\t\tif (question.inputType === 'url') { try { const url = new URL(value); if (!url.host || !['http:', 'https:'].includes(url.protocol)) return strings.invalidFormat; } catch { return strings.invalidFormat; } }\n\t\t} else if (question.type === 'boolean' && typeof value !== 'boolean') return strings.invalidFormat;\n\t}\n\tconst result = question.validate?.(value, answers);\n\treturn typeof result === 'string' && result.length > 0 ? result : undefined;\n}\n\nexport function getSubmissionAnswers(questions: readonly QuestionnaireQuestion[], answers: QuestionnaireAnswers): QuestionnaireAnswers {\n\treturn Object.fromEntries(getVisibleQuestions(questions, answers).filter((question) => !question.disabled).map((question) => {\n\t\tconst answer = getQuestionnaireAnswer(answers, question.id);\n\t\treturn [question.id, Array.isArray(answer) ? [...answer] : answer];\n\t}));\n}\n","import { forwardRef, useEffect, useId, useRef, useState } from 'react';\nimport { Button } from '../../base/buttons';\nimport { FormField } from '../../base/forms/form-field';\nimport { Progress } from '../../base/feedback';\nimport { Stack } from '../../base/structure';\nimport { Heading, Text } from '../../typography';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { QuestionnaireControl } from './questionnaire-control';\nimport { defaultQuestionnaireStrings, type QuestionnaireAnswer, type QuestionnaireAnswers, type QuestionnaireProps } from './questionnaire.types';\nimport { getQuestionnaireAnswer, getSubmissionAnswers, getVisibleQuestions, validateQuestion } from './questionnaire.utils';\n\nconst emptyAnswers: QuestionnaireAnswers = {};\n\nexport const Questionnaire = forwardRef<HTMLFormElement, QuestionnaireProps>(function Questionnaire(props, ref) {\n\tconst { questions, value: controlledValue, defaultValue = {}, onValueChange, questionId, defaultQuestionId, onQuestionChange,\n\t\tdisabled = false, onSubmit, onComplete, onError, formatSubmitError, headerSlot, emptySlot, completionSlot, strings: stringsProp,\n\t\tclassName, onReset, ...formProps } = props;\n\tconst controlled = Object.prototype.hasOwnProperty.call(props, 'value');\n\tconst stepControlled = Object.prototype.hasOwnProperty.call(props, 'questionId');\n\tconst [internalValue, setInternalValue] = useState<QuestionnaireAnswers>(defaultValue);\n\tconst answers = controlled ? controlledValue ?? emptyAnswers : internalValue;\n\tconst answersRef = useRef(answers); answersRef.current = answers;\n\tconst visible = getVisibleQuestions(questions, answers);\n\tconst [internalId, setInternalId] = useState<string | undefined>(defaultQuestionId ?? visible[0]?.id);\n\tconst requestedId = stepControlled ? questionId : internalId;\n\tconst current = visible.find((question) => question.id === requestedId) ?? visible[0];\n\tconst position = current ? visible.indexOf(current) : 0;\n\tconst [errors, setErrors] = useState<Record<string, string | undefined>>({});\n\tconst [submitError, setSubmitError] = useState<string>();\n\tconst [busy, setBusy] = useState(false);\n\tconst [completed, setCompleted] = useState(false);\n\tconst submission = useRef<AbortController | null>(null);\n\tconst resetTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\tconst mounted = useRef(true);\n\tconst stageRef = useRef<HTMLDivElement>(null);\n\tconst strings = useStrings(defaultQuestionnaireStrings, stringsProp);\n\tconst id = useId();\n\tconst labelId = `${id}-title`;\n\tconst descriptionId = `${id}-description`;\n\tconst locked = busy || disabled;\n\tconst cancelReset = () => { clearTimeout(resetTimer.current); resetTimer.current = undefined; };\n\tconst cancel = () => { submission.current?.abort(); submission.current = null; setBusy(false); };\n\tconst goTo = (nextId: string) => { if (!stepControlled) setInternalId(nextId); onQuestionChange?.(nextId); };\n\tconst setAnswer = (answer: QuestionnaireAnswer) => {\n\t\tif (!current || current.disabled || locked) return;\n\t\tconst next = { ...answersRef.current, [current.id]: answer };\n\t\tif (!controlled) { answersRef.current = next; setInternalValue(next); }\n\t\tonValueChange?.(next);\n\t\tsetErrors((previous) => ({ ...previous, [current.id]: undefined })); setSubmitError(undefined); setCompleted(false);\n\t};\n\tuseEffect(() => { stageRef.current?.focus(); }, [current?.id, completed]);\n\tuseEffect(() => {\n\t\t// Replacing data/schema or disabling during a request invalidates that result.\n\t\tcancelReset(); cancel(); setErrors({}); setSubmitError(undefined); setCompleted(false);\n\t}, [answers, questions, disabled]);\n\tuseEffect(() => { mounted.current = true; return () => { mounted.current = false; cancelReset(); submission.current?.abort(); submission.current = null; }; }, []);\n\tconst advance = () => {\n\t\tif (!current || locked) return;\n\t\tconst error = validateQuestion(current, answersRef.current, strings);\n\t\tsetErrors((previous) => ({ ...previous, [current.id]: error }));\n\t\tif (error) { stageRef.current?.focus(); return; }\n\t\tif (visible[position + 1]) goTo(visible[position + 1].id);\n\t};\n\tconst submit = async () => {\n\t\tif (submission.current || disabled || !visible.length) return;\n\t\tconst validation = Object.fromEntries(visible.map((question) => [question.id, validateQuestion(question, answersRef.current, strings)]));\n\t\tsetErrors(validation);\n\t\tconst firstInvalid = visible.find((question) => validation[question.id]);\n\t\tif (firstInvalid) { goTo(firstInvalid.id); stageRef.current?.focus(); return; }\n\t\tconst controller = new AbortController(); submission.current = controller;\n\t\tsetSubmitError(undefined); setBusy(true);\n\t\tconst snapshot = getSubmissionAnswers(questions, answersRef.current);\n\t\ttry {\n\t\t\tawait onSubmit?.(snapshot, { signal: controller.signal });\n\t\t\tif (submission.current !== controller || controller.signal.aborted) return;\n\t\t\tsetCompleted(true); onComplete?.(snapshot);\n\t\t} catch (error) {\n\t\t\tif (submission.current !== controller || controller.signal.aborted) return;\n\t\t\tsetSubmitError(formatSubmitError?.(error) ?? strings.submitError); onError?.(error);\n\t\t} finally { if (submission.current === controller) { submission.current = null; setBusy(false); } }\n\t};\n\tconst currentError = current && Object.hasOwn(errors, current.id) ? errors[current.id] : undefined;\n\tconst description = current && (currentError || current.description);\n\treturn <form {...formProps} ref={ref} noValidate aria-busy={busy || undefined} className={cn('questionnaire--component min-w-0', className)} onSubmit={(event) => { event.preventDefault(); if (position < visible.length - 1) advance(); else void submit(); }} onReset={(event) => {\n\t\tonReset?.(event); const nativeEvent = event.nativeEvent;\n\t\t// Trusted events can run microtasks before native ancestor listeners have cancelled reset.\n\t\tcancelReset(); resetTimer.current = setTimeout(() => {\n\t\t\tresetTimer.current = undefined;\n\t\t\tif (!mounted.current || nativeEvent.defaultPrevented || disabled) return; cancel();\n\t\t\tif (!controlled) { answersRef.current = defaultValue; setInternalValue(defaultValue); } onValueChange?.(defaultValue);\n\t\t\tsetErrors({}); setSubmitError(undefined); setCompleted(false);\n\t\t\tconst initialVisible = getVisibleQuestions(questions, defaultValue);\n\t\t\tconst initialQuestion = initialVisible.find((question) => question.id === defaultQuestionId) ?? initialVisible[0];\n\t\t\tif (initialQuestion) goTo(initialQuestion.id); else if (!stepControlled) setInternalId(undefined);\n\t\t}, 0);\n\t}}>\n\t\t<Stack gap=\"lg\">\n\t\t\t{headerSlot}\n\t\t\t{!current ? emptySlot ?? <Text type=\"secondary\">{strings.empty}</Text> : completed ? completionSlot ?? <Stack gap=\"sm\"><Text type=\"inherit\" role=\"status\">{strings.submitted}</Text><Button disabled={disabled} type=\"button\" buttonStyle=\"outline\" onClick={() => { setCompleted(false); if (visible[0]) goTo(visible[0].id); }}>{strings.editAnswers}</Button></Stack> : <>\n\t\t\t\t<Progress value={position + 1} max={visible.length} label={strings.progress} valueSlot={<Text size=\"xs\" type=\"secondary\" aria-live=\"polite\">{strings.step(position + 1, visible.length)}</Text>} />\n\t\t\t\t<Stack ref={stageRef} gap=\"normal\" tabIndex={-1} role=\"group\" aria-labelledby={labelId} className=\"questionnaire--question outline-none\">\n\t\t\t\t\t<Heading className=\"text-inherit\" id={labelId} tag=\"h3\">{current.title}</Heading>\n\t\t\t\t\t<FormField required={current.required} error={currentError} hint={current.description} supportingTextId={descriptionId}>\n\t\t\t\t\t\t<QuestionnaireControl key={current.id} question={current} answer={getQuestionnaireAnswer(answers, current.id)} answers={answers} disabled={locked || Boolean(current.disabled)} error={currentError} labelId={labelId} descriptionId={description ? descriptionId : undefined} onAnswerChange={setAnswer} />\n\t\t\t\t\t</FormField>\n\t\t\t\t</Stack>\n\t\t\t\t{submitError && <Text role=\"alert\" type=\"error\">{submitError}</Text>}\n\t\t\t\t{busy && <Text role=\"status\" type=\"secondary\">{strings.submitting}</Text>}\n\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" wrap>\n\t\t\t\t\t<Button type=\"button\" buttonStyle=\"outline\" disabled={locked || position === 0} onClick={() => { setSubmitError(undefined); goTo(visible[position - 1].id); }}>{strings.previous}</Button>\n\t\t\t\t\t{position < visible.length - 1 ? <Button tone=\"primary\" type=\"button\" disabled={locked} onClick={advance}>{strings.next}</Button> : <Button tone=\"primary\" type=\"submit\" disabled={locked}>{submitError ? strings.retry : strings.submit}</Button>}\n\t\t\t\t\t{busy && <Button type=\"button\" buttonStyle=\"outline\" disabled={disabled} onClick={cancel}>{strings.cancel}</Button>}\n\t\t\t\t</Stack>\n\t\t\t</>}\n\t\t</Stack>\n\t</form>;\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAYA,SAAgBiB,GAAqB,EAAE,aAAU,WAAQ,aAAU,UAAO,YAAS,kBAAe,mBAAgB,GAAGC,KAAyC;CAC7J,IAAM,EAAE,oBAAiBjB,EAAiB,GAGpCkB,IAAahB,EAAG,wBAAwBW,GAA2BN,EAAqBN,EAAsB,KAAA,GAAWkB,CAAY,EAAE,GACvIC,IAAS;EAAE;EAAU,SAAS,EAAQC;EAAQ,mBAAmBC;EAAS,oBAAoBC;EAAe,UAAUC,EAAS;CAAS;CAe/I,OAdIA,EAAS,SAAS,WAAiBA,EAAS,OAAO;EAAE,GAAGP;EAAS;EAAU;EAAQ;EAAU;EAAO;EAAS;EAAe;CAAe,CAAC,IAC5IO,EAAS,SAAS,SAAe,kBAAChB,GAAD;EAAO,GAAIY;EAAQ,MAAMI,EAAS,aAAa;EAAQ,WAAWA,EAAS;EAAW,aAAaA,EAAS;EAAa,OAAO,OAAOC,KAAW,WAAWA,IAAS;EAAI,WAAW,MA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C,EAAQ;MAAe,CAAA;KAC5G;;GACN,EAAA,CAAA,IAfUuE,MAAa,kBAAClH,GAAD;IAAM,MAAK;IAAa,UAAA2C,EAAQ;GAAY,CAAA,CAgB/D;;CACF,CAAA;AACP,CAAC"}
|
|
1
|
+
{"version":3,"file":"questionnaire.js","names":["_Fragment","resolveComponentScale","useDensityConfig","cn","Button","Text","Stack","Progress","formLabelSizeClasses","Input","FormField","Textarea","Select","CardRadioGroup","choiceControlTrackClasses","Checkbox","Fragment$1","QuestionnaireControl","context","checkTrack","defaultScale","common","error","labelId","descriptionId","question","answer","onAnswerChange","event","values","optionId","index","disabled","option","checked","entry","Label","defaultQuestionnaireStrings","current","total","getVisibleQuestions","questions","answers","getQuestionnaireAnswer","id","validateQuestion","value","empty","strings","selected","url","result","getSubmissionAnswers","emptyAnswers","Questionnaire","forwardRef","controlledValue","stringsProp","formProps","props","controlled","stepControlled","internalValue","setInternalValue","useState","defaultValue","answersRef","useRef","visible","internalId","setInternalId","defaultQuestionId","requestedId","questionId","position","errors","setErrors","submitError","setSubmitError","busy","setBusy","completed","setCompleted","currentQuestionId","previousStage","submission","resetTimer","mounted","stageRef","useStrings","useId","locked","cancelReset","cancel","goTo","nextId","onQuestionIdChange","onQuestionChange","setAnswer","next","onValueChange","previous","useEffect","advance","submit","validation","firstInvalid","controller","snapshot","onSubmit","onComplete","formatSubmitError","onError","currentError","description","className","nativeEvent","initialVisible","initialQuestion","headerSlot","completionSlot","Heading","emptySlot"],"sources":["../../src/components/features/questionnaire/questionnaire-control.tsx","../../src/components/features/questionnaire/questionnaire.types.ts","../../src/components/features/questionnaire/questionnaire.utils.ts","../../src/components/features/questionnaire/questionnaire.tsx"],"sourcesContent":["import { CardRadioGroup, Checkbox, Select } from '../../base/choice-inputs';\nimport { choiceControlTrackClasses } from '../../base/choice-inputs/choice-types';\nimport { formLabelSizeClasses } from '../../base/forms/form-sizing';\nimport { Input, Textarea } from '../../base/text-inputs';\nimport { Stack } from '../../base/structure';\nimport { Label, Text } from '../../typography';\nimport { useDensityConfig } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\nimport type { QuestionnaireQuestionContext } from './questionnaire.types';\n\n/** All interactive behavior remains with public Base UI-backed field owners. */\nexport function QuestionnaireControl({ question, answer, disabled, error, labelId, descriptionId, onAnswerChange, ...context }: QuestionnaireQuestionContext) {\n\tconst { defaultScale } = useDensityConfig();\n\t// Each checkbox sits in a track one Label line tall, so it centres on the\n\t// option's first line whether or not the label wraps.\n\tconst checkTrack = cn('questionnaire--check', choiceControlTrackClasses, formLabelSizeClasses[resolveComponentScale(undefined, defaultScale)]);\n\tconst common = { disabled, invalid: Boolean(error), 'aria-labelledby': labelId, 'aria-describedby': descriptionId, required: question.required };\n\tif (question.type === 'custom') return question.render({ ...context, question, answer, disabled, error, labelId, descriptionId, onAnswerChange });\n\tif (question.type === 'text') return <Input {...common} type={question.inputType ?? 'text'} maxLength={question.maxLength} placeholder={question.placeholder} value={typeof answer === 'string' ? answer : ''} onChange={(event) => onAnswerChange(event.target.value)} />;\n\tif (question.type === 'textarea') return <Textarea {...common} rows={question.rows ?? 4} maxLength={question.maxLength} placeholder={question.placeholder} value={typeof answer === 'string' ? answer : ''} onChange={(event) => onAnswerChange(event.target.value)} />;\n\tif (question.type === 'select') return <Select {...common} options={question.options} value={typeof answer === 'string' ? answer : null} onValueChange={onAnswerChange} />;\n\tif (question.type === 'single') return <fieldset aria-labelledby={labelId} aria-describedby={descriptionId} className=\"questionnaire--choices m-0 min-w-0 border-0 p-0\"><CardRadioGroup options={question.options} value={typeof answer === 'string' ? answer : ''} disabled={disabled} invalid={Boolean(error)} onValueChange={onAnswerChange} columns={1} /></fieldset>;\n\tif (question.type === 'multiple') return <fieldset aria-labelledby={labelId} aria-describedby={descriptionId} className=\"questionnaire--choices m-0 min-w-0 border-0 p-0\"><Stack gap=\"sm\">{question.options.map((option, index) => {\n\t\tconst values = Array.isArray(answer) ? answer : [];\n\t\tconst optionId = `${labelId}-option-${index}`;\n\t\treturn <Stack key={option.value} direction=\"horizontal\" align=\"start\" gap=\"sm\">\n\t\t\t<span className={checkTrack}><Checkbox id={optionId} disabled={disabled || option.disabled} aria-invalid={Boolean(error) || undefined} aria-describedby={[descriptionId, option.description ? `${optionId}-description` : undefined].filter(Boolean).join(' ') || undefined} checked={values.includes(option.value)} onCheckedChange={(checked) => onAnswerChange(checked ? [...values, option.value] : values.filter((entry) => entry !== option.value))} /></span>\n\t\t\t<Stack gap=\"dense\"><Label htmlFor={optionId} className=\"text-inherit\">{option.label}</Label>{option.description && <Text id={`${optionId}-description`} size=\"xs\" type=\"secondary\">{option.description}</Text>}</Stack>\n\t\t</Stack>;\n\t})}</Stack></fieldset>;\n\tif (question.type === 'boolean') return <Stack direction=\"horizontal\" align=\"start\" gap=\"sm\"><span className={checkTrack}><Checkbox {...common} aria-labelledby={undefined} id={`${labelId}-checkbox`} checked={answer === true} onCheckedChange={(checked) => onAnswerChange(checked)} /></span><Label htmlFor={`${labelId}-checkbox`} className=\"text-inherit\">{question.label ?? question.title}</Label></Stack>;\n\treturn null;\n}\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport type { StringsProp } from '../../../lib/strings';\n\nexport type QuestionnaireAnswer = string | string[] | boolean | undefined;\nexport type QuestionnaireAnswers = Record<string, QuestionnaireAnswer>;\nexport interface QuestionnaireOption { value: string; label: string; description?: string; disabled?: boolean }\nexport interface QuestionnaireQuestionBase {\n\t/** Unique stable key, used to retain answers across conditional visibility changes. */\n\tid: string;\n\ttitle: string;\n\tdescription?: string;\n\trequired?: boolean;\n\tdisabled?: boolean;\n\t/** Hidden answers are retained for editing, but excluded from validation/submission. */\n\twhen?: (answers: QuestionnaireAnswers) => boolean;\n\t/** Return an error message, or undefined/true for a valid answer. */\n\tvalidate?: (answer: QuestionnaireAnswer, answers: QuestionnaireAnswers) => string | true | undefined;\n}\nexport interface QuestionnaireTextQuestion extends QuestionnaireQuestionBase {\n\ttype: 'text' | 'textarea';\n\tplaceholder?: string;\n\t/** Native text input type. */\n\tinputType?: 'text' | 'email' | 'url' | 'tel';\n\trows?: number;\n\tmaxLength?: number;\n}\nexport interface QuestionnaireChoiceQuestion extends QuestionnaireQuestionBase {\n\ttype: 'single' | 'multiple' | 'select';\n\toptions: QuestionnaireOption[];\n}\nexport interface QuestionnaireBooleanQuestion extends QuestionnaireQuestionBase { type: 'boolean'; label?: string }\nexport interface QuestionnaireCustomQuestion extends QuestionnaireQuestionBase {\n\ttype: 'custom';\n\trender: (context: QuestionnaireQuestionContext) => ReactNode;\n}\nexport type QuestionnaireQuestion = QuestionnaireTextQuestion | QuestionnaireChoiceQuestion | QuestionnaireBooleanQuestion | QuestionnaireCustomQuestion;\nexport interface QuestionnaireQuestionContext {\n\tquestion: QuestionnaireQuestion;\n\tanswer: QuestionnaireAnswer;\n\tanswers: QuestionnaireAnswers;\n\tdisabled: boolean;\n\terror?: string;\n\t/** Connect custom controls to the visible title and description/error. */\n\tlabelId: string;\n\tdescriptionId?: string;\n\tonAnswerChange: (answer: QuestionnaireAnswer) => void;\n}\nexport interface QuestionnaireSubmitContext { signal: AbortSignal }\nexport interface QuestionnaireStrings {\n\tprevious: string; next: string; submit: string; retry: string; cancel: string;\n\tsubmitting: string; submitted: string; editAnswers: string; empty: string;\n\trequired: string; invalidChoice: string; invalidFormat: string; progress: string;\n\tstep: (current: number, total: number) => string;\n\tsubmitError: string;\n}\nexport const defaultQuestionnaireStrings: QuestionnaireStrings = {\n\tprevious: 'Previous', next: 'Next', submit: 'Submit answers', retry: 'Try again', cancel: 'Cancel submission',\n\tsubmitting: 'Submitting answers…', submitted: 'Your answers have been submitted.', editAnswers: 'Edit answers',\n\tempty: 'There are no questions to answer.', required: 'Please answer this question.', invalidChoice: 'Choose an available option.',\n\tinvalidFormat: 'Enter a valid answer.', progress: 'Questionnaire progress', step: (current, total) => `Question ${current} of ${total}`,\n\tsubmitError: 'Answers could not be submitted. Please try again.',\n};\nexport interface QuestionnaireProps extends Omit<ComponentPropsWithoutRef<'form'>, 'children' | 'onSubmit' | 'defaultValue' | 'onChange'> {\n\tquestions: readonly QuestionnaireQuestion[];\n\t/** Controlled answers. */\n\tvalue?: QuestionnaireAnswers;\n\t/** Initial answers for uncontrolled use. */\n\tdefaultValue?: QuestionnaireAnswers;\n\tonValueChange?: (answers: QuestionnaireAnswers) => void;\n\t/** Controlled active question key. */\n\tquestionId?: string;\n\tdefaultQuestionId?: string;\n\t/** Fired when navigation requests a question. Takes precedence over `onQuestionChange`. */\n\tonQuestionIdChange?: (id: string) => void;\n\t/** Legacy alias for `onQuestionIdChange`. */\n\tonQuestionChange?: (id: string) => void;\n\tdisabled?: boolean;\n\t/** Receives only visible, enabled questions. Respect signal to cancel application requests. */\n\tonSubmit?: (answers: QuestionnaireAnswers, context: QuestionnaireSubmitContext) => void | Promise<void>;\n\tonComplete?: (answers: QuestionnaireAnswers) => void;\n\tonError?: (error: unknown) => void;\n\tformatSubmitError?: (error: unknown) => string;\n\theaderSlot?: ReactNode;\n\temptySlot?: ReactNode;\n\t/** Replaces the completion state; default includes an edit-answers action. */\n\tcompletionSlot?: ReactNode;\n\tstrings?: StringsProp<QuestionnaireStrings>;\n}\n","import type { QuestionnaireAnswers, QuestionnaireQuestion, QuestionnaireStrings } from './questionnaire.types';\n\nexport function getVisibleQuestions(questions: readonly QuestionnaireQuestion[], answers: QuestionnaireAnswers) {\n\treturn questions.filter((question) => !question.when || question.when(answers));\n}\nexport function getQuestionnaireAnswer(answers: QuestionnaireAnswers, id: string) {\n\treturn Object.hasOwn(answers, id) ? answers[id] : undefined;\n}\nexport function validateQuestion(question: QuestionnaireQuestion, answers: QuestionnaireAnswers, strings: QuestionnaireStrings): string | undefined {\n\tif (question.disabled) return;\n\tconst value = getQuestionnaireAnswer(answers, question.id);\n\tconst empty = value === undefined || (typeof value === 'string' && !value.trim()) || (Array.isArray(value) && value.length === 0);\n\tif (question.required && (empty || (question.type === 'boolean' && value !== true))) return strings.required;\n\tif (value !== undefined) {\n\t\tif ((question.type === 'text' || question.type === 'textarea') && typeof value !== 'string') return strings.invalidFormat;\n\t\tif (question.type === 'boolean' && typeof value !== 'boolean') return strings.invalidFormat;\n\t\tif ((question.type === 'multiple' && !Array.isArray(value)) || ((question.type === 'single' || question.type === 'select') && typeof value !== 'string')) return strings.invalidChoice;\n\t}\n\tif (!empty) {\n\t\tif (question.type === 'single' || question.type === 'select' || question.type === 'multiple') {\n\t\t\tconst selected = Array.isArray(value) ? value : [value];\n\t\t\tif ((question.type === 'multiple' ? !Array.isArray(value) : typeof value !== 'string') || selected.some((entry) => !question.options.some((option) => option.value === entry && !option.disabled))) return strings.invalidChoice;\n\t\t} else if (question.type === 'text' || question.type === 'textarea') {\n\t\t\tif (typeof value !== 'string' || (question.maxLength !== undefined && value.length > question.maxLength)) return strings.invalidFormat;\n\t\t\tif (question.inputType === 'email' && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) return strings.invalidFormat;\n\t\t\tif (question.inputType === 'url') { try { const url = new URL(value); if (!url.host || !['http:', 'https:'].includes(url.protocol)) return strings.invalidFormat; } catch { return strings.invalidFormat; } }\n\t\t} else if (question.type === 'boolean' && typeof value !== 'boolean') return strings.invalidFormat;\n\t}\n\tconst result = question.validate?.(value, answers);\n\treturn typeof result === 'string' && result.length > 0 ? result : undefined;\n}\n\nexport function getSubmissionAnswers(questions: readonly QuestionnaireQuestion[], answers: QuestionnaireAnswers): QuestionnaireAnswers {\n\treturn Object.fromEntries(getVisibleQuestions(questions, answers).filter((question) => !question.disabled).map((question) => {\n\t\tconst answer = getQuestionnaireAnswer(answers, question.id);\n\t\treturn [question.id, Array.isArray(answer) ? [...answer] : answer];\n\t}));\n}\n","import { forwardRef, useEffect, useId, useRef, useState } from 'react';\nimport { Button } from '../../base/buttons';\nimport { FormField } from '../../base/forms/form-field';\nimport { Progress } from '../../base/feedback';\nimport { Stack } from '../../base/structure';\nimport { Heading, Text } from '../../typography';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { QuestionnaireControl } from './questionnaire-control';\nimport { defaultQuestionnaireStrings, type QuestionnaireAnswer, type QuestionnaireAnswers, type QuestionnaireProps } from './questionnaire.types';\nimport { getQuestionnaireAnswer, getSubmissionAnswers, getVisibleQuestions, validateQuestion } from './questionnaire.utils';\n\nconst emptyAnswers: QuestionnaireAnswers = {};\n\nexport const Questionnaire = forwardRef<HTMLFormElement, QuestionnaireProps>(function Questionnaire(props, ref) {\n\tconst { questions, value: controlledValue, defaultValue = {}, onValueChange, questionId, defaultQuestionId, onQuestionIdChange, onQuestionChange,\n\t\tdisabled = false, onSubmit, onComplete, onError, formatSubmitError, headerSlot, emptySlot, completionSlot, strings: stringsProp,\n\t\tclassName, onReset, ...formProps } = props;\n\tconst controlled = Object.prototype.hasOwnProperty.call(props, 'value');\n\tconst stepControlled = Object.prototype.hasOwnProperty.call(props, 'questionId');\n\tconst [internalValue, setInternalValue] = useState<QuestionnaireAnswers>(defaultValue);\n\tconst answers = controlled ? controlledValue ?? emptyAnswers : internalValue;\n\tconst answersRef = useRef(answers); answersRef.current = answers;\n\tconst visible = getVisibleQuestions(questions, answers);\n\tconst [internalId, setInternalId] = useState<string | undefined>(defaultQuestionId ?? visible[0]?.id);\n\tconst requestedId = stepControlled ? questionId : internalId;\n\tconst current = visible.find((question) => question.id === requestedId) ?? visible[0];\n\tconst position = current ? visible.indexOf(current) : 0;\n\tconst [errors, setErrors] = useState<Record<string, string | undefined>>({});\n\tconst [submitError, setSubmitError] = useState<string>();\n\tconst [busy, setBusy] = useState(false);\n\tconst [completed, setCompleted] = useState(false);\n\tconst currentQuestionId = current?.id;\n\tconst previousStage = useRef({ questionId: currentQuestionId, completed });\n\tconst submission = useRef<AbortController | null>(null);\n\tconst resetTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\tconst mounted = useRef(true);\n\tconst stageRef = useRef<HTMLDivElement>(null);\n\tconst strings = useStrings(defaultQuestionnaireStrings, stringsProp);\n\tconst id = useId();\n\tconst labelId = `${id}-title`;\n\tconst descriptionId = `${id}-description`;\n\tconst locked = busy || disabled;\n\tconst cancelReset = () => { clearTimeout(resetTimer.current); resetTimer.current = undefined; };\n\tconst cancel = () => { submission.current?.abort(); submission.current = null; setBusy(false); };\n\tconst goTo = (nextId: string) => { if (!stepControlled) setInternalId(nextId); (onQuestionIdChange ?? onQuestionChange)?.(nextId); };\n\tconst setAnswer = (answer: QuestionnaireAnswer) => {\n\t\tif (!current || current.disabled || locked) return;\n\t\tconst next = { ...answersRef.current, [current.id]: answer };\n\t\tif (!controlled) { answersRef.current = next; setInternalValue(next); }\n\t\tonValueChange?.(next);\n\t\tsetErrors((previous) => ({ ...previous, [current.id]: undefined })); setSubmitError(undefined); setCompleted(false);\n\t};\n\tuseEffect(() => {\n\t\tconst previous = previousStage.current;\n\t\tpreviousStage.current = { questionId: currentQuestionId, completed };\n\t\tif (previous.questionId === undefined ||\n\t\t\t(previous.questionId === currentQuestionId && previous.completed === completed)) return;\n\t\tstageRef.current?.focus();\n\t}, [currentQuestionId, completed]);\n\tuseEffect(() => {\n\t\t// Replacing data/schema or disabling during a request invalidates that result.\n\t\tcancelReset(); cancel(); setErrors({}); setSubmitError(undefined); setCompleted(false);\n\t}, [answers, questions, disabled]);\n\tuseEffect(() => { mounted.current = true; return () => { mounted.current = false; cancelReset(); submission.current?.abort(); submission.current = null; }; }, []);\n\tconst advance = () => {\n\t\tif (!current || locked) return;\n\t\tconst error = validateQuestion(current, answersRef.current, strings);\n\t\tsetErrors((previous) => ({ ...previous, [current.id]: error }));\n\t\tif (error) { stageRef.current?.focus(); return; }\n\t\tif (visible[position + 1]) goTo(visible[position + 1].id);\n\t};\n\tconst submit = async () => {\n\t\tif (submission.current || disabled || !visible.length) return;\n\t\tconst validation = Object.fromEntries(visible.map((question) => [question.id, validateQuestion(question, answersRef.current, strings)]));\n\t\tsetErrors(validation);\n\t\tconst firstInvalid = visible.find((question) => validation[question.id]);\n\t\tif (firstInvalid) { goTo(firstInvalid.id); stageRef.current?.focus(); return; }\n\t\tconst controller = new AbortController(); submission.current = controller;\n\t\tsetSubmitError(undefined); setBusy(true);\n\t\tconst snapshot = getSubmissionAnswers(questions, answersRef.current);\n\t\ttry {\n\t\t\tawait onSubmit?.(snapshot, { signal: controller.signal });\n\t\t\tif (submission.current !== controller || controller.signal.aborted) return;\n\t\t\tsetCompleted(true); onComplete?.(snapshot);\n\t\t} catch (error) {\n\t\t\tif (submission.current !== controller || controller.signal.aborted) return;\n\t\t\tsetSubmitError(formatSubmitError?.(error) ?? strings.submitError); onError?.(error);\n\t\t} finally { if (submission.current === controller) { submission.current = null; setBusy(false); } }\n\t};\n\tconst currentError = current && Object.hasOwn(errors, current.id) ? errors[current.id] : undefined;\n\tconst description = current && (currentError || current.description);\n\treturn <form {...formProps} ref={ref} noValidate aria-busy={busy || undefined} className={cn('questionnaire--component min-w-0', className)} onSubmit={(event) => { event.preventDefault(); if (position < visible.length - 1) advance(); else void submit(); }} onReset={(event) => {\n\t\tonReset?.(event); const nativeEvent = event.nativeEvent;\n\t\t// Trusted events can run microtasks before native ancestor listeners have cancelled reset.\n\t\tcancelReset(); resetTimer.current = setTimeout(() => {\n\t\t\tresetTimer.current = undefined;\n\t\t\tif (!mounted.current || nativeEvent.defaultPrevented || disabled) return; cancel();\n\t\t\tif (!controlled) { answersRef.current = defaultValue; setInternalValue(defaultValue); } onValueChange?.(defaultValue);\n\t\t\tsetErrors({}); setSubmitError(undefined); setCompleted(false);\n\t\t\tconst initialVisible = getVisibleQuestions(questions, defaultValue);\n\t\t\tconst initialQuestion = initialVisible.find((question) => question.id === defaultQuestionId) ?? initialVisible[0];\n\t\t\tif (initialQuestion) goTo(initialQuestion.id); else if (!stepControlled) setInternalId(undefined);\n\t\t}, 0);\n\t}}>\n\t\t<Stack gap=\"lg\">\n\t\t\t{headerSlot}\n\t\t\t{!current ? emptySlot ?? <Text type=\"secondary\">{strings.empty}</Text> : completed ? completionSlot ?? <Stack gap=\"sm\"><Text type=\"inherit\" role=\"status\">{strings.submitted}</Text><Button disabled={disabled} type=\"button\" buttonStyle=\"outline\" onClick={() => { setCompleted(false); if (visible[0]) goTo(visible[0].id); }}>{strings.editAnswers}</Button></Stack> : <>\n\t\t\t\t<Progress value={position + 1} max={visible.length} label={strings.progress} valueSlot={<Text size=\"xs\" type=\"secondary\" aria-live=\"polite\">{strings.step(position + 1, visible.length)}</Text>} />\n\t\t\t\t<Stack ref={stageRef} gap=\"normal\" tabIndex={-1} role=\"group\" aria-labelledby={labelId} className=\"questionnaire--question outline-none\">\n\t\t\t\t\t<Heading className=\"text-inherit\" id={labelId} tag=\"h3\">{current.title}</Heading>\n\t\t\t\t\t<FormField required={current.required} error={currentError} hint={current.description} supportingTextId={descriptionId}>\n\t\t\t\t\t\t<QuestionnaireControl key={current.id} question={current} answer={getQuestionnaireAnswer(answers, current.id)} answers={answers} disabled={locked || Boolean(current.disabled)} error={currentError} labelId={labelId} descriptionId={description ? descriptionId : undefined} onAnswerChange={setAnswer} />\n\t\t\t\t\t</FormField>\n\t\t\t\t</Stack>\n\t\t\t\t{submitError && <Text role=\"alert\" type=\"error\">{submitError}</Text>}\n\t\t\t\t{busy && <Text role=\"status\" type=\"secondary\">{strings.submitting}</Text>}\n\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" wrap>\n\t\t\t\t\t<Button type=\"button\" buttonStyle=\"outline\" disabled={locked || position === 0} onClick={() => { setSubmitError(undefined); goTo(visible[position - 1].id); }}>{strings.previous}</Button>\n\t\t\t\t\t{position < visible.length - 1 ? <Button tone=\"primary\" type=\"button\" disabled={locked} onClick={advance}>{strings.next}</Button> : <Button tone=\"primary\" type=\"submit\" disabled={locked}>{submitError ? strings.retry : strings.submit}</Button>}\n\t\t\t\t\t{busy && <Button type=\"button\" buttonStyle=\"outline\" disabled={disabled} onClick={cancel}>{strings.cancel}</Button>}\n\t\t\t\t</Stack>\n\t\t\t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ography-
|
|
6
|
-
import { t as a } from "../structure-
|
|
7
|
-
import { n as o } from "../cards-
|
|
8
|
-
import { r as s } from "../overlays-
|
|
9
|
-
import { n as c } from "../display-
|
|
10
|
-
import { s as l } from "../data-display-
|
|
3
|
+
import { t } from "../utils-DhuoqFy4.js";
|
|
4
|
+
import { n } from "../buttons-DeW0bQeK.js";
|
|
5
|
+
import { c as r, o as i } from "../typography-C7-YMW1S.js";
|
|
6
|
+
import { t as a } from "../structure-DZJ2wbAU.js";
|
|
7
|
+
import { n as o } from "../cards-CNXnmvV5.js";
|
|
8
|
+
import { r as s } from "../overlays-CC8zI3Du.js";
|
|
9
|
+
import { n as c } from "../display-CT_N2a3w.js";
|
|
10
|
+
import { s as l } from "../data-display-Cmj-xZYl.js";
|
|
11
11
|
import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
12
12
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
13
13
|
import { Eye as v, PackageOpen as y } from "lucide-react";
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useStrings as e } from "../lib/strings.js";
|
|
3
|
-
import { t } from "../utils-
|
|
4
|
-
import { c as n } from "../typography-
|
|
5
|
-
import { t as r } from "../structure-
|
|
6
|
-
import { n as i, t as a } from "../feedback-
|
|
3
|
+
import { t } from "../utils-DhuoqFy4.js";
|
|
4
|
+
import { c as n } from "../typography-C7-YMW1S.js";
|
|
5
|
+
import { t as r } from "../structure-DZJ2wbAU.js";
|
|
6
|
+
import { n as i, t as a } from "../feedback-Dzo1xtAU.js";
|
|
7
7
|
import { n as o, t as s } from "../composition.recipes-COdiFhxB.js";
|
|
8
|
-
import { u as c } from "../primitives-
|
|
9
|
-
import { t as l } from "../icon-badge-
|
|
10
|
-
import { i as u, n as d, s as f } from "../avatar-
|
|
11
|
-
import { n as p } from "../display-
|
|
12
|
-
import { t as m } from "../metadata-list-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import { u as c } from "../primitives-BkkQjYl7.js";
|
|
9
|
+
import { t as l } from "../icon-badge-npxF1SLX.js";
|
|
10
|
+
import { i as u, n as d, s as f } from "../avatar-B9Jnp-T-.js";
|
|
11
|
+
import { n as p } from "../display-CT_N2a3w.js";
|
|
12
|
+
import { t as m } from "../metadata-list-XkqZ_UXH.js";
|
|
13
|
+
import { t as h } from "../navigation-Bt-v7rWP.js";
|
|
14
|
+
import { t as g } from "../overflow-tab-bar-BQCA2Zn2.js";
|
|
15
|
+
import { s as _ } from "../data-display-Cmj-xZYl.js";
|
|
16
|
+
import { useState as v } from "react";
|
|
17
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
16
18
|
//#region src/components/features/resource/resource.strings.ts
|
|
17
|
-
var
|
|
19
|
+
var x = {
|
|
18
20
|
loadingLabel: "Loading resources",
|
|
19
21
|
loadingDescription: "Preparing the latest data for this view.",
|
|
20
22
|
emptyTitle: "No resources found",
|
|
@@ -26,61 +28,62 @@ var b = {
|
|
|
26
28
|
};
|
|
27
29
|
//#endregion
|
|
28
30
|
//#region src/components/features/resource/resource.tsx
|
|
29
|
-
function
|
|
30
|
-
let
|
|
31
|
-
className: t("resource-header--avatar size-avatar-lg",
|
|
32
|
-
children: [!!o && /* @__PURE__ */
|
|
31
|
+
function S({ title: e, description: n, eyebrow: i, media: a, avatarUrl: o, avatarAlt: s, avatarFallback: p, icon: m, iconTone: g = "neutral", badges: _, metadata: v, actions: x, primaryAction: S, secondaryActions: C, maxVisibleSecondaryActions: w, moreActionsLabel: T, renderLink: E, className: D, contentClassName: O, mediaClassName: k }) {
|
|
32
|
+
let A = m, j = typeof e == "string" ? e : "", M = a ?? (o || p ? /* @__PURE__ */ b(d, {
|
|
33
|
+
className: t("resource-header--avatar size-avatar-lg", k),
|
|
34
|
+
children: [!!o && /* @__PURE__ */ y(f, {
|
|
33
35
|
src: o,
|
|
34
|
-
alt: s ??
|
|
35
|
-
}), /* @__PURE__ */
|
|
36
|
-
value:
|
|
36
|
+
alt: s ?? j
|
|
37
|
+
}), /* @__PURE__ */ y(u, { children: p ?? /* @__PURE__ */ y(c, {
|
|
38
|
+
value: j,
|
|
37
39
|
strategy: "first-words"
|
|
38
40
|
}) })]
|
|
39
|
-
}) :
|
|
40
|
-
icon:
|
|
41
|
+
}) : A ? /* @__PURE__ */ y(l, {
|
|
42
|
+
icon: A,
|
|
41
43
|
shape: "square",
|
|
42
44
|
tone: g,
|
|
43
|
-
className: t("resource-header--icon size-avatar-lg [&>svg]:size-icon-lg",
|
|
45
|
+
className: t("resource-header--icon size-avatar-lg [&>svg]:size-icon-lg", k)
|
|
44
46
|
}) : null);
|
|
45
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ y(h, {
|
|
46
48
|
eyebrow: i,
|
|
47
49
|
title: e,
|
|
48
50
|
description: n,
|
|
49
|
-
leading:
|
|
50
|
-
titleSuffix: _ ? /* @__PURE__ */
|
|
51
|
+
leading: M,
|
|
52
|
+
titleSuffix: _ ? /* @__PURE__ */ y(r, {
|
|
51
53
|
"data-slot": "resource-header-badges",
|
|
52
54
|
direction: "horizontal",
|
|
53
55
|
gap: "sm",
|
|
54
56
|
className: "resource-header--badges shrink-0",
|
|
55
57
|
children: _
|
|
56
58
|
}) : void 0,
|
|
57
|
-
afterDescription:
|
|
59
|
+
afterDescription: v ? /* @__PURE__ */ y(r, {
|
|
58
60
|
"data-slot": "resource-header-metadata",
|
|
59
61
|
direction: "horizontal",
|
|
60
62
|
gap: "md",
|
|
61
63
|
className: "resource-header--metadata mt-space-sm",
|
|
62
|
-
children:
|
|
64
|
+
children: v
|
|
63
65
|
}) : void 0,
|
|
64
66
|
actions: x,
|
|
65
67
|
primaryAction: S,
|
|
66
68
|
secondaryActions: C,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
maxVisibleSecondaryActions: w,
|
|
70
|
+
moreActionsLabel: T,
|
|
71
|
+
renderLink: E,
|
|
69
72
|
withSeparator: !1,
|
|
70
|
-
className: t("resource-header--component",
|
|
71
|
-
contentClassName:
|
|
73
|
+
className: t("resource-header--component", D),
|
|
74
|
+
contentClassName: O,
|
|
72
75
|
eyebrowClassName: "resource-header--eyebrow",
|
|
73
76
|
titleClassName: "resource-header--title truncate",
|
|
74
77
|
descriptionClassName: "resource-header--description max-w-3xl",
|
|
75
78
|
actionsClassName: "resource-header--actions flex-wrap"
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
|
-
function
|
|
79
|
-
return /* @__PURE__ */
|
|
81
|
+
function C({ children: e, leading: n, trailing: i, sticky: a = !1, className: o }) {
|
|
82
|
+
return /* @__PURE__ */ y("div", {
|
|
80
83
|
"data-component": "resource-action-bar",
|
|
81
84
|
"data-slot": "resource-action-bar",
|
|
82
|
-
className: t("resource-action-bar--component box-border rounded-
|
|
83
|
-
children: /* @__PURE__ */
|
|
85
|
+
className: t("resource-action-bar--component box-border rounded-surface border border-border bg-card text-card-foreground px-surface py-row-y-lg shadow-xs", a && "sticky top-shell-header z-30", o),
|
|
86
|
+
children: /* @__PURE__ */ b(r, {
|
|
84
87
|
direction: {
|
|
85
88
|
base: "vertical",
|
|
86
89
|
sm: "horizontal"
|
|
@@ -90,13 +93,13 @@ function S({ children: e, leading: n, trailing: i, sticky: a = !1, className: o
|
|
|
90
93
|
justify: { sm: "between" },
|
|
91
94
|
wrap: { sm: !1 },
|
|
92
95
|
className: "resource-action-bar--layout",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ y(r, {
|
|
94
97
|
"data-slot": "resource-action-leading",
|
|
95
98
|
direction: "horizontal",
|
|
96
99
|
gap: "md",
|
|
97
100
|
className: "resource-action-bar--leading flex-1",
|
|
98
101
|
children: n ?? e
|
|
99
|
-
}), !!i && /* @__PURE__ */
|
|
102
|
+
}), !!i && /* @__PURE__ */ y(r, {
|
|
100
103
|
"data-slot": "resource-action-trailing",
|
|
101
104
|
direction: "horizontal",
|
|
102
105
|
gap: "md",
|
|
@@ -106,120 +109,123 @@ function S({ children: e, leading: n, trailing: i, sticky: a = !1, className: o
|
|
|
106
109
|
})
|
|
107
110
|
});
|
|
108
111
|
}
|
|
109
|
-
function
|
|
110
|
-
return /* @__PURE__ */
|
|
112
|
+
function w(e) {
|
|
113
|
+
return /* @__PURE__ */ y(_, {
|
|
111
114
|
...e,
|
|
112
115
|
"data-component": "resource-empty-state",
|
|
113
116
|
"data-slot": "resource-empty-state",
|
|
114
117
|
className: t("resource-empty-state--component", e.className)
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
|
-
function
|
|
118
|
-
let
|
|
120
|
+
function T({ children: n, title: c, description: l, actions: u, primaryAction: d, secondaryActions: f, maxVisibleSecondaryActions: p, moreActionsLabel: m, renderLink: h, toolbar: g, emptySlot: _, empty: v = !1, loading: C = !1, error: T, onRetry: E, slots: D, className: O, headerClassName: k, contentClassName: A, strings: j, asideClassName: M, variant: N }) {
|
|
121
|
+
let P = e(x, j), F = D?.header ?? (c ? /* @__PURE__ */ y(S, {
|
|
119
122
|
title: c,
|
|
120
123
|
description: l,
|
|
121
124
|
actions: u,
|
|
122
125
|
primaryAction: d,
|
|
123
126
|
secondaryActions: f,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
maxVisibleSecondaryActions: p,
|
|
128
|
+
moreActionsLabel: m,
|
|
129
|
+
renderLink: h,
|
|
130
|
+
className: k
|
|
131
|
+
}) : null), I = D?.toolbar ?? g, L = D?.loading ?? /* @__PURE__ */ y(i, {
|
|
128
132
|
variant: "panel",
|
|
129
|
-
label:
|
|
130
|
-
description:
|
|
133
|
+
label: P.loadingLabel,
|
|
134
|
+
description: P.loadingDescription,
|
|
131
135
|
skeleton: !0,
|
|
132
136
|
lines: 4,
|
|
133
|
-
className: "resource-shell--loading rounded-
|
|
134
|
-
}),
|
|
135
|
-
title:
|
|
136
|
-
description:
|
|
137
|
+
className: "resource-shell--loading rounded-surface border border-border bg-card"
|
|
138
|
+
}), R = D?.empty ?? _ ?? /* @__PURE__ */ y(w, {
|
|
139
|
+
title: P.emptyTitle,
|
|
140
|
+
description: P.emptyDescription,
|
|
137
141
|
border: !0
|
|
138
|
-
}),
|
|
139
|
-
title:
|
|
140
|
-
description:
|
|
141
|
-
onRetry:
|
|
142
|
-
retryLabel:
|
|
143
|
-
}),
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
"data-component": `resource-${
|
|
146
|
-
"data-slot": `resource-${
|
|
147
|
-
className: t(`resource-${
|
|
142
|
+
}), z = /* @__PURE__ */ y(a, {
|
|
143
|
+
title: P.errorTitle,
|
|
144
|
+
description: T instanceof Error ? T.message : typeof T == "string" || typeof T == "number" ? String(T) : P.errorDescription,
|
|
145
|
+
onRetry: E,
|
|
146
|
+
retryLabel: P.retryLabel
|
|
147
|
+
}), B = D?.error ?? (T && typeof T != "boolean" && typeof T != "string" && typeof T != "number" && !(T instanceof Error) ? T : z), V = C ? L : T ? B : v ? R : n;
|
|
148
|
+
return /* @__PURE__ */ b("section", {
|
|
149
|
+
"data-component": `resource-${N}-shell`,
|
|
150
|
+
"data-slot": `resource-${N}-shell`,
|
|
151
|
+
className: t(`resource-${N}-shell--component flex min-w-0 flex-col`, s.subjects, N === "index" && "@container/resource-index", N === "show" && "@container/resource-show", O),
|
|
148
152
|
children: [
|
|
149
|
-
!!
|
|
150
|
-
"data-slot": `resource-${
|
|
151
|
-
className: `resource-${
|
|
152
|
-
children: P
|
|
153
|
-
}),
|
|
154
|
-
!!F && /* @__PURE__ */ v("div", {
|
|
155
|
-
"data-slot": `resource-${M}-toolbar`,
|
|
156
|
-
className: `resource-${M}-shell--toolbar`,
|
|
153
|
+
!!F && /* @__PURE__ */ y("div", {
|
|
154
|
+
"data-slot": `resource-${N}-header`,
|
|
155
|
+
className: `resource-${N}-shell--header`,
|
|
157
156
|
children: F
|
|
158
157
|
}),
|
|
159
|
-
/* @__PURE__ */ y("div", {
|
|
160
|
-
"data-slot": `resource-${
|
|
161
|
-
className:
|
|
162
|
-
children:
|
|
158
|
+
!!I && /* @__PURE__ */ y("div", {
|
|
159
|
+
"data-slot": `resource-${N}-toolbar`,
|
|
160
|
+
className: `resource-${N}-shell--toolbar`,
|
|
161
|
+
children: I
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ b("div", {
|
|
164
|
+
"data-slot": `resource-${N}-layout`,
|
|
165
|
+
className: t(`resource-${N}-shell--layout grid min-w-0`, s.subjects, D?.aside && N === "show" && "@4xl/resource-show:grid-cols-[minmax(0,1fr)_var(--shell-sidebar-width)]", D?.aside && N === "index" && "@4xl/resource-index:grid-cols-[minmax(0,1fr)_var(--shell-sidebar-width)]"),
|
|
166
|
+
children: [/* @__PURE__ */ b(r, {
|
|
163
167
|
gap: o.subjects,
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
-
"data-slot": `resource-${
|
|
166
|
-
className: t(`resource-${
|
|
167
|
-
children:
|
|
168
|
-
}), !!
|
|
169
|
-
"data-slot": `resource-${
|
|
170
|
-
className: `resource-${
|
|
171
|
-
children:
|
|
168
|
+
children: [/* @__PURE__ */ y("div", {
|
|
169
|
+
"data-slot": `resource-${N}-content`,
|
|
170
|
+
className: t(`resource-${N}-shell--content flex min-w-0 flex-col`, s.subjects, A),
|
|
171
|
+
children: V
|
|
172
|
+
}), !!D?.footer && /* @__PURE__ */ y("div", {
|
|
173
|
+
"data-slot": `resource-${N}-footer`,
|
|
174
|
+
className: `resource-${N}-shell--footer`,
|
|
175
|
+
children: D.footer
|
|
172
176
|
})]
|
|
173
|
-
}), !!
|
|
174
|
-
"data-slot": `resource-${
|
|
175
|
-
className: t(`resource-${
|
|
176
|
-
children:
|
|
177
|
+
}), !!D?.aside && /* @__PURE__ */ y("aside", {
|
|
178
|
+
"data-slot": `resource-${N}-aside`,
|
|
179
|
+
className: t(`resource-${N}-shell--aside flex min-w-0 flex-col`, s.subjects, M),
|
|
180
|
+
children: D.aside
|
|
177
181
|
})]
|
|
178
182
|
})
|
|
179
183
|
]
|
|
180
184
|
});
|
|
181
185
|
}
|
|
182
|
-
function
|
|
183
|
-
return /* @__PURE__ */
|
|
186
|
+
function E(e) {
|
|
187
|
+
return /* @__PURE__ */ y(T, {
|
|
184
188
|
...e,
|
|
185
189
|
variant: "index"
|
|
186
190
|
});
|
|
187
191
|
}
|
|
188
|
-
function
|
|
189
|
-
return /* @__PURE__ */
|
|
192
|
+
function D(e) {
|
|
193
|
+
return /* @__PURE__ */ y(T, {
|
|
190
194
|
...e,
|
|
191
195
|
variant: "show"
|
|
192
196
|
});
|
|
193
197
|
}
|
|
194
|
-
function
|
|
195
|
-
let
|
|
198
|
+
function O({ tabs: n, activeTab: i, defaultActiveTab: a, onTabChange: o, tabsClassName: s, moreLabel: c, tabsAriaLabel: l, toolbar: u, slots: d, className: f, strings: p, ...m }) {
|
|
199
|
+
let h = e(x, p), [_, S] = v(a), C = /* @__PURE__ */ b(r, {
|
|
196
200
|
gap: "lg",
|
|
197
201
|
"data-slot": "tabbed-resource-toolbar",
|
|
198
202
|
className: "tabbed-resource-shell--toolbar",
|
|
199
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ y(g, {
|
|
200
204
|
items: n,
|
|
201
|
-
value: i,
|
|
202
|
-
onValueChange:
|
|
203
|
-
|
|
205
|
+
value: i === void 0 ? _ : i,
|
|
206
|
+
onValueChange: (e) => {
|
|
207
|
+
i === void 0 && _ !== void 0 && S(e), o?.(e);
|
|
208
|
+
},
|
|
209
|
+
className: s,
|
|
204
210
|
strings: {
|
|
205
|
-
more:
|
|
206
|
-
navigationLabel:
|
|
211
|
+
more: c,
|
|
212
|
+
navigationLabel: l ?? h.tabsAriaLabel
|
|
207
213
|
}
|
|
208
|
-
}),
|
|
214
|
+
}), u]
|
|
209
215
|
});
|
|
210
|
-
return /* @__PURE__ */
|
|
211
|
-
...
|
|
212
|
-
strings:
|
|
213
|
-
className: t("tabbed-resource-shell--component",
|
|
214
|
-
toolbar:
|
|
216
|
+
return /* @__PURE__ */ y(D, {
|
|
217
|
+
...m,
|
|
218
|
+
strings: p,
|
|
219
|
+
className: t("tabbed-resource-shell--component", f),
|
|
220
|
+
toolbar: C,
|
|
215
221
|
slots: {
|
|
216
|
-
...
|
|
217
|
-
toolbar:
|
|
222
|
+
...d,
|
|
223
|
+
toolbar: d?.toolbar ?? C
|
|
218
224
|
}
|
|
219
225
|
});
|
|
220
226
|
}
|
|
221
|
-
function
|
|
222
|
-
return /* @__PURE__ */
|
|
227
|
+
function k({ title: e, description: n, actions: r, headerAction: i, children: a, footer: o, padding: s = "md", surface: c = "card", className: l, contentClassName: u, name: d }) {
|
|
228
|
+
return /* @__PURE__ */ y(p, {
|
|
223
229
|
"data-component": d,
|
|
224
230
|
"data-slot": d,
|
|
225
231
|
title: e,
|
|
@@ -234,13 +240,13 @@ function O({ title: e, description: n, actions: r, headerAction: i, children: a,
|
|
|
234
240
|
children: a
|
|
235
241
|
});
|
|
236
242
|
}
|
|
237
|
-
function
|
|
238
|
-
return /* @__PURE__ */
|
|
243
|
+
function A({ metadata: e, metadataColumns: r = 2, metadataDense: i = !1, body: a, help: o, children: s, contentClassName: c, ...l }) {
|
|
244
|
+
return /* @__PURE__ */ b(k, {
|
|
239
245
|
...l,
|
|
240
246
|
name: "resource-details-section",
|
|
241
247
|
contentClassName: t("resource-details-section--content grid gap-space-xl", c),
|
|
242
248
|
children: [
|
|
243
|
-
!!e?.length && /* @__PURE__ */
|
|
249
|
+
!!e?.length && /* @__PURE__ */ y(m, {
|
|
244
250
|
adaptTo: "container",
|
|
245
251
|
items: e,
|
|
246
252
|
columns: r,
|
|
@@ -248,7 +254,7 @@ function k({ metadata: e, metadataColumns: r = 2, metadataDense: i = !1, body: a
|
|
|
248
254
|
}),
|
|
249
255
|
a,
|
|
250
256
|
s,
|
|
251
|
-
!!o && /* @__PURE__ */
|
|
257
|
+
!!o && /* @__PURE__ */ y(n, {
|
|
252
258
|
size: "xs",
|
|
253
259
|
type: "secondary",
|
|
254
260
|
className: "resource-details-section--help",
|
|
@@ -258,6 +264,6 @@ function k({ metadata: e, metadataColumns: r = 2, metadataDense: i = !1, body: a
|
|
|
258
264
|
});
|
|
259
265
|
}
|
|
260
266
|
//#endregion
|
|
261
|
-
export {
|
|
267
|
+
export { C as ResourceActionBar, A as ResourceDetailsSection, w as ResourceEmptyState, S as ResourceHeader, E as ResourceIndexShell, D as ResourceShowShell, O as TabbedResourceShell, x as defaultResourceStrings };
|
|
262
268
|
|
|
263
269
|
//# sourceMappingURL=resource.js.map
|