themelia-react-ui 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/MIGRATION.md +119 -0
- package/README.md +13 -6
- package/dist/{accordion-B9MHG0cT.js → accordion-0tQUZ20r.js} +7 -7
- package/dist/accordion-0tQUZ20r.js.map +1 -0
- package/dist/{action-menu-Dr8K-ghE.js → action-menu-C0gjzLyE.js} +7 -7
- package/dist/{action-menu-Dr8K-ghE.js.map → action-menu-C0gjzLyE.js.map} +1 -1
- package/dist/{ai-artifact-C58tQcBy.js → ai-artifact-CGGpQryR.js} +172 -157
- package/dist/ai-artifact-CGGpQryR.js.map +1 -0
- package/dist/{app-shell-B_IuNWOo.js → app-shell-EHuuRDGy.js} +5 -5
- package/dist/{app-shell-B_IuNWOo.js.map → app-shell-EHuuRDGy.js.map} +1 -1
- package/dist/{attachment-Dg_69lPS.js → attachment-BCpA4e7i.js} +8 -8
- package/dist/{attachment-Dg_69lPS.js.map → attachment-BCpA4e7i.js.map} +1 -1
- package/dist/{auth-DTkkshS8.js → auth-B0girIk_.js} +15 -15
- package/dist/auth-B0girIk_.js.map +1 -0
- package/dist/{avatar-CeZaFmNH.js → avatar-B9Jnp-T-.js} +3 -3
- package/dist/{avatar-CeZaFmNH.js.map → avatar-B9Jnp-T-.js.map} +1 -1
- package/dist/{badge-xIiV_E7f.js → badge-wWauMgAt.js} +3 -3
- package/dist/{badge-xIiV_E7f.js.map → badge-wWauMgAt.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +1 -1
- 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 +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +8 -8
- 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 +6 -6
- 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 +195 -188
- 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/skeleton.js +1 -1
- package/dist/base/spinner.js +5 -5
- package/dist/base/spinner.js.map +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +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-Cb8cuvyy.js → batch-action-bar-BoqWIIpV.js} +5 -5
- package/dist/{batch-action-bar-Cb8cuvyy.js.map → batch-action-bar-BoqWIIpV.js.map} +1 -1
- package/dist/blocks/admin.js +17 -17
- package/dist/blocks/ai.js +227 -221
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +424 -449
- 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 +225 -220
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-J-K2kl4c.js → breadcrumbs-Bp9Ke7kd.js} +4 -4
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
- package/dist/{button-S2Cubiiz.js → button-ChBovTx0.js} +2 -2
- package/dist/{button-S2Cubiiz.js.map → button-ChBovTx0.js.map} +1 -1
- package/dist/{buttons-BedGfygC.js → buttons-DeW0bQeK.js} +6 -6
- package/dist/{buttons-BedGfygC.js.map → buttons-DeW0bQeK.js.map} +1 -1
- package/dist/{cards-rNX1M4Xn.js → cards-CNXnmvV5.js} +8 -8
- package/dist/{cards-rNX1M4Xn.js.map → cards-CNXnmvV5.js.map} +1 -1
- package/dist/{cascader-B1MiqkBq.js → cascader-CrAl9zD5.js} +15 -15
- package/dist/{cascader-B1MiqkBq.js.map → cascader-CrAl9zD5.js.map} +1 -1
- package/dist/{chart-Darg_0Kv.js → chart-I7ROnsl8.js} +5 -5
- package/dist/{chart-Darg_0Kv.js.map → chart-I7ROnsl8.js.map} +1 -1
- package/dist/{checkbox-fflqmODR.js → checkbox-MoyHIAPs.js} +3 -3
- package/dist/{checkbox-fflqmODR.js.map → checkbox-MoyHIAPs.js.map} +1 -1
- package/dist/{choice-inputs-zUgBZfE4.js → choice-inputs-DHGtx0QV.js} +122 -110
- package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
- package/dist/{code-block-BzmM9Eig.js → code-block-BSJyq9e-.js} +7 -7
- package/dist/{code-block-BzmM9Eig.js.map → code-block-BSJyq9e-.js.map} +1 -1
- package/dist/{collapsible-BkAI_XD4.js → collapsible-BzJ91LUG.js} +3 -3
- package/dist/{collapsible-BkAI_XD4.js.map → collapsible-BzJ91LUG.js.map} +1 -1
- package/dist/{collection-content-gDh1v6O4.js → collection-content-CSnwtOTH.js} +3 -3
- package/dist/{collection-content-gDh1v6O4.js.map → collection-content-CSnwtOTH.js.map} +1 -1
- package/dist/{combobox-BEx0vJgF.js → combobox-Bcvu5J8O.js} +11 -10
- package/dist/{combobox-BEx0vJgF.js.map → combobox-Bcvu5J8O.js.map} +1 -1
- package/dist/combobox-C2JiSQPc.js +915 -0
- package/dist/combobox-C2JiSQPc.js.map +1 -0
- package/dist/{command-CrlPIL6m.js → command-9e52NPgK.js} +6 -6
- package/dist/{command-CrlPIL6m.js.map → command-9e52NPgK.js.map} +1 -1
- package/dist/{comments-Dmpp0YIc.js → comments-BsgErEqd.js} +33 -28
- package/dist/comments-BsgErEqd.js.map +1 -0
- package/dist/components/base/choice-inputs/choice-types.d.ts +4 -0
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
- package/dist/components/base/combobox/combobox-field.d.ts +2 -2
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
- package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
- package/dist/components/base/feedback/state-display.d.ts +5 -1
- package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
- package/dist/components/base/forms/form-field.d.ts +7 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
- package/dist/components/base/navigation/language-switcher.d.ts +12 -4
- package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
- package/dist/components/base/sidebar/sidebar.d.ts +2 -0
- package/dist/components/base/upload/avatar-upload.d.ts +2 -1
- package/dist/components/base/upload/image-upload.d.ts +2 -1
- package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +2 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
- package/dist/components/blocks/analytics/types.d.ts +2 -2
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
- package/dist/components/features/activities/activities.types.d.ts +18 -11
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
- package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
- package/dist/components/features/combobox/combobox.d.ts +2 -2
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
- package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
- package/dist/components/features/combobox/types.d.ts +37 -8
- package/dist/components/features/email-composer/types.d.ts +3 -1
- package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
- package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -3
- package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +4 -2
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/utils/filter-utils.d.ts +5 -1
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +6 -0
- package/dist/components/features/media-library/media-library.types.d.ts +36 -8
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
- package/dist/components/features/products/products.types.d.ts +2 -2
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +1 -1
- package/dist/components/features/resource/resource.types.d.ts +2 -0
- package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
- package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -0
- package/dist/components/features/table/table-body.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +6 -3
- package/dist/components/features/table/table.strings.d.ts +3 -0
- package/dist/components/features/table/table.types.d.ts +17 -1
- package/dist/components/layout/header/header.types.d.ts +3 -2
- package/dist/components/layout/layout.types.d.ts +5 -3
- package/dist/components/layout/navigation/side-nav.d.ts +3 -2
- package/dist/components/layout/normalize-layout-path.d.ts +1 -0
- package/dist/components/layout/settings/settings.d.ts +1 -1
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +3 -1
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.types.d.ts +2 -0
- package/dist/components/primitives/link.d.ts +3 -2
- package/dist/components/primitives/money.d.ts +1 -1
- package/dist/components/primitives/number.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
- package/dist/{containers-CIxwbZt5.js → containers-CSdc32h9.js} +2 -2
- package/dist/{containers-CIxwbZt5.js.map → containers-CSdc32h9.js.map} +1 -1
- package/dist/{copyable-DIznBqiT.js → copyable-3fdHfMR3.js} +4 -4
- package/dist/{copyable-DIznBqiT.js.map → copyable-3fdHfMR3.js.map} +1 -1
- package/dist/{data-display-BdgCAw8T.js → data-display-Cmj-xZYl.js} +16 -15
- package/dist/data-display-Cmj-xZYl.js.map +1 -0
- package/dist/{date-Cq8ioE4o.js → date-Br0FicVv.js} +4 -4
- package/dist/{date-Cq8ioE4o.js.map → date-Br0FicVv.js.map} +1 -1
- package/dist/date-picker-CyQlFYsP.js +1617 -0
- package/dist/date-picker-CyQlFYsP.js.map +1 -0
- package/dist/date-pickers-tj2MXmXd.js +185 -0
- package/dist/date-pickers-tj2MXmXd.js.map +1 -0
- package/dist/{display-KsZLw9Ov.js → display-CT_N2a3w.js} +7 -7
- package/dist/{display-KsZLw9Ov.js.map → display-CT_N2a3w.js.map} +1 -1
- package/dist/{dropdown-menu-CLs8Lihj.js → dropdown-menu-C08iIugv.js} +6 -6
- package/dist/{dropdown-menu-CLs8Lihj.js.map → dropdown-menu-C08iIugv.js.map} +1 -1
- package/dist/features/activities.js +283 -270
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +40 -27
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +126 -126
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +24 -19
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +129 -125
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +16 -20
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +18 -28
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +331 -314
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1044 -866
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +2 -2
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +978 -964
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +159 -152
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +74 -71
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +28 -19
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +297 -256
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +57 -50
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +400 -399
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-Dzo1xtAU.js +246 -0
- package/dist/feedback-Dzo1xtAU.js.map +1 -0
- package/dist/{field-affordance-recipes-DWcNcOjh.js → field-affordance-recipes-D6H7tVJi.js} +2 -2
- package/dist/{field-affordance-recipes-DWcNcOjh.js.map → field-affordance-recipes-D6H7tVJi.js.map} +1 -1
- package/dist/field-control-attributes-B6i335wr.js +18 -0
- package/dist/field-control-attributes-B6i335wr.js.map +1 -0
- package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
- package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
- package/dist/{filters-DzgSJpMK.js → filters-Dl80yYtN.js} +763 -605
- package/dist/filters-Dl80yYtN.js.map +1 -0
- package/dist/form-field-CAPdwdnZ.js +74 -0
- package/dist/form-field-CAPdwdnZ.js.map +1 -0
- package/dist/{form-sizing-Bs2qFUeE.js → form-sizing-CgcrUbLU.js} +2 -2
- package/dist/{form-sizing-Bs2qFUeE.js.map → form-sizing-CgcrUbLU.js.map} +1 -1
- package/dist/{forms-C0RGnJTe.js → forms-B3W8CH7-.js} +8 -8
- package/dist/{forms-C0RGnJTe.js.map → forms-B3W8CH7-.js.map} +1 -1
- package/dist/forms-numeric-CwjQJe-O.js +991 -0
- package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
- package/dist/{header-DMMxG__r.js → header-ZIIsRKxP.js} +113 -113
- package/dist/header-ZIIsRKxP.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-DB6CJ4MR.js → hooks-BitHSh-Y.js} +3 -3
- package/dist/{hooks-DB6CJ4MR.js.map → hooks-BitHSh-Y.js.map} +1 -1
- package/dist/{icon-badge-DZF-YjQp.js → icon-badge-npxF1SLX.js} +2 -2
- package/dist/{icon-badge-DZF-YjQp.js.map → icon-badge-npxF1SLX.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{input-CvyDQlY7.js → input-7KAc7XQL.js} +6 -6
- package/dist/{input-CvyDQlY7.js.map → input-7KAc7XQL.js.map} +1 -1
- package/dist/{input-DMBwAZmr.js → input-DIREVYHs.js} +3 -3
- package/dist/{input-DMBwAZmr.js.map → input-DIREVYHs.js.map} +1 -1
- package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
- package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
- package/dist/{item-DjCcM18E.js → item-FfWnaYST.js} +99 -98
- package/dist/item-FfWnaYST.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +11 -11
- package/dist/layout.types-E_GAApzO.js +30 -0
- package/dist/layout.types-E_GAApzO.js.map +1 -0
- package/dist/lib/field-control-attributes.d.ts +11 -0
- package/dist/lib/field-state-recipes.d.ts +2 -0
- package/dist/lib/format.d.ts +1 -0
- package/dist/lib/surface-recipes.d.ts +1 -1
- package/dist/lib/token-merge.generated.d.ts +6 -6
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-C-vChPmE.js → media-gallery-C81DAnKI.js} +6 -6
- package/dist/{media-gallery-C-vChPmE.js.map → media-gallery-C81DAnKI.js.map} +1 -1
- package/dist/{mentions-0_4nWuI-.js → mentions-qOnedSt4.js} +236 -167
- package/dist/mentions-qOnedSt4.js.map +1 -0
- package/dist/message-BJHnn43M.js +135 -0
- package/dist/message-BJHnn43M.js.map +1 -0
- package/dist/{metadata-list-C3MkU-Om.js → metadata-list-XkqZ_UXH.js} +11 -11
- package/dist/{metadata-list-C3MkU-Om.js.map → metadata-list-XkqZ_UXH.js.map} +1 -1
- package/dist/{navigation-DaRjthVk.js → navigation-BgtPJAhi.js} +119 -119
- package/dist/navigation-BgtPJAhi.js.map +1 -0
- package/dist/{navigation-C90-oQFq.js → navigation-Bt-v7rWP.js} +52 -46
- package/dist/navigation-Bt-v7rWP.js.map +1 -0
- package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
- package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
- package/dist/{number-CRU3kGuk.js → number-CYqBcrSj.js} +78 -86
- package/dist/number-CYqBcrSj.js.map +1 -0
- package/dist/{overflow-tab-bar-IVFVQFV6.js → overflow-tab-bar-BQCA2Zn2.js} +7 -7
- package/dist/{overflow-tab-bar-IVFVQFV6.js.map → overflow-tab-bar-BQCA2Zn2.js.map} +1 -1
- package/dist/{overlays-BSgCtM2v.js → overlays-CC8zI3Du.js} +264 -260
- package/dist/overlays-CC8zI3Du.js.map +1 -0
- package/dist/{page-DUUKDAjo.js → page-BoQ1VaFJ.js} +13 -13
- package/dist/{page-DUUKDAjo.js.map → page-BoQ1VaFJ.js.map} +1 -1
- package/dist/{page-header-commands-7P3sfE9u.js → page-header-commands-DIKspJfx.js} +4 -4
- package/dist/{page-header-commands-7P3sfE9u.js.map → page-header-commands-DIKspJfx.js.map} +1 -1
- package/dist/{pagination-CgCjElfu.js → pagination-Br8TdV9A.js} +4 -4
- package/dist/{pagination-CgCjElfu.js.map → pagination-Br8TdV9A.js.map} +1 -1
- package/dist/{popover-B85RenIl.js → popover-k8TdUcAt.js} +10 -10
- package/dist/popover-k8TdUcAt.js.map +1 -0
- package/dist/{popover-menu-DlnQ2zlR.js → popover-menu-yn-o0kyA.js} +7 -7
- package/dist/{popover-menu-DlnQ2zlR.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
- package/dist/{popover.recipes-DdiEp0rd.js → popover.recipes-DJ0AkUan.js} +2 -2
- package/dist/{popover.recipes-DdiEp0rd.js.map → popover.recipes-DJ0AkUan.js.map} +1 -1
- package/dist/{portal-recipes-BpsV_iRw.js → portal-recipes-DyUXqUtD.js} +2 -2
- package/dist/{portal-recipes-BpsV_iRw.js.map → portal-recipes-DyUXqUtD.js.map} +1 -1
- package/dist/{primitives-ByWgGUgt.js → primitives-BkkQjYl7.js} +22 -17
- package/dist/primitives-BkkQjYl7.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-BJhQP9WX.js → progress-DZFXXzPs.js} +4 -4
- package/dist/{progress-BJhQP9WX.js.map → progress-DZFXXzPs.js.map} +1 -1
- package/dist/{receipt-tOc7B3hw.js → receipt-C7LhOg7Q.js} +6 -6
- package/dist/{receipt-tOc7B3hw.js.map → receipt-C7LhOg7Q.js.map} +1 -1
- package/dist/rich-text-BnTzZjIo.js +45 -0
- package/dist/rich-text-BnTzZjIo.js.map +1 -0
- package/dist/rich-text-editor-CAurDwT5.js +1273 -0
- package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-laT3tpBT.js → rich-text-editor-toolbar-DbXig7Jk.js} +36 -35
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
- package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
- package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
- package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
- package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
- package/dist/{scroll-area-B0dB2cBi.js → scroll-area-Bj6CRUif.js} +2 -2
- package/dist/{scroll-area-B0dB2cBi.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
- package/dist/{separator-Bb17I4pu.js → separator-B9ewiCGO.js} +2 -2
- package/dist/{separator-Bb17I4pu.js.map → separator-B9ewiCGO.js.map} +1 -1
- package/dist/{separator-Ct_WSWTJ.js → separator-DM6gs2vu.js} +3 -3
- package/dist/{separator-Ct_WSWTJ.js.map → separator-DM6gs2vu.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-DZPHgpx4.js +155 -0
- package/dist/settings-DZPHgpx4.js.map +1 -0
- package/dist/{sheet-BGPERY55.js → sheet-C4DHsgLk.js} +6 -6
- package/dist/{sheet-BGPERY55.js.map → sheet-C4DHsgLk.js.map} +1 -1
- package/dist/sidebar-C8BnDwTH.js +709 -0
- package/dist/sidebar-C8BnDwTH.js.map +1 -0
- package/dist/{sidebar-f9gRWXIR.js → sidebar-CmD6a-HK.js} +16 -13
- package/dist/sidebar-CmD6a-HK.js.map +1 -0
- package/dist/{skeleton-BapcJd9C.js → skeleton-DDgdhmu9.js} +5 -5
- package/dist/{skeleton-BapcJd9C.js.map → skeleton-DDgdhmu9.js.map} +1 -1
- package/dist/{smart-card-CW0hjetE.js → smart-card-B6vLxqa_.js} +8 -8
- package/dist/{smart-card-CW0hjetE.js.map → smart-card-B6vLxqa_.js.map} +1 -1
- package/dist/{structure-DuxKl954.js → structure-DZJ2wbAU.js} +2 -2
- package/dist/{structure-DuxKl954.js.map → structure-DZJ2wbAU.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
- package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
- package/dist/{table-CFOWY9pQ.js → table-CBonSdTp.js} +534 -486
- package/dist/table-CBonSdTp.js.map +1 -0
- package/dist/{table-B4TE7iOV.js → table-CXSPHH25.js} +75 -71
- package/dist/table-CXSPHH25.js.map +1 -0
- package/dist/{tabs-e7ko9S2o.js → tabs-C4Kr_hCr.js} +50 -49
- package/dist/tabs-C4Kr_hCr.js.map +1 -0
- package/dist/{text-inputs-B1culiSK.js → text-inputs-jdkS3ReG.js} +9 -9
- package/dist/{text-inputs-B1culiSK.js.map → text-inputs-jdkS3ReG.js.map} +1 -1
- package/dist/{timelines-D3Sl9ueq.js → timelines-CoPwdJP0.js} +10 -10
- package/dist/{timelines-D3Sl9ueq.js.map → timelines-CoPwdJP0.js.map} +1 -1
- package/dist/{tooltip-8wz5S_Zr.js → tooltip-31NwIpTo.js} +4 -4
- package/dist/{tooltip-8wz5S_Zr.js.map → tooltip-31NwIpTo.js.map} +1 -1
- package/dist/{tree-CzUJHnFs.js → tree-CeYVzdFE.js} +6 -6
- package/dist/{tree-CzUJHnFs.js.map → tree-CeYVzdFE.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-BQnine1k.js → typography-C7-YMW1S.js} +2 -2
- package/dist/{typography-BQnine1k.js.map → typography-C7-YMW1S.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/{upload-BOW6U2tI.js → upload-Hdm5gObf.js} +303 -291
- package/dist/upload-Hdm5gObf.js.map +1 -0
- package/dist/{upload-queue-qUXn1ykN.js → upload-queue-D0sYPuqo.js} +8 -8
- package/dist/{upload-queue-qUXn1ykN.js.map → upload-queue-D0sYPuqo.js.map} +1 -1
- package/dist/{usage-card-BeSLY0i0.js → usage-card-9s8hLDfn.js} +9 -9
- package/dist/{usage-card-BeSLY0i0.js.map → usage-card-9s8hLDfn.js.map} +1 -1
- package/dist/{utils-B6kKb8jB.js → utils-DhuoqFy4.js} +31 -37
- package/dist/utils-DhuoqFy4.js.map +1 -0
- package/dist/{value-inputs-skdVB2zh.js → value-inputs-D3aPgq9H.js} +15 -15
- package/dist/{value-inputs-skdVB2zh.js.map → value-inputs-D3aPgq9H.js.map} +1 -1
- package/dist/{value-typography-uAmWUAL1.js → value-typography-uSzzG9Gf.js} +32 -26
- package/dist/value-typography-uSzzG9Gf.js.map +1 -0
- package/dist/{workspace-DHeHv0qw.js → workspace-CC8Vchiu.js} +12 -12
- package/dist/{workspace-DHeHv0qw.js.map → workspace-CC8Vchiu.js.map} +1 -1
- package/docs/consumer-skill/examples/edit.tsx +3 -3
- package/docs/consumer-skill/references/agents-md.md +19 -19
- package/docs/consumer-skill/references/analytics.md +15 -0
- package/docs/consumer-skill/references/component-contracts.json +14724 -13057
- package/docs/consumer-skill/references/composition.md +21 -4
- package/docs/consumer-skill/references/design-contract.md +1 -0
- package/docs/consumer-skill/references/installation.md +51 -8
- package/docs/consumer-skill/references/integration.md +24 -1
- package/docs/consumer-skill/references/public-api.json +172 -34
- package/docs/consumer-skill/references/review.md +51 -11
- package/docs/consumer-skill/references/rhf-workflows.md +72 -0
- package/docs/consumer-skill/references/theming.md +7 -2
- package/docs/consumer-skill/references/tokens.json +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +144 -30
- package/docs/consumer-skill/scripts/setup-skills.mjs +46 -9
- package/package.json +4 -2
- package/templates/admin-shell-template.tsx +1 -2
- package/templates/customers-template.tsx +18 -16
- package/dist/accordion-B9MHG0cT.js.map +0 -1
- package/dist/ai-artifact-C58tQcBy.js.map +0 -1
- package/dist/auth-DTkkshS8.js.map +0 -1
- package/dist/breadcrumbs-J-K2kl4c.js.map +0 -1
- package/dist/choice-inputs-zUgBZfE4.js.map +0 -1
- package/dist/combobox-BwzoXFSG.js +0 -884
- package/dist/combobox-BwzoXFSG.js.map +0 -1
- package/dist/comments-Dmpp0YIc.js.map +0 -1
- package/dist/data-display-BdgCAw8T.js.map +0 -1
- package/dist/date-picker-RlIzKom_.js +0 -1551
- package/dist/date-picker-RlIzKom_.js.map +0 -1
- package/dist/date-pickers-DY-CpXS1.js +0 -179
- package/dist/date-pickers-DY-CpXS1.js.map +0 -1
- package/dist/feedback-Dm4izqFn.js +0 -240
- package/dist/feedback-Dm4izqFn.js.map +0 -1
- package/dist/filters-DzgSJpMK.js.map +0 -1
- package/dist/form-field-BriWAXyg.js +0 -63
- package/dist/form-field-BriWAXyg.js.map +0 -1
- package/dist/forms-numeric-DIhghX1Q.js +0 -910
- package/dist/forms-numeric-DIhghX1Q.js.map +0 -1
- package/dist/header-DMMxG__r.js.map +0 -1
- package/dist/item-DjCcM18E.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/mentions-0_4nWuI-.js.map +0 -1
- package/dist/message-g8p7eVtN.js +0 -128
- package/dist/message-g8p7eVtN.js.map +0 -1
- package/dist/navigation-C90-oQFq.js.map +0 -1
- package/dist/navigation-DaRjthVk.js.map +0 -1
- package/dist/number-CRU3kGuk.js.map +0 -1
- package/dist/overlays-BSgCtM2v.js.map +0 -1
- package/dist/popover-B85RenIl.js.map +0 -1
- package/dist/primitives-ByWgGUgt.js.map +0 -1
- package/dist/rich-text-Dth5E882.js +0 -78
- package/dist/rich-text-Dth5E882.js.map +0 -1
- package/dist/rich-text-editor-C1fOjBTd.js +0 -1195
- package/dist/rich-text-editor-C1fOjBTd.js.map +0 -1
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +0 -1
- package/dist/safe-image-src-C6kQSMBZ.js +0 -17
- package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
- package/dist/sanitize-html-DsQmI48u.js.map +0 -1
- package/dist/settings-Bar5wiSo.js +0 -167
- package/dist/settings-Bar5wiSo.js.map +0 -1
- package/dist/sidebar-D-JYMMbY.js +0 -686
- package/dist/sidebar-D-JYMMbY.js.map +0 -1
- package/dist/sidebar-f9gRWXIR.js.map +0 -1
- package/dist/table-B4TE7iOV.js.map +0 -1
- package/dist/table-CFOWY9pQ.js.map +0 -1
- package/dist/tabs-e7ko9S2o.js.map +0 -1
- package/dist/upload-BOW6U2tI.js.map +0 -1
- package/dist/utils-B6kKb8jB.js.map +0 -1
- package/dist/value-typography-uAmWUAL1.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-BapcJd9C.js","names":["Skeleton","PrimitiveSkeleton","React","cn","neutralFillRecipes","React$1","Skeleton$1","props","className","LINE_WIDTHS","TABLE_WIDTHS","clampCount","value","fallback","max","lineWidth","widths","index","skeletonAriaHidden","SkeletonFrame","Card","contentClassName","SkeletonCardHeader","Skeleton","description","action","MetricCardSkeleton","DetailRowSkeleton","DetailCardSkeleton","lineCount","lines","dense","SidebarCardSkeleton","TableResourceCellSkeleton","row","ContentSkeleton","avatar","lineWidths","PageSkeleton","statCount","stats","sectionCount","sections","actionCount","actions","tabs","sectionLines","children","TwoColumnPageSkeleton","mainCount","mainSections","sidebarCount","sidebarSections","mainLines","sidebarLines","tableEdgeInset","TableSkeleton","rowCount","rows","columnCount","columns","columnIndexes","toolbar","column","footer"],"sources":["../src/components/ui/skeleton.tsx","../src/components/base/skeleton/skeleton.tsx"],"sourcesContent":["import { neutralFillRecipes } from \"../../lib/surface-recipes\"\nimport { cn } from \"../../lib/utils\"\n\n// The translucent chip fill keeps one contrast on every surface, including a\n// sidebar or band that is itself --muted, where a muted bar would disappear.\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn(neutralFillRecipes.chip, \"rounded-radius animate-pulse\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import * as React from 'react';\n\nimport { Card } from '../cards/smart-card';\nimport { Skeleton as PrimitiveSkeleton } from '../../ui/skeleton';\nimport { cn } from '../../../lib/utils';\n\ntype DivProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst LINE_WIDTHS = [\n\t'w-full',\n\t'w-11/12',\n\t'w-10/12',\n\t'w-9/12',\n\t'w-8/12',\n\t'w-7/12',\n] as const;\n\nconst TABLE_WIDTHS = [\n\t'w-24',\n\t'w-36',\n\t'w-28',\n\t'w-20',\n\t'w-32',\n\t'w-16',\n] as const;\n\nconst clampCount = (value: number | undefined, fallback: number, max = 12, allowZero = false) => {\n\tif (!Number.isFinite(value)) return fallback;\n\tconst count = Math.floor(value ?? fallback);\n\treturn Math.max(allowZero ? 0 : 1, Math.min(count, max));\n};\n\nconst lineWidth = (index: number, widths?: readonly string[]) =>\n\twidths?.[index % widths.length] ?? LINE_WIDTHS[index % LINE_WIDTHS.length];\n\nconst skeletonAriaHidden = (props: Pick<DivProps, 'aria-label' | 'aria-labelledby'>) =>\n\tprops['aria-label'] || props['aria-labelledby'] ? undefined : true;\n\nfunction SkeletonFrame({\n\tclassName,\n\tcontentClassName,\n\tchildren,\n}: {\n\tclassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\tchildren: React.ReactNode;\n}) {\n\treturn (\n\t\t<Card\n\t\t\tsurface=\"framed\"\n\t\t\tclassName={className}\n\t\t\tcontentClassName={cn('skeleton-frame--content min-w-0', contentClassName)}\n\t\t>\n\t\t\t{children}\n\t\t</Card>\n\t);\n}\n\nfunction SkeletonCardHeader({\n\tdescription = true,\n\taction = true,\n\tclassName,\n}: {\n\t/** Supporting copy under the title. */\n\tdescription?: boolean;\n\t/** The action this surface performs. */\n\taction?: boolean;\n\tclassName?: string;\n}) {\n\treturn (\n\t\t<div className={cn('flex min-w-0 items-start justify-between gap-space-md', className)}>\n\t\t\t<div className=\"flex min-w-0 flex-1 flex-col gap-space-sm\">\n\t\t\t\t<Skeleton className=\"h-4 w-36 max-w-full\" />\n\t\t\t\t{!!description && <Skeleton className=\"h-3 w-56 max-w-full\" />}\n\t\t\t</div>\n\t\t\t{!!action && <Skeleton className=\"h-action-sm w-20 shrink-0\" />}\n\t\t</div>\n\t);\n}\n\nfunction MetricCardSkeleton({ index }: { index: number }) {\n\treturn (\n\t\t<SkeletonFrame contentClassName=\"flex min-w-0 flex-col gap-space-md\">\n\t\t\t<div className=\"flex items-start justify-between gap-space-md\">\n\t\t\t\t<div className=\"flex min-w-0 flex-col gap-space-sm\">\n\t\t\t\t\t<Skeleton className={cn('h-3 w-20', index % 2 === 0 && 'w-24')} />\n\t\t\t\t\t<Skeleton className={cn('h-5 w-24', index % 3 === 0 && 'w-28')} />\n\t\t\t\t</div>\n\t\t\t\t<Skeleton className=\"size-8 rounded-radius-md\" />\n\t\t\t</div>\n\t\t\t<div className=\"flex items-center gap-space-sm\">\n\t\t\t\t<Skeleton className=\"h-5 w-16\" />\n\t\t\t\t<Skeleton className=\"h-3 w-24\" />\n\t\t\t</div>\n\t\t</SkeletonFrame>\n\t);\n}\n\nfunction DetailRowSkeleton({ index }: { index: number }) {\n\treturn (\n\t\t<div className=\"flex min-w-0 flex-col gap-space-xs\">\n\t\t\t<Skeleton className={cn('h-3 w-20', index % 2 === 0 && 'w-24')} />\n\t\t\t<Skeleton className={cn('h-4 w-36 max-w-full', index % 3 === 0 && 'w-44')} />\n\t\t</div>\n\t);\n}\n\nfunction DetailCardSkeleton({\n\tlines = 4,\n\tdense = false,\n}: {\n\tlines?: number;\n\tdense?: boolean;\n}) {\n\tconst lineCount = clampCount(lines, 4, 8);\n\n\treturn (\n\t\t<SkeletonFrame contentClassName=\"flex min-w-0 flex-col gap-space-lg\">\n\t\t\t<SkeletonCardHeader description={!dense} action={!dense} />\n\t\t\t<div className=\"grid min-w-0 gap-space-md sm:grid-cols-2\">\n\t\t\t\t{Array.from({ length: lineCount }, (_, index) => (\n\t\t\t\t\t<DetailRowSkeleton key={`detail-row-${String(index)}`} index={index} />\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</SkeletonFrame>\n\t);\n}\n\nfunction SidebarCardSkeleton({ lines = 3 }: { lines?: number }) {\n\tconst lineCount = clampCount(lines, 3, 5);\n\n\treturn (\n\t\t<SkeletonFrame contentClassName=\"flex min-w-0 flex-col gap-space-md\">\n\t\t\t<SkeletonCardHeader description={false} action={false} />\n\t\t\t<div className=\"grid min-w-0 gap-space-sm\">\n\t\t\t\t{Array.from({ length: lineCount }, (_, index) => (\n\t\t\t\t\t<div key={`sidebar-line-${String(index)}`} className=\"flex min-w-0 items-center justify-between gap-space-md\">\n\t\t\t\t\t\t<Skeleton className={cn('h-3 w-20', index % 2 === 0 && 'w-24')} />\n\t\t\t\t\t\t<Skeleton className={cn('h-4 w-16', index % 3 === 0 && 'w-20')} />\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</SkeletonFrame>\n\t);\n}\n\nfunction TableResourceCellSkeleton({ row }: { row: number }) {\n\treturn (\n\t\t<div className=\"flex min-w-0 items-center gap-space-sm\">\n\t\t\t<Skeleton className=\"size-avatar rounded-full shrink-0\" />\n\t\t\t<div className=\"flex min-w-0 flex-1 flex-col gap-space-xs\">\n\t\t\t\t<Skeleton className={cn('h-4 w-32 max-w-full', row % 2 === 0 && 'w-40')} />\n\t\t\t\t<Skeleton className=\"h-3 w-24 max-w-full\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport interface SkeletonProps extends React.ComponentPropsWithoutRef<typeof PrimitiveSkeleton> {}\n\nexport function Skeleton({ className, ...props }: SkeletonProps) {\n\treturn (\n\t\t<PrimitiveSkeleton\n\t\t\taria-hidden={skeletonAriaHidden(props)}\n\t\t\tclassName={cn('skeleton--component max-w-full rounded-radius-sm motion-reduce:animate-none', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nSkeleton.displayName = 'Skeleton';\n\nexport interface ContentSkeletonProps extends DivProps {\n\t/** Number of text rows rendered in the content stack. */\n\tlines?: number;\n\t/** Render an avatar/media placeholder before the text stack. */\n\tavatar?: boolean;\n\t/** Render a small action placeholder aligned to the trailing edge. */\n\taction?: boolean;\n\t/** Optional per-line width classes. Keep these as Tailwind width utilities. */\n\tlineWidths?: readonly string[];\n}\n\nexport const ContentSkeleton = React.forwardRef<HTMLDivElement, ContentSkeletonProps>(\n\tfunction ContentSkeleton({\n\t\tlines = 3,\n\t\tavatar = false,\n\t\taction = false,\n\t\tlineWidths,\n\t\tclassName,\n\t\t...props\n\t}, ref) {\n\t\tconst lineCount = clampCount(lines, 3);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\taria-hidden={skeletonAriaHidden(props)}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'content-skeleton--component',\n\t\t\t\t\t'flex w-full min-w-0 items-start gap-space-md',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{!!avatar && <Skeleton className=\"size-avatar rounded-full shrink-0\" />}\n\t\t\t\t<div className=\"content-skeleton--body flex min-w-0 flex-1 flex-col gap-space-sm\">\n\t\t\t\t\t{Array.from({ length: lineCount }, (_, index) => (\n\t\t\t\t\t\t<Skeleton\n\t\t\t\t\t\t\tkey={`content-line-${String(index)}`}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'content-skeleton--line h-4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlineWidth(index, lineWidths),\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t{!!action && <Skeleton className=\"content-skeleton--action h-action-sm w-16 shrink-0\" />}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nContentSkeleton.displayName = 'ContentSkeleton';\n\nexport interface PageSkeletonProps extends DivProps {\n\t/** Number of compact KPI cards below the page header. */\n\tstats?: number;\n\t/** Number of content cards below the optional stats row. */\n\tsections?: number;\n\t/** Number of skeleton lines in each content card. */\n\tsectionLines?: number;\n\t/** Render tab/filter placeholders between the header and content. */\n\ttabs?: boolean;\n\t/** Number of action button placeholders in the page header. */\n\tactions?: number;\n}\n\nexport const PageSkeleton = React.forwardRef<HTMLDivElement, PageSkeletonProps>(\n\tfunction PageSkeleton({\n\t\tstats = 3,\n\t\tsections = 2,\n\t\tsectionLines = 4,\n\t\ttabs = true,\n\t\tactions = 2,\n\t\tclassName,\n\t\tchildren,\n\t\t...props\n\t}, ref) {\n\t\tconst statCount = clampCount(stats, 3, 6, true);\n\t\tconst sectionCount = clampCount(sections, 2, 6, true);\n\t\tconst actionCount = clampCount(actions, 2, 4, true);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\taria-hidden={skeletonAriaHidden(props)}\n\t\t\t\tclassName={cn('page-skeleton--component flex w-full min-w-0 flex-col gap-space-2xl', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<div className=\"page-skeleton--header flex min-w-0 flex-col gap-space-lg md:flex-row md:items-start md:justify-between\">\n\t\t\t\t\t<div className=\"flex min-w-0 flex-1 items-start gap-space-md\">\n\t\t\t\t\t\t<Skeleton className=\"size-avatar-lg rounded-full shrink-0\" />\n\t\t\t\t\t\t<div className=\"flex min-w-0 flex-1 flex-col gap-space-sm\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-5 w-56 max-w-full\" />\n\t\t\t\t\t\t\t<Skeleton className=\"h-4 w-80 max-w-full\" />\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-space-sm pt-space-2xs\">\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-16\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-20\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-14\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex min-w-0 flex-wrap items-center gap-space-sm\">\n\t\t\t\t\t\t{Array.from({ length: actionCount }, (_, index) => (\n\t\t\t\t\t\t\t<Skeleton\n\t\t\t\t\t\t\t\tkey={`page-action-${String(index)}`}\n\t\t\t\t\t\t\t\tclassName={cn('h-action-sm', index === 0 ? 'w-24' : 'size-action-sm')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{!!tabs && (\n\t\t\t\t\t<div className=\"page-skeleton--tabs flex min-w-0 flex-wrap gap-space-sm rounded-surface border border-border bg-card p-surface-xs\">\n\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-32\" />\n\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-28\" />\n\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-36\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{statCount > 0 && (\n\t\t\t\t\t<div className=\"page-skeleton--stats grid min-w-0 gap-space-lg sm:grid-cols-2 lg:grid-cols-3\">\n\t\t\t\t\t\t{Array.from({ length: statCount }, (_, index) => (\n\t\t\t\t\t\t\t<MetricCardSkeleton key={`page-stat-${String(index)}`} index={index} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{sectionCount > 0 && (\n\t\t\t\t\t<div className=\"page-skeleton--sections grid min-w-0 gap-space-lg\">\n\t\t\t\t\t\t{Array.from({ length: sectionCount }, (_, index) => (\n\t\t\t\t\t\t\t<DetailCardSkeleton key={`page-section-${String(index)}`} lines={sectionLines} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nPageSkeleton.displayName = 'PageSkeleton';\n\nexport interface TwoColumnPageSkeletonProps extends DivProps {\n\t/** Number of primary column cards. */\n\tmainSections?: number;\n\t/** Number of secondary column cards. */\n\tsidebarSections?: number;\n\t/** Lines per primary column card. */\n\tmainLines?: number;\n\t/** Lines per secondary column card. */\n\tsidebarLines?: number;\n}\n\nexport const TwoColumnPageSkeleton = React.forwardRef<HTMLDivElement, TwoColumnPageSkeletonProps>(\n\tfunction TwoColumnPageSkeleton({\n\t\tmainSections = 2,\n\t\tsidebarSections = 3,\n\t\tmainLines = 5,\n\t\tsidebarLines = 3,\n\t\tclassName,\n\t\t...props\n\t}, ref) {\n\t\tconst mainCount = clampCount(mainSections, 2, 5);\n\t\tconst sidebarCount = clampCount(sidebarSections, 3, 5);\n\n\t\treturn (\n\t\t\t<PageSkeleton\n\t\t\t\tref={ref}\n\t\t\t\tstats={0}\n\t\t\t\tsections={0}\n\t\t\t\ttabs={false}\n\t\t\t\tclassName={cn('two-column-page-skeleton--component', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<div className=\"two-column-page-skeleton--layout grid min-w-0 gap-space-lg lg:grid-cols-3\">\n\t\t\t\t\t<div className=\"two-column-page-skeleton--main grid min-w-0 gap-space-lg lg:col-span-2\">\n\t\t\t\t\t\t{Array.from({ length: mainCount }, (_, index) => (\n\t\t\t\t\t\t\t<DetailCardSkeleton key={`two-column-main-${String(index)}`} lines={mainLines} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"two-column-page-skeleton--sidebar grid min-w-0 gap-space-lg self-start\">\n\t\t\t\t\t\t{Array.from({ length: sidebarCount }, (_, index) => (\n\t\t\t\t\t\t\t<SidebarCardSkeleton key={`two-column-sidebar-${String(index)}`} lines={sidebarLines} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</PageSkeleton>\n\t\t);\n\t},\n);\n\nTwoColumnPageSkeleton.displayName = 'TwoColumnPageSkeleton';\n\nexport interface TableSkeletonProps extends DivProps {\n\trows?: number;\n\t/** How many columns the grid uses. */\n\tcolumns?: number;\n\ttoolbar?: boolean;\n\t/** Content below the body. */\n\tfooter?: boolean;\n}\n\n// The toolbar, header, rows and footer share one edge: the outer cells take the\n// framed surface's inset, like the toolbar and footer, and inner cells keep the\n// row inset between columns.\nconst tableEdgeInset = 'first:ps-surface last:pe-surface';\n\nexport const TableSkeleton = React.forwardRef<HTMLDivElement, TableSkeletonProps>(\n\tfunction TableSkeleton({\n\t\trows = 6,\n\t\tcolumns = 5,\n\t\ttoolbar = true,\n\t\tfooter = true,\n\t\tclassName,\n\t\t...props\n\t}, ref) {\n\t\tconst rowCount = clampCount(rows, 6, 20);\n\t\tconst columnCount = clampCount(columns, 5, 8);\n\t\tconst columnIndexes = Array.from({ length: columnCount }, (_, index) => index);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\taria-hidden={skeletonAriaHidden(props)}\n\t\t\t\tclassName={cn('table-skeleton--component', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<Card\n\t\t\t\t\tsurface=\"framed\"\n\t\t\t\t\tclassName=\"overflow-hidden\"\n\t\t\t\t\tpadding=\"none\"\n\t\t\t\t>\n\t\t\t\t\t{!!toolbar && (\n\t\t\t\t\t\t<div className=\"table-skeleton--toolbar flex min-w-0 items-center justify-between gap-space-md border-b border-border/60 px-surface py-row-y-lg\">\n\t\t\t\t\t\t\t<div className=\"flex min-w-0 flex-1 items-center gap-space-sm\">\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-control-sm w-56 max-w-full\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"hidden h-action-sm w-24 sm:block\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"hidden shrink-0 items-center gap-space-sm sm:flex\">\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-20\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"size-action-sm\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"table-skeleton--scroll overflow-x-auto\">\n\t\t\t\t\t\t<table className=\"w-full min-w-full table-fixed border-collapse\">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr className=\"border-b border-border/60\">\n\t\t\t\t\t\t\t\t\t{columnIndexes.map((column) => (\n\t\t\t\t\t\t\t\t\t\t<th key={`table-head-${String(column)}`} className={cn('h-control px-row-x text-start align-middle', tableEdgeInset)}>\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton className={cn('h-4', TABLE_WIDTHS[column % TABLE_WIDTHS.length])} />\n\t\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t{Array.from({ length: rowCount }, (_, row) => (\n\t\t\t\t\t\t\t\t\t<tr key={`table-row-${String(row)}`} className=\"border-b border-border/60 last:border-b-0\">\n\t\t\t\t\t\t\t\t\t\t{columnIndexes.map((column) => (\n\t\t\t\t\t\t\t\t\t\t\t<td key={`table-cell-${String(row)}-${String(column)}`} className={cn('px-row-x py-row-y align-middle', tableEdgeInset)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{column === 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableResourceCellSkeleton row={row} />\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Skeleton\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'h-4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTABLE_WIDTHS[(row + column) % TABLE_WIDTHS.length],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t\t{!!footer && (\n\t\t\t\t\t\t<div className=\"table-skeleton--footer flex flex-wrap items-center justify-between gap-space-md border-t border-border/60 px-surface py-row-y-lg\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-4 w-32\" />\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-space-sm\">\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-20\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-20\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nTableSkeleton.displayName = 'TableSkeleton';\n"],"mappings":";;;;;;;AAKA,SAASA,EAAS,EAAE,cAAW,GAAGO,KAAsC;CACtE,OACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAWJ,EAAGC,EAAmB,MAAM,gCAAgCI,CAAS;EAChF,GAAID;CACL,CAAA;AAEL;;;ACLA,IAAME,IAAc;CACnB;CACA;CACA;CACA;CACA;CACA;AACD,GAEMC,IAAe;CACpB;CACA;CACA;CACA;CACA;CACA;AACD,GAEMC,KAAc,GAA2B,GAAkB,IAAM,IAAI,IAAY,OACjF,OAAO,SAASC,CAAK,IAEnB,KAAK,IAAI,KAAmB,KAAK,IAD1B,KAAK,MAAMA,KAASC,CACU,GAAOC,CAAG,CAAC,IAFnBD,GAK/BE,KAAa,GAAe,MACjCC,IAASC,IAAQD,EAAO,WAAWP,EAAYQ,IAAQR,EAAY,SAE9DS,KAAsB,MAC3BX,EAAM,iBAAiBA,EAAM,qBAAqB,KAAA,IAAY;AAE/D,SAASY,EAAc,EACtB,cACA,qBACA,eAME;CACF,OACC,kBAACC,GAAD;EACC,SAAQ;EACG;EACX,kBAAkBjB,EAAG,mCAAmCkB,CAAgB;EA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AD,EACC,WAAWpB,EACV,OACAO,GAAcwB,IAAM6B,KAAUrD,EAAa,OAC5C,EACA,CAAA;OAEC,GAXK,cAAc,OAAOwB,CAAG,EAAE,GAAG,OAAO6B,CAAM,GAW/C,CACJ;MACE,GAfK,aAAa,OAAO7B,CAAG,GAe5B,CACJ,EACK,CAAA,CACD;;IACH,CAAA;IACJ,CAAC,CAAC8B,KACF,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACC,kBAACzC,GAAD,EAAU,WAAU,WAAY,CAAA,GAChC,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACC,kBAACA,GAAD,EAAU,WAAU,mBAAoB,CAAA,GACxC,kBAACA,GAAD,EAAU,WAAU,mBAAoB,CAAA,CACpC;KACD,CAAA,CAAA;;GAED;;CACF,CAAA;AAEP,CACD;AAEA,EAAc,cAAc"}
|
|
1
|
+
{"version":3,"file":"skeleton-DDgdhmu9.js","names":["Skeleton","PrimitiveSkeleton","React","cn","neutralFillRecipes","React$1","Skeleton$1","props","className","LINE_WIDTHS","TABLE_WIDTHS","clampCount","value","fallback","max","lineWidth","widths","index","skeletonAriaHidden","SkeletonFrame","Card","contentClassName","SkeletonCardHeader","Skeleton","description","action","MetricCardSkeleton","DetailRowSkeleton","DetailCardSkeleton","lineCount","lines","dense","SidebarCardSkeleton","TableResourceCellSkeleton","row","ContentSkeleton","avatar","lineWidths","PageSkeleton","statCount","stats","sectionCount","sections","actionCount","actions","tabs","sectionLines","children","TwoColumnPageSkeleton","mainCount","mainSections","sidebarCount","sidebarSections","mainLines","sidebarLines","tableEdgeInset","TableSkeleton","rowCount","rows","columnCount","columns","columnIndexes","toolbar","column","footer"],"sources":["../src/components/ui/skeleton.tsx","../src/components/base/skeleton/skeleton.tsx"],"sourcesContent":["import { neutralFillRecipes } from \"../../lib/surface-recipes\"\nimport { cn } from \"../../lib/utils\"\n\n// The translucent chip fill keeps one contrast on every surface, including a\n// sidebar or band that is itself --muted, where a muted bar would disappear.\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn(neutralFillRecipes.chip, \"rounded-radius animate-pulse\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import * as React from 'react';\n\nimport { Card } from '../cards/smart-card';\nimport { Skeleton as PrimitiveSkeleton } from '../../ui/skeleton';\nimport { cn } from '../../../lib/utils';\n\ntype DivProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst LINE_WIDTHS = [\n\t'w-full',\n\t'w-11/12',\n\t'w-10/12',\n\t'w-9/12',\n\t'w-8/12',\n\t'w-7/12',\n] as const;\n\nconst TABLE_WIDTHS = [\n\t'w-24',\n\t'w-36',\n\t'w-28',\n\t'w-20',\n\t'w-32',\n\t'w-16',\n] as const;\n\nconst clampCount = (value: number | undefined, fallback: number, max = 12, allowZero = false) => {\n\tif (!Number.isFinite(value)) return fallback;\n\tconst count = Math.floor(value ?? fallback);\n\treturn Math.max(allowZero ? 0 : 1, Math.min(count, max));\n};\n\nconst lineWidth = (index: number, widths?: readonly string[]) =>\n\twidths?.[index % widths.length] ?? LINE_WIDTHS[index % LINE_WIDTHS.length];\n\nconst skeletonAriaHidden = (props: Pick<DivProps, 'aria-label' | 'aria-labelledby'>) =>\n\tprops['aria-label'] || props['aria-labelledby'] ? undefined : true;\n\nfunction SkeletonFrame({\n\tclassName,\n\tcontentClassName,\n\tchildren,\n}: {\n\tclassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\tchildren: React.ReactNode;\n}) {\n\treturn (\n\t\t<Card\n\t\t\tsurface=\"framed\"\n\t\t\tclassName={className}\n\t\t\tcontentClassName={cn('skeleton-frame--content min-w-0', contentClassName)}\n\t\t>\n\t\t\t{children}\n\t\t</Card>\n\t);\n}\n\nfunction SkeletonCardHeader({\n\tdescription = true,\n\taction = true,\n\tclassName,\n}: {\n\t/** Supporting copy under the title. */\n\tdescription?: boolean;\n\t/** The action this surface performs. */\n\taction?: boolean;\n\tclassName?: string;\n}) {\n\treturn (\n\t\t<div className={cn('flex min-w-0 items-start justify-between gap-space-md', className)}>\n\t\t\t<div className=\"flex min-w-0 flex-1 flex-col gap-space-sm\">\n\t\t\t\t<Skeleton className=\"h-4 w-36 max-w-full\" />\n\t\t\t\t{!!description && <Skeleton className=\"h-3 w-56 max-w-full\" />}\n\t\t\t</div>\n\t\t\t{!!action && <Skeleton className=\"h-action-sm w-20 shrink-0\" />}\n\t\t</div>\n\t);\n}\n\nfunction MetricCardSkeleton({ index }: { index: number }) {\n\treturn (\n\t\t<SkeletonFrame contentClassName=\"flex min-w-0 flex-col gap-space-md\">\n\t\t\t<div className=\"flex items-start justify-between gap-space-md\">\n\t\t\t\t<div className=\"flex min-w-0 flex-col gap-space-sm\">\n\t\t\t\t\t<Skeleton className={cn('h-3 w-20', index % 2 === 0 && 'w-24')} />\n\t\t\t\t\t<Skeleton className={cn('h-5 w-24', index % 3 === 0 && 'w-28')} />\n\t\t\t\t</div>\n\t\t\t\t<Skeleton className=\"size-8 rounded-radius-md\" />\n\t\t\t</div>\n\t\t\t<div className=\"flex items-center gap-space-sm\">\n\t\t\t\t<Skeleton className=\"h-5 w-16\" />\n\t\t\t\t<Skeleton className=\"h-3 w-24\" />\n\t\t\t</div>\n\t\t</SkeletonFrame>\n\t);\n}\n\nfunction DetailRowSkeleton({ index }: { index: number }) {\n\treturn (\n\t\t<div className=\"flex min-w-0 flex-col gap-space-xs\">\n\t\t\t<Skeleton className={cn('h-3 w-20', index % 2 === 0 && 'w-24')} />\n\t\t\t<Skeleton className={cn('h-4 w-36 max-w-full', index % 3 === 0 && 'w-44')} />\n\t\t</div>\n\t);\n}\n\nfunction DetailCardSkeleton({\n\tlines = 4,\n\tdense = false,\n}: {\n\tlines?: number;\n\tdense?: boolean;\n}) {\n\tconst lineCount = clampCount(lines, 4, 8);\n\n\treturn (\n\t\t<SkeletonFrame contentClassName=\"flex min-w-0 flex-col gap-space-lg\">\n\t\t\t<SkeletonCardHeader description={!dense} action={!dense} />\n\t\t\t<div className=\"grid min-w-0 gap-space-md sm:grid-cols-2\">\n\t\t\t\t{Array.from({ length: lineCount }, (_, index) => (\n\t\t\t\t\t<DetailRowSkeleton key={`detail-row-${String(index)}`} index={index} />\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</SkeletonFrame>\n\t);\n}\n\nfunction SidebarCardSkeleton({ lines = 3 }: { lines?: number }) {\n\tconst lineCount = clampCount(lines, 3, 5);\n\n\treturn (\n\t\t<SkeletonFrame contentClassName=\"flex min-w-0 flex-col gap-space-md\">\n\t\t\t<SkeletonCardHeader description={false} action={false} />\n\t\t\t<div className=\"grid min-w-0 gap-space-sm\">\n\t\t\t\t{Array.from({ length: lineCount }, (_, index) => (\n\t\t\t\t\t<div key={`sidebar-line-${String(index)}`} className=\"flex min-w-0 items-center justify-between gap-space-md\">\n\t\t\t\t\t\t<Skeleton className={cn('h-3 w-20', index % 2 === 0 && 'w-24')} />\n\t\t\t\t\t\t<Skeleton className={cn('h-4 w-16', index % 3 === 0 && 'w-20')} />\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</SkeletonFrame>\n\t);\n}\n\nfunction TableResourceCellSkeleton({ row }: { row: number }) {\n\treturn (\n\t\t<div className=\"flex min-w-0 items-center gap-space-sm\">\n\t\t\t<Skeleton className=\"size-avatar rounded-full shrink-0\" />\n\t\t\t<div className=\"flex min-w-0 flex-1 flex-col gap-space-xs\">\n\t\t\t\t<Skeleton className={cn('h-4 w-32 max-w-full', row % 2 === 0 && 'w-40')} />\n\t\t\t\t<Skeleton className=\"h-3 w-24 max-w-full\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport interface SkeletonProps extends React.ComponentPropsWithoutRef<typeof PrimitiveSkeleton> {}\n\nexport function Skeleton({ className, ...props }: SkeletonProps) {\n\treturn (\n\t\t<PrimitiveSkeleton\n\t\t\taria-hidden={skeletonAriaHidden(props)}\n\t\t\tclassName={cn('skeleton--component max-w-full rounded-radius-sm motion-reduce:animate-none', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nSkeleton.displayName = 'Skeleton';\n\nexport interface ContentSkeletonProps extends DivProps {\n\t/** Number of text rows rendered in the content stack. */\n\tlines?: number;\n\t/** Render an avatar/media placeholder before the text stack. */\n\tavatar?: boolean;\n\t/** Render a small action placeholder aligned to the trailing edge. */\n\taction?: boolean;\n\t/** Optional per-line width classes. Keep these as Tailwind width utilities. */\n\tlineWidths?: readonly string[];\n}\n\nexport const ContentSkeleton = React.forwardRef<HTMLDivElement, ContentSkeletonProps>(\n\tfunction ContentSkeleton({\n\t\tlines = 3,\n\t\tavatar = false,\n\t\taction = false,\n\t\tlineWidths,\n\t\tclassName,\n\t\t...props\n\t}, ref) {\n\t\tconst lineCount = clampCount(lines, 3);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\taria-hidden={skeletonAriaHidden(props)}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'content-skeleton--component',\n\t\t\t\t\t'flex w-full min-w-0 items-start gap-space-md',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{!!avatar && <Skeleton className=\"size-avatar rounded-full shrink-0\" />}\n\t\t\t\t<div className=\"content-skeleton--body flex min-w-0 flex-1 flex-col gap-space-sm\">\n\t\t\t\t\t{Array.from({ length: lineCount }, (_, index) => (\n\t\t\t\t\t\t<Skeleton\n\t\t\t\t\t\t\tkey={`content-line-${String(index)}`}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'content-skeleton--line h-4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlineWidth(index, lineWidths),\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t{!!action && <Skeleton className=\"content-skeleton--action h-action-sm w-16 shrink-0\" />}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nContentSkeleton.displayName = 'ContentSkeleton';\n\nexport interface PageSkeletonProps extends DivProps {\n\t/** Number of compact KPI cards below the page header. */\n\tstats?: number;\n\t/** Number of content cards below the optional stats row. */\n\tsections?: number;\n\t/** Number of skeleton lines in each content card. */\n\tsectionLines?: number;\n\t/** Render tab/filter placeholders between the header and content. */\n\ttabs?: boolean;\n\t/** Number of action button placeholders in the page header. */\n\tactions?: number;\n}\n\nexport const PageSkeleton = React.forwardRef<HTMLDivElement, PageSkeletonProps>(\n\tfunction PageSkeleton({\n\t\tstats = 3,\n\t\tsections = 2,\n\t\tsectionLines = 4,\n\t\ttabs = true,\n\t\tactions = 2,\n\t\tclassName,\n\t\tchildren,\n\t\t...props\n\t}, ref) {\n\t\tconst statCount = clampCount(stats, 3, 6, true);\n\t\tconst sectionCount = clampCount(sections, 2, 6, true);\n\t\tconst actionCount = clampCount(actions, 2, 4, true);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\taria-hidden={skeletonAriaHidden(props)}\n\t\t\t\tclassName={cn('page-skeleton--component flex w-full min-w-0 flex-col gap-space-2xl', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<div className=\"page-skeleton--header flex min-w-0 flex-col gap-space-lg md:flex-row md:items-start md:justify-between\">\n\t\t\t\t\t<div className=\"flex min-w-0 flex-1 items-start gap-space-md\">\n\t\t\t\t\t\t<Skeleton className=\"size-avatar-lg rounded-full shrink-0\" />\n\t\t\t\t\t\t<div className=\"flex min-w-0 flex-1 flex-col gap-space-sm\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-5 w-56 max-w-full\" />\n\t\t\t\t\t\t\t<Skeleton className=\"h-4 w-80 max-w-full\" />\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap gap-space-sm pt-space-2xs\">\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-16\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-20\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-6 w-14\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex min-w-0 flex-wrap items-center gap-space-sm\">\n\t\t\t\t\t\t{Array.from({ length: actionCount }, (_, index) => (\n\t\t\t\t\t\t\t<Skeleton\n\t\t\t\t\t\t\t\tkey={`page-action-${String(index)}`}\n\t\t\t\t\t\t\t\tclassName={cn('h-action-sm', index === 0 ? 'w-24' : 'size-action-sm')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{!!tabs && (\n\t\t\t\t\t<div className=\"page-skeleton--tabs flex min-w-0 flex-wrap gap-space-sm rounded-surface border border-border bg-card p-surface-xs\">\n\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-32\" />\n\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-28\" />\n\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-36\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{statCount > 0 && (\n\t\t\t\t\t<div className=\"page-skeleton--stats grid min-w-0 gap-space-lg sm:grid-cols-2 lg:grid-cols-3\">\n\t\t\t\t\t\t{Array.from({ length: statCount }, (_, index) => (\n\t\t\t\t\t\t\t<MetricCardSkeleton key={`page-stat-${String(index)}`} index={index} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{sectionCount > 0 && (\n\t\t\t\t\t<div className=\"page-skeleton--sections grid min-w-0 gap-space-lg\">\n\t\t\t\t\t\t{Array.from({ length: sectionCount }, (_, index) => (\n\t\t\t\t\t\t\t<DetailCardSkeleton key={`page-section-${String(index)}`} lines={sectionLines} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nPageSkeleton.displayName = 'PageSkeleton';\n\nexport interface TwoColumnPageSkeletonProps extends DivProps {\n\t/** Number of primary column cards. */\n\tmainSections?: number;\n\t/** Number of secondary column cards. */\n\tsidebarSections?: number;\n\t/** Lines per primary column card. */\n\tmainLines?: number;\n\t/** Lines per secondary column card. */\n\tsidebarLines?: number;\n}\n\nexport const TwoColumnPageSkeleton = React.forwardRef<HTMLDivElement, TwoColumnPageSkeletonProps>(\n\tfunction TwoColumnPageSkeleton({\n\t\tmainSections = 2,\n\t\tsidebarSections = 3,\n\t\tmainLines = 5,\n\t\tsidebarLines = 3,\n\t\tclassName,\n\t\t...props\n\t}, ref) {\n\t\tconst mainCount = clampCount(mainSections, 2, 5);\n\t\tconst sidebarCount = clampCount(sidebarSections, 3, 5);\n\n\t\treturn (\n\t\t\t<PageSkeleton\n\t\t\t\tref={ref}\n\t\t\t\tstats={0}\n\t\t\t\tsections={0}\n\t\t\t\ttabs={false}\n\t\t\t\tclassName={cn('two-column-page-skeleton--component', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<div className=\"two-column-page-skeleton--layout grid min-w-0 gap-space-lg lg:grid-cols-3\">\n\t\t\t\t\t<div className=\"two-column-page-skeleton--main grid min-w-0 gap-space-lg lg:col-span-2\">\n\t\t\t\t\t\t{Array.from({ length: mainCount }, (_, index) => (\n\t\t\t\t\t\t\t<DetailCardSkeleton key={`two-column-main-${String(index)}`} lines={mainLines} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"two-column-page-skeleton--sidebar grid min-w-0 gap-space-lg self-start\">\n\t\t\t\t\t\t{Array.from({ length: sidebarCount }, (_, index) => (\n\t\t\t\t\t\t\t<SidebarCardSkeleton key={`two-column-sidebar-${String(index)}`} lines={sidebarLines} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</PageSkeleton>\n\t\t);\n\t},\n);\n\nTwoColumnPageSkeleton.displayName = 'TwoColumnPageSkeleton';\n\nexport interface TableSkeletonProps extends DivProps {\n\trows?: number;\n\t/** How many columns the grid uses. */\n\tcolumns?: number;\n\ttoolbar?: boolean;\n\t/** Content below the body. */\n\tfooter?: boolean;\n}\n\n// The toolbar, header, rows and footer share one edge: the outer cells take the\n// framed surface's inset, like the toolbar and footer, and inner cells keep the\n// row inset between columns.\nconst tableEdgeInset = 'first:ps-surface last:pe-surface';\n\nexport const TableSkeleton = React.forwardRef<HTMLDivElement, TableSkeletonProps>(\n\tfunction TableSkeleton({\n\t\trows = 6,\n\t\tcolumns = 5,\n\t\ttoolbar = true,\n\t\tfooter = true,\n\t\tclassName,\n\t\t...props\n\t}, ref) {\n\t\tconst rowCount = clampCount(rows, 6, 20);\n\t\tconst columnCount = clampCount(columns, 5, 8);\n\t\tconst columnIndexes = Array.from({ length: columnCount }, (_, index) => index);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\taria-hidden={skeletonAriaHidden(props)}\n\t\t\t\tclassName={cn('table-skeleton--component', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<Card\n\t\t\t\t\tsurface=\"framed\"\n\t\t\t\t\tclassName=\"overflow-hidden\"\n\t\t\t\t\tpadding=\"none\"\n\t\t\t\t>\n\t\t\t\t\t{!!toolbar && (\n\t\t\t\t\t\t<div className=\"table-skeleton--toolbar flex min-w-0 items-center justify-between gap-space-md border-b border-border/60 px-surface py-row-y-lg\">\n\t\t\t\t\t\t\t<div className=\"flex min-w-0 flex-1 items-center gap-space-sm\">\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-control-sm w-56 max-w-full\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"hidden h-action-sm w-24 sm:block\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"hidden shrink-0 items-center gap-space-sm sm:flex\">\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-20\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"size-action-sm\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"table-skeleton--scroll overflow-x-auto\">\n\t\t\t\t\t\t<table className=\"w-full min-w-full table-fixed border-collapse\">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr className=\"border-b border-border/60\">\n\t\t\t\t\t\t\t\t\t{columnIndexes.map((column) => (\n\t\t\t\t\t\t\t\t\t\t<th key={`table-head-${String(column)}`} className={cn('box-border h-control px-row-x text-start align-middle', tableEdgeInset)}>\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton className={cn('h-4', TABLE_WIDTHS[column % TABLE_WIDTHS.length])} />\n\t\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t{Array.from({ length: rowCount }, (_, row) => (\n\t\t\t\t\t\t\t\t\t<tr key={`table-row-${String(row)}`} className=\"border-b border-border/60 last:border-b-0\">\n\t\t\t\t\t\t\t\t\t\t{columnIndexes.map((column) => (\n\t\t\t\t\t\t\t\t\t\t\t<td key={`table-cell-${String(row)}-${String(column)}`} className={cn('px-row-x py-row-y align-middle', tableEdgeInset)}>\n\t\t\t\t\t\t\t\t\t\t\t\t{column === 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TableResourceCellSkeleton row={row} />\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Skeleton\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'h-4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTABLE_WIDTHS[(row + column) % TABLE_WIDTHS.length],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t\t{!!footer && (\n\t\t\t\t\t\t<div className=\"table-skeleton--footer flex flex-wrap items-center justify-between gap-space-md border-t border-border/60 px-surface py-row-y-lg\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-4 w-32\" />\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-space-sm\">\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-20\" />\n\t\t\t\t\t\t\t\t<Skeleton className=\"h-action-sm w-20\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Card>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nTableSkeleton.displayName = 'TableSkeleton';\n"],"mappings":";;;;;;;AAKA,SAASA,EAAS,EAAE,cAAW,GAAGO,KAAsC;CACtE,OACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAWJ,EAAGC,EAAmB,MAAM,gCAAgCI,CAAS;EAChF,GAAID;CACL,CAAA;AAEL;;;ACLA,IAAME,IAAc;CACnB;CACA;CACA;CACA;CACA;CACA;AACD,GAEMC,IAAe;CACpB;CACA;CACA;CACA;CACA;CACA;AACD,GAEMC,KAAc,GAA2B,GAAkB,IAAM,IAAI,IAAY,OACjF,OAAO,SAASC,CAAK,IAEnB,KAAK,IAAI,KAAmB,KAAK,IAD1B,KAAK,MAAMA,KAASC,CACU,GAAOC,CAAG,CAAC,IAFnBD,GAK/BE,KAAa,GAAe,MACjCC,IAASC,IAAQD,EAAO,WAAWP,EAAYQ,IAAQR,EAAY,SAE9DS,KAAsB,MAC3BX,EAAM,iBAAiBA,EAAM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AAc,KAAK,MACnB,kBAAC,MAAD;QAAwD,WAAW1D,EAAG,kCAAkCoD,CAAc;QACpH,UAAAQ,MAAW,IACX,kBAAC9B,GAAD,EAAgC,OAAM,CAAA,IAEtC,kBAACV,GAAD,EACC,WAAWpB,EACV,OACAO,GAAcwB,IAAM6B,KAAUrD,EAAa,OAC5C,EACA,CAAA;OAEC,GAXK,cAAc,OAAOwB,CAAG,EAAE,GAAG,OAAO6B,CAAM,GAW/C,CACJ;MACE,GAfK,aAAa,OAAO7B,CAAG,GAe5B,CACJ,EACK,CAAA,CACD;;IACH,CAAA;IACJ,CAAC,CAAC8B,KACF,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACC,kBAACzC,GAAD,EAAU,WAAU,WAAY,CAAA,GAChC,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACC,kBAACA,GAAD,EAAU,WAAU,mBAAoB,CAAA,GACxC,kBAACA,GAAD,EAAU,WAAU,mBAAoB,CAAA,CACpC;KACD,CAAA,CAAA;;GAED;;CACF,CAAA;AAEP,CACD;AAEA,EAAc,cAAc"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { S as e, c as t, d as n, v as r } from "./ui-provider-C-74NVLc.js";
|
|
3
3
|
import { useStrings as i } from "./lib/strings.js";
|
|
4
|
-
import { t as a } from "./utils-
|
|
4
|
+
import { t as a } from "./utils-DhuoqFy4.js";
|
|
5
5
|
import { t as o } from "./affordance-geometry.generated-P-aVJisu.js";
|
|
6
|
-
import { n as s } from "./buttons-
|
|
7
|
-
import { c, n as l } from "./typography-
|
|
6
|
+
import { n as s } from "./buttons-DeW0bQeK.js";
|
|
7
|
+
import { c, n as l } from "./typography-C7-YMW1S.js";
|
|
8
8
|
import { i as u, n as d } from "./text.styles-B64My8RZ.js";
|
|
9
9
|
import { t as ee } from "./motion-recipes-DitYv6P2.js";
|
|
10
|
-
import { i as f, n as p, t as m } from "./tooltip-
|
|
10
|
+
import { i as f, n as p, t as m } from "./tooltip-31NwIpTo.js";
|
|
11
11
|
import { n as te } from "./structure.recipes-BB4-n58V.js";
|
|
12
|
-
import { t as h } from "./structure-
|
|
12
|
+
import { t as h } from "./structure-DZJ2wbAU.js";
|
|
13
13
|
import { t as g } from "./icon-size-B6PVwjbC.js";
|
|
14
14
|
import { i as _ } from "./tone-recipes-BPsRAvhu.js";
|
|
15
15
|
import { t as v } from "./row-recipes-DL8n7t_b.js";
|
|
16
|
-
import { a as y } from "./surface-recipes-
|
|
16
|
+
import { a as y } from "./surface-recipes-C8mNycaY.js";
|
|
17
17
|
import { n as ne, t as b } from "./composition.recipes-COdiFhxB.js";
|
|
18
|
-
import { n as x } from "./action-menu-
|
|
18
|
+
import { n as x } from "./action-menu-C0gjzLyE.js";
|
|
19
19
|
import { Fragment as S, forwardRef as C, isValidElement as w, useCallback as T, useId as re, useState as ie } from "react";
|
|
20
20
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
21
21
|
import { ChevronDown as ae, Info as O } from "lucide-react";
|
|
@@ -614,4 +614,4 @@ var Oe = H;
|
|
|
614
614
|
//#endregion
|
|
615
615
|
export { P as _, be as a, _e as c, V as d, pe as f, N as g, M as h, Ce as i, ge as l, ce as m, Oe as n, ye as o, A as p, De as r, xe as s, H as t, ve as u, j as v };
|
|
616
616
|
|
|
617
|
-
//# sourceMappingURL=smart-card-
|
|
617
|
+
//# sourceMappingURL=smart-card-B6vLxqa_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-card-CW0hjetE.js","names":["Card","CardHeader","CardTitle","CardContent","CardFooter","styles","styles","CardPrimitive","CardHeaderPrimitive","CardTitlePrimitive","CardContentPrimitive","CardFooterPrimitive","resolveComponentScale","useCardConfig","useDensityConfig","useTypographyConfig","cn","affordanceGeometry","Button","descendantInlineLinkClassName","resolveTextClassNames","headingRoleSizes","motionRecipes","TooltipTrigger","TooltipContent","Tooltip","gapRecipe","Stack","ICON_CHILD_SIZE_CLASSNAMES","toneRecipes","rowBlockPaddingClasses","surfaceDividerRecipes","compositionRhythm","compositionClasses","ActionMenu","alertVariants","cva","isSimpleText","value","Alert","forwardRef","props","tone","variant","defaultTextSize","className","AlertTitle","children","Text","AlertDescription","AlertMetadata","AlertMetadataItem","icon","label","numeric","AlertAction","cardRegionPaddingClasses","cardRegionGapClasses","cardRecipes","Card$1","size","CardHeader$1","CardTitle$1","CardContent$1","CardFooter$1","CARD_BEM","CARD_INSET","SURFACE_CLASSES","hasRenderableContent","content","isValidElement","Fragment","CARD_TITLE_SIZE_CLASSES","CARD_TITLE_TEXT_SIZE","CardShell","surface","CardHeader","padding","textGap","CardTitle","sizeProp","defaultScale","CardDescription","CardContent","CardFooter","SmartCardAlert","hasHeader","alertTone","alert","SurfaceTitle","plainTitle","title","dataSlot","suffix","suffixClassName","ActionsMenu","actionDefinitions","actions","action","index","actionsLabel","TooltipTrigger_Info","passthrough","triggerProps","tooltipLabel","Info","SmartCardHeaderRow","cardActions","hasActions","hasIcon","hasTitle","hasTitleSuffix","titleSuffix","hasDescription","description","hasTooltip","tooltip","hasHeaderStart","headerStart","hasHeaderEnd","headerEnd","hasHeaderAction","headerAction","showTitleRow","showTrailing","singleLine","inlineTrailing","inlineCommands","titleSize","defaultSmartCardStrings","Card","footerDividerProp","expandedProp","stringsProp","rootProps","resolvedTitleSize","inset","vertical","tokens","framedHeader","headerPlacement","strings","useStrings","resolvedActionsLabel","isExpandable","expandable","collapsedMaxHeightRaw","collapsedMaxHeight","isExpandedControlled","bodyId","useId","internalExpanded","setInternalExpanded","useState","defaultExpanded","expanded","handleToggle","useCallback","next","onExpandedChange","handleBodyFocus","body","event","target","frame","control","hasAlert","hasFooterText","footerText","hasFooterSlot","footerSlot","hasContentTop","contentTop","hasContentBottom","contentBottom","hasChildren","hasBody","hasBodySurface","headerFooterOnly","tooltipAriaLabel","collapseStyle","resolvedSurface","defaultSurface","framed","resolvedHeaderDivider","headerDivider","defaultHeaderDivider","footerDivider","defaultFooterDivider","sharedHeaderFooterDivider","gap","headerClassName","contentClassName","contentGap","footerClassName","ChevronDown","SmartCard"],"sources":["../src/components/base/feedback/alert.tsx","../src/components/base/cards/card.recipes.ts","../src/components/ui/card.tsx","../src/components/base/cards/smart-card.tokens.ts","../src/components/base/cards/partials/has-renderable-content.ts","../src/components/base/cards/partials/card-primitives.tsx","../src/components/base/cards/partials/smart-card-alert.tsx","../src/components/base/display/surface-title.tsx","../src/components/base/cards/partials/smart-card-actions-menu.tsx","../src/components/base/cards/partials/smart-card-header-row.tsx","../src/components/base/cards/smart-card.strings.ts","../src/components/base/cards/smart-card.tsx"],"sourcesContent":["/**\n * Alert — base notice primitive with semantic variants and container-driven actions.\n *\n * Package-owned notice inspired by ReUI's alert layout. Consumers import this\n * base alert for the library's typography, token, and DOM-hook contract.\n */\nimport {\n\tforwardRef,\n\ttype ComponentPropsWithoutRef,\n\ttype ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Text } from '../../typography';\nimport { descendantInlineLinkClassName } from '../../typography/text-link';\nimport { resolveTextClassNames } from '../../typography/text.styles';\nimport { useTypographyConfig } from '../../../lib/ui-provider';\nimport { Stack } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { ICON_CHILD_SIZE_CLASSNAMES } from '../display/icon-size';\nimport type { SemanticTone } from '../../../lib/component-vocabulary';\nimport { toneRecipes } from '../../../lib/tone-recipes';\nimport { rowBlockPaddingClasses } from '../../../lib/row-recipes';\n\nconst alertVariants = cva(\n\t[\n\t\t// A notice is one row of content, so it takes Item's row geometry: the row\n\t\t// insets, Item's media/content/actions gap and its copy rhythm (gap-normal).\n\t\t// Toast follows the same recipe.\n\t\t// The alert is its own container: AlertAction sits beside the copy only when the\n\t\t// alert itself is wide enough, never because the viewport is.\n\t\t`alert--component @container/alert box-border relative grid w-full grid-cols-[0_1fr] items-start gap-y-normal rounded-radius border px-row-x ${rowBlockPaddingClasses.default} text-start`,\n\t\t'has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-space-lg',\n\t\t// Two explicit tracks; a beside action opens an implicit third (auto) track, so\n\t\t// a stacked action leaves no empty column or gap behind.\n\t\t'has-[>[data-slot=alert-action]]:grid-cols-[0_minmax(0,1fr)] has-[>svg]:has-[>[data-slot=alert-action]]:grid-cols-[auto_minmax(0,1fr)]',\n\t\t// Without a glyph the empty first track takes no gap, so the copy keeps the row\n\t\t// inset; a beside action then takes Item's actions gap as its own margin.\n\t\t'@sm/alert:[&:not(:has(>svg))>[data-slot=alert-action]]:ms-space-lg',\n\t\t// Root tokens, not the `--spacing-*` aliases: an alias resolves at :root and would\n\t\t// ignore a scoped density/space/icon boundary.\n\t\t'[&>svg]:row-span-2 [&>svg]:mt-[calc((1em*1.375-var(--icon))/2)] [&>svg]:shrink-0',\n\t\tICON_CHILD_SIZE_CLASSNAMES.md,\n\t],\n\t{\n\t\tvariants: {\n\t\t\ttone: {\n\t\t\t\tneutral: 'border-border bg-card text-card-foreground',\n\t\t\t\tprimary: `${toneRecipes.primary.edge} ${toneRecipes.primary.wash} text-card-foreground [&>svg]:text-primary-accent`,\n\t\t\t\tsecondary: 'border-border bg-muted/50 text-card-foreground [&>svg]:text-secondary-foreground',\n\t\t\t\tinfo: `${toneRecipes.info.edge} ${toneRecipes.info.wash} text-card-foreground [&>svg]:text-info`,\n\t\t\t\tsuccess: `${toneRecipes.success.edge} ${toneRecipes.success.wash} text-card-foreground [&>svg]:text-success`,\n\t\t\t\twarning: `${toneRecipes.warning.edge} ${toneRecipes.warning.wash} text-card-foreground [&>svg]:text-warning-accent`,\n\t\t\t\tdestructive: `${toneRecipes.destructive.edge} ${toneRecipes.destructive.wash} text-card-foreground [&>svg]:text-destructive`,\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault: '',\n\t\t\t\tinverse: [\n\t\t\t\t\t'border-foreground bg-foreground text-background',\n\t\t\t\t\t'[&>svg]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-title]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-description]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-item]]:bg-background/10',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-item]>svg]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-label]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-value]_[data-typography=text]]:text-background',\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\ttone: 'neutral',\n\t\t\tvariant: 'default',\n\t\t},\n\t},\n);\n\nexport type AlertVariant = NonNullable<VariantProps<typeof alertVariants>['variant']>;\nexport type AlertTone = SemanticTone;\n\nexport interface AlertProps\n\textends ComponentPropsWithoutRef<'div'>,\n\t\tVariantProps<typeof alertVariants> {}\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(\n\t{ className, tone, variant, role = 'alert', ...props },\n\tref,\n) {\n\tconst { defaultTextSize } = useTypographyConfig();\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-slot=\"alert\"\n\t\t\tdata-tone={tone ?? 'neutral'}\n\t\t\tdata-variant={variant ?? 'default'}\n\t\t\trole={role}\n\t\t\tclassName={cn(resolveTextClassNames({ size: defaultTextSize, type: 'inherit' }), alertVariants({ tone, variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nAlert.displayName = 'Alert';\n\nconst AlertTitle = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertTitle({ className, children, ...props }, ref) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-title\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--title col-start-2 min-h-icon leading-snug',\n\t\t\t\t\tdescendantInlineLinkClassName,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText(children) ? (\n\t\t\t\t\t<Text tag=\"span\" type=\"inherit\" weight=\"semibold\" lineHeight=\"snug\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</div>\n\t\t);\n\t},\n);\nAlertTitle.displayName = 'AlertTitle';\n\nconst AlertDescription = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertDescription({ className, children, ...props }, ref) {\n\t\treturn (\n\t\t\t<Stack\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-description\"\n\t\t\t\tgap=\"xs\"\n\t\t\t\talign=\"start\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--description col-start-2 [&_p]:leading-relaxed',\n\t\t\t\t\tdescendantInlineLinkClassName,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText(children) ? (\n\t\t\t\t\t<Text tag=\"span\" type=\"secondary\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</Stack>\n\t\t);\n\t},\n);\nAlertDescription.displayName = 'AlertDescription';\n\nexport interface AlertMetadataProps extends ComponentPropsWithoutRef<'dl'> {\n\t/** Metadata items or consumer-owned definition-list content. */\n\tchildren?: ReactNode;\n\t/** Accessible name for the fact group when the alert title is not sufficient. */\n\t'aria-label'?: string;\n\t/** Consumer styling hook merged with the tokenized defaults. */\n\tclassName?: string;\n}\n\n/**\n * Compact semantic facts associated with an alert. Use `aria-label` when the\n * surrounding title does not already describe the metadata group.\n */\nconst AlertMetadata = forwardRef<HTMLDListElement, AlertMetadataProps>(\n\tfunction AlertMetadata({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<dl\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-metadata\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert-metadata--component alert--metadata col-start-2 m-0 mt-space-xs flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-xs',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAlertMetadata.displayName = 'AlertMetadata';\n\nexport interface AlertMetadataItemProps\n\textends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {\n\t/** Consumer styling hook merged with the tokenized defaults. */\n\tclassName?: string;\n\t/** Decorative or semantic leading media. Decorative icons should be aria-hidden. */\n\ticon?: ReactNode;\n\t/** User-provided metadata key; the Alert component owns no copy. */\n\tlabel: ReactNode;\n\t/** User-provided metadata value. May contain a package value primitive. */\n\tvalue: ReactNode;\n\t/** Applies tabular figures to simple numeric values, in the sans UI font. */\n\tnumeric?: boolean;\n}\n\n/** A label/value pair rendered with native `dt` and `dd` semantics. */\nconst AlertMetadataItem = forwardRef<HTMLDivElement, AlertMetadataItemProps>(\n\tfunction AlertMetadataItem(\n\t\t{ className, icon, label, value, numeric = false, ...props },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-metadata-item\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert-metadata-item--component alert--metadata-item inline-flex max-w-full min-w-0 items-center gap-space-sm rounded-radius-sm bg-foreground/8 px-control-xs py-space-xs',\n\t\t\t\t\t'[&>svg]:size-icon-sm [&>svg]:shrink-0 [&>svg]:text-muted-foreground',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t\t<dt data-slot=\"alert-metadata-label\" className=\"alert--metadata-label shrink-0\">\n\t\t\t\t\t{isSimpleText(label) ? (\n\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\" lineHeight=\"none\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : label}\n\t\t\t\t</dt>\n\t\t\t\t<dd data-slot=\"alert-metadata-value\" className=\"alert--metadata-value m-0 min-w-0\">\n\t\t\t\t\t{isSimpleText(value) ? (\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\t\ttype=\"inherit\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\t\t\tlineHeight=\"none\"\n\t\t\t\t\t\tclassName={cn('break-words', numeric && 'tabular-nums')}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{value}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : value}\n\t\t\t\t</dd>\n\t\t\t</div>\n\t\t);\n\t},\n);\nAlertMetadataItem.displayName = 'AlertMetadataItem';\n\nconst AlertAction = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertAction({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t// Direction/alignment come from Stack; the remaining classes are grid\n\t\t\t// placement inside the alert's own template. Below the alert's own `@sm`\n\t\t\t// width the action follows the copy; from it, the action takes the implicit\n\t\t\t// third track beside the title and description.\n\t\t\t<Stack\n\t\t\t\tref={ref}\n\t\t\t\tdirection=\"horizontal\"\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"start\"\n\t\t\t\twrap\n\t\t\t\tgap=\"sm\"\n\t\t\t\tdata-slot=\"alert-action\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--action col-start-2 mt-space-md @sm/alert:col-start-3 @sm/alert:row-start-1 @sm/alert:row-span-2 @sm/alert:mt-0 @sm/alert:self-start @sm/alert:justify-end',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAlertAction.displayName = 'AlertAction';\n\nexport {\n\tAlert,\n\tAlertTitle,\n\tAlertDescription,\n\tAlertMetadata,\n\tAlertMetadataItem,\n\tAlertAction,\n};\n","import { affordanceGeometry } from '../../../lib/affordance-geometry.generated';\nimport { surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport type { SmartCardProps } from './smart-card.types';\nimport {compositionClasses} from '../structure/composition.recipes';\n\n/** Explicit region insets; omitted padding preserves the compound's inline-only defaults. */\nexport const cardRegionPaddingClasses = {\n\tnone: 'p-0',\n\tsm: 'p-surface-xs',\n\tmd: 'p-surface',\n\tlg: 'p-surface-lg',\n} as const satisfies Record<NonNullable<SmartCardProps['padding']>, string>;\n/** A padding-free subject keeps the base regional rhythm; explicit gap remains independent. */\nexport const cardRegionGapClasses = {\n none: affordanceGeometry.surfaceGap.md,\n sm: affordanceGeometry.surfaceGap.xs,\n md: affordanceGeometry.surfaceGap.md,\n lg: affordanceGeometry.surfaceGap.lg,\n} as const satisfies Record<NonNullable<SmartCardProps['padding']>, string>;\n/** Private Tailwind recipes; public props and DOM hooks remain owned by the component. */\nexport const cardRecipes = {\n\troot: `flex flex-col w-full font-sans rounded-surface box-border overflow-hidden py-surface ${affordanceGeometry.surfaceGap.md} transition-[background-color,border-color,box-shadow] duration-150`,\n\tshell: `@container/card flex flex-col w-full font-sans rounded-surface box-border overflow-hidden py-surface ${affordanceGeometry.surfaceGap.md} transition-[background-color,border-color,box-shadow] duration-150`,\n\tsurfaceCard: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-xs text-card-foreground`,\n\tsurfaceDefault: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-xs text-card-foreground`,\n\tsurfaceFlat: \"bg-transparent border-0 shadow-none text-inherit\",\n\tsurfaceFramed: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-sm ${surfaceDividerRecipes.frame.ring} text-card-foreground`,\n\tsurfaceRaised: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-md text-card-foreground`,\n\tsurfaceSunken: `bg-muted ${surfaceDividerRecipes.frame.shell} text-foreground`,\n\theader: \"flex flex-col gap-normal px-surface box-border\",\n\t// Wrapping follows available header space, independent of caller-owned\n\t// container names on the surface. Both title and commands keep their identity.\n\theaderRow: \"flex-row flex-wrap items-start justify-between gap-space-lg pb-0\",\n\t// A single-line header keeps its title at the row start, so peer cards with and\n\t// without a command share one title line. The command is pulled into the title's\n\t// first line box (action height minus the default title line, halved) instead of\n\t// centring the title in a taller row. Centring that margin box keeps the command on\n\t// the title's centre when a suffix badge or density changes the row height.\n\theaderTrailingInline: \"-my-space-sm self-center\",\n\t// The title column centres on the same line, so a smaller title meets the command\n\t// on one centre; a default title already fills the row, so peers are unchanged.\n\theaderLeadingInline: \"self-center\",\n\t// The small info trigger beside a title follows the same rule at its own height.\n\ttooltipTriggerInline: \"-my-space-xs\",\n\theaderLeading: \"min-w-0 max-w-full flex-1 basis-64\",\n\theaderLeadingSingle: \"basis-36\",\n\theaderTrailing: `flex max-w-full flex-wrap shrink-0 items-center ${compositionClasses.commands}`,\n\theaderDivider: `${surfaceDividerRecipes.frame.header} [&.border-b]:!pb-surface`,\n\ttitle: \"min-w-0 leading-tight text-inherit\",\n\ttitleSm: \"text-sm\",\n\ttitleMd: \"text-base\",\n\ttitleLg: \"text-lg\",\n\tcontent: `flex flex-col px-surface box-border min-w-0 ${compositionClasses.related}`,\n\tfooter: \"flex items-center px-surface box-border\",\n\tfooterDivider: `${surfaceDividerRecipes.frame.footer} [&.border-t]:!pt-surface`,\n\talert: \"px-surface\",\n\talertWithHeader: \"-mt-space-xs\",\n\texpandToggle: \"flex justify-center pb-surface -mt-space-md\",\n} as const satisfies Record<string, string>;\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Card({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\"card--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\"card-header--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"card-title--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"card-description--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\"card-action--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"card-content--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"card-footer--primitive\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n","import type { SmartCardSurface } from './smart-card.types';\nimport { cardRecipes as styles } from './card.recipes';\n\n/**\n * BEM-style hooks applied to every SmartCard subregion. Library\n * consumers can target them in CSS / tests / analytics without\n * relying on shadcn's data-slot attributes (which are framework\n * internals). Keep these names consistent — they are part of the\n * public DOM contract.\n */\nexport const CARD_BEM = {\n\troot: 'card--component',\n\theader: 'card--header',\n\ttitle: 'card--title',\n\tdescription: 'card--description',\n\tcontent: 'card--content',\n\tfooter: 'card--footer',\n\talert: 'card--alert',\n\tcollapseFade: 'card--collapse-fade',\n\texpandToggle: 'card--expand-toggle',\n\texpandToggleButton: 'card--expand-toggle-button',\n} as const;\n\ninterface PaddingTokens {\n\tshell: string;\n\theaderX: string;\n\t/** Tokenized divider inset that overrides the shadcn primitive's fixed 24px rule. */\n\theaderDividerY: string;\n\tcontentX: string;\n\tcontentY: string;\n\tfooterX: string;\n\t/** Tokenized divider inset that overrides the shadcn primitive's fixed 24px rule. */\n\tfooterDividerY: string;\n\talertX: string;\n\t/** Bottom clearance for the half-inset expandable control. */\n\texpandableBottom: string;\n\t/** Vertical offset applied when alert sits BELOW the header (pulls it up). */\n\talertOffsetWithHeader: string;\n\t/** Vertical spacing applied when alert is the first content (no header). */\n\talertOffsetStandalone: string;\n}\n\nexport const CARD_INSET: PaddingTokens = {\n\tshell: styles.shell,\n\theaderX: 'px-surface',\n\theaderDividerY: styles.headerDivider,\n\tcontentX: styles.content,\n\tcontentY: '',\n\tfooterX: styles.footer,\n\tfooterDividerY: styles.footerDivider,\n\talertX: styles.alert,\n\texpandableBottom: 'pb-surface',\n\talertOffsetWithHeader: styles.alertWithHeader,\n\talertOffsetStandalone: '',\n};\n\n/**\n * Surface-specific shell classes.\n */\nexport const SURFACE_CLASSES: Record<SmartCardSurface, string> = {\n\tcard: styles.surfaceCard,\n\tflat: styles.surfaceFlat,\n\tframed: styles.surfaceFramed,\n};\n","import { Fragment, isValidElement, type ReactNode } from 'react';\n\n/**\n * Predicate used by SmartCard subregions to decide whether each slot\n * warrants rendering its wrapper. Numbers (incl. `0`) and JSX always\n * render; falsy / empty-string content is treated as absent. Fragments\n * recurse into their children.\n */\nexport function hasRenderableContent(content?: ReactNode): boolean {\n\tif (content === null || content === undefined) return false;\n\tif (typeof content === 'boolean') return false;\n\tif (typeof content === 'string') return content.trim().length > 0;\n\tif (typeof content === 'number' || typeof content === 'bigint') return true;\n\tif (Array.isArray(content)) return content.some(hasRenderableContent);\n\tif (isValidElement<{ children?: ReactNode }>(content)) {\n\t\tif (content.type === Fragment) return hasRenderableContent(content.props.children);\n\t\treturn true;\n\t}\n\treturn true;\n}\n","import type { TextGap } from '../../structure';\n/**\n * Internal layout primitives — re-exported from `smart-card.tsx` for\n * advanced composition (deeply customised layouts that still want the\n * design-system surface tokens). Each primitive is intentionally thin:\n * a single responsibility, a single set of default classes, no business\n * logic. The BEM hooks (`card--component`, `card--header`, etc.) are\n * applied here so the public DOM contract lives in one place.\n */\nimport {\n\ttype ComponentPropsWithRef,\n\ttype ComponentPropsWithoutRef,\n} from 'react';\n\nimport {\n\tCard as CardPrimitive,\n\tCardContent as CardContentPrimitive,\n\tCardFooter as CardFooterPrimitive,\n\tCardHeader as CardHeaderPrimitive,\n\tCardTitle as CardTitlePrimitive,\n} from '../../../ui/card';\nimport { Text } from '../../../typography/text';\nimport { useDensityConfig } from '../../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../../lib/ui-provider/scale';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_BEM, SURFACE_CLASSES } from '../smart-card.tokens';\nimport type { CardTitleSize, SmartCardProps, SmartCardSurface } from '../smart-card.types';\nimport { cardRecipes as styles, cardRegionPaddingClasses } from '../card.recipes';\n\nimport { hasRenderableContent } from './has-renderable-content';\n\nconst CARD_TITLE_SIZE_CLASSES: Record<CardTitleSize, string> = {\n\tsm: styles.titleSm,\n\tmd: styles.titleMd,\n\tlg: styles.titleLg,\n};\n\nconst CARD_TITLE_TEXT_SIZE: Record<CardTitleSize, 'sm' | 'base' | 'lg'> = {\n\tsm: 'sm',\n\tmd: 'base',\n\tlg: 'lg',\n};\n\ntype CardRegionProps = ComponentPropsWithRef<'div'> & {\n\t/** Full surface inset. Omit to retain the established inline-only inset. */\n\tpadding?: SmartCardProps['padding'];\n};\n\nexport type CardShellProps = ComponentPropsWithRef<'div'> & {\n\t/**\n\t * Card's own surface chrome (fill, edge and elevation) for a hand-assembled\n\t * card. Omit to draw only the layout shell and supply the chrome yourself.\n\t */\n\tsurface?: SmartCardSurface;\n};\n\nexport function CardShell({ className, surface, ...props }: CardShellProps) {\n\treturn (\n\t\t<CardPrimitive\n\t\t\tdata-surface={surface}\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.root,\n\t\t\t\tstyles.shell,\n\t\t\t\tsurface && SURFACE_CLASSES[surface],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardHeader({\n\tclassName,\n\ttextGap = 'normal',\n\tpadding,\n\t...props\n}: CardRegionProps & { textGap?: TextGap }) {\n\treturn (\n\t\t<CardHeaderPrimitive\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.header,\n\t\t\t\tstyles.header,\n\t\t\t\tpadding !== undefined && cardRegionPaddingClasses[padding],\n\t\t\t\ttextGap === 'dense' ? 'gap-dense' : 'gap-normal',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardTitle({\n\tclassName,\n\tchildren,\n\tsize: sizeProp,\n\t...props\n}: ComponentPropsWithoutRef<'div'> & { size?: CardTitleSize }) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\tif (!hasRenderableContent(children)) return null;\n\n\tconst isPlainText =\n\t\ttypeof children === 'string' ||\n\t\ttypeof children === 'number' ||\n\t\ttypeof children === 'bigint';\n\n\tif (!isPlainText) {\n\t\treturn (\n\t\t\t<CardTitlePrimitive\n\t\t\t\tclassName={cn(CARD_BEM.title, styles.title, 'font-medium', CARD_TITLE_SIZE_CLASSES[size], className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</CardTitlePrimitive>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Text\n\t\t\tdata-slot=\"card-title\"\n\t\t\ttag=\"div\"\n\t\t\tsize={CARD_TITLE_TEXT_SIZE[size]}\n\t\t\tweight=\"semibold\"\n\t\t\tlineHeight=\"tight\"\n\t\t\tclassName={cn(CARD_BEM.title, styles.title, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\nexport function CardDescription({\n\tclassName,\n\tchildren,\n\t...props\n}: ComponentPropsWithoutRef<'div'>) {\n\tif (!hasRenderableContent(children)) return null;\n\n\treturn (\n\t\t<Text\n\t\t\tdata-slot=\"card-description\"\n\t\t\ttag=\"div\"\n\t\t\ttype=\"secondary\"\n\t\t\tclassName={cn(CARD_BEM.description, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\nexport function CardContent({\n\tclassName,\n\tpadding,\n\t...props\n}: CardRegionProps) {\n\treturn (\n\t\t<CardContentPrimitive\n\t\t\tclassName={cn(CARD_BEM.content, styles.content, padding !== undefined && cardRegionPaddingClasses[padding], className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardFooter({\n\tclassName,\n\tpadding,\n\t...props\n}: CardRegionProps) {\n\treturn (\n\t\t<CardFooterPrimitive\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.footer,\n\t\t\t\tstyles.footer,\n\t\t\t\tpadding !== undefined && cardRegionPaddingClasses[padding],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n","/**\n * Inline alert banner rendered between the header and the card body.\n * Pulls itself up under the header (`alertOffsetWithHeader`) when one\n * exists so the visual gap between header bottom and alert top stays\n * tight; otherwise pushes itself down (`alertOffsetStandalone`) so it\n * doesn't kiss the card top edge.\n */\nimport type { ReactNode } from 'react';\n\nimport { Alert, AlertDescription } from '../../feedback/alert';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_BEM, CARD_INSET } from '../smart-card.tokens';\nimport type { CardAlertTone } from '../smart-card.types';\n\ninterface AlertSlotProps {\n\t/** Banner content. A plain string is wrapped for you. */\n\talert: ReactNode | string;\n\t/** Tone of the banner. */\n\talertTone: CardAlertTone;\n\t/** Whether a header sits above, deciding the banner's top spacing. */\n\thasHeader: boolean;\n\tclassName?: string;\n}\n\nexport function SmartCardAlert({\n\talert,\n\talertTone,\n\thasHeader,\n\tclassName,\n}: AlertSlotProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.alert,\n\t\t\t\tCARD_INSET.alertX,\n\t\t\t\tclassName,\n\t\t\t\thasHeader ? CARD_INSET.alertOffsetWithHeader : CARD_INSET.alertOffsetStandalone,\n\t\t\t)}\n\t\t>\n\t\t\t<Alert tone={alertTone}>\n\t\t\t\t<AlertDescription>{alert}</AlertDescription>\n\t\t\t</Alert>\n\t\t</div>\n\t);\n}\n","import type { ReactNode } from 'react';\nimport { Text } from '../../typography';\nimport { headingRoleSizes } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\n\n/**\n * One wrapping title/suffix composition shared by cards and content structures.\n * A plain-text title is exposed as a level-2 heading (below the page's h1) so\n * screen-reader users can move between surfaces; suffix badges stay outside its\n * accessible name. Custom title nodes keep their own semantics.\n */\nexport function SurfaceTitle({title, suffix, size = headingRoleSizes.subject, className, suffixClassName, dataSlot}: {\n title?: ReactNode; suffix?: ReactNode; size?: 'sm' | 'base' | 'lg';\n className?: string; suffixClassName?: string; dataSlot?: string;\n}) {\n const plainTitle = typeof title === 'string' || typeof title === 'number' || typeof title === 'bigint';\n return <Text tag=\"div\" type=\"inherit\" size={size} weight={plainTitle ? 'semibold' : 'medium'} lineHeight=\"tight\" data-slot={dataSlot} className={cn('surface-title--component flex min-w-0 flex-wrap items-center gap-space-md break-words', className)}>\n {title != null && <span className=\"min-w-0 max-w-full\" {...(plainTitle ? {role: 'heading', 'aria-level': 2} : {})}>{title}</span>}\n {suffix != null && <div className={cn('surface-title--suffix inline-flex max-w-full flex-wrap items-center gap-space-md', suffixClassName)}>{suffix}</div>}\n </Text>;\n}\n","/**\n * SmartCard actions menu — the shared `⋯` overflow trigger and dropdown of\n * consumer-supplied `SmartCardAction` items. It ends the header's trailing\n * row, after `headerEnd` and `headerAction`, as the quiet ghost square at the\n * provider scale.\n */\nimport {\n\tActionMenu,\n\ttype ActionMenuAction,\n} from '../../action-menu';\n\nimport type { SmartCardAction } from '../smart-card.types';\n\ninterface ActionsMenuProps {\n\t/** Controls offered on the surface. */\n\tactions: readonly SmartCardAction[];\n\tactionsLabel: string;\n}\n\nexport function ActionsMenu({ actions, actionsLabel }: ActionsMenuProps) {\n\tconst actionDefinitions: ActionMenuAction[] = actions.map((action, index) => ({ ...action, id: action.id ?? `card-action-${index}` }));\n\n\treturn (\n\t\t<ActionMenu\n\t\t\tactions={actionDefinitions}\n\t\t\tsrText={actionsLabel}\n\t\t\talign=\"end\"\n\t\t\tcloseOnSelect\n\t\t\tbuttonProps={{ className: 'card--actions-trigger' }}\n\t\t/>\n\t);\n}\n","/**\n * SmartCardHeaderRow — the chrome above the card body. Combines icon /\n * title / description / tooltip / suffix on the leading side with the\n * trailing `headerEnd` / `headerAction` slots and the actions menu.\n *\n * `TooltipTrigger_Info` is colocated here because it's only used by the\n * header — keeping it private avoids polluting the public partial\n * surface.\n */\nimport { Info } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { SurfaceTitle } from '../../display/surface-title';\nimport { Button } from '../../buttons';\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from '../../display/tooltip';\nimport { Stack, type TextGap } from '../../structure';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_INSET } from '../smart-card.tokens';\nimport { cardRecipes } from '../card.recipes';\nimport type { CardTitleSize, SmartCardAction } from '../smart-card.types';\n\nimport { CardHeader, CardDescription } from './card-primitives';\nimport { hasRenderableContent } from './has-renderable-content';\nimport { ActionsMenu } from './smart-card-actions-menu';\n\nfunction TooltipTrigger_Info({ tooltipLabel }: { tooltipLabel: string }) {\n\treturn (\n\t\t<TooltipTrigger\n\t\t\trender={(triggerProps) => {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\tconst passthrough = triggerProps as Record<string, any>;\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t{...passthrough}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'card--tooltip-trigger',\n\t\t\t\t\t\t\t'text-muted-foreground',\n\t\t\t\t\t\t\t// Like a header command, the trigger sits in the title's line box\n\t\t\t\t\t\t\t// instead of growing the title row past a peer card's.\n\t\t\t\t\t\t\tcardRecipes.tooltipTriggerInline,\n\t\t\t\t\t\t\tpassthrough.className,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\taria-label={tooltipLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Info className=\"size-icon-md\" />\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n\ninterface HeaderProps {\n\t/** Leading glyph on the title line. */\n\ticon?: ReactNode;\n\t/** Card title. */\n\ttitle?: ReactNode;\n\t/** Content immediately after the title. */\n\ttitleSuffix?: ReactNode;\n\t/** Supporting sentence under the title. */\n\tdescription?: ReactNode;\n\ttextGap?: TextGap;\n\t/** Explanatory copy behind an info affordance on the title line. */\n\ttooltip?: ReactNode;\n\t/** Accessible name for the tooltip trigger. */\n\ttooltipLabel: string;\n\t/** Full-width row above the title. */\n\theaderStart?: ReactNode;\n\t/** Content at the end of the header. */\n\theaderEnd?: ReactNode;\n\t/** Single control before the overflow menu. */\n\theaderAction?: ReactNode;\n\t/** Overflow menu at the far end of the header. */\n\tactions?: readonly SmartCardAction[];\n\t/** Accessible name for the overflow trigger. */\n\tactionsLabel: string;\n\t/** Card title typography. */\n\ttitleSize: CardTitleSize;\n\t/** Pull an action-height command into the title line. Off for the framed header, which centres both in its own action-height row. */\n\tinlineCommands?: boolean;\n\tclassName?: string;\n}\n\nexport function SmartCardHeaderRow({\n\ticon,\n\ttitle,\n\ttitleSuffix,\n\tdescription,\n\ttextGap = 'normal',\n\ttooltip,\n\ttooltipLabel,\n\theaderStart,\n\theaderEnd,\n\theaderAction,\n\tactions,\n\tactionsLabel,\n\ttitleSize,\n\tinlineCommands = true,\n\tclassName,\n}: HeaderProps) {\n\tconst cardActions = Array.isArray(actions) ? actions : [];\n\tconst hasActions = cardActions.length > 0;\n\n\tconst hasIcon = hasRenderableContent(icon);\n\tconst hasTitle = hasRenderableContent(title);\n\tconst hasTitleSuffix = hasRenderableContent(titleSuffix);\n\tconst hasDescription = hasRenderableContent(description);\n\tconst hasTooltip = hasRenderableContent(tooltip);\n\tconst hasHeaderStart = hasRenderableContent(headerStart);\n\tconst hasHeaderEnd = hasRenderableContent(headerEnd);\n\tconst hasHeaderAction = hasRenderableContent(headerAction);\n\n\tconst showTitleRow = hasIcon || hasTitle || hasTitleSuffix || hasTooltip;\n\tconst showTrailing = hasHeaderEnd || hasHeaderAction || hasActions;\n\tconst singleLine = !hasDescription && !hasHeaderStart;\n\t// An action-height command on a single-line header sits on the title line\n\t// without growing the row; passive header-end content stays top-aligned.\n\tconst inlineTrailing = inlineCommands && singleLine && (hasHeaderAction || hasActions);\n\n\treturn (\n\t\t<CardHeader\n\t\t\tclassName={cn(\n\t\t\t\tcardRecipes.headerRow,\n\t\t\t\thasHeaderStart && (textGap === 'dense' ? 'gap-y-dense' : 'gap-y-normal'),\n\t\t\t\tCARD_INSET.headerX,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!!hasHeaderStart && <div className=\"card--header-context min-w-0 max-w-full basis-full\">{headerStart}</div>}\n\t\t\t<Stack gap={textGap} className={cn(\"card--header-start\", cardRecipes.headerLeading, singleLine && cardRecipes.headerLeadingSingle, inlineTrailing && cardRecipes.headerLeadingInline)}>\n\t\t\t\t{!!showTitleRow && (\n\t\t\t\t\t<div className=\"card--title-row flex min-w-0 items-start gap-space-sm\">\n\t\t\t\t\t\t{!!hasIcon && (\n\t\t\t\t\t\t\t<span className=\"card--icon flex shrink-0 items-center pt-space-2xs text-muted-foreground [&_svg]:size-icon\">\n\t\t\t\t\t\t\t\t{icon}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<SurfaceTitle dataSlot=\"card-title\" title={title} suffix={hasTitleSuffix ? titleSuffix : undefined} size={titleSize === 'md' ? 'base' : titleSize === 'lg' ? 'lg' : 'sm'} className=\"card--title flex-1\" suffixClassName=\"card--title-suffix\" />\n\t\t\t\t\t\t{!!hasTooltip && (\n\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t<TooltipTrigger_Info tooltipLabel={tooltipLabel} />\n\t\t\t\t\t\t\t\t<TooltipContent>{tooltip}</TooltipContent>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasDescription && (\n\t\t\t\t\t<CardDescription className=\"text-start\">{description}</CardDescription>\n\t\t\t\t)}\n\t\t\t</Stack>\n\n\t\t\t{!!showTrailing && (\n\t\t\t\t<div className={cn(\"card--header-end\", cardRecipes.headerTrailing, inlineTrailing && cardRecipes.headerTrailingInline)}>\n\t\t\t\t\t{!!hasHeaderEnd && headerEnd}\n\t\t\t\t\t{!!hasHeaderAction && headerAction}\n\t\t\t\t\t{!!hasActions && (\n\t\t\t\t\t\t<ActionsMenu actions={cardActions} actionsLabel={actionsLabel} />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</CardHeader>\n\t);\n}\n","/**\n * SmartCard strings — i18n surface for the chrome the consumer doesn't\n * pass directly. Most copy (title, description, action labels, alert\n * body) flows in via props; the strings here cover the implicit\n * affordances (header actions, tooltip, and expand toggle).\n */\n\nexport interface SmartCardStrings {\n\tactionsLabel: string;\n\ttooltipLabel: string;\n\texpandLabel: string;\n\tcollapseLabel: string;\n}\n\nexport const defaultSmartCardStrings = {\n\tactionsLabel: 'More actions',\n\ttooltipLabel: 'Card info',\n\texpandLabel: 'Expand card',\n\tcollapseLabel: 'Collapse card',\n} satisfies SmartCardStrings;\n","import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\n/**\n * SmartCard — blocks card with header (icon, title, suffix, description,\n * tooltip), actions menu, alert banner, header / content / footer slots,\n * surface variants (card / flat / framed), and an opt-in expandable body.\n *\n * The single card primitive everything else builds on — never reach past it\n * to shadcn `Card` directly. The CardShell / CardHeader / CardTitle /\n * CardDescription / CardContent / CardFooter primitives are re-exported\n * for advanced composition (deeply customised layouts that still want the\n * design-system surface tokens). Each subregion paints a BEM-style hook\n * (`card--component`, `card--header`, `card--title`, …) for CSS / test /\n * analytics targeting independent of shadcn's data-slot internals.\n *\n * The file is a thin orchestrator. The actual chrome lives in:\n * - `./smart-card.types.ts` — public prop / variant types\n * - `./smart-card.strings.ts` — i18n (expand toggle copy)\n * - `./smart-card.tokens.ts` — CARD_INSET + SURFACE_CLASSES + CARD_BEM\n * - `./partials/card-primitives.tsx` — CardShell + CardHeader / Title /\n * Description / Content / Footer\n * - `./partials/smart-card-header-row.tsx` — header layout + actions menu\n * - `./partials/smart-card-alert.tsx` — inline alert banner\n * - `./partials/smart-card-actions-menu.tsx` — shared `⋯` overflow menu\n * - `./partials/smart-card-skeleton.tsx` — loading placeholder\n * - `./partials/has-renderable-content.ts` — slot-empty predicate\n */\nimport { ChevronDown } from 'lucide-react';\nimport {\n\ttype CSSProperties,\n\ttype FocusEvent,\n\tforwardRef,\n\tuseCallback,\n\tuseId,\n\tuseState,\n} from 'react';\n\nimport { Button } from '../buttons';\nimport { Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { cardRegionGapClasses } from './card.recipes';\nimport { gapRecipe } from '../structure/structure.recipes';\nimport { compositionClasses, compositionRhythm } from '../structure/composition.recipes';\nimport { useStrings } from '../../../lib/strings';\nimport { useCardConfig, useDensityConfig } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tCardContent,\n\tCardFooter,\n\tCardShell,\n} from './partials/card-primitives';\nimport { hasRenderableContent } from './partials/has-renderable-content';\nimport { SmartCardAlert } from './partials/smart-card-alert';\nimport { SmartCardHeaderRow } from './partials/smart-card-header-row';\nimport {\n\tdefaultSmartCardStrings,\n} from './smart-card.strings';\nimport {\n\tCARD_BEM,\n\tCARD_INSET,\n\tSURFACE_CLASSES,\n} from './smart-card.tokens';\nimport type {\n\tSmartCardProps,\n\tSmartCardSurface,\n} from './smart-card.types';\nimport { motionRecipes } from '../../../lib/motion-recipes';\n\nexport const Card = forwardRef<HTMLDivElement, SmartCardProps>(function Card({\n\ticon,\n\ttitle,\n\ttitleSuffix,\n\tdescription,\n\ttextGap = 'normal',\n\ttooltip,\n\ttooltipAriaLabel,\n\tfooterText,\n\talert,\n\talertTone = 'neutral',\n\tsurface,\n\tpadding = 'md',\n\theaderPlacement = 'inside',\n\tgap,\n\tcontentGap,\n\ttitleSize,\n\tactions,\n\tactionsLabel,\n\theaderAction,\n\theaderStart,\n\theaderEnd,\n\tcontentTop,\n\tcontentBottom,\n\tfooterSlot,\n\theaderDivider,\n\tfooterDivider: footerDividerProp,\n\texpandable = false,\n\tdefaultExpanded = false,\n\texpanded: expandedProp,\n\tonExpandedChange,\n\tchildren,\n\tclassName,\n\theaderClassName,\n\tcontentClassName,\n\tfooterClassName,\n\tstrings: stringsProp,\n\t...rootProps\n}, ref) {\n\tconst {\n\t\tdefaultSurface,\n\t\tdefaultHeaderDivider,\n\t\tdefaultFooterDivider,\n\t} = useCardConfig();\n\tconst { defaultScale } = useDensityConfig();\n\tconst resolvedTitleSize = resolveComponentScale(titleSize, defaultScale);\n\tconst inset = { none: 'px-0', sm: 'px-surface-xs', md: 'px-surface', lg: 'px-surface-lg' }[padding];\n\tconst vertical = { none: 'py-0', sm: 'py-surface-xs', md: 'py-surface', lg: 'py-surface-lg' }[padding];\n\tconst tokens = { ...CARD_INSET, headerX: inset, contentX: inset, footerX: inset, headerDividerY: { none: '!pb-0', sm: '!pb-surface-xs', md: '!pb-surface', lg: '!pb-surface-lg' }[padding], footerDividerY: { none: '!pt-0', sm: '!pt-surface-xs', md: '!pt-surface', lg: '!pt-surface-lg' }[padding] };\n\tconst framedHeader = headerPlacement === 'frame';\n\tconst cardActions = Array.isArray(actions) ? actions : [];\n\tconst strings = useStrings(defaultSmartCardStrings, stringsProp);\n\tconst resolvedActionsLabel =\n\t\tactionsLabel ?? strings.actionsLabel;\n\n\tconst isExpandable = expandable !== false && expandable !== undefined;\n\tconst collapsedMaxHeightRaw =\n\t\ttypeof expandable === 'object' && expandable?.collapsedMaxHeight !== undefined\n\t\t\t? expandable.collapsedMaxHeight\n\t\t\t: '12rem';\n\tconst collapsedMaxHeight =\n\t\ttypeof collapsedMaxHeightRaw === 'number'\n\t\t\t? `${collapsedMaxHeightRaw}px`\n\t\t\t: collapsedMaxHeightRaw;\n\n\tconst isExpandedControlled = expandedProp !== undefined;\n\tconst bodyId = useId();\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = isExpandedControlled ? expandedProp : internalExpanded;\n\tconst handleToggle = useCallback(() => {\n\t\tconst next = !expanded;\n\t\tif (!isExpandedControlled) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t}, [expanded, isExpandedControlled, onExpandedChange]);\n\tconst handleBodyFocus = (event: FocusEvent<HTMLDivElement>) => {\n\t\tif (!isExpandable || expanded) return;\n\t\tconst body = event.currentTarget;\n\t\tconst target = event.target;\n\t\tconst frame = body.getBoundingClientRect();\n\t\tconst control = target.getBoundingClientRect();\n\t\t// Native keyboard focus can scroll an overflow-hidden preview before the\n\t\t// focus event reaches React. Reveal the complete body in either case.\n\t\tif (body.scrollTop === 0 && control.top >= frame.top && control.bottom <= frame.bottom) return;\n\t\tif (!isExpandedControlled) setInternalExpanded(true);\n\t\tonExpandedChange?.(true);\n\t\trequestAnimationFrame(() => {\n\t\t\tif (target.isConnected && target === target.ownerDocument.activeElement) {\n\t\t\t\ttarget.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });\n\t\t\t}\n\t\t});\n\t};\n\n\tconst hasHeader =\n\t\thasRenderableContent(icon) ||\n\t\thasRenderableContent(title) ||\n\t\thasRenderableContent(description) ||\n\t\tcardActions.length > 0 ||\n\t\thasRenderableContent(headerAction) ||\n\t\thasRenderableContent(headerStart) ||\n\t\thasRenderableContent(headerEnd);\n\n\tconst hasAlert = hasRenderableContent(alert);\n\tconst hasFooterText = hasRenderableContent(footerText);\n\tconst hasFooterSlot = hasRenderableContent(footerSlot);\n\tconst hasContentTop = hasRenderableContent(contentTop);\n\tconst hasContentBottom = hasRenderableContent(contentBottom);\n\tconst hasChildren = hasRenderableContent(children);\n\t// Expandable cards retain their explicitly requested collapse region.\n\tconst hasBody = hasContentTop || hasContentBottom || hasChildren || isExpandable;\n\tconst hasBodySurface = hasAlert || hasBody || hasFooterText || hasFooterSlot;\n\tconst headerFooterOnly = hasHeader && (hasFooterText || hasFooterSlot) && !hasAlert && !hasBody && !framedHeader;\n\n\tconst tooltipLabel =\n\t\ttooltipAriaLabel && tooltipAriaLabel.trim().length > 0\n\t\t\t? tooltipAriaLabel\n\t\t\t: strings.tooltipLabel;\n\n\tconst collapseStyle: CSSProperties | undefined = isExpandable\n\t\t? {\n\t\t\t\tmaxHeight: expanded ? '' : collapsedMaxHeight,\n\t\t\t}\n\t\t: undefined;\n\n\t// Resolve surface from the instance, then the provider default.\n\tconst resolvedSurface: SmartCardSurface =\n\t\tsurface ?? defaultSurface ?? 'card';\n\t// The standard header breathes without a rule; the footer retains a boundary.\n\t// Flat, card-free structure has no frame to rule, and a header\n\t// set above an inset body is already separated by that body's edge. Explicit\n\t// per-card booleans always win.\n\tconst framed = resolvedSurface !== 'flat';\n\tconst resolvedHeaderDivider = headerDivider ?? (framed && !framedHeader && (defaultHeaderDivider ?? false));\n\tconst footerDivider = footerDividerProp ?? (framed && (defaultFooterDivider ?? true));\n\t// Adjacent header/footer regions share one boundary, owned by the footer.\n\tconst sharedHeaderFooterDivider = headerFooterOnly && (resolvedHeaderDivider || footerDivider);\n\n\treturn (\n\t\t<CardShell\n\t\t\t{...rootProps}\n\t\t\tdata-header-placement={headerPlacement}\n\t\t\tref={ref}\n\t\t\tdata-surface={resolvedSurface}\n\t\t\tclassName={cn(\n\t\t\t\tSURFACE_CLASSES[resolvedSurface],\n\t\t\t\ttokens.shell,\n\t\t\t\tvertical,\n\t\t\t\t// Regional rhythm follows the chosen inset. Padding-free subject structure\n\t\t\t\t// keeps the base rhythm; an explicit semantic gap takes precedence.\n\t\t\t\tgap ? gapRecipe({ gap }) : cardRegionGapClasses[padding],\n\t\t\t\tsharedHeaderFooterDivider && 'gap-0',\n\t\t\t\tframedHeader && 'rounded-surface bg-muted text-foreground p-surface-xs pt-0 gap-0 ring-0',\n\t\t\t\t// Flat subject structure has no surface edge to clip against.\n\t\t\t\t// With no inset, rounded clipping otherwise cuts into its heading.\n\t\t\t\tresolvedSurface === 'flat' && !framedHeader && 'overflow-visible',\n\t\t\t\t// The toggle straddles the card edge. Keep tokenized clearance\n\t\t\t\t// inside the card and reserve its outside half in document flow.\n\t\t\t\t// `overflow-visible` counters the shadcn primitive's clipping.\n\t\t\t\tisExpandable && cn(\n\t\t\t\t\t'relative mb-space-xl !overflow-visible',\n\t\t\t\t\ttokens.expandableBottom,\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!!hasHeader && (\n\t\t\t\t<SmartCardHeaderRow\n\t\t\t\t\ticon={icon}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\ttitleSuffix={titleSuffix}\n\t\t\t\t\tdescription={description}\n\t\t\t\t\ttextGap={textGap}\n\t\t\t\t\ttooltip={tooltip}\n\t\t\t\t\ttooltipLabel={tooltipLabel}\n\t\t\t\t\theaderStart={headerStart}\n\t\t\t\t\theaderEnd={headerEnd}\n\t\t\t\t\theaderAction={headerAction}\n\t\t\t\t\tactions={cardActions}\n\t\t\t\t\tactionsLabel={resolvedActionsLabel}\n\t\t\t\t\ttitleSize={resolvedTitleSize}\n\t\t\t\t\tinlineCommands={!framedHeader}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tresolvedHeaderDivider && !sharedHeaderFooterDivider && cn(\n\t\t\t\t\t\t\tsurfaceDividerRecipes.frame.header,\n\t\t\t\t\t\t\ttokens.headerDividerY,\n\t\t\t\t\t\t),\n\t\t\t\t\t\tsharedHeaderFooterDivider && tokens.headerDividerY,\n\t\t\t\t\t\ttokens.headerX,\n\t\t\t\t\t\tframedHeader && 'flex-row items-center min-h-action px-surface-xs py-space-2xs [&_.card--title-row]:items-center [&_.card--icon]:pt-0',\n\t\t\t\t\t\theaderClassName,\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{hasBodySurface && <div className={framedHeader ? cn('card--body-surface flex min-w-0 flex-col rounded-radius bg-card text-card-foreground', gap ? gapRecipe({ gap }) : cardRegionGapClasses[padding], surfaceDividerRecipes.frame.shell, vertical) : 'contents'}>\n\t\t\t{!!hasAlert && (\n\t\t\t\t<SmartCardAlert\n\t\t\t\t\talert={alert}\n\t\t\t\t\talertTone={alertTone}\n\t\t\t\t\thasHeader={hasHeader}\n\t\t\t\t\tclassName={inset}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{!!hasBody && <CardContent\n\t\t\t\tid={isExpandable ? bodyId : undefined}\n\t\t\t\tonFocusCapture={isExpandable ? handleBodyFocus : undefined}\n\t\t\t\tclassName={cn(\n\t\t\t\t\ttokens.contentX,\n\t\t\t\t\ttokens.contentY,\n\t\t\t\t\tisExpandable && cn(\n\t\t\t\t\t\t'relative transition-[max-height] duration-500 ease-in-out motion-reduce:transition-none',\n\t\t\t\t\t\texpanded ? 'overflow-visible' : 'overflow-hidden',\n\t\t\t\t\t),\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t\tstyle={collapseStyle}\n\t\t\t>\n\t\t\t\t{hasContentTop || hasContentBottom ? (\n\t\t\t\t\t// contentTop/contentBottom are body regions, so they share the content gap with children.\n\t\t\t\t\t<Stack gap={contentGap ?? compositionRhythm.related}>\n\t\t\t\t\t\t{!!hasContentTop && contentTop}\n\t\t\t\t\t\t{hasChildren && (contentGap ? <Stack gap={contentGap}>{children}</Stack> : <div className={cn('flex min-w-0 flex-col', compositionClasses.related)}>{children}</div>)}\n\t\t\t\t\t\t{!!hasContentBottom && contentBottom}\n\t\t\t\t\t</Stack>\n\t\t\t\t) : contentGap ? <Stack gap={contentGap}>{children}</Stack> : children}\n\n\t\t\t\t{!!isExpandable && !expanded && (\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tCARD_BEM.collapseFade,\n\t\t\t\t\t\t\t'pointer-events-none absolute inset-x-0 bottom-0 h-20 rounded-b-surface bg-linear-to-t to-transparent',\n\t\t\t\t\t\t\tresolvedSurface === 'flat' ? 'from-background' : 'from-card',\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</CardContent>}\n\n\t\t\t{(hasFooterText || hasFooterSlot) && (\n\t\t\t\t<CardFooter className={cn(\n\t\t\t\t\ttokens.footerX,\n\t\t\t\t\thasFooterSlot ? 'flex-col items-stretch gap-space-md' : 'justify-end',\n\t\t\t\t\t(footerDivider || sharedHeaderFooterDivider) && cn(surfaceDividerRecipes.frame.footer, tokens.footerDividerY),\n\t\t\t\t\tfooterClassName,\n\t\t\t\t)}>\n\t\t\t\t\t{hasFooterText && (typeof footerText === 'string' || typeof footerText === 'number' || typeof footerText === 'bigint'\n\t\t\t\t\t\t? <Text tag=\"span\" size=\"xs\" type=\"secondary\">{footerText}</Text>\n\t\t\t\t\t\t: footerText)}\n\t\t\t\t\t{hasFooterSlot && footerSlot}\n\t\t\t\t</CardFooter>\n\t\t\t)}\n\n\t\t\t</div>}\n\n\t\t\t{!!isExpandable && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tCARD_BEM.expandToggle,\n\t\t\t\t\t\t'absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\tonClick={handleToggle}\n\t\t\t\t\t\taria-expanded={expanded}\n\t\t\t\t\t\taria-controls={bodyId}\n\t\t\t\t\t\taria-label={expanded ? strings.collapseLabel : strings.expandLabel}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tCARD_BEM.expandToggleButton,\n\t\t\t\t\t\t\tcn(surfaceDividerRecipes.frame.shell, 'bg-background text-foreground shadow-sm'),\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ChevronDown\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t`size-icon ${motionRecipes.chevron}`,\n\t\t\t\t\t\t\t\texpanded && 'rotate-180',\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</CardShell>\n\t);\n});\n\nCard.displayName = 'Card';\n\n/** @deprecated Use Card. */\nexport const SmartCard = Card;\n\n// ──────────────────────────────────────────────────────────────────────────\n// Re-exports — public surface lives here so `import { ... } from\n// '.'` keeps working through the file split.\n// ──────────────────────────────────────────────────────────────────────────\n\nexport {\n\tdefaultSmartCardStrings,\n\ttype SmartCardStrings,\n} from './smart-card.strings';\nexport type {\n\tCardAlertTone,\n\tSmartCardAction,\n\tSmartCardProps,\n\tSmartCardSkeletonProps,\n\tSmartCardSurface,\n} from './smart-card.types';\nexport {\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardShell,\n\tCardTitle,\n} from './partials/card-primitives';\nexport { hasRenderableContent } from './partials/has-renderable-content';\nexport { SmartCardSkeleton } from './partials/smart-card-skeleton';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwB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wCAAwC,gBACvDkB,MAAiBE,MAA8B7K,EAAGe,EAAsB,MAAM,QAAQ2G,EAAO,cAAc,GAC5GwD,EACD;MALA,UAAA,CAME3B,MAAkB,OAAOC,KAAe,YAAY,OAAOA,KAAe,YAAY,OAAOA,KAAe,WAC1G,kBAACxH,GAAD;OAAM,KAAI;OAAO,MAAK;OAAK,MAAK;OAAa,UAAAwH;MAAiB,CAAA,IAC9DA,IACFC,KAAiBC,CACP;;IAGR;;GAEJ,CAAC,CAAC1B,KACF,kBAAC,OAAD;IACC,WAAWhI,EACViD,EAAS,cACT,kEACD;IAEA,UAAA,kBAAC/C,GAAD;KACC,MAAK;KACL,MAAK;KACL,aAAY;KACZ,MAAK;KAAK,UAAA;KACV,SAAS0I;KACT,iBAAeD;KACf,iBAAeN;KACf,cAAYM,IAAWd,EAAQ,gBAAgBA,EAAQ;KACvD,WAAW7H,EACViD,EAAS,oBACTjD,EAAGe,EAAsB,MAAM,OAAO,yCAAyC,CAChF;KAEA,UAAA,kBAACoK,IAAD;MACC,eAAY;MACZ,WAAWnL,EACV,aAAaM,GAAc,WAC3BqI,KAAY,YACb;KACA,CAAA;IACM,CAAA;GACJ,CAAA;EAEI;;AAEb,CAAC;AAED,EAAK,cAAc;AAGnB,IAAayC,KAAYlE"}
|
|
1
|
+
{"version":3,"file":"smart-card-B6vLxqa_.js","names":["Card","CardHeader","CardTitle","CardContent","CardFooter","styles","styles","CardPrimitive","CardHeaderPrimitive","CardTitlePrimitive","CardContentPrimitive","CardFooterPrimitive","resolveComponentScale","useCardConfig","useDensityConfig","useTypographyConfig","cn","affordanceGeometry","Button","descendantInlineLinkClassName","resolveTextClassNames","headingRoleSizes","motionRecipes","TooltipTrigger","TooltipContent","Tooltip","gapRecipe","Stack","ICON_CHILD_SIZE_CLASSNAMES","toneRecipes","rowBlockPaddingClasses","surfaceDividerRecipes","compositionRhythm","compositionClasses","ActionMenu","alertVariants","cva","isSimpleText","value","Alert","forwardRef","props","tone","variant","defaultTextSize","className","AlertTitle","children","Text","AlertDescription","AlertMetadata","AlertMetadataItem","icon","label","numeric","AlertAction","cardRegionPaddingClasses","cardRegionGapClasses","cardRecipes","Card$1","size","CardHeader$1","CardTitle$1","CardContent$1","CardFooter$1","CARD_BEM","CARD_INSET","SURFACE_CLASSES","hasRenderableContent","content","isValidElement","Fragment","CARD_TITLE_SIZE_CLASSES","CARD_TITLE_TEXT_SIZE","CardShell","surface","CardHeader","padding","textGap","CardTitle","sizeProp","defaultScale","CardDescription","CardContent","CardFooter","SmartCardAlert","hasHeader","alertTone","alert","SurfaceTitle","plainTitle","title","dataSlot","suffix","suffixClassName","ActionsMenu","actionDefinitions","actions","action","index","actionsLabel","TooltipTrigger_Info","passthrough","triggerProps","tooltipLabel","Info","SmartCardHeaderRow","cardActions","hasActions","hasIcon","hasTitle","hasTitleSuffix","titleSuffix","hasDescription","description","hasTooltip","tooltip","hasHeaderStart","headerStart","hasHeaderEnd","headerEnd","hasHeaderAction","headerAction","showTitleRow","showTrailing","singleLine","inlineTrailing","inlineCommands","titleSize","defaultSmartCardStrings","Card","footerDividerProp","expandedProp","stringsProp","rootProps","resolvedTitleSize","inset","vertical","tokens","framedHeader","headerPlacement","strings","useStrings","resolvedActionsLabel","isExpandable","expandable","collapsedMaxHeightRaw","collapsedMaxHeight","isExpandedControlled","bodyId","useId","internalExpanded","setInternalExpanded","useState","defaultExpanded","expanded","handleToggle","useCallback","next","onExpandedChange","handleBodyFocus","body","event","target","frame","control","hasAlert","hasFooterText","footerText","hasFooterSlot","footerSlot","hasContentTop","contentTop","hasContentBottom","contentBottom","hasChildren","hasBody","hasBodySurface","headerFooterOnly","tooltipAriaLabel","collapseStyle","resolvedSurface","defaultSurface","framed","resolvedHeaderDivider","headerDivider","defaultHeaderDivider","footerDivider","defaultFooterDivider","sharedHeaderFooterDivider","gap","headerClassName","contentClassName","contentGap","footerClassName","ChevronDown","SmartCard"],"sources":["../src/components/base/feedback/alert.tsx","../src/components/base/cards/card.recipes.ts","../src/components/ui/card.tsx","../src/components/base/cards/smart-card.tokens.ts","../src/components/base/cards/partials/has-renderable-content.ts","../src/components/base/cards/partials/card-primitives.tsx","../src/components/base/cards/partials/smart-card-alert.tsx","../src/components/base/display/surface-title.tsx","../src/components/base/cards/partials/smart-card-actions-menu.tsx","../src/components/base/cards/partials/smart-card-header-row.tsx","../src/components/base/cards/smart-card.strings.ts","../src/components/base/cards/smart-card.tsx"],"sourcesContent":["/**\n * Alert — base notice primitive with semantic variants and container-driven actions.\n *\n * Package-owned notice inspired by ReUI's alert layout. Consumers import this\n * base alert for the library's typography, token, and DOM-hook contract.\n */\nimport {\n\tforwardRef,\n\ttype ComponentPropsWithoutRef,\n\ttype ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Text } from '../../typography';\nimport { descendantInlineLinkClassName } from '../../typography/text-link';\nimport { resolveTextClassNames } from '../../typography/text.styles';\nimport { useTypographyConfig } from '../../../lib/ui-provider';\nimport { Stack } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { ICON_CHILD_SIZE_CLASSNAMES } from '../display/icon-size';\nimport type { SemanticTone } from '../../../lib/component-vocabulary';\nimport { toneRecipes } from '../../../lib/tone-recipes';\nimport { rowBlockPaddingClasses } from '../../../lib/row-recipes';\n\nconst alertVariants = cva(\n\t[\n\t\t// A notice is one row of content, so it takes Item's row geometry: the row\n\t\t// insets, Item's media/content/actions gap and its copy rhythm (gap-normal).\n\t\t// Toast follows the same recipe.\n\t\t// The alert is its own container: AlertAction sits beside the copy only when the\n\t\t// alert itself is wide enough, never because the viewport is.\n\t\t`alert--component @container/alert box-border relative grid w-full grid-cols-[0_1fr] items-start gap-y-normal rounded-radius border px-row-x ${rowBlockPaddingClasses.default} text-start`,\n\t\t'has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-space-lg',\n\t\t// Two explicit tracks; a beside action opens an implicit third (auto) track, so\n\t\t// a stacked action leaves no empty column or gap behind.\n\t\t'has-[>[data-slot=alert-action]]:grid-cols-[0_minmax(0,1fr)] has-[>svg]:has-[>[data-slot=alert-action]]:grid-cols-[auto_minmax(0,1fr)]',\n\t\t// Without a glyph the empty first track takes no gap, so the copy keeps the row\n\t\t// inset; a beside action then takes Item's actions gap as its own margin.\n\t\t'@sm/alert:[&:not(:has(>svg))>[data-slot=alert-action]]:ms-space-lg',\n\t\t// Root tokens, not the `--spacing-*` aliases: an alias resolves at :root and would\n\t\t// ignore a scoped density/space/icon boundary.\n\t\t'[&>svg]:row-span-2 [&>svg]:mt-[calc((1em*1.375-var(--icon))/2)] [&>svg]:shrink-0',\n\t\tICON_CHILD_SIZE_CLASSNAMES.md,\n\t],\n\t{\n\t\tvariants: {\n\t\t\ttone: {\n\t\t\t\tneutral: 'border-border bg-card text-card-foreground',\n\t\t\t\tprimary: `${toneRecipes.primary.edge} ${toneRecipes.primary.wash} text-card-foreground [&>svg]:text-primary-accent`,\n\t\t\t\tsecondary: 'border-border bg-muted/50 text-card-foreground [&>svg]:text-secondary-foreground',\n\t\t\t\tinfo: `${toneRecipes.info.edge} ${toneRecipes.info.wash} text-card-foreground [&>svg]:text-info`,\n\t\t\t\tsuccess: `${toneRecipes.success.edge} ${toneRecipes.success.wash} text-card-foreground [&>svg]:text-success`,\n\t\t\t\twarning: `${toneRecipes.warning.edge} ${toneRecipes.warning.wash} text-card-foreground [&>svg]:text-warning-accent`,\n\t\t\t\tdestructive: `${toneRecipes.destructive.edge} ${toneRecipes.destructive.wash} text-card-foreground [&>svg]:text-destructive`,\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault: '',\n\t\t\t\tinverse: [\n\t\t\t\t\t'border-foreground bg-foreground text-background',\n\t\t\t\t\t'[&>svg]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-title]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-description]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-item]]:bg-background/10',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-item]>svg]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-label]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-value]_[data-typography=text]]:text-background',\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\ttone: 'neutral',\n\t\t\tvariant: 'default',\n\t\t},\n\t},\n);\n\nexport type AlertVariant = NonNullable<VariantProps<typeof alertVariants>['variant']>;\nexport type AlertTone = SemanticTone;\n\nexport interface AlertProps\n\textends ComponentPropsWithoutRef<'div'>,\n\t\tVariantProps<typeof alertVariants> {}\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(\n\t{ className, tone, variant, role = 'alert', ...props },\n\tref,\n) {\n\tconst { defaultTextSize } = useTypographyConfig();\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-slot=\"alert\"\n\t\t\tdata-tone={tone ?? 'neutral'}\n\t\t\tdata-variant={variant ?? 'default'}\n\t\t\trole={role}\n\t\t\tclassName={cn(resolveTextClassNames({ size: defaultTextSize, type: 'inherit' }), alertVariants({ tone, variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nAlert.displayName = 'Alert';\n\nconst AlertTitle = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertTitle({ className, children, ...props }, ref) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-title\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--title col-start-2 min-h-icon leading-snug',\n\t\t\t\t\tdescendantInlineLinkClassName,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText(children) ? (\n\t\t\t\t\t<Text tag=\"span\" type=\"inherit\" weight=\"semibold\" lineHeight=\"snug\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</div>\n\t\t);\n\t},\n);\nAlertTitle.displayName = 'AlertTitle';\n\nconst AlertDescription = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertDescription({ className, children, ...props }, ref) {\n\t\treturn (\n\t\t\t<Stack\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-description\"\n\t\t\t\tgap=\"xs\"\n\t\t\t\talign=\"start\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--description col-start-2 [&_p]:leading-relaxed',\n\t\t\t\t\tdescendantInlineLinkClassName,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText(children) ? (\n\t\t\t\t\t<Text tag=\"span\" type=\"secondary\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</Stack>\n\t\t);\n\t},\n);\nAlertDescription.displayName = 'AlertDescription';\n\nexport interface AlertMetadataProps extends ComponentPropsWithoutRef<'dl'> {\n\t/** Metadata items or consumer-owned definition-list content. */\n\tchildren?: ReactNode;\n\t/** Accessible name for the fact group when the alert title is not sufficient. */\n\t'aria-label'?: string;\n\t/** Consumer styling hook merged with the tokenized defaults. */\n\tclassName?: string;\n}\n\n/**\n * Compact semantic facts associated with an alert. Use `aria-label` when the\n * surrounding title does not already describe the metadata group.\n */\nconst AlertMetadata = forwardRef<HTMLDListElement, AlertMetadataProps>(\n\tfunction AlertMetadata({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<dl\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-metadata\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert-metadata--component alert--metadata col-start-2 m-0 mt-space-xs flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-xs',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAlertMetadata.displayName = 'AlertMetadata';\n\nexport interface AlertMetadataItemProps\n\textends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {\n\t/** Consumer styling hook merged with the tokenized defaults. */\n\tclassName?: string;\n\t/** Decorative or semantic leading media. Decorative icons should be aria-hidden. */\n\ticon?: ReactNode;\n\t/** User-provided metadata key; the Alert component owns no copy. */\n\tlabel: ReactNode;\n\t/** User-provided metadata value. May contain a package value primitive. */\n\tvalue: ReactNode;\n\t/** Applies tabular figures to simple numeric values, in the sans UI font. */\n\tnumeric?: boolean;\n}\n\n/** A label/value pair rendered with native `dt` and `dd` semantics. */\nconst AlertMetadataItem = forwardRef<HTMLDivElement, AlertMetadataItemProps>(\n\tfunction AlertMetadataItem(\n\t\t{ className, icon, label, value, numeric = false, ...props },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-metadata-item\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert-metadata-item--component alert--metadata-item inline-flex max-w-full min-w-0 items-center gap-space-sm rounded-radius-sm bg-foreground/8 px-control-xs py-space-xs',\n\t\t\t\t\t'[&>svg]:size-icon-sm [&>svg]:shrink-0 [&>svg]:text-muted-foreground',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t\t<dt data-slot=\"alert-metadata-label\" className=\"alert--metadata-label shrink-0\">\n\t\t\t\t\t{isSimpleText(label) ? (\n\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\" lineHeight=\"none\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : label}\n\t\t\t\t</dt>\n\t\t\t\t<dd data-slot=\"alert-metadata-value\" className=\"alert--metadata-value m-0 min-w-0\">\n\t\t\t\t\t{isSimpleText(value) ? (\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\t\ttype=\"inherit\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\t\t\tlineHeight=\"none\"\n\t\t\t\t\t\tclassName={cn('break-words', numeric && 'tabular-nums')}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{value}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : value}\n\t\t\t\t</dd>\n\t\t\t</div>\n\t\t);\n\t},\n);\nAlertMetadataItem.displayName = 'AlertMetadataItem';\n\nconst AlertAction = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertAction({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t// Direction/alignment come from Stack; the remaining classes are grid\n\t\t\t// placement inside the alert's own template. Below the alert's own `@sm`\n\t\t\t// width the action follows the copy; from it, the action takes the implicit\n\t\t\t// third track beside the title and description.\n\t\t\t<Stack\n\t\t\t\tref={ref}\n\t\t\t\tdirection=\"horizontal\"\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"start\"\n\t\t\t\twrap\n\t\t\t\tgap=\"sm\"\n\t\t\t\tdata-slot=\"alert-action\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--action col-start-2 mt-space-md @sm/alert:col-start-3 @sm/alert:row-start-1 @sm/alert:row-span-2 @sm/alert:mt-0 @sm/alert:self-start @sm/alert:justify-end',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAlertAction.displayName = 'AlertAction';\n\nexport {\n\tAlert,\n\tAlertTitle,\n\tAlertDescription,\n\tAlertMetadata,\n\tAlertMetadataItem,\n\tAlertAction,\n};\n","import { affordanceGeometry } from '../../../lib/affordance-geometry.generated';\nimport { surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport type { SmartCardProps } from './smart-card.types';\nimport {compositionClasses} from '../structure/composition.recipes';\n\n/** Explicit region insets; omitted padding preserves the compound's inline-only defaults. */\nexport const cardRegionPaddingClasses = {\n\tnone: 'p-0',\n\tsm: 'p-surface-xs',\n\tmd: 'p-surface',\n\tlg: 'p-surface-lg',\n} as const satisfies Record<NonNullable<SmartCardProps['padding']>, string>;\n/** A padding-free subject keeps the base regional rhythm; explicit gap remains independent. */\nexport const cardRegionGapClasses = {\n none: affordanceGeometry.surfaceGap.md,\n sm: affordanceGeometry.surfaceGap.xs,\n md: affordanceGeometry.surfaceGap.md,\n lg: affordanceGeometry.surfaceGap.lg,\n} as const satisfies Record<NonNullable<SmartCardProps['padding']>, string>;\n/** Private Tailwind recipes; public props and DOM hooks remain owned by the component. */\nexport const cardRecipes = {\n\troot: `flex flex-col w-full font-sans rounded-surface box-border overflow-hidden py-surface ${affordanceGeometry.surfaceGap.md} transition-[background-color,border-color,box-shadow] duration-150`,\n\tshell: `@container/card flex flex-col w-full font-sans rounded-surface box-border overflow-hidden py-surface ${affordanceGeometry.surfaceGap.md} transition-[background-color,border-color,box-shadow] duration-150`,\n\tsurfaceCard: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-xs text-card-foreground`,\n\tsurfaceDefault: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-xs text-card-foreground`,\n\tsurfaceFlat: \"bg-transparent border-0 shadow-none text-inherit\",\n\tsurfaceFramed: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-sm ${surfaceDividerRecipes.frame.ring} text-card-foreground`,\n\tsurfaceRaised: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-md text-card-foreground`,\n\tsurfaceSunken: `bg-muted ${surfaceDividerRecipes.frame.shell} text-foreground`,\n\theader: \"flex flex-col gap-normal px-surface box-border\",\n\t// Wrapping follows available header space, independent of caller-owned\n\t// container names on the surface. Both title and commands keep their identity.\n\theaderRow: \"flex-row flex-wrap items-start justify-between gap-space-lg pb-0\",\n\t// A single-line header keeps its title at the row start, so peer cards with and\n\t// without a command share one title line. The command is pulled into the title's\n\t// first line box (action height minus the default title line, halved) instead of\n\t// centring the title in a taller row. Centring that margin box keeps the command on\n\t// the title's centre when a suffix badge or density changes the row height.\n\theaderTrailingInline: \"-my-space-sm self-center\",\n\t// The title column centres on the same line, so a smaller title meets the command\n\t// on one centre; a default title already fills the row, so peers are unchanged.\n\theaderLeadingInline: \"self-center\",\n\t// The small info trigger beside a title follows the same rule at its own height.\n\ttooltipTriggerInline: \"-my-space-xs\",\n\theaderLeading: \"min-w-0 max-w-full flex-1 basis-64\",\n\theaderLeadingSingle: \"basis-36\",\n\theaderTrailing: `flex max-w-full flex-wrap shrink-0 items-center ${compositionClasses.commands}`,\n\theaderDivider: `${surfaceDividerRecipes.frame.header} [&.border-b]:!pb-surface`,\n\ttitle: \"min-w-0 leading-tight text-inherit\",\n\ttitleSm: \"text-sm\",\n\ttitleMd: \"text-base\",\n\ttitleLg: \"text-lg\",\n\tcontent: `flex flex-col px-surface box-border min-w-0 ${compositionClasses.related}`,\n\tfooter: \"flex items-center px-surface box-border\",\n\tfooterDivider: `${surfaceDividerRecipes.frame.footer} [&.border-t]:!pt-surface`,\n\talert: \"px-surface\",\n\talertWithHeader: \"-mt-space-xs\",\n\texpandToggle: \"flex justify-center pb-surface -mt-space-md\",\n} as const satisfies Record<string, string>;\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Card({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\"card--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\"card-header--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"card-title--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"card-description--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\"card-action--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"card-content--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"card-footer--primitive\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n","import type { SmartCardSurface } from './smart-card.types';\nimport { cardRecipes as styles } from './card.recipes';\n\n/**\n * BEM-style hooks applied to every SmartCard subregion. Library\n * consumers can target them in CSS / tests / analytics without\n * relying on shadcn's data-slot attributes (which are framework\n * internals). Keep these names consistent — they are part of the\n * public DOM contract.\n */\nexport const CARD_BEM = {\n\troot: 'card--component',\n\theader: 'card--header',\n\ttitle: 'card--title',\n\tdescription: 'card--description',\n\tcontent: 'card--content',\n\tfooter: 'card--footer',\n\talert: 'card--alert',\n\tcollapseFade: 'card--collapse-fade',\n\texpandToggle: 'card--expand-toggle',\n\texpandToggleButton: 'card--expand-toggle-button',\n} as const;\n\ninterface PaddingTokens {\n\tshell: string;\n\theaderX: string;\n\t/** Tokenized divider inset that overrides the shadcn primitive's fixed 24px rule. */\n\theaderDividerY: string;\n\tcontentX: string;\n\tcontentY: string;\n\tfooterX: string;\n\t/** Tokenized divider inset that overrides the shadcn primitive's fixed 24px rule. */\n\tfooterDividerY: string;\n\talertX: string;\n\t/** Bottom clearance for the half-inset expandable control. */\n\texpandableBottom: string;\n\t/** Vertical offset applied when alert sits BELOW the header (pulls it up). */\n\talertOffsetWithHeader: string;\n\t/** Vertical spacing applied when alert is the first content (no header). */\n\talertOffsetStandalone: string;\n}\n\nexport const CARD_INSET: PaddingTokens = {\n\tshell: styles.shell,\n\theaderX: 'px-surface',\n\theaderDividerY: styles.headerDivider,\n\tcontentX: styles.content,\n\tcontentY: '',\n\tfooterX: styles.footer,\n\tfooterDividerY: styles.footerDivider,\n\talertX: styles.alert,\n\texpandableBottom: 'pb-surface',\n\talertOffsetWithHeader: styles.alertWithHeader,\n\talertOffsetStandalone: '',\n};\n\n/**\n * Surface-specific shell classes.\n */\nexport const SURFACE_CLASSES: Record<SmartCardSurface, string> = {\n\tcard: styles.surfaceCard,\n\tflat: styles.surfaceFlat,\n\tframed: styles.surfaceFramed,\n};\n","import { Fragment, isValidElement, type ReactNode } from 'react';\n\n/**\n * Predicate used by SmartCard subregions to decide whether each slot\n * warrants rendering its wrapper. Numbers (incl. `0`) and JSX always\n * render; falsy / empty-string content is treated as absent. Fragments\n * recurse into their children.\n */\nexport function hasRenderableContent(content?: ReactNode): boolean {\n\tif (content === null || content === undefined) return false;\n\tif (typeof content === 'boolean') return false;\n\tif (typeof content === 'string') return content.trim().length > 0;\n\tif (typeof content === 'number' || typeof content === 'bigint') return true;\n\tif (Array.isArray(content)) return content.some(hasRenderableContent);\n\tif (isValidElement<{ children?: ReactNode }>(content)) {\n\t\tif (content.type === Fragment) return hasRenderableContent(content.props.children);\n\t\treturn true;\n\t}\n\treturn true;\n}\n","import type { TextGap } from '../../structure';\n/**\n * Internal layout primitives — re-exported from `smart-card.tsx` for\n * advanced composition (deeply customised layouts that still want the\n * design-system surface tokens). Each primitive is intentionally thin:\n * a single responsibility, a single set of default classes, no business\n * logic. The BEM hooks (`card--component`, `card--header`, etc.) are\n * applied here so the public DOM contract lives in one place.\n */\nimport {\n\ttype ComponentPropsWithRef,\n\ttype ComponentPropsWithoutRef,\n} from 'react';\n\nimport {\n\tCard as CardPrimitive,\n\tCardContent as CardContentPrimitive,\n\tCardFooter as CardFooterPrimitive,\n\tCardHeader as CardHeaderPrimitive,\n\tCardTitle as CardTitlePrimitive,\n} from '../../../ui/card';\nimport { Text } from '../../../typography/text';\nimport { useDensityConfig } from '../../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../../lib/ui-provider/scale';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_BEM, SURFACE_CLASSES } from '../smart-card.tokens';\nimport type { CardTitleSize, SmartCardProps, SmartCardSurface } from '../smart-card.types';\nimport { cardRecipes as styles, cardRegionPaddingClasses } from '../card.recipes';\n\nimport { hasRenderableContent } from './has-renderable-content';\n\nconst CARD_TITLE_SIZE_CLASSES: Record<CardTitleSize, string> = {\n\tsm: styles.titleSm,\n\tmd: styles.titleMd,\n\tlg: styles.titleLg,\n};\n\nconst CARD_TITLE_TEXT_SIZE: Record<CardTitleSize, 'sm' | 'base' | 'lg'> = {\n\tsm: 'sm',\n\tmd: 'base',\n\tlg: 'lg',\n};\n\ntype CardRegionProps = ComponentPropsWithRef<'div'> & {\n\t/** Full surface inset. Omit to retain the established inline-only inset. */\n\tpadding?: SmartCardProps['padding'];\n};\n\nexport type CardShellProps = ComponentPropsWithRef<'div'> & {\n\t/**\n\t * Card's own surface chrome (fill, edge and elevation) for a hand-assembled\n\t * card. Omit to draw only the layout shell and supply the chrome yourself.\n\t */\n\tsurface?: SmartCardSurface;\n};\n\nexport function CardShell({ className, surface, ...props }: CardShellProps) {\n\treturn (\n\t\t<CardPrimitive\n\t\t\tdata-surface={surface}\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.root,\n\t\t\t\tstyles.shell,\n\t\t\t\tsurface && SURFACE_CLASSES[surface],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardHeader({\n\tclassName,\n\ttextGap = 'normal',\n\tpadding,\n\t...props\n}: CardRegionProps & { textGap?: TextGap }) {\n\treturn (\n\t\t<CardHeaderPrimitive\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.header,\n\t\t\t\tstyles.header,\n\t\t\t\tpadding !== undefined && cardRegionPaddingClasses[padding],\n\t\t\t\ttextGap === 'dense' ? 'gap-dense' : 'gap-normal',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardTitle({\n\tclassName,\n\tchildren,\n\tsize: sizeProp,\n\t...props\n}: ComponentPropsWithoutRef<'div'> & { size?: CardTitleSize }) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\tif (!hasRenderableContent(children)) return null;\n\n\tconst isPlainText =\n\t\ttypeof children === 'string' ||\n\t\ttypeof children === 'number' ||\n\t\ttypeof children === 'bigint';\n\n\tif (!isPlainText) {\n\t\treturn (\n\t\t\t<CardTitlePrimitive\n\t\t\t\tclassName={cn(CARD_BEM.title, styles.title, 'font-medium', CARD_TITLE_SIZE_CLASSES[size], className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</CardTitlePrimitive>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Text\n\t\t\tdata-slot=\"card-title\"\n\t\t\ttag=\"div\"\n\t\t\tsize={CARD_TITLE_TEXT_SIZE[size]}\n\t\t\tweight=\"semibold\"\n\t\t\tlineHeight=\"tight\"\n\t\t\tclassName={cn(CARD_BEM.title, styles.title, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\nexport function CardDescription({\n\tclassName,\n\tchildren,\n\t...props\n}: ComponentPropsWithoutRef<'div'>) {\n\tif (!hasRenderableContent(children)) return null;\n\n\treturn (\n\t\t<Text\n\t\t\tdata-slot=\"card-description\"\n\t\t\ttag=\"div\"\n\t\t\ttype=\"secondary\"\n\t\t\tclassName={cn(CARD_BEM.description, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\nexport function CardContent({\n\tclassName,\n\tpadding,\n\t...props\n}: CardRegionProps) {\n\treturn (\n\t\t<CardContentPrimitive\n\t\t\tclassName={cn(CARD_BEM.content, styles.content, padding !== undefined && cardRegionPaddingClasses[padding], className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardFooter({\n\tclassName,\n\tpadding,\n\t...props\n}: CardRegionProps) {\n\treturn (\n\t\t<CardFooterPrimitive\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.footer,\n\t\t\t\tstyles.footer,\n\t\t\t\tpadding !== undefined && cardRegionPaddingClasses[padding],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n","/**\n * Inline alert banner rendered between the header and the card body.\n * Pulls itself up under the header (`alertOffsetWithHeader`) when one\n * exists so the visual gap between header bottom and alert top stays\n * tight; otherwise pushes itself down (`alertOffsetStandalone`) so it\n * doesn't kiss the card top edge.\n */\nimport type { ReactNode } from 'react';\n\nimport { Alert, AlertDescription } from '../../feedback/alert';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_BEM, CARD_INSET } from '../smart-card.tokens';\nimport type { CardAlertTone } from '../smart-card.types';\n\ninterface AlertSlotProps {\n\t/** Banner content. A plain string is wrapped for you. */\n\talert: ReactNode | string;\n\t/** Tone of the banner. */\n\talertTone: CardAlertTone;\n\t/** Whether a header sits above, deciding the banner's top spacing. */\n\thasHeader: boolean;\n\tclassName?: string;\n}\n\nexport function SmartCardAlert({\n\talert,\n\talertTone,\n\thasHeader,\n\tclassName,\n}: AlertSlotProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.alert,\n\t\t\t\tCARD_INSET.alertX,\n\t\t\t\tclassName,\n\t\t\t\thasHeader ? CARD_INSET.alertOffsetWithHeader : CARD_INSET.alertOffsetStandalone,\n\t\t\t)}\n\t\t>\n\t\t\t<Alert tone={alertTone}>\n\t\t\t\t<AlertDescription>{alert}</AlertDescription>\n\t\t\t</Alert>\n\t\t</div>\n\t);\n}\n","import type { ReactNode } from 'react';\nimport { Text } from '../../typography';\nimport { headingRoleSizes } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\n\n/**\n * One wrapping title/suffix composition shared by cards and content structures.\n * A plain-text title is exposed as a level-2 heading (below the page's h1) so\n * screen-reader users can move between surfaces; suffix badges stay outside its\n * accessible name. Custom title nodes keep their own semantics.\n */\nexport function SurfaceTitle({title, suffix, size = headingRoleSizes.subject, className, suffixClassName, dataSlot}: {\n title?: ReactNode; suffix?: ReactNode; size?: 'sm' | 'base' | 'lg';\n className?: string; suffixClassName?: string; dataSlot?: string;\n}) {\n const plainTitle = typeof title === 'string' || typeof title === 'number' || typeof title === 'bigint';\n return <Text tag=\"div\" type=\"inherit\" size={size} weight={plainTitle ? 'semibold' : 'medium'} lineHeight=\"tight\" data-slot={dataSlot} className={cn('surface-title--component flex min-w-0 flex-wrap items-center gap-space-md break-words', className)}>\n {title != null && <span className=\"min-w-0 max-w-full\" {...(plainTitle ? {role: 'heading', 'aria-level': 2} : {})}>{title}</span>}\n {suffix != null && <div className={cn('surface-title--suffix inline-flex max-w-full flex-wrap items-center gap-space-md', suffixClassName)}>{suffix}</div>}\n </Text>;\n}\n","/**\n * SmartCard actions menu — the shared `⋯` overflow trigger and dropdown of\n * consumer-supplied `SmartCardAction` items. It ends the header's trailing\n * row, after `headerEnd` and `headerAction`, as the quiet ghost square at the\n * provider scale.\n */\nimport {\n\tActionMenu,\n\ttype ActionMenuAction,\n} from '../../action-menu';\n\nimport type { SmartCardAction } from '../smart-card.types';\n\ninterface ActionsMenuProps {\n\t/** Controls offered on the surface. */\n\tactions: readonly SmartCardAction[];\n\tactionsLabel: string;\n}\n\nexport function ActionsMenu({ actions, actionsLabel }: ActionsMenuProps) {\n\tconst actionDefinitions: ActionMenuAction[] = actions.map((action, index) => ({ ...action, id: action.id ?? `card-action-${index}` }));\n\n\treturn (\n\t\t<ActionMenu\n\t\t\tactions={actionDefinitions}\n\t\t\tsrText={actionsLabel}\n\t\t\talign=\"end\"\n\t\t\tcloseOnSelect\n\t\t\tbuttonProps={{ className: 'card--actions-trigger' }}\n\t\t/>\n\t);\n}\n","/**\n * SmartCardHeaderRow — the chrome above the card body. Combines icon /\n * title / description / tooltip / suffix on the leading side with the\n * trailing `headerEnd` / `headerAction` slots and the actions menu.\n *\n * `TooltipTrigger_Info` is colocated here because it's only used by the\n * header — keeping it private avoids polluting the public partial\n * surface.\n */\nimport { Info } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { SurfaceTitle } from '../../display/surface-title';\nimport { Button } from '../../buttons';\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from '../../display/tooltip';\nimport { Stack, type TextGap } from '../../structure';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_INSET } from '../smart-card.tokens';\nimport { cardRecipes } from '../card.recipes';\nimport type { CardTitleSize, SmartCardAction } from '../smart-card.types';\n\nimport { CardHeader, CardDescription } from './card-primitives';\nimport { hasRenderableContent } from './has-renderable-content';\nimport { ActionsMenu } from './smart-card-actions-menu';\n\nfunction TooltipTrigger_Info({ tooltipLabel }: { tooltipLabel: string }) {\n\treturn (\n\t\t<TooltipTrigger\n\t\t\trender={(triggerProps) => {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\tconst passthrough = triggerProps as Record<string, any>;\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t{...passthrough}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'card--tooltip-trigger',\n\t\t\t\t\t\t\t'text-muted-foreground',\n\t\t\t\t\t\t\t// Like a header command, the trigger sits in the title's line box\n\t\t\t\t\t\t\t// instead of growing the title row past a peer card's.\n\t\t\t\t\t\t\tcardRecipes.tooltipTriggerInline,\n\t\t\t\t\t\t\tpassthrough.className,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\taria-label={tooltipLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Info className=\"size-icon-md\" />\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n\ninterface HeaderProps {\n\t/** Leading glyph on the title line. */\n\ticon?: ReactNode;\n\t/** Card title. */\n\ttitle?: ReactNode;\n\t/** Content immediately after the title. */\n\ttitleSuffix?: ReactNode;\n\t/** Supporting sentence under the title. */\n\tdescription?: ReactNode;\n\ttextGap?: TextGap;\n\t/** Explanatory copy behind an info affordance on the title line. */\n\ttooltip?: ReactNode;\n\t/** Accessible name for the tooltip trigger. */\n\ttooltipLabel: string;\n\t/** Full-width row above the title. */\n\theaderStart?: ReactNode;\n\t/** Content at the end of the header. */\n\theaderEnd?: ReactNode;\n\t/** Single control before the overflow menu. */\n\theaderAction?: ReactNode;\n\t/** Overflow menu at the far end of the header. */\n\tactions?: readonly SmartCardAction[];\n\t/** Accessible name for the overflow trigger. */\n\tactionsLabel: string;\n\t/** Card title typography. */\n\ttitleSize: CardTitleSize;\n\t/** Pull an action-height command into the title line. Off for the framed header, which centres both in its own action-height row. */\n\tinlineCommands?: boolean;\n\tclassName?: string;\n}\n\nexport function SmartCardHeaderRow({\n\ticon,\n\ttitle,\n\ttitleSuffix,\n\tdescription,\n\ttextGap = 'normal',\n\ttooltip,\n\ttooltipLabel,\n\theaderStart,\n\theaderEnd,\n\theaderAction,\n\tactions,\n\tactionsLabel,\n\ttitleSize,\n\tinlineCommands = true,\n\tclassName,\n}: HeaderProps) {\n\tconst cardActions = Array.isArray(actions) ? actions : [];\n\tconst hasActions = cardActions.length > 0;\n\n\tconst hasIcon = hasRenderableContent(icon);\n\tconst hasTitle = hasRenderableContent(title);\n\tconst hasTitleSuffix = hasRenderableContent(titleSuffix);\n\tconst hasDescription = hasRenderableContent(description);\n\tconst hasTooltip = hasRenderableContent(tooltip);\n\tconst hasHeaderStart = hasRenderableContent(headerStart);\n\tconst hasHeaderEnd = hasRenderableContent(headerEnd);\n\tconst hasHeaderAction = hasRenderableContent(headerAction);\n\n\tconst showTitleRow = hasIcon || hasTitle || hasTitleSuffix || hasTooltip;\n\tconst showTrailing = hasHeaderEnd || hasHeaderAction || hasActions;\n\tconst singleLine = !hasDescription && !hasHeaderStart;\n\t// An action-height command on a single-line header sits on the title line\n\t// without growing the row; passive header-end content stays top-aligned.\n\tconst inlineTrailing = inlineCommands && singleLine && (hasHeaderAction || hasActions);\n\n\treturn (\n\t\t<CardHeader\n\t\t\tclassName={cn(\n\t\t\t\tcardRecipes.headerRow,\n\t\t\t\thasHeaderStart && (textGap === 'dense' ? 'gap-y-dense' : 'gap-y-normal'),\n\t\t\t\tCARD_INSET.headerX,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!!hasHeaderStart && <div className=\"card--header-context min-w-0 max-w-full basis-full\">{headerStart}</div>}\n\t\t\t<Stack gap={textGap} className={cn(\"card--header-start\", cardRecipes.headerLeading, singleLine && cardRecipes.headerLeadingSingle, inlineTrailing && cardRecipes.headerLeadingInline)}>\n\t\t\t\t{!!showTitleRow && (\n\t\t\t\t\t<div className=\"card--title-row flex min-w-0 items-start gap-space-sm\">\n\t\t\t\t\t\t{!!hasIcon && (\n\t\t\t\t\t\t\t<span className=\"card--icon flex shrink-0 items-center pt-space-2xs text-muted-foreground [&_svg]:size-icon\">\n\t\t\t\t\t\t\t\t{icon}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<SurfaceTitle dataSlot=\"card-title\" title={title} suffix={hasTitleSuffix ? titleSuffix : undefined} size={titleSize === 'md' ? 'base' : titleSize === 'lg' ? 'lg' : 'sm'} className=\"card--title flex-1\" suffixClassName=\"card--title-suffix\" />\n\t\t\t\t\t\t{!!hasTooltip && (\n\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t<TooltipTrigger_Info tooltipLabel={tooltipLabel} />\n\t\t\t\t\t\t\t\t<TooltipContent>{tooltip}</TooltipContent>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasDescription && (\n\t\t\t\t\t<CardDescription className=\"text-start\">{description}</CardDescription>\n\t\t\t\t)}\n\t\t\t</Stack>\n\n\t\t\t{!!showTrailing && (\n\t\t\t\t<div className={cn(\"card--header-end\", cardRecipes.headerTrailing, inlineTrailing && cardRecipes.headerTrailingInline)}>\n\t\t\t\t\t{!!hasHeaderEnd && headerEnd}\n\t\t\t\t\t{!!hasHeaderAction && headerAction}\n\t\t\t\t\t{!!hasActions && (\n\t\t\t\t\t\t<ActionsMenu actions={cardActions} actionsLabel={actionsLabel} />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</CardHeader>\n\t);\n}\n","/**\n * SmartCard strings — i18n surface for the chrome the consumer doesn't\n * pass directly. Most copy (title, description, action labels, alert\n * body) flows in via props; the strings here cover the implicit\n * affordances (header actions, tooltip, and expand toggle).\n */\n\nexport interface SmartCardStrings {\n\tactionsLabel: string;\n\ttooltipLabel: string;\n\texpandLabel: string;\n\tcollapseLabel: string;\n}\n\nexport const defaultSmartCardStrings = {\n\tactionsLabel: 'More actions',\n\ttooltipLabel: 'Card info',\n\texpandLabel: 'Expand card',\n\tcollapseLabel: 'Collapse card',\n} satisfies SmartCardStrings;\n","import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\n/**\n * SmartCard — blocks card with header (icon, title, suffix, description,\n * tooltip), actions menu, alert banner, header / content / footer slots,\n * surface variants (card / flat / framed), and an opt-in expandable body.\n *\n * The single card primitive everything else builds on — never reach past it\n * to shadcn `Card` directly. The CardShell / CardHeader / CardTitle /\n * CardDescription / CardContent / CardFooter primitives are re-exported\n * for advanced composition (deeply customised layouts that still want the\n * design-system surface tokens). Each subregion paints a BEM-style hook\n * (`card--component`, `card--header`, `card--title`, …) for CSS / test /\n * analytics targeting independent of shadcn's data-slot internals.\n *\n * The file is a thin orchestrator. The actual chrome lives in:\n * - `./smart-card.types.ts` — public prop / variant types\n * - `./smart-card.strings.ts` — i18n (expand toggle copy)\n * - `./smart-card.tokens.ts` — CARD_INSET + SURFACE_CLASSES + CARD_BEM\n * - `./partials/card-primitives.tsx` — CardShell + CardHeader / Title /\n * Description / Content / Footer\n * - `./partials/smart-card-header-row.tsx` — header layout + actions menu\n * - `./partials/smart-card-alert.tsx` — inline alert banner\n * - `./partials/smart-card-actions-menu.tsx` — shared `⋯` overflow menu\n * - `./partials/smart-card-skeleton.tsx` — loading placeholder\n * - `./partials/has-renderable-content.ts` — slot-empty predicate\n */\nimport { ChevronDown } from 'lucide-react';\nimport {\n\ttype CSSProperties,\n\ttype FocusEvent,\n\tforwardRef,\n\tuseCallback,\n\tuseId,\n\tuseState,\n} from 'react';\n\nimport { Button } from '../buttons';\nimport { Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { cardRegionGapClasses } from './card.recipes';\nimport { gapRecipe } from '../structure/structure.recipes';\nimport { compositionClasses, compositionRhythm } from '../structure/composition.recipes';\nimport { useStrings } from '../../../lib/strings';\nimport { useCardConfig, useDensityConfig } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tCardContent,\n\tCardFooter,\n\tCardShell,\n} from './partials/card-primitives';\nimport { hasRenderableContent } from './partials/has-renderable-content';\nimport { SmartCardAlert } from './partials/smart-card-alert';\nimport { SmartCardHeaderRow } from './partials/smart-card-header-row';\nimport {\n\tdefaultSmartCardStrings,\n} from './smart-card.strings';\nimport {\n\tCARD_BEM,\n\tCARD_INSET,\n\tSURFACE_CLASSES,\n} from './smart-card.tokens';\nimport type {\n\tSmartCardProps,\n\tSmartCardSurface,\n} from './smart-card.types';\nimport { motionRecipes } from '../../../lib/motion-recipes';\n\nexport const Card = forwardRef<HTMLDivElement, SmartCardProps>(function Card({\n\ticon,\n\ttitle,\n\ttitleSuffix,\n\tdescription,\n\ttextGap = 'normal',\n\ttooltip,\n\ttooltipAriaLabel,\n\tfooterText,\n\talert,\n\talertTone = 'neutral',\n\tsurface,\n\tpadding = 'md',\n\theaderPlacement = 'inside',\n\tgap,\n\tcontentGap,\n\ttitleSize,\n\tactions,\n\tactionsLabel,\n\theaderAction,\n\theaderStart,\n\theaderEnd,\n\tcontentTop,\n\tcontentBottom,\n\tfooterSlot,\n\theaderDivider,\n\tfooterDivider: footerDividerProp,\n\texpandable = false,\n\tdefaultExpanded = false,\n\texpanded: expandedProp,\n\tonExpandedChange,\n\tchildren,\n\tclassName,\n\theaderClassName,\n\tcontentClassName,\n\tfooterClassName,\n\tstrings: stringsProp,\n\t...rootProps\n}, ref) {\n\tconst {\n\t\tdefaultSurface,\n\t\tdefaultHeaderDivider,\n\t\tdefaultFooterDivider,\n\t} = useCardConfig();\n\tconst { defaultScale } = useDensityConfig();\n\tconst resolvedTitleSize = resolveComponentScale(titleSize, defaultScale);\n\tconst inset = { none: 'px-0', sm: 'px-surface-xs', md: 'px-surface', lg: 'px-surface-lg' }[padding];\n\tconst vertical = { none: 'py-0', sm: 'py-surface-xs', md: 'py-surface', lg: 'py-surface-lg' }[padding];\n\tconst tokens = { ...CARD_INSET, headerX: inset, contentX: inset, footerX: inset, headerDividerY: { none: '!pb-0', sm: '!pb-surface-xs', md: '!pb-surface', lg: '!pb-surface-lg' }[padding], footerDividerY: { none: '!pt-0', sm: '!pt-surface-xs', md: '!pt-surface', lg: '!pt-surface-lg' }[padding] };\n\tconst framedHeader = headerPlacement === 'frame';\n\tconst cardActions = Array.isArray(actions) ? actions : [];\n\tconst strings = useStrings(defaultSmartCardStrings, stringsProp);\n\tconst resolvedActionsLabel =\n\t\tactionsLabel ?? strings.actionsLabel;\n\n\tconst isExpandable = expandable !== false && expandable !== undefined;\n\tconst collapsedMaxHeightRaw =\n\t\ttypeof expandable === 'object' && expandable?.collapsedMaxHeight !== undefined\n\t\t\t? expandable.collapsedMaxHeight\n\t\t\t: '12rem';\n\tconst collapsedMaxHeight =\n\t\ttypeof collapsedMaxHeightRaw === 'number'\n\t\t\t? `${collapsedMaxHeightRaw}px`\n\t\t\t: collapsedMaxHeightRaw;\n\n\tconst isExpandedControlled = expandedProp !== undefined;\n\tconst bodyId = useId();\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = isExpandedControlled ? expandedProp : internalExpanded;\n\tconst handleToggle = useCallback(() => {\n\t\tconst next = !expanded;\n\t\tif (!isExpandedControlled) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t}, [expanded, isExpandedControlled, onExpandedChange]);\n\tconst handleBodyFocus = (event: FocusEvent<HTMLDivElement>) => {\n\t\tif (!isExpandable || expanded) return;\n\t\tconst body = event.currentTarget;\n\t\tconst target = event.target;\n\t\tconst frame = body.getBoundingClientRect();\n\t\tconst control = target.getBoundingClientRect();\n\t\t// Native keyboard focus can scroll an overflow-hidden preview before the\n\t\t// focus event reaches React. Reveal the complete body in either case.\n\t\tif (body.scrollTop === 0 && control.top >= frame.top && control.bottom <= frame.bottom) return;\n\t\tif (!isExpandedControlled) setInternalExpanded(true);\n\t\tonExpandedChange?.(true);\n\t\trequestAnimationFrame(() => {\n\t\t\tif (target.isConnected && target === target.ownerDocument.activeElement) {\n\t\t\t\ttarget.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });\n\t\t\t}\n\t\t});\n\t};\n\n\tconst hasHeader =\n\t\thasRenderableContent(icon) ||\n\t\thasRenderableContent(title) ||\n\t\thasRenderableContent(description) ||\n\t\tcardActions.length > 0 ||\n\t\thasRenderableContent(headerAction) ||\n\t\thasRenderableContent(headerStart) ||\n\t\thasRenderableContent(headerEnd);\n\n\tconst hasAlert = hasRenderableContent(alert);\n\tconst hasFooterText = hasRenderableContent(footerText);\n\tconst hasFooterSlot = hasRenderableContent(footerSlot);\n\tconst hasContentTop = hasRenderableContent(contentTop);\n\tconst hasContentBottom = hasRenderableContent(contentBottom);\n\tconst hasChildren = hasRenderableContent(children);\n\t// Expandable cards retain their explicitly requested collapse region.\n\tconst hasBody = hasContentTop || hasContentBottom || hasChildren || isExpandable;\n\tconst hasBodySurface = hasAlert || hasBody || hasFooterText || hasFooterSlot;\n\tconst headerFooterOnly = hasHeader && (hasFooterText || hasFooterSlot) && !hasAlert && !hasBody && !framedHeader;\n\n\tconst tooltipLabel =\n\t\ttooltipAriaLabel && tooltipAriaLabel.trim().length > 0\n\t\t\t? tooltipAriaLabel\n\t\t\t: strings.tooltipLabel;\n\n\tconst collapseStyle: CSSProperties | undefined = isExpandable\n\t\t? {\n\t\t\t\tmaxHeight: expanded ? '' : collapsedMaxHeight,\n\t\t\t}\n\t\t: undefined;\n\n\t// Resolve surface from the instance, then the provider default.\n\tconst resolvedSurface: SmartCardSurface =\n\t\tsurface ?? defaultSurface ?? 'card';\n\t// The standard header breathes without a rule; the footer retains a boundary.\n\t// Flat, card-free structure has no frame to rule, and a header\n\t// set above an inset body is already separated by that body's edge. Explicit\n\t// per-card booleans always win.\n\tconst framed = resolvedSurface !== 'flat';\n\tconst resolvedHeaderDivider = headerDivider ?? (framed && !framedHeader && (defaultHeaderDivider ?? false));\n\tconst footerDivider = footerDividerProp ?? (framed && (defaultFooterDivider ?? true));\n\t// Adjacent header/footer regions share one boundary, owned by the footer.\n\tconst sharedHeaderFooterDivider = headerFooterOnly && (resolvedHeaderDivider || footerDivider);\n\n\treturn (\n\t\t<CardShell\n\t\t\t{...rootProps}\n\t\t\tdata-header-placement={headerPlacement}\n\t\t\tref={ref}\n\t\t\tdata-surface={resolvedSurface}\n\t\t\tclassName={cn(\n\t\t\t\tSURFACE_CLASSES[resolvedSurface],\n\t\t\t\ttokens.shell,\n\t\t\t\tvertical,\n\t\t\t\t// Regional rhythm follows the chosen inset. Padding-free subject structure\n\t\t\t\t// keeps the base rhythm; an explicit semantic gap takes precedence.\n\t\t\t\tgap ? gapRecipe({ gap }) : cardRegionGapClasses[padding],\n\t\t\t\tsharedHeaderFooterDivider && 'gap-0',\n\t\t\t\tframedHeader && 'rounded-surface bg-muted text-foreground p-surface-xs pt-0 gap-0 ring-0',\n\t\t\t\t// Flat subject structure has no surface edge to clip against.\n\t\t\t\t// With no inset, rounded clipping otherwise cuts into its heading.\n\t\t\t\tresolvedSurface === 'flat' && !framedHeader && 'overflow-visible',\n\t\t\t\t// The toggle straddles the card edge. Keep tokenized clearance\n\t\t\t\t// inside the card and reserve its outside half in document flow.\n\t\t\t\t// `overflow-visible` counters the shadcn primitive's clipping.\n\t\t\t\tisExpandable && cn(\n\t\t\t\t\t'relative mb-space-xl !overflow-visible',\n\t\t\t\t\ttokens.expandableBottom,\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!!hasHeader && (\n\t\t\t\t<SmartCardHeaderRow\n\t\t\t\t\ticon={icon}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\ttitleSuffix={titleSuffix}\n\t\t\t\t\tdescription={description}\n\t\t\t\t\ttextGap={textGap}\n\t\t\t\t\ttooltip={tooltip}\n\t\t\t\t\ttooltipLabel={tooltipLabel}\n\t\t\t\t\theaderStart={headerStart}\n\t\t\t\t\theaderEnd={headerEnd}\n\t\t\t\t\theaderAction={headerAction}\n\t\t\t\t\tactions={cardActions}\n\t\t\t\t\tactionsLabel={resolvedActionsLabel}\n\t\t\t\t\ttitleSize={resolvedTitleSize}\n\t\t\t\t\tinlineCommands={!framedHeader}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tresolvedHeaderDivider && !sharedHeaderFooterDivider && cn(\n\t\t\t\t\t\t\tsurfaceDividerRecipes.frame.header,\n\t\t\t\t\t\t\ttokens.headerDividerY,\n\t\t\t\t\t\t),\n\t\t\t\t\t\tsharedHeaderFooterDivider && tokens.headerDividerY,\n\t\t\t\t\t\ttokens.headerX,\n\t\t\t\t\t\tframedHeader && 'flex-row items-center min-h-action px-surface-xs py-space-2xs [&_.card--title-row]:items-center [&_.card--icon]:pt-0',\n\t\t\t\t\t\theaderClassName,\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{hasBodySurface && <div className={framedHeader ? cn('card--body-surface flex min-w-0 flex-col rounded-radius bg-card text-card-foreground', gap ? gapRecipe({ gap }) : cardRegionGapClasses[padding], surfaceDividerRecipes.frame.shell, vertical) : 'contents'}>\n\t\t\t{!!hasAlert && (\n\t\t\t\t<SmartCardAlert\n\t\t\t\t\talert={alert}\n\t\t\t\t\talertTone={alertTone}\n\t\t\t\t\thasHeader={hasHeader}\n\t\t\t\t\tclassName={inset}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{!!hasBody && <CardContent\n\t\t\t\tid={isExpandable ? bodyId : undefined}\n\t\t\t\tonFocusCapture={isExpandable ? handleBodyFocus : undefined}\n\t\t\t\tclassName={cn(\n\t\t\t\t\ttokens.contentX,\n\t\t\t\t\ttokens.contentY,\n\t\t\t\t\tisExpandable && cn(\n\t\t\t\t\t\t'relative transition-[max-height] duration-500 ease-in-out motion-reduce:transition-none',\n\t\t\t\t\t\texpanded ? 'overflow-visible' : 'overflow-hidden',\n\t\t\t\t\t),\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t\tstyle={collapseStyle}\n\t\t\t>\n\t\t\t\t{hasContentTop || hasContentBottom ? (\n\t\t\t\t\t// contentTop/contentBottom are body regions, so they share the content gap with children.\n\t\t\t\t\t<Stack gap={contentGap ?? compositionRhythm.related}>\n\t\t\t\t\t\t{!!hasContentTop && contentTop}\n\t\t\t\t\t\t{hasChildren && (contentGap ? <Stack gap={contentGap}>{children}</Stack> : <div className={cn('flex min-w-0 flex-col', compositionClasses.related)}>{children}</div>)}\n\t\t\t\t\t\t{!!hasContentBottom && contentBottom}\n\t\t\t\t\t</Stack>\n\t\t\t\t) : contentGap ? <Stack gap={contentGap}>{children}</Stack> : children}\n\n\t\t\t\t{!!isExpandable && !expanded && (\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tCARD_BEM.collapseFade,\n\t\t\t\t\t\t\t'pointer-events-none absolute inset-x-0 bottom-0 h-20 rounded-b-surface bg-linear-to-t to-transparent',\n\t\t\t\t\t\t\tresolvedSurface === 'flat' ? 'from-background' : 'from-card',\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</CardContent>}\n\n\t\t\t{(hasFooterText || hasFooterSlot) && (\n\t\t\t\t<CardFooter className={cn(\n\t\t\t\t\ttokens.footerX,\n\t\t\t\t\thasFooterSlot ? 'flex-col items-stretch gap-space-md' : 'justify-end',\n\t\t\t\t\t(footerDivider || sharedHeaderFooterDivider) && cn(surfaceDividerRecipes.frame.footer, tokens.footerDividerY),\n\t\t\t\t\tfooterClassName,\n\t\t\t\t)}>\n\t\t\t\t\t{hasFooterText && (typeof footerText === 'string' || typeof footerText === 'number' || typeof footerText === 'bigint'\n\t\t\t\t\t\t? <Text tag=\"span\" size=\"xs\" type=\"secondary\">{footerText}</Text>\n\t\t\t\t\t\t: footerText)}\n\t\t\t\t\t{hasFooterSlot && footerSlot}\n\t\t\t\t</CardFooter>\n\t\t\t)}\n\n\t\t\t</div>}\n\n\t\t\t{!!isExpandable && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tCARD_BEM.expandToggle,\n\t\t\t\t\t\t'absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\tonClick={handleToggle}\n\t\t\t\t\t\taria-expanded={expanded}\n\t\t\t\t\t\taria-controls={bodyId}\n\t\t\t\t\t\taria-label={expanded ? strings.collapseLabel : strings.expandLabel}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tCARD_BEM.expandToggleButton,\n\t\t\t\t\t\t\tcn(surfaceDividerRecipes.frame.shell, 'bg-background text-foreground shadow-sm'),\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ChevronDown\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t`size-icon ${motionRecipes.chevron}`,\n\t\t\t\t\t\t\t\texpanded && 'rotate-180',\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</CardShell>\n\t);\n});\n\nCard.displayName = 'Card';\n\n/** @deprecated Use Card. */\nexport const SmartCard = Card;\n\n// ──────────────────────────────────────────────────────────────────────────\n// Re-exports — public surface lives here so `import { ... } from\n// '.'` keeps working through the file split.\n// ──────────────────────────────────────────────────────────────────────────\n\nexport {\n\tdefaultSmartCardStrings,\n\ttype SmartCardStrings,\n} from './smart-card.strings';\nexport type {\n\tCardAlertTone,\n\tSmartCardAction,\n\tSmartCardProps,\n\tSmartCardSkeletonProps,\n\tSmartCardSurface,\n} from './smart-card.types';\nexport {\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardShell,\n\tCardTitle,\n} from './partials/card-primitives';\nexport { hasRenderableContent } from './partials/has-renderable-content';\nexport { SmartCardSkeleton } from './partials/smart-card-skeleton';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAMmC,KAAgBC,GACrB;CAMC,+IAA+IN,EAAuB,QAAQ;CAC9K;CAGA;CAGA;CAGA;CACAF,EAA2B;AAC5B,GACA;CACC,UAAU;EACT,MAAM;G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e,YAAY,OAAOA,KAAe,YAAY,OAAOA,KAAe,WAC1G,kBAACxH,GAAD;OAAM,KAAI;OAAO,MAAK;OAAK,MAAK;OAAa,UAAAwH;MAAiB,CAAA,IAC9DA,IACFC,KAAiBC,CACP;;IAGR;;GAEJ,CAAC,CAAC1B,KACF,kBAAC,OAAD;IACC,WAAWhI,EACViD,EAAS,cACT,kEACD;IAEA,UAAA,kBAAC/C,GAAD;KACC,MAAK;KACL,MAAK;KACL,aAAY;KACZ,MAAK;KAAK,UAAA;KACV,SAAS0I;KACT,iBAAeD;KACf,iBAAeN;KACf,cAAYM,IAAWd,EAAQ,gBAAgBA,EAAQ;KACvD,WAAW7H,EACViD,EAAS,oBACTjD,EAAGe,EAAsB,MAAM,OAAO,yCAAyC,CAChF;KAEA,UAAA,kBAACoK,IAAD;MACC,eAAY;MACZ,WAAWnL,EACV,aAAaM,GAAc,WAC3BqI,KAAY,YACb;KACA,CAAA;IACM,CAAA;GACJ,CAAA;EAEI;;AAEb,CAAC;AAED,EAAK,cAAc;AAGnB,IAAayC,KAAYlE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./utils-
|
|
2
|
+
import { t as e } from "./utils-DhuoqFy4.js";
|
|
3
3
|
import { a as t, i as n, o as r, r as i, t as a } from "./structure.recipes-BB4-n58V.js";
|
|
4
4
|
import { createContext as o, forwardRef as s, useContext as c } from "react";
|
|
5
5
|
import { jsx as l } from "react/jsx-runtime";
|
|
@@ -92,4 +92,4 @@ h.displayName = "Stack";
|
|
|
92
92
|
//#endregion
|
|
93
93
|
export { d as i, m as n, p as r, h as t };
|
|
94
94
|
|
|
95
|
-
//# sourceMappingURL=structure-
|
|
95
|
+
//# sourceMappingURL=structure-DZJ2wbAU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure-
|
|
1
|
+
{"version":3,"file":"structure-DZJ2wbAU.js","names":["cn","spanRecipe","resolveGridColumns","stackRecipe","gridRecipe","adaptiveGridRecipe","AdaptiveGrid","forwardRef","props","useRender","className","GridColumnsContext","createContext","Grid","element","columns","GridCell","useContext","Stack"],"sources":["../src/components/base/structure/adaptive-grid.tsx","../src/components/base/structure/structure.context.ts","../src/components/base/structure/grid.tsx","../src/components/base/structure/grid-cell.tsx","../src/components/base/structure/stack.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nimport { adaptiveGridRecipe } from './structure.recipes';\nimport type { AdaptiveGridProps } from './structure.types';\n\n/** AdaptiveGrid — equal peer columns driven by the available inline size. */\nexport const AdaptiveGrid = forwardRef<HTMLDivElement, AdaptiveGridProps>(\n\tfunction AdaptiveGrid(\n\t\t{\n\t\t\tclassName,\n\t\t\tminColumnWidth,\n\t\t\tgap,\n\t\t\trowGap,\n\t\t\tcolumnGap,\n\t\t\talign,\n\t\t\trender,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\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\tclassName: cn(\n\t\t\t\t\t'adaptive-grid--component',\n\t\t\t\t\tadaptiveGridRecipe({ minColumnWidth, gap, rowGap, columnGap, align }),\n\t\t\t\t\tclassName,\n\t\t\t\t),\n\t\t\t},\n\t\t\tstate: {},\n\t\t});\n\t},\n);\n\nAdaptiveGrid.displayName = 'AdaptiveGrid';\n","import { createContext } from 'react';\n\nimport type { GridColumnLadder } from './structure.types';\n\n/**\n * The nearest Grid publishes its resolved column ladder so a GridCell can clamp\n * a numeric span to the tracks that exist at each breakpoint. Undefined means\n * the cell is not inside a Grid.\n */\nexport const GridColumnsContext = createContext<GridColumnLadder | undefined>(undefined);\n","import { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nimport { GridColumnsContext } from './structure.context';\nimport { gridRecipe, resolveGridColumns } from './structure.recipes';\nimport type { GridProps } from './structure.types';\n\n/** Grid — responsive card/tile composition with a one-to-two-column default. */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid({ className, columns, gap, rowGap, columnGap, align, render, ...props }, ref) {\n\tconst element = useRender({ defaultTagName: 'div', ref, render, props: { ...props, className: cn('grid--component', gridRecipe({ columns, gap, rowGap, columnGap, align }), className) }, state: {} });\n\t// The provider carries no DOM node, so the BEM hook stays on the grid element.\n\treturn <GridColumnsContext.Provider value={resolveGridColumns(columns)}>{element}</GridColumnsContext.Provider>;\n});\n\nGrid.displayName = 'Grid';\n","import { useRender } from '@base-ui/react/use-render';\nimport { forwardRef, useContext } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nimport { GridColumnsContext } from './structure.context';\nimport { spanRecipe } from './structure.recipes';\nimport type { GridCellProps } from './structure.types';\n\n/** GridCell — a Grid child that occupies more than one column, clamped to the columns that exist. */\nexport const GridCell = forwardRef<HTMLDivElement, GridCellProps>(function GridCell({ className, span, render, ...props }, ref) {\n\tconst columns = useContext(GridColumnsContext);\n\treturn useRender({ defaultTagName: 'div', ref, render, props: { ...props, className: cn('grid-cell--component', spanRecipe({ span, columns }), className) }, state: {} });\n});\n\nGridCell.displayName = 'GridCell';\n","import { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nimport { stackRecipe } from './structure.recipes';\nimport type { StackProps } from './structure.types';\n\n/** Stack — one-dimensional composition with vertical, token-spaced defaults. */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack({ className, direction, gap, align, justify, wrap, render, ...props }, ref) {\n\treturn useRender({ defaultTagName: 'div', ref, render, props: { ...props, className: cn('stack--component', stackRecipe({ direction, gap, align, justify, wrap }), className) }, state: {} });\n});\n\nStack.displayName = 'Stack';\n"],"mappings":";;;;;;;AASA,IAAaM,IAAeC,EAC3B,SACC,EACC,cACA,mBACA,QACA,WACA,cACA,UAC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