themelia-react-ui 2.0.3 → 2.0.5
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 +185 -0
- package/README.md +168 -36
- package/dist/{accordion-Cjb6sx0G.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/action-menu-Dr8K-ghE.js +284 -0
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-P-aVJisu.js} +42 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-C58tQcBy.js} +387 -350
- package/dist/ai-artifact-C58tQcBy.js.map +1 -0
- package/dist/app-shell-B_IuNWOo.js +321 -0
- package/dist/app-shell-B_IuNWOo.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-BxDfL2mw.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-DTkkshS8.js} +44 -47
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DAPlDvhJ.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-HpFqoqSY.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-HpFqoqSY.js.map → badge-xIiV_E7f.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 +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- 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 +12 -12
- 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 +7 -7
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- 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-DnUJ21NQ.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +23 -23
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +230 -216
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +326 -307
- 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 +1247 -1169
- 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-C-oqs1sQ.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-DPZekJFu.js → buttons-BedGfygC.js} +16 -16
- package/dist/buttons-BedGfygC.js.map +1 -0
- package/dist/cards-rNX1M4Xn.js +69 -0
- package/dist/cards-rNX1M4Xn.js.map +1 -0
- package/dist/cascader-B1MiqkBq.js +439 -0
- package/dist/cascader-B1MiqkBq.js.map +1 -0
- package/dist/chart-Darg_0Kv.js +162 -0
- package/dist/chart-Darg_0Kv.js.map +1 -0
- package/dist/{checkbox-AWIhNhmo.js → checkbox-fflqmODR.js} +9 -5
- package/dist/checkbox-fflqmODR.js.map +1 -0
- package/dist/choice-inputs-zUgBZfE4.js +777 -0
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-BzmM9Eig.js} +9 -9
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-C-_l4hpy.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-gDh1v6O4.js.map} +1 -1
- package/dist/combobox-BEx0vJgF.js +362 -0
- package/dist/combobox-BEx0vJgF.js.map +1 -0
- package/dist/{combobox-Dxo2fAYQ.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-C25VMRII.js → command-CrlPIL6m.js} +12 -12
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-DD0DUPwJ.js → comments-Dmpp0YIc.js} +380 -379
- package/dist/comments-Dmpp0YIc.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +9 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +16 -7
- 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 +11 -7
- 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/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +11 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- 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 +13 -4
- 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/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +27 -5
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +3 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- 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/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/features/activities/activities.types.d.ts +8 -2
- 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/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/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 +3 -0
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +1 -1
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +21 -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/media-library.strings.d.ts +2 -0
- package/dist/components/features/media-library/media-library.types.d.ts +14 -4
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- 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 +43 -6
- package/dist/components/features/resource/resource.d.ts +5 -1
- package/dist/components/features/resource/resource.types.d.ts +12 -1
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table.types.d.ts +1 -1
- 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 +6 -6
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -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 +9 -2
- 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 +36 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +5 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +48 -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/typography/text.styles.d.ts +26 -1
- 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/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CIxwbZt5.js +112 -0
- package/dist/containers-CIxwbZt5.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-ClBuk_UK.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-ClBuk_UK.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-BdgCAw8T.js} +277 -285
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-RlIzKom_.js} +501 -480
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/date-pickers-DY-CpXS1.js +179 -0
- package/dist/date-pickers-DY-CpXS1.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-hAc1HjpI.js.map → display-KsZLw9Ov.js.map} +1 -1
- package/dist/dropdown-menu-CLs8Lihj.js +194 -0
- package/dist/dropdown-menu-CLs8Lihj.js.map +1 -0
- package/dist/features/activities.js +302 -253
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +15 -14
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +222 -220
- 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 +249 -249
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +264 -269
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +167 -138
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +6 -7
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +269 -260
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +827 -777
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1246 -1169
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +13 -13
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +127 -123
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +95 -96
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-Dm4izqFn.js} +81 -80
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-DJVAveHA.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CwH9y77i.js → form-field-BriWAXyg.js} +14 -8
- package/dist/form-field-BriWAXyg.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/forms-C0RGnJTe.js +216 -0
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-DIhghX1Q.js} +295 -291
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-DMMxG__r.js} +67 -63
- package/dist/header-DMMxG__r.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/input-CvyDQlY7.js +289 -0
- package/dist/input-CvyDQlY7.js.map +1 -0
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/item-DjCcM18E.js +277 -0
- package/dist/item-DjCcM18E.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 +11 -11
- package/dist/lib/affordance-geometry.generated.d.ts +41 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- 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/token-merge.generated.d.ts +13 -10
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-CGlEJ15c.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/metadata-list-C3MkU-Om.js +443 -0
- package/dist/metadata-list-C3MkU-Om.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-C90-oQFq.js +255 -0
- package/dist/navigation-C90-oQFq.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-DbV1Dija.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-CRU3kGuk.js.map} +1 -1
- package/dist/overflow-tab-bar-IVFVQFV6.js +172 -0
- package/dist/overflow-tab-bar-IVFVQFV6.js.map +1 -0
- package/dist/overlays-BSgCtM2v.js +1013 -0
- package/dist/overlays-BSgCtM2v.js.map +1 -0
- package/dist/page-DUUKDAjo.js +331 -0
- package/dist/page-DUUKDAjo.js.map +1 -0
- package/dist/page-header-commands-7P3sfE9u.js +193 -0
- package/dist/page-header-commands-7P3sfE9u.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-BL25hu2s.js.map → pagination-CgCjElfu.js.map} +1 -1
- package/dist/popover-B85RenIl.js +201 -0
- package/dist/popover-B85RenIl.js.map +1 -0
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-DlnQ2zlR.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DdiEp0rd.js} +18 -11
- package/dist/popover.recipes-DdiEp0rd.js.map +1 -0
- package/dist/portal-recipes-BpsV_iRw.js +9 -0
- package/dist/portal-recipes-BpsV_iRw.js.map +1 -0
- package/dist/{primitives-BFK08r9M.js → primitives-ByWgGUgt.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-B1VnCT0K.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-Dth5E882.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-laT3tpBT.js} +33 -29
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-Bar5wiSo.js +167 -0
- package/dist/settings-Bar5wiSo.js.map +1 -0
- package/dist/sheet-BGPERY55.js +250 -0
- package/dist/sheet-BGPERY55.js.map +1 -0
- package/dist/sidebar-D-JYMMbY.js +686 -0
- package/dist/sidebar-D-JYMMbY.js.map +1 -0
- package/dist/sidebar-f9gRWXIR.js +1001 -0
- package/dist/sidebar-f9gRWXIR.js.map +1 -0
- package/dist/skeleton-BapcJd9C.js +265 -0
- package/dist/skeleton-BapcJd9C.js.map +1 -0
- package/dist/smart-card-CW0hjetE.js +617 -0
- package/dist/smart-card-CW0hjetE.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-DuxKl954.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-CDocW5D1.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-B1culiSK.js} +107 -104
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +192 -149
- package/dist/{timelines-CwM_9IhD.js → timelines-D3Sl9ueq.js} +13 -12
- package/dist/timelines-D3Sl9ueq.js.map +1 -0
- package/dist/tooltip-8wz5S_Zr.js +113 -0
- package/dist/tooltip-8wz5S_Zr.js.map +1 -0
- package/dist/{tree-WnKQzwbq.js → tree-CzUJHnFs.js} +9 -9
- package/dist/{tree-WnKQzwbq.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-BQnine1k.js +117 -0
- package/dist/typography-BQnine1k.js.map +1 -0
- 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-CXyxmQBP.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-Boscubn9.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-BhO5eqkX.js → usage-card-BeSLY0i0.js} +145 -137
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-B6kKb8jB.js} +303 -144
- package/dist/utils-B6kKb8jB.js.map +1 -0
- package/dist/value-inputs-skdVB2zh.js +980 -0
- package/dist/value-inputs-skdVB2zh.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/workspace-DHeHv0qw.js +411 -0
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +15 -129
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +74 -13
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- 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 +30 -38
- 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 +88 -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-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +105 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +23 -11
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +325201 -0
- package/docs/consumer-skill/references/composition-mapping.md +106 -0
- package/docs/consumer-skill/references/composition.md +198 -46
- 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 +43 -9
- package/docs/consumer-skill/references/discovery.md +109 -8
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +51 -36
- package/docs/consumer-skill/references/integration.md +41 -2
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +4390 -475
- package/docs/consumer-skill/references/review.md +47 -5
- package/docs/consumer-skill/references/rhf-workflows.md +93 -0
- package/docs/consumer-skill/references/screen-archetypes.md +34 -0
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +25 -27
- package/docs/consumer-skill/references/tokens.json +20 -11
- 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 +9 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +254 -0
- package/docs/consumer-skill/scripts/discovery.mjs +96 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +193 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +111 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +31 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +34 -0
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +15 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +42 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/accordion-Cjb6sx0G.js.map +0 -1
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js +0 -236
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/auth-BGua8ouh.js.map +0 -1
- package/dist/avatar-DAPlDvhJ.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-DnUJ21NQ.js.map +0 -1
- package/dist/button-DVzspB_G.js.map +0 -1
- package/dist/buttons-DPZekJFu.js.map +0 -1
- package/dist/cards-BaBZR-AU.js +0 -68
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/chart-ZOYyK2xG.js +0 -155
- package/dist/chart-ZOYyK2xG.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js +0 -770
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/code-block-DeneBJR_.js.map +0 -1
- package/dist/combobox-DaHESuiL.js +0 -355
- package/dist/combobox-DaHESuiL.js.map +0 -1
- package/dist/combobox-Dxo2fAYQ.js.map +0 -1
- package/dist/command-C25VMRII.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/dropdown-menu-Cl4X7L5S.js +0 -193
- package/dist/dropdown-menu-Cl4X7L5S.js.map +0 -1
- package/dist/feedback-BYIhtitP.js.map +0 -1
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +0 -1
- package/dist/filters-DJVAveHA.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/form-sizing-BdP_Mf5p.js.map +0 -1
- package/dist/forms-B9G_xwzi.js +0 -194
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/header-BSfIEWbI.js.map +0 -1
- package/dist/hooks-ClH9thn4.js.map +0 -1
- package/dist/input-CZw8iU99.js +0 -21
- package/dist/input-CZw8iU99.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/message-DZ_ruyUV.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-Bnotn4AQ.js +0 -145
- package/dist/navigation-Bnotn4AQ.js.map +0 -1
- package/dist/navigation-BzhHI3lo.js.map +0 -1
- package/dist/navigation-row-recipes-BFLCk_Aq.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js +0 -282
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js +0 -1003
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/popover-gnTOhbFM.js +0 -198
- package/dist/popover-gnTOhbFM.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-BVSOH3Xo.js.map +0 -1
- package/dist/rich-text-editor-cRLC-eBK.js.map +0 -1
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/sheet-ijlsjq-n.js +0 -213
- package/dist/sheet-ijlsjq-n.js.map +0 -1
- package/dist/sidebar-Db6gkh3U.js +0 -619
- package/dist/sidebar-Db6gkh3U.js.map +0 -1
- package/dist/sidebar-DkTO4VTO.js +0 -512
- package/dist/sidebar-DkTO4VTO.js.map +0 -1
- package/dist/skeleton-Byjnt7qr.js +0 -264
- package/dist/skeleton-Byjnt7qr.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/table-BweFy_P9.js.map +0 -1
- package/dist/tabs-CDocW5D1.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-CwM_9IhD.js.map +0 -1
- package/dist/tooltip-yiRJUFjp.js +0 -111
- package/dist/tooltip-yiRJUFjp.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js +0 -136
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/upload-CXyxmQBP.js.map +0 -1
- package/dist/upload-queue-Boscubn9.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { S as e, d as t } from "../ui-provider-C-74NVLc.js";
|
|
3
3
|
import { useStrings as n } from "../lib/strings.js";
|
|
4
|
-
import { t as r } from "../utils-
|
|
5
|
-
import { n as i } from "../buttons-
|
|
6
|
-
import { a, c as o, s } from "../typography-
|
|
7
|
-
import { t as c } from "../structure-
|
|
8
|
-
import { t as l } from "../progress-
|
|
9
|
-
import { h as u } from "../form-sizing-
|
|
10
|
-
import { t as d } from "../input-
|
|
11
|
-
import { t as f } from "../form-field-
|
|
12
|
-
import { d as p } from "../text-inputs-
|
|
13
|
-
import { l as m, r as h, s as g } from "../choice-inputs-
|
|
14
|
-
import { t as _ } from "../checkbox-
|
|
4
|
+
import { t as r } from "../utils-B6kKb8jB.js";
|
|
5
|
+
import { n as i } from "../buttons-BedGfygC.js";
|
|
6
|
+
import { a, c as o, s } from "../typography-BQnine1k.js";
|
|
7
|
+
import { t as c } from "../structure-DuxKl954.js";
|
|
8
|
+
import { t as l } from "../progress-BJhQP9WX.js";
|
|
9
|
+
import { h as u } from "../form-sizing-Bs2qFUeE.js";
|
|
10
|
+
import { t as d } from "../input-CvyDQlY7.js";
|
|
11
|
+
import { t as f } from "../form-field-BriWAXyg.js";
|
|
12
|
+
import { d as p } from "../text-inputs-B1culiSK.js";
|
|
13
|
+
import { l as m, r as h, s as g } from "../choice-inputs-zUgBZfE4.js";
|
|
14
|
+
import { t as _ } from "../checkbox-fflqmODR.js";
|
|
15
15
|
import { forwardRef as v, useEffect as y, useId as b, useRef as x, useState as S } from "react";
|
|
16
16
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/features/questionnaire/questionnaire-control.tsx
|
|
18
18
|
function ee({ question: n, answer: i, disabled: s, error: l, labelId: f, descriptionId: v, onAnswerChange: y, ...b }) {
|
|
19
|
-
let { defaultScale: x } =
|
|
19
|
+
let { defaultScale: x } = t(), S = r("questionnaire--check", g, u[e(void 0, x)]), C = {
|
|
20
20
|
disabled: s,
|
|
21
21
|
invalid: !!l,
|
|
22
22
|
"aria-labelledby": f,
|
|
@@ -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;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,MAAK;OAAS,aAAY;OAAoB;OAAU,SAASuF;OAAS,UAAA3C,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","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,oBAAiBhB,EAAiB,GAGpCiB,IAAahB,EAAG,wBAAwBW,GAA2BN,EAAqBP,EAAsB,KAAA,GAAWmB,CAAY,EAAE,GACvIC,IAAS;EAAE;EAAU,SAAS,EAA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B,CAAA;MACxL0B,IAAWN,EAAQ,SAAS,IAAI,kBAAChE,GAAD;OAAQ,MAAK;OAAU,MAAK;OAAS,UAAUqF;OAAQ,SAASW;OAAU,UAAApD,EAAQ;MAAa,CAAA,IAAI,kBAAC5C,GAAD;OAAQ,MAAK;OAAU,MAAK;OAAS,UAAUqF;OAAS,UAAAZ,IAAc7B,EAAQ,QAAQA,EAAQ;MAAe,CAAA;MAChP+B,KAAQ,kBAAC3E,GAAD;OAAQ,MAAK;OAAS,aAAY;OAAoB;OAAU,SAASuF;OAAS,UAAA3C,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,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useStrings as e } from "../lib/strings.js";
|
|
3
|
-
import { t } from "../utils-
|
|
4
|
-
import { n } from "../buttons-
|
|
5
|
-
import { c as r, o as i } from "../typography-
|
|
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-B6kKb8jB.js";
|
|
4
|
+
import { n } from "../buttons-BedGfygC.js";
|
|
5
|
+
import { c as r, o as i } from "../typography-BQnine1k.js";
|
|
6
|
+
import { t as a } from "../structure-DuxKl954.js";
|
|
7
|
+
import { n as o } from "../cards-rNX1M4Xn.js";
|
|
8
|
+
import { r as s } from "../overlays-BSgCtM2v.js";
|
|
9
|
+
import { n as c } from "../display-KsZLw9Ov.js";
|
|
10
|
+
import { s as l } from "../data-display-BdgCAw8T.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,19 +1,21 @@
|
|
|
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-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as d } from "../
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
3
|
+
import { t } from "../utils-B6kKb8jB.js";
|
|
4
|
+
import { c as n } from "../typography-BQnine1k.js";
|
|
5
|
+
import { t as r } from "../structure-DuxKl954.js";
|
|
6
|
+
import { n as i, t as a } from "../feedback-Dm4izqFn.js";
|
|
7
|
+
import { n as o, t as s } from "../composition.recipes-COdiFhxB.js";
|
|
8
|
+
import { u as c } from "../primitives-ByWgGUgt.js";
|
|
9
|
+
import { t as l } from "../icon-badge-DZF-YjQp.js";
|
|
10
|
+
import { i as u, n as d, s as f } from "../avatar-CeZaFmNH.js";
|
|
11
|
+
import { n as p } from "../display-KsZLw9Ov.js";
|
|
12
|
+
import { t as m } from "../metadata-list-C3MkU-Om.js";
|
|
13
|
+
import { t as h } from "../navigation-C90-oQFq.js";
|
|
14
|
+
import { t as g } from "../overflow-tab-bar-IVFVQFV6.js";
|
|
15
|
+
import { s as _ } from "../data-display-BdgCAw8T.js";
|
|
16
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
15
17
|
//#region src/components/features/resource/resource.strings.ts
|
|
16
|
-
var
|
|
18
|
+
var b = {
|
|
17
19
|
loadingLabel: "Loading resources",
|
|
18
20
|
loadingDescription: "Preparing the latest data for this view.",
|
|
19
21
|
emptyTitle: "No resources found",
|
|
@@ -25,35 +27,35 @@ var v = {
|
|
|
25
27
|
};
|
|
26
28
|
//#endregion
|
|
27
29
|
//#region src/components/features/resource/resource.tsx
|
|
28
|
-
function
|
|
29
|
-
let
|
|
30
|
-
className: t("resource-header--avatar size-avatar-lg",
|
|
31
|
-
children: [!!
|
|
32
|
-
src:
|
|
33
|
-
alt:
|
|
34
|
-
}), /* @__PURE__ */
|
|
35
|
-
value:
|
|
30
|
+
function x({ title: e, description: n, eyebrow: i, media: a, avatarUrl: o, avatarAlt: s, avatarFallback: p, icon: m, iconTone: g = "neutral", badges: _, metadata: b, actions: x, primaryAction: S, secondaryActions: C, maxVisibleSecondaryActions: w, moreActionsLabel: T, renderLink: E, className: D, contentClassName: O, mediaClassName: k }) {
|
|
31
|
+
let A = m, j = typeof e == "string" ? e : "", M = a ?? (o || p ? /* @__PURE__ */ y(d, {
|
|
32
|
+
className: t("resource-header--avatar size-avatar-lg", k),
|
|
33
|
+
children: [!!o && /* @__PURE__ */ v(f, {
|
|
34
|
+
src: o,
|
|
35
|
+
alt: s ?? j
|
|
36
|
+
}), /* @__PURE__ */ v(u, { children: p ?? /* @__PURE__ */ v(c, {
|
|
37
|
+
value: j,
|
|
36
38
|
strategy: "first-words"
|
|
37
39
|
}) })]
|
|
38
|
-
}) :
|
|
39
|
-
icon:
|
|
40
|
+
}) : A ? /* @__PURE__ */ v(l, {
|
|
41
|
+
icon: A,
|
|
40
42
|
shape: "square",
|
|
41
|
-
tone:
|
|
42
|
-
className: t("resource-header--icon size-avatar-lg [&>svg]:size-icon-lg",
|
|
43
|
+
tone: g,
|
|
44
|
+
className: t("resource-header--icon size-avatar-lg [&>svg]:size-icon-lg", k)
|
|
43
45
|
}) : null);
|
|
44
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ v(h, {
|
|
45
47
|
eyebrow: i,
|
|
46
48
|
title: e,
|
|
47
49
|
description: n,
|
|
48
|
-
leading:
|
|
49
|
-
titleSuffix:
|
|
50
|
+
leading: M,
|
|
51
|
+
titleSuffix: _ ? /* @__PURE__ */ v(r, {
|
|
50
52
|
"data-slot": "resource-header-badges",
|
|
51
53
|
direction: "horizontal",
|
|
52
54
|
gap: "sm",
|
|
53
55
|
className: "resource-header--badges shrink-0",
|
|
54
|
-
children:
|
|
56
|
+
children: _
|
|
55
57
|
}) : void 0,
|
|
56
|
-
afterDescription: b ? /* @__PURE__ */
|
|
58
|
+
afterDescription: b ? /* @__PURE__ */ v(r, {
|
|
57
59
|
"data-slot": "resource-header-metadata",
|
|
58
60
|
direction: "horizontal",
|
|
59
61
|
gap: "md",
|
|
@@ -63,23 +65,24 @@ function y({ title: e, description: n, eyebrow: i, media: a, avatarUrl: d, avata
|
|
|
63
65
|
actions: x,
|
|
64
66
|
primaryAction: S,
|
|
65
67
|
secondaryActions: C,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
maxVisibleSecondaryActions: w,
|
|
69
|
+
moreActionsLabel: T,
|
|
70
|
+
renderLink: E,
|
|
68
71
|
withSeparator: !1,
|
|
69
|
-
className: t("resource-header--component",
|
|
70
|
-
contentClassName:
|
|
72
|
+
className: t("resource-header--component", D),
|
|
73
|
+
contentClassName: O,
|
|
71
74
|
eyebrowClassName: "resource-header--eyebrow",
|
|
72
75
|
titleClassName: "resource-header--title truncate",
|
|
73
76
|
descriptionClassName: "resource-header--description max-w-3xl",
|
|
74
77
|
actionsClassName: "resource-header--actions flex-wrap"
|
|
75
78
|
});
|
|
76
79
|
}
|
|
77
|
-
function
|
|
78
|
-
return /* @__PURE__ */
|
|
80
|
+
function S({ children: e, leading: n, trailing: i, sticky: a = !1, className: o }) {
|
|
81
|
+
return /* @__PURE__ */ v("div", {
|
|
79
82
|
"data-component": "resource-action-bar",
|
|
80
83
|
"data-slot": "resource-action-bar",
|
|
81
|
-
className: t("resource-action-bar--component box-border rounded-
|
|
82
|
-
children: /* @__PURE__ */
|
|
84
|
+
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),
|
|
85
|
+
children: /* @__PURE__ */ y(r, {
|
|
83
86
|
direction: {
|
|
84
87
|
base: "vertical",
|
|
85
88
|
sm: "horizontal"
|
|
@@ -89,13 +92,13 @@ function b({ children: e, leading: n, trailing: i, sticky: a = !1, className: o
|
|
|
89
92
|
justify: { sm: "between" },
|
|
90
93
|
wrap: { sm: !1 },
|
|
91
94
|
className: "resource-action-bar--layout",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ v(r, {
|
|
93
96
|
"data-slot": "resource-action-leading",
|
|
94
97
|
direction: "horizontal",
|
|
95
98
|
gap: "md",
|
|
96
99
|
className: "resource-action-bar--leading flex-1",
|
|
97
100
|
children: n ?? e
|
|
98
|
-
}), !!i && /* @__PURE__ */
|
|
101
|
+
}), !!i && /* @__PURE__ */ v(r, {
|
|
99
102
|
"data-slot": "resource-action-trailing",
|
|
100
103
|
direction: "horizontal",
|
|
101
104
|
gap: "md",
|
|
@@ -105,123 +108,123 @@ function b({ children: e, leading: n, trailing: i, sticky: a = !1, className: o
|
|
|
105
108
|
})
|
|
106
109
|
});
|
|
107
110
|
}
|
|
108
|
-
function
|
|
109
|
-
return /* @__PURE__ */
|
|
111
|
+
function C(e) {
|
|
112
|
+
return /* @__PURE__ */ v(_, {
|
|
110
113
|
...e,
|
|
111
114
|
"data-component": "resource-empty-state",
|
|
112
115
|
"data-slot": "resource-empty-state",
|
|
113
116
|
className: t("resource-empty-state--component", e.className)
|
|
114
117
|
});
|
|
115
118
|
}
|
|
116
|
-
function
|
|
117
|
-
let
|
|
118
|
-
title:
|
|
119
|
-
description:
|
|
120
|
-
actions:
|
|
121
|
-
primaryAction:
|
|
122
|
-
secondaryActions:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
119
|
+
function w({ children: n, title: c, description: l, actions: u, primaryAction: d, secondaryActions: f, maxVisibleSecondaryActions: p, moreActionsLabel: m, renderLink: h, toolbar: g, emptySlot: _, empty: S = !1, loading: w = !1, error: T, onRetry: E, slots: D, className: O, headerClassName: k, contentClassName: A, strings: j, asideClassName: M, variant: N }) {
|
|
120
|
+
let P = e(b, j), F = D?.header ?? (c ? /* @__PURE__ */ v(x, {
|
|
121
|
+
title: c,
|
|
122
|
+
description: l,
|
|
123
|
+
actions: u,
|
|
124
|
+
primaryAction: d,
|
|
125
|
+
secondaryActions: f,
|
|
126
|
+
maxVisibleSecondaryActions: p,
|
|
127
|
+
moreActionsLabel: m,
|
|
128
|
+
renderLink: h,
|
|
129
|
+
className: k
|
|
130
|
+
}) : null), I = D?.toolbar ?? g, L = D?.loading ?? /* @__PURE__ */ v(i, {
|
|
127
131
|
variant: "panel",
|
|
128
|
-
label:
|
|
129
|
-
description:
|
|
132
|
+
label: P.loadingLabel,
|
|
133
|
+
description: P.loadingDescription,
|
|
130
134
|
skeleton: !0,
|
|
131
135
|
lines: 4,
|
|
132
|
-
className: "resource-shell--loading rounded-
|
|
133
|
-
}),
|
|
134
|
-
title:
|
|
135
|
-
description:
|
|
136
|
+
className: "resource-shell--loading rounded-surface border border-border bg-card"
|
|
137
|
+
}), R = D?.empty ?? _ ?? /* @__PURE__ */ v(C, {
|
|
138
|
+
title: P.emptyTitle,
|
|
139
|
+
description: P.emptyDescription,
|
|
136
140
|
border: !0
|
|
137
|
-
}),
|
|
138
|
-
title:
|
|
139
|
-
description:
|
|
140
|
-
onRetry:
|
|
141
|
-
retryLabel:
|
|
142
|
-
}),
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
-
"data-component": `resource-${
|
|
145
|
-
"data-slot": `resource-${
|
|
146
|
-
className: t(`resource-${
|
|
147
|
-
children:
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
"data-slot": `resource-${
|
|
165
|
-
className: t(`resource-${
|
|
166
|
-
children:
|
|
167
|
-
}),
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
})
|
|
141
|
+
}), z = /* @__PURE__ */ v(a, {
|
|
142
|
+
title: P.errorTitle,
|
|
143
|
+
description: T instanceof Error ? T.message : typeof T == "string" || typeof T == "number" ? String(T) : P.errorDescription,
|
|
144
|
+
onRetry: E,
|
|
145
|
+
retryLabel: P.retryLabel
|
|
146
|
+
}), B = D?.error ?? (T && typeof T != "boolean" && typeof T != "string" && typeof T != "number" && !(T instanceof Error) ? T : z), V = w ? L : T ? B : S ? R : n;
|
|
147
|
+
return /* @__PURE__ */ y("section", {
|
|
148
|
+
"data-component": `resource-${N}-shell`,
|
|
149
|
+
"data-slot": `resource-${N}-shell`,
|
|
150
|
+
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),
|
|
151
|
+
children: [
|
|
152
|
+
!!F && /* @__PURE__ */ v("div", {
|
|
153
|
+
"data-slot": `resource-${N}-header`,
|
|
154
|
+
className: `resource-${N}-shell--header`,
|
|
155
|
+
children: F
|
|
156
|
+
}),
|
|
157
|
+
!!I && /* @__PURE__ */ v("div", {
|
|
158
|
+
"data-slot": `resource-${N}-toolbar`,
|
|
159
|
+
className: `resource-${N}-shell--toolbar`,
|
|
160
|
+
children: I
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ y("div", {
|
|
163
|
+
"data-slot": `resource-${N}-layout`,
|
|
164
|
+
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)]"),
|
|
165
|
+
children: [/* @__PURE__ */ y(r, {
|
|
166
|
+
gap: o.subjects,
|
|
167
|
+
children: [/* @__PURE__ */ v("div", {
|
|
168
|
+
"data-slot": `resource-${N}-content`,
|
|
169
|
+
className: t(`resource-${N}-shell--content flex min-w-0 flex-col`, s.subjects, A),
|
|
170
|
+
children: V
|
|
171
|
+
}), !!D?.footer && /* @__PURE__ */ v("div", {
|
|
172
|
+
"data-slot": `resource-${N}-footer`,
|
|
173
|
+
className: `resource-${N}-shell--footer`,
|
|
174
|
+
children: D.footer
|
|
175
|
+
})]
|
|
176
|
+
}), !!D?.aside && /* @__PURE__ */ v("aside", {
|
|
177
|
+
"data-slot": `resource-${N}-aside`,
|
|
178
|
+
className: t(`resource-${N}-shell--aside flex min-w-0 flex-col`, s.subjects, M),
|
|
179
|
+
children: D.aside
|
|
180
|
+
})]
|
|
181
|
+
})
|
|
182
|
+
]
|
|
180
183
|
});
|
|
181
184
|
}
|
|
182
|
-
function
|
|
183
|
-
return /* @__PURE__ */
|
|
185
|
+
function T(e) {
|
|
186
|
+
return /* @__PURE__ */ v(w, {
|
|
184
187
|
...e,
|
|
185
188
|
variant: "index"
|
|
186
189
|
});
|
|
187
190
|
}
|
|
188
|
-
function
|
|
189
|
-
return /* @__PURE__ */
|
|
191
|
+
function E(e) {
|
|
192
|
+
return /* @__PURE__ */ v(w, {
|
|
190
193
|
...e,
|
|
191
194
|
variant: "show"
|
|
192
195
|
});
|
|
193
196
|
}
|
|
194
|
-
function
|
|
195
|
-
let
|
|
197
|
+
function D({ tabs: n, activeTab: i, onTabChange: a, tabsClassName: o, moreLabel: s, tabsAriaLabel: c, toolbar: l, slots: u, className: d, strings: f, ...p }) {
|
|
198
|
+
let m = e(b, f), h = /* @__PURE__ */ y(r, {
|
|
196
199
|
gap: "lg",
|
|
197
200
|
"data-slot": "tabbed-resource-toolbar",
|
|
198
201
|
className: "tabbed-resource-shell--toolbar",
|
|
199
|
-
children: [/* @__PURE__ */ g
|
|
202
|
+
children: [/* @__PURE__ */ v(g, {
|
|
200
203
|
items: n,
|
|
201
204
|
value: i,
|
|
202
205
|
onValueChange: a,
|
|
203
206
|
className: o,
|
|
204
207
|
strings: {
|
|
205
208
|
more: s,
|
|
206
|
-
navigationLabel: c ??
|
|
209
|
+
navigationLabel: c ?? m.tabsAriaLabel
|
|
207
210
|
}
|
|
208
211
|
}), l]
|
|
209
212
|
});
|
|
210
|
-
return /* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ v(E, {
|
|
211
214
|
...p,
|
|
212
215
|
strings: f,
|
|
213
216
|
className: t("tabbed-resource-shell--component", d),
|
|
214
|
-
toolbar:
|
|
217
|
+
toolbar: h,
|
|
215
218
|
slots: {
|
|
216
219
|
...u,
|
|
217
|
-
toolbar: u?.toolbar ??
|
|
220
|
+
toolbar: u?.toolbar ?? h
|
|
218
221
|
}
|
|
219
222
|
});
|
|
220
223
|
}
|
|
221
|
-
function
|
|
222
|
-
return /* @__PURE__ */
|
|
223
|
-
"data-component":
|
|
224
|
-
"data-slot":
|
|
224
|
+
function O({ title: e, description: n, actions: r, headerAction: i, children: a, footer: o, padding: s = "md", surface: c = "card", className: l, contentClassName: u, name: d }) {
|
|
225
|
+
return /* @__PURE__ */ v(p, {
|
|
226
|
+
"data-component": d,
|
|
227
|
+
"data-slot": d,
|
|
225
228
|
title: e,
|
|
226
229
|
description: n,
|
|
227
230
|
actions: r,
|
|
@@ -229,25 +232,26 @@ function E({ title: e, description: n, actions: r, headerAction: i, children: a,
|
|
|
229
232
|
footerSlot: o,
|
|
230
233
|
padding: s,
|
|
231
234
|
surface: c,
|
|
232
|
-
className: t(`${
|
|
235
|
+
className: t(`${d}--component`, l),
|
|
233
236
|
contentClassName: u,
|
|
234
237
|
children: a
|
|
235
238
|
});
|
|
236
239
|
}
|
|
237
|
-
function
|
|
238
|
-
return /* @__PURE__ */
|
|
240
|
+
function k({ metadata: e, metadataColumns: r = 2, metadataDense: i = !1, body: a, help: o, children: s, contentClassName: c, ...l }) {
|
|
241
|
+
return /* @__PURE__ */ y(O, {
|
|
239
242
|
...l,
|
|
240
243
|
name: "resource-details-section",
|
|
241
244
|
contentClassName: t("resource-details-section--content grid gap-space-xl", c),
|
|
242
245
|
children: [
|
|
243
|
-
!!e?.length && /* @__PURE__ */
|
|
246
|
+
!!e?.length && /* @__PURE__ */ v(m, {
|
|
247
|
+
adaptTo: "container",
|
|
244
248
|
items: e,
|
|
245
249
|
columns: r,
|
|
246
250
|
density: i ? "compact" : "default"
|
|
247
251
|
}),
|
|
248
252
|
a,
|
|
249
253
|
s,
|
|
250
|
-
!!o && /* @__PURE__ */
|
|
254
|
+
!!o && /* @__PURE__ */ v(n, {
|
|
251
255
|
size: "xs",
|
|
252
256
|
type: "secondary",
|
|
253
257
|
className: "resource-details-section--help",
|
|
@@ -257,6 +261,6 @@ function D({ metadata: e, metadataColumns: r = 2, metadataDense: i = !1, body: a
|
|
|
257
261
|
});
|
|
258
262
|
}
|
|
259
263
|
//#endregion
|
|
260
|
-
export {
|
|
264
|
+
export { S as ResourceActionBar, k as ResourceDetailsSection, C as ResourceEmptyState, x as ResourceHeader, T as ResourceIndexShell, E as ResourceShowShell, D as TabbedResourceShell, b as defaultResourceStrings };
|
|
261
265
|
|
|
262
266
|
//# sourceMappingURL=resource.js.map
|