themelia-react-ui 2.0.4 → 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 +135 -0
- package/README.md +113 -18
- package/dist/{accordion-96o0pN62.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/{action-menu-CHgs8vmj.js → action-menu-Dr8K-ghE.js} +48 -45
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-B8yGOr8-.js → affordance-geometry.generated-P-aVJisu.js} +36 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-BZUGwBq6.js → ai-artifact-C58tQcBy.js} +210 -174
- 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-DkoqHPPl.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-DkoqHPPl.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-D2FVZ1MH.js → auth-DTkkshS8.js} +43 -46
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DWO_HHhB.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-DErMA7ul.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-DErMA7ul.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 +2 -2
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +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-CdfIkCsV.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +21 -21
- 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 +325 -306
- 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 +1259 -1184
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-B-WFKecD.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-B-WFKecD.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DkmK-z8E.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-BbfzgczK.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-CzYUTPeJ.js → checkbox-fflqmODR.js} +2 -2
- package/dist/{checkbox-CzYUTPeJ.js.map → checkbox-fflqmODR.js.map} +1 -1
- package/dist/{choice-inputs-JLtij2y4.js → choice-inputs-zUgBZfE4.js} +258 -257
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-CGNaUtAE.js → code-block-BzmM9Eig.js} +8 -8
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-Do4G0zcC.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-Do4G0zcC.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-C0e8SsTm.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-C0e8SsTm.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-CBJDs6w_.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-D8NrBj-b.js → command-CrlPIL6m.js} +11 -11
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-Di4w0H_S.js → comments-Dmpp0YIc.js} +29 -29
- package/dist/{comments-Di4w0H_S.js.map → comments-Dmpp0YIc.js.map} +1 -1
- package/dist/components/base/action-menu/action-menu.d.ts +7 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +6 -4
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +3 -4
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/workflow.d.ts +7 -1
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +1 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +10 -3
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/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/toaster/index.d.ts +1 -0
- 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/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/{containers-CRmHf7GP.js → containers-CIxwbZt5.js} +26 -18
- 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-CnGCZdX4.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-CnGCZdX4.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-D4oujtx0.js → data-display-BdgCAw8T.js} +268 -277
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-Q7jnXxpk.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-Q7jnXxpk.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-zOt1oNss.js → date-picker-RlIzKom_.js} +446 -437
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/{date-pickers-cj8IXbDC.js → date-pickers-DY-CpXS1.js} +12 -12
- package/dist/{date-pickers-cj8IXbDC.js.map → date-pickers-DY-CpXS1.js.map} +1 -1
- package/dist/{display-BB4BL_-K.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-BB4BL_-K.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 +22 -22
- 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 +237 -238
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +140 -146
- 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 +375 -326
- 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 +1266 -1193
- 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 +69 -66
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +13 -13
- 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 +94 -95
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-DZNL5Lg1.js → feedback-Dm4izqFn.js} +80 -79
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DjwGx8eM.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-BcT-uoFy.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CsgRmdit.js → form-field-BriWAXyg.js} +6 -6
- package/dist/{form-field-CsgRmdit.js.map → form-field-BriWAXyg.js.map} +1 -1
- package/dist/{form-sizing-NXgjkmBG.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/{forms-BV5m5aQF.js → forms-C0RGnJTe.js} +17 -13
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-Cd33AKbD.js → forms-numeric-DIhghX1Q.js} +86 -82
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BA697l4a.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-BQ-L7Uu2.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-COWbCCWu.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-COWbCCWu.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/{input-Cdw4k0fb.js → input-CvyDQlY7.js} +8 -8
- package/dist/{input-Cdw4k0fb.js.map → input-CvyDQlY7.js.map} +1 -1
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/{item-BvZ2DR_x.js → item-DjCcM18E.js} +16 -16
- 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 +35 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/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/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-CSl5W1Fy.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-CSl5W1Fy.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-RKOQaaIB.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-RKOQaaIB.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-INU2xsxu.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/{metadata-list-qVV7AVxa.js → metadata-list-C3MkU-Om.js} +64 -64
- 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-BQNcg1jT.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-WZEs-hYo.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-E_OiIfJz.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-E_OiIfJz.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-Ch8X_47u.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-Ch8X_47u.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-BYaCdFhf.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-BYaCdFhf.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-Du64iDbb.js → primitives-ByWgGUgt.js} +5 -5
- package/dist/{primitives-Du64iDbb.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-BvF2oCdV.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-BvF2oCdV.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-D789Jwyy.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-CLJEf76s.js → rich-text-Dth5E882.js} +3 -3
- package/dist/{rich-text-CLJEf76s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-Cm1dpUpQ.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-L__e4x47.js → rich-text-editor-toolbar-laT3tpBT.js} +32 -28
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-La5RXsEk.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-La5RXsEk.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-DAEV0w65.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-DAEV0w65.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-GNfPG-90.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-GNfPG-90.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/{settings-BA2iboic.js → settings-Bar5wiSo.js} +31 -38
- 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-C0V0_Fyf.js → structure-DuxKl954.js} +2 -2
- package/dist/{structure-C0V0_Fyf.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-CpvnzJn9.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-CpvnzJn9.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-DH7rozUv.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-eqVsJZWO.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-DXItiR0O.js → text-inputs-B1culiSK.js} +17 -17
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/theme.css +40 -37
- package/dist/{timelines-DmtztAY_.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-CV11PURP.js → tree-CzUJHnFs.js} +8 -8
- package/dist/{tree-CV11PURP.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-CSyJrh28.js → typography-BQnine1k.js} +12 -12
- package/dist/{typography-CSyJrh28.js.map → typography-BQnine1k.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-C9SA0X-8.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-DhQJiSRc.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-DVTRDmGz.js → usage-card-BeSLY0i0.js} +24 -17
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-CF3c95Io.js → utils-B6kKb8jB.js} +237 -141
- 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-ClupF0Gz.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-ClupF0Gz.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/{workspace-9EFVXUyk.js → workspace-DHeHv0qw.js} +50 -49
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +4 -3
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +52 -1
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +38 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +1 -1
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +24 -11
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +19 -17
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +7131 -1754
- package/docs/consumer-skill/references/composition-mapping.md +17 -3
- package/docs/consumer-skill/references/composition.md +159 -31
- 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 +11 -9
- package/docs/consumer-skill/references/discovery.md +27 -3
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +15 -4
- package/docs/consumer-skill/references/integration.md +35 -0
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +2881 -420
- package/docs/consumer-skill/references/review.md +39 -2
- package/docs/consumer-skill/references/rhf-workflows.md +7 -0
- package/docs/consumer-skill/references/screen-archetypes.md +19 -7
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +17 -18
- package/docs/consumer-skill/references/tokens.json +9 -9
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +7 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.mjs +1 -1
- package/docs/consumer-skill/scripts/composition.mjs +61 -5
- package/docs/consumer-skill/scripts/discovery.mjs +54 -0
- package/docs/consumer-skill/scripts/inspect-component.mjs +1 -1
- package/docs/consumer-skill/scripts/inspection.mjs +73 -18
- package/docs/consumer-skill/scripts/setup-skills.mjs +41 -6
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +14 -13
- package/docs/consumer-skills/themelia-composition/SKILL.md +16 -17
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +2 -1
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +24 -17
- package/package.json +1 -1
- package/dist/accordion-96o0pN62.js.map +0 -1
- package/dist/action-menu-CHgs8vmj.js.map +0 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +0 -1
- package/dist/ai-artifact-BZUGwBq6.js.map +0 -1
- package/dist/app-shell-D63ATkIK.js +0 -237
- package/dist/app-shell-D63ATkIK.js.map +0 -1
- package/dist/auth-D2FVZ1MH.js.map +0 -1
- package/dist/avatar-DWO_HHhB.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-CdfIkCsV.js.map +0 -1
- package/dist/button-DkmK-z8E.js.map +0 -1
- package/dist/buttons-BbfzgczK.js.map +0 -1
- package/dist/cards-4JTWqvVe.js +0 -68
- package/dist/cards-4JTWqvVe.js.map +0 -1
- package/dist/chart-C19flDQb.js +0 -155
- package/dist/chart-C19flDQb.js.map +0 -1
- package/dist/choice-inputs-JLtij2y4.js.map +0 -1
- package/dist/code-block-CGNaUtAE.js.map +0 -1
- package/dist/combobox-CBJDs6w_.js.map +0 -1
- package/dist/combobox-hbhSS18O.js +0 -355
- package/dist/combobox-hbhSS18O.js.map +0 -1
- package/dist/command-D8NrBj-b.js.map +0 -1
- package/dist/containers-CRmHf7GP.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-D4oujtx0.js.map +0 -1
- package/dist/date-picker-zOt1oNss.js.map +0 -1
- package/dist/dropdown-menu-CjY8Vt7W.js +0 -193
- package/dist/dropdown-menu-CjY8Vt7W.js.map +0 -1
- package/dist/feedback-DZNL5Lg1.js.map +0 -1
- package/dist/field-affordance-recipes-DjwGx8eM.js.map +0 -1
- package/dist/filters-BcT-uoFy.js.map +0 -1
- package/dist/form-sizing-NXgjkmBG.js.map +0 -1
- package/dist/forms-BV5m5aQF.js.map +0 -1
- package/dist/forms-numeric-Cd33AKbD.js.map +0 -1
- package/dist/header-BA697l4a.js.map +0 -1
- package/dist/hooks-BQ-L7Uu2.js.map +0 -1
- package/dist/input-DOPL5_QE.js +0 -21
- package/dist/input-DOPL5_QE.js.map +0 -1
- package/dist/item-BvZ2DR_x.js.map +0 -1
- package/dist/message-INU2xsxu.js.map +0 -1
- package/dist/metadata-list-qVV7AVxa.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-BQNcg1jT.js.map +0 -1
- package/dist/navigation-DLF3E1IC.js +0 -145
- package/dist/navigation-DLF3E1IC.js.map +0 -1
- package/dist/navigation-row-recipes-WZEs-hYo.js.map +0 -1
- package/dist/overflow-tab-bar-CrbqMteP.js +0 -284
- package/dist/overflow-tab-bar-CrbqMteP.js.map +0 -1
- package/dist/overlays-BlKynmde.js +0 -1004
- package/dist/overlays-BlKynmde.js.map +0 -1
- package/dist/page-CIwNUtGr.js +0 -227
- package/dist/page-CIwNUtGr.js.map +0 -1
- package/dist/page-header-commands-DFMlNYzN.js +0 -128
- package/dist/page-header-commands-DFMlNYzN.js.map +0 -1
- package/dist/popover-uwzX2vo7.js +0 -198
- package/dist/popover-uwzX2vo7.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-D789Jwyy.js.map +0 -1
- package/dist/rich-text-editor-Cm1dpUpQ.js.map +0 -1
- package/dist/rich-text-editor-toolbar-L__e4x47.js.map +0 -1
- package/dist/settings-BA2iboic.js.map +0 -1
- package/dist/sheet-DoAxTb2J.js +0 -213
- package/dist/sheet-DoAxTb2J.js.map +0 -1
- package/dist/sidebar-ByqKR_W5.js +0 -512
- package/dist/sidebar-ByqKR_W5.js.map +0 -1
- package/dist/sidebar-D2iSnGJ7.js +0 -619
- package/dist/sidebar-D2iSnGJ7.js.map +0 -1
- package/dist/skeleton-CUj8O5Bd.js +0 -264
- package/dist/skeleton-CUj8O5Bd.js.map +0 -1
- package/dist/smart-card-CqkzQsK-.js +0 -614
- package/dist/smart-card-CqkzQsK-.js.map +0 -1
- package/dist/table-DH7rozUv.js.map +0 -1
- package/dist/tabs-eqVsJZWO.js.map +0 -1
- package/dist/text-inputs-DXItiR0O.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-DmtztAY_.js.map +0 -1
- package/dist/tooltip-B4hjKtoV.js +0 -111
- package/dist/tooltip-B4hjKtoV.js.map +0 -1
- package/dist/ui-provider-CQCuCBcy.js +0 -136
- package/dist/ui-provider-CQCuCBcy.js.map +0 -1
- package/dist/upload-C9SA0X-8.js.map +0 -1
- package/dist/upload-queue-DhQJiSRc.js.map +0 -1
- package/dist/usage-card-DVTRDmGz.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-CF3c95Io.js.map +0 -1
- package/dist/value-inputs-C0o70p-U.js +0 -980
- package/dist/value-inputs-C0o70p-U.js.map +0 -1
- package/dist/workspace-9EFVXUyk.js.map +0 -1
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ComponentType, ReactNode } from 'react';
|
|
6
6
|
import type { LayoutIconSource, LayoutLinkRenderer, LayoutNavigationAdapter } from '../layout.types';
|
|
7
|
-
import type { SidebarMenuDensity } from '../../base/sidebar';
|
|
7
|
+
import type { SidebarMenuDensity, SidebarPanelId, SidebarPresentation } from '../../base/sidebar';
|
|
8
8
|
import type { StringsProp } from '../../../lib/strings';
|
|
9
9
|
export interface SidebarNavItem {
|
|
10
|
+
/** Stable identity for rendering, branch expansion and live badges; precedes handle and href. */
|
|
11
|
+
id?: string;
|
|
10
12
|
/** Display label. */
|
|
11
13
|
label: ReactNode;
|
|
12
14
|
/** Destination for the entry, when it navigates. */
|
|
@@ -23,10 +25,20 @@ export interface SidebarNavItem {
|
|
|
23
25
|
external?: boolean;
|
|
24
26
|
}
|
|
25
27
|
export type SidebarFlatNavItem = Omit<SidebarNavItem, 'children' | 'group'>;
|
|
28
|
+
export interface SidebarNavigationGroup {
|
|
29
|
+
/** Stable identity independent of the displayed group label. */
|
|
30
|
+
id: string;
|
|
31
|
+
/** Optional section heading. */
|
|
32
|
+
label?: ReactNode;
|
|
33
|
+
items: SidebarNavItem[];
|
|
34
|
+
}
|
|
35
|
+
export type SidebarNavigationGroups = Record<string, SidebarNavItem[]> | readonly SidebarNavigationGroup[];
|
|
26
36
|
export interface SidebarRenderItemContext {
|
|
27
37
|
depth: number;
|
|
28
38
|
/** Marks the control as currently engaged. */
|
|
29
39
|
active: boolean;
|
|
40
|
+
/** This branch contains the current destination, independently of disclosure state. */
|
|
41
|
+
ancestor?: boolean;
|
|
30
42
|
expanded: boolean;
|
|
31
43
|
/** Effective disabled state, including any disabled ancestor. */
|
|
32
44
|
disabled?: boolean;
|
|
@@ -38,23 +50,37 @@ export interface SidebarRenderItemContext {
|
|
|
38
50
|
badge?: string | number;
|
|
39
51
|
renderLink: LayoutLinkRenderer;
|
|
40
52
|
}
|
|
53
|
+
/** Custom row content retains the library-owned link, disclosure and child list. */
|
|
54
|
+
export interface SidebarRenderItemContentContext extends Omit<SidebarRenderItemContext, 'children' | 'setExpanded'> {
|
|
55
|
+
defaultContent: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
export interface SidebarSlotContext {
|
|
58
|
+
panelId: SidebarPanelId;
|
|
59
|
+
collapsed: boolean;
|
|
60
|
+
presentation: SidebarPresentation;
|
|
61
|
+
isMobile: boolean;
|
|
62
|
+
renderLink: LayoutLinkRenderer;
|
|
63
|
+
/** Standard content for this region, without its surrounding anatomy. */
|
|
64
|
+
defaultContent: ReactNode;
|
|
65
|
+
}
|
|
66
|
+
export type SidebarSlot = ReactNode | ((context: SidebarSlotContext) => ReactNode);
|
|
41
67
|
export interface SidebarSlots {
|
|
42
|
-
/**
|
|
43
|
-
header?:
|
|
68
|
+
/** A node replaces the full header; a callback supplies content inside the padded header. */
|
|
69
|
+
header?: SidebarSlot;
|
|
44
70
|
/** Pinned content before the standard logo/workspace region, inside its padded header. */
|
|
45
71
|
headerStart?: ReactNode;
|
|
46
72
|
/** Pinned content after the standard logo/workspace region. Full header replacement wins. */
|
|
47
73
|
headerEnd?: ReactNode;
|
|
48
|
-
beforeNavigation?:
|
|
49
|
-
afterNavigation?:
|
|
74
|
+
beforeNavigation?: SidebarSlot;
|
|
75
|
+
afterNavigation?: SidebarSlot;
|
|
50
76
|
/** Content below the body. */
|
|
51
|
-
footer?:
|
|
77
|
+
footer?: SidebarSlot;
|
|
52
78
|
empty?: ReactNode;
|
|
53
79
|
/** Shows the pending indicator. */
|
|
54
80
|
loading?: ReactNode;
|
|
55
81
|
}
|
|
56
82
|
export interface SidebarExpansionProps {
|
|
57
|
-
/** Expanded branch keys from handle, href, or a plain-text label. Controlled. */
|
|
83
|
+
/** Expanded branch keys from id, handle, href, or a plain-text label. Controlled. */
|
|
58
84
|
expandedItems?: readonly string[];
|
|
59
85
|
/** Initially expanded branches. Active ancestors also open automatically. */
|
|
60
86
|
defaultExpandedItems?: readonly string[];
|
|
@@ -69,6 +95,8 @@ export interface SidebarNavigationStrings {
|
|
|
69
95
|
}
|
|
70
96
|
export declare const defaultSidebarNavigationStrings: SidebarNavigationStrings;
|
|
71
97
|
export interface AppSidebarProps extends LayoutNavigationAdapter, SidebarExpansionProps {
|
|
98
|
+
/** Accessible name for the navigation landmark. Defaults to the named panel's role. */
|
|
99
|
+
'aria-label'?: string;
|
|
72
100
|
/** Enables the library input and local navigation filtering. */
|
|
73
101
|
searchable?: boolean;
|
|
74
102
|
/** Search text. Controlled; renderNode labels use their handle as searchable text. */
|
|
@@ -80,7 +108,7 @@ export interface AppSidebarProps extends LayoutNavigationAdapter, SidebarExpansi
|
|
|
80
108
|
/** Row and child-list rhythm. Inherits the sidebar provider. */
|
|
81
109
|
menuDensity?: SidebarMenuDensity;
|
|
82
110
|
/** Navigation items grouped by section heading. */
|
|
83
|
-
navigationGroups?:
|
|
111
|
+
navigationGroups?: SidebarNavigationGroups;
|
|
84
112
|
/** Navigation items pinned to the sidebar footer. */
|
|
85
113
|
footerNavItems?: SidebarFlatNavItem[];
|
|
86
114
|
/** Heading above the footer navigation. */
|
|
@@ -111,8 +139,12 @@ export interface AppSidebarProps extends LayoutNavigationAdapter, SidebarExpansi
|
|
|
111
139
|
liveBadges?: Record<string, string | number>;
|
|
112
140
|
/** Shows the pending indicator. */
|
|
113
141
|
loading?: boolean;
|
|
114
|
-
/**
|
|
142
|
+
/** Desktop collapse: icon keeps a compact rail, offcanvas closes the panel, none stays expanded. */
|
|
115
143
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
144
|
+
/** Named state owner; inherits the nearest shell region, then primary. */
|
|
145
|
+
panelId?: SidebarPanelId;
|
|
146
|
+
/** Transparent docked surfaces share their shell canvas. Drawers remain opaque. */
|
|
147
|
+
surface?: 'default' | 'transparent';
|
|
116
148
|
/** Shell treatment. */
|
|
117
149
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
118
150
|
/** Which side of the trigger the surface opens on. */
|
|
@@ -126,6 +158,8 @@ export interface AppSidebarProps extends LayoutNavigationAdapter, SidebarExpansi
|
|
|
126
158
|
slots?: SidebarSlots;
|
|
127
159
|
/** Renders one item through the consumer's router. */
|
|
128
160
|
renderItem?: (item: SidebarNavItem, context: SidebarRenderItemContext) => ReactNode;
|
|
161
|
+
/** Replaces row content while retaining the link, disclosure, focus and descendants. */
|
|
162
|
+
renderItemContent?: (item: SidebarNavItem, context: SidebarRenderItemContentContext) => ReactNode;
|
|
129
163
|
}
|
|
130
164
|
export interface SidebarGroupedNavigationProps extends LayoutNavigationAdapter, SidebarExpansionProps {
|
|
131
165
|
/** Optional local filter. Matching ancestors stay visible and open. */
|
|
@@ -134,7 +168,7 @@ export interface SidebarGroupedNavigationProps extends LayoutNavigationAdapter,
|
|
|
134
168
|
/** Row and child-list rhythm. Inherits the sidebar provider. */
|
|
135
169
|
menuDensity?: SidebarMenuDensity;
|
|
136
170
|
/** Navigation items grouped by section heading. */
|
|
137
|
-
navigationByGroups:
|
|
171
|
+
navigationByGroups: SidebarNavigationGroups;
|
|
138
172
|
/** URL of the active route, used to mark the current item. */
|
|
139
173
|
currentUrl?: string;
|
|
140
174
|
/** Resolves an item's icon name to a component, keeping navigation data serialisable. */
|
|
@@ -149,6 +183,8 @@ export interface SidebarGroupedNavigationProps extends LayoutNavigationAdapter,
|
|
|
149
183
|
emptySlot?: ReactNode;
|
|
150
184
|
/** Renders one item through the consumer's router. */
|
|
151
185
|
renderItem?: (item: SidebarNavItem, context: SidebarRenderItemContext) => ReactNode;
|
|
186
|
+
/** Replaces row content while retaining accessible navigation anatomy. */
|
|
187
|
+
renderItemContent?: (item: SidebarNavItem, context: SidebarRenderItemContentContext) => ReactNode;
|
|
152
188
|
className?: string;
|
|
153
189
|
}
|
|
154
190
|
export interface SidebarFlatNavigationProps extends LayoutNavigationAdapter {
|
|
@@ -170,6 +206,8 @@ export interface SidebarFlatNavigationProps extends LayoutNavigationAdapter {
|
|
|
170
206
|
liveBadges?: Record<string, string | number>;
|
|
171
207
|
/** Renders one item through the consumer's router. */
|
|
172
208
|
renderItem?: (item: SidebarFlatNavItem, context: SidebarRenderItemContext) => ReactNode;
|
|
209
|
+
/** Replaces row content while retaining the accessible link and focus treatment. */
|
|
210
|
+
renderItemContent?: (item: SidebarFlatNavItem, context: SidebarRenderItemContentContext) => ReactNode;
|
|
173
211
|
className?: string;
|
|
174
212
|
}
|
|
175
213
|
export interface WorkspaceLink {
|
|
@@ -5,6 +5,13 @@ import type { SidebarNavItem } from './sidebar.types';
|
|
|
5
5
|
import type { ComponentScale } from '../../../lib/component-vocabulary';
|
|
6
6
|
export declare function toPath(href: string): string;
|
|
7
7
|
export declare function isPathMatch(currentUrl: string, path: string): boolean;
|
|
8
|
+
/** Choose one destination across the whole navigation tree. Prefix matches
|
|
9
|
+
* still open ancestors, but a shorter sibling route is not also current. */
|
|
10
|
+
interface NavigationPathItem {
|
|
11
|
+
href?: string;
|
|
12
|
+
children?: readonly NavigationPathItem[];
|
|
13
|
+
}
|
|
14
|
+
export declare function getCurrentNavigationHref(currentUrl: string, items: readonly NavigationPathItem[]): string | undefined;
|
|
8
15
|
export declare function getNavLabel(item: Pick<SidebarNavItem, 'label'>): React.ReactNode;
|
|
9
16
|
export declare function getNavKey(item: SidebarNavItem, fallbackIndex?: number): React.Key;
|
|
10
17
|
export declare function NavBadge({ value, size, }: {
|
|
@@ -13,7 +20,7 @@ export declare function NavBadge({ value, size, }: {
|
|
|
13
20
|
/** Size preset. */
|
|
14
21
|
size?: ComponentScale;
|
|
15
22
|
}): React.JSX.Element;
|
|
16
|
-
export declare function resolveNavBadge(handle: string | undefined, itemBadge: string | number | undefined, liveBadges: Record<string, string | number> | undefined): string | number | undefined;
|
|
23
|
+
export declare function resolveNavBadge(handle: string | undefined, itemBadge: string | number | undefined, liveBadges: Record<string, string | number> | undefined, id?: string): string | number | undefined;
|
|
17
24
|
export interface DynamicIconProps extends React.SVGProps<SVGSVGElement> {
|
|
18
25
|
/** Leading glyph. */
|
|
19
26
|
icon: LayoutIconSource;
|
|
@@ -27,3 +34,4 @@ export interface DynamicIconProps extends React.SVGProps<SVGSVGElement> {
|
|
|
27
34
|
}
|
|
28
35
|
export declare function DynamicIcon({ icon, iconMap, size, className, ...props }: DynamicIconProps): React.JSX.Element | null;
|
|
29
36
|
export declare function renderSidebarLink(renderLink: LayoutLinkRenderer, item: SidebarNavItem, children: React.ReactNode, className?: string, active?: boolean): React.ReactNode;
|
|
37
|
+
export {};
|
|
@@ -61,7 +61,7 @@ export interface WorkspaceRecordHeaderProps extends Omit<HTMLAttributes<HTMLDivE
|
|
|
61
61
|
actions?: ReactNode;
|
|
62
62
|
/**
|
|
63
63
|
* The record's one main command: a solid primary button after the secondary
|
|
64
|
-
* commands,
|
|
64
|
+
* commands, available in the compact header menu.
|
|
65
65
|
*/
|
|
66
66
|
primaryAction?: PageHeaderAction;
|
|
67
67
|
/**
|
|
@@ -72,6 +72,13 @@ export interface WorkspaceRecordHeaderProps extends Omit<HTMLAttributes<HTMLDivE
|
|
|
72
72
|
* command objects instead.
|
|
73
73
|
*/
|
|
74
74
|
secondaryActions?: ReactNode | readonly PageHeaderAction[];
|
|
75
|
+
/**
|
|
76
|
+
* How many routine secondary commands render as outline buttons on wide
|
|
77
|
+
* headers; later ones join the More actions menu. Use `1` or `0` when long
|
|
78
|
+
* labels beside the primary command would crowd the header; `Infinity`
|
|
79
|
+
* keeps every routine command inline. @default 2
|
|
80
|
+
*/
|
|
81
|
+
maxVisibleSecondaryActions?: number;
|
|
75
82
|
/** Accessible name of the More actions menu trigger. Default: `'More actions'`. */
|
|
76
83
|
moreActionsLabel?: string;
|
|
77
84
|
/** Current state, shown as a chip. */
|
|
@@ -4,9 +4,9 @@ import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog
|
|
|
4
4
|
import { Button } from "./button";
|
|
5
5
|
declare function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props): React.JSX.Element;
|
|
6
6
|
declare function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props): React.JSX.Element;
|
|
7
|
-
declare function AlertDialogPortal({ container, ...props }: AlertDialogPrimitive.Portal.Props): React.JSX.Element;
|
|
7
|
+
declare function AlertDialogPortal({ container, className, ...props }: AlertDialogPrimitive.Portal.Props): React.JSX.Element;
|
|
8
8
|
declare function AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props): React.JSX.Element;
|
|
9
|
-
declare function AlertDialogContent({ className, container, size, ...props }: AlertDialogPrimitive.Popup.Props & {
|
|
9
|
+
declare function AlertDialogContent({ className, container, size, children, finalFocus: finalFocusProp, ...props }: AlertDialogPrimitive.Popup.Props & {
|
|
10
10
|
size?: "default" | "sm";
|
|
11
11
|
} & {
|
|
12
12
|
container?: ThemePortalContainer;
|
|
@@ -21,7 +21,7 @@ type ComboboxInputTriggerProps = Omit<ComboboxPrimitive.Input.Props, 'size'> & {
|
|
|
21
21
|
error?: boolean;
|
|
22
22
|
};
|
|
23
23
|
declare function ComboboxInputTrigger({ className, render, showClear, clearLabel, toggleLabel, size, error, ...props }: ComboboxInputTriggerProps): React.JSX.Element;
|
|
24
|
-
declare function ComboboxPortal({ container, ...props }: ComboboxPrimitive.Portal.Props): React.JSX.Element;
|
|
24
|
+
declare function ComboboxPortal({ container, className, ...props }: ComboboxPrimitive.Portal.Props): React.JSX.Element;
|
|
25
25
|
declare function ComboboxPositioner({ className, positionMethod, sideOffset, ...props }: ComboboxPrimitive.Positioner.Props): React.JSX.Element;
|
|
26
26
|
declare function ComboboxPopup({ className, render, ...props }: ComboboxPrimitive.Popup.Props): React.JSX.Element;
|
|
27
27
|
declare function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props): React.JSX.Element;
|
|
@@ -5,10 +5,10 @@ declare function Dialog({ ...props }: DialogPrimitive.Root.Props): React.JSX.Ele
|
|
|
5
5
|
declare function DialogTrigger({ asChild, ...props }: DialogPrimitive.Trigger.Props & {
|
|
6
6
|
asChild?: boolean;
|
|
7
7
|
}): React.JSX.Element;
|
|
8
|
-
declare function DialogPortal({ container, ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
|
|
8
|
+
declare function DialogPortal({ container, className, ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
|
|
9
9
|
declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
|
|
10
10
|
declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
|
|
11
|
-
declare function DialogContent({ className, container, children, showCloseButton, onFocusCapture, ...props }: DialogPrimitive.Popup.Props & {
|
|
11
|
+
declare function DialogContent({ className, container, children, showCloseButton, onFocusCapture, finalFocus: finalFocusProp, ...props }: DialogPrimitive.Popup.Props & {
|
|
12
12
|
showCloseButton?: boolean;
|
|
13
13
|
} & {
|
|
14
14
|
container?: ThemePortalContainer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function OverlayLayer({ children }: {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}): React.JSX.Element;
|
|
5
|
+
declare function useInsideOverlayLayer(): boolean;
|
|
6
|
+
type FinalFocus = boolean | React.RefObject<HTMLElement | null> | ((closeType: never) => boolean | HTMLElement | null | void);
|
|
7
|
+
/**
|
|
8
|
+
* Returns focus to the element that opened the modal. Base UI returns it to the
|
|
9
|
+
* nested parent instead, and under the sidebar drawer owner that parent is closed,
|
|
10
|
+
* so focus fell to the body. Like the default, it leaves focus alone when the app
|
|
11
|
+
* already moved it outside the popup (a confirm that focuses an editor). An
|
|
12
|
+
* explicit `finalFocus` still wins.
|
|
13
|
+
*/
|
|
14
|
+
declare function useOpenerFinalFocus<T extends FinalFocus | undefined>(finalFocus: T): {
|
|
15
|
+
capture: React.JSX.Element;
|
|
16
|
+
finalFocus: (() => boolean | HTMLElement) | NonNullable<T>;
|
|
17
|
+
};
|
|
18
|
+
export { OverlayLayer, useInsideOverlayLayer, useOpenerFinalFocus };
|
|
@@ -8,9 +8,13 @@ declare function SheetTrigger({ asChild, ...props }: SheetPrimitive.Trigger.Prop
|
|
|
8
8
|
declare function SheetClose({ asChild, ...props }: SheetPrimitive.Close.Props & {
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
}): React.JSX.Element;
|
|
11
|
-
declare function SheetContent({ className, container, children, side, showCloseButton, onFocusCapture, ...props }: SheetPrimitive.Popup.Props & {
|
|
11
|
+
declare function SheetContent({ className, container, children, side, showCloseButton, forceRenderBackdrop, backdropClassName, onFocusCapture, finalFocus: finalFocusProp, ...props }: SheetPrimitive.Popup.Props & {
|
|
12
12
|
side?: "top" | "right" | "bottom" | "left";
|
|
13
13
|
showCloseButton?: boolean;
|
|
14
|
+
/** @internal Render the native backdrop for an embedded sidebar root. */
|
|
15
|
+
forceRenderBackdrop?: boolean;
|
|
16
|
+
/** @internal Position the existing native backdrop within a sidebar frame. */
|
|
17
|
+
backdropClassName?: string;
|
|
14
18
|
} & {
|
|
15
19
|
container?: ThemePortalContainer;
|
|
16
20
|
}): React.JSX.Element;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type SidebarPanelId = 'primary' | 'secondary' | 'aside';
|
|
3
|
+
export type SidebarPresentation = 'docked' | 'drawer';
|
|
4
|
+
export type SidebarCollapseMode = 'offcanvas' | 'icon' | 'none';
|
|
5
|
+
export declare const sidebarDockThresholds: {
|
|
6
|
+
readonly primary: 768;
|
|
7
|
+
readonly secondary: 1024;
|
|
8
|
+
readonly aside: 1440;
|
|
9
|
+
};
|
|
10
|
+
export interface SidebarStateProps {
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
adaptTo?: 'viewport' | 'container';
|
|
13
|
+
open?: boolean;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
/** Controlled expanded desktop panels. Takes precedence over the legacy primary `open` prop. */
|
|
16
|
+
openPanels?: readonly SidebarPanelId[];
|
|
17
|
+
/** Initial uncontrolled desktop panels. Otherwise `defaultOpen` initializes primary only. */
|
|
18
|
+
defaultOpenPanels?: readonly SidebarPanelId[];
|
|
19
|
+
/** Receives an isolated desktop-state proposal; primary changes also notify `onOpenChange`. */
|
|
20
|
+
onOpenPanelsChange?: (panels: SidebarPanelId[]) => void;
|
|
21
|
+
/** Controlled active undocked panel, or null. Independent of remembered desktop expansion. */
|
|
22
|
+
mobilePanel?: SidebarPanelId | null;
|
|
23
|
+
/** Receives drawer selection and dismissal proposals, including removal or return to docked presentation. */
|
|
24
|
+
onMobilePanelChange?: (panel: SidebarPanelId | null) => void;
|
|
25
|
+
/** Default target for untargeted triggers and the keyboard shortcut. @default 'primary' */
|
|
26
|
+
navigationPanel?: 'primary' | 'secondary';
|
|
27
|
+
/** Ctrl/Command key for navigationPanel; false disables it. Editable fields and overlays retain their shortcuts. @default 'b' */
|
|
28
|
+
keyboardShortcut?: string | false;
|
|
29
|
+
}
|
|
30
|
+
type RegionRegistration = {
|
|
31
|
+
dockAt: number;
|
|
32
|
+
width?: number;
|
|
33
|
+
collapsible?: SidebarCollapseMode;
|
|
34
|
+
};
|
|
35
|
+
export interface SidebarScopeValue {
|
|
36
|
+
panelId: SidebarPanelId;
|
|
37
|
+
geometry?: 'panel' | 'rail';
|
|
38
|
+
side?: 'left' | 'right';
|
|
39
|
+
setCollapse?: (value: {
|
|
40
|
+
collapsible: SidebarCollapseMode;
|
|
41
|
+
variant: 'sidebar' | 'floating' | 'inset';
|
|
42
|
+
} | null) => void;
|
|
43
|
+
}
|
|
44
|
+
export declare const SidebarScopeContext: React.Context<SidebarScopeValue | null>;
|
|
45
|
+
export declare const SidebarScope: React.Provider<SidebarScopeValue | null>;
|
|
46
|
+
type SidebarStore = {
|
|
47
|
+
openPanels: readonly SidebarPanelId[];
|
|
48
|
+
mobilePanel: SidebarPanelId | null;
|
|
49
|
+
navigationPanel: SidebarPanelId;
|
|
50
|
+
adaptTo: 'viewport' | 'container';
|
|
51
|
+
hostRef: React.RefObject<HTMLDivElement | null>;
|
|
52
|
+
getPresentation: (panelId: SidebarPanelId) => SidebarPresentation;
|
|
53
|
+
getCollapseMode: (panelId: SidebarPanelId) => SidebarCollapseMode | undefined;
|
|
54
|
+
setPanelOpen: (panelId: SidebarPanelId, value: boolean | ((open: boolean) => boolean)) => void;
|
|
55
|
+
setPanelOpenMobile: (panelId: SidebarPanelId, value: React.SetStateAction<boolean>) => void;
|
|
56
|
+
setMobilePanel: (value: SidebarPanelId | null) => void;
|
|
57
|
+
togglePanel: (panelId: SidebarPanelId) => void;
|
|
58
|
+
registerRegion: (panelId: SidebarPanelId, region: RegionRegistration | null) => void;
|
|
59
|
+
triggerFor: (panelId: SidebarPanelId) => HTMLElement | null;
|
|
60
|
+
rememberTrigger: (panelId: SidebarPanelId, element: HTMLElement) => void;
|
|
61
|
+
};
|
|
62
|
+
export declare function useSidebarStore(): SidebarStore | null;
|
|
63
|
+
export declare function useSidebar(panelId?: SidebarPanelId): {
|
|
64
|
+
panelId: SidebarPanelId;
|
|
65
|
+
side: "left" | "right";
|
|
66
|
+
state: "expanded" | "collapsed";
|
|
67
|
+
open: boolean;
|
|
68
|
+
setOpen: (value: boolean | ((open: boolean) => boolean)) => void;
|
|
69
|
+
/** Whether the selected desktop panel is collapsed; drawers expose expanded content. */
|
|
70
|
+
collapsed: boolean;
|
|
71
|
+
/** Effective presentation for the selected panel, including its own docking threshold. */
|
|
72
|
+
presentation: SidebarPresentation;
|
|
73
|
+
isMobile: boolean;
|
|
74
|
+
openMobile: boolean;
|
|
75
|
+
setOpenMobile: (value: React.SetStateAction<boolean>) => void;
|
|
76
|
+
toggleSidebar: () => void;
|
|
77
|
+
openPanels: readonly SidebarPanelId[];
|
|
78
|
+
mobilePanel: SidebarPanelId | null;
|
|
79
|
+
setMobilePanel: (value: SidebarPanelId | null) => void;
|
|
80
|
+
};
|
|
81
|
+
export declare function SidebarProvider({ defaultOpen, adaptTo, open, onOpenChange, openPanels, defaultOpenPanels, onOpenPanelsChange, mobilePanel: controlledMobilePanel, onMobilePanelChange, navigationPanel, keyboardShortcut, ref: forwardedRef, className, style, children, ...props }: React.ComponentProps<'div'> & SidebarStateProps): React.JSX.Element;
|
|
82
|
+
export {};
|
|
@@ -5,28 +5,16 @@ import { Button } from "./button";
|
|
|
5
5
|
import { Input } from "./input";
|
|
6
6
|
import { Separator } from "./separator";
|
|
7
7
|
import { TooltipContent } from "./tooltip";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
open: boolean;
|
|
11
|
-
setOpen: (open: boolean) => void;
|
|
12
|
-
openMobile: boolean;
|
|
13
|
-
setOpenMobile: (open: boolean) => void;
|
|
14
|
-
isMobile: boolean;
|
|
15
|
-
toggleSidebar: () => void;
|
|
16
|
-
};
|
|
17
|
-
declare function useSidebar(): SidebarContextProps;
|
|
18
|
-
declare function SidebarProvider({ defaultOpen, adaptTo, ref: forwardedRef, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
|
|
19
|
-
defaultOpen?: boolean;
|
|
20
|
-
adaptTo?: "viewport" | "container";
|
|
21
|
-
open?: boolean;
|
|
22
|
-
onOpenChange?: (open: boolean) => void;
|
|
23
|
-
}): React.JSX.Element;
|
|
8
|
+
import { SidebarProvider, useSidebar } from "./sidebar-state";
|
|
9
|
+
import { type SidebarPanelId } from "./sidebar-state";
|
|
24
10
|
declare function Sidebar({ side, variant, collapsible, className, children, dir, ...props }: React.ComponentProps<"div"> & {
|
|
25
11
|
side?: "left" | "right";
|
|
26
12
|
variant?: "sidebar" | "floating" | "inset";
|
|
27
13
|
collapsible?: "offcanvas" | "icon" | "none";
|
|
28
14
|
}): React.JSX.Element;
|
|
29
|
-
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>
|
|
15
|
+
declare function SidebarTrigger({ className, onClick, panelId, children, ...props }: React.ComponentProps<typeof Button> & {
|
|
16
|
+
panelId?: SidebarPanelId;
|
|
17
|
+
}): React.JSX.Element;
|
|
30
18
|
declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
31
19
|
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
|
|
32
20
|
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./utils-
|
|
2
|
+
import { t as e } from "./utils-B6kKb8jB.js";
|
|
3
3
|
import { t } from "./focus-recipes-B653VaLq.js";
|
|
4
4
|
import { o as n } from "./structure.recipes-BB4-n58V.js";
|
|
5
5
|
import { n as r, t as i } from "./composition.recipes-COdiFhxB.js";
|
|
@@ -57,39 +57,47 @@ var p = o(function({ className: t, gap: i, render: a, ...o }, s) {
|
|
|
57
57
|
p.displayName = "Section";
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/components/layout/containers/two-column-layout.tsx
|
|
60
|
-
var m =
|
|
61
|
-
|
|
60
|
+
var m = {
|
|
61
|
+
default: "@3xl:grid-cols-[minmax(0,2fr)_minmax(18rem,1fr)]",
|
|
62
|
+
"7/5": "@3xl:grid-cols-[minmax(0,7fr)_minmax(0,5fr)]",
|
|
63
|
+
"8/4": "@3xl:grid-cols-[minmax(0,8fr)_minmax(0,4fr)]"
|
|
64
|
+
}, h = {
|
|
65
|
+
default: "lg:grid-cols-[minmax(0,2fr)_minmax(18rem,1fr)]",
|
|
66
|
+
"7/5": "lg:grid-cols-[minmax(0,7fr)_minmax(0,5fr)]",
|
|
67
|
+
"8/4": "lg:grid-cols-[minmax(0,8fr)_minmax(0,4fr)]"
|
|
68
|
+
}, g = o(function({ header: t, main: n, aside: r, footer: a, stickyAside: o = !1, adaptTo: d = "viewport", ratio: f, slotProps: p, className: g, render: _, ...v }, y) {
|
|
69
|
+
let { className: b, ...x } = p?.header ?? {}, { className: S, ...C } = p?.main ?? {}, { className: w, ...T } = p?.aside ?? {}, { className: E, ...D } = p?.footer ?? {};
|
|
62
70
|
return u({
|
|
63
71
|
defaultTagName: "div",
|
|
64
|
-
ref:
|
|
65
|
-
render:
|
|
72
|
+
ref: y,
|
|
73
|
+
render: _,
|
|
66
74
|
props: {
|
|
67
|
-
...
|
|
75
|
+
...v,
|
|
68
76
|
"data-slot": "two-column-layout",
|
|
69
|
-
className: e("two-column-layout--component grid min-w-0 grid-cols-1", i.subjects, d === "container" ? "
|
|
77
|
+
className: e("two-column-layout--component grid min-w-0 grid-cols-1", i.subjects, d === "container" ? m[f ?? "default"] : h[f ?? "default"], g),
|
|
70
78
|
children: /* @__PURE__ */ l(s, { children: [
|
|
71
79
|
t == null ? null : /* @__PURE__ */ c("div", {
|
|
72
|
-
...
|
|
80
|
+
...x,
|
|
73
81
|
"data-slot": "two-column-layout-header",
|
|
74
|
-
className: e("two-column-layout--header col-span-full min-w-0",
|
|
82
|
+
className: e("two-column-layout--header col-span-full min-w-0", b),
|
|
75
83
|
children: t
|
|
76
84
|
}),
|
|
77
85
|
/* @__PURE__ */ c("div", {
|
|
78
|
-
...
|
|
86
|
+
...C,
|
|
79
87
|
"data-slot": "two-column-layout-main",
|
|
80
|
-
className: e("two-column-layout--main flex min-h-0 min-w-0 flex-col", i.subjects,
|
|
88
|
+
className: e("two-column-layout--main flex min-h-0 min-w-0 flex-col", i.subjects, S),
|
|
81
89
|
children: n
|
|
82
90
|
}),
|
|
83
91
|
/* @__PURE__ */ c("aside", {
|
|
84
|
-
...
|
|
92
|
+
...T,
|
|
85
93
|
"data-slot": "two-column-layout-aside",
|
|
86
|
-
className: e("two-column-layout--aside flex min-h-0 min-w-0 flex-col", i.subjects, o && (d === "container" ? "@3xl:sticky @3xl:top-space-2xl @3xl:self-start" : "lg:sticky lg:top-space-2xl lg:self-start"),
|
|
94
|
+
className: e("two-column-layout--aside flex min-h-0 min-w-0 flex-col", i.subjects, o && (d === "container" ? "@3xl:sticky @3xl:top-space-2xl @3xl:self-start" : "lg:sticky lg:top-space-2xl lg:self-start"), w),
|
|
87
95
|
children: r
|
|
88
96
|
}),
|
|
89
97
|
a == null ? null : /* @__PURE__ */ c("div", {
|
|
90
|
-
...
|
|
98
|
+
...D,
|
|
91
99
|
"data-slot": "two-column-layout-footer",
|
|
92
|
-
className: e("two-column-layout--footer col-span-full min-w-0",
|
|
100
|
+
className: e("two-column-layout--footer col-span-full min-w-0", E),
|
|
93
101
|
children: a
|
|
94
102
|
})
|
|
95
103
|
] })
|
|
@@ -97,8 +105,8 @@ var m = o(function({ header: t, main: n, aside: r, footer: a, stickyAside: o = !
|
|
|
97
105
|
state: {}
|
|
98
106
|
});
|
|
99
107
|
});
|
|
100
|
-
|
|
108
|
+
g.displayName = "TwoColumnLayout";
|
|
101
109
|
//#endregion
|
|
102
|
-
export { d as i, p as n, f as r,
|
|
110
|
+
export { d as i, p as n, f as r, g as t };
|
|
103
111
|
|
|
104
|
-
//# sourceMappingURL=containers-
|
|
112
|
+
//# sourceMappingURL=containers-CIxwbZt5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containers-CIxwbZt5.js","names":["_Fragment","cn","stackRecipe","compositionRhythm","compositionClasses","containerRecipe","Fragment$1","Container","forwardRef","props","useRender","className","PageViewport","focusRecipes","Section","gap","containerColumnRecipes","viewportColumnRecipes","TwoColumnLayout","headerClassName","headerProps","slotProps","mainClassName","mainProps","asideClassName","asideProps","footerClassName","footerProps","adaptTo","ratio","header","main","stickyAside","aside","footer"],"sources":["../src/components/layout/containers/content-container.tsx","../src/components/layout/containers/page-viewport.tsx","../src/components/layout/containers/section.tsx","../src/components/layout/containers/two-column-layout.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nimport { containerRecipe } from './container.recipes';\nimport type { ContainerProps } from './containers.types';\n\n/** Container — one centered content-width and inline-gutter owner. */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(function Container(\n\t{ className, maxWidth, gutter, render, ...props },\n\tref,\n) {\n\treturn useRender({\n\t\tdefaultTagName: 'div',\n\t\tref,\n\t\trender,\n\t\tprops: {\n\t\t\t...props,\n\t\t\tclassName: cn('container--component @container/content', containerRecipe({ maxWidth, gutter }), className),\n\t\t},\n\t\tstate: {},\n\t});\n});\n\nContainer.displayName = 'Container';\n","import { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nimport type { PageViewportProps } from './containers.types';\nimport { focusRecipes } from '../../../lib/focus-recipes';\n\n/** PageViewport — the single page-scroll and page-container-query owner. */\nexport const PageViewport = forwardRef<HTMLDivElement, PageViewportProps>(function PageViewport(\n\t{ className, render, tabIndex = 0, ...props },\n\tref,\n) {\n\treturn useRender({\n\t\tdefaultTagName: 'div',\n\t\tref,\n\t\trender,\n\t\tprops: {\n\t\t\t...props,\n\t\t\ttabIndex,\n\t\t\tclassName: cn(\n\t\t\t\t`page-viewport--component min-h-0 min-w-0 flex-1 overflow-auto overscroll-contain [scrollbar-gutter:stable] @container/page focus-visible:outline-none ${focusRecipes.inset}`,\n\t\t\t\tclassName,\n\t\t\t),\n\t\t},\n\t\tstate: {},\n\t});\n});\n\nPageViewport.displayName = 'PageViewport';\n","import { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\n\nimport { stackRecipe } from '../../base/structure/structure.recipes';\nimport {compositionRhythm} from '../../base/structure/composition.recipes';\nimport { cn } from '../../../lib/utils';\n\nimport type { SectionProps } from './containers.types';\n\n/** Section — a semantic vertical-rhythm owner for page content groups. */\nexport const Section = forwardRef<HTMLElement, SectionProps>(function Section(\n\t{ className, gap, render, ...props },\n\tref,\n) {\n\treturn useRender({\n\t\tdefaultTagName: 'section',\n\t\tref,\n\t\trender,\n\t\tprops: {\n\t\t\t...props,\n\t\t\tclassName: cn('section--component', stackRecipe({ gap: gap ?? compositionRhythm.related }), className),\n\t\t},\n\t\tstate: {},\n\t});\n});\n\nSection.displayName = 'Section';\n","import { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\nimport type { ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport {compositionClasses} from '../../base/structure/composition.recipes';\nimport type { LayoutSlotAttributes } from '../layout.types';\n\nexport interface TwoColumnLayoutSlotProps {\n\theader?: LayoutSlotAttributes<HTMLDivElement>;\n\tmain?: LayoutSlotAttributes<HTMLDivElement>;\n\taside?: LayoutSlotAttributes<HTMLElement>;\n\tfooter?: LayoutSlotAttributes<HTMLDivElement>;\n}\n\nexport interface TwoColumnLayoutProps extends useRender.ComponentProps<'div'> {\n\t/** Optional content spanning both columns before the work regions. */\n\theader?: ReactNode;\n\t/** Primary detail, form, or index content. */\n\tmain: ReactNode;\n\t/** Secondary summary, support, or action rail. */\n\taside: ReactNode;\n\t/** Optional content spanning both columns after the work regions. */\n\tfooter?: ReactNode;\n\t/** Keep the aside visible while the nearest page viewport scrolls. */\n\tstickyAside?: boolean;\n\t/** Preserve viewport breakpoints by default, or adapt inside Container/PageViewport. */\n\tadaptTo?: 'viewport' | 'container';\n\t/** Optional main/aside proportions; omission preserves the established flexible 2/1 split. */\n\tratio?: '7/5' | '8/4';\n\t/** Native attributes for each stable region. */\n\tslotProps?: TwoColumnLayoutSlotProps;\n}\n\nconst containerColumnRecipes = {\n\tdefault: '@3xl:grid-cols-[minmax(0,2fr)_minmax(18rem,1fr)]',\n\t'7/5': '@3xl:grid-cols-[minmax(0,7fr)_minmax(0,5fr)]',\n\t'8/4': '@3xl:grid-cols-[minmax(0,8fr)_minmax(0,4fr)]',\n} as const;\nconst viewportColumnRecipes = {\n\tdefault: 'lg:grid-cols-[minmax(0,2fr)_minmax(18rem,1fr)]',\n\t'7/5': 'lg:grid-cols-[minmax(0,7fr)_minmax(0,5fr)]',\n\t'8/4': 'lg:grid-cols-[minmax(0,8fr)_minmax(0,4fr)]',\n} as const;\n\n/** TwoColumnLayout — one truthful, stable-order main/aside grid. */\nexport const TwoColumnLayout = forwardRef<HTMLDivElement, TwoColumnLayoutProps>(\n\tfunction TwoColumnLayout(\n\t\t{\n\t\t\theader,\n\t\t\tmain,\n\t\t\taside,\n\t\t\tfooter,\n\t\t\tstickyAside = false,\n\t\t\tadaptTo = 'viewport',\n\t\t\tratio,\n\t\t\tslotProps,\n\t\t\tclassName,\n\t\t\trender,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\n\t\tconst { className: headerClassName, ...headerProps } = slotProps?.header ?? {};\n\t\tconst { className: mainClassName, ...mainProps } = slotProps?.main ?? {};\n\t\tconst { className: asideClassName, ...asideProps } = slotProps?.aside ?? {};\n\t\tconst { className: footerClassName, ...footerProps } = slotProps?.footer ?? {};\n\n\t\treturn useRender({\n\t\t\tdefaultTagName: 'div',\n\t\t\tref,\n\t\t\trender,\n\t\t\tprops: {\n\t\t\t\t...props,\n\t\t\t\t'data-slot': 'two-column-layout',\n\t\t\t\tclassName: cn(\n\t\t\t\t\t'two-column-layout--component grid min-w-0 grid-cols-1', compositionClasses.subjects,\n\t\t\t\t\tadaptTo === 'container' ? containerColumnRecipes[ratio ?? 'default'] : viewportColumnRecipes[ratio ?? 'default'],\n\t\t\t\t\tclassName,\n\t\t\t\t),\n\t\t\t\tchildren: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{header !== undefined && header !== null ? (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t{...headerProps}\n\t\t\t\t\t\t\t\tdata-slot=\"two-column-layout-header\"\n\t\t\t\t\t\t\t\tclassName={cn('two-column-layout--header col-span-full min-w-0', headerClassName)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{header}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t{...mainProps}\n\t\t\t\t\t\t\tdata-slot=\"two-column-layout-main\"\n\t\t\t\t\t\t\tclassName={cn('two-column-layout--main flex min-h-0 min-w-0 flex-col', compositionClasses.subjects, mainClassName)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{main}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<aside\n\t\t\t\t\t\t\t{...asideProps}\n\t\t\t\t\t\t\tdata-slot=\"two-column-layout-aside\"\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'two-column-layout--aside flex min-h-0 min-w-0 flex-col', compositionClasses.subjects,\n\t\t\t\t\t\t\t\tstickyAside && (adaptTo === 'container' ? '@3xl:sticky @3xl:top-space-2xl @3xl:self-start' : 'lg:sticky lg:top-space-2xl lg:self-start'),\n\t\t\t\t\t\t\t\tasideClassName,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{aside}\n\t\t\t\t\t\t</aside>\n\t\t\t\t\t\t{footer !== undefined && footer !== null ? (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t{...footerProps}\n\t\t\t\t\t\t\t\tdata-slot=\"two-column-layout-footer\"\n\t\t\t\t\t\t\t\tclassName={cn('two-column-layout--footer col-span-full min-w-0', footerClassName)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{footer}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t},\n\t\t\tstate: {},\n\t\t});\n\t},\n);\n\nTwoColumnLayout.displayName = 'TwoColumnLayout';\n"],"mappings":";;;;;;;;;;AASA,IAAaO,IAAYC,EAA2C,SACnE,EAAE,cAAW,aAAU,WAAQ,WAAQ,GAAGC,KAC1C,GACC;CACD,OAAOC,EAAU;EAChB,gBAAgB;EAChB;EACA;EACA,OAAO;GACN,GAAGD;GACH,WAAWR,EAAG,2CAA2CI,EAAgB;IAAE;IAAU;GAAO,CAAC,GAAGM,CAAS;EAC1G;EACA,OAAO,CAAC;CACT,CAAC;AACF,CAAC;AAED,EAAU,cAAc;;;AChBxB,IAAaC,IAAeJ,EAA8C,SACzE,EAAE,cAAW,WAAQ,cAAW,GAAG,GAAGC,KACtC,GACC;CACD,OAAOC,EAAU;EAChB,gBAAgB;EAChB;EACA;EACA,OAAO;GACN,GAAGD;GACH;GACA,WAAWR,EACV,yJAAyJY,EAAa,SACtKF,CACD;EACD;EACA,OAAO,CAAC;CACT,CAAC;AACF,CAAC;AAED,EAAa,cAAc;;;ACnB3B,IAAaG,IAAUN,EAAsC,SAC5D,EAAE,cAAW,QAAK,WAAQ,GAAGC,KAC7B,GACC;CACD,OAAOC,EAAU;EAChB,gBAAgB;EAChB;EACA;EACA,OAAO;GACN,GAAGD;GACH,WAAWR,EAAG,sBAAsBC,EAAY,EAAE,KAAKa,KAAOZ,EAAkB,QAAQ,CAAC,GAAGQ,CAAS;EACtG;EACA,OAAO,CAAC;CACT,CAAC;AACF,CAAC;AAED,EAAQ,cAAc;;;ACQtB,IAAMK,IAAyB;CAC9B,SAAS;CACT,OAAO;CACP,OAAO;AACR,GACMC,IAAwB;CAC7B,SAAS;CACT,OAAO;CACP,OAAO;AACR,GAGaC,IAAkBV,EAC9B,SACC,EACC,WACA,SACA,UACA,WACA,iBAAc,IACd,aAAU,YACV,UACA,cACA,cACA,WACA,GAAGC,KAEJ,GACC;CACD,IAAM,EAAE,WAAWU,GAAiB,GAAGC,MAAgBC,GAAW,UAAU,CAAC,GACvE,EAAE,WAAWC,GAAe,GAAGC,MAAcF,GAAW,QAAQ,CAAC,GACjE,EAAE,WAAWG,GAAgB,GAAGC,MAAeJ,GAAW,SAAS,CAAC,GACpE,EAAE,WAAWK,GAAiB,GAAGC,MAAgBN,GAAW,UAAU,CAAC;CAE7E,OAAOX,EAAU;EAChB,gBAAgB;EAChB;EACA;EACA,OAAO;GACN,GAAGD;GACH,aAAa;GACb,WAAWR,EACV,yDAAyDG,EAAmB,UAC5EwB,MAAY,cAAcZ,EAAuBa,KAAS,aAAaZ,EAAsBY,KAAS,YACtGlB,CACD;GACA,UACC,kBAAAX,GAAA,EAAA,UAAA;IACE8B,KAAmC,OAQhC,OAPH,kBAAC,OAAD;KACC,GAAIV;KACJ,aAAU;KACV,WAAWnB,EAAG,mDAAmDkB,CAAe;KAE/E,UAAAW;IACG,CAAA;IAEN,kBAAC,OAAD;KACC,GAAIP;KACJ,aAAU;KACV,WAAWtB,EAAG,yDAAyDG,EAAmB,UAAUkB,CAAa;KAEhH,UAAAS;IACG,CAAA;IACL,kBAAC,SAAD;KACC,GAAIN;KACJ,aAAU;KACV,WAAWxB,EACV,0DAA0DG,EAAmB,UAC7E4B,MAAgBJ,MAAY,cAAc,mDAAmD,6CAC7FJ,CACD;KAEC,UAAAS;IACK,CAAA;IACNC,KAAmC,OAQhC,OAPH,kBAAC,OAAD;KACC,GAAIP;KACJ,aAAU;KACV,WAAW1B,EAAG,mDAAmDyB,CAAe;KAE/E,UAAAQ;IACG,CAAA;GAEL,EAAA,CAAA;EAEJ;EACA,OAAO,CAAC;CACT,CAAC;AACF,CACD;AAEA,EAAgB,cAAc"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/lib/control-group-recipes.ts
|
|
2
2
|
var e = {
|
|
3
|
-
frame: "box-border inline-flex h-control shrink-0 items-stretch rounded-
|
|
4
|
-
item: "!h-full min-h-0 rounded-
|
|
5
|
-
joinedFrame: "box-border inline-flex h-control shrink-0 items-stretch overflow-hidden rounded-
|
|
3
|
+
frame: "box-border inline-flex h-control shrink-0 items-stretch rounded-radius bg-muted p-space-2xs",
|
|
4
|
+
item: "!h-full min-h-0 rounded-radius",
|
|
5
|
+
joinedFrame: "box-border inline-flex h-control shrink-0 items-stretch overflow-hidden rounded-radius border border-input",
|
|
6
6
|
joinedItem: "!h-full min-h-0 rounded-none",
|
|
7
|
-
firstItem: "rounded-s-
|
|
8
|
-
lastItem: "rounded-e-
|
|
7
|
+
firstItem: "rounded-s-radius",
|
|
8
|
+
lastItem: "rounded-e-radius"
|
|
9
9
|
}, t = {
|
|
10
10
|
sm: "h-control-sm",
|
|
11
11
|
md: "h-control",
|
|
@@ -18,4 +18,4 @@ var e = {
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { n, e as r, t };
|
|
20
20
|
|
|
21
|
-
//# sourceMappingURL=control-group-recipes-
|
|
21
|
+
//# sourceMappingURL=control-group-recipes-fMuFo0H7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-group-recipes-fMuFo0H7.js","names":["segmentedControlRecipes","controlGroupHeightClasses","controlGroupSquareClasses"],"sources":["../src/lib/control-group-recipes.ts"],"sourcesContent":["import type { ComponentScale } from './component-vocabulary';\n\n/** One field-height boundary for segmented and joined toolbar controls.\n * Children fit the frame's content box; their action-height token is not added\n * to the field height, border or inset a second time.\n */\nexport const segmentedControlRecipes = {\n\tframe: 'box-border inline-flex h-control shrink-0 items-stretch rounded-radius bg-muted p-space-2xs',\n\titem: '!h-full min-h-0 rounded-radius',\n\tjoinedFrame: 'box-border inline-flex h-control shrink-0 items-stretch overflow-hidden rounded-radius border border-input',\n\tjoinedItem: '!h-full min-h-0 rounded-none',\n\tfirstItem: 'rounded-s-radius',\n\tlastItem: 'rounded-e-radius',\n} as const;\n\nexport const controlGroupHeightClasses = {\n\tsm: 'h-control-sm',\n\tmd: 'h-control',\n\tlg: 'h-control-lg',\n} satisfies Record<ComponentScale, string>;\n\nexport const controlGroupSquareClasses = {\n\tsm: 'size-control-sm',\n\tmd: 'size-control',\n\tlg: 'size-control-lg',\n} satisfies Record<ComponentScale, string>;\n"],"mappings":";AAMA,IAAaA,IAA0B;CACtC,OAAO;CACP,MAAM;CACN,aAAa;CACb,YAAY;CACZ,WAAW;CACX,UAAU;AACX,GAEaC,IAA4B;CACxC,IAAI;CACJ,IAAI;CACJ,IAAI;AACL,GAEaC,IAA4B;CACxC,IAAI;CACJ,IAAI;CACJ,IAAI;AACL"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useStrings as e } from "./lib/strings.js";
|
|
3
|
-
import { t } from "./utils-
|
|
4
|
-
import { n } from "./buttons-
|
|
5
|
-
import { c as r } from "./typography-
|
|
3
|
+
import { t } from "./utils-B6kKb8jB.js";
|
|
4
|
+
import { n } from "./buttons-BedGfygC.js";
|
|
5
|
+
import { c as r } from "./typography-BQnine1k.js";
|
|
6
6
|
import { forwardRef as i, useEffect as a, useState as o } from "react";
|
|
7
7
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
8
|
import { Check as l, Copy as u } from "lucide-react";
|
|
@@ -32,10 +32,10 @@ var f = {
|
|
|
32
32
|
className: t("copyable--component group inline-flex min-w-0 items-center gap-space-sm", h && "max-w-full", g),
|
|
33
33
|
...S,
|
|
34
34
|
children: [/* @__PURE__ */ s("span", {
|
|
35
|
-
className: "copyable--content min-w-0
|
|
35
|
+
className: "copyable--content min-w-0",
|
|
36
36
|
children: O ? p : /* @__PURE__ */ s(r, {
|
|
37
37
|
tag: "span",
|
|
38
|
-
className: t(m && "font-mono", h && "block truncate",
|
|
38
|
+
className: t(m && "font-mono", h && "block truncate", _),
|
|
39
39
|
children: p ?? i
|
|
40
40
|
})
|
|
41
41
|
}), /* @__PURE__ */ s(n, {
|
|
@@ -47,7 +47,7 @@ var f = {
|
|
|
47
47
|
buttonStyle: "ghost",
|
|
48
48
|
"aria-label": A ?? (T ? w.copiedLabel : w.copyLabel),
|
|
49
49
|
onClick: () => void D(),
|
|
50
|
-
className: t("copyable--trigger shrink-0 text-
|
|
50
|
+
className: t("copyable--trigger shrink-0 text-muted-foreground hover:text-foreground focus-visible:text-foreground", k),
|
|
51
51
|
children: T ? /* @__PURE__ */ s(l, {
|
|
52
52
|
className: "size-icon-sm text-success",
|
|
53
53
|
"aria-hidden": "true"
|
|
@@ -62,4 +62,4 @@ p.displayName = "Copyable";
|
|
|
62
62
|
//#endregion
|
|
63
63
|
export { f as n, p as t };
|
|
64
64
|
|
|
65
|
-
//# sourceMappingURL=copyable-
|
|
65
|
+
//# sourceMappingURL=copyable-DIznBqiT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copyable-
|
|
1
|
+
{"version":3,"file":"copyable-DIznBqiT.js","names":["Text","defaultCopyableStrings","Copyable","forwardRef","stringsProp","props","strings","useStrings","copied","setCopied","useState","timeout","handleCopy","value","toast","onCopy","error","onError","hasRichDisplayValue","displayValue","buttonClassName","buttonAriaLabel","copyButtonProps","buttonProps","cn","truncate","className","mono","contentClassName","Button","Check","Copy"],"sources":["../src/components/base/copyable/copyable.tsx"],"sourcesContent":["import { Check, Copy } from 'lucide-react';\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseState,\n\ttype ComponentPropsWithoutRef,\n\ttype ReactNode,\n} from 'react';\n\nimport { toast } from 'sonner';\n\nimport { Button, type ButtonActionProps } from '../buttons';\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nexport interface CopyableStrings {\n\tcopyLabel: string;\n\tcopiedLabel: string;\n\tsuccess: string;\n\terror: string;\n}\n\nexport const defaultCopyableStrings: CopyableStrings = {\n\tcopyLabel: 'Copy value',\n\tcopiedLabel: 'Copied',\n\tsuccess: 'Copied to clipboard',\n\terror: 'Failed to copy',\n};\n\nexport interface CopyableProps extends Omit<\n\tComponentPropsWithoutRef<'span'>,\n\t'children' | 'onCopy' | 'onError'\n> {\n\t/** Value written to the clipboard. */\n\tvalue: string;\n\t/** Optional display content when it differs from the copied value. */\n\tdisplayValue?: ReactNode;\n\t/** Use monospace typography for scalar display content. */\n\tmono?: boolean;\n\t/** Truncate scalar display content with an ellipsis at the width the caller allots. */\n\ttruncate?: boolean;\n\t/** Classes for the scalar display-content wrapper. */\n\tcontentClassName?: string;\n\t/** Classes and native action props for the dedicated copy button. */\n\tbuttonProps?: Omit<ButtonActionProps, 'children' | 'onClick' | 'type'>;\n\t/** Localizable copy affordance and toast copy. */\n\tstrings?: StringsProp<CopyableStrings>;\n\t/** Called after the Clipboard API successfully writes the value. */\n\tonCopy?: (value: string) => void;\n\t/** Called when the Clipboard API rejects the write. */\n\tonError?: (error: unknown) => void;\n}\n\n/**\n * Copyable keeps display content passive and renders a sibling copy button.\n * This permits rich display nodes such as Email or Url without nesting one\n * interactive element inside another.\n */\nexport const Copyable = forwardRef<HTMLSpanElement, CopyableProps>(function Copyable({\n\tvalue,\n\tdisplayValue,\n\tmono = false,\n\ttruncate = false,\n\tclassName,\n\tcontentClassName,\n\tbuttonProps,\n\tstrings: stringsProp,\n\tonCopy,\n\tonError,\n\t...props\n}, ref) {\n\tconst strings = useStrings(defaultCopyableStrings, stringsProp);\n\tconst [copied, setCopied] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (!copied) return;\n\t\tconst timeout = window.setTimeout(() => setCopied(false), 2000);\n\t\treturn () => window.clearTimeout(timeout);\n\t}, [copied]);\n\n\tconst handleCopy = async () => {\n\t\ttry {\n\t\t\tawait navigator.clipboard.writeText(value);\n\t\t\tsetCopied(true);\n\t\t\ttoast.success(strings.success);\n\t\t\tonCopy?.(value);\n\t\t} catch (error) {\n\t\t\ttoast.error(strings.error);\n\t\t\tonError?.(error);\n\t\t}\n\t};\n\n\tconst isSimpleText =\n\t\ttypeof displayValue === 'string' ||\n\t\ttypeof displayValue === 'number' ||\n\t\ttypeof displayValue === 'bigint';\n\tconst hasRichDisplayValue = displayValue !== undefined && !isSimpleText;\n\tconst {\n\t\tclassName: buttonClassName,\n\t\t'aria-label': buttonAriaLabel,\n\t\t...copyButtonProps\n\t} = buttonProps ?? {};\n\n\treturn (\n\t\t<span\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t'copyable--component group inline-flex min-w-0 items-center gap-space-sm',\n\t\t\t\t// An inline-flex root sizes to its content, so without this it grew\n\t\t\t\t// past the width the caller allotted and took the copy button out of\n\t\t\t\t// view with it. Capping the root is what gives the content something\n\t\t\t\t// to truncate against; `block` on the value below is the other half.\n\t\t\t\ttruncate && 'max-w-full',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{/* A copyable value is not a link: it keeps the surrounding ink, and rich\n\t\t\t display nodes such as Email or Url keep their own link styling. */}\n\t\t\t<span className=\"copyable--content min-w-0\">\n\t\t\t\t{hasRichDisplayValue ? (\n\t\t\t\t\tdisplayValue\n\t\t\t\t) : (\n\t\t\t\t\t<Text\n\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tmono && 'font-mono',\n\t\t\t\t\t\t\t// `block` is load-bearing: Text renders a <span>, and overflow\n\t\t\t\t\t\t\t// and max-width do not apply to a non-replaced inline box, so\n\t\t\t\t\t\t\t// `truncate` alone set only white-space and the value ran past\n\t\t\t\t\t\t\t// its container with no ellipsis. Truncating against the width\n\t\t\t\t\t\t\t// the caller allots also retires a hardcoded max-w-[300px],\n\t\t\t\t\t\t\t// which no consumer token could reach.\n\t\t\t\t\t\t\ttruncate && 'block truncate',\n\t\t\t\t\t\t\tcontentClassName,\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{displayValue ?? value}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t</span>\n\t\t\t<Button\n\t\t\t\t{...copyButtonProps}\n\t\t\t\ttype=\"button\"\n\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\taria-label={buttonAriaLabel ?? (copied ? strings.copiedLabel : strings.copyLabel)}\n\t\t\t\tonClick={() => void handleCopy()}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t// The copy glyph is a quiet affordance in the secondary ink until hovered.\n\t\t\t\t\t'copyable--trigger shrink-0 text-muted-foreground hover:text-foreground focus-visible:text-foreground',\n\t\t\t\t\tbuttonClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{copied ? (\n\t\t\t\t\t<Check className=\"size-icon-sm text-success\" aria-hidden=\"true\" />\n\t\t\t\t) : (\n\t\t\t\t\t<Copy className=\"size-icon-sm\" aria-hidden=\"true\" />\n\t\t\t\t)}\n\t\t\t</Button>\n\t\t</span>\n\t);\n});\n\nCopyable.displayName = 'Copyable';\n"],"mappings":";;;;;;;;;;AAuBA,IAAaC,IAA0C;CACtD,WAAW;CACX,aAAa;CACb,SAAS;CACT,OAAO;AACR,GA+BaC,IAAWC,EAA2C,SAAkB,EACpF,UACA,iBACA,UAAO,IACP,cAAW,IACX,cACA,qBACA,gBACA,SAASC,GACT,WACA,YACA,GAAGC,KACD,GAAK;CACP,IAAMC,IAAUC,EAAWN,GAAwBG,CAAW,GACxD,CAACI,GAAQC,KAAaC,EAAS,EAAK;CAE1C,QAAgB;EACf,IAAI,CAACF,GAAQ;EACb,IAAMG,IAAU,OAAO,iBAAiBF,EAAU,EAAK,GAAG,GAAI;EAC9D,aAAa,OAAO,aAAaE,CAAO;CACzC,GAAG,CAACH,CAAM,CAAC;CAEX,IAAMI,IAAa,YAAY;EAC9B,IAAI;GAIH,AAHA,MAAM,UAAU,UAAU,UAAUC,CAAK,GACzCJ,EAAU,EAAI,GACdK,EAAM,QAAQR,EAAQ,OAAO,GAC7BS,IAASF,CAAK;EACf,SAASG,GAAO;GAEf,AADAF,EAAM,MAAMR,EAAQ,KAAK,GACzBW,IAAUD,CAAK;EAChB;CACD,GAMME,IAAsBC,MAAiB,KAAA,KAH5C,OAAOA,KAAiB,YACxB,OAAOA,KAAiB,YACxB,OAAOA,KAAiB,UAEnB,EACL,WAAWC,GACX,cAAcC,GACd,GAAGC,MACAC,KAAe,CAAC;CAEpB,OACC,kBAAC,QAAD;EACM;EACL,WAAWC,EACV,2EAKAC,KAAY,cACZC,CACD;EACA,GAAIrB;EAXL,UAAA,CAeC,kBAAC,QAAD;GAAM,WAAU;GACd,UAAAa,IACAC,IAEA,kBAACnB,GAAD;IACC,KAAI;IACJ,WAAWwB,EACVG,KAAQ,aAORF,KAAY,kBACZG,CACD;IAEC,UAAAT,KAAgBN;GACZ,CAAA;EAEF,CAAA,GACN,kBAACgB,GAAD;GACC,GAAIP;GACJ,MAAK;GACL,MAAK;GAAK,UAAA;GACV,MAAK;GACL,aAAY;GACZ,cAAYD,MAAoBb,IAASF,EAAQ,cAAcA,EAAQ;GACvE,eAAe,KAAKM,EAAW;GAC/B,WAAWY,EAEV,wGACAJ,CACD;GAEC,UAAAZ,IACA,kBAACsB,GAAD;IAAO,WAAU;IAA4B,eAAY;GAAQ,CAAA,IAEjE,kBAACC,GAAD;IAAM,WAAU;IAAe,eAAY;GAAQ,CAAA;EAE7C,CAAA,CACH;;AAER,CAAC;AAED,EAAS,cAAc"}
|