themelia-react-ui 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +185 -0
- package/README.md +168 -36
- package/dist/{accordion-Cjb6sx0G.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/action-menu-Dr8K-ghE.js +284 -0
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-P-aVJisu.js} +42 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-C58tQcBy.js} +387 -350
- package/dist/ai-artifact-C58tQcBy.js.map +1 -0
- package/dist/app-shell-B_IuNWOo.js +321 -0
- package/dist/app-shell-B_IuNWOo.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-BxDfL2mw.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-DTkkshS8.js} +44 -47
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DAPlDvhJ.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-HpFqoqSY.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-HpFqoqSY.js.map → badge-xIiV_E7f.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +12 -12
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +7 -7
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +36 -36
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +23 -23
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +230 -216
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +326 -307
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1247 -1169
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-DPZekJFu.js → buttons-BedGfygC.js} +16 -16
- package/dist/buttons-BedGfygC.js.map +1 -0
- package/dist/cards-rNX1M4Xn.js +69 -0
- package/dist/cards-rNX1M4Xn.js.map +1 -0
- package/dist/cascader-B1MiqkBq.js +439 -0
- package/dist/cascader-B1MiqkBq.js.map +1 -0
- package/dist/chart-Darg_0Kv.js +162 -0
- package/dist/chart-Darg_0Kv.js.map +1 -0
- package/dist/{checkbox-AWIhNhmo.js → checkbox-fflqmODR.js} +9 -5
- package/dist/checkbox-fflqmODR.js.map +1 -0
- package/dist/choice-inputs-zUgBZfE4.js +777 -0
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-BzmM9Eig.js} +9 -9
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-C-_l4hpy.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-gDh1v6O4.js.map} +1 -1
- package/dist/combobox-BEx0vJgF.js +362 -0
- package/dist/combobox-BEx0vJgF.js.map +1 -0
- package/dist/{combobox-Dxo2fAYQ.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-C25VMRII.js → command-CrlPIL6m.js} +12 -12
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-DD0DUPwJ.js → comments-Dmpp0YIc.js} +380 -379
- package/dist/comments-Dmpp0YIc.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +9 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +16 -7
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +11 -7
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +11 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +13 -4
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +27 -5
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +3 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/features/activities/activities.types.d.ts +8 -2
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -0
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +1 -1
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +21 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
- package/dist/components/features/media-library/media-library.types.d.ts +14 -4
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +43 -6
- package/dist/components/features/resource/resource.d.ts +5 -1
- package/dist/components/features/resource/resource.types.d.ts +12 -1
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +6 -6
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +9 -2
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +36 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +5 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +48 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CIxwbZt5.js +112 -0
- package/dist/containers-CIxwbZt5.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-ClBuk_UK.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-BdgCAw8T.js} +277 -285
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-RlIzKom_.js} +501 -480
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/date-pickers-DY-CpXS1.js +179 -0
- package/dist/date-pickers-DY-CpXS1.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-hAc1HjpI.js.map → display-KsZLw9Ov.js.map} +1 -1
- package/dist/dropdown-menu-CLs8Lihj.js +194 -0
- package/dist/dropdown-menu-CLs8Lihj.js.map +1 -0
- package/dist/features/activities.js +302 -253
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +15 -14
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +249 -249
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +264 -269
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +167 -138
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +6 -7
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +269 -260
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +827 -777
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1246 -1169
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +13 -13
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +127 -123
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +95 -96
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-Dm4izqFn.js} +81 -80
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-DJVAveHA.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CwH9y77i.js → form-field-BriWAXyg.js} +14 -8
- package/dist/form-field-BriWAXyg.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/forms-C0RGnJTe.js +216 -0
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-DIhghX1Q.js} +295 -291
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-DMMxG__r.js} +67 -63
- package/dist/header-DMMxG__r.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/input-CvyDQlY7.js +289 -0
- package/dist/input-CvyDQlY7.js.map +1 -0
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/item-DjCcM18E.js +277 -0
- package/dist/item-DjCcM18E.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +11 -11
- package/dist/lib/affordance-geometry.generated.d.ts +41 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/token-merge.generated.d.ts +13 -10
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-CGlEJ15c.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/metadata-list-C3MkU-Om.js +443 -0
- package/dist/metadata-list-C3MkU-Om.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-C90-oQFq.js +255 -0
- package/dist/navigation-C90-oQFq.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-DbV1Dija.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-CRU3kGuk.js.map} +1 -1
- package/dist/overflow-tab-bar-IVFVQFV6.js +172 -0
- package/dist/overflow-tab-bar-IVFVQFV6.js.map +1 -0
- package/dist/overlays-BSgCtM2v.js +1013 -0
- package/dist/overlays-BSgCtM2v.js.map +1 -0
- package/dist/page-DUUKDAjo.js +331 -0
- package/dist/page-DUUKDAjo.js.map +1 -0
- package/dist/page-header-commands-7P3sfE9u.js +193 -0
- package/dist/page-header-commands-7P3sfE9u.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-BL25hu2s.js.map → pagination-CgCjElfu.js.map} +1 -1
- package/dist/popover-B85RenIl.js +201 -0
- package/dist/popover-B85RenIl.js.map +1 -0
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-DlnQ2zlR.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DdiEp0rd.js} +18 -11
- package/dist/popover.recipes-DdiEp0rd.js.map +1 -0
- package/dist/portal-recipes-BpsV_iRw.js +9 -0
- package/dist/portal-recipes-BpsV_iRw.js.map +1 -0
- package/dist/{primitives-BFK08r9M.js → primitives-ByWgGUgt.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-B1VnCT0K.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-Dth5E882.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-laT3tpBT.js} +33 -29
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-Bar5wiSo.js +167 -0
- package/dist/settings-Bar5wiSo.js.map +1 -0
- package/dist/sheet-BGPERY55.js +250 -0
- package/dist/sheet-BGPERY55.js.map +1 -0
- package/dist/sidebar-D-JYMMbY.js +686 -0
- package/dist/sidebar-D-JYMMbY.js.map +1 -0
- package/dist/sidebar-f9gRWXIR.js +1001 -0
- package/dist/sidebar-f9gRWXIR.js.map +1 -0
- package/dist/skeleton-BapcJd9C.js +265 -0
- package/dist/skeleton-BapcJd9C.js.map +1 -0
- package/dist/smart-card-CW0hjetE.js +617 -0
- package/dist/smart-card-CW0hjetE.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-DuxKl954.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-CDocW5D1.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-B1culiSK.js} +107 -104
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +192 -149
- package/dist/{timelines-CwM_9IhD.js → timelines-D3Sl9ueq.js} +13 -12
- package/dist/timelines-D3Sl9ueq.js.map +1 -0
- package/dist/tooltip-8wz5S_Zr.js +113 -0
- package/dist/tooltip-8wz5S_Zr.js.map +1 -0
- package/dist/{tree-WnKQzwbq.js → tree-CzUJHnFs.js} +9 -9
- package/dist/{tree-WnKQzwbq.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-BQnine1k.js +117 -0
- package/dist/typography-BQnine1k.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-CXyxmQBP.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-Boscubn9.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-BhO5eqkX.js → usage-card-BeSLY0i0.js} +145 -137
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-B6kKb8jB.js} +303 -144
- package/dist/utils-B6kKb8jB.js.map +1 -0
- package/dist/value-inputs-skdVB2zh.js +980 -0
- package/dist/value-inputs-skdVB2zh.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/workspace-DHeHv0qw.js +411 -0
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +15 -129
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +74 -13
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +88 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +105 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +23 -11
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +325201 -0
- package/docs/consumer-skill/references/composition-mapping.md +106 -0
- package/docs/consumer-skill/references/composition.md +198 -46
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +43 -9
- package/docs/consumer-skill/references/discovery.md +109 -8
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +51 -36
- package/docs/consumer-skill/references/integration.md +41 -2
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +4390 -475
- package/docs/consumer-skill/references/review.md +47 -5
- package/docs/consumer-skill/references/rhf-workflows.md +93 -0
- package/docs/consumer-skill/references/screen-archetypes.md +34 -0
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +25 -27
- package/docs/consumer-skill/references/tokens.json +20 -11
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +9 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +254 -0
- package/docs/consumer-skill/scripts/discovery.mjs +96 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +193 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +111 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +31 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +34 -0
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +15 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +42 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/accordion-Cjb6sx0G.js.map +0 -1
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js +0 -236
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/auth-BGua8ouh.js.map +0 -1
- package/dist/avatar-DAPlDvhJ.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-DnUJ21NQ.js.map +0 -1
- package/dist/button-DVzspB_G.js.map +0 -1
- package/dist/buttons-DPZekJFu.js.map +0 -1
- package/dist/cards-BaBZR-AU.js +0 -68
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/chart-ZOYyK2xG.js +0 -155
- package/dist/chart-ZOYyK2xG.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js +0 -770
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/code-block-DeneBJR_.js.map +0 -1
- package/dist/combobox-DaHESuiL.js +0 -355
- package/dist/combobox-DaHESuiL.js.map +0 -1
- package/dist/combobox-Dxo2fAYQ.js.map +0 -1
- package/dist/command-C25VMRII.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/dropdown-menu-Cl4X7L5S.js +0 -193
- package/dist/dropdown-menu-Cl4X7L5S.js.map +0 -1
- package/dist/feedback-BYIhtitP.js.map +0 -1
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +0 -1
- package/dist/filters-DJVAveHA.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/form-sizing-BdP_Mf5p.js.map +0 -1
- package/dist/forms-B9G_xwzi.js +0 -194
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/header-BSfIEWbI.js.map +0 -1
- package/dist/hooks-ClH9thn4.js.map +0 -1
- package/dist/input-CZw8iU99.js +0 -21
- package/dist/input-CZw8iU99.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/message-DZ_ruyUV.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-Bnotn4AQ.js +0 -145
- package/dist/navigation-Bnotn4AQ.js.map +0 -1
- package/dist/navigation-BzhHI3lo.js.map +0 -1
- package/dist/navigation-row-recipes-BFLCk_Aq.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js +0 -282
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js +0 -1003
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/popover-gnTOhbFM.js +0 -198
- package/dist/popover-gnTOhbFM.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-BVSOH3Xo.js.map +0 -1
- package/dist/rich-text-editor-cRLC-eBK.js.map +0 -1
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/sheet-ijlsjq-n.js +0 -213
- package/dist/sheet-ijlsjq-n.js.map +0 -1
- package/dist/sidebar-Db6gkh3U.js +0 -619
- package/dist/sidebar-Db6gkh3U.js.map +0 -1
- package/dist/sidebar-DkTO4VTO.js +0 -512
- package/dist/sidebar-DkTO4VTO.js.map +0 -1
- package/dist/skeleton-Byjnt7qr.js +0 -264
- package/dist/skeleton-Byjnt7qr.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/table-BweFy_P9.js.map +0 -1
- package/dist/tabs-CDocW5D1.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-CwM_9IhD.js.map +0 -1
- package/dist/tooltip-yiRJUFjp.js +0 -111
- package/dist/tooltip-yiRJUFjp.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js +0 -136
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/upload-CXyxmQBP.js.map +0 -1
- package/dist/upload-queue-Boscubn9.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { i as e } from "./ui-provider-C-74NVLc.js";
|
|
3
|
+
import { t } from "./utils-B6kKb8jB.js";
|
|
4
|
+
import { c as n } from "./typography-BQnine1k.js";
|
|
5
|
+
import { t as r } from "./anchored-positioning-DPnKTvNs.js";
|
|
6
|
+
import { t as i } from "./portal-recipes-BpsV_iRw.js";
|
|
7
|
+
import { t as a } from "./motion-recipes-DitYv6P2.js";
|
|
8
|
+
import { t as o } from "./slot-CLF9kLrS.js";
|
|
9
|
+
import { t as s } from "./structure-DuxKl954.js";
|
|
10
|
+
import { a as c } from "./surface-recipes-BKRVW8Os.js";
|
|
11
|
+
import { a as l, r as u } from "./popover.recipes-DdiEp0rd.js";
|
|
12
|
+
import { t as d } from "./use-popup-focus-recovery-C0QPvgOR.js";
|
|
13
|
+
import * as f from "react";
|
|
14
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
15
|
+
import { Popover as h } from "@base-ui/react/popover";
|
|
16
|
+
//#region src/components/ui/popover.tsx
|
|
17
|
+
function g({ ...e }) {
|
|
18
|
+
return /* @__PURE__ */ p(h.Root, {
|
|
19
|
+
"data-slot": "popover",
|
|
20
|
+
...e
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function _({ asChild: e = !1, nativeButton: t, render: n, children: r, ...i }) {
|
|
24
|
+
let a = e ? /* @__PURE__ */ p(o, {}) : void 0, s = typeof n == "function" ? ((e, t) => {
|
|
25
|
+
let { nativeButton: r, ...i } = e;
|
|
26
|
+
return n(i, t);
|
|
27
|
+
}) : n, c = !0;
|
|
28
|
+
e && f.isValidElement(r) && (c = typeof r.type == "string" ? r.type === "button" : !("href" in (r.props ?? {})));
|
|
29
|
+
let l = t ?? (!e || c);
|
|
30
|
+
return /* @__PURE__ */ p(h.Trigger, {
|
|
31
|
+
"data-slot": "popover-trigger",
|
|
32
|
+
render: a ?? s,
|
|
33
|
+
nativeButton: l,
|
|
34
|
+
...i,
|
|
35
|
+
children: r
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function v({ asChild: e = !1, ...t }) {
|
|
39
|
+
return e ? /* @__PURE__ */ p(o, { ...t }) : /* @__PURE__ */ p("span", {
|
|
40
|
+
"data-slot": "popover-anchor",
|
|
41
|
+
...t
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function y({ className: n, container: o, anchor: s, align: c = "center", alignOffset: l = 0, side: u = "bottom", sideOffset: m = 4, disablePortal: g = !1, positionMethod: _ = g ? "absolute" : r, onOpenAutoFocus: v, onInteractOutside: y, onFocusCapture: b, ...x }) {
|
|
45
|
+
let S = e(o), C = d(b), [w, T] = f.useState(null), E = /* @__PURE__ */ p(h.Positioner, {
|
|
46
|
+
anchor: s,
|
|
47
|
+
positionMethod: _,
|
|
48
|
+
align: c,
|
|
49
|
+
alignOffset: l,
|
|
50
|
+
side: u,
|
|
51
|
+
sideOffset: m,
|
|
52
|
+
className: "isolate z-50",
|
|
53
|
+
children: /* @__PURE__ */ p(h.Popup, {
|
|
54
|
+
"data-slot": "popover-content",
|
|
55
|
+
className: t(a.popup, "bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-space-xl rounded-surface p-surface text-sm shadow-md ring-1 z-50 w-72 origin-(--transform-origin) outline-hidden", n),
|
|
56
|
+
...x,
|
|
57
|
+
onFocusCapture: C
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
return g ? /* @__PURE__ */ p("div", {
|
|
61
|
+
"data-popover-inline-host": "",
|
|
62
|
+
className: "contents",
|
|
63
|
+
ref: T,
|
|
64
|
+
children: /* @__PURE__ */ p(h.Portal, {
|
|
65
|
+
container: w,
|
|
66
|
+
className: i(),
|
|
67
|
+
children: E
|
|
68
|
+
})
|
|
69
|
+
}) : /* @__PURE__ */ p(h.Portal, {
|
|
70
|
+
container: S,
|
|
71
|
+
className: i(),
|
|
72
|
+
children: E
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function b({ className: e, ...n }) {
|
|
76
|
+
return /* @__PURE__ */ p("div", {
|
|
77
|
+
"data-slot": "popover-header",
|
|
78
|
+
className: t("flex flex-col text-sm", e),
|
|
79
|
+
...n
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function x({ className: e, ...n }) {
|
|
83
|
+
return /* @__PURE__ */ p(h.Title, {
|
|
84
|
+
"data-slot": "popover-title",
|
|
85
|
+
className: t("font-medium", e),
|
|
86
|
+
...n
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function S({ className: e, ...n }) {
|
|
90
|
+
return /* @__PURE__ */ p(h.Description, {
|
|
91
|
+
"data-slot": "popover-description",
|
|
92
|
+
className: t("text-muted-foreground", e),
|
|
93
|
+
...n
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/components/base/popover/popover.tsx
|
|
98
|
+
function C(e) {
|
|
99
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
100
|
+
}
|
|
101
|
+
var w = f.createContext({
|
|
102
|
+
type: "display",
|
|
103
|
+
flush: !1,
|
|
104
|
+
regionOwned: !1
|
|
105
|
+
});
|
|
106
|
+
function T({ className: e, sideOffset: n = 6, inset: r, type: i, style: a, ...o }) {
|
|
107
|
+
let s = i ?? (r === "compact" ? "menu" : "display");
|
|
108
|
+
return /* @__PURE__ */ p(w.Provider, {
|
|
109
|
+
value: {
|
|
110
|
+
type: s,
|
|
111
|
+
flush: r === "flush",
|
|
112
|
+
regionOwned: !1
|
|
113
|
+
},
|
|
114
|
+
children: /* @__PURE__ */ p(y, {
|
|
115
|
+
"data-surface-type": s,
|
|
116
|
+
sideOffset: n,
|
|
117
|
+
className: t("popover--component", "gap-space-md max-h-[min(var(--available-height),calc(100dvh-2rem))] overflow-y-auto overscroll-contain", u.surface, s === "display" && r === "compact" ? u.displayCompact : l[r ?? (s === "menu" ? "compact" : "default")], e),
|
|
118
|
+
style: a,
|
|
119
|
+
...o
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function E({ className: e, children: n, start: r, textGap: i, ...a }) {
|
|
124
|
+
let o = f.useContext(w), l = i ?? (o.type === "menu" ? "dense" : "normal"), d = o.flush && !o.regionOwned, h = o.type === "menu" && !o.regionOwned, g = r != null && r !== !1;
|
|
125
|
+
return /* @__PURE__ */ p(b, {
|
|
126
|
+
className: t("popover-header--component", l === "dense" ? "gap-dense" : "gap-normal", d && (o.type === "menu" ? u.menuRegion : u.display), !d && h && "py-row-y", g && "flex-row items-center gap-space-md", d && c.anchored.header, e),
|
|
127
|
+
...a,
|
|
128
|
+
children: /* @__PURE__ */ m(w.Provider, {
|
|
129
|
+
value: {
|
|
130
|
+
...o,
|
|
131
|
+
regionOwned: !0
|
|
132
|
+
},
|
|
133
|
+
children: [r, /* @__PURE__ */ p(s, {
|
|
134
|
+
gap: l,
|
|
135
|
+
className: t("popover-header--body min-w-0 flex-1", h && !g && u.menuCopyInset),
|
|
136
|
+
children: n
|
|
137
|
+
})]
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function D({ children: e, className: r, ...i }) {
|
|
142
|
+
let a = f.useContext(w).type === "menu";
|
|
143
|
+
return /* @__PURE__ */ p(x, {
|
|
144
|
+
className: t("popover-title--component", C(e) && "leading-none", r),
|
|
145
|
+
...i,
|
|
146
|
+
children: C(e) ? /* @__PURE__ */ p(n, {
|
|
147
|
+
tag: "span",
|
|
148
|
+
type: "inherit",
|
|
149
|
+
size: a ? void 0 : "base",
|
|
150
|
+
weight: "semibold",
|
|
151
|
+
lineHeight: "snug",
|
|
152
|
+
className: "popover-title--text",
|
|
153
|
+
children: e
|
|
154
|
+
}) : e
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function O({ children: e, className: r, ...i }) {
|
|
158
|
+
let a = f.useContext(w).type === "menu";
|
|
159
|
+
return /* @__PURE__ */ p(S, {
|
|
160
|
+
className: t("popover-description--component", C(e) && "leading-none", r),
|
|
161
|
+
...i,
|
|
162
|
+
children: C(e) ? /* @__PURE__ */ p(n, {
|
|
163
|
+
tag: "span",
|
|
164
|
+
type: "secondary",
|
|
165
|
+
size: a ? "xs" : void 0,
|
|
166
|
+
lineHeight: a ? "normal" : "relaxed",
|
|
167
|
+
className: "popover-description--text",
|
|
168
|
+
children: e
|
|
169
|
+
}) : e
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function k({ className: e, children: r, caption: i, ...a }) {
|
|
173
|
+
let o = f.useContext(w), l = i == null && C(r), d = i ?? (l ? r : void 0);
|
|
174
|
+
return /* @__PURE__ */ p(s, {
|
|
175
|
+
direction: "horizontal",
|
|
176
|
+
gap: "sm",
|
|
177
|
+
justify: "end",
|
|
178
|
+
wrap: !0,
|
|
179
|
+
className: t("popover-footer--component pt-space-sm", c.anchored.footer, o.flush && !o.regionOwned && (o.type === "menu" ? u.menuRegion : u.display), e),
|
|
180
|
+
...a,
|
|
181
|
+
children: /* @__PURE__ */ m(w.Provider, {
|
|
182
|
+
value: {
|
|
183
|
+
...o,
|
|
184
|
+
regionOwned: !0
|
|
185
|
+
},
|
|
186
|
+
children: [d != null && /* @__PURE__ */ p("div", {
|
|
187
|
+
className: t("popover-footer--caption me-auto min-w-0 max-w-full", o.type === "menu" && !o.regionOwned && u.menuCopyInset),
|
|
188
|
+
children: C(d) ? /* @__PURE__ */ p(n, {
|
|
189
|
+
tag: "span",
|
|
190
|
+
size: "xs",
|
|
191
|
+
type: "secondary",
|
|
192
|
+
children: d
|
|
193
|
+
}) : d
|
|
194
|
+
}), !l && r]
|
|
195
|
+
})
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
export { D as a, _ as c, E as i, O as n, g as o, k as r, v as s, T as t };
|
|
200
|
+
|
|
201
|
+
//# sourceMappingURL=popover-B85RenIl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover-B85RenIl.js","names":["Popover","PopoverPrimitive","React","PopoverContent","PopoverHeader","PopoverTitle","PopoverDescription","React","PopoverContentPrimitive","PopoverHeaderPrimitive","PopoverTitlePrimitive","PopoverDescriptionPrimitive","useThemePortalContainer","Text","anchoredPositionMethod","portalClassName","motionRecipes","Slot","Stack","surfaceDividerRecipes","surfaceInsetClasses","popoverRecipes","usePopupFocusRecovery","React$1","Popover$1","props","Popover","PopoverTrigger","slotRender","asChild","safeRender","render","_nativeButton","rest","renderProps","state","inferredNativeButton","children","resolvedNativeButton","nativeButton","PopoverAnchor","PopoverContent$1","disablePortal","resolvedContainer","container","recoverFocus","onFocusCapture","inlineHost","setInlineHost","content","cn","className","PopoverHeader$1","PopoverTitle$1","PopoverDescription$1","isSimpleText","value","PopoverSurfaceContext","PopoverContent","resolvedType","type","inset","PopoverHeader","surface","copyGap","textGap","band","menu","hasStart","start","PopoverTitle","compact","PopoverDescription","PopoverFooter","childrenAsCaption","caption"],"sources":["../src/components/ui/popover.tsx","../src/components/base/popover/popover.tsx"],"sourcesContent":["import { anchoredPositionMethod } from '../../lib/anchored-positioning';\nimport { portalClassName } from '../../lib/portal-recipes';\nimport { usePopupFocusRecovery } from '../../lib/use-popup-focus-recovery';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport * as React from \"react\"\n\nimport { Slot } from \"./slot\"\nimport { cn } from \"../../lib/utils\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n asChild = false,\n nativeButton,\n render,\n children,\n ...props\n}: PopoverPrimitive.Trigger.Props & { asChild?: boolean; nativeButton?: boolean }) {\n const slotRender = asChild ? <Slot /> : undefined\n const safeRender: PopoverPrimitive.Trigger.Props[\"render\"] = typeof render === \"function\"\n ? ((renderProps, state) => {\n const { nativeButton: _nativeButton, ...rest } = renderProps as Record<string, unknown>\n void _nativeButton\n return render(rest as typeof renderProps, state)\n })\n : render\n let inferredNativeButton = true\n if (asChild && React.isValidElement(children)) {\n if (typeof children.type === \"string\") {\n inferredNativeButton = children.type === \"button\"\n } else {\n const childProps = (children.props ?? {}) as Record<string, unknown>\n inferredNativeButton = !(\"href\" in childProps)\n }\n }\n const resolvedNativeButton = nativeButton ?? (asChild ? inferredNativeButton : true)\n return (\n <PopoverPrimitive.Trigger\n data-slot=\"popover-trigger\"\n render={slotRender ?? safeRender}\n nativeButton={resolvedNativeButton}\n {...props}\n >\n {children}\n </PopoverPrimitive.Trigger>\n )\n}\n\nfunction PopoverAnchor({\n asChild = false,\n ...props\n}: React.ComponentPropsWithoutRef<\"span\"> & { asChild?: boolean }) {\n if (asChild) {\n return <Slot {...props} />\n }\n\n return <span data-slot=\"popover-anchor\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n container,\n anchor,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n disablePortal = false,\n positionMethod = disablePortal ? \"absolute\" : anchoredPositionMethod,\n onOpenAutoFocus,\n onInteractOutside,\n onFocusCapture,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"anchor\" | \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"positionMethod\"\n > & {\n disablePortal?: boolean\n onOpenAutoFocus?: (event: Event) => void\n onInteractOutside?: (event: Event) => void\n } & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n const recoverFocus = usePopupFocusRecovery(onFocusCapture)\n const [inlineHost, setInlineHost] = React.useState<HTMLDivElement | null>(null)\n void onOpenAutoFocus\n void onInteractOutside\n\n const content = (\n <PopoverPrimitive.Positioner\n anchor={anchor}\n positionMethod={positionMethod}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n motionRecipes.popup,\n \"bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-space-xl rounded-surface p-surface text-sm shadow-md ring-1 z-50 w-72 origin-(--transform-origin) outline-hidden\",\n className\n )}\n {...props}\n onFocusCapture={recoverFocus}\n />\n </PopoverPrimitive.Positioner>\n )\n\n if (disablePortal) {\n // Base UI requires Portal context; a local host preserves inline DOM locality.\n return <div data-popover-inline-host=\"\" className=\"contents\" ref={setInlineHost}>\n <PopoverPrimitive.Portal container={inlineHost} className={portalClassName()}>{content}</PopoverPrimitive.Portal>\n </div>\n }\n\n return <PopoverPrimitive.Portal container={resolvedContainer} className={portalClassName()}>{content}</PopoverPrimitive.Portal>\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverAnchor,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n","import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\n/**\n * Popover — public wrapper around the internal Base UI popover implementation.\n *\n * What this layer adds on top of the primitive:\n * - Library-default `sideOffset` (6px) and an explicit inset contract:\n * card/multi-content popovers use `default`, item collections use\n * `compact`, and mixed region-owned compositions use `flush`.\n * - A consistent shadow + border treatment matching the rest of the\n * library (one semantic border, no extra primitive ring).\n * - Wraps the primitive parts with stable DOM hooks and adds a separated\n * footer region while preserving the compound-component pattern:\n * `<Popover>`, `<PopoverTrigger>`, `<PopoverContent>` exactly as\n * they would with the primitive.\n *\n * Use the shared inset role for padding; className owns placement. Override\n * `--surface-x` / `--surface-y` / `--space-scale` on a wrapper for surface-wide\n * density tweaks.\n */\nimport * as React from 'react';\n\nimport {\n\tPopover as PopoverPrimitive,\n\tPopoverAnchor,\n\tPopoverContent as PopoverContentPrimitive,\n\tPopoverDescription as PopoverDescriptionPrimitive,\n\tPopoverHeader as PopoverHeaderPrimitive,\n\tPopoverTitle as PopoverTitlePrimitive,\n\tPopoverTrigger,\n} from '../../ui/popover';\nimport { Text } from '../../typography';\nimport { Stack, type TextGap } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { popoverRecipes, surfaceInsetClasses, type PopoverContentType } from './popover.recipes';\nexport type { PopoverContentType } from './popover.recipes';\n\nfunction isSimpleText(value: React.ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\ntype PopoverContentBaseProps = React.ComponentProps<typeof PopoverContentPrimitive>;\n\nexport type PopoverContentInset = 'default' | 'compact' | 'flush';\n\nexport type PopoverContentProps = PopoverContentBaseProps & {\n\t/**\n\t * Surface inset role. `default` is for card-like or multi-content popovers,\n\t * `compact` for item collections (or the small surface tier with explicit\n\t * type=\"display\"), and `flush` when child regions own their padding.\n\t */\n\tinset?: PopoverContentInset;\n\t/** Anatomy role; supplies the inferred inset only when inset is omitted. */\n\ttype?: PopoverContentType;\n};\n\nconst PopoverSurfaceContext = React.createContext({ type: 'display' as PopoverContentType, flush: false, regionOwned: false });\n\n/** Anchored content surface with a semantic inset role and package popover chrome. */\nfunction PopoverContent({\n\tclassName,\n\tsideOffset = 6,\n\tinset,\n\ttype,\n\tstyle,\n\t...props\n}: PopoverContentProps) {\n const resolvedType = type ?? (inset === 'compact' ? 'menu' : 'display');\n return (\n <PopoverSurfaceContext.Provider value={{ type: resolvedType, flush: inset === 'flush', regionOwned: false }}>\n\t\t<PopoverContentPrimitive\n\t\t\tdata-surface-type={resolvedType}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn('popover--component',\n\t\t\t\t// A popover is a small surface, not a compressed tooltip. The\n\t\t\t\t// unsuffixed surface token is the package-wide default and remains\n\t\t\t\t// responsive to scoped spacing changes.\n\t\t\t\t'gap-space-md max-h-[min(var(--available-height),calc(100dvh-2rem))] overflow-y-auto overscroll-contain',\n\t\t\t\tpopoverRecipes.surface,\n\t\t\t\tresolvedType === 'display' && inset === 'compact'\n\t\t\t\t\t? popoverRecipes.displayCompact\n\t\t\t\t\t: surfaceInsetClasses[inset ?? (resolvedType === 'menu' ? 'compact' : 'default')],\n\t\t\t\t// The shared recipe owns the semantic hairline border and shadow.\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={style}\n\t\t\t{...props}\n\t\t/>\n </PopoverSurfaceContext.Provider>\n\t);\n}\n\ntype PopoverHeaderBaseProps = React.ComponentProps<typeof PopoverHeaderPrimitive> & {\n /** Leading control, aligned with collection highlight edges rather than label text. */\n start?: React.ReactNode;\n /** Copy rhythm. Defaults to dense for menus and normal for display surfaces. */\n textGap?: TextGap;\n};\n\nfunction PopoverHeader({ className, children, start, textGap, ...props }: PopoverHeaderBaseProps) {\n const surface = React.useContext(PopoverSurfaceContext);\n const copyGap = textGap ?? (surface.type === 'menu' ? 'dense' : 'normal');\n const band = surface.flush && !surface.regionOwned;\n const menu = surface.type === 'menu' && !surface.regionOwned;\n const hasStart = start != null && start !== false;\n return (\n\t\t<PopoverHeaderPrimitive\n\t\t\tclassName={cn(\n 'popover-header--component',\n copyGap === 'dense' ? 'gap-dense' : 'gap-normal',\n band && (surface.type === 'menu' ? popoverRecipes.menuRegion : popoverRecipes.display),\n !band && menu && 'py-row-y',\n hasStart && 'flex-row items-center gap-space-md',\n band && surfaceDividerRecipes.anchored.header,\n className,\n )}\n\t\t\t{...props}\n\t\t>\n <PopoverSurfaceContext.Provider value={{ ...surface, regionOwned: true }}>\n {start}\n <Stack gap={copyGap} className={cn('popover-header--body min-w-0 flex-1', menu && !hasStart && popoverRecipes.menuCopyInset)}>\n {children}\n </Stack>\n </PopoverSurfaceContext.Provider>\n </PopoverHeaderPrimitive>\n\t);\n}\n\ntype PopoverTitleBaseProps = React.ComponentProps<typeof PopoverTitlePrimitive>;\n\nfunction PopoverTitle({ children, className, ...props }: PopoverTitleBaseProps) {\n const compact = React.useContext(PopoverSurfaceContext).type === 'menu';\n return (\n\t\t<PopoverTitlePrimitive\n\t\t\t// Plain text sets its own leading; the heading's inherited line box would\n\t\t\t// otherwise add a strut above the description.\n\t\t\tclassName={cn('popover-title--component', isSimpleText(children) && 'leading-none', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"span\"\n\t\t\t\t\ttype=\"inherit\"\n\t\t\t\t\tsize={compact ? undefined : 'base'}\n\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\tlineHeight=\"snug\"\n\t\t\t\t\tclassName=\"popover-title--text\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</PopoverTitlePrimitive>\n\t);\n}\n\ntype PopoverDescriptionBaseProps = React.ComponentProps<typeof PopoverDescriptionPrimitive>;\n\nfunction PopoverDescription({ children, className, ...props }: PopoverDescriptionBaseProps) {\n const compact = React.useContext(PopoverSurfaceContext).type === 'menu';\n return (\n\t\t<PopoverDescriptionPrimitive\n\t\t\tclassName={cn('popover-description--component', isSimpleText(children) && 'leading-none', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"span\"\n\t\t\t\t\ttype=\"secondary\"\n size={compact ? 'xs' : undefined}\n\t\t\t\t\tlineHeight={compact ? 'normal' : 'relaxed'}\n\t\t\t\t\tclassName=\"popover-description--text\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</PopoverDescriptionPrimitive>\n\t);\n}\n\ntype PopoverFooterProps = React.ComponentProps<'div'> & {\n /** Leading supporting content, one small step inside the region edge like the header; children are trailing actions. */\n caption?: React.ReactNode;\n};\n\nfunction PopoverFooter({ className, children, caption, ...props }: PopoverFooterProps) {\n const surface = React.useContext(PopoverSurfaceContext);\n const childrenAsCaption = caption == null && isSimpleText(children);\n const content = caption ?? (childrenAsCaption ? children : undefined);\n return (\n\t\t<Stack\n\t\t\tdirection=\"horizontal\"\n\t\t\tgap=\"sm\"\n\t\t\tjustify=\"end\"\n\t\t\twrap\n\t\t\tclassName={cn(\n\t\t\t\t'popover-footer--component pt-space-sm', surfaceDividerRecipes.anchored.footer,\n surface.flush && !surface.regionOwned && (surface.type === 'menu' ? popoverRecipes.menuRegion : popoverRecipes.display),\n\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n <PopoverSurfaceContext.Provider value={{ ...surface, regionOwned: true }}>\n {content != null && <div className={cn('popover-footer--caption me-auto min-w-0 max-w-full', surface.type === 'menu' && !surface.regionOwned && popoverRecipes.menuCopyInset)}>\n {isSimpleText(content) ? <Text tag=\"span\" size=\"xs\" type=\"secondary\">{content}</Text> : content}\n </div>}\n {!childrenAsCaption && children}\n </PopoverSurfaceContext.Provider>\n </Stack>\n\t);\n}\n\nexport {\n\tPopoverPrimitive as Popover,\n\tPopoverAnchor,\n\tPopoverContent,\n\tPopoverDescription,\n\tPopoverFooter,\n\tPopoverHeader,\n\tPopoverTitle,\n\tPopoverTrigger,\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAWA,SAASA,EAAQ,EAAE,GAAGyB,KAAsC;CAC1D,OAAO,kBAACxB,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAIwB;CAAQ,CAAA;AAChE;AAEA,SAASE,EAAe,EACtB,aAAU,IACV,iBACA,WACA,aACA,GAAGF,KAC8E;CACjF,IAAMG,IAAaC,IAAU,kBAACZ,GAAD,CAAO,CAAA,IAAI,KAAA,GAClCa,IAAuD,OAAOC,KAAW,eACzE,GAAa,MAAU;EACzB,IAAM,EAAE,cAAcC,GAAe,GAAGC,MAASC;EAEjD,OAAOH,EAAOE,GAA4BE,CAAK;CACjD,KACEJ,GACAK,IAAuB;CAC3B,AAAIP,KAAW3B,EAAM,eAAem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nG,GAAI1B;EAEH,UAAA8B,EAAalB,CAAQ,IACrB,kBAACxB,GAAD;GACC,KAAI;GACJ,MAAK;GACL,MAAM0D,IAAU,OAAO,KAAA;GACvB,YAAYA,IAAU,WAAW;GACjC,WAAU;GAET;EACI,CAAA,IACHlC;CACwB,CAAA;AAE/B;AAOA,SAASoC,EAAc,EAAE,cAAW,aAAU,YAAS,GAAGhD,KAA6B;CACtF,IAAMsC,IAAUxD,EAAM,WAAWkD,CAAqB,GAChDiB,IAAoBC,KAAW,QAAQpB,EAAalB,CAAQ,GAC5DY,IAAU0B,MAAYD,IAAoBrC,IAAW,KAAA;CAC3D,OACC,kBAACnB,GAAD;EACC,WAAU;EACV,KAAI;EACJ,SAAQ;EACR,MAAA;EACA,WAAWgC,EACV,yCAAyC/B,EAAsB,SAAS,QACxE4C,EAAQ,SAAS,CAACA,EAAQ,gBAAgBA,EAAQ,SAAS,SAAS1C,EAAe,aAAaA,EAAe,UAE/G8B,CACD;EACA,GAAI1B;EAEJ,UAAA,kBAACgC,EAAsB,UAAvB;GAAgC,OAAO;IAAE,GAAGM;IAAS,aAAa;GAAK;GAAvE,UAAA,CACEd,KAAW,QAAQ,kBAAC,OAAD;IAAK,WAAWC,EAAG,sDAAsDa,EAAQ,SAAS,UAAU,CAACA,EAAQ,eAAe1C,EAAe,aAAa;IAC1K,UAAAkC,EAAaN,CAAO,IAAI,kBAACpC,GAAD;KAAM,KAAI;KAAO,MAAK;KAAK,MAAK;KAAa,UAAAoC;IAAc,CAAA,IAAIA;GACpF,CAAA,GACJ,CAACyB,KAAqBrC,CACQ;;CAC1B,CAAA;AAET"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useStrings as e } from "./lib/strings.js";
|
|
3
|
-
import { t } from "./utils-
|
|
4
|
-
import { n, t as r } from "./feedback-
|
|
5
|
-
import { i } from "./popover.recipes-
|
|
6
|
-
import { t as a } from "./collection-content-
|
|
7
|
-
import { a as o, i as s, l as c, n as l, o as u, r as d, t as f } from "./command-
|
|
8
|
-
import { c as p, i as m, o as h, r as g, t as _ } from "./popover-
|
|
3
|
+
import { t } from "./utils-B6kKb8jB.js";
|
|
4
|
+
import { n, t as r } from "./feedback-Dm4izqFn.js";
|
|
5
|
+
import { i } from "./popover.recipes-DdiEp0rd.js";
|
|
6
|
+
import { t as a } from "./collection-content-gDh1v6O4.js";
|
|
7
|
+
import { a as o, i as s, l as c, n as l, o as u, r as d, t as f } from "./command-CrlPIL6m.js";
|
|
8
|
+
import { c as p, i as m, o as h, r as g, t as _ } from "./popover-B85RenIl.js";
|
|
9
9
|
import * as v from "react";
|
|
10
10
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/base/popover-menu/popover-menu.types.ts
|
|
@@ -97,4 +97,4 @@ C.displayName = "PopoverMenu";
|
|
|
97
97
|
//#endregion
|
|
98
98
|
export { S as n, C as t };
|
|
99
99
|
|
|
100
|
-
//# sourceMappingURL=popover-menu-
|
|
100
|
+
//# sourceMappingURL=popover-menu-DlnQ2zlR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-menu-Cn9rUkdc.js","names":["React","_Fragment","ErrorState","CollectionContent","CommandItem","CommandInput","commandFilter","CommandEmpty","CommandList","CommandGroup","Command","PopoverTrigger","PopoverHeader","Popover","PopoverFooter","PopoverContent","React$1","Fragment$1","defaultPopoverMenuStrings","PopoverMenu","stringsProp","strings","useStrings","searchRef","triggerRef","keyboardDismissal","contentRef","searchOverrides","items","item","filter","value","search","keywords","next","details","onOpenChange","trigger","contentLabelledBy","contentLabel","cn","popoverWidthRecipes","contentClassName","onSearchChange","header","searchValue","loading","loadingSlot","LoadingState","error","onRetry","empty","onSelect","renderItem","footer"],"sources":["../src/components/base/popover-menu/popover-menu.types.ts","../src/components/base/popover-menu/popover-menu.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nexport interface PopoverMenuItem<T = unknown> {\n\t/** Unique identifier; remains distinct from visible search labels. */\n\tvalue: string;\n\t/** Visible label rendered in the row. Override entirely via `renderItem`. */\n\tlabel: ReactNode;\n\t/** Optional secondary line rendered under the label. */\n\tdescription?: ReactNode;\n\t/** Leading icon — keep small (size-icon-md/size-icon max). */\n\ticon?: ReactNode;\n\t/** Show the trailing checkmark when `true`. */\n\tselected?: boolean;\n\t/** Disable the row. */\n\tdisabled?: boolean;\n\t/** Explicit search keywords, useful when the label is structured content. */\n\tsearchValue?: string;\n\t/** Arbitrary payload for `onSelect` consumers. */\n\tdata?: T;\n}\n\nexport interface PopoverMenuStrings {\n\t/** Placeholder for the search input (when `search` is enabled). */\n\tsearchPlaceholder: string;\n\t/** Empty-state copy when filtering yields no items. */\n\tempty: string;\n\t/** Loading-state copy. */\n\tloading: string;\n\t/** Retry action copy when a resource fails. */\n\tretry?: string;\n}\n\nexport const defaultPopoverMenuStrings: PopoverMenuStrings = {\n\tsearchPlaceholder: 'Search…',\n\tempty: 'No results.',\n\tloading: 'Loading…',\n\tretry: 'Retry',\n};\n","import { commandFilter } from '../../../lib/command-filter';\n/**\n * PopoverMenu — blocks wrapper around `base/popover` + `base/command`.\n *\n * Captures the recurring \"trigger → optional header → search → command list\"\n * pattern used by filter facets, operator selects, and similar pickers\n * across the library.\n *\n * Slots (all optional):\n * - `header` — rendered above the search input / list\n * - `footer` — rendered below the list (e.g. confirm/clear buttons)\n * - `empty` — replaces the default empty-state copy\n * - `loading` — replaces the list when `loading` is true\n *\n * Render-prop:\n * - `renderItem={(item, ctx) => ReactNode}` — full control over a row\n *\n * Strings:\n * - `strings={{ searchPlaceholder, empty, loading }}` — merged with defaults\n *\n * For headless usage (custom UI against the same selection state),\n * compose `base/popover` + `base/command` directly.\n */\nimport * as React from 'react';\n\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from '../command';\nimport {\n\tPopover,\n\tPopoverContent,\n PopoverHeader,\n PopoverFooter,\n\tPopoverTrigger,\n} from '../popover';\nimport { LoadingState, ErrorState } from '../feedback';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { popoverWidthRecipes, type CollectionDensity } from '../popover/popover.recipes';\nimport { CollectionContent } from '../popover/collection-content';\n\nimport {\n\tdefaultPopoverMenuStrings,\n\ttype PopoverMenuItem,\n\ttype PopoverMenuStrings,\n} from './popover-menu.types';\n\nexport interface PopoverMenuRenderItemContext {\n\t/** True when the item is the user's currently-active match (keyboard or pointer highlight). */\n\tisHighlighted: boolean;\n}\n\nexport interface PopoverMenuProps<T = unknown> {\n\t/** Vertical row rhythm. Compact and comfortable preserve primary label size and inline room. */\n\tdensity?: CollectionDensity;\n\t/** Trigger element. The popover anchors to it. Pass any clickable. */\n\ttrigger: React.ReactNode;\n\t/** Items to render in the list. */\n\titems: ReadonlyArray<PopoverMenuItem<T>>;\n\t/** Selection callback — fires on row click / Enter. */\n\tonSelect: (item: PopoverMenuItem<T>) => void;\n\n\t/** Controlled open state. Omit for uncontrolled. */\n\topen?: boolean;\n\t/** Open-state callback for controlled / uncontrolled flows. */\n\tonOpenChange?: (open: boolean) => void;\n\n\t/** Show the search input above the list. Default: true. */\n\tsearch?: boolean;\n\t/** Search input value (controlled). */\n\tsearchValue?: string;\n\t/** Search input change callback. */\n\tonSearchChange?: (value: string) => void;\n\n\t/** Async loading flag — replaces stale options and the empty state. */\n\tloading?: boolean;\n\t/** Resource failure replaces the list. The application owns retry and fetching. */\n\terror?: React.ReactNode;\n\tonRetry?: () => void;\n\n\t/** Optional pre-list slot (e.g. a label / eyebrow). */\n\theader?: React.ReactNode;\n\t/** Optional post-list slot (e.g. confirm / clear buttons). */\n\tfooter?: React.ReactNode;\n\t/** Override empty-state slot (defaults to `strings.empty`). */\n\tempty?: React.ReactNode;\n\t/** Override loading slot (defaults to spinner + `strings.loading`). */\n\tloadingSlot?: React.ReactNode;\n\n\t/** Per-item render override. */\n\trenderItem?: (\n\t\titem: PopoverMenuItem<T>,\n\t\tctx: PopoverMenuRenderItemContext,\n\t) => React.ReactNode;\n\n\t/** Override copy. Deep-merged over defaults. */\n\tstrings?: StringsProp<PopoverMenuStrings>;\n\n\t/** Popover content positioning props (forwarded). */\n\talign?: React.ComponentProps<typeof PopoverContent>['align'];\n\t/** Distance from the trigger, in pixels. */\n\tsideOffset?: React.ComponentProps<typeof PopoverContent>['sideOffset'];\n\n\t/** Width override for the popover content. Default: w-56. */\n\tcontentClassName?: string;\n /** Accessible name for the popup. Defaults to the localized search label. */\n contentLabel?: string;\n /** ID of a consumer-owned title used instead of contentLabel. */\n contentLabelledBy?: string;\n}\n\nexport function PopoverMenu<T = unknown>({\n\tdensity = 'default',\n\ttrigger,\n\titems,\n\tonSelect,\n\topen,\n\tonOpenChange,\n\tsearch = true,\n\tsearchValue,\n\tonSearchChange,\n\tloading = false,\n\terror,\n\tonRetry,\n\theader,\n\tfooter,\n\tempty,\n\tloadingSlot,\n\trenderItem,\n\tstrings: stringsProp,\n\talign = 'start',\n\tsideOffset,\n\tcontentClassName,\n contentLabel,\n contentLabelledBy,\n}: PopoverMenuProps<T>) {\n\tconst strings = useStrings(defaultPopoverMenuStrings, stringsProp);\n\tconst searchRef = React.useRef<HTMLInputElement>(null);\n\tconst triggerRef = React.useRef<HTMLButtonElement>(null);\n\tconst keyboardDismissal = React.useRef(false);\n\tconst contentRef = React.useRef<HTMLDivElement>(null);\n const searchOverrides = React.useMemo(() => new Map(\n items.filter(item => item.searchValue !== undefined).map(item => [item.value, item.searchValue!]),\n ), [items]);\n const filter = React.useCallback((value: string, search: string, keywords?: string[]) => (\n searchOverrides.has(value)\n ? commandFilter(searchOverrides.get(value)!, search)\n : commandFilter(value, search, keywords)\n ), [searchOverrides]);\n\n\treturn (\n\t\t<Popover open={open} onOpenChange={(next, details) => {\n keyboardDismissal.current = !next && details.reason === 'escape-key';\n onOpenChange?.(next);\n }} onOpenChangeComplete={next => {\n // Rapid reopen during a focus-out exit can retain Base UI's no-return flag.\n // Restore only an accepted, completed Escape dismissal; outside focus stays owned.\n if (!next && keyboardDismissal.current) {\n keyboardDismissal.current = false;\n triggerRef.current?.focus({ preventScroll: true });\n }\n }}>\n\t\t\t<PopoverTrigger ref={triggerRef} render={trigger as React.ReactElement} />\n\t\t\t<PopoverContent\n\t\t\t\tref={contentRef}\n\t\t\t\taria-label={contentLabelledBy ? undefined : contentLabel ?? strings.searchPlaceholder}\n aria-labelledby={contentLabelledBy}\n align={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\ttype=\"menu\"\n\t\t\t\tinset=\"flush\"\n\t\t\t\tclassName={cn('popover-menu--component', popoverWidthRecipes.sm, 'gap-0 overflow-hidden', contentClassName)}\n\t\t\t>\n\t\t\t\t<Command\n\t\t\t\t\tshouldFilter={!onSearchChange}\n filter={filter}\n\t\t\t\t\tinset=\"flush\"\n\t\t\t\t\tclassName=\"popover-menu--collection\"\n\t\t\t\t>\n\t\t\t\t\t{!!header && (\n\t\t\t\t\t\t<PopoverHeader className=\"popover-menu--header\">\n\t\t\t\t\t\t\t{header}\n\t\t\t\t\t\t</PopoverHeader>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{!!search && (\n\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\tref={searchRef}\n\t\t\t\t\t\t\tplaceholder={strings.searchPlaceholder}\n\t\t\t\t\t\t\tvalue={searchValue}\n\t\t\t\t\t\t\tonValueChange={onSearchChange}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<CommandList aria-busy={loading || undefined}>\n\t\t\t\t\t\t{loading ? (loadingSlot !== undefined ? <div role=\"status\" aria-live=\"polite\">{loadingSlot}</div> : <LoadingState label={strings.loading} />) : error ? <ErrorState variant=\"inline\" description={error} onRetry={onRetry ? () => {\n // Retry feedback is replaced by loading. Keep focus on persistent anatomy\n // before its button is removed, including in search-free pickers.\n (searchRef.current ?? contentRef.current)?.focus();\n onRetry();\n } : undefined} retryLabel={strings.retry ?? 'Retry'} /> : <>\n\n\t\t\t\t\t\t<CommandEmpty>{empty ?? strings.empty}</CommandEmpty>\n\n\t\t\t\t\t\t{items.length > 0 && (\n\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t{items.map((item) => (\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tkey={item.value}\n\t\t\t\t\t\t\t\t\t\tdensity={density}\n\t\t\t\t\t\t\t\t\t\tvalue={item.value}\n keywords={item.searchValue !== undefined ? [item.searchValue] : [item.label, item.description].filter((value): value is string => typeof value === 'string')}\n\t\t\t\t\t\t\t\t\t\tonSelect={() => onSelect(item)}\n\t\t\t\t\t\t\t\t\t\tdisabled={item.disabled}\n\t\t\t\t\t\t\t\t\t\tdata-checked={item.selected || undefined}\n\t\t\t\t\t\t\t\t\t\tclassName=\"data-[checked=true]:**:[svg]:text-primary-accent\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{({ isHighlighted }) => renderItem\n\t\t\t\t\t\t\t\t\t\t\t? renderItem(item, { isHighlighted })\n\t\t\t\t\t\t\t\t\t\t\t: (\n\t\t\t\t\t\t\t\t\t\t\t\t<CollectionContent label={item.label} description={item.description} leading={item.icon} leadingClassName=\"[&_svg]:size-icon\"/>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>}\n\t\t\t\t\t</CommandList>\n\n\t\t\t\t\t{/* The public surface anatomy owns header and footer bands. */}\n\t\t\t\t\t{!!footer && (\n\t\t\t\t\t\t<PopoverFooter className=\"popover-menu--footer justify-start\">\n\t\t\t\t\t\t\t{footer}\n\t\t\t\t\t\t</PopoverFooter>\n\t\t\t\t\t)}\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n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I;OAC7B,UAAUA,EAAK;OACf,gBAAcA,EAAK,YAAY,KAAA;OAC/B,WAAU;OAER,WAAA,EAAE,uBAAoBwB,IACrBA,EAAWxB,GAAM,EAAE,iBAAc,CAAC,IAEnC,kBAAC1B,GAAD;QAAmB,OAAO0B,EAAK;QAAO,aAAaA,EAAK;QAAa,SAASA,EAAK;QAAM,kBAAiB;OAAoB,CAAA;MAEpH,GAdPA,EAAK,KAcE,CACb,EACY,CAAA,CAEb,EAAA,CAAA;KACU,CAAA;KAGZ,CAAC,CAACyB,KACF,kBAACxC,GAAD;MAAe,WAAU;MACvB,UAAAwC;KACa,CAAA;IAER;;EACM,CAAA,CACR;;AAEX;AAEA,EAAY,cAAc"}
|
|
1
|
+
{"version":3,"file":"popover-menu-DlnQ2zlR.js","names":["React","_Fragment","ErrorState","CollectionContent","CommandItem","CommandInput","commandFilter","CommandEmpty","CommandList","CommandGroup","Command","PopoverTrigger","PopoverHeader","Popover","PopoverFooter","PopoverContent","React$1","Fragment$1","defaultPopoverMenuStrings","PopoverMenu","stringsProp","strings","useStrings","searchRef","triggerRef","keyboardDismissal","contentRef","searchOverrides","items","item","filter","value","search","keywords","next","details","onOpenChange","trigger","contentLabelledBy","contentLabel","cn","popoverWidthRecipes","contentClassName","onSearchChange","header","searchValue","loading","loadingSlot","LoadingState","error","onRetry","empty","onSelect","renderItem","footer"],"sources":["../src/components/base/popover-menu/popover-menu.types.ts","../src/components/base/popover-menu/popover-menu.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nexport interface PopoverMenuItem<T = unknown> {\n\t/** Unique identifier; remains distinct from visible search labels. */\n\tvalue: string;\n\t/** Visible label rendered in the row. Override entirely via `renderItem`. */\n\tlabel: ReactNode;\n\t/** Optional secondary line rendered under the label. */\n\tdescription?: ReactNode;\n\t/** Leading icon — keep small (size-icon-md/size-icon max). */\n\ticon?: ReactNode;\n\t/** Show the trailing checkmark when `true`. */\n\tselected?: boolean;\n\t/** Disable the row. */\n\tdisabled?: boolean;\n\t/** Explicit search keywords, useful when the label is structured content. */\n\tsearchValue?: string;\n\t/** Arbitrary payload for `onSelect` consumers. */\n\tdata?: T;\n}\n\nexport interface PopoverMenuStrings {\n\t/** Placeholder for the search input (when `search` is enabled). */\n\tsearchPlaceholder: string;\n\t/** Empty-state copy when filtering yields no items. */\n\tempty: string;\n\t/** Loading-state copy. */\n\tloading: string;\n\t/** Retry action copy when a resource fails. */\n\tretry?: string;\n}\n\nexport const defaultPopoverMenuStrings: PopoverMenuStrings = {\n\tsearchPlaceholder: 'Search…',\n\tempty: 'No results.',\n\tloading: 'Loading…',\n\tretry: 'Retry',\n};\n","import { commandFilter } from '../../../lib/command-filter';\n/**\n * PopoverMenu — blocks wrapper around `base/popover` + `base/command`.\n *\n * Captures the recurring \"trigger → optional header → search → command list\"\n * pattern used by filter facets, operator selects, and similar pickers\n * across the library.\n *\n * Slots (all optional):\n * - `header` — rendered above the search input / list\n * - `footer` — rendered below the list (e.g. confirm/clear buttons)\n * - `empty` — replaces the default empty-state copy\n * - `loading` — replaces the list when `loading` is true\n *\n * Render-prop:\n * - `renderItem={(item, ctx) => ReactNode}` — full control over a row\n *\n * Strings:\n * - `strings={{ searchPlaceholder, empty, loading }}` — merged with defaults\n *\n * For headless usage (custom UI against the same selection state),\n * compose `base/popover` + `base/command` directly.\n */\nimport * as React from 'react';\n\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from '../command';\nimport {\n\tPopover,\n\tPopoverContent,\n PopoverHeader,\n PopoverFooter,\n\tPopoverTrigger,\n} from '../popover';\nimport { LoadingState, ErrorState } from '../feedback';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { popoverWidthRecipes, type CollectionDensity } from '../popover/popover.recipes';\nimport { CollectionContent } from '../popover/collection-content';\n\nimport {\n\tdefaultPopoverMenuStrings,\n\ttype PopoverMenuItem,\n\ttype PopoverMenuStrings,\n} from './popover-menu.types';\n\nexport interface PopoverMenuRenderItemContext {\n\t/** True when the item is the user's currently-active match (keyboard or pointer highlight). */\n\tisHighlighted: boolean;\n}\n\nexport interface PopoverMenuProps<T = unknown> {\n\t/** Vertical row rhythm. Compact and comfortable preserve primary label size and inline room. */\n\tdensity?: CollectionDensity;\n\t/** Trigger element. The popover anchors to it. Pass any clickable. */\n\ttrigger: React.ReactNode;\n\t/** Items to render in the list. */\n\titems: ReadonlyArray<PopoverMenuItem<T>>;\n\t/** Selection callback — fires on row click / Enter. */\n\tonSelect: (item: PopoverMenuItem<T>) => void;\n\n\t/** Controlled open state. Omit for uncontrolled. */\n\topen?: boolean;\n\t/** Open-state callback for controlled / uncontrolled flows. */\n\tonOpenChange?: (open: boolean) => void;\n\n\t/** Show the search input above the list. Default: true. */\n\tsearch?: boolean;\n\t/** Search input value (controlled). */\n\tsearchValue?: string;\n\t/** Search input change callback. */\n\tonSearchChange?: (value: string) => void;\n\n\t/** Async loading flag — replaces stale options and the empty state. */\n\tloading?: boolean;\n\t/** Resource failure replaces the list. The application owns retry and fetching. */\n\terror?: React.ReactNode;\n\tonRetry?: () => void;\n\n\t/** Optional pre-list slot (e.g. a label / eyebrow). */\n\theader?: React.ReactNode;\n\t/** Optional post-list slot (e.g. confirm / clear buttons). */\n\tfooter?: React.ReactNode;\n\t/** Override empty-state slot (defaults to `strings.empty`). */\n\tempty?: React.ReactNode;\n\t/** Override loading slot (defaults to spinner + `strings.loading`). */\n\tloadingSlot?: React.ReactNode;\n\n\t/** Per-item render override. */\n\trenderItem?: (\n\t\titem: PopoverMenuItem<T>,\n\t\tctx: PopoverMenuRenderItemContext,\n\t) => React.ReactNode;\n\n\t/** Override copy. Deep-merged over defaults. */\n\tstrings?: StringsProp<PopoverMenuStrings>;\n\n\t/** Popover content positioning props (forwarded). */\n\talign?: React.ComponentProps<typeof PopoverContent>['align'];\n\t/** Distance from the trigger, in pixels. */\n\tsideOffset?: React.ComponentProps<typeof PopoverContent>['sideOffset'];\n\n\t/** Width override for the popover content. Default: w-56. */\n\tcontentClassName?: string;\n /** Accessible name for the popup. Defaults to the localized search label. */\n contentLabel?: string;\n /** ID of a consumer-owned title used instead of contentLabel. */\n contentLabelledBy?: string;\n}\n\nexport function PopoverMenu<T = unknown>({\n\tdensity = 'default',\n\ttrigger,\n\titems,\n\tonSelect,\n\topen,\n\tonOpenChange,\n\tsearch = true,\n\tsearchValue,\n\tonSearchChange,\n\tloading = false,\n\terror,\n\tonRetry,\n\theader,\n\tfooter,\n\tempty,\n\tloadingSlot,\n\trenderItem,\n\tstrings: stringsProp,\n\talign = 'start',\n\tsideOffset,\n\tcontentClassName,\n contentLabel,\n contentLabelledBy,\n}: PopoverMenuProps<T>) {\n\tconst strings = useStrings(defaultPopoverMenuStrings, stringsProp);\n\tconst searchRef = React.useRef<HTMLInputElement>(null);\n\tconst triggerRef = React.useRef<HTMLButtonElement>(null);\n\tconst keyboardDismissal = React.useRef(false);\n\tconst contentRef = React.useRef<HTMLDivElement>(null);\n const searchOverrides = React.useMemo(() => new Map(\n items.filter(item => item.searchValue !== undefined).map(item => [item.value, item.searchValue!]),\n ), [items]);\n const filter = React.useCallback((value: string, search: string, keywords?: string[]) => (\n searchOverrides.has(value)\n ? commandFilter(searchOverrides.get(value)!, search)\n : commandFilter(value, search, keywords)\n ), [searchOverrides]);\n\n\treturn (\n\t\t<Popover open={open} onOpenChange={(next, details) => {\n keyboardDismissal.current = !next && details.reason === 'escape-key';\n onOpenChange?.(next);\n }} onOpenChangeComplete={next => {\n // Rapid reopen during a focus-out exit can retain Base UI's no-return flag.\n // Restore only an accepted, completed Escape dismissal; outside focus stays owned.\n if (!next && keyboardDismissal.current) {\n keyboardDismissal.current = false;\n triggerRef.current?.focus({ preventScroll: true });\n }\n }}>\n\t\t\t<PopoverTrigger ref={triggerRef} render={trigger as React.ReactElement} />\n\t\t\t<PopoverContent\n\t\t\t\tref={contentRef}\n\t\t\t\taria-label={contentLabelledBy ? undefined : contentLabel ?? strings.searchPlaceholder}\n aria-labelledby={contentLabelledBy}\n align={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\ttype=\"menu\"\n\t\t\t\tinset=\"flush\"\n\t\t\t\tclassName={cn('popover-menu--component', popoverWidthRecipes.sm, 'gap-0 overflow-hidden', contentClassName)}\n\t\t\t>\n\t\t\t\t<Command\n\t\t\t\t\tshouldFilter={!onSearchChange}\n filter={filter}\n\t\t\t\t\tinset=\"flush\"\n\t\t\t\t\tclassName=\"popover-menu--collection\"\n\t\t\t\t>\n\t\t\t\t\t{!!header && (\n\t\t\t\t\t\t<PopoverHeader className=\"popover-menu--header\">\n\t\t\t\t\t\t\t{header}\n\t\t\t\t\t\t</PopoverHeader>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{!!search && (\n\t\t\t\t\t\t<CommandInput\n\t\t\t\t\t\t\tref={searchRef}\n\t\t\t\t\t\t\tplaceholder={strings.searchPlaceholder}\n\t\t\t\t\t\t\tvalue={searchValue}\n\t\t\t\t\t\t\tonValueChange={onSearchChange}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<CommandList aria-busy={loading || undefined}>\n\t\t\t\t\t\t{loading ? (loadingSlot !== undefined ? <div role=\"status\" aria-live=\"polite\">{loadingSlot}</div> : <LoadingState label={strings.loading} />) : error ? <ErrorState variant=\"inline\" description={error} onRetry={onRetry ? () => {\n // Retry feedback is replaced by loading. Keep focus on persistent anatomy\n // before its button is removed, including in search-free pickers.\n (searchRef.current ?? contentRef.current)?.focus();\n onRetry();\n } : undefined} retryLabel={strings.retry ?? 'Retry'} /> : <>\n\n\t\t\t\t\t\t<CommandEmpty>{empty ?? strings.empty}</CommandEmpty>\n\n\t\t\t\t\t\t{items.length > 0 && (\n\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t{items.map((item) => (\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tkey={item.value}\n\t\t\t\t\t\t\t\t\t\tdensity={density}\n\t\t\t\t\t\t\t\t\t\tvalue={item.value}\n keywords={item.searchValue !== undefined ? [item.searchValue] : [item.label, item.description].filter((value): value is string => typeof value === 'string')}\n\t\t\t\t\t\t\t\t\t\tonSelect={() => onSelect(item)}\n\t\t\t\t\t\t\t\t\t\tdisabled={item.disabled}\n\t\t\t\t\t\t\t\t\t\tdata-checked={item.selected || undefined}\n\t\t\t\t\t\t\t\t\t\tclassName=\"data-[checked=true]:**:[svg]:text-primary-accent\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{({ isHighlighted }) => renderItem\n\t\t\t\t\t\t\t\t\t\t\t? renderItem(item, { isHighlighted })\n\t\t\t\t\t\t\t\t\t\t\t: (\n\t\t\t\t\t\t\t\t\t\t\t\t<CollectionContent label={item.label} description={item.description} leading={item.icon} leadingClassName=\"[&_svg]:size-icon\"/>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>}\n\t\t\t\t\t</CommandList>\n\n\t\t\t\t\t{/* The public surface anatomy owns header and footer bands. */}\n\t\t\t\t\t{!!footer && (\n\t\t\t\t\t\t<PopoverFooter className=\"popover-menu--footer justify-start\">\n\t\t\t\t\t\t\t{footer}\n\t\t\t\t\t\t</PopoverFooter>\n\t\t\t\t\t)}\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n\nPopoverMenu.displayName = 'PopoverMenu';\n"],"mappings":";;;;;;;;;;;AAgCA,IAAakB,IAAgD;CAC5D,mBAAmB;CACnB,OAAO;CACP,SAAS;CACT,OAAO;AACR;;;AC+EA,SAAgBC,EAAyB,EACxC,aAAU,WACV,YACA,UACA,aACA,SACA,iBACA,YAAS,IACT,gBACA,mBACA,aAAU,IACV,UACA,YACA,WACA,WACA,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,EAAK,KAcE,CACb,EACY,CAAA,CAEb,EAAA,CAAA;KACU,CAAA;KAGZ,CAAC,CAACyB,KACF,kBAACxC,GAAD;MAAe,WAAU;MACvB,UAAAwC;KACa,CAAA;IAER;;EACM,CAAA,CACR;;AAEX;AAEA,EAAY,cAAc"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./surface-recipes-BKRVW8Os.js";
|
|
2
|
-
import { t } from "./row-recipes-DL8n7t_b.js";
|
|
3
2
|
//#region src/components/base/popover/popover.recipes.ts
|
|
4
|
-
var n = {
|
|
3
|
+
var t = "px-space-md", n = {
|
|
5
4
|
xs: "w-48",
|
|
6
5
|
sm: "w-56",
|
|
7
6
|
md: "w-72",
|
|
@@ -9,12 +8,16 @@ var n = {
|
|
|
9
8
|
xl: "w-90",
|
|
10
9
|
menuMin: "min-w-40"
|
|
11
10
|
}, r = {
|
|
12
|
-
surface: `box-border max-w-[calc(100vw-2rem)] rounded-
|
|
11
|
+
surface: `box-border max-w-[calc(100vw-2rem)] rounded-surface ${e.anchored.shell} bg-popover text-popover-foreground shadow-md ring-0`,
|
|
13
12
|
display: "p-surface",
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
displayCompact: "p-surface-xs",
|
|
14
|
+
menu: "p-space-md",
|
|
15
|
+
menuInline: t,
|
|
16
|
+
menuRegion: `${t} py-space-md`,
|
|
17
|
+
menuCopyInset: "px-space-xs",
|
|
18
|
+
menuSearch: "[&_[data-slot=command-input-wrapper]]:p-space-md",
|
|
16
19
|
separator: `mx-0 my-space-xs h-px w-full shrink-0 ${e.anchored.separator}`,
|
|
17
|
-
row: "box-border min-h-control rounded-
|
|
20
|
+
row: "box-border min-h-control rounded-radius px-row-x gap-space-sm font-medium leading-tight"
|
|
18
21
|
}, i = {
|
|
19
22
|
default: r.display,
|
|
20
23
|
compact: r.menu,
|
|
@@ -23,11 +26,15 @@ var n = {
|
|
|
23
26
|
default: "",
|
|
24
27
|
compact: "min-h-control-sm",
|
|
25
28
|
comfortable: "min-h-control-lg"
|
|
29
|
+
}, o = {
|
|
30
|
+
default: "py-row-y-sm",
|
|
31
|
+
compact: "py-space-2xs",
|
|
32
|
+
comfortable: "py-row-y"
|
|
26
33
|
};
|
|
27
|
-
function
|
|
28
|
-
return `${r.row} ${a[e]} ${
|
|
34
|
+
function s(e = "default") {
|
|
35
|
+
return `${r.row} ${a[e]} ${o[e]}`;
|
|
29
36
|
}
|
|
30
|
-
var
|
|
37
|
+
var c = {
|
|
31
38
|
icons: "[&_svg]:pointer-events-none [&_svg]:size-icon [&_svg]:shrink-0",
|
|
32
39
|
interactive: "relative flex cursor-default items-center outline-none select-none transition-colors",
|
|
33
40
|
highlighted: "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:[&_svg]:text-accent-foreground",
|
|
@@ -36,6 +43,6 @@ var s = {
|
|
|
36
43
|
tableRow: "min-h-action-xs py-space-2xs"
|
|
37
44
|
};
|
|
38
45
|
//#endregion
|
|
39
|
-
export { i as a, n as i,
|
|
46
|
+
export { i as a, n as i, s as n, r, c as t };
|
|
40
47
|
|
|
41
|
-
//# sourceMappingURL=popover.recipes-
|
|
48
|
+
//# sourceMappingURL=popover.recipes-DdiEp0rd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.recipes-DdiEp0rd.js","names":["surfaceDividerRecipes","menuInlineInset","popoverWidthRecipes","popoverRecipes","surfaceInsetClasses","collectionDensityClasses","collectionBlockPaddingClasses","collectionRowClasses","density","collectionRecipes"],"sources":["../src/components/base/popover/popover.recipes.ts"],"sourcesContent":["import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport type { RowDensity } from '../../../lib/row-recipes';\n// Menu surfaces inset their regions and lists by md on both axes, so header,\n// search and row text share one start edge (md plus the row inset).\nconst menuInlineInset = 'px-space-md';\n/** Shared anchored-surface chrome; Menu and Popover retain their own accessible behavior. */\n/**\n * One width scale for anchored surfaces. Menus, pickers and popovers choose a\n * step rather than a number; the viewport bound in `popoverRecipes.surface`\n * still keeps every step clear of a narrow screen's edges.\n */\nexport const popoverWidthRecipes = {\n\txs: 'w-48',\n\tsm: 'w-56',\n\tmd: 'w-72',\n\tlg: 'w-80',\n\txl: 'w-90',\n\t/** Floor for a menu that otherwise follows its trigger's width. */\n\tmenuMin: 'min-w-40',\n} as const;\n\nexport const popoverRecipes = {\n // Every anchored surface keeps a 1rem gap to the viewport edges, so a wide\n // menu or popover never touches or overruns a narrow screen.\n surface: `box-border max-w-[calc(100vw-2rem)] rounded-surface ${surfaceDividerRecipes.anchored.shell} bg-popover text-popover-foreground shadow-md ring-0`,\n display: 'p-surface',\n // Explicitly compact rich content retains the existing small surface tier.\n displayCompact: 'p-surface-xs',\n menu: 'p-space-md',\n menuInline: menuInlineInset,\n // Collection bands share the list shell; text bodies add the row inset once.\n menuRegion: `${menuInlineInset} py-space-md`,\n // Header and footer copy in a menu band sits one small step inside the region\n // edge, so it does not touch the search field and row highlights below.\n menuCopyInset: 'px-space-xs',\n // Keep the literal descendant candidate with the shared compact shell owner.\n menuSearch: '[&_[data-slot=command-input-wrapper]]:p-space-md',\n separator: `mx-0 my-space-xs h-px w-full shrink-0 ${surfaceDividerRecipes.anchored.separator}`,\n row: 'box-border min-h-control rounded-radius px-row-x gap-space-sm font-medium leading-tight',\n} as const;\nexport type PopoverContentType = 'display' | 'menu';\n\n/** One surface inset vocabulary for Popover, Command and their collections. */\nexport const surfaceInsetClasses = {\n default: popoverRecipes.display,\n compact: popoverRecipes.menu,\n flush: 'p-0',\n} as const;\n\n/** Collection density changes vertical rhythm; inline room and primary text stay stable. */\nexport type CollectionDensity = RowDensity;\n\nconst collectionDensityClasses: Record<CollectionDensity, string> = {\n default: '',\n compact: 'min-h-control-sm',\n comfortable: 'min-h-control-lg',\n};\n\n// The height role sizes a single-line row; block padding is only the floor for\n// wrapped content, one step below Item's ladder so one line never outgrows it.\nconst collectionBlockPaddingClasses: Record<CollectionDensity, string> = {\n default: 'py-row-y-sm',\n compact: 'py-space-2xs',\n comfortable: 'py-row-y',\n};\n\nexport function collectionRowClasses(density: CollectionDensity = 'default'): string {\n return `${popoverRecipes.row} ${collectionDensityClasses[density]} ${collectionBlockPaddingClasses[density]}`;\n}\n\n/** Shared interactive collection states, independent of Menu/listbox state ownership. */\nexport const collectionRecipes = {\n icons: '[&_svg]:pointer-events-none [&_svg]:size-icon [&_svg]:shrink-0',\n interactive: 'relative flex cursor-default items-center outline-none select-none transition-colors',\n highlighted: 'data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:[&_svg]:text-accent-foreground',\n disabled: 'data-disabled:pointer-events-none data-disabled:opacity-50',\n destructive: 'data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:[&_svg]:text-destructive data-[variant=destructive]:data-highlighted:[&_svg]:text-destructive',\n // Compatibility for existing table and overflow-tab ActionMenu consumers.\n tableRow: 'min-h-action-xs py-space-2xs',\n} as const;\n"],"mappings":";;AAIA,IAAMC,IAAkB,eAOXC,IAAsB;CAClC,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CAEJ,SAAS;AACV,GAEaC,IAAiB;CAG7B,SAAS,uDAAuDH,EAAsB,SAAS,MAAM;CACrG,SAAS;CAET,gBAAgB;CAChB,MAAM;CACN,YAAYC;CAEZ,YAAY,GAAGA,EAAgB;CAG/B,eAAe;CAEf,YAAY;CACZ,WAAW,yCAAyCD,EAAsB,SAAS;CACnF,KAAK;AACN,GAIaI,IAAsB;CAClC,SAASD,EAAe;CACxB,SAASA,EAAe;CACxB,OAAO;AACR,GAKME,IAA8D;CACnE,SAAS;CACT,SAAS;CACT,aAAa;AACd,GAIMC,IAAmE;CACxE,SAAS;CACT,SAAS;CACT,aAAa;AACd;AAEA,SAAgBC,EAAqB,IAA6B,WAAmB;CACpF,OAAO,GAAGJ,EAAe,IAAI,GAAGE,EAAyBG,GAAS,GAAGF,EAA8BE;AACpG;AAGA,IAAaC,IAAoB;CAChC,OAAO;CACP,aAAa;CACb,aAAa;CACb,UAAU;CACV,aAAa;CAEb,UAAU;AACX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-recipes-BpsV_iRw.js","names":["cn","portalClassName","className","state"],"sources":["../src/lib/portal-recipes.ts"],"sourcesContent":["import { cn } from './utils';\n\n/** Native portals retain their DOM/theme boundary without becoming flex/grid\n * items. Native class callbacks and deliberate display overrides still win. */\nexport function portalClassName<State>(className?: string | ((state: State) => string | undefined)) {\n return (state: State) => cn('contents', typeof className === 'function' ? className(state) : className);\n}\n"],"mappings":";;AAIA,SAAgBC,EAAuB,GAA6D;CACnG,QAAQ,MAAiBD,EAAG,YAAY,OAAOE,KAAc,aAAaA,EAAUC,CAAK,IAAID,CAAS;AACvG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { t as n } from "./utils-
|
|
4
|
-
import { c as r, i, l as a, r as o, u as s } from "./typography-
|
|
5
|
-
import {
|
|
6
|
-
import { n as l, o as u, r as d, t as f } from "./value-typography-
|
|
2
|
+
import { f as e, v as t } from "./ui-provider-C-74NVLc.js";
|
|
3
|
+
import { t as n } from "./utils-B6kKb8jB.js";
|
|
4
|
+
import { c as r, i, l as a, r as o, u as s } from "./typography-BQnine1k.js";
|
|
5
|
+
import { i as c } from "./text.styles-B64My8RZ.js";
|
|
6
|
+
import { n as l, o as u, r as d, t as f } from "./value-typography-uAmWUAL1.js";
|
|
7
7
|
import { t as p } from "./initials-format-CDoQEOd_.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
@@ -377,4 +377,4 @@ function ae({ width: t, height: i, depth: a, unit: o, separator: s = " × ", loc
|
|
|
377
377
|
//#endregion
|
|
378
378
|
export { S as _, Z as a, W as c, R as d, L as f, C as g, w as h, te as i, K as l, T as m, $ as n, H as o, E as p, re as r, B as s, ae as t, z as u };
|
|
379
379
|
|
|
380
|
-
//# sourceMappingURL=primitives-
|
|
380
|
+
//# sourceMappingURL=primitives-ByWgGUgt.js.map
|