themelia-react-ui 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +211 -0
- package/MIGRATION.md +119 -0
- package/README.md +122 -20
- package/dist/{accordion-96o0pN62.js → accordion-0tQUZ20r.js} +13 -13
- package/dist/accordion-0tQUZ20r.js.map +1 -0
- package/dist/{action-menu-CHgs8vmj.js → action-menu-C0gjzLyE.js} +48 -45
- package/dist/action-menu-C0gjzLyE.js.map +1 -0
- package/dist/{affordance-geometry.generated-B8yGOr8-.js → affordance-geometry.generated-P-aVJisu.js} +36 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-BZUGwBq6.js → ai-artifact-CGGpQryR.js} +281 -230
- package/dist/ai-artifact-CGGpQryR.js.map +1 -0
- package/dist/app-shell-EHuuRDGy.js +321 -0
- package/dist/app-shell-EHuuRDGy.js.map +1 -0
- package/dist/{attachment-DkoqHPPl.js → attachment-BCpA4e7i.js} +10 -10
- package/dist/{attachment-DkoqHPPl.js.map → attachment-BCpA4e7i.js.map} +1 -1
- package/dist/{auth-D2FVZ1MH.js → auth-B0girIk_.js} +49 -52
- package/dist/auth-B0girIk_.js.map +1 -0
- package/dist/{avatar-DWO_HHhB.js → avatar-B9Jnp-T-.js} +8 -8
- package/dist/avatar-B9Jnp-T-.js.map +1 -0
- package/dist/{badge-DErMA7ul.js → badge-wWauMgAt.js} +5 -5
- package/dist/{badge-DErMA7ul.js.map → badge-wWauMgAt.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +200 -193
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +8 -8
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +6 -6
- package/dist/base/spinner.js.map +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +36 -36
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-CdfIkCsV.js → batch-action-bar-BoqWIIpV.js} +7 -7
- package/dist/batch-action-bar-BoqWIIpV.js.map +1 -0
- package/dist/blocks/admin.js +21 -21
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +267 -247
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +537 -543
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1330 -1250
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-B-WFKecD.js → breadcrumbs-Bp9Ke7kd.js} +7 -7
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
- package/dist/{button-DkmK-z8E.js → button-ChBovTx0.js} +3 -3
- package/dist/button-ChBovTx0.js.map +1 -0
- package/dist/{buttons-BbfzgczK.js → buttons-DeW0bQeK.js} +16 -16
- package/dist/buttons-DeW0bQeK.js.map +1 -0
- package/dist/cards-CNXnmvV5.js +69 -0
- package/dist/cards-CNXnmvV5.js.map +1 -0
- package/dist/cascader-CrAl9zD5.js +439 -0
- package/dist/cascader-CrAl9zD5.js.map +1 -0
- package/dist/chart-I7ROnsl8.js +162 -0
- package/dist/chart-I7ROnsl8.js.map +1 -0
- package/dist/{checkbox-CzYUTPeJ.js → checkbox-MoyHIAPs.js} +3 -3
- package/dist/{checkbox-CzYUTPeJ.js.map → checkbox-MoyHIAPs.js.map} +1 -1
- package/dist/choice-inputs-DHGtx0QV.js +789 -0
- package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
- package/dist/{code-block-CGNaUtAE.js → code-block-BSJyq9e-.js} +9 -9
- package/dist/code-block-BSJyq9e-.js.map +1 -0
- package/dist/{collapsible-Do4G0zcC.js → collapsible-BzJ91LUG.js} +5 -5
- package/dist/{collapsible-Do4G0zcC.js.map → collapsible-BzJ91LUG.js.map} +1 -1
- package/dist/{collection-content-C0e8SsTm.js → collection-content-CSnwtOTH.js} +3 -3
- package/dist/{collection-content-C0e8SsTm.js.map → collection-content-CSnwtOTH.js.map} +1 -1
- package/dist/combobox-Bcvu5J8O.js +363 -0
- package/dist/combobox-Bcvu5J8O.js.map +1 -0
- package/dist/combobox-C2JiSQPc.js +915 -0
- package/dist/combobox-C2JiSQPc.js.map +1 -0
- package/dist/{command-D8NrBj-b.js → command-9e52NPgK.js} +11 -11
- package/dist/command-9e52NPgK.js.map +1 -0
- package/dist/{comments-Di4w0H_S.js → comments-BsgErEqd.js} +44 -39
- package/dist/comments-BsgErEqd.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +7 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +6 -4
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +3 -4
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/choice-types.d.ts +5 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
- package/dist/components/base/combobox/combobox-field.d.ts +2 -2
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
- package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -1
- package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
- package/dist/components/base/forms/form-field.d.ts +7 -2
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/workflow.d.ts +7 -1
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +8 -1
- package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
- package/dist/components/base/metadata-list/metadata-list.d.ts +1 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/language-switcher.d.ts +12 -4
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +10 -3
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +29 -5
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/upload/avatar-upload.d.ts +2 -1
- package/dist/components/base/upload/image-upload.d.ts +2 -1
- package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +5 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
- package/dist/components/blocks/analytics/types.d.ts +2 -2
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
- package/dist/components/features/activities/activities.types.d.ts +26 -13
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
- package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
- package/dist/components/features/combobox/combobox.d.ts +2 -2
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
- package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
- package/dist/components/features/combobox/types.d.ts +37 -8
- package/dist/components/features/email-composer/types.d.ts +3 -1
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
- package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +6 -3
- package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +5 -3
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +25 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +8 -0
- package/dist/components/features/media-library/media-library.types.d.ts +50 -12
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +4 -4
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +45 -8
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +6 -2
- package/dist/components/features/resource/resource.types.d.ts +14 -1
- package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
- package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -0
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table-body.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +6 -3
- package/dist/components/features/table/table.strings.d.ts +3 -0
- package/dist/components/features/table/table.types.d.ts +18 -2
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +9 -8
- package/dist/components/layout/layout.types.d.ts +5 -3
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/navigation/side-nav.d.ts +3 -2
- package/dist/components/layout/normalize-layout-path.d.ts +1 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +10 -3
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +38 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +6 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +50 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/primitives/link.d.ts +3 -2
- package/dist/components/primitives/money.d.ts +1 -1
- package/dist/components/primitives/number.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/{containers-CRmHf7GP.js → containers-CSdc32h9.js} +26 -18
- package/dist/containers-CSdc32h9.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-CnGCZdX4.js → copyable-3fdHfMR3.js} +7 -7
- package/dist/{copyable-CnGCZdX4.js.map → copyable-3fdHfMR3.js.map} +1 -1
- package/dist/{data-display-D4oujtx0.js → data-display-Cmj-xZYl.js} +271 -279
- package/dist/data-display-Cmj-xZYl.js.map +1 -0
- package/dist/{date-Q7jnXxpk.js → date-Br0FicVv.js} +5 -5
- package/dist/{date-Q7jnXxpk.js.map → date-Br0FicVv.js.map} +1 -1
- package/dist/date-picker-CyQlFYsP.js +1617 -0
- package/dist/date-picker-CyQlFYsP.js.map +1 -0
- package/dist/date-pickers-tj2MXmXd.js +185 -0
- package/dist/date-pickers-tj2MXmXd.js.map +1 -0
- package/dist/{display-BB4BL_-K.js → display-CT_N2a3w.js} +9 -9
- package/dist/{display-BB4BL_-K.js.map → display-CT_N2a3w.js.map} +1 -1
- package/dist/dropdown-menu-C08iIugv.js +194 -0
- package/dist/dropdown-menu-C08iIugv.js.map +1 -0
- package/dist/features/activities.js +388 -326
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +46 -32
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +130 -130
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +243 -239
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +197 -199
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +168 -143
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +19 -30
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +369 -343
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1202 -975
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +2 -2
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1270 -1183
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +160 -153
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +119 -113
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +28 -19
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +297 -256
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +57 -50
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +470 -470
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-Dzo1xtAU.js +246 -0
- package/dist/feedback-Dzo1xtAU.js.map +1 -0
- package/dist/{field-affordance-recipes-DjwGx8eM.js → field-affordance-recipes-D6H7tVJi.js} +5 -5
- package/dist/field-affordance-recipes-D6H7tVJi.js.map +1 -0
- package/dist/field-control-attributes-B6i335wr.js +18 -0
- package/dist/field-control-attributes-B6i335wr.js.map +1 -0
- package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
- package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
- package/dist/filters-Dl80yYtN.js +2415 -0
- package/dist/filters-Dl80yYtN.js.map +1 -0
- package/dist/form-field-CAPdwdnZ.js +74 -0
- package/dist/form-field-CAPdwdnZ.js.map +1 -0
- package/dist/{form-sizing-NXgjkmBG.js → form-sizing-CgcrUbLU.js} +5 -5
- package/dist/form-sizing-CgcrUbLU.js.map +1 -0
- package/dist/{forms-BV5m5aQF.js → forms-B3W8CH7-.js} +17 -13
- package/dist/forms-B3W8CH7-.js.map +1 -0
- package/dist/forms-numeric-CwjQJe-O.js +991 -0
- package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
- package/dist/{header-BA697l4a.js → header-ZIIsRKxP.js} +145 -141
- package/dist/header-ZIIsRKxP.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-BQ-L7Uu2.js → hooks-BitHSh-Y.js} +27 -15
- package/dist/hooks-BitHSh-Y.js.map +1 -0
- package/dist/{icon-badge-COWbCCWu.js → icon-badge-npxF1SLX.js} +4 -4
- package/dist/{icon-badge-COWbCCWu.js.map → icon-badge-npxF1SLX.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/{input-Cdw4k0fb.js → input-7KAc7XQL.js} +9 -9
- package/dist/{input-Cdw4k0fb.js.map → input-7KAc7XQL.js.map} +1 -1
- package/dist/input-DIREVYHs.js +21 -0
- package/dist/input-DIREVYHs.js.map +1 -0
- package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
- package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
- package/dist/item-FfWnaYST.js +278 -0
- package/dist/item-FfWnaYST.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +12 -12
- package/dist/layout.types-E_GAApzO.js +30 -0
- package/dist/layout.types-E_GAApzO.js.map +1 -0
- package/dist/lib/affordance-geometry.generated.d.ts +35 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/field-control-attributes.d.ts +11 -0
- package/dist/lib/field-state-recipes.d.ts +2 -0
- package/dist/lib/format.d.ts +1 -0
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/surface-recipes.d.ts +1 -1
- package/dist/lib/token-merge.generated.d.ts +18 -15
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-CSl5W1Fy.js → media-gallery-C81DAnKI.js} +6 -6
- package/dist/{media-gallery-CSl5W1Fy.js.map → media-gallery-C81DAnKI.js.map} +1 -1
- package/dist/{mentions-RKOQaaIB.js → mentions-qOnedSt4.js} +237 -168
- package/dist/mentions-qOnedSt4.js.map +1 -0
- package/dist/message-BJHnn43M.js +135 -0
- package/dist/message-BJHnn43M.js.map +1 -0
- package/dist/{metadata-list-qVV7AVxa.js → metadata-list-XkqZ_UXH.js} +64 -64
- package/dist/metadata-list-XkqZ_UXH.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-BgtPJAhi.js +288 -0
- package/dist/navigation-BgtPJAhi.js.map +1 -0
- package/dist/navigation-Bt-v7rWP.js +261 -0
- package/dist/navigation-Bt-v7rWP.js.map +1 -0
- package/dist/{navigation-row-recipes-WZEs-hYo.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
- package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
- package/dist/{number-E_OiIfJz.js → number-CYqBcrSj.js} +79 -87
- package/dist/number-CYqBcrSj.js.map +1 -0
- package/dist/overflow-tab-bar-BQCA2Zn2.js +172 -0
- package/dist/overflow-tab-bar-BQCA2Zn2.js.map +1 -0
- package/dist/overlays-CC8zI3Du.js +1017 -0
- package/dist/overlays-CC8zI3Du.js.map +1 -0
- package/dist/page-BoQ1VaFJ.js +331 -0
- package/dist/page-BoQ1VaFJ.js.map +1 -0
- package/dist/page-header-commands-DIKspJfx.js +193 -0
- package/dist/page-header-commands-DIKspJfx.js.map +1 -0
- package/dist/{pagination-Ch8X_47u.js → pagination-Br8TdV9A.js} +7 -7
- package/dist/{pagination-Ch8X_47u.js.map → pagination-Br8TdV9A.js.map} +1 -1
- package/dist/popover-k8TdUcAt.js +201 -0
- package/dist/popover-k8TdUcAt.js.map +1 -0
- package/dist/{popover-menu-BYaCdFhf.js → popover-menu-yn-o0kyA.js} +7 -7
- package/dist/{popover-menu-BYaCdFhf.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DJ0AkUan.js} +19 -12
- package/dist/popover.recipes-DJ0AkUan.js.map +1 -0
- package/dist/portal-recipes-DyUXqUtD.js +9 -0
- package/dist/portal-recipes-DyUXqUtD.js.map +1 -0
- package/dist/{primitives-Du64iDbb.js → primitives-BkkQjYl7.js} +23 -18
- package/dist/primitives-BkkQjYl7.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-BvF2oCdV.js → progress-DZFXXzPs.js} +9 -9
- package/dist/{progress-BvF2oCdV.js.map → progress-DZFXXzPs.js.map} +1 -1
- package/dist/{receipt-D789Jwyy.js → receipt-C7LhOg7Q.js} +7 -7
- package/dist/receipt-C7LhOg7Q.js.map +1 -0
- package/dist/rich-text-BnTzZjIo.js +45 -0
- package/dist/rich-text-BnTzZjIo.js.map +1 -0
- package/dist/{rich-text-editor-Cm1dpUpQ.js → rich-text-editor-CAurDwT5.js} +501 -424
- package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js +99 -0
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
- package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
- package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
- package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
- package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
- package/dist/{scroll-area-La5RXsEk.js → scroll-area-Bj6CRUif.js} +2 -2
- package/dist/{scroll-area-La5RXsEk.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
- package/dist/{separator-DAEV0w65.js → separator-B9ewiCGO.js} +2 -2
- package/dist/{separator-DAEV0w65.js.map → separator-B9ewiCGO.js.map} +1 -1
- package/dist/{separator-GNfPG-90.js → separator-DM6gs2vu.js} +3 -3
- package/dist/{separator-GNfPG-90.js.map → separator-DM6gs2vu.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-DZPHgpx4.js +155 -0
- package/dist/settings-DZPHgpx4.js.map +1 -0
- package/dist/sheet-C4DHsgLk.js +250 -0
- package/dist/sheet-C4DHsgLk.js.map +1 -0
- package/dist/sidebar-C8BnDwTH.js +709 -0
- package/dist/sidebar-C8BnDwTH.js.map +1 -0
- package/dist/sidebar-CmD6a-HK.js +1004 -0
- package/dist/sidebar-CmD6a-HK.js.map +1 -0
- package/dist/skeleton-DDgdhmu9.js +265 -0
- package/dist/skeleton-DDgdhmu9.js.map +1 -0
- package/dist/smart-card-B6vLxqa_.js +617 -0
- package/dist/smart-card-B6vLxqa_.js.map +1 -0
- package/dist/{structure-C0V0_Fyf.js → structure-DZJ2wbAU.js} +2 -2
- package/dist/{structure-C0V0_Fyf.js.map → structure-DZJ2wbAU.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
- package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
- package/dist/{table-DH7rozUv.js → table-CBonSdTp.js} +573 -519
- package/dist/table-CBonSdTp.js.map +1 -0
- package/dist/{table-CpvnzJn9.js → table-CXSPHH25.js} +75 -71
- package/dist/table-CXSPHH25.js.map +1 -0
- package/dist/tabs-C4Kr_hCr.js +192 -0
- package/dist/tabs-C4Kr_hCr.js.map +1 -0
- package/dist/{text-inputs-DXItiR0O.js → text-inputs-jdkS3ReG.js} +18 -18
- package/dist/text-inputs-jdkS3ReG.js.map +1 -0
- package/dist/theme.css +40 -37
- package/dist/{timelines-DmtztAY_.js → timelines-CoPwdJP0.js} +13 -12
- package/dist/timelines-CoPwdJP0.js.map +1 -0
- package/dist/tooltip-31NwIpTo.js +113 -0
- package/dist/tooltip-31NwIpTo.js.map +1 -0
- package/dist/{tree-CV11PURP.js → tree-CeYVzdFE.js} +9 -9
- package/dist/{tree-CV11PURP.js.map → tree-CeYVzdFE.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-CSyJrh28.js → typography-C7-YMW1S.js} +12 -12
- package/dist/{typography-CSyJrh28.js.map → typography-C7-YMW1S.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-C9SA0X-8.js → upload-Hdm5gObf.js} +309 -296
- package/dist/upload-Hdm5gObf.js.map +1 -0
- package/dist/{upload-queue-DhQJiSRc.js → upload-queue-D0sYPuqo.js} +16 -14
- package/dist/upload-queue-D0sYPuqo.js.map +1 -0
- package/dist/{usage-card-DVTRDmGz.js → usage-card-9s8hLDfn.js} +24 -17
- package/dist/usage-card-9s8hLDfn.js.map +1 -0
- package/dist/{utils-CF3c95Io.js → utils-DhuoqFy4.js} +255 -165
- package/dist/utils-DhuoqFy4.js.map +1 -0
- package/dist/value-inputs-D3aPgq9H.js +980 -0
- package/dist/value-inputs-D3aPgq9H.js.map +1 -0
- package/dist/{value-typography-ClupF0Gz.js → value-typography-uSzzG9Gf.js} +32 -26
- package/dist/value-typography-uSzzG9Gf.js.map +1 -0
- package/dist/{workspace-9EFVXUyk.js → workspace-CC8Vchiu.js} +51 -50
- package/dist/workspace-CC8Vchiu.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +4 -3
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +52 -1
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +3 -3
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +38 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +1 -1
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +24 -11
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +21 -19
- package/docs/consumer-skill/references/analytics.md +33 -1
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +21249 -14205
- package/docs/consumer-skill/references/composition-mapping.md +17 -3
- package/docs/consumer-skill/references/composition.md +177 -32
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +12 -9
- package/docs/consumer-skill/references/discovery.md +27 -3
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +62 -8
- package/docs/consumer-skill/references/integration.md +59 -1
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +3044 -445
- package/docs/consumer-skill/references/review.md +87 -10
- package/docs/consumer-skill/references/rhf-workflows.md +79 -0
- package/docs/consumer-skill/references/screen-archetypes.md +19 -7
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +24 -20
- package/docs/consumer-skill/references/tokens.json +9 -9
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +7 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +176 -26
- package/docs/consumer-skill/scripts/composition-schema.mjs +1 -1
- package/docs/consumer-skill/scripts/composition.mjs +61 -5
- package/docs/consumer-skill/scripts/discovery.mjs +54 -0
- package/docs/consumer-skill/scripts/inspect-component.mjs +1 -1
- package/docs/consumer-skill/scripts/inspection.mjs +73 -18
- package/docs/consumer-skill/scripts/setup-skills.mjs +79 -7
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +14 -13
- package/docs/consumer-skills/themelia-composition/SKILL.md +16 -17
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +2 -1
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +24 -17
- package/package.json +4 -2
- package/templates/admin-shell-template.tsx +1 -2
- package/templates/customers-template.tsx +18 -16
- package/dist/accordion-96o0pN62.js.map +0 -1
- package/dist/action-menu-CHgs8vmj.js.map +0 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +0 -1
- package/dist/ai-artifact-BZUGwBq6.js.map +0 -1
- package/dist/app-shell-D63ATkIK.js +0 -237
- package/dist/app-shell-D63ATkIK.js.map +0 -1
- package/dist/auth-D2FVZ1MH.js.map +0 -1
- package/dist/avatar-DWO_HHhB.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-CdfIkCsV.js.map +0 -1
- package/dist/breadcrumbs-B-WFKecD.js.map +0 -1
- package/dist/button-DkmK-z8E.js.map +0 -1
- package/dist/buttons-BbfzgczK.js.map +0 -1
- package/dist/cards-4JTWqvVe.js +0 -68
- package/dist/cards-4JTWqvVe.js.map +0 -1
- package/dist/chart-C19flDQb.js +0 -155
- package/dist/chart-C19flDQb.js.map +0 -1
- package/dist/choice-inputs-JLtij2y4.js +0 -776
- package/dist/choice-inputs-JLtij2y4.js.map +0 -1
- package/dist/code-block-CGNaUtAE.js.map +0 -1
- package/dist/combobox-CBJDs6w_.js +0 -877
- package/dist/combobox-CBJDs6w_.js.map +0 -1
- package/dist/combobox-hbhSS18O.js +0 -355
- package/dist/combobox-hbhSS18O.js.map +0 -1
- package/dist/command-D8NrBj-b.js.map +0 -1
- package/dist/comments-Di4w0H_S.js.map +0 -1
- package/dist/containers-CRmHf7GP.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-D4oujtx0.js.map +0 -1
- package/dist/date-picker-zOt1oNss.js +0 -1542
- package/dist/date-picker-zOt1oNss.js.map +0 -1
- package/dist/date-pickers-cj8IXbDC.js +0 -179
- package/dist/date-pickers-cj8IXbDC.js.map +0 -1
- package/dist/dropdown-menu-CjY8Vt7W.js +0 -193
- package/dist/dropdown-menu-CjY8Vt7W.js.map +0 -1
- package/dist/feedback-DZNL5Lg1.js +0 -239
- package/dist/feedback-DZNL5Lg1.js.map +0 -1
- package/dist/field-affordance-recipes-DjwGx8eM.js.map +0 -1
- package/dist/filters-BcT-uoFy.js +0 -2209
- package/dist/filters-BcT-uoFy.js.map +0 -1
- package/dist/form-field-CsgRmdit.js +0 -63
- package/dist/form-field-CsgRmdit.js.map +0 -1
- package/dist/form-sizing-NXgjkmBG.js.map +0 -1
- package/dist/forms-BV5m5aQF.js.map +0 -1
- package/dist/forms-numeric-Cd33AKbD.js +0 -906
- package/dist/forms-numeric-Cd33AKbD.js.map +0 -1
- package/dist/header-BA697l4a.js.map +0 -1
- package/dist/hooks-BQ-L7Uu2.js.map +0 -1
- package/dist/input-DOPL5_QE.js +0 -21
- package/dist/input-DOPL5_QE.js.map +0 -1
- package/dist/item-BvZ2DR_x.js +0 -277
- package/dist/item-BvZ2DR_x.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/mentions-RKOQaaIB.js.map +0 -1
- package/dist/message-INU2xsxu.js +0 -128
- package/dist/message-INU2xsxu.js.map +0 -1
- package/dist/metadata-list-qVV7AVxa.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-BQNcg1jT.js +0 -269
- package/dist/navigation-BQNcg1jT.js.map +0 -1
- package/dist/navigation-DLF3E1IC.js +0 -145
- package/dist/navigation-DLF3E1IC.js.map +0 -1
- package/dist/navigation-row-recipes-WZEs-hYo.js.map +0 -1
- package/dist/number-E_OiIfJz.js.map +0 -1
- package/dist/overflow-tab-bar-CrbqMteP.js +0 -284
- package/dist/overflow-tab-bar-CrbqMteP.js.map +0 -1
- package/dist/overlays-BlKynmde.js +0 -1004
- package/dist/overlays-BlKynmde.js.map +0 -1
- package/dist/page-CIwNUtGr.js +0 -227
- package/dist/page-CIwNUtGr.js.map +0 -1
- package/dist/page-header-commands-DFMlNYzN.js +0 -128
- package/dist/page-header-commands-DFMlNYzN.js.map +0 -1
- package/dist/popover-uwzX2vo7.js +0 -198
- package/dist/popover-uwzX2vo7.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/primitives-Du64iDbb.js.map +0 -1
- package/dist/receipt-D789Jwyy.js.map +0 -1
- package/dist/rich-text-CLJEf76s.js +0 -78
- package/dist/rich-text-CLJEf76s.js.map +0 -1
- package/dist/rich-text-editor-Cm1dpUpQ.js.map +0 -1
- package/dist/rich-text-editor-toolbar-L__e4x47.js +0 -94
- package/dist/rich-text-editor-toolbar-L__e4x47.js.map +0 -1
- package/dist/safe-image-src-C6kQSMBZ.js +0 -17
- package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
- package/dist/sanitize-html-DsQmI48u.js.map +0 -1
- package/dist/settings-BA2iboic.js +0 -174
- package/dist/settings-BA2iboic.js.map +0 -1
- package/dist/sheet-DoAxTb2J.js +0 -213
- package/dist/sheet-DoAxTb2J.js.map +0 -1
- package/dist/sidebar-ByqKR_W5.js +0 -512
- package/dist/sidebar-ByqKR_W5.js.map +0 -1
- package/dist/sidebar-D2iSnGJ7.js +0 -619
- package/dist/sidebar-D2iSnGJ7.js.map +0 -1
- package/dist/skeleton-CUj8O5Bd.js +0 -264
- package/dist/skeleton-CUj8O5Bd.js.map +0 -1
- package/dist/smart-card-CqkzQsK-.js +0 -614
- package/dist/smart-card-CqkzQsK-.js.map +0 -1
- package/dist/table-CpvnzJn9.js.map +0 -1
- package/dist/table-DH7rozUv.js.map +0 -1
- package/dist/tabs-eqVsJZWO.js +0 -191
- package/dist/tabs-eqVsJZWO.js.map +0 -1
- package/dist/text-inputs-DXItiR0O.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-DmtztAY_.js.map +0 -1
- package/dist/tooltip-B4hjKtoV.js +0 -111
- package/dist/tooltip-B4hjKtoV.js.map +0 -1
- package/dist/ui-provider-CQCuCBcy.js +0 -136
- package/dist/ui-provider-CQCuCBcy.js.map +0 -1
- package/dist/upload-C9SA0X-8.js.map +0 -1
- package/dist/upload-queue-DhQJiSRc.js.map +0 -1
- package/dist/usage-card-DVTRDmGz.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-CF3c95Io.js.map +0 -1
- package/dist/value-inputs-C0o70p-U.js +0 -980
- package/dist/value-inputs-C0o70p-U.js.map +0 -1
- package/dist/value-typography-ClupF0Gz.js.map +0 -1
- package/dist/workspace-9EFVXUyk.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-shell-EHuuRDGy.js","names":["_Fragment","HEADER_THEME_CLASS","_Fragment","_Fragment","useThemeScopeHost","ThemeScopeHostProvider","cn","Stack","compositionClasses","layerRecipes","SidebarRegion","Container","PageViewport","headerInlineDividerAlignment","shellContentSurface","ShellRegionGrid","hasPrimary","sidebar","hasSecondary","secondarySidebar","hasAside","aside","hasRegions","right","side","stackedPrimary","inlinePrimary","presentation","inlineCluster","columns","primary","primaryWidth","sidebarClassName","secondary","secondaryWidth","secondarySidebarClassName","supporting","asideWidth","asideClassName","main","mainClassName","className","Fragment","HEADER_THEME_CLASS$1","TopbarSidebarLayout","Content","props","headerStyle","headerHeight","sidebarWidth","style","resolvedSidebarTrigger","slots","sidebarTrigger","headerScope","resolvedLogo","logo","resolvedHeaderActions","headerActions","resolvedSidebar","resolvedContent","children","isInset","contentSurface","contentNode","contentClassName","headerTheme","sidebarSide","mobileSidebarMode","sidebarPresentation","headerClassName","headerInnerClassName","secondarySidebarWidth","bodyClassName","SidebarInsetLayout","shellStyle","resolvedTrigger","surface","frameAlignedRegion","toolbarNode","toolbar","toolbarClassName","mainNode","HEADER_THEME_CLASS","StackedLayout","resolvedNav","nav","contentWidth","event","viewport","action","insets","left","subheaderClassName","AppLayout","_variant","shell","variant"],"sources":["../src/components/layout/app-shell/shell-regions.tsx","../src/components/layout/app-shell/topbar-sidebar-layout.tsx","../src/components/layout/app-shell/sidebar-inset-layout.tsx","../src/components/layout/app-shell/stacked-layout.tsx","../src/components/layout/app-shell/app-layout.tsx"],"sourcesContent":["import type {ReactNode} from 'react';\nimport {SidebarRegion} from '../../base/sidebar';\nimport {cn} from '../../../lib/utils';\nimport {layerRecipes} from '../../../lib/layer-recipes';\nimport type {AppShellSidebarPresentation} from './app-shell.types';\n\n/** One surface recipe; the shell frames the page while Page owns its insets. */\nexport const shellContentSurface = {\n plain: 'bg-background text-foreground',\n inset: 'bg-card text-card-foreground md:m-space-md md:overflow-hidden md:rounded-surface md:border md:border-border md:shadow-sm',\n} as const;\n\ninterface ShellRegionGridProps {\n children: ReactNode;\n sidebar?: ReactNode;\n secondarySidebar?: ReactNode;\n aside?: ReactNode;\n side?: 'left' | 'right';\n primaryWidth?: string;\n secondaryWidth?: string;\n asideWidth?: string;\n presentation?: AppShellSidebarPresentation;\n inlinePrimary?: boolean;\n className?: string;\n mainClassName?: string;\n sidebarClassName?: string;\n secondarySidebarClassName?: string;\n asideClassName?: string;\n}\n\n/** Optional auto tracks collapse independently; the page always owns the flexible track. */\nexport function ShellRegionGrid({children,sidebar,secondarySidebar,aside,side='left',primaryWidth,secondaryWidth,asideWidth,presentation='panel',inlinePrimary=false,className,mainClassName,sidebarClassName,secondarySidebarClassName,asideClassName}: ShellRegionGridProps) {\n const hasPrimary = Boolean(sidebar), hasSecondary = Boolean(secondarySidebar), hasAside = Boolean(aside);\n const hasRegions = hasPrimary || hasSecondary || hasAside;\n const right = side === 'right';\n const stackedPrimary = inlinePrimary && presentation !== 'rail';\n // Inline dual navigation retains a usable page canvas. On narrow hosts the\n // body pans horizontally beneath the persistent rail instead of crushing text.\n const inlineCluster = inlinePrimary && presentation === 'rail' && hasSecondary;\n const columns = !hasRegions ? 'grid-cols-1'\n : inlineCluster ? right ? 'grid-cols-[auto_minmax(20rem,1fr)_auto_auto]' : 'grid-cols-[auto_auto_minmax(20rem,1fr)_auto]'\n : right ? 'grid-cols-[auto_minmax(0,1fr)_auto_auto]' : 'grid-cols-[auto_auto_minmax(0,1fr)_auto]';\n const primary = hasPrimary && <SidebarRegion panelId=\"primary\" dockAt={inlinePrimary || presentation === 'rail' ? 0 : 768} presentation={presentation} side={side} width={primaryWidth}\n className={cn('row-start-1', right ? 'col-start-4' : 'col-start-1', inlineCluster && ['sticky', right ? 'right-0' : 'left-0', layerRecipes.sticky], stackedPrimary && (right ? 'max-md:col-start-1 max-md:row-start-2' : 'max-md:col-start-1'),sidebarClassName)}>{sidebar}</SidebarRegion>;\n // Beside a persistent area rail the contextual sidebar is the full navigation\n // panel, so it docks, and becomes a drawer, at the primary panel's threshold.\n const secondaryDockAt = inlinePrimary ? 0 : hasPrimary && presentation === 'rail' ? 768 : 1024;\n const secondary = hasSecondary && <SidebarRegion panelId=\"secondary\" dockAt={secondaryDockAt} side={side} width={secondaryWidth} className={cn('row-start-1',right ? 'col-start-3' : 'col-start-2',secondarySidebarClassName)}>{secondarySidebar}</SidebarRegion>;\n const supporting = hasAside && <SidebarRegion panelId=\"aside\" dockAt={1440} side={right ? 'left' : 'right'} width={asideWidth} className={cn('row-start-1',right ? 'col-start-1' : 'col-start-4',asideClassName)}>{aside}</SidebarRegion>;\n const main = <div className={cn('shell-regions--main row-start-1 flex min-h-0 min-w-0 flex-col', hasRegions && (right ? 'col-start-2' : 'col-start-3'),stackedPrimary && (right ? 'max-md:col-start-1' : 'max-md:col-start-1 max-md:row-start-2'),mainClassName)}>{children}</div>;\n return <div data-shell-regions=\"\" className={cn('shell-regions--component grid min-h-0 min-w-0 flex-1 [direction:ltr] ltr:[&>*]:[direction:ltr] rtl:[&>*]:[direction:rtl]', inlineCluster && 'overflow-x-auto overflow-y-hidden overscroll-x-contain', columns,stackedPrimary && 'max-md:grid-cols-1',className)}>\n {right ? <>{supporting}{main}{secondary}{primary}</> : <>{primary}{secondary}{main}{supporting}</>}\n </div>;\n}\n","/**\n * TopbarSidebarLayout — header-first app shell with a two-column body.\n *\n * This shell is intentionally separate from the default shadcn sidebar layout:\n * the logo belongs in the header, while the sidebar and content occupy the\n * remaining page height below the header.\n */\nimport { cn } from '../../../lib/utils';\nimport { ThemeScopeHostProvider, useThemeScopeHost } from '../../../lib/theme-scope';\n\nimport { Stack } from '../../base/structure';\nimport {compositionClasses} from '../../base/structure/composition.recipes';\nimport { PageViewport } from '../containers';\nimport { headerInlineDividerAlignment } from '../header/header.recipes';\nimport {ShellRegionGrid, shellContentSurface} from './shell-regions';\n\nimport type {\n\tTopbarSidebarLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\n/**\n * Header theme is just a token scope. `.light` / `.dark` remap the shadcn\n * palette for the header subtree (see css/themes/shadcn.default.css), so header\n * partials use ordinary tokens (`bg-background`, `text-foreground`, `bg-accent`\n * …) and invert against the header surface automatically — no header-specific\n * color variables required. Omitted, the header follows the active theme;\n * `light` keeps the header light even on a dark page; `dark` gives a dark topbar\n * on a light page.\n */\nconst HEADER_THEME_CLASS: Record<NonNullable<TopbarSidebarLayoutProps['headerTheme']>, string> = {\n\tlight: 'light',\n\tdark: 'dark',\n};\n\nexport function TopbarSidebarLayout({\n\tchildren,\n\theaderTheme,\n\tcontentSurface = 'plain',\n\tsidebarSide = 'left',\n\tmobileSidebarMode = 'drawer',\n\theaderHeight,\n\tsidebarWidth, secondarySidebarWidth, asideWidth, sidebarPresentation, secondarySidebarClassName, asideClassName,\n\tsidebarTrigger,\n\tlogo,\n\theaderActions,\n\tsidebar,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\theaderClassName,\n\theaderInnerClassName,\n\tbodyClassName,\n\tsidebarClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: TopbarSidebarLayoutProps) {\n\tconst headerStyle = {\n\t\t...(headerHeight ? { '--shell-header-height': headerHeight } : null),\n\t\t...(sidebarWidth ? { '--shell-sidebar-width': sidebarWidth } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\tconst resolvedSidebarTrigger = slots?.sidebarTrigger ?? sidebarTrigger;\n\tconst headerScope = useThemeScopeHost<HTMLElement>();\n\tconst resolvedLogo = slots?.logo ?? logo;\n\tconst resolvedHeaderActions = slots?.headerActions ?? headerActions;\n\tconst resolvedSidebar = slots?.sidebar ?? sidebar;\n\tconst resolvedContent = slots?.content ?? children;\n\tconst isInset = contentSurface === 'inset';\n\tconst contentNode = (\n\t\t<PageViewport\n\t\t\trender={<Content />}\n\t\t\tclassName={cn(\n\t\t\t\t'topbar-sidebar-layout--content', !isInset && 'bg-background',\n\t\t\t\tcontentClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{resolvedContent}\n\t\t</PageViewport>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'topbar-sidebar-layout--component @container/app-shell box-border isolate flex min-h-svh min-w-0 w-full flex-col overflow-hidden bg-background font-sans text-foreground',\n\t\t\t\t'shell-sidebar-vars', isInset && 'bg-sidebar',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={headerStyle}\n\t\t\tdata-header-theme={headerTheme ?? 'inherit'}\n\t\t\tdata-sidebar-side={sidebarSide}\n\t\t\tdata-mobile-sidebar-mode={mobileSidebarMode}\n\t\t\tdata-content-surface={contentSurface}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ThemeScopeHostProvider value={headerScope.context}>\n\t\t\t<header\n\t\t\t\tref={headerScope.attachHost}\n\t\t\t\tdata-theme-scope=\"\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'topbar-sidebar-layout--header box-border z-40 flex min-h-shell-header shrink-0 items-center border-b border-border bg-background py-space-sm text-foreground',\n\t\t\t\t\t// Above docked navigation the header aligns with the sidebar's inset; once\n\t\t\t\t\t// the panel becomes a drawer it aligns with the page gutter beneath it. A\n\t\t\t\t\t// persistent rail stays docked, so its header keeps the sidebar inset.\n\t\t\t\t\tsidebarPresentation === 'rail' ? 'px-surface-xs' : 'px-surface-lg @3xl/app-shell:px-surface-xs',\n\t\t\t\t\theaderInlineDividerAlignment,\n\t\t\t\t\theaderTheme && HEADER_THEME_CLASS[headerTheme],\n\t\t\t\t\theaderClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"md\" wrap\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'topbar-sidebar-layout--header-inner min-h-action w-full min-w-0',\n\t\t\t\t\t\theaderInnerClassName,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{slots?.header ?? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{!!resolvedSidebarTrigger && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--sidebar-trigger flex shrink-0 items-center\">\n\t\t\t\t\t\t\t\t\t{resolvedSidebarTrigger}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!resolvedLogo && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--logo flex min-w-0 shrink-0 items-center\">\n\t\t\t\t\t\t\t\t\t{resolvedLogo}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerStart && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-start flex min-w-0 items-center\">\n\t\t\t\t\t\t\t\t\t{slots.headerStart}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerCenter && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-center hidden min-w-0 flex-1 items-center @3xl/app-shell:flex\">\n\t\t\t\t\t\t\t\t\t{slots.headerCenter}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!(resolvedHeaderActions || slots?.headerEnd) && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-trailing ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t{!!resolvedHeaderActions && (\n\t\t\t\t\t\t\t\t\t\t<div className={cn('topbar-sidebar-layout--header-actions flex min-w-0 max-w-full flex-wrap items-center [&>*]:max-w-full', compositionClasses.commands)}>\n\t\t\t\t\t\t\t\t\t\t\t{resolvedHeaderActions}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{!!slots?.headerEnd && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-end flex min-w-0 max-w-full flex-wrap items-center gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{slots.headerEnd}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t</header>\n\t\t\t</ThemeScopeHostProvider>\n\n\t\t\t<ShellRegionGrid side={sidebarSide} sidebar={resolvedSidebar} secondarySidebar={slots?.secondarySidebar} aside={slots?.aside}\n\t\t\t\tprimaryWidth={sidebarWidth} secondaryWidth={secondarySidebarWidth} asideWidth={asideWidth} presentation={sidebarPresentation}\n\t\t\t\tinlinePrimary={mobileSidebarMode === 'inline'}\n\t\t\t\tclassName={cn('topbar-sidebar-layout--body', bodyClassName)}\n\t\t\t\tmainClassName={cn('topbar-sidebar-layout--main', shellContentSurface[contentSurface])}\n\t\t\t\tsidebarClassName={cn('topbar-sidebar-layout--sidebar min-h-0 min-w-0 overflow-hidden text-sidebar-foreground', isInset ? 'bg-transparent' : 'bg-sidebar', sidebarClassName)}\n\t\t\t\tsecondarySidebarClassName={cn('topbar-sidebar-layout--secondary-sidebar min-h-0 min-w-0 overflow-hidden text-sidebar-foreground', secondarySidebarClassName)}\n\t\t\t\tasideClassName={cn('topbar-sidebar-layout--aside min-h-0 min-w-0 overflow-hidden text-sidebar-foreground', asideClassName)}>\n\t\t\t\t{contentNode}\n\t\t\t</ShellRegionGrid>\n\t\t</div>\n\t);\n}\n","/**\n * SidebarInsetLayout — sidebar-first app shell with no global header.\n *\n * The counterpart to `TopbarSidebarLayout`. There the header spans the page and\n * owns the logo, with the sidebar below it; here the sidebar owns the full page\n * height and the logo sits inside it, so the content column carries only a slim\n * toolbar of its own. This is the shape shadcn's dashboard uses, and it is the\n * one to reach for when navigation should read as the primary frame.\n *\n * `toolbar={false}` removes even that row, for a shell with no header chrome.\n */\nimport { cn } from '../../../lib/utils';\n\nimport { Stack } from '../../base/structure';\nimport { PageViewport } from '../containers';\nimport { headerInlineDividerAlignment } from '../header/header.recipes';\nimport {ShellRegionGrid, shellContentSurface} from './shell-regions';\n\nimport type {\n\tSidebarInsetLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\nexport function SidebarInsetLayout({\n\tchildren,\n\tsidebarSide = 'left',\n\tsurface = 'inset',\n\tmobileSidebarMode = 'drawer',\n\ttoolbar = true,\n\tsidebarWidth, secondarySidebarWidth, asideWidth, sidebarPresentation, secondarySidebarClassName, asideClassName,\n\tsidebar,\n\tsidebarTrigger,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\tsidebarClassName,\n\ttoolbarClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: SidebarInsetLayoutProps) {\n\tconst shellStyle = {\n\t\t...(sidebarWidth ? { '--shell-sidebar-width': sidebarWidth } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\n\tconst resolvedSidebar = slots?.sidebar ?? sidebar;\n\tconst resolvedTrigger = slots?.sidebarTrigger ?? sidebarTrigger;\n\tconst resolvedContent = slots?.content ?? children;\n\tconst isInset = surface === 'inset';\n\t// Docked navigation beside the inset frame starts where the frame does (its\n\t// margin plus edge), so the sidebar's header rule lines up with the toolbar's.\n\t// A floating sidebar already insets itself by the same amount.\n\tconst frameAlignedRegion = isInset && 'md:border-t md:border-transparent md:pt-space-md md:has-[[data-variant=floating]]:border-t-0 md:has-[[data-variant=floating]]:pt-0';\n\n\n\tconst toolbarNode = toolbar ? (\n\t\t<header\n\t\t\tclassName={cn(\n\t\t\t\t'sidebar-inset-layout--toolbar @container/toolbar box-border flex min-h-shell-header shrink-0 items-center gap-space-md px-surface-lg py-space-sm',\n\t\t\t\theaderInlineDividerAlignment,\n\t\t\t\t// The toolbar and scrolling body share one surface boundary.\n\t\t\t\t'border-b border-border',\n\t\t\t\ttoolbarClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{slots?.toolbar ?? (\n\t\t\t\t<Stack\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap=\"md\" wrap\n\t\t\t\t\tclassName=\"sidebar-inset-layout--toolbar-inner min-h-action w-full min-w-0\"\n\t\t\t\t>\n\t\t\t\t\t{!!resolvedTrigger && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--sidebar-trigger flex shrink-0 items-center\">\n\t\t\t\t\t\t\t{resolvedTrigger}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!slots?.toolbarStart && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--toolbar-start flex min-w-0 flex-1 basis-24 items-center [&>*]:min-w-0 [&>*]:max-w-full\">\n\t\t\t\t\t\t\t{slots.toolbarStart}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!slots?.toolbarEnd && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--toolbar-end ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm [&>*]:max-w-full\">\n\t\t\t\t\t\t\t{slots.toolbarEnd}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t</header>\n\t) : null;\n\n\tconst mainNode = (\n\t\t<div className={cn('sidebar-inset-layout--main flex min-h-0 min-w-0 flex-1 flex-col', shellContentSurface[isInset ? 'inset' : 'plain'])}>\n\t\t\t{toolbarNode}\n\t\t\t<PageViewport\n\t\t\t\trender={<Content />}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'sidebar-inset-layout--content',\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{resolvedContent}\n\t\t\t</PageViewport>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<div className={cn('sidebar-inset-layout--component box-border isolate flex min-h-svh min-w-0 w-full overflow-hidden font-sans text-foreground shell-sidebar-vars', isInset ? 'bg-sidebar' : 'bg-background', className)}\n\t\t\tstyle={shellStyle} data-sidebar-side={sidebarSide} data-surface={surface} data-mobile-sidebar-mode={mobileSidebarMode} {...props}>\n\t\t\t<ShellRegionGrid side={sidebarSide} sidebar={resolvedSidebar} secondarySidebar={slots?.secondarySidebar} aside={slots?.aside}\n\t\t\t\tprimaryWidth={sidebarWidth} secondaryWidth={secondarySidebarWidth} asideWidth={asideWidth} presentation={sidebarPresentation}\n\t\t\t\tinlinePrimary={mobileSidebarMode === 'inline'}\n\t\t\t\tsidebarClassName={cn('sidebar-inset-layout--sidebar min-h-0 min-w-0 overflow-hidden text-sidebar-foreground', isInset ? 'bg-transparent' : 'bg-sidebar', frameAlignedRegion, sidebarClassName)}\n\t\t\t\tsecondarySidebarClassName={cn('sidebar-inset-layout--secondary-sidebar min-h-0 min-w-0 overflow-hidden text-sidebar-foreground', frameAlignedRegion, secondarySidebarClassName)}\n\t\t\t\tasideClassName={cn('sidebar-inset-layout--aside min-h-0 min-w-0 overflow-hidden text-sidebar-foreground', asideClassName)}>\n\t\t\t\t{mainNode}\n\t\t\t</ShellRegionGrid>\n\t\t</div>\n\t);\n}\n","/**\n * StackedLayout — header-only app shell with horizontal navigation.\n *\n * The third shape alongside `TopbarSidebarLayout` (header over sidebar) and\n * `SidebarInsetLayout` (sidebar owns the page). Here there is no sidebar at all:\n * primary navigation runs across the header and the page stacks beneath it.\n *\n * Reach for this when the navigation is shallow enough to fit a row — settings,\n * marketing consoles, single-resource tools — where a sidebar would be mostly\n * empty. `contentWidth=\"contained\"` holds the page to a reading measure;\n * `\"full\"` lets dashboards span. Header flow follows the shell width: below\n * 64rem navigation owns a full row; wider shells, with room for logo, links\n * and account controls together, place it beside the logo.\n */\nimport { cn } from '../../../lib/utils';\nimport { ThemeScopeHostProvider, useThemeScopeHost } from '../../../lib/theme-scope';\n\nimport { Stack } from '../../base/structure';\nimport { Container, PageViewport } from '../containers';\nimport { headerInlineDividerAlignment } from '../header/header.recipes';\nimport {ShellRegionGrid} from './shell-regions';\n\nimport type {\n\tStackedLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\n/** Same token-scope trick as `TopbarSidebarLayout` — see its note. Omitted, the header follows the active theme. */\nconst HEADER_THEME_CLASS: Record<NonNullable<StackedLayoutProps['headerTheme']>, string> = {\n\tlight: 'light',\n\tdark: 'dark',\n};\n\nexport function StackedLayout({\n\tchildren,\n\theaderTheme,\n\tcontentWidth = 'contained',\n\theaderHeight, asideWidth, asideClassName,\n\tlogo,\n\tnav,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\theaderClassName,\n\tsubheaderClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: StackedLayoutProps) {\n\tconst shellStyle = {\n\t\t...(headerHeight ? { '--shell-header-height': headerHeight } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\n\tconst headerScope = useThemeScopeHost<HTMLElement>();\n\tconst resolvedLogo = slots?.logo ?? logo;\n\tconst resolvedNav = slots?.nav ?? nav;\n\tconst resolvedContent = slots?.content ?? children;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'stacked-layout--component @container/stacked-shell box-border isolate flex min-h-svh min-w-0 w-full flex-col bg-background font-sans text-foreground',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={shellStyle}\n\t\t\tdata-header-theme={headerTheme ?? 'inherit'}\n\t\t\tdata-content-width={contentWidth}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ThemeScopeHostProvider value={headerScope.context}>\n\t\t\t<header\n\t\t\t\tref={headerScope.attachHost}\n\t\t\t\tdata-theme-scope=\"\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'stacked-layout--header box-border z-40 flex shrink-0 items-center border-b border-border bg-background px-surface py-space-sm text-foreground @5xl/stacked-shell:min-h-shell-header @5xl/stacked-shell:py-0',\n\t\t\t\t\theaderInlineDividerAlignment,\n\t\t\t\t\theaderTheme && HEADER_THEME_CLASS[headerTheme],\n\t\t\t\t\theaderClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Stack\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap=\"lg\"\n\t\t\t\t\twrap\n\t\t\t\t\t// The shell width owns header adaptation, including narrow parents\n\t\t\t\t\t// on wide viewports. Children keep their identity across both flows.\n\t\t\t\t\tclassName=\"stacked-layout--header-inner min-h-action w-full min-w-0 @5xl/stacked-shell:flex-nowrap @5xl/stacked-shell:gap-space-2xl\"\n\t\t\t\t>\n\t\t\t\t\t{slots?.header ?? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{!!resolvedLogo && (\n\t\t\t\t\t\t\t\t<div className=\"stacked-layout--logo flex min-w-0 shrink-0 items-center @5xl/stacked-shell:order-1\">\n\t\t\t\t\t\t\t\t\t{resolvedLogo}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!resolvedNav && (\n\t\t\t\t\t\t\t\t// This shell has no sidebar, so hiding the nav in narrow shells left\n\t\t\t\t\t\t\t\t// the app with no navigation at all — logo and account menu\n\t\t\t\t\t\t\t\t// only. Instead it drops to its own full-width row and scrolls\n\t\t\t\t\t\t\t\t// horizontally, and returns inline when its parent is wide enough.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Rendered once, not duplicated per breakpoint: a second copy\n\t\t\t\t\t\t\t\t// would put every nav link in the accessibility tree twice.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Keep navigation intrinsic and single-line inside its scroller.\n\t\t\t\t\t\t\t\t// The shared inset reserves room for outer focus rings on every side.\n\t\t\t\t\t\t\t\t<nav\n\t\t\t\t\t\t\t\t\tonFocusCapture={(event) => {\n\t\t\t\t\t\t\t\t\t\t// Native focus can leave a partially visible action clipped.\n\t\t\t\t\t\t\t\t\t\t// Reveal only within this horizontal owner; preserve page scroll.\n\t\t\t\t\t\t\t\t\t\tconst nav = event.currentTarget;\n\t\t\t\t\t\t\t\t\t\t// React portal focus bubbles through its logical nav ancestry.\n\t\t\t\t\t\t\t\t\t\tif (!nav.contains(event.target)) return;\n\t\t\t\t\t\t\t\t\t\tconst viewport = nav.getBoundingClientRect();\n\t\t\t\t\t\t\t\t\t\tconst action = event.target.getBoundingClientRect();\n\t\t\t\t\t\t\t\t\t\tconst insets = getComputedStyle(nav);\n\t\t\t\t\t\t\t\t\t\tconst left = viewport.left + (parseFloat(insets.paddingLeft) || 0);\n\t\t\t\t\t\t\t\t\t\tconst right = viewport.right - (parseFloat(insets.paddingRight) || 0);\n\t\t\t\t\t\t\t\t\t\tif (action.left < left) nav.scrollLeft += action.left - left;\n\t\t\t\t\t\t\t\t\t\telse if (action.right > right) nav.scrollLeft += action.right - right;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tclassName=\"stacked-layout--nav order-last flex w-full min-w-0 flex-nowrap items-center overflow-x-auto p-space-sm @5xl/stacked-shell:order-2 @5xl/stacked-shell:w-auto @5xl/stacked-shell:flex-1 [&>*]:shrink-0 [&>*]:flex-nowrap\">\n\t\t\t\t\t\t\t\t\t{resolvedNav}\n\t\t\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerEnd && (\n\t\t\t\t\t\t\t\t<div className=\"stacked-layout--header-end ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm @5xl/stacked-shell:order-3 @5xl/stacked-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t{slots.headerEnd}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t</header>\n\t\t\t</ThemeScopeHostProvider>\n\n\t\t\t{!!slots?.subheader && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'stacked-layout--subheader shrink-0 border-b border-border bg-background px-surface',\n\t\t\t\t\t\tsubheaderClassName,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{slots.subheader}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<ShellRegionGrid aside={slots?.aside} asideWidth={asideWidth} asideClassName={cn('stacked-layout--aside min-h-0 min-w-0 overflow-hidden text-sidebar-foreground',asideClassName)}>\n\t\t\t<PageViewport\n\t\t\t\trender={<Content />}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'stacked-layout--content bg-background',\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{contentWidth === 'contained' ? (\n\t\t\t\t\t<Container maxWidth=\"2xl\" gutter=\"lg\" className=\"stacked-layout--measure\">\n\t\t\t\t\t\t{resolvedContent}\n\t\t\t\t\t</Container>\n\t\t\t\t) : (\n\t\t\t\t\tresolvedContent\n\t\t\t\t)}\n\t\t\t</PageViewport>\n\t\t\t</ShellRegionGrid>\n\t\t</div>\n\t);\n}\n","import { cn } from '../../../lib/utils';\nimport { SidebarInsetLayout } from './sidebar-inset-layout';\nimport { StackedLayout } from './stacked-layout';\nimport { TopbarSidebarLayout } from './topbar-sidebar-layout';\nimport type { SidebarInsetLayoutProps, StackedLayoutProps, TopbarSidebarLayoutProps } from './app-shell.types';\n\n/** Presets select chrome; each underlying shell retains its own typed slots and behavior. */\nexport type AppLayoutProps =\n | (Omit<TopbarSidebarLayoutProps, 'headerTheme'> & {variant?: 'light-header' | 'dark-header'})\n | (Omit<SidebarInsetLayoutProps, 'surface'> & {variant: 'sidebar' | 'inset'})\n | (StackedLayoutProps & {variant: 'stacked'});\n\nexport type AppLayoutVariant = NonNullable<AppLayoutProps['variant']>;\n\n/** Five ready compositions using three shell owners, with one page viewport. */\nexport function AppLayout(props: AppLayoutProps) {\n const presentation = {'data-app-layout': props.variant ?? 'light-header', className: cn('app-layout--component', props.className)};\n switch (props.variant) {\n case 'stacked': {\n const {variant: _variant, ...shell} = props;\n return <StackedLayout {...shell} {...presentation} />;\n }\n case 'sidebar':\n case 'inset': {\n const {variant, ...shell} = props;\n return <SidebarInsetLayout {...shell} {...presentation} surface={variant === 'sidebar' ? 'flush' : 'inset'} />;\n }\n default: {\n // An omitted variant keeps the header on the active theme; light/dark scope it on request.\n const {variant, ...shell} = props;\n return <TopbarSidebarLayout {...shell} {...presentation} headerTheme={variant === 'dark-header' ? 'dark' : variant === 'light-header' ? 'light' : undefined} />;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;AAOA,IAAac,IAAsB;CAClC,OAAO;CACP,OAAO;AACR;AAqBA,SAAgBC,EAAgB,EAAC,aAAS,YAAQ,qBAAiB,UAAM,UAAK,QAAO,iBAAa,mBAAe,eAAW,kBAAa,SAAQ,mBAAc,IAAM,cAAU,kBAAc,qBAAiB,8BAA0B,qBAAuC;CAC9Q,IAAMC,IAAa,EAAQC,GAAUC,IAAe,EAAQC,GAAmBC,IAAW,EAAQC,GAC5FC,IAAaN,KAAcE,KAAgBE,GAC3CG,IAAQC,MAAS,SACjBC,IAAiBC,KAAiBC,MAAiB,QAGnDC,IAAgBF,KAAiBC,MAAiB,UAAUT,GAC5DW,IAAWP,IACdM,IAAgBL,IAAQ,iDAAiD,iDACzEA,IAAQ,6CAA6C,6CAF1B,eAGxBO,IAAUd,KAAc,kBAACN,GAAD;EAAe,SAAQ;EAAU,QAAQgB,KAAiBC,MAAiB,SAAS,IAAI;EAAmB;EAAoB;EAAM,OAAOI;EACzK,WAAWzB,EAAG,eAAeiB,IAAQ,gBAAgB,eAAeK,KAAiB;GAAC;GAAUL,IAAQ,YAAY;GAAUd,EAAa;EAAM,GAAGgB,MAAmBF,IAAQ,0CAA0C,uBAAsBS,CAAgB;EAAI,UAAAf;CAAuB,CAAA,GAIrRgB,IAAYf,KAAgB,kBAACR,GAAD;EAAe,SAAQ;EAAY,QAD7CgB,IAAgB,IAAIV,KAAcW,MAAiB,SAAS,MAAM;EACU;EAAM,OAAOO;EAAgB,WAAW5B,EAAG,eAA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
@@ -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 } from "./typography-
|
|
3
|
+
import { t } from "./utils-DhuoqFy4.js";
|
|
4
|
+
import { n } from "./buttons-DeW0bQeK.js";
|
|
5
|
+
import { c as r } from "./typography-C7-YMW1S.js";
|
|
6
6
|
import { t as i } from "./focus-recipes-B653VaLq.js";
|
|
7
|
-
import { t as a } from "./progress-
|
|
8
|
-
import { t as o } from "./interaction-recipes-
|
|
9
|
-
import { i as s } from "./primitives-
|
|
10
|
-
import { c, i as l, n as u, r as d, t as f, u as p } from "./item-
|
|
7
|
+
import { t as a } from "./progress-DZFXXzPs.js";
|
|
8
|
+
import { t as o } from "./interaction-recipes-4wZ2tvfb.js";
|
|
9
|
+
import { i as s } from "./primitives-BkkQjYl7.js";
|
|
10
|
+
import { c, i as l, n as u, r as d, t as f, u as p } from "./item-FfWnaYST.js";
|
|
11
11
|
import { forwardRef as m } from "react";
|
|
12
12
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
13
13
|
import { Archive as v, AudioLines as y, Download as b, Eye as x, FileCode as S, FileText as C, ImageIcon as w, Video as T, X as E } from "lucide-react";
|
|
@@ -138,7 +138,7 @@ var R = m(function({ name: a = "", meta: c, bytes: l, locale: u, kind: d, media:
|
|
|
138
138
|
children: [K ?? /* @__PURE__ */ _(h, { children: [
|
|
139
139
|
/* @__PURE__ */ g(M, {
|
|
140
140
|
variant: m && B !== "gallery" ? "image" : "icon",
|
|
141
|
-
className: B === "gallery" ? "aspect-video h-auto w-full overflow-hidden rounded-
|
|
141
|
+
className: B === "gallery" ? "aspect-video h-auto w-full overflow-hidden rounded-radius bg-muted text-muted-foreground" : void 0,
|
|
142
142
|
children: p ?? (m ? /* @__PURE__ */ g("img", {
|
|
143
143
|
src: m,
|
|
144
144
|
alt: "",
|
|
@@ -235,7 +235,7 @@ var R = m(function({ name: a = "", meta: c, bytes: l, locale: u, kind: d, media:
|
|
|
235
235
|
disabled: z,
|
|
236
236
|
"aria-label": X.preview(a),
|
|
237
237
|
onClick: T,
|
|
238
|
-
className: `attachment--trigger ${o.nativeButtonReset} absolute inset-0 z-0 cursor-pointer rounded-
|
|
238
|
+
className: `attachment--trigger ${o.nativeButtonReset} absolute inset-0 z-0 cursor-pointer rounded-radius outline-none ${i.inset} disabled:cursor-not-allowed`
|
|
239
239
|
})]
|
|
240
240
|
});
|
|
241
241
|
});
|
|
@@ -243,4 +243,4 @@ R.displayName = "Attachment";
|
|
|
243
243
|
//#endregion
|
|
244
244
|
export { j as a, P as c, F as i, A as l, I as n, M as o, N as r, L as s, R as t, O as u };
|
|
245
245
|
|
|
246
|
-
//# sourceMappingURL=attachment-
|
|
246
|
+
//# sourceMappingURL=attachment-BCpA4e7i.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-DkoqHPPl.js","names":["_Fragment","Button","ButtonPrimitive","Text","focusRecipes","Progress","interactionRecipes","FileSize","ItemDescription","ItemActions","ItemContent","Item","ItemTitle","Fragment$1","defaultAttachmentStrings","name","icons","ImageIcon","FileText","AudioLines","Video","FileCode","Archive","getAttachmentKind","extension","AttachmentFileIcon","Icon","kind","AttachmentMedia","forwardRef","props","ItemMedia","cn","className","AttachmentContent","AttachmentTitle","AttachmentDescription","AttachmentActions","AttachmentProgress","Attachment","stringsProp","strings","useStrings","showProgress","status","pct","progress","statusCopy","density","layout","disabled","children","thumbnailUrl","media","meta","bytes","description","error","actions","onPreview","onDownload","onRemove","Button$1","Eye","Download","X","onOpen","Button"],"sources":["../src/components/base/attachment/attachment.types.ts","../src/components/base/attachment/attachment.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode, ReactElement } from 'react';\nimport type { StringsProp } from '../../../lib/strings';\nimport type { ItemDensity, ItemSize, ItemVariant } from '../item';\nexport type AttachmentKind = 'image' | 'document' | 'audio' | 'video' | 'code' | 'archive' | 'generic';\nexport type AttachmentStatus = 'queued' | 'uploading' | 'done' | 'error' | 'cancelled';\nexport interface AttachmentStrings {\n preview: (name: string) => string;\n download: (name: string) => string;\n remove: (name: string) => string;\n queued: string; uploading: string; done: string; error: string; cancelled: string;\n}\nexport const defaultAttachmentStrings: AttachmentStrings = {\n preview: name => `Preview ${name}`, download: name => `Download ${name}`, remove: name => `Remove ${name}`,\n queued: 'Queued', uploading: 'Uploading', done: 'Uploaded', error: 'Failed', cancelled: 'Cancelled',\n};\nexport interface AttachmentProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title' | 'onError'> {\n /** Display filename. Omit only when assembling children using Attachment anatomy. */\n name?: string;\n /** Caller-formatted metadata takes precedence over bytes. */\n meta?: ReactNode;\n bytes?: number;\n locale?: string;\n kind?: AttachmentKind;\n media?: ReactNode;\n thumbnailUrl?: string;\n status?: AttachmentStatus;\n /** Upload progress in the 0–100 range. A missing uploading value is indeterminate. */\n progress?: number | null;\n error?: ReactNode;\n /** Override generated status copy while preserving status/progress behavior. */\n description?: ReactNode;\n /** Additional sibling actions. */\n actions?: ReactNode;\n /** Open or preview the whole body, with independent sibling action buttons. Uses the preview string for its accessible name. */\n onOpen?: () => void;\n onPreview?: () => void;\n onDownload?: () => void;\n onRemove?: () => void;\n disabled?: boolean;\n /** Compact horizontal chip, full list row, or a media-first gallery tile. */\n layout?: 'compact' | 'list' | 'gallery';\n size?: ItemSize;\n density?: ItemDensity;\n variant?: ItemVariant;\n /** Element used for a list item without wrapping or inspecting children. */\n render?: ReactElement;\n strings?: StringsProp<AttachmentStrings>;\n}\n","import { forwardRef } from 'react';\nimport { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { Archive, AudioLines, Download, Eye, FileCode, FileText, ImageIcon, Video, X } from 'lucide-react';\nimport { Button } from '../buttons';\nimport { FileSize } from '../../primitives';\nimport { Text } from '../../typography';\nimport { Progress, type ProgressProps } from '../feedback';\nimport { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, type ItemMediaProps, type ItemContentProps, type ItemTitleProps, type ItemDescriptionProps, type ItemActionsProps } from '../item';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { defaultAttachmentStrings, type AttachmentProps, type AttachmentKind } from './attachment.types';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nconst icons = { image: ImageIcon, document: FileText, audio: AudioLines, video: Video, code: FileCode, archive: Archive, generic: FileText };\n/** Filename categorization is display-only and does not trust a file's extension for validation. */\nexport function getAttachmentKind(name: string): AttachmentKind {\n const extension = name.split('.').at(-1)?.toLowerCase();\n if (extension && ['png','jpg','jpeg','gif','webp','svg','avif'].includes(extension)) return 'image';\n if (extension && ['mp3','wav','ogg','flac','m4a'].includes(extension)) return 'audio';\n if (extension && ['mp4','webm','mov','avi'].includes(extension)) return 'video';\n if (extension && ['zip','gz','tar','rar','7z'].includes(extension)) return 'archive';\n if (extension && ['ts','tsx','js','jsx','css','html','json','py','sh','sql'].includes(extension)) return 'code';\n if (extension && ['pdf','doc','docx','txt','md','xls','xlsx','csv'].includes(extension)) return 'document';\n return 'generic';\n}\nexport function AttachmentFileIcon({ name, kind }: { name: string; kind?: AttachmentKind }) { const Icon = icons[kind ?? getAttachmentKind(name)]; return <Icon aria-hidden=\"true\" />; }\nexport const AttachmentMedia = forwardRef<HTMLDivElement, ItemMediaProps>(function AttachmentMedia({ className, ...props }, ref) { return <ItemMedia {...props} ref={ref} className={cn('attachment--media self-center group-has-data-[slot=item-description]/item:self-center', className)} />; });\nexport const AttachmentContent = forwardRef<HTMLDivElement, ItemContentProps>(function AttachmentContent({ className, ...props }, ref) { return <ItemContent {...props} ref={ref} className={cn('attachment--content w-full max-w-full', className)} />; });\nexport const AttachmentTitle = forwardRef<HTMLDivElement, ItemTitleProps>(function AttachmentTitle({ className, ...props }, ref) { return <ItemTitle {...props} ref={ref} className={cn('attachment--title block w-full truncate [&>span]:block [&>span]:min-w-0 [&>span]:truncate', className)} />; });\nexport const AttachmentDescription = forwardRef<HTMLParagraphElement, ItemDescriptionProps>(function AttachmentDescription({ className, ...props }, ref) { return <ItemDescription {...props} ref={ref} className={cn('attachment--description', className)} />; });\nexport const AttachmentActions = forwardRef<HTMLDivElement, ItemActionsProps>(function AttachmentActions({ className, ...props }, ref) { return <ItemActions {...props} ref={ref} className={cn('attachment--actions relative z-10', className)} />; });\nexport function AttachmentProgress({ className, ...props }: ProgressProps) { return <Progress {...props} className={cn('attachment--progress', className)} />; }\n/** File presentation; callbacks own preview, transfer and removal. Card framing belongs to the caller. */\nexport const Attachment = forwardRef<HTMLDivElement, AttachmentProps>(function Attachment({\n name = '', meta, bytes, locale, kind, media, thumbnailUrl, status, progress, error, description, actions, onOpen, onPreview, onDownload, onRemove,\n disabled = false, layout = 'list', size, density, variant = 'outline', render, strings: stringsProp, children, className, ...props\n}, ref) {\n const strings = useStrings(defaultAttachmentStrings, stringsProp);\n const showProgress = status === 'queued' || status === 'uploading';\n const pct = progress === null || progress === undefined ? null : Number.isFinite(progress) ? Math.max(0, Math.min(100, progress)) : 0;\n const statusCopy = status ? strings[status] : undefined;\n return <Item {...props} ref={ref} render={render} size={size} density={density ?? (layout === 'compact' ? 'compact' : 'default')} variant={variant} padding=\"default\" data-status={status} data-layout={layout} data-disabled={disabled || undefined} className={cn('attachment--component relative isolate min-w-0 max-w-full bg-card text-card-foreground', layout === 'gallery' ? 'flex-col items-stretch' : 'flex-nowrap', status === 'error' && 'border-destructive', className)}>\n {children ?? <>\n {/* A gallery tile owns one full-width media frame. The row thumbnail recipe (a\n size-scaled square) would otherwise shrink a gallery image to an icon. */}\n <AttachmentMedia variant={thumbnailUrl && layout !== 'gallery' ? 'image' : 'icon'} className={layout === 'gallery' ? 'aspect-video h-auto w-full overflow-hidden rounded-inner bg-muted text-muted-foreground' : undefined}>{media ?? (thumbnailUrl ? <img src={thumbnailUrl} alt=\"\" className=\"h-full w-full object-cover\" /> : <AttachmentFileIcon name={name} kind={kind} />)}</AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle title={name}>{name}</AttachmentTitle>\n {(meta !== undefined || bytes !== undefined) && <AttachmentDescription clamp={1}>{meta ?? <FileSize value={bytes} locale={locale} size=\"xs\" type=\"secondary\" align=\"left\" />}</AttachmentDescription>}\n {(description !== undefined || statusCopy) && <AttachmentDescription clamp=\"none\">{description !== undefined ? description : <Text tag=\"span\" size=\"xs\" type={status === 'error' ? 'error' : 'secondary'}>{statusCopy}</Text>}{status === 'error' && error ? <> — <Text tag=\"span\" role=\"alert\" size=\"xs\" type=\"error\">{error}</Text></> : null}</AttachmentDescription>}\n {showProgress && <AttachmentProgress value={status === 'queued' && pct === null ? 0 : pct} aria-label={name} size=\"sm\" tone={status === 'queued' ? 'neutral' : 'primary'} />}\n </AttachmentContent>\n {(actions || onPreview || onDownload || onRemove) && <AttachmentActions>\n {onPreview && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly disabled={disabled} aria-label={strings.preview(name)} onClick={onPreview}><Eye aria-hidden=\"true\" className=\"size-icon-sm\" /></Button>}\n {onDownload && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly disabled={disabled} aria-label={strings.download(name)} onClick={onDownload}><Download aria-hidden=\"true\" className=\"size-icon-sm\" /></Button>}\n {onRemove && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly disabled={disabled} aria-label={strings.remove(name)} onClick={onRemove}><X aria-hidden=\"true\" className=\"size-icon-sm\" /></Button>}\n {actions}\n </AttachmentActions>}\n </>}\n {onOpen && <ButtonPrimitive type=\"button\" disabled={disabled} aria-label={strings.preview(name)} onClick={onOpen} className={`attachment--trigger ${interactionRecipes.nativeButtonReset} absolute inset-0 z-0 cursor-pointer rounded-inner outline-none ${focusRecipes.inset} disabled:cursor-not-allowed`} />}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,WAAW,uBAAuB5D,EAAmB,kBAAkB,kEAAkEF,EAAa,MAAM;EAAgC,CAAA,CACzS;;AACP,CAAC;AACD,EAAW,cAAc"}
|
|
1
|
+
{"version":3,"file":"attachment-BCpA4e7i.js","names":["_Fragment","Button","ButtonPrimitive","Text","focusRecipes","Progress","interactionRecipes","FileSize","ItemDescription","ItemActions","ItemContent","Item","ItemTitle","Fragment$1","defaultAttachmentStrings","name","icons","ImageIcon","FileText","AudioLines","Video","FileCode","Archive","getAttachmentKind","extension","AttachmentFileIcon","Icon","kind","AttachmentMedia","forwardRef","props","ItemMedia","cn","className","AttachmentContent","AttachmentTitle","AttachmentDescription","AttachmentActions","AttachmentProgress","Attachment","stringsProp","strings","useStrings","showProgress","status","pct","progress","statusCopy","density","layout","disabled","children","thumbnailUrl","media","meta","bytes","description","error","actions","onPreview","onDownload","onRemove","Button$1","Eye","Download","X","onOpen","Button"],"sources":["../src/components/base/attachment/attachment.types.ts","../src/components/base/attachment/attachment.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode, ReactElement } from 'react';\nimport type { StringsProp } from '../../../lib/strings';\nimport type { ItemDensity, ItemSize, ItemVariant } from '../item';\nexport type AttachmentKind = 'image' | 'document' | 'audio' | 'video' | 'code' | 'archive' | 'generic';\nexport type AttachmentStatus = 'queued' | 'uploading' | 'done' | 'error' | 'cancelled';\nexport interface AttachmentStrings {\n preview: (name: string) => string;\n download: (name: string) => string;\n remove: (name: string) => string;\n queued: string; uploading: string; done: string; error: string; cancelled: string;\n}\nexport const defaultAttachmentStrings: AttachmentStrings = {\n preview: name => `Preview ${name}`, download: name => `Download ${name}`, remove: name => `Remove ${name}`,\n queued: 'Queued', uploading: 'Uploading', done: 'Uploaded', error: 'Failed', cancelled: 'Cancelled',\n};\nexport interface AttachmentProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title' | 'onError'> {\n /** Display filename. Omit only when assembling children using Attachment anatomy. */\n name?: string;\n /** Caller-formatted metadata takes precedence over bytes. */\n meta?: ReactNode;\n bytes?: number;\n locale?: string;\n kind?: AttachmentKind;\n media?: ReactNode;\n thumbnailUrl?: string;\n status?: AttachmentStatus;\n /** Upload progress in the 0–100 range. A missing uploading value is indeterminate. */\n progress?: number | null;\n error?: ReactNode;\n /** Override generated status copy while preserving status/progress behavior. */\n description?: ReactNode;\n /** Additional sibling actions. */\n actions?: ReactNode;\n /** Open or preview the whole body, with independent sibling action buttons. Uses the preview string for its accessible name. */\n onOpen?: () => void;\n onPreview?: () => void;\n onDownload?: () => void;\n onRemove?: () => void;\n disabled?: boolean;\n /** Compact horizontal chip, full list row, or a media-first gallery tile. */\n layout?: 'compact' | 'list' | 'gallery';\n size?: ItemSize;\n density?: ItemDensity;\n variant?: ItemVariant;\n /** Element used for a list item without wrapping or inspecting children. */\n render?: ReactElement;\n strings?: StringsProp<AttachmentStrings>;\n}\n","import { forwardRef } from 'react';\nimport { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { Archive, AudioLines, Download, Eye, FileCode, FileText, ImageIcon, Video, X } from 'lucide-react';\nimport { Button } from '../buttons';\nimport { FileSize } from '../../primitives';\nimport { Text } from '../../typography';\nimport { Progress, type ProgressProps } from '../feedback';\nimport { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, type ItemMediaProps, type ItemContentProps, type ItemTitleProps, type ItemDescriptionProps, type ItemActionsProps } from '../item';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { defaultAttachmentStrings, type AttachmentProps, type AttachmentKind } from './attachment.types';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nconst icons = { image: ImageIcon, document: FileText, audio: AudioLines, video: Video, code: FileCode, archive: Archive, generic: FileText };\n/** Filename categorization is display-only and does not trust a file's extension for validation. */\nexport function getAttachmentKind(name: string): AttachmentKind {\n const extension = name.split('.').at(-1)?.toLowerCase();\n if (extension && ['png','jpg','jpeg','gif','webp','svg','avif'].includes(extension)) return 'image';\n if (extension && ['mp3','wav','ogg','flac','m4a'].includes(extension)) return 'audio';\n if (extension && ['mp4','webm','mov','avi'].includes(extension)) return 'video';\n if (extension && ['zip','gz','tar','rar','7z'].includes(extension)) return 'archive';\n if (extension && ['ts','tsx','js','jsx','css','html','json','py','sh','sql'].includes(extension)) return 'code';\n if (extension && ['pdf','doc','docx','txt','md','xls','xlsx','csv'].includes(extension)) return 'document';\n return 'generic';\n}\nexport function AttachmentFileIcon({ name, kind }: { name: string; kind?: AttachmentKind }) { const Icon = icons[kind ?? getAttachmentKind(name)]; return <Icon aria-hidden=\"true\" />; }\nexport const AttachmentMedia = forwardRef<HTMLDivElement, ItemMediaProps>(function AttachmentMedia({ className, ...props }, ref) { return <ItemMedia {...props} ref={ref} className={cn('attachment--media self-center group-has-data-[slot=item-description]/item:self-center', className)} />; });\nexport const AttachmentContent = forwardRef<HTMLDivElement, ItemContentProps>(function AttachmentContent({ className, ...props }, ref) { return <ItemContent {...props} ref={ref} className={cn('attachment--content w-full max-w-full', className)} />; });\nexport const AttachmentTitle = forwardRef<HTMLDivElement, ItemTitleProps>(function AttachmentTitle({ className, ...props }, ref) { return <ItemTitle {...props} ref={ref} className={cn('attachment--title block w-full truncate [&>span]:block [&>span]:min-w-0 [&>span]:truncate', className)} />; });\nexport const AttachmentDescription = forwardRef<HTMLParagraphElement, ItemDescriptionProps>(function AttachmentDescription({ className, ...props }, ref) { return <ItemDescription {...props} ref={ref} className={cn('attachment--description', className)} />; });\nexport const AttachmentActions = forwardRef<HTMLDivElement, ItemActionsProps>(function AttachmentActions({ className, ...props }, ref) { return <ItemActions {...props} ref={ref} className={cn('attachment--actions relative z-10', className)} />; });\nexport function AttachmentProgress({ className, ...props }: ProgressProps) { return <Progress {...props} className={cn('attachment--progress', className)} />; }\n/** File presentation; callbacks own preview, transfer and removal. Card framing belongs to the caller. */\nexport const Attachment = forwardRef<HTMLDivElement, AttachmentProps>(function Attachment({\n name = '', meta, bytes, locale, kind, media, thumbnailUrl, status, progress, error, description, actions, onOpen, onPreview, onDownload, onRemove,\n disabled = false, layout = 'list', size, density, variant = 'outline', render, strings: stringsProp, children, className, ...props\n}, ref) {\n const strings = useStrings(defaultAttachmentStrings, stringsProp);\n const showProgress = status === 'queued' || status === 'uploading';\n const pct = progress === null || progress === undefined ? null : Number.isFinite(progress) ? Math.max(0, Math.min(100, progress)) : 0;\n const statusCopy = status ? strings[status] : undefined;\n return <Item {...props} ref={ref} render={render} size={size} density={density ?? (layout === 'compact' ? 'compact' : 'default')} variant={variant} padding=\"default\" data-status={status} data-layout={layout} data-disabled={disabled || undefined} className={cn('attachment--component relative isolate min-w-0 max-w-full bg-card text-card-foreground', layout === 'gallery' ? 'flex-col items-stretch' : 'flex-nowrap', status === 'error' && 'border-destructive', className)}>\n {children ?? <>\n {/* A gallery tile owns one full-width media frame. The row thumbnail recipe (a\n size-scaled square) would otherwise shrink a gallery image to an icon. */}\n <AttachmentMedia variant={thumbnailUrl && layout !== 'gallery' ? 'image' : 'icon'} className={layout === 'gallery' ? 'aspect-video h-auto w-full overflow-hidden rounded-radius bg-muted text-muted-foreground' : undefined}>{media ?? (thumbnailUrl ? <img src={thumbnailUrl} alt=\"\" className=\"h-full w-full object-cover\" /> : <AttachmentFileIcon name={name} kind={kind} />)}</AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle title={name}>{name}</AttachmentTitle>\n {(meta !== undefined || bytes !== undefined) && <AttachmentDescription clamp={1}>{meta ?? <FileSize value={bytes} locale={locale} size=\"xs\" type=\"secondary\" align=\"left\" />}</AttachmentDescription>}\n {(description !== undefined || statusCopy) && <AttachmentDescription clamp=\"none\">{description !== undefined ? description : <Text tag=\"span\" size=\"xs\" type={status === 'error' ? 'error' : 'secondary'}>{statusCopy}</Text>}{status === 'error' && error ? <> — <Text tag=\"span\" role=\"alert\" size=\"xs\" type=\"error\">{error}</Text></> : null}</AttachmentDescription>}\n {showProgress && <AttachmentProgress value={status === 'queued' && pct === null ? 0 : pct} aria-label={name} size=\"sm\" tone={status === 'queued' ? 'neutral' : 'primary'} />}\n </AttachmentContent>\n {(actions || onPreview || onDownload || onRemove) && <AttachmentActions>\n {onPreview && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly disabled={disabled} aria-label={strings.preview(name)} onClick={onPreview}><Eye aria-hidden=\"true\" className=\"size-icon-sm\" /></Button>}\n {onDownload && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly disabled={disabled} aria-label={strings.download(name)} onClick={onDownload}><Download aria-hidden=\"true\" className=\"size-icon-sm\" /></Button>}\n {onRemove && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly disabled={disabled} aria-label={strings.remove(name)} onClick={onRemove}><X aria-hidden=\"true\" className=\"size-icon-sm\" /></Button>}\n {actions}\n </AttachmentActions>}\n </>}\n {onOpen && <ButtonPrimitive type=\"button\" disabled={disabled} aria-label={strings.preview(name)} onClick={onOpen} className={`attachment--trigger ${interactionRecipes.nativeButtonReset} absolute inset-0 z-0 cursor-pointer rounded-radius outline-none ${focusRecipes.inset} disabled:cursor-not-allowed`} />}\n </Item>;\n});\nAttachment.displayName = 'Attachment';\n"],"mappings":";;;;;;;;;;;;;;;AAWA,IAAac,IAA8C;CAC1D,UAAS,MAAQ,WAAWC;CAAQ,WAAU,MAAQ,YAAYA;CAAQ,SAAQ,MAAQ,UAAUA;CACpG,QAAQ;CAAU,WAAW;CAAa,MAAM;CAAY,OAAO;CAAU,WAAW;AACzF,GCAMC,IAAQ;CAAE,OAAOC;CAAW,UAAUC;CAAU,OAAOC;CAAY,OAAOC;CAAO,MAAMC;CAAU,SAASC;CAAS,SAASJ;AAAS;AAE3I,SAAgBK,EAAkB,GAA8B;CAC/D,IAAMC,IAAYT,EAAK,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,YAAY;CAOtD,OANIS,KAAa;EAAC;EAAM;E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KAAK,UAAA;KAAmB;KAAU,cAAYwC,EAAQ,QAAQ1B,CAAI;KAAG,SAAS4C;KAAW,UAAA,kBAACI,GAAD;MAAK,eAAY;MAAO,WAAU;KAAgB,CAAA;IAAS,CAAA;IACjOH,KAAc,kBAAC3D,GAAD;KAAQ,MAAK;KAAS,MAAK;KAAY,aAAY;KAAQ,MAAK;KAAK,UAAA;KAAmB;KAAU,cAAYwC,EAAQ,SAAS1B,CAAI;KAAG,SAAS6C;KAAY,UAAA,kBAACI,GAAD;MAAU,eAAY;MAAO,WAAU;KAAgB,CAAA;IAAS,CAAA;IACzOH,KAAY,kBAAC5D,GAAD;KAAQ,MAAK;KAAS,MAAK;KAAY,aAAY;KAAQ,MAAK;KAAK,UAAA;KAAmB;KAAU,cAAYwC,EAAQ,OAAO1B,CAAI;KAAG,SAAS8C;KAAU,UAAA,kBAACI,GAAD;MAAG,eAAY;MAAO,WAAU;KAAgB,CAAA;IAAS,CAAA;IAC5NP;GACiB,EAAA,CAAA;EAClB,EAAA,CAAA,GACDQ,KAAU,kBAAChE,GAAD;GAAiB,MAAK;GAAmB;GAAU,cAAYuC,EAAQ,QAAQ1B,CAAI;GAAG,SAASmD;GAAQ,WAAW,uBAAuB5D,EAAmB,kBAAkB,mEAAmEF,EAAa,MAAM;EAAgC,CAAA,CAC1S;;AACP,CAAC;AACD,EAAW,cAAc"}
|
|
@@ -1,28 +1,28 @@
|
|
|
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 { a as i, n as a } from "./buttons-
|
|
6
|
-
import { c as o, o as s, s as c } from "./typography-
|
|
4
|
+
import { t as r } from "./utils-DhuoqFy4.js";
|
|
5
|
+
import { a as i, n as a } from "./buttons-DeW0bQeK.js";
|
|
6
|
+
import { c as o, o as s, s as c } from "./typography-C7-YMW1S.js";
|
|
7
7
|
import { i as l } from "./text.styles-B64My8RZ.js";
|
|
8
8
|
import { t as u } from "./focus-recipes-B653VaLq.js";
|
|
9
|
-
import { r as d, t as f } from "./structure-
|
|
10
|
-
import { a as p, l as m, s as h } from "./smart-card-
|
|
11
|
-
import { t as g } from "./interaction-recipes-
|
|
12
|
-
import { c as _, i as v, o as y, r as b, t as x, u as S } from "./item-
|
|
13
|
-
import {
|
|
9
|
+
import { r as d, t as f } from "./structure-DZJ2wbAU.js";
|
|
10
|
+
import { a as p, l as m, s as h } from "./smart-card-B6vLxqa_.js";
|
|
11
|
+
import { t as g } from "./interaction-recipes-4wZ2tvfb.js";
|
|
12
|
+
import { c as _, i as v, o as y, r as b, t as x, u as S } from "./item-FfWnaYST.js";
|
|
13
|
+
import { f as C } from "./hooks-BitHSh-Y.js";
|
|
14
14
|
import { t as w } from "./container.recipes-D9t8MHR3.js";
|
|
15
15
|
import * as T from "react";
|
|
16
16
|
import { Fragment as ee, isValidElement as E, useMemo as D } from "react";
|
|
17
17
|
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
18
18
|
import { Globe2 as te, KeyRound as j } from "lucide-react";
|
|
19
19
|
//#region src/components/layout/auth/auth-card.tsx
|
|
20
|
-
function
|
|
20
|
+
function M({ surface: e = "card", eyebrow: t, title: n, description: i, headerEnd: a, banner: l, media: u, footer: d, children: g, className: _, headerClassName: v, mediaClassName: y, contentClassName: b, footerClassName: x, ...S }) {
|
|
21
21
|
let C = !!(t || n || i || a);
|
|
22
22
|
return /* @__PURE__ */ A(m, {
|
|
23
23
|
"data-slot": "auth-card",
|
|
24
24
|
"data-surface": e,
|
|
25
|
-
className: r("auth-card--component", "w-full min-w-0 gap-0 py-0", e === "card" ? "overflow-hidden rounded-
|
|
25
|
+
className: r("auth-card--component", "w-full min-w-0 gap-0 py-0", e === "card" ? "overflow-hidden rounded-surface border border-border bg-card text-card-foreground shadow-sm" : "border-0 bg-transparent text-inherit shadow-none", _),
|
|
26
26
|
...S,
|
|
27
27
|
children: [
|
|
28
28
|
!!u && /* @__PURE__ */ k("div", {
|
|
@@ -88,18 +88,18 @@ function ne({ surface: e = "card", eyebrow: t, title: n, description: i, headerE
|
|
|
88
88
|
}
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region src/components/layout/auth/auth-hooks.tsx
|
|
91
|
-
function
|
|
91
|
+
function N(e) {
|
|
92
92
|
return !!(e && typeof e == "object" && !E(e) && ("logo" in e || "label" in e || "description" in e || "href" in e));
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function P({ links: e = [], renderLink: t } = {}) {
|
|
95
95
|
let n = C({ renderLink: t });
|
|
96
96
|
return {
|
|
97
97
|
links: D(() => e.filter((e) => e.visible !== !1), [e]),
|
|
98
98
|
renderLink: n
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
let d = C({ renderLink: u }), f = D(() => r.filter((e) => e.visible !== !1), [r]), p = D(() => i.filter((e) => e.visible !== !1), [i]), m = D(() => a.filter((e) => e.visible !== !1), [a]), h = D(() => c.filter((e) => e.visible !== !1), [c]), g = !!(t && (
|
|
101
|
+
function ne({ variant: e = "card", brand: t, footer: n, footerLinks: r = [], policyLinks: i = [], languageLinks: a = [], languageSwitcher: o, postCard: s, socialProviders: c = [], splitPanel: l, renderLink: u } = {}) {
|
|
102
|
+
let d = C({ renderLink: u }), f = D(() => r.filter((e) => e.visible !== !1), [r]), p = D(() => i.filter((e) => e.visible !== !1), [i]), m = D(() => a.filter((e) => e.visible !== !1), [a]), h = D(() => c.filter((e) => e.visible !== !1), [c]), g = !!(t && (N(t) ? t.logo || t.label || t.description : t)), _ = !!(s || n || o || f.length > 0 || p.length > 0 || m.length > 0), v = !!l;
|
|
103
103
|
return {
|
|
104
104
|
variant: e === "split" && !v ? "card" : e,
|
|
105
105
|
hasBrand: g,
|
|
@@ -128,27 +128,27 @@ var F = {
|
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region src/components/layout/auth/auth-footer-links.tsx
|
|
130
130
|
function z({ links: e, leadingIcon: t, separator: i = "·", renderLink: a, className: s, strings: c, ...l }) {
|
|
131
|
-
let
|
|
131
|
+
let d = n(I, c), { links: f, renderLink: p } = P({
|
|
132
132
|
links: e,
|
|
133
133
|
renderLink: a
|
|
134
134
|
});
|
|
135
|
-
return
|
|
136
|
-
"aria-label": l["aria-label"] ??
|
|
135
|
+
return f.length === 0 ? null : /* @__PURE__ */ A("nav", {
|
|
136
|
+
"aria-label": l["aria-label"] ?? d.label,
|
|
137
137
|
className: r("auth-footer-links--component", "flex flex-wrap items-center justify-center gap-x-space-md gap-y-space-xs text-center", s),
|
|
138
138
|
...l,
|
|
139
139
|
children: [!!t && /* @__PURE__ */ k("span", {
|
|
140
140
|
className: "auth-footer-links--icon flex shrink-0 items-center text-muted-foreground",
|
|
141
141
|
"aria-hidden": "true",
|
|
142
142
|
children: t
|
|
143
|
-
}),
|
|
144
|
-
let n =
|
|
143
|
+
}), f.map((e, t) => {
|
|
144
|
+
let n = p({
|
|
145
145
|
href: e.href,
|
|
146
146
|
target: e.target,
|
|
147
147
|
rel: e.rel,
|
|
148
148
|
external: e.external,
|
|
149
149
|
disabled: e.disabled,
|
|
150
150
|
onClick: e.onClick,
|
|
151
|
-
className: r("auth-footer-links--item", "text-muted-foreground transition-colors hover:text-foreground", e.disabled && "pointer-events-none opacity-50"),
|
|
151
|
+
className: r("auth-footer-links--item", "text-muted-foreground transition-colors hover:text-foreground", !e.href && e.onClick && !e.disabled && u.text, e.disabled && "pointer-events-none opacity-50"),
|
|
152
152
|
children: /* @__PURE__ */ k(o, {
|
|
153
153
|
tag: "span",
|
|
154
154
|
size: "xs",
|
|
@@ -257,7 +257,7 @@ function G({ provider: e }) {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
function K({ provider: n, renderLink: s, className: c }) {
|
|
260
|
-
let { defaultScale: l } =
|
|
260
|
+
let { defaultScale: l } = t(), u = e(void 0, l), d = C({ renderLink: s }), f = /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(G, { provider: n }), /* @__PURE__ */ k(o, {
|
|
261
261
|
tag: "span",
|
|
262
262
|
className: "text-inherit",
|
|
263
263
|
children: n.label
|
|
@@ -328,7 +328,7 @@ function q({ eyebrow: e, title: t, description: n, media: i, features: a, footer
|
|
|
328
328
|
className: r("auth-split-panel--content", "min-h-full p-surface md:p-surface-lg", m),
|
|
329
329
|
children: [
|
|
330
330
|
!!i && /* @__PURE__ */ k("div", {
|
|
331
|
-
className: "auth-split-panel--media overflow-hidden rounded-
|
|
331
|
+
className: "auth-split-panel--media overflow-hidden rounded-surface border border-border/60 bg-card text-card-foreground",
|
|
332
332
|
children: i
|
|
333
333
|
}),
|
|
334
334
|
!!g && /* @__PURE__ */ A(f, {
|
|
@@ -416,7 +416,7 @@ function se(e) {
|
|
|
416
416
|
}
|
|
417
417
|
function ce({ brand: e, renderLink: t }) {
|
|
418
418
|
if (!e) return null;
|
|
419
|
-
if (!
|
|
419
|
+
if (!N(e)) return /* @__PURE__ */ k("div", {
|
|
420
420
|
className: "auth-shell--brand flex items-center justify-center",
|
|
421
421
|
children: e
|
|
422
422
|
});
|
|
@@ -434,8 +434,8 @@ function ce({ brand: e, renderLink: t }) {
|
|
|
434
434
|
function le(e) {
|
|
435
435
|
return e ? E(e) ? e : oe(e) ? /* @__PURE__ */ k(q, { ...e }) : null : null;
|
|
436
436
|
}
|
|
437
|
-
function J({ children: e, variant: t = "card", size: i = "md", align: a = "center", brand: s, eyebrow: c, title: l, description: u, headerEnd: d, banner: p, cardMedia: m, cardMediaClassName: h, cardFooter: g, postCard: _, footer: v, footerLinks: y, policyLinks: b, languageLinks: x, languageSwitcher: S, socialProviders: C, socialProvidersLayout: T = "stack", socialDivider: ee, splitPanel: E, splitSide: D = "left", splitMobile: O = "hidden", renderLink: j, className:
|
|
438
|
-
let G = n(F, U), { variant: K, hasBrand: ie, hasAfterCard: q, hasSplitPanel: oe, hasSocialProviders: se, renderLink: J, footerLinks: Y, policyLinks: X, languageLinks: Z, socialProviders: Q } =
|
|
437
|
+
function J({ children: e, variant: t = "card", size: i = "md", align: a = "center", brand: s, eyebrow: c, title: l, description: u, headerEnd: d, banner: p, cardMedia: m, cardMediaClassName: h, cardFooter: g, postCard: _, footer: v, footerLinks: y, policyLinks: b, languageLinks: x, languageSwitcher: S, socialProviders: C, socialProvidersLayout: T = "stack", socialDivider: ee, splitPanel: E, splitSide: D = "left", splitMobile: O = "hidden", renderLink: j, className: N, mainClassName: P, stackClassName: I, cardClassName: L, cardContentClassName: R, splitGridClassName: B, splitPanelClassName: V, footerClassName: H, strings: U, ...W }) {
|
|
438
|
+
let G = n(F, U), { variant: K, hasBrand: ie, hasAfterCard: q, hasSplitPanel: oe, hasSocialProviders: se, renderLink: J, footerLinks: Y, policyLinks: X, languageLinks: Z, socialProviders: Q } = ne({
|
|
439
439
|
variant: t,
|
|
440
440
|
brand: s,
|
|
441
441
|
footer: v,
|
|
@@ -447,10 +447,10 @@ function J({ children: e, variant: t = "card", size: i = "md", align: a = "cente
|
|
|
447
447
|
socialProviders: C,
|
|
448
448
|
splitPanel: E,
|
|
449
449
|
renderLink: j
|
|
450
|
-
}), ue = K === "split" && oe, de = le(E), $ = D === "left", fe = O === "stacked", pe = ie ? ce({
|
|
450
|
+
}), ue = K === "split" && oe, de = le(E), $ = D === "left", fe = O === "stacked", pe = r("auth-shell--split-panel", fe ? "block" : "hidden @5xl/auth-shell:block", fe && $ && "order-last @5xl/auth-shell:order-none", V), me = ie ? ce({
|
|
451
451
|
brand: s,
|
|
452
452
|
renderLink: J
|
|
453
|
-
}) : null,
|
|
453
|
+
}) : null, he = /* @__PURE__ */ k(f, {
|
|
454
454
|
render: /* @__PURE__ */ k("main", {}),
|
|
455
455
|
gap: "none",
|
|
456
456
|
align: a === "start" ? "start" : "center",
|
|
@@ -458,13 +458,13 @@ function J({ children: e, variant: t = "card", size: i = "md", align: a = "cente
|
|
|
458
458
|
className: r("auth-shell--main", w({
|
|
459
459
|
maxWidth: "full",
|
|
460
460
|
gutter: "md"
|
|
461
|
-
}), "min-h-svh py-surface-lg sm:px-surface-lg",
|
|
461
|
+
}), "min-h-svh py-surface-lg sm:px-surface-lg", P),
|
|
462
462
|
children: /* @__PURE__ */ A(f, {
|
|
463
463
|
gap: "xl",
|
|
464
464
|
className: r("auth-shell--stack", "w-full", ae[i], I),
|
|
465
465
|
children: [
|
|
466
|
-
|
|
467
|
-
/* @__PURE__ */ A(
|
|
466
|
+
me,
|
|
467
|
+
/* @__PURE__ */ A(M, {
|
|
468
468
|
surface: K === "bare" ? "bare" : "card",
|
|
469
469
|
eyebrow: c,
|
|
470
470
|
title: l,
|
|
@@ -551,18 +551,18 @@ function J({ children: e, variant: t = "card", size: i = "md", align: a = "cente
|
|
|
551
551
|
"data-variant": "split",
|
|
552
552
|
"data-split-side": D,
|
|
553
553
|
"data-split-mobile": O,
|
|
554
|
-
className: r("auth-shell--component", "@container/auth-shell min-h-svh bg-background text-foreground",
|
|
554
|
+
className: r("auth-shell--component", "@container/auth-shell min-h-svh bg-background text-foreground", N),
|
|
555
555
|
...W,
|
|
556
556
|
children: /* @__PURE__ */ A("div", {
|
|
557
|
-
className: r("auth-shell--split-grid min-h-svh @5xl/auth-shell:grid", $ ? "@5xl/auth-shell:grid-cols-[minmax(0,1fr)_minmax(24rem,34rem)]" : "@5xl/auth-shell:grid-cols-[minmax(24rem,34rem)_minmax(0,1fr)]", B),
|
|
557
|
+
className: r("auth-shell--split-grid flex min-h-svh flex-col @5xl/auth-shell:grid", $ ? "@5xl/auth-shell:grid-cols-[minmax(0,1fr)_minmax(24rem,34rem)]" : "@5xl/auth-shell:grid-cols-[minmax(24rem,34rem)_minmax(0,1fr)]", B),
|
|
558
558
|
children: [
|
|
559
559
|
!!$ && /* @__PURE__ */ k("div", {
|
|
560
|
-
className:
|
|
560
|
+
className: pe,
|
|
561
561
|
children: de
|
|
562
562
|
}),
|
|
563
|
-
|
|
563
|
+
he,
|
|
564
564
|
!$ && /* @__PURE__ */ k("div", {
|
|
565
|
-
className:
|
|
565
|
+
className: pe,
|
|
566
566
|
children: de
|
|
567
567
|
})
|
|
568
568
|
]
|
|
@@ -570,9 +570,9 @@ function J({ children: e, variant: t = "card", size: i = "md", align: a = "cente
|
|
|
570
570
|
}) : /* @__PURE__ */ k("div", {
|
|
571
571
|
"data-slot": "auth-shell",
|
|
572
572
|
"data-variant": K === "bare" ? "bare" : "card",
|
|
573
|
-
className: r("auth-shell--component", "@container/auth-shell min-h-svh bg-background text-foreground",
|
|
573
|
+
className: r("auth-shell--component", "@container/auth-shell min-h-svh bg-background text-foreground", N),
|
|
574
574
|
...W,
|
|
575
|
-
children:
|
|
575
|
+
children: he
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
578
|
//#endregion
|
|
@@ -646,13 +646,13 @@ function ue({ options: e = [], value: t, defaultValue: i, onValueChange: a, layo
|
|
|
646
646
|
tag: "span",
|
|
647
647
|
weight: "semibold",
|
|
648
648
|
lineHeight: "tight",
|
|
649
|
-
className: r("max-w-full whitespace-normal break-words text-inherit", C ? "text-center
|
|
649
|
+
className: r("max-w-full whitespace-normal break-words text-inherit", C ? "text-center @md/auth-method-switch:truncate @md/auth-method-switch:text-start" : "text-start"),
|
|
650
650
|
children: e.label
|
|
651
651
|
}), !!e.description && /* @__PURE__ */ k(o, {
|
|
652
652
|
tag: "span",
|
|
653
653
|
size: "xs",
|
|
654
654
|
lineHeight: C ? void 0 : "snug",
|
|
655
|
-
className: r("whitespace-normal break-words", C ? "hidden
|
|
655
|
+
className: r("whitespace-normal break-words text-muted-foreground", C ? "hidden @md/auth-method-switch:block @md/auth-method-switch:truncate" : "text-start"),
|
|
656
656
|
children: e.description
|
|
657
657
|
})]
|
|
658
658
|
})] });
|
|
@@ -660,16 +660,16 @@ function ue({ options: e = [], value: t, defaultValue: i, onValueChange: a, layo
|
|
|
660
660
|
type: "button",
|
|
661
661
|
"aria-pressed": t,
|
|
662
662
|
disabled: e.disabled,
|
|
663
|
-
className: r("auth-method-switch--option", `box-border m-0 inline-flex min-h-action-lg min-w-0 w-full cursor-pointer items-center justify-start gap-space-sm whitespace-normal rounded-
|
|
663
|
+
className: r("auth-method-switch--option", `box-border m-0 inline-flex min-h-action-lg min-w-0 w-full cursor-pointer items-center justify-start gap-space-sm whitespace-normal rounded-radius border px-control py-row-y-lg text-start outline-none transition-[color,background-color,border-color,box-shadow] ${u.frame} disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`, l({
|
|
664
664
|
type: null,
|
|
665
665
|
size: "sm",
|
|
666
666
|
weight: "medium",
|
|
667
667
|
align: null,
|
|
668
668
|
lineHeight: "none"
|
|
669
|
-
}),
|
|
669
|
+
}), C ? r("min-h-action justify-center border-0 px-control-sm py-row-y text-center @md/auth-method-switch:px-control @md/auth-method-switch:text-start", t ? g.segmentActive : `bg-transparent ${g.segmentInactive}`) : r("bg-background text-foreground", t ? "border-primary" : `border-border ${g.tileHover}`), t && "auth-method-switch--option-selected"),
|
|
670
670
|
onClick: () => S(e.id),
|
|
671
671
|
children: C ? /* @__PURE__ */ k("span", {
|
|
672
|
-
className: "auth-method-switch--option-inner flex w-full flex-col justify-center gap-space-xs
|
|
672
|
+
className: "auth-method-switch--option-inner flex w-full min-w-0 max-w-full flex-col justify-center gap-space-xs @md/auth-method-switch:w-auto @md/auth-method-switch:flex-row @md/auth-method-switch:justify-start @md/auth-method-switch:gap-space-md",
|
|
673
673
|
children: n
|
|
674
674
|
}) : /* @__PURE__ */ k(f, {
|
|
675
675
|
render: /* @__PURE__ */ k("span", {}),
|
|
@@ -683,7 +683,7 @@ function ue({ options: e = [], value: t, defaultValue: i, onValueChange: a, layo
|
|
|
683
683
|
});
|
|
684
684
|
return /* @__PURE__ */ A(f, {
|
|
685
685
|
gap: "lg",
|
|
686
|
-
className: r("auth-method-switch--component", p),
|
|
686
|
+
className: r("auth-method-switch--component @container/auth-method-switch", p),
|
|
687
687
|
...y,
|
|
688
688
|
children: [c !== null && c !== !1 && /* @__PURE__ */ A("div", {
|
|
689
689
|
className: "auth-method-switch--divider flex items-center gap-space-lg",
|
|
@@ -707,23 +707,20 @@ function ue({ options: e = [], value: t, defaultValue: i, onValueChange: a, layo
|
|
|
707
707
|
role: "group",
|
|
708
708
|
"aria-label": v ?? _.label,
|
|
709
709
|
"data-layout": s,
|
|
710
|
-
className: "auth-method-switch--options grid min-w-0 grid-cols-[repeat(auto-fit,minmax(0,1fr))] gap-space-xs rounded-
|
|
710
|
+
className: "auth-method-switch--options grid min-w-0 grid-cols-[repeat(auto-fit,minmax(0,1fr))] gap-space-xs rounded-radius border border-border bg-muted p-space-xs",
|
|
711
711
|
children: w
|
|
712
712
|
}) : /* @__PURE__ */ k(d, {
|
|
713
|
-
columns:
|
|
714
|
-
base: 1,
|
|
715
|
-
sm: 2
|
|
716
|
-
} : 1,
|
|
713
|
+
columns: 1,
|
|
717
714
|
gap: "md",
|
|
718
715
|
role: "group",
|
|
719
716
|
"aria-label": v ?? _.label,
|
|
720
717
|
"data-layout": s,
|
|
721
|
-
className: "auth-method-switch--options",
|
|
718
|
+
className: r("auth-method-switch--options", s === "grid" && "@md/auth-method-switch:grid-cols-2"),
|
|
722
719
|
children: w
|
|
723
720
|
})]
|
|
724
721
|
});
|
|
725
722
|
}
|
|
726
723
|
//#endregion
|
|
727
|
-
export {
|
|
724
|
+
export { M as _, J as a, re as c, R as d, F as f, ne as g, P as h, X as i, z as l, N as m, Q as n, q as o, L as p, Y as r, K as s, ue as t, I as u };
|
|
728
725
|
|
|
729
|
-
//# sourceMappingURL=auth-
|
|
726
|
+
//# sourceMappingURL=auth-B0girIk_.js.map
|