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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlays-BSgCtM2v.js","names":["Dialog","DialogPrimitive","DialogTrigger","DialogClose","DialogContent","Button","DialogHeader","DialogFooter","DialogTitle","DialogDescription","isSimpleText","titleTypography","Dialog","DialogPrimitive","React","DialogTriggerPrimitive","DialogClosePrimitive","DialogContentPrimitive","DialogHeaderPrimitive","DialogFooterPrimitive","DialogTitlePrimitive","DialogDescriptionPrimitive","BaseDialog","AlertDialog","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogContent","AlertDialogFooter","AlertDialogMedia","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","Button","AlertDialogCancel","AlertDialog","AlertDialogPrimitive","React","AlertDialogTriggerPrimitive","AlertDialogContentPrimitive","AlertDialogFooterPrimitive","AlertDialogTitlePrimitive","AlertDialogDescriptionPrimitive","AlertDialogMediaPrimitive","AlertDialogActionPrimitive","AlertDialogCancelPrimitive","BaseAlertDialog","useOverlayConfig","useThemePortalContainer","cn","SheetDescription","SheetTitle","useInsideOverlayLayer","useOpenerFinalFocus","SheetContent","SheetBody","SheetFooter","overlayAnatomyRecipes","SheetClose","SheetHeader","Sheet","OverlayLayer","Button","Text","textWeights","textLineHeights","textSizes","portalClassName","motionRecipes","Slot","Button$1","Stack","toneRecipes","AlertDescription","Alert","surfaceDividerRecipes","modalRegionRecipes","compositionRhythm","modalBackdropRecipe","usePopupFocusRecovery","interactionRecipes","React$1","Dialog$2","props","Dialog","DialogTrigger$1","renderSlot","asChild","DialogPortal","resolvedContainer","container","className","DialogClose$1","DialogOverlay","DialogContent$1","finalFocusProp","recoverFocus","onFocusCapture","insideOverlay","capture","showCloseButton","XIcon","DialogHeader$1","DialogFooter$1","children","DialogTitle$1","DialogDescription$1","isSimpleText$1","value","titleTypography$1","Dialog$1","DialogTrigger","DialogClose","DialogContent","DialogHeader","textGap","DialogBody","DialogFooter","DialogTitle","DialogDescription","defaultOverlayStrings","defaultAlertDialogStrings","useOverlayActions","strings","useStrings","customStrings","isExecuting","setIsExecuting","useState","executingRef","useRef","handleConfirm","useCallback","onConfirm","closeDialog","onAsyncConfirm","closeOnAsyncComplete","error","onError","loading","handleCancel","onCancel","handleFormSubmit","formId","form","useMemo","emphasis","tone","confirmTone","resolveOpenValue","nextOpen","currentOpen","normalizeGroupState","result","key","keys","state","hasGroupStateChanged","previous","next","useOverlayVisibility","controlledOpen","internalOpen","setInternalOpen","defaultOpen","isControlled","open","openRef","setOpen","resolvedOpen","changed","onOpenChange","onOpen","onClose","useOverlayVisibilityGroup","keyList","stateRef","setKeyOpen","previousState","nextState","closeOthersOnOpen","item","usePendingOverlayFocus","popupRef","useLayoutEffect","popup","pending","modal","active","overlayToneGlyphs","HelpCircle","AlertCircle","AlertTriangle","Info","CheckCircle","OverlayToneIcon","Glyph","color","SIZE_CLASSES","ActionDialogImpl","centered","align","defaultDialogAlign","visibility","pendingFocusRef","effectiveLoading","hasContent","alertMessage","hasFooter","showCancel","showConfirm","footer","closeOnBackdropClick","details","closeOnEscape","trigger","isValidElement","surfaceStyle","initialFocusRef","title","size","description","visuallyHideHeader","showIcon","contentClassName","finalConfirmTone","confirmStyle","confirmButtonOnClick","X","ActionDialog","memo","WIDTH_CLASSES","ActionDrawerImpl","isHorizontal","direction","showFooter","SheetTrigger","width","ActionDrawer","AlertDialog$2","AlertDialog","AlertDialogTrigger$1","AlertDialogPortal","AlertDialogOverlay","AlertDialogContent$1","AlertDialogFooter$1","AlertDialogMedia$1","AlertDialogTitle$1","AlertDialogDescription$1","AlertDialogAction$1","AlertDialogCancel$1","isSimpleText","titleTypography","AlertDialog$1","AlertDialogTrigger","AlertDialogContent","AlertDialogHeader","AlertDialogBody","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogMedia","AlertDialogAction","AlertDialogCancel","ConfirmDialogImpl","resolvedAlign","defaultConfirmAlign","mergedStrings","resolvedConfirmTone","destructive","resolvedTone","toneGlyph","hasHeading","ConfirmDialog"],"sources":["../src/components/ui/dialog.tsx","../src/components/base/display/dialog.tsx","../src/components/features/overlays/overlays.strings.ts","../src/components/features/overlays/hooks/use-overlay-actions.ts","../src/components/features/overlays/hooks/use-overlay-visibility.ts","../src/components/features/overlays/hooks/use-pending-overlay-focus.ts","../src/components/features/overlays/overlay-tone-icon.tsx","../src/components/features/overlays/dialog.tsx","../src/components/features/overlays/drawer.tsx","../src/components/ui/alert-dialog.tsx","../src/components/base/display/alert-dialog.tsx","../src/components/features/overlays/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { overlayAnatomyRecipes } from '../../lib/overlay-anatomy-recipes';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { portalClassName } from '../../lib/portal-recipes';\nimport { modalBackdropRecipe } from './overlay.recipes';\nimport { OverlayLayer, useInsideOverlayLayer, useOpenerFinalFocus } from './overlay-layer';\nimport { usePopupFocusRecovery } from '../../lib/use-popup-focus-recovery';\n\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\n\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\"\nimport { XIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"./button\"\nimport { Slot } from \"./slot\"\nimport { cn } from \"../../lib/utils\"\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" modal=\"trap-focus\" {...props} />\n}\n\nfunction DialogTrigger({\n asChild = false,\n ...props\n}: DialogPrimitive.Trigger.Props & { asChild?: boolean }) {\n const renderSlot = asChild ? <Slot /> : undefined\n\n return (\n <DialogPrimitive.Trigger\n data-slot=\"dialog-trigger\"\n render={renderSlot}\n {...props}\n />\n )\n}\n\nfunction DialogPortal({ container, className, ...props }: DialogPrimitive.Portal.Props) {\n const resolvedContainer = useThemePortalContainer(container)\n return <DialogPrimitive.Portal container={resolvedContainer} data-slot=\"dialog-portal\" className={portalClassName(className)} {...props} />\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(modalBackdropRecipe, motionRecipes.backdrop, \"isolate\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n container,\n children,\n showCloseButton = true,\n onFocusCapture,\n finalFocus: finalFocusProp,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean\n} & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n const recoverFocus = usePopupFocusRecovery(onFocusCapture)\n const insideOverlay = useInsideOverlayLayer()\n const { capture, finalFocus } = useOpenerFinalFocus(finalFocusProp)\n return (\n <DialogPortal container={resolvedContainer}>\n <DialogOverlay forceRender={!insideOverlay} />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n motionRecipes.dialog,\n \"bg-background grid max-w-[calc(100%-2rem)] gap-space-xl rounded-surface p-surface text-sm sm:max-w-md fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none\",\n className\n )}\n {...props}\n finalFocus={finalFocus}\n onFocusCapture={recoverFocus}\n >\n {capture}\n <OverlayLayer>{children}</OverlayLayer>\n {!!showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n data-overlay-close=\"\"\n className={overlayAnatomyRecipes.close}\n size=\"icon-sm\"\n />\n }\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {!!showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n asChild = false,\n ...props\n}: DialogPrimitive.Title.Props & { asChild?: boolean }) {\n const renderSlot = asChild ? <Slot /> : undefined\n\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n render={renderSlot}\n className={cn(\"leading-none font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n asChild = false,\n ...props\n}: DialogPrimitive.Description.Props & { asChild?: boolean }) {\n const renderSlot = asChild ? <Slot /> : undefined\n\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n render={renderSlot}\n className={cn(\"text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import { modalRegionRecipes, surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport { overlayAnatomyRecipes } from '../../../lib/overlay-anatomy-recipes';\nimport type { TextGap } from '../structure';\n/**\n * Dialog — internal modal anatomy behind `ActionDialog`.\n *\n * Not published from any entrypoint: applications use `ActionDialog` (or\n * `ConfirmDialog`) from `themelia-react-ui/features/overlays`, which owns the\n * lifecycle, focus, dismissal and action contract. This wrapper supplies the\n * modal geometry those features share: one framed popover surface whose\n * header, scrolling body and footer each own their inset, with exactly one rule\n * between adjacent visible regions (`modalRegionRecipes`).\n */\nimport * as React from 'react';\n\nimport {\n\tDialog as DialogPrimitive,\n\tDialogClose as DialogClosePrimitive,\n\tDialogContent as DialogContentPrimitive,\n\tDialogDescription as DialogDescriptionPrimitive,\n\tDialogFooter as DialogFooterPrimitive,\n\tDialogHeader as DialogHeaderPrimitive,\n\tDialogOverlay,\n\tDialogPortal,\n\tDialogTitle as DialogTitlePrimitive,\n\tDialogTrigger as DialogTriggerPrimitive,\n} from '../../ui/dialog';\nimport { Text } from '../../typography';\nimport { textLineHeights, textSizes, textWeights } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\n\nfunction isSimpleText(value: React.ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/**\n * The title element carries the canonical title role, so custom title nodes\n * match scalar titles and its line box never differs from the Text inside.\n * Descriptions keep the configurable Text default instead.\n */\nconst titleTypography = cn(textSizes.base, textWeights.semibold, textLineHeights.snug);\n\nexport const Dialog = DialogPrimitive;\n\nexport const DialogTrigger = React.forwardRef<\n\tReact.ElementRef<typeof DialogTriggerPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogTriggerPrimitive>\n>(function DialogTrigger({ className, ...props }, ref) {\n\treturn (\n\t\t<DialogTriggerPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('dialog-trigger--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogTrigger.displayName = 'DialogTrigger';\n\nexport const DialogClose = React.forwardRef<\n\tReact.ElementRef<typeof DialogClosePrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogClosePrimitive>\n>(function DialogClose({ className, ...props }, ref) {\n\treturn (\n\t\t<DialogClosePrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('dialog-close--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogClose.displayName = 'DialogClose';\n\nexport const DialogContent = React.forwardRef<\n\tReact.ElementRef<typeof DialogContentPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogContentPrimitive>\n>(function DialogContent({ className, ...props }, ref) {\n\treturn (\n\t\t<DialogContentPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t// The shell is flush: each region owns its inset once and the rules\n\t\t\t\t// between regions run edge to edge.\n\t\t\t\t'dialog-content--component flex max-h-[min(90vh,48rem)] flex-col gap-0 overflow-hidden rounded-surface bg-popover p-0 text-popover-foreground shadow-xl sm:max-w-lg', surfaceDividerRecipes.modal.shell,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogContent.displayName = 'DialogContent';\n\nexport const DialogHeader = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof DialogHeaderPrimitive> & { textGap?: TextGap }\n>(function DialogHeader({ className, textGap = 'normal', ...props }, ref) {\n\treturn (\n\t\t<DialogHeaderPrimitive\n\t\t\tref={ref}\n\t\t\tdata-modal-region=\"\"\n\t\t\tclassName={cn(\n\t\t\t\t'dialog-header--component', modalRegionRecipes.header,\n\t\t\t\toverlayAnatomyRecipes.header,\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\nDialogHeader.displayName = 'DialogHeader';\n\n/** Scroll-owning content region between the pinned dialog header and footer. */\nexport const DialogBody = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\tfunction DialogBody({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"dialog-body\"\n\t\t\t\tdata-modal-region=\"\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'dialog-body--component', modalRegionRecipes.body,\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);\n\nDialogBody.displayName = 'DialogBody';\n\nexport const DialogFooter = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof DialogFooterPrimitive>\n>(function DialogFooter({ className, ...props }, ref) {\n\treturn (\n\t\t<DialogFooterPrimitive\n\t\t\tref={ref}\n\t\t\tdata-modal-region=\"\"\n\t\t\tclassName={cn(\n\t\t\t\t'dialog-footer--component', modalRegionRecipes.footer,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogFooter.displayName = 'DialogFooter';\n\nexport const DialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof DialogTitlePrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogTitlePrimitive>\n>(function DialogTitle({ children, className, ...props }, ref) {\n\treturn (\n\t\t<DialogTitlePrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('dialog-title--component m-0', titleTypography, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"span\"\n\t\t\t\t\ttype=\"inherit\"\n\t\t\t\t\tsize=\"base\"\n\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\tlineHeight=\"snug\"\n\t\t\t\t\tclassName=\"dialog-title--text\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</DialogTitlePrimitive>\n\t);\n});\n\nDialogTitle.displayName = 'DialogTitle';\n\nexport const DialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof DialogDescriptionPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogDescriptionPrimitive>\n>(function DialogDescription({ children, className, ...props }, ref) {\n\treturn (\n\t\t<DialogDescriptionPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('dialog-description--component m-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"span\"\n\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\tlineHeight=\"relaxed\"\n\t\t\t\t\tclassName=\"dialog-description--text\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</DialogDescriptionPrimitive>\n\t);\n});\n\nDialogDescription.displayName = 'DialogDescription';\n\nexport { DialogOverlay, DialogPortal };\n","/**\n * Default user-facing strings shared by ActionDialog, ActionDrawer, and\n * ConfirmDialog recipes.\n *\n * Consumers wire backend i18n at the call site:\n *\n * <ActionDialog strings={{ confirm: t('common.confirm') }} … />\n */\n\nexport interface OverlayStrings {\n\tconfirm: string;\n\tcancel: string;\n\tclose: string;\n\tloading: string;\n\tdialogLabel: string;\n\tdrawerLabel: string;\n\talertDialogLabel: string;\n}\n\nexport const defaultOverlayStrings: OverlayStrings = {\n\tconfirm: 'Confirm',\n\tcancel: 'Cancel',\n\tclose: 'Close',\n\tloading: 'Loading...',\n\tdialogLabel: 'Dialog',\n\tdrawerLabel: 'Drawer',\n\talertDialogLabel: 'Confirmation',\n};\n\nexport const defaultAlertDialogStrings: OverlayStrings = {\n\tconfirm: 'Continue',\n\tcancel: 'Cancel',\n\tclose: 'Close',\n\tloading: 'Loading...',\n\tdialogLabel: 'Dialog',\n\tdrawerLabel: 'Drawer',\n\talertDialogLabel: 'Confirmation',\n};\n","import { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { useStrings, type StringsProp } from '../../../../lib/strings';\n\nimport {\n\tdefaultOverlayStrings,\n\ttype OverlayStrings,\n} from '../overlays.strings';\nimport type {\n\tOverlayButtonTone,\n\tOverlayActionProps,\n\tOverlayTone,\n} from '../overlays.types';\n\nexport interface UseOverlayActionsOptions\n\textends Pick<\n\t\tOverlayActionProps,\n\t\t| 'onConfirm'\n\t\t| 'onAsyncConfirm'\n\t\t| 'closeOnAsyncComplete'\n\t\t| 'confirmTone'\n\t\t| 'loading'\n\t\t| 'formId'\n\t> {\n\tcloseDialog: () => void;\n\tonCancel?: () => void;\n\tcustomStrings?: StringsProp<OverlayStrings>;\n\temphasis?: boolean;\n\ttone?: OverlayTone;\n\t/** Called when `onAsyncConfirm` throws; the consumer reports or retries.\n\t * Without it the library logs the rejection in development only. */\n\tonError?: (error: unknown) => void;\n}\n\nexport interface UseOverlayActionsReturn {\n\t/** Overrides this surface's own copy. */\n\tstrings: OverlayStrings;\n\tisExecuting: boolean;\n\thandleConfirm: () => Promise<void>;\n\thandleCancel: () => void;\n\tfinalConfirmTone: OverlayButtonTone;\n\tconfirmButtonOnClick: (() => Promise<void>) | undefined;\n\teffectiveLoading: boolean;\n}\n\nexport function useOverlayActions({\n\tcloseDialog,\n\tonConfirm,\n\tonAsyncConfirm,\n\tcloseOnAsyncComplete = true,\n\tconfirmTone = 'primary',\n\tloading = false,\n\tformId,\n\tonCancel,\n\tcustomStrings,\n\temphasis = false,\n\ttone = 'neutral',\n\tonError,\n}: UseOverlayActionsOptions): UseOverlayActionsReturn {\n\tconst strings = useStrings(defaultOverlayStrings, customStrings);\n\n\tconst [isExecuting, setIsExecuting] = useState(false);\n\tconst executingRef = useRef(false);\n\n\tconst handleConfirm = useCallback(async () => {\n\t\tif (loading || executingRef.current) return;\n\t\tif (onConfirm) {\n\t\t\tonConfirm();\n\t\t\tcloseDialog();\n\t\t\treturn;\n\t\t}\n\n\t\tif (onAsyncConfirm) {\n\t\t\texecutingRef.current = true;\n\t\t\tsetIsExecuting(true);\n\t\t\ttry {\n\t\t\t\tawait onAsyncConfirm();\n\t\t\t\tif (closeOnAsyncComplete) {\n\t\t\t\t\tcloseDialog();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t// A consumer that handles the failure owns its reporting; only an\n\t\t\t\t// unhandled rejection is surfaced in development.\n\t\t\t\tif (onError) onError(error);\n\t\t\t\telse if (import.meta.env?.DEV) console.error('Overlay async confirm failed:', error);\n\t\t\t} finally {\n\t\t\t\texecutingRef.current = false;\n\t\t\t\tsetIsExecuting(false);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tcloseDialog();\n\t}, [loading, onConfirm, onAsyncConfirm, closeOnAsyncComplete, closeDialog, onError]);\n\n\tconst handleCancel = useCallback(() => {\n\t\tif (loading || executingRef.current) return;\n\t\tonCancel?.();\n\t\tcloseDialog();\n\t}, [loading, onCancel, closeDialog]);\n\n\tconst handleFormSubmit = useCallback(async () => {\n\t\tif (!formId || loading || executingRef.current) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst form = document.getElementById(formId);\n\n\t\tif (!(form instanceof HTMLFormElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tform.requestSubmit();\n\t}, [formId, loading]);\n\n\tconst finalConfirmTone = useMemo<OverlayButtonTone>(() => {\n\t\tif (!emphasis) return confirmTone ?? 'primary';\n\t\tif (tone === 'destructive') return 'destructive';\n\t\tif (tone === 'warning') return 'warning';\n\t\tif (tone === 'success') return 'success';\n\t\treturn confirmTone ?? 'primary';\n\t}, [emphasis, tone, confirmTone]);\n\n\tconst confirmButtonOnClick = formId ? handleFormSubmit : handleConfirm;\n\n\treturn {\n\t\tstrings,\n\t\tisExecuting,\n\t\thandleConfirm,\n\t\thandleCancel,\n\t\tfinalConfirmTone,\n\t\tconfirmButtonOnClick,\n\t\teffectiveLoading: isExecuting || loading,\n\t};\n}\n","import {\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n\ttype Dispatch,\n\ttype SetStateAction,\n} from 'react';\n\nexport type OverlayOpenSetter = Dispatch<SetStateAction<boolean>>;\n\nexport interface OverlayVisibilityProps {\n\t/** Current visibility. */\n\topen: boolean;\n\t/** Requests a visibility change; spread both onto an overlay. */\n\tonOpenChange: (open: boolean) => void;\n}\n\nexport interface UseOverlayVisibilityOptions {\n\t/** Initial visibility when uncontrolled. Default: `false`. */\n\tdefaultOpen?: boolean;\n\t/** Controlled visibility. Omit to let the hook own it. */\n\topen?: boolean;\n\t/** Fired once for every actual visibility change. */\n\tonOpenChange?: (open: boolean) => void;\n\t/** Fired after a change to open. */\n\tonOpen?: () => void;\n\t/** Fired after a change to closed, whatever dismissed the overlay. */\n\tonClose?: () => void;\n}\n\nexport interface UseOverlayVisibilityReturn {\n\topen: boolean;\n\tisOpen: boolean;\n\tsetOpen: OverlayOpenSetter;\n\tshow: () => void;\n\thide: () => void;\n\ttoggle: () => void;\n\toverlayProps: OverlayVisibilityProps;\n}\n\nexport type OverlayVisibilityGroupState<TKey extends string = string> = Record<TKey, boolean>;\n\nexport interface UseOverlayVisibilityGroupOptions<TKey extends string = string> {\n\t/** Initial visibility per key when uncontrolled. */\n\tdefaultOpen?: Partial<Record<TKey, boolean>>;\n\t/** Controlled visibility per key. */\n\topen?: Partial<Record<TKey, boolean>>;\n\t/** Fired once for every actual change, with the key, its visibility and the next group state. */\n\tonOpenChange?: (\n\t\tkey: TKey,\n\t\topen: boolean,\n\t\tstate: OverlayVisibilityGroupState<TKey>,\n\t) => void;\n\t/** Opening one key closes the others, for one-at-a-time overlays. Default: `false`. */\n\tcloseOthersOnOpen?: boolean;\n}\n\nexport type UseOverlayVisibilityGroupReturn<TKey extends string = string> = Record<\n\tTKey,\n\tUseOverlayVisibilityReturn\n>;\n\nfunction resolveOpenValue(\n\tnextOpen: SetStateAction<boolean>,\n\tcurrentOpen: boolean,\n): boolean {\n\tif (typeof nextOpen === 'function') {\n\t\treturn (nextOpen as (open: boolean) => boolean)(currentOpen);\n\t}\n\treturn nextOpen;\n}\n\nfunction normalizeGroupState<TKey extends string>(\n\tkeys: readonly TKey[],\n\tstate?: Partial<Record<TKey, boolean>>,\n): OverlayVisibilityGroupState<TKey> {\n\tconst result = {} as OverlayVisibilityGroupState<TKey>;\n\tfor (const key of keys) {\n\t\tresult[key] = Boolean(state?.[key]);\n\t}\n\treturn result;\n}\n\nfunction hasGroupStateChanged<TKey extends string>(\n\tprevious: OverlayVisibilityGroupState<TKey>,\n\tnext: OverlayVisibilityGroupState<TKey>,\n\tkeys: readonly TKey[],\n): boolean {\n\treturn keys.some((key) => previous[key] !== next[key]);\n}\n\nexport function useOverlayVisibility({\n\tdefaultOpen = false,\n\topen: controlledOpen,\n\tonOpenChange,\n\tonOpen,\n\tonClose,\n}: UseOverlayVisibilityOptions = {}): UseOverlayVisibilityReturn {\n\tconst [internalOpen, setInternalOpen] = useState(defaultOpen);\n\tconst isControlled = controlledOpen !== undefined;\n\tconst open = isControlled ? controlledOpen : internalOpen;\n\tconst openRef = useRef(open);\n\topenRef.current = open;\n\n\tconst setOpen = useCallback<OverlayOpenSetter>(\n\t\t(nextOpen) => {\n\t\t\tconst resolvedOpen = resolveOpenValue(nextOpen, openRef.current);\n\t\t\tconst changed = openRef.current !== resolvedOpen;\n\n\t\t\tif (!isControlled) {\n\t\t\t\tsetInternalOpen(resolvedOpen);\n\t\t\t}\n\n\t\t\tif (!changed) return;\n\n\t\t\topenRef.current = resolvedOpen;\n\t\t\tonOpenChange?.(resolvedOpen);\n\t\t\tif (resolvedOpen) {\n\t\t\t\tonOpen?.();\n\t\t\t} else {\n\t\t\t\tonClose?.();\n\t\t\t}\n\t\t},\n\t\t[isControlled, onClose, onOpen, onOpenChange],\n\t);\n\n\tconst show = useCallback(() => {\n\t\tsetOpen(true);\n\t}, [setOpen]);\n\n\tconst hide = useCallback(() => {\n\t\tsetOpen(false);\n\t}, [setOpen]);\n\n\tconst toggle = useCallback(() => {\n\t\tsetOpen((currentOpen) => !currentOpen);\n\t}, [setOpen]);\n\n\tconst overlayProps = useMemo(\n\t\t() => ({\n\t\t\topen,\n\t\t\tonOpenChange: setOpen,\n\t\t}),\n\t\t[open, setOpen],\n\t);\n\n\treturn {\n\t\topen,\n\t\tisOpen: open,\n\t\tsetOpen,\n\t\tshow,\n\t\thide,\n\t\ttoggle,\n\t\toverlayProps,\n\t};\n}\n\nexport function useOverlayVisibilityGroup<const TKeys extends readonly string[]>(\n\tkeys: TKeys,\n\t{\n\t\tdefaultOpen,\n\t\topen: controlledOpen,\n\t\tonOpenChange,\n\t\tcloseOthersOnOpen = false,\n\t}: UseOverlayVisibilityGroupOptions<TKeys[number] & string> = {},\n): UseOverlayVisibilityGroupReturn<TKeys[number] & string> {\n\ttype TKey = TKeys[number] & string;\n\n\tconst keyList = keys as readonly TKey[];\n\tconst [internalOpen, setInternalOpen] = useState<OverlayVisibilityGroupState<TKey>>(\n\t\t() => normalizeGroupState(keyList, defaultOpen),\n\t);\n\tconst isControlled = controlledOpen !== undefined;\n\tconst state = normalizeGroupState(keyList, isControlled ? controlledOpen : internalOpen);\n\tconst stateRef = useRef(state);\n\tstateRef.current = state;\n\n\tconst setKeyOpen = useCallback(\n\t\t(key: TKey, nextOpen: SetStateAction<boolean>) => {\n\t\t\tconst previousState = stateRef.current;\n\t\t\tconst resolvedOpen = resolveOpenValue(nextOpen, previousState[key]);\n\t\t\tconst nextState = {\n\t\t\t\t...previousState,\n\t\t\t\t[key]: resolvedOpen,\n\t\t\t} as OverlayVisibilityGroupState<TKey>;\n\n\t\t\tif (closeOthersOnOpen && resolvedOpen) {\n\t\t\t\tfor (const item of keyList) {\n\t\t\t\t\tif (item !== key) {\n\t\t\t\t\t\tnextState[item] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst changed = hasGroupStateChanged(previousState, nextState, keyList);\n\n\t\t\tif (!isControlled) {\n\t\t\t\tsetInternalOpen(nextState);\n\t\t\t}\n\n\t\t\tif (!changed) return;\n\n\t\t\tstateRef.current = nextState;\n\t\t\tonOpenChange?.(key, resolvedOpen, nextState);\n\t\t},\n\t\t[closeOthersOnOpen, isControlled, keyList, onOpenChange],\n\t);\n\n\treturn useMemo(() => {\n\t\tconst result = {} as UseOverlayVisibilityGroupReturn<TKey>;\n\n\t\tfor (const key of keyList) {\n\t\t\tconst open = state[key];\n\t\t\tconst setOpen: OverlayOpenSetter = (nextOpen) => {\n\t\t\t\tsetKeyOpen(key, nextOpen);\n\t\t\t};\n\n\t\t\tresult[key] = {\n\t\t\t\topen,\n\t\t\t\tisOpen: open,\n\t\t\t\tsetOpen,\n\t\t\t\tshow: () => setKeyOpen(key, true),\n\t\t\t\thide: () => setKeyOpen(key, false),\n\t\t\t\ttoggle: () => setKeyOpen(key, (currentOpen) => !currentOpen),\n\t\t\t\toverlayProps: {\n\t\t\t\t\topen,\n\t\t\t\t\tonOpenChange: setOpen,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\treturn result;\n\t}, [keyList, setKeyOpen, state]);\n}\n","import { useLayoutEffect, useRef } from 'react';\n\n/** Keep modal focus anchored when its focused action becomes disabled. */\nexport function usePendingOverlayFocus(pending: boolean, modal: boolean | 'trap-focus' = true) {\n\tconst popupRef = useRef<HTMLDivElement>(null);\n\tuseLayoutEffect(() => {\n\t\tconst popup = popupRef.current;\n\t\tif (!pending || !modal || !popup) return;\n\t\tconst active = popup.ownerDocument.activeElement;\n\t\t// Preserve enabled fields and consumer-owned custom footer controls.\n\t\tif (active === popup.ownerDocument.body || (active && popup.contains(active) && active.matches(':disabled'))) {\n\t\t\tpopup.focus({ preventScroll: true });\n\t\t}\n\t}, [pending, modal]);\n\treturn popupRef;\n}\n","import { AlertCircle, AlertTriangle, CheckCircle, HelpCircle, Info } from 'lucide-react';\n\nimport { textLineHeights, textSizes } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\n\nimport type { OverlayTone } from './overlays.types';\nimport { toneRecipes } from '../../../lib/tone-recipes';\n\n/** One glyph and colour per tone, shared by every overlay's opt-in `showIcon`. */\nexport const overlayToneGlyphs = {\n\tneutral: { Glyph: HelpCircle, color: 'text-muted-foreground', surface: 'bg-muted' },\n\tdestructive: { Glyph: AlertCircle, color: 'text-destructive', surface: toneRecipes.destructive.tint },\n\twarning: { Glyph: AlertTriangle, color: 'text-warning-accent', surface: toneRecipes.warning.tint },\n\tinfo: { Glyph: Info, color: 'text-info', surface: toneRecipes.info.tint },\n\tsuccess: { Glyph: CheckCircle, color: 'text-success', surface: toneRecipes.success.tint },\n} as const satisfies Record<OverlayTone, { Glyph: typeof Info; color: string; surface: string }>;\n\n/**\n * Inline tone glyph for a heading row. The wrapper takes the title's own line\n * box (base size, snug leading, `h-lh`), so the glyph centres on the first title\n * line at any density instead of relying on an optical offset.\n */\nexport function OverlayToneIcon({ tone }: { tone: OverlayTone }) {\n\tconst { Glyph, color } = overlayToneGlyphs[tone];\n\treturn (\n\t\t<span aria-hidden=\"true\" className={cn('overlay-tone-icon--component flex h-lh shrink-0 items-center', textSizes.base, textLineHeights.snug)}>\n\t\t\t<Glyph className={cn('size-icon', color)} />\n\t\t</span>\n\t);\n}\n","import { overlayAnatomyRecipes } from '../../../lib/overlay-anatomy-recipes';\nimport { X } from 'lucide-react';\nimport { isValidElement, memo } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { Alert, AlertDescription } from '../../base/feedback';\nimport {\n\tDialog as BaseDialog,\n\tDialogBody,\n\tDialogClose,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from '../../base/display/dialog';\nimport { Stack } from '../../base/structure';\nimport { compositionRhythm } from '../../base/structure/composition.recipes';\nimport { useOverlayConfig } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport { usePendingOverlayFocus } from './hooks/use-pending-overlay-focus';\nimport { OverlayToneIcon } from './overlay-tone-icon';\nimport type { ActionDialogProps, OverlaySize } from './overlays.types';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nconst SIZE_CLASSES: Record<OverlaySize, string> = {\n\txs: 'sm:max-w-xs',\n\tsm: 'sm:max-w-sm',\n\tmd: 'sm:max-w-md',\n\tlg: 'sm:max-w-lg',\n\txl: 'sm:max-w-xl',\n\t'2xl': 'sm:max-w-2xl',\n\t'3xl': 'sm:max-w-3xl',\n\t'4xl': 'sm:max-w-4xl',\n\t'5xl': 'sm:max-w-5xl',\n\tfull: 'sm:max-w-[calc(100vw-2rem)]',\n};\n\nfunction ActionDialogImpl({\n\topen,\n\tonOpenChange,\n\tonClose,\n\tchildren,\n\ttitle,\n\tdescription,\n\tvisuallyHideHeader = false,\n\tclassName,\n\tcontentClassName,\n\tshowCloseButton = true,\n\tsurfaceStyle,\n\tinitialFocusRef,\n\tcloseOnEscape = true,\n\tcloseOnBackdropClick = true,\n\tstrings: customStrings,\n\tshowCancel = true,\n\tshowConfirm = true,\n\tonCancel,\n\tonConfirm,\n\tonAsyncConfirm,\n\tonError,\n\tcloseOnAsyncComplete = true,\n\tconfirmTone = 'primary',\n\tconfirmStyle = 'solid',\n\tloading = false,\n\tformId,\n\tfooter,\n\temphasis = false,\n\ttone = 'neutral',\n\tshowIcon = false,\n\talertMessage,\n\tsize = 'lg',\n\ttrigger,\n\talign,\n}: ActionDialogProps) {\n\tconst { defaultDialogAlign } = useOverlayConfig();\n\tconst centered = (align ?? defaultDialogAlign ?? 'start') === 'center';\n\tconst visibility = useOverlayVisibility({ open, onOpenChange, onClose });\n\tconst {\n\t\tstrings,\n\t\tfinalConfirmTone,\n\t\tconfirmButtonOnClick,\n\t\teffectiveLoading,\n\t\thandleCancel,\n\t} = useOverlayActions({\n\t\tcloseDialog: visibility.hide,\n\t\tonConfirm,\n\t\tonAsyncConfirm,\n\t\tonError,\n\t\tcloseOnAsyncComplete,\n\t\tconfirmTone,\n\t\tloading,\n\t\tformId,\n\t\tonCancel,\n\t\tcustomStrings,\n\t\temphasis,\n\t\ttone,\n\t});\n\n\tconst pendingFocusRef = usePendingOverlayFocus(effectiveLoading);\n\tconst hasContent = Boolean(children || alertMessage);\n\tconst hasFooter = showCancel || showConfirm || footer;\n\n\treturn (\n\t\t<BaseDialog\n\t\t\topen={visibility.open}\n\t\t\tmodal\n\t\t\tdisablePointerDismissal={effectiveLoading || !closeOnBackdropClick}\n\t\t\tonOpenChange={(nextOpen, details) => {\n\t\t\t\tif (!nextOpen && (effectiveLoading || (details.reason === 'escape-key' && !closeOnEscape))) {\n\t\t\t\t\tdetails.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisibility.setOpen(nextOpen);\n\t\t\t}}\n\t\t>\n\t\t\t{!!trigger && (isValidElement(trigger) ? (\n\t\t\t\t<DialogTrigger render={trigger} />\n\t\t\t) : (\n\t\t\t\t<DialogTrigger render={<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" />} className=\"overlay-trigger--fallback\">\n\t\t\t\t\t{trigger}\n\t\t\t\t</DialogTrigger>\n\t\t\t))}\n\n\t\t\t<DialogContent\n\t\t\t\tref={pendingFocusRef}\n\t\t\t\tshowCloseButton={false}\n\t\t\t\tstyle={surfaceStyle}\n\t\t\t\tinitialFocus={initialFocusRef}\n\t\t\t\taria-label={title ? undefined : strings.dialogLabel}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'action-dialog--component dialog--component',\n\t\t\t\t\tSIZE_CLASSES[size],\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{!!(title || description) && (\n\t\t\t\t\t<DialogHeader\n\t\t\t\t\t\tdata-align={centered ? 'center' : 'start'}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'dialog--header',\n\t\t\t\t\t\t\tcentered && cn('text-center', overlayAnatomyRecipes.headerCentered),\n\t\t\t\t\t\t\tvisuallyHideHeader && 'sr-only',\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Stack direction={centered ? 'vertical' : 'horizontal'} gap=\"sm\" align={centered ? 'center' : 'start'} wrap={false}>\n\t\t\t\t\t\t\t{!!showIcon && <OverlayToneIcon tone={tone} />}\n\t\t\t\t\t\t\t<Stack gap=\"normal\" align={centered ? 'center' : undefined} className={cn('min-w-0', centered ? 'w-full' : 'flex-1')}>\n\t\t\t\t\t\t\t\t{!!title && <DialogTitle>{title}</DialogTitle>}\n\t\t\t\t\t\t\t\t{!!description && <DialogDescription>{description}</DialogDescription>}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</DialogHeader>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasContent && (\n\t\t\t\t\t<DialogBody className={cn('dialog--body', contentClassName)}>\n\t\t\t\t\t\t{!!alertMessage && (\n\t\t\t\t\t\t\t<Alert tone={tone} className=\"mb-space-md\">\n\t\t\t\t\t\t\t\t<AlertDescription>{alertMessage}</AlertDescription>\n\t\t\t\t\t\t\t</Alert>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</DialogBody>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasFooter && (\n\t\t\t\t\t<DialogFooter className=\"dialog--footer\">\n\t\t\t\t\t\t{footer ?? (\n\t\t\t\t\t\t\t<Stack\n\t\t\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\t\t\tgap={compositionRhythm.commands}\n\t\t\t\t\t\t\t\talign={{ base: 'stretch', sm: 'center' }}\n\t\t\t\t\t\t\t\tjustify={centered ? 'center' : 'end'}\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!showCancel && (\n\t\t\t\t\t\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" onClick={handleCancel} disabled={effectiveLoading}>\n\t\t\t\t\t\t\t\t\t\t{strings.cancel}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!showConfirm && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone={finalConfirmTone}\n\t\t\t\t\t\t\t\t\t\tbuttonStyle={confirmStyle}\n\t\t\t\t\t\t\t\t\t\tonClick={confirmButtonOnClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tloading={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tstrings={{ loading: strings.loading }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{strings.confirm}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t)}\n\n\t\t\t\t{/*\n\t\t\t\t * Last in the DOM, drawn in the corner: opening focuses the first\n\t\t\t\t * field or action rather than the dismiss control, and the reading\n\t\t\t\t * order stays title → content → actions.\n\t\t\t\t */}\n\t\t\t\t{!!showCloseButton && (\n\t\t\t\t\t<DialogClose\n\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\trender={(\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\tdata-overlay-close=\"\"\n\t\t\t\t\t\t\t\tclassName={cn(overlayAnatomyRecipes.close, `z-10 text-muted-foreground ${interactionRecipes.rowHover}`)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<X className=\"size-icon\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\taria-label={strings.close}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</DialogContent>\n\t\t</BaseDialog>\n\t);\n}\n\nexport const ActionDialog = memo(ActionDialogImpl);\nActionDialog.displayName = 'ActionDialog';\n","import { overlayAnatomyRecipes } from '../../../lib/overlay-anatomy-recipes';\nimport { X } from 'lucide-react';\nimport { isValidElement, memo } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { Alert, AlertDescription } from '../../base/feedback';\nimport {\n\tSheet,\n\tSheetBody,\n\tSheetClose,\n\tSheetContent,\n\tSheetDescription,\n\tSheetFooter,\n\tSheetHeader,\n\tSheetTitle,\n\tSheetTrigger,\n} from '../../base/sheet/sheet';\nimport { Stack } from '../../base/structure';\nimport { compositionRhythm } from '../../base/structure/composition.recipes';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport { usePendingOverlayFocus } from './hooks/use-pending-overlay-focus';\nimport { OverlayToneIcon } from './overlay-tone-icon';\nimport type { ActionDrawerProps, OverlaySize } from './overlays.types';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nconst WIDTH_CLASSES: Record<OverlaySize, string> = {\n\txs: 'data-[side=left]:sm:max-w-xs data-[side=right]:sm:max-w-xs',\n\tsm: 'data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm',\n\tmd: 'data-[side=left]:sm:max-w-md data-[side=right]:sm:max-w-md',\n\tlg: 'data-[side=left]:sm:max-w-lg data-[side=right]:sm:max-w-lg',\n\txl: 'data-[side=left]:sm:max-w-xl data-[side=right]:sm:max-w-xl',\n\t'2xl': 'data-[side=left]:sm:max-w-2xl data-[side=right]:sm:max-w-2xl',\n\t'3xl': 'data-[side=left]:sm:max-w-3xl data-[side=right]:sm:max-w-3xl',\n\t'4xl': 'data-[side=left]:sm:max-w-4xl data-[side=right]:sm:max-w-4xl',\n\t'5xl': 'data-[side=left]:sm:max-w-5xl data-[side=right]:sm:max-w-5xl',\n\tfull: 'data-[side=left]:sm:max-w-[calc(100vw-2rem)] data-[side=right]:sm:max-w-[calc(100vw-2rem)]',\n};\n\nfunction ActionDrawerImpl({\n\topen,\n\tonOpenChange,\n\tonClose,\n\tchildren,\n\ttitle,\n\tdescription,\n\tvisuallyHideHeader = false,\n\tshowCloseButton = true,\n\tclassName,\n\tcontentClassName,\n\tsurfaceStyle,\n\tinitialFocusRef,\n\tcloseOnEscape = true,\n\tcloseOnBackdropClick = true,\n\tstrings: customStrings,\n\tshowCancel = true,\n\tshowConfirm = true,\n\tonCancel,\n\tonConfirm,\n\tonAsyncConfirm,\n\tonError,\n\tcloseOnAsyncComplete = true,\n\tconfirmTone = 'primary',\n\tconfirmStyle = 'solid',\n\tloading = false,\n\tformId,\n\tfooter,\n\temphasis = false,\n\ttone = 'neutral',\n\tshowIcon = false,\n\talertMessage,\n\tdirection = 'right',\n\twidth = 'lg',\n\tshowFooter = true,\n\tmodal = true,\n\ttrigger,\n}: ActionDrawerProps) {\n\tconst visibility = useOverlayVisibility({ open, onOpenChange, onClose });\n\tconst {\n\t\tstrings,\n\t\tfinalConfirmTone,\n\t\tconfirmButtonOnClick,\n\t\teffectiveLoading,\n\t\thandleCancel,\n\t} = useOverlayActions({\n\t\tcloseDialog: visibility.hide,\n\t\tonConfirm,\n\t\tonAsyncConfirm,\n\t\tonError,\n\t\tcloseOnAsyncComplete,\n\t\tconfirmTone,\n\t\tloading,\n\t\tformId,\n\t\tonCancel,\n\t\tcustomStrings,\n\t\temphasis,\n\t\ttone,\n\t});\n\n\tconst isHorizontal = direction === 'left' || direction === 'right';\n\tconst pendingFocusRef = usePendingOverlayFocus(effectiveLoading, modal);\n\tconst hasContent = Boolean(children || alertMessage);\n\tconst hasFooter = showFooter && (showCancel || showConfirm || footer);\n\n\treturn (\n\t\t<Sheet\n\t\t\topen={visibility.open}\n\t\t\tmodal={modal}\n\t\t\t// A non-modal panel sits beside the page you keep working in, so a page\n\t\t\t// press must not dismiss it; it closes from its own controls or Escape.\n\t\t\tdisablePointerDismissal={effectiveLoading || !closeOnBackdropClick || modal === false}\n\t\t\tonOpenChange={(nextOpen, details) => {\n\t\t\t\tif (!nextOpen && (effectiveLoading || (details.reason === 'escape-key' && !closeOnEscape))) {\n\t\t\t\t\tdetails.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisibility.setOpen(nextOpen);\n\t\t\t}}\n\t\t>\n\t\t\t{!!trigger && (isValidElement(trigger) ? (\n\t\t\t\t<SheetTrigger render={trigger} />\n\t\t\t) : (\n\t\t\t\t<SheetTrigger render={<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" />} className=\"overlay-trigger--fallback\">\n\t\t\t\t\t{trigger}\n\t\t\t\t</SheetTrigger>\n\t\t\t))}\n\n\t\t\t<SheetContent\n\t\t\t\tref={pendingFocusRef}\n\t\t\t\tside={direction}\n\t\t\t\tshowCloseButton={false}\n\t\t\t\tstyle={surfaceStyle}\n\t\t\t\tinitialFocus={initialFocusRef}\n\t\t\t\taria-label={title ? undefined : strings.drawerLabel}\n\t\t\t\t// The vendored SheetContent renders its backdrop unconditionally,\n\t\t\t\t// so a non-modal drawer would still sit behind a full-viewport\n\t\t\t\t// scrim. This marks the panel so the token layer can drop it.\n\t\t\t\tdata-modal={modal === false ? 'false' : undefined}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'action-drawer--component drawer--component',\n\t\t\t\t\tisHorizontal && 'data-[side=left]:w-full data-[side=right]:w-full',\n\t\t\t\t\tisHorizontal && WIDTH_CLASSES[width],\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{!!(title || description) && (\n\t\t\t\t\t<SheetHeader className={cn('drawer--header', visuallyHideHeader && 'sr-only')}>\n\t\t\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" align=\"start\" wrap={false}>\n\t\t\t\t\t\t\t{!!showIcon && <OverlayToneIcon tone={tone} />}\n\t\t\t\t\t\t\t<Stack gap=\"normal\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t{!!title && <SheetTitle>{title}</SheetTitle>}\n\t\t\t\t\t\t\t\t{!!description && <SheetDescription>{description}</SheetDescription>}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</SheetHeader>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasContent && (\n\t\t\t\t\t<SheetBody className={cn('drawer--body', contentClassName)}>\n\t\t\t\t\t\t{!!alertMessage && (\n\t\t\t\t\t\t\t<Alert tone={tone} className=\"mb-space-md\">\n\t\t\t\t\t\t\t\t<AlertDescription>{alertMessage}</AlertDescription>\n\t\t\t\t\t\t\t</Alert>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</SheetBody>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasFooter && (\n\t\t\t\t\t<SheetFooter className=\"drawer--footer\">\n\t\t\t\t\t\t{footer ?? (\n\t\t\t\t\t\t\t<Stack\n\t\t\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\t\t\tgap={compositionRhythm.commands}\n\t\t\t\t\t\t\t\talign={{ base: 'stretch', sm: 'center' }}\n\t\t\t\t\t\t\t\tjustify=\"end\"\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!showCancel && (\n\t\t\t\t\t\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" onClick={handleCancel} disabled={effectiveLoading}>\n\t\t\t\t\t\t\t\t\t\t{strings.cancel}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!showConfirm && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone={finalConfirmTone}\n\t\t\t\t\t\t\t\t\t\tbuttonStyle={confirmStyle}\n\t\t\t\t\t\t\t\t\t\tonClick={confirmButtonOnClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tloading={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tstrings={{ loading: strings.loading }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{strings.confirm}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SheetFooter>\n\t\t\t\t)}\n\n\t\t\t\t{/*\n\t\t\t\t * Last in the DOM, drawn in the corner: opening focuses the first\n\t\t\t\t * field or action rather than the dismiss control, and the reading\n\t\t\t\t * order stays title → content → actions.\n\t\t\t\t */}\n\t\t\t\t{!!showCloseButton && (\n\t\t\t\t\t<SheetClose\n\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\trender={(\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\tdata-overlay-close=\"\"\n\t\t\t\t\t\t\t\tclassName={cn(overlayAnatomyRecipes.close, `z-10 text-muted-foreground ${interactionRecipes.rowHover}`)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<X className=\"size-icon\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\taria-label={strings.close}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</SheetContent>\n\t\t</Sheet>\n\t);\n}\n\nexport const ActionDrawer = memo(ActionDrawerImpl);\nActionDrawer.displayName = 'ActionDrawer';\n","\"use client\";\n\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { portalClassName } from '../../lib/portal-recipes';\nimport { modalBackdropRecipe } from './overlay.recipes';\nimport { OverlayLayer, useInsideOverlayLayer, useOpenerFinalFocus } from './overlay-layer';\n\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\n\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"./button\"\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({ container, className, ...props }: AlertDialogPrimitive.Portal.Props) {\n const resolvedContainer = useThemePortalContainer(container)\n return (\n <AlertDialogPrimitive.Portal container={resolvedContainer} data-slot=\"alert-dialog-portal\" className={portalClassName(className)} {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(modalBackdropRecipe, motionRecipes.backdrop,\n \"isolate\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n container,\n size = \"default\",\n children,\n finalFocus: finalFocusProp,\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\"\n} & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n const insideOverlay = useInsideOverlayLayer()\n const { capture, finalFocus } = useOpenerFinalFocus(finalFocusProp)\n return (\n <AlertDialogPortal container={resolvedContainer}>\n <AlertDialogOverlay forceRender={!insideOverlay} />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n motionRecipes.dialog,\n \"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-space-xl rounded-surface bg-popover p-surface text-popover-foreground shadow-xl outline-none data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md\",\n className\n )}\n {...props}\n finalFocus={finalFocus}\n >\n {capture}\n <OverlayLayer>{children}</OverlayLayer>\n </AlertDialogPrimitive.Popup>\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-space-2xl sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"flex flex-col-reverse group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-space-md inline-flex size-16 items-center justify-center rounded-full bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","import { modalRegionRecipes, surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport type { TextGap } from '../structure';\n/**\n * AlertDialog — internal confirmation anatomy behind `ConfirmDialog`.\n *\n * Not published from any entrypoint: applications use `ConfirmDialog` from\n * `themelia-react-ui/features/overlays`, which owns the decision lifecycle.\n * The surface shares the modal shell, region, rule and typography geometry of\n * the internal Dialog wrapper: a pinned heading region, an optional scrolling\n * body and pinned answers, with one rule between adjacent visible regions.\n */\nimport * as React from 'react';\n\nimport {\n\tAlertDialog as AlertDialogPrimitive,\n\tAlertDialogAction as AlertDialogActionPrimitive,\n\tAlertDialogCancel as AlertDialogCancelPrimitive,\n\tAlertDialogContent as AlertDialogContentPrimitive,\n\tAlertDialogDescription as AlertDialogDescriptionPrimitive,\n\tAlertDialogFooter as AlertDialogFooterPrimitive,\n\tAlertDialogMedia as AlertDialogMediaPrimitive,\n\tAlertDialogOverlay,\n\tAlertDialogPortal,\n\tAlertDialogTitle as AlertDialogTitlePrimitive,\n\tAlertDialogTrigger as AlertDialogTriggerPrimitive,\n} from '../../ui/alert-dialog';\nimport { Text } from '../../typography';\nimport { textLineHeights, textSizes, textWeights } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\n\nfunction isSimpleText(value: React.ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/** Same title role as Dialog, set on the element so its line box matches the Text inside. */\nconst titleTypography = cn(textSizes.base, textWeights.semibold, textLineHeights.snug);\n\nexport const AlertDialog = AlertDialogPrimitive;\n\nexport const AlertDialogTrigger = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogTriggerPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogTriggerPrimitive>\n>(function AlertDialogTrigger({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogTriggerPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-trigger--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nexport const AlertDialogContent = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogContentPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogContentPrimitive>\n>(function AlertDialogContent({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogContentPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t// Same flush shell as Dialog: regions own their insets and the rules between them.\n\t\t\t\t'alert-dialog-content--component flex max-h-[min(90vh,48rem)] flex-col gap-0 overflow-hidden rounded-surface bg-popover p-0 text-popover-foreground sm:max-w-md', surfaceDividerRecipes.modal.shell,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nexport const AlertDialogHeader = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement> & { textGap?: TextGap; align?: 'start' | 'center' }\n>(function AlertDialogHeader({ className, textGap = 'normal', align = 'start', ...props }, ref) {\n\t// Owned here rather than by the raw header, whose responsive variants force\n\t// start alignment from `sm`; a confirmation chooses its own alignment.\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tdata-modal-region=\"\"\n\t\t\tdata-align={align}\n\t\t\tclassName={cn(\n\t\t\t\t'alert-dialog-header--component flex flex-col',\n\t\t\t\tmodalRegionRecipes.header,\n\t\t\t\talign === 'center' ? 'items-center text-center' : 'items-start text-start',\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\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\n/** Scroll-owning region between the pinned heading and the pinned answers. */\nexport const AlertDialogBody = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\tfunction AlertDialogBody({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-dialog-body\"\n\t\t\t\tdata-modal-region=\"\"\n\t\t\t\tclassName={cn('alert-dialog-body--component', modalRegionRecipes.body, className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nAlertDialogBody.displayName = 'AlertDialogBody';\n\nexport const AlertDialogFooter = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogFooterPrimitive>\n>(function AlertDialogFooter({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogFooterPrimitive\n\t\t\tref={ref}\n\t\t\tdata-modal-region=\"\"\n\t\t\tclassName={cn(\n\t\t\t\t'alert-dialog-footer--component', modalRegionRecipes.footer,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nexport const AlertDialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogTitlePrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogTitlePrimitive>\n>(function AlertDialogTitle({ children, className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogTitlePrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-title--component m-0', titleTypography, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text tag=\"span\" type=\"inherit\" size=\"base\" weight=\"semibold\" lineHeight=\"snug\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</AlertDialogTitlePrimitive>\n\t);\n});\n\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nexport const AlertDialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogDescriptionPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogDescriptionPrimitive>\n>(function AlertDialogDescription({ children, className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogDescriptionPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-description--component m-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text tag=\"span\" type=\"secondary\" lineHeight=\"relaxed\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</AlertDialogDescriptionPrimitive>\n\t);\n});\n\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\nexport const AlertDialogMedia = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogMediaPrimitive>\n>(function AlertDialogMedia({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogMediaPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-media--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogMedia.displayName = 'AlertDialogMedia';\n\nexport const AlertDialogAction = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogActionPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogActionPrimitive>\n>(function AlertDialogAction({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogActionPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-action--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogAction.displayName = 'AlertDialogAction';\n\nexport const AlertDialogCancel = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogCancelPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogCancelPrimitive>\n>(function AlertDialogCancel({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogCancelPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-cancel--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport { AlertDialogOverlay, AlertDialogPortal };\n","import { isValidElement, memo, useMemo } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { Alert, AlertDescription } from '../../base/feedback';\nimport {\n\tAlertDialog as BaseAlertDialog,\n\tAlertDialogBody,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from '../../base/display/alert-dialog';\nimport { Stack } from '../../base/structure';\nimport { compositionRhythm } from '../../base/structure/composition.recipes';\nimport { useStrings } from '../../../lib/strings';\nimport { useOverlayConfig } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport { usePendingOverlayFocus } from './hooks/use-pending-overlay-focus';\nimport { overlayToneGlyphs } from './overlay-tone-icon';\nimport { defaultAlertDialogStrings } from './overlays.strings';\nimport type { ConfirmDialogProps } from './overlays.types';\n\nfunction ConfirmDialogImpl({\n\topen,\n\tonOpenChange,\n\tonClose,\n\tchildren,\n\ttitle,\n\tdescription,\n\tvisuallyHideHeader = false,\n\tclassName,\n\tcontentClassName,\n\tsurfaceStyle,\n\tinitialFocusRef,\n\tcloseOnEscape = true,\n\tstrings: customStrings,\n\tshowCancel = true,\n\tshowConfirm = true,\n\tonCancel,\n\tonConfirm,\n\tonAsyncConfirm,\n\tonError,\n\tcloseOnAsyncComplete = true,\n\tconfirmTone,\n\tconfirmStyle = 'solid',\n\tloading = false,\n\tformId,\n\tfooter,\n\ttone = 'neutral',\n\tshowIcon = false,\n\talertMessage,\n\ttrigger,\n\tdestructive = false,\n\talign,\n}: ConfirmDialogProps) {\n\tconst { defaultConfirmAlign } = useOverlayConfig();\n\tconst resolvedAlign = align ?? defaultConfirmAlign ?? 'center';\n\tconst visibility = useOverlayVisibility({ open, onOpenChange, onClose });\n\tconst mergedStrings = useStrings(defaultAlertDialogStrings, customStrings);\n\tconst resolvedConfirmTone = useMemo(() => {\n\t\tif (destructive) return 'destructive' as const;\n\t\tif (confirmTone) return confirmTone;\n\t\tconst toneMap = {\n\t\t\tneutral: 'primary',\n\t\t\tdestructive: 'destructive',\n\t\t\twarning: 'warning',\n\t\t\tinfo: 'primary',\n\t\t\tsuccess: 'success',\n\t\t} as const;\n\t\treturn toneMap[tone];\n\t}, [destructive, confirmTone, tone]);\n\n\tconst { strings, confirmButtonOnClick, effectiveLoading, handleCancel } =\n\t\tuseOverlayActions({\n\t\t\tcloseDialog: visibility.hide,\n\t\t\tonConfirm,\n\t\t\tonAsyncConfirm,\n\t\t\tonError,\n\t\t\tcloseOnAsyncComplete,\n\t\t\tconfirmTone: resolvedConfirmTone,\n\t\t\tloading,\n\t\t\tformId,\n\t\t\tonCancel,\n\t\t\tcustomStrings: mergedStrings,\n\t\t});\n\n\t/*\n\t * `destructive` is documented as the destructive *presentation*, but it only\n\t * ever reached the confirm button — the icon and the inline alert still came\n\t * from `tone`, which defaults to neutral. The result was a red confirm button\n\t * beside a grey question mark: two signals disagreeing about how serious the\n\t * action is. An explicit `tone` still wins, so this only fills the gap.\n\t */\n\tconst resolvedTone = destructive && tone === 'neutral' ? ('destructive' as const) : tone;\n\tconst toneGlyph = overlayToneGlyphs[resolvedTone];\n\tconst pendingFocusRef = usePendingOverlayFocus(effectiveLoading);\n\tconst hasHeading = Boolean(title || description || (showIcon && !visuallyHideHeader));\n\tconst hasContent = Boolean(children || alertMessage);\n\n\treturn (\n\t\t<BaseAlertDialog\n\t\t\topen={visibility.open}\n\t\t\tonOpenChange={(nextOpen, details) => {\n\t\t\t\tif (!nextOpen && (effectiveLoading || (details.reason === 'escape-key' && !closeOnEscape))) {\n\t\t\t\t\tdetails.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisibility.setOpen(nextOpen);\n\t\t\t}}\n\t\t>\n\t\t\t{!!trigger && (isValidElement(trigger) ? (\n\t\t\t\t<AlertDialogTrigger render={trigger} />\n\t\t\t) : (\n\t\t\t\t<AlertDialogTrigger render={<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" />} className=\"overlay-trigger--fallback\">\n\t\t\t\t\t{trigger}\n\t\t\t\t</AlertDialogTrigger>\n\t\t\t))}\n\n\t\t\t<AlertDialogContent\n\t\t\t\tref={pendingFocusRef}\n\t\t\t\tstyle={surfaceStyle}\n\t\t\t\tinitialFocus={initialFocusRef}\n\t\t\t\taria-label={title ? undefined : strings.alertDialogLabel}\n\t\t\t\tclassName={cn('confirm-dialog--component alert-dialog--component', className)}\n\t\t\t>\n\t\t\t\t{!!hasHeading && (\n\t\t\t\t\t<AlertDialogHeader\n\t\t\t\t\t\talign={resolvedAlign}\n\t\t\t\t\t\tclassName={cn('alert-dialog--header', visuallyHideHeader && 'sr-only')}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!!showIcon && !visuallyHideHeader && (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'mb-space-sm flex size-avatar-lg shrink-0 items-center justify-center rounded-full',\n\t\t\t\t\t\t\t\t\ttoneGlyph.surface,\n\t\t\t\t\t\t\t\t\ttoneGlyph.color,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<toneGlyph.Glyph className=\"size-icon-lg\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!title && <AlertDialogTitle>{title}</AlertDialogTitle>}\n\t\t\t\t\t\t{!!description && <AlertDialogDescription>{description}</AlertDialogDescription>}\n\t\t\t\t\t</AlertDialogHeader>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasContent && (\n\t\t\t\t\t<AlertDialogBody className={cn('alert-dialog--body', contentClassName)}>\n\t\t\t\t\t\t{!!alertMessage && (\n\t\t\t\t\t\t\t<Alert tone={resolvedTone} className={cn(!!children && 'mb-space-md')}>\n\t\t\t\t\t\t\t\t<AlertDescription>{alertMessage}</AlertDescription>\n\t\t\t\t\t\t\t</Alert>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</AlertDialogBody>\n\t\t\t\t)}\n\n\t\t\t\t{!!(showCancel || showConfirm || footer) && (\n\t\t\t\t\t<AlertDialogFooter className=\"alert-dialog--footer\">\n\t\t\t\t\t\t{footer ?? (\n\t\t\t\t\t\t\t<Stack\n\t\t\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\t\t\tgap={compositionRhythm.commands}\n\t\t\t\t\t\t\t\talign={{ base: 'stretch', sm: 'center' }}\n\t\t\t\t\t\t\t\tjustify={resolvedAlign === 'center' ? 'center' : 'end'}\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!showCancel && (\n\t\t\t\t\t\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" onClick={handleCancel} disabled={effectiveLoading}>\n\t\t\t\t\t\t\t\t\t\t{strings.cancel}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!showConfirm && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone={resolvedConfirmTone}\n\t\t\t\t\t\t\t\t\t\tbuttonStyle={confirmStyle}\n\t\t\t\t\t\t\t\t\t\tonClick={confirmButtonOnClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tloading={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tstrings={{ loading: strings.loading }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{strings.confirm}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t)}\n\t\t\t</AlertDialogContent>\n\t\t</BaseAlertDialog>\n\t);\n}\n\nexport const ConfirmDialog = memo(ConfirmDialogImpl);\nConfirmDialog.displayName = 'ConfirmDialog';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,SAASA,EAAO,EAAE,GAAGkF,KAAqC;CACxD,OAAO,kBAACjF,EAAgB,MAAjB;EAAsB,aAAU;EAAS,OAAM;EAAa,GAAIiF;CAAQ,CAAA;AACjF;AAEA,SAAShF,EAAc,EACrB,aAAU,IACV,GAAGgF,KACqD;CACxD,IAAMG,IAAaC,IAAU,kBAA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AAA,GAER,CAAC,CAACuF,KACF,kBAACpJ,GAAD;OACC,MAAK;OACL,MAAM8M;OACN,aAAa1C;OACb,SAASC;OACT,UAAUtB;OACV,SAASA;OACT,SAAS,EAAE,SAASlF,EAAQ,QAAQ;OAEnC,UAAAA,EAAQ;MACF,CAAA,CAEH;;IAEU,CAAA;GAED;EACJ,CAAA,CAAA;;AAEnB;AAEA,IAAasJ,KAAgB3C,EAAKkC,EAAiB;AACnD,GAAc,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popover-B85RenIl.js","names":["Popover","PopoverPrimitive","React","PopoverContent","PopoverHeader","PopoverTitle","PopoverDescription","React","PopoverContentPrimitive","PopoverHeaderPrimitive","PopoverTitlePrimitive","PopoverDescriptionPrimitive","useThemePortalContainer","Text","anchoredPositionMethod","portalClassName","motionRecipes","Slot","Stack","surfaceDividerRecipes","surfaceInsetClasses","popoverRecipes","usePopupFocusRecovery","React$1","Popover$1","props","Popover","PopoverTrigger","slotRender","asChild","safeRender","render","_nativeButton","rest","renderProps","state","inferredNativeButton","children","resolvedNativeButton","nativeButton","PopoverAnchor","PopoverContent$1","disablePortal","resolvedContainer","container","recoverFocus","onFocusCapture","inlineHost","setInlineHost","content","cn","className","PopoverHeader$1","PopoverTitle$1","PopoverDescription$1","isSimpleText","value","PopoverSurfaceContext","PopoverContent","resolvedType","type","inset","PopoverHeader","surface","copyGap","textGap","band","menu","hasStart","start","PopoverTitle","compact","PopoverDescription","PopoverFooter","childrenAsCaption","caption"],"sources":["../src/components/ui/popover.tsx","../src/components/base/popover/popover.tsx"],"sourcesContent":["import { anchoredPositionMethod } from '../../lib/anchored-positioning';\nimport { portalClassName } from '../../lib/portal-recipes';\nimport { usePopupFocusRecovery } from '../../lib/use-popup-focus-recovery';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport * as React from \"react\"\n\nimport { Slot } from \"./slot\"\nimport { cn } from \"../../lib/utils\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n asChild = false,\n nativeButton,\n render,\n children,\n ...props\n}: PopoverPrimitive.Trigger.Props & { asChild?: boolean; nativeButton?: boolean }) {\n const slotRender = asChild ? <Slot /> : undefined\n const safeRender: PopoverPrimitive.Trigger.Props[\"render\"] = typeof render === \"function\"\n ? ((renderProps, state) => {\n const { nativeButton: _nativeButton, ...rest } = renderProps as Record<string, unknown>\n void _nativeButton\n return render(rest as typeof renderProps, state)\n })\n : render\n let inferredNativeButton = true\n if (asChild && React.isValidElement(children)) {\n if (typeof children.type === \"string\") {\n inferredNativeButton = children.type === \"button\"\n } else {\n const childProps = (children.props ?? {}) as Record<string, unknown>\n inferredNativeButton = !(\"href\" in childProps)\n }\n }\n const resolvedNativeButton = nativeButton ?? (asChild ? inferredNativeButton : true)\n return (\n <PopoverPrimitive.Trigger\n data-slot=\"popover-trigger\"\n render={slotRender ?? safeRender}\n nativeButton={resolvedNativeButton}\n {...props}\n >\n {children}\n </PopoverPrimitive.Trigger>\n )\n}\n\nfunction PopoverAnchor({\n asChild = false,\n ...props\n}: React.ComponentPropsWithoutRef<\"span\"> & { asChild?: boolean }) {\n if (asChild) {\n return <Slot {...props} />\n }\n\n return <span data-slot=\"popover-anchor\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n container,\n anchor,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n disablePortal = false,\n positionMethod = disablePortal ? \"absolute\" : anchoredPositionMethod,\n onOpenAutoFocus,\n onInteractOutside,\n onFocusCapture,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"anchor\" | \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"positionMethod\"\n > & {\n disablePortal?: boolean\n onOpenAutoFocus?: (event: Event) => void\n onInteractOutside?: (event: Event) => void\n } & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n const recoverFocus = usePopupFocusRecovery(onFocusCapture)\n const [inlineHost, setInlineHost] = React.useState<HTMLDivElement | null>(null)\n void onOpenAutoFocus\n void onInteractOutside\n\n const content = (\n <PopoverPrimitive.Positioner\n anchor={anchor}\n positionMethod={positionMethod}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n motionRecipes.popup,\n \"bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-space-xl rounded-surface p-surface text-sm shadow-md ring-1 z-50 w-72 origin-(--transform-origin) outline-hidden\",\n className\n )}\n {...props}\n onFocusCapture={recoverFocus}\n />\n </PopoverPrimitive.Positioner>\n )\n\n if (disablePortal) {\n // Base UI requires Portal context; a local host preserves inline DOM locality.\n return <div data-popover-inline-host=\"\" className=\"contents\" ref={setInlineHost}>\n <PopoverPrimitive.Portal container={inlineHost} className={portalClassName()}>{content}</PopoverPrimitive.Portal>\n </div>\n }\n\n return <PopoverPrimitive.Portal container={resolvedContainer} className={portalClassName()}>{content}</PopoverPrimitive.Portal>\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverAnchor,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n","import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\n/**\n * Popover — public wrapper around the internal Base UI popover implementation.\n *\n * What this layer adds on top of the primitive:\n * - Library-default `sideOffset` (6px) and an explicit inset contract:\n * card/multi-content popovers use `default`, item collections use\n * `compact`, and mixed region-owned compositions use `flush`.\n * - A consistent shadow + border treatment matching the rest of the\n * library (one semantic border, no extra primitive ring).\n * - Wraps the primitive parts with stable DOM hooks and adds a separated\n * footer region while preserving the compound-component pattern:\n * `<Popover>`, `<PopoverTrigger>`, `<PopoverContent>` exactly as\n * they would with the primitive.\n *\n * Use the shared inset role for padding; className owns placement. Override\n * `--surface-x` / `--surface-y` / `--space-scale` on a wrapper for surface-wide\n * density tweaks.\n */\nimport * as React from 'react';\n\nimport {\n\tPopover as PopoverPrimitive,\n\tPopoverAnchor,\n\tPopoverContent as PopoverContentPrimitive,\n\tPopoverDescription as PopoverDescriptionPrimitive,\n\tPopoverHeader as PopoverHeaderPrimitive,\n\tPopoverTitle as PopoverTitlePrimitive,\n\tPopoverTrigger,\n} from '../../ui/popover';\nimport { Text } from '../../typography';\nimport { Stack, type TextGap } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { popoverRecipes, surfaceInsetClasses, type PopoverContentType } from './popover.recipes';\nexport type { PopoverContentType } from './popover.recipes';\n\nfunction isSimpleText(value: React.ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\ntype PopoverContentBaseProps = React.ComponentProps<typeof PopoverContentPrimitive>;\n\nexport type PopoverContentInset = 'default' | 'compact' | 'flush';\n\nexport type PopoverContentProps = PopoverContentBaseProps & {\n\t/**\n\t * Surface inset role. `default` is for card-like or multi-content popovers,\n\t * `compact` for item collections (or the small surface tier with explicit\n\t * type=\"display\"), and `flush` when child regions own their padding.\n\t */\n\tinset?: PopoverContentInset;\n\t/** Anatomy role; supplies the inferred inset only when inset is omitted. */\n\ttype?: PopoverContentType;\n};\n\nconst PopoverSurfaceContext = React.createContext({ type: 'display' as PopoverContentType, flush: false, regionOwned: false });\n\n/** Anchored content surface with a semantic inset role and package popover chrome. */\nfunction PopoverContent({\n\tclassName,\n\tsideOffset = 6,\n\tinset,\n\ttype,\n\tstyle,\n\t...props\n}: PopoverContentProps) {\n const resolvedType = type ?? (inset === 'compact' ? 'menu' : 'display');\n return (\n <PopoverSurfaceContext.Provider value={{ type: resolvedType, flush: inset === 'flush', regionOwned: false }}>\n\t\t<PopoverContentPrimitive\n\t\t\tdata-surface-type={resolvedType}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn('popover--component',\n\t\t\t\t// A popover is a small surface, not a compressed tooltip. The\n\t\t\t\t// unsuffixed surface token is the package-wide default and remains\n\t\t\t\t// responsive to scoped spacing changes.\n\t\t\t\t'gap-space-md max-h-[min(var(--available-height),calc(100dvh-2rem))] overflow-y-auto overscroll-contain',\n\t\t\t\tpopoverRecipes.surface,\n\t\t\t\tresolvedType === 'display' && inset === 'compact'\n\t\t\t\t\t? popoverRecipes.displayCompact\n\t\t\t\t\t: surfaceInsetClasses[inset ?? (resolvedType === 'menu' ? 'compact' : 'default')],\n\t\t\t\t// The shared recipe owns the semantic hairline border and shadow.\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={style}\n\t\t\t{...props}\n\t\t/>\n </PopoverSurfaceContext.Provider>\n\t);\n}\n\ntype PopoverHeaderBaseProps = React.ComponentProps<typeof PopoverHeaderPrimitive> & {\n /** Leading control, aligned with collection highlight edges rather than label text. */\n start?: React.ReactNode;\n /** Copy rhythm. Defaults to dense for menus and normal for display surfaces. */\n textGap?: TextGap;\n};\n\nfunction PopoverHeader({ className, children, start, textGap, ...props }: PopoverHeaderBaseProps) {\n const surface = React.useContext(PopoverSurfaceContext);\n const copyGap = textGap ?? (surface.type === 'menu' ? 'dense' : 'normal');\n const band = surface.flush && !surface.regionOwned;\n const menu = surface.type === 'menu' && !surface.regionOwned;\n const hasStart = start != null && start !== false;\n return (\n\t\t<PopoverHeaderPrimitive\n\t\t\tclassName={cn(\n 'popover-header--component',\n copyGap === 'dense' ? 'gap-dense' : 'gap-normal',\n band && (surface.type === 'menu' ? popoverRecipes.menuRegion : popoverRecipes.display),\n !band && menu && 'py-row-y',\n hasStart && 'flex-row items-center gap-space-md',\n band && surfaceDividerRecipes.anchored.header,\n className,\n )}\n\t\t\t{...props}\n\t\t>\n <PopoverSurfaceContext.Provider value={{ ...surface, regionOwned: true }}>\n {start}\n <Stack gap={copyGap} className={cn('popover-header--body min-w-0 flex-1', menu && !hasStart && popoverRecipes.menuCopyInset)}>\n {children}\n </Stack>\n </PopoverSurfaceContext.Provider>\n </PopoverHeaderPrimitive>\n\t);\n}\n\ntype PopoverTitleBaseProps = React.ComponentProps<typeof PopoverTitlePrimitive>;\n\nfunction PopoverTitle({ children, className, ...props }: PopoverTitleBaseProps) {\n const compact = React.useContext(PopoverSurfaceContext).type === 'menu';\n return (\n\t\t<PopoverTitlePrimitive\n\t\t\t// Plain text sets its own leading; the heading's inherited line box would\n\t\t\t// otherwise add a strut above the description.\n\t\t\tclassName={cn('popover-title--component', isSimpleText(children) && 'leading-none', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"span\"\n\t\t\t\t\ttype=\"inherit\"\n\t\t\t\t\tsize={compact ? undefined : 'base'}\n\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\tlineHeight=\"snug\"\n\t\t\t\t\tclassName=\"popover-title--text\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</PopoverTitlePrimitive>\n\t);\n}\n\ntype PopoverDescriptionBaseProps = React.ComponentProps<typeof PopoverDescriptionPrimitive>;\n\nfunction PopoverDescription({ children, className, ...props }: PopoverDescriptionBaseProps) {\n const compact = React.useContext(PopoverSurfaceContext).type === 'menu';\n return (\n\t\t<PopoverDescriptionPrimitive\n\t\t\tclassName={cn('popover-description--component', isSimpleText(children) && 'leading-none', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"span\"\n\t\t\t\t\ttype=\"secondary\"\n size={compact ? 'xs' : undefined}\n\t\t\t\t\tlineHeight={compact ? 'normal' : 'relaxed'}\n\t\t\t\t\tclassName=\"popover-description--text\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</PopoverDescriptionPrimitive>\n\t);\n}\n\ntype PopoverFooterProps = React.ComponentProps<'div'> & {\n /** Leading supporting content, one small step inside the region edge like the header; children are trailing actions. */\n caption?: React.ReactNode;\n};\n\nfunction PopoverFooter({ className, children, caption, ...props }: PopoverFooterProps) {\n const surface = React.useContext(PopoverSurfaceContext);\n const childrenAsCaption = caption == null && isSimpleText(children);\n const content = caption ?? (childrenAsCaption ? children : undefined);\n return (\n\t\t<Stack\n\t\t\tdirection=\"horizontal\"\n\t\t\tgap=\"sm\"\n\t\t\tjustify=\"end\"\n\t\t\twrap\n\t\t\tclassName={cn(\n\t\t\t\t'popover-footer--component pt-space-sm', surfaceDividerRecipes.anchored.footer,\n surface.flush && !surface.regionOwned && (surface.type === 'menu' ? popoverRecipes.menuRegion : popoverRecipes.display),\n\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n <PopoverSurfaceContext.Provider value={{ ...surface, regionOwned: true }}>\n {content != null && <div className={cn('popover-footer--caption me-auto min-w-0 max-w-full', surface.type === 'menu' && !surface.regionOwned && popoverRecipes.menuCopyInset)}>\n {isSimpleText(content) ? <Text tag=\"span\" size=\"xs\" type=\"secondary\">{content}</Text> : content}\n </div>}\n {!childrenAsCaption && children}\n </PopoverSurfaceContext.Provider>\n </Stack>\n\t);\n}\n\nexport {\n\tPopoverPrimitive as Popover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AAgC,OAAO;IAAE,GAAGM;IAAS,aAAa;GAAK;GAAvE,UAAA,CACEd,KAAW,QAAQ,kBAAC,OAAD;IAAK,WAAWC,EAAG,sDAAsDa,EAAQ,SAAS,UAAU,CAACA,EAAQ,eAAe1C,EAAe,aAAa;IAC1K,UAAAkC,EAAaN,CAAO,IAAI,kBAACpC,GAAD;KAAM,KAAI;KAAO,MAAK;KAAK,MAAK;KAAa,UAAAoC;IAAc,CAAA,IAAIA;GACpF,CAAA,GACJ,CAACyB,KAAqBrC,CACQ;;CAC1B,CAAA;AAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primitives-ByWgGUgt.js","names":["_Fragment","useFormattingConfig","useTypographyConfig","cn","Text","RunningTextContext","inlineLinkClassName","useInRunningText","resolveTextClassNames","useValueTypography","formatWithMinusSign","formatDuration","emptyValueTypography","formatInitials","Fragment$1","VALUE_ROLE","SECONDARY_ROLE","MONO_ROLE","isEmptyValue","children","ValueText","props","resolved","valueRole","empty","typography","weight","numeric","hookClassName","className","emptyLabel","Value","SecondaryValue","MutedValue","MonoValue","EmptyValue","WORD_SEPARATOR","NAME_CONNECTOR","LETTER_MATCHER","LETTERS_MATCHER","normalizeNameWhitespace","value","getLetters","getFirstLetter","match","isFormattedSegment","first","segment","letters","isAllUpper","isAllLower","isFormattedName","word","formatNameSegment","before","after","formatNameWord","formatName","normalized","options","Name","rawValue","content","Initials","Link","inText","defaultTextSize","linkUnderlineClassName","EmptyContact","_href","_target","_rel","_download","_hrefLang","_ping","_referrerPolicy","_media","_type","spanProps","contactProps","Email","query","subject","body","href","display","normalizeTel","Phone","normalizeUrl","Url","isExternal","external","resolvedTarget","target","resolvedRel","rel","FILE_SIZE_ROLE","FILE_SIZE_UNITS","FILE_SIZE_UNIT_MULTIPLIER","normalizeFileSizeValue","from","formatFileSize","locale","bytes","displayValue","unitIndex","FileSize","formatting","label","DURATION_ROLE","Duration","maximumFractionDigits","DIMENSIONS_ROLE","parseDimensionPart","parsed","formatDimensions","parsedWidth","width","parsedHeight","height","parsedDepth","depth","formatter","values","separator","unit","Dimensions","index","part"],"sources":["../src/components/primitives/value.tsx","../src/components/primitives/name.tsx","../src/components/primitives/initials.tsx","../src/components/primitives/link.tsx","../src/components/primitives/file-size.tsx","../src/components/primitives/duration.tsx","../src/components/primitives/dimensions.tsx"],"sourcesContent":["import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { cn } from '../../lib/utils';\n\nimport { emptyValueTypography, useValueTypography, type ValueTypographyRole } from './value-typography';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n/** Value colour roles: foreground, secondary, or the surrounding text colour. */\nexport type ValueType = Extract<TextProps['type'], 'main' | 'secondary' | 'inherit'>;\n\nexport interface ValueProps extends SpanProps {\n\tchildren?: ReactNode;\n\t/** Rendered with the shared empty treatment when children are absent. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\t/**\n\t * Text size. A standalone value uses the provider text size; inside running\n\t * text (`Text`, `Heading`, labels, links, other values) it inherits the size.\n\t */\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\t/** Font weight. Defaults to the component's role weight; inside running text, the surrounding weight. */\n\tweight?: TextProps['weight'];\n\t/** Colour role. Defaults to the component's role; inside running text `Value` and `MonoValue` take the surrounding colour. */\n\ttype?: ValueType;\n\t/** Line height. Defaults to the role leading; inside running text, the surrounding leading. */\n\tlineHeight?: TextProps['lineHeight'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nconst VALUE_ROLE: ValueTypographyRole = { type: 'main', weight: 'regular' };\nconst SECONDARY_ROLE: ValueTypographyRole = { type: 'secondary', weight: 'regular', keepType: true };\nconst MONO_ROLE: ValueTypographyRole = { type: 'main', weight: 'medium', inTextLineHeight: 'none' };\n\nfunction isEmptyValue(children: ReactNode) {\n\treturn children === null || children === undefined || children === '';\n}\n\ninterface ValueTextProps extends ValueProps {\n\tvalueRole: ValueTypographyRole;\n\thookClassName: string;\n\tnumeric?: boolean;\n}\n\n/** Shared span for the value family: role resolution plus the empty treatment. */\nfunction ValueText({ valueRole, hookClassName, numeric = false, children, emptyLabel = EMPTY, size, align, weight, type, lineHeight, className, ref, ...props }: ValueTextProps) {\n\tconst resolved = useValueTypography({ size, type, weight, lineHeight }, valueRole);\n\tconst empty = isEmptyValue(children);\n\tconst typography = empty ? emptyValueTypography(resolved, weight) : resolved;\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tnumeric={numeric && !empty}\n\t\t\tclassName={cn(hookClassName, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{empty ? emptyLabel : children}\n\t\t</Text>\n\t);\n}\n\n/**\n * An ordinary displayed fact: foreground, regular weight. Inside running text it\n * takes the sentence's size, colour and weight.\n */\nexport function Value(props: ValueProps) {\n\treturn <ValueText {...props} valueRole={VALUE_ROLE} hookClassName=\"value--component inline min-w-0\" />;\n}\n\n/** Supporting detail in the secondary colour. Inside running text it keeps the colour and takes the size and weight. */\nexport function SecondaryValue(props: ValueProps) {\n\treturn <ValueText {...props} valueRole={SECONDARY_ROLE} hookClassName=\"secondary-value--component inline min-w-0\" />;\n}\n\n/** A quiet note using the shared secondary foreground. */\nexport function MutedValue(props: ValueProps) {\n\treturn <ValueText {...props} valueRole={SECONDARY_ROLE} hookClassName=\"muted-value--component inline min-w-0\" />;\n}\n\n/**\n * An identifier or code (SKU, reference, tracking number, key) in the monospace\n * family. Standalone it is foreground medium at the provider size; inside running\n * text only the family changes, so an SKU in a description matches the words\n * around it. Amounts and dates belong to the number primitives, which keep the\n * sans font with tabular figures.\n */\nexport function MonoValue(props: ValueProps) {\n\treturn <ValueText {...props} valueRole={MONO_ROLE} numeric hookClassName=\"mono-value--component inline min-w-0 break-words\" />;\n}\n\nexport interface EmptyValueProps extends Omit<ValueProps, 'emptyLabel'> {\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * An intentionally absent value: secondary colour, regular weight. Every value\n * primitive renders its missing state with this treatment.\n */\nexport function EmptyValue({ children = EMPTY, ...props }: EmptyValueProps) {\n\treturn <ValueText {...props} valueRole={SECONDARY_ROLE} emptyLabel={EMPTY} hookClassName=\"empty-value--component inline min-w-0\">{children}</ValueText>;\n}\n","import { type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nimport { Value, type ValueProps } from './value';\n\nconst WORD_SEPARATOR = /(\\s+)/u;\nconst NAME_CONNECTOR = /([-'])/u;\nconst LETTER_MATCHER = /\\p{L}/u;\nconst LETTERS_MATCHER = /\\p{L}/gu;\n\nexport interface NameFormatOptions {\n\t/** Force title-casing even when the name already looks intentionally cased. */\n\tforce?: boolean;\n}\n\nexport interface NameProps extends Omit<ValueProps, 'children'> {\n\t/** Raw name value to normalize for display. */\n\tvalue?: string | null;\n\t/** String children are normalized when value is not provided. */\n\tchildren?: ReactNode;\n\t/** Force title-casing even when the name already looks intentionally cased. */\n\tforce?: boolean;\n}\n\nfunction normalizeNameWhitespace(value: string) {\n\treturn value.trim().replace(/\\s+/g, ' ');\n}\n\nfunction getLetters(value: string) {\n\treturn value.match(LETTERS_MATCHER)?.join('') ?? '';\n}\n\nfunction getFirstLetter(value: string) {\n\tconst match = LETTER_MATCHER.exec(value);\n\tif (!match) return null;\n\treturn {\n\t\tindex: match.index,\n\t\tvalue: match[0],\n\t};\n}\n\nfunction isFormattedSegment(segment: string) {\n\tconst first = getFirstLetter(segment);\n\tif (!first) return true;\n\n\tconst letters = getLetters(segment);\n\tif (letters.length <= 1) return first.value === first.value.toLocaleUpperCase();\n\n\tconst isAllUpper = letters === letters.toLocaleUpperCase();\n\tconst isAllLower = letters === letters.toLocaleLowerCase();\n\n\treturn first.value === first.value.toLocaleUpperCase() && !isAllUpper && !isAllLower;\n}\n\nfunction isFormattedName(value: string) {\n\treturn normalizeNameWhitespace(value)\n\t\t.split(WORD_SEPARATOR)\n\t\t.filter((word) => word.trim() !== '')\n\t\t.every((word) =>\n\t\t\tword\n\t\t\t\t.split(NAME_CONNECTOR)\n\t\t\t\t.filter((segment) => segment !== '-' && segment !== \"'\")\n\t\t\t\t.every(isFormattedSegment),\n\t\t);\n}\n\nfunction formatNameSegment(segment: string) {\n\tconst first = getFirstLetter(segment);\n\tif (!first) return segment;\n\n\tconst before = segment.slice(0, first.index);\n\tconst after = segment.slice(first.index + first.value.length);\n\n\treturn `${before}${first.value.toLocaleUpperCase()}${after.toLocaleLowerCase()}`;\n}\n\nfunction formatNameWord(word: string) {\n\treturn word\n\t\t.split(NAME_CONNECTOR)\n\t\t.map((segment) => (segment === '-' || segment === \"'\" ? segment : formatNameSegment(segment)))\n\t\t.join('');\n}\n\nexport function formatName(value: string | null | undefined, options: NameFormatOptions = {}) {\n\tif (value === null || value === undefined) return '';\n\n\tconst normalized = normalizeNameWhitespace(value);\n\tif (!normalized) return '';\n\tif (!options.force && isFormattedName(normalized)) return normalized;\n\n\treturn normalized\n\t\t.split(WORD_SEPARATOR)\n\t\t.map((word) => (word.trim() === '' ? word : formatNameWord(word)))\n\t\t.join('');\n}\n\nexport function Name({\n\tvalue,\n\tchildren,\n\tforce,\n\tclassName,\n\tref,\n\t...props\n}: NameProps) {\n\tconst rawValue = value ?? (typeof children === 'string' ? children : undefined);\n\tconst content = rawValue === undefined ? children : formatName(rawValue, { force });\n\n\treturn (\n\t\t<Value ref={ref} className={cn('name--component', className)} {...props}>\n\t\t\t{content}\n\t\t</Value>\n\t);\n}\n","import { cn } from '../../lib/utils';\n\nimport { Value, type ValueProps } from './value';\nimport {\n\tformatInitials,\n\ttype InitialsMaxCharacters,\n\ttype InitialsStrategy,\n} from './initials-format';\n\nexport interface InitialsProps extends Omit<ValueProps, 'children'> {\n\t/** Person, organization, or resource name used to derive initials. */\n\tvalue?: string | null;\n\t/** First + last word by default; use first-words to preserve the first N words. */\n\tstrategy?: InitialsStrategy;\n\t/** Maximum visible characters. Defaults to 2. */\n\tmaxCharacters?: InitialsMaxCharacters;\n\t/** Optional BCP-47 locale used for locale-sensitive uppercasing. */\n\tlocale?: string;\n\t/** Returned when no usable letter or number exists. Defaults to an empty string. */\n\tfallback?: string;\n\t/** Defaults to `inherit`: the avatar or chip that hosts the initials owns their size. */\n\tsize?: ValueProps['size'];\n\t/** Defaults to `inherit`: the host owns the colour, such as an avatar fallback tone. */\n\ttype?: ValueProps['type'];\n\t/** Defaults to `inherit`: the host owns the weight. */\n\tweight?: ValueProps['weight'];\n}\n\n/**\n * Semantic displayed initials for identities and avatar fallbacks. They take the\n * size, colour and weight of the avatar or chip that hosts them.\n */\nexport function Initials({\n\tvalue,\n\tstrategy,\n\tmaxCharacters,\n\tlocale,\n\tfallback,\n\tsize = 'inherit',\n\ttype = 'inherit',\n\tweight = 'inherit',\n\tclassName,\n\tref,\n\t...props\n}: InitialsProps) {\n\treturn (\n\t\t<Value\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\tweight={weight}\n\t\t\tclassName={cn('initials--component', className)}\n\t\t>\n\t\t\t{formatInitials(value, {\n\t\t\t\tstrategy,\n\t\t\t\tmaxCharacters,\n\t\t\t\tlocale,\n\t\t\t\tfallback,\n\t\t\t})}\n\t\t</Value>\n\t);\n}\n","import { type AnchorHTMLAttributes, type ReactNode, type Ref } from 'react';\n\nimport { useTypographyConfig } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext, useInRunningText } from '../typography/running-text';\nimport { inlineLinkClassName, linkUnderlineClassName } from '../typography/text-link';\nimport { resolveTextClassNames } from '../typography/text.styles';\n\nimport { EmptyValue } from './value';\n\nexport interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n\tchildren?: ReactNode;\n\t/** Rendered instead of a dead link when there is nothing to show. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\tref?: Ref<HTMLAnchorElement>;\n}\n\n/**\n * Link-coloured inline value. Standalone it uses the provider text size with an\n * underline on hover. Inside running text it takes the sentence's size, weight\n * and leading and stays underlined, because colour alone does not set a link\n * apart from the words around it.\n */\nexport function Link({\n\tchildren,\n\temptyLabel = EMPTY,\n\tclassName,\n\tref,\n\t...props\n}: LinkProps) {\n\tconst inText = useInRunningText();\n\tconst { defaultTextSize } = useTypographyConfig();\n\tconst content =\n\t\tchildren === null || children === undefined || children === '' ? emptyLabel : children;\n\n\treturn (\n\t\t<a\n\t\t\tref={ref}\n\t\t\tdata-typography=\"link\"\n\t\t\tclassName={cn(\n\t\t\t\tresolveTextClassNames({\n\t\t\t\t\ttype: null,\n\t\t\t\t\tsize: inText ? 'inherit' : defaultTextSize,\n\t\t\t\t\tweight: null,\n\t\t\t\t\talign: null,\n\t\t\t\t\tlineHeight: inText ? null : 'normal',\n\t\t\t\t}),\n\t\t\t\t'link--component text-link-color wrap-anywhere',\n\t\t\t\tinlineLinkClassName,\n\t\t\t\tinText ? `${linkUnderlineClassName} hover:decoration-transparent` : 'no-underline underline-offset-[0.2em] hover:underline',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RunningTextContext.Provider value>{content}</RunningTextContext.Provider>\n\t\t</a>\n\t);\n}\n\ntype ContactSpanProps = Omit<LinkProps, 'children' | 'emptyLabel' | 'ref' | 'href' | 'target' | 'rel' | 'download' | 'hrefLang' | 'ping' | 'referrerPolicy' | 'media' | 'type'>;\n\n/**\n * The missing contact value: the shared empty treatment, never a dead link.\n * Global attributes (ARIA, data, id, title) still reach the rendered span.\n */\nfunction EmptyContact({ className, emptyLabel, ref, contactProps }: { className: string; emptyLabel: ReactNode; ref?: Ref<HTMLElement>; contactProps: LinkProps }) {\n\tconst { href: _href, target: _target, rel: _rel, download: _download, hrefLang: _hrefLang, ping: _ping, referrerPolicy: _referrerPolicy, media: _media, type: _type, ...spanProps } = contactProps;\n\treturn <EmptyValue {...(spanProps as ContactSpanProps)} ref={ref as Ref<HTMLSpanElement>} className={className}>{emptyLabel}</EmptyValue>;\n}\n\nexport interface EmailProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\tsubject?: string;\n\tbody?: string;\n\tref?: Ref<HTMLElement>;\n}\n\nexport function Email({\n\tvalue,\n\tdisplay,\n\tsubject,\n\tbody,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: EmailProps) {\n\tif (!value) return <EmptyContact ref={ref} className={cn('email--component', className)} emptyLabel={emptyLabel} contactProps={props} />;\n\n\tconst query = new URLSearchParams();\n\tif (subject) query.set('subject', subject);\n\tif (body) query.set('body', body);\n\tconst href = `mailto:${value}${query.size ? `?${query.toString()}` : ''}`;\n\n\treturn (\n\t\t<Link ref={ref as Ref<HTMLAnchorElement>} className={cn('email--component', className)} href={href} emptyLabel={emptyLabel} {...props}>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n\nexport interface PhoneProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\tref?: Ref<HTMLElement>;\n}\n\nfunction normalizeTel(value: string) {\n\treturn value.replace(/[^\\d+*#;,.]/g, '');\n}\n\nexport function Phone({\n\tvalue,\n\tdisplay,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: PhoneProps) {\n\tif (!value) return <EmptyContact ref={ref} className={cn('phone--component', className)} emptyLabel={emptyLabel} contactProps={props} />;\n\n\treturn (\n\t\t<Link ref={ref as Ref<HTMLAnchorElement>} className={cn('phone--component', className)} href={`tel:${normalizeTel(value)}`} emptyLabel={emptyLabel} {...props}>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n\nexport interface UrlProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\texternal?: boolean;\n\tref?: Ref<HTMLElement>;\n}\n\nfunction normalizeUrl(value: string) {\n\tif (/^[a-z][a-z\\d+\\-.]*:/i.test(value) || value.startsWith('/') || value.startsWith('#')) return value;\n\treturn `https://${value}`;\n}\n\nexport function Url({\n\tvalue,\n\tdisplay,\n\texternal,\n\ttarget,\n\trel,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: UrlProps) {\n\tif (!value) return <EmptyContact ref={ref} className={cn('url--component', className)} emptyLabel={emptyLabel} contactProps={{ ...props, target, rel }} />;\n\n\tconst href = normalizeUrl(value);\n\tconst isExternal = external ?? /^https?:\\/\\//i.test(href);\n\tconst resolvedTarget = target ?? (isExternal ? '_blank' : undefined);\n\tconst resolvedRel = rel ?? (isExternal ? 'noreferrer' : undefined);\n\n\treturn (\n\t\t<Link\n\t\t\tref={ref as Ref<HTMLAnchorElement>}\n\t\t\tclassName={cn('url--component', className)}\n\t\t\thref={href}\n\t\t\ttarget={resolvedTarget}\n\t\t\trel={resolvedRel}\n\t\t\temptyLabel={emptyLabel}\n\t\t\t{...props}\n\t\t>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\nimport { emptyValueTypography, useValueTypography, type ValueTypographyRole } from './value-typography';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n\nexport type FileSizeUnit = 'bytes' | 'kb' | 'mb' | 'gb' | 'tb';\n\nexport interface FileSizeProps extends SpanProps {\n\tvalue?: number | null;\n\tfrom?: FileSizeUnit;\n\tlocale?: string;\n\t/** Rendered with the shared empty treatment when the value is absent or not positive. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\t/** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n\tsize?: TextSize;\n\t/** Text alignment. Defaults to `right` so columns of sizes line up. */\n\talign?: TextProps['align'];\n\t/** Font weight. Defaults to `regular`; inside running text, the surrounding weight. */\n\tweight?: TextProps['weight'];\n\t/** Colour role. Defaults to `main`; inside running text, the surrounding colour. */\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nconst FILE_SIZE_ROLE: ValueTypographyRole = { type: 'main', weight: 'regular' };\n\nconst FILE_SIZE_UNITS = ['B', 'KB', 'MB', 'GB', 'TB'] as const;\nconst FILE_SIZE_UNIT_MULTIPLIER: Record<FileSizeUnit, number> = {\n\tbytes: 1,\n\tkb: 1024,\n\tmb: 1024 ** 2,\n\tgb: 1024 ** 3,\n\ttb: 1024 ** 4,\n};\n\nexport interface FileSizeFormatOptions {\n\tfrom?: FileSizeUnit;\n\tlocale?: string;\n}\n\nfunction normalizeFileSizeValue(value?: number | null, from: FileSizeUnit = 'bytes') {\n\tif (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) return null;\n\treturn value * FILE_SIZE_UNIT_MULTIPLIER[from];\n}\n\nexport function formatFileSize(\n\tvalue?: number | null,\n\toptions?: FileSizeFormatOptions | string,\n): string | null {\n\tconst locale = typeof options === 'string' ? options : options?.locale;\n\tconst from = typeof options === 'string' ? 'bytes' : options?.from ?? 'bytes';\n\tconst bytes = normalizeFileSizeValue(value, from);\n\tif (bytes === null) return null;\n\n\tlet displayValue = bytes;\n\tlet unitIndex = 0;\n\twhile (displayValue >= 1024 && unitIndex < FILE_SIZE_UNITS.length - 1) {\n\t\tdisplayValue /= 1024;\n\t\tunitIndex += 1;\n\t}\n\n\tconst formattedValue = new Intl.NumberFormat(locale, {\n\t\tmaximumFractionDigits: unitIndex === 0 ? 0 : 1,\n\t\tminimumFractionDigits: 0,\n\t}).format(displayValue);\n\n\treturn `${formattedValue} ${FILE_SIZE_UNITS[unitIndex]}`;\n}\n\n/** A byte count in the largest readable unit, sans UI font with tabular figures. */\nexport function FileSize({\n\tvalue,\n\tfrom = 'bytes',\n\tlocale,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight,\n\ttype,\n\tclassName,\n\tref,\n\t...props\n}: FileSizeProps) {\n\tconst formatting = useFormattingConfig();\n\tconst resolved = useValueTypography({ size, type, weight }, FILE_SIZE_ROLE);\n\tconst label = formatFileSize(value, { from, locale: locale ?? formatting.locale });\n\tconst typography = label === null ? emptyValueTypography(resolved, weight) : resolved;\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn('file-size--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label ?? emptyLabel}\n\t\t</Text>\n\t);\n}\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport {\n\tEMPTY,\n\tformatDuration,\n\ttype DurationUnit,\n\ttype DurationUnitDisplay,\n} from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\nimport { emptyValueTypography, useValueTypography, type ValueTypographyRole } from './value-typography';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n\nexport interface DurationProps extends SpanProps {\n\tvalue?: number | null;\n\tfrom?: DurationUnit;\n\tlocale?: string;\n\tmaxParts?: number;\n\tunitDisplay?: DurationUnitDisplay;\n\tminimumFractionDigits?: number;\n\tmaximumFractionDigits?: number;\n\t/** Rendered with the shared empty treatment when the value is absent. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\t/** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n\tsize?: TextSize;\n\t/** Text alignment. Defaults to `right` so columns of durations line up. */\n\talign?: TextProps['align'];\n\t/** Font weight. Defaults to `regular`; inside running text, the surrounding weight. */\n\tweight?: TextProps['weight'];\n\t/** Colour role. Defaults to `main`; inside running text, the surrounding colour. */\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nconst DURATION_ROLE: ValueTypographyRole = { type: 'main', weight: 'regular' };\n\n/** An elapsed span in localized units, sans UI font with tabular figures. */\nexport function Duration({\n\tvalue,\n\tfrom = 'seconds',\n\tlocale,\n\tmaxParts = 2,\n\tunitDisplay = 'narrow',\n\tminimumFractionDigits,\n\tmaximumFractionDigits,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight,\n\ttype,\n\tclassName,\n\tref,\n\t...props\n}: DurationProps) {\n\tconst formatting = useFormattingConfig();\n\tconst resolved = useValueTypography({ size, type, weight }, DURATION_ROLE);\n\tconst label = value === null || value === undefined\n\t\t? null\n\t\t: formatDuration(value, {\n\t\t\t\tfrom,\n\t\t\t\tlocale: locale ?? formatting.locale,\n\t\t\t\tmaxParts,\n\t\t\t\tunitDisplay,\n\t\t\t\tminimumFractionDigits,\n\t\t\t\tmaximumFractionDigits: maximumFractionDigits ?? (\n\t\t\t\t\tfrom === 'milliseconds' ? 1 : undefined\n\t\t\t\t),\n\t\t\t});\n\n\tconst empty = label === null || label === EMPTY;\n\tconst typography = empty ? emptyValueTypography(resolved, weight) : resolved;\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn('duration--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{empty ? emptyLabel : label}\n\t\t</Text>\n\t);\n}\n\nexport { formatDuration } from '../../lib/format';\nexport type { DurationUnit, DurationUnitDisplay, FormatDurationOptions } from '../../lib/format';\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY, formatWithMinusSign } from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\nimport { emptyValueTypography, useValueTypography, type ValueTypographyRole } from './value-typography';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\ntype DimensionPart = number | string | null | undefined;\n\nexport interface FormatDimensionsOptions {\n\tdepth?: DimensionPart;\n\tunit?: string;\n\tseparator?: string;\n\tlocale?: string;\n\toptions?: Intl.NumberFormatOptions;\n}\n\nexport interface DimensionsProps extends SpanProps {\n\twidth?: DimensionPart;\n\theight?: DimensionPart;\n\tdepth?: DimensionPart;\n\tunit?: ReactNode;\n\tseparator?: ReactNode;\n\tlocale?: string;\n\toptions?: Intl.NumberFormatOptions;\n\t/** Rendered with the shared empty treatment when width or height is missing. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\t/** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n\tsize?: TextSize;\n\t/** Text alignment. Defaults to `right` so columns of readings line up. */\n\talign?: TextProps['align'];\n\t/** Font weight. Defaults to `regular`; inside running text, the surrounding weight. */\n\tweight?: TextProps['weight'];\n\t/** Colour role. Defaults to `main`; inside running text, the surrounding colour. */\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nconst DIMENSIONS_ROLE: ValueTypographyRole = { type: 'main', weight: 'regular' };\n\nfunction parseDimensionPart(value: DimensionPart): number | null {\n\tif (value === null || value === undefined || value === '') return null;\n\tif (typeof value === 'number') return Number.isFinite(value) ? value : null;\n\tconst normalized = value.trim().replace(',', '.');\n\tif (!normalized) return null;\n\tconst parsed = Number(normalized);\n\treturn Number.isFinite(parsed) ? parsed : null;\n}\n\nexport function formatDimensions(\n\twidth: DimensionPart,\n\theight: DimensionPart,\n\t{\n\t\tdepth,\n\t\tunit,\n\t\tseparator = ' × ',\n\t\tlocale,\n\t\toptions,\n\t}: FormatDimensionsOptions = {},\n): string | null {\n\tconst parsedWidth = parseDimensionPart(width);\n\tconst parsedHeight = parseDimensionPart(height);\n\tconst parsedDepth = parseDimensionPart(depth);\n\tif (parsedWidth === null || parsedHeight === null) return null;\n\tif (depth !== null && depth !== undefined && depth !== '' && parsedDepth === null) return null;\n\n\tconst formatter = new Intl.NumberFormat(locale, options);\n\tconst values = [parsedWidth, parsedHeight];\n\tif (parsedDepth !== null) values.push(parsedDepth);\n\tconst label = values.map((value) => formatWithMinusSign(formatter, value)).join(separator);\n\treturn unit ? `${label} ${unit}` : label;\n}\n\n/** A width × height (× depth) reading with localized numbers, sans UI font with tabular figures. */\nexport function Dimensions({\n\twidth,\n\theight,\n\tdepth,\n\tunit,\n\tseparator = ' × ',\n\tlocale,\n\toptions,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight,\n\ttype,\n\tclassName,\n\tref,\n\t...props\n}: DimensionsProps) {\n\tconst formatting = useFormattingConfig();\n\tconst resolved = useValueTypography({ size, type, weight }, DIMENSIONS_ROLE);\n\tconst label = formatDimensions(width, height, {\n\t\tdepth,\n\t\tseparator: typeof separator === 'string' ? separator : ' × ',\n\t\tlocale: locale ?? formatting.locale,\n\t\toptions,\n\t});\n\n\tconst typography = label === null ? emptyValueTypography(resolved, weight) : resolved;\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn('dimensions--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label === null ? emptyLabel : (\n\t\t\t\t<>\n\t\t\t\t\t{typeof separator === 'string' ? label : label.split(' × ').map((part, index) => (\n\t\t\t\t\t\t<span key={`${part}-${index}`}>\n\t\t\t\t\t\t\t{index > 0 && separator}\n\t\t\t\t\t\t\t{part}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t))}\n\t\t\t\t\t{!!unit && <> {unit}</>}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</Text>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAgCA,IAAMe,IAAkC;CAAE,MAAM;CAAQ,QAAQ;AAAU,GACpEC,IAAsC;CAAE,MAAM;CAAa,QAAQ;CAAW,UAAU;AAAK,GAC7FC,IAAiC;CAAE,MAAM;CAAQ,QAAQ;CAAU,kBAAkB;AAAO;AAElG,SAASC,EAAa,GAAqB;CAC1C,OAAOC,KAAa,QAAkCA,MAAa;AACpE;AASA,SAASC,EAAU,EAAE,cAAW,kBAAe,aAAU,IAAO,aAAU,gBAAA,KAAoB,SAAM,UAAO,WAAQ,SAAM,eAAY,cAAW,QAAK,GAAGC,KAAyB;CAChL,IAAMC,IAAWb,EAAmB;EAAE;EAAM;EAAM;EAAQ;CAAW,GAAGc,CAAS,GAC3EC,IAAQN,EAAaC,CAAQ,GAC7BM,IAAaD,IAAQZ,EAAqBU,GAAUI,CAAM,IAAIJ;CACpE,OACC,kBAAClB,GAAD;EACM;EACL,KAAI;EACJ,MAAMqB,EAAW;EACV;EACP,QAAQA,EAAW;EACnB,MAAMA,EAAW;EACjB,YAAYA,EAAW;EACvB,SAASE,KAAW,CAACH;EACrB,WAAWrB,EAAGyB,GAAeC,CAAS;EACtC,GAAIR;EAEH,UAAAG,IAAQM,IAAaX;CACjB,CAAA;AAER;AAMA,SAAgBY,EAAM,GAAmB;CACxC,OAAO,kBAACX,GAAD;EAAW,GAAIC;EAAO,WAAWN;EAAY,eAAc;CAAmC,CAAA;AACtG;AAGA,SAAgBiB,EAAe,GAAmB;CACjD,OAAO,kBAACZ,GAAD;EAAW,GAAIC;EAAO,WAAWL;EAAgB,eAAc;CAA6C,CA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AW,OAAOK,KAAc,WAAWA,IAAY;EACvD,QAAQtB,KAAUK,EAAW;EAC7B;CACD,CAAC,GAEKlF,IAAamF,MAAU,OAAOhG,EAAqBU,GAAUI,CAAM,IAAIJ;CAE7E,OACC,kBAAClB,GAAD;EACM;EACL,KAAI;EACJ,MAAMqB,EAAW;EACV;EACP,QAAQA,EAAW;EACnB,MAAMA,EAAW;EACjB,YAAYA,EAAW;EACvB,WAAWtB,EAAG,6CAA6C0B,CAAS;EACpE,GAAIR;EAEH,UAAAuF,MAAU,OAAO9E,IACjB,kBAAA9B,GAAA,EAAA,UAAA,CACE,OAAO4H,KAAc,WAAWhB,IAAQA,EAAM,MAAM,KAAK,CAAC,CAAC,KAAK,GAAM,MACtE,kBAAC,QAAD,EAAA,UAAA,CACEmB,IAAQ,KAAKH,GACbI,CACI,EAAA,GAHK,GAAGA,EAAK,GAAGD,GAGhB,CACN,GACA,CAAC,CAACF,KAAQ,kBAAA7H,GAAA,EAAA,UAAA,CAAE,KAAE6H,CAAO,EAAA,CAAA,CACrB,EAAA,CAAA;CAEE,CAAA;AAER"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { v as e } from "./ui-provider-C-74NVLc.js";
|
|
3
|
-
import { t } from "./utils-B6kKb8jB.js";
|
|
4
|
-
import { i as n } from "./text.styles-B64My8RZ.js";
|
|
5
|
-
import { n as r } from "./safe-image-src-C6kQSMBZ.js";
|
|
6
|
-
import { n as i, t as a } from "./sanitize-html-DsQmI48u.js";
|
|
7
|
-
import { t as o } from "./content-typography-CnwgMJ37.js";
|
|
8
|
-
import { Fragment as s, createElement as c, forwardRef as l, useMemo as u } from "react";
|
|
9
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
10
|
-
//#region src/components/typography/rich-text/rich-text-tree.tsx
|
|
11
|
-
var f = /* @__PURE__ */ new Set(["br", "img"]);
|
|
12
|
-
function p(e) {
|
|
13
|
-
let t = typeof e == "number" ? e : Number(e);
|
|
14
|
-
return Number.isFinite(t) && t > 0 ? t : void 0;
|
|
15
|
-
}
|
|
16
|
-
function m(e, t) {
|
|
17
|
-
let n = { key: t };
|
|
18
|
-
for (let [t, r] of Object.entries(e.properties)) r != null && r !== !1 && (t === "className" ? n.className = Array.isArray(r) ? r.join(" ") : String(r) : /^data[A-Z]/.test(t) ? n[t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`)] = String(r) : n[t] = Array.isArray(r) ? r.join(" ") : r);
|
|
19
|
-
return n;
|
|
20
|
-
}
|
|
21
|
-
function h(e, t, n) {
|
|
22
|
-
if (e.type === "text") return e.value;
|
|
23
|
-
if (e.type !== "element") return null;
|
|
24
|
-
if (e.tagName === "img") {
|
|
25
|
-
let i = r(e.properties.src);
|
|
26
|
-
if (!i) return null;
|
|
27
|
-
let a = {
|
|
28
|
-
src: i,
|
|
29
|
-
alt: typeof e.properties.alt == "string" ? e.properties.alt : "",
|
|
30
|
-
title: typeof e.properties.title == "string" ? e.properties.title : void 0,
|
|
31
|
-
width: p(e.properties.width),
|
|
32
|
-
height: p(e.properties.height)
|
|
33
|
-
};
|
|
34
|
-
return /* @__PURE__ */ d(s, { children: n(a) }, t);
|
|
35
|
-
}
|
|
36
|
-
let i = m(e, t);
|
|
37
|
-
return f.has(e.tagName) ? c(e.tagName, i) : c(e.tagName, i, ...e.children.map((e, t) => h(e, t, n)));
|
|
38
|
-
}
|
|
39
|
-
function g(e, t) {
|
|
40
|
-
return e.children.map((e, n) => h(e, n, t));
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/components/typography/rich-text/rich-text.tsx
|
|
44
|
-
var _ = l(function({ html: r, type: s = "main", size: c, align: l = "left", lineHeight: f = "normal", weight: p = "regular", className: m, numeric: h = !1, tag: _ = "p", images: v = !1, ...y }, b) {
|
|
45
|
-
let { defaultTextSize: x } = e(), S = c ?? x ?? "sm", C = !!v, w = typeof v == "object" ? v.renderImage : void 0, T = u(() => a(r ?? "", { images: C }), [C, r]), E = u(() => w && T ? g(i(r ?? "", { images: !0 }), w) : null, [
|
|
46
|
-
r,
|
|
47
|
-
w,
|
|
48
|
-
T
|
|
49
|
-
]);
|
|
50
|
-
if (!T) return null;
|
|
51
|
-
let D = t(o, n({
|
|
52
|
-
type: s,
|
|
53
|
-
size: S,
|
|
54
|
-
align: l,
|
|
55
|
-
lineHeight: f,
|
|
56
|
-
weight: p,
|
|
57
|
-
numeric: h,
|
|
58
|
-
className: m
|
|
59
|
-
}));
|
|
60
|
-
return E ? /* @__PURE__ */ d(_, {
|
|
61
|
-
ref: b,
|
|
62
|
-
className: D,
|
|
63
|
-
"data-typography": "rich-text",
|
|
64
|
-
...y,
|
|
65
|
-
children: E
|
|
66
|
-
}) : /* @__PURE__ */ d(_, {
|
|
67
|
-
ref: b,
|
|
68
|
-
className: D,
|
|
69
|
-
"data-typography": "rich-text",
|
|
70
|
-
dangerouslySetInnerHTML: { __html: T },
|
|
71
|
-
...y
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
_.displayName = "RichText";
|
|
75
|
-
//#endregion
|
|
76
|
-
export { _ as t };
|
|
77
|
-
|
|
78
|
-
//# sourceMappingURL=rich-text-Dth5E882.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-Dth5E882.js","names":["useTypographyConfig","resolveTextClassNames","safeImageSrc","sanitizeHtmlTree","sanitizeHtml","contentTypographyClassName","VOID_ELEMENTS","toNumber","number","value","toReactProps","props","name","element","letter","renderNode","node","src","image","Fragment","renderImage","key","createElement","child","index","renderRichTextTree","tree","RichText","forwardRef","sizeProp","Tag","size","defaultTextSize","allowImages","images","sanitizedHtml","useMemo","html","classNames","cn"],"sources":["../src/components/typography/rich-text/rich-text-tree.tsx","../src/components/typography/rich-text/rich-text.tsx"],"sourcesContent":["import { createElement, Fragment, type ReactNode } from 'react';\nimport type { Element, Root, RootContent } from 'hast';\n\nimport { safeImageSrc } from '../../../lib/safe-image-src';\n\n/** An image in sanitized rich text, as handed to `renderImage`. */\nexport interface RichTextImageAttributes {\n\t/** Source that passed the package image policy (http, https, blob or relative). */\n\tsrc: string;\n\t/** Text alternative; empty for a decorative image. */\n\talt: string;\n\ttitle?: string;\n\twidth?: number;\n\theight?: number;\n}\n\nexport type RenderRichTextImage = (image: RichTextImageAttributes) => ReactNode;\n\nconst VOID_ELEMENTS = new Set(['br', 'img']);\n\nfunction toNumber(value: unknown): number | undefined {\n\tconst number = typeof value === 'number' ? value : Number(value);\n\treturn Number.isFinite(number) && number > 0 ? number : undefined;\n}\n\n/** hast properties are camelCase (`dataRefId`); the DOM attribute is `data-ref-id`. */\nfunction toReactProps(element: Element, key: number) {\n\tconst props: Record<string, unknown> = { key };\n\tfor (const [name, value] of Object.entries(element.properties)) {\n\t\tif (value == null || value === false) continue;\n\t\tif (name === 'className') props.className = Array.isArray(value) ? value.join(' ') : String(value);\n\t\telse if (/^data[A-Z]/.test(name)) props[name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)] = String(value);\n\t\telse props[name] = Array.isArray(value) ? value.join(' ') : value;\n\t}\n\treturn props;\n}\n\nfunction renderNode(node: RootContent, key: number, renderImage: RenderRichTextImage): ReactNode {\n\tif (node.type === 'text') return node.value;\n\tif (node.type !== 'element') return null;\n\tif (node.tagName === 'img') {\n\t\tconst src = safeImageSrc(node.properties.src);\n\t\tif (!src) return null;\n\t\tconst image: RichTextImageAttributes = {\n\t\t\tsrc,\n\t\t\talt: typeof node.properties.alt === 'string' ? node.properties.alt : '',\n\t\t\ttitle: typeof node.properties.title === 'string' ? node.properties.title : undefined,\n\t\t\twidth: toNumber(node.properties.width),\n\t\t\theight: toNumber(node.properties.height),\n\t\t};\n\t\treturn <Fragment key={key}>{renderImage(image)}</Fragment>;\n\t}\n\tconst props = toReactProps(node, key);\n\tif (VOID_ELEMENTS.has(node.tagName)) return createElement(node.tagName, props);\n\treturn createElement(node.tagName, props, ...node.children.map((child, index) => renderNode(child, index, renderImage)));\n}\n\n/**\n * Renders an already sanitized tree as React elements, so each image can be\n * the consumer's own component (a framework image, a lightbox trigger) while\n * the surrounding markup keeps its structure. Server and client output match.\n */\nexport function renderRichTextTree(tree: Root, renderImage: RenderRichTextImage): ReactNode {\n\treturn tree.children.map((child, index) => renderNode(child, index, renderImage));\n}\n","import { forwardRef, useMemo } from 'react';\n\nimport { sanitizeHtml, sanitizeHtmlTree } from '../../../lib/sanitize-html';\nimport { useTypographyConfig } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\nimport { contentTypographyClassName } from '../content-typography';\n\nimport type { TextProps } from '../text';\nimport { resolveTextClassNames } from '../text.styles';\nimport { renderRichTextTree, type RenderRichTextImage } from './rich-text-tree';\n\nexport type { RenderRichTextImage, RichTextImageAttributes } from './rich-text-tree';\n\n/** Image rendering for read-only rich text. */\nexport interface RichTextImageRendering {\n\t/**\n\t * Renders each image, for example with a framework image component. It\n\t * receives only sources that passed the package image policy.\n\t */\n\trenderImage?: RenderRichTextImage;\n}\n\nexport interface RichTextProps\n\textends Omit<\n\t\tTextProps,\n\t\t'children' | 'content' | 'dangerouslySetInnerHTML'\n\t> {\n\t/** HTML sanitized through the package allowlist before rendering. */\n\thtml?: string | null;\n\t/**\n\t * Keeps images whose source is a web URL, a `blob:` preview or a relative\n\t * path (script and `data:` sources are removed). Pass `renderImage` to draw\n\t * each image with your own component. Default: images are removed.\n\t */\n\timages?: boolean | RichTextImageRendering;\n}\n\nexport const RichText = forwardRef<HTMLElement, RichTextProps>(\n\tfunction RichText(\n\t\t{\n\t\t\thtml,\n\t\t\ttype = 'main',\n\t\t\tsize: sizeProp,\n\t\t\talign = 'left',\n\t\t\tlineHeight = 'normal',\n\t\t\tweight = 'regular',\n\t\t\tclassName,\n\t\t\tnumeric = false,\n\t\t\ttag: Tag = 'p',\n\t\t\timages = false,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\n\t\tconst { defaultTextSize } = useTypographyConfig();\n\t\tconst size = sizeProp ?? defaultTextSize ?? 'sm';\n\t\tconst allowImages = Boolean(images);\n\t\tconst renderImage = typeof images === 'object' ? images.renderImage : undefined;\n\t\tconst sanitizedHtml = useMemo(() => sanitizeHtml(html ?? '', { images: allowImages }), [allowImages, html]);\n\t\t// Consumer image components need React elements; plain images keep the HTML path.\n\t\tconst tree = useMemo(\n\t\t\t() => (renderImage && sanitizedHtml ? renderRichTextTree(sanitizeHtmlTree(html ?? '', { images: true }), renderImage) : null),\n\t\t\t[html, renderImage, sanitizedHtml],\n\t\t);\n\n\t\tif (!sanitizedHtml) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst classNames = cn(contentTypographyClassName, resolveTextClassNames({\n\t\t\ttype,\n\t\t\tsize,\n\t\t\talign,\n\t\t\tlineHeight,\n\t\t\tweight,\n\t\t\tnumeric,\n\t\t\tclassName,\n\t\t}));\n\n\t\tif (tree) {\n\t\t\treturn (\n\t\t\t\t<Tag ref={ref as never} className={classNames} data-typography=\"rich-text\" {...props}>\n\t\t\t\t\t{tree}\n\t\t\t\t</Tag>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Tag\n\t\t\t\tref={ref as never}\n\t\t\t\tclassName={classNames}\n\t\t\t\tdata-typography=\"rich-text\"\n\t\t\t\tdangerouslySetInnerHTML={{ __html: sanitizedHtml }}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nRichText.displayName = 'RichText';\n"],"mappings":";;;;;;;;;;AAkBA,IAAMM,oBAAgB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;AAE3C,SAASC,EAAS,GAAoC;CACrD,IAAMC,IAAS,OAAOC,KAAU,WAAWA,IAAQ,OAAOA,CAAK;CAC/D,OAAO,OAAO,SAASD,CAAM,KAAKA,IAAS,IAAIA,IAAS,KAAA;AACzD;AAGA,SAASE,EAAa,GAAkB,GAAa;CACpD,IAAMC,IAAiC,EAAE,OAAI;CAC7C,KAAK,IAAM,CAACC,GAAMH,MAAU,OAAO,QAAQI,E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