themelia-react-ui 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +185 -0
- package/README.md +168 -36
- package/dist/{accordion-Cjb6sx0G.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/action-menu-Dr8K-ghE.js +284 -0
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-P-aVJisu.js} +42 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-C58tQcBy.js} +387 -350
- package/dist/ai-artifact-C58tQcBy.js.map +1 -0
- package/dist/app-shell-B_IuNWOo.js +321 -0
- package/dist/app-shell-B_IuNWOo.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-BxDfL2mw.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-DTkkshS8.js} +44 -47
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DAPlDvhJ.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-HpFqoqSY.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-HpFqoqSY.js.map → badge-xIiV_E7f.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +12 -12
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +7 -7
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +36 -36
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +23 -23
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +230 -216
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +326 -307
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1247 -1169
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-DPZekJFu.js → buttons-BedGfygC.js} +16 -16
- package/dist/buttons-BedGfygC.js.map +1 -0
- package/dist/cards-rNX1M4Xn.js +69 -0
- package/dist/cards-rNX1M4Xn.js.map +1 -0
- package/dist/cascader-B1MiqkBq.js +439 -0
- package/dist/cascader-B1MiqkBq.js.map +1 -0
- package/dist/chart-Darg_0Kv.js +162 -0
- package/dist/chart-Darg_0Kv.js.map +1 -0
- package/dist/{checkbox-AWIhNhmo.js → checkbox-fflqmODR.js} +9 -5
- package/dist/checkbox-fflqmODR.js.map +1 -0
- package/dist/choice-inputs-zUgBZfE4.js +777 -0
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-BzmM9Eig.js} +9 -9
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-C-_l4hpy.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-gDh1v6O4.js.map} +1 -1
- package/dist/combobox-BEx0vJgF.js +362 -0
- package/dist/combobox-BEx0vJgF.js.map +1 -0
- package/dist/{combobox-Dxo2fAYQ.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-C25VMRII.js → command-CrlPIL6m.js} +12 -12
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-DD0DUPwJ.js → comments-Dmpp0YIc.js} +380 -379
- package/dist/comments-Dmpp0YIc.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +9 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +16 -7
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +11 -7
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +11 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +13 -4
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +27 -5
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +3 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/features/activities/activities.types.d.ts +8 -2
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -0
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +1 -1
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +21 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
- package/dist/components/features/media-library/media-library.types.d.ts +14 -4
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +43 -6
- package/dist/components/features/resource/resource.d.ts +5 -1
- package/dist/components/features/resource/resource.types.d.ts +12 -1
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +6 -6
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +9 -2
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +36 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +5 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +48 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CIxwbZt5.js +112 -0
- package/dist/containers-CIxwbZt5.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-ClBuk_UK.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-BdgCAw8T.js} +277 -285
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-RlIzKom_.js} +501 -480
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/date-pickers-DY-CpXS1.js +179 -0
- package/dist/date-pickers-DY-CpXS1.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-hAc1HjpI.js.map → display-KsZLw9Ov.js.map} +1 -1
- package/dist/dropdown-menu-CLs8Lihj.js +194 -0
- package/dist/dropdown-menu-CLs8Lihj.js.map +1 -0
- package/dist/features/activities.js +302 -253
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +15 -14
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +249 -249
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +264 -269
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +167 -138
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +6 -7
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +269 -260
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +827 -777
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1246 -1169
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +13 -13
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +127 -123
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +95 -96
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-Dm4izqFn.js} +81 -80
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-DJVAveHA.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CwH9y77i.js → form-field-BriWAXyg.js} +14 -8
- package/dist/form-field-BriWAXyg.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/forms-C0RGnJTe.js +216 -0
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-DIhghX1Q.js} +295 -291
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-DMMxG__r.js} +67 -63
- package/dist/header-DMMxG__r.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/input-CvyDQlY7.js +289 -0
- package/dist/input-CvyDQlY7.js.map +1 -0
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/item-DjCcM18E.js +277 -0
- package/dist/item-DjCcM18E.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +11 -11
- package/dist/lib/affordance-geometry.generated.d.ts +41 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/token-merge.generated.d.ts +13 -10
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-CGlEJ15c.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/metadata-list-C3MkU-Om.js +443 -0
- package/dist/metadata-list-C3MkU-Om.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-C90-oQFq.js +255 -0
- package/dist/navigation-C90-oQFq.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-DbV1Dija.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-CRU3kGuk.js.map} +1 -1
- package/dist/overflow-tab-bar-IVFVQFV6.js +172 -0
- package/dist/overflow-tab-bar-IVFVQFV6.js.map +1 -0
- package/dist/overlays-BSgCtM2v.js +1013 -0
- package/dist/overlays-BSgCtM2v.js.map +1 -0
- package/dist/page-DUUKDAjo.js +331 -0
- package/dist/page-DUUKDAjo.js.map +1 -0
- package/dist/page-header-commands-7P3sfE9u.js +193 -0
- package/dist/page-header-commands-7P3sfE9u.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-BL25hu2s.js.map → pagination-CgCjElfu.js.map} +1 -1
- package/dist/popover-B85RenIl.js +201 -0
- package/dist/popover-B85RenIl.js.map +1 -0
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-DlnQ2zlR.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DdiEp0rd.js} +18 -11
- package/dist/popover.recipes-DdiEp0rd.js.map +1 -0
- package/dist/portal-recipes-BpsV_iRw.js +9 -0
- package/dist/portal-recipes-BpsV_iRw.js.map +1 -0
- package/dist/{primitives-BFK08r9M.js → primitives-ByWgGUgt.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-B1VnCT0K.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-Dth5E882.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-laT3tpBT.js} +33 -29
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-Bar5wiSo.js +167 -0
- package/dist/settings-Bar5wiSo.js.map +1 -0
- package/dist/sheet-BGPERY55.js +250 -0
- package/dist/sheet-BGPERY55.js.map +1 -0
- package/dist/sidebar-D-JYMMbY.js +686 -0
- package/dist/sidebar-D-JYMMbY.js.map +1 -0
- package/dist/sidebar-f9gRWXIR.js +1001 -0
- package/dist/sidebar-f9gRWXIR.js.map +1 -0
- package/dist/skeleton-BapcJd9C.js +265 -0
- package/dist/skeleton-BapcJd9C.js.map +1 -0
- package/dist/smart-card-CW0hjetE.js +617 -0
- package/dist/smart-card-CW0hjetE.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-DuxKl954.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-CDocW5D1.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-B1culiSK.js} +107 -104
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +192 -149
- package/dist/{timelines-CwM_9IhD.js → timelines-D3Sl9ueq.js} +13 -12
- package/dist/timelines-D3Sl9ueq.js.map +1 -0
- package/dist/tooltip-8wz5S_Zr.js +113 -0
- package/dist/tooltip-8wz5S_Zr.js.map +1 -0
- package/dist/{tree-WnKQzwbq.js → tree-CzUJHnFs.js} +9 -9
- package/dist/{tree-WnKQzwbq.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-BQnine1k.js +117 -0
- package/dist/typography-BQnine1k.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-CXyxmQBP.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-Boscubn9.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-BhO5eqkX.js → usage-card-BeSLY0i0.js} +145 -137
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-B6kKb8jB.js} +303 -144
- package/dist/utils-B6kKb8jB.js.map +1 -0
- package/dist/value-inputs-skdVB2zh.js +980 -0
- package/dist/value-inputs-skdVB2zh.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/workspace-DHeHv0qw.js +411 -0
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +15 -129
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +74 -13
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +88 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +105 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +23 -11
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +325201 -0
- package/docs/consumer-skill/references/composition-mapping.md +106 -0
- package/docs/consumer-skill/references/composition.md +198 -46
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +43 -9
- package/docs/consumer-skill/references/discovery.md +109 -8
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +51 -36
- package/docs/consumer-skill/references/integration.md +41 -2
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +4390 -475
- package/docs/consumer-skill/references/review.md +47 -5
- package/docs/consumer-skill/references/rhf-workflows.md +93 -0
- package/docs/consumer-skill/references/screen-archetypes.md +34 -0
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +25 -27
- package/docs/consumer-skill/references/tokens.json +20 -11
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +9 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +254 -0
- package/docs/consumer-skill/scripts/discovery.mjs +96 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +193 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +111 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +31 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +34 -0
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +15 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +42 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/accordion-Cjb6sx0G.js.map +0 -1
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js +0 -236
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/auth-BGua8ouh.js.map +0 -1
- package/dist/avatar-DAPlDvhJ.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-DnUJ21NQ.js.map +0 -1
- package/dist/button-DVzspB_G.js.map +0 -1
- package/dist/buttons-DPZekJFu.js.map +0 -1
- package/dist/cards-BaBZR-AU.js +0 -68
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/chart-ZOYyK2xG.js +0 -155
- package/dist/chart-ZOYyK2xG.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js +0 -770
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/code-block-DeneBJR_.js.map +0 -1
- package/dist/combobox-DaHESuiL.js +0 -355
- package/dist/combobox-DaHESuiL.js.map +0 -1
- package/dist/combobox-Dxo2fAYQ.js.map +0 -1
- package/dist/command-C25VMRII.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/dropdown-menu-Cl4X7L5S.js +0 -193
- package/dist/dropdown-menu-Cl4X7L5S.js.map +0 -1
- package/dist/feedback-BYIhtitP.js.map +0 -1
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +0 -1
- package/dist/filters-DJVAveHA.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/form-sizing-BdP_Mf5p.js.map +0 -1
- package/dist/forms-B9G_xwzi.js +0 -194
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/header-BSfIEWbI.js.map +0 -1
- package/dist/hooks-ClH9thn4.js.map +0 -1
- package/dist/input-CZw8iU99.js +0 -21
- package/dist/input-CZw8iU99.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/message-DZ_ruyUV.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-Bnotn4AQ.js +0 -145
- package/dist/navigation-Bnotn4AQ.js.map +0 -1
- package/dist/navigation-BzhHI3lo.js.map +0 -1
- package/dist/navigation-row-recipes-BFLCk_Aq.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js +0 -282
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js +0 -1003
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/popover-gnTOhbFM.js +0 -198
- package/dist/popover-gnTOhbFM.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-BVSOH3Xo.js.map +0 -1
- package/dist/rich-text-editor-cRLC-eBK.js.map +0 -1
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/sheet-ijlsjq-n.js +0 -213
- package/dist/sheet-ijlsjq-n.js.map +0 -1
- package/dist/sidebar-Db6gkh3U.js +0 -619
- package/dist/sidebar-Db6gkh3U.js.map +0 -1
- package/dist/sidebar-DkTO4VTO.js +0 -512
- package/dist/sidebar-DkTO4VTO.js.map +0 -1
- package/dist/skeleton-Byjnt7qr.js +0 -264
- package/dist/skeleton-Byjnt7qr.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/table-BweFy_P9.js.map +0 -1
- package/dist/tabs-CDocW5D1.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-CwM_9IhD.js.map +0 -1
- package/dist/tooltip-yiRJUFjp.js +0 -111
- package/dist/tooltip-yiRJUFjp.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js +0 -136
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/upload-CXyxmQBP.js.map +0 -1
- package/dist/upload-queue-Boscubn9.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-inputs-f9Ia-aCi.js","names":["Textarea","React","InputGroup","InputGroupAddon","InputGroupText","InputGroupInput","Input","InputGroupTextarea","InputGroupPrimitive","InputGroupAddonPrimitive","InputGroupTextPrimitive","InputGroupInputPrimitive","InputGroupTextareaPrimitive","React","React","useDensityConfig","cn","affordanceGeometry","Button","Text","fieldStateRecipes","fieldAffordanceRecipes","editableTextSizeClasses","formTextareaInsetClasses","formControlHeightClasses","formTextareaAffordanceTopClasses","formControlHorizontalPaddingClasses","formControlPaddingClasses","formTextareaSizeClasses","resolveFormControlSize","clearNativeField","InputTrailingActionContext","useFormFieldState","FieldClearButton","Input","Input$1","React$1","defaultTextareaStrings","Textarea$1","sizeProp","controlledValue","providedId","stringsProp","props","textareaRef","useRef","strings","useStrings","size","defaultScale","textareaValue","onChange","hasError","invalid","adjustHeight","useCallback","autoResize","textarea","css","lineHeight","padding","border","minHeight","minRows","maxHeight","maxRows","newHeight","useEffect","previous","observer","signature","handleTextareaChange","newValue","wouldExceedLimit","updateValue","handleClear","loading","onClear","showClearButton","clearable","hasValue","showCount","forwardedRef","node","isReactHookForm","className","characterCount","hasCharacterLimit","maxLength","Loader2Icon","Textarea","InputGroup$1","inputGroupAddonVariants","cva","InputGroupAddon$1","align","InputGroupText$1","InputGroupInput$1","InputGroupTextarea$1","useInputGroupScale","InputGroup","addonAlignmentClasses","addonInlinePaddingClasses","addonIconClasses","InputGroupAddon","alignment","InputGroupButton","iconOnly","isScalarContent","content","InputGroupText","children","InputGroupInput","InputGroupTextarea","defaultPasswordInputStrings","PasswordInput","internalVisible","setInternalVisible","defaultVisible","isControlled","visible","isVisible","disabledState","disabled","toggleVisibility","nextVisible","onVisibleChange","visibilityAction","revealable","visibilityButtonClassName","event","jsx","EyeOff","Eye","wrapperClassName","inputStrings","slugifyValue","safeSeparator","separator","escapedSeparator","normalized","value","lowercase","trim","SlugField","slug","slugify"],"sources":["../src/components/base/text-inputs/textarea.tsx","../src/components/ui/textarea.tsx","../src/components/ui/input-group.tsx","../src/components/base/text-inputs/input-group.tsx","../src/components/base/text-inputs/password-input.tsx","../src/components/base/text-inputs/slug-field.tsx"],"sourcesContent":["import { fieldStateRecipes } from '../../../lib/field-state-recipes';\nimport { affordanceGeometry } from '../../../lib/affordance-geometry.generated';\nimport { fieldAffordanceRecipes } from '../../../lib/field-affordance-recipes';\nimport { editableTextSizeClasses } from '../../../lib/editable-text-recipe';\nimport { Loader2Icon } from 'lucide-react';\nimport * as React from 'react';\nimport { useRef, useCallback, useEffect } from 'react';\nimport { Text } from '../../typography';\nimport { useDensityConfig, type FormControlSize } from '../../../lib/ui-provider';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { formTextareaAffordanceTopClasses, formTextareaInsetClasses, formTextareaSizeClasses, resolveFormControlSize } from '../forms/form-sizing';\nimport { useFormFieldState } from './hooks';\nimport { clearNativeField } from './clear-native-field';\nimport { FieldClearButton } from './field-clear-button';\n\nexport interface TextareaStrings {\n\t\tclear: string;\n}\n\nexport const defaultTextareaStrings: TextareaStrings = {\n\t\tclear: 'Clear textarea',\n};\n\nexport interface TextareaProps extends Omit<React.ComponentProps<'textarea'>, 'onChange'> {\n\t\t// String overrides (e.g. clear button aria-label)\n\t\t/** Overrides the character-count and clear copy. */\n\t\tstrings?: StringsProp<TextareaStrings>;\n\t\t// Character limit\n\t\t/** Character cap, also used as the denominator of the count. */\n\t\tmaxLength?: number;\n\t\t/** Shows the current and maximum character count. */\n\t\tshowCharacterCount?: boolean;\n\n\t\t// Clear button\n\t\t/** Shows an inline clear action when the field has a value. */\n\t\tclearable?: boolean;\n\t\tonClear?: () => void;\n\n\t\t// Loading state\n\t\t/** Replaces the trailing affordance with a loading indicator. */\n\t\tloading?: boolean;\n\n\t\t// Error state for styling (passed from FormField)\n\t\t/** Applies the invalid styling. Validation copy stays with FormField. */\n\t\tinvalid?: boolean;\n\n\t\t// Visual size\n\t\t/** Control density. Falls back to `UIProvider.density.defaultScale`. */\n\t\tsize?: FormControlSize;\n\n\t\t// Auto-resize functionality\n\t\t/** Grows the field with its content, between `minRows` and `maxRows`. */\n\t\tautoResize?: boolean;\n\t\t/** Smallest height, in rows, when `autoResize` is set. */\n\t\tminRows?: number;\n\t\t/** Height at which the field stops growing and starts scrolling. */\n\t\tmaxRows?: number;\n\n\t\t// Value props\n\t\tonChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n\t\t/** Current text. Controlled. */\n\t\tvalue?: string;\n\t\t/** Initial text for uncontrolled use. */\n\t\tdefaultValue?: string;\n}\n\nconst TextareaImpl = (\n\t\t{\n\t\t\t\tclassName,\n\t\t\t\tmaxLength,\n\t\t\t\tshowCharacterCount,\n\t\t\t\tclearable,\n\t\t\t\tonClear,\n\t\t\t\tloading = false,\n\t\t\t\tinvalid,\n\t\t\t\tsize: sizeProp,\n\t\t\t\tautoResize = false,\n\t\t\t\tminRows = 2,\n\t\t\t\tmaxRows,\n\t\t\t\tonChange,\n\t\t\t\tvalue: controlledValue,\n\t\t\t\tdefaultValue,\n\t\t\t\tid: providedId,\n\t\t\t\tstrings: stringsProp,\n\t\t\t\t...props\n\t\t}: TextareaProps,\n\t\tforwardedRef: React.ForwardedRef<HTMLTextAreaElement>,\n) => {\n\t\tconst textareaRef = useRef<HTMLTextAreaElement>(null);\n\t\tconst strings = useStrings(defaultTextareaStrings, stringsProp);\n\t\tconst { defaultScale } = useDensityConfig();\n\t\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\n\t\t// Use shared form field state hook\n\t\tconst {\n\t\t\t\tid,\n\t\t\t\tvalue: textareaValue,\n\t\t\t\tisReactHookForm,\n\t\t\t\tcharacterCount,\n\t\t\t\thasCharacterLimit,\n\t\t\t\tshowCount,\n\t\t\t\thasValue,\n\t\t\t\tupdateValue,\n\t\t\t\twouldExceedLimit,\n\t\t} = useFormFieldState({\n\t\t\t\tcontrolledValue,\n\t\t\t\tdefaultValue,\n\t\t\t\tmaxLength,\n\t\t\t\tshowCharacterCount,\n\t\t\t\tprovidedId,\n\t\t\t\tidPrefix: 'textarea',\n\t\t\t\thasOnChange: onChange !== undefined,\n\t\t});\n\n\t\t// Derive display states\n\t\tconst hasError = Boolean(invalid);\n\n\t\tconst adjustHeight = useCallback(() => {\n\t\t\t\tif (!autoResize || !textareaRef.current) return;\n\n\t\t\t\tconst textarea = textareaRef.current;\n\n\t\t\t\tconst css = getComputedStyle(textarea);\n\t\t\t\tconst lineHeight = Number.parseFloat(css.lineHeight) || 20;\n\t\t\t\tconst padding = (Number.parseFloat(css.paddingTop) || 0) + (Number.parseFloat(css.paddingBottom) || 0);\n\t\t\t\tconst border = css.boxSizing === 'border-box' ? (Number.parseFloat(css.borderTopWidth) || 0) + (Number.parseFloat(css.borderBottomWidth) || 0) : 0;\n\t\t\t\ttextarea.style.height = 'auto';\n\t\t\t\tconst minHeight = lineHeight * minRows + padding + border;\n\t\t\t\tconst maxHeight = maxRows ? lineHeight * maxRows + padding + border : Infinity;\n\n\t\t\t\tconst newHeight = Math.min(Math.max(textarea.scrollHeight + border, minHeight), maxHeight);\n\t\t\t\ttextarea.style.height = `${newHeight}px`;\n\t\t}, [autoResize, maxRows, minRows]);\n\n\t\tuseEffect(() => {\n\t\t\t\tadjustHeight();\n\t\t}, [textareaValue, props.placeholder, autoResize, adjustHeight]);\n\n\t\tuseEffect(() => {\n\t\t\t\tconst textarea = textareaRef.current;\n\t\t\t\tif (!autoResize || !textarea || typeof ResizeObserver === 'undefined') return;\n\t\t\t\tlet previous = '';\n\t\t\t\tconst observer = new ResizeObserver(() => {\n\t\t\t\t\t\tconst css = getComputedStyle(textarea);\n\t\t\t\t\t\tconst signature = `${textarea.clientWidth}:${css.fontSize}:${css.lineHeight}`;\n\t\t\t\t\t\tif (signature === previous) return;\n\t\t\t\t\t\tprevious = signature;\n\t\t\t\t\t\tadjustHeight();\n\t\t\t\t});\n\t\t\t\tobserver.observe(textarea);\n\t\t\t\treturn () => observer.disconnect();\n\t\t}, [autoResize, adjustHeight]);\n\n\t\tconst handleTextareaChange = useCallback(\n\t\t\t\t(e: React.ChangeEvent<HTMLTextAreaElement>) => {\n\t\t\t\t\t\tconst newValue = e.target.value;\n\n\t\t\t\t\t\t// Check character limit\n\t\t\t\t\t\tif (wouldExceedLimit(newValue)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Update internal state if uncontrolled\n\t\t\t\t\t\tupdateValue(newValue);\n\n\t\t\t\t\t\t// Call external onChange\n\t\t\t\t\t\tonChange?.(e);\n\n\t\t\t\t\t\t// Auto-resize if enabled\n\t\t\t\t\t\tif (autoResize) {\n\t\t\t\t\t\t\t\tsetTimeout(adjustHeight, 0);\n\t\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t[onChange, updateValue, wouldExceedLimit, autoResize, adjustHeight]\n\t\t);\n\n\t\tconst handleClear = useCallback(() => {\n\t\t\t\tif (props.disabled || props.readOnly || loading) return;\n\n\t\t\t\tif (textareaRef.current) clearNativeField(textareaRef.current);\n\n\t\t\t\t// Execute optional onClear callback\n\t\t\t\tonClear?.();\n\n\t\t\t\t// Focus the textarea after clearing\n\t\t\t\ttextareaRef.current?.focus();\n\n\t\t}, [props.disabled, props.readOnly, loading, onClear]);\n\n\t\t// Determine what to show in the end position\n\t\tconst showClearButton = clearable && hasValue && !loading && !showCount;\n\n\t\treturn (\n\t\t\t\t<div className={cn('textarea--component', 'relative w-full')}>\n\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\t\t\t\t\tif (typeof forwardedRef === 'function') {\n\t\t\t\t\t\t\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\t\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ttextareaRef.current = node;\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t{...(!isReactHookForm && { value: textareaValue })}\n\t\t\t\t\t\t\t\tonChange={handleTextareaChange}\n\t\t\t\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\t\t\t\taria-invalid={hasError || undefined}\n\t\t\t\t\t\t\t\trows={minRows}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tresize: autoResize ? 'none' : props.style?.resize,\n\t\t\t\t\t\t\t\t\t\toverflow: autoResize && maxRows ? 'auto' : 'visible',\n\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t// Base styles\n\t\t\t\t\t\t\t\t\t\t'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n\t\t\t\t\t\t\t\t\t\t'border-input box-border flex w-full rounded-inner border bg-transparent px-control',\n\t\t\t\t\t\t\t\t\t\t// First line where a single-line control of this size draws its value.\n\t\t\t\t\t\t\t\t\t\tformTextareaInsetClasses[size],\n\t\t\t\t\t\t\t\t\t\t'transition-[color,box-shadow] outline-none',\n\t\t\t\t\t\t\t\t\t\t'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n\t\t\t\t\t\t\t\t\t\t// Same read-only fill as Input; disabled stays on the transparent fill.\n\t\t\t\t\t\t\t\t\t\t'[&:read-only:not(:disabled)]:bg-muted',\n\t\t\t\t\t\t\t\t\t\tformTextareaSizeClasses[size],\n\t\t\t\t\t\t\t\t\t\teditableTextSizeClasses[size],\n\t\t\t\t\t\t\t\t\t\t// Focus styles\n\t\t\t\t\t\t\t\t\t\tfieldStateRecipes.focus,\n\t\t\t\t\t\t\t\t\t\t// Invalid/error styles\n\t\t\t\t\t\t\t\t\t\tfieldStateRecipes.invalid,\n\t\t\t\t\t\t\t\t\t\t// Dynamic padding for overlays\n\t\t\t\t\t\t\t\t\t\tshowClearButton && fieldAffordanceRecipes.clearPadding[size],\n\t\t\t\t\t\t\t\t\t\tshowCount && fieldAffordanceRecipes.textareaCountPadding,\n\t\t\t\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\tdisabled={props.disabled || loading}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{/* Character Count */}\n\t\t\t\t\t\t{!!showCount && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t'pointer-events-none absolute bottom-control-y-offset text-xs tabular-nums',\n\t\t\t\t\t\t\t\t\t\t\t\taffordanceGeometry.clearEnd.md,\n\t\t\t\t\t\t\t\t\t\t\t\tprops.disabled && 'opacity-50',\n\t\t\t\t\t\t\t\t\t\t\t\thasError ? 'text-destructive' : 'text-muted-foreground'\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\t\t\t\t\trole=\"status\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type={hasError ? 'error' : 'secondary'}>\n\t\t\t\t\t\t\t\t\t\t\t\t{characterCount}\n\t\t\t\t\t\t\t\t\t\t\t\t{hasCharacterLimit ? `/${maxLength}` : ''}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/* Loading Spinner */}\n\t\t\t\t\t\t{!!loading && !showCount && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t'pointer-events-none absolute end-[calc(var(--control-x)*var(--space-scale))]',\n\t\t\t\t\t\t\t\t\t\t\t\tformTextareaAffordanceTopClasses.icon[size],\n\t\t\t\t\t\t\t\t\t\t\t\thasError ? 'text-destructive' : 'text-muted-foreground'\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Loader2Icon className=\"size-icon animate-spin\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/* Clear Button */}\n\t\t\t\t\t\t{!!showClearButton && !showCount && (\n\t\t\t\t\t\t\t\t<FieldClearButton\n\t\t\t\t\t\t\t\t\t\tclassName={cn('absolute', formTextareaAffordanceTopClasses.target[size], fieldAffordanceRecipes.clearEnd[size])}\n\t\t\t\t\t\t\t\t\t\taria-label={strings.clear}\n\t\t\t\t\t\t\t\t\t\tonClick={handleClear}\n\t\t\t\t\t\t\t\t\t\tdisabled={props.disabled || props.readOnly || loading}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t);\n};\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(TextareaImpl);\nTextarea.displayName = 'Textarea';\n\nexport { Textarea };\n","import { fieldStateRecipes } from '../../lib/field-state-recipes';\nimport { editableTextSizeClasses } from '../../lib/editable-text-recipe';\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"border-input rounded-inner border bg-transparent px-control py-space-md shadow-none transition-[color,box-shadow] placeholder:text-muted-foreground flex field-sizing-content min-h-textarea w-full outline-none disabled:cursor-not-allowed disabled:opacity-50 [&:read-only:not(:disabled)]:bg-muted\",\n editableTextSizeClasses.md,\n fieldStateRecipes.focus,\n fieldStateRecipes.invalid,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n","import { fieldStateRecipes } from '../../lib/field-state-recipes';\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\n\nimport { Button } from \"./button\"\nimport { Input } from \"./input\"\nimport { Textarea } from \"./textarea\"\nimport { cn } from \"../../lib/utils\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"border-input h-control rounded-inner border shadow-none transition-[color,box-shadow] has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-space-lg has-[>[data-align=block-start]]:[&>input]:pb-space-lg has-[>[data-align=inline-end]]:[&>input]:pe-space-sm has-[>[data-align=inline-start]]:[&>input]:ps-space-sm [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto\",\n fieldStateRecipes.groupFocus,\n fieldStateRecipes.groupInvalid,\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"text-muted-foreground h-auto gap-space-md py-space-sm text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-inner [&>svg:not([class*='size-'])]:size-icon flex cursor-text items-center justify-center select-none\",\n {\n variants: {\n align: {\n \"inline-start\": \"ps-control has-[>button]:-ms-space-xs has-[>kbd]:-ms-space-2xs order-first\",\n \"inline-end\": \"pe-control has-[>button]:-me-space-xs has-[>kbd]:-me-space-2xs order-last\",\n \"block-start\":\n \"px-control pt-space-md group-has-[>input]/input-group:pt-space-md [.border-b]:pb-space-md order-first w-full justify-start\",\n \"block-end\":\n \"px-control pb-space-md group-has-[>input]/input-group:pb-space-md [.border-t]:pt-space-md order-last w-full justify-start\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"gap-space-md text-sm shadow-none flex items-center\",\n {\n variants: {\n size: {\n xs: \"h-action-xs gap-space-xs rounded-inner px-control-xs [&>svg:not([class*='size-'])]:size-icon-sm\",\n sm: \"\",\n \"icon-xs\": \"size-action-xs rounded-inner p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-action-sm p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\" | \"type\"> &\n VariantProps<typeof inputGroupButtonVariants> & {\n type?: \"button\" | \"submit\" | \"reset\"\n }) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"text-muted-foreground gap-space-md text-sm [&_svg:not([class*='size-'])]:size-icon flex items-center [&_svg]:pointer-events-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\"rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 flex-1\", className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\"rounded-none border-0 bg-transparent py-space-md shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 flex-1 resize-none\", className)}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n","/**\n * InputGroup — base wrapper around the shadcn `ui/input-group` primitive.\n *\n * What this layer adds on top of the primitive:\n * - Stable BEM hooks on every wrapped part's outermost node\n * (`input-group--component`, `input-group-addon--component`, and so on).\n * - Design-system typography for the scalar copy inside `InputGroupText`,\n * while arbitrary `ReactNode` content (icons, `kbd`, buttons) passes through\n * untouched so the compound pattern stays composable.\n * - Keeps the primitive's addon alignment and button-size variants, its\n * focus-within/aria-invalid ring behaviour, and every native prop by spread.\n *\n * Compose it as\n * `<InputGroup><InputGroupAddon><Icon/></InputGroupAddon><InputGroupInput/></InputGroup>`.\n *\n * Reach for it when one control needs inline affordances welded to its frame —\n * a search icon, a unit suffix, a busy indicator, an inline action. For the\n * label / control / hint / error row, use `FormField` instead; this wrapper\n * owns only the control frame.\n */\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport {\n\tInputGroup as InputGroupPrimitive,\n\tInputGroupAddon as InputGroupAddonPrimitive,\n\tInputGroupInput as InputGroupInputPrimitive,\n\tInputGroupText as InputGroupTextPrimitive,\n\tInputGroupTextarea as InputGroupTextareaPrimitive,\n} from '../../ui/input-group';\nimport { Button, type ButtonProps } from '../buttons';\nimport { Text } from '../../typography';\nimport { useDensityConfig, type ComponentScale } from '../../../lib/ui-provider';\nimport { editableTextSizeClasses } from '../../../lib/editable-text-recipe';\nimport { cn } from '../../../lib/utils';\nimport {\n\tformControlHeightClasses,\n\tformControlHorizontalPaddingClasses,\n\tformControlPaddingClasses,\n\tformTextareaSizeClasses,\n\tresolveFormControlSize,\n} from '../forms/form-sizing';\n\nexport type InputGroupProps = ComponentProps<typeof InputGroupPrimitive>;\nexport type InputGroupAddonProps = ComponentProps<typeof InputGroupAddonPrimitive>;\nexport interface InputGroupButtonProps extends Omit<ButtonProps, 'size'> {\n\t/** Component scale. Falls back to `UIProvider.density.defaultScale`. */\n\tsize?: ComponentScale;\n}\nexport type InputGroupInputProps = ComponentProps<typeof InputGroupInputPrimitive>;\nexport type InputGroupTextProps = ComponentProps<typeof InputGroupTextPrimitive>;\nexport type InputGroupTextareaProps = ComponentProps<typeof InputGroupTextareaPrimitive>;\n\nfunction useInputGroupScale() {\n\tconst { defaultScale } = useDensityConfig();\n\treturn resolveFormControlSize(undefined, defaultScale);\n}\n\n/** Control frame that welds inline addons onto a single input or textarea. */\nfunction InputGroup({ className, ...props }: InputGroupProps) {\n\tconst size = useInputGroupScale();\n\treturn (\n\t\t<InputGroupPrimitive\n\t\t\tclassName={cn(\n\t\t\t\t'input-group--component box-border rounded-inner font-sans text-foreground shadow-none',\n\t\t\t\tformControlHeightClasses[size],\n\t\t\t\teditableTextSizeClasses[size],\n\t\t\t\t'has-[>[data-align=block-end]]:[&>input]:pt-space-lg has-[>[data-align=block-start]]:[&>input]:pb-space-lg',\n\t\t\t\t'has-[>[data-align=inline-end]]:[&>input]:pe-space-sm has-[>[data-align=inline-start]]:[&>input]:ps-space-sm',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst addonAlignmentClasses = {\n\t'inline-start': 'h-full py-0',\n\t'inline-end': 'h-full py-0',\n\t'block-start': 'pt-space-md group-has-[>input]/input-group:pt-space-md [.border-b]:pb-space-md',\n\t'block-end': 'pb-space-md group-has-[>input]/input-group:pb-space-md [.border-t]:pt-space-md',\n} as const;\n\nconst addonInlinePaddingClasses = {\n\tsm: { 'inline-start': 'ps-control-sm', 'inline-end': 'pe-control-sm' },\n\tmd: { 'inline-start': 'ps-control', 'inline-end': 'pe-control' },\n\tlg: { 'inline-start': 'ps-control', 'inline-end': 'pe-control' },\n} as const;\n\nconst addonIconClasses = {\n\tsm: \"[&>svg:not([class*='size-'])]:size-icon-sm\",\n\tmd: \"[&>svg:not([class*='size-'])]:size-icon\",\n\tlg: \"[&>svg:not([class*='size-'])]:size-icon-lg\",\n} as const;\n\n/** Leading/trailing (or block start/end) affordance slot inside the frame. */\nfunction InputGroupAddon({ className, align = 'inline-start', ...props }: InputGroupAddonProps) {\n\tconst size = useInputGroupScale();\n\tconst alignment = align ?? 'inline-start';\n\treturn (\n\t\t<InputGroupAddonPrimitive\n\t\t\talign={align}\n\t\t\tclassName={cn(\n\t\t\t\t'input-group-addon--component box-border gap-space-md py-space-sm',\n\t\t\t\taddonIconClasses[size],\n\t\t\t\taddonAlignmentClasses[alignment],\n\t\t\t\talignment === 'inline-start' || alignment === 'inline-end'\n\t\t\t\t\t? addonInlinePaddingClasses[size][alignment]\n\t\t\t\t\t: formControlHorizontalPaddingClasses[size],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/** Inline action button sized to sit inside the control frame; its label stays on one line. */\nfunction InputGroupButton({\n\tclassName,\n\ttone = 'secondary',\n\tbuttonStyle = 'ghost',\n\ttruncate = true,\n\ticonOnly,\n\t...props\n}: InputGroupButtonProps) {\n\treturn (\n\t\t<Button\n\t\t\ttone={tone}\n\t\t\tbuttonStyle={buttonStyle}\n\t\t\ttruncate={truncate}\n\t\t\ticonOnly={iconOnly}\n\t\t\tclassName={cn(\n\t\t\t\t'input-group-button--component max-h-full shadow-none',\n\t\t\t\t// Text actions fit the inner frame. Icon actions retain their own\n\t\t\t\t// height and derive a square width after the frame caps that height.\n\t\t\t\t// Block/footer actions keep their natural Button geometry.\n\t\t\t\ticonOnly\n\t\t\t\t\t? 'in-[[data-align=inline-start]]:w-auto in-[[data-align=inline-start]]:aspect-square in-[[data-align=inline-end]]:w-auto in-[[data-align=inline-end]]:aspect-square'\n\t\t\t\t\t: 'in-[[data-align=inline-start]]:h-full in-[[data-align=inline-start]]:min-h-0 in-[[data-align=inline-end]]:h-full in-[[data-align=inline-end]]:min-h-0',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction isScalarContent(content: ReactNode): content is string | number | bigint {\n\treturn typeof content === 'string' || typeof content === 'number' || typeof content === 'bigint';\n}\n\n/** Static copy segment — scalar text renders through Typography. */\nfunction InputGroupText({ children, className, ...props }: InputGroupTextProps) {\n\treturn (\n\t\t<InputGroupTextPrimitive\n\t\t\tclassName={cn('input-group-text--component gap-space-md [&_svg:not([class*=\\'size-\\'])]:size-icon', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isScalarContent(children) ? (\n\t\t\t\t<Text tag=\"span\" size=\"inherit\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</InputGroupTextPrimitive>\n\t);\n}\n\n/** Single-line control that inherits the group's frame instead of its own. */\nfunction InputGroupInput({ className, ...props }: InputGroupInputProps) {\n\tconst size = useInputGroupScale();\n\treturn (\n\t\t<InputGroupInputPrimitive\n\t\t\tclassName={cn(\n\t\t\t\t// Inline frames grow for their shared editable line and clamp the\n\t\t\t\t// borderless input to the resulting content box.\n\t\t\t\t// Auto-height block compositions retain the shared control height.\n\t\t\t\t'input-group-input--component box-border max-h-full font-sans text-foreground',\n\t\t\t\tformControlHeightClasses[size],\n\t\t\t\t// The group owns the border; its native editor needs only its line.\n\t\t\t\t'min-h-lh',\n\t\t\t\tformControlPaddingClasses[size],\n\t\t\t\teditableTextSizeClasses[size],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/** Multi-line control that inherits the group's frame instead of its own. */\nfunction InputGroupTextarea({ className, ...props }: InputGroupTextareaProps) {\n\tconst size = useInputGroupScale();\n\treturn (\n\t\t<InputGroupTextareaPrimitive\n\t\t\tclassName={cn(\n\t\t\t\t'input-group-textarea--component box-border py-space-md',\n\t\t\t\tformTextareaSizeClasses[size],\n\t\t\t\tformControlHorizontalPaddingClasses[size],\n\t\t\t\teditableTextSizeClasses[size],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tInputGroup,\n\tInputGroupAddon,\n\tInputGroupButton,\n\tInputGroupInput,\n\tInputGroupText,\n\tInputGroupTextarea,\n};\n","import { Eye, EyeOff } from 'lucide-react';\nimport * as React from 'react';\n\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { Input, type InputProps } from './input';\nimport { InputTrailingActionContext } from './input-trailing-action';\nimport { fieldAffordanceRecipes } from '../../../lib/field-affordance-recipes';\n\nexport interface PasswordInputStrings {\n\tshowPassword: string;\n\thidePassword: string;\n}\n\nexport const defaultPasswordInputStrings: PasswordInputStrings = {\n\tshowPassword: 'Show password',\n\thidePassword: 'Hide password',\n};\n\nexport interface PasswordInputProps extends Omit<InputProps, 'type' | 'endIcon' | 'strings'> {\n\t/** Whether the value is revealed. Controlled. */\n\tvisible?: boolean;\n\t/** Whether the value starts revealed, for uncontrolled use. */\n\tdefaultVisible?: boolean;\n\t/** Fired whenever the reveal state changes. */\n\tonVisibleChange?: (visible: boolean) => void;\n\t/** Shows the reveal toggle. Turn it off for fields that must stay masked. */\n\trevealable?: boolean;\n\t/** Merged onto the field wrapper, outside the input frame. */\n\twrapperClassName?: string;\n\t/** Merged onto the reveal toggle. */\n\tvisibilityButtonClassName?: string;\n\t/** Copy overrides forwarded to the underlying text input. */\n\tinputStrings?: InputProps['strings'];\n\t/** Overrides the show/hide accessible names. */\n\tstrings?: StringsProp<PasswordInputStrings>;\n}\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, PasswordInputProps>(\n\tfunction PasswordInput(\n\t\t{\n\t\t\tvisible,\n\t\t\tdefaultVisible = false,\n\t\t\tonVisibleChange,\n\t\t\trevealable = true,\n\t\t\twrapperClassName,\n\t\t\tvisibilityButtonClassName,\n\t\t\tclassName,\n\t\t\tdisabled,\n\t\t\tloading,\n\t\t\tinputStrings,\n\t\t\tstrings: stringsProp,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\n\t\tconst strings = useStrings(defaultPasswordInputStrings, stringsProp);\n\t\tconst [internalVisible, setInternalVisible] = React.useState(defaultVisible);\n\t\tconst isControlled = visible !== undefined;\n\t\tconst isVisible = isControlled ? visible : internalVisible;\n\t\tconst disabledState = disabled || loading;\n\n\t\tconst toggleVisibility = React.useCallback(() => {\n\t\t\tconst nextVisible = !isVisible;\n\t\t\tif (!isControlled) {\n\t\t\t\tsetInternalVisible(nextVisible);\n\t\t\t}\n\t\t\tonVisibleChange?.(nextVisible);\n\t\t}, [isControlled, isVisible, onVisibleChange]);\n\n\t\tconst visibilityAction = revealable ? (\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclassName={cn('password-input--toggle', fieldAffordanceRecipes.target, fieldAffordanceRecipes.focus, fieldAffordanceRecipes.toggle, visibilityButtonClassName)}\n\t\t\t\taria-label={isVisible ? strings.hidePassword : strings.showPassword}\n\t\t\t\taria-pressed={isVisible}\n\t\t\t\tdisabled={disabledState}\n\t\t\t\tonMouseDown={(event) => event.preventDefault()}\n\t\t\t\tonClick={toggleVisibility}\n\t\t\t>\n\t\t\t\t{isVisible ? <EyeOff className={fieldAffordanceRecipes.icon} aria-hidden=\"true\" /> : <Eye className={fieldAffordanceRecipes.icon} aria-hidden=\"true\" />}\n\t\t\t</button>\n\t\t) : null;\n\n\t\treturn (\n\t\t\t<div className={cn('password-input--component', 'relative', wrapperClassName)}>\n\t\t\t\t<InputTrailingActionContext.Provider value={visibilityAction}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\ttype={isVisible ? 'text' : 'password'}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tloading={loading}\n\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t\tstrings={inputStrings}\n\t\t\t\t\t/>\n\t\t\t\t</InputTrailingActionContext.Provider>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nPasswordInput.displayName = 'PasswordInput';\n\nexport { PasswordInput };\n","import * as React from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nimport { Input, type InputProps } from './input';\n\nexport interface SlugifyValueOptions {\n\t/** Character joining words in the generated slug. Default: `-`. */\n\tseparator?: string;\n\t/** Lowercases the generated slug. */\n\tlowercase?: boolean;\n\t/** Strips leading and trailing separators. */\n\ttrim?: boolean;\n}\n\nexport function slugifyValue(\n\tvalue: string | number | null | undefined,\n\t{\n\t\tseparator = '-',\n\t\tlowercase = true,\n\t\ttrim = true,\n\t}: SlugifyValueOptions = {},\n) {\n\tconst safeSeparator = separator || '-';\n\tconst escapedSeparator = safeSeparator.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\tlet normalized = String(value ?? '')\n\t\t.normalize('NFKD')\n\t\t.replace(/[\\u0300-\\u036f]/g, '')\n\t\t.replace(/&/g, ' and ')\n\t\t.replace(/['’]/g, '');\n\n\tif (lowercase) {\n\t\tnormalized = normalized.toLowerCase();\n\t}\n\n\tnormalized = normalized\n\t\t.replace(/[^\\p{Letter}\\p{Number}]+/gu, safeSeparator)\n\t\t.replace(new RegExp(`${escapedSeparator}{2,}`, 'g'), safeSeparator);\n\n\tif (trim) {\n\t\tnormalized = normalized.replace(new RegExp(`^${escapedSeparator}|${escapedSeparator}$`, 'g'), '');\n\t}\n\n\treturn normalized;\n}\n\nexport interface SlugFieldProps\n\textends Omit<\n\t\tInputProps,\n\t\t'value' | 'defaultValue' | 'onChange' | 'readOnly' | 'type'\n\t>,\n\t\tSlugifyValueOptions {\n\t/** Current slug. Controlled. */\n\tvalue: string | number | null | undefined;\n\t/** Replaces the built-in slug derivation entirely. */\n\tslugify?: (value: string | number | null | undefined) => string;\n\t/** Merged onto the field wrapper, outside the input frame. */\n\twrapperClassName?: string;\n}\n\nconst SlugField = React.forwardRef<HTMLInputElement, SlugFieldProps>(\n\tfunction SlugField(\n\t\t{\n\t\t\tvalue,\n\t\t\tslugify,\n\t\t\tseparator = '-',\n\t\t\tlowercase = true,\n\t\t\ttrim = true,\n\t\t\twrapperClassName,\n\t\t\tclassName,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\n\t\tconst slug = React.useMemo(\n\t\t\t() => slugify?.(value) ?? slugifyValue(value, { separator, lowercase, trim }),\n\t\t\t[lowercase, separator, slugify, trim, value],\n\t\t);\n\n\t\treturn (\n\t\t\t<div className={cn('slug-field--component', wrapperClassName)}>\n\t\t\t\t<Input\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tvalue={slug}\n\t\t\t\t\treadOnly\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nSlugField.displayName = 'SlugField';\n\nexport { SlugField };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,IAAaqC,KAA0C,EACrD,OAAO,iBACT,GAuQMrC,IAAWC,EAAM,YAzNrB,EACE,cACA,cACA,uBACA,cACA,YACA,aAAU,IACV,YACA,MAAMsC,GACN,gBAAa,IACb,aAAU,GACV,YACA,aACA,OAAOC,GACP,iBACA,IAAIC,GACJ,SAASC,GACT,GAAGC,KAEL,MACG;CACH,IAAMC,IAAcC,EAA4B,IAAI,GAC9CC,IAAUC,EAAWV,IAAwBK,CAAW,GACxD,EAAE,oBAAiB3B,EAAiB,GACpCiC,IAAOnB,EAAuBU,GAAUU,CAAY,GAGpD,EACJ,OACA,OAAOC,GACP,oBACA,mBACA,sBACA,cACA,aACA,gBACA,wBACElB,EAAkB;EACpB;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,aAAamB,MAAa,KAAA;CAC5B,CAAC,GAGKC,IAAW,EAAQC,GAEnBC,IAAeC,QAAkB;EACrC,IAAI,CAACC,KAAc,CAACZ,EAAY,SAAS;EAEzC,IAAMa,IAAWb,EAAY,SAEvBc,IAAM,iBAAiBD,CAAQ,GAC/BE,IAAa,OAAO,WAAWD,EAAI,UAAU,KAAK,IAClDE,KAAW,OAAO,WAAWF,EAAI,UAAU,KAAK,MAAM,OAAO,WAAWA,EAAI,aAAa,KAAK,IAC9FG,IAASH,EAAI,cAAc,gBAAgB,OAAO,WAAWA,EAAI,cAAc,KAAK,MAAM,OAAO,WAAWA,EAAI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BC,IAAmBF,EAAc,QAAQ,uBAAuB,MAAM,GACxEG,IAAa,OAAOC,KAAS,EAAE,CAAC,CAClC,UAAU,MAAM,CAAC,CACjB,QAAQ,oBAAoB,EAAE,CAAC,CAC/B,QAAQ,MAAM,OAAO,CAAC,CACtB,QAAQ,SAAS,EAAE;CAcrB,OAZIC,MACH,IAAaF,EAAW,YAAY,IAGrC,IAAaA,EACX,QAAQ,8BAA8BH,CAAa,CAAC,CACpD,QAAY,OAAO,GAAGE,EAAiB,OAAO,GAAG,GAAGF,CAAa,GAE/DM,MACH,IAAaH,EAAW,QAAY,OAAO,IAAID,EAAiB,GAAGA,EAAiB,IAAI,GAAG,GAAG,EAAE,IAG1FC;AACR;AAgBA,IAAMI,IAAYlI,EAAM,WACvB,SACC,EACC,UACA,YACA,eAAY,KACZ,eAAY,IACZ,UAAO,IACP,qBACA,cACA,GAAG6B,KAEJ,GACC;CACD,IAAMsG,IAAOnI,EAAM,cACZoI,IAAUL,CAAK,KAAKL,EAAaK,GAAO;EAAE;EAAW;EAAW;CAAK,CAAC,GAC5E;EAACC;EAAWJ;EAAWQ;EAASH;EAAMF;CAAK,CAC5C;CAEA,OACC,kBAAC,OAAD;EAAK,WAAW7H,EAAG,yBAAyBsH,CAAgB;EAC3D,UAAA,kBAACpG,GAAD;GACM;GACL,GAAIS;GACJ,MAAK;GACL,OAAOsG;GACP,UAAA;GACW;EACX,CAAA;CACG,CAAA;AAEP,CACD;AAEA,EAAU,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.styles-g4He6UIW.js","names":["textTypes","textSizes","headingSizes","textWeights","textAlignments","textLineHeights","textVariants","cva","resolveTextClassNames","options"],"sources":["../src/components/typography/text.styles.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n/**\n * Text roles. `inherit` keeps the surrounding text's role: an inline span inside\n * a sentence takes its colour, weight or leading instead of resetting them. Colour\n * uses an explicit inherit utility because anchors otherwise fall back to the\n * browser link colour without preflight; weight and leading emit no class.\n */\nexport const textTypes = {\n main: 'text-foreground', inverse: 'text-inverse-foreground',\n secondary: 'text-muted-foreground', discrete: 'text-muted-foreground',\n error: 'text-destructive', success: 'text-success', primary: 'text-primary-accent',\n inherit: 'text-inherit',\n} as const;\nexport const textSizes = {\n inherit: '[font-size:inherit]', xxs: 'text-xxs', xs: 'text-xs', pxs: 'text-pxs',\n sm: 'text-sm', base: 'text-base', lg: 'text-lg', xl: 'text-xl',\n} as const;\n/**\n * Semantic heading level is independent of visual emphasis. No additional theme\n * roots: compact admin sizes keep snug leading; display sizes (xl and up) tighten\n * tracking and 2xl and up tighten leading so multi-line titles stay one block.\n */\nexport const headingSizes = {\n sm: 'text-sm leading-snug', base: 'text-base leading-snug', lg: 'text-lg leading-snug',\n xl: 'text-xl leading-snug tracking-tight', '2xl': 'text-2xl leading-tight tracking-tight',\n '3xl': 'text-3xl leading-tight tracking-tight', '4xl': 'text-4xl leading-tight tracking-tight',\n} as const;\nexport const textWeights = {normal: 'font-normal', regular: 'font-normal', medium: 'font-medium', semibold: 'font-semibold', bold: 'font-bold', inherit: ''} as const;\n/**\n * `left` and `right` follow the reading direction (start and end), so default\n * text and right-aligned figures mirror correctly under `dir=\"rtl\"`.\n */\nexport const textAlignments = {left: 'text-start', center: 'text-center', right: 'text-end'} as const;\nexport const textLineHeights = {normal: 'leading-normal', relaxed: 'leading-relaxed', loose: 'leading-loose', tight: 'leading-tight', snug: 'leading-snug', none: 'leading-none', inherit: ''} as const;\n\n/**\n * `numeric` is the monospace treatment for identifiers and code-like values\n * (`font-mono tabular-nums`). Numbers, amounts, dates and durations use the\n * number primitives, which keep the sans UI font with tabular figures.\n */\nexport const textVariants = cva('m-0 font-sans', {\n variants: {type: textTypes, size: textSizes, weight: textWeights, align: textAlignments, lineHeight: textLineHeights, numeric: {true: 'font-mono tabular-nums', false: ''}},\n defaultVariants: {type: 'main', size: 'sm', weight: 'regular', align: 'left', lineHeight: 'normal', numeric: false},\n});\n\nexport function resolveTextClassNames(options: Parameters<typeof textVariants>[0] & {className?: string}): string {\n return textVariants(options);\n}\n"],"mappings":";;AAQA,IAAaA,IAAY;CACvB,MAAM;CAAmB,SAAS;CAClC,WAAW;CAAyB,UAAU;CAC9C,OAAO;CAAoB,SAAS;CAAgB,SAAS;CAC7D,SAAS;AACX,GACaC,IAAY;CACvB,SAAS;CAAuB,KAAK;CAAY,IAAI;CAAW,KAAK;CACrE,IAAI;CAAW,MAAM;CAAa,IAAI;CAAW,IAAI;AACvD,GAMaC,IAAe;CAC1B,IAAI;CAAwB,MAAM;CAA0B,IAAI;CAChE,IAAI;CAAuC,OAAO;CAClD,OAAO;CAAyC,OAAO;AACzD,GACaC,IAAc;CAAC,QAAQ;CAAe,SAAS;CAAe,QAAQ;CAAe,UAAU;CAAiB,MAAM;CAAa,SAAS;AAAE,GAK9IC,IAAiB;CAAC,MAAM;CAAc,QAAQ;CAAe,OAAO;AAAU,GAC9EC,IAAkB;CAAC,QAAQ;CAAkB,SAAS;CAAmB,OAAO;CAAiB,OAAO;CAAiB,MAAM;CAAgB,MAAM;CAAgB,SAAS;AAAE,GAOhLC,IAAeC,EAAI,iBAAiB;CAC/C,UAAU;EAAC,MAAMP;EAAW,MAAMC;EAAW,QAAQE;EAAa,OAAOC;EAAgB,YAAYC;EAAiB,SAAS;GAAC,MAAM;GAA0B,OAAO;EAAE;CAAC;CAC1K,iBAAiB;EAAC,MAAM;EAAQ,MAAM;EAAM,QAAQ;EAAW,OAAO;EAAQ,YAAY;EAAU,SAAS;CAAK;AACpH,CAAC;AAED,SAAgBG,EAAsB,GAA4E;CAChH,OAAOF,EAAaG,CAAO;AAC7B"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as e from "react";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
-
//#region src/lib/theme-scope.tsx
|
|
5
|
-
var n = e.createContext(null), r = [
|
|
6
|
-
"--primary",
|
|
7
|
-
"--primary-foreground",
|
|
8
|
-
"--foreground",
|
|
9
|
-
"--font-sans"
|
|
10
|
-
];
|
|
11
|
-
function i(e) {
|
|
12
|
-
return r.filter((t) => e?.[t] != null && e[t] !== "").map((e) => e.slice(2)).join(" ") || void 0;
|
|
13
|
-
}
|
|
14
|
-
var a = n.Provider;
|
|
15
|
-
function o() {
|
|
16
|
-
let t = e.useRef(null), [n, r] = e.useState(!1);
|
|
17
|
-
return {
|
|
18
|
-
host: t,
|
|
19
|
-
attachHost: e.useCallback((e) => {
|
|
20
|
-
t.current = e, r(e !== null);
|
|
21
|
-
}, []),
|
|
22
|
-
context: e.useMemo(() => ({
|
|
23
|
-
host: t,
|
|
24
|
-
mounted: n
|
|
25
|
-
}), [n])
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
var s = e.forwardRef(function({ children: n, style: r, ...s }, c) {
|
|
29
|
-
let { host: l, attachHost: u, context: d } = o();
|
|
30
|
-
return e.useImperativeHandle(c, () => l.current, []), /* @__PURE__ */ t(a, {
|
|
31
|
-
value: d,
|
|
32
|
-
children: /* @__PURE__ */ t("div", {
|
|
33
|
-
"data-theme-scope": "",
|
|
34
|
-
...s,
|
|
35
|
-
"data-theme-roots": i(r),
|
|
36
|
-
style: r,
|
|
37
|
-
ref: u,
|
|
38
|
-
children: n
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
function c(t) {
|
|
43
|
-
let r = e.useContext(n);
|
|
44
|
-
if (t !== void 0) return t;
|
|
45
|
-
if (r) return r.mounted ? r.host : null;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
export { o as i, a as n, c as r, s as t };
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=theme-scope-BJ6eE2xt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme-scope-BJ6eE2xt.js","names":["React","React$1","ThemeScopeContext","scopeAliasRoots","suppliedScopeRoots","style","root","ThemeScopeHostProvider","useThemeScopeHost","host","mounted","setMounted","node","ThemeScope","props","forwardedRef","context","attachHost","useThemePortalContainer","scope","container"],"sources":["../src/lib/theme-scope.tsx"],"sourcesContent":["import * as React from 'react';\n\n/** Native Base UI portal container contract, shared by internal portal owners. */\nexport type ThemePortalContainer = HTMLElement | ShadowRoot | React.RefObject<HTMLElement | ShadowRoot | null> | null;\n\ntype ThemeScopeContextValue = {\n host: React.RefObject<HTMLElement | null>;\n mounted: boolean;\n};\nconst ThemeScopeContext = React.createContext<ThemeScopeContextValue | null>(null);\n\nexport type ThemeScopeProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'style'> & {\n style?: React.CSSProperties & { [property: `--${string}`]: string | number | undefined };\n};\n\n// CSS owns alias references. This private marker identifies explicitly supplied\n// source roots so low-specificity defaults can rebind at this boundary without\n// overriding independent roles from consumer classes or inline styles.\nconst scopeAliasRoots = ['--primary', '--primary-foreground', '--foreground', '--font-sans'] as const;\nfunction suppliedScopeRoots(style: ThemeScopeProps['style']) {\n return scopeAliasRoots.filter(root => style?.[root] != null && style[root] !== '').map(root => root.slice(2)).join(' ') || undefined;\n}\n\n/** Internal host mechanics shared by native themed regions and the public div scope. */\nexport const ThemeScopeHostProvider = ThemeScopeContext.Provider;\n\nexport function useThemeScopeHost<T extends HTMLElement>() {\n const host = React.useRef<T>(null);\n const [mounted, setMounted] = React.useState(false);\n const attachHost = React.useCallback((node: T | null) => {\n host.current = node;\n setMounted(node !== null);\n }, []);\n const context = React.useMemo(() => ({ host, mounted }), [mounted]);\n return { host, attachHost, context };\n}\n\n/** CSS inheritance boundary for local themes, including descendant overlays. */\nexport const ThemeScope = React.forwardRef<HTMLDivElement, ThemeScopeProps>(function ThemeScope(\n { children, style, ...props }, forwardedRef,\n) {\n const { host, attachHost, context } = useThemeScopeHost<HTMLDivElement>();\n React.useImperativeHandle(forwardedRef, () => host.current!, []);\n return <ThemeScopeHostProvider value={context}>\n <div data-theme-scope=\"\" {...props} data-theme-roots={suppliedScopeRoots(style)} style={style} ref={attachHost}>{children}</div>\n </ThemeScopeHostProvider>;\n});\n\n/** Explicit container wins; scoped portals wait until their CSS host is attached. */\nexport function useThemePortalContainer(container?: ThemePortalContainer): ThemePortalContainer | undefined {\n const scope = React.useContext(ThemeScopeContext);\n if (container !== undefined) return container;\n if (!scope) return undefined;\n return scope.mounted ? scope.host : null;\n}\n"],"mappings":";;;;AASA,IAAME,IAAoBF,EAAM,cAA6C,IAAI,GAS3EG,IAAkB;CAAC;CAAa;CAAwB;CAAgB;AAAa;AAC3F,SAASC,EAAmB,GAAiC;CAC5D,OAAOD,EAAgB,QAAO,MAAQE,IAAQC,MAAS,QAAQD,EAAMC,OAAU,EAAE,CAAC,CAAC,KAAI,MAAQA,EAAK,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;AAC5H;AAGA,IAAaC,IAAyBL,EAAkB;AAExD,SAAgBM,IAA2C;CAC1D,IAAMC,IAAOT,EAAM,OAAU,IAAI,GAC3B,CAACU,GAASC,KAAcX,EAAM,SAAS,EAAK;CAMlD,OAAO;EAAE;EAAM,YALIA,EAAM,aAAa,MAAmB;GAExD,AADA,EAAK,UAAUY,GACfD,EAAWC,MAAS,IAAI;EACzB,GAAG,CAAC,CAEW;EAAY,SADXZ,EAAM,eAAe;GAAE;GAAM;EAAQ,IAAI,CAACU,CAAO,CACtC;CAAQ;AACpC;AAGA,IAAaG,IAAab,EAAM,WAA4C,SAC3E,EAAE,aAAU,UAAO,GAAGc,KAAS,GAC9B;CACD,IAAM,EAAE,SAAM,eAAY,eAAYN,EAAkC;CAExE,OADAP,EAAM,oBAAoBc,SAAoBN,EAAK,SAAU,CAAC,CAAC,GACxD,kBAACF,GAAD;EAAwB,OAAOS;EACrC,UAAA,kBAAC,OAAD;GAAK,oBAAiB;GAAG,GAAIF;GAAO,oBAAkBV,EAAmBC,CAAK;GAAU;GAAO,KAAKY;GAAa;EAAc,CAAA;CACxG,CAAA;AACzB,CAAC;AAGD,SAAgBC,EAAwB,GAAoE;CAC3G,IAAMC,IAAQnB,EAAM,WAAWE,CAAiB;CAChD,IAAIkB,MAAc,KAAA,GAAW,OAAOA;CACpC,IAAKD,GACL,OAAOA,EAAM,UAAUA,EAAM,OAAO;AACrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timelines-CwM_9IhD.js","names":["Text","Stack","Progress","SecondaryValue","MonoValue","Percent","IconBadge","Badge","ContentBlock","DOT_PX","ICON_PX","STATUS_TONE","toneRecipes","Timeline","cn","className","items","status","item","tone","Icon","isLast","i","dotSize","statusStyles","Check","Loader2","Circle","StepsCard","steps","titleType","step","HorizontalDot","stepNumber","StepsHorizontal","title","description","idx","lineColor","footerText","defaultChangelogTimelineStrings","KIND_ICON","Plus","Minus","Wrench","GitCommit","ChangelogTimeline","stringsProp","strings","useStrings","labelByKind","entries","entry","defaultMilestonesTimelineStrings","STATUS_TO_TIMELINE","STATUS_ICON","Clock","X","STATUS_BADGE","MilestonesTimeline","labelByStatus","milestones","m"],"sources":["../src/components/blocks/timelines/shared/timeline.tsx","../src/components/blocks/timelines/steps-card/steps-card.tsx","../src/components/blocks/timelines/changelog/types.ts","../src/components/blocks/timelines/changelog/changelog-timeline.tsx","../src/components/blocks/timelines/milestones/types.ts","../src/components/blocks/timelines/milestones/milestones-timeline.tsx"],"sourcesContent":["/**\n * Timeline — shared base primitive for the blocks timeline family.\n *\n * Renders a vertical, dot-and-line list of events. Each item supports an\n * icon (Lucide component), a status that maps to dot tone, a title row, an\n * optional description block, an optional timestamp, and free-form content\n * via `children`. Use this primitive directly for new timeline variants\n * instead of reinventing the dot/line geometry — see `ChangeLogTimeline`,\n * `MilestonesTimeline`, and the existing OrderTimeline / PaymentTimeline /\n * ActivityStream consumers for examples.\n */\nimport type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { SecondaryValue } from '../../../primitives';\nimport { Text } from '../../../typography';\nimport { Stack } from '../../../base/structure';\nimport type { ComponentScale } from '../../../../lib/component-vocabulary';\nimport { cn } from '../../../../lib/utils';\nimport { toneRecipes } from '../../../../lib/tone-recipes';\n\nexport type TimelineStatus =\n\t| 'completed'\n\t| 'current'\n\t| 'pending'\n\t| 'success'\n\t| 'warning'\n\t| 'error'\n\t| 'neutral';\n\nexport type TimelineDotSize = ComponentScale;\n\nexport interface TimelineItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Supporting copy shown under the label. */\n\tdescription?: ReactNode;\n\t/** Formatted time for the entry. */\n\ttimestamp?: ReactNode;\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n\tstatus?: TimelineStatus;\n\tchildren?: ReactNode;\n}\n\nexport interface TimelineProps {\n\titems: TimelineItem[];\n\tdotSize?: TimelineDotSize;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n}\n\nconst DOT_PX: Record<TimelineDotSize, string> = {\n\tsm: 'size-2.5',\n\tmd: 'size-icon-md',\n\tlg: 'size-icon-lg',\n};\n\nconst ICON_PX: Record<TimelineDotSize, string> = {\n\tsm: 'size-2',\n\tmd: 'size-2.5',\n\tlg: 'size-icon-sm',\n};\n\nconst STATUS_TONE: Record<TimelineStatus, { bg: string; text: string; ring: string; line: string }> = {\n\tcompleted: { bg: toneRecipes.success.solid, text: 'text-success-foreground', ring: toneRecipes.success.halo, line: toneRecipes.success.line },\n\tcurrent: { bg: toneRecipes.primary.solid, text: 'text-primary-foreground', ring: toneRecipes.primary.halo, line: toneRecipes.primary.line },\n\tpending: { bg: 'bg-muted', text: 'text-muted-foreground', ring: 'ring-border', line: 'bg-border' },\n\tsuccess: { bg: toneRecipes.success.solid, text: 'text-success-foreground', ring: toneRecipes.success.halo, line: toneRecipes.success.line },\n\twarning: { bg: toneRecipes.warning.solid, text: 'text-warning-foreground', ring: toneRecipes.warning.halo, line: toneRecipes.warning.line },\n\terror: { bg: toneRecipes.destructive.solid, text: 'text-destructive-foreground', ring: toneRecipes.destructive.halo, line: toneRecipes.destructive.line },\n\tneutral: { bg: 'bg-card', text: 'text-card-foreground', ring: 'ring-border', line: 'bg-border' },\n};\n\nexport function Timeline({ items, dotSize = 'md', className }: TimelineProps) {\n\treturn (\n\t\t<Stack render={<ol />} gap=\"xl\" className={cn('timeline--component', 'relative m-0 p-0 list-none', className)}>\n\t\t\t{items.map((item, i) => {\n\t\t\t\tconst status = item.status ?? 'neutral';\n\t\t\t\tconst tone = STATUS_TONE[status];\n\t\t\t\tconst Icon = item.icon;\n\t\t\t\tconst isLast = i === items.length - 1;\n\n\t\t\t\treturn (\n\t\t\t\t\t// `data-status` exposes the state as a hook; the current step is\n\t\t\t\t\t// announced through `aria-current`, independently of its colour.\n\t\t\t\t\t<li\n\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\tdata-status={status}\n\t\t\t\t\t\taria-current={status === 'current' ? 'step' : undefined}\n\t\t\t\t\t\tclassName=\"timeline--item relative flex gap-space-lg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* Connector line — fills available space below dot until last */}\n\t\t\t\t\t\t{!isLast && (\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'absolute left-[7px] top-4 bottom-[-1rem] w-px',\n\t\t\t\t\t\t\t\t\ttone.line,\n\t\t\t\t\t\t\t\t\tdotSize === 'lg' && 'left-[10px]',\n\t\t\t\t\t\t\t\t\tdotSize === 'sm' && 'left-[5px]',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<div className=\"relative z-[1] mt-0.5 flex shrink-0 items-start\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'inline-flex items-center justify-center rounded-full ring-2',\n\t\t\t\t\t\t\t\t\ttone.bg,\n\t\t\t\t\t\t\t\t\ttone.text,\n\t\t\t\t\t\t\t\t\ttone.ring,\n\t\t\t\t\t\t\t\t\tDOT_PX[dotSize],\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{!!Icon && <Icon className={ICON_PX[dotSize]} />}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<Stack gap=\"md\" className=\"min-w-0 flex-1 pb-space-md\">\n\t\t\t\t\t\t\t<Stack gap=\"dense\">\n\t\t\t\t\t\t\t\t<div className=\"flex items-baseline justify-between gap-space-md\">\n\t\t\t\t\t\t\t\t\t<Text type=\"inherit\" weight=\"medium\" lineHeight=\"tight\">\n\t\t\t\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t{!!item.timestamp && (\n\t\t\t\t\t\t\t\t\t\t<SecondaryValue size=\"xs\" className=\"shrink-0 tabular-nums\">\n\t\t\t\t\t\t\t\t\t\t\t{item.timestamp}\n\t\t\t\t\t\t\t\t\t\t</SecondaryValue>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{!!item.description && (\n\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t{item.description}\n\t\t\t\t\t\t\t\t\t</Text>\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\t{!!item.children && <div className=\"min-w-0\">{item.children}</div>}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Stack>\n\t);\n}\n\nTimeline.displayName = 'Timeline';\n","import { Stack } from '../../../base/structure';\nimport { Text } from '../../../typography/text';\nimport { Badge } from '../../../base/badge';\nimport { ContentBlock, IconBadge } from '../../../base/display';\nimport { cn } from '../../../../lib/utils';\nimport { Check, Circle, Loader2 } from 'lucide-react';\nimport { Timeline, type TimelineItem } from '../shared';\nimport { type StepStatus, type StepsCardProps, type StepsHorizontalProps } from './types';\n\nconst statusStyles: Record<StepStatus, {\n\ttitle: 'inherit' | 'secondary';\n\tIcon: typeof Check;\n}> = {\n\tcompleted: { title: 'inherit', Icon: Check },\n\tcurrent: { title: 'inherit', Icon: Loader2 },\n\tupcoming: { title: 'secondary', Icon: Circle },\n};\n\n/* ─── Vertical StepsCard (original) ────────────────────────────────────────── */\n\nexport function StepsCard({ title, description, steps, footerText, className }: StepsCardProps) {\n\tconst items: TimelineItem[] = steps.map((step) => {\n\t\tconst { Icon, title: titleType } = statusStyles[step.status];\n\t\treturn {\n\t\t\tid: step.id,\n\t\t\ttitle: (\n\t\t\t\t<span className=\"inline-flex flex-wrap items-center gap-space-sm\">\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"semibold\" type={titleType}>\n\t\t\t\t\t\t{step.title}\n\t\t\t\t\t</Text>\n\t\t\t\t\t{step.badge ? (\n\t\t\t\t\t\t<Badge tone={step.badgeTone ?? 'secondary'}>{step.badge}</Badge>\n\t\t\t\t\t) : null}\n\t\t\t\t</span>\n\t\t\t),\n\t\t\tdescription: step.description,\n\t\t\ttimestamp: step.timestamp,\n\t\t\ticon: Icon,\n\t\t\tstatus: step.status === 'upcoming' ? 'pending' : step.status,\n\t\t\tchildren: step.content,\n\t\t};\n\t});\n\n\treturn (\n\t\t<ContentBlock\n\t\t\tdata-component=\"steps-card\"\n\t\t\tdata-slot=\"steps-card\"\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tfooterText={footerText}\n\t\t\tclassName={cn('steps-card--component', className)}\n\t\t>\n\t\t\t<Timeline items={items} dotSize=\"lg\" />\n\t\t</ContentBlock>\n\t);\n}\n\nStepsCard.displayName = 'StepsCard';\n\n/*──────────────────────────────────────────────────────────────────────────────\n * STEPS HORIZONTAL — Horizontal step bar with connecting lines\n *────────────────────────────────────────────────────────────────────────────*/\n\n/** Step marker on the shared IconBadge tile: reached steps show a check, the rest their number. */\nfunction HorizontalDot({ status, stepNumber }: { status: StepStatus; stepNumber: number }) {\n\tif (status === 'completed') {\n\t\treturn <IconBadge icon={Check} tone=\"success\" solid shape=\"square\" size=\"md\" className=\"relative z-10\" />;\n\t}\n\n\t// The number is the step's position, so it stays readable to assistive technology.\n\treturn (\n\t\t<IconBadge\n\t\t\ttone={status === 'current' ? 'primary' : 'neutral'}\n\t\t\tsolid={status === 'current'}\n\t\t\tshape=\"square\"\n\t\t\tsize=\"md\"\n\t\t\taria-hidden={false}\n\t\t\tclassName=\"relative z-10\"\n\t\t>\n\t\t\t<Text tag=\"span\" type=\"inherit\" weight={status === 'current' ? 'bold' : 'medium'} className=\"tabular-nums\">\n\t\t\t\t{stepNumber}\n\t\t\t</Text>\n\t\t</IconBadge>\n\t);\n}\n\nexport function StepsHorizontal({ title, description, steps, footerText, className }: StepsHorizontalProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-component=\"steps-horizontal\"\n\t\t\tdata-slot=\"steps-horizontal\"\n\t\t\tclassName={cn('steps-horizontal--component @container/steps-horizontal grid min-w-0 gap-space-md', className)}\n\t\t>\n\t\t\t{!!(title || description) && (\n\t\t\t\t<div className=\"steps-horizontal--header grid min-w-0 gap-normal\">\n\t\t\t\t\t{!!title && <Text type=\"inherit\" weight=\"semibold\">{title}</Text>}\n\t\t\t\t\t{!!description && <Text type=\"secondary\">{description}</Text>}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<Stack gap=\"lg\" className=\"@xl/steps-horizontal:hidden\">\n\t\t\t\t{steps.map((step, idx) => {\n\t\t\t\t\tconst isLast = idx === steps.length - 1;\n\t\t\t\t\tconst lineColor = step.status === 'completed' ? 'bg-success' : 'bg-border';\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div key={step.id} className=\"flex gap-space-lg\">\n\t\t\t\t\t\t\t<div className=\"flex flex-col items-center\">\n\t\t\t\t\t\t\t\t<HorizontalDot status={step.status} stepNumber={idx + 1} />\n\t\t\t\t\t\t\t\t{!isLast && <div className={cn('mt-1 w-0.5 flex-1 min-h-5', lineColor)} />}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Stack gap=\"dense\" className={cn('min-w-0 flex-1 pb-space-md', isLast && 'pb-0')}>\n\t\t\t\t\t\t\t\t<Text weight=\"semibold\" lineHeight=\"snug\" type={statusStyles[step.status].title}>\n\t\t\t\t\t\t\t\t\t{step.title}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t{!!step.description && (\n\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"line-clamp-2\">\n\t\t\t\t\t\t\t\t\t\t{step.description}\n\t\t\t\t\t\t\t\t\t</Text>\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</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Stack>\n\n\t\t\t{/* Horizontal scroll wrapper — when total step width exceeds the\n\t\t\t\tcard, this lets users scroll instead of clipping labels. */}\n\t\t\t<div className=\"hidden overflow-x-auto @xl/steps-horizontal:block\">\n\t\t\t\t<div className=\"flex min-w-fit items-start\">\n\t\t\t\t\t{steps.map((step, idx) => {\n\t\t\t\t\t\tconst isLast = idx === steps.length - 1;\n\t\t\t\t\t\tconst lineColor = step.status === 'completed' ? 'bg-success' : 'bg-border';\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div key={step.id} className=\"flex min-w-28 flex-1 items-start\">\n\t\t\t\t\t\t\t\t<Stack gap=\"md\" align=\"center\" className=\"w-full\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex w-full items-center\">\n\t\t\t\t\t\t\t\t\t\t{idx > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t<div className={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t'h-0.5 flex-1',\n\t\t\t\t\t\t\t\t\t\t\t\tsteps[idx - 1].status === 'completed' ? 'bg-success' : 'bg-border',\n\t\t\t\t\t\t\t\t\t\t\t)} />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{idx === 0 && <div className=\"flex-1\" />}\n\n\t\t\t\t\t\t\t\t\t\t<HorizontalDot status={step.status} stepNumber={idx + 1} />\n\n\t\t\t\t\t\t\t\t\t\t{!isLast && (\n\t\t\t\t\t\t\t\t\t\t\t<div className={cn('h-0.5 flex-1', lineColor)} />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{!!isLast && <div className=\"flex-1\" />}\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t{/* Labels below dot — clamped to 2 lines so long step\n\t\t\t\t\t\t\t\t\t\tnames break gracefully instead of pushing the\n\t\t\t\t\t\t\t\t\t\trow taller. */}\n\t\t\t\t\t\t\t\t\t<Stack gap=\"dense\" align=\"center\" className=\"w-full px-space-xs\">\n\t\t\t\t\t\t\t\t\t\t<Text weight=\"semibold\" lineHeight=\"snug\" align=\"center\" type={statusStyles[step.status].title} className=\"line-clamp-2\">\n\t\t\t\t\t\t\t\t\t\t\t{step.title}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t{!!step.description && (\n\t\t\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" lineHeight=\"snug\" align=\"center\" className=\"line-clamp-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t{step.description}\n\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{!!footerText && <Text size=\"xs\" type=\"secondary\">{footerText}</Text>}\n\t\t</div>\n\t);\n}\n\nStepsHorizontal.displayName = 'StepsHorizontal';\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type ChangelogEntryKind = 'added' | 'removed' | 'modified' | 'fixed';\n\nexport interface ChangelogEntry {\n\t/** Stable identity for this entry. */\n\tid: string;\n\tkind: ChangelogEntryKind;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Supporting copy shown under the label. */\n\tdescription?: ReactNode;\n\tversion?: string;\n\t/** Formatted time for the entry. */\n\ttimestamp?: string;\n\t/** Who produced the entry. */\n\tauthor?: string;\n}\n\nexport interface ChangelogTimelineStrings {\n\t/** Surface title. */\n\ttitle: string;\n\tadded: string;\n\tremoved: string;\n\tmodified: string;\n\tfixed: string;\n}\n\nexport const defaultChangelogTimelineStrings: ChangelogTimelineStrings = {\n\ttitle: 'Changelog',\n\tadded: 'Added',\n\tremoved: 'Removed',\n\tmodified: 'Modified',\n\tfixed: 'Fixed',\n};\n\nexport interface ChangelogTimelineProps {\n\tentries: ChangelogEntry[];\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<ChangelogTimelineStrings>;\n}\n","/**\n * ChangelogTimeline — code/release changelog rendered through the shared\n * `Timeline` primitive. Each entry's kind (added / removed / modified /\n * fixed) is a neutral chip plus the marker glyph: a kind is a category, not a\n * status, so it carries no colour. An optional version label and timestamp\n * follow. Strings overridable for i18n.\n */\nimport { GitCommit, Minus, Plus, Wrench } from 'lucide-react';\nimport { Badge } from '../../../base/badge';\nimport { MonoValue } from '../../../primitives';\nimport { Text } from '../../../typography';\nimport { Stack } from '../../../base/structure';\nimport { useStrings } from '../../../../lib/strings';\n\nimport {\n\tTimeline,\n\ttype TimelineItem,\n} from '../shared';\nimport {\n\tdefaultChangelogTimelineStrings,\n\ttype ChangelogEntry,\n\ttype ChangelogEntryKind,\n\ttype ChangelogTimelineProps,\n} from './types';\n\nimport { cn } from '../../../../lib/utils';\nconst KIND_ICON = {\n\tadded: Plus,\n\tremoved: Minus,\n\tmodified: Wrench,\n\tfixed: GitCommit,\n} as const;\n\nexport function ChangelogTimeline({\n\tentries,\n\tclassName,\n\tstrings: stringsProp,\n}: ChangelogTimelineProps) {\n\tconst strings = useStrings(defaultChangelogTimelineStrings, stringsProp);\n\tconst labelByKind: Record<ChangelogEntryKind, string> = {\n\t\tadded: strings.added,\n\t\tremoved: strings.removed,\n\t\tmodified: strings.modified,\n\t\tfixed: strings.fixed,\n\t};\n\n\tconst items: TimelineItem[] = entries.map((entry: ChangelogEntry) => ({\n\t\tid: entry.id,\n\t\ttitle: (\n\t\t\t<span className=\"inline-flex flex-wrap items-center gap-space-sm\">\n\t\t\t\t<Badge>\n\t\t\t\t\t{labelByKind[entry.kind]}\n\t\t\t\t</Badge>\n\t\t\t\t<Text type=\"inherit\" tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\">\n\t\t\t\t\t{entry.title}\n\t\t\t\t</Text>\n\t\t\t\t{!!entry.version && (\n\t\t\t\t\t<MonoValue size=\"xs\" className=\"text-muted-foreground\">\n\t\t\t\t\t\t{entry.version}\n\t\t\t\t\t</MonoValue>\n\t\t\t\t)}\n\t\t\t</span>\n\t\t),\n\t\tdescription: entry.author ? (\n\t\t\t<Stack render={<span />} direction=\"horizontal\" gap=\"md\" className=\"inline-flex\">\n\t\t\t\t{entry.description}\n\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"discrete\">\n\t\t\t\t\t— {entry.author}\n\t\t\t\t</Text>\n\t\t\t</Stack>\n\t\t) : (\n\t\t\tentry.description\n\t\t),\n\t\ttimestamp: entry.timestamp,\n\t\ticon: KIND_ICON[entry.kind],\n\t\tstatus: 'neutral',\n\t}));\n\n\treturn (\n\t\t<div\n\t\t\tdata-component=\"changelog-timeline\"\n\t\t\tdata-slot=\"changelog-timeline\"\n\t\t\tclassName={cn('changelog-timeline--component', className)}\n\t\t>\n\t\t\t<Timeline items={items} dotSize=\"md\" />\n\t\t</div>\n\t);\n}\n\nChangelogTimeline.displayName = 'ChangelogTimeline';\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type MilestoneStatus = 'completed' | 'in_progress' | 'upcoming' | 'blocked';\n\nexport interface MilestoneItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Supporting copy shown under the label. */\n\tdescription?: ReactNode;\n\tdueDate?: string;\n\tstatus: MilestoneStatus;\n\t/** 0–100; only used when status is `in_progress`. */\n\tprogress?: number;\n}\n\nexport interface MilestonesTimelineStrings {\n\t/** Surface title. */\n\ttitle: string;\n\tcompleted: string;\n\tin_progress: string;\n\tupcoming: string;\n\tblocked: string;\n\tdueOn: string;\n}\n\nexport const defaultMilestonesTimelineStrings: MilestonesTimelineStrings = {\n\ttitle: 'Milestones',\n\tcompleted: 'Completed',\n\tin_progress: 'In progress',\n\tupcoming: 'Upcoming',\n\tblocked: 'Blocked',\n\tdueOn: 'Due',\n};\n\nexport interface MilestonesTimelineProps {\n\tmilestones: MilestoneItem[];\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<MilestonesTimelineStrings>;\n}\n","/**\n * MilestonesTimeline — project / goal milestones rendered through the\n * shared `Timeline` primitive. Each milestone has a status (completed /\n * in-progress / upcoming / blocked) that drives the dot tone, and an\n * optional `progress` percent that renders an inline progress bar when the\n * milestone is in flight. Strings overridable for i18n.\n */\nimport { Check, Circle, Clock, X } from 'lucide-react';\nimport { Badge } from '../../../base/badge';\nimport { Progress } from '../../../base/feedback';\nimport { Stack } from '../../../base/structure';\nimport { Percent } from '../../../primitives';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tTimeline,\n\ttype TimelineItem,\n\ttype TimelineStatus,\n} from '../shared';\nimport {\n\tdefaultMilestonesTimelineStrings,\n\ttype MilestoneItem,\n\ttype MilestoneStatus,\n\ttype MilestonesTimelineProps,\n} from './types';\n\nconst STATUS_TO_TIMELINE: Record<MilestoneStatus, TimelineStatus> = {\n\tcompleted: 'completed',\n\tin_progress: 'current',\n\tupcoming: 'pending',\n\tblocked: 'error',\n};\n\nconst STATUS_ICON = {\n\tcompleted: Check,\n\tin_progress: Clock,\n\tupcoming: Circle,\n\tblocked: X,\n} as const;\n\n// In progress is a status (info); primary is reserved for the main command.\nconst STATUS_BADGE: Record<MilestoneStatus, 'success' | 'info' | 'secondary' | 'destructive'> = {\n\tcompleted: 'success',\n\tin_progress: 'info',\n\tupcoming: 'secondary',\n\tblocked: 'destructive',\n};\n\nexport function MilestonesTimeline({\n\tmilestones,\n\tclassName,\n\tstrings: stringsProp,\n}: MilestonesTimelineProps) {\n\tconst strings = useStrings(defaultMilestonesTimelineStrings, stringsProp);\n\tconst labelByStatus: Record<MilestoneStatus, string> = {\n\t\tcompleted: strings.completed,\n\t\tin_progress: strings.in_progress,\n\t\tupcoming: strings.upcoming,\n\t\tblocked: strings.blocked,\n\t};\n\n\tconst items: TimelineItem[] = milestones.map((m: MilestoneItem) => ({\n\t\tid: m.id,\n\t\ttitle: (\n\t\t\t<span className=\"inline-flex flex-wrap items-center gap-space-sm\">\n\t\t\t\t<Text type=\"inherit\" tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\">\n\t\t\t\t\t{m.title}\n\t\t\t\t</Text>\n\t\t\t\t<Badge tone={STATUS_BADGE[m.status]}>\n\t\t\t\t\t{labelByStatus[m.status]}\n\t\t\t\t</Badge>\n\t\t\t</span>\n\t\t),\n\t\tdescription: m.description,\n\t\ttimestamp: m.dueDate ? `${strings.dueOn} ${m.dueDate}` : undefined,\n\t\ticon: STATUS_ICON[m.status],\n\t\tstatus: STATUS_TO_TIMELINE[m.status],\n\t\tchildren:\n\t\t\tm.status === 'in_progress' && typeof m.progress === 'number' ? (\n\t\t\t\t<Stack gap=\"xs\" className=\"milestones-timeline--progress\">\n\t\t\t\t\t<Progress value={m.progress} aria-label={labelByStatus.in_progress} />\n\t\t\t\t\t<Percent value={Math.round(m.progress)} scaled size=\"xs\" type=\"secondary\" align=\"left\" />\n\t\t\t\t</Stack>\n\t\t\t) : undefined,\n\t}));\n\n\treturn (\n\t\t<div\n\t\t\tdata-component=\"milestones-timeline\"\n\t\t\tdata-slot=\"milestones-timeline\"\n\t\t\tclassName={cn('milestones-timeline--component', className)}\n\t\t>\n\t\t\t<Timeline items={items} dotSize=\"md\" />\n\t\t</div>\n\t);\n}\n\nMilestonesTimeline.displayName = 'MilestonesTimeline';\n"],"mappings":";;;;;;;;;;;;;;;AAsDA,IAAMS,IAA0C;CAC/C,IAAI;CACJ,IAAI;CACJ,IAAI;AACL,GAEMC,IAA2C;CAChD,IAAI;CACJ,IAAI;CACJ,IAAI;AACL,GAEMC,IAAgG;CACrG,WAAW;EAAE,IAAIC,EAAY,QAAQ;EAAO,MAAM;EAA2B,MAAMA,EAAY,QAAQ;EAAM,MAAMA,EAAY,QAAQ;CAAK;CAC5I,SAAS;EAAE,IAAIA,EAAY,QAAQ;EAAO,MAAM;EAA2B,MAAMA,EAAY,QAAQ;EAAM,MAAMA,EAAY,QAAQ;CAAK;CAC1I,SAAS;EAAE,IAAI;EAAY,MAAM;EAAyB,MAAM;EAAe,MAAM;CAAY;CACjG,SAAS;EAAE,IAAIA,EAAY,QAAQ;EAAO,MAAM;EAA2B,MAAMA,EAAY,QAAQ;EAAM,MAAMA,EAAY,QAAQ;CAAK;CAC1I,SAAS;EAAE,IAAIA,EAAY,QAAQ;EAAO,MAAM;EAA2B,MAAMA,EAAY,QAAQ;EAAM,MAAMA,EAAY,QAAQ;CAAK;CAC1I,OAAO;EAAE,IAAIA,EAAY,YAAY;EAAO,MAAM;EAA+B,MAAMA,EAAY,YAAY;EAAM,MAAMA,EAAY,YAAY;CAAK;CACxJ,SAAS;EAAE,IAAI;EAAW,MAAM;EAAwB,MAAM;EAAe,MAAM;CAAY;AAChG;AAEA,SAAgBC,EAAS,EAAE,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EAAYO,EAAE;EACpB,QAAQR,EAAmBQ,EAAE;EAC7B,UACCA,EAAE,WAAW,iBAAiB,OAAOA,EAAE,YAAa,WACnD,kBAAC7D,GAAD;GAAO,KAAI;GAAK,WAAU;GAA1B,UAAA,CACC,kBAACC,GAAD;IAAU,OAAO4D,EAAE;IAAU,cAAYF,EAAc;GAAc,CAAA,GACrE,kBAACvD,GAAD;IAAS,OAAO,KAAK,MAAMyD,EAAE,QAAQ;IAAG,QAAA;IAAO,MAAK;IAAK,MAAK;IAAY,OAAM;GAAQ,CAAA,CAClF;EACJ,CAAA,IAAA,KAAA;CACN,EAAE;CAEF,OACC,kBAAC,OAAD;EACC,kBAAe;EACf,aAAU;EACV,WAAWhD,EAAG,kCAAkCC,CAAS;EAEzD,UAAA,kBAACF,GAAD;GAAiB;GAAO,SAAQ;EAAM,CAAA;CAClC,CAAA;AAEP;AAEA,EAAmB,cAAc"}
|
package/dist/tooltip-yiRJUFjp.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { r as e } from "./theme-scope-BJ6eE2xt.js";
|
|
3
|
-
import { t } from "./utils-BRhFDwuU.js";
|
|
4
|
-
import { c as n } from "./typography-UTnveOEy.js";
|
|
5
|
-
import { t as r } from "./anchored-positioning-DPnKTvNs.js";
|
|
6
|
-
import { t as i } from "./motion-recipes-ChBg4HBq.js";
|
|
7
|
-
import { t as a } from "./slot-CLF9kLrS.js";
|
|
8
|
-
import { createContext as o, useContext as s, useId as c, useLayoutEffect as l, useState as u } from "react";
|
|
9
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
-
import { Tooltip as p } from "@base-ui/react/tooltip";
|
|
11
|
-
//#region src/components/ui/tooltip.tsx
|
|
12
|
-
function m({ delay: e = 0, delayDuration: t, ...n }) {
|
|
13
|
-
return /* @__PURE__ */ d(p.Provider, {
|
|
14
|
-
"data-slot": "tooltip-provider",
|
|
15
|
-
delay: t ?? e,
|
|
16
|
-
...n
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function h({ ...e }) {
|
|
20
|
-
return /* @__PURE__ */ d(m, { children: /* @__PURE__ */ d(p.Root, {
|
|
21
|
-
"data-slot": "tooltip",
|
|
22
|
-
...e
|
|
23
|
-
}) });
|
|
24
|
-
}
|
|
25
|
-
function g({ asChild: e = !1, render: t, children: n, ...r }) {
|
|
26
|
-
let i = e ? /* @__PURE__ */ d(a, {}) : void 0, o = typeof t == "function" ? ((e, n) => {
|
|
27
|
-
let { nativeButton: r, ...i } = e;
|
|
28
|
-
return t(i, n);
|
|
29
|
-
}) : t;
|
|
30
|
-
return /* @__PURE__ */ d(p.Trigger, {
|
|
31
|
-
"data-slot": "tooltip-trigger",
|
|
32
|
-
render: i ?? o,
|
|
33
|
-
...r,
|
|
34
|
-
children: n
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function _({ className: n, container: a, side: o = "top", sideOffset: s = 4, align: c = "center", alignOffset: l = 0, positionMethod: u = r, children: m, ...h }) {
|
|
38
|
-
let g = e(a);
|
|
39
|
-
return /* @__PURE__ */ d(p.Portal, {
|
|
40
|
-
container: g,
|
|
41
|
-
children: /* @__PURE__ */ d(p.Positioner, {
|
|
42
|
-
positionMethod: u,
|
|
43
|
-
align: c,
|
|
44
|
-
alignOffset: l,
|
|
45
|
-
side: o,
|
|
46
|
-
sideOffset: s,
|
|
47
|
-
className: "isolate z-50",
|
|
48
|
-
children: /* @__PURE__ */ f(p.Popup, {
|
|
49
|
-
"data-slot": "tooltip-content",
|
|
50
|
-
className: t(i.popup, "rounded-radius px-space-md py-space-xs text-xs bg-inverse-background text-inverse-foreground z-50 w-fit max-w-xs origin-(--transform-origin)", n),
|
|
51
|
-
...h,
|
|
52
|
-
children: [m, /* @__PURE__ */ d(p.Arrow, { className: "size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 bg-inverse-background fill-inverse-background z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })]
|
|
53
|
-
})
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/components/base/display/tooltip.tsx
|
|
59
|
-
var v = o(void 0), y = o(!1);
|
|
60
|
-
function b(e) {
|
|
61
|
-
let t = s(y), n = c(), [r, i] = u(n), a = /* @__PURE__ */ d(v.Provider, {
|
|
62
|
-
value: {
|
|
63
|
-
id: r,
|
|
64
|
-
setId: i
|
|
65
|
-
},
|
|
66
|
-
children: /* @__PURE__ */ d(p.Root, {
|
|
67
|
-
"data-slot": "tooltip",
|
|
68
|
-
...e
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
return t ? a : /* @__PURE__ */ d(m, { children: a });
|
|
72
|
-
}
|
|
73
|
-
function x(e) {
|
|
74
|
-
return /* @__PURE__ */ d(y.Provider, {
|
|
75
|
-
value: !0,
|
|
76
|
-
children: /* @__PURE__ */ d(m, { ...e })
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function S({ className: e, ...n }) {
|
|
80
|
-
let r = s(v)?.id;
|
|
81
|
-
return /* @__PURE__ */ d(g, {
|
|
82
|
-
className: t("tooltip-trigger--component active:translate-y-0!", e),
|
|
83
|
-
...n,
|
|
84
|
-
"aria-describedby": [n["aria-describedby"], r].filter(Boolean).join(" ") || void 0
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
function C({ children: e, className: r, ...i }) {
|
|
88
|
-
let a = s(v), o = i.id ?? a?.id;
|
|
89
|
-
l(() => {
|
|
90
|
-
o && a?.setId(o);
|
|
91
|
-
}, [o, a?.setId]);
|
|
92
|
-
let c = typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */ d(n, {
|
|
93
|
-
tag: "span",
|
|
94
|
-
size: "inherit",
|
|
95
|
-
lineHeight: "snug",
|
|
96
|
-
className: "tooltip-content--text text-inherit",
|
|
97
|
-
children: e
|
|
98
|
-
}) : e;
|
|
99
|
-
return /* @__PURE__ */ d(_, {
|
|
100
|
-
id: o,
|
|
101
|
-
role: "tooltip",
|
|
102
|
-
className: t("tooltip-content--component max-w-xs rounded-radius px-space-md py-space-xs text-xs leading-snug", r),
|
|
103
|
-
...i,
|
|
104
|
-
children: c
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
b.displayName = "Tooltip", x.displayName = "TooltipProvider", S.displayName = "TooltipTrigger", C.displayName = "TooltipContent";
|
|
108
|
-
//#endregion
|
|
109
|
-
export { h as a, S as i, C as n, _ as o, x as r, g as s, b as t };
|
|
110
|
-
|
|
111
|
-
//# sourceMappingURL=tooltip-yiRJUFjp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-yiRJUFjp.js","names":["TooltipProvider","TooltipPrimitive","Tooltip","TooltipTrigger","TooltipContent","Tooltip","BaseTooltip","TooltipProviderPrimitive","TooltipTriggerPrimitive","TooltipContentPrimitive","useThemePortalContainer","Text","anchoredPositionMethod","motionRecipes","Slot","TooltipProvider$1","props","Tooltip","delayDuration","delay","Tooltip$2","TooltipTrigger$1","slotRender","asChild","safeRender","render","_nativeButton","rest","renderProps","state","TooltipContent$1","resolvedContainer","container","cn","className","children","TooltipDescriptionContext","createContext","SharedTooltipProviderContext","Tooltip$1","hasSharedProvider","useContext","generatedId","useId","descriptionId","setDescriptionId","useState","root","TooltipProvider","TooltipTrigger","TooltipContent","description","content"],"sources":["../src/components/ui/tooltip.tsx","../src/components/base/display/tooltip.tsx"],"sourcesContent":["import { anchoredPositionMethod } from '../../lib/anchored-positioning';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\n\nimport { Slot } from \"./slot\"\nimport { cn } from \"../../lib/utils\"\n\nfunction TooltipProvider({\n delay = 0,\n delayDuration,\n ...props\n}: TooltipPrimitive.Provider.Props & { delayDuration?: number }) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delayDuration ?? delay}\n {...props}\n />\n )\n}\n\nfunction Tooltip({ ...props }: TooltipPrimitive.Root.Props) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n )\n}\n\nfunction TooltipTrigger({\n asChild = false,\n render,\n children,\n ...props\n}: TooltipPrimitive.Trigger.Props & { asChild?: boolean }) {\n const slotRender = asChild ? <Slot /> : undefined\n const safeRender: TooltipPrimitive.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\n return (\n <TooltipPrimitive.Trigger\n data-slot=\"tooltip-trigger\"\n render={slotRender ?? safeRender}\n {...props}\n >\n {children}\n </TooltipPrimitive.Trigger>\n )\n}\n\nfunction TooltipContent({\n className,\n container,\n side = \"top\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n positionMethod = anchoredPositionMethod,\n children,\n ...props\n}: TooltipPrimitive.Popup.Props &\n Pick<\n TooltipPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"positionMethod\"\n > & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n return (\n <TooltipPrimitive.Portal container={resolvedContainer}>\n <TooltipPrimitive.Positioner\n positionMethod={positionMethod}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n className={cn(\n motionRecipes.popup,\n \"rounded-radius px-space-md py-space-xs text-xs bg-inverse-background text-inverse-foreground z-50 w-fit max-w-xs origin-(--transform-origin)\",\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 bg-inverse-background fill-inverse-background z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5\" />\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","/** Tokenized base wrappers for short, non-interactive contextual help. */\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport { createContext, useContext, useId, useLayoutEffect, useState, type ComponentProps } from 'react';\n\nimport {\n\tTooltipContent as TooltipContentPrimitive,\n\tTooltipProvider as TooltipProviderPrimitive,\n\tTooltipTrigger as TooltipTriggerPrimitive,\n} from '../../ui/tooltip';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nexport type TooltipProps = ComponentProps<typeof BaseTooltip.Root>;\nexport type TooltipProviderProps = ComponentProps<typeof TooltipProviderPrimitive>;\nexport type TooltipTriggerProps = ComponentProps<typeof TooltipTriggerPrimitive>;\nexport type TooltipContentProps = ComponentProps<typeof TooltipContentPrimitive>;\n\nconst TooltipDescriptionContext = createContext<{ id: string; setId: (id: string) => void } | undefined>(undefined);\n\nconst SharedTooltipProviderContext = createContext(false);\n\n/** Tooltip state root. It does not render a DOM node. */\nexport function Tooltip(props: TooltipProps) {\n\tconst hasSharedProvider = useContext(SharedTooltipProviderContext);\n\tconst generatedId = useId();\n\tconst [descriptionId, setDescriptionId] = useState(generatedId);\n\tconst root = <TooltipDescriptionContext.Provider value={{ id: descriptionId, setId: setDescriptionId }}><BaseTooltip.Root data-slot=\"tooltip\" {...props} /></TooltipDescriptionContext.Provider>;\n\n\treturn hasSharedProvider ? root : <TooltipProviderPrimitive>{root}</TooltipProviderPrimitive>;\n}\n\n/** Shared delay provider for a group of tooltip roots. Nested Tooltip roots reuse it. */\nexport function TooltipProvider(props: TooltipProviderProps) {\n\treturn (\n\t\t<SharedTooltipProviderContext.Provider value>\n\t\t\t<TooltipProviderPrimitive {...props} />\n\t\t</SharedTooltipProviderContext.Provider>\n\t);\n}\n\n/** Polymorphic tooltip anchor. */\nexport function TooltipTrigger({ className, ...props }: TooltipTriggerProps) {\n\tconst description = useContext(TooltipDescriptionContext);\n\tconst descriptionId = description?.id;\n\treturn (\n\t\t<TooltipTriggerPrimitive\n\t\t\tclassName={cn('tooltip-trigger--component active:translate-y-0!', className)}\n\t\t\t{...props}\n\t\t\taria-describedby={[props['aria-describedby'], descriptionId].filter(Boolean).join(' ') || undefined}\n\t\t/>\n\t);\n}\n\n/** Inverse contextual-help surface with package spacing and typography. */\nexport function TooltipContent({ children, className, ...props }: TooltipContentProps) {\n\tconst description = useContext(TooltipDescriptionContext);\n\tconst descriptionId = props.id ?? description?.id;\n\tuseLayoutEffect(() => { if (descriptionId) description?.setId(descriptionId); }, [descriptionId, description?.setId]);\n\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\tconst content = isSimpleText ? (\n\t\t\t<Text\n\t\t\t\ttag=\"span\"\n\t\t\t\tsize=\"inherit\"\n\t\t\t\t\n\t\t\t\tlineHeight=\"snug\"\n\t\t\t\tclassName=\"tooltip-content--text text-inherit\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Text>\n\t\t) : children;\n\n\treturn (\n\t\t<TooltipContentPrimitive\n\t\t\tid={descriptionId}\n\t\t\trole=\"tooltip\"\n\t\t\tclassName={cn(\n\t\t\t\t// One tooltip anatomy everywhere (plain, Button `withTooltip`, TooltipButton):\n\t\t\t\t// the inline inset clears the fully rounded ends of a one-line tooltip.\n\t\t\t\t'tooltip-content--component max-w-xs rounded-radius px-space-md py-space-xs text-xs leading-snug',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{content}\n\t\t</TooltipContentPrimitive>\n\t);\n}\n\nTooltip.displayName = 'Tooltip';\nTooltipProvider.displayName = 'TooltipProvider';\nTooltipTrigger.displayName = 'TooltipTrigger';\nTooltipContent.displayName = 'TooltipContent';\n"],"mappings":";;;;;;;;;;;AAQA,SAASA,EAAgB,EACvB,WAAQ,GACR,kBACA,GAAGgB,KAC4D;CAC/D,OACE,kBAACf,EAAiB,UAAlB;EACE,aAAU;EACV,OAAOiB,KAAiBC;EACxB,GAAIH;CACL,CAAA;AAEL;AAEA,SAASd,EAAQ,EAAE,GAAGc,KAAsC;CAC1D,OACE,kBAAChB,GAAD,EAAA,UACE,kBAACC,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAIe;CAAQ,CAAA,EACxC,CAAA;AAErB;AAEA,SAASb,EAAe,EACtB,aAAU,IACV,WACA,aACA,GAAGa,KACsD;CACzD,IAAMM,IAAaC,IAAU,kBAACT,GAAD,CAAO,CAAA,IAAI,KAAA,GAClCU,IAAuD,OAAOC,KAAW,eACzE,GAAa,MAAU;EACzB,IAAM,EAAE,cAAcC,GAAe,GAAGC,MAASC;EAEjD,OAAOH,EAAOE,GAA4BE,CAAK;CACjD,KACEJ;CAEJ,OACE,kBAACxB,EAAiB,SAAlB;EACE,aAAU;EACV,QAAQqB,KAAcE;EACtB,GAAIR;EAEH;CACuB,CAAA;AAE9B;AAEA,SAASZ,EAAe,EACtB,cACA,cACA,UAAO,OACP,gBAAa,GACb,WAAQ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ACA,EAAM,qBAAqB4B,CAAa,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;CAC1F,CAAA;AAEH;AAGA,SAAgBM,EAAe,EAAE,aAAU,cAAW,GAAGlC,KAA8B;CACtF,IAAMmC,IAAcV,EAAWL,CAAyB,GAClDQ,IAAgB5B,EAAM,MAAMmC,GAAa;CAC/C,QAAsB;EAAE,AAAIP,KAAeO,GAAa,MAAMP,CAAa;CAAG,GAAG,CAACA,GAAeO,GAAa,KAAK,CAAC;CAEpH,IAAMC,IADe,OAAOjB,KAAa,YAAY,OAAOA,KAAa,YAAY,OAAOA,KAAa,WAEvG,kBAACxB,GAAD;EACC,KAAI;EACJ,MAAK;EAEL,YAAW;EACX,WAAU;EAET;CACI,CAAA,IACHwB;CAEL,OACC,kBAAC1B,GAAD;EACC,IAAImC;EACJ,MAAK;EACL,WAAWX,EAGV,mGACAC,CACD;EACA,GAAIlB;EAEH,UAAAoC;CACuB,CAAA;AAE3B;AAEA,EAAQ,cAAc,WACtB,EAAgB,cAAc,mBAC9B,EAAe,cAAc,kBAC7B,EAAe,cAAc"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { m as e, s as t, v as n } from "./ui-provider-C_U0Xma4.js";
|
|
3
|
-
import { t as r } from "./utils-BRhFDwuU.js";
|
|
4
|
-
import { o as i, r as a, t as o } from "./text.styles-g4He6UIW.js";
|
|
5
|
-
import { t as s } from "./focus-recipes-B653VaLq.js";
|
|
6
|
-
import { createContext as c, forwardRef as l, useContext as u } from "react";
|
|
7
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
-
//#region src/components/typography/running-text.ts
|
|
9
|
-
var p = c(!1);
|
|
10
|
-
function m() {
|
|
11
|
-
return u(p);
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/components/typography/text.tsx
|
|
15
|
-
var h = l(function({ content: t, children: n, type: a = "main", size: o, weight: s, align: c, lineHeight: l, numeric: u, invert: f = !1, tag: m = "p", className: h, ...g }, _) {
|
|
16
|
-
let { defaultTextSize: v } = e(), y = n ?? t;
|
|
17
|
-
return y == null || y === "" ? null : /* @__PURE__ */ d(m, {
|
|
18
|
-
"data-typography": "text",
|
|
19
|
-
...g,
|
|
20
|
-
ref: _,
|
|
21
|
-
className: r("text--component", i({
|
|
22
|
-
type: f ? "inverse" : a,
|
|
23
|
-
size: o ?? v,
|
|
24
|
-
weight: s,
|
|
25
|
-
align: c,
|
|
26
|
-
lineHeight: l,
|
|
27
|
-
numeric: u
|
|
28
|
-
}), h),
|
|
29
|
-
children: /* @__PURE__ */ d(p.Provider, {
|
|
30
|
-
value: !0,
|
|
31
|
-
children: y
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/components/typography/heading.tsx
|
|
37
|
-
function g({ tag: e = "h3", size: t = "base", subHeading: n, subHeadingClassName: i, subHeadingSize: s, containerClassName: c, align: l = "left", divider: u = !1, className: m, children: g, ref: _, ...v }) {
|
|
38
|
-
return /* @__PURE__ */ f("div", {
|
|
39
|
-
className: r("heading--component flex min-w-0 flex-col gap-dense", a[l], c),
|
|
40
|
-
children: [g != null && /* @__PURE__ */ d(e, {
|
|
41
|
-
...v,
|
|
42
|
-
ref: _,
|
|
43
|
-
"data-typography": "heading",
|
|
44
|
-
className: r("heading--title m-0 font-heading", o[t], "font-semibold text-foreground text-balance break-words", a[l], u && "border-b border-border pb-space-md", m),
|
|
45
|
-
children: /* @__PURE__ */ d(p.Provider, {
|
|
46
|
-
value: !0,
|
|
47
|
-
children: g
|
|
48
|
-
})
|
|
49
|
-
}), n != null && /* @__PURE__ */ d(h, {
|
|
50
|
-
type: "secondary",
|
|
51
|
-
size: s,
|
|
52
|
-
align: l,
|
|
53
|
-
className: i,
|
|
54
|
-
children: n
|
|
55
|
-
})]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/components/typography/display-label.tsx
|
|
60
|
-
function _({ tag: e = "span", tone: t = "default", className: n, ...i }) {
|
|
61
|
-
return /* @__PURE__ */ d(h, {
|
|
62
|
-
...i,
|
|
63
|
-
tag: e,
|
|
64
|
-
size: "sm",
|
|
65
|
-
type: "main",
|
|
66
|
-
weight: "medium",
|
|
67
|
-
lineHeight: "tight",
|
|
68
|
-
"data-typography": "display-label",
|
|
69
|
-
className: r("display-label--component", t === "inverse" && "text-inverse-muted", n)
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/components/typography/label.tsx
|
|
74
|
-
var v = {
|
|
75
|
-
sm: "text-xs",
|
|
76
|
-
md: "text-sm",
|
|
77
|
-
lg: "text-base"
|
|
78
|
-
};
|
|
79
|
-
function y({ content: e, children: i, size: a, className: o, ref: s, ...c }) {
|
|
80
|
-
let { defaultScale: l } = t();
|
|
81
|
-
return /* @__PURE__ */ d("label", {
|
|
82
|
-
...c,
|
|
83
|
-
ref: s,
|
|
84
|
-
"data-typography": "label",
|
|
85
|
-
className: r("label--component font-sans font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50", v[n(a, l)], o),
|
|
86
|
-
children: /* @__PURE__ */ d(p.Provider, {
|
|
87
|
-
value: !0,
|
|
88
|
-
children: i ?? e
|
|
89
|
-
})
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/components/typography/text-link.tsx
|
|
94
|
-
var b = `w-fit max-w-full rounded-radius-xs outline-none box-decoration-clone transition-colors motion-reduce:transition-none ${s.text}`, x = "underline decoration-current underline-offset-[0.2em]", S = "[&_a]:w-fit [&_a]:max-w-full [&_a]:rounded-radius-xs [&_a]:outline-none [&_a]:box-decoration-clone [&_a]:transition-colors motion-reduce:[&_a]:transition-none [&_a]:text-inherit [&_a]:underline [&_a]:decoration-current [&_a]:underline-offset-[0.2em] [&_a:hover]:decoration-transparent [&_a:focus-visible]:outline-solid [&_a:focus-visible]:outline-1 [&_a:focus-visible]:outline-offset-0 [&_a:focus-visible]:outline-ring [&_a:focus-visible]:ring-3 [&_a:focus-visible]:ring-ring/50";
|
|
95
|
-
function C({ type: t = "main", size: n, weight: a, align: o, lineHeight: s, underline: c = !0, className: l, ref: u, children: f, ...h }) {
|
|
96
|
-
let { defaultTextSize: g } = e(), _ = m();
|
|
97
|
-
return /* @__PURE__ */ d("a", {
|
|
98
|
-
...h,
|
|
99
|
-
ref: u,
|
|
100
|
-
"data-typography": "link",
|
|
101
|
-
className: r("text-link--component", b, i({
|
|
102
|
-
type: t,
|
|
103
|
-
size: n ?? (_ ? "inherit" : g),
|
|
104
|
-
weight: a ?? (_ ? "inherit" : void 0),
|
|
105
|
-
align: o,
|
|
106
|
-
lineHeight: s ?? (_ ? "inherit" : void 0)
|
|
107
|
-
}), c ? `${x} hover:decoration-transparent` : "no-underline", l),
|
|
108
|
-
children: /* @__PURE__ */ d(p.Provider, {
|
|
109
|
-
value: !0,
|
|
110
|
-
children: f
|
|
111
|
-
})
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
//#endregion
|
|
115
|
-
export { y as a, h as c, x as i, p as l, S as n, _ as o, b as r, g as s, C as t, m as u };
|
|
116
|
-
|
|
117
|
-
//# sourceMappingURL=typography-UTnveOEy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typography-UTnveOEy.js","names":["useTypographyConfig","useDensityConfig","resolveComponentScale","cn","textVariants","textAlignments","headingSizes","focusRecipes","RunningTextContext","createContext","useInRunningText","useContext","Text","forwardRef","Tag","props","value","children","content","invert","type","size","defaultTextSize","className","Heading","align","containerClassName","divider","subHeading","subHeadingSize","subHeadingClassName","DisplayLabel","tone","sizes","Label","defaultScale","inlineLinkClassName","linkUnderlineClassName","descendantInlineLinkClassName","TextLink","inText","weight","lineHeight","underline"],"sources":["../src/components/typography/running-text.ts","../src/components/typography/text.tsx","../src/components/typography/heading.tsx","../src/components/typography/display-label.tsx","../src/components/typography/label.tsx","../src/components/typography/text-link.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\n/**\n * True below an element that renders running text: `Text`, `Heading`,\n * `DisplayLabel`, `Label`, `TextLink` and the inline value primitives.\n *\n * Inline value primitives read it to tell a value inside a sentence from a\n * standalone value. Inside running text their unset size, colour, weight and\n * leading inherit from the surrounding text; standalone values keep their role\n * defaults. Explicit props always win.\n */\nexport const RunningTextContext = createContext(false);\n\n/** Whether the caller renders inside running text owned by a typography role. */\nexport function useInRunningText(): boolean {\n\treturn useContext(RunningTextContext);\n}\n","import { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from 'react';\nimport { useTypographyConfig, type TextSize } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext } from './running-text';\nimport { textVariants, type textTypes, type textWeights, type textAlignments, type textLineHeights } from './text.styles';\n\nexport interface TextProps extends Omit<ComponentPropsWithoutRef<'p'>, 'children'> {\n /** Plain text fallback; children take precedence, including zero and empty strings. */\n content?: string;\n children?: ReactNode;\n /** Colour role. Defaults to `main`; `inherit` keeps the surrounding text colour. */\n type?: keyof typeof textTypes;\n /** Text size. Defaults to the provider `typography.defaultTextSize` (`sm`). */\n size?: TextSize;\n /** Font weight. Defaults to `regular`; `inherit` keeps the surrounding weight. */\n weight?: keyof typeof textWeights;\n /** Text alignment. Defaults to `left`; `left` and `right` follow the reading direction. */\n align?: keyof typeof textAlignments;\n /** Line height. Defaults to `normal`; `inherit` keeps the surrounding leading. */\n lineHeight?: keyof typeof textLineHeights;\n /** Renders the inverse colour role on inverse surfaces. Defaults to `false`. */\n invert?: boolean;\n /**\n * Monospace with tabular figures, for identifiers and code-like values. Numbers,\n * amounts and dates use the number primitives (tabular sans figures) instead.\n * Defaults to `false`.\n */\n numeric?: boolean;\n /** Rendered element. Defaults to `p`. */\n tag?: 'div' | 'p' | 'span';\n}\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text({\n content, children, type = 'main', size, weight, align, lineHeight,\n numeric, invert = false, tag: Tag = 'p', className, ...props\n}, ref) {\n const {defaultTextSize} = useTypographyConfig();\n const value = children ?? content;\n if (value === undefined || value === null || value === '') return null;\n return <Tag data-typography=\"text\" {...props} ref={ref as never} className={cn('text--component', textVariants({type: invert ? 'inverse' : type, size: size ?? defaultTextSize, weight, align, lineHeight, numeric}), className)}>\n <RunningTextContext.Provider value>{value}</RunningTextContext.Provider>\n </Tag>;\n});\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext } from './running-text';\nimport { headingSizes, textAlignments } from './text.styles';\nimport { Text } from './text';\n\nexport type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\nexport type HeadingSize = keyof typeof headingSizes;\nexport interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n ref?: Ref<HTMLHeadingElement>;\n /** Semantic outline level. Defaults to `h3`; it never changes the visual size. */\n tag?: HeadingTag;\n /**\n * Visual emphasis, independent of `tag`. Defaults to the compact admin `base`.\n * `xl` and larger tighten tracking; `2xl` and larger also tighten leading.\n */\n size?: HeadingSize;\n /** Secondary line under the title, rendered as secondary `Text`. */\n subHeading?: ReactNode;\n subHeadingClassName?: string;\n /** Text size of `subHeading`; defaults to the provider text size. */\n subHeadingSize?: TextSize;\n containerClassName?: string;\n /** Text alignment for the title and sub-heading. Defaults to `left`. */\n align?: keyof typeof textAlignments;\n /** Adds a bottom rule under the title. Defaults to `false`. */\n divider?: boolean;\n}\n\n/** Semantic heading levels share Themelia's restrained admin heading scale. */\nexport function Heading({tag: Tag = 'h3', size = 'base', subHeading, subHeadingClassName, subHeadingSize, containerClassName, align = 'left', divider = false, className, children, ref, ...props}: HeadingProps) {\n return <div className={cn('heading--component flex min-w-0 flex-col gap-dense', textAlignments[align], containerClassName)}>\n {children != null && <Tag {...props} ref={ref} data-typography=\"heading\" className={cn('heading--title m-0 font-heading', headingSizes[size], 'font-semibold text-foreground text-balance break-words', textAlignments[align], divider && 'border-b border-border pb-space-md', className)}><RunningTextContext.Provider value>{children}</RunningTextContext.Provider></Tag>}\n {subHeading != null && <Text type=\"secondary\" size={subHeadingSize} align={align} className={subHeadingClassName}>{subHeading}</Text>}\n </div>;\n}\n","import { Text, type TextProps } from './text';\nimport { cn } from '../../lib/utils';\n\nexport interface DisplayLabelProps extends Omit<TextProps, 'size' | 'type' | 'weight' | 'lineHeight'> {tone?: 'default' | 'inverse'}\nexport function DisplayLabel({tag = 'span', tone = 'default', className, ...props}: DisplayLabelProps) {\n return <Text {...props} tag={tag} size=\"sm\" type=\"main\" weight=\"medium\" lineHeight=\"tight\" data-typography=\"display-label\" className={cn('display-label--component', tone === 'inverse' && 'text-inverse-muted', className)} />;\n}\n","import type { LabelHTMLAttributes, ReactNode, Ref } from 'react';\nimport type { ComponentScale } from '../../lib/component-vocabulary';\nimport { useDensityConfig } from '../../lib/ui-provider';\nimport { resolveComponentScale } from '../../lib/ui-provider/scale';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext } from './running-text';\n\nexport interface LabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'content'> {\n /** Fallback content; children take precedence. */\n content?: ReactNode;\n /** Control scale the caption belongs to (`sm` → xs, `md` → sm, `lg` → base). Defaults to the provider density scale. */\n size?: ComponentScale;\n ref?: Ref<HTMLLabelElement>;\n}\nconst sizes = {sm: 'text-xs', md: 'text-sm', lg: 'text-base'} as const;\n/** Form caption for a control; medium weight, foreground, no incidental margins. */\nexport function Label({content, children, size, className, ref, ...props}: LabelProps) {\n const {defaultScale} = useDensityConfig();\n return <label {...props} ref={ref} data-typography=\"label\" className={cn('label--component font-sans font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50', sizes[resolveComponentScale(size, defaultScale)], className)}>\n <RunningTextContext.Provider value>{children ?? content}</RunningTextContext.Provider>\n </label>;\n}\n","import type { AnchorHTMLAttributes, Ref } from 'react';\nimport { useTypographyConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext, useInRunningText } from './running-text';\nimport { textVariants } from './text.styles';\nimport type { TextProps } from './text';\nimport { focusRecipes } from '../../lib/focus-recipes';\n\n/**\n * Inline-link mechanics shared by `TextLink` and the link primitives. As a flex\n * or grid item the link hugs its text, so neither the hit area nor the focus\n * ring stretches across the row. The shared focus edge sits just outside the\n * glyphs inside the soft halo, uses the small radius role and follows every line\n * of a wrapped link. Links keep one colour whether\n * or not they were visited: the role colour is explicit.\n */\nexport const inlineLinkClassName = `w-fit max-w-full rounded-radius-xs outline-none box-decoration-clone transition-colors motion-reduce:transition-none ${focusRecipes.text}`;\n\n/** Underline geometry shared with content links: proportional to the text size. */\nexport const linkUnderlineClassName = 'underline decoration-current underline-offset-[0.2em]';\n\n/** Private counterpart for native anchors inside package-owned copy regions.\n * Keep selectors literal for the standalone stylesheet. These anchors inherit\n * the region's colour and follow TextLink's focus and underline mechanics. */\nexport const descendantInlineLinkClassName = '[&_a]:w-fit [&_a]:max-w-full [&_a]:rounded-radius-xs [&_a]:outline-none [&_a]:box-decoration-clone [&_a]:transition-colors motion-reduce:[&_a]:transition-none [&_a]:text-inherit [&_a]:underline [&_a]:decoration-current [&_a]:underline-offset-[0.2em] [&_a:hover]:decoration-transparent [&_a:focus-visible]:outline-solid [&_a:focus-visible]:outline-1 [&_a:focus-visible]:outline-offset-0 [&_a:focus-visible]:outline-ring [&_a:focus-visible]:ring-3 [&_a:focus-visible]:ring-ring/50';\n\nexport interface TextLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'type'>, Pick<TextProps, 'type' | 'size' | 'weight' | 'align' | 'lineHeight'> {\n /** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n size?: TextProps['size'];\n /**\n * Underlined at rest, clearing on hover. Defaults to `true`; keep it for links\n * whose colour matches the surrounding text. `false` renders no underline and\n * leaves the hover treatment to the composition (a row, chip or menu).\n */\n underline?: boolean;\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/**\n * Native anchor sibling of `Text`: the same roles plus link focus and hover\n * states. Inside running text an unset size, weight and leading follow the\n * sentence; the colour role stays, so the link still reads as a link.\n */\nexport function TextLink({type = 'main', size, weight, align, lineHeight, underline = true, className, ref, children, ...props}: TextLinkProps) {\n const {defaultTextSize} = useTypographyConfig();\n const inText = useInRunningText();\n return <a {...props} ref={ref} data-typography=\"link\" className={cn('text-link--component', inlineLinkClassName, textVariants({type, size: size ?? (inText ? 'inherit' : defaultTextSize), weight: weight ?? (inText ? 'inherit' : undefined), align, lineHeight: lineHeight ?? (inText ? 'inherit' : undefined)}), underline ? `${linkUnderlineClassName} hover:decoration-transparent` : 'no-underline', className)}>\n <RunningTextContext.Provider value>{children}</RunningTextContext.Provider>\n </a>;\n}\n"],"mappings":";;;;;;;;AAWA,IAAaQ,IAAqBC,EAAc,EAAK;AAGrD,SAAgBC,IAA4B;CAC3C,OAAOC,EAAWH,CAAkB;AACrC;;;ACgBA,IAAaI,IAAOC,EAAmC,SAAc,EACnE,YAAS,aAAU,UAAO,QAAQ,SAAM,WAAQ,UAAO,eACvD,YAAS,YAAS,IAAO,KAAKC,IAAM,KAAK,cAAW,GAAGC,KACtD,GAAK;CACN,IAAM,EAAC,uBAAmBf,EAAoB,GACxCgB,IAAQC,KAAYC;CAE1B,OADIF,KAAiC,QAAQA,MAAU,KAAW,OAC3D,kBAACF,GAAD;EAAK,mBAAgB;EAAO,GAAIC;EAAY;EAAc,WAAWZ,EAAG,mBAAmBC,EAAa;GAAC,MAAMe,IAAS,YAAYC;GAAM,MAAMC,KAAQC;GAAiB;GAAQ;GAAO;GAAY;EAAO,CAAC,GAAGC,CAAS;EAC7N,UAAA,kBAACf,EAAmB,UAApB;GAA6B,OAAA;GAAO,UAAAQ;EAAmC,CAAA;CACpE,CAAA;AACP,CAAC;;;ACXD,SAAgBQ,EAAQ,EAA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