themelia-react-ui 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +135 -0
- package/README.md +113 -18
- package/dist/{accordion-96o0pN62.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/{action-menu-CHgs8vmj.js → action-menu-Dr8K-ghE.js} +48 -45
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-B8yGOr8-.js → affordance-geometry.generated-P-aVJisu.js} +36 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-BZUGwBq6.js → ai-artifact-C58tQcBy.js} +210 -174
- package/dist/ai-artifact-C58tQcBy.js.map +1 -0
- package/dist/app-shell-B_IuNWOo.js +321 -0
- package/dist/app-shell-B_IuNWOo.js.map +1 -0
- package/dist/{attachment-DkoqHPPl.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-DkoqHPPl.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-D2FVZ1MH.js → auth-DTkkshS8.js} +43 -46
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DWO_HHhB.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-DErMA7ul.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-DErMA7ul.js.map → badge-xIiV_E7f.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +12 -12
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +7 -7
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +36 -36
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-CdfIkCsV.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +21 -21
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +230 -216
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +325 -306
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1259 -1184
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-B-WFKecD.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-B-WFKecD.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DkmK-z8E.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-BbfzgczK.js → buttons-BedGfygC.js} +16 -16
- package/dist/buttons-BedGfygC.js.map +1 -0
- package/dist/cards-rNX1M4Xn.js +69 -0
- package/dist/cards-rNX1M4Xn.js.map +1 -0
- package/dist/cascader-B1MiqkBq.js +439 -0
- package/dist/cascader-B1MiqkBq.js.map +1 -0
- package/dist/chart-Darg_0Kv.js +162 -0
- package/dist/chart-Darg_0Kv.js.map +1 -0
- package/dist/{checkbox-CzYUTPeJ.js → checkbox-fflqmODR.js} +2 -2
- package/dist/{checkbox-CzYUTPeJ.js.map → checkbox-fflqmODR.js.map} +1 -1
- package/dist/{choice-inputs-JLtij2y4.js → choice-inputs-zUgBZfE4.js} +258 -257
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-CGNaUtAE.js → code-block-BzmM9Eig.js} +8 -8
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-Do4G0zcC.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-Do4G0zcC.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-C0e8SsTm.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-C0e8SsTm.js.map → collection-content-gDh1v6O4.js.map} +1 -1
- package/dist/combobox-BEx0vJgF.js +362 -0
- package/dist/combobox-BEx0vJgF.js.map +1 -0
- package/dist/{combobox-CBJDs6w_.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-D8NrBj-b.js → command-CrlPIL6m.js} +11 -11
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-Di4w0H_S.js → comments-Dmpp0YIc.js} +29 -29
- package/dist/{comments-Di4w0H_S.js.map → comments-Dmpp0YIc.js.map} +1 -1
- package/dist/components/base/action-menu/action-menu.d.ts +7 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +6 -4
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +3 -4
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/workflow.d.ts +7 -1
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +1 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +10 -3
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +27 -5
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +3 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/features/activities/activities.types.d.ts +8 -2
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -0
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +1 -1
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +21 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
- package/dist/components/features/media-library/media-library.types.d.ts +14 -4
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +43 -6
- package/dist/components/features/resource/resource.d.ts +5 -1
- package/dist/components/features/resource/resource.types.d.ts +12 -1
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +6 -6
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +9 -2
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +36 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +5 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +48 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/{containers-CRmHf7GP.js → containers-CIxwbZt5.js} +26 -18
- package/dist/containers-CIxwbZt5.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-CnGCZdX4.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-CnGCZdX4.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-D4oujtx0.js → data-display-BdgCAw8T.js} +268 -277
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-Q7jnXxpk.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-Q7jnXxpk.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-zOt1oNss.js → date-picker-RlIzKom_.js} +446 -437
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/{date-pickers-cj8IXbDC.js → date-pickers-DY-CpXS1.js} +12 -12
- package/dist/{date-pickers-cj8IXbDC.js.map → date-pickers-DY-CpXS1.js.map} +1 -1
- package/dist/{display-BB4BL_-K.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-BB4BL_-K.js.map → display-KsZLw9Ov.js.map} +1 -1
- package/dist/dropdown-menu-CLs8Lihj.js +194 -0
- package/dist/dropdown-menu-CLs8Lihj.js.map +1 -0
- package/dist/features/activities.js +302 -253
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +15 -14
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +22 -22
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +237 -238
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +140 -146
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +167 -138
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +6 -7
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +269 -260
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +375 -326
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1266 -1193
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +13 -13
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +69 -66
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +13 -13
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +94 -95
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-DZNL5Lg1.js → feedback-Dm4izqFn.js} +80 -79
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DjwGx8eM.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-BcT-uoFy.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CsgRmdit.js → form-field-BriWAXyg.js} +6 -6
- package/dist/{form-field-CsgRmdit.js.map → form-field-BriWAXyg.js.map} +1 -1
- package/dist/{form-sizing-NXgjkmBG.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/{forms-BV5m5aQF.js → forms-C0RGnJTe.js} +17 -13
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-Cd33AKbD.js → forms-numeric-DIhghX1Q.js} +86 -82
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BA697l4a.js → header-DMMxG__r.js} +67 -63
- package/dist/header-DMMxG__r.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/{hooks-BQ-L7Uu2.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-COWbCCWu.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-COWbCCWu.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/{input-Cdw4k0fb.js → input-CvyDQlY7.js} +8 -8
- package/dist/{input-Cdw4k0fb.js.map → input-CvyDQlY7.js.map} +1 -1
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/{item-BvZ2DR_x.js → item-DjCcM18E.js} +16 -16
- package/dist/item-DjCcM18E.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +11 -11
- package/dist/lib/affordance-geometry.generated.d.ts +35 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/token-merge.generated.d.ts +13 -10
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-CSl5W1Fy.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-CSl5W1Fy.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-RKOQaaIB.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-RKOQaaIB.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-INU2xsxu.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/{metadata-list-qVV7AVxa.js → metadata-list-C3MkU-Om.js} +64 -64
- package/dist/metadata-list-C3MkU-Om.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-C90-oQFq.js +255 -0
- package/dist/navigation-C90-oQFq.js.map +1 -0
- package/dist/{navigation-BQNcg1jT.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-WZEs-hYo.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-E_OiIfJz.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-E_OiIfJz.js.map → number-CRU3kGuk.js.map} +1 -1
- package/dist/overflow-tab-bar-IVFVQFV6.js +172 -0
- package/dist/overflow-tab-bar-IVFVQFV6.js.map +1 -0
- package/dist/overlays-BSgCtM2v.js +1013 -0
- package/dist/overlays-BSgCtM2v.js.map +1 -0
- package/dist/page-DUUKDAjo.js +331 -0
- package/dist/page-DUUKDAjo.js.map +1 -0
- package/dist/page-header-commands-7P3sfE9u.js +193 -0
- package/dist/page-header-commands-7P3sfE9u.js.map +1 -0
- package/dist/{pagination-Ch8X_47u.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-Ch8X_47u.js.map → pagination-CgCjElfu.js.map} +1 -1
- package/dist/popover-B85RenIl.js +201 -0
- package/dist/popover-B85RenIl.js.map +1 -0
- package/dist/{popover-menu-BYaCdFhf.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-BYaCdFhf.js.map → popover-menu-DlnQ2zlR.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DdiEp0rd.js} +18 -11
- package/dist/popover.recipes-DdiEp0rd.js.map +1 -0
- package/dist/portal-recipes-BpsV_iRw.js +9 -0
- package/dist/portal-recipes-BpsV_iRw.js.map +1 -0
- package/dist/{primitives-Du64iDbb.js → primitives-ByWgGUgt.js} +5 -5
- package/dist/{primitives-Du64iDbb.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-BvF2oCdV.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-BvF2oCdV.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-D789Jwyy.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-CLJEf76s.js → rich-text-Dth5E882.js} +3 -3
- package/dist/{rich-text-CLJEf76s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-Cm1dpUpQ.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-L__e4x47.js → rich-text-editor-toolbar-laT3tpBT.js} +32 -28
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-La5RXsEk.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-La5RXsEk.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-DAEV0w65.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-DAEV0w65.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-GNfPG-90.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-GNfPG-90.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/{settings-BA2iboic.js → settings-Bar5wiSo.js} +31 -38
- package/dist/settings-Bar5wiSo.js.map +1 -0
- package/dist/sheet-BGPERY55.js +250 -0
- package/dist/sheet-BGPERY55.js.map +1 -0
- package/dist/sidebar-D-JYMMbY.js +686 -0
- package/dist/sidebar-D-JYMMbY.js.map +1 -0
- package/dist/sidebar-f9gRWXIR.js +1001 -0
- package/dist/sidebar-f9gRWXIR.js.map +1 -0
- package/dist/skeleton-BapcJd9C.js +265 -0
- package/dist/skeleton-BapcJd9C.js.map +1 -0
- package/dist/smart-card-CW0hjetE.js +617 -0
- package/dist/smart-card-CW0hjetE.js.map +1 -0
- package/dist/{structure-C0V0_Fyf.js → structure-DuxKl954.js} +2 -2
- package/dist/{structure-C0V0_Fyf.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-CpvnzJn9.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-CpvnzJn9.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-DH7rozUv.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-eqVsJZWO.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-DXItiR0O.js → text-inputs-B1culiSK.js} +17 -17
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/theme.css +40 -37
- package/dist/{timelines-DmtztAY_.js → timelines-D3Sl9ueq.js} +13 -12
- package/dist/timelines-D3Sl9ueq.js.map +1 -0
- package/dist/tooltip-8wz5S_Zr.js +113 -0
- package/dist/tooltip-8wz5S_Zr.js.map +1 -0
- package/dist/{tree-CV11PURP.js → tree-CzUJHnFs.js} +8 -8
- package/dist/{tree-CV11PURP.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-CSyJrh28.js → typography-BQnine1k.js} +12 -12
- package/dist/{typography-CSyJrh28.js.map → typography-BQnine1k.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-C9SA0X-8.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-DhQJiSRc.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-DVTRDmGz.js → usage-card-BeSLY0i0.js} +24 -17
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-CF3c95Io.js → utils-B6kKb8jB.js} +237 -141
- package/dist/utils-B6kKb8jB.js.map +1 -0
- package/dist/value-inputs-skdVB2zh.js +980 -0
- package/dist/value-inputs-skdVB2zh.js.map +1 -0
- package/dist/{value-typography-ClupF0Gz.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-ClupF0Gz.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/{workspace-9EFVXUyk.js → workspace-DHeHv0qw.js} +50 -49
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +4 -3
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +52 -1
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +38 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +1 -1
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +24 -11
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +19 -17
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +7131 -1754
- package/docs/consumer-skill/references/composition-mapping.md +17 -3
- package/docs/consumer-skill/references/composition.md +159 -31
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +11 -9
- package/docs/consumer-skill/references/discovery.md +27 -3
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +15 -4
- package/docs/consumer-skill/references/integration.md +35 -0
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +2881 -420
- package/docs/consumer-skill/references/review.md +39 -2
- package/docs/consumer-skill/references/rhf-workflows.md +7 -0
- package/docs/consumer-skill/references/screen-archetypes.md +19 -7
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +17 -18
- package/docs/consumer-skill/references/tokens.json +9 -9
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +7 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.mjs +1 -1
- package/docs/consumer-skill/scripts/composition.mjs +61 -5
- package/docs/consumer-skill/scripts/discovery.mjs +54 -0
- package/docs/consumer-skill/scripts/inspect-component.mjs +1 -1
- package/docs/consumer-skill/scripts/inspection.mjs +73 -18
- package/docs/consumer-skill/scripts/setup-skills.mjs +41 -6
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +14 -13
- package/docs/consumer-skills/themelia-composition/SKILL.md +16 -17
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +2 -1
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +24 -17
- package/package.json +1 -1
- package/dist/accordion-96o0pN62.js.map +0 -1
- package/dist/action-menu-CHgs8vmj.js.map +0 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +0 -1
- package/dist/ai-artifact-BZUGwBq6.js.map +0 -1
- package/dist/app-shell-D63ATkIK.js +0 -237
- package/dist/app-shell-D63ATkIK.js.map +0 -1
- package/dist/auth-D2FVZ1MH.js.map +0 -1
- package/dist/avatar-DWO_HHhB.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-CdfIkCsV.js.map +0 -1
- package/dist/button-DkmK-z8E.js.map +0 -1
- package/dist/buttons-BbfzgczK.js.map +0 -1
- package/dist/cards-4JTWqvVe.js +0 -68
- package/dist/cards-4JTWqvVe.js.map +0 -1
- package/dist/chart-C19flDQb.js +0 -155
- package/dist/chart-C19flDQb.js.map +0 -1
- package/dist/choice-inputs-JLtij2y4.js.map +0 -1
- package/dist/code-block-CGNaUtAE.js.map +0 -1
- package/dist/combobox-CBJDs6w_.js.map +0 -1
- package/dist/combobox-hbhSS18O.js +0 -355
- package/dist/combobox-hbhSS18O.js.map +0 -1
- package/dist/command-D8NrBj-b.js.map +0 -1
- package/dist/containers-CRmHf7GP.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-D4oujtx0.js.map +0 -1
- package/dist/date-picker-zOt1oNss.js.map +0 -1
- package/dist/dropdown-menu-CjY8Vt7W.js +0 -193
- package/dist/dropdown-menu-CjY8Vt7W.js.map +0 -1
- package/dist/feedback-DZNL5Lg1.js.map +0 -1
- package/dist/field-affordance-recipes-DjwGx8eM.js.map +0 -1
- package/dist/filters-BcT-uoFy.js.map +0 -1
- package/dist/form-sizing-NXgjkmBG.js.map +0 -1
- package/dist/forms-BV5m5aQF.js.map +0 -1
- package/dist/forms-numeric-Cd33AKbD.js.map +0 -1
- package/dist/header-BA697l4a.js.map +0 -1
- package/dist/hooks-BQ-L7Uu2.js.map +0 -1
- package/dist/input-DOPL5_QE.js +0 -21
- package/dist/input-DOPL5_QE.js.map +0 -1
- package/dist/item-BvZ2DR_x.js.map +0 -1
- package/dist/message-INU2xsxu.js.map +0 -1
- package/dist/metadata-list-qVV7AVxa.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-BQNcg1jT.js.map +0 -1
- package/dist/navigation-DLF3E1IC.js +0 -145
- package/dist/navigation-DLF3E1IC.js.map +0 -1
- package/dist/navigation-row-recipes-WZEs-hYo.js.map +0 -1
- package/dist/overflow-tab-bar-CrbqMteP.js +0 -284
- package/dist/overflow-tab-bar-CrbqMteP.js.map +0 -1
- package/dist/overlays-BlKynmde.js +0 -1004
- package/dist/overlays-BlKynmde.js.map +0 -1
- package/dist/page-CIwNUtGr.js +0 -227
- package/dist/page-CIwNUtGr.js.map +0 -1
- package/dist/page-header-commands-DFMlNYzN.js +0 -128
- package/dist/page-header-commands-DFMlNYzN.js.map +0 -1
- package/dist/popover-uwzX2vo7.js +0 -198
- package/dist/popover-uwzX2vo7.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-D789Jwyy.js.map +0 -1
- package/dist/rich-text-editor-Cm1dpUpQ.js.map +0 -1
- package/dist/rich-text-editor-toolbar-L__e4x47.js.map +0 -1
- package/dist/settings-BA2iboic.js.map +0 -1
- package/dist/sheet-DoAxTb2J.js +0 -213
- package/dist/sheet-DoAxTb2J.js.map +0 -1
- package/dist/sidebar-ByqKR_W5.js +0 -512
- package/dist/sidebar-ByqKR_W5.js.map +0 -1
- package/dist/sidebar-D2iSnGJ7.js +0 -619
- package/dist/sidebar-D2iSnGJ7.js.map +0 -1
- package/dist/skeleton-CUj8O5Bd.js +0 -264
- package/dist/skeleton-CUj8O5Bd.js.map +0 -1
- package/dist/smart-card-CqkzQsK-.js +0 -614
- package/dist/smart-card-CqkzQsK-.js.map +0 -1
- package/dist/table-DH7rozUv.js.map +0 -1
- package/dist/tabs-eqVsJZWO.js.map +0 -1
- package/dist/text-inputs-DXItiR0O.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-DmtztAY_.js.map +0 -1
- package/dist/tooltip-B4hjKtoV.js +0 -111
- package/dist/tooltip-B4hjKtoV.js.map +0 -1
- package/dist/ui-provider-CQCuCBcy.js +0 -136
- package/dist/ui-provider-CQCuCBcy.js.map +0 -1
- package/dist/upload-C9SA0X-8.js.map +0 -1
- package/dist/upload-queue-DhQJiSRc.js.map +0 -1
- package/dist/usage-card-DVTRDmGz.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-CF3c95Io.js.map +0 -1
- package/dist/value-inputs-C0o70p-U.js +0 -980
- package/dist/value-inputs-C0o70p-U.js.map +0 -1
- package/dist/workspace-9EFVXUyk.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-sizing-NXgjkmBG.js","names":["resolveComponentScale","fieldStateRecipes","editableTextSizeClasses","formControlHeightClasses","affordanceGeometry","formControlSizeClasses","formControlHorizontalPaddingClasses","formControlPaddingClasses","formControlInlineGapClasses","formControlIconClasses","formControlIconOffsetClasses","formControlEndIconOffsetClasses","formControlAddonOffsetClasses","formControlEndAddonOffsetClasses","formControlCountOffsetClasses","formControlMinHeightClasses","fieldTriggerInteractionClasses","formFieldFrameClasses","size","formFieldTriggerClasses","formTextareaSizeClasses","formTextareaInsetClasses","formTextareaAffordanceTopClasses","formLabelSizeClasses","formLabelLineClass","resolveFormControlSize","sizeProp","defaultScale"],"sources":["../src/components/base/forms/form-sizing.ts"],"sourcesContent":["import { fieldStateRecipes } from '../../../lib/field-state-recipes';\nimport { affordanceGeometry } from '../../../lib/affordance-geometry.generated';\nimport { editableTextSizeClasses } from '../../../lib/editable-text-recipe';\nimport type { ComponentScale } from '../../../lib/component-vocabulary';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\n\n/** Ordinary heights for compound frames that retain auto-height and class overrides. */\nexport const formControlHeightClasses = {\n\tsm: `h-control-sm ${affordanceGeometry.controlTextMinHeight}`,\n\tmd: `h-control ${affordanceGeometry.controlTextMinHeight}`,\n\tlg: `h-control-lg ${affordanceGeometry.controlTextMinHeight}`,\n} satisfies Record<ComponentScale, string>;\n\n// Important height utilities let our resolved height win against shadcn primitives that\n// bake their own `data-[size=*]:h-{n}` defaults (Select, DatePicker\n// trigger via Button, etc.). Without `!`, the primitive's\n// attribute-selector specificity beats our class-selector and every\n// non-Input field renders 4px taller than Input.\n// Keep the important spellings literal so Tailwind emits them in package CSS.\nexport const formControlSizeClasses = {\n\tsm: [\n\t\t'box-border',\n\t\t'!h-control-sm',\n\t\taffordanceGeometry.controlTextMinHeight,\n\t\t'font-sans text-foreground',\n\t\t'text-pxs',\n\t].join(' '),\n\tmd: [\n\t\t'box-border',\n\t\t'!h-control',\n\t\taffordanceGeometry.controlTextMinHeight,\n\t\t'font-sans text-foreground',\n\t\t'text-sm',\n\t].join(' '),\n\tlg: [\n\t\t'box-border',\n\t\t'!h-control-lg',\n\t\taffordanceGeometry.controlTextMinHeight,\n\t\t'font-sans text-foreground',\n\t\t'text-sm',\n\t].join(' '),\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlHorizontalPaddingClasses = {\n\tsm: 'px-control-sm',\n\tmd: 'px-control',\n\tlg: 'px-control',\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlPaddingClasses = {\n\tsm: `${formControlHorizontalPaddingClasses.sm} ${affordanceGeometry.controlBlockPadding.sm}`,\n\tmd: `${formControlHorizontalPaddingClasses.md} ${affordanceGeometry.controlBlockPadding.md}`,\n\tlg: `${formControlHorizontalPaddingClasses.lg} ${affordanceGeometry.controlBlockPadding.lg}`,\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlInlineGapClasses = {\n\tsm: 'gap-space-sm',\n\tmd: 'gap-space-md',\n\tlg: 'gap-space-lg',\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlIconClasses = {\n\tsm: 'size-icon-sm',\n\tmd: 'size-icon',\n\tlg: 'size-icon-lg',\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlIconOffsetClasses = {\n\tsm: 'ps-control-icon-sm',\n\tmd: 'ps-control-icon',\n\tlg: affordanceGeometry.largeIconStart,\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlEndIconOffsetClasses = {\n\tsm: 'pe-control-icon-sm',\n\tmd: 'pe-control-icon',\n\tlg: affordanceGeometry.largeIconEnd,\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlAddonOffsetClasses = {\n\tsm: 'ps-control-addon-sm',\n\tmd: 'ps-control-addon',\n\tlg: 'ps-control-addon',\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlEndAddonOffsetClasses = {\n\tsm: 'pe-control-addon-sm',\n\tmd: 'pe-control-addon',\n\tlg: 'pe-control-addon',\n} satisfies Record<ComponentScale, string>;\n\nexport const formControlCountOffsetClasses = {\n\tsm: 'pe-control-count-sm',\n\tmd: 'pe-control-count',\n\tlg: 'pe-control-count',\n} satisfies Record<ComponentScale, string>;\n\n/**\n * Min-heights matching `formControlSizeClasses` so multi-line trigger\n * variants (e.g. `Select` showing wrapped descriptions) can keep the\n * size's vertical rhythm without locking to a fixed `h-{n}`.\n */\nexport const formControlMinHeightClasses = {\n\tsm: 'min-h-control-sm',\n\tmd: 'min-h-control',\n\tlg: 'min-h-control-lg',\n} satisfies Record<ComponentScale, string>;\n\n/**\n * Field triggers never take an action hover or press fill: a native field has\n * neither. The variants repeat the Button interaction recipe's exact selectors so\n * class merging replaces its fill instead of losing a specificity contest.\n */\nconst fieldTriggerInteractionClasses = [\n\t'[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-transparent',\n\t'[&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-transparent',\n].join(' ');\n\n/**\n * The one field frame, drawn by `Input` on its native field and by\n * `formFieldTriggerClasses` on button-shaped triggers: the `--input` boundary,\n * inner radius, transparent fill (the library is intentionally flat), control\n * height, editable text size, control padding and the shared focus, invalid and\n * disabled states. Layout (`flex`, width) stays with each owner.\n *\n * The displayed value is the field's value, so it follows the editable text\n * recipe: on coarse pointers a trigger matches the touch input size of an\n * adjoining `Input` instead of rendering a step smaller.\n */\nexport function formFieldFrameClasses(size: ComponentScale): string {\n\treturn [\n\t\t'box-border rounded-inner border border-input bg-transparent',\n\t\t'shadow-none transition-[color,box-shadow] outline-none',\n\t\tformControlSizeClasses[size],\n\t\teditableTextSizeClasses[size],\n\t\tformControlPaddingClasses[size],\n\t\tfieldStateRecipes.focus,\n\t\tfieldStateRecipes.invalid,\n\t\t'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n\t].join(' ');\n}\n\n/**\n * Canonical \"input-shaped trigger\" chrome — used by any control that\n * renders as a button-style trigger but visually has to read as a form\n * field (DatePicker, TimePicker, Cascader, the inner Select inside composite\n * fields, etc.). It is `Input`'s own frame plus button resets, so when the\n * canonical input look changes every trigger picks it up.\n */\nexport function formFieldTriggerClasses(size: ComponentScale): string {\n\treturn [\n\t\t'flex w-full items-center justify-between text-start font-normal',\n\t\tformFieldFrameClasses(size),\n\t\tformControlInlineGapClasses[size],\n\t\t'data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50',\n\t\t// Read-only matches Input's read-only fill.\n\t\t'data-readonly:bg-muted',\n\t\tfieldTriggerInteractionClasses,\n\t].join(' ');\n}\n\nexport const formTextareaSizeClasses = {\n\tsm: [\n\t\t'min-h-textarea-sm',\n\t\t'font-sans text-foreground',\n\t\t'text-pxs',\n\t].join(' '),\n\tmd: [\n\t\t'min-h-textarea',\n\t\t'font-sans text-foreground',\n\t\t'text-sm',\n\t].join(' '),\n\tlg: [\n\t\t'min-h-textarea',\n\t\t'font-sans text-foreground',\n\t\t'text-sm',\n\t].join(' '),\n} satisfies Record<ComponentScale, string>;\n\n/**\n * Vertical inset of multi-line fields. Their first line sits exactly where a\n * single-line control of the same size draws its value (inside the 1px border),\n * so a Textarea beside an Input shares its first line. `1lh` is the field's own\n * line height, so the inset follows the editable text size on every pointer.\n */\nexport const formTextareaInsetClasses = affordanceGeometry.textareaBlockPadding satisfies Record<ComponentScale, string>;\n\n/**\n * Top offsets that centre multi-line field affordances on the first line, where a\n * single-line control of the same size centres them: the clear target\n * (`size-control-clear`) and a `size-icon` glyph such as the loading spinner.\n */\nexport const formTextareaAffordanceTopClasses = {\n\ttarget: affordanceGeometry.textareaClearTop,\n\ticon: affordanceGeometry.textareaIconTop,\n} as const satisfies Record<'target' | 'icon', Record<ComponentScale, string>>;\n\nexport const formLabelSizeClasses = {\n\tsm: 'text-xs',\n\tmd: 'text-sm',\n\tlg: 'text-base',\n} satisfies Record<ComponentScale, string>;\n\n/** Field labels share one line box, so a label row lines up beside its field at every size. */\nexport const formLabelLineClass = 'leading-6';\n\nexport function resolveFormControlSize(\n\tsizeProp: ComponentScale | undefined,\n\tdefaultScale: ComponentScale | undefined,\n): ComponentScale {\n\treturn resolveComponentScale(sizeProp, defaultScale);\n}\n\nexport function resolveFormLabelSize(\n\tsizeProp: ComponentScale | undefined,\n\tdefaultScale: ComponentScale | undefined,\n): ComponentScale {\n\treturn resolveComponentScale(sizeProp, defaultScale);\n}\n"],"mappings":";;;;;AAOA,IAAaG,IAA2B;CACvC,IAAI,gBAAgBC,EAAmB;CACvC,IAAI,aAAaA,EAAmB;CACpC,IAAI,gBAAgBA,EAAmB;AACxC,GAQaC,IAAyB;CACrC,IAAI;EACH;EACA;EACAD,EAAmB;EACnB;EACA;CACD,CAAC,CAAC,KAAK,GAAG;CACV,IAAI;EACH;EACA;EACAA,EAAmB;EACnB;EACA;CACD,CAAC,CAAC,KAAK,GAAG;CACV,IAAI;EACH;EACA;EACAA,EAAmB;EACnB;EACA;CACD,CAAC,CAAC,KAAK,GAAG;AACX,GAEaE,IAAsC;CAClD,IAAI;CACJ,IAAI;CACJ,IAAI;AACL,GAEaC,IAA4B;CACxC,IAAI,GAAGD,EAAoC,GAA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AC3B,MAAMA,EAAmB;AAC1B,GAEamB,IAAuB;CACnC,IAAI;CACJ,IAAI;CACJ,IAAI;AACL,GAGaC,IAAqB;AAElC,SAAgBC,EACf,GACA,GACiB;CACjB,OAAOzB,EAAsB0B,GAAUC,CAAY;AACpD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forms-BV5m5aQF.js","names":["Text","Stack","AlertDescription","AlertAction","Alert","Card","AlertTitle","compositionRhythm","compositionClasses","Input","FormField","defaultControlledFormFieldStrings","interpolateControlledFormFieldString","template","label","ControlledFormField","errorProp","stringsProp","chromeProps","strings","useStrings","Controller","validationError","fieldState","resolvedError","name","errorMessage","invalid","cn","children","field","applyServerErrors","errors","allowed","fields","rootMessages","applied","value","message","part","setError","root","isSimpleText","FormSection","actions","footer","className","contentClassName","FormActionsBar","trailing","sticky","leading","ErrorSummary","title","description","error","index","action","DirtyStateBanner","SubmitStateButton","props","Button","submitting","disabled","disableWhenPristine","dirty","OperationPasswordForm","passwordError","passwordErrorFn","topLevelError","defaultValues","useMemo","useForm","submit","onSubmit","values","loading","formId","handleSubmit"],"sources":["../src/components/base/forms/controlled-form-field.strings.ts","../src/components/base/forms/controlled-form-field.tsx","../src/components/base/forms/server-errors.ts","../src/components/base/forms/workflow.tsx","../src/components/base/forms/operation-password-form.tsx"],"sourcesContent":["export interface ControlledFormFieldStrings {\n\trequired: string;\n\trequiredWithLabel: string;\n\tinvalid: string;\n}\n\nexport const defaultControlledFormFieldStrings: ControlledFormFieldStrings = {\n\trequired: 'This field is required',\n\trequiredWithLabel: '{{label}} is required',\n\tinvalid: 'Invalid value',\n};\n\nexport function interpolateControlledFormFieldString(template: string, label: string) {\n\treturn template.replace(/\\{\\{\\s*label\\s*\\}\\}/g, label);\n}\n","/**\n * ControlledFormField — react-hook-form integration for the presentational\n * `FormField` component. Runtime state bindings stay in this module; the\n * published family still reports RHF for its exported bindings and types.\n */\nimport type { ComponentProps, ReactNode } from 'react';\nimport {\n\tController,\n\ttype Control,\n\ttype ControllerFieldState,\n\ttype ControllerRenderProps,\n\ttype FieldPath,\n\ttype FieldValues,\n\ttype RegisterOptions,\n} from 'react-hook-form';\n\nimport { FormField } from './form-field';\nimport {\n\tdefaultControlledFormFieldStrings,\n\tinterpolateControlledFormFieldString,\n\ttype ControlledFormFieldStrings,\n} from './controlled-form-field.strings';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\ntype FieldChromeProps = Omit<\n\tComponentProps<typeof FormField>,\n\t'children' | 'error'\n>;\n\nexport type FormFieldErrorGetter<TName extends string> = (field: TName) => string | undefined;\n\nexport interface ControlledFormFieldProps<\n\tTFieldValues extends FieldValues,\n\tTName extends FieldPath<TFieldValues>,\n> extends FieldChromeProps {\n\t/** Field name in the react-hook-form schema. */\n\tname: TName;\n\t/** The form's `control` object from `useForm`. */\n\tcontrol: Control<TFieldValues>;\n\t/** Validation rules passed to react-hook-form. */\n\trules?: RegisterOptions<TFieldValues, TName>;\n\t/** Validation message, overriding the one derived from form state. */\n\terror?: ReactNode | FormFieldErrorGetter<TName>;\n\t/** Overrides the field's own copy. */\n\tstrings?: StringsProp<ControlledFormFieldStrings>;\n\tchildren: (\n\t\tfield: ControllerRenderProps<TFieldValues, TName>,\n\t\t/** Validation message, overriding the one derived from form state. */\n\t\terror: string | undefined,\n\t\tinvalid: boolean,\n\t\tfieldState: ControllerFieldState,\n\t) => ReactNode;\n}\n\nexport function ControlledFormField<\n\tTFieldValues extends FieldValues,\n\tTName extends FieldPath<TFieldValues>,\n>({\n\tname,\n\tcontrol,\n\trules,\n\terror: errorProp,\n\tstrings: stringsProp,\n\tchildren,\n\t...chromeProps\n}: ControlledFormFieldProps<TFieldValues, TName>) {\n\tconst strings = useStrings(defaultControlledFormFieldStrings, stringsProp);\n\n\treturn (\n\t\t<Controller\n\t\t\tname={name}\n\t\t\tcontrol={control}\n\t\t\trules={rules}\n\t\t\trender={({ field, fieldState }) => {\n\t\t\t\tconst validationError = fieldState.error?.message\n\t\t\t\t\t|| (fieldState.error\n\t\t\t\t\t\t? fieldState.error.type === 'required'\n\t\t\t\t\t\t\t? typeof chromeProps.label === 'string'\n\t\t\t\t\t\t\t\t? interpolateControlledFormFieldString(strings.requiredWithLabel, chromeProps.label)\n\t\t\t\t\t\t\t\t: strings.required\n\t\t\t\t\t\t\t: strings.invalid\n\t\t\t\t\t\t: undefined);\n\t\t\t\tconst customError = typeof errorProp === 'function' ? errorProp(name) : errorProp;\n\t\t\t\tconst resolvedError = customError || validationError || undefined;\n\t\t\t\t// Rich chrome does not widen the established string callback contract.\n\t\t\t\tconst errorMessage = typeof resolvedError === 'string' ? resolvedError : validationError;\n\t\t\t\tconst invalid = Boolean(resolvedError);\n\n\t\t\t\treturn (\n\t\t\t\t\t<FormField\n\t\t\t\t\t\t{...chromeProps}\n\t\t\t\t\t\terror={resolvedError}\n\t\t\t\t\t\tclassName={cn('controlled-form-field--component', chromeProps.className)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children(field, errorMessage, invalid, fieldState)}\n\t\t\t\t\t</FormField>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nControlledFormField.displayName = 'ControlledFormField';\n\nexport {\n\tdefaultControlledFormFieldStrings,\n\ttype ControlledFormFieldStrings,\n} from './controlled-form-field.strings';\n","import type { FieldPath, FieldValues, UseFormSetError } from 'react-hook-form';\n\n/** Flat server validation messages; transport libraries keep ownership of requests. */\nexport type ServerErrors<TName extends string = string> = Partial<Record<TName, string | readonly string[]>>;\n\nexport interface ApplyServerErrorsOptions<TFieldValues extends FieldValues> {\n\t/** Allowed schema paths. Unknown server keys are reported at the root. */\n\tfields: readonly FieldPath<TFieldValues>[];\n\t/** Root error path for unknown fields and general errors. Defaults to root.server. */\n\troot?: `root.${string}`;\n}\n\n/**\n * Apply an untrusted transport error bag without importing a transport or RHF at\n * runtime. The allowlist prevents unknown server keys from becoming form fields.\n * Invalid/empty messages are ignored; arrays retain every string message.\n * Returns the number of field/root errors applied.\n */\nexport function applyServerErrors<TFieldValues extends FieldValues>(\n\tsetError: UseFormSetError<TFieldValues>,\n\terrors: unknown,\n\t{ fields, root = 'root.server' }: ApplyServerErrorsOptions<TFieldValues>,\n): number {\n\tif (!errors || typeof errors !== 'object' || Array.isArray(errors)) return 0;\n\tconst allowed = new Set<string>(fields);\n\tconst rootMessages: string[] = [];\n\tlet applied = 0;\n\tfor (const [name, value] of Object.entries(errors)) {\n\t\tconst message = typeof value === 'string'\n\t\t\t? value.trim() ? value : undefined\n\t\t\t: Array.isArray(value) ? value.filter((part): part is string => typeof part === 'string' && part.trim() !== '').join('\\n') || undefined : undefined;\n\t\tif (!message) continue;\n\t\tif (allowed.has(name)) {\n\t\t\tsetError(name as FieldPath<TFieldValues>, { type: 'server', message });\n\t\t\tapplied++;\n\t\t} else rootMessages.push(message);\n\t}\n\tif (rootMessages.length) {\n\t\tsetError(root, { type: 'server', message: rootMessages.join('\\n') });\n\t\tapplied++;\n\t}\n\treturn applied;\n}\n","/** Form workflow primitives — section chrome, errors, dirty state, and submit state. */\nimport type { ReactNode } from 'react';\n\nimport { Button } from '../buttons';\nimport type { ButtonProps } from '../buttons';\nimport { Card, type CardProps } from '../cards';\nimport { Stack } from '../structure';\nimport { compositionClasses, compositionRhythm } from '../structure/composition.recipes';\nimport type { SmartCardSurface } from '../cards';\nimport { Alert, AlertAction, AlertDescription, AlertTitle } from '../feedback';\nimport type { AlertTone } from '../feedback';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\nexport interface FormSectionProps {\n\t/** Section title. */\n\ttitle?: ReactNode;\n\t/** Supporting sentence under the title. */\n\tdescription?: ReactNode;\n\t/** Controls in the section header. */\n\tactions?: ReactNode;\n\tchildren?: ReactNode;\n\t/** Content below the section body. */\n\tfooter?: ReactNode;\n\t/** Outer chrome. Use `flat` with `padding=\"none\"` inside a padded Card. */\n\tsurface?: SmartCardSurface;\n\t/** Card region insets. Defaults to Card's ordinary inset; use `none` when the parent already owns padding. */\n\tpadding?: CardProps['padding'];\n\tclassName?: string;\n\t/** Merged onto the section body. */\n\tcontentClassName?: string;\n}\n\nexport function FormSection({\n\ttitle,\n\tdescription,\n\tactions,\n\tchildren,\n\tfooter,\n\tsurface = 'card',\n\tpadding,\n\tclassName,\n\tcontentClassName,\n}: FormSectionProps) {\n\treturn (\n\t\t<Card\n\t\t\tdata-component=\"form-section\"\n\t\t\tdata-slot=\"form-section\"\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\theaderAction={actions}\n\t\t\tfooterSlot={footer}\n\t\t\tsurface={surface}\n\t\t\tpadding={padding}\n\t\t\tclassName={cn('form-section--component', className)}\n\t\t\tcontentClassName={cn('form-section--content grid', compositionClasses.related, contentClassName)}\n\t\t>\n\t\t\t{children}\n\t\t</Card>\n\t);\n}\n\nexport interface FormActionsBarProps {\n\t/** Action content used when `trailing` is not provided. */\n\tchildren?: ReactNode;\n\t/** Optional status or context shown before the actions. Scalar copy uses secondary Typography. */\n\tleading?: ReactNode;\n\t/** Preferred action slot. When provided, it takes precedence over `children`. */\n\ttrailing?: ReactNode;\n\t/** Keep the bar attached to the bottom of its nearest scrolling ancestor. */\n\tsticky?: boolean;\n\tclassName?: string;\n}\n\n/** Responsive form-footer chrome for status and consumer-owned actions. */\nexport function FormActionsBar({\n\tchildren,\n\tleading,\n\ttrailing,\n\tsticky = false,\n\tclassName,\n}: FormActionsBarProps) {\n\tconst actions = trailing ?? children;\n\n\treturn (\n\t\t/*\n\t\t * Two elements, because the bar has to be measured and stick at the same\n\t\t * time and one element cannot do both. Its stack/row switch depends on its\n\t\t * own width — a form footer is as often in a drawer as at page width — and\n\t\t * an element cannot match its own container query, so the row has to sit\n\t\t * inside the measured box. `sticky` then has to live on the OUTER element:\n\t\t * a sticky child is confined to its parent's box, so a sticky row inside an\n\t\t * auto-height wrapper has nowhere to travel and silently stops sticking.\n\t\t */\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'form-actions-bar--component @container/form-actions-bar',\n\t\t\t\tsticky && 'sticky bottom-0 z-30',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t<div\n\t\t\tdata-component=\"form-actions-bar\"\n\t\t\tdata-slot=\"form-actions-bar\"\n\t\t\t// Opaque, so a sticky bar covers content scrolling under it without a blur.\n\t\t\tclassName=\"form-actions-bar--row border-t border-border bg-background p-surface\"\n\t\t>\n\t\t<div className=\"form-actions-bar--layout flex min-w-0 flex-col gap-space-lg @md/form-actions-bar:flex-row @md/form-actions-bar:items-center @md/form-actions-bar:flex-nowrap\">\n\t\t\t{leading != null && (\n\t\t\t\t<div data-slot=\"form-actions-leading\" className=\"form-actions-bar--leading min-w-0 flex-1\">\n\t\t\t\t\t{isSimpleText(leading) ? (\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t\t\tclassName=\"form-actions-bar--leading-text\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{leading}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : leading}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{actions != null && (\n\t\t\t\t<Stack\n\t\t\t\t\tdata-slot=\"form-actions-trailing\"\n\t\t\t\t\twrap\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\tgap={compositionRhythm.commands}\n\t\t\t\t\tjustify=\"end\"\n\t\t\t\t\tclassName=\"form-actions-bar--trailing min-w-0 w-full max-w-full shrink-0 @md/form-actions-bar:ml-auto @md/form-actions-bar:w-auto @md/form-actions-bar:shrink\"\n\t\t\t\t>\n\t\t\t\t\t{actions}\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t</div>\n\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport interface ErrorSummaryProps {\n\t/** Section title. */\n\ttitle: ReactNode;\n\t/** Supporting sentence under the title. */\n\tdescription?: ReactNode;\n\t/** Validation messages listed in the error summary. */\n\terrors?: readonly ReactNode[];\n\t/** Control offered alongside the summary. */\n\taction?: ReactNode;\n\tclassName?: string;\n}\n\nexport function ErrorSummary({\n\ttitle,\n\tdescription,\n\terrors = [],\n\taction,\n\tclassName,\n}: ErrorSummaryProps) {\n\treturn (\n\t\t<Alert\n\t\t\tdata-component=\"error-summary\"\n\t\t\tdata-slot=\"error-summary\"\n\t\t\ttone=\"destructive\"\n\t\t\tclassName={cn('error-summary--component', className)}\n\t\t>\n\t\t\t<AlertTitle>{title}</AlertTitle>\n\t\t\t{!!description && <AlertDescription>{description}</AlertDescription>}\n\t\t\t{errors.length > 0 && (\n\t\t\t\t\t// The messages are the summary's content: they keep the description's\n\t\t\t\t\t// size and ink, and the bullets take that ink too.\n\t\t\t\t\t<Stack render={<ul />} gap=\"xs\" data-slot=\"error-summary-list\" className=\"error-summary--list col-start-2 m-0 list-disc ps-space-xl text-sm text-muted-foreground\">\n\t\t\t\t\t{errors.map((error, index) => (\n\t\t\t\t\t\t<li key={index}>\n\t\t\t\t\t\t\t{typeof error === 'string' || typeof error === 'number' || typeof error === 'bigint' ? (\n\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"secondary\">\n\t\t\t\t\t\t\t\t\t{error}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) : error}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t)}\n\t\t\t{!!action && <AlertAction>{action}</AlertAction>}\n\t\t</Alert>\n\t);\n}\n\nexport interface DirtyStateBannerProps {\n\t/** Section title. */\n\ttitle: ReactNode;\n\t/** Supporting sentence under the title. */\n\tdescription?: ReactNode;\n\t/** Controls in the section header. */\n\tactions?: ReactNode;\n\t/** Semantic tone of the banner. */\n\ttone?: Extract<AlertTone, 'neutral' | 'info' | 'warning'>;\n\tclassName?: string;\n}\n\nexport function DirtyStateBanner({\n\ttitle,\n\tdescription,\n\tactions,\n\ttone = 'warning',\n\tclassName,\n}: DirtyStateBannerProps) {\n\treturn (\n\t\t<Alert\n\t\t\tdata-component=\"dirty-state-banner\"\n\t\t\tdata-slot=\"dirty-state-banner\"\n\t\t\ttone={tone}\n\t\t\tclassName={cn('dirty-state-banner--component', className)}\n\t\t>\n\t\t\t<AlertTitle>{title}</AlertTitle>\n\t\t\t{!!description && (\n\t\t\t\t<AlertDescription>\n\t\t\t\t\t{description}\n\t\t\t\t</AlertDescription>\n\t\t\t)}\n\t\t\t{actions != null && (\n\t\t\t\t<div className=\"dirty-state-banner--actions col-start-2 min-w-0 pt-space-sm\">\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap gap={compositionRhythm.commands}>{actions}</Stack>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</Alert>\n\t);\n}\n\nexport interface SubmitStateButtonProps extends Omit<ButtonProps, 'loading'> {\n\t/** Semantic color. Defaults to `primary`: submitting is the form's main command. */\n\ttone?: ButtonProps['tone'];\n\t/** Shows the pending state and blocks repeat submissions. */\n\tsubmitting?: boolean;\n\t/** Whether the form has unsaved changes. */\n\tdirty?: boolean;\n\t/** Disables submit until `dirty` is true, so a clean form cannot be re-saved. */\n\tdisableWhenPristine?: boolean;\n}\n\nexport function SubmitStateButton({\n\tsubmitting = false,\n\tdirty = true,\n\tdisableWhenPristine = false,\n\tdisabled,\n\tchildren,\n\t...props\n}: SubmitStateButtonProps) {\n\treturn (\n\t\t<Button\n\t\t\t// Submitting is the form's main command; props can still choose another tone.\n\t\t\ttone=\"primary\"\n\t\t\t{...props}\n\t\t\tdata-component=\"submit-state-button\"\n\t\t\tdata-slot=\"submit-state-button\"\n\t\t\ttype={props.type ?? 'submit'}\n\t\t\tloading={submitting}\n\t\t\tdisabled={disabled || (disableWhenPristine && !dirty)}\n\t\t\tclassName={cn('submit-state-button--component', props.className)}\n\t\t>\n\t\t\t{children}\n\t\t</Button>\n\t);\n}\n","import { useMemo } from 'react';\nimport type { SubmitHandler } from 'react-hook-form';\nimport { useForm } from 'react-hook-form';\n\nimport { ControlledFormField } from './controlled-form-field';\nimport { Input } from '../text-inputs';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\n\nexport type ErrorBag = Record<string, string | string[] | undefined>;\n\nexport interface OperationPasswordFormProps {\n\tformId: string;\n\tonSubmit: (data: { password: string }) => Promise<void>;\n\terrors?: ErrorBag;\n\t/** Shows the pending indicator. */\n\tloading?: boolean;\n\t/** Display label. */\n\tlabel: string;\n}\n\ninterface PasswordFormValues {\n\tpassword: string;\n}\n\nexport function OperationPasswordForm(props: OperationPasswordFormProps) {\n\tconst { formId, onSubmit, errors, loading = false, label } = props;\n\n\tconst getError = (field: keyof PasswordFormValues): string | undefined => {\n\t\tconst value = errors?.[field];\n\t\treturn Array.isArray(value) ? value[0] : value;\n\t};\n\tconst passwordError = getError('password');\n\tconst passwordErrorFn = passwordError ? () => passwordError : undefined;\n\n\tconst topLevelError =\n\t\t(Array.isArray(errors?.general) ? errors.general[0] : errors?.general) ||\n\t\t(Array.isArray(errors?.server) ? errors.server[0] : errors?.server);\n\n\tconst defaultValues = useMemo<PasswordFormValues>(() => ({ password: '' }), []);\n\n\tconst { handleSubmit, control } = useForm<PasswordFormValues>({ defaultValues });\n\n\tconst submit: SubmitHandler<PasswordFormValues> = async (values) => {\n\t\tawait onSubmit({ password: values.password });\n\t};\n\n\tconst disabled = loading;\n\n\treturn (\n\t\t<Stack\n\t\t\trender={<form />}\n\t\t\tgap=\"xl\"\n\t\t\tid={formId}\n\t\t\tonSubmit={handleSubmit(submit)}\n\t\t\tclassName=\"operation-password-form--component\"\n\t\t>\n\t\t\t{Boolean(topLevelError) && (\n\t\t\t\t<Text\n\t\t\t\t\ttype=\"error\"\n\t\t\t\t>\n\t\t\t\t\t{topLevelError}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t<ControlledFormField\n\t\t\t\tname=\"password\"\n\t\t\t\tcontrol={control}\n\t\t\t\terror={passwordErrorFn}\n\t\t\t\tlabel={label}\n\t\t\t\trequired\n\t\t\t>\n\t\t\t\t{(field, _error, invalid) => (\n\t\t\t\t\t<Input\n\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\tvalue={field.value ?? ''}\n\t\t\t\t\t\tonChange={field.onChange}\n\t\t\t\t\t\tonBlur={field.onBlur}\n\t\t\t\t\t\tname={field.name}\n\t\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tautoFocus\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</ControlledFormField>\n\t\t</Stack>\n\t);\n}\n\nOperationPasswordForm.displayName = 'OperationPasswordForm';\n"],"mappings":";;;;;;;;;;;;;;AAMA,IAAaW,IAAgE;CAC5E,UAAU;CACV,mBAAmB;CACnB,SAAS;AACV;AAEA,SAAgBC,EAAqC,GAAkB,GAAe;CACrF,OAAOC,EAAS,QAAQ,wBAAwBC,CAAK;AACtD;;;ACyCA,SAAgBC,EAGd,EACD,SACA,YACA,UACA,OAAOC,GACP,SAASC,GACT,aACA,GAAGC,KAC8C;CACjD,IAAMC,IAAUC,EAAWT,GAAmCM,CAAW;CAEzE,OACC,kBAACI,GAAD;EACO;EACG;EACF;EACP,SAAS,EAAE,UAAO,oBAAiB;GAClC,IAAMC,IAAkBC,EAAW,OAAO,YACrCA,EAAW,QACZA,EAAW,MAAM,SAAS,aACzB,OAAOL,EAAY,SAAU,WAC5BN,EAAqCO,EAAQ,mBAAmBD,EAAY,KAAK,IACjFC,EAAQ,WACTA,EAAQ,UACT,KAAA,IAEEK,KADc,OAAOR,KAAc,aAAaA,EAAUS,CAAI,IAAIT,MACnCM,KAAmB,KAAA,GAElDI,IAAe,OAAOF,KAAkB,WAAWA,IAAgBF,GACnEK,IAAU,EAAQH;GAExB,OACC,kBAACd,GAAD;IACC,GAAIQ;IACJ,OAAOM;IAC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IA,EAAO,OAAO,KAAKA,GAAQ,SAEvDsC,IAAgBC,SAAmC,EAAE,UAAU,GAAG,IAAI,CAAC,CAAC,GAExE,EAAE,iBAAc,eAAYC,EAA4B,EAAE,iBAAc,CAAC,GAEzEC,IAA4C,OAAO,MAAW;EACnE,MAAMC,EAAS,EAAE,UAAUC,EAAO,SAAS,CAAC;CAC7C,GAEMZ,IAAWa;CAEjB,OACC,kBAAC3E,GAAD;EACC,QAAQ,kBAAC,QAAD,CAAO,CAAA;EACf,KAAI;EACJ,IAAI4E;EACJ,UAAUC,EAAaL,CAAM;EAC7B,WAAU;EALX,UAAA,CAOE,EAAQJ,KACR,kBAACrE,GAAD;GACC,MAAK;GAEJ,UAAAqE;EACI,CAAA,GAGP,kBAACtD,GAAD;GACC,MAAK;GACI;GACT,OAAOqD;GACA;GACP,UAAA;GAEE,WAAA,GAAO,GAAQ,MAChB,kBAAC3D,GAAD;IACC,MAAK;IACL,OAAOqB,EAAM,SAAS;IACtB,UAAUA,EAAM;IAChB,QAAQA,EAAM;IACd,MAAMA,EAAM;IACH;IACC;IACV,WAAA;GACA,CAAA;EAEkB,CAAA,CACf;;AAET;AAEA,EAAsB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forms-numeric-Cd33AKbD.js","names":["React","baseui.Select","baseui.SelectTrigger","baseui.SelectValue","Select","UNIT_OPTIONS","React","baseui.Select","baseui.SelectTrigger","baseui.SelectValue","React","baseui.Select","baseui.SelectTrigger","baseui.SelectValue","React","useDensityConfig","useMoneyConfig","cn","Label","Text","TextLink","Grid","Stack","AlertDescription","Alert","interactionRecipes","selectToggleRecipes","formControlSizeClasses","formFieldTriggerClasses","formControlIconClasses","resolveFormControlSize","Input","FormField","SelectTrigger","SelectPopupContent","SelectPopupGroup","Select","Select$1","SelectPopupItem","SelectValue","controlGroupHeightClasses","React$1","defaultDecimalInputStrings","formatDecimalValue","value","formatted","allowNegative","hasLeadingMinus","parts","decimalPlaces","isWithinBounds","numValue","min","max","applyRounding","factor","decimals","shifted","mode","floor","diff","clamp","next","n","snapToStep","anchor","stepsFromAnchor","current","step","stepped","delta","fireChange","nativeSetter","target","STEPPER_SIZE_CLASS","DecimalInputImpl","controlledValue","sizeProp","stringsProp","props","allProps","size","defaultScale","strings","useStrings","validDecimalPlaces","inputRef","editingUnavailable","disabled","handleChange","useCallback","newValue","allowEmpty","modifiedEvent","onChange","handleBlur","onBlur","normalizeOnBlur","raw","num","roundingMode","adjust","showSteppers","handleKeyDown","onKeyDown","event","placeholderResolved","placeholder","Minus","node","forwardedRef","className","Plus","DecimalInput","PercentageInput","forwardRef","defaultCurrencyInputStrings","CURRENCY_SYMBOLS","normalizeCurrencies","currencies","currency","CurrencyInputImpl","controlledCurrency","decimalInputProps","currencyTriggerId","useId","normalizedCurrencies","useMemo","internalCurrency","setInternalCurrency","useState","defaultCurrency","isCurrencyControlled","selectedCurrency","details","disableCurrencySelector","onConfigError","handleCurrencyChange","newCurrency","onCurrencyChange","triggerClassName","currencyWidth","currencySelector","currencyLabel","invalid","currencyPlaceholder","curr","currencyPosition","CurrencyInput","memo","defaultMoneyInputStrings","interpolateMoneyInputString","values","key","output","template","FALLBACK_CURRENCIES","parseAmount","parsed","resolveFormatted","currencyOptionValue","option","MoneyInput","recordCurrencyProp","moneyConfig","resolvedDefaultCurrency","activeCurrency","useRef","availableCurrencies","source","unique","optionValue","options","recordCurrency","money","originalFormatted","showOriginalHint","willMigrate","isInvalid","error","assignRef","handleAmountChange","onChangeData","nextCurrency","defaultValue","input","required","controlStrings","controlClassName","hasFieldChrome","label","hint","helperText","showMigrationWarning","AlertTriangle","migrationWarningMessage","ORDERED_MODES","defaultRoundingModeLabels","RoundingModeSelect","controlled","labels","onValueChange","defaultDimensionsInputStrings","UNIT_OPTIONS$1","parseDimensionValue","format","p","formatDimensionValue","width","height","depth","DimensionsInput","controlledUnit","resolvedWidthLabel","widthLabel","resolvedHeightLabel","heightLabel","resolvedDepthLabel","depthLabel","resolvedUnitPlaceholder","unitPlaceholder","resolvedWidthPlaceholder","widthPlaceholder","resolvedHeightPlaceholder","heightPlaceholder","resolvedDepthPlaceholder","depthPlaceholder","shouldShowInlineLabels","layout","shouldShowVerticalLabels","shouldShowUnitSelector","showUnitSelector","hasUnitLabel","unitLabel","widthFieldLabel","heightFieldLabel","depthFieldLabel","fieldId","ids","subLabelClasses","formLabelLineClass","isValueControlled","isUnitControlled","initialParsed","internalWidth","setInternalWidth","internalHeight","setInternalHeight","internalDepth","setInternalDepth","internalUnit","setInternalUnit","defaultUnit","parsedValue","widthValue","heightValue","depthValue","unitValue","handleDimensionChange","updatedWidth","updatedHeight","updatedDepth","dimension","formattedValue","handleUnitChange","newUnit","typedUnit","onUnitChange","unitSelector","disableUnitSelector","unit","defaultWeightInputStrings","UNIT_OPTIONS","WeightInput","internalValue","setInternalValue","handleValueChange","nextUnit","weightUnit","unitOptions","unitTriggerId","unitWidth","defaultCoordinatesInputStrings","parseValue","lat","lng","part","formatValue","isFiniteNumberInRange","CoordinatesInput","isControlled","internalLat","setInternalLat","internalLng","setInternalLng","parsedControlled","update","nextLat","nextLng","mapUrl","hasValidLat","hasValidLng","showPreviewLink"],"sources":["../src/components/base/forms-numeric/decimal-input.tsx","../src/components/base/forms-numeric/percentage-input.tsx","../src/components/base/forms-numeric/currency-input.tsx","../src/components/base/forms-numeric/money-input.strings.ts","../src/components/base/forms-numeric/money-input.tsx","../src/components/base/forms-numeric/rounding-mode-select.tsx","../src/components/base/forms-numeric/dimensions-input.tsx","../src/components/base/forms-numeric/weight-input.tsx","../src/components/base/forms-numeric/coordinates-input.tsx"],"sourcesContent":["/**\n * DecimalInput — text-based numeric input with decimal-place enforcement,\n * locale-friendly comma → dot normalisation, optional min/max clamping,\n * rounding mode (`round` / `floor` / `ceil` / `half-even`), and optional\n * stepper buttons when `step` is set.\n *\n * Wraps the base `Input` so all add-on / icon / clear / loading features\n * still work. Extra features layered on top:\n *\n * - `step` — when set, renders − / + stepper buttons that snap the value\n * to a multiple of `step` (anchored at `min` if provided, else 0).\n * - `roundingMode` — controls how stepper / blur normalisation rounds\n * half values; default `'round'` (round-half-up).\n * - `normalizeOnBlur` (default `true`) — pads the displayed value to the\n * full `decimalPlaces` count and clamps to `[min, max]` when the field\n * loses focus.\n *\n * The `value` prop is always a plain string (consumers parse it as needed)\n * so RHF / Inertia can treat it like any other input.\n */\nimport * as React from 'react';\nimport { useCallback } from 'react';\nimport { Minus, Plus } from 'lucide-react';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { useDensityConfig, type FormControlSize } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\nimport { formControlIconClasses, formControlSizeClasses, resolveFormControlSize } from '../forms/form-sizing';\nimport { Input, type InputProps } from '../text-inputs';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nexport type DecimalRoundingMode = 'round' | 'floor' | 'ceil' | 'half-even';\n\nexport interface DecimalInputStrings {\n\t/** Accessible label for the decrement stepper. */\n\tdecrement: string;\n\t/** Accessible label for the increment stepper. */\n\tincrement: string;\n}\n\nexport const defaultDecimalInputStrings: DecimalInputStrings = {\n\tdecrement: 'Decrement',\n\tincrement: 'Increment',\n};\n\nexport interface DecimalInputProps extends Omit<InputProps, 'type' | 'inputMode' | 'strings'> {\n\t/** Maximum fractional digits accepted and used during normalization. */\n\tdecimalPlaces?: number;\n\t/** Minimum accepted numeric value. */\n\tmin?: number;\n\t/** Maximum accepted numeric value. */\n\tmax?: number;\n\t/** Whether a leading negative sign is accepted. */\n\tallowNegative?: boolean;\n\t/** Whether the field may remain blank. */\n\tallowEmpty?: boolean;\n\t/** When set, renders − / + steppers and snaps the value to multiples of `step`. */\n\tstep?: number;\n\t/** How to round when normalising on blur or stepping. Default `'round'`. */\n\troundingMode?: DecimalRoundingMode;\n\t/** Pad to full decimalPlaces and clamp to [min, max] on blur. Default `true`. */\n\tnormalizeOnBlur?: boolean;\n\t/** String overrides for stepper aria-labels. */\n\tstrings?: StringsProp<DecimalInputStrings>;\n}\n\nconst formatDecimalValue = (\n\tvalue: string,\n\tdecimalPlaces: number,\n\tallowNegative: boolean,\n): string => {\n\tif (!value) return '';\n\n\tlet formatted = value;\n\tformatted = formatted.replace(/,/g, '.');\n\n\tif (allowNegative) {\n\t\tformatted = formatted.replace(/[^\\d.-]/g, '');\n\t} else {\n\t\tformatted = formatted.replace(/[^\\d.]/g, '');\n\t}\n\n\tif (allowNegative && formatted.includes('-')) {\n\t\tconst hasLeadingMinus = formatted.startsWith('-');\n\t\tformatted = formatted.replace(/-/g, '');\n\t\tif (hasLeadingMinus) formatted = '-' + formatted;\n\t}\n\n\tconst parts = formatted.split('.');\n\tif (parts.length > 2) {\n\t\tformatted = parts[0] + '.' + parts.slice(1).join('');\n\t}\n\n\tif (parts.length === 2 && parts[1].length > decimalPlaces) {\n\t\tformatted = parts[0] + '.' + parts[1].substring(0, decimalPlaces);\n\t}\n\n\treturn formatted;\n};\n\nconst isWithinBounds = (value: string, min?: number, max?: number): boolean => {\n\tif (!value || value === '-') return true;\n\tconst numValue = parseFloat(value);\n\tif (Number.isNaN(numValue)) return true;\n\tif (min !== undefined && numValue < min) return false;\n\tif (max !== undefined && numValue > max) return false;\n\treturn true;\n};\n\nfunction applyRounding(value: number, decimals: number, mode: DecimalRoundingMode): number {\n\tconst factor = Math.pow(10, decimals);\n\tconst shifted = value * factor;\n\tswitch (mode) {\n\t\tcase 'floor':\n\t\t\treturn Math.floor(shifted) / factor;\n\t\tcase 'ceil':\n\t\t\treturn Math.ceil(shifted) / factor;\n\t\tcase 'half-even': {\n\t\t\tconst floor = Math.floor(shifted);\n\t\t\tconst diff = shifted - floor;\n\t\t\tif (diff > 0.5) return (floor + 1) / factor;\n\t\t\tif (diff < 0.5) return floor / factor;\n\t\t\treturn (floor % 2 === 0 ? floor : floor + 1) / factor;\n\t\t}\n\t\tcase 'round':\n\t\tdefault:\n\t\t\treturn Math.round(shifted) / factor;\n\t}\n}\n\nfunction clamp(n: number, min?: number, max?: number): number {\n\tlet next = n;\n\tif (min !== undefined) next = Math.max(min, next);\n\tif (max !== undefined) next = Math.min(max, next);\n\treturn next;\n}\n\nfunction snapToStep(\n\tcurrent: number,\n\tdelta: number,\n\tstep: number,\n\tmin?: number,\n\tmode: DecimalRoundingMode = 'round',\n): number {\n\tconst anchor = min ?? 0;\n\tconst stepsFromAnchor = (current - anchor) / step;\n\tconst rounded =\n\t\tmode === 'floor'\n\t\t\t? Math.floor(stepsFromAnchor)\n\t\t\t: mode === 'ceil'\n\t\t\t\t? Math.ceil(stepsFromAnchor)\n\t\t\t\t: Math.round(stepsFromAnchor);\n\tconst stepped = anchor + (rounded + delta) * step;\n\treturn Number(stepped.toFixed(12));\n}\n\nfunction fireChange(target: HTMLInputElement, value: string) {\n\t// Write through the native setter so React's value tracker sees a change,\n\t// then dispatch a real input event. React's own change handling then runs:\n\t// the Input's internal state (uncontrolled use), DecimalInput formatting and\n\t// the consumer callback each observe the step exactly once, and a later\n\t// re-render can no longer restore the stale value. A controlled consumer\n\t// that declines the change keeps its value, as with typing.\n\tconst nativeSetter = Object.getOwnPropertyDescriptor(\n\t\twindow.HTMLInputElement.prototype,\n\t\t'value',\n\t)?.set;\n\tif (nativeSetter) nativeSetter.call(target, value);\n\telse target.value = value;\n\ttarget.dispatchEvent(new Event('input', { bubbles: true }));\n}\n\nconst STEPPER_SIZE_CLASS: Record<FormControlSize, string> = {\n\tsm: 'w-control-sm',\n\tmd: 'w-control',\n\tlg: 'w-control-lg',\n};\n\nfunction DecimalInputImpl(\n\tallProps: DecimalInputProps,\n\tforwardedRef: React.ForwardedRef<HTMLInputElement>,\n) {\n\tconst {\n\t\tdecimalPlaces = 2,\n\t\tmin,\n\t\tmax,\n\t\tallowNegative = true,\n\t\tallowEmpty = true,\n\t\tstep,\n\t\troundingMode = 'round',\n\t\tnormalizeOnBlur = true,\n\t\tonChange,\n\t\tonBlur,\n\t\tonKeyDown,\n\t\tplaceholder,\n\t\tclassName,\n\t\tvalue: controlledValue,\n\t\tdefaultValue,\n\t\tdisabled,\n\t\tsize: sizeProp,\n\t\tstrings: stringsProp,\n\t\t...props\n\t} = allProps;\n\tconst { defaultScale } = useDensityConfig();\n\tconst size: FormControlSize = resolveFormControlSize(sizeProp, defaultScale);\n\tconst strings = useStrings(defaultDecimalInputStrings, stringsProp);\n\tconst validDecimalPlaces = Math.min(12, Math.max(0, decimalPlaces));\n\tconst inputRef = React.useRef<HTMLInputElement | null>(null);\n\tconst editingUnavailable = disabled || props.loading || props.readOnly;\n\n\tconst handleChange = useCallback(\n\t\t(e: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst newValue = e.target.value;\n\n\t\t\tif (!newValue && allowEmpty) {\n\t\t\t\tonChange?.(e);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst formatted = formatDecimalValue(newValue, validDecimalPlaces, allowNegative);\n\t\t\tif (!isWithinBounds(formatted, min, max)) return;\n\n\t\t\tif (formatted !== newValue) {\n\t\t\t\tconst modifiedEvent = {\n\t\t\t\t\t...e,\n\t\t\t\t\ttarget: { ...e.target, value: formatted },\n\t\t\t\t\tcurrentTarget: { ...e.currentTarget, value: formatted },\n\t\t\t\t} as React.ChangeEvent<HTMLInputElement>;\n\t\t\t\tonChange?.(modifiedEvent);\n\t\t\t} else {\n\t\t\t\tonChange?.(e);\n\t\t\t}\n\t\t},\n\t\t[onChange, validDecimalPlaces, allowNegative, allowEmpty, min, max],\n\t);\n\n\tconst handleBlur = useCallback(\n\t\t(e: React.FocusEvent<HTMLInputElement>) => {\n\t\t\tonBlur?.(e);\n\t\t\tif (!normalizeOnBlur) return;\n\t\t\tconst raw = e.target.value;\n\t\t\tif (!raw && allowEmpty) return;\n\t\t\tconst num = Number.parseFloat(raw.replace(',', '.'));\n\t\t\tif (!Number.isFinite(num)) return;\n\t\t\tconst clamped = clamp(num, min, max);\n\t\t\tconst rounded = applyRounding(clamped, validDecimalPlaces, roundingMode);\n\t\t\tconst next = rounded.toFixed(validDecimalPlaces);\n\t\t\tif (next !== raw && inputRef.current) {\n\t\t\t\tfireChange(inputRef.current, next);\n\t\t\t}\n\t\t},\n\t\t[onBlur, onChange, normalizeOnBlur, allowEmpty, min, max, validDecimalPlaces, roundingMode],\n\t);\n\n\tconst adjust = useCallback(\n\t\t(delta: number) => {\n\t\t\tif (editingUnavailable || step === undefined) return;\n\t\t\tconst target = inputRef.current;\n\t\t\tif (!target) return;\n\t\t\tconst raw = target.value;\n\t\t\tconst current = Number.parseFloat(raw.replace(',', '.'));\n\t\t\tconst base = Number.isFinite(current) ? current : (min ?? 0);\n\t\t\tconst snapped = clamp(snapToStep(base, delta, step, min, roundingMode), min, max);\n\t\t\tconst next = applyRounding(snapped, validDecimalPlaces, roundingMode).toFixed(validDecimalPlaces);\n\t\t\tfireChange(target, next);\n\t\t},\n\t\t[editingUnavailable, step, min, max, roundingMode, validDecimalPlaces, onChange],\n\t);\n\n\tconst showSteppers = typeof step === 'number' && step > 0;\n\n\t// With steppers, Arrow Up/Down step the value from the keyboard, so the\n\t// pointer-only stepper buttons are never the only way to step.\n\tconst handleKeyDown = useCallback(\n\t\t(event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\t\tonKeyDown?.(event);\n\t\t\tif (event.defaultPrevented || !showSteppers) return;\n\t\t\tif (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tadjust(event.key === 'ArrowUp' ? 1 : -1);\n\t\t\t}\n\t\t},\n\t\t[onKeyDown, showSteppers, adjust],\n\t);\n\tconst placeholderResolved =\n\t\tplaceholder ?? (validDecimalPlaces > 0 ? `0.${'0'.repeat(validDecimalPlaces)}` : '0');\n\n\tif (showSteppers) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn('decimal-input--component', \n\t\t\t\t\t// Stepper segmented group — input + adjacent − / + buttons\n\t\t\t\t\t// share a single border radius so the group reads as one\n\t\t\t\t\t// control instead of three loose chips.\n\t\t\t\t\t'flex items-stretch overflow-hidden rounded-inner border border-input bg-transparent [&>.input--component]:h-full',\n\t\t\t\t\tformControlSizeClasses[size],\n\t\t\t\t\t// The frame is the field: it carries the shared keyboard-focus,\n\t\t\t\t\t// validation and read-only states once for the whole group.\n\t\t\t\t\t'has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-3 has-[input:focus-visible]:ring-ring/50',\n\t\t\t\t\t'has-[input[aria-invalid=true]]:border-destructive has-[input[aria-invalid=true]]:has-[input:focus-visible]:border-destructive has-[input[aria-invalid=true]]:has-[input:focus-visible]:ring-destructive/30 dark:has-[input[aria-invalid=true]]:has-[input:focus-visible]:ring-destructive/50',\n\t\t\t\t\t'has-[input:read-only:not(:disabled)]:bg-muted',\n\t\t\t\t\tdisabled && 'opacity-50 cursor-not-allowed',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\taria-label={strings.decrement}\n\t\t\t\t\tdisabled={editingUnavailable}\n\t\t\t\t\tonClick={() => adjust(-1)}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tinteractionRecipes.nativeButtonReset,\n\t\t\t\t\t\t'inline-flex shrink-0 items-center justify-center border-e border-input text-muted-foreground transition-colors',\n\t\t\t\t\t\tSTEPPER_SIZE_CLASS[size],\n\t\t\t\t\t\tinteractionRecipes.rowHover,\n\t\t\t\t\t\t// A disabled frame dims once; read-only or loading dims only the steppers.\n\t\t\t\t\t\t'disabled:pointer-events-none disabled:cursor-not-allowed',\n\t\t\t\t\t\t!disabled && 'disabled:opacity-50',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Minus aria-hidden=\"true\" className={formControlIconClasses[size]} />\n\t\t\t\t</button>\n\t\t\t\t<Input\n\t\t\t\t\tsize={size}\n\t\t\t\t\tref={(node) => { inputRef.current = node; if (typeof forwardedRef === \"function\") forwardedRef(node); else if (forwardedRef) forwardedRef.current = node; }}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tinputMode={validDecimalPlaces > 0 ? 'decimal' : 'numeric'}\n\t\t\t\t\tplaceholder={placeholderResolved}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonBlur={handleBlur}\n\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t{...('value' in allProps ? { value: controlledValue } : {})}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t// The frame owns border, ring, fill and dimming; the inner field draws none of them.\n\t\t\t\t\t\t'!h-full min-h-0 flex-1 tabular-nums text-center border-0 shadow-none rounded-none bg-transparent read-only:bg-transparent focus-visible:ring-0 focus-visible:border-0 aria-invalid:ring-0 aria-invalid:focus-visible:ring-0 disabled:opacity-100',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\taria-label={strings.increment}\n\t\t\t\t\tdisabled={editingUnavailable}\n\t\t\t\t\tonClick={() => adjust(1)}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tinteractionRecipes.nativeButtonReset,\n\t\t\t\t\t\t'inline-flex shrink-0 items-center justify-center border-s border-input text-muted-foreground transition-colors',\n\t\t\t\t\t\tSTEPPER_SIZE_CLASS[size],\n\t\t\t\t\t\tinteractionRecipes.rowHover,\n\t\t\t\t\t\t'disabled:pointer-events-none disabled:cursor-not-allowed',\n\t\t\t\t\t\t!disabled && 'disabled:opacity-50',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Plus aria-hidden=\"true\" className={formControlIconClasses[size]} />\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Input\n\t\t\tsize={size}\n\t\t\tref={(node) => { inputRef.current = node; if (typeof forwardedRef === \"function\") forwardedRef(node); else if (forwardedRef) forwardedRef.current = node; }}\n\t\t\ttype=\"text\"\n\t\t\tinputMode={validDecimalPlaces > 0 ? 'decimal' : 'numeric'}\n\t\t\tplaceholder={placeholderResolved}\n\t\t\tonChange={handleChange}\n\t\t\tonBlur={handleBlur}\n\t\t\tonKeyDown={onKeyDown}\n\t\t\t{...('value' in allProps ? { value: controlledValue } : {})}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={cn('tabular-nums text-end', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst DecimalInput = React.forwardRef<HTMLInputElement, DecimalInputProps>(DecimalInputImpl);\nDecimalInput.displayName = 'DecimalInput';\n\nexport { DecimalInput };\n","/**\n * PercentageInput — DecimalInput configured for 0..100 percent values with a\n * trailing `%` add-on. Inherits stepper / rounding / normalisation features\n * from DecimalInput.\n */\nimport { forwardRef } from 'react';\nimport { DecimalInput, type DecimalInputProps } from './decimal-input';\n\nexport type PercentageInputProps = Omit<\n\tDecimalInputProps,\n\t'min' | 'max' | 'allowNegative' | 'endAddon'\n> & {\n\t/** Minimum percentage value. Defaults to 0. */\n\tmin?: number;\n\t/** Maximum percentage value. Defaults to 100. */\n\tmax?: number;\n};\n\nexport const PercentageInput = forwardRef<HTMLInputElement, PercentageInputProps>(\n\tfunction PercentageInput({ decimalPlaces = 2, min = 0, max = 100, step, ...props }, ref) {\n\t\treturn (\n\t\t\t<DecimalInput className=\"percentage-input--component\"\n\t\t\t\tref={ref}\n\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\tallowNegative={false}\n\t\t\t\tmin={min}\n\t\t\t\tmax={max}\n\t\t\t\tstep={step}\n\t\t\t\tendAddon=\"%\"\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nPercentageInput.displayName = 'PercentageInput';\n","import { useId, useState, useCallback, useEffect, useMemo, memo, forwardRef, type ForwardedRef } from 'react';\nimport * as baseui from '../../ui/select';\nimport { Label, Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { useDensityConfig } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\nimport { formFieldTriggerClasses, resolveFormControlSize, formLabelLineClass } from '../forms/form-sizing';\nimport { selectToggleRecipes } from '../../../lib/field-affordance-recipes';\nimport {\n\tDecimalInput,\n\tdefaultDecimalInputStrings,\n\ttype DecimalInputProps,\n\ttype DecimalInputStrings,\n} from './decimal-input';\nimport { SelectPopupContent, SelectPopupGroup, SelectPopupItem } from '../choice-inputs';\n\nexport interface CurrencyOption {\n\tvalue: string;\n\tlabel: string;\n}\n\nexport interface CurrencyInputStrings extends DecimalInputStrings {\n\t/** Accessible name for the currency selector. */\n\tcurrencyAriaLabel: string;\n}\n\nexport const defaultCurrencyInputStrings: CurrencyInputStrings = {\n\t...defaultDecimalInputStrings,\n\tcurrencyAriaLabel: 'Currency',\n};\n\nexport interface CurrencyInputProps extends Omit<DecimalInputProps, 'label' | 'hint' | 'helperText' | 'error' | 'strings'> {\n\t/** Current currency value */\n\tcurrency?: string;\n\n\t/** Default currency if uncontrolled */\n\tdefaultCurrency?: string;\n\n\t/** List of available currencies (simple strings or objects with value/label) */\n\tcurrencies?: (string | CurrencyOption)[];\n\n\t/** Callback when currency changes */\n\tonCurrencyChange?: (currency: string) => void;\n\n\t/** Position of currency dropdown */\n\tcurrencyPosition?: 'start' | 'end';\n\n\t/** Disable currency selection */\n\tdisableCurrencySelector?: boolean;\n\n\t/** Placeholder for currency dropdown */\n\tcurrencyPlaceholder?: string;\n\n\t/** Width of the currency dropdown */\n\tcurrencyWidth?: string;\n\n\t/** Label for currency field (sub-label) */\n\tcurrencyLabel?: string;\n\n\t/** Localizes the selector name and inherited decimal-stepper labels. */\n\tstrings?: StringsProp<CurrencyInputStrings>;\n\n\t/** Error state for styling (passed from FormField) */\n\tinvalid?: boolean;\n\n\t/** Called when the input is misconfigured (mismatched currency/defaultCurrency\n\t * while the selector is disabled, missing currency, etc.). The library\n\t * also DEV-logs the same message to the console. */\n\tonConfigError?: (\n\t\tmessage: string,\n\t\tdetails: { currency?: string; defaultCurrency?: string; disableCurrencySelector?: boolean },\n\t) => void;\n}\n\n// Common currency symbols\nconst CURRENCY_SYMBOLS: Record<string, string> = {\n\tUSD: '$',\n\tEUR: '€',\n\tGBP: '£',\n\tBGN: 'лв',\n\tJPY: '¥',\n\tCNY: '¥',\n\tCHF: 'CHF',\n\tCAD: 'C$',\n\tAUD: 'A$',\n};\n\nconst normalizeCurrencies = (currencies?: (string | CurrencyOption)[]): CurrencyOption[] => {\n\tif (!currencies || currencies.length === 0) return [];\n\n\treturn currencies.map((currency) => {\n\t\tif (typeof currency === 'string') {\n\t\t\tconst symbol = CURRENCY_SYMBOLS[currency] || currency;\n\t\t\treturn {\n\t\t\t\tvalue: currency,\n\t\t\t\tlabel: `${symbol} ${currency}`,\n\t\t\t};\n\t\t}\n\t\treturn currency;\n\t});\n};\n\nfunction CurrencyInputImpl(\n\t{\n\t\tcurrency: controlledCurrency,\n\t\tdefaultCurrency,\n\t\tcurrencies,\n\t\tonCurrencyChange,\n\t\tcurrencyPosition = 'start',\n\t\tdisableCurrencySelector = false,\n\t\tcurrencyPlaceholder,\n\t\tcurrencyWidth = 'w-28',\n\t\tcurrencyLabel,\n\t\tstrings: stringsProp,\n\t\tinvalid,\n\t\tdisabled,\n\t\tonConfigError,\n\t\tsize: sizeProp,\n\t\t...decimalInputProps\n\t}: CurrencyInputProps,\n\tforwardedRef: ForwardedRef<HTMLInputElement>,\n) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\tconst strings = useStrings(defaultCurrencyInputStrings, stringsProp);\n\tconst currencyTriggerId = useId();\n\n\t// Memoize normalized currencies\n\tconst normalizedCurrencies = useMemo(() => normalizeCurrencies(currencies), [currencies]);\n\n\t// Internal state for uncontrolled currency\n\tconst [internalCurrency, setInternalCurrency] = useState(\n\t\tdefaultCurrency ?? normalizedCurrencies[0]?.value ?? ''\n\t);\n\n\t// Determine if currency is controlled\n\tconst isCurrencyControlled = controlledCurrency !== undefined;\n\tconst selectedCurrency = isCurrencyControlled ? controlledCurrency : internalCurrency;\n\n\tuseEffect(() => {\n\t\tconst details = { currency: controlledCurrency, defaultCurrency, disableCurrencySelector };\n\t\tif (\n\t\t\tdisableCurrencySelector &&\n\t\t\ttypeof controlledCurrency === 'string' &&\n\t\t\ttypeof defaultCurrency === 'string' &&\n\t\t\tcontrolledCurrency.trim() !== '' &&\n\t\t\tdefaultCurrency.trim() !== '' &&\n\t\t\tcontrolledCurrency !== defaultCurrency\n\t\t) {\n\t\t\tconst message = '[CurrencyInput] currency/defaultCurrency mismatch while selector is disabled.';\n\t\t\tif (import.meta.env?.DEV) {\n\t\t\t\tconsole.warn(message, { currency: controlledCurrency, defaultCurrency });\n\t\t\t}\n\t\t\tonConfigError?.(message, details);\n\t\t}\n\n\t\tif (\n\t\t\tdisableCurrencySelector &&\n\t\t\t(typeof selectedCurrency !== 'string' || selectedCurrency.trim().length === 0)\n\t\t) {\n\t\t\tconst message = '[CurrencyInput] disableCurrencySelector is enabled but no currency is provided.';\n\t\t\tif (import.meta.env?.DEV) {\n\t\t\t\tconsole.warn(message);\n\t\t\t}\n\t\t\tonConfigError?.(message, details);\n\t\t}\n\t}, [controlledCurrency, defaultCurrency, disableCurrencySelector, onConfigError, selectedCurrency]);\n\n\t// Handle currency change\n\tconst handleCurrencyChange = useCallback(\n\t\t(newCurrency: string | null) => {\n\t\t\tif (newCurrency === null) return;\n\t\t\tif (!isCurrencyControlled) {\n\t\t\t\tsetInternalCurrency(newCurrency);\n\t\t\t}\n\t\t\tonCurrencyChange?.(newCurrency);\n\t\t},\n\t\t[isCurrencyControlled, onCurrencyChange]\n\t);\n\n\t// Memoize trigger class names. `formFieldTriggerClasses` is the canonical\n\t// select/trigger chrome, so this selector keeps the height, padding, radius,\n\t// and focus treatment of a standalone `Select` — previously only the height\n\t// was shared, leaving shadcn's `rounded-md` and `py-2 pr-2 pl-2.5` in place\n\t// and making the unit selector visibly narrower-cornered than its siblings.\n\t// `currencyWidth` still wins over the helper's `w-full` through twMerge.\n\tconst triggerClassName = useMemo(\n\t\t() =>\n\t\t\tcn(\n\t\t\t\t'currency-input--selector-trigger',\n\t\t\t\tformFieldTriggerClasses(size),\n\t\t\t\tcurrencyWidth,\n\t\t\t),\n\t\t[size, currencyWidth]\n\t);\n\n\t// Currency selector component\n\tconst currencySelector = (\n\t\t// A sub-label uses the FormField label recipe and rhythm.\n\t\t<Stack gap=\"xs\" className=\"currency-input--selector\">\n\t\t\t{!!currencyLabel && <Label htmlFor={currencyTriggerId} className={cn('currency-input--selector-label text-inherit', formLabelLineClass)}>{currencyLabel}</Label>}\n\t\t\t<baseui.Select\n\t\t\t\tvalue={selectedCurrency}\n\t\t\t\tonValueChange={(value) => handleCurrencyChange(value)}\n\t\t\t\tdisabled={disabled || disableCurrencySelector}\n\t\t\t>\n\t\t\t\t<baseui.SelectTrigger\n\t\t\t\t\tid={currencyTriggerId}\n\t\t\t\t\taria-label={currencyLabel || strings.currencyAriaLabel}\n\t\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\t\ticonClassName={selectToggleRecipes.icon[size]}\n\t\t\t\t\tclassName={triggerClassName}\n\t\t\t\t>\n\t\t\t\t\t<baseui.SelectValue\n\t\t\t\t\t\tplaceholder={currencyPlaceholder ? (\n\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" type=\"secondary\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t\t\t{currencyPlaceholder}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : undefined}\n\t\t\t\t\t/>\n\t\t\t\t</baseui.SelectTrigger>\n\t\t\t\t<SelectPopupContent>\n\t\t\t\t\t<SelectPopupGroup>\n\t\t\t\t\t\t{normalizedCurrencies.map((curr) => (\n\t\t\t\t\t\t\t<SelectPopupItem key={curr.value} value={curr.value} size={size}>\n\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t\t\t\t{curr.label}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</SelectPopupItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SelectPopupGroup>\n\t\t\t\t</SelectPopupContent>\n\t\t\t</baseui.Select>\n\t\t</Stack>\n\t);\n\n\treturn (\n\t\t// Bottom-aligned, so the amount and currency controls stay level when only\n\t\t// the currency carries a sub-label.\n\t\t<div className={cn('currency-input--component', 'flex items-end gap-space-md')}>\n\t\t\t{currencyPosition === 'start' && currencySelector}\n\n\t\t\t<div className=\"currency-input--amount min-w-0 flex-1\">\n\t\t\t\t<DecimalInput\n\t\t\t\t\tref={forwardedRef}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tdecimalPlaces={2}\n\t\t\t\t\tallowNegative={false}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\tstrings={{ decrement: strings.decrement, increment: strings.increment }}\n\t\t\t\t\t{...decimalInputProps}\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{currencyPosition === 'end' && currencySelector}\n\t\t</div>\n\t);\n}\n\n// forwardRef + memo: forward to the underlying decimal input so consumers\n// can focus/measure programmatically.\nexport const CurrencyInput = memo(forwardRef<HTMLInputElement, CurrencyInputProps>(CurrencyInputImpl));\nCurrencyInput.displayName = 'CurrencyInput';\n","export interface MoneyInputStrings {\n\toriginalValue: string;\n\tconversionWarning: string;\n}\n\nexport const defaultMoneyInputStrings: MoneyInputStrings = {\n\toriginalValue: 'Original value: {value}',\n\tconversionWarning: 'Currency will be converted from {from} to {to}.',\n};\n\nexport function interpolateMoneyInputString(\n\ttemplate: string,\n\tvalues: Record<string, string>,\n) {\n\treturn Object.entries(values).reduce(\n\t\t(output, [key, value]) => output.replaceAll(`{${key}}`, value),\n\t\ttemplate,\n\t);\n}\n","/**\n * MoneyInput — canonical monetary editor.\n *\n * It composes CurrencyInput with optional FormField chrome, one combined\n * amount/currency callback, and opt-in original-value/conversion context.\n * Consumers import it from `themelia-react-ui/base/forms`; display-only\n * monetary values use `Money` from `themelia-react-ui/primitives`.\n */\nimport { AlertTriangle } from 'lucide-react';\nimport {\n\tforwardRef,\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n\ttype ChangeEvent,\n\ttype ReactNode,\n} from 'react';\n\nimport { Alert, AlertDescription } from '../feedback';\nimport { FormField } from '../forms/form-field';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { useMoneyConfig, type CurrencyCode } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tCurrencyInput,\n\ttype CurrencyInputProps,\n\ttype CurrencyOption,\n} from './currency-input';\nimport {\n\tdefaultMoneyInputStrings,\n\tinterpolateMoneyInputString,\n\ttype MoneyInputStrings,\n} from './money-input.strings';\n\nexport interface MoneyInputContext {\n\t/** Original major-unit amount, when available. */\n\tamount?: number | string | null;\n\t/** Original value currency, when available. */\n\tcurrency?: string | null;\n\t/** Optional original/record currency that can trigger a conversion warning. */\n\trecordCurrency?: string | null;\n\t/** Consumer-formatted original value shown as supporting context. */\n\tpair?: { formatted?: string | null } | null;\n}\n\nexport interface MoneyInputData {\n\t/** Parsed major-unit amount. `null` means the field is empty or incomplete; it is never coerced to zero. */\n\tamount: number | null;\n\t/** Active ISO 4217 currency code. */\n\tcurrency: CurrencyCode;\n}\n\nexport interface MoneyInputProps extends Omit<\n\tCurrencyInputProps,\n\t'currency' | 'defaultCurrency' | 'currencies' | 'onCurrencyChange' | 'strings'\n> {\n\t/** Current currency value (ISO 4217 code, e.g. `USD`). */\n\tcurrency?: CurrencyCode;\n\t/** Initial currency when uncontrolled. Falls back to UIProvider money config. */\n\tdefaultCurrency?: CurrencyCode;\n\t/** Available currencies. Custom option labels are preserved. */\n\tcurrencies?: Array<CurrencyCode | CurrencyOption>;\n\t/** Currency-only callback for existing form integrations. */\n\tonCurrencyChange?: (currency: CurrencyCode) => void;\n\t/**\n\t * Combined amount/currency callback for domain-form state. The amount is\n\t * parsed while the raw `value` / `onChange` channel keeps intermediate text\n\t * such as `1.` available to the editor.\n\t */\n\tonChangeData?: (data: MoneyInputData) => void;\n\t/** Optional context used for original-value and conversion messaging. */\n\tmoney?: MoneyInputContext | null;\n\t/** Optional field label. Omit when an external FormField already owns the chrome. */\n\tlabel?: string;\n\t/** Short guidance rendered below the control when no helper text or error is present. */\n\thint?: string;\n\t/** Supporting copy rendered below the control. */\n\thelperText?: string;\n\t/** Validation message. Also marks the amount and currency controls invalid. */\n\terror?: string;\n\t/** Marks the owned label and native amount input as required. */\n\trequired?: boolean;\n\t/** Existing record currency used to detect a currency migration. */\n\trecordCurrency?: CurrencyCode;\n\t/** Whether a record-currency mismatch renders the conversion warning. */\n\tshowMigrationWarning?: boolean;\n\t/** Consumer-owned warning content for a record-currency mismatch. */\n\tmigrationWarningMessage?: ReactNode;\n\t/** Whether to render `money.pair.formatted` as original-value context. */\n\tshowOriginalHint?: boolean;\n\t/** String overrides forwarded to the underlying DecimalInput steppers. */\n\tcontrolStrings?: CurrencyInputProps['strings'];\n\t/** Class name for the inner amount input. `className` styles the complete MoneyInput surface. */\n\tcontrolClassName?: string;\n\t/** Copy overrides for original-value and conversion-warning messages. */\n\tstrings?: StringsProp<MoneyInputStrings>;\n}\n\nconst FALLBACK_CURRENCIES: CurrencyCode[] = ['USD', 'EUR'];\n\nfunction parseAmount(value: unknown) {\n\tconst raw = String(value ?? '').trim();\n\tif (!raw) return null;\n\tconst parsed = Number.parseFloat(raw.replace(',', '.'));\n\treturn Number.isFinite(parsed) ? parsed : null;\n}\n\nfunction resolveFormatted(value: unknown) {\n\treturn typeof value === 'string' ? value.trim() : '';\n}\n\nfunction currencyOptionValue(option: CurrencyCode | CurrencyOption) {\n\treturn typeof option === 'string' ? option : option.value;\n}\n\nexport const MoneyInput = forwardRef<HTMLInputElement, MoneyInputProps>(function MoneyInput(\n\tallProps,\n\tforwardedRef,\n) {\n\tconst {\n\t\tcurrency: controlledCurrency,\n\t\tdefaultCurrency,\n\t\tcurrencies,\n\t\tonCurrencyChange,\n\t\tonChangeData,\n\t\tmoney,\n\t\tlabel,\n\t\thint,\n\t\thelperText,\n\t\terror,\n\t\trequired,\n\t\tinvalid,\n\t\trecordCurrency: recordCurrencyProp,\n\t\tshowMigrationWarning = true,\n\t\tmigrationWarningMessage,\n\t\tshowOriginalHint = true,\n\t\tcontrolStrings,\n\t\tcontrolClassName,\n\t\tstrings: stringsProp,\n\t\tclassName,\n\t\tonChange,\n\t\tvalue,\n\t\tdefaultValue,\n\t\t...props\n\t} = allProps;\n\tconst moneyConfig = useMoneyConfig();\n\tconst strings = useStrings(defaultMoneyInputStrings, stringsProp);\n\tconst resolvedDefaultCurrency = defaultCurrency\n\t\t?? moneyConfig.defaultCurrency\n\t\t?? 'USD';\n\tconst [internalCurrency, setInternalCurrency] = useState(resolvedDefaultCurrency);\n\tconst activeCurrency = controlledCurrency ?? internalCurrency;\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\n\tconst availableCurrencies = useMemo(() => {\n\t\tconst source = currencies?.length\n\t\t\t? currencies\n\t\t\t: [resolvedDefaultCurrency, ...FALLBACK_CURRENCIES];\n\t\tconst unique = new Map<string, CurrencyCode | CurrencyOption>();\n\t\tfor (const option of source) {\n\t\t\tconst optionValue = currencyOptionValue(option);\n\t\t\tif (!unique.has(optionValue)) unique.set(optionValue, option);\n\t\t}\n\t\tconst options = Array.from(unique.values());\n\t\treturn unique.has(activeCurrency) ? options : [activeCurrency, ...options];\n\t}, [activeCurrency, currencies, resolvedDefaultCurrency]);\n\tconst recordCurrency = recordCurrencyProp ?? money?.recordCurrency ?? undefined;\n\tconst originalFormatted = showOriginalHint\n\t\t? resolveFormatted(money?.pair?.formatted)\n\t\t: '';\n\tconst willMigrate = Boolean(\n\t\trecordCurrency\n\t\t&& activeCurrency\n\t\t&& recordCurrency !== activeCurrency,\n\t);\n\tconst isInvalid = invalid ?? Boolean(error);\n\n\tconst assignRef = useCallback((node: HTMLInputElement | null) => {\n\t\tinputRef.current = node;\n\t\tif (typeof forwardedRef === 'function') forwardedRef(node);\n\t\telse if (forwardedRef) forwardedRef.current = node;\n\t}, [forwardedRef]);\n\n\tconst handleAmountChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n\t\tonChange?.(event);\n\t\tonChangeData?.({\n\t\t\tamount: parseAmount(event.target.value),\n\t\t\tcurrency: activeCurrency,\n\t\t});\n\t}, [activeCurrency, onChange, onChangeData]);\n\n\tconst handleCurrencyChange = useCallback((nextCurrency: CurrencyCode) => {\n\t\tif (controlledCurrency === undefined) setInternalCurrency(nextCurrency);\n\t\tonCurrencyChange?.(nextCurrency);\n\t\tonChangeData?.({\n\t\t\tamount: parseAmount(inputRef.current?.value ?? value ?? defaultValue),\n\t\t\tcurrency: nextCurrency,\n\t\t});\n\t}, [controlledCurrency, defaultValue, onChangeData, onCurrencyChange, value]);\n\n\tconst input = (\n\t\t<CurrencyInput\n\t\t\t{...props}\n\t\t\tref={assignRef}\n\t\t\t{...('value' in allProps ? { value } : {})}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tcurrency={activeCurrency}\n\t\t\tcurrencies={availableCurrencies}\n\t\t\tonChange={handleAmountChange}\n\t\t\tonCurrencyChange={handleCurrencyChange}\n\t\t\tinvalid={isInvalid}\n\t\t\trequired={required}\n\t\t\taria-required={required ? true : props['aria-required']}\n\t\t\tstrings={controlStrings}\n\t\t\tclassName={controlClassName}\n\t\t/>\n\t);\n\tconst hasFieldChrome = Boolean(label || hint || helperText || error || required);\n\n\treturn (\n\t\t<Stack gap=\"sm\" className={cn('money-input--component', className)}>\n\t\t\t{/* The original value is one more supporting line: it keeps the field's\n\t\t\t hint rhythm and type, without a decorative glyph. */}\n\t\t\t<Stack gap=\"xs\" className=\"money-input--field\">\n\t\t\t\t{hasFieldChrome ? (\n\t\t\t\t\t<FormField\n\t\t\t\t\t\tlabel={label}\n\t\t\t\t\t\thint={hint}\n\t\t\t\t\t\thelperText={helperText}\n\t\t\t\t\t\terror={error}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t>\n\t\t\t\t\t\t{input}\n\t\t\t\t\t</FormField>\n\t\t\t\t) : input}\n\n\t\t\t\t{!!originalFormatted && !error && (\n\t\t\t\t\t<Text tag=\"p\" size=\"xs\" type=\"secondary\" className=\"money-input--original\">\n\t\t\t\t\t\t{interpolateMoneyInputString(strings.originalValue, { value: originalFormatted })}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t</Stack>\n\n\t\t\t{!!willMigrate && showMigrationWarning && (\n\t\t\t\t<Alert tone=\"warning\" className=\"money-input--warning\">\n\t\t\t\t\t<AlertTriangle aria-hidden=\"true\" />\n\t\t\t\t\t<AlertDescription>\n\t\t\t\t\t\t{migrationWarningMessage ?? interpolateMoneyInputString(\n\t\t\t\t\t\t\tstrings.conversionWarning,\n\t\t\t\t\t\t\t{ from: recordCurrency ?? '', to: activeCurrency },\n\t\t\t\t\t\t)}\n\t\t\t\t\t</AlertDescription>\n\t\t\t\t</Alert>\n\t\t\t)}\n\t\t</Stack>\n\t);\n});\n\nMoneyInput.displayName = 'MoneyInput';\n\nexport {\n\tdefaultMoneyInputStrings,\n\ttype MoneyInputStrings,\n} from './money-input.strings';\n","import { forwardRef, useMemo, useCallback } from 'react';\nimport { Select, type SelectProps } from '../choice-inputs';\nimport { cn } from '../../../lib/utils';\n\ntype RoundingMode = string;\n\nexport interface RoundingModeSelectProps extends Omit<SelectProps, 'options' | 'value' | 'onValueChange'> {\n\t/** Current rounding mode value */\n\tvalue?: RoundingMode;\n\n\t/** Canonical change handler. */\n\tonValueChange?: (value: RoundingMode | undefined) => void;\n\n\t/**\n\t * Labels for the rounding modes. Defaults to sentence-case names: `floor` →\n\t * \"Round down\", `half_up` → \"Round half up\", `ceil` → \"Round up\".\n\t */\n\tlabels?: Partial<Record<RoundingMode, string>>;\n}\n\nconst ORDERED_MODES: RoundingMode[] = ['floor', 'half_up', 'ceil'];\n\n/** People read a policy name, never the stored identifier. */\nconst defaultRoundingModeLabels: Record<string, string> = {\n\tfloor: 'Round down',\n\thalf_up: 'Round half up',\n\tceil: 'Round up',\n};\n\nexport const RoundingModeSelect = forwardRef<HTMLButtonElement, RoundingModeSelectProps>(function RoundingModeSelect(allProps, ref) {\n\tconst controlled = Object.prototype.hasOwnProperty.call(allProps, 'value');\n\tconst { value, onValueChange, labels, placeholder, className, ...props } = allProps;\n\tconst options = useMemo(\n\t\t() =>\n\t\t\tORDERED_MODES.map((mode) => ({\n\t\t\t\tvalue: mode,\n\t\t\t\tlabel: labels?.[mode] ?? defaultRoundingModeLabels[mode] ?? mode,\n\t\t\t})),\n\t\t[labels]\n\t);\n\n\tconst handleChange = useCallback(\n\t\t(next: string | undefined) => {\n\t\t\tonValueChange?.(next as RoundingMode | undefined);\n\t\t},\n\t\t[onValueChange]\n\t);\n\n\treturn <Select ref={ref} className={cn('rounding-mode-select--component', className)} options={options} {...(controlled ? { value } : {})} onValueChange={handleChange} placeholder={placeholder} {...props} />;\n});\n\nRoundingModeSelect.displayName = 'RoundingModeSelect';\n","import * as React from 'react';\nimport { useId, useState, useEffect, useCallback } from 'react';\nimport * as baseui from '../../ui/select';\nimport { Label, Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { useDensityConfig, type FormControlSize } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\nimport { formFieldTriggerClasses, resolveFormControlSize, formLabelLineClass } from '../forms/form-sizing';\nimport { selectToggleRecipes } from '../../../lib/field-affordance-recipes';\nimport { controlGroupHeightClasses } from '../../../lib/control-group-recipes';\nimport { DecimalInput } from './decimal-input';\nimport { SelectPopupContent, SelectPopupGroup, SelectPopupItem } from '../choice-inputs';\n\nexport interface DimensionObject {\n\t\twidth?: string;\n\t\theight?: string;\n\t\tdepth?: string;\n}\n\nexport type DimensionValue = string | DimensionObject;\nexport type DimensionUnit = 'mm' | 'cm' | 'm' | 'in' | 'ft' | 'px';\n\nexport interface DimensionsInputStrings {\n\t\twidth: string;\n\t\theight: string;\n\t\tdepth: string;\n\t\tunit: string;\n\t\twidthPlaceholder: string;\n\t\theightPlaceholder: string;\n\t\tdepthPlaceholder: string;\n}\n\nexport const defaultDimensionsInputStrings: DimensionsInputStrings = {\n\t\twidth: 'Width',\n\t\theight: 'Height',\n\t\tdepth: 'Depth',\n\t\tunit: 'Unit',\n\t\twidthPlaceholder: '0.00',\n\t\theightPlaceholder: '0.00',\n\t\tdepthPlaceholder: '0.00',\n};\n\nexport interface DimensionsInputProps {\n\t\t/** Current value (string \"WxHxD\" or object { width, height, depth }) */\n\t\tvalue?: DimensionValue;\n\n\t\t/** Default value for uncontrolled mode */\n\t\tdefaultValue?: DimensionValue;\n\n\t\t/** Format type: 'string' for \"WxHxD\" or 'object' for { width, height, depth } */\n\t\tformat?: 'string' | 'object';\n\n\t/** Current length unit value. */\n\tunit?: DimensionUnit;\n\n\t/** Default length unit for uncontrolled mode. */\n\tdefaultUnit?: DimensionUnit;\n\n\t\t/** Label for width input (sub-label) */\n\t\twidthLabel?: string;\n\n\t\t/** Label for height input (sub-label) */\n\t\theightLabel?: string;\n\n\t\t/** Label for depth/length input (sub-label) */\n\t\tdepthLabel?: string;\n\n\t\t/** Label for unit selector (sub-label) */\n\t\tunitLabel?: string;\n\n\t\t/** Placeholder for the unit select */\n\t\tunitPlaceholder?: string;\n\n\t\t/** Placeholder for width */\n\t\twidthPlaceholder?: string;\n\n\t\t/** Placeholder for height */\n\t\theightPlaceholder?: string;\n\n\t\t/** Placeholder for depth */\n\t\tdepthPlaceholder?: string;\n\n\t\t/** Form control size — flows through `useDensityConfig().defaultScale`. */\n\t\tsize?: FormControlSize;\n\n\t\t/** Callback when value changes */\n\t\tonChange?: (e: { target: { value: DimensionValue } }) => void;\n\n\t\t/** Callback when unit changes */\n\tonUnitChange?: (unit: DimensionUnit) => void;\n\n\t\t/** Number of decimal places. Defaults to 2 */\n\t\tdecimalPlaces?: number;\n\n\t\t/** Minimum value for all dimensions */\n\t\tmin?: number;\n\n\t\t/** Maximum value for all dimensions */\n\t\tmax?: number;\n\n\t\t/** Show unit selector. Defaults to true */\n\t\tshowUnitSelector?: boolean;\n\n\t\t/** Disable unit selector */\n\t\tdisableUnitSelector?: boolean;\n\n\t\t/** Layout orientation. Defaults to 'horizontal' */\n\t\tlayout?: 'horizontal' | 'vertical';\n\n\t\t/** Error state for styling (passed from FormField) */\n\t\tinvalid?: boolean;\n\n\t\t/** Disabled state */\n\t\tdisabled?: boolean;\n\n\t\t/** Additional CSS classes */\n\t\tclassName?: string;\n\n\t\t/** String overrides merged over defaults. Direct props (e.g. `widthLabel`) win over `strings` keys. */\n\t\tstrings?: StringsProp<DimensionsInputStrings>;\n}\n\n// Unit options\nconst UNIT_OPTIONS = [\n\t{ value: 'mm', label: 'mm' },\n\t{ value: 'cm', label: 'cm' },\n\t{ value: 'm', label: 'm' },\n\t{ value: 'in', label: 'in' },\n\t{ value: 'ft', label: 'ft' },\n\t{ value: 'px', label: 'px' },\n] as const;\n\nconst parseDimensionValue = (\n\t\tvalue: DimensionValue | undefined,\n\t\tformat: 'string' | 'object'\n): { width: string; height: string; depth: string } => {\n\t\tif (!value) {\n\t\t\t\treturn { width: '', height: '', depth: '' };\n\t\t}\n\n\t\tif (format === 'string' && typeof value === 'string') {\n\t\t\t\tconst parts = value.split('x').map((p) => p.trim());\n\t\t\t\treturn {\n\t\t\t\t\t\twidth: parts[0] || '',\n\t\t\t\t\t\theight: parts[1] || '',\n\t\t\t\t\t\tdepth: parts[2] || '',\n\t\t\t\t};\n\t\t}\n\n\t\tif (format === 'object' && typeof value === 'object') {\n\t\t\t\treturn {\n\t\t\t\t\t\twidth: value.width || '',\n\t\t\t\t\t\theight: value.height || '',\n\t\t\t\t\t\tdepth: value.depth || '',\n\t\t\t\t};\n\t\t}\n\n\t\treturn { width: '', height: '', depth: '' };\n};\n\nconst formatDimensionValue = (\n\t\twidth: string,\n\t\theight: string,\n\t\tdepth: string,\n\t\tformat: 'string' | 'object'\n): DimensionValue => {\n\t\tif (format === 'string') {\n\t\t\t\treturn `${width}x${height}x${depth}`;\n\t\t}\n\t\treturn { width, height, depth };\n};\n\nexport const DimensionsInput = React.forwardRef<HTMLDivElement, DimensionsInputProps>(function DimensionsInput({\n\t\tvalue: controlledValue,\n\t\tdefaultValue,\n\t\tformat = 'string',\n\t\tunit: controlledUnit,\n\tdefaultUnit = 'cm',\n\t\twidthLabel,\n\t\theightLabel,\n\t\tdepthLabel,\n\t\tunitLabel,\n\t\tunitPlaceholder,\n\t\twidthPlaceholder,\n\t\theightPlaceholder,\n\t\tdepthPlaceholder,\n\t\tonChange,\n\t\tonUnitChange,\n\t\tdecimalPlaces = 2,\n\t\tmin = 0,\n\t\tmax,\n\t\tshowUnitSelector = true,\n\t\tdisableUnitSelector = false,\n\t\tlayout = 'horizontal',\n\t\tinvalid,\n\t\tdisabled = false,\n\t\tclassName,\n\t\tsize: sizeProp,\n\t\tstrings: stringsProp,\n}: DimensionsInputProps, ref) {\n\t\tconst { defaultScale } = useDensityConfig();\n\t\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\t\tconst strings = useStrings(defaultDimensionsInputStrings, stringsProp);\n\t\tconst resolvedWidthLabel = widthLabel ?? strings.width;\n\t\tconst resolvedHeightLabel = heightLabel ?? strings.height;\n\t\tconst resolvedDepthLabel = depthLabel ?? strings.depth;\n\t\tconst resolvedUnitPlaceholder = unitPlaceholder ?? strings.unit;\n\t\tconst resolvedWidthPlaceholder = widthPlaceholder ?? strings.widthPlaceholder;\n\t\tconst resolvedHeightPlaceholder = heightPlaceholder ?? strings.heightPlaceholder;\n\t\tconst resolvedDepthPlaceholder = depthPlaceholder ?? strings.depthPlaceholder;\n\t\tconst shouldShowInlineLabels = layout === 'horizontal';\n\t\tconst shouldShowVerticalLabels = layout === 'vertical';\n\t\tconst shouldShowUnitSelector = showUnitSelector === true;\n\t\tconst hasUnitLabel = (unitLabel ?? '').length > 0;\n\t\tconst widthFieldLabel = shouldShowVerticalLabels ? resolvedWidthLabel : '';\n\t\tconst heightFieldLabel = shouldShowVerticalLabels ? resolvedHeightLabel : '';\n\t\tconst depthFieldLabel = shouldShowVerticalLabels ? resolvedDepthLabel : '';\n\t\tconst fieldId = useId();\n\t\tconst ids = { width: `${fieldId}-width`, height: `${fieldId}-height`, depth: `${fieldId}-depth`, unit: `${fieldId}-unit` };\n\t\t// Sub-labels above a field use the FormField label recipe; captions sit below.\n\t\tconst subLabelClasses = cn('text-inherit', formLabelLineClass);\n\n\t\t// Determine if value is controlled\n\t\tconst isValueControlled = controlledValue !== undefined;\n\t\tconst isUnitControlled = controlledUnit !== undefined;\n\n\t\t// Parse initial value\n\t\tconst initialParsed = parseDimensionValue(\n\t\t\t\tisValueControlled ? controlledValue : defaultValue,\n\t\t\t\tformat\n\t\t);\n\n\t\t// Internal state for uncontrolled mode\n\t\tconst [internalWidth, setInternalWidth] = useState(initialParsed.width);\n\t\tconst [internalHeight, setInternalHeight] = useState(initialParsed.height);\n\t\tconst [internalDepth, setInternalDepth] = useState(initialParsed.depth);\n\t\tconst [internalUnit, setInternalUnit] = useState(controlledUnit || defaultUnit);\n\n\t\t// Get current values\n\t\tconst parsedValue = parseDimensionValue(controlledValue, format);\n\t\tconst widthValue = isValueControlled ? parsedValue.width : internalWidth;\n\t\tconst heightValue = isValueControlled ? parsedValue.height : internalHeight;\n\t\tconst depthValue = isValueControlled ? parsedValue.depth : internalDepth;\n\t\tconst unitValue = isUnitControlled ? controlledUnit : internalUnit;\n\n\t\t// Sync internal state when controlled value changes\n\t\tuseEffect(() => {\n\t\t\t\tif (isValueControlled) {\n\t\t\t\t\t\tconst parsed = parseDimensionValue(controlledValue, format);\n\t\t\t\t\t\tsetInternalWidth(parsed.width);\n\t\t\t\t\t\tsetInternalHeight(parsed.height);\n\t\t\t\t\t\tsetInternalDepth(parsed.depth);\n\t\t\t\t}\n\t\t}, [controlledValue, format, isValueControlled]);\n\n\t\t// Handle dimension changes\n\t\tconst handleDimensionChange = useCallback(\n\t\t\t\t(dimension: 'width' | 'height' | 'depth', newValue: string) => {\n\t\t\t\t\t\tlet updatedWidth = widthValue;\n\t\t\t\t\t\tlet updatedHeight = heightValue;\n\t\t\t\t\t\tlet updatedDepth = depthValue;\n\n\t\t\t\t\t\tif (dimension === 'width') updatedWidth = newValue;\n\t\t\t\t\t\tif (dimension === 'height') updatedHeight = newValue;\n\t\t\t\t\t\tif (dimension === 'depth') updatedDepth = newValue;\n\n\t\t\t\t\t\tif (!isValueControlled) {\n\t\t\t\t\t\t\t\tsetInternalWidth(updatedWidth);\n\t\t\t\t\t\t\t\tsetInternalHeight(updatedHeight);\n\t\t\t\t\t\t\t\tsetInternalDepth(updatedDepth);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst formattedValue = formatDimensionValue(updatedWidth, updatedHeight, updatedDepth, format);\n\t\t\t\t\t\tonChange?.({ target: { value: formattedValue } });\n\t\t\t\t},\n\t\t\t\t[widthValue, heightValue, depthValue, isValueControlled, format, onChange]\n\t\t);\n\n\t\tconst handleUnitChange = useCallback(\n\t\t\t\t(newUnit: string | null) => {\n\t\t\t\t\t\tif (newUnit === null) return;\n\t\t\tconst typedUnit = newUnit as DimensionUnit;\n\t\t\t\t\t\tif (!isUnitControlled) {\n\t\t\t\t\t\t\t\tsetInternalUnit(typedUnit);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonUnitChange?.(typedUnit);\n\t\t\t\t},\n\t\t\t\t[isUnitControlled, onUnitChange]\n\t\t);\n\n\tconst unitSelector = (\n\t\t<Stack gap=\"xs\">\n\t\t\t\t\t\t{!!hasUnitLabel && shouldShowVerticalLabels && <Label htmlFor={ids.unit} className={subLabelClasses}>{unitLabel}</Label>}\n\t\t\t\t\t\t<baseui.Select\n\t\t\t\t\t\t\t\tvalue={unitValue}\n\t\t\t\t\t\t\t\tonValueChange={(value) => handleUnitChange(value)}\n\t\t\t\t\t\t\t\tdisabled={disabled || disableUnitSelector}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<baseui.SelectTrigger\n\t\t\t\t\t\t\t\t\t\tid={ids.unit}\n\t\t\t\t\t\t\t\t\t\taria-label={unitLabel ?? strings.unit}\n\t\t\t\t\t\t\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\t\t\t\t\t\t\ticonClassName={selectToggleRecipes.icon[size]}\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\tformFieldTriggerClasses(size),\n\t\t\t\t\t\t\t\t\t\t\t\tlayout === 'vertical'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'w-full'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'w-full @md/dimensions-input:w-32',\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<baseui.SelectValue\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" type=\"secondary\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{resolvedUnitPlaceholder}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\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</baseui.SelectTrigger>\n\t\t\t\t\t\t\t\t<SelectPopupContent>\n\t\t\t\t\t\t\t\t\t\t<SelectPopupGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t{UNIT_OPTIONS.map((unit) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectPopupItem key={unit.value} value={unit.value} size={size}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{unit.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectPopupItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</SelectPopupGroup>\n\t\t\t\t\t\t\t\t</SelectPopupContent>\n\t\t\t\t\t\t</baseui.Select>\n\t\t</Stack>\n\t\t);\n\n\t\treturn (\n\t\t<Stack ref={ref} gap=\"md\" className={cn('dimensions-input--component @container/dimensions-input', className)}>\n\t\t\t\t\t\t{/* Dimensions Inputs */}\n\t\t\t<Stack\n\t\t\t\tdirection={layout === 'vertical' ? 'vertical' : 'horizontal'}\n\t\t\t\tgap=\"md\"\n\t\t\t\talign={layout === 'vertical' ? 'stretch' : 'start'}\n\t\t\t\tclassName=\"dimensions-input--fields\"\n\t\t\t>\n\t\t\t\t\t\t\t\t{/* Width */}\n\t\t\t\t<Stack gap=\"xs\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t\t\t{!!shouldShowVerticalLabels && !!widthFieldLabel && <Label htmlFor={ids.width} className={subLabelClasses}>{widthFieldLabel}</Label>}\n\t\t\t\t\t\t\t\t\t\t<DecimalInput\n\t\t\t\t\t\t\t\t\t\t\t\tid={ids.width}\n\t\t\t\t\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={widthValue}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => handleDimensionChange('width', e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={resolvedWidthPlaceholder}\n\t\t\t\t\t\t\t\t\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\t\t\t\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\t\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\t\t\t\t\t\t\t\taria-label={resolvedWidthLabel}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{!!shouldShowInlineLabels && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{resolvedWidthLabel}\n\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\n\t\t\t\t\t\t\t\t{/* Separator */}\n\t\t\t\t\t\t\t\t{layout === 'horizontal' && (\n\t\t\t\t\t\t\t\t\t\t// One control tall, so the sign centres on the fields at every size.\n\t\t\t\t\t\t\t\t\t\t<div aria-hidden=\"true\" className={cn('dimensions-input--separator flex items-center', controlGroupHeightClasses[size])}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"secondary\">×</Text>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* Height */}\n\t\t\t\t<Stack gap=\"xs\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t\t\t{!!shouldShowVerticalLabels && !!heightFieldLabel && <Label htmlFor={ids.height} className={subLabelClasses}>{heightFieldLabel}</Label>}\n\t\t\t\t\t\t\t\t\t\t<DecimalInput\n\t\t\t\t\t\t\t\t\t\t\t\tid={ids.height}\n\t\t\t\t\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={heightValue}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => handleDimensionChange('height', e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={resolvedHeightPlaceholder}\n\t\t\t\t\t\t\t\t\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\t\t\t\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\t\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\t\t\t\t\t\t\t\taria-label={resolvedHeightLabel}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{!!shouldShowInlineLabels && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{resolvedHeightLabel}\n\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\n\t\t\t\t\t\t\t\t{/* Separator */}\n\t\t\t\t\t\t\t\t{layout === 'horizontal' && (\n\t\t\t\t\t\t\t\t\t\t// One control tall, so the sign centres on the fields at every size.\n\t\t\t\t\t\t\t\t\t\t<div aria-hidden=\"true\" className={cn('dimensions-input--separator flex items-center', controlGroupHeightClasses[size])}>\n\t\t\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"secondary\">×</Text>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{/* Depth */}\n\t\t\t\t<Stack gap=\"xs\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t\t\t{!!shouldShowVerticalLabels && !!depthFieldLabel && <Label htmlFor={ids.depth} className={subLabelClasses}>{depthFieldLabel}</Label>}\n\t\t\t\t\t\t\t\t\t\t<DecimalInput\n\t\t\t\t\t\t\t\t\t\t\t\tid={ids.depth}\n\t\t\t\t\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={depthValue}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => handleDimensionChange('depth', e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={resolvedDepthPlaceholder}\n\t\t\t\t\t\t\t\t\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\t\t\t\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\t\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\t\t\t\t\t\t\t\taria-label={resolvedDepthLabel}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{!!shouldShowInlineLabels && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{resolvedDepthLabel}\n\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\n\t\t\t\t\t\t\t\t{/* Unit Selector */}\n\t\t\t\t\t\t\t\t{!!shouldShowUnitSelector && (\n\t\t\t\t\t\t\t\t\t\t<Stack gap=\"xs\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'dimensions-input--unit',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout === 'vertical'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'w-full'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'w-full basis-full pt-0 @md/dimensions-input:w-32 @md/dimensions-input:basis-32 @md/dimensions-input:shrink-0',\n\t\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\t\t{unitSelector}\n\t\t\t\t\t\t\t\t\t\t\t\t{!!shouldShowInlineLabels && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{hasUnitLabel ? unitLabel : resolvedUnitPlaceholder}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</Stack>\n\t\t);\n});\n\nDimensionsInput.displayName = 'DimensionsInput';\n","import * as React from 'react';\nimport { useId, useState, useMemo, useCallback } from 'react';\nimport * as baseui from '../../ui/select';\nimport { Stack } from '../structure';\nimport { Label, Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { useDensityConfig, type FormControlSize } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\nimport { formFieldTriggerClasses, resolveFormControlSize, formLabelLineClass } from '../forms/form-sizing';\nimport { selectToggleRecipes } from '../../../lib/field-affordance-recipes';\nimport { DecimalInput } from './decimal-input';\nimport { SelectPopupContent, SelectPopupGroup, SelectPopupItem } from '../choice-inputs';\n\nexport type WeightUnit = 'g' | 'kg' | 'lb' | 'oz';\n\nexport interface WeightInputStrings {\n\t\t/** Above-field label for the unit selector. Empty string hides it. */\n\t\tunitLabel: string;\n\t\t/** Accessible name for the unit selector. */\n\t\tunitAriaLabel: string;\n\t\t/** Placeholder shown in the unit selector. */\n\t\tunitPlaceholder: string;\n}\n\nexport const defaultWeightInputStrings: WeightInputStrings = {\n\t\tunitLabel: '',\n\t\tunitAriaLabel: 'Unit',\n\t\tunitPlaceholder: '',\n};\n\nexport interface WeightInputProps {\n\t\t/** Controlled value */\n\t\tvalue?: string;\n\n\t\t/** Default value for uncontrolled mode */\n\t\tdefaultValue?: string;\n\n\t\t/** Current unit */\n\t\tunit?: WeightUnit;\n\n\t\t/** Default unit for uncontrolled mode */\n\t\tdefaultUnit?: WeightUnit;\n\n\t\t/** Value change handler */\n\t\tonChange?: (e: { target: { value: string } }) => void;\n\n\t\t/** Unit change handler */\n\t\tonUnitChange?: (unit: WeightUnit) => void;\n\n\t\t/** Number of decimal places */\n\t\tdecimalPlaces?: number;\n\n\t\t/** Minimum value */\n\t\tmin?: number;\n\n\t\t/** Maximum value */\n\t\tmax?: number;\n\n\t\t/** Show unit selector */\n\t\tshowUnitSelector?: boolean;\n\n\t\t/** Disable unit selector */\n\t\tdisableUnitSelector?: boolean;\n\n\t\t/** Override default strings (unit selector label + placeholder). */\n\t\tstrings?: StringsProp<WeightInputStrings>;\n\n\t\t/** Width of unit selector */\n\t\tunitWidth?: string;\n\n\t\t/** Error state for styling (passed from FormField) */\n\t\tinvalid?: boolean;\n\n\t\t/** Disabled state */\n\t\tdisabled?: boolean;\n\n\t\t/** Form control size — flows through `useDensityConfig().defaultScale`. */\n\t\tsize?: FormControlSize;\n\n\t\t/** Additional class names */\n\t\tclassName?: string;\n}\n\nconst UNIT_OPTIONS: Array<{ value: WeightUnit; label: string }> = [\n\t\t{ value: 'g', label: 'g' },\n\t\t{ value: 'kg', label: 'kg' },\n\t\t{ value: 'lb', label: 'lb' },\n\t\t{ value: 'oz', label: 'oz' },\n];\n\nexport const WeightInput = React.forwardRef<HTMLDivElement, WeightInputProps>(function WeightInput({\n\t\tvalue: controlledValue,\n\t\tdefaultValue,\n\t\tunit: controlledUnit,\n\t\tdefaultUnit = 'g',\n\t\tonChange,\n\t\tonUnitChange,\n\t\tdecimalPlaces = 2,\n\t\tmin = 0,\n\t\tmax,\n\t\tshowUnitSelector = true,\n\t\tdisableUnitSelector = false,\n\t\tunitWidth = 'w-24',\n\t\tstrings: stringsProp,\n\t\tinvalid,\n\t\tdisabled = false,\n\t\tsize: sizeProp,\n\t\tclassName,\n}: WeightInputProps, ref) {\n\t\tconst { defaultScale } = useDensityConfig();\n\t\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\t\tconst strings = useStrings(defaultWeightInputStrings, stringsProp);\n\t\tconst isValueControlled = controlledValue !== undefined;\n\t\tconst isUnitControlled = controlledUnit !== undefined;\n\n\t\tconst [internalValue, setInternalValue] = useState(defaultValue ?? '');\n\t\tconst [internalUnit, setInternalUnit] = useState<WeightUnit>(controlledUnit ?? defaultUnit);\n\n\t\tconst value = isValueControlled ? controlledValue ?? '' : internalValue;\n\t\tconst unit = isUnitControlled ? controlledUnit ?? defaultUnit : internalUnit;\n\n\t\tconst handleValueChange = useCallback(\n\t\t\t\t(e: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\tif (!isValueControlled) {\n\t\t\t\t\t\t\t\tsetInternalValue(e.target.value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange?.({ target: { value: e.target.value } });\n\t\t\t\t},\n\t\t\t\t[isValueControlled, onChange]\n\t\t);\n\n\t\tconst handleUnitChange = useCallback(\n\t\t\t\t(nextUnit: string | null) => {\n\t\t\t\t\t\tif (nextUnit === null) return;\n\t\t\t\t\t\tconst weightUnit = nextUnit as WeightUnit;\n\t\t\t\t\t\tif (!isUnitControlled) {\n\t\t\t\t\t\t\t\tsetInternalUnit(weightUnit);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonUnitChange?.(weightUnit);\n\t\t\t\t},\n\t\t\t\t[isUnitControlled, onUnitChange]\n\t\t);\n\n\t\tconst unitOptions = useMemo(() => UNIT_OPTIONS, []);\n\t\tconst hasUnitLabel = strings.unitLabel !== '';\n\t\tconst unitTriggerId = useId();\n\n\t\treturn (\n\t\t\t\t// Bottom-aligned, so value and unit stay level when only the unit has a sub-label.\n\t\t\t\t<div ref={ref} className={cn('weight-input--component', 'flex items-end gap-space-md', className)}>\n\t\t\t\t\t\t<div className=\"flex-1\">\n\t\t\t\t\t\t\t\t<DecimalInput\n\t\t\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t\t\t\tonChange={handleValueChange}\n\t\t\t\t\t\t\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\t\t\t\t\t\t\tallowNegative={false}\n\t\t\t\t\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{!!showUnitSelector && (\n\t\t\t\t<Stack gap=\"xs\">\n\t\t\t\t\t\t\t\t\t\t{!!hasUnitLabel && <Label htmlFor={unitTriggerId} className={cn('text-inherit', formLabelLineClass)}>{strings.unitLabel}</Label>}\n\t\t\t\t\t\t\t\t\t\t<baseui.Select value={unit} onValueChange={(value) => handleUnitChange(value)} disabled={disabled || disableUnitSelector}>\n\t\t\t\t\t\t\t\t<baseui.SelectTrigger\n\t\t\t\t\t\t\t\t\t\tid={unitTriggerId}\n\t\t\t\t\t\t\t\t\t\taria-label={strings.unitLabel || strings.unitAriaLabel}\n\t\t\t\t\t\t\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\t\t\t\t\t\t\ticonClassName={selectToggleRecipes.icon[size]}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tformFieldTriggerClasses(size),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tunitWidth\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<baseui.SelectValue\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={strings.unitPlaceholder ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" type=\"secondary\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{strings.unitPlaceholder}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) : undefined}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</baseui.SelectTrigger>\n\t\t\t\t\t\t\t\t\t\t\t\t<SelectPopupContent>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectPopupGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{unitOptions.map((option) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<SelectPopupItem key={option.value} value={option.value} size={size}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectPopupItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</SelectPopupGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t</SelectPopupContent>\n\t\t\t\t\t\t\t\t\t\t</baseui.Select>\n\t\t\t\t</Stack>\n\t\t\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t);\n});\n\nWeightInput.displayName = 'WeightInput';\n","import * as React from 'react';\nimport { useEffect, useMemo, useState, useCallback } from 'react';\nimport { FormField } from '../forms/form-field';\nimport { Grid, Stack } from '../structure';\nimport { TextLink } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport type { FormControlSize } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\nimport { DecimalInput } from './decimal-input';\n\nexport interface CoordinatesObjectValue {\n\t\tlat?: string;\n\t\tlng?: string;\n}\n\nexport type CoordinatesValue = string | CoordinatesObjectValue;\n\nexport interface CoordinatesInputStrings {\n\t\t/** Above-field label for the latitude input. Empty string hides it. */\n\t\tlatLabel: string;\n\t\t/** Above-field label for the longitude input. Empty string hides it. */\n\t\tlngLabel: string;\n\t\t/** Placeholder shown in the latitude input. */\n\t\tlatPlaceholder: string;\n\t\t/** Placeholder shown in the longitude input. */\n\t\tlngPlaceholder: string;\n\t\t/** Anchor text for the Google Maps preview link. Empty string hides it. */\n\t\tpreviewLinkLabel: string;\n}\n\nexport const defaultCoordinatesInputStrings: CoordinatesInputStrings = {\n\t\tlatLabel: '',\n\t\tlngLabel: '',\n\t\tlatPlaceholder: '',\n\t\tlngPlaceholder: '',\n\t\tpreviewLinkLabel: '',\n};\n\nexport interface CoordinatesInputProps {\n\t\t/** Controlled value */\n\t\tvalue?: CoordinatesValue;\n\n\t\t/** Default value for uncontrolled mode */\n\t\tdefaultValue?: CoordinatesValue;\n\n\t\t/** Output format */\n\t\tformat?: 'string' | 'object';\n\n\t\t/** Change handler */\n\t\tonChange?: (e: { target: { value: CoordinatesValue } }) => void;\n\n\t\t/** Number of decimal places */\n\t\tdecimalPlaces?: number;\n\n\t\t/** Show preview link to Google Maps */\n\t\tshowPreviewLink?: boolean;\n\n\t\t/** Override default strings (labels + placeholders + preview link). */\n\t\tstrings?: StringsProp<CoordinatesInputStrings>;\n\n\t\t/** Error state for styling (passed from FormField) */\n\t\tinvalid?: boolean;\n\n\t\t/** Additional class names */\n\t\tclassName?: string;\n\n\t\t/** Disabled state */\n\t\tdisabled?: boolean;\n\n\t\t/** Control-height preset for both fields. Falls back to `UIProvider.density.defaultScale`, like the other numeric inputs. */\n\t\tsize?: FormControlSize;\n}\n\nconst parseValue = (\n\t\tvalue: CoordinatesValue | undefined,\n\t\tformat: 'string' | 'object'\n): { lat: string; lng: string } => {\n\t\tif (!value) {\n\t\t\t\treturn { lat: '', lng: '' };\n\t\t}\n\n\t\tif (format === 'string' && typeof value === 'string') {\n\t\t\t\tconst [lat, lng] = value.split(',').map((part) => part.trim());\n\t\t\t\treturn { lat: lat ?? '', lng: lng ?? '' };\n\t\t}\n\n\t\tif (format === 'object' && typeof value === 'object') {\n\t\t\t\treturn { lat: value.lat ?? '', lng: value.lng ?? '' };\n\t\t}\n\n\t\treturn { lat: '', lng: '' };\n};\n\nconst formatValue = (lat: string, lng: string, format: 'string' | 'object'): CoordinatesValue => {\n\t\tif (format === 'string') {\n\t\t\t\treturn `${lat},${lng}`;\n\t\t}\n\t\treturn { lat, lng };\n};\n\nconst isFiniteNumberInRange = (value: string, min: number, max: number): boolean => {\n\t\tif (!value) return false;\n\t\tconst num = Number(value);\n\t\treturn Number.isFinite(num) && num >= min && num <= max;\n};\n\nexport const CoordinatesInput = React.forwardRef<HTMLDivElement, CoordinatesInputProps>(function CoordinatesInput({\n\t\tvalue: controlledValue,\n\t\tdefaultValue,\n\t\tformat = 'object',\n\t\tonChange,\n\t\tdecimalPlaces = 6,\n\t\tshowPreviewLink = true,\n\t\tstrings: stringsProp,\n\t\tinvalid,\n\t\tclassName,\n\t\tdisabled,\n\t\tsize,\n}: CoordinatesInputProps, ref) {\n\t\tconst strings = useStrings(defaultCoordinatesInputStrings, stringsProp);\n\t\tconst isControlled = controlledValue !== undefined;\n\n\t\tconst initialParsed = parseValue(isControlled ? controlledValue : defaultValue, format);\n\t\tconst [internalLat, setInternalLat] = useState(initialParsed.lat);\n\t\tconst [internalLng, setInternalLng] = useState(initialParsed.lng);\n\n\t\tconst parsedControlled = parseValue(controlledValue, format);\n\t\tconst lat = isControlled ? parsedControlled.lat : internalLat;\n\t\tconst lng = isControlled ? parsedControlled.lng : internalLng;\n\n\t\tuseEffect(() => {\n\t\t\t\tif (isControlled) {\n\t\t\t\t\t\tsetInternalLat(parsedControlled.lat);\n\t\t\t\t\t\tsetInternalLng(parsedControlled.lng);\n\t\t\t\t}\n\t\t}, [isControlled, parsedControlled.lat, parsedControlled.lng]);\n\n\t\tconst update = useCallback(\n\t\t\t\t(nextLat: string, nextLng: string) => {\n\t\t\t\t\t\tif (!isControlled) {\n\t\t\t\t\t\t\t\tsetInternalLat(nextLat);\n\t\t\t\t\t\t\t\tsetInternalLng(nextLng);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonChange?.({ target: { value: formatValue(nextLat, nextLng, format) } });\n\t\t\t\t},\n\t\t\t\t[isControlled, onChange, format]\n\t\t);\n\n\t\tconst mapUrl = useMemo(() => {\n\t\t\t\tconst hasValidLat = isFiniteNumberInRange(lat, -90, 90);\n\t\t\t\tconst hasValidLng = isFiniteNumberInRange(lng, -180, 180);\n\t\t\t\tif (!hasValidLat || !hasValidLng) return null;\n\t\t\t\treturn `https://www.google.com/maps?q=${encodeURIComponent(`${lat},${lng}`)}`;\n\t\t}, [lat, lng]);\n\n\t\treturn (\n\t\t\t\t<Stack ref={ref} gap=\"lg\" className={cn('coordinates-input--component', className)}>\n\t\t\t\t\t\t<Grid columns={{ base: 1, md: 2 }} gap=\"lg\">\n\t\t\t\t\t\t\t\t<FormField label={strings.latLabel || undefined}>\n\t\t\t\t\t\t\t\t\t\t<DecimalInput\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={strings.latPlaceholder || undefined}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={lat}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => update(e.target.value, lng)}\n\t\t\t\t\t\t\t\t\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\t\t\t\t\t\t\t\t\tallowNegative\n\t\t\t\t\t\t\t\t\t\t\t\tmin={-90}\n\t\t\t\t\t\t\t\t\t\t\t\tmax={90}\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormField>\n\t\t\t\t\t\t\t\t<FormField label={strings.lngLabel || undefined}>\n\t\t\t\t\t\t\t\t\t\t<DecimalInput\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={strings.lngPlaceholder || undefined}\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={lng}\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => update(lat, e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\t\tdecimalPlaces={decimalPlaces}\n\t\t\t\t\t\t\t\t\t\t\t\tallowNegative\n\t\t\t\t\t\t\t\t\t\t\t\tmin={-180}\n\t\t\t\t\t\t\t\t\t\t\t\tmax={180}\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid={invalid}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FormField>\n\t\t\t\t\t\t</Grid>\n\n\t\t\t\t\t\t{!!showPreviewLink && !!mapUrl && !!strings.previewLinkLabel && (\n\t\t\t\t\t\t\t\t<TextLink href={mapUrl} type=\"secondary\" underline={false}>\n\t\t\t\t\t\t\t\t\t\t{strings.previewLinkLabel}\n\t\t\t\t\t\t\t\t</TextLink>\n\t\t\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t);\n});\n\nCoordinatesInput.displayName = 'CoordinatesInput';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCA,IAAa0C,IAAkD;CAC9D,WAAW;CACX,WAAW;AACZ,GAuBMC,KACL,GACA,GACA,MACY;CACZ,IAAI,CAACC,GAAO,OAAO;CAEnB,IAAIC,IAAYD;CAShB,IARA,IAAYC,EAAU,QAAQ,MAAM,GAAG,GAEvC,AAGCA,IAHGC,IACSD,EAAU,QAAQ,YAAY,EAAE,IAEhCA,EAAU,QAAQ,WAAW,EAAE,GAGxCC,KAAiBD,EAAU,SAAS,GAAG,GAAG;EAC7C,IAAME,IAAkBF,EAAU,WAAW,GAAG;EAEhD,AADA,IAAYA,EAAU,QAAQ,MAAM,EAAE,GAClCE,MAAiB,IAAY,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,CAEP;;AAEX,CAAC;AAED,GAAiB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header-BA697l4a.js","names":["React","_Fragment","React","_Fragment","Text","DisplayLabel","Stack","dotRecipes","popoverWidthRecipes","DropdownMenuItem","DropdownMenuSeparator","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuLabel","DropdownMenuContent","DropdownMenuLinkItem","DropdownMenu","ActionMenu","formatInitials","AvatarFallback","Avatar","AvatarImage","Badge","Separator","PopoverTrigger","Popover","PopoverContent","Breadcrumbs","SidebarTrigger","useLayoutLinkRenderer","useCommandShortcut","React$1","Fragment$1","HeaderBreadcrumbs","resolvedRenderLink","items","out","homeBreadcrumb","breadcrumbs","showCrumbs","cn","className","showSidebarTrigger","triggerSlot","Header","forwardRef","props","contentClassName","slots","showBreadcrumbs","breadcrumbsClassName","leftClassName","centerClassName","rightClassName","defaultHeaderNotificationsStrings","defaultHeaderSearchStrings","defaultHeaderUserMenuStrings","detectMac","ua","HeaderSearch","stringsProp","strings","useStrings","detectedMac","setDetectedMac","useState","shortcutModifier","isMetaShortcut","enableShortcut","onOpen","shortcutTitle","shortcut","shortcutSlot","Button","Search","iconClassName","HeaderGlobalSearchTrigger","onOpenChange","HeaderToolButton","Icon","label","active","badge","HeaderToolPopover","open","triggerClassName","HeaderUserMenu","initials","user","actions","onProfile","User","onSettings","Settings","onLogout","LogOut","trigger","renderTrigger","showEmail","ChevronsUpDown","contentClasses","customContent","NOTIFICATION_TONE_CLASSNAMES","HeaderNotifications","badgeText","unreadCount","Bell","onMarkAllRead","notifications","NotificationRow","onNotificationClick","notification","onViewAll","viewAllHref","renderNotification","content","onClick","renderLink"],"sources":["../src/components/layout/header/partials/header-breadcrumbs.tsx","../src/components/layout/header/header.tsx","../src/components/layout/header/header.types.ts","../src/components/layout/header/partials/header-search.tsx","../src/components/layout/header/partials/header-global-search-trigger.tsx","../src/components/layout/header/partials/header-tool-button.tsx","../src/components/layout/header/partials/header-tool-popover.tsx","../src/components/layout/header/partials/header-user-menu.tsx","../src/components/layout/header/partials/header-notifications.tsx"],"sourcesContent":["/** HeaderBreadcrumbs — breadcrumbs trail with optional sidebar trigger. */\nimport * as React from 'react';\n\nimport { Separator } from '../../../base/display/separator';\nimport { Breadcrumbs } from '../../../base/navigation/breadcrumbs';\nimport { SidebarTrigger } from '../../../base/sidebar';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport type { BreadcrumbItem } from '../../layout.types';\nimport type { HeaderBreadcrumbsProps } from '../header.types';\n\nexport function HeaderBreadcrumbs({\n\tbreadcrumbs = [],\n\thomeBreadcrumb = null,\n\tshowSidebarTrigger = true,\n\ttriggerSlot,\n\trenderLink,\n\tclassName,\n}: HeaderBreadcrumbsProps) {\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\tconst items = React.useMemo<BreadcrumbItem[]>(() => {\n\t\tconst out: BreadcrumbItem[] = [];\n\t\tif (homeBreadcrumb) out.push(homeBreadcrumb);\n\t\tout.push(...breadcrumbs);\n\t\treturn out;\n\t}, [homeBreadcrumb, breadcrumbs]);\n\n\tconst showCrumbs = items.length > 0;\n\n\treturn (\n\t\t<div className={cn('relative flex min-h-action min-w-0 items-center gap-space-lg', className)}>\n\t\t\t{!!showSidebarTrigger && (\n\t\t\t\t<div className=\"relative flex min-h-action shrink-0 items-center justify-center\">\n\t\t\t\t\t{triggerSlot ?? <SidebarTrigger className=\"size-action-xs [&_svg]:size-icon\" />}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{!!showCrumbs && (\n\t\t\t\t<>\n\t\t\t\t\t{!!showSidebarTrigger && <Separator orientation=\"vertical\" className=\"h-icon shrink-0\" />}\n\t\t\t\t\t<div className=\"flex min-w-0 flex-1 items-center overflow-hidden\">\n\t\t\t\t\t\t<Breadcrumbs\n\t\t\t\t\t\t\tbreadcrumbs={items}\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\trenderLink={resolvedRenderLink}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'min-w-0 overflow-hidden',\n\t\t\t\t\t\t\t\t'[&_[data-slot=breadcrumb-list]]:flex-nowrap [&_[data-slot=breadcrumb-list]]:overflow-hidden [&_[data-slot=breadcrumb-list]]:break-normal',\n\t\t\t\t\t\t\t\t'[&_[data-slot=breadcrumb-item]]:min-w-0 [&_[data-slot=breadcrumb-item]]:shrink',\n\t\t\t\t\t\t\t\t'[&_[data-slot=breadcrumb-link]]:truncate [&_[data-slot=breadcrumb-page]]:truncate',\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","/** Header — sticky top bar with breadcrumbs and slot-driven content regions. */\nimport { forwardRef } from 'react';\n\nimport { Stack } from '../../base/structure';\nimport { cn } from '../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../hooks';\nimport { HeaderBreadcrumbs } from './partials/header-breadcrumbs';\nimport type { HeaderProps } from './header.types';\n\nexport const Header = forwardRef<HTMLElement, HeaderProps>(function Header({\n\tshowBreadcrumbs = true,\n\tbreadcrumbs = [],\n\thomeBreadcrumb = null,\n\tshowSidebarTrigger = true,\n\tslots,\n\trenderLink,\n\tclassName,\n\tcontentClassName,\n\tleftClassName,\n\tcenterClassName,\n\trightClassName,\n\tbreadcrumbsClassName,\n\t...props\n}, ref) {\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\n\treturn (\n\t\t<header\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t'header--component @container/app-header sticky top-0 z-40 flex min-w-0 min-h-shell-header items-center border-b border-border bg-background px-surface py-space-sm transition-[width,height] ease-linear',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<Stack direction=\"horizontal\" gap=\"xl\" align=\"center\" wrap className={cn('min-w-0 min-h-action flex-1', contentClassName)}>\n\t\t\t\t{!!slots?.brand && (\n\t\t\t\t\t<div className=\"hidden min-w-0 shrink-0 items-center @2xl/app-header:flex\">\n\t\t\t\t\t\t{slots.brand}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{!!showBreadcrumbs && (\n\t\t\t\t\t<div className=\"min-w-0 flex-1 basis-32\">\n\t\t\t\t\t\t{slots?.breadcrumbs ?? (\n\t\t\t\t\t\t<HeaderBreadcrumbs\n\t\t\t\t\t\t\tbreadcrumbs={breadcrumbs}\n\t\t\t\t\t\t\thomeBreadcrumb={homeBreadcrumb}\n\t\t\t\t\t\t\tshowSidebarTrigger={showSidebarTrigger}\n\t\t\t\t\t\t\trenderLink={resolvedRenderLink}\n\t\t\t\t\t\t\tclassName={breadcrumbsClassName}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{!!slots?.left && (\n\t\t\t\t\t<div className={cn('flex min-w-0 items-center', leftClassName)}>\n\t\t\t\t\t\t{slots.left}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{!!slots?.center && (\n\t\t\t\t\t/* Search narrows within its region before navigation or account controls lose space. */\n\t\t\t\t\t<div className={cn('hidden min-w-0 flex-1 basis-64 items-center justify-center @3xl/app-header:flex [&>*]:min-w-0 [&>*]:max-w-full', centerClassName)}>\n\t\t\t\t\t\t{slots.center}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{!!slots?.right && (\n\t\t\t\t\t<div className={cn('ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-md [&>*]:max-w-full', rightClassName)}>\n\t\t\t\t\t\t{slots.right}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</header>\n\t);\n});\n\nHeader.displayName = 'Header';\n","/**\n * Header layout and partial types.\n *\n * This layer is intentionally framework-neutral: links and route state enter\n * through `renderLink`, and app-specific content enters through slots.\n */\nimport type { ComponentType, HTMLAttributes, ReactNode } from 'react';\n\nimport type { StringsProp } from '../../../lib/strings';\nimport type { SemanticTone } from '../../../lib/component-vocabulary';\n\nimport type {\n\tBreadcrumbItem,\n\tLayoutNavigationAdapter,\n\tLayoutUser,\n} from '../layout.types';\n\nexport interface HeaderBreadcrumbsProps extends LayoutNavigationAdapter {\n\t/** Trail entries, root first. */\n\tbreadcrumbs?: BreadcrumbItem[];\n\t/** Root entry prepended to the trail. */\n\thomeBreadcrumb?: BreadcrumbItem | null;\n\t/** Renders the sidebar collapse control. */\n\tshowSidebarTrigger?: boolean;\n\ttriggerSlot?: ReactNode;\n\tclassName?: string;\n}\n\nexport type NotificationTone = Extract<\n\tSemanticTone,\n\t'info' | 'success' | 'warning' | 'destructive'\n>;\n\nexport interface HeaderNotification {\n\tid: string | number;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Supporting copy under the title. */\n\tdescription?: ReactNode;\n\ttime?: ReactNode;\n\tread?: boolean;\n\ttone?: NotificationTone;\n\t/** Destination for the entry, when it navigates. */\n\thref?: string;\n}\n\nexport interface HeaderNotificationsStrings {\n\ttriggerLabel: string;\n\theading: string;\n\tmarkAllRead: string;\n\tempty: string;\n\tviewAll: string;\n}\n\nexport const defaultHeaderNotificationsStrings: HeaderNotificationsStrings = {\n\ttriggerLabel: 'Notifications',\n\theading: 'Notifications',\n\tmarkAllRead: 'Mark all as read',\n\tempty: 'No new notifications',\n\tviewAll: 'View all notifications',\n};\n\nexport interface HeaderNotificationsProps extends LayoutNavigationAdapter {\n\t/** Notifications to list, newest first. */\n\tnotifications?: HeaderNotification[];\n\t/** Unread total shown on the trigger. */\n\tunreadCount?: number;\n\tonNotificationClick?: (notification: HeaderNotification) => void;\n\tonMarkAllRead?: () => void;\n\tonViewAll?: () => void;\n\t/** Destination for the view-all link. */\n\tviewAllHref?: string;\n\t/** Alignment of the shell's content. */\n\talign?: 'start' | 'center' | 'end';\n\t/** Which side of the trigger the surface opens on. */\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<HeaderNotificationsStrings>;\n\tclassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\t/** Replaces the default notification row. */\n\trenderNotification?: (notification: HeaderNotification) => ReactNode;\n}\n\nexport interface HeaderSearchStrings {\n\tplaceholder: string;\n\tshortcutMac: string;\n\tshortcutPc: string;\n}\n\nexport const defaultHeaderSearchStrings: HeaderSearchStrings = {\n\tplaceholder: 'Search...',\n\tshortcutMac: '⌘K',\n\tshortcutPc: 'Ctrl+K',\n};\n\nexport interface HeaderSearchProps {\n\tonOpen?: () => void;\n\t/** Modifier shown in the shortcut hint. Auto-detected when omitted. */\n\tshortcutModifier?: 'meta' | 'control';\n\t/** Binds the keyboard shortcut that opens search. */\n\tenableShortcut?: boolean;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<HeaderSearchStrings>;\n\tclassName?: string;\n\t/** Merged onto the icon. */\n\ticonClassName?: string;\n\t/** Replaces the shortcut hint shown in the trigger. */\n\tshortcutSlot?: ReactNode;\n}\n\nexport interface HeaderGlobalSearchTriggerProps extends HeaderSearchProps {\n\t/** Whether the surface is showing. Controlled. */\n\topen?: boolean;\n\tonOpenChange?: (open: boolean) => void;\n}\n\nexport interface HeaderToolButtonProps {\n\t/** Display label. */\n\tlabel: string;\n\t/** Leading glyph. */\n\ticon: ComponentType<{ className?: string }>;\n\t/** Marks the control as currently engaged. */\n\tactive?: boolean;\n\t/** Disables the control. */\n\tdisabled?: boolean;\n\t/** Chip rendered beside the label. */\n\tbadge?: ReactNode;\n\tonClick?: () => void;\n\tclassName?: string;\n\t/** Merged onto the icon. */\n\ticonClassName?: string;\n}\n\nexport interface HeaderToolPopoverProps {\n\t/** Display label. */\n\tlabel: string;\n\t/** Leading glyph. */\n\ticon: ComponentType<{ className?: string }>;\n\t/** Whether the surface is showing. Controlled. */\n\topen?: boolean;\n\t/** Whether the surface starts open, for uncontrolled use. */\n\tdefaultOpen?: boolean;\n\tonOpenChange?: (open: boolean) => void;\n\t/** Marks the control as currently engaged. */\n\tactive?: boolean;\n\t/** Disables the control. */\n\tdisabled?: boolean;\n\t/** Chip rendered beside the label. */\n\tbadge?: ReactNode;\n\t/** Alignment of the shell's content. */\n\talign?: 'start' | 'center' | 'end';\n\t/** Which side of the trigger the surface opens on. */\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\tsideOffset?: number;\n\tclassName?: string;\n\t/** Merged onto the trigger. */\n\ttriggerClassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\tchildren?: ReactNode;\n}\n\nexport interface HeaderUserMenuProps {\n\t/** The signed-in user shown in the menu. */\n\tuser: LayoutUser;\n\t/** Shows the signed-in email under the name. */\n\tshowEmail?: boolean;\n\t/** Extra content appended inside the menu. */\n\tcustomContent?: ReactNode;\n\tonProfile?: () => void;\n\tonSettings?: () => void;\n\tonLogout?: () => void;\n\t/** Alignment of the shell's content. */\n\talign?: 'start' | 'center' | 'end';\n\t/** Which side of the trigger the surface opens on. */\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<HeaderUserMenuStrings>;\n\t/** Merged onto the trigger. */\n\ttriggerClassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\t/** Replaces the default trigger element. */\n\trenderTrigger?: (user: LayoutUser) => ReactNode;\n}\n\nexport interface HeaderUserMenuStrings {\n\tprofile: string;\n\tsettings: string;\n\tlogout: string;\n}\n\nexport const defaultHeaderUserMenuStrings: HeaderUserMenuStrings = {\n\tprofile: 'Profile',\n\tsettings: 'Settings',\n\tlogout: 'Log out',\n};\n\nexport interface HeaderSlots {\n\t/** Leading brand/logo region before breadcrumbs. */\n\tbrand?: ReactNode;\n\t/** Replaces the breadcrumb/sidebar-trigger region. */\n\tbreadcrumbs?: ReactNode;\n\t/** Leading content after breadcrumbs. */\n\tleft?: ReactNode;\n\t/** Center content, usually search or a scope switcher. */\n\tcenter?: ReactNode;\n\t/** Trailing content, usually notifications/user menu/actions. */\n\tright?: ReactNode;\n}\n\nexport interface HeaderProps extends LayoutNavigationAdapter, HTMLAttributes<HTMLElement> {\n\t/** Renders the breadcrumb trail. */\n\tshowBreadcrumbs?: boolean;\n\t/** Trail entries, root first. */\n\tbreadcrumbs?: BreadcrumbItem[];\n\t/** Root entry prepended to the trail. */\n\thomeBreadcrumb?: BreadcrumbItem | null;\n\t/** Renders the sidebar collapse control. */\n\tshowSidebarTrigger?: boolean;\n\t/** Replaces individual regions of the shell. */\n\tslots?: HeaderSlots;\n\tclassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\t/** Merged onto the leading region. */\n\tleftClassName?: string;\n\t/** Merged onto the centre region. */\n\tcenterClassName?: string;\n\trightClassName?: string;\n\tbreadcrumbsClassName?: string;\n}\n","/** HeaderSearch — framework-neutral search trigger with optional Cmd/Ctrl+K. */\nimport { useEffect, useState } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Button } from '../../../base/buttons';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\nimport { kbdRecipe } from '../../../../lib/surface-recipes';\n\nimport { useCommandShortcut } from '../../hooks';\nimport {\n\tdefaultHeaderSearchStrings,\n\ttype HeaderSearchProps,\n} from '../header.types';\n\nfunction detectMac(): boolean {\n\tif (typeof navigator === 'undefined') return false;\n\tconst ua = (navigator as Navigator & { userAgentData?: { platform?: string } }).userAgentData;\n\tif (ua?.platform) return ua.platform === 'macOS';\n\treturn /Mac|iPhone|iPad/.test(navigator.platform);\n}\n\nexport function HeaderSearch({\n\tonOpen,\n\tshortcutModifier,\n\tenableShortcut = true,\n\tstrings: stringsProp,\n\tclassName,\n\ticonClassName,\n\tshortcutSlot,\n}: HeaderSearchProps) {\n\tconst strings = useStrings(defaultHeaderSearchStrings, stringsProp);\n\tconst [detectedMac, setDetectedMac] = useState(false);\n\tuseEffect(() => {\n\t\tif (shortcutModifier === undefined) setDetectedMac(detectMac());\n\t}, [shortcutModifier]);\n\tconst resolvedModifier = shortcutModifier ?? (detectedMac ? 'meta' : 'control');\n\tconst isMetaShortcut = resolvedModifier === 'meta';\n\tuseCommandShortcut({ key: 'k', enabled: enableShortcut, onTrigger: onOpen });\n\n\tconst shortcutTitle = isMetaShortcut ? strings.shortcutMac : strings.shortcutPc;\n\tconst shortcut = shortcutSlot ?? (\n\t\t// The shared key cap; it appears once the trigger is wide enough to show it.\n\t\t<kbd className={cn('header-search--shortcut', kbdRecipe, 'hidden lg:inline-flex')}>\n\t\t\t{isMetaShortcut ? strings.shortcutMac : strings.shortcutPc}\n\t\t</kbd>\n\t);\n\n\treturn (\n\t\t<Button\n\t\t\tdata-component=\"header-search\"\n\t\t\tdata-slot=\"header-search-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-label={strings.placeholder}\n\t\t\ttone=\"secondary\"\n\t\t\tbuttonStyle=\"outline\"\n\t\t\tsize=\"sm\"\n\t\t\tonClick={onOpen}\n\t\t\tclassName={cn(\n\t\t\t\t'header-search--component header-search--trigger h-action-sm w-full min-w-0 justify-start gap-space-md rounded-inner px-control-sm text-foreground shadow-none transition-[background-color,border-color,color,box-shadow]',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\ttitle={shortcutTitle}\n\t\t>\n\t\t\t<Search data-slot=\"header-search-icon\" className={cn('header-search--icon size-icon shrink-0 text-muted-foreground', iconClassName)} aria-hidden=\"true\" />\n\t\t\t<Text tag=\"span\" size=\"inherit\" type=\"secondary\" data-slot=\"header-search-placeholder\" className=\"header-search--placeholder min-w-0 flex-1 truncate text-left\">\n\t\t\t\t{strings.placeholder}\n\t\t\t</Text>\n\t\t\t{shortcut}\n\t\t</Button>\n\t);\n}\n","/** HeaderGlobalSearchTrigger — header search trigger with controlled open callback. */\nimport { HeaderSearch } from './header-search';\nimport type { HeaderGlobalSearchTriggerProps } from '../header.types';\n\nexport function HeaderGlobalSearchTrigger({\n\tonOpen,\n\tonOpenChange,\n\t...props\n}: HeaderGlobalSearchTriggerProps) {\n\treturn (\n\t\t<HeaderSearch\n\t\t\t{...props}\n\t\t\tonOpen={() => {\n\t\t\t\tonOpen?.();\n\t\t\t\tonOpenChange?.(true);\n\t\t\t}}\n\t\t/>\n\t);\n}\n","/** HeaderToolButton — icon control for dense app headers. */\nimport * as React from 'react';\n\nimport { Button } from '../../../base/buttons';\nimport { Text } from '../../../typography';\nimport { cn } from '../../../../lib/utils';\n\nimport type { HeaderToolButtonProps } from '../header.types';\n\nexport const HeaderToolButton = React.forwardRef<\n\tHTMLButtonElement,\n\tHeaderToolButtonProps\n>((\n\t{\n\t\tlabel,\n\t\ticon: Icon,\n\t\tactive = false,\n\t\tdisabled = false,\n\t\tbadge,\n\t\tonClick,\n\t\tclassName,\n\t\ticonClassName,\n\t},\n\tref,\n) => (\n\t<Button\n\t\tref={ref}\n\t\tdata-component=\"header-tool-button\"\n\t\tdata-slot=\"header-tool-button\"\n\t\ttype=\"button\"\n\t\ttone=\"secondary\"\n\t\tbuttonStyle=\"ghost\"\n\t\tsize=\"sm\" iconOnly\n\t\taria-label={label}\n\t\taria-pressed={active || undefined}\n\t\ttitle={label}\n\t\tdisabled={disabled}\n\t\tonClick={onClick}\n\t\tclassName={cn(\n\t\t\t'header-tool-button--component header-tool-button--trigger relative size-action-sm rounded-inner text-foreground transition-[background-color,color,box-shadow] hover:bg-accent hover:text-accent-foreground',\n\t\t\tactive && 'bg-accent text-accent-foreground',\n\t\t\tclassName,\n\t\t)}\n\t>\n\t\t<Icon\n\t\t\tdata-slot=\"header-tool-icon\"\n\t\t\tclassName={cn('header-tool-button--icon size-icon', iconClassName)}\n\t\t\taria-hidden=\"true\"\n\t\t/>\n\t\t{!!badge && (\n\t\t\t<Text tag=\"span\" size=\"xs\" weight=\"medium\" lineHeight=\"none\" data-slot=\"header-tool-badge\" className=\"header-tool-button--badge absolute right-space-xs top-space-xs flex min-h-space-lg min-w-space-lg items-center justify-center rounded-full bg-destructive px-space-2xs text-destructive-foreground\">\n\t\t\t\t{badge}\n\t\t\t</Text>\n\t\t)}\n\t\t<Text tag=\"span\" size=\"inherit\" className=\"sr-only\">{label}</Text>\n\t</Button>\n));\n\nHeaderToolButton.displayName = 'HeaderToolButton';\n","/** HeaderToolPopover — controlled header icon trigger plus popover content. */\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from '../../../base/popover';\nimport { cn } from '../../../../lib/utils';\n\nimport type { HeaderToolPopoverProps } from '../header.types';\nimport { HeaderToolButton } from './header-tool-button';\nimport { popoverWidthRecipes } from '../../../base/popover/popover.recipes';\n\nexport function HeaderToolPopover({\n\tlabel,\n\ticon,\n\topen,\n\tdefaultOpen,\n\tonOpenChange,\n\tactive,\n\tdisabled,\n\tbadge,\n\talign = 'end',\n\tside = 'bottom',\n\tsideOffset = 8,\n\tclassName,\n\ttriggerClassName,\n\tcontentClassName,\n\tchildren,\n}: HeaderToolPopoverProps) {\n\treturn (\n\t\t<Popover\n\t\t\topen={open}\n\t\t\tdefaultOpen={defaultOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<HeaderToolButton\n\t\t\t\t\tlabel={label}\n\t\t\t\t\ticon={icon}\n\t\t\t\t\tactive={active ?? open}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tbadge={badge}\n\t\t\t\t\tclassName={triggerClassName}\n\t\t\t\t/>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent\n\t\t\t\tdata-component=\"header-tool-popover\"\n\t\t\t\tdata-slot=\"header-tool-popover-content\"\n\t\t\t\talign={align}\n\t\t\t\tside={side}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'header-tool-popover--component',\n\t\t\t\t\tpopoverWidthRecipes.lg,\n\t\t\t\t\tclassName,\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","/** HeaderUserMenu — avatar/name trigger with consumer-wired menu callbacks. */\nimport type { ReactElement } from 'react';\n\nimport { ChevronsUpDown, LogOut, Settings, User } from 'lucide-react';\n\nimport { ActionMenu, type ActionMenuAction } from '../../../base/action-menu';\nimport { Avatar, AvatarFallback, AvatarImage } from '../../../base/avatar';\nimport { Button } from '../../../base/buttons';\nimport { formatInitials } from '../../../primitives/initials-format';\nimport { Text } from '../../../typography';\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuTrigger,\n} from '../../../base/navigation/dropdown-menu';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultHeaderUserMenuStrings,\n\ttype HeaderUserMenuProps,\n} from '../header.types';\n\nexport function HeaderUserMenu({\n\tuser,\n\tshowEmail = true,\n\tcustomContent,\n\tonProfile,\n\tonSettings,\n\tonLogout,\n\talign = 'end',\n\tside = 'bottom',\n\tstrings: stringsProp,\n\ttriggerClassName,\n\tcontentClassName,\n\trenderTrigger,\n}: HeaderUserMenuProps) {\n\tconst strings = useStrings(defaultHeaderUserMenuStrings, stringsProp);\n\tconst initials = formatInitials(user.name, { strategy: 'first-words' });\n\n\t// Profile and settings sit together; sign-out is held apart by a rule with\n\t// no caption, which is what `group: true` is for.\n\tconst actions: ActionMenuAction[] = [\n\t\t...(onProfile ? [{ id: 'profile', label: strings.profile, icon: User, onClick: onProfile }] : []),\n\t\t...(onSettings ? [{ id: 'settings', label: strings.settings, icon: Settings, onClick: onSettings }] : []),\n\t\t...(onLogout\n\t\t\t? [{\n\t\t\t\tid: 'logout',\n\t\t\t\tlabel: strings.logout,\n\t\t\t\ticon: LogOut,\n\t\t\t\tonClick: onLogout,\n\t\t\t\t...(onProfile || onSettings ? { group: true as const } : null),\n\t\t\t}]\n\t\t\t: []),\n\t];\n\n\tconst trigger = renderTrigger?.(user) ?? (\n\t\t<Button\n\t\t\tdata-component=\"header-user-menu\"\n\t\t\tdata-slot=\"header-user-menu-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-label={user.name}\n\t\t\ttone=\"secondary\"\n\t\t\tbuttonStyle=\"ghost\"\n\t\t\tsize=\"lg\"\n\t\t\tclassName={cn(\n\t\t\t\t'header-user-menu--component header-user-menu--trigger group min-w-0 max-w-56 justify-start gap-space-md text-foreground shadow-none hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent max-sm:size-action-lg max-sm:justify-center max-sm:p-0 max-sm:[&_.header-user-menu--identity]:hidden max-sm:[&_.header-user-menu--chevron]:hidden',\n\t\t\t\ttriggerClassName,\n\t\t\t)}\n\t\t>\n\t\t\t<Avatar data-slot=\"header-user-avatar\" className=\"header-user-menu--avatar size-avatar-sm overflow-hidden rounded-full ring-1 ring-border\">\n\t\t\t\t{!!user.avatar && <AvatarImage src={user.avatar} alt={user.name} />}\n\t\t\t\t<AvatarFallback className=\"rounded-full bg-muted text-xs font-semibold text-muted-foreground\">\n\t\t\t\t\t{initials}\n\t\t\t\t</AvatarFallback>\n\t\t\t</Avatar>\n\t\t\t<div data-slot=\"header-user-identity\" className=\"header-user-menu--identity grid min-w-0 flex-1 gap-dense text-start leading-none\">\n\t\t\t\t<Text type=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"truncate\">{user.name}</Text>\n\t\t\t\t{!!showEmail && !!user.email && (\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" lineHeight=\"tight\" className=\"truncate\">{user.email}</Text>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<ChevronsUpDown className=\"header-user-menu--chevron size-icon-sm shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n\t\t</Button>\n\t);\n\n\tconst contentClasses = cn(\n\t\t'header-user-menu--content w-(--anchor-width) min-w-56 rounded-radius',\n\t\tcontentClassName,\n\t);\n\n\t// `customContent` replaces the menu body wholesale, which is a plain\n\t// dropdown rather than a list of commands — ActionMenu is deliberately not\n\t// that, so this path stays on the primitive it actually needs.\n\tif (customContent) {\n\t\treturn (\n\t\t\t<DropdownMenu>\n\t\t\t\t<DropdownMenuTrigger render={trigger as ReactElement} />\n\t\t\t\t<DropdownMenuContent\n\t\t\t\t\tdata-component=\"header-user-menu-content\"\n\t\t\t\t\tdata-slot=\"header-user-menu-content\"\n\t\t\t\t\tclassName={contentClasses}\n\t\t\t\t\talign={align}\n\t\t\t\t\tside={side}\n\t\t\t\t>\n\t\t\t\t\t{customContent}\n\t\t\t\t</DropdownMenuContent>\n\t\t\t</DropdownMenu>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ActionMenu\n\t\t\tactions={actions}\n\t\t\talign={align}\n\t\t\tside={side}\n\t\t\tcontentClassName={contentClasses}\n\t\t\twidth=\"w-auto\"\n\t\t\tcloseOnSelect\n\t\t\trenderTrigger={trigger as ReactElement}\n\t\t/>\n\t);\n}\n","/** HeaderNotifications — bell dropdown for consumer-supplied notifications. */\nimport type { ReactElement } from 'react';\n\nimport { Bell } from 'lucide-react';\n\nimport { Badge } from '../../../base/badge';\nimport { Button } from '../../../base/buttons';\nimport { Stack } from '../../../base/structure';\nimport { DisplayLabel, Text } from '../../../typography';\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuLinkItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from '../../../base/navigation/dropdown-menu';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport {\n\tdefaultHeaderNotificationsStrings,\n\ttype HeaderNotification,\n\ttype HeaderNotificationsProps,\n\ttype NotificationTone,\n} from '../header.types';\nimport { popoverWidthRecipes } from '../../../base/popover/popover.recipes';\nimport { dotRecipes } from '../../../../lib/tone-recipes';\n\nconst NOTIFICATION_TONE_CLASSNAMES: Record<NotificationTone, string> = {\n\tinfo: 'bg-info',\n\tsuccess: 'bg-success',\n\twarning: 'bg-warning',\n\tdestructive: 'bg-destructive',\n};\n\nexport function HeaderNotifications({\n\tnotifications = [],\n\tunreadCount = 0,\n\tonNotificationClick,\n\tonMarkAllRead,\n\tonViewAll,\n\tviewAllHref,\n\trenderLink,\n\talign = 'end',\n\tside = 'bottom',\n\tstrings: stringsProp,\n\tclassName,\n\tcontentClassName,\n\trenderNotification,\n}: HeaderNotificationsProps) {\n\tconst strings = useStrings(defaultHeaderNotificationsStrings, stringsProp);\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\tconst badgeText = unreadCount > 99 ? '99+' : String(unreadCount);\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\trender={\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-component=\"header-notifications\"\n\t\t\t\t\t\tdata-slot=\"header-notifications-trigger\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\taria-label={strings.triggerLabel}\n\t\t\t\t\t\tclassName={cn('header-notifications--component header-notifications--trigger relative', className)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Bell className=\"size-icon\" aria-hidden=\"true\" />\n\t\t\t\t\t\t{unreadCount > 0 && (\n\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\ttone=\"destructive\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -right-1 -top-1 flex h-4.5 min-w-4.5 items-center justify-center px-space-xs py-0\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{badgeText}\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Button>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<DropdownMenuContent\n\t\t\t\tdata-component=\"header-notifications-content\"\n\t\t\t\tdata-slot=\"header-notifications-content\"\n\t\t\t\tclassName={cn('header-notifications--content', popoverWidthRecipes.lg, contentClassName)}\n\t\t\t\talign={align}\n\t\t\t\tside={side}\n\t\t\t>\n\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t<DropdownMenuLabel aria-hidden={false} className=\"header-notifications--label flex items-center justify-between gap-space-lg text-inherit\">\n\t\t\t\t\t\t<DisplayLabel className=\"text-inherit\">{strings.heading}</DisplayLabel>\n\t\t\t\t\t\t{unreadCount > 0 && !!onMarkAllRead && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tonClick={onMarkAllRead}\n\t\t\t\t\t\t\t\tclassName=\"shrink-0\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{strings.markAllRead}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</DropdownMenuLabel>\n\t\t\t\t\t<DropdownMenuSeparator />\n\n\t\t\t\t\t{notifications.length === 0 ? (\n\t\t\t\t\t\t<div className=\"header-notifications--empty p-surface text-center\">\n\t\t\t\t\t\t\t<Text type=\"secondary\">{strings.empty}</Text>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Stack gap=\"xs\" className=\"header-notifications--list\">\n\t\t\t\t\t\t\t{notifications.map((notification) => (\n\t\t\t\t\t\t\t\t<NotificationRow\n\t\t\t\t\t\t\t\t\tkey={notification.id}\n\t\t\t\t\t\t\t\t\tnotification={notification}\n\t\t\t\t\t\t\t\t\tonClick={onNotificationClick}\n\t\t\t\t\t\t\t\t\trenderLink={resolvedRenderLink}\n\t\t\t\t\t\t\t\t\trenderNotification={renderNotification}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t)}\n\t\t\t\t</DropdownMenuGroup>\n\n\t\t\t\t{!!(onViewAll || viewAllHref) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<DropdownMenuSeparator />\n\t\t\t\t\t\t{viewAllHref ? (\n\t\t\t\t\t\t\t<DropdownMenuLinkItem\n\t\t\t\t\t\t\t\thref={viewAllHref}\n\t\t\t\t\t\t\t\trender={(props) =>\n\t\t\t\t\t\t\t\t\tresolvedRenderLink({\n\t\t\t\t\t\t\t\t\t\t...props,\n\t\t\t\t\t\t\t\t\t\thref: viewAllHref,\n\t\t\t\t\t\t\t\t\t\tchildren: props.children,\n\t\t\t\t\t\t\t\t\t}) as ReactElement\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{strings.viewAll}\n\t\t\t\t\t\t\t</DropdownMenuLinkItem>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<DropdownMenuItem onClick={onViewAll}>{strings.viewAll}</DropdownMenuItem>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction NotificationRow({\n\tnotification,\n\tonClick,\n\trenderLink,\n\trenderNotification,\n}: {\n\tnotification: HeaderNotification;\n\tonClick?: (n: HeaderNotification) => void;\n\trenderLink: NonNullable<HeaderNotificationsProps['renderLink']>;\n\t/** Replaces the default notification row. */\n\trenderNotification?: HeaderNotificationsProps['renderNotification'];\n}) {\n\tif (renderNotification) return renderNotification(notification);\n\n\tconst content = (\n\t\t<Stack direction=\"horizontal\" align=\"start\" wrap={false} gap=\"sm\" className=\"header-notifications--item-content\">\n\t\t\t{!!notification.tone && (\n\t\t\t\t<span\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tdata-tone={notification.tone}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'header-notifications--tone mt-space-sm',\n\t\t\t\t\t\t\t\t\tdotRecipes.marker,\n\t\t\t\t\t\tNOTIFICATION_TONE_CLASSNAMES[notification.tone],\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<Stack gap=\"dense\" className=\"min-w-0\">\n\t\t\t\t<Text type=\"inherit\" weight=\"medium\">{notification.title}</Text>\n\t\t\t\t{!!notification.description && <Text size=\"xs\" type=\"secondary\">{notification.description}</Text>}\n\t\t\t\t{!!notification.time && <Text size=\"xs\" type=\"secondary\">{notification.time}</Text>}\n\t\t\t</Stack>\n\t\t</Stack>\n\t);\n\n\tconst className = cn(\n\t\t'header-notifications--item items-start',\n\t\t!notification.read && 'bg-muted text-muted-foreground',\n\t);\n\n\tif (notification.href) {\n\t\treturn (\n\t\t\t<DropdownMenuLinkItem\n\t\t\t\thref={notification.href}\n\t\t\t\tclassName={className}\n\t\t\t\tonClick={() => onClick?.(notification)}\n\t\t\t\trender={(props) =>\n\t\t\t\t\trenderLink({\n\t\t\t\t\t\t...props,\n\t\t\t\t\t\thref: notification.href,\n\t\t\t\t\t\tchildren: props.children,\n\t\t\t\t\t}) as ReactElement\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuLinkItem>\n\t\t);\n\t}\n\n\treturn (\n\t\t<DropdownMenuItem onClick={() => onClick?.(notification)} className={className}>\n\t\t\t{content}\n\t\t</DropdownMenuItem>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAgBiC,EAAkB,EACjC,iBAAc,CAAC,GACf,oBAAiB,MACjB,wBAAqB,IACrB,gBACA,eACA,gBAC0B;CAC1B,IAAMC,IAAqBL,EAAsB,EAAE,cAAW,CAAC,GACzDM,IAAQnC,EAAM,cAAgC;EACnD,IAAMoC,IAAwB,CAAC;EAG/B,OAFIC,KAAgBD,EAAI,KAAKC,CAAc,GAC3CD,EAAI,KAAK,GAAGE,CAAW,GAChBF;CACR,GA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EAAa,QAAQ,gCACvB;CAqBA,OAnBIA,EAAa,OAEf,kBAAChG,GAAD;EACC,MAAMgG,EAAa;EACR;EACX,eAAeK,IAAUL,CAAY;EACrC,SAAS,MACRM,EAAW;GACV,GAAGvE;GACH,MAAMiE,EAAa;GACnB,UAAUjE,EAAM;EACjB,CAAC;EAGD,UAAAqE;CACoB,CAAA,IAKvB,kBAAC1G,GAAD;EAAkB,eAAe2G,IAAUL,CAAY;EAAc;EACnE,UAAAI;CACgB,CAAA;AAEpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-BQ-L7Uu2.js","names":["IconComponent","SidebarMenuBadge","resolveLayoutLinkRenderer","useLayoutLinkRenderer","useMemo","renderLink","toPath","href","isPathMatch","currentPath","currentUrl","path","getNavLabel","item","getNavKey","label","fallbackIndex","NavBadge","value","resolveNavBadge","handle","liveBadges","itemBadge","DynamicIcon","props","icon","IconComponent","iconMap","size","renderSidebarLink","useActivePath","useCallback","useCommandShortcut","enabled","onTrigger","handler","event","key","preventDefault"],"sources":["../src/components/layout/hooks/use-layout-link.tsx","../src/components/layout/sidebar/sidebar.utils.tsx","../src/components/layout/hooks/use-active-path.ts","../src/components/layout/hooks/use-command-shortcut.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport {\n\tresolveLayoutLinkRenderer,\n\ttype LayoutLinkRenderer,\n\ttype LayoutNavigationAdapter,\n} from '../layout.types';\n\nexport function useLayoutLinkRenderer({\n\trenderLink,\n}: LayoutNavigationAdapter = {}): LayoutLinkRenderer {\n\treturn useMemo(\n\t\t() => resolveLayoutLinkRenderer({ renderLink }),\n\t\t[renderLink],\n\t);\n}\n"," \n/** Sidebar utilities — pure path helpers, labels, icon rendering, badge pill. */\nimport * as React from 'react';\n\nimport { SidebarMenuBadge } from '../../base/sidebar';\n\nimport type { LayoutIconSource, LayoutLinkRenderer } from '../layout.types';\nimport type { SidebarNavItem } from './sidebar.types';\nimport type { ComponentScale } from '../../../lib/component-vocabulary';\n\nexport function toPath(href: string): string {\n\tif (href.startsWith('#/')) {\n\t\treturn href.slice(1).split('?')[0]?.split('#')[0] || '/';\n\t}\n\n\ttry {\n\t\treturn new URL(href, 'http://local.invalid').pathname;\n\t} catch {\n\t\treturn href;\n\t}\n}\n\nexport function isPathMatch(currentUrl: string, path: string): boolean {\n\tconst currentPath = toPath(currentUrl);\n\treturn currentPath === path || currentPath.startsWith(path + '/') || currentPath.startsWith(path + '?');\n}\n\nexport function getNavLabel(item: Pick<SidebarNavItem, 'label'>): React.ReactNode {\n\treturn item.label;\n}\n\nexport function getNavKey(item: SidebarNavItem, fallbackIndex?: number): React.Key {\n\tconst label = getNavLabel(item);\n\treturn item.handle ?? item.href ?? (typeof label === 'string' || typeof label === 'number' ? label : `nav-${fallbackIndex ?? 0}`);\n}\n\nexport function NavBadge({\n\tvalue,\n\tsize = 'md',\n}: {\n\t/** Current value. Controlled. */\n\tvalue: string | number;\n\t/** Size preset. */\n\tsize?: ComponentScale;\n}) {\n\treturn (\n\t\t<SidebarMenuBadge inline size={size}>\n\t\t\t{value}\n\t\t</SidebarMenuBadge>\n\t);\n}\n\nexport function resolveNavBadge(\n\thandle: string | undefined,\n\titemBadge: string | number | undefined,\n\tliveBadges: Record<string, string | number> | undefined,\n): string | number | undefined {\n\tif (handle && liveBadges && liveBadges[handle] != null) {\n\t\treturn liveBadges[handle];\n\t}\n\treturn itemBadge;\n}\n\nexport interface DynamicIconProps extends React.SVGProps<SVGSVGElement> {\n\t/** Leading glyph. */\n\ticon: LayoutIconSource;\n\t/** Resolves an item's icon name to a component, keeping navigation data serialisable. */\n\ticonMap?: Record<string, React.ComponentType<{ className?: string }>>;\n\t/** Size preset. */\n\tsize?: number;\n\tclassName?: string;\n}\n\nexport function DynamicIcon({\n\ticon,\n\ticonMap = {},\n\tsize = 20,\n\tclassName = 'size-icon',\n\t...props\n}: DynamicIconProps) {\n\tif (!icon) return null;\n\n\tif (typeof icon === 'string') {\n\t\tconst IconComponent = iconMap[icon];\n\t\treturn IconComponent ? <IconComponent className={className} /> : null;\n\t}\n\n\tif (\n\t\ttypeof icon === 'function'\n\t\t|| (typeof icon === 'object' && icon !== null && '$$typeof' in icon)\n\t) {\n\t\tconst IconComponent = icon as React.ElementType<React.SVGProps<SVGSVGElement>>;\n\t\treturn <IconComponent className={className} width={size} height={size} {...props} />;\n\t}\n\n\treturn null;\n}\n\nexport function renderSidebarLink(\n\trenderLink: LayoutLinkRenderer,\n\titem: SidebarNavItem,\n\tchildren: React.ReactNode,\n\tclassName?: string,\n\tactive?: boolean,\n) {\n\treturn renderLink({\n\t\thref: item.href,\n\t\tchildren,\n\t\tclassName,\n\t\tactive,\n\t\tdisabled: item.disabled || !item.href,\n\t\texternal: item.external,\n\t});\n}\n","import { useCallback } from 'react';\n\nimport { isPathMatch, toPath } from '../sidebar/sidebar.utils';\n\nexport function useActivePath(currentUrl = '/') {\n\treturn useCallback(\n\t\t(href?: string) => !!href && isPathMatch(currentUrl, toPath(href)),\n\t\t[currentUrl],\n\t);\n}\n","import { useEffect } from 'react';\n\nexport interface UseCommandShortcutOptions {\n\tkey: string;\n\tenabled?: boolean;\n\tonTrigger?: () => void;\n\tpreventDefault?: boolean;\n}\n\nexport function useCommandShortcut({\n\tkey,\n\tenabled = true,\n\tonTrigger,\n\tpreventDefault = true,\n}: UseCommandShortcutOptions) {\n\tuseEffect(() => {\n\t\tif (!enabled || !onTrigger || typeof document === 'undefined') return;\n\n\t\tconst handler = (event: KeyboardEvent) => {\n\t\t\tif (!(event.metaKey || event.ctrlKey)) return;\n\t\t\tif (event.key.toLowerCase() !== key.toLowerCase()) return;\n\t\t\tif (preventDefault) event.preventDefault();\n\t\t\tonTrigger();\n\t\t};\n\n\t\tdocument.addEventListener('keydown', handler);\n\t\treturn () => document.removeEventListener('keydown', handler);\n\t}, [enabled, key, onTrigger, preventDefault]);\n}\n"],"mappings":";;;;;;AAQA,SAAgBG,EAAsB,EACrC,kBAC4B,CAAC,GAAuB;CACpD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OAAOA,KAAS,YAAYA,KAAiB,cAAcA,IAGxD,kBAACzB,GAAD;EAA0B;EAAW,OAAO4B;EAAM,QAAQA;EAAM,GAAIJ;CAAQ,CAAA,IAG7E;AACR;AAEA,SAAgBK,EACf,GACA,GACA,GACA,GACA,GACC;CACD,OAAOxB,EAAW;EACjB,MAAMQ,EAAK;EACX;EACA;EACA;EACA,UAAUA,EAAK,YAAY,CAACA,EAAK;EACjC,UAAUA,EAAK;CAChB,CAAC;AACF;;;AC7GA,SAAgBiB,EAAc,IAAa,KAAK;CAC/C,OAAOC,GACL,MAAkB,CAAC,CAACxB,KAAQC,EAAYE,GAAYJ,EAAOC,CAAI,CAAC,GACjE,CAACG,CAAU,CACZ;AACD;;;ACAA,SAAgBsB,EAAmB,EAClC,QACA,aAAU,IACV,cACA,oBAAiB,MACY;CAC7B,QAAgB;EACf,IAAI,CAACC,KAAW,CAACC,KAAa,OAAO,WAAa,KAAa;EAE/D,IAAMC,KAAW,MAAyB;GACzC,CAAMC,EAAM,WAAWA,EAAM,YACzBA,EAAM,IAAI,YAAY,MAAMC,EAAI,YAAY,MAC5CC,KAAgBF,EAAM,eAAe,GACzCF,EAAU;EACX;EAGA,OADA,SAAS,iBAAiB,WAAWC,CAAO,SAC/B,SAAS,oBAAoB,WAAWA,CAAO;CAC7D,GAAG;EAACF;EAASI;EAAKH;EAAWI;CAAc,CAAC;AAC7C"}
|
package/dist/input-DOPL5_QE.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as e } from "./utils-CF3c95Io.js";
|
|
3
|
-
import { t } from "./affordance-geometry.generated-B8yGOr8-.js";
|
|
4
|
-
import { t as n } from "./field-state-recipes-BVA2CWHo.js";
|
|
5
|
-
import { t as r } from "./editable-text-recipe-Cn61kEcv.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
8
|
-
import { Input as a } from "@base-ui/react/input";
|
|
9
|
-
//#region src/components/ui/input.tsx
|
|
10
|
-
function o({ className: o, type: s, ...c }) {
|
|
11
|
-
return /* @__PURE__ */ i(a, {
|
|
12
|
-
type: s,
|
|
13
|
-
"data-slot": "input",
|
|
14
|
-
className: e("box-border font-sans border-input h-control rounded-inner border bg-transparent px-control shadow-none transition-[color,box-shadow] file:box-border file:h-control-file file:py-0 file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", t.controlTextMinHeight, t.controlBlockPadding.md, s === "file" && t.rawFileField.minHeight, s === "file" && t.rawFileField.blockPadding.md, t.rawFileField.buttonMinHeight, r.md, n.focus, n.invalid, o),
|
|
15
|
-
...c
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { o as t };
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=input-DOPL5_QE.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-DOPL5_QE.js","names":["Input","InputPrimitive","cn","fieldStateRecipes","editableTextSizeClasses","Input$1","props","Input","affordanceGeometry","type","className"],"sources":["../src/components/ui/input.tsx"],"sourcesContent":["import { fieldStateRecipes } from '../../lib/field-state-recipes';\nimport { editableTextSizeClasses } from '../../lib/editable-text-recipe';\nimport { affordanceGeometry } from '../../lib/affordance-geometry.generated';\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"box-border font-sans border-input h-control rounded-inner border bg-transparent px-control shadow-none transition-[color,box-shadow] file:box-border file:h-control-file file:py-0 file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n affordanceGeometry.controlTextMinHeight,\n affordanceGeometry.controlBlockPadding.md,\n type === 'file' && affordanceGeometry.rawFileField.minHeight,\n type === 'file' && affordanceGeometry.rawFileField.blockPadding.md,\n affordanceGeometry.rawFileField.buttonMinHeight,\n editableTextSizeClasses.md,\n fieldStateRecipes.focus,\n fieldStateRecipes.invalid,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":";;;;;;;;;AAQA,SAASA,EAAM,EAAE,cAAW,SAAM,GAAGM,KAAwC;CAC3E,OACE,kBAACL,GAAD;EACQ;EACN,aAAU;EACV,WAAWC,EACT,uaACAM,EAAmB,sBACnBA,EAAmB,oBAAoB,IACvCC,MAAS,UAAUD,EAAmB,aAAa,WACnDC,MAAS,UAAUD,EAAmB,aAAa,aAAa,IAChEA,EAAmB,aAAa,iBAChCJ,EAAwB,IACxBD,EAAkB,OAClBA,EAAkB,SAClBO,CACF;EACA,GAAIJ;CACL,CAAA;AAEL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"item-BvZ2DR_x.js","names":["ItemGroup","ItemSeparator","React","Item","ItemMedia","ItemContent","ItemTitle","ItemDescription","ItemActions","ItemHeader","ItemFooter","_Fragment","BaseItem","BaseItemGroup","BaseItemSeparator","BaseItemMedia","BaseItemContent","BaseItemActions","BaseItemHeader","BaseItemFooter","BaseItemTitle","BaseItemDescription","useItemConfig","useDensityConfig","resolveComponentScale","cn","Separator","Text","RunningTextContext","copyRoleProps","focusRecipes","ICON_DESCENDANT_SIZE_CLASSNAMES","compositionClasses","rowBlockPaddingClasses","React$1","Fragment$1","ItemGroup$1","props","className","ItemSeparator$1","itemVariants","cva","ItemPhrasingContext","usePartTagName","tagName","Item$1","element","useRender","mergeProps","render","itemMediaVariants","ItemMedia$1","ItemContent$1","ItemTitle$1","ItemDescription$1","ItemActions$1","ItemHeader$1","ItemFooter$1","Item","forwardRef","convenienceMode","itemProps","resolvedSize","size","defaultScale","primitiveSize","resolvedVariant","variant","defaultVariant","textSizeClass","paddingClass","padding","flushEdgeClass","borderClass","resolvedChildren","media","ItemMedia","mediaVariant","ItemContent","ItemTitle","titleBold","title","description","ItemDescription","descriptionClamp","trailing","actions","ItemActions","children","density","ItemGroup","ItemSeparator","baseVariant","iconClass","textGap","ItemHeader","ItemFooter","isSimpleText","bold","CLAMP_CLASS","clamp"],"sources":["../src/components/ui/item.tsx","../src/components/base/item/item.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils\"\nimport { rowBlockPaddingClasses } from \"../../lib/row-recipes\"\nimport { Separator } from \"./separator\"\nimport { focusRecipes } from \"../../lib/focus-recipes\"\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\n \"group/item-group flex w-full flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-space-md\", className)}\n {...props}\n />\n )\n}\n\nconst itemVariants = cva(\n `group/item flex w-full flex-wrap items-center rounded-inner border text-sm transition-colors outline-none ${focusRecipes.frame} [a]:transition-colors [a]:hover:bg-accent [a]:hover:text-accent-foreground`,\n {\n variants: {\n variant: {\n default: \"border-transparent\",\n outline: \"border-border\",\n muted: \"border-transparent bg-muted/50\",\n },\n size: {\n default: cn(\"gap-space-lg px-row-x\", rowBlockPaddingClasses.comfortable),\n sm: cn(\"gap-space-lg px-row-x\", rowBlockPaddingClasses.default),\n xs: cn(\"gap-space-md px-row-x in-data-[slot=dropdown-menu-content]:p-0\", rowBlockPaddingClasses.compact),\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\n// An Item rendered as a button or link may hold phrasing content only, so its\n// parts render as spans there. Their classes set their display, so the layout\n// is the same either way.\nconst ItemPhrasingContext = React.createContext(false)\n\nfunction usePartTagName(tagName: \"div\" | \"p\") {\n return React.useContext(ItemPhrasingContext) ? \"span\" : tagName\n}\n\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & VariantProps<typeof itemVariants>) {\n const element = useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(itemVariants({ variant, size, className })),\n },\n props\n ),\n render,\n state: {\n slot: \"item\",\n variant,\n size,\n },\n })\n\n return (\n <ItemPhrasingContext.Provider value={render !== undefined}>\n {element}\n </ItemPhrasingContext.Provider>\n )\n}\n\nconst itemMediaVariants = cva(\n \"flex shrink-0 items-center justify-center gap-space-md group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"[&_svg:not([class*='size-'])]:size-icon\",\n image:\n \"size-10 overflow-hidden rounded-inner group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 group-data-[size=xs]/item:rounded-inner [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction ItemMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\n return useRender({\n defaultTagName: usePartTagName(\"div\"),\n props: mergeProps<\"div\">(\n {\n className: cn(itemMediaVariants({ variant, className })),\n },\n props\n ),\n state: { slot: \"item-media\", variant },\n })\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: usePartTagName(\"div\"),\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none\",\n className\n ),\n },\n props\n ),\n state: { slot: \"item-content\" },\n })\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: usePartTagName(\"div\"),\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"line-clamp-1 flex w-fit items-center gap-space-md text-sm leading-snug font-medium underline-offset-4\",\n className\n ),\n },\n props\n ),\n state: { slot: \"item-title\" },\n })\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return useRender({\n defaultTagName: usePartTagName(\"p\"),\n props: mergeProps<\"p\">(\n {\n className: cn(\n \"m-0 line-clamp-2 text-start text-sm font-normal text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className\n ),\n },\n props\n ),\n state: { slot: \"item-description\" },\n })\n}\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: usePartTagName(\"div\"),\n props: mergeProps<\"div\">(\n {\n className: cn(\"flex items-center\", className),\n },\n props\n ),\n state: { slot: \"item-actions\" },\n })\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: usePartTagName(\"div\"),\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex basis-full items-center justify-between gap-space-md\",\n className\n ),\n },\n props\n ),\n state: { slot: \"item-header\" },\n })\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: usePartTagName(\"div\"),\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"flex basis-full items-center justify-between gap-space-md\",\n className\n ),\n },\n props\n ),\n state: { slot: \"item-footer\" },\n })\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n}\n","/**\n * Item — base wrapper around the shadcn `Item` primitive.\n *\n * Why this wrapper exists (rules 1, 8, 12, 17):\n * - Resolves `size` and `variant` against `<UIProvider>` (`useItemConfig()`),\n * so consumers set library-wide density once.\n * - Routes `ItemTitle` / `ItemDescription` text through our `<Text>` typography\n * so a title is always `weight=\"semibold\"` and secondary copy follows the\n * shared control/display tokens — no rogue `<div className=\"text-sm font-medium\">`\n * blobs at call sites.\n * - Re-exports every compound part untouched, so `<Item>` keeps working as a\n * drop-in replacement for hand-rolled \"icon-left + text-stack + actions\" rows.\n *\n * Layer rule: import from `@/components/base/item`, never from `@/components/ui/item`.\n */\nimport { forwardRef, type ComponentRef } from 'react';\n\nimport {\n\tItem as BaseItem,\n\tItemActions as BaseItemActions,\n\tItemContent as BaseItemContent,\n\tItemDescription as BaseItemDescription,\n\tItemFooter as BaseItemFooter,\n\tItemGroup as BaseItemGroup,\n\tItemHeader as BaseItemHeader,\n\tItemMedia as BaseItemMedia,\n\tItemSeparator as BaseItemSeparator,\n\tItemTitle as BaseItemTitle,\n} from '../../ui/item';\nimport { ICON_DESCENDANT_SIZE_CLASSNAMES } from '../display/icon-size';\nimport { Text } from '../../typography';\nimport { RunningTextContext } from '../../typography/running-text';\nimport { useDensityConfig, useItemConfig } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\nimport {compositionClasses} from '../structure/composition.recipes';\nimport {copyRoleProps} from '../../typography/text.styles';\nimport { rowBlockPaddingClasses } from '../../../lib/row-recipes';\nimport { focusRecipes } from '../../../lib/focus-recipes';\n\nimport type {\n\tItemActionsProps,\n\tItemContentProps,\n\tItemDescriptionProps,\n\tItemFooterProps,\n\tItemGroupProps,\n\tItemHeaderProps,\n\tItemMediaProps,\n\tItemProps,\n\tItemTitleProps,\n} from './item.types';\n\nconst Item = forwardRef<ComponentRef<typeof BaseItem>, ItemProps>(function Item(\n\titemProps,\n\tref,\n) {\n\tconst convenienceMode = 'title' in itemProps;\n\tconst {\n\t\tsize,\n\t\tdensity = 'default',\n\t\tvariant,\n\t\tpadding = 'none',\n\t\ttextGap = 'dense',\n\t\trender,\n\t\tclassName,\n\t\tchildren,\n\t\tmedia,\n\t\tmediaVariant,\n\t\ttitle,\n\t\tdescription,\n\t\ttrailing,\n\t\tactions,\n\t\ttitleBold,\n\t\tdescriptionClamp,\n\t\t...props\n\t} = itemProps;\n\tconst { defaultVariant = 'default' } = useItemConfig();\n\tconst { defaultScale } = useDensityConfig();\n\tconst resolvedSize = resolveComponentScale(size, defaultScale);\n\tconst primitiveSize = resolvedSize === 'sm' ? 'xs' : 'sm';\n\tconst resolvedVariant = variant ?? defaultVariant;\n\tconst textSizeClass = resolvedSize === 'sm' ? 'text-pxs' : resolvedSize === 'lg' ? 'text-base' : 'text-sm';\n\tconst paddingClass = padding === 'default' ? 'px-row-x' : 'px-0';\n\t// A plain flush row draws no box, so in a group its outer edges sit on the group's\n\t// edges and the parent's gap or surface padding owns the space around the list.\n\tconst flushEdgeClass = resolvedVariant === 'default' && padding === 'none'\n\t\t? 'in-data-[slot=item-group]:first:pt-0 in-data-[slot=item-group]:last:pb-0'\n\t\t: undefined;\n\t// The default variant draws no box; a transparent 1px border only nudged its text off the shared edge.\n\t// Without a border, an interactive row draws its focus edge inset instead.\n\tconst borderClass = resolvedVariant === 'default' ? `border-0 ${focusRecipes.edge}` : undefined;\n\tconst resolvedChildren = convenienceMode ? (\n\t\t<>\n\t\t\t{media != null ? <ItemMedia variant={mediaVariant}>{media}</ItemMedia> : null}\n\t\t\t<ItemContent textGap={textGap} className=\"basis-48\">\n\t\t\t\t<ItemTitle bold={titleBold}>{title}</ItemTitle>\n\t\t\t\t{description != null ? (\n\t\t\t\t\t<ItemDescription clamp={descriptionClamp}>{description}</ItemDescription>\n\t\t\t\t) : null}\n\t\t\t</ItemContent>\n\t\t\t{trailing != null || actions != null ? (\n\t\t\t\t<ItemActions>\n\t\t\t\t\t{trailing}\n\t\t\t\t\t{actions}\n\t\t\t\t</ItemActions>\n\t\t\t) : null}\n\t\t</>\n\t) : children;\n\treturn (\n\t\t<BaseItem\n\t\t\tref={ref}\n\t\t\tsize={primitiveSize}\n\t\t\tvariant={resolvedVariant}\n\t\t\trender={render}\n\t\t\tclassName={cn(\n\t\t\t\t'item--component box-border font-sans gap-space-lg rounded-inner',\n\t\t\t\trowBlockPaddingClasses[density],\n\t\t\t\tpaddingClass,\n\t\t\t\tflushEdgeClass,\n\t\t\t\tborderClass,\n\t\t\t\ttextSizeClass,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{resolvedChildren}\n\t\t</BaseItem>\n\t);\n});\nItem.displayName = 'Item';\n\nconst ItemGroup = forwardRef<ComponentRef<typeof BaseItemGroup>, ItemGroupProps>(function ItemGroup(\n\t{ className, role, ...props },\n\tref,\n) {\n\treturn (\n\t\t<BaseItemGroup\n\t\t\tref={ref}\n\t\t\trole={role}\n\t\t\t// Boxed rows (outline/muted) keep a small gap between boxes. Plain rows touch,\n\t\t\t// so their own density padding is the only space between them.\n\t\t\tclassName={cn('item-group--component gap-space-sm has-[>[data-slot=item][data-variant=default]]:gap-0', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nItemGroup.displayName = 'ItemGroup';\n\nconst ItemSeparator = forwardRef<\n\tComponentRef<typeof BaseItemSeparator>,\n\tParameters<typeof BaseItemSeparator>[0]\n>(function ItemSeparator({ className, ...props }, ref) {\n\treturn <BaseItemSeparator ref={ref} className={cn('item--separator', className)} {...props} />;\n});\nItemSeparator.displayName = 'ItemSeparator';\n\nconst ItemMedia = forwardRef<ComponentRef<typeof BaseItemMedia>, ItemMediaProps>(function ItemMedia(\n\t{ variant = 'default', className, ...props },\n\tref,\n) {\n\tconst baseVariant = variant === 'image' || variant === 'avatar' ? 'image' : 'default';\n\tconst iconClass =\n\t\tvariant === 'icon'\n\t\t\t? cn(\n\t\t\t\t\tICON_DESCENDANT_SIZE_CLASSNAMES.md,\n\t\t\t\t\t\"group-data-[size=xs]/item:[&_svg:not([class*='size-'])]:size-icon-sm\",\n\t\t\t\t)\n\t\t\t: undefined;\n\tconst avatarClass =\n\t\tvariant === 'avatar'\n\t\t\t? 'rounded-full group-data-[size=sm]/item:rounded-full group-data-[size=xs]/item:rounded-full'\n\t\t\t: undefined;\n\treturn (\n\t\t<BaseItemMedia\n\t\t\tref={ref}\n\t\t\tvariant={baseVariant}\n\t\t\tclassName={cn(\n\t\t\t\t'item--media',\n\t\t\t\t'group-has-data-[slot=item-description]/item:translate-y-0',\n\t\t\t\ticonClass,\n\t\t\t\tavatarClass,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nItemMedia.displayName = 'ItemMedia';\n\nconst ItemContent = forwardRef<ComponentRef<typeof BaseItemContent>, ItemContentProps>(function ItemContent(\n\t{ className, textGap = 'dense', ...props },\n\tref,\n) {\n\treturn (\n\t\t<BaseItemContent\n\t\t\tref={ref}\n\t\t\tclassName={cn('item--content min-w-0', textGap === 'dense' ? 'gap-dense group-data-[size=xs]/item:gap-dense' : 'gap-normal group-data-[size=xs]/item:gap-normal', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nItemContent.displayName = 'ItemContent';\n\nconst ItemActions = forwardRef<ComponentRef<typeof BaseItemActions>, ItemActionsProps>(function ItemActions(\n\t{ className, ...props },\n\tref,\n) {\n\treturn <BaseItemActions ref={ref} className={cn('item--actions max-w-full flex-wrap shrink-0', compositionClasses.compactActions, className)} {...props} />;\n});\nItemActions.displayName = 'ItemActions';\n\nconst ItemHeader = forwardRef<ComponentRef<typeof BaseItemHeader>, ItemHeaderProps>(function ItemHeader(\n\t{ className, ...props },\n\tref,\n) {\n\treturn <BaseItemHeader ref={ref} className={cn('item--header', className)} {...props} />;\n});\nItemHeader.displayName = 'ItemHeader';\n\nconst ItemFooter = forwardRef<ComponentRef<typeof BaseItemFooter>, ItemFooterProps>(function ItemFooter(\n\t{ className, ...props },\n\tref,\n) {\n\treturn <BaseItemFooter ref={ref} className={cn('item--footer', className)} {...props} />;\n});\nItemFooter.displayName = 'ItemFooter';\n\nconst ItemTitle = forwardRef<ComponentRef<typeof BaseItemTitle>, ItemTitleProps>(function ItemTitle(\n\t{ bold = true, className, children, ...props },\n\tref,\n) {\n\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\treturn (\n\t\t<BaseItemTitle\n\t\t\tref={ref}\n\t\t\tclassName={cn('item--title min-w-0 max-w-full overflow-hidden m-0 text-inherit [&>p]:m-0 [&>p]:text-start', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText ? (\n\t\t\t\t// The title is a flex row, where text-overflow has no effect: the text itself\n\t\t\t\t// shrinks and ends in an ellipsis instead of clipping a long token mid-glyph.\n\t\t\t\t<Text {...copyRoleProps.primary} tag=\"span\" size=\"inherit\" weight={bold ? 'semibold' : 'regular'} lineHeight=\"tight\" className=\"min-w-0 overflow-hidden text-ellipsis text-inherit\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : <RunningTextContext.Provider value>{children}</RunningTextContext.Provider>}\n\t\t</BaseItemTitle>\n\t);\n});\nItemTitle.displayName = 'ItemTitle';\n\nconst CLAMP_CLASS: Record<NonNullable<ItemDescriptionProps['clamp']>, string> = {\n\t1: 'line-clamp-1',\n\t2: 'line-clamp-2',\n\t3: 'line-clamp-3',\n\t4: 'line-clamp-4',\n\tnone: 'line-clamp-none',\n};\n\nconst ItemDescription = forwardRef<ComponentRef<typeof BaseItemDescription>, ItemDescriptionProps>(\n\tfunction ItemDescription({ clamp = 2, className, children, ...props }, ref) {\n\t\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\t\treturn (\n\t\t\t<BaseItemDescription\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'item--description',\n\t\t\t\t\t'm-0',\n\t\t\t\t\t!isSimpleText && 'text-xs text-muted-foreground leading-tight',\n\t\t\t\t\tCLAMP_CLASS[clamp],\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText ? (\n\t\t\t\t\t<Text {...copyRoleProps.supporting} tag=\"span\" lineHeight=\"tight\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : <RunningTextContext.Provider value>{children}</RunningTextContext.Provider>}\n\t\t\t</BaseItemDescription>\n\t\t);\n\t},\n);\nItemDescription.displayName = 'ItemDescription';\n\nexport {\n\tItem,\n\tItemGroup,\n\tItemSeparator,\n\tItemMedia,\n\tItemContent,\n\tItemTitle,\n\tItemDescription,\n\tItemActions,\n\tItemHeader,\n\tItemFooter,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAUA,SAASA,EAAU,EAAE,cAAW,GAAGqC,KAAsC;CACvE,OACE,kBAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,WAAWZ,EACT,yCACAa,CACF;EACA,GAAID;CACL,CAAA;AAEL;AAEA,SAASpC,EAAc,EACrB,cACA,GAAGoC,KACsC;CACzC,OACE,kBAACX,GAAD;EACE,aAAU;EACV,aAAY;EACZ,WAAWD,EAAG,eAAea,CAAS;EACtC,GAAID;CACL,CAAA;AAEL;AAEA,IAAMG,IAAeC,EACnB,6GAA6GX,EAAa,MAAM,8EAChI;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SAAS;GACT,OAAO;EACT;EACA,MAAM;GACJ,SAASL,EAAG,yBAAyBQ,EAAuB,WAAW;GACvE,IAAIR,EAAG,yBAAyBQ,EAAuB,OAAO;GAC9D,IAAIR,EAAG,kEAAkEQ,EAAuB,OAAO;EACzG;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF,GAKMS,IAAsBxC,EAAM,cAAc,EAAK;AAErD,SAASyC,EAAe,GAAsB;CAC5C,OAAOzC,EAAM,WAAWwC,CAAmB,IAAI,SAASE;AAC1D;AAEA,SAASzC,EAAK,EACZ,cACA,aAAU,WACV,UAAO,WACP,WACA,GAA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