themelia-react-ui 2.0.3 → 2.0.4
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 +50 -0
- package/README.md +65 -28
- package/dist/{accordion-Cjb6sx0G.js → accordion-96o0pN62.js} +5 -5
- package/dist/{accordion-Cjb6sx0G.js.map → accordion-96o0pN62.js.map} +1 -1
- package/dist/action-menu-CHgs8vmj.js +281 -0
- package/dist/action-menu-CHgs8vmj.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-B8yGOr8-.js} +7 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-BZUGwBq6.js} +277 -276
- package/dist/ai-artifact-BZUGwBq6.js.map +1 -0
- package/dist/{app-shell-C4FhvCqF.js → app-shell-D63ATkIK.js} +84 -83
- package/dist/app-shell-D63ATkIK.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-DkoqHPPl.js} +7 -7
- package/dist/{attachment-BxDfL2mw.js.map → attachment-DkoqHPPl.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-D2FVZ1MH.js} +10 -10
- package/dist/{auth-BGua8ouh.js.map → auth-D2FVZ1MH.js.map} +1 -1
- package/dist/{avatar-DAPlDvhJ.js → avatar-DWO_HHhB.js} +5 -5
- package/dist/{avatar-DAPlDvhJ.js.map → avatar-DWO_HHhB.js.map} +1 -1
- package/dist/{badge-HpFqoqSY.js → badge-DErMA7ul.js} +4 -4
- package/dist/{badge-HpFqoqSY.js.map → badge-DErMA7ul.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 +13 -13
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +9 -9
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +6 -6
- 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 +3 -3
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-CdfIkCsV.js} +4 -4
- package/dist/{batch-action-bar-DnUJ21NQ.js.map → batch-action-bar-CdfIkCsV.js.map} +1 -1
- package/dist/blocks/admin.js +20 -20
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +15 -15
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +17 -17
- 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 +570 -567
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-B-WFKecD.js} +4 -4
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-B-WFKecD.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-DkmK-z8E.js} +2 -2
- package/dist/{button-DVzspB_G.js.map → button-DkmK-z8E.js.map} +1 -1
- package/dist/{buttons-DPZekJFu.js → buttons-BbfzgczK.js} +8 -8
- package/dist/{buttons-DPZekJFu.js.map → buttons-BbfzgczK.js.map} +1 -1
- package/dist/{cards-BaBZR-AU.js → cards-4JTWqvVe.js} +10 -10
- package/dist/cards-4JTWqvVe.js.map +1 -0
- package/dist/{chart-ZOYyK2xG.js → chart-C19flDQb.js} +4 -4
- package/dist/{chart-ZOYyK2xG.js.map → chart-C19flDQb.js.map} +1 -1
- package/dist/{checkbox-AWIhNhmo.js → checkbox-CzYUTPeJ.js} +9 -5
- package/dist/checkbox-CzYUTPeJ.js.map +1 -0
- package/dist/{choice-inputs-CNHvARCJ.js → choice-inputs-JLtij2y4.js} +182 -176
- package/dist/choice-inputs-JLtij2y4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-CGNaUtAE.js} +7 -7
- package/dist/{code-block-DeneBJR_.js.map → code-block-CGNaUtAE.js.map} +1 -1
- package/dist/{collapsible-C-_l4hpy.js → collapsible-Do4G0zcC.js} +3 -3
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-Do4G0zcC.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-C0e8SsTm.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-C0e8SsTm.js.map} +1 -1
- package/dist/{combobox-Dxo2fAYQ.js → combobox-CBJDs6w_.js} +12 -12
- package/dist/{combobox-Dxo2fAYQ.js.map → combobox-CBJDs6w_.js.map} +1 -1
- package/dist/{combobox-DaHESuiL.js → combobox-hbhSS18O.js} +7 -7
- package/dist/{combobox-DaHESuiL.js.map → combobox-hbhSS18O.js.map} +1 -1
- package/dist/{command-C25VMRII.js → command-D8NrBj-b.js} +7 -7
- package/dist/{command-C25VMRII.js.map → command-D8NrBj-b.js.map} +1 -1
- package/dist/{comments-DD0DUPwJ.js → comments-Di4w0H_S.js} +383 -382
- package/dist/comments-Di4w0H_S.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +2 -0
- package/dist/components/base/cards/card.recipes.d.ts +12 -5
- package/dist/components/base/cards/smart-card.types.d.ts +12 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +5 -2
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -2
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CRmHf7GP.js +104 -0
- package/dist/containers-CRmHf7GP.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-CnGCZdX4.js} +4 -4
- package/dist/{copyable-ClBuk_UK.js.map → copyable-CnGCZdX4.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-D4oujtx0.js} +239 -238
- package/dist/data-display-D4oujtx0.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Q7jnXxpk.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Q7jnXxpk.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-zOt1oNss.js} +102 -90
- package/dist/date-picker-zOt1oNss.js.map +1 -0
- package/dist/date-pickers-cj8IXbDC.js +179 -0
- package/dist/date-pickers-cj8IXbDC.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-BB4BL_-K.js} +8 -8
- package/dist/{display-hAc1HjpI.js.map → display-BB4BL_-K.js.map} +1 -1
- package/dist/{dropdown-menu-Cl4X7L5S.js → dropdown-menu-CjY8Vt7W.js} +8 -8
- package/dist/{dropdown-menu-Cl4X7L5S.js.map → dropdown-menu-CjY8Vt7W.js.map} +1 -1
- package/dist/features/activities.js +11 -11
- package/dist/features/ai-chat.js +9 -9
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +275 -274
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +199 -198
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +12 -12
- package/dist/features/kanban.js +4 -4
- package/dist/features/map.js +7 -7
- package/dist/features/media-library.js +623 -622
- 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 +973 -969
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +12 -12
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +113 -112
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +19 -19
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-DZNL5Lg1.js} +9 -9
- package/dist/{feedback-BYIhtitP.js.map → feedback-DZNL5Lg1.js.map} +1 -1
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DjwGx8eM.js} +2 -2
- package/dist/{field-affordance-recipes-DZhnIL_Y.js.map → field-affordance-recipes-DjwGx8eM.js.map} +1 -1
- package/dist/{filters-DJVAveHA.js → filters-BcT-uoFy.js} +19 -19
- package/dist/{filters-DJVAveHA.js.map → filters-BcT-uoFy.js.map} +1 -1
- package/dist/{form-field-CwH9y77i.js → form-field-CsgRmdit.js} +14 -8
- package/dist/form-field-CsgRmdit.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-NXgjkmBG.js} +3 -3
- package/dist/{form-sizing-BdP_Mf5p.js.map → form-sizing-NXgjkmBG.js.map} +1 -1
- package/dist/{forms-B9G_xwzi.js → forms-BV5m5aQF.js} +83 -65
- package/dist/forms-BV5m5aQF.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-Cd33AKbD.js} +288 -288
- package/dist/forms-numeric-Cd33AKbD.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-BA697l4a.js} +14 -14
- package/dist/{header-BSfIEWbI.js.map → header-BA697l4a.js.map} +1 -1
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-BQ-L7Uu2.js} +2 -2
- package/dist/{hooks-ClH9thn4.js.map → hooks-BQ-L7Uu2.js.map} +1 -1
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-COWbCCWu.js} +3 -3
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-COWbCCWu.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-Cdw4k0fb.js +289 -0
- package/dist/input-Cdw4k0fb.js.map +1 -0
- package/dist/{input-CZw8iU99.js → input-DOPL5_QE.js} +3 -3
- package/dist/{input-CZw8iU99.js.map → input-DOPL5_QE.js.map} +1 -1
- package/dist/item-BvZ2DR_x.js +277 -0
- package/dist/item-BvZ2DR_x.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +6 -0
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-CSl5W1Fy.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-CSl5W1Fy.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-RKOQaaIB.js} +8 -8
- package/dist/{mentions-CGlEJ15c.js.map → mentions-RKOQaaIB.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-INU2xsxu.js} +4 -4
- package/dist/{message-DZ_ruyUV.js.map → message-INU2xsxu.js.map} +1 -1
- package/dist/metadata-list-qVV7AVxa.js +443 -0
- package/dist/metadata-list-qVV7AVxa.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-BQNcg1jT.js} +8 -8
- package/dist/{navigation-BzhHI3lo.js.map → navigation-BQNcg1jT.js.map} +1 -1
- package/dist/{navigation-Bnotn4AQ.js → navigation-DLF3E1IC.js} +7 -7
- package/dist/{navigation-Bnotn4AQ.js.map → navigation-DLF3E1IC.js.map} +1 -1
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-WZEs-hYo.js} +2 -2
- package/dist/{navigation-row-recipes-BFLCk_Aq.js.map → navigation-row-recipes-WZEs-hYo.js.map} +1 -1
- package/dist/{number-DbV1Dija.js → number-E_OiIfJz.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-E_OiIfJz.js.map} +1 -1
- package/dist/{overflow-tab-bar-CWY7Nogn.js → overflow-tab-bar-CrbqMteP.js} +107 -105
- package/dist/overflow-tab-bar-CrbqMteP.js.map +1 -0
- package/dist/{overlays-tMkF-VAN.js → overlays-BlKynmde.js} +228 -227
- package/dist/overlays-BlKynmde.js.map +1 -0
- package/dist/page-CIwNUtGr.js +227 -0
- package/dist/page-CIwNUtGr.js.map +1 -0
- package/dist/page-header-commands-DFMlNYzN.js +128 -0
- package/dist/page-header-commands-DFMlNYzN.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-Ch8X_47u.js} +5 -5
- package/dist/{pagination-BL25hu2s.js.map → pagination-Ch8X_47u.js.map} +1 -1
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-BYaCdFhf.js} +6 -6
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-BYaCdFhf.js.map} +1 -1
- package/dist/{popover-gnTOhbFM.js → popover-uwzX2vo7.js} +4 -4
- package/dist/{popover-gnTOhbFM.js.map → popover-uwzX2vo7.js.map} +1 -1
- package/dist/{primitives-BFK08r9M.js → primitives-Du64iDbb.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-Du64iDbb.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BvF2oCdV.js} +5 -5
- package/dist/{progress-B1VnCT0K.js.map → progress-BvF2oCdV.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-D789Jwyy.js} +6 -6
- package/dist/{receipt-BVSOH3Xo.js.map → receipt-D789Jwyy.js.map} +1 -1
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-CLJEf76s.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-CLJEf76s.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-Cm1dpUpQ.js} +10 -10
- package/dist/{rich-text-editor-cRLC-eBK.js.map → rich-text-editor-Cm1dpUpQ.js.map} +1 -1
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-L__e4x47.js} +4 -4
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js.map → rich-text-editor-toolbar-L__e4x47.js.map} +1 -1
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-La5RXsEk.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-La5RXsEk.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-DAEV0w65.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-DAEV0w65.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-GNfPG-90.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-GNfPG-90.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-BA2iboic.js +174 -0
- package/dist/settings-BA2iboic.js.map +1 -0
- package/dist/{sheet-ijlsjq-n.js → sheet-DoAxTb2J.js} +7 -7
- package/dist/{sheet-ijlsjq-n.js.map → sheet-DoAxTb2J.js.map} +1 -1
- package/dist/{sidebar-DkTO4VTO.js → sidebar-ByqKR_W5.js} +13 -13
- package/dist/{sidebar-DkTO4VTO.js.map → sidebar-ByqKR_W5.js.map} +1 -1
- package/dist/{sidebar-Db6gkh3U.js → sidebar-D2iSnGJ7.js} +11 -11
- package/dist/{sidebar-Db6gkh3U.js.map → sidebar-D2iSnGJ7.js.map} +1 -1
- package/dist/{skeleton-Byjnt7qr.js → skeleton-CUj8O5Bd.js} +3 -3
- package/dist/{skeleton-Byjnt7qr.js.map → skeleton-CUj8O5Bd.js.map} +1 -1
- package/dist/smart-card-CqkzQsK-.js +614 -0
- package/dist/smart-card-CqkzQsK-.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-C0V0_Fyf.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-C0V0_Fyf.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-CpvnzJn9.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-CpvnzJn9.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-DH7rozUv.js} +19 -19
- package/dist/{table-BweFy_P9.js.map → table-DH7rozUv.js.map} +1 -1
- package/dist/{tabs-CDocW5D1.js → tabs-eqVsJZWO.js} +7 -7
- package/dist/{tabs-CDocW5D1.js.map → tabs-eqVsJZWO.js.map} +1 -1
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-DXItiR0O.js} +101 -98
- package/dist/text-inputs-DXItiR0O.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +152 -112
- package/dist/{timelines-CwM_9IhD.js → timelines-DmtztAY_.js} +10 -10
- package/dist/{timelines-CwM_9IhD.js.map → timelines-DmtztAY_.js.map} +1 -1
- package/dist/{tooltip-yiRJUFjp.js → tooltip-B4hjKtoV.js} +3 -3
- package/dist/{tooltip-yiRJUFjp.js.map → tooltip-B4hjKtoV.js.map} +1 -1
- package/dist/{tree-WnKQzwbq.js → tree-CV11PURP.js} +8 -8
- package/dist/{tree-WnKQzwbq.js.map → tree-CV11PURP.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CSyJrh28.js +117 -0
- package/dist/typography-CSyJrh28.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/{ui-provider-C_U0Xma4.js → ui-provider-CQCuCBcy.js} +3 -3
- package/dist/ui-provider-CQCuCBcy.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-CXyxmQBP.js → upload-C9SA0X-8.js} +11 -11
- package/dist/{upload-CXyxmQBP.js.map → upload-C9SA0X-8.js.map} +1 -1
- package/dist/{upload-queue-Boscubn9.js → upload-queue-DhQJiSRc.js} +9 -9
- package/dist/{upload-queue-Boscubn9.js.map → upload-queue-DhQJiSRc.js.map} +1 -1
- package/dist/{usage-card-BhO5eqkX.js → usage-card-DVTRDmGz.js} +134 -133
- package/dist/usage-card-DVTRDmGz.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-CF3c95Io.js} +68 -5
- package/dist/utils-CF3c95Io.js.map +1 -0
- package/dist/value-inputs-C0o70p-U.js +980 -0
- package/dist/value-inputs-C0o70p-U.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-ClupF0Gz.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-ClupF0Gz.js.map} +1 -1
- package/dist/workspace-9EFVXUyk.js +410 -0
- package/dist/workspace-9EFVXUyk.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +14 -129
- package/docs/consumer-skill/examples/app-layout.tsx +22 -12
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/manifest.json +51 -1
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +92 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/references/agents-md.md +17 -7
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/component-contracts.json +319824 -0
- package/docs/consumer-skill/references/composition-mapping.md +92 -0
- package/docs/consumer-skill/references/composition.md +43 -19
- package/docs/consumer-skill/references/design-contract.md +32 -0
- package/docs/consumer-skill/references/discovery.md +84 -7
- package/docs/consumer-skill/references/installation.md +40 -36
- package/docs/consumer-skill/references/integration.md +6 -2
- package/docs/consumer-skill/references/public-api.json +1519 -65
- package/docs/consumer-skill/references/review.md +9 -4
- package/docs/consumer-skill/references/rhf-workflows.md +86 -0
- package/docs/consumer-skill/references/screen-archetypes.md +22 -0
- package/docs/consumer-skill/references/theming.md +8 -9
- package/docs/consumer-skill/references/tokens.json +12 -3
- package/docs/consumer-skill/references/workflows.md +2 -1
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +198 -0
- package/docs/consumer-skill/scripts/discovery.mjs +42 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +138 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +76 -0
- package/docs/consumer-skills/themelia-components/SKILL.md +30 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +35 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +14 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +35 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"smart-card-DiC5aac3.js","names":["Card","CardHeader","CardTitle","CardContent","CardFooter","styles","styles","CardPrimitive","CardHeaderPrimitive","CardTitlePrimitive","CardContentPrimitive","CardFooterPrimitive","useCardConfig","useTypographyConfig","useDensityConfig","resolveComponentScale","cn","Button","Text","descendantInlineLinkClassName","resolveTextClassNames","motionRecipes","TooltipTrigger","TooltipContent","Tooltip","gapRecipe","Stack","ICON_CHILD_SIZE_CLASSNAMES","toneRecipes","surfaceDividerRecipes","ActionMenu","alertVariants","cva","isSimpleText","value","Alert","forwardRef","props","tone","variant","defaultTextSize","className","AlertTitle","children","AlertDescription","AlertMetadata","AlertMetadataItem","icon","label","numeric","AlertAction","Card$1","size","CardHeader$1","CardTitle$1","CardContent$1","CardFooter$1","cardRegionPaddingClasses","cardRecipes","CARD_BEM","CARD_INSET","SURFACE_CLASSES","hasRenderableContent","content","isValidElement","Fragment","CARD_TITLE_SIZE_CLASSES","CARD_TITLE_TEXT_SIZE","CardShell","CardHeader","padding","textGap","CardTitle","sizeProp","defaultScale","CardDescription","CardContent","CardFooter","SmartCardAlert","hasHeader","alertTone","alert","SurfaceTitle","plainTitle","title","dataSlot","suffix","suffixClassName","ActionsMenu","actionDefinitions","actions","action","index","actionsLabel","TooltipTrigger_Info","passthrough","triggerProps","tooltipLabel","Info","SmartCardHeaderRow","cardActions","hasActions","hasIcon","hasTitle","hasTitleSuffix","titleSuffix","hasDescription","description","hasTooltip","tooltip","hasHeaderStart","headerStart","hasHeaderEnd","headerEnd","hasHeaderAction","headerAction","showTitleRow","showTrailing","titleSize","defaultSmartCardStrings","Card","footerDividerProp","expandedProp","stringsProp","rootProps","resolvedTitleSize","inset","vertical","tokens","framedHeader","headerPlacement","strings","useStrings","resolvedActionsLabel","isExpandable","expandable","collapsedMaxHeightRaw","collapsedMaxHeight","isExpandedControlled","bodyId","useId","internalExpanded","setInternalExpanded","useState","defaultExpanded","expanded","handleToggle","useCallback","next","onExpandedChange","handleBodyFocus","body","event","target","frame","control","hasAlert","hasFooterText","footerText","hasFooterSlot","footerSlot","hasContentTop","contentTop","hasContentBottom","contentBottom","hasChildren","hasBody","hasBodySurface","headerFooterOnly","tooltipAriaLabel","collapseStyle","resolvedSurface","surface","defaultSurface","framed","resolvedHeaderDivider","headerDivider","defaultHeaderDivider","footerDivider","defaultFooterDivider","sharedHeaderFooterDivider","gap","headerClassName","contentClassName","contentGap","footerClassName","ChevronDown","SmartCard"],"sources":["../src/components/base/feedback/alert.tsx","../src/components/ui/card.tsx","../src/components/base/cards/card.recipes.ts","../src/components/base/cards/smart-card.tokens.ts","../src/components/base/cards/partials/has-renderable-content.ts","../src/components/base/cards/partials/card-primitives.tsx","../src/components/base/cards/partials/smart-card-alert.tsx","../src/components/base/display/surface-title.tsx","../src/components/base/cards/partials/smart-card-actions-menu.tsx","../src/components/base/cards/partials/smart-card-header-row.tsx","../src/components/base/cards/smart-card.strings.ts","../src/components/base/cards/smart-card.tsx"],"sourcesContent":["/**\n * Alert — base notice primitive with semantic variants and responsive actions.\n *\n * Package-owned notice inspired by ReUI's alert layout. Consumers import this\n * base alert for the library's typography, token, and DOM-hook contract.\n */\nimport {\n\tforwardRef,\n\ttype ComponentPropsWithoutRef,\n\ttype ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Text } from '../../typography';\nimport { descendantInlineLinkClassName } from '../../typography/text-link';\nimport { resolveTextClassNames } from '../../typography/text.styles';\nimport { useTypographyConfig } from '../../../lib/ui-provider';\nimport { Stack } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { ICON_CHILD_SIZE_CLASSNAMES } from '../display/icon-size';\nimport type { SemanticTone } from '../../../lib/component-vocabulary';\nimport { toneRecipes } from '../../../lib/tone-recipes';\n\nconst alertVariants = cva(\n\t[\n\t\t// The surface inset and copy rhythm are Card's (p-surface, gap-normal); the\n\t\t// leading glyph and the action column keep Toast's glyph/action gap.\n\t\t'alert--component box-border relative grid w-full grid-cols-[0_1fr] items-start gap-y-normal rounded-radius border p-surface text-start',\n\t\t'has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-space-md',\n\t\t'has-[>[data-slot=alert-action]]:sm:grid-cols-[0_minmax(0,1fr)_auto] has-[>svg]:has-[>[data-slot=alert-action]]:sm:grid-cols-[auto_minmax(0,1fr)_auto] has-[>[data-slot=alert-action]]:gap-x-space-md',\n\t\t// Root tokens, not the `--spacing-*` aliases: an alias resolves at :root and would\n\t\t// ignore a scoped density/space/icon boundary.\n\t\t'[&>svg]:row-span-2 [&>svg]:mt-[calc((1em*1.375-var(--icon))/2)] [&>svg]:shrink-0',\n\t\tICON_CHILD_SIZE_CLASSNAMES.md,\n\t],\n\t{\n\t\tvariants: {\n\t\t\ttone: {\n\t\t\t\tneutral: 'border-border bg-card text-card-foreground',\n\t\t\t\tprimary: `${toneRecipes.primary.edge} ${toneRecipes.primary.wash} text-card-foreground [&>svg]:text-primary-accent`,\n\t\t\t\tsecondary: 'border-border bg-muted/50 text-card-foreground [&>svg]:text-secondary-foreground',\n\t\t\t\tinfo: `${toneRecipes.info.edge} ${toneRecipes.info.wash} text-card-foreground [&>svg]:text-info`,\n\t\t\t\tsuccess: `${toneRecipes.success.edge} ${toneRecipes.success.wash} text-card-foreground [&>svg]:text-success`,\n\t\t\t\twarning: `${toneRecipes.warning.edge} ${toneRecipes.warning.wash} text-card-foreground [&>svg]:text-warning-accent`,\n\t\t\t\tdestructive: `${toneRecipes.destructive.edge} ${toneRecipes.destructive.wash} text-card-foreground [&>svg]:text-destructive`,\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault: '',\n\t\t\t\tinverse: [\n\t\t\t\t\t'border-foreground bg-foreground text-background',\n\t\t\t\t\t'[&>svg]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-title]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-description]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-item]]:bg-background/10',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-item]>svg]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-label]_[data-typography=text]]:text-background',\n\t\t\t\t\t'[&_[data-slot=alert-metadata-value]_[data-typography=text]]:text-background',\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\ttone: 'neutral',\n\t\t\tvariant: 'default',\n\t\t},\n\t},\n);\n\nexport type AlertVariant = NonNullable<VariantProps<typeof alertVariants>['variant']>;\nexport type AlertTone = SemanticTone;\n\nexport interface AlertProps\n\textends ComponentPropsWithoutRef<'div'>,\n\t\tVariantProps<typeof alertVariants> {}\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(\n\t{ className, tone, variant, role = 'alert', ...props },\n\tref,\n) {\n\tconst { defaultTextSize } = useTypographyConfig();\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-slot=\"alert\"\n\t\t\tdata-tone={tone ?? 'neutral'}\n\t\t\tdata-variant={variant ?? 'default'}\n\t\t\trole={role}\n\t\t\tclassName={cn(resolveTextClassNames({ size: defaultTextSize, type: 'inherit' }), alertVariants({ tone, variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nAlert.displayName = 'Alert';\n\nconst AlertTitle = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertTitle({ className, children, ...props }, ref) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-title\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--title col-start-2 min-h-icon leading-snug',\n\t\t\t\t\tdescendantInlineLinkClassName,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText(children) ? (\n\t\t\t\t\t<Text tag=\"span\" type=\"inherit\" weight=\"semibold\" lineHeight=\"snug\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</div>\n\t\t);\n\t},\n);\nAlertTitle.displayName = 'AlertTitle';\n\nconst AlertDescription = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertDescription({ className, children, ...props }, ref) {\n\t\treturn (\n\t\t\t<Stack\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-description\"\n\t\t\t\tgap=\"xs\"\n\t\t\t\talign=\"start\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--description col-start-2 [&_p]:leading-relaxed',\n\t\t\t\t\tdescendantInlineLinkClassName,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText(children) ? (\n\t\t\t\t\t<Text tag=\"span\" type=\"secondary\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</Stack>\n\t\t);\n\t},\n);\nAlertDescription.displayName = 'AlertDescription';\n\nexport interface AlertMetadataProps extends ComponentPropsWithoutRef<'dl'> {\n\t/** Metadata items or consumer-owned definition-list content. */\n\tchildren?: ReactNode;\n\t/** Accessible name for the fact group when the alert title is not sufficient. */\n\t'aria-label'?: string;\n\t/** Consumer styling hook merged with the tokenized defaults. */\n\tclassName?: string;\n}\n\n/**\n * Compact semantic facts associated with an alert. Use `aria-label` when the\n * surrounding title does not already describe the metadata group.\n */\nconst AlertMetadata = forwardRef<HTMLDListElement, AlertMetadataProps>(\n\tfunction AlertMetadata({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<dl\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-metadata\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert-metadata--component alert--metadata col-start-2 m-0 mt-space-xs flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-xs',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAlertMetadata.displayName = 'AlertMetadata';\n\nexport interface AlertMetadataItemProps\n\textends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {\n\t/** Consumer styling hook merged with the tokenized defaults. */\n\tclassName?: string;\n\t/** Decorative or semantic leading media. Decorative icons should be aria-hidden. */\n\ticon?: ReactNode;\n\t/** User-provided metadata key; the Alert component owns no copy. */\n\tlabel: ReactNode;\n\t/** User-provided metadata value. May contain a package value primitive. */\n\tvalue: ReactNode;\n\t/** Applies tabular figures to simple numeric values, in the sans UI font. */\n\tnumeric?: boolean;\n}\n\n/** A label/value pair rendered with native `dt` and `dd` semantics. */\nconst AlertMetadataItem = forwardRef<HTMLDivElement, AlertMetadataItemProps>(\n\tfunction AlertMetadataItem(\n\t\t{ className, icon, label, value, numeric = false, ...props },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-metadata-item\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert-metadata-item--component alert--metadata-item inline-flex max-w-full min-w-0 items-center gap-space-sm rounded-radius-sm bg-foreground/8 px-control-xs py-space-xs',\n\t\t\t\t\t'[&>svg]:size-icon-sm [&>svg]:shrink-0 [&>svg]:text-muted-foreground',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t\t<dt data-slot=\"alert-metadata-label\" className=\"alert--metadata-label shrink-0\">\n\t\t\t\t\t{isSimpleText(label) ? (\n\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\" lineHeight=\"none\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : label}\n\t\t\t\t</dt>\n\t\t\t\t<dd data-slot=\"alert-metadata-value\" className=\"alert--metadata-value m-0 min-w-0\">\n\t\t\t\t\t{isSimpleText(value) ? (\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\t\ttype=\"inherit\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\t\t\tlineHeight=\"none\"\n\t\t\t\t\t\tclassName={cn('break-words', numeric && 'tabular-nums')}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{value}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : value}\n\t\t\t\t</dd>\n\t\t\t</div>\n\t\t);\n\t},\n);\nAlertMetadataItem.displayName = 'AlertMetadataItem';\n\nconst AlertAction = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<'div'>>(\n\tfunction AlertAction({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t// Direction/alignment come from Stack; the remaining classes are grid\n\t\t\t// placement inside the alert's own template, which is the parent's\n\t\t\t// concern rather than this row's.\n\t\t\t<Stack\n\t\t\t\tref={ref}\n\t\t\t\tdirection=\"horizontal\"\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify={{ base: 'start', sm: 'end' }}\n\t\t\t\twrap\n\t\t\t\tgap=\"sm\"\n\t\t\t\tdata-slot=\"alert-action\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'alert--action max-sm:col-start-2 max-sm:mt-space-md sm:col-start-3 sm:row-start-1 sm:row-span-2 sm:self-start',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAlertAction.displayName = 'AlertAction';\n\nexport {\n\tAlert,\n\tAlertTitle,\n\tAlertDescription,\n\tAlertMetadata,\n\tAlertMetadataItem,\n\tAlertAction,\n};\n","import * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Card({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\"card--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\"card-header--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"card-title--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"card-description--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\"card-action--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"card-content--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"card-footer--primitive\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n","import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport type { SmartCardProps } from './smart-card.types';\n\n/** Explicit region insets; omitted padding preserves the compound's inline-only defaults. */\nexport const cardRegionPaddingClasses = {\n\tnone: 'p-0',\n\tsm: 'p-surface-xs',\n\tmd: 'p-surface',\n\tlg: 'p-surface-lg',\n} as const satisfies Record<NonNullable<SmartCardProps['padding']>, string>;\n/** Private Tailwind recipes; public props and DOM hooks remain owned by the component. */\nexport const cardRecipes = {\n\troot: \"flex flex-col w-full font-sans rounded-radius box-border overflow-hidden py-surface gap-space-xl transition-[background-color,border-color,box-shadow] duration-150\",\n\tshell: \"@container/card flex flex-col w-full font-sans rounded-radius box-border overflow-hidden py-surface gap-space-xl transition-[background-color,border-color,box-shadow] duration-150\",\n\tsurfaceCard: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-sm text-card-foreground`,\n\tsurfaceDefault: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-sm text-card-foreground`,\n\tsurfaceFlat: \"bg-transparent border-0 shadow-none text-inherit\",\n\tsurfaceFramed: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-sm ${surfaceDividerRecipes.frame.ring} text-card-foreground`,\n\tsurfaceRaised: `bg-card ${surfaceDividerRecipes.frame.shell} shadow-md text-card-foreground`,\n\tsurfaceSunken: `bg-muted ${surfaceDividerRecipes.frame.shell} text-foreground`,\n\theader: \"flex flex-col gap-normal px-surface box-border\",\n\t// Wrapping follows available header space, independent of caller-owned\n\t// container names on the surface. Both title and commands keep their identity.\n\theaderRow: \"flex-row flex-wrap items-start justify-between gap-space-lg pb-0\",\n\theaderRowSingle: \"items-center\",\n\theaderLeading: \"min-w-0 max-w-full flex-1 basis-64\",\n\theaderLeadingSingle: \"basis-36\",\n\theaderTrailing: \"flex max-w-full flex-wrap shrink-0 items-center gap-space-md\",\n\theaderDivider: `${surfaceDividerRecipes.frame.header} [&.border-b]:!pb-surface`,\n\ttitle: \"min-w-0 leading-tight text-inherit\",\n\ttitleSm: \"text-sm\",\n\ttitleMd: \"text-base\",\n\ttitleLg: \"text-lg\",\n\tcontent: \"px-surface box-border min-w-0\",\n\tfooter: \"flex items-center px-surface box-border\",\n\tfooterDivider: `${surfaceDividerRecipes.frame.footer} [&.border-t]:!pt-surface`,\n\talert: \"px-surface\",\n\talertWithHeader: \"-mt-space-xs\",\n\texpandToggle: \"flex justify-center pb-surface -mt-space-md\",\n} as const satisfies Record<string, string>;\n","import type { SmartCardSurface } from './smart-card.types';\nimport { cardRecipes as styles } from './card.recipes';\n\n/**\n * BEM-style hooks applied to every SmartCard subregion. Library\n * consumers can target them in CSS / tests / analytics without\n * relying on shadcn's data-slot attributes (which are framework\n * internals). Keep these names consistent — they are part of the\n * public DOM contract.\n */\nexport const CARD_BEM = {\n\troot: 'card--component',\n\theader: 'card--header',\n\ttitle: 'card--title',\n\tdescription: 'card--description',\n\tcontent: 'card--content',\n\tfooter: 'card--footer',\n\talert: 'card--alert',\n\tcollapseFade: 'card--collapse-fade',\n\texpandToggle: 'card--expand-toggle',\n\texpandToggleButton: 'card--expand-toggle-button',\n} as const;\n\ninterface PaddingTokens {\n\tshell: string;\n\theaderX: string;\n\t/** Tokenized divider inset that overrides the shadcn primitive's fixed 24px rule. */\n\theaderDividerY: string;\n\tcontentX: string;\n\tcontentY: string;\n\tfooterX: string;\n\t/** Tokenized divider inset that overrides the shadcn primitive's fixed 24px rule. */\n\tfooterDividerY: string;\n\talertX: string;\n\t/** Bottom clearance for the half-inset expandable control. */\n\texpandableBottom: string;\n\t/** Vertical offset applied when alert sits BELOW the header (pulls it up). */\n\talertOffsetWithHeader: string;\n\t/** Vertical spacing applied when alert is the first content (no header). */\n\talertOffsetStandalone: string;\n}\n\nexport const CARD_INSET: PaddingTokens = {\n\tshell: styles.shell,\n\theaderX: 'px-surface',\n\theaderDividerY: styles.headerDivider,\n\tcontentX: styles.content,\n\tcontentY: '',\n\tfooterX: styles.footer,\n\tfooterDividerY: styles.footerDivider,\n\talertX: styles.alert,\n\texpandableBottom: 'pb-surface',\n\talertOffsetWithHeader: styles.alertWithHeader,\n\talertOffsetStandalone: '',\n};\n\n/**\n * Surface-specific shell classes.\n */\nexport const SURFACE_CLASSES: Record<SmartCardSurface, string> = {\n\tcard: styles.surfaceCard,\n\tflat: styles.surfaceFlat,\n\tframed: styles.surfaceFramed,\n};\n","import { Fragment, isValidElement, type ReactNode } from 'react';\n\n/**\n * Predicate used by SmartCard subregions to decide whether each slot\n * warrants rendering its wrapper. Numbers (incl. `0`) and JSX always\n * render; falsy / empty-string content is treated as absent. Fragments\n * recurse into their children.\n */\nexport function hasRenderableContent(content?: ReactNode): boolean {\n\tif (content === null || content === undefined) return false;\n\tif (typeof content === 'boolean') return false;\n\tif (typeof content === 'string') return content.trim().length > 0;\n\tif (typeof content === 'number' || typeof content === 'bigint') return true;\n\tif (Array.isArray(content)) return content.some(hasRenderableContent);\n\tif (isValidElement<{ children?: ReactNode }>(content)) {\n\t\tif (content.type === Fragment) return hasRenderableContent(content.props.children);\n\t\treturn true;\n\t}\n\treturn true;\n}\n","import type { TextGap } from '../../structure';\n/**\n * Internal layout primitives — re-exported from `smart-card.tsx` for\n * advanced composition (deeply customised layouts that still want the\n * design-system surface tokens). Each primitive is intentionally thin:\n * a single responsibility, a single set of default classes, no business\n * logic. The BEM hooks (`card--component`, `card--header`, etc.) are\n * applied here so the public DOM contract lives in one place.\n */\nimport {\n\ttype ComponentPropsWithRef,\n\ttype ComponentPropsWithoutRef,\n} from 'react';\n\nimport {\n\tCard as CardPrimitive,\n\tCardContent as CardContentPrimitive,\n\tCardFooter as CardFooterPrimitive,\n\tCardHeader as CardHeaderPrimitive,\n\tCardTitle as CardTitlePrimitive,\n} from '../../../ui/card';\nimport { Text } from '../../../typography/text';\nimport { useDensityConfig } from '../../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../../lib/ui-provider/scale';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_BEM } from '../smart-card.tokens';\nimport type { CardTitleSize, SmartCardProps } from '../smart-card.types';\nimport { cardRecipes as styles, cardRegionPaddingClasses } from '../card.recipes';\n\nimport { hasRenderableContent } from './has-renderable-content';\n\nconst CARD_TITLE_SIZE_CLASSES: Record<CardTitleSize, string> = {\n\tsm: styles.titleSm,\n\tmd: styles.titleMd,\n\tlg: styles.titleLg,\n};\n\nconst CARD_TITLE_TEXT_SIZE: Record<CardTitleSize, 'sm' | 'base' | 'lg'> = {\n\tsm: 'sm',\n\tmd: 'base',\n\tlg: 'lg',\n};\n\ntype CardRegionProps = ComponentPropsWithRef<'div'> & {\n\t/** Full surface inset. Omit to retain the established inline-only inset. */\n\tpadding?: SmartCardProps['padding'];\n};\n\nexport function CardShell({ className, ...props }: ComponentPropsWithRef<'div'>) {\n\treturn (\n\t\t<CardPrimitive\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.root,\n\t\t\t\tstyles.shell,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardHeader({\n\tclassName,\n\ttextGap = 'normal',\n\tpadding,\n\t...props\n}: CardRegionProps & { textGap?: TextGap }) {\n\treturn (\n\t\t<CardHeaderPrimitive\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.header,\n\t\t\t\tstyles.header,\n\t\t\t\tpadding !== undefined && cardRegionPaddingClasses[padding],\n\t\t\t\ttextGap === 'dense' ? 'gap-dense' : 'gap-normal',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardTitle({\n\tclassName,\n\tchildren,\n\tsize: sizeProp,\n\t...props\n}: ComponentPropsWithoutRef<'div'> & { size?: CardTitleSize }) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\tif (!hasRenderableContent(children)) return null;\n\n\tconst isPlainText =\n\t\ttypeof children === 'string' ||\n\t\ttypeof children === 'number' ||\n\t\ttypeof children === 'bigint';\n\n\tif (!isPlainText) {\n\t\treturn (\n\t\t\t<CardTitlePrimitive\n\t\t\t\tclassName={cn(CARD_BEM.title, styles.title, 'font-medium', CARD_TITLE_SIZE_CLASSES[size], className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</CardTitlePrimitive>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Text\n\t\t\tdata-slot=\"card-title\"\n\t\t\ttag=\"div\"\n\t\t\tsize={CARD_TITLE_TEXT_SIZE[size]}\n\t\t\tweight=\"semibold\"\n\t\t\tlineHeight=\"tight\"\n\t\t\tclassName={cn(CARD_BEM.title, styles.title, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\nexport function CardDescription({\n\tclassName,\n\tchildren,\n\t...props\n}: ComponentPropsWithoutRef<'div'>) {\n\tif (!hasRenderableContent(children)) return null;\n\n\treturn (\n\t\t<Text\n\t\t\tdata-slot=\"card-description\"\n\t\t\ttag=\"div\"\n\t\t\ttype=\"secondary\"\n\t\t\tclassName={cn(CARD_BEM.description, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\nexport function CardContent({\n\tclassName,\n\tpadding,\n\t...props\n}: CardRegionProps) {\n\treturn (\n\t\t<CardContentPrimitive\n\t\t\tclassName={cn(CARD_BEM.content, styles.content, padding !== undefined && cardRegionPaddingClasses[padding], className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardFooter({\n\tclassName,\n\tpadding,\n\t...props\n}: CardRegionProps) {\n\treturn (\n\t\t<CardFooterPrimitive\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.footer,\n\t\t\t\tstyles.footer,\n\t\t\t\tpadding !== undefined && cardRegionPaddingClasses[padding],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n","/**\n * Inline alert banner rendered between the header and the card body.\n * Pulls itself up under the header (`alertOffsetWithHeader`) when one\n * exists so the visual gap between header bottom and alert top stays\n * tight; otherwise pushes itself down (`alertOffsetStandalone`) so it\n * doesn't kiss the card top edge.\n */\nimport type { ReactNode } from 'react';\n\nimport { Alert, AlertDescription } from '../../feedback/alert';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_BEM, CARD_INSET } from '../smart-card.tokens';\nimport type { CardAlertTone } from '../smart-card.types';\n\ninterface AlertSlotProps {\n\t/** Banner content. A plain string is wrapped for you. */\n\talert: ReactNode | string;\n\t/** Tone of the banner. */\n\talertTone: CardAlertTone;\n\t/** Whether a header sits above, deciding the banner's top spacing. */\n\thasHeader: boolean;\n\tclassName?: string;\n}\n\nexport function SmartCardAlert({\n\talert,\n\talertTone,\n\thasHeader,\n\tclassName,\n}: AlertSlotProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\tCARD_BEM.alert,\n\t\t\t\tCARD_INSET.alertX,\n\t\t\t\tclassName,\n\t\t\t\thasHeader ? CARD_INSET.alertOffsetWithHeader : CARD_INSET.alertOffsetStandalone,\n\t\t\t)}\n\t\t>\n\t\t\t<Alert tone={alertTone}>\n\t\t\t\t<AlertDescription>{alert}</AlertDescription>\n\t\t\t</Alert>\n\t\t</div>\n\t);\n}\n","import type { ReactNode } from 'react';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\n/**\n * One wrapping title/suffix composition shared by cards and content structures.\n * A plain-text title is exposed as a level-2 heading (below the page's h1) so\n * screen-reader users can move between surfaces; suffix badges stay outside its\n * accessible name. Custom title nodes keep their own semantics.\n */\nexport function SurfaceTitle({title, suffix, size = 'base', className, suffixClassName, dataSlot}: {\n title?: ReactNode; suffix?: ReactNode; size?: 'sm' | 'base' | 'lg';\n className?: string; suffixClassName?: string; dataSlot?: string;\n}) {\n const plainTitle = typeof title === 'string' || typeof title === 'number' || typeof title === 'bigint';\n return <Text tag=\"div\" type=\"inherit\" size={size} weight={plainTitle ? 'semibold' : 'medium'} lineHeight=\"tight\" data-slot={dataSlot} className={cn('surface-title--component flex min-w-0 flex-wrap items-center gap-space-md break-words', className)}>\n {title != null && <span className=\"min-w-0 max-w-full\" {...(plainTitle ? {role: 'heading', 'aria-level': 2} : {})}>{title}</span>}\n {suffix != null && <div className={cn('surface-title--suffix inline-flex max-w-full flex-wrap items-center gap-space-md', suffixClassName)}>{suffix}</div>}\n </Text>;\n}\n","/**\n * SmartCard actions menu — the shared `⋯` overflow trigger and dropdown of\n * consumer-supplied `SmartCardAction` items. It ends the header's trailing\n * row, after `headerEnd` and `headerAction`, as the quiet ghost square at the\n * provider scale.\n */\nimport {\n\tActionMenu,\n\ttype ActionMenuAction,\n} from '../../action-menu';\n\nimport type { SmartCardAction } from '../smart-card.types';\n\ninterface ActionsMenuProps {\n\t/** Controls offered on the surface. */\n\tactions: readonly SmartCardAction[];\n\tactionsLabel: string;\n}\n\nexport function ActionsMenu({ actions, actionsLabel }: ActionsMenuProps) {\n\tconst actionDefinitions: ActionMenuAction[] = actions.map((action, index) => ({ ...action, id: action.id ?? `card-action-${index}` }));\n\n\treturn (\n\t\t<ActionMenu\n\t\t\tactions={actionDefinitions}\n\t\t\tsrText={actionsLabel}\n\t\t\talign=\"end\"\n\t\t\tcloseOnSelect\n\t\t\tbuttonProps={{ className: 'card--actions-trigger' }}\n\t\t/>\n\t);\n}\n","/**\n * SmartCardHeaderRow — the chrome above the card body. Combines icon /\n * title / description / tooltip / suffix on the leading side with the\n * trailing `headerEnd` / `headerAction` slots and the actions menu.\n *\n * `TooltipTrigger_Info` is colocated here because it's only used by the\n * header — keeping it private avoids polluting the public partial\n * surface.\n */\nimport { Info } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { SurfaceTitle } from '../../display/surface-title';\nimport { Button } from '../../buttons';\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from '../../display/tooltip';\nimport { Stack, type TextGap } from '../../structure';\nimport { cn } from '../../../../lib/utils';\n\nimport { CARD_INSET } from '../smart-card.tokens';\nimport { cardRecipes } from '../card.recipes';\nimport type { CardTitleSize, SmartCardAction } from '../smart-card.types';\n\nimport { CardHeader, CardDescription } from './card-primitives';\nimport { hasRenderableContent } from './has-renderable-content';\nimport { ActionsMenu } from './smart-card-actions-menu';\n\nfunction TooltipTrigger_Info({ tooltipLabel }: { tooltipLabel: string }) {\n\treturn (\n\t\t<TooltipTrigger\n\t\t\trender={(triggerProps) => {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\tconst passthrough = triggerProps as Record<string, any>;\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t{...passthrough}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'card--tooltip-trigger',\n\t\t\t\t\t\t\t'text-muted-foreground',\n\t\t\t\t\t\t\tpassthrough.className,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\taria-label={tooltipLabel}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Info className=\"size-icon-md\" />\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n\ninterface HeaderProps {\n\t/** Leading glyph on the title line. */\n\ticon?: ReactNode;\n\t/** Card title. */\n\ttitle?: ReactNode;\n\t/** Content immediately after the title. */\n\ttitleSuffix?: ReactNode;\n\t/** Supporting sentence under the title. */\n\tdescription?: ReactNode;\n\ttextGap?: TextGap;\n\t/** Explanatory copy behind an info affordance on the title line. */\n\ttooltip?: ReactNode;\n\t/** Accessible name for the tooltip trigger. */\n\ttooltipLabel: string;\n\t/** Full-width row above the title. */\n\theaderStart?: ReactNode;\n\t/** Content at the end of the header. */\n\theaderEnd?: ReactNode;\n\t/** Single control before the overflow menu. */\n\theaderAction?: ReactNode;\n\t/** Overflow menu at the far end of the header. */\n\tactions?: readonly SmartCardAction[];\n\t/** Accessible name for the overflow trigger. */\n\tactionsLabel: string;\n\t/** Card title typography. */\n\ttitleSize: CardTitleSize;\n\tclassName?: string;\n}\n\nexport function SmartCardHeaderRow({\n\ticon,\n\ttitle,\n\ttitleSuffix,\n\tdescription,\n\ttextGap = 'normal',\n\ttooltip,\n\ttooltipLabel,\n\theaderStart,\n\theaderEnd,\n\theaderAction,\n\tactions,\n\tactionsLabel,\n\ttitleSize,\n\tclassName,\n}: HeaderProps) {\n\tconst cardActions = Array.isArray(actions) ? actions : [];\n\tconst hasActions = cardActions.length > 0;\n\n\tconst hasIcon = hasRenderableContent(icon);\n\tconst hasTitle = hasRenderableContent(title);\n\tconst hasTitleSuffix = hasRenderableContent(titleSuffix);\n\tconst hasDescription = hasRenderableContent(description);\n\tconst hasTooltip = hasRenderableContent(tooltip);\n\tconst hasHeaderStart = hasRenderableContent(headerStart);\n\tconst hasHeaderEnd = hasRenderableContent(headerEnd);\n\tconst hasHeaderAction = hasRenderableContent(headerAction);\n\n\tconst showTitleRow = hasIcon || hasTitle || hasTitleSuffix || hasTooltip;\n\tconst showTrailing = hasHeaderEnd || hasHeaderAction || hasActions;\n\n\treturn (\n\t\t<CardHeader\n\t\t\tclassName={cn(\n\t\t\t\tcardRecipes.headerRow,\n\t\t\t\thasHeaderStart && (textGap === 'dense' ? 'gap-y-dense' : 'gap-y-normal'),\n\t\t\t\t!hasDescription && !hasHeaderStart && cardRecipes.headerRowSingle,\n\t\t\t\tCARD_INSET.headerX,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!!hasHeaderStart && <div className=\"card--header-context min-w-0 max-w-full basis-full\">{headerStart}</div>}\n\t\t\t<Stack gap={textGap} className={cn(\"card--header-start\", cardRecipes.headerLeading, !hasDescription && !hasHeaderStart && cardRecipes.headerLeadingSingle)}>\n\t\t\t\t{!!showTitleRow && (\n\t\t\t\t\t<div className=\"card--title-row flex min-w-0 items-start gap-space-sm\">\n\t\t\t\t\t\t{!!hasIcon && (\n\t\t\t\t\t\t\t<span className=\"card--icon flex shrink-0 items-center pt-space-2xs text-muted-foreground [&_svg]:size-icon\">\n\t\t\t\t\t\t\t\t{icon}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<SurfaceTitle dataSlot=\"card-title\" title={title} suffix={hasTitleSuffix ? titleSuffix : undefined} size={titleSize === 'md' ? 'base' : titleSize === 'lg' ? 'lg' : 'sm'} className=\"card--title flex-1\" suffixClassName=\"card--title-suffix\" />\n\t\t\t\t\t\t{!!hasTooltip && (\n\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t<TooltipTrigger_Info tooltipLabel={tooltipLabel} />\n\t\t\t\t\t\t\t\t<TooltipContent>{tooltip}</TooltipContent>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasDescription && (\n\t\t\t\t\t<CardDescription className=\"text-start\">{description}</CardDescription>\n\t\t\t\t)}\n\t\t\t</Stack>\n\n\t\t\t{!!showTrailing && (\n\t\t\t\t<div className={cn(\"card--header-end\", cardRecipes.headerTrailing)}>\n\t\t\t\t\t{!!hasHeaderEnd && headerEnd}\n\t\t\t\t\t{!!hasHeaderAction && headerAction}\n\t\t\t\t\t{!!hasActions && (\n\t\t\t\t\t\t<ActionsMenu actions={cardActions} actionsLabel={actionsLabel} />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</CardHeader>\n\t);\n}\n","/**\n * SmartCard strings — i18n surface for the chrome the consumer doesn't\n * pass directly. Most copy (title, description, action labels, alert\n * body) flows in via props; the strings here cover the implicit\n * affordances (header actions, tooltip, and expand toggle).\n */\n\nexport interface SmartCardStrings {\n\tactionsLabel: string;\n\ttooltipLabel: string;\n\texpandLabel: string;\n\tcollapseLabel: string;\n}\n\nexport const defaultSmartCardStrings = {\n\tactionsLabel: 'More actions',\n\ttooltipLabel: 'Card info',\n\texpandLabel: 'Expand card',\n\tcollapseLabel: 'Collapse card',\n} satisfies SmartCardStrings;\n","import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\n/**\n * SmartCard — blocks card with header (icon, title, suffix, description,\n * tooltip), actions menu, alert banner, header / content / footer slots,\n * surface variants (card / flat / framed), and an opt-in expandable body.\n *\n * The single card primitive everything else builds on — never reach past it\n * to shadcn `Card` directly. The CardShell / CardHeader / CardTitle /\n * CardDescription / CardContent / CardFooter primitives are re-exported\n * for advanced composition (deeply customised layouts that still want the\n * design-system surface tokens). Each subregion paints a BEM-style hook\n * (`card--component`, `card--header`, `card--title`, …) for CSS / test /\n * analytics targeting independent of shadcn's data-slot internals.\n *\n * The file is a thin orchestrator. The actual chrome lives in:\n * - `./smart-card.types.ts` — public prop / variant types\n * - `./smart-card.strings.ts` — i18n (expand toggle copy)\n * - `./smart-card.tokens.ts` — CARD_INSET + SURFACE_CLASSES + CARD_BEM\n * - `./partials/card-primitives.tsx` — CardShell + CardHeader / Title /\n * Description / Content / Footer\n * - `./partials/smart-card-header-row.tsx` — header layout + actions menu\n * - `./partials/smart-card-alert.tsx` — inline alert banner\n * - `./partials/smart-card-actions-menu.tsx` — shared `⋯` overflow menu\n * - `./partials/smart-card-skeleton.tsx` — loading placeholder\n * - `./partials/has-renderable-content.ts` — slot-empty predicate\n */\nimport { ChevronDown } from 'lucide-react';\nimport {\n\ttype CSSProperties,\n\ttype FocusEvent,\n\tforwardRef,\n\tuseCallback,\n\tuseId,\n\tuseState,\n} from 'react';\n\nimport { Button } from '../buttons';\nimport { Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { gapRecipe } from '../structure/structure.recipes';\nimport { useStrings } from '../../../lib/strings';\nimport { useCardConfig, useDensityConfig } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tCardContent,\n\tCardFooter,\n\tCardShell,\n} from './partials/card-primitives';\nimport { hasRenderableContent } from './partials/has-renderable-content';\nimport { SmartCardAlert } from './partials/smart-card-alert';\nimport { SmartCardHeaderRow } from './partials/smart-card-header-row';\nimport {\n\tdefaultSmartCardStrings,\n} from './smart-card.strings';\nimport {\n\tCARD_BEM,\n\tCARD_INSET,\n\tSURFACE_CLASSES,\n} from './smart-card.tokens';\nimport type {\n\tSmartCardProps,\n\tSmartCardSurface,\n} from './smart-card.types';\nimport { motionRecipes } from '../../../lib/motion-recipes';\n\nexport const Card = forwardRef<HTMLDivElement, SmartCardProps>(function Card({\n\ticon,\n\ttitle,\n\ttitleSuffix,\n\tdescription,\n\ttextGap = 'normal',\n\ttooltip,\n\ttooltipAriaLabel,\n\tfooterText,\n\talert,\n\talertTone = 'neutral',\n\tsurface,\n\tpadding = 'md',\n\theaderPlacement = 'inside',\n\tgap,\n\tcontentGap,\n\ttitleSize,\n\tactions,\n\tactionsLabel,\n\theaderAction,\n\theaderStart,\n\theaderEnd,\n\tcontentTop,\n\tcontentBottom,\n\tfooterSlot,\n\theaderDivider,\n\tfooterDivider: footerDividerProp,\n\texpandable = false,\n\tdefaultExpanded = false,\n\texpanded: expandedProp,\n\tonExpandedChange,\n\tchildren,\n\tclassName,\n\theaderClassName,\n\tcontentClassName,\n\tfooterClassName,\n\tstrings: stringsProp,\n\t...rootProps\n}, ref) {\n\tconst {\n\t\tdefaultSurface,\n\t\tdefaultHeaderDivider,\n\t\tdefaultFooterDivider,\n\t} = useCardConfig();\n\tconst { defaultScale } = useDensityConfig();\n\tconst resolvedTitleSize = resolveComponentScale(titleSize, defaultScale);\n\tconst inset = { none: 'px-0', sm: 'px-surface-xs', md: 'px-surface', lg: 'px-surface-lg' }[padding];\n\tconst vertical = { none: 'py-0', sm: 'py-surface-xs', md: 'py-surface', lg: 'py-surface-lg' }[padding];\n\tconst tokens = { ...CARD_INSET, headerX: inset, contentX: inset, footerX: inset, headerDividerY: { none: '!pb-0', sm: '!pb-surface-xs', md: '!pb-surface', lg: '!pb-surface-lg' }[padding], footerDividerY: { none: '!pt-0', sm: '!pt-surface-xs', md: '!pt-surface', lg: '!pt-surface-lg' }[padding] };\n\tconst framedHeader = headerPlacement === 'frame';\n\tconst cardActions = Array.isArray(actions) ? actions : [];\n\tconst strings = useStrings(defaultSmartCardStrings, stringsProp);\n\tconst resolvedActionsLabel =\n\t\tactionsLabel ?? strings.actionsLabel;\n\n\tconst isExpandable = expandable !== false && expandable !== undefined;\n\tconst collapsedMaxHeightRaw =\n\t\ttypeof expandable === 'object' && expandable?.collapsedMaxHeight !== undefined\n\t\t\t? expandable.collapsedMaxHeight\n\t\t\t: '12rem';\n\tconst collapsedMaxHeight =\n\t\ttypeof collapsedMaxHeightRaw === 'number'\n\t\t\t? `${collapsedMaxHeightRaw}px`\n\t\t\t: collapsedMaxHeightRaw;\n\n\tconst isExpandedControlled = expandedProp !== undefined;\n\tconst bodyId = useId();\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = isExpandedControlled ? expandedProp : internalExpanded;\n\tconst handleToggle = useCallback(() => {\n\t\tconst next = !expanded;\n\t\tif (!isExpandedControlled) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t}, [expanded, isExpandedControlled, onExpandedChange]);\n\tconst handleBodyFocus = (event: FocusEvent<HTMLDivElement>) => {\n\t\tif (!isExpandable || expanded) return;\n\t\tconst body = event.currentTarget;\n\t\tconst target = event.target;\n\t\tconst frame = body.getBoundingClientRect();\n\t\tconst control = target.getBoundingClientRect();\n\t\t// Native keyboard focus can scroll an overflow-hidden preview before the\n\t\t// focus event reaches React. Reveal the complete body in either case.\n\t\tif (body.scrollTop === 0 && control.top >= frame.top && control.bottom <= frame.bottom) return;\n\t\tif (!isExpandedControlled) setInternalExpanded(true);\n\t\tonExpandedChange?.(true);\n\t\trequestAnimationFrame(() => {\n\t\t\tif (target.isConnected && target === target.ownerDocument.activeElement) {\n\t\t\t\ttarget.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });\n\t\t\t}\n\t\t});\n\t};\n\n\tconst hasHeader =\n\t\thasRenderableContent(icon) ||\n\t\thasRenderableContent(title) ||\n\t\thasRenderableContent(description) ||\n\t\tcardActions.length > 0 ||\n\t\thasRenderableContent(headerAction) ||\n\t\thasRenderableContent(headerStart) ||\n\t\thasRenderableContent(headerEnd);\n\n\tconst hasAlert = hasRenderableContent(alert);\n\tconst hasFooterText = hasRenderableContent(footerText);\n\tconst hasFooterSlot = hasRenderableContent(footerSlot);\n\tconst hasContentTop = hasRenderableContent(contentTop);\n\tconst hasContentBottom = hasRenderableContent(contentBottom);\n\tconst hasChildren = hasRenderableContent(children);\n\t// Expandable cards retain their explicitly requested collapse region.\n\tconst hasBody = hasContentTop || hasContentBottom || hasChildren || isExpandable;\n\tconst hasBodySurface = hasAlert || hasBody || hasFooterText || hasFooterSlot;\n\tconst headerFooterOnly = hasHeader && (hasFooterText || hasFooterSlot) && !hasAlert && !hasBody && !framedHeader;\n\n\tconst tooltipLabel =\n\t\ttooltipAriaLabel && tooltipAriaLabel.trim().length > 0\n\t\t\t? tooltipAriaLabel\n\t\t\t: strings.tooltipLabel;\n\n\tconst collapseStyle: CSSProperties | undefined = isExpandable\n\t\t? {\n\t\t\t\tmaxHeight: expanded ? '' : collapsedMaxHeight,\n\t\t\t}\n\t\t: undefined;\n\n\t// Resolve surface from the instance, then the provider default.\n\tconst resolvedSurface: SmartCardSurface =\n\t\tsurface ?? defaultSurface ?? 'framed';\n\t// Rules mark the regions of a frame, so they are on by default wherever the\n\t// card draws one. Flat, card-free structure has no frame to rule, and a header\n\t// set above an inset body is already separated by that body's edge. Explicit\n\t// per-card booleans always win.\n\tconst framed = resolvedSurface !== 'flat';\n\tconst resolvedHeaderDivider = headerDivider ?? (framed && !framedHeader && (defaultHeaderDivider ?? true));\n\tconst footerDivider = footerDividerProp ?? (framed && (defaultFooterDivider ?? true));\n\t// Adjacent header/footer regions share one boundary, owned by the footer.\n\tconst sharedHeaderFooterDivider = headerFooterOnly && (resolvedHeaderDivider || footerDivider);\n\n\treturn (\n\t\t<CardShell\n\t\t\t{...rootProps}\n\t\t\tdata-header-placement={headerPlacement}\n\t\t\tref={ref}\n\t\t\tdata-surface={resolvedSurface}\n\t\t\tclassName={cn(\n\t\t\t\tSURFACE_CLASSES[resolvedSurface],\n\t\t\t\ttokens.shell,\n\t\t\t\tvertical,\n\t\t\t\t// One header-to-body rhythm for every surface: a flat, uninset card keeps\n\t\t\t\t// the framed card's step instead of tightening to a row gap above lists.\n\t\t\t\tgapRecipe({ gap: gap ?? 'xl' }),\n\t\t\t\tsharedHeaderFooterDivider && 'gap-0',\n\t\t\t\tframedHeader && 'rounded-radius bg-muted text-foreground p-surface-xs pt-0 gap-0 ring-0',\n\t\t\t\t// Flat subject structure has no surface edge to clip against.\n\t\t\t\t// With no inset, rounded clipping otherwise cuts into its heading.\n\t\t\t\tresolvedSurface === 'flat' && !framedHeader && 'overflow-visible',\n\t\t\t\t// The toggle straddles the card edge. Keep tokenized clearance\n\t\t\t\t// inside the card and reserve its outside half in document flow.\n\t\t\t\t// `overflow-visible` counters the shadcn primitive's clipping.\n\t\t\t\tisExpandable && cn(\n\t\t\t\t\t'relative mb-space-xl !overflow-visible',\n\t\t\t\t\ttokens.expandableBottom,\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!!hasHeader && (\n\t\t\t\t<SmartCardHeaderRow\n\t\t\t\t\ticon={icon}\n\t\t\t\t\ttitle={title}\n\t\t\t\t\ttitleSuffix={titleSuffix}\n\t\t\t\t\tdescription={description}\n\t\t\t\t\ttextGap={textGap}\n\t\t\t\t\ttooltip={tooltip}\n\t\t\t\t\ttooltipLabel={tooltipLabel}\n\t\t\t\t\theaderStart={headerStart}\n\t\t\t\t\theaderEnd={headerEnd}\n\t\t\t\t\theaderAction={headerAction}\n\t\t\t\t\tactions={cardActions}\n\t\t\t\t\tactionsLabel={resolvedActionsLabel}\n\t\t\t\t\ttitleSize={resolvedTitleSize}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tresolvedHeaderDivider && !sharedHeaderFooterDivider && cn(\n\t\t\t\t\t\t\tsurfaceDividerRecipes.frame.header,\n\t\t\t\t\t\t\ttokens.headerDividerY,\n\t\t\t\t\t\t),\n\t\t\t\t\t\tsharedHeaderFooterDivider && tokens.headerDividerY,\n\t\t\t\t\t\ttokens.headerX,\n\t\t\t\t\t\tframedHeader && 'flex-row items-center min-h-action px-surface-xs py-space-2xs [&_.card--title-row]:items-center [&_.card--icon]:pt-0',\n\t\t\t\t\t\theaderClassName,\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{hasBodySurface && <div className={framedHeader ? cn('card--body-surface flex min-w-0 flex-col rounded-inner bg-card text-card-foreground', gapRecipe({ gap: gap ?? 'xl' }), surfaceDividerRecipes.frame.shell, vertical) : 'contents'}>\n\t\t\t{!!hasAlert && (\n\t\t\t\t<SmartCardAlert\n\t\t\t\t\talert={alert}\n\t\t\t\t\talertTone={alertTone}\n\t\t\t\t\thasHeader={hasHeader}\n\t\t\t\t\tclassName={inset}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{!!hasBody && <CardContent\n\t\t\t\tid={isExpandable ? bodyId : undefined}\n\t\t\t\tonFocusCapture={isExpandable ? handleBodyFocus : undefined}\n\t\t\t\tclassName={cn(\n\t\t\t\t\ttokens.contentX,\n\t\t\t\t\ttokens.contentY,\n\t\t\t\t\tisExpandable && cn(\n\t\t\t\t\t\t'relative transition-[max-height] duration-500 ease-in-out motion-reduce:transition-none',\n\t\t\t\t\t\texpanded ? 'overflow-visible' : 'overflow-hidden',\n\t\t\t\t\t),\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t\tstyle={collapseStyle}\n\t\t\t>\n\t\t\t\t{hasContentTop || hasContentBottom ? (\n\t\t\t\t\t// contentTop/contentBottom are body regions, so they share the content gap with children.\n\t\t\t\t\t<Stack gap={contentGap ?? 'lg'}>\n\t\t\t\t\t\t{!!hasContentTop && contentTop}\n\t\t\t\t\t\t{hasChildren && (contentGap ? <Stack gap={contentGap}>{children}</Stack> : <div className=\"min-w-0\">{children}</div>)}\n\t\t\t\t\t\t{!!hasContentBottom && contentBottom}\n\t\t\t\t\t</Stack>\n\t\t\t\t) : contentGap ? <Stack gap={contentGap}>{children}</Stack> : children}\n\n\t\t\t\t{!!isExpandable && !expanded && (\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tCARD_BEM.collapseFade,\n\t\t\t\t\t\t\t'pointer-events-none absolute inset-x-0 bottom-0 h-20 rounded-b-radius bg-linear-to-t to-transparent',\n\t\t\t\t\t\t\tresolvedSurface === 'flat' ? 'from-background' : 'from-card',\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</CardContent>}\n\n\t\t\t{(hasFooterText || hasFooterSlot) && (\n\t\t\t\t<CardFooter className={cn(\n\t\t\t\t\ttokens.footerX,\n\t\t\t\t\thasFooterSlot ? 'flex-col items-stretch gap-space-md' : 'justify-end',\n\t\t\t\t\t(footerDivider || sharedHeaderFooterDivider) && cn(surfaceDividerRecipes.frame.footer, tokens.footerDividerY),\n\t\t\t\t\tfooterClassName,\n\t\t\t\t)}>\n\t\t\t\t\t{hasFooterText && (typeof footerText === 'string' || typeof footerText === 'number' || typeof footerText === 'bigint'\n\t\t\t\t\t\t? <Text tag=\"span\" size=\"xs\" type=\"secondary\">{footerText}</Text>\n\t\t\t\t\t\t: footerText)}\n\t\t\t\t\t{hasFooterSlot && footerSlot}\n\t\t\t\t</CardFooter>\n\t\t\t)}\n\n\t\t\t</div>}\n\n\t\t\t{!!isExpandable && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tCARD_BEM.expandToggle,\n\t\t\t\t\t\t'absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\tonClick={handleToggle}\n\t\t\t\t\t\taria-expanded={expanded}\n\t\t\t\t\t\taria-controls={bodyId}\n\t\t\t\t\t\taria-label={expanded ? strings.collapseLabel : strings.expandLabel}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\tCARD_BEM.expandToggleButton,\n\t\t\t\t\t\t\tcn(surfaceDividerRecipes.frame.shell, 'bg-background text-foreground shadow-sm'),\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ChevronDown\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t`size-icon ${motionRecipes.chevron}`,\n\t\t\t\t\t\t\t\texpanded && 'rotate-180',\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</CardShell>\n\t);\n});\n\nCard.displayName = 'Card';\n\n/** @deprecated Use Card. */\nexport const SmartCard = Card;\n\n// ──────────────────────────────────────────────────────────────────────────\n// Re-exports — public surface lives here so `import { ... } from\n// '.'` keeps working through the file split.\n// ──────────────────────────────────────────────────────────────────────────\n\nexport {\n\tdefaultSmartCardStrings,\n\ttype SmartCardStrings,\n} from './smart-card.strings';\nexport type {\n\tCardAlertTone,\n\tSmartCardAction,\n\tSmartCardProps,\n\tSmartCardSkeletonProps,\n\tSmartCardSurface,\n} from './smart-card.types';\nexport {\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardShell,\n\tCardTitle,\n} from './partials/card-primitives';\nexport { hasRenderableContent } from './partials/has-renderable-content';\nexport { SmartCardSkeleton } from './partials/smart-card-skeleton';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,IAAM+B,IAAgBC,EACrB;CAGC;CACA;CACA;CAGA;CACAL,EAA2B;AAC5B,GACA;CACC,UAAU;EACT,MAAM;GACL,SAAS;GACT,SAAS,GAAGC,EAAY,QA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WAAW1K,EACV,aAAaK,GAAc,WAC3B4H,KAAY,YACb;KACA,CAAA;IACM,CAAA;GACJ,CAAA;EAEI;;AAEb,CAAC;AAED,EAAK,cAAc;AAGnB,IAAa0C,KAAYnE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-inputs-f9Ia-aCi.js","names":["Textarea","React","InputGroup","InputGroupAddon","InputGroupText","InputGroupInput","Input","InputGroupTextarea","InputGroupPrimitive","InputGroupAddonPrimitive","InputGroupTextPrimitive","InputGroupInputPrimitive","InputGroupTextareaPrimitive","React","React","useDensityConfig","cn","affordanceGeometry","Button","Text","fieldStateRecipes","fieldAffordanceRecipes","editableTextSizeClasses","formTextareaInsetClasses","formControlHeightClasses","formTextareaAffordanceTopClasses","formControlHorizontalPaddingClasses","formControlPaddingClasses","formTextareaSizeClasses","resolveFormControlSize","clearNativeField","InputTrailingActionContext","useFormFieldState","FieldClearButton","Input","Input$1","React$1","defaultTextareaStrings","Textarea$1","sizeProp","controlledValue","providedId","stringsProp","props","textareaRef","useRef","strings","useStrings","size","defaultScale","textareaValue","onChange","hasError","invalid","adjustHeight","useCallback","autoResize","textarea","css","lineHeight","padding","border","minHeight","minRows","maxHeight","maxRows","newHeight","useEffect","previous","observer","signature","handleTextareaChange","newValue","wouldExceedLimit","updateValue","handleClear","loading","onClear","showClearButton","clearable","hasValue","showCount","forwardedRef","node","isReactHookForm","className","characterCount","hasCharacterLimit","maxLength","Loader2Icon","Textarea","InputGroup$1","inputGroupAddonVariants","cva","InputGroupAddon$1","align","InputGroupText$1","InputGroupInput$1","InputGroupTextarea$1","useInputGroupScale","InputGroup","addonAlignmentClasses","addonInlinePaddingClasses","addonIconClasses","InputGroupAddon","alignment","InputGroupButton","iconOnly","isScalarContent","content","InputGroupText","children","InputGroupInput","InputGroupTextarea","defaultPasswordInputStrings","PasswordInput","internalVisible","setInternalVisible","defaultVisible","isControlled","visible","isVisible","disabledState","disabled","toggleVisibility","nextVisible","onVisibleChange","visibilityAction","revealable","visibilityButtonClassName","event","jsx","EyeOff","Eye","wrapperClassName","inputStrings","slugifyValue","safeSeparator","separator","escapedSeparator","normalized","value","lowercase","trim","SlugField","slug","slugify"],"sources":["../src/components/base/text-inputs/textarea.tsx","../src/components/ui/textarea.tsx","../src/components/ui/input-group.tsx","../src/components/base/text-inputs/input-group.tsx","../src/components/base/text-inputs/password-input.tsx","../src/components/base/text-inputs/slug-field.tsx"],"sourcesContent":["import { fieldStateRecipes } from '../../../lib/field-state-recipes';\nimport { affordanceGeometry } from '../../../lib/affordance-geometry.generated';\nimport { fieldAffordanceRecipes } from '../../../lib/field-affordance-recipes';\nimport { editableTextSizeClasses } from '../../../lib/editable-text-recipe';\nimport { Loader2Icon } from 'lucide-react';\nimport * as React from 'react';\nimport { useRef, useCallback, useEffect } from 'react';\nimport { Text } from '../../typography';\nimport { useDensityConfig, type FormControlSize } from '../../../lib/ui-provider';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { formTextareaAffordanceTopClasses, formTextareaInsetClasses, formTextareaSizeClasses, resolveFormControlSize } from '../forms/form-sizing';\nimport { useFormFieldState } from './hooks';\nimport { clearNativeField } from './clear-native-field';\nimport { FieldClearButton } from './field-clear-button';\n\nexport interface TextareaStrings {\n\t\tclear: string;\n}\n\nexport const defaultTextareaStrings: TextareaStrings = {\n\t\tclear: 'Clear textarea',\n};\n\nexport interface TextareaProps extends Omit<React.ComponentProps<'textarea'>, 'onChange'> {\n\t\t// String overrides (e.g. clear button aria-label)\n\t\t/** Overrides the character-count and clear copy. */\n\t\tstrings?: StringsProp<TextareaStrings>;\n\t\t// Character limit\n\t\t/** Character cap, also used as the denominator of the count. */\n\t\tmaxLength?: number;\n\t\t/** Shows the current and maximum character count. */\n\t\tshowCharacterCount?: boolean;\n\n\t\t// Clear button\n\t\t/** Shows an inline clear action when the field has a value. */\n\t\tclearable?: boolean;\n\t\tonClear?: () => void;\n\n\t\t// Loading state\n\t\t/** Replaces the trailing affordance with a loading indicator. */\n\t\tloading?: boolean;\n\n\t\t// Error state for styling (passed from FormField)\n\t\t/** Applies the invalid styling. Validation copy stays with FormField. */\n\t\tinvalid?: boolean;\n\n\t\t// Visual size\n\t\t/** Control density. Falls back to `UIProvider.density.defaultScale`. */\n\t\tsize?: FormControlSize;\n\n\t\t// Auto-resize functionality\n\t\t/** Grows the field with its content, between `minRows` and `maxRows`. */\n\t\tautoResize?: boolean;\n\t\t/** Smallest height, in rows, when `autoResize` is set. */\n\t\tminRows?: number;\n\t\t/** Height at which the field stops growing and starts scrolling. */\n\t\tmaxRows?: number;\n\n\t\t// Value props\n\t\tonChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n\t\t/** Current text. Controlled. */\n\t\tvalue?: string;\n\t\t/** Initial text for uncontrolled use. */\n\t\tdefaultValue?: string;\n}\n\nconst TextareaImpl = (\n\t\t{\n\t\t\t\tclassName,\n\t\t\t\tmaxLength,\n\t\t\t\tshowCharacterCount,\n\t\t\t\tclearable,\n\t\t\t\tonClear,\n\t\t\t\tloading = false,\n\t\t\t\tinvalid,\n\t\t\t\tsize: sizeProp,\n\t\t\t\tautoResize = false,\n\t\t\t\tminRows = 2,\n\t\t\t\tmaxRows,\n\t\t\t\tonChange,\n\t\t\t\tvalue: controlledValue,\n\t\t\t\tdefaultValue,\n\t\t\t\tid: providedId,\n\t\t\t\tstrings: stringsProp,\n\t\t\t\t...props\n\t\t}: TextareaProps,\n\t\tforwardedRef: React.ForwardedRef<HTMLTextAreaElement>,\n) => {\n\t\tconst textareaRef = useRef<HTMLTextAreaElement>(null);\n\t\tconst strings = useStrings(defaultTextareaStrings, stringsProp);\n\t\tconst { defaultScale } = useDensityConfig();\n\t\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\n\t\t// Use shared form field state hook\n\t\tconst {\n\t\t\t\tid,\n\t\t\t\tvalue: textareaValue,\n\t\t\t\tisReactHookForm,\n\t\t\t\tcharacterCount,\n\t\t\t\thasCharacterLimit,\n\t\t\t\tshowCount,\n\t\t\t\thasValue,\n\t\t\t\tupdateValue,\n\t\t\t\twouldExceedLimit,\n\t\t} = useFormFieldState({\n\t\t\t\tcontrolledValue,\n\t\t\t\tdefaultValue,\n\t\t\t\tmaxLength,\n\t\t\t\tshowCharacterCount,\n\t\t\t\tprovidedId,\n\t\t\t\tidPrefix: 'textarea',\n\t\t\t\thasOnChange: onChange !== undefined,\n\t\t});\n\n\t\t// Derive display states\n\t\tconst hasError = Boolean(invalid);\n\n\t\tconst adjustHeight = useCallback(() => {\n\t\t\t\tif (!autoResize || !textareaRef.current) return;\n\n\t\t\t\tconst textarea = textareaRef.current;\n\n\t\t\t\tconst css = getComputedStyle(textarea);\n\t\t\t\tconst lineHeight = Number.parseFloat(css.lineHeight) || 20;\n\t\t\t\tconst padding = (Number.parseFloat(css.paddingTop) || 0) + (Number.parseFloat(css.paddingBottom) || 0);\n\t\t\t\tconst border = css.boxSizing === 'border-box' ? (Number.parseFloat(css.borderTopWidth) || 0) + (Number.parseFloat(css.borderBottomWidth) || 0) : 0;\n\t\t\t\ttextarea.style.height = 'auto';\n\t\t\t\tconst minHeight = lineHeight * minRows + padding + border;\n\t\t\t\tconst maxHeight = maxRows ? lineHeight * maxRows + padding + border : Infinity;\n\n\t\t\t\tconst newHeight = Math.min(Math.max(textarea.scrollHeight + border, minHeight), maxHeight);\n\t\t\t\ttextarea.style.height = `${newHeight}px`;\n\t\t}, [autoResize, maxRows, minRows]);\n\n\t\tuseEffect(() => {\n\t\t\t\tadjustHeight();\n\t\t}, [textareaValue, props.placeholder, autoResize, adjustHeight]);\n\n\t\tuseEffect(() => {\n\t\t\t\tconst textarea = textareaRef.current;\n\t\t\t\tif (!autoResize || !textarea || typeof ResizeObserver === 'undefined') return;\n\t\t\t\tlet previous = '';\n\t\t\t\tconst observer = new ResizeObserver(() => {\n\t\t\t\t\t\tconst css = getComputedStyle(textarea);\n\t\t\t\t\t\tconst signature = `${textarea.clientWidth}:${css.fontSize}:${css.lineHeight}`;\n\t\t\t\t\t\tif (signature === previous) return;\n\t\t\t\t\t\tprevious = signature;\n\t\t\t\t\t\tadjustHeight();\n\t\t\t\t});\n\t\t\t\tobserver.observe(textarea);\n\t\t\t\treturn () => observer.disconnect();\n\t\t}, [autoResize, adjustHeight]);\n\n\t\tconst handleTextareaChange = useCallback(\n\t\t\t\t(e: React.ChangeEvent<HTMLTextAreaElement>) => {\n\t\t\t\t\t\tconst newValue = e.target.value;\n\n\t\t\t\t\t\t// Check character limit\n\t\t\t\t\t\tif (wouldExceedLimit(newValue)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Update internal state if uncontrolled\n\t\t\t\t\t\tupdateValue(newValue);\n\n\t\t\t\t\t\t// Call external onChange\n\t\t\t\t\t\tonChange?.(e);\n\n\t\t\t\t\t\t// Auto-resize if enabled\n\t\t\t\t\t\tif (autoResize) {\n\t\t\t\t\t\t\t\tsetTimeout(adjustHeight, 0);\n\t\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t[onChange, updateValue, wouldExceedLimit, autoResize, adjustHeight]\n\t\t);\n\n\t\tconst handleClear = useCallback(() => {\n\t\t\t\tif (props.disabled || props.readOnly || loading) return;\n\n\t\t\t\tif (textareaRef.current) clearNativeField(textareaRef.current);\n\n\t\t\t\t// Execute optional onClear callback\n\t\t\t\tonClear?.();\n\n\t\t\t\t// Focus the textarea after clearing\n\t\t\t\ttextareaRef.current?.focus();\n\n\t\t}, [props.disabled, props.readOnly, loading, onClear]);\n\n\t\t// Determine what to show in the end position\n\t\tconst showClearButton = clearable && hasValue && !loading && !showCount;\n\n\t\treturn (\n\t\t\t\t<div className={cn('textarea--component', 'relative w-full')}>\n\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\tref={(node) => {\n\t\t\t\t\t\t\t\t\t\tif (typeof forwardedRef === 'function') {\n\t\t\t\t\t\t\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\t\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ttextareaRef.current = node;\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\t\t{...(!isReactHookForm && { value: textareaValue })}\n\t\t\t\t\t\t\t\tonChange={handleTextareaChange}\n\t\t\t\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\t\t\t\taria-invalid={hasError || undefined}\n\t\t\t\t\t\t\t\trows={minRows}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tresize: autoResize ? 'none' : props.style?.resize,\n\t\t\t\t\t\t\t\t\t\toverflow: autoResize && maxRows ? 'auto' : 'visible',\n\t\t\t\t\t\t\t\t\t\t...props.style,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t// Base styles\n\t\t\t\t\t\t\t\t\t\t'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n\t\t\t\t\t\t\t\t\t\t'border-input box-border flex w-full rounded-inner border bg-transparent px-control',\n\t\t\t\t\t\t\t\t\t\t// First line where a single-line control of this size draws its value.\n\t\t\t\t\t\t\t\t\t\tformTextareaInsetClasses[size],\n\t\t\t\t\t\t\t\t\t\t'transition-[color,box-shadow] outline-none',\n\t\t\t\t\t\t\t\t\t\t'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n\t\t\t\t\t\t\t\t\t\t// Same read-only fill as Input; disabled stays on the transparent fill.\n\t\t\t\t\t\t\t\t\t\t'[&:read-only:not(:disabled)]:bg-muted',\n\t\t\t\t\t\t\t\t\t\tformTextareaSizeClasses[size],\n\t\t\t\t\t\t\t\t\t\teditableTextSizeClasses[size],\n\t\t\t\t\t\t\t\t\t\t// Focus styles\n\t\t\t\t\t\t\t\t\t\tfieldStateRecipes.focus,\n\t\t\t\t\t\t\t\t\t\t// Invalid/error styles\n\t\t\t\t\t\t\t\t\t\tfieldStateRecipes.invalid,\n\t\t\t\t\t\t\t\t\t\t// Dynamic padding for overlays\n\t\t\t\t\t\t\t\t\t\tshowClearButton && fieldAffordanceRecipes.clearPadding[size],\n\t\t\t\t\t\t\t\t\t\tshowCount && fieldAffordanceRecipes.textareaCountPadding,\n\t\t\t\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\tdisabled={props.disabled || loading}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{/* Character Count */}\n\t\t\t\t\t\t{!!showCount && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t'pointer-events-none absolute bottom-control-y-offset text-xs tabular-nums',\n\t\t\t\t\t\t\t\t\t\t\t\taffordanceGeometry.clearEnd.md,\n\t\t\t\t\t\t\t\t\t\t\t\tprops.disabled && 'opacity-50',\n\t\t\t\t\t\t\t\t\t\t\t\thasError ? 'text-destructive' : 'text-muted-foreground'\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\t\t\t\t\trole=\"status\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type={hasError ? 'error' : 'secondary'}>\n\t\t\t\t\t\t\t\t\t\t\t\t{characterCount}\n\t\t\t\t\t\t\t\t\t\t\t\t{hasCharacterLimit ? `/${maxLength}` : ''}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/* Loading Spinner */}\n\t\t\t\t\t\t{!!loading && !showCount && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t'pointer-events-none absolute end-[calc(var(--control-x)*var(--space-scale))]',\n\t\t\t\t\t\t\t\t\t\t\t\tformTextareaAffordanceTopClasses.icon[size],\n\t\t\t\t\t\t\t\t\t\t\t\thasError ? 'text-destructive' : 'text-muted-foreground'\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Loader2Icon className=\"size-icon animate-spin\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{/* Clear Button */}\n\t\t\t\t\t\t{!!showClearButton && !showCount && (\n\t\t\t\t\t\t\t\t<FieldClearButton\n\t\t\t\t\t\t\t\t\t\tclassName={cn('absolute', formTextareaAffordanceTopClasses.target[size], fieldAffordanceRecipes.clearEnd[size])}\n\t\t\t\t\t\t\t\t\t\taria-label={strings.clear}\n\t\t\t\t\t\t\t\t\t\tonClick={handleClear}\n\t\t\t\t\t\t\t\t\t\tdisabled={props.disabled || props.readOnly || loading}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t);\n};\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(TextareaImpl);\nTextarea.displayName = 'Textarea';\n\nexport { Textarea };\n","import { fieldStateRecipes } from '../../lib/field-state-recipes';\nimport { editableTextSizeClasses } from '../../lib/editable-text-recipe';\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"border-input rounded-inner border bg-transparent px-control py-space-md shadow-none transition-[color,box-shadow] placeholder:text-muted-foreground flex field-sizing-content min-h-textarea w-full outline-none disabled:cursor-not-allowed disabled:opacity-50 [&:read-only:not(:disabled)]:bg-muted\",\n editableTextSizeClasses.md,\n fieldStateRecipes.focus,\n fieldStateRecipes.invalid,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n","import { fieldStateRecipes } from '../../lib/field-state-recipes';\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\n\nimport { Button } from \"./button\"\nimport { Input } from \"./input\"\nimport { Textarea } from \"./textarea\"\nimport { cn } from \"../../lib/utils\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"border-input h-control rounded-inner border shadow-none transition-[color,box-shadow] has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-space-lg has-[>[data-align=block-start]]:[&>input]:pb-space-lg has-[>[data-align=inline-end]]:[&>input]:pe-space-sm has-[>[data-align=inline-start]]:[&>input]:ps-space-sm [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto\",\n fieldStateRecipes.groupFocus,\n fieldStateRecipes.groupInvalid,\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"text-muted-foreground h-auto gap-space-md py-space-sm text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-inner [&>svg:not([class*='size-'])]:size-icon flex cursor-text items-center justify-center select-none\",\n {\n variants: {\n align: {\n \"inline-start\": \"ps-control has-[>button]:-ms-space-xs has-[>kbd]:-ms-space-2xs order-first\",\n \"inline-end\": \"pe-control has-[>button]:-me-space-xs has-[>kbd]:-me-space-2xs order-last\",\n \"block-start\":\n \"px-control pt-space-md group-has-[>input]/input-group:pt-space-md [.border-b]:pb-space-md order-first w-full justify-start\",\n \"block-end\":\n \"px-control pb-space-md group-has-[>input]/input-group:pb-space-md [.border-t]:pt-space-md order-last w-full justify-start\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"gap-space-md text-sm shadow-none flex items-center\",\n {\n variants: {\n size: {\n xs: \"h-action-xs gap-space-xs rounded-inner px-control-xs [&>svg:not([class*='size-'])]:size-icon-sm\",\n sm: \"\",\n \"icon-xs\": \"size-action-xs rounded-inner p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-action-sm p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\" | \"type\"> &\n VariantProps<typeof inputGroupButtonVariants> & {\n type?: \"button\" | \"submit\" | \"reset\"\n }) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"text-muted-foreground gap-space-md text-sm [&_svg:not([class*='size-'])]:size-icon flex items-center [&_svg]:pointer-events-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<\"input\">) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\"rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 flex-1\", className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<\"textarea\">) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\"rounded-none border-0 bg-transparent py-space-md shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 flex-1 resize-none\", className)}\n {...props}\n />\n )\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n","/**\n * InputGroup — base wrapper around the shadcn `ui/input-group` primitive.\n *\n * What this layer adds on top of the primitive:\n * - Stable BEM hooks on every wrapped part's outermost node\n * (`input-group--component`, `input-group-addon--component`, and so on).\n * - Design-system typography for the scalar copy inside `InputGroupText`,\n * while arbitrary `ReactNode` content (icons, `kbd`, buttons) passes through\n * untouched so the compound pattern stays composable.\n * - Keeps the primitive's addon alignment and button-size variants, its\n * focus-within/aria-invalid ring behaviour, and every native prop by spread.\n *\n * Compose it as\n * `<InputGroup><InputGroupAddon><Icon/></InputGroupAddon><InputGroupInput/></InputGroup>`.\n *\n * Reach for it when one control needs inline affordances welded to its frame —\n * a search icon, a unit suffix, a busy indicator, an inline action. For the\n * label / control / hint / error row, use `FormField` instead; this wrapper\n * owns only the control frame.\n */\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport {\n\tInputGroup as InputGroupPrimitive,\n\tInputGroupAddon as InputGroupAddonPrimitive,\n\tInputGroupInput as InputGroupInputPrimitive,\n\tInputGroupText as InputGroupTextPrimitive,\n\tInputGroupTextarea as InputGroupTextareaPrimitive,\n} from '../../ui/input-group';\nimport { Button, type ButtonProps } from '../buttons';\nimport { Text } from '../../typography';\nimport { useDensityConfig, type ComponentScale } from '../../../lib/ui-provider';\nimport { editableTextSizeClasses } from '../../../lib/editable-text-recipe';\nimport { cn } from '../../../lib/utils';\nimport {\n\tformControlHeightClasses,\n\tformControlHorizontalPaddingClasses,\n\tformControlPaddingClasses,\n\tformTextareaSizeClasses,\n\tresolveFormControlSize,\n} from '../forms/form-sizing';\n\nexport type InputGroupProps = ComponentProps<typeof InputGroupPrimitive>;\nexport type InputGroupAddonProps = ComponentProps<typeof InputGroupAddonPrimitive>;\nexport interface InputGroupButtonProps extends Omit<ButtonProps, 'size'> {\n\t/** Component scale. Falls back to `UIProvider.density.defaultScale`. */\n\tsize?: ComponentScale;\n}\nexport type InputGroupInputProps = ComponentProps<typeof InputGroupInputPrimitive>;\nexport type InputGroupTextProps = ComponentProps<typeof InputGroupTextPrimitive>;\nexport type InputGroupTextareaProps = ComponentProps<typeof InputGroupTextareaPrimitive>;\n\nfunction useInputGroupScale() {\n\tconst { defaultScale } = useDensityConfig();\n\treturn resolveFormControlSize(undefined, defaultScale);\n}\n\n/** Control frame that welds inline addons onto a single input or textarea. */\nfunction InputGroup({ className, ...props }: InputGroupProps) {\n\tconst size = useInputGroupScale();\n\treturn (\n\t\t<InputGroupPrimitive\n\t\t\tclassName={cn(\n\t\t\t\t'input-group--component box-border rounded-inner font-sans text-foreground shadow-none',\n\t\t\t\tformControlHeightClasses[size],\n\t\t\t\teditableTextSizeClasses[size],\n\t\t\t\t'has-[>[data-align=block-end]]:[&>input]:pt-space-lg has-[>[data-align=block-start]]:[&>input]:pb-space-lg',\n\t\t\t\t'has-[>[data-align=inline-end]]:[&>input]:pe-space-sm has-[>[data-align=inline-start]]:[&>input]:ps-space-sm',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst addonAlignmentClasses = {\n\t'inline-start': 'h-full py-0',\n\t'inline-end': 'h-full py-0',\n\t'block-start': 'pt-space-md group-has-[>input]/input-group:pt-space-md [.border-b]:pb-space-md',\n\t'block-end': 'pb-space-md group-has-[>input]/input-group:pb-space-md [.border-t]:pt-space-md',\n} as const;\n\nconst addonInlinePaddingClasses = {\n\tsm: { 'inline-start': 'ps-control-sm', 'inline-end': 'pe-control-sm' },\n\tmd: { 'inline-start': 'ps-control', 'inline-end': 'pe-control' },\n\tlg: { 'inline-start': 'ps-control', 'inline-end': 'pe-control' },\n} as const;\n\nconst addonIconClasses = {\n\tsm: \"[&>svg:not([class*='size-'])]:size-icon-sm\",\n\tmd: \"[&>svg:not([class*='size-'])]:size-icon\",\n\tlg: \"[&>svg:not([class*='size-'])]:size-icon-lg\",\n} as const;\n\n/** Leading/trailing (or block start/end) affordance slot inside the frame. */\nfunction InputGroupAddon({ className, align = 'inline-start', ...props }: InputGroupAddonProps) {\n\tconst size = useInputGroupScale();\n\tconst alignment = align ?? 'inline-start';\n\treturn (\n\t\t<InputGroupAddonPrimitive\n\t\t\talign={align}\n\t\t\tclassName={cn(\n\t\t\t\t'input-group-addon--component box-border gap-space-md py-space-sm',\n\t\t\t\taddonIconClasses[size],\n\t\t\t\taddonAlignmentClasses[alignment],\n\t\t\t\talignment === 'inline-start' || alignment === 'inline-end'\n\t\t\t\t\t? addonInlinePaddingClasses[size][alignment]\n\t\t\t\t\t: formControlHorizontalPaddingClasses[size],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/** Inline action button sized to sit inside the control frame; its label stays on one line. */\nfunction InputGroupButton({\n\tclassName,\n\ttone = 'secondary',\n\tbuttonStyle = 'ghost',\n\ttruncate = true,\n\ticonOnly,\n\t...props\n}: InputGroupButtonProps) {\n\treturn (\n\t\t<Button\n\t\t\ttone={tone}\n\t\t\tbuttonStyle={buttonStyle}\n\t\t\ttruncate={truncate}\n\t\t\ticonOnly={iconOnly}\n\t\t\tclassName={cn(\n\t\t\t\t'input-group-button--component max-h-full shadow-none',\n\t\t\t\t// Text actions fit the inner frame. Icon actions retain their own\n\t\t\t\t// height and derive a square width after the frame caps that height.\n\t\t\t\t// Block/footer actions keep their natural Button geometry.\n\t\t\t\ticonOnly\n\t\t\t\t\t? 'in-[[data-align=inline-start]]:w-auto in-[[data-align=inline-start]]:aspect-square in-[[data-align=inline-end]]:w-auto in-[[data-align=inline-end]]:aspect-square'\n\t\t\t\t\t: 'in-[[data-align=inline-start]]:h-full in-[[data-align=inline-start]]:min-h-0 in-[[data-align=inline-end]]:h-full in-[[data-align=inline-end]]:min-h-0',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction isScalarContent(content: ReactNode): content is string | number | bigint {\n\treturn typeof content === 'string' || typeof content === 'number' || typeof content === 'bigint';\n}\n\n/** Static copy segment — scalar text renders through Typography. */\nfunction InputGroupText({ children, className, ...props }: InputGroupTextProps) {\n\treturn (\n\t\t<InputGroupTextPrimitive\n\t\t\tclassName={cn('input-group-text--component gap-space-md [&_svg:not([class*=\\'size-\\'])]:size-icon', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isScalarContent(children) ? (\n\t\t\t\t<Text tag=\"span\" size=\"inherit\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</InputGroupTextPrimitive>\n\t);\n}\n\n/** Single-line control that inherits the group's frame instead of its own. */\nfunction InputGroupInput({ className, ...props }: InputGroupInputProps) {\n\tconst size = useInputGroupScale();\n\treturn (\n\t\t<InputGroupInputPrimitive\n\t\t\tclassName={cn(\n\t\t\t\t// Inline frames grow for their shared editable line and clamp the\n\t\t\t\t// borderless input to the resulting content box.\n\t\t\t\t// Auto-height block compositions retain the shared control height.\n\t\t\t\t'input-group-input--component box-border max-h-full font-sans text-foreground',\n\t\t\t\tformControlHeightClasses[size],\n\t\t\t\t// The group owns the border; its native editor needs only its line.\n\t\t\t\t'min-h-lh',\n\t\t\t\tformControlPaddingClasses[size],\n\t\t\t\teditableTextSizeClasses[size],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/** Multi-line control that inherits the group's frame instead of its own. */\nfunction InputGroupTextarea({ className, ...props }: InputGroupTextareaProps) {\n\tconst size = useInputGroupScale();\n\treturn (\n\t\t<InputGroupTextareaPrimitive\n\t\t\tclassName={cn(\n\t\t\t\t'input-group-textarea--component box-border py-space-md',\n\t\t\t\tformTextareaSizeClasses[size],\n\t\t\t\tformControlHorizontalPaddingClasses[size],\n\t\t\t\teditableTextSizeClasses[size],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tInputGroup,\n\tInputGroupAddon,\n\tInputGroupButton,\n\tInputGroupInput,\n\tInputGroupText,\n\tInputGroupTextarea,\n};\n","import { Eye, EyeOff } from 'lucide-react';\nimport * as React from 'react';\n\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { Input, type InputProps } from './input';\nimport { InputTrailingActionContext } from './input-trailing-action';\nimport { fieldAffordanceRecipes } from '../../../lib/field-affordance-recipes';\n\nexport interface PasswordInputStrings {\n\tshowPassword: string;\n\thidePassword: string;\n}\n\nexport const defaultPasswordInputStrings: PasswordInputStrings = {\n\tshowPassword: 'Show password',\n\thidePassword: 'Hide password',\n};\n\nexport interface PasswordInputProps extends Omit<InputProps, 'type' | 'endIcon' | 'strings'> {\n\t/** Whether the value is revealed. Controlled. */\n\tvisible?: boolean;\n\t/** Whether the value starts revealed, for uncontrolled use. */\n\tdefaultVisible?: boolean;\n\t/** Fired whenever the reveal state changes. */\n\tonVisibleChange?: (visible: boolean) => void;\n\t/** Shows the reveal toggle. Turn it off for fields that must stay masked. */\n\trevealable?: boolean;\n\t/** Merged onto the field wrapper, outside the input frame. */\n\twrapperClassName?: string;\n\t/** Merged onto the reveal toggle. */\n\tvisibilityButtonClassName?: string;\n\t/** Copy overrides forwarded to the underlying text input. */\n\tinputStrings?: InputProps['strings'];\n\t/** Overrides the show/hide accessible names. */\n\tstrings?: StringsProp<PasswordInputStrings>;\n}\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, PasswordInputProps>(\n\tfunction PasswordInput(\n\t\t{\n\t\t\tvisible,\n\t\t\tdefaultVisible = false,\n\t\t\tonVisibleChange,\n\t\t\trevealable = true,\n\t\t\twrapperClassName,\n\t\t\tvisibilityButtonClassName,\n\t\t\tclassName,\n\t\t\tdisabled,\n\t\t\tloading,\n\t\t\tinputStrings,\n\t\t\tstrings: stringsProp,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\n\t\tconst strings = useStrings(defaultPasswordInputStrings, stringsProp);\n\t\tconst [internalVisible, setInternalVisible] = React.useState(defaultVisible);\n\t\tconst isControlled = visible !== undefined;\n\t\tconst isVisible = isControlled ? visible : internalVisible;\n\t\tconst disabledState = disabled || loading;\n\n\t\tconst toggleVisibility = React.useCallback(() => {\n\t\t\tconst nextVisible = !isVisible;\n\t\t\tif (!isControlled) {\n\t\t\t\tsetInternalVisible(nextVisible);\n\t\t\t}\n\t\t\tonVisibleChange?.(nextVisible);\n\t\t}, [isControlled, isVisible, onVisibleChange]);\n\n\t\tconst visibilityAction = revealable ? (\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclassName={cn('password-input--toggle', fieldAffordanceRecipes.target, fieldAffordanceRecipes.focus, fieldAffordanceRecipes.toggle, visibilityButtonClassName)}\n\t\t\t\taria-label={isVisible ? strings.hidePassword : strings.showPassword}\n\t\t\t\taria-pressed={isVisible}\n\t\t\t\tdisabled={disabledState}\n\t\t\t\tonMouseDown={(event) => event.preventDefault()}\n\t\t\t\tonClick={toggleVisibility}\n\t\t\t>\n\t\t\t\t{isVisible ? <EyeOff className={fieldAffordanceRecipes.icon} aria-hidden=\"true\" /> : <Eye className={fieldAffordanceRecipes.icon} aria-hidden=\"true\" />}\n\t\t\t</button>\n\t\t) : null;\n\n\t\treturn (\n\t\t\t<div className={cn('password-input--component', 'relative', wrapperClassName)}>\n\t\t\t\t<InputTrailingActionContext.Provider value={visibilityAction}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\ttype={isVisible ? 'text' : 'password'}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tloading={loading}\n\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t\tstrings={inputStrings}\n\t\t\t\t\t/>\n\t\t\t\t</InputTrailingActionContext.Provider>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nPasswordInput.displayName = 'PasswordInput';\n\nexport { PasswordInput };\n","import * as React from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nimport { Input, type InputProps } from './input';\n\nexport interface SlugifyValueOptions {\n\t/** Character joining words in the generated slug. Default: `-`. */\n\tseparator?: string;\n\t/** Lowercases the generated slug. */\n\tlowercase?: boolean;\n\t/** Strips leading and trailing separators. */\n\ttrim?: boolean;\n}\n\nexport function slugifyValue(\n\tvalue: string | number | null | undefined,\n\t{\n\t\tseparator = '-',\n\t\tlowercase = true,\n\t\ttrim = true,\n\t}: SlugifyValueOptions = {},\n) {\n\tconst safeSeparator = separator || '-';\n\tconst escapedSeparator = safeSeparator.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\tlet normalized = String(value ?? '')\n\t\t.normalize('NFKD')\n\t\t.replace(/[\\u0300-\\u036f]/g, '')\n\t\t.replace(/&/g, ' and ')\n\t\t.replace(/['’]/g, '');\n\n\tif (lowercase) {\n\t\tnormalized = normalized.toLowerCase();\n\t}\n\n\tnormalized = normalized\n\t\t.replace(/[^\\p{Letter}\\p{Number}]+/gu, safeSeparator)\n\t\t.replace(new RegExp(`${escapedSeparator}{2,}`, 'g'), safeSeparator);\n\n\tif (trim) {\n\t\tnormalized = normalized.replace(new RegExp(`^${escapedSeparator}|${escapedSeparator}$`, 'g'), '');\n\t}\n\n\treturn normalized;\n}\n\nexport interface SlugFieldProps\n\textends Omit<\n\t\tInputProps,\n\t\t'value' | 'defaultValue' | 'onChange' | 'readOnly' | 'type'\n\t>,\n\t\tSlugifyValueOptions {\n\t/** Current slug. Controlled. */\n\tvalue: string | number | null | undefined;\n\t/** Replaces the built-in slug derivation entirely. */\n\tslugify?: (value: string | number | null | undefined) => string;\n\t/** Merged onto the field wrapper, outside the input frame. */\n\twrapperClassName?: string;\n}\n\nconst SlugField = React.forwardRef<HTMLInputElement, SlugFieldProps>(\n\tfunction SlugField(\n\t\t{\n\t\t\tvalue,\n\t\t\tslugify,\n\t\t\tseparator = '-',\n\t\t\tlowercase = true,\n\t\t\ttrim = true,\n\t\t\twrapperClassName,\n\t\t\tclassName,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\n\t\tconst slug = React.useMemo(\n\t\t\t() => slugify?.(value) ?? slugifyValue(value, { separator, lowercase, trim }),\n\t\t\t[lowercase, separator, slugify, trim, value],\n\t\t);\n\n\t\treturn (\n\t\t\t<div className={cn('slug-field--component', wrapperClassName)}>\n\t\t\t\t<Input\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tvalue={slug}\n\t\t\t\t\treadOnly\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nSlugField.displayName = 'SlugField';\n\nexport { SlugField };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,IAAaqC,KAA0C,EACrD,OAAO,iBACT,GAuQMrC,IAAWC,EAAM,YAzNrB,EACE,cACA,cACA,uBACA,cACA,YACA,aAAU,IACV,YACA,MAAMsC,GACN,gBAAa,IACb,aAAU,GACV,YACA,aACA,OAAOC,GACP,iBACA,IAAIC,GACJ,SAASC,GACT,GAAGC,KAEL,MACG;CACH,IAAMC,IAAcC,EAA4B,IAAI,GAC9CC,IAAUC,EAAWV,IAAwBK,CAAW,GACxD,EAAE,oBAAiB3B,EAAiB,GACpCiC,IAAOnB,EAAuBU,GAAUU,CAAY,GAGpD,EACJ,OACA,OAAOC,GACP,oBACA,mBACA,sBACA,cACA,aACA,gBACA,wBACElB,EAAkB;EACpB;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,aAAamB,MAAa,KAAA;CAC5B,C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;EACX,CAAA;CACG,CAAA;AAEP,CACD;AAEA,EAAU,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.styles-g4He6UIW.js","names":["textTypes","textSizes","headingSizes","textWeights","textAlignments","textLineHeights","textVariants","cva","resolveTextClassNames","options"],"sources":["../src/components/typography/text.styles.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n/**\n * Text roles. `inherit` keeps the surrounding text's role: an inline span inside\n * a sentence takes its colour, weight or leading instead of resetting them. Colour\n * uses an explicit inherit utility because anchors otherwise fall back to the\n * browser link colour without preflight; weight and leading emit no class.\n */\nexport const textTypes = {\n main: 'text-foreground', inverse: 'text-inverse-foreground',\n secondary: 'text-muted-foreground', discrete: 'text-muted-foreground',\n error: 'text-destructive', success: 'text-success', primary: 'text-primary-accent',\n inherit: 'text-inherit',\n} as const;\nexport const textSizes = {\n inherit: '[font-size:inherit]', xxs: 'text-xxs', xs: 'text-xs', pxs: 'text-pxs',\n sm: 'text-sm', base: 'text-base', lg: 'text-lg', xl: 'text-xl',\n} as const;\n/**\n * Semantic heading level is independent of visual emphasis. No additional theme\n * roots: compact admin sizes keep snug leading; display sizes (xl and up) tighten\n * tracking and 2xl and up tighten leading so multi-line titles stay one block.\n */\nexport const headingSizes = {\n sm: 'text-sm leading-snug', base: 'text-base leading-snug', lg: 'text-lg leading-snug',\n xl: 'text-xl leading-snug tracking-tight', '2xl': 'text-2xl leading-tight tracking-tight',\n '3xl': 'text-3xl leading-tight tracking-tight', '4xl': 'text-4xl leading-tight tracking-tight',\n} as const;\nexport const textWeights = {normal: 'font-normal', regular: 'font-normal', medium: 'font-medium', semibold: 'font-semibold', bold: 'font-bold', inherit: ''} as const;\n/**\n * `left` and `right` follow the reading direction (start and end), so default\n * text and right-aligned figures mirror correctly under `dir=\"rtl\"`.\n */\nexport const textAlignments = {left: 'text-start', center: 'text-center', right: 'text-end'} as const;\nexport const textLineHeights = {normal: 'leading-normal', relaxed: 'leading-relaxed', loose: 'leading-loose', tight: 'leading-tight', snug: 'leading-snug', none: 'leading-none', inherit: ''} as const;\n\n/**\n * `numeric` is the monospace treatment for identifiers and code-like values\n * (`font-mono tabular-nums`). Numbers, amounts, dates and durations use the\n * number primitives, which keep the sans UI font with tabular figures.\n */\nexport const textVariants = cva('m-0 font-sans', {\n variants: {type: textTypes, size: textSizes, weight: textWeights, align: textAlignments, lineHeight: textLineHeights, numeric: {true: 'font-mono tabular-nums', false: ''}},\n defaultVariants: {type: 'main', size: 'sm', weight: 'regular', align: 'left', lineHeight: 'normal', numeric: false},\n});\n\nexport function resolveTextClassNames(options: Parameters<typeof textVariants>[0] & {className?: string}): string {\n return textVariants(options);\n}\n"],"mappings":";;AAQA,IAAaA,IAAY;CACvB,MAAM;CAAmB,SAAS;CAClC,WAAW;CAAyB,UAAU;CAC9C,OAAO;CAAoB,SAAS;CAAgB,SAAS;CAC7D,SAAS;AACX,GACaC,IAAY;CACvB,SAAS;CAAuB,KAAK;CAAY,IAAI;CAAW,KAAK;CACrE,IAAI;CAAW,MAAM;CAAa,IAAI;CAAW,IAAI;AACvD,GAMaC,IAAe;CAC1B,IAAI;CAAwB,MAAM;CAA0B,IAAI;CAChE,IAAI;CAAuC,OAAO;CAClD,OAAO;CAAyC,OAAO;AACzD,GACaC,IAAc;CAAC,QAAQ;CAAe,SAAS;CAAe,QAAQ;CAAe,UAAU;CAAiB,MAAM;CAAa,SAAS;AAAE,GAK9IC,IAAiB;CAAC,MAAM;CAAc,QAAQ;CAAe,OAAO;AAAU,GAC9EC,IAAkB;CAAC,QAAQ;CAAkB,SAAS;CAAmB,OAAO;CAAiB,OAAO;CAAiB,MAAM;CAAgB,MAAM;CAAgB,SAAS;AAAE,GAOhLC,IAAeC,EAAI,iBAAiB;CAC/C,UAAU;EAAC,MAAMP;EAAW,MAAMC;EAAW,QAAQE;EAAa,OAAOC;EAAgB,YAAYC;EAAiB,SAAS;GAAC,MAAM;GAA0B,OAAO;EAAE;CAAC;CAC1K,iBAAiB;EAAC,MAAM;EAAQ,MAAM;EAAM,QAAQ;EAAW,OAAO;EAAQ,YAAY;EAAU,SAAS;CAAK;AACpH,CAAC;AAED,SAAgBG,EAAsB,GAA4E;CAChH,OAAOF,EAAaG,CAAO;AAC7B"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { m as e, s as t, v as n } from "./ui-provider-C_U0Xma4.js";
|
|
3
|
-
import { t as r } from "./utils-BRhFDwuU.js";
|
|
4
|
-
import { o as i, r as a, t as o } from "./text.styles-g4He6UIW.js";
|
|
5
|
-
import { t as s } from "./focus-recipes-B653VaLq.js";
|
|
6
|
-
import { createContext as c, forwardRef as l, useContext as u } from "react";
|
|
7
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
-
//#region src/components/typography/running-text.ts
|
|
9
|
-
var p = c(!1);
|
|
10
|
-
function m() {
|
|
11
|
-
return u(p);
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/components/typography/text.tsx
|
|
15
|
-
var h = l(function({ content: t, children: n, type: a = "main", size: o, weight: s, align: c, lineHeight: l, numeric: u, invert: f = !1, tag: m = "p", className: h, ...g }, _) {
|
|
16
|
-
let { defaultTextSize: v } = e(), y = n ?? t;
|
|
17
|
-
return y == null || y === "" ? null : /* @__PURE__ */ d(m, {
|
|
18
|
-
"data-typography": "text",
|
|
19
|
-
...g,
|
|
20
|
-
ref: _,
|
|
21
|
-
className: r("text--component", i({
|
|
22
|
-
type: f ? "inverse" : a,
|
|
23
|
-
size: o ?? v,
|
|
24
|
-
weight: s,
|
|
25
|
-
align: c,
|
|
26
|
-
lineHeight: l,
|
|
27
|
-
numeric: u
|
|
28
|
-
}), h),
|
|
29
|
-
children: /* @__PURE__ */ d(p.Provider, {
|
|
30
|
-
value: !0,
|
|
31
|
-
children: y
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/components/typography/heading.tsx
|
|
37
|
-
function g({ tag: e = "h3", size: t = "base", subHeading: n, subHeadingClassName: i, subHeadingSize: s, containerClassName: c, align: l = "left", divider: u = !1, className: m, children: g, ref: _, ...v }) {
|
|
38
|
-
return /* @__PURE__ */ f("div", {
|
|
39
|
-
className: r("heading--component flex min-w-0 flex-col gap-dense", a[l], c),
|
|
40
|
-
children: [g != null && /* @__PURE__ */ d(e, {
|
|
41
|
-
...v,
|
|
42
|
-
ref: _,
|
|
43
|
-
"data-typography": "heading",
|
|
44
|
-
className: r("heading--title m-0 font-heading", o[t], "font-semibold text-foreground text-balance break-words", a[l], u && "border-b border-border pb-space-md", m),
|
|
45
|
-
children: /* @__PURE__ */ d(p.Provider, {
|
|
46
|
-
value: !0,
|
|
47
|
-
children: g
|
|
48
|
-
})
|
|
49
|
-
}), n != null && /* @__PURE__ */ d(h, {
|
|
50
|
-
type: "secondary",
|
|
51
|
-
size: s,
|
|
52
|
-
align: l,
|
|
53
|
-
className: i,
|
|
54
|
-
children: n
|
|
55
|
-
})]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/components/typography/display-label.tsx
|
|
60
|
-
function _({ tag: e = "span", tone: t = "default", className: n, ...i }) {
|
|
61
|
-
return /* @__PURE__ */ d(h, {
|
|
62
|
-
...i,
|
|
63
|
-
tag: e,
|
|
64
|
-
size: "sm",
|
|
65
|
-
type: "main",
|
|
66
|
-
weight: "medium",
|
|
67
|
-
lineHeight: "tight",
|
|
68
|
-
"data-typography": "display-label",
|
|
69
|
-
className: r("display-label--component", t === "inverse" && "text-inverse-muted", n)
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/components/typography/label.tsx
|
|
74
|
-
var v = {
|
|
75
|
-
sm: "text-xs",
|
|
76
|
-
md: "text-sm",
|
|
77
|
-
lg: "text-base"
|
|
78
|
-
};
|
|
79
|
-
function y({ content: e, children: i, size: a, className: o, ref: s, ...c }) {
|
|
80
|
-
let { defaultScale: l } = t();
|
|
81
|
-
return /* @__PURE__ */ d("label", {
|
|
82
|
-
...c,
|
|
83
|
-
ref: s,
|
|
84
|
-
"data-typography": "label",
|
|
85
|
-
className: r("label--component font-sans font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50", v[n(a, l)], o),
|
|
86
|
-
children: /* @__PURE__ */ d(p.Provider, {
|
|
87
|
-
value: !0,
|
|
88
|
-
children: i ?? e
|
|
89
|
-
})
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/components/typography/text-link.tsx
|
|
94
|
-
var b = `w-fit max-w-full rounded-radius-xs outline-none box-decoration-clone transition-colors motion-reduce:transition-none ${s.text}`, x = "underline decoration-current underline-offset-[0.2em]", S = "[&_a]:w-fit [&_a]:max-w-full [&_a]:rounded-radius-xs [&_a]:outline-none [&_a]:box-decoration-clone [&_a]:transition-colors motion-reduce:[&_a]:transition-none [&_a]:text-inherit [&_a]:underline [&_a]:decoration-current [&_a]:underline-offset-[0.2em] [&_a:hover]:decoration-transparent [&_a:focus-visible]:outline-solid [&_a:focus-visible]:outline-1 [&_a:focus-visible]:outline-offset-0 [&_a:focus-visible]:outline-ring [&_a:focus-visible]:ring-3 [&_a:focus-visible]:ring-ring/50";
|
|
95
|
-
function C({ type: t = "main", size: n, weight: a, align: o, lineHeight: s, underline: c = !0, className: l, ref: u, children: f, ...h }) {
|
|
96
|
-
let { defaultTextSize: g } = e(), _ = m();
|
|
97
|
-
return /* @__PURE__ */ d("a", {
|
|
98
|
-
...h,
|
|
99
|
-
ref: u,
|
|
100
|
-
"data-typography": "link",
|
|
101
|
-
className: r("text-link--component", b, i({
|
|
102
|
-
type: t,
|
|
103
|
-
size: n ?? (_ ? "inherit" : g),
|
|
104
|
-
weight: a ?? (_ ? "inherit" : void 0),
|
|
105
|
-
align: o,
|
|
106
|
-
lineHeight: s ?? (_ ? "inherit" : void 0)
|
|
107
|
-
}), c ? `${x} hover:decoration-transparent` : "no-underline", l),
|
|
108
|
-
children: /* @__PURE__ */ d(p.Provider, {
|
|
109
|
-
value: !0,
|
|
110
|
-
children: f
|
|
111
|
-
})
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
//#endregion
|
|
115
|
-
export { y as a, h as c, x as i, p as l, S as n, _ as o, b as r, g as s, C as t, m as u };
|
|
116
|
-
|
|
117
|
-
//# sourceMappingURL=typography-UTnveOEy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typography-UTnveOEy.js","names":["useTypographyConfig","useDensityConfig","resolveComponentScale","cn","textVariants","textAlignments","headingSizes","focusRecipes","RunningTextContext","createContext","useInRunningText","useContext","Text","forwardRef","Tag","props","value","children","content","invert","type","size","defaultTextSize","className","Heading","align","containerClassName","divider","subHeading","subHeadingSize","subHeadingClassName","DisplayLabel","tone","sizes","Label","defaultScale","inlineLinkClassName","linkUnderlineClassName","descendantInlineLinkClassName","TextLink","inText","weight","lineHeight","underline"],"sources":["../src/components/typography/running-text.ts","../src/components/typography/text.tsx","../src/components/typography/heading.tsx","../src/components/typography/display-label.tsx","../src/components/typography/label.tsx","../src/components/typography/text-link.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\n/**\n * True below an element that renders running text: `Text`, `Heading`,\n * `DisplayLabel`, `Label`, `TextLink` and the inline value primitives.\n *\n * Inline value primitives read it to tell a value inside a sentence from a\n * standalone value. Inside running text their unset size, colour, weight and\n * leading inherit from the surrounding text; standalone values keep their role\n * defaults. Explicit props always win.\n */\nexport const RunningTextContext = createContext(false);\n\n/** Whether the caller renders inside running text owned by a typography role. */\nexport function useInRunningText(): boolean {\n\treturn useContext(RunningTextContext);\n}\n","import { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from 'react';\nimport { useTypographyConfig, type TextSize } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext } from './running-text';\nimport { textVariants, type textTypes, type textWeights, type textAlignments, type textLineHeights } from './text.styles';\n\nexport interface TextProps extends Omit<ComponentPropsWithoutRef<'p'>, 'children'> {\n /** Plain text fallback; children take precedence, including zero and empty strings. */\n content?: string;\n children?: ReactNode;\n /** Colour role. Defaults to `main`; `inherit` keeps the surrounding text colour. */\n type?: keyof typeof textTypes;\n /** Text size. Defaults to the provider `typography.defaultTextSize` (`sm`). */\n size?: TextSize;\n /** Font weight. Defaults to `regular`; `inherit` keeps the surrounding weight. */\n weight?: keyof typeof textWeights;\n /** Text alignment. Defaults to `left`; `left` and `right` follow the reading direction. */\n align?: keyof typeof textAlignments;\n /** Line height. Defaults to `normal`; `inherit` keeps the surrounding leading. */\n lineHeight?: keyof typeof textLineHeights;\n /** Renders the inverse colour role on inverse surfaces. Defaults to `false`. */\n invert?: boolean;\n /**\n * Monospace with tabular figures, for identifiers and code-like values. Numbers,\n * amounts and dates use the number primitives (tabular sans figures) instead.\n * Defaults to `false`.\n */\n numeric?: boolean;\n /** Rendered element. Defaults to `p`. */\n tag?: 'div' | 'p' | 'span';\n}\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text({\n content, children, type = 'main', size, weight, align, lineHeight,\n numeric, invert = false, tag: Tag = 'p', className, ...props\n}, ref) {\n const {defaultTextSize} = useTypographyConfig();\n const value = children ?? content;\n if (value === undefined || value === null || value === '') return null;\n return <Tag data-typography=\"text\" {...props} ref={ref as never} className={cn('text--component', textVariants({type: invert ? 'inverse' : type, size: size ?? defaultTextSize, weight, align, lineHeight, numeric}), className)}>\n <RunningTextContext.Provider value>{value}</RunningTextContext.Provider>\n </Tag>;\n});\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext } from './running-text';\nimport { headingSizes, textAlignments } from './text.styles';\nimport { Text } from './text';\n\nexport type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\nexport type HeadingSize = keyof typeof headingSizes;\nexport interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n ref?: Ref<HTMLHeadingElement>;\n /** Semantic outline level. Defaults to `h3`; it never changes the visual size. */\n tag?: HeadingTag;\n /**\n * Visual emphasis, independent of `tag`. Defaults to the compact admin `base`.\n * `xl` and larger tighten tracking; `2xl` and larger also tighten leading.\n */\n size?: HeadingSize;\n /** Secondary line under the title, rendered as secondary `Text`. */\n subHeading?: ReactNode;\n subHeadingClassName?: string;\n /** Text size of `subHeading`; defaults to the provider text size. */\n subHeadingSize?: TextSize;\n containerClassName?: string;\n /** Text alignment for the title and sub-heading. Defaults to `left`. */\n align?: keyof typeof textAlignments;\n /** Adds a bottom rule under the title. Defaults to `false`. */\n divider?: boolean;\n}\n\n/** Semantic heading levels share Themelia's restrained admin heading scale. */\nexport function Heading({tag: Tag = 'h3', size = 'base', subHeading, subHeadingClassName, subHeadingSize, containerClassName, align = 'left', divider = false, className, children, ref, ...props}: HeadingProps) {\n return <div className={cn('heading--component flex min-w-0 flex-col gap-dense', textAlignments[align], containerClassName)}>\n {children != null && <Tag {...props} ref={ref} data-typography=\"heading\" className={cn('heading--title m-0 font-heading', headingSizes[size], 'font-semibold text-foreground text-balance break-words', textAlignments[align], divider && 'border-b border-border pb-space-md', className)}><RunningTextContext.Provider value>{children}</RunningTextContext.Provider></Tag>}\n {subHeading != null && <Text type=\"secondary\" size={subHeadingSize} align={align} className={subHeadingClassName}>{subHeading}</Text>}\n </div>;\n}\n","import { Text, type TextProps } from './text';\nimport { cn } from '../../lib/utils';\n\nexport interface DisplayLabelProps extends Omit<TextProps, 'size' | 'type' | 'weight' | 'lineHeight'> {tone?: 'default' | 'inverse'}\nexport function DisplayLabel({tag = 'span', tone = 'default', className, ...props}: DisplayLabelProps) {\n return <Text {...props} tag={tag} size=\"sm\" type=\"main\" weight=\"medium\" lineHeight=\"tight\" data-typography=\"display-label\" className={cn('display-label--component', tone === 'inverse' && 'text-inverse-muted', className)} />;\n}\n","import type { LabelHTMLAttributes, ReactNode, Ref } from 'react';\nimport type { ComponentScale } from '../../lib/component-vocabulary';\nimport { useDensityConfig } from '../../lib/ui-provider';\nimport { resolveComponentScale } from '../../lib/ui-provider/scale';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext } from './running-text';\n\nexport interface LabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'content'> {\n /** Fallback content; children take precedence. */\n content?: ReactNode;\n /** Control scale the caption belongs to (`sm` → xs, `md` → sm, `lg` → base). Defaults to the provider density scale. */\n size?: ComponentScale;\n ref?: Ref<HTMLLabelElement>;\n}\nconst sizes = {sm: 'text-xs', md: 'text-sm', lg: 'text-base'} as const;\n/** Form caption for a control; medium weight, foreground, no incidental margins. */\nexport function Label({content, children, size, className, ref, ...props}: LabelProps) {\n const {defaultScale} = useDensityConfig();\n return <label {...props} ref={ref} data-typography=\"label\" className={cn('label--component font-sans font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50', sizes[resolveComponentScale(size, defaultScale)], className)}>\n <RunningTextContext.Provider value>{children ?? content}</RunningTextContext.Provider>\n </label>;\n}\n","import type { AnchorHTMLAttributes, Ref } from 'react';\nimport { useTypographyConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\nimport { RunningTextContext, useInRunningText } from './running-text';\nimport { textVariants } from './text.styles';\nimport type { TextProps } from './text';\nimport { focusRecipes } from '../../lib/focus-recipes';\n\n/**\n * Inline-link mechanics shared by `TextLink` and the link primitives. As a flex\n * or grid item the link hugs its text, so neither the hit area nor the focus\n * ring stretches across the row. The shared focus edge sits just outside the\n * glyphs inside the soft halo, uses the small radius role and follows every line\n * of a wrapped link. Links keep one colour whether\n * or not they were visited: the role colour is explicit.\n */\nexport const inlineLinkClassName = `w-fit max-w-full rounded-radius-xs outline-none box-decoration-clone transition-colors motion-reduce:transition-none ${focusRecipes.text}`;\n\n/** Underline geometry shared with content links: proportional to the text size. */\nexport const linkUnderlineClassName = 'underline decoration-current underline-offset-[0.2em]';\n\n/** Private counterpart for native anchors inside package-owned copy regions.\n * Keep selectors literal for the standalone stylesheet. These anchors inherit\n * the region's colour and follow TextLink's focus and underline mechanics. */\nexport const descendantInlineLinkClassName = '[&_a]:w-fit [&_a]:max-w-full [&_a]:rounded-radius-xs [&_a]:outline-none [&_a]:box-decoration-clone [&_a]:transition-colors motion-reduce:[&_a]:transition-none [&_a]:text-inherit [&_a]:underline [&_a]:decoration-current [&_a]:underline-offset-[0.2em] [&_a:hover]:decoration-transparent [&_a:focus-visible]:outline-solid [&_a:focus-visible]:outline-1 [&_a:focus-visible]:outline-offset-0 [&_a:focus-visible]:outline-ring [&_a:focus-visible]:ring-3 [&_a:focus-visible]:ring-ring/50';\n\nexport interface TextLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'type'>, Pick<TextProps, 'type' | 'size' | 'weight' | 'align' | 'lineHeight'> {\n /** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n size?: TextProps['size'];\n /**\n * Underlined at rest, clearing on hover. Defaults to `true`; keep it for links\n * whose colour matches the surrounding text. `false` renders no underline and\n * leaves the hover treatment to the composition (a row, chip or menu).\n */\n underline?: boolean;\n ref?: Ref<HTMLAnchorElement>;\n}\n\n/**\n * Native anchor sibling of `Text`: the same roles plus link focus and hover\n * states. Inside running text an unset size, weight and leading follow the\n * sentence; the colour role stays, so the link still reads as a link.\n */\nexport function TextLink({type = 'main', size, weight, align, lineHeight, underline = true, className, ref, children, ...props}: TextLinkProps) {\n const {defaultTextSize} = useTypographyConfig();\n const inText = useInRunningText();\n return <a {...props} ref={ref} data-typography=\"link\" className={cn('text-link--component', inlineLinkClassName, textVariants({type, size: size ?? (inText ? 'inherit' : defaultTextSize), weight: weight ?? (inText ? 'inherit' : undefined), align, lineHeight: lineHeight ?? (inText ? 'inherit' : undefined)}), underline ? `${linkUnderlineClassName} hover:decoration-transparent` : 'no-underline', className)}>\n <RunningTextContext.Provider value>{children}</RunningTextContext.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AAiC,gBAAgBd,CAAS;EAClZ,UAAA,kBAACf,EAAmB,UAApB;GAA6B,OAAA;GAAO;EAAsC,CAAA;CACzE,CAAA;AACL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-provider-C_U0Xma4.js","names":["DEFAULT_UI_CONFIG","isComponentScale","COMPONENT_SCALES","value","resolveComponentScale","propScale","providerScale","fallback","resolveUIConfig","config","base","createUIStore","createStore","UIStoreContext","createContext","fallbackUIStore","useUIStore","contextualStore","useContext","useStore","selector","UIProvider","parentStore","storeRef","useRef","useEffect","useDensityConfig","s","useFormattingConfig","useMoneyConfig","useDatesConfig","useCommentsConfig","useTypographyConfig","useItemConfig","useButtonConfig","useBadgeConfig","useCardConfig","useOverlayConfig","useToastConfig","useSpinnerConfig","DirectionProvider"],"sources":["../src/lib/ui-provider/defaults.ts","../src/lib/ui-provider/scale.ts","../src/lib/ui-provider/store.ts","../src/lib/ui-provider/provider.tsx","../src/lib/ui-provider/hooks.ts"],"sourcesContent":["/**\n * Hardcoded library-wide defaults.\n *\n * These are the values the store ships with — every component reading via\n * `useFooConfig()` gets these even when no `<UIProvider>` is mounted.\n *\n * Each `<UIProvider>` creates an isolated mount-once store synchronously, so\n * these defaults work for browser rendering, SSR, and multiple React roots.\n * Components outside a provider read the no-provider fallback store.\n */\nimport type { ResolvedUIConfig } from './types';\n\nexport const DEFAULT_UI_CONFIG: ResolvedUIConfig = {\n\tdensity: {\n\t\tdefaultScale: 'md',\n\t},\n\tformatting: {\n\t\tlocale: 'en-US',\n\t},\n\tmoney: {\n\t\tdefaultCurrency: 'USD',\n\t\tdualPricingEnabled: false,\n\t\tdisplayMode: 'default_only',\n\t\tdualPricingDisplay: 'lines',\n\t\tformatMode: 'with_code',\n\t},\n\tdates: {\n\t\tweekStartsOn: 1,\n\t\tformat: 'dd MMM yyyy',\n\t},\n\tcomments: {\n\t\tcomposerPosition: 'top',\n\t},\n\ttypography: {\n\t\tdefaultTextSize: 'sm',\n\t},\n\titem: {\n\t\tdefaultVariant: 'default',\n\t},\n\tbutton: {\n\t\t// The neutral button; the one main command opts into tone=\"primary\".\n\t\tdefaultTone: 'secondary',\n\t\tdefaultButtonStyle: 'outline',\n\t},\n\tbadge: {\n\t\tdefaultTone: 'neutral',\n\t},\n\tcard: {\n\t\tdefaultSurface: 'framed',\n\t\tdefaultHeaderDivider: true,\n\t\tdefaultFooterDivider: true,\n\t},\n\toverlay: {\n\t\t// A confirmation reads as one centred question above its answers; a task\n\t\t// dialog keeps its heading and actions on the reading edge.\n\t\tdefaultConfirmAlign: 'center',\n\t\tdefaultDialogAlign: 'start',\n\t},\n\ttoast: {\n\t\tduration: 5000,\n\t\tposition: 'bottom-center',\n\t\ttheme: 'dark',\n\t\tcloseButton: true,\n\t\trichColors: false,\n\t\tvisibleToasts: 4,\n\t},\n\tspinner: {\n\t\tdefaultVariant: 'default',\n\t},\n};\n","import {\n\tCOMPONENT_SCALES,\n\ttype ComponentScale,\n} from '../component-vocabulary';\n\n/** Runtime guard for serialized or otherwise untyped component scale values. */\nexport function isComponentScale(value: unknown): value is ComponentScale {\n\treturn COMPONENT_SCALES.includes(value as ComponentScale);\n}\n\n/** Resolve direct, provider, and local scale defaults in precedence order. */\nexport function resolveComponentScale(\n\tpropScale: ComponentScale | undefined,\n\tproviderScale: ComponentScale | undefined,\n\tfallback: ComponentScale = 'md',\n): ComponentScale {\n\tif (isComponentScale(propScale)) return propScale;\n\tif (isComponentScale(providerScale)) return providerScale;\n\treturn isComponentScale(fallback) ? fallback : 'md';\n}\n","/**\n * Store plumbing for `<UIProvider>`.\n *\n * Each provider owns a vanilla Zustand store. This keeps independent React\n * roots and concurrent SSR requests isolated while retaining slice-scoped\n * subscriptions. A fallback store keeps components functional when no\n * provider is mounted and preserves the historical test bootstrap helpers.\n */\nimport { createContext, useContext } from 'react';\nimport { useStore } from 'zustand';\nimport { createStore, type StoreApi } from 'zustand/vanilla';\n\nimport { DEFAULT_UI_CONFIG } from './defaults';\nimport { resolveComponentScale } from './scale';\nimport type { ResolvedUIConfig, UIConfig } from './types';\n\nexport type UIStore = StoreApi<ResolvedUIConfig>;\n\n/**\n * Merge a partial config over a resolved base: the package defaults for a\n * root provider, or the parent provider's resolved defaults when nested.\n */\nexport function resolveUIConfig(\n\tconfig: UIConfig = {},\n\tbase: ResolvedUIConfig = DEFAULT_UI_CONFIG,\n): ResolvedUIConfig {\n\treturn {\n\t\tdensity: {\n\t\t\tdefaultScale: resolveComponentScale(\n\t\t\t\tconfig.density?.defaultScale,\n\t\t\t\tbase.density.defaultScale,\n\t\t\t),\n\t\t},\n\t\tformatting: { ...base.formatting, ...config.formatting },\n\t\tmoney: { ...base.money, ...config.money },\n\t\tdates: { ...base.dates, ...config.dates },\n\t\tcomments: { ...base.comments, ...config.comments },\n\t\ttypography: { ...base.typography, ...config.typography },\n\t\titem: { ...base.item, ...config.item },\n\t\tbutton: { ...base.button, ...config.button },\n\t\tbadge: { ...base.badge, ...config.badge },\n\t\tcard: { ...base.card, ...config.card },\n\t\toverlay: { ...base.overlay, ...config.overlay },\n\t\ttoast: { ...base.toast, ...config.toast },\n\t\tspinner: { ...base.spinner, ...config.spinner },\n\t};\n}\n\nexport function createUIStore(config: UIConfig = {}, base?: ResolvedUIConfig): UIStore {\n\treturn createStore<ResolvedUIConfig>(() => resolveUIConfig(config, base));\n}\n\nexport const UIStoreContext = createContext<UIStore | null>(null);\n\nconst fallbackUIStore = createUIStore();\n\nexport function useUIStore<T>(selector: (state: ResolvedUIConfig) => T): T {\n\tconst contextualStore = useContext(UIStoreContext);\n\treturn useStore(contextualStore ?? fallbackUIStore, selector);\n}\n\n/** Test-only helper for components rendered without a provider. */\nexport function applyUIConfig(config: UIConfig): void {\n\tfallbackUIStore.setState((state) => {\n\t\tconst next = { ...state };\n\t\tconst nextSlices = next as unknown as Record<keyof UIConfig, object>;\n\t\tconst currentSlices = state as unknown as Record<keyof UIConfig, object>;\n\n\t\tfor (const key of Object.keys(config) as Array<keyof UIConfig>) {\n\t\t\tconst override = config[key];\n\t\t\tif (!override) continue;\n\t\t\tnextSlices[key] = { ...currentSlices[key], ...override };\n\t\t}\n\n\t\treturn next;\n\t});\n}\n\n/** Test-only reset for the no-provider fallback store. */\nexport function resetUIConfig(): void {\n\tfallbackUIStore.setState(resolveUIConfig(), true);\n}\n","/**\n * `<UIProvider>` — an isolated, mount-once display-default boundary.\n *\n * The store is created synchronously on the first render, so server output,\n * hydration, and the first browser render all observe the same configuration.\n * Independent roots and SSR requests never share mutable provider state. A\n * nested provider starts from its parent's resolved defaults and overrides\n * only the keys it sets.\n */\nimport { useContext, useEffect, useRef, type ReactNode } from 'react';\n\nimport { createUIStore, UIStoreContext, type UIStore } from './store';\nimport type { UIConfig } from './types';\n\nexport interface UIProviderProps {\n\t/**\n\t * Partial display-default tree merged over the nearest parent provider's\n\t * defaults, or over `DEFAULT_UI_CONFIG` at the root.\n\t */\n\tconfig?: UIConfig;\n\tchildren: ReactNode;\n}\n\nexport function UIProvider({ config, children }: UIProviderProps) {\n\tconst parentStore = useContext(UIStoreContext);\n\tconst storeRef = useRef<UIStore | null>(null);\n\tconst initialConfigRef = useRef<UIConfig | undefined>(config);\n\n\tif (storeRef.current === null) {\n\t\t// Both providers are mount-once, so the parent snapshot stays exact.\n\t\tstoreRef.current = createUIStore(config, parentStore?.getState());\n\t}\n\n\tuseEffect(() => {\n\t\tif (import.meta.env?.DEV && initialConfigRef.current !== config) {\n\t\t\tconsole.warn(\n\t\t\t\t'[UIProvider] `config` is mount-once. Subsequent prop identity ' +\n\t\t\t\t\t'changes are ignored; use direct component props for per-mount state.',\n\t\t\t);\n\t\t}\n\t}, [config]);\n\n\treturn (\n\t\t<UIStoreContext.Provider value={storeRef.current}>\n\t\t\t{children}\n\t\t</UIStoreContext.Provider>\n\t);\n}\n","/**\n * Slice selector hooks.\n *\n * Each hook reads exactly one slice from the store. Components that only\n * care about `money` will not re-render when `dates` changes, etc.\n *\n * Every selector returns a guaranteed-populated slice (the store is\n * initialized with `DEFAULT_UI_CONFIG`), so component code can write:\n *\n * const { defaultCurrency } = useMoneyConfig();\n * const currency = props.currency ?? defaultCurrency;\n *\n * — no need to chain optional-access through the slice.\n */\nimport { useUIStore } from './store';\nimport type {\n\tButtonConfigSlice,\n\tBadgeConfigSlice,\n\tCardConfigSlice,\n\tCommentsDefaultsConfig,\n\tDatesConfig,\n\tDensityConfigSlice,\n\tFormattingConfigSlice,\n\tItemConfigSlice,\n\tMoneyConfig,\n\tOverlayConfigSlice,\n\tSpinnerConfigSlice,\n\tToastConfig,\n\tTypographyConfigSlice,\n} from './types';\n\nexport const useDensityConfig = (): DensityConfigSlice =>\n\tuseUIStore((s) => s.density);\n\nexport const useFormattingConfig = (): FormattingConfigSlice =>\n\tuseUIStore((s) => s.formatting);\n\nexport const useMoneyConfig = (): MoneyConfig =>\n\tuseUIStore((s) => s.money);\n\nexport const useDatesConfig = (): DatesConfig =>\n\tuseUIStore((s) => s.dates);\n\nexport const useCommentsConfig = (): CommentsDefaultsConfig =>\n\tuseUIStore((s) => s.comments);\n\nexport const useTypographyConfig = (): TypographyConfigSlice =>\n\tuseUIStore((s) => s.typography);\n\nexport const useItemConfig = (): ItemConfigSlice =>\n\tuseUIStore((s) => s.item);\n\nexport const useButtonConfig = (): ButtonConfigSlice =>\n\tuseUIStore((s) => s.button);\n\nexport const useBadgeConfig = (): BadgeConfigSlice =>\n\tuseUIStore((s) => s.badge);\n\nexport const useCardConfig = (): CardConfigSlice =>\n\tuseUIStore((s) => s.card);\n\nexport const useOverlayConfig = (): OverlayConfigSlice =>\n\tuseUIStore((s) => s.overlay);\n\nexport const useToastConfig = (): ToastConfig =>\n\tuseUIStore((s) => s.toast);\n\nexport const useSpinnerConfig = (): SpinnerConfigSlice =>\n\tuseUIStore((s) => s.spinner);\n"],"mappings":";;;;;;;;AAYA,IAAaA,IAAsC;CAClD,SAAS,EACR,cAAc,KACf;CACA,YAAY,EACX,QAAQ,QACT;CACA,OAAO;EACN,iBAAi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AAM,GAEdQ,UACZnB,GAAY,MAAMW,EAAE,KAAK,GAEbS,UACZpB,GAAY,MAAMW,EAAE,IAAI,GAEZU,UACZrB,GAAY,MAAMW,EAAE,OAAO,GAEfW,UACZtB,GAAY,MAAMW,EAAE,KAAK,GAEbY,UACZvB,GAAY,MAAMW,EAAE,OAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage-card-BhO5eqkX.js","names":["NumberValue","_Fragment","useFormattingConfig","cn","Button","Text","DisplayLabel","Grid","Stack","Card","ProgressTrack","Progress","Percent","Number$1","TabsTrigger","TabsContent","TabsList","Tabs","validUsage","value","usageExceeds","actual","expected","tolerance","terms","quotaSummary","used","usedValue","limit","limitValue","kind","ratio","dailySummary","values","days","day","complete","maximum","max","sum","defaultUsageCardStrings","chartColors","categoryColor","category","index","QuotaValue","summary","quota","strings","prominent","Fragment","QuotaProgress","formatting","categories","total","segmented","denominator","unclassified","format","label","DailyUsage","unit","UsageBody","data","categoryTotal","inconsistent","percent","resource","UsageCard","stringsProp","cardProps","useStrings","ready","status","selectedPeriod","period","periods","hasPeriods","body","loadingSlot","errorSlot","onRetry","emptySlot","footer","footerAction","card","item","onPeriodChange"],"sources":["../src/components/blocks/analytics/usage-card/usage-card.data.ts","../src/components/blocks/analytics/usage-card/usage-card.strings.ts","../src/components/blocks/analytics/usage-card/usage-card.tsx"],"sourcesContent":["import type { UsageCardDay } from './types';\n\nexport function validUsage(value: number | null | undefined): number | null {\n\treturn typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : null;\n}\n\n/** Account only for rounding accumulated by positive finite category additions. */\nexport function usageExceeds(actual: number, expected: number, terms = 1): boolean {\n\tif (validUsage(actual) === null || validUsage(expected) === null) return true;\n\tconst magnitude = Math.max(actual, expected);\n\tconst tolerance = magnitude * Number.EPSILON * Math.max(1, terms);\n\treturn actual - expected > tolerance;\n}\n\n/** Retain actual numbers; cap only geometry. Zero quota has no finite percentage. */\nexport function quotaSummary(usedValue: number | null, limitValue: number | null | undefined) {\n\tconst used = validUsage(usedValue);\n\tconst limit = validUsage(limitValue);\n\tconst kind = used === null ? 'unavailable' : limitValue === null ? 'unlimited' : limit === null ? 'unavailable' : 'limited';\n\tconst ratio = used !== null && limit !== null && limit > 0 ? used / limit * 100 : used === 0 && limit === 0 ? 0 : null;\n\tconst percent = ratio !== null && Number.isFinite(ratio) ? ratio : null;\n\treturn {\n\t\tkind, used, limit, percent,\n\t\tprogress: kind === 'limited' ? limit === 0 ? used === 0 ? 0 : 100 : Math.min(100, ratio ?? 0) : null,\n\t\tremaining: kind === 'limited' ? Math.max(0, (limit ?? 0) - (used ?? 0)) : null,\n\t\texcess: kind === 'limited' ? Math.max(0, (used ?? 0) - (limit ?? 0)) : null,\n\t} as const;\n}\n\nexport function dailySummary(days: readonly UsageCardDay[]) {\n\tconst values = days.map(day => validUsage(day.value));\n\tconst complete = values.length > 0 && values.every(value => value !== null);\n\tconst maximum = values.reduce<number>((max, value) => Math.max(max, value ?? 0), 0);\n\treturn {\n\t\tvalues,\n\t\t// Dividing before summing avoids overflow for finite, very large values.\n\t\taverage: complete ? values.reduce<number>((sum, value) => sum + (value ?? 0) / values.length, 0) : null,\n\t\tmaximum: maximum > 0 ? maximum : 1,\n\t};\n}\n","export interface UsageCardStrings {\n\ttitle: string;\n\tusage: string;\n\tused: string;\n\tof: string;\n\tunlimited: string;\n\tunavailable: string;\n\tremaining: string;\n\toverLimit: string;\n\tbreakdown: string;\n\tinconsistentBreakdown: string;\n\tdaily: string;\n\taverage: string;\n\tperDay: string;\n\tresources: string;\n\tperiods: string;\n\tloading: string;\n\terror: string;\n\tempty: string;\n\tretry: string;\n}\nexport const defaultUsageCardStrings: UsageCardStrings = {\n\ttitle: 'Usage', usage: 'Usage', used: 'used', of: 'of', unlimited: 'Unlimited',\n\tunavailable: 'Unavailable', remaining: 'remaining', overLimit: 'over limit',\n\tbreakdown: 'Usage breakdown', inconsistentBreakdown: 'Category totals exceed reported usage.',\n\tdaily: 'Daily usage', average: 'Average', perDay: 'per day', resources: 'Resources',\n\tperiods: 'Usage period', loading: 'Loading usage', error: 'Unable to load usage',\n\tempty: 'No usage data', retry: 'Retry',\n};\n","import type { ReactNode } from 'react';\n\nimport { Button } from '../../../base/buttons';\nimport { Card } from '../../../base/cards';\nimport { Progress, ProgressTrack } from '../../../base/feedback';\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from '../../../base/navigation';\nimport { Grid, Stack } from '../../../base/structure';\nimport { Number as NumberValue, Percent } from '../../../primitives';\nimport { DisplayLabel, Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { useFormattingConfig } from '../../../../lib/ui-provider';\nimport { cn } from '../../../../lib/utils';\n\nimport { dailySummary, quotaSummary, usageExceeds, validUsage } from './usage-card.data';\nimport { defaultUsageCardStrings, type UsageCardStrings } from './usage-card.strings';\nimport type { UsageCardCategory, UsageCardData, UsageCardDay, UsageCardProps, UsageCardQuota } from './types';\n\nconst chartColors = ['bg-chart-1', 'bg-chart-2', 'bg-chart-3', 'bg-chart-4', 'bg-chart-5'] as const;\nfunction categoryColor(category: UsageCardCategory, index: number) {\n\treturn chartColors[(category.color === undefined ? index : category.color - 1) % chartColors.length];\n}\n\nfunction QuotaValue({ quota, strings, prominent = false }: { quota: UsageCardQuota; strings: UsageCardStrings; prominent?: boolean }) {\n\tconst summary = quotaSummary(quota.used, quota.limit);\n\treturn <Stack gap=\"dense\" className=\"usage-card--quota\">\n\t\t<Stack direction=\"horizontal\" gap=\"xs\" align=\"baseline\">\n\t\t\t<NumberValue type=\"inherit\" value={summary.used} emptyLabel={strings.unavailable} size={prominent ? 'xl' : undefined} weight={prominent ? 'semibold' : 'medium'} align=\"left\" />\n\t\t\t{!prominent && summary.kind === 'limited' && <>\n\t\t\t\t<Text tag=\"span\" type=\"secondary\">{strings.of}</Text>\n\t\t\t\t<NumberValue value={summary.limit} type=\"secondary\" align=\"left\" />\n\t\t\t</>}\n\t\t\t{quota.unit && <Text tag=\"span\" type=\"secondary\">{quota.unit}</Text>}\n\t\t\t{prominent && summary.used !== null && <Text tag=\"span\" size=\"xs\" type=\"secondary\">{strings.used}</Text>}\n\t\t</Stack>\n\t\t{prominent && summary.kind === 'limited' && <Stack direction=\"horizontal\" gap=\"xs\" align=\"baseline\">\n\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\">{strings.of}</Text>\n\t\t\t<NumberValue value={summary.limit} size=\"xs\" type=\"secondary\" align=\"left\" />\n\t\t</Stack>}\n\t\t{summary.kind === 'unlimited' && <Text tag=\"span\" size=\"xs\" type=\"secondary\">{strings.unlimited}</Text>}\n\t\t{summary.kind === 'unavailable' && summary.used !== null && <Text tag=\"span\" size=\"xs\" type=\"secondary\">{strings.unavailable}</Text>}\n\t</Stack>;\n}\n\nfunction QuotaProgress({ quota, label, strings, categories }: { quota: UsageCardQuota; label: string; strings: UsageCardStrings; categories?: readonly UsageCardCategory[] }) {\n\tconst summary = quotaSummary(quota.used, quota.limit);\n\tconst formatting = useFormattingConfig();\n\tif (summary.kind !== 'limited') return null;\n\tconst sum = categories?.reduce((total, category) => total + (validUsage(category.value) ?? 0), 0) ?? 0;\n\tconst segmented = !!categories?.length && categories.every(category => validUsage(category.value) !== null) && !usageExceeds(sum, summary.used ?? 0, categories.length);\n\tconst maximum = Math.max(summary.limit ?? 0, summary.used ?? 0);\n\tconst denominator = maximum > 0 ? maximum : 1;\n\tconst unclassified = usageExceeds(summary.used ?? 0, sum, categories?.length) ? (summary.used ?? 0) - sum : 0;\n\tconst format = new Intl.NumberFormat(formatting.locale);\n\treturn <Progress\n\t\tvalue={summary.progress ?? 0}\n\t\taria-label={label}\n\t\tgetAriaValueText={() => `${format.format(summary.used ?? 0)} ${strings.of} ${format.format(summary.limit ?? 0)} ${quota.unit ?? ''} ${strings.used}`}\n\t\ttone={summary.excess ? 'destructive' : 'primary'}\n\t\ttrackSlot={segmented ? <ProgressTrack>\n\t\t\t{categories?.map((category, index) => <span key={category.id} aria-hidden=\"true\" className={cn('h-full shrink-0', categoryColor(category, index))} style={{ width: `${(category.value ?? 0) / denominator * 100}%` }} />)}\n\t\t\t{unclassified > 0 && <span aria-hidden=\"true\" className=\"h-full shrink-0 bg-primary\" style={{ width: `${unclassified / denominator * 100}%` }} />}\n\t\t</ProgressTrack> : undefined}\n\t/>;\n}\n\nfunction DailyUsage({ days, unit, strings }: { days: readonly UsageCardDay[]; unit?: string; strings: UsageCardStrings }) {\n\tconst summary = dailySummary(days);\n\treturn <Stack gap=\"sm\" className=\"usage-card--daily\">\n\t\t<Stack direction=\"horizontal\" justify=\"between\" align=\"baseline\" gap=\"sm\">\n\t\t\t<DisplayLabel className=\"text-inherit\">{strings.daily}</DisplayLabel>\n\t\t\t<Stack direction=\"horizontal\" gap=\"xs\" align=\"baseline\">\n\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\">{strings.average}</Text>\n\t\t\t\t<NumberValue type=\"inherit\" value={summary.average} emptyLabel={strings.unavailable} options={{ maximumFractionDigits: 0 }} weight=\"medium\" />\n\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\">{strings.perDay}</Text>\n\t\t\t</Stack>\n\t\t</Stack>\n\t\t{days.length > 0 && <>\n\t\t\t<svg viewBox={`0 0 ${days.length * 10} 40`} preserveAspectRatio=\"none\" aria-hidden=\"true\" className=\"usage-card--daily-chart h-control-lg w-full overflow-visible\">\n\t\t\t\t{summary.values.map((value, index) => value === null ? null : <rect key={index} x={index * 10 + 1} y={40 - value / summary.maximum * 40} width={8} height={value / summary.maximum * 40} className=\"fill-chart-1\" />)}\n\t\t\t</svg>\n\t\t\t<Stack direction=\"horizontal\" justify=\"between\" gap=\"sm\" aria-hidden=\"true\">\n\t\t\t\t<Text size=\"xs\" type=\"secondary\">{days[0]?.label}</Text>\n\t\t\t\t{days.length > 1 && <Text size=\"xs\" type=\"secondary\">{days[days.length - 1]?.label}</Text>}\n\t\t\t</Stack>\n\t\t</>}\n\t\t<ol className=\"sr-only\" aria-label={strings.daily}>\n\t\t\t{days.map((day, index) => <li key={index}>{day.label}: <NumberValue type=\"inherit\" value={validUsage(day.value)} emptyLabel={strings.unavailable} /> {unit}</li>)}\n\t\t</ol>\n\t</Stack>;\n}\n\nfunction UsageBody({ data, strings }: { data: UsageCardData; strings: UsageCardStrings }) {\n\tconst summary = quotaSummary(data.used, data.limit);\n\tconst categoryTotal = data.categories?.reduce((total, category) => total + (validUsage(category.value) ?? 0), 0) ?? 0;\n\tconst inconsistent = summary.used !== null && usageExceeds(categoryTotal, summary.used, data.categories?.length);\n\treturn <Stack gap=\"lg\">\n\t\t<Stack gap=\"md\" className=\"usage-card--summary\">\n\t\t\t<Stack direction=\"horizontal\" justify=\"between\" align=\"start\" gap=\"sm\">\n\t\t\t\t<QuotaValue quota={data} strings={strings} prominent />\n\t\t\t\t{summary.percent !== null && <Percent value={summary.percent} scaled size=\"lg\" weight=\"medium\" type=\"secondary\" options={{ maximumFractionDigits: 0 }} />}\n\t\t\t</Stack>\n\t\t\t<QuotaProgress quota={data} label={strings.usage} strings={strings} categories={data.categories} />\n\t\t\t{!!data.categories?.length && <Grid render={<ul aria-label={strings.breakdown} />} columns={3} gap=\"sm\" className=\"m-0 list-none p-0 font-sans usage-card--categories grid-cols-[minmax(0,1fr)_auto_minmax(5ch,max-content)]\">\n\t\t\t\t{data.categories.map((category, index) => {\n\t\t\t\t\tconst value = validUsage(category.value);\n\t\t\t\t\tconst percent = summary.used === null || value === null || inconsistent ? null : summary.used === 0 ? 0 : value / summary.used;\n\t\t\t\t\treturn <li key={category.id} className=\"usage-card--category col-span-full grid grid-cols-subgrid items-baseline\">\n\t\t\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" align=\"center\" wrap={false} className=\"min-w-0\">\n\t\t\t\t\t\t\t<span aria-hidden=\"true\" className={cn('size-icon-sm shrink-0 rounded-full', categoryColor(category, index))} />\n\t\t\t\t\t\t\t<Text type=\"inherit\" tag=\"span\" className=\"break-words\">{category.label}</Text>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t<NumberValue type=\"inherit\" value={value} emptyLabel={strings.unavailable} weight=\"medium\" className=\"usage-card--category-value\" />\n\t\t\t\t\t\t<Percent value={percent} emptyLabel={strings.unavailable} type=\"secondary\" options={{ maximumFractionDigits: 0 }} className=\"usage-card--category-share\" />\n\t\t\t\t\t</li>;\n\t\t\t\t})}\n\t\t\t</Grid>}\n\t\t\t{inconsistent && <Text size=\"xs\" type=\"secondary\">{strings.inconsistentBreakdown}</Text>}\n\t\t</Stack>\n\t\t{data.daily && <DailyUsage days={data.daily} unit={data.unit} strings={strings} />}\n\t\t{!!data.resources?.length && <Stack gap=\"sm\">\n\t\t\t<DisplayLabel className=\"text-inherit\">{strings.resources}</DisplayLabel>\n\t\t\t<Grid columns={1} gap=\"md\" className=\"usage-card--resources @sm/card:grid-cols-3\">\n\t\t\t\t{data.resources.map(resource => <Stack key={resource.id} gap=\"sm\" className=\"usage-card--resource min-w-0\" role=\"group\" aria-label={resource.label}>\n\t\t\t\t\t<Text type=\"inherit\" tag=\"span\" weight=\"medium\">{resource.label}</Text>\n\t\t\t\t\t<QuotaValue quota={resource} strings={strings} />\n\t\t\t\t\t<QuotaProgress quota={resource} label={resource.label} strings={strings} />\n\t\t\t\t</Stack>)}\n\t\t\t</Grid>\n\t\t</Stack>}\n\t</Stack>;\n}\n\n/** App-owned usage data and period callbacks in the canonical Card composition. */\nexport function UsageCard({ data, status = 'ready', periods, period, onPeriodChange, onRetry, loadingSlot, errorSlot, emptySlot, footerAction, strings: stringsProp, ...cardProps }: UsageCardProps) {\n\tconst strings = useStrings(defaultUsageCardStrings, stringsProp);\n\tconst ready = status === 'ready' && !!data;\n\tconst summary = ready ? quotaSummary(data.used, data.limit) : null;\n\tconst selectedPeriod = period ?? periods?.[0]?.value ?? '';\n\tconst hasPeriods = !!periods?.length;\n\tlet body: ReactNode;\n\tif (status === 'loading') body = <div role=\"status\">{loadingSlot ?? <Text type=\"secondary\">{strings.loading}</Text>}</div>;\n\telse if (status === 'error') body = <Stack role=\"alert\" gap=\"sm\">{errorSlot ?? <Text type=\"inherit\">{strings.error}</Text>}{onRetry && <Button tone=\"secondary\" onClick={onRetry}>{strings.retry}</Button>}</Stack>;\n\telse if (!ready) body = <div>{emptySlot ?? <Text type=\"secondary\">{strings.empty}</Text>}</div>;\n\telse body = <UsageBody data={data} strings={strings} />;\n\tconst footer = (summary?.kind === 'limited' || footerAction) && <Stack direction=\"horizontal\" justify=\"between\" align=\"center\" gap=\"md\">\n\t\t{summary?.kind === 'limited' && <Stack direction=\"horizontal\" gap=\"xs\" align=\"baseline\">\n\t\t\t<NumberValue type=\"inherit\" value={summary.excess ? summary.excess : summary.remaining} weight=\"medium\" />\n\t\t\t{data?.unit && <Text tag=\"span\" type=\"secondary\">{data.unit}</Text>}\n\t\t\t<Text tag=\"span\" type=\"secondary\">{summary.excess ? strings.overLimit : strings.remaining}</Text>\n\t\t</Stack>}\n\t\t{footerAction}\n\t</Stack>;\n\tconst card = <Card\n\t\t{...cardProps}\n\t\ttitle={cardProps.title ?? strings.title}\n\t\tclassName={cn('usage-card--component min-w-0', cardProps.className)}\n\t\tdata-component=\"usage-card\"\n\t\tdata-slot=\"usage-card\"\n\t\taria-busy={status === 'loading' || undefined}\n\t\theaderAction={hasPeriods ? <Stack direction=\"horizontal\" gap=\"sm\" align=\"center\" className=\"usage-card--header-actions max-w-full\">\n\t\t\t<TabsList scrollable aria-label={strings.periods}>\n\t\t\t\t{periods.map(item => <TabsTrigger key={item.value} value={item.value} disabled={item.disabled || !onPeriodChange}>{item.label}</TabsTrigger>)}\n\t\t\t</TabsList>\n\t\t\t{cardProps.headerAction}\n\t\t</Stack> : cardProps.headerAction}\n\t\tfooterSlot={footer}\n\t>\n\t\t{hasPeriods ? <TabsContent value={selectedPeriod}>{body}</TabsContent> : body}\n\t</Card>;\n\treturn hasPeriods ? <Tabs value={selectedPeriod} onValueChange={value => { if (typeof value === 'string') onPeriodChange?.(value); }} className=\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