themelia-react-ui 2.0.2 → 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 +67 -7
- package/README.md +70 -37
- package/THIRD_PARTY_NOTICES.md +6 -12
- 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-ax2BqjrI.js → auth-D2FVZ1MH.js} +10 -10
- package/dist/{auth-ax2BqjrI.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 +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +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-C0EQW6dr.js → combobox-CBJDs6w_.js} +349 -347
- package/dist/combobox-CBJDs6w_.js.map +1 -0
- package/dist/{combobox-xCQ2RMNE.js → combobox-hbhSS18O.js} +158 -112
- package/dist/combobox-hbhSS18O.js.map +1 -0
- 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-BYYlTA8E.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/combobox/combobox-field.d.ts +16 -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/components/ui/combobox-dismiss.d.ts +16 -0
- package/dist/components/ui/combobox.d.ts +11 -6
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/sheet.d.ts +1 -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-ay0Pha_a.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-BGfvjP4d.js → filters-BcT-uoFy.js} +19 -19
- package/dist/{filters-BGfvjP4d.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-CGXuhcRm.js → header-BA697l4a.js} +14 -14
- package/dist/{header-CGXuhcRm.js.map → header-BA697l4a.js.map} +1 -1
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-Dkz0K2WT.js → hooks-BQ-L7Uu2.js} +2 -2
- package/dist/{hooks-Dkz0K2WT.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/use-popup-focus-recovery.d.ts +8 -0
- 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-utuUvH1K.js → mentions-RKOQaaIB.js} +8 -8
- package/dist/{mentions-utuUvH1K.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-DNWmZrJ4.js → overlays-BlKynmde.js} +322 -319
- 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-B9WWygpa.js → popover-menu-BYaCdFhf.js} +6 -6
- package/dist/{popover-menu-B9WWygpa.js.map → popover-menu-BYaCdFhf.js.map} +1 -1
- package/dist/{popover-7_m66eYW.js → popover-uwzX2vo7.js} +65 -63
- package/dist/popover-uwzX2vo7.js.map +1 -0
- 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-CGpB3omz.js → sheet-DoAxTb2J.js} +75 -73
- package/dist/sheet-DoAxTb2J.js.map +1 -0
- package/dist/{sidebar-A0ElHINE.js → sidebar-ByqKR_W5.js} +13 -13
- package/dist/{sidebar-A0ElHINE.js.map → sidebar-ByqKR_W5.js.map} +1 -1
- package/dist/{sidebar-CPx_7YBa.js → sidebar-D2iSnGJ7.js} +11 -11
- package/dist/{sidebar-CPx_7YBa.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/use-popup-focus-recovery-C0QPvgOR.js +36 -0
- package/dist/use-popup-focus-recovery-C0QPvgOR.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 +45 -35
- package/docs/consumer-skill/references/integration.md +6 -2
- package/docs/consumer-skill/references/public-api.json +1520 -66
- 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 +7 -5
- 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 +6 -4
- 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/combobox-C0EQW6dr.js.map +0 -1
- package/dist/combobox-xCQ2RMNE.js.map +0 -1
- package/dist/comments-BYYlTA8E.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-ay0Pha_a.js.map +0 -1
- package/dist/date-pickers-Ccw8DL2b.js +0 -175
- package/dist/date-pickers-Ccw8DL2b.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-DNWmZrJ4.js.map +0 -1
- package/dist/page-Bgl1F560.js +0 -224
- package/dist/page-Bgl1F560.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/popover-7_m66eYW.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/sheet-CGpB3omz.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-DXPDjvBU.js +0 -963
- package/dist/value-inputs-DXPDjvBU.js.map +0 -1
- package/dist/workspace-Cdrg7k9f.js +0 -408
- package/dist/workspace-Cdrg7k9f.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-display-D4oujtx0.js","names":["_Fragment","_Fragment","useDensityConfig","cn","Text","DisplayLabel","Heading","Grid","Stack","EmptyContent","EmptyHeader","Empty","EmptyMedia","compositionRhythm","Value","Badge","Separator","ContentBlock","ItemMedia","ItemActions","ItemGroup","ItemContent","Item","ItemTitle","Fragment$1","ScaleBar","max","i","value","label","KVRow","badge","badgeTone","DenseInfoDashboard","statusBadges","b","className","rows","row","scale","secondaryRows","footerBadges","footerText","InlineStat","ValuePrimitive","mono","MonoValue","labelContent","labelClassName","valueContent","valueWeight","valueClassName","layout","defaultDenseInfoStrings","DenseInfoClassification","stringsProp","strings","useStrings","stats","stat","items","item","totalValue","totalLabel","DenseInfoFinancial","headerBadges","lineItems","totalAmount","DenseInfoProjectCard","percentage","totalTasks","completedTasks","circumference","dashOffset","title","statusTone","statusLabel","description","metaPairs","idx","pair","date","priority","DenseInfoScoreCard","barColor","scoreLevel","score","scoreTotal","scoreFilled","defaultEmptyStateStrings","PADDING_CLASS","MEDIA_VARIANT_TO_PRIMITIVE","MEDIA_EXTRA_CLASS","EmptyState","forwardRef","resolvedPadding","padding","defaultScale","resolvedTitle","resolvedDescription","mediaNode","renderMedia","media","showMedia","ariaLabel","border","mediaVariant","actions","footer","DocumentStackIllustration","InboxCleanIllustration","trayClip","useId","SearchGlassIllustration","Search","StackedCardsIllustration","fadeId","UsersCircleIllustration","renderTitleBadge","RelationshipCardFrame","props","hasBody","alertSlot","metadataSlot","primaryActionSlot","selectorSlot","detailsSlot","headerClassName","icon","titleBadge","overflowActionSlot","bodyClassName"],"sources":["../src/components/blocks/data-display/dense-info-card/helpers.tsx","../src/components/blocks/data-display/dense-info-card/partials/dense-info-dashboard.tsx","../src/components/blocks/data-display/inline-stat/inline-stat.tsx","../src/components/blocks/data-display/dense-info-card/dense-info.strings.ts","../src/components/blocks/data-display/dense-info-card/partials/dense-info-classification.tsx","../src/components/blocks/data-display/dense-info-card/partials/dense-info-financial.tsx","../src/components/blocks/data-display/dense-info-card/partials/dense-info-project.tsx","../src/components/blocks/data-display/dense-info-card/partials/dense-info-score.tsx","../src/components/blocks/data-display/empty-state/empty-state.strings.ts","../src/components/blocks/data-display/empty-state/empty-state.tsx","../src/components/blocks/data-display/empty-state/partials/illustrations/document-stack.tsx","../src/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.tsx","../src/components/blocks/data-display/empty-state/partials/illustrations/search-glass.tsx","../src/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.tsx","../src/components/blocks/data-display/empty-state/partials/illustrations/users-circle.tsx","../src/components/blocks/data-display/relationship-card-frame.tsx"],"sourcesContent":["import { Badge } from '../../../base/badge';\nimport { Text } from '../../../typography/text';\nimport { Stack } from '../../../base/structure';\nimport { cn } from '../../../../lib/utils';\nimport { type DenseInfoBadgeTone } from './types';\n\n/* ─── Shared: Complexity / Scale Bar ─────────────────────────────────────── */\n\nexport function ScaleBar({\n\tvalue,\n\tmax = 5,\n\tlabel,\n}: {\n\t/** Current amount, used to fill the bar. */\n\tvalue: number;\n\t/** Value representing a full bar. Default: `5`. */\n\tmax?: number;\n\t/** Caption shown beside the bar. */\n\tlabel?: string;\n}) {\n\treturn (\n\t\t<div className={cn('helpers--component', 'flex items-center gap-space-md')}>\n\t\t\t<div className=\"flex items-center gap-space-xs\">\n\t\t\t{Array.from({ length: max }, (_, i) => (\n\t\t\t\t<div\n\t\t\t\t\tkey={i}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'h-1.5 w-3 rounded-full',\n\t\t\t\t\t\ti < value ? 'bg-muted-foreground' : 'bg-muted',\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t))}\n\t\t\t</div>\n\t\t\t{!!label && (\n\t\t\t\t<Text\n\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t>\n\t\t\t\t\t{label}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\n/* ─── Shared: Key-Value Row ──────────────────────────────────────────────── */\n\nexport function KVRow({\n\tlabel,\n\tvalue,\n\tbadge,\n\tbadgeTone,\n}: {\n\t/** Row label. */\n\tlabel: string;\n\t/** Row value. */\n\tvalue?: string;\n\t/** Chip shown after the value. */\n\tbadge?: string;\n\t/** Badge tone for the chip. */\n\tbadgeTone?: DenseInfoBadgeTone;\n}) {\n\treturn (\n\t\t<Stack direction=\"horizontal\" align=\"center\" justify=\"between\" gap=\"md\">\n\t\t\t<Text\n\t\t\t\tsize=\"xs\"\n\t\t\t\tclassName=\"shrink-0 text-muted-foreground\"\n\t\t\t>\n\t\t\t\t{label}\n\t\t\t</Text>\n\t\t\t{!!badge && (\n\t\t\t\t<Badge\n\t\t\t\t\ttone={badgeTone ?? 'secondary'}\n\t\t\t\t>\n\t\t\t\t\t{badge}\n\t\t\t\t</Badge>\n\t\t\t)}\n\t\t\t{!!value && !badge && (\n\t\t\t\t<Text\n\t\t\t\t\ttype=\"inherit\"\n\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\tclassName=\"text-right tabular-nums\"\n\t\t\t\t>\n\t\t\t\t\t{value}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</Stack>\n\t);\n}\n","import { ContentBlock } from '../../../../base/display';\nimport { Badge } from '../../../../base/badge';\nimport { Text } from '../../../../typography/text';\nimport { Stack } from '../../../../base/structure';\nimport { type DenseInfoDashboardProps } from '../types';\nimport { KVRow, ScaleBar } from '../helpers';\nimport { cn } from '../../../../../lib/utils';\n\nexport function DenseInfoDashboard({\n\ttitle,\n\tdescription,\n\tstatusBadges,\n\trows,\n\tsecondaryRows,\n\tscale,\n\tfooterBadges,\n\tfooterText,\n\tactions,\n\tclassName,\n}: DenseInfoDashboardProps) {\n\treturn (\n\t\t<ContentBlock\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\ttitleSuffix={statusBadges.length > 0 ? (\n\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"sm\">\n\t\t\t\t\t{statusBadges.map((b) => (\n\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\tkey={b.label}\n\t\t\t\t\t\t\ttone={b.tone}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{b.label}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t))}\n\t\t\t\t</Stack>\n\t\t\t) : undefined}\n\t\t\tactions={actions}\n\t\t\tclassName={cn('dense-info-dashboard--component', className)}\n\t\t>\n\t\t\t{/* Status badges sit with the title; groups below are separated by the\n\t\t\t section gap alone, so no rules divide the card. */}\n\t\t\t<Stack gap=\"2xl\">\n\t\t\t\t<Stack gap=\"md\">\n\t\t\t\t\t{rows.map((row) => (\n\t\t\t\t\t\t<KVRow\n\t\t\t\t\t\t\tkey={row.label}\n\t\t\t\t\t\t\t{...row}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\n\t\t\t\t\t{!!scale && (\n\t\t\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{scale.label}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<ScaleBar\n\t\t\t\t\t\t\t\tvalue={scale.value}\n\t\t\t\t\t\t\t\tmax={scale.max}\n\t\t\t\t\t\t\t\tlabel={`${String(scale.value)}/${String(scale.max ?? 5)}`}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\n\t\t\t\t{!!secondaryRows && secondaryRows.length > 0 && (\n\t\t\t\t\t<Stack gap=\"md\">\n\t\t\t\t\t\t{secondaryRows.map((row) => (\n\t\t\t\t\t\t\t<KVRow\n\t\t\t\t\t\t\t\tkey={row.label}\n\t\t\t\t\t\t\t\t{...row}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\n\t\t\t\t{(!!footerBadges || !!footerText) && (\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"md\">\n\t\t\t\t\t\t{!!footerBadges &&\n\t\t\t\t\t\t\tfooterBadges.map((b) => (\n\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\tkey={b.label}\n\t\t\t\t\t\t\t\t\ttone={b.tone}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{b.label}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t{!!footerText && (\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{footerText}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</ContentBlock>\n\t);\n}\n\nDenseInfoDashboard.displayName = 'DenseInfoDashboard';\n","/**\n * InlineStat — label + value pair, the workhorse of detail panels and card\n * footers. Three layouts:\n *\n * - `between` (default): label and value pushed to opposite ends of the row.\n * - `inline`: label sits immediately before the value, separator-style.\n * - `stacked`: label above (xs secondary), value below (md).\n *\n * The value takes the shared `Value` text role at the provider text size.\n * `valueWeight` emphasises a fact or a total through that role. `mono`\n * switches the value to the monospace identifier role (references, codes,\n * keys). Amounts, counts, percentages and dates stay in the sans UI font: pass\n * `valueClassName=\"tabular-nums\"` (or a value primitive such as `Money` /\n * `Percent`, which are already tabular) when figures should align. Keep\n * `valueClassName` for layout (alignment, truncation, figures); the\n * surrounding row is intentionally plain so consumers can stack many of these\n * without visual clutter.\n */\nimport type { ReactNode } from 'react';\n\nimport { Stack } from '../../../base/structure';\nimport { MonoValue, Value, type ValueProps } from '../../../primitives';\nimport { DisplayLabel } from '../../../typography';\nimport { cn } from '../../../../lib/utils';\n\nexport type InlineStatLayout = 'between' | 'inline' | 'stacked';\n\nexport interface InlineStatProps {\n\t/** Display label. Scalar labels use DisplayLabel; rich content owns its typography. */\n\tlabel: ReactNode;\n\t/** The figure to show. */\n\tvalue: ReactNode;\n\t/** Whether the label sits above the value or beside it. */\n\tlayout?: InlineStatLayout;\n\t/** Renders the value in tabular monospace figures. */\n\tmono?: boolean;\n\t/**\n\t * Weight of the value's text role. Defaults to the role weight: regular, or\n\t * medium with `mono`. Use `medium` for emphasised facts and `semibold` for totals.\n\t */\n\tvalueWeight?: ValueProps['weight'];\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Merged onto the label. */\n\tlabelClassName?: string;\n\t/** Merged onto the value. */\n\tvalueClassName?: string;\n}\n\nexport function InlineStat({\n\tlabel,\n\tvalue,\n\tlayout = 'between',\n\tmono = false,\n\tvalueWeight,\n\tclassName,\n\tlabelClassName,\n\tvalueClassName,\n}: InlineStatProps) {\n\tconst ValuePrimitive = mono ? MonoValue : Value;\n\tconst labelContent = typeof label === 'string' || typeof label === 'number'\n\t\t? <DisplayLabel className={cn('text-inherit', labelClassName)}>{label}</DisplayLabel>\n\t\t: <span className={labelClassName}>{label}</span>;\n\tconst valueContent = (\n\t\t<ValuePrimitive type=\"inherit\" weight={valueWeight} className={valueClassName}>\n\t\t\t{value}\n\t\t</ValuePrimitive>\n\t);\n\n\tif (layout === 'stacked') {\n\t\treturn (\n\t\t\t<Stack gap=\"2xs\" className={cn('inline-stat--component', className)}>\n\t\t\t\t{labelContent}\n\t\t\t\t{valueContent}\n\t\t\t</Stack>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Stack\n\t\t\tdirection=\"horizontal\"\n\t\t\tgap=\"md\"\n\t\t\tjustify={layout === 'between' ? 'between' : 'start'}\n\t\t\twrap={false}\n\t\t\tclassName={cn('inline-stat--component', className)}\n\t\t>\n\t\t\t{labelContent}\n\t\t\t{valueContent}\n\t\t</Stack>\n\t);\n}\n\nInlineStat.displayName = 'InlineStat';\n","export interface DenseInfoStrings {\n\t/** Total number of records across all pages. */\n\ttotal: string;\n\t/** Word after the task count (\"12/20 tasks\"). */\n\ttasks: string;\n\t/** Word after the priority value (\"High priority\"). Additive, so optional for existing dictionaries. */\n\tpriority?: string;\n}\n\nexport const defaultDenseInfoStrings: Required<DenseInfoStrings> = {\n\ttotal: 'Total',\n\ttasks: 'tasks',\n\tpriority: 'priority',\n};\n","import { ContentBlock } from '../../../../base/display';\nimport { Badge } from '../../../../base/badge';\nimport { Grid, Stack } from '../../../../base/structure';\nimport { Value } from '../../../../primitives';\nimport { Text } from '../../../../typography/text';\nimport { Heading } from '../../../../typography/heading';\nimport { InlineStat } from '../../inline-stat/inline-stat';\nimport { Separator } from '../../../../base/display/separator';\nimport {\n\tItem,\n\tItemActions,\n\tItemContent,\n\tItemGroup,\n\tItemMedia,\n\tItemTitle,\n} from '../../../../base/item';\nimport { cn } from '../../../../../lib/utils';\nimport { useStrings } from '../../../../../lib/strings';\nimport { defaultDenseInfoStrings } from '../dense-info.strings';\nimport { type DenseInfoClassificationProps } from '../types';\n\nexport function DenseInfoClassification({\n\ttitle,\n\tdescription,\n\tstats,\n\titems,\n\ttotalLabel,\n\ttotalValue,\n\tfooterBadges,\n\tfooterText,\n\tactions,\n\tclassName,\n\tstrings: stringsProp,\n}: DenseInfoClassificationProps) {\n\tconst strings = useStrings(defaultDenseInfoStrings, stringsProp);\n\treturn (\n\t\t<ContentBlock\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tactions={actions}\n\t\t\tclassName={cn('dense-info-classification--component', className)}\n\t\t>\n\t\t\t<Stack gap=\"2xl\">\n\t\t\t\t{/* Plain figures, no tile per stat: the grid gap separates them and the\n\t\t\t\t larger section gap separates the stats from the breakdown. */}\n\t\t\t\t<Grid columns={{ base: 2, sm: 3 }} gap=\"xl\">\n\t\t\t\t\t{stats.map((stat) => (\n\t\t\t\t\t\t<Stack gap=\"dense\" key={stat.label} className=\"min-w-0 items-start\">\n\t\t\t\t\t\t\t<Heading tag=\"h4\" className=\"tabular-nums text-inherit\">\n\t\t\t\t\t\t\t\t{stat.value}\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" weight=\"medium\">\n\t\t\t\t\t\t\t\t{stat.label}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t{!!stat.trendBadge && (\n\t\t\t\t\t\t\t\t<Badge tone={stat.trendTone ?? 'secondary'} className=\"self-start\">\n\t\t\t\t\t\t\t\t\t{stat.trendBadge}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t))}\n\t\t\t\t</Grid>\n\n\t\t\t\t<Stack gap=\"md\">\n\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t{items.map((item) => (\n\t\t\t\t\t\t\t<Item key={item.label} size=\"sm\" role=\"listitem\">\n\t\t\t\t\t\t\t\t<ItemMedia>\n\t\t\t\t\t\t\t\t\t<span className={cn('h-2 w-2 shrink-0 rounded-full', item.dotColor)} />\n\t\t\t\t\t\t\t\t</ItemMedia>\n\t\t\t\t\t\t\t\t<ItemContent>\n\t\t\t\t\t\t\t\t\t<ItemTitle bold={false} className=\"gap-space-md\">\n\t\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t\t\t{!!item.badge && (\n\t\t\t\t\t\t\t\t\t\t\t<Badge tone={item.badgeTone ?? 'secondary'}>\n\t\t\t\t\t\t\t\t\t\t\t\t{item.badge}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</ItemTitle>\n\t\t\t\t\t\t\t\t</ItemContent>\n\t\t\t\t\t\t\t\t<ItemActions>\n\t\t\t\t\t\t\t\t\t<Value type=\"inherit\" weight=\"semibold\" className=\"tabular-nums\">\n\t\t\t\t\t\t\t\t\t\t{item.value}\n\t\t\t\t\t\t\t\t\t</Value>\n\t\t\t\t\t\t\t\t</ItemActions>\n\t\t\t\t\t\t\t</Item>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ItemGroup>\n\n\t\t\t\t\t{/* One rule above the grand total; the Stack gap sits on both sides of it. */}\n\t\t\t\t\t{!!totalValue && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Separator />\n\t\t\t\t\t\t\t<InlineStat\n\t\t\t\t\t\t\t\tlabel={<Text type=\"inherit\" tag=\"span\" weight=\"bold\" lineHeight=\"tight\">{totalLabel ?? strings.total}</Text>}\n\t\t\t\t\t\t\t\tvalue={totalValue}\n\t\t\t\t\t\t\t\tvalueWeight=\"bold\"\n\t\t\t\t\t\t\t\tvalueClassName=\"tabular-nums\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\n\t\t\t\t{(!!footerBadges || !!footerText) && (\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"md\">\n\t\t\t\t\t\t{!!footerBadges && footerBadges.map((b) => (\n\t\t\t\t\t\t\t<Badge key={b.label} tone={b.tone}>\n\t\t\t\t\t\t\t\t{b.label}\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{!!footerText && (\n\t\t\t\t\t\t\t<Text size=\"xs\" className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\t{footerText}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</ContentBlock>\n\t);\n}\n\nDenseInfoClassification.displayName = 'DenseInfoClassification';\n","import { ContentBlock } from '../../../../base/display';\nimport { Stack } from '../../../../base/structure';\nimport { Badge } from '../../../../base/badge';\nimport { Value } from '../../../../primitives';\nimport { Text } from '../../../../typography/text';\nimport { InlineStat } from '../../inline-stat/inline-stat';\nimport { Separator } from '../../../../base/display/separator';\nimport {\n\tItem,\n\tItemActions,\n\tItemContent,\n\tItemGroup,\n\tItemTitle,\n} from '../../../../base/item';\nimport { type DenseInfoFinancialProps } from '../types';\nimport { cn } from '../../../../../lib/utils';\nimport { useStrings } from '../../../../../lib/strings';\nimport { defaultDenseInfoStrings } from '../dense-info.strings';\n\nexport function DenseInfoFinancial({\n\ttitle,\n\tdescription,\n\theaderBadges,\n\tlineItems,\n\ttotalLabel,\n\ttotalAmount,\n\tfooterBadges,\n\tfooterText,\n\tactions,\n\tclassName,\n\tstrings: stringsProp,\n}: DenseInfoFinancialProps) {\n\tconst strings = useStrings(defaultDenseInfoStrings, stringsProp);\n\treturn (\n\t\t<ContentBlock\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\ttitleSuffix={headerBadges.length > 0 ? (\n\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"sm\">\n\t\t\t\t\t{headerBadges.map((b) => (\n\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\tkey={b.label}\n\t\t\t\t\t\t\ttone={b.tone}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{b.label}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t))}\n\t\t\t\t</Stack>\n\t\t\t) : undefined}\n\t\t\tactions={actions}\n\t\t\tclassName={cn('dense-info-financial--component', className)}\n\t\t>\n\t\t\t<Stack gap=\"2xl\">\n\t\t\t\t{/* Line items touch (their density padding is the row rhythm); a single\n\t\t\t\t rule sits above the grand total with the Stack gap on both sides. */}\n\t\t\t\t<Stack gap=\"md\">\n\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t{lineItems.map((item) => (\n\t\t\t\t\t\t\t<Item key={item.label} size=\"sm\" role=\"listitem\">\n\t\t\t\t\t\t\t\t<ItemContent>\n\t\t\t\t\t\t\t\t\t<ItemTitle className=\"gap-space-md\">\n\t\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t\t\t{!!item.badge && (\n\t\t\t\t\t\t\t\t\t\t\t<Badge tone={item.badgeTone ?? 'secondary'}>\n\t\t\t\t\t\t\t\t\t\t\t\t{item.badge}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</ItemTitle>\n\t\t\t\t\t\t\t\t</ItemContent>\n\t\t\t\t\t\t\t\t<ItemActions>\n\t\t\t\t\t\t\t\t\t<Value type=\"inherit\" weight=\"semibold\" className=\"tabular-nums\">\n\t\t\t\t\t\t\t\t\t\t{item.amount}\n\t\t\t\t\t\t\t\t\t</Value>\n\t\t\t\t\t\t\t\t</ItemActions>\n\t\t\t\t\t\t\t</Item>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ItemGroup>\n\n\t\t\t\t\t{!!totalAmount && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Separator />\n\t\t\t\t\t\t\t<InlineStat\n\t\t\t\t\t\t\t\tlabel={<Text type=\"inherit\" tag=\"span\" weight=\"semibold\" lineHeight=\"tight\">{totalLabel ?? strings.total}</Text>}\n\t\t\t\t\t\t\t\tvalue={totalAmount}\n\t\t\t\t\t\t\t\tvalueWeight=\"semibold\"\n\t\t\t\t\t\t\t\tvalueClassName=\"tabular-nums\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\n\t\t\t\t{(!!footerBadges || !!footerText) && (\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"md\">\n\t\t\t\t\t\t{!!footerBadges &&\n\t\t\t\t\t\t\tfooterBadges.map((b) => (\n\t\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\t\tkey={b.label}\n\t\t\t\t\t\t\t\t\ttone={b.tone}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{b.label}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t{!!footerText && (\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{footerText}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</ContentBlock>\n\t);\n}\n\nDenseInfoFinancial.displayName = 'DenseInfoFinancial';\n","import { ContentBlock } from '../../../../base/display';\nimport { Badge } from '../../../../base/badge';\nimport { Text } from '../../../../typography/text';\nimport { Heading } from '../../../../typography/heading';\nimport { Stack } from '../../../../base/structure';\nimport { type DenseInfoProjectCardProps } from '../types';\nimport { cn } from '../../../../../lib/utils';\nimport { useStrings } from '../../../../../lib/strings';\nimport { defaultDenseInfoStrings } from '../dense-info.strings';\n\nexport function DenseInfoProjectCard({\n\ttitle,\n\tdescription,\n\tstatusLabel,\n\tstatusTone,\n\tmetaPairs,\n\tdate,\n\tpriority,\n\tcompletedTasks,\n\ttotalTasks,\n\tactions,\n\tclassName,\n\tstrings: stringsProp,\n}: DenseInfoProjectCardProps) {\n\tconst strings = useStrings(defaultDenseInfoStrings, stringsProp);\n\tconst percentage = totalTasks > 0 ? Math.round((completedTasks / totalTasks) * 100) : 0;\n\tconst circumference = 2 * Math.PI * 7;\n\tconst dashOffset = circumference - (percentage / 100) * circumference;\n\n\treturn (\n\t\t<ContentBlock\n\t\t\tpadding=\"md\"\n\t\t\tactions={actions}\n\t\t\tclassName={cn('dense-info-project-card--component', className)}\n\t\t>\n\t\t\t<Stack gap=\"lg\">\n\t\t\t\t{/* The status reads with the title (no decorative folder glyph, no\n\t\t\t\t badge floating where actions go); date and priority are plain\n\t\t\t\t secondary text, and the task count needs no rule above it. */}\n\t\t\t\t<Stack gap=\"normal\">\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"sm\">\n\t\t\t\t\t\t<Heading tag=\"h5\" className=\"text-inherit\">\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t<Badge tone={statusTone} dot>\n\t\t\t\t\t\t\t{statusLabel}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t</Stack>\n\n\t\t\t\t\t{!!description && (\n\t\t\t\t\t\t<Text type=\"secondary\" className=\"line-clamp-2\">\n\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\n\t\t\t\t{!!metaPairs && metaPairs.length > 0 && (\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"sm\">\n\t\t\t\t\t\t{metaPairs.map((pair, idx) => (\n\t\t\t\t\t\t\t<span key={pair.label} className=\"flex items-center gap-space-xs\">\n\t\t\t\t\t\t\t\t{idx > 0 && (\n\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"discrete\">•</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!pair.icon && (\n\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">{pair.icon}</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\">{pair.label}</Text>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\n\t\t\t\t{(!!date || !!priority) && (\n\t\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" justify=\"between\" gap=\"md\">\n\t\t\t\t\t\t{!!date && <Text size=\"xs\" type=\"secondary\">{date}</Text>}\n\t\t\t\t\t\t{!!priority && <Text size=\"xs\" type=\"secondary\">{priority} {strings.priority}</Text>}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"flex items-center gap-space-md\">\n\t\t\t\t\t<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" className=\"shrink-0\" aria-hidden=\"true\">\n\t\t\t\t\t\t<circle\n\t\t\t\t\t\t\tcx=\"10\"\n\t\t\t\t\t\t\tcy=\"10\"\n\t\t\t\t\t\t\tr=\"7\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\t\t\tclassName=\"stroke-border\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<circle\n\t\t\t\t\t\t\tcx=\"10\"\n\t\t\t\t\t\t\tcy=\"10\"\n\t\t\t\t\t\t\tr=\"7\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\t\t\tstrokeDasharray={circumference}\n\t\t\t\t\t\t\tstrokeDashoffset={dashOffset}\n\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\tclassName=\"text-primary-accent\"\n\t\t\t\t\t\t\ttransform=\"rotate(-90 10 10)\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t<Text type=\"inherit\" size=\"xs\" weight=\"medium\">\n\t\t\t\t\t\t{completedTasks}/{totalTasks} {strings.tasks}\n\t\t\t\t\t</Text>\n\t\t\t\t</div>\n\t\t\t</Stack>\n\t\t</ContentBlock>\n\t);\n}\n\nDenseInfoProjectCard.displayName = 'DenseInfoProjectCard';\n","import { ContentBlock } from '../../../../base/display';\nimport { Badge } from '../../../../base/badge';\nimport { Heading, Text } from '../../../../typography';\nimport { InlineStat } from '../../inline-stat/inline-stat';\nimport { Stack } from '../../../../base/structure';\nimport { cn } from '../../../../../lib/utils';\nimport { type DenseInfoScoreCardProps } from '../types';\n\nexport function DenseInfoScoreCard({\n\ttitle,\n\tdescription,\n\tstatusBadges,\n\tscore,\n\tscoreLevel,\n\tscoreFilled,\n\tscoreTotal = 10,\n\trows,\n\tfooterBadges,\n\tactions,\n\tclassName,\n}: DenseInfoScoreCardProps) {\n\tconst barColor =\n\t\tscoreLevel === 'good'\n\t\t\t? 'bg-success'\n\t\t\t: scoreLevel === 'medium'\n\t\t\t\t? 'bg-warning'\n\t\t\t\t: 'bg-destructive';\n\n\treturn (\n\t\t<ContentBlock\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\ttitleSuffix={statusBadges.length > 0 ? (\n\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"sm\">\n\t\t\t\t\t{statusBadges.map((b) => (\n\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\tkey={b.label}\n\t\t\t\t\t\t\ttone={b.tone}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{b.label}\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t))}\n\t\t\t\t</Stack>\n\t\t\t) : undefined}\n\t\t\tactions={actions}\n\t\t\tclassName={cn('dense-info-score-card--component', className)}\n\t\t>\n\t\t\t{/* The score, its factors and the footer are separated by the section gap\n\t\t\t alone; the segmented bar keeps its status colour. */}\n\t\t\t<Stack gap=\"2xl\">\n\t\t\t\t<Stack gap=\"md\" align=\"center\">\n\t\t\t\t\t<Heading tag=\"h2\" className=\"tabular-nums text-inherit\">\n\t\t\t\t\t\t{String(score)}\n\t\t\t\t\t</Heading>\n\n\t\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" justify=\"center\" gap=\"xs\">\n\t\t\t\t\t\t{Array.from({ length: scoreTotal }, (_, i) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'h-5 w-2 rounded-radius-sm',\n\t\t\t\t\t\t\t\t\ti < scoreFilled ? barColor : 'bg-muted',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t\t</Stack>\n\n\t\t\t\t<Stack gap=\"md\">\n\t\t\t\t\t{rows.map((row) => (\n\t\t\t\t\t\t<InlineStat\n\t\t\t\t\t\t\tkey={row.label}\n\t\t\t\t\t\t\tlabel={<Text tag=\"span\" size=\"xs\" type=\"secondary\" weight=\"medium\" lineHeight=\"tight\">{row.label}</Text>}\n\t\t\t\t\t\t\tvalue={row.value}\n\t\t\t\t\t\t\tvalueWeight=\"semibold\"\n\t\t\t\t\t\t\tvalueClassName=\"text-end tabular-nums\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Stack>\n\n\t\t\t\t{!!footerBadges && footerBadges.length > 0 && (\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"md\">\n\t\t\t\t\t\t{footerBadges.map((b) => (\n\t\t\t\t\t\t\t<Badge\n\t\t\t\t\t\t\t\tkey={b.label}\n\t\t\t\t\t\t\t\ttone={b.tone}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{b.label}\n\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</ContentBlock>\n\t);\n}\n\nDenseInfoScoreCard.displayName = 'DenseInfoScoreCard';\n","/**\n * Strings for `<EmptyState>`. English defaults — every piece of copy is\n * deep-merge-overridable per rule 8.\n *\n * `title`/`description` here are the *fallback* defaults the component\n * renders when neither the prop nor a per-illustration preset supplies\n * its own copy. In practice, the consumer usually passes an explicit\n * `title` / `description` per resource (\"No products\", \"No invoices yet\")\n * — these defaults exist so a bare `<EmptyState />` still renders\n * sensibly during scaffolding.\n */\nexport interface EmptyStateStrings {\n\t/** Surface title. */\n\ttitle: string;\n\t/** Supporting copy shown under the label. */\n\tdescription: string;\n\tariaLabel: string;\n}\n\nexport const defaultEmptyStateStrings: EmptyStateStrings = {\n\ttitle: 'Nothing here yet',\n\tdescription: 'Once data lands, it will show up in this view.',\n\tariaLabel: 'Empty state',\n};\n","import {compositionRhythm} from '../../../base/structure/composition.recipes';\n/**\n * EmptyState — the canonical zero-data surface for any list, table, or\n * collection in the library. Wraps the shadcn `ui/empty` primitive\n * (rule 1, rule 12) and applies our typography, density, and tokens:\n *\n * - Headline through `<Heading tag=\"h3\">` (admin scale, no marketing inflation)\n * - Description through provider-sized secondary Typography so a whole-state\n * explanation remains readable; compact footer metadata stays `xs`\n * - Padding driven by the package scale and CSS variables, not arbitrary literals\n * - Optional dashed-border affordance for \"this slot is a drop zone\"\n *\n * Composability:\n * - Slots: `media`, `actions`, `footer`\n * - Render-prop: `renderMedia(ctx)` for fully custom illustrations\n * - Strings: every piece of copy is overridable via `strings`\n *\n * The library ships a small illustration set under\n * `./partials/illustrations/*` — import explicitly per resource:\n *\n * import { StackedCardsIllustration } from\n * './partials/illustrations';\n *\n * Adaptive shape per resource: pass a different `media` per surface.\n * Don't fork the component.\n */\nimport { forwardRef } from 'react';\n\nimport { Heading, Text } from '../../../typography';\nimport {\n\tEmpty,\n\tEmptyContent,\n\tEmptyHeader,\n\tEmptyMedia,\n} from '../../../base/feedback';\nimport { Stack } from '../../../base/structure';\nimport { useStrings } from '../../../../lib/strings';\nimport { useDensityConfig } from '../../../../lib/ui-provider';\nimport { cn } from '../../../../lib/utils';\n\nimport { defaultEmptyStateStrings } from './empty-state.strings';\nimport type {\n\tEmptyStateMediaVariant,\n\tEmptyStatePadding,\n\tEmptyStateProps,\n} from './empty-state.types';\n\nconst PADDING_CLASS: Record<EmptyStatePadding, string> = {\n\tsm: '!p-surface-xs',\n\tmd: '!p-surface',\n\tlg: '!p-surface-lg',\n};\n\nconst MEDIA_VARIANT_TO_PRIMITIVE: Record<EmptyStateMediaVariant, 'default' | 'icon'> = {\n\tnone: 'default',\n\ticon: 'icon',\n\t'icon-soft': 'icon',\n\tillustration: 'default',\n};\n\nconst MEDIA_EXTRA_CLASS: Record<EmptyStateMediaVariant, string | undefined> = {\n\tnone: undefined,\n\ticon: undefined,\n\t'icon-soft': 'bg-muted/50 text-muted-foreground',\n\tillustration: 'mb-space-xl',\n};\n\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState({\n\ttitle,\n\tdescription,\n\tmedia,\n\tmediaVariant = 'none',\n\trenderMedia,\n\tactions,\n\tfooter,\n\tpadding,\n\tborder = false,\n\tclassName,\n\tstrings: stringsProp,\n\tariaLabel,\n}, ref) {\n\tconst strings = useStrings(defaultEmptyStateStrings, stringsProp);\n\tconst { defaultScale } = useDensityConfig();\n\tconst resolvedPadding = padding ?? defaultScale ?? 'md';\n\n\tconst resolvedTitle = title ?? strings.title;\n\tconst resolvedDescription =\n\t\tdescription === false ? null : description ?? strings.description;\n\tconst mediaNode = renderMedia ? renderMedia({ mediaVariant }) : media;\n\tconst showMedia = !!mediaNode;\n\n\treturn (\n\t\t<Empty\n\t\t\tref={ref}\n\t\t\trole=\"status\"\n\t\t\taria-label={ariaLabel ?? strings.ariaLabel}\n\t\t\tclassName={cn('empty-state--component', \n\t\t\t\tPADDING_CLASS[resolvedPadding],\n\t\t\t\tborder ? 'border-border border border-dashed' : 'border-border border-0',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<EmptyHeader className=\"empty-state--header\">\n\t\t\t\t{!!showMedia && (\n\t\t\t\t\t<EmptyMedia\n\t\t\t\t\t\tvariant={MEDIA_VARIANT_TO_PRIMITIVE[mediaVariant]}\n\t\t\t\t\t\tclassName={cn('empty-state--media', MEDIA_EXTRA_CLASS[mediaVariant])}\n\t\t\t\t\t>\n\t\t\t\t\t\t{mediaNode}\n\t\t\t\t\t</EmptyMedia>\n\t\t\t\t)}\n\t\t\t\t<Heading\n\t\t\t\t\ttag=\"h3\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tclassName=\"empty-state--title border-0 pb-0 text-inherit\"\n\t\t\t\t\tdata-slot=\"empty-title\"\n\t\t\t\t>\n\t\t\t\t\t{resolvedTitle}\n\t\t\t\t</Heading>\n\t\t\t\t{!!resolvedDescription && (\n\t\t\t\t\t<Text\n\t\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tlineHeight=\"relaxed\"\n\t\t\t\t\t\tclassName=\"empty-state--description [&>a]:text-primary-accent [&>a]:underline [&>a]:underline-offset-4 hover:[&>a]:no-underline\"\n\t\t\t\t\t\tdata-slot=\"empty-description\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{resolvedDescription}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t</EmptyHeader>\n\t\t\t{(!!actions || !!footer) && (\n\t\t\t\t<EmptyContent className=\"empty-state--content\">\n\t\t\t\t\t{!!actions && (\n\t\t\t\t\t\t<Stack direction=\"horizontal\" gap={compositionRhythm.commands} justify=\"center\" className=\"empty-state--actions\">\n\t\t\t\t\t\t\t{actions}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!footer && (\n\t\t\t\t\t\t<Text tag=\"div\" size=\"xs\" type=\"secondary\" align=\"center\" className=\"empty-state--footer\">\n\t\t\t\t\t\t\t{footer}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</EmptyContent>\n\t\t\t)}\n\t\t</Empty>\n\t);\n});\n\nEmptyState.displayName = 'EmptyState';\n","import { cn } from '../../../../../../lib/utils';\nimport type { EmptyStateIllustrationProps } from './types';\n\n/** Two staggered document silhouettes; all coordinates belong to the drawing. */\nexport function DocumentStackIllustration({ className }: EmptyStateIllustrationProps) {\n\treturn (\n\t\t<div className={cn('document-stack-illustration--component relative h-24 w-32', className)} aria-hidden=\"true\">\n\t\t\t<svg viewBox=\"0 0 128 96\" className=\"h-full w-full overflow-visible\" focusable=\"false\">\n\t\t\t\t<g transform=\"rotate(-6 44 44)\">\n\t\t\t\t\t<rect x={4.5} y={4.5} width={79} height={79} style={{ rx: 'var(--radius-md)' }} className=\"fill-muted/70 dark:fill-muted/40 stroke-border/50 drop-shadow-xs\" />\n\t\t\t\t\t<rect x={13} y={13} width={48} height={8} rx={4} className=\"fill-muted\" />\n\t\t\t\t\t<rect x={13} y={27} width={40} height={6} rx={3} className=\"fill-muted/60\" />\n\t\t\t\t\t<rect x={13} y={39} width={36} height={6} rx={3} className=\"fill-muted/60\" />\n\t\t\t\t</g>\n\t\t\t\t<g transform=\"rotate(3 84 48)\">\n\t\t\t\t\t<rect x={44.5} y={8.5} width={79} height={79} style={{ rx: 'var(--radius-md)' }} className=\"fill-background stroke-border drop-shadow-xs\" />\n\t\t\t\t\t<rect x={53} y={17} width={48} height={8} rx={4} className=\"fill-muted\" />\n\t\t\t\t\t<rect x={53} y={31} width={40} height={6} rx={3} className=\"fill-muted/60\" />\n\t\t\t\t\t<rect x={53} y={43} width={36} height={6} rx={3} className=\"fill-muted/60\" />\n\t\t\t\t\t<circle cx={56} cy={76} r={3} className=\"fill-success\" />\n\t\t\t\t\t<rect x={63} y={73} width={32} height={6} rx={3} className=\"fill-muted/60\" />\n\t\t\t\t</g>\n\t\t\t</svg>\n\t\t</div>\n\t);\n}\n\nDocumentStackIllustration.displayName = 'DocumentStackIllustration';\n","import { useId } from 'react';\n\nimport { cn } from '../../../../../../lib/utils';\nimport type { EmptyStateIllustrationProps } from './types';\n\n/** Open inbox tray with a check; the scene has one intrinsic coordinate system. */\nexport function InboxCleanIllustration({ className }: EmptyStateIllustrationProps) {\n\tconst trayClip = useId();\n\treturn (\n\t\t<div className={cn('inbox-clean-illustration--component relative h-24 w-32', className)} aria-hidden=\"true\">\n\t\t\t<svg viewBox=\"0 0 128 96\" className=\"h-full w-full overflow-visible\" focusable=\"false\">\n\t\t\t\t<defs>\n\t\t\t\t\t<clipPath id={trayClip}>\n\t\t\t\t\t\t<rect x={0.5} y={40.5} width={127} height={55} style={{ rx: 'var(--radius)' }} />\n\t\t\t\t\t</clipPath>\n\t\t\t\t</defs>\n\t\t\t\t<circle cx={64} cy={16} r={15.5} className=\"fill-success/12 stroke-success/30\" />\n\t\t\t\t<path d=\"M59 16l3 3 7-7\" fill=\"none\" className=\"stroke-success\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n\t\t\t\t<rect x={0.5} y={40.5} width={127} height={55} style={{ rx: 'var(--radius)' }} className=\"fill-background drop-shadow-xs\" />\n\t\t\t\t<g clipPath={`url(#${trayClip})`}>\n\t\t\t\t\t<rect x={1} y={41} width={126} height={12} className=\"fill-muted/30\" />\n\t\t\t\t\t<rect x={13} y={66} width={48} height={6} rx={3} className=\"fill-muted/60\" />\n\t\t\t\t\t<rect x={13} y={76} width={32} height={6} rx={3} className=\"fill-muted/40\" />\n\t\t\t\t\t<circle cx={109} cy={74} r={6} className=\"fill-muted/40\" />\n\t\t\t\t</g>\n\t\t\t\t<rect x={0.5} y={40.5} width={127} height={55} style={{ rx: 'var(--radius)' }} fill=\"none\" className=\"stroke-border\" />\n\t\t\t</svg>\n\t\t</div>\n\t);\n}\n\nInboxCleanIllustration.displayName = 'InboxCleanIllustration';\n","import { Search } from 'lucide-react';\n\nimport { cn } from '../../../../../../lib/utils';\nimport type { EmptyStateIllustrationProps } from './types';\n\n/**\n * Magnifying-glass illustration centered on a soft tinted disk — for\n * \"no search results\", \"nothing matches your filters\" surfaces.\n */\nexport function SearchGlassIllustration({ className }: EmptyStateIllustrationProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'search-glass-illustration--component',\n\t\t\t\t'flex size-20 items-center justify-center rounded-full bg-muted/50 ring-8 ring-muted/30',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<Search className=\"size-8 text-muted-foreground\" />\n\t\t</div>\n\t);\n}\n\nSearchGlassIllustration.displayName = 'SearchGlassIllustration';\n","import { useId } from 'react';\n\nimport { cn } from '../../../../../../lib/utils';\nimport type { EmptyStateIllustrationProps } from './types';\n\n/** Three card silhouettes with a theme-backed fade; coordinates are drawing geometry. */\nexport function StackedCardsIllustration({ className }: EmptyStateIllustrationProps) {\n\tconst fadeId = useId();\n\treturn (\n\t\t<div className={cn('stacked-cards-illustration--component relative h-24 w-52', className)} aria-hidden=\"true\">\n\t\t\t<svg viewBox=\"0 0 208 96\" className=\"h-full w-full overflow-visible\" focusable=\"false\">\n\t\t\t\t<defs>\n\t\t\t\t\t<linearGradient id={fadeId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t<stop stopColor=\"var(--background)\" stopOpacity={0} />\n\t\t\t\t\t\t<stop offset=\"0.5\" stopColor=\"var(--background)\" stopOpacity={0.6} />\n\t\t\t\t\t\t<stop offset=\"1\" stopColor=\"var(--background)\" />\n\t\t\t\t\t</linearGradient>\n\t\t\t\t</defs>\n\t\t\t\t<rect x={24.5} y={0.5} width={159} height={23} style={{ rx: 'var(--radius)' }} className=\"fill-muted/60 dark:fill-muted/30 stroke-border/50\" />\n\t\t\t\t<rect x={12.5} y={12.5} width={183} height={23} style={{ rx: 'var(--radius)' }} className=\"fill-muted/80 dark:fill-muted/50 stroke-border/60\" />\n\t\t\t\t<rect x={0.5} y={24.5} width={207} height={63} style={{ rx: 'var(--radius)' }} className=\"fill-background stroke-border drop-shadow-xs\" />\n\t\t\t\t<rect x={17} y={40} width={32} height={32} rx={4} className=\"fill-muted\" />\n\t\t\t\t<rect x={61} y={44} width={97.5} height={10} rx={4} className=\"fill-muted\" />\n\t\t\t\t<rect x={61} y={60} width={65} height={8} rx={4} className=\"fill-muted/60\" />\n\t\t\t\t<rect y={64} width={208} height={32} fill={`url(#${fadeId})`} />\n\t\t\t</svg>\n\t\t</div>\n\t);\n}\n\nStackedCardsIllustration.displayName = 'StackedCardsIllustration';\n","import { cn } from '../../../../../../lib/utils';\nimport type { EmptyStateIllustrationProps } from './types';\n\n/**\n * Three overlapping avatar circles — for \"no team members\", \"no\n * customers\", \"no contributors\" surfaces.\n */\nexport function UsersCircleIllustration({ className }: EmptyStateIllustrationProps) {\n\treturn (\n\t\t<div className={cn('users-circle-illustration--component relative flex h-24 w-32 items-center justify-center', className)} aria-hidden=\"true\">\n\t\t\t<div className=\"bg-muted/50 border-border absolute left-2 size-12 rounded-full border-2\" />\n\t\t\t<div className=\"bg-muted border-border z-10 size-14 rounded-full border-2 shadow-sm\" />\n\t\t\t<div className=\"bg-muted/50 border-border absolute right-2 size-10 rounded-full border-2\" />\n\t\t</div>\n\t);\n}\n\nUsersCircleIllustration.displayName = 'UsersCircleIllustration';\n","/**\n * RelationshipCardFrame — card-free scaffold for app-owned resource cards.\n *\n * The package owns the visual grammar; the app owns the domain data,\n * selectors, mutations, and routing. Frame it with Card at the page,\n * drawer, or preview call site when card chrome is needed.\n */\nimport { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\n\nimport { Badge, type BadgeProps } from '../../base/badge';\nimport { Stack } from '../../base/structure';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nexport interface RelationshipCardFrameProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n\t/** Leading glyph. */\n\ticon?: ReactNode;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Chip beside the title. Pass a node, or an object to use the built-in badge. */\n\ttitleBadge?: ReactNode | { label: ReactNode; tone?: BadgeProps['tone']; size?: BadgeProps['size'] };\n\t/** Notice between the header and the body. */\n\talertSlot?: ReactNode;\n\t/** Label/value facts under the title. */\n\tmetadataSlot?: ReactNode;\n\t/** Main control in the header. */\n\tprimaryActionSlot?: ReactNode;\n\t/** Overflow menu at the end of the header. */\n\toverflowActionSlot?: ReactNode;\n\t/** Control that changes which relationship is shown. */\n\tselectorSlot?: ReactNode;\n\t/** Expanded detail region below the body. */\n\tdetailsSlot?: ReactNode;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Merged onto the header. */\n\theaderClassName?: string;\n\t/** Merged onto the body. */\n\tbodyClassName?: string;\n}\n\nfunction renderTitleBadge(badge: RelationshipCardFrameProps['titleBadge']) {\n\tif (!badge) return null;\n\tif (typeof badge === 'object' && !Array.isArray(badge) && 'label' in badge) {\n\t\treturn (\n\t\t\t<Badge inline tone={badge.tone ?? 'secondary'} size={badge.size}>\n\t\t\t\t{badge.label}\n\t\t\t</Badge>\n\t\t);\n\t}\n\treturn badge;\n}\n\nexport const RelationshipCardFrame = forwardRef<HTMLDivElement, RelationshipCardFrameProps>(function RelationshipCardFrame({\n\ticon,\n\ttitle,\n\ttitleBadge,\n\talertSlot,\n\tmetadataSlot,\n\tprimaryActionSlot,\n\toverflowActionSlot,\n\tselectorSlot,\n\tdetailsSlot,\n\tclassName,\n\theaderClassName,\n\tbodyClassName,\n\t...props\n}, ref) {\n\tconst hasBody =\n\t\t!!alertSlot ||\n\t\t!!metadataSlot ||\n\t\t!!primaryActionSlot ||\n\t\t!!selectorSlot ||\n\t\t!!detailsSlot;\n\n\treturn (\n\t\t<Stack\n\t\t\tref={ref}\n\t\t\tclassName={cn('relationship-card-frame--component', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<Stack direction=\"horizontal\" gap=\"md\" align=\"start\" justify=\"between\" wrap={false} className={cn('relationship-card-frame--header', headerClassName)}>\n\t\t\t\t<Stack direction=\"horizontal\" gap=\"md\" align=\"start\" wrap={false} className=\"relationship-card-frame--header-start\">\n\t\t\t\t\t{!!icon && (\n\t\t\t\t\t\t<div className=\"relationship-card-frame--icon mt-space-2xs inline-flex shrink-0 items-center text-muted-foreground\">\n\t\t\t\t\t\t\t{icon}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"min-w-0\">\n\t\t\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" className=\"relationship-card-frame--title-row\">\n\t\t\t\t\t\t\t<Text type=\"inherit\" tag=\"div\" weight=\"medium\" className=\"relationship-card-frame--title truncate\">\n\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t{!!titleBadge && (\n\t\t\t\t\t\t\t\t<span className=\"relationship-card-frame--title-badge inline-flex\">\n\t\t\t\t\t\t\t\t\t{renderTitleBadge(titleBadge)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</div>\n\t\t\t\t</Stack>\n\t\t\t\t{!!overflowActionSlot && (\n\t\t\t\t\t<div className=\"relationship-card-frame--overflow shrink-0\">\n\t\t\t\t\t\t{overflowActionSlot}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Stack>\n\n\t\t\t{!!hasBody && (\n\t\t\t\t<Stack className={cn('relationship-card-frame--body', bodyClassName)}>\n\t\t\t\t\t{!!alertSlot && <div className=\"relationship-card-frame--alert\">{alertSlot}</div>}\n\t\t\t\t\t{!!selectorSlot && <div className=\"relationship-card-frame--selector\">{selectorSlot}</div>}\n\t\t\t\t\t{!!metadataSlot && <div className=\"relationship-card-frame--metadata\">{metadataSlot}</div>}\n\t\t\t\t\t{!!primaryActionSlot && <div className=\"relationship-card-frame--primary-action\">{primaryActionSlot}</div>}\n\t\t\t\t\t{!!detailsSlot && <div className=\"relationship-card-frame--details\">{detailsSlot}</div>}\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t</Stack>\n\t);\n});\n\nRelationshipCardFrame.displayName = 'RelationshipCardFrame';\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,SAAgByB,EAAS,EACxB,UACA,SAAM,GACN,YAQE;CACF,OACC,kBAAC,OAAD;EAAK,WAAWtB,EAAG,sBAAsB,gCAAgC;EAAzE,UAAA,CACC,kBAAC,OAAD;GAAK,WAAU;GACd,UAAA,MAAM,KAAK,EAAE,QAAQuB,EAAI,IAAI,GAAG,MAChC,kBAAC,OAAD,EAEC,WAAWvB,EACV,0BACAwB,IAAIC,IAAQ,wBAAwB,UACrC,EACA,GALKD,CAKL,CACD;EACI,CAAA,GACJ,CAAC,CAACE,KACF,kBAACzB,GAAD;GACC,MAAK;GACL,MAAK;GAEJ,UAAAyB;EACI,CAAA,CAEH;;AAEP;AAIA,SAAgBC,EAAM,EACrB,UACA,UACA,UACA,gBAUE;CACF,OACC,kBAACtB,GAAD;EAAO,WAAU;EAAa,OAAM;EAAS,SAAQ;EAAU,KAAI;EAAnE,UAAA;GACC,kBAACJ,GAAD;IACC,MAAK;IACL,WAAU;IAET,UAAAyB;GACI,CAAA;GACL,CAAC,CAACE,KACF,kBAAChB,GAAD;IACC,MAAMiB,KAAa;IAElB,UAAAD;GACK,CAAA;GAEP,CAAC,CAACH,KAAS,CAACG,KACZ,kBAAC3B,GAAD;IACC,MAAK;IACL,QAAO;IACP,WAAU;IAET,UAAAwB;GACI,CAAA;EAED;;AAET;;;AChFA,SAAgBK,EAAmB,EAClC,UACA,gBACA,iBACA,SACA,kBACA,UACA,iBACA,eACA,YACA,gBAC2B;CAC3B,OACC,kBAAChB,GAAD;EACQ;EACM;EACb,aAAaiB,EAAa,SAAS,IAClC,kBAAC1B,GAAD;GAAO,WAAU;GAAa,MAAA;GAAK,OAAM;GAAS,KAAI;GACpD,UAAA0B,EAAa,KAAK,MAClB,kBA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;IACxF,CAAC,CAACC,KAAqB,kBAAC,OAAD;KAAK,WAAU;KAA2C,UAAAA;IAAuB,CAAA;IACxG,CAAC,CAACE,KAAe,kBAAC,OAAD;KAAK,WAAU;KAAoC,UAAAA;IAAiB,CAAA;GAChF;EAEF,CAAA,CAAA;;AAET,CAAC;AAED,EAAsB,cAAc"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { o as e } from "./ui-provider-
|
|
3
|
-
import { t } from "./utils-
|
|
4
|
-
import { c as n } from "./typography-
|
|
5
|
-
import { n as r, t as i } from "./value-typography-
|
|
2
|
+
import { o as e } from "./ui-provider-CQCuCBcy.js";
|
|
3
|
+
import { t } from "./utils-CF3c95Io.js";
|
|
4
|
+
import { c as n } from "./typography-CSyJrh28.js";
|
|
5
|
+
import { n as r, t as i } from "./value-typography-ClupF0Gz.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
8
|
import { format as c, formatDistanceToNow as l, isValid as u, parseISO as d } from "date-fns";
|
|
@@ -141,4 +141,4 @@ x.displayName = "Date";
|
|
|
141
141
|
//#endregion
|
|
142
142
|
export { S as a, T as i, w as n, y as o, C as r, g as s, x as t };
|
|
143
143
|
|
|
144
|
-
//# sourceMappingURL=date-
|
|
144
|
+
//# sourceMappingURL=date-Q7jnXxpk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-DCrsDTZc.js","names":["formatDateFns","_Fragment","useDatesConfig","Text","useValueTypography","emptyValueTypography","Fragment$1","datePresetFormats","timePresetFormats","DATE_ROLE","RELATIVE_TIME_ROLE","parseDateInput","value","isValid","parsed","parseISO","formatDateValue","format","formatString","locale","hasDateInput","formatDateRange","preset","fromLabel","from","toLabel","to","separator","FormattedDate","props","resolved","label","typography","weight","cn","componentClassName","className","emptyLabel","DatePrimitive","dates","Time","DateTime","dateFormat","timeFormat","DateRange","resolvedLocale","hasLabel","RelativeTime","formatRelativeTime","formatDistanceToNow"],"sources":["../src/components/primitives/date.tsx"],"sourcesContent":["import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\nimport {\n\tformat as formatDateFns,\n\tformatDistanceToNow,\n\tisValid,\n\tparseISO,\n\ttype Locale,\n} from 'date-fns';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { useDatesConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\nimport { emptyValueTypography, useValueTypography, type ValueTypographyRole } from './value-typography';\n\ntype NativeDate = InstanceType<typeof globalThis.Date>;\nexport type DateInput = NativeDate | string | number | null | undefined;\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n\nexport type DatePreset = 'compact' | 'short' | 'medium' | 'long';\n\nexport interface DateProps extends SpanProps {\n\t/** A native Date, ISO string or millisecond timestamp. Unparseable input renders the empty label. */\n\tvalue?: DateInput;\n\t/** date-fns pattern; prefer `preset` so a screen stays consistent. */\n\tformat?: string;\n\t/** Library preset. Defaults to the provider `dates.format`, then `medium`. */\n\tpreset?: DatePreset;\n\t/** date-fns locale. Defaults to the provider `dates.locale`. */\n\tlocale?: Locale;\n\t/** Rendered with the shared empty treatment when the value is absent or invalid. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\t/** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\t/** Font weight. Defaults to `regular`; inside running text, the surrounding weight. */\n\tweight?: TextProps['weight'];\n\t/** Colour role. Defaults to `main`; inside running text, the surrounding colour. */\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nexport interface TimeProps extends Omit<DateProps, 'preset'> {\n\tpreset?: 'short' | 'medium';\n}\n\nexport interface DateTimeProps extends DateProps {\n\ttimeFormat?: string;\n}\n\nexport interface DateRangeValue {\n\tfrom?: DateInput;\n\tto?: DateInput;\n}\n\nexport interface FormatDateRangeOptions {\n\tformat?: string;\n\tpreset?: DatePreset;\n\tlocale?: Locale;\n\tseparator?: string;\n}\n\nexport interface DateRangeProps extends Omit<DateProps, 'value'>, DateRangeValue {\n\tseparator?: ReactNode;\n}\n\nexport interface RelativeTimeProps extends SpanProps {\n\tvalue?: DateInput;\n\tlocale?: Locale;\n\t/** Adds \"ago\"/\"in\". Defaults to `true`. */\n\taddSuffix?: boolean;\n\tincludeSeconds?: boolean;\n\t/** Rendered with the shared empty treatment when the value is absent or invalid. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\t/** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\t/** Font weight. Defaults to `regular`; inside running text, the surrounding weight. */\n\tweight?: TextProps['weight'];\n\t/** Colour role. Defaults to `secondary` for feeds; inside running text, the surrounding colour. */\n\ttype?: TextProps['type'];\n\tformatRelativeTime?: (iso: string) => string;\n\tref?: Ref<HTMLSpanElement>;\n}\n\nconst datePresetFormats: Record<DatePreset, string> = {\n\tcompact: 'dd MMM',\n\tshort: 'P',\n\tmedium: 'PP',\n\tlong: 'PPP',\n};\n\nconst timePresetFormats: Record<NonNullable<TimeProps['preset']>, string> = {\n\tshort: 'p',\n\tmedium: 'pp',\n};\n\nconst DATE_ROLE: ValueTypographyRole = { type: 'main', weight: 'regular' };\nconst RELATIVE_TIME_ROLE: ValueTypographyRole = { type: 'secondary', weight: 'regular' };\n\nexport function parseDateInput(value: DateInput): NativeDate | null {\n\tif (value === null || value === undefined || value === '') return null;\n\tif (value instanceof globalThis.Date) return isValid(value) ? value : null;\n\tconst parsed = typeof value === 'string' ? parseISO(value) : new globalThis.Date(value);\n\treturn isValid(parsed) ? parsed : null;\n}\n\nfunction formatDateValue(value: DateInput, formatString: string, locale?: Locale) {\n\tconst parsed = parseDateInput(value);\n\tif (!parsed) return null;\n\treturn formatDateFns(parsed, formatString, locale ? { locale } : undefined);\n}\n\nfunction hasDateInput(value: DateInput) {\n\treturn value !== null && value !== undefined && value !== '';\n}\n\nexport function formatDateRange(\n\t{ from, to }: DateRangeValue,\n\t{\n\t\tformat,\n\t\tpreset = 'medium',\n\t\tlocale,\n\t\tseparator = ' – ',\n\t}: FormatDateRangeOptions = {},\n): string | null {\n\tconst formatString = format ?? datePresetFormats[preset];\n\tconst fromLabel = formatDateValue(from, formatString, locale);\n\tconst toLabel = formatDateValue(to, formatString, locale);\n\tif ((hasDateInput(from) && fromLabel === null) || (hasDateInput(to) && toLabel === null)) return null;\n\tif (fromLabel && toLabel) return `${fromLabel}${separator}${toLabel}`;\n\treturn fromLabel ?? toLabel;\n}\n\ninterface FormattedDateProps extends SpanProps {\n\tcomponentClassName: string;\n\tvalue: DateInput;\n\tformatString: string;\n\tlocale?: Locale;\n\temptyLabel: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/** Shared span for Date, Time and DateTime: value typography plus the empty treatment. */\nfunction FormattedDate({\n\tcomponentClassName,\n\tvalue,\n\tformatString,\n\tlocale,\n\temptyLabel,\n\tsize,\n\talign,\n\tweight,\n\ttype,\n\tclassName,\n\tref,\n\t...props\n}: FormattedDateProps) {\n\tconst resolved = useValueTypography({ size, type, weight }, DATE_ROLE);\n\tconst label = formatDateValue(value, formatString, locale);\n\tconst typography = label === null ? emptyValueTypography(resolved, weight) : resolved;\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn(componentClassName, 'inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label ?? emptyLabel}\n\t\t</Text>\n\t);\n}\n\nexport function DatePrimitive({\n\tvalue,\n\tformat,\n\tpreset,\n\tlocale,\n\temptyLabel = EMPTY,\n\t...props\n}: DateProps) {\n\tconst dates = useDatesConfig();\n\tconst formatString = format ?? (preset ? datePresetFormats[preset] : dates.format ?? datePresetFormats.medium);\n\n\treturn (\n\t\t<FormattedDate\n\t\t\t{...props}\n\t\t\tcomponentClassName=\"date--component\"\n\t\t\tvalue={value}\n\t\t\tformatString={formatString}\n\t\t\tlocale={locale ?? dates.locale}\n\t\t\temptyLabel={emptyLabel}\n\t\t/>\n\t);\n}\n\nexport function Time({\n\tvalue,\n\tformat,\n\tpreset = 'short',\n\tlocale,\n\temptyLabel = EMPTY,\n\t...props\n}: TimeProps) {\n\tconst dates = useDatesConfig();\n\n\treturn (\n\t\t<FormattedDate\n\t\t\t{...props}\n\t\t\tcomponentClassName=\"time--component\"\n\t\t\tvalue={value}\n\t\t\tformatString={format ?? timePresetFormats[preset]}\n\t\t\tlocale={locale ?? dates.locale}\n\t\t\temptyLabel={emptyLabel}\n\t\t/>\n\t);\n}\n\nexport function DateTime({\n\tvalue,\n\tformat,\n\ttimeFormat = 'p',\n\tpreset,\n\tlocale,\n\temptyLabel = EMPTY,\n\t...props\n}: DateTimeProps) {\n\tconst dates = useDatesConfig();\n\tconst dateFormat = preset ? datePresetFormats[preset] : dates.format ?? datePresetFormats.medium;\n\n\treturn (\n\t\t<FormattedDate\n\t\t\t{...props}\n\t\t\tcomponentClassName=\"date-time--component\"\n\t\t\tvalue={value}\n\t\t\tformatString={format ?? `${dateFormat} ${timeFormat}`}\n\t\t\tlocale={locale ?? dates.locale}\n\t\t\temptyLabel={emptyLabel}\n\t\t/>\n\t);\n}\n\nexport function DateRange({\n\tfrom,\n\tto,\n\tformat,\n\tpreset,\n\tlocale,\n\tseparator = ' – ',\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight,\n\ttype,\n\tclassName,\n\tref,\n\t...props\n}: DateRangeProps) {\n\tconst dates = useDatesConfig();\n\tconst resolved = useValueTypography({ size, type, weight }, DATE_ROLE);\n\tconst formatString = format ?? (preset ? datePresetFormats[preset] : dates.format ?? datePresetFormats.medium);\n\tconst resolvedLocale = locale ?? dates.locale;\n\tconst fromLabel = formatDateValue(from, formatString, resolvedLocale);\n\tconst toLabel = formatDateValue(to, formatString, resolvedLocale);\n\tconst invalid = (hasDateInput(from) && fromLabel === null) || (hasDateInput(to) && toLabel === null);\n\tconst hasLabel = !invalid && Boolean(fromLabel || toLabel);\n\tconst typography = hasLabel ? resolved : emptyValueTypography(resolved, weight);\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn('date-range--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{hasLabel ? (\n\t\t\t\t<>\n\t\t\t\t\t{fromLabel}\n\t\t\t\t\t{!!fromLabel && !!toLabel && separator}\n\t\t\t\t\t{toLabel}\n\t\t\t\t</>\n\t\t\t) : emptyLabel}\n\t\t</Text>\n\t);\n}\n\nexport function RelativeTime({\n\tvalue,\n\tlocale,\n\taddSuffix = true,\n\tincludeSeconds,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight,\n\ttype,\n\tformatRelativeTime,\n\tclassName,\n\tref,\n\t...props\n}: RelativeTimeProps) {\n\tconst dates = useDatesConfig();\n\tconst resolved = useValueTypography({ size, type, weight }, RELATIVE_TIME_ROLE);\n\tconst parsed = parseDateInput(value);\n\tconst resolvedLocale = locale ?? dates.locale;\n\tconst label = parsed\n\t\t? formatRelativeTime?.(parsed.toISOString()) ??\n\t\t\tdates.formatRelativeTime?.(parsed.toISOString()) ??\n\t\t\tformatDistanceToNow(parsed, {\n\t\t\t\taddSuffix,\n\t\t\t\tincludeSeconds,\n\t\t\t\t...(resolvedLocale ? { locale: resolvedLocale } : {}),\n\t\t\t})\n\t\t: null;\n\tconst typography = label === null ? emptyValueTypography(resolved, weight) : resolved;\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn('relative-time--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label ?? emptyLabel}\n\t\t</Text>\n\t);\n}\n\nDatePrimitive.displayName = 'Date';\n"],"mappings":";;;;;;;;;AAuFA,IAAMO,IAAgD;CACrD,SAAS;CACT,OAAO;CACP,QAAQ;CACR,MAAM;AACP,GAEMC,IAAsE;CAC3E,OAAO;CACP,QAAQ;AACT,GAEMC,IAAiC;CAAE,MAAM;CAAQ,QAAQ;AAAU,GACnEC,IAA0C;CAAE,MAAM;CAAa,QAAQ;AAAU;AAEvF,SAAgBC,EAAe,GAAqC;CACnE,IAAIC,KAAU,QAA+BA,MAAU,IAAI,OAAO;CAClE,IAAIA,aAAiB,WAAW,MAAM,OAAOC,EAAQD,CAAK,IAAIA,IAAQ;CACtE,IAAME,IAAS,OAAOF,KAAU,WAAWG,EAASH,CAAK,IAAI,IAAI,WAAW,KAAKA,CAAK;CACtF,OAAOC,EAAQC,CAAM,IAAIA,IAAS;AACnC;AAEA,SAASE,EAAgB,GAAkB,GAAsB,GAAiB;CACjF,IAAMF,IAASH,EAAeC,CAAK;CAEnC,OADKE,IACEd,EAAcc,GAAQI,GAAcC,IAAS,EAAE,UAAO,IAAI,KAAA,CAAS,IADtD;AAErB;AAEA,SAASC,EAAa,GAAkB;CACvC,OAAOR,KAAU,QAA+BA,MAAU;AAC3D;AAEA,SAAgBS,EACf,EAAE,SAAM,SACR,EACC,WACA,YAAS,UACT,WACA,eAAY,UACe,CAAC,GACb;CAChB,IAAMH,IAAeD,KAAUV,EAAkBe,IAC3CC,IAAYP,EAAgBQ,GAAMN,GAAcC,CAAM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WACA,SACA,uBACA,cACA,QACA,GAAGlB,KACkB;CACrB,IAAMU,IAAQrC,EAAe,GACvB4B,IAAW1B,EAAmB;EAAE;EAAM;EAAM;CAAO,GAAGM,CAAkB,GACxEI,IAASH,EAAeC,CAAK,GAC7BiC,IAAiB1B,KAAUoB,EAAM,QACjCR,IAAQjB,IACXkC,IAAqBlC,EAAO,YAAY,CAAC,KAC1CyB,EAAM,qBAAqBzB,EAAO,YAAY,CAAC,KAC/CmC,EAAoBnC,GAAQ;EAC3B;EACA;EACA,GAAI+B,IAAiB,EAAE,QAAQA,EAAe,IAAI,CAAC;CACpD,CAAC,IACA,MACGb,IAAaD,MAAU,OAAO1B,EAAqByB,GAAUG,CAAM,IAAIH;CAE7E,OACC,kBAAC3B,GAAD;EACM;EACL,KAAI;EACJ,MAAM6B,EAAW;EACV;EACP,QAAQA,EAAW;EACnB,MAAMA,EAAW;EACjB,YAAYA,EAAW;EACvB,WAAWE,EAAG,gDAAgDE,CAAS;EACvE,GAAIP;EAEH,UAAAE,KAASM;CACL,CAAA;AAER;AAEA,EAAc,cAAc"}
|
|
1
|
+
{"version":3,"file":"date-Q7jnXxpk.js","names":["formatDateFns","_Fragment","useDatesConfig","Text","useValueTypography","emptyValueTypography","Fragment$1","datePresetFormats","timePresetFormats","DATE_ROLE","RELATIVE_TIME_ROLE","parseDateInput","value","isValid","parsed","parseISO","formatDateValue","format","formatString","locale","hasDateInput","formatDateRange","preset","fromLabel","from","toLabel","to","separator","FormattedDate","props","resolved","label","typography","weight","cn","componentClassName","className","emptyLabel","DatePrimitive","dates","Time","DateTime","dateFormat","timeFormat","DateRange","resolvedLocale","hasLabel","RelativeTime","formatRelativeTime","formatDistanceToNow"],"sources":["../src/components/primitives/date.tsx"],"sourcesContent":["import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\nimport {\n\tformat as formatDateFns,\n\tformatDistanceToNow,\n\tisValid,\n\tparseISO,\n\ttype Locale,\n} from 'date-fns';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { useDatesConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\nimport { emptyValueTypography, useValueTypography, type ValueTypographyRole } from './value-typography';\n\ntype NativeDate = InstanceType<typeof globalThis.Date>;\nexport type DateInput = NativeDate | string | number | null | undefined;\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n\nexport type DatePreset = 'compact' | 'short' | 'medium' | 'long';\n\nexport interface DateProps extends SpanProps {\n\t/** A native Date, ISO string or millisecond timestamp. Unparseable input renders the empty label. */\n\tvalue?: DateInput;\n\t/** date-fns pattern; prefer `preset` so a screen stays consistent. */\n\tformat?: string;\n\t/** Library preset. Defaults to the provider `dates.format`, then `medium`. */\n\tpreset?: DatePreset;\n\t/** date-fns locale. Defaults to the provider `dates.locale`. */\n\tlocale?: Locale;\n\t/** Rendered with the shared empty treatment when the value is absent or invalid. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\t/** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\t/** Font weight. Defaults to `regular`; inside running text, the surrounding weight. */\n\tweight?: TextProps['weight'];\n\t/** Colour role. Defaults to `main`; inside running text, the surrounding colour. */\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nexport interface TimeProps extends Omit<DateProps, 'preset'> {\n\tpreset?: 'short' | 'medium';\n}\n\nexport interface DateTimeProps extends DateProps {\n\ttimeFormat?: string;\n}\n\nexport interface DateRangeValue {\n\tfrom?: DateInput;\n\tto?: DateInput;\n}\n\nexport interface FormatDateRangeOptions {\n\tformat?: string;\n\tpreset?: DatePreset;\n\tlocale?: Locale;\n\tseparator?: string;\n}\n\nexport interface DateRangeProps extends Omit<DateProps, 'value'>, DateRangeValue {\n\tseparator?: ReactNode;\n}\n\nexport interface RelativeTimeProps extends SpanProps {\n\tvalue?: DateInput;\n\tlocale?: Locale;\n\t/** Adds \"ago\"/\"in\". Defaults to `true`. */\n\taddSuffix?: boolean;\n\tincludeSeconds?: boolean;\n\t/** Rendered with the shared empty treatment when the value is absent or invalid. Defaults to an em dash. */\n\temptyLabel?: ReactNode;\n\t/** Text size. Defaults to the provider text size; inside running text, the surrounding size. */\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\t/** Font weight. Defaults to `regular`; inside running text, the surrounding weight. */\n\tweight?: TextProps['weight'];\n\t/** Colour role. Defaults to `secondary` for feeds; inside running text, the surrounding colour. */\n\ttype?: TextProps['type'];\n\tformatRelativeTime?: (iso: string) => string;\n\tref?: Ref<HTMLSpanElement>;\n}\n\nconst datePresetFormats: Record<DatePreset, string> = {\n\tcompact: 'dd MMM',\n\tshort: 'P',\n\tmedium: 'PP',\n\tlong: 'PPP',\n};\n\nconst timePresetFormats: Record<NonNullable<TimeProps['preset']>, string> = {\n\tshort: 'p',\n\tmedium: 'pp',\n};\n\nconst DATE_ROLE: ValueTypographyRole = { type: 'main', weight: 'regular' };\nconst RELATIVE_TIME_ROLE: ValueTypographyRole = { type: 'secondary', weight: 'regular' };\n\nexport function parseDateInput(value: DateInput): NativeDate | null {\n\tif (value === null || value === undefined || value === '') return null;\n\tif (value instanceof globalThis.Date) return isValid(value) ? value : null;\n\tconst parsed = typeof value === 'string' ? parseISO(value) : new globalThis.Date(value);\n\treturn isValid(parsed) ? parsed : null;\n}\n\nfunction formatDateValue(value: DateInput, formatString: string, locale?: Locale) {\n\tconst parsed = parseDateInput(value);\n\tif (!parsed) return null;\n\treturn formatDateFns(parsed, formatString, locale ? { locale } : undefined);\n}\n\nfunction hasDateInput(value: DateInput) {\n\treturn value !== null && value !== undefined && value !== '';\n}\n\nexport function formatDateRange(\n\t{ from, to }: DateRangeValue,\n\t{\n\t\tformat,\n\t\tpreset = 'medium',\n\t\tlocale,\n\t\tseparator = ' – ',\n\t}: FormatDateRangeOptions = {},\n): string | null {\n\tconst formatString = format ?? datePresetFormats[preset];\n\tconst fromLabel = formatDateValue(from, formatString, locale);\n\tconst toLabel = formatDateValue(to, formatString, locale);\n\tif ((hasDateInput(from) && fromLabel === null) || (hasDateInput(to) && toLabel === null)) return null;\n\tif (fromLabel && toLabel) return `${fromLabel}${separator}${toLabel}`;\n\treturn fromLabel ?? toLabel;\n}\n\ninterface FormattedDateProps extends SpanProps {\n\tcomponentClassName: string;\n\tvalue: DateInput;\n\tformatString: string;\n\tlocale?: Locale;\n\temptyLabel: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/** Shared span for Date, Time and DateTime: value typography plus the empty treatment. */\nfunction FormattedDate({\n\tcomponentClassName,\n\tvalue,\n\tformatString,\n\tlocale,\n\temptyLabel,\n\tsize,\n\talign,\n\tweight,\n\ttype,\n\tclassName,\n\tref,\n\t...props\n}: FormattedDateProps) {\n\tconst resolved = useValueTypography({ size, type, weight }, DATE_ROLE);\n\tconst label = formatDateValue(value, formatString, locale);\n\tconst typography = label === null ? emptyValueTypography(resolved, weight) : resolved;\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn(componentClassName, 'inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label ?? emptyLabel}\n\t\t</Text>\n\t);\n}\n\nexport function DatePrimitive({\n\tvalue,\n\tformat,\n\tpreset,\n\tlocale,\n\temptyLabel = EMPTY,\n\t...props\n}: DateProps) {\n\tconst dates = useDatesConfig();\n\tconst formatString = format ?? (preset ? datePresetFormats[preset] : dates.format ?? datePresetFormats.medium);\n\n\treturn (\n\t\t<FormattedDate\n\t\t\t{...props}\n\t\t\tcomponentClassName=\"date--component\"\n\t\t\tvalue={value}\n\t\t\tformatString={formatString}\n\t\t\tlocale={locale ?? dates.locale}\n\t\t\temptyLabel={emptyLabel}\n\t\t/>\n\t);\n}\n\nexport function Time({\n\tvalue,\n\tformat,\n\tpreset = 'short',\n\tlocale,\n\temptyLabel = EMPTY,\n\t...props\n}: TimeProps) {\n\tconst dates = useDatesConfig();\n\n\treturn (\n\t\t<FormattedDate\n\t\t\t{...props}\n\t\t\tcomponentClassName=\"time--component\"\n\t\t\tvalue={value}\n\t\t\tformatString={format ?? timePresetFormats[preset]}\n\t\t\tlocale={locale ?? dates.locale}\n\t\t\temptyLabel={emptyLabel}\n\t\t/>\n\t);\n}\n\nexport function DateTime({\n\tvalue,\n\tformat,\n\ttimeFormat = 'p',\n\tpreset,\n\tlocale,\n\temptyLabel = EMPTY,\n\t...props\n}: DateTimeProps) {\n\tconst dates = useDatesConfig();\n\tconst dateFormat = preset ? datePresetFormats[preset] : dates.format ?? datePresetFormats.medium;\n\n\treturn (\n\t\t<FormattedDate\n\t\t\t{...props}\n\t\t\tcomponentClassName=\"date-time--component\"\n\t\t\tvalue={value}\n\t\t\tformatString={format ?? `${dateFormat} ${timeFormat}`}\n\t\t\tlocale={locale ?? dates.locale}\n\t\t\temptyLabel={emptyLabel}\n\t\t/>\n\t);\n}\n\nexport function DateRange({\n\tfrom,\n\tto,\n\tformat,\n\tpreset,\n\tlocale,\n\tseparator = ' – ',\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight,\n\ttype,\n\tclassName,\n\tref,\n\t...props\n}: DateRangeProps) {\n\tconst dates = useDatesConfig();\n\tconst resolved = useValueTypography({ size, type, weight }, DATE_ROLE);\n\tconst formatString = format ?? (preset ? datePresetFormats[preset] : dates.format ?? datePresetFormats.medium);\n\tconst resolvedLocale = locale ?? dates.locale;\n\tconst fromLabel = formatDateValue(from, formatString, resolvedLocale);\n\tconst toLabel = formatDateValue(to, formatString, resolvedLocale);\n\tconst invalid = (hasDateInput(from) && fromLabel === null) || (hasDateInput(to) && toLabel === null);\n\tconst hasLabel = !invalid && Boolean(fromLabel || toLabel);\n\tconst typography = hasLabel ? resolved : emptyValueTypography(resolved, weight);\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn('date-range--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{hasLabel ? (\n\t\t\t\t<>\n\t\t\t\t\t{fromLabel}\n\t\t\t\t\t{!!fromLabel && !!toLabel && separator}\n\t\t\t\t\t{toLabel}\n\t\t\t\t</>\n\t\t\t) : emptyLabel}\n\t\t</Text>\n\t);\n}\n\nexport function RelativeTime({\n\tvalue,\n\tlocale,\n\taddSuffix = true,\n\tincludeSeconds,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight,\n\ttype,\n\tformatRelativeTime,\n\tclassName,\n\tref,\n\t...props\n}: RelativeTimeProps) {\n\tconst dates = useDatesConfig();\n\tconst resolved = useValueTypography({ size, type, weight }, RELATIVE_TIME_ROLE);\n\tconst parsed = parseDateInput(value);\n\tconst resolvedLocale = locale ?? dates.locale;\n\tconst label = parsed\n\t\t? formatRelativeTime?.(parsed.toISOString()) ??\n\t\t\tdates.formatRelativeTime?.(parsed.toISOString()) ??\n\t\t\tformatDistanceToNow(parsed, {\n\t\t\t\taddSuffix,\n\t\t\t\tincludeSeconds,\n\t\t\t\t...(resolvedLocale ? { locale: resolvedLocale } : {}),\n\t\t\t})\n\t\t: null;\n\tconst typography = label === null ? emptyValueTypography(resolved, weight) : resolved;\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={typography.size}\n\t\t\talign={align}\n\t\t\tweight={typography.weight}\n\t\t\ttype={typography.type}\n\t\t\tlineHeight={typography.lineHeight}\n\t\t\tclassName={cn('relative-time--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label ?? emptyLabel}\n\t\t</Text>\n\t);\n}\n\nDatePrimitive.displayName = 'Date';\n"],"mappings":";;;;;;;;;AAuFA,IAAMO,IAAgD;CACrD,SAAS;CACT,OAAO;CACP,QAAQ;CACR,MAAM;AACP,GAEMC,IAAsE;CAC3E,OAAO;CACP,QAAQ;AACT,GAEMC,IAAiC;CAAE,MAAM;CAAQ,QAAQ;AAAU,GACnEC,IAA0C;CAAE,MAAM;CAAa,QAAQ;AAAU;AAEvF,SAAgBC,EAAe,GAAqC;CACnE,IAAIC,KAAU,QAA+BA,MAAU,IAAI,OAAO;CAClE,IAAIA,aAAiB,WAAW,MAAM,OAAOC,EAAQD,CAAK,IAAIA,IAAQ;CACtE,IAAME,IAAS,OAAOF,KAAU,WAAWG,EAASH,CAAK,IAAI,IAAI,WAAW,KAAKA,CAAK;CACtF,OAAOC,EAAQC,CAAM,IAAIA,IAAS;AACnC;AAEA,SAASE,EAAgB,GAAkB,GAAsB,GAAiB;CACjF,IAAMF,IAASH,EAAeC,CAAK;CAEnC,OADKE,IACEd,EAAcc,GAAQI,GAAcC,IAAS,EAAE,UAAO,IAAI,KAAA,CAAS,IADtD;AAErB;AAEA,SAASC,EAAa,GAAkB;CACvC,OAAOR,KAAU,QAA+BA,MAAU;AAC3D;AAEA,SAAgBS,EACf,EAAE,SAAM,SACR,EACC,WACA,YAAS,UACT,WACA,eAAY,UACe,CAAC,GACb;CAChB,IAAMH,IAAeD,KAAUV,EAAkBe,IAC3CC,IAAYP,EAAgBQ,GAAMN,GAAcC,CAAM,GACtDM,IAAUT,EAAgBU,GAAIR,GAAcC,CAAM;CAGxD,OAFKC,EAAaI,CAAI,KAAKD,MAAc,QAAUH,EAAaM,CAAE,KAAKD,MAAY,OAAc,OAC7FF,KAAaE,IAAgB,GAAGF,IAAYI,IAAYF,MACrDF,KAAaE;AACrB;AAgBA,SAASG,EAAc,EACtB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AAqBlC,EAAO,YAAY,CAAC,KAC1CyB,EAAM,qBAAqBzB,EAAO,YAAY,CAAC,KAC/CmC,EAAoBnC,GAAQ;EAC3B;EACA;EACA,GAAI+B,IAAiB,EAAE,QAAQA,EAAe,IAAI,CAAC;CACpD,CAAC,IACA,MACGb,IAAaD,MAAU,OAAO1B,EAAqByB,GAAUG,CAAM,IAAIH;CAE7E,OACC,kBAAC3B,GAAD;EACM;EACL,KAAI;EACJ,MAAM6B,EAAW;EACV;EACP,QAAQA,EAAW;EACnB,MAAMA,EAAW;EACjB,YAAYA,EAAW;EACvB,WAAWE,EAAG,gDAAgDE,CAAS;EACvE,GAAIP;EAEH,UAAAE,KAASM;CACL,CAAA;AAER;AAEA,EAAc,cAAc"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { o as e, s as t } from "./ui-provider-
|
|
2
|
+
import { o as e, s as t } from "./ui-provider-CQCuCBcy.js";
|
|
3
3
|
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-
|
|
5
|
-
import { t as i } from "./affordance-geometry.generated-
|
|
6
|
-
import { n as a } from "./buttons-
|
|
7
|
-
import { a as o, c as s, s as c } from "./typography-
|
|
4
|
+
import { t as r } from "./utils-CF3c95Io.js";
|
|
5
|
+
import { t as i } from "./affordance-geometry.generated-B8yGOr8-.js";
|
|
6
|
+
import { n as a } from "./buttons-BbfzgczK.js";
|
|
7
|
+
import { a as o, c as s, s as c } from "./typography-CSyJrh28.js";
|
|
8
8
|
import { t as l } from "./focus-recipes-B653VaLq.js";
|
|
9
|
-
import { n as u, t as d } from "./button-
|
|
10
|
-
import { r as f, t as p } from "./structure-
|
|
11
|
-
import { o as m } from "./date-
|
|
12
|
-
import { t as ee } from "./separator-
|
|
9
|
+
import { n as u, t as d } from "./button-DkmK-z8E.js";
|
|
10
|
+
import { r as f, t as p } from "./structure-C0V0_Fyf.js";
|
|
11
|
+
import { o as m } from "./date-Q7jnXxpk.js";
|
|
12
|
+
import { t as ee } from "./separator-GNfPG-90.js";
|
|
13
13
|
import { t as h } from "./field-state-recipes-BVA2CWHo.js";
|
|
14
|
-
import { r as g } from "./field-affordance-recipes-
|
|
15
|
-
import { d as _, p as v, s as y, y as te } from "./form-sizing-
|
|
16
|
-
import { t as b } from "./input-
|
|
17
|
-
import { c as ne, o as re, t as ie } from "./popover-
|
|
18
|
-
import { t as ae } from "./form-field-
|
|
14
|
+
import { r as g } from "./field-affordance-recipes-DjwGx8eM.js";
|
|
15
|
+
import { d as _, p as v, s as y, y as te } from "./form-sizing-NXgjkmBG.js";
|
|
16
|
+
import { t as b } from "./input-Cdw4k0fb.js";
|
|
17
|
+
import { c as ne, o as re, t as ie } from "./popover-uwzX2vo7.js";
|
|
18
|
+
import { t as ae } from "./form-field-CsgRmdit.js";
|
|
19
19
|
import { t as x } from "./use-mobile-vaLKwgyf.js";
|
|
20
20
|
import * as S from "react";
|
|
21
21
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
@@ -860,7 +860,7 @@ tt.displayName = "TimePicker";
|
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/components/base/date-pickers/date-picker-single.tsx
|
|
862
862
|
function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-dd", readableFormat: o = "PPP", placeholder: c, closeOnSelect: l = !0, withTime: u, disabledDates: d, calendarProps: f, open: p, setOpen: m, t: h, dateFnsLocale: g, captionLayout: _, yearBounds: v, rootRef: te, ...b }) {
|
|
863
|
-
let x = Pe(b.size), se = S.useId(), E = b.id ?? se, D = `${E}-description`, O = b.error !== void 0 && b.error !== null && b.error !== "", ce = O || !!b.invalid, k = O ? D : void 0, A = u?.format ?? "24", j = u?.step ?? 60, N = u?.showSeconds ?? !1, P = me(o), F = u?.showTimeInButton ?? !P, [I, L] = S.useState(() => e ?? t), [R, z] = S.useState(() => {
|
|
863
|
+
let x = Pe(b.size), se = S.useId(), E = b.id ?? se, D = `${E}-description`, O = b.error !== void 0 && b.error !== null && b.error !== "", ce = O || !!(b.invalid || b["aria-invalid"] && b["aria-invalid"] !== "false"), k = [b["aria-describedby"], O ? D : void 0].filter(Boolean).join(" ") || void 0, A = u?.format ?? "24", j = u?.step ?? 60, N = u?.showSeconds ?? !1, P = me(o), F = u?.showTimeInButton ?? !P, [I, L] = S.useState(() => e ?? t), [R, z] = S.useState(() => {
|
|
864
864
|
let n = e ?? t;
|
|
865
865
|
return n ? U(n, N, j) : null;
|
|
866
866
|
}), B = S.useRef(e ?? t ?? void 0), V = S.useRef(!1), H = S.useRef(e !== void 0), de = S.useCallback((e, t) => {
|
|
@@ -979,30 +979,34 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
979
979
|
children: /* @__PURE__ */ T(re, {
|
|
980
980
|
open: p,
|
|
981
981
|
onOpenChange: m,
|
|
982
|
-
children: [/* @__PURE__ */ w(ne, {
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
className:
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
982
|
+
children: [/* @__PURE__ */ w(ne, {
|
|
983
|
+
ref: b.triggerRef,
|
|
984
|
+
onBlur: b.onBlur,
|
|
985
|
+
render: (e) => {
|
|
986
|
+
let t = Te(b.buttonTone, b.buttonStyle);
|
|
987
|
+
return /* @__PURE__ */ T(a, {
|
|
988
|
+
...e,
|
|
989
|
+
id: E,
|
|
990
|
+
tone: t.tone,
|
|
991
|
+
buttonStyle: t.buttonStyle,
|
|
992
|
+
size: x,
|
|
993
|
+
"aria-invalid": ce,
|
|
994
|
+
"aria-describedby": k,
|
|
995
|
+
className: r(Ie(x), !I && "text-muted-foreground", e.className),
|
|
996
|
+
disabled: b.disabled,
|
|
997
|
+
children: [/* @__PURE__ */ w(oe, {
|
|
998
|
+
className: y[x],
|
|
999
|
+
"aria-hidden": "true"
|
|
1000
|
+
}), /* @__PURE__ */ w(s, {
|
|
1001
|
+
tag: "span",
|
|
1002
|
+
size: "inherit",
|
|
1003
|
+
lineHeight: "tight",
|
|
1004
|
+
className: "min-w-0 truncate text-inherit",
|
|
1005
|
+
children: he
|
|
1006
|
+
})]
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
}), /* @__PURE__ */ T(ie, {
|
|
1006
1010
|
inset: "flush",
|
|
1007
1011
|
className: "w-auto gap-0",
|
|
1008
1012
|
align: "start",
|
|
@@ -1058,7 +1062,7 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1058
1062
|
//#endregion
|
|
1059
1063
|
//#region src/components/base/date-pickers/date-picker-multiple.tsx
|
|
1060
1064
|
function rt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-dd", readableFormat: o = "PPP", placeholder: c, min: l, max: u, required: d, closeOnSelect: f = !1, disabledDates: p, calendarProps: m, open: h, setOpen: g, t: _, dateFnsLocale: v, captionLayout: te, yearBounds: b, rootRef: ae, ...x }) {
|
|
1061
|
-
let se = Pe(x.size), E = S.useId(), D = x.id ?? E, O = `${D}-description`, ce = x.error !== void 0 && x.error !== null && x.error !== "", k = ce || !!x.invalid, A = ce ? O : void 0, [j, M] = S.useState(e ?? t ?? []);
|
|
1065
|
+
let se = Pe(x.size), E = S.useId(), D = x.id ?? E, O = `${D}-description`, ce = x.error !== void 0 && x.error !== null && x.error !== "", k = ce || !!(x.invalid || x["aria-invalid"] && x["aria-invalid"] !== "false"), A = [x["aria-describedby"], ce ? O : void 0].filter(Boolean).join(" ") || void 0, [j, M] = S.useState(e ?? t ?? []);
|
|
1062
1066
|
S.useEffect(() => {
|
|
1063
1067
|
e !== void 0 && M(e);
|
|
1064
1068
|
}, [e]);
|
|
@@ -1098,30 +1102,34 @@ function rt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1098
1102
|
children: /* @__PURE__ */ T(re, {
|
|
1099
1103
|
open: h,
|
|
1100
1104
|
onOpenChange: g,
|
|
1101
|
-
children: [/* @__PURE__ */ w(ne, {
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
className:
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1105
|
+
children: [/* @__PURE__ */ w(ne, {
|
|
1106
|
+
ref: x.triggerRef,
|
|
1107
|
+
onBlur: x.onBlur,
|
|
1108
|
+
render: (e) => {
|
|
1109
|
+
let t = Te(x.buttonTone, x.buttonStyle);
|
|
1110
|
+
return /* @__PURE__ */ T(a, {
|
|
1111
|
+
...e,
|
|
1112
|
+
id: D,
|
|
1113
|
+
tone: t.tone,
|
|
1114
|
+
buttonStyle: t.buttonStyle,
|
|
1115
|
+
size: se,
|
|
1116
|
+
"aria-invalid": k,
|
|
1117
|
+
"aria-describedby": A,
|
|
1118
|
+
className: r(Ie(se), j.length === 0 && "text-muted-foreground", e.className),
|
|
1119
|
+
disabled: x.disabled,
|
|
1120
|
+
children: [/* @__PURE__ */ w(oe, {
|
|
1121
|
+
className: y[se],
|
|
1122
|
+
"aria-hidden": "true"
|
|
1123
|
+
}), /* @__PURE__ */ w(s, {
|
|
1124
|
+
tag: "span",
|
|
1125
|
+
size: "inherit",
|
|
1126
|
+
lineHeight: "tight",
|
|
1127
|
+
className: "min-w-0 truncate text-inherit",
|
|
1128
|
+
children: F
|
|
1129
|
+
})]
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
}), /* @__PURE__ */ T(ie, {
|
|
1125
1133
|
inset: "flush",
|
|
1126
1134
|
className: "w-auto gap-0",
|
|
1127
1135
|
align: "start",
|
|
@@ -1164,7 +1172,7 @@ function rt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1164
1172
|
//#endregion
|
|
1165
1173
|
//#region src/components/base/date-pickers/date-picker-range.tsx
|
|
1166
1174
|
function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-dd", readableFormat: l = "PPP", placeholder: u, withConfirm: d = !1, min: m, max: h, closeOnSelect: g = !0, withTime: _, presets: v, disabledDates: te, calendarProps: b, open: se, setOpen: E, t: D, dateFnsLocale: O, captionLayout: ce, yearBounds: k, rootRef: A, ...j }) {
|
|
1167
|
-
let N = x(), P = j.numberOfMonths ?? (N ? 1 : 2), { weekStartsOn: F = 1 } = e(), I = v ?? Oe(D, F), L = Pe(j.size), R = S.useId(), z = j.id ?? R, B = `${z}-description`, V = j.error !== void 0 && j.error !== null && j.error !== "", H = V || !!j.invalid, de = V ? B : void 0, W = _?.format ?? "24", G = _?.step ?? 60, K = _?.showSeconds ?? !1, he = me(l), ge = _?.showTimeInButton ?? !he, _e = _?.showTimeInSummary ?? !he, be = t ?? n, [q, Ce] = S.useState(be), [J, Ee] = S.useState(() => be?.from ? U(be.from, K, G) : null), [Y, De] = S.useState(() => be?.to ? U(be.to, K, G) : null), Ae = S.useRef(t), Fe = S.useMemo(() => Se(q, m, h, D), [
|
|
1175
|
+
let N = x(), P = j.numberOfMonths ?? (N ? 1 : 2), { weekStartsOn: F = 1 } = e(), I = v ?? Oe(D, F), L = Pe(j.size), R = S.useId(), z = j.id ?? R, B = `${z}-description`, V = j.error !== void 0 && j.error !== null && j.error !== "", H = V || !!(j.invalid || j["aria-invalid"] && j["aria-invalid"] !== "false"), de = [j["aria-describedby"], V ? B : void 0].filter(Boolean).join(" ") || void 0, W = _?.format ?? "24", G = _?.step ?? 60, K = _?.showSeconds ?? !1, he = me(l), ge = _?.showTimeInButton ?? !he, _e = _?.showTimeInSummary ?? !he, be = t ?? n, [q, Ce] = S.useState(be), [J, Ee] = S.useState(() => be?.from ? U(be.from, K, G) : null), [Y, De] = S.useState(() => be?.to ? U(be.to, K, G) : null), Ae = S.useRef(t), Fe = S.useMemo(() => Se(q, m, h, D), [
|
|
1168
1176
|
q,
|
|
1169
1177
|
m,
|
|
1170
1178
|
h,
|
|
@@ -1318,30 +1326,34 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1318
1326
|
children: /* @__PURE__ */ T(re, {
|
|
1319
1327
|
open: se,
|
|
1320
1328
|
onOpenChange: E,
|
|
1321
|
-
children: [/* @__PURE__ */ w(ne, {
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
className: r(
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1329
|
+
children: [/* @__PURE__ */ w(ne, {
|
|
1330
|
+
ref: j.triggerRef,
|
|
1331
|
+
onBlur: j.onBlur,
|
|
1332
|
+
render: (e) => {
|
|
1333
|
+
let t = Te(j.buttonTone, j.buttonStyle);
|
|
1334
|
+
return /* @__PURE__ */ T(a, {
|
|
1335
|
+
...e,
|
|
1336
|
+
id: z,
|
|
1337
|
+
tone: t.tone,
|
|
1338
|
+
buttonStyle: t.buttonStyle,
|
|
1339
|
+
size: L,
|
|
1340
|
+
"aria-invalid": H,
|
|
1341
|
+
"aria-describedby": de,
|
|
1342
|
+
className: r(Ie(L), !q && "text-muted-foreground", e.className),
|
|
1343
|
+
disabled: j.disabled,
|
|
1344
|
+
children: [/* @__PURE__ */ w(oe, {
|
|
1345
|
+
className: r(y[L], "shrink-0"),
|
|
1346
|
+
"aria-hidden": "true"
|
|
1347
|
+
}), /* @__PURE__ */ w(s, {
|
|
1348
|
+
tag: "span",
|
|
1349
|
+
size: "inherit",
|
|
1350
|
+
lineHeight: "tight",
|
|
1351
|
+
className: "min-w-0 truncate text-inherit",
|
|
1352
|
+
children: Ge
|
|
1353
|
+
})]
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
}), /* @__PURE__ */ T(ie, {
|
|
1345
1357
|
inset: "flush",
|
|
1346
1358
|
className: "w-auto gap-0",
|
|
1347
1359
|
align: "start",
|
|
@@ -1527,4 +1539,4 @@ at.displayName = "DatePicker";
|
|
|
1527
1539
|
//#endregion
|
|
1528
1540
|
export { Ie as a, Me as c, Le as i, je as l, tt as n, Pe as o, He as r, Ne as s, at as t, Te as u };
|
|
1529
1541
|
|
|
1530
|
-
//# sourceMappingURL=date-picker-
|
|
1542
|
+
//# sourceMappingURL=date-picker-zOt1oNss.js.map
|