themelia-react-ui 1.0.0 → 1.0.2
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 +190 -1
- package/README.md +92 -13
- package/dist/{accordion-BRWh3BM1.js → accordion-BRTcsp8J.js} +8 -8
- package/dist/accordion-BRTcsp8J.js.map +1 -0
- package/dist/{action-menu-Cx3SdfbN.js → action-menu-Drxw_vJk.js} +36 -36
- package/dist/action-menu-Drxw_vJk.js.map +1 -0
- package/dist/affordance-geometry.generated-CL84ZN9A.js +63 -0
- package/dist/affordance-geometry.generated-CL84ZN9A.js.map +1 -0
- package/dist/{ai-artifact-DkOArd3-.js → ai-artifact-DLVdK0Py.js} +151 -155
- package/dist/ai-artifact-DLVdK0Py.js.map +1 -0
- package/dist/{app-shell-BH_bGcE2.js → app-shell-C_fKpljx.js} +11 -10
- package/dist/app-shell-C_fKpljx.js.map +1 -0
- package/dist/{attachment-DsLgNHXt.js → attachment-DbjUWsP0.js} +12 -12
- package/dist/{attachment-DsLgNHXt.js.map → attachment-DbjUWsP0.js.map} +1 -1
- package/dist/auth-CAQcasMV.js +723 -0
- package/dist/auth-CAQcasMV.js.map +1 -0
- package/dist/{avatar-CsnWaYmt.js → avatar-Bu2HhitA.js} +76 -71
- package/dist/avatar-Bu2HhitA.js.map +1 -0
- package/dist/{badge-BZXZT9wd.js → badge-CzId1Wlm.js} +4 -4
- package/dist/{badge-BZXZT9wd.js.map → badge-CzId1Wlm.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/buttons.js +3 -2
- package/dist/base/cards.js +3 -3
- package/dist/base/carousel.js +25 -27
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +150 -148
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +3 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +3 -3
- package/dist/base/display.js +7 -7
- package/dist/base/feedback.js +4 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +233 -0
- package/dist/base/inline-edit.js.map +1 -0
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.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 +33 -33
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +83 -81
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +6 -6
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/blocks/admin.js +134 -134
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +120 -117
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +3 -0
- package/dist/blocks/analytics.js +530 -491
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +2 -2
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +395 -383
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +311 -0
- package/dist/blocks/planning.js.map +1 -0
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BuYz5SDU.js} +9 -8
- package/dist/breadcrumbs-BuYz5SDU.js.map +1 -0
- package/dist/button-BZDasD04.js +651 -0
- package/dist/button-BZDasD04.js.map +1 -0
- package/dist/{button-BS6l5JUw.js → button-BZyfTvwm.js} +3 -3
- package/dist/button-BZyfTvwm.js.map +1 -0
- package/dist/buttons-D_6KJvEE.js +99 -0
- package/dist/buttons-D_6KJvEE.js.map +1 -0
- package/dist/{cards-BMB0laLG.js → cards-qGSErLw_.js} +12 -12
- package/dist/{cards-BMB0laLG.js.map → cards-qGSErLw_.js.map} +1 -1
- package/dist/chart-Bsc5BICK.js +150 -0
- package/dist/chart-Bsc5BICK.js.map +1 -0
- package/dist/checkbox-BQNDjUCh.js +34 -0
- package/dist/checkbox-BQNDjUCh.js.map +1 -0
- package/dist/choice-inputs-Mk3iWbhr.js +725 -0
- package/dist/choice-inputs-Mk3iWbhr.js.map +1 -0
- package/dist/{code-block-DIlqzoiD.js → code-block-DzHKRybS.js} +23 -23
- package/dist/code-block-DzHKRybS.js.map +1 -0
- package/dist/{collapsible-DsnktFNv.js → collapsible-ClvC7Bj3.js} +3 -3
- package/dist/{collapsible-DsnktFNv.js.map → collapsible-ClvC7Bj3.js.map} +1 -1
- package/dist/{collection-content-C4fthJV_.js → collection-content-D6S8cv_n.js} +3 -3
- package/dist/{collection-content-C4fthJV_.js.map → collection-content-D6S8cv_n.js.map} +1 -1
- package/dist/{combobox-HDftpzxt.js → combobox-BFnbJJp3.js} +18 -18
- package/dist/combobox-BFnbJJp3.js.map +1 -0
- package/dist/{combobox-CHD750do.js → combobox-hozNwUcc.js} +313 -316
- package/dist/combobox-hozNwUcc.js.map +1 -0
- package/dist/{command-D0kWBZfd.js → command-BnmSchli.js} +9 -9
- package/dist/command-BnmSchli.js.map +1 -0
- package/dist/comments-u5L0OGip.js +1156 -0
- package/dist/comments-u5L0OGip.js.map +1 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
- package/dist/components/base/buttons/button.recipes.d.ts +10 -19
- package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
- package/dist/components/base/cards/card.recipes.d.ts +13 -5
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
- package/dist/components/base/cards/smart-card.types.d.ts +3 -1
- package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
- package/dist/components/base/date-pickers/datepicker.types.d.ts +3 -0
- package/dist/components/base/forms/form-field.d.ts +1 -0
- package/dist/components/base/forms/form-sizing.d.ts +3 -3
- package/dist/components/base/inline-edit/index.d.ts +2 -0
- package/dist/components/base/inline-edit/inline-edit.d.ts +81 -0
- package/dist/components/base/inline-edit/inline-edit.recipes.d.ts +6 -0
- package/dist/components/base/navigation/tabs.d.ts +3 -5
- package/dist/components/base/popover/popover.recipes.d.ts +3 -3
- package/dist/components/base/structure/structure.recipes.d.ts +6 -0
- package/dist/components/base/table/index.d.ts +1 -1
- package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
- package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
- package/dist/components/blocks/analytics/index.d.ts +1 -0
- package/dist/components/blocks/analytics/types.d.ts +1 -1
- package/dist/components/blocks/analytics/usage-card/index.d.ts +3 -0
- package/dist/components/blocks/analytics/usage-card/types.d.ts +52 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.d.ts +6 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.data.d.ts +19 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +22 -0
- package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
- package/dist/components/blocks/planning/index.d.ts +3 -0
- package/dist/components/blocks/planning/task-card.d.ts +3 -0
- package/dist/components/blocks/planning/task-card.strings.d.ts +15 -0
- package/dist/components/blocks/planning/task-card.types.d.ts +66 -0
- package/dist/components/features/combobox/components/error-message.d.ts +1 -1
- package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
- package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
- package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.types.d.ts +9 -1
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
- package/dist/components/features/overlays/overlays.types.d.ts +5 -4
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -0
- package/dist/components/layout/page/page.d.ts +0 -1
- package/dist/components/layout/page/page.types.d.ts +9 -3
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
- package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
- package/dist/components/typography/heading.d.ts +5 -2
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/text.styles.d.ts +10 -0
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/table.d.ts +2 -1
- package/dist/container.recipes-D9t8MHR3.js +27 -0
- package/dist/container.recipes-D9t8MHR3.js.map +1 -0
- package/dist/{containers-CPNyNo1_.js → containers-DqB-bSYE.js} +34 -56
- package/dist/containers-DqB-bSYE.js.map +1 -0
- package/dist/control-group-recipes-DBXmfh2E.js +21 -0
- package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
- package/dist/{copyable-B7SBXJMr.js → copyable-BTSByfmq.js} +6 -6
- package/dist/{copyable-B7SBXJMr.js.map → copyable-BTSByfmq.js.map} +1 -1
- package/dist/{data-display-b3d1TfL4.js → data-display-Bihs9Ven.js} +542 -329
- package/dist/data-display-Bihs9Ven.js.map +1 -0
- package/dist/{date-BFNMnrS5.js → date-DOKhJPu7.js} +4 -4
- package/dist/{date-BFNMnrS5.js.map → date-DOKhJPu7.js.map} +1 -1
- package/dist/{date-picker-DI6kPNof.js → date-picker-DzP5HQq7.js} +492 -472
- package/dist/date-picker-DzP5HQq7.js.map +1 -0
- package/dist/date-pickers-BpgGz7S-.js +196 -0
- package/dist/date-pickers-BpgGz7S-.js.map +1 -0
- package/dist/{display-ByI5tkqy.js → display-CS6Hbk18.js} +8 -8
- package/dist/{display-ByI5tkqy.js.map → display-CS6Hbk18.js.map} +1 -1
- package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-D-boNgGO.js} +7 -7
- package/dist/{dropdown-menu-BlnyHr-9.js.map → dropdown-menu-D-boNgGO.js.map} +1 -1
- package/dist/features/activities.js +152 -141
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +182 -179
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +25 -23
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +103 -104
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +375 -373
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +222 -224
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +29 -29
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +59 -58
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +856 -855
- 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 +1210 -1209
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +133 -132
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +29 -31
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +13 -13
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +82 -82
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +4 -4
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +456 -450
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-CJkUAapr.js +233 -0
- package/dist/feedback-CJkUAapr.js.map +1 -0
- package/dist/field-affordance-recipes-uKY4MsZ_.js +25 -0
- package/dist/field-affordance-recipes-uKY4MsZ_.js.map +1 -0
- package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-DQQpiLWC.js} +3 -3
- package/dist/field-state-recipes-DQQpiLWC.js.map +1 -0
- package/dist/{filters-qtrcv1hf.js → filters-D6FF8L6s.js} +715 -720
- package/dist/filters-D6FF8L6s.js.map +1 -0
- package/dist/{form-field-C6W-y2hR.js → form-field-CZwrkP7m.js} +17 -9
- package/dist/form-field-CZwrkP7m.js.map +1 -0
- package/dist/{form-sizing-39NohSqn.js → form-sizing-QP8aIRaW.js} +10 -6
- package/dist/form-sizing-QP8aIRaW.js.map +1 -0
- package/dist/{forms-BF-HSbff.js → forms-B5NCbkSC.js} +35 -35
- package/dist/{forms-BF-HSbff.js.map → forms-B5NCbkSC.js.map} +1 -1
- package/dist/forms-numeric-Crrm80Lm.js +867 -0
- package/dist/forms-numeric-Crrm80Lm.js.map +1 -0
- package/dist/{header-B8ex54cY.js → header-kxruN3RM.js} +53 -49
- package/dist/header-kxruN3RM.js.map +1 -0
- package/dist/{hooks-D6UBVzf2.js → hooks-BrlnCwQd.js} +2 -2
- package/dist/{hooks-D6UBVzf2.js.map → hooks-BrlnCwQd.js.map} +1 -1
- package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
- package/dist/http-CdEIHyQf.js.map +1 -0
- package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-Btc6pQrp.js} +4 -4
- package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-Btc6pQrp.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-SX9V0AL3.js +255 -0
- package/dist/input-SX9V0AL3.js.map +1 -0
- package/dist/input-vxcaNCYC.js +20 -0
- package/dist/input-vxcaNCYC.js.map +1 -0
- package/dist/{item-pJ0GsOiJ.js → item-DE4YnuJx.js} +18 -17
- package/dist/item-DE4YnuJx.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 +44 -4
- package/dist/lib/control-group-recipes.d.ts +22 -0
- package/dist/lib/field-affordance-recipes.d.ts +35 -2
- package/dist/lib/field-state-recipes.d.ts +2 -2
- package/dist/lib/navigation-row-recipes.d.ts +3 -2
- package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
- package/dist/lib/surface-recipes.d.ts +5 -2
- package/dist/lib/token-merge.generated.d.ts +144 -2
- package/dist/lib/ui-provider/types.d.ts +4 -2
- package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-Ca4YmvBi.js → media-gallery-DLp3HAz0.js} +75 -74
- package/dist/media-gallery-DLp3HAz0.js.map +1 -0
- package/dist/{mentions-CRio8mTm.js → mentions-Cl0Kt_Pd.js} +52 -50
- package/dist/{mentions-CRio8mTm.js.map → mentions-Cl0Kt_Pd.js.map} +1 -1
- package/dist/message-SZUNB1eX.js +127 -0
- package/dist/message-SZUNB1eX.js.map +1 -0
- package/dist/{navigation-BTrEb5u4.js → navigation-DnQSNMT0.js} +64 -55
- package/dist/navigation-DnQSNMT0.js.map +1 -0
- package/dist/{navigation-DqEITuD2.js → navigation-DyytsLRB.js} +37 -37
- package/dist/navigation-DyytsLRB.js.map +1 -0
- package/dist/{navigation-row-recipes-BFpvGPGE.js → navigation-row-recipes-DQEXQcqY.js} +3 -3
- package/dist/navigation-row-recipes-DQEXQcqY.js.map +1 -0
- package/dist/{number-BNT_BIzJ.js → number-DasMFWEG.js} +4 -4
- package/dist/{number-BNT_BIzJ.js.map → number-DasMFWEG.js.map} +1 -1
- package/dist/overlays-DUbs1KEi.js +1011 -0
- package/dist/overlays-DUbs1KEi.js.map +1 -0
- package/dist/{page-BMBGjJY8.js → page-hGmT4nWK.js} +75 -64
- package/dist/page-hGmT4nWK.js.map +1 -0
- package/dist/{page-header-BH41wCyY.js → page-header-D8nERkn5.js} +9 -9
- package/dist/page-header-D8nERkn5.js.map +1 -0
- package/dist/{pagination-C29vvt3I.js → pagination-NLGqRirf.js} +20 -20
- package/dist/pagination-NLGqRirf.js.map +1 -0
- package/dist/{popover-TInGXsjg.js → popover-CghIYdQf.js} +23 -22
- package/dist/popover-CghIYdQf.js.map +1 -0
- package/dist/{popover-menu-BzqXqE72.js → popover-menu-B4PoWhRl.js} +6 -6
- package/dist/{popover-menu-BzqXqE72.js.map → popover-menu-B4PoWhRl.js.map} +1 -1
- package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-QlD4JenO.js} +5 -5
- package/dist/popover.recipes-QlD4JenO.js.map +1 -0
- package/dist/{primitives-DKPOGVpj.js → primitives-C7ff0QaI.js} +120 -113
- package/dist/primitives-C7ff0QaI.js.map +1 -0
- package/dist/primitives.js +3 -3
- package/dist/progress-BroqrAyV.js +169 -0
- package/dist/progress-BroqrAyV.js.map +1 -0
- package/dist/{receipt-DYWTQGEc.js → receipt-BuJynLgf.js} +8 -8
- package/dist/{receipt-DYWTQGEc.js.map → receipt-BuJynLgf.js.map} +1 -1
- package/dist/{rich-text-B7sBAdDG.js → rich-text-DlxDOtf4.js} +4 -4
- package/dist/{rich-text-B7sBAdDG.js.map → rich-text-DlxDOtf4.js.map} +1 -1
- package/dist/rich-text-editor-BKyG7rWz.js +574 -0
- package/dist/rich-text-editor-BKyG7rWz.js.map +1 -0
- package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-B72Nfuze.js} +35 -26
- package/dist/rich-text-editor.recipes-B72Nfuze.js.map +1 -0
- package/dist/{scroll-area-BheMQ270.js → scroll-area-D-pIhEKl.js} +3 -3
- package/dist/scroll-area-D-pIhEKl.js.map +1 -0
- package/dist/{separator-Gk_WXH-l.js → separator-BNIgG3au.js} +3 -3
- package/dist/{separator-Gk_WXH-l.js.map → separator-BNIgG3au.js.map} +1 -1
- package/dist/{separator-DO0EbCEm.js → separator-BhtFyo4x.js} +2 -2
- package/dist/{separator-DO0EbCEm.js.map → separator-BhtFyo4x.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/{settings-D9f_wdIC.js → settings-DOTOzeZ2.js} +10 -9
- package/dist/{settings-D9f_wdIC.js.map → settings-DOTOzeZ2.js.map} +1 -1
- package/dist/{sheet-vOUloJ4O.js → sheet-BFhrNehm.js} +11 -11
- package/dist/sheet-BFhrNehm.js.map +1 -0
- package/dist/{sidebar-CNBKFDRW.js → sidebar-CyR4XKwR.js} +219 -200
- package/dist/sidebar-CyR4XKwR.js.map +1 -0
- package/dist/{sidebar-C3UKkbC5.js → sidebar-SvGJ0Zwi.js} +63 -58
- package/dist/sidebar-SvGJ0Zwi.js.map +1 -0
- package/dist/{skeleton-BvRhK8y-.js → skeleton-3F0uhYn3.js} +4 -4
- package/dist/{skeleton-BvRhK8y-.js.map → skeleton-3F0uhYn3.js.map} +1 -1
- package/dist/{smart-card-B5FcKODh.js → smart-card-DjGVV2xr.js} +206 -199
- package/dist/smart-card-DjGVV2xr.js.map +1 -0
- package/dist/{spinner-JtlFJ7Nc.js → spinner-Cpf7oRkF.js} +5 -5
- package/dist/{spinner-JtlFJ7Nc.js.map → spinner-Cpf7oRkF.js.map} +1 -1
- package/dist/{structure-BvW4vG4H.js → structure-CRdqVawd.js} +14 -14
- package/dist/{structure-BvW4vG4H.js.map → structure-CRdqVawd.js.map} +1 -1
- package/dist/{structure.recipes-DjqnBpwz.js → structure.recipes-Bqhf9oIh.js} +2 -2
- package/dist/structure.recipes-Bqhf9oIh.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-CQfRr-VL.js → surface-recipes-Dd__PD-w.js} +4 -3
- package/dist/surface-recipes-Dd__PD-w.js.map +1 -0
- package/dist/{table-DnlAJ-xR.js → table-CLtJTxoR.js} +17 -16
- package/dist/table-CLtJTxoR.js.map +1 -0
- package/dist/table-CcRDZiLP.js +1444 -0
- package/dist/table-CcRDZiLP.js.map +1 -0
- package/dist/tabs-BNgu7g0u.js +188 -0
- package/dist/tabs-BNgu7g0u.js.map +1 -0
- package/dist/text-inputs-DsR56TR-.js +330 -0
- package/dist/text-inputs-DsR56TR-.js.map +1 -0
- package/dist/{text.styles-BwB7vAF2.js → text.styles-Q4sGAIgA.js} +18 -10
- package/dist/text.styles-Q4sGAIgA.js.map +1 -0
- package/dist/theme.css +77 -115
- package/dist/{timelines-CnZ2S_Gr.js → timelines-D1pkt3se.js} +84 -78
- package/dist/timelines-D1pkt3se.js.map +1 -0
- package/dist/{tree-COD9BGdU.js → tree-BtmYyMZV.js} +8 -8
- package/dist/{tree-COD9BGdU.js.map → tree-BtmYyMZV.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-BxQgiZyw.js +96 -0
- package/dist/typography-BxQgiZyw.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/{ui-provider-CftIB6TY.js → ui-provider-DRPn3qNl.js} +3 -2
- package/dist/ui-provider-DRPn3qNl.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-DIzw1dx1.js → upload-CDbYw1WN.js} +326 -323
- package/dist/upload-CDbYw1WN.js.map +1 -0
- package/dist/{upload-queue-xRJ3qDmd.js → upload-queue-CNd_hH_a.js} +25 -25
- package/dist/upload-queue-CNd_hH_a.js.map +1 -0
- package/dist/usage-card-VyJLUwRr.js +457 -0
- package/dist/usage-card-VyJLUwRr.js.map +1 -0
- package/dist/utils-BvH9PSmq.js +4275 -0
- package/dist/utils-BvH9PSmq.js.map +1 -0
- package/dist/value-inputs-D0KCrfVC.js +840 -0
- package/dist/value-inputs-D0KCrfVC.js.map +1 -0
- package/dist/{workspace-Cbqz4FzN.js → workspace-CcR8r-Nt.js} +115 -122
- package/dist/workspace-CcR8r-Nt.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +112 -18
- package/docs/consumer-skill/examples/analytics.tsx +34 -0
- package/docs/consumer-skill/examples/app-layout.tsx +42 -12
- package/docs/consumer-skill/examples/detail.tsx +24 -9
- package/docs/consumer-skill/examples/manifest.json +27 -1
- package/docs/consumer-skill/examples/planning-usage-edit.tsx +29 -0
- package/docs/consumer-skill/examples/scoped-directory.tsx +77 -0
- package/docs/consumer-skill/examples/website.tsx +56 -0
- package/docs/consumer-skill/references/analytics.md +70 -0
- package/docs/consumer-skill/references/composition.md +219 -2
- package/docs/consumer-skill/references/design-contract.md +37 -10
- package/docs/consumer-skill/references/discovery.md +93 -5
- package/docs/consumer-skill/references/installation.md +20 -3
- package/docs/consumer-skill/references/integration.md +26 -0
- package/docs/consumer-skill/references/public-api.json +2416 -388
- package/docs/consumer-skill/references/review.md +126 -0
- package/docs/consumer-skill/references/theming.md +52 -7
- package/docs/consumer-skill/references/tokens.json +177 -9
- package/docs/consumer-skill/references/workflows.md +129 -1
- package/docs/consumer-skill/scripts/check-composition.mjs +31 -0
- package/docs/consumer-skill/scripts/composition-policy.mjs +317 -0
- package/docs/consumer-skill/scripts/discovery.mjs +65 -8
- package/docs/consumer-skill/scripts/surface-policy.mjs +66 -0
- package/package.json +30 -6
- package/dist/accordion-BRWh3BM1.js.map +0 -1
- package/dist/action-menu-Cx3SdfbN.js.map +0 -1
- package/dist/affordance-geometry.generated-DXl-Zb3Z.js +0 -23
- package/dist/affordance-geometry.generated-DXl-Zb3Z.js.map +0 -1
- package/dist/ai-artifact-DkOArd3-.js.map +0 -1
- package/dist/app-shell-BH_bGcE2.js.map +0 -1
- package/dist/auth-BDB1V_2q.js +0 -704
- package/dist/auth-BDB1V_2q.js.map +0 -1
- package/dist/avatar-CsnWaYmt.js.map +0 -1
- package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
- package/dist/button-BS6l5JUw.js.map +0 -1
- package/dist/buttons-Co6GavvM.js +0 -674
- package/dist/buttons-Co6GavvM.js.map +0 -1
- package/dist/chart-DVfcwQu6.js +0 -149
- package/dist/chart-DVfcwQu6.js.map +0 -1
- package/dist/choice-inputs-CavA-SGV.js +0 -644
- package/dist/choice-inputs-CavA-SGV.js.map +0 -1
- package/dist/code-block-DIlqzoiD.js.map +0 -1
- package/dist/combobox-CHD750do.js.map +0 -1
- package/dist/combobox-HDftpzxt.js.map +0 -1
- package/dist/command-D0kWBZfd.js.map +0 -1
- package/dist/comments-CvYeglMS.js +0 -1132
- package/dist/comments-CvYeglMS.js.map +0 -1
- package/dist/containers-CPNyNo1_.js.map +0 -1
- package/dist/data-display-b3d1TfL4.js.map +0 -1
- package/dist/date-picker-DI6kPNof.js.map +0 -1
- package/dist/date-pickers-ByP6Cv2z.js +0 -224
- package/dist/date-pickers-ByP6Cv2z.js.map +0 -1
- package/dist/feedback-a9j9J-9A.js +0 -391
- package/dist/feedback-a9j9J-9A.js.map +0 -1
- package/dist/field-affordance-recipes-CHdUtn2Z.js +0 -17
- package/dist/field-affordance-recipes-CHdUtn2Z.js.map +0 -1
- package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
- package/dist/filters-qtrcv1hf.js.map +0 -1
- package/dist/form-field-C6W-y2hR.js.map +0 -1
- package/dist/form-sizing-39NohSqn.js.map +0 -1
- package/dist/forms-numeric-Y15Bg5Nr.js +0 -867
- package/dist/forms-numeric-Y15Bg5Nr.js.map +0 -1
- package/dist/header-B8ex54cY.js.map +0 -1
- package/dist/http-CLTVJc5I.js.map +0 -1
- package/dist/input-DMorJiTI.js +0 -202
- package/dist/input-DMorJiTI.js.map +0 -1
- package/dist/input-ci9fIgFH.js +0 -20
- package/dist/input-ci9fIgFH.js.map +0 -1
- package/dist/item-pJ0GsOiJ.js.map +0 -1
- package/dist/media-gallery-Ca4YmvBi.js.map +0 -1
- package/dist/message-B5-6LeYl.js +0 -108
- package/dist/message-B5-6LeYl.js.map +0 -1
- package/dist/navigation-BTrEb5u4.js.map +0 -1
- package/dist/navigation-DqEITuD2.js.map +0 -1
- package/dist/navigation-row-recipes-BFpvGPGE.js.map +0 -1
- package/dist/overlays-DBqV0J_V.js +0 -982
- package/dist/overlays-DBqV0J_V.js.map +0 -1
- package/dist/page-BMBGjJY8.js.map +0 -1
- package/dist/page-header-BH41wCyY.js.map +0 -1
- package/dist/pagination-C29vvt3I.js.map +0 -1
- package/dist/popover-TInGXsjg.js.map +0 -1
- package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
- package/dist/primitives-DKPOGVpj.js.map +0 -1
- package/dist/rich-text-editor-BZSJchAF.js +0 -575
- package/dist/rich-text-editor-BZSJchAF.js.map +0 -1
- package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
- package/dist/scroll-area-BheMQ270.js.map +0 -1
- package/dist/select-B2mb-qN2.js +0 -108
- package/dist/select-B2mb-qN2.js.map +0 -1
- package/dist/sheet-vOUloJ4O.js.map +0 -1
- package/dist/sidebar-C3UKkbC5.js.map +0 -1
- package/dist/sidebar-CNBKFDRW.js.map +0 -1
- package/dist/smart-card-B5FcKODh.js.map +0 -1
- package/dist/structure.recipes-DjqnBpwz.js.map +0 -1
- package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
- package/dist/table-DnlAJ-xR.js.map +0 -1
- package/dist/table-ghtAQ-JJ.js +0 -1424
- package/dist/table-ghtAQ-JJ.js.map +0 -1
- package/dist/tabs-DY09eoZg.js +0 -187
- package/dist/tabs-DY09eoZg.js.map +0 -1
- package/dist/text-inputs-BhOcedTo.js +0 -331
- package/dist/text-inputs-BhOcedTo.js.map +0 -1
- package/dist/text.styles-BwB7vAF2.js.map +0 -1
- package/dist/timelines-CnZ2S_Gr.js.map +0 -1
- package/dist/typography-Cv8MT-82.js +0 -96
- package/dist/typography-Cv8MT-82.js.map +0 -1
- package/dist/ui-provider-CftIB6TY.js.map +0 -1
- package/dist/upload-DIzw1dx1.js.map +0 -1
- package/dist/upload-queue-xRJ3qDmd.js.map +0 -1
- package/dist/utils-C2EKeIw3.js +0 -72
- package/dist/utils-C2EKeIw3.js.map +0 -1
- package/dist/value-inputs-Co1fu-xv.js +0 -824
- package/dist/value-inputs-Co1fu-xv.js.map +0 -1
- package/dist/workspace-Cbqz4FzN.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-BZDasD04.js","names":["TooltipProvider","TooltipPrimitive","Tooltip","TooltipTrigger","TooltipContent","Tooltip","BaseTooltip","TooltipProviderPrimitive","TooltipTriggerPrimitive","TooltipContentPrimitive","_Fragment","PrimitiveButton","_Fragment","styles","React","React","Tooltip","React","Tooltip","resolveComponentScale","useButtonConfig","useDensityConfig","cn","Text","anchoredPositionMethod","motionRecipes","Slot","Button$1","React$1","Fragment$1","TooltipProvider$1","props","Tooltip","delayDuration","delay","Tooltip$2","TooltipTrigger$1","slotRender","asChild","safeRender","render","_nativeButton","rest","renderProps","state","TooltipContent$1","resolvedContainer","useThemePortalContainer","container","className","children","TooltipDescriptionContext","createContext","SharedTooltipProviderContext","Tooltip$1","hasSharedProvider","useContext","generatedId","useId","descriptionId","setDescriptionId","useState","root","TooltipProvider","TooltipTrigger","TooltipContent","description","content","buttonRecipes","buttonVariants","cva","usePendingButtonFocus","element","useRef","lastFocused","wasPending","restore","ref","useCallback","node","focus","blur","cleanup","forwardedRef","useLayoutEffect","previous","pending","doc","eligible","removeListeners","pointer","keyboard","cancel","event","usePresentation","defaults","resolved","tone","buttonStyle","size","defaultScale","iconOnly","fullWidth","Content","Icon","glyph","iconPosition","BaseButton","forwardRef","presentation","focusRef","BaseButtonLink","relTokens","rel","target","disabled","tabIndex","defaultButtonLoadingStrings","useLoaderButtonState","stringsProp","strings","useStrings","isLoading","setIsLoading","loading","setShowCompletedState","useEffect","handlesLoading","timeoutId","LoaderButtonContent","_size","loadingText","isSimpleText","Loader2","LoaderButton","TooltipButton","mergedProps","mergeProps","triggerProps","withTooltip","usesLoaderPath","LoadingButtonLink","loader","ButtonLink","_withTooltip","_loading","_handlesLoading","_strings","linkProps","toLinkProps","_type","_form","_formAction","_formEncType","_formMethod","_formNoValidate","_formTarget","_name","_value","_focusableWhenDisabled","_render","Button","href","link","_download","_hrefLang","_media","_ping","_referrerPolicy","_rel","_target","baseProps","actionProps"],"sources":["../src/components/ui/tooltip.tsx","../src/components/base/display/tooltip.tsx","../src/components/base/buttons/button.recipes.ts","../src/components/base/buttons/button.variants.ts","../src/components/base/buttons/use-pending-button-focus.ts","../src/components/base/buttons/base-button.tsx","../src/components/base/buttons/loader-button.tsx","../src/components/base/buttons/tooltip-button.tsx","../src/components/base/buttons/button.tsx"],"sourcesContent":["import { anchoredPositionMethod } from '../../lib/anchored-positioning';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\n\nimport { Slot } from \"./slot\"\nimport { cn } from \"../../lib/utils\"\n\nfunction TooltipProvider({\n delay = 0,\n delayDuration,\n ...props\n}: TooltipPrimitive.Provider.Props & { delayDuration?: number }) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delayDuration ?? delay}\n {...props}\n />\n )\n}\n\nfunction Tooltip({ ...props }: TooltipPrimitive.Root.Props) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n )\n}\n\nfunction TooltipTrigger({\n asChild = false,\n render,\n children,\n ...props\n}: TooltipPrimitive.Trigger.Props & { asChild?: boolean }) {\n const slotRender = asChild ? <Slot /> : undefined\n const safeRender: TooltipPrimitive.Trigger.Props[\"render\"] = typeof render === \"function\"\n ? ((renderProps, state) => {\n const { nativeButton: _nativeButton, ...rest } = renderProps as Record<string, unknown>\n void _nativeButton\n return render(rest as typeof renderProps, state)\n })\n : render\n\n return (\n <TooltipPrimitive.Trigger\n data-slot=\"tooltip-trigger\"\n render={slotRender ?? safeRender}\n {...props}\n >\n {children}\n </TooltipPrimitive.Trigger>\n )\n}\n\nfunction TooltipContent({\n className,\n container,\n side = \"top\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n positionMethod = anchoredPositionMethod,\n children,\n ...props\n}: TooltipPrimitive.Popup.Props &\n Pick<\n TooltipPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"positionMethod\"\n > & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n return (\n <TooltipPrimitive.Portal container={resolvedContainer}>\n <TooltipPrimitive.Positioner\n positionMethod={positionMethod}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n className={cn(\n motionRecipes.popup,\n \"rounded-radius px-space-sm py-space-xs text-xs bg-inverse-background text-inverse-foreground z-50 w-fit max-w-xs origin-(--transform-origin)\",\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 bg-inverse-background fill-inverse-background z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5\" />\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","/** Tokenized base wrappers for short, non-interactive contextual help. */\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport { createContext, useContext, useId, useLayoutEffect, useState, type ComponentProps } from 'react';\n\nimport {\n\tTooltipContent as TooltipContentPrimitive,\n\tTooltipProvider as TooltipProviderPrimitive,\n\tTooltipTrigger as TooltipTriggerPrimitive,\n} from '../../ui/tooltip';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nexport type TooltipProps = ComponentProps<typeof BaseTooltip.Root>;\nexport type TooltipProviderProps = ComponentProps<typeof TooltipProviderPrimitive>;\nexport type TooltipTriggerProps = ComponentProps<typeof TooltipTriggerPrimitive>;\nexport type TooltipContentProps = ComponentProps<typeof TooltipContentPrimitive>;\n\nconst TooltipDescriptionContext = createContext<{ id: string; setId: (id: string) => void } | undefined>(undefined);\n\nconst SharedTooltipProviderContext = createContext(false);\n\n/** Tooltip state root. It does not render a DOM node. */\nexport function Tooltip(props: TooltipProps) {\n\tconst hasSharedProvider = useContext(SharedTooltipProviderContext);\n\tconst generatedId = useId();\n\tconst [descriptionId, setDescriptionId] = useState(generatedId);\n\tconst root = <TooltipDescriptionContext.Provider value={{ id: descriptionId, setId: setDescriptionId }}><BaseTooltip.Root data-slot=\"tooltip\" {...props} /></TooltipDescriptionContext.Provider>;\n\n\treturn hasSharedProvider ? root : <TooltipProviderPrimitive>{root}</TooltipProviderPrimitive>;\n}\n\n/** Shared delay provider for a group of tooltip roots. Nested Tooltip roots reuse it. */\nexport function TooltipProvider(props: TooltipProviderProps) {\n\treturn (\n\t\t<SharedTooltipProviderContext.Provider value>\n\t\t\t<TooltipProviderPrimitive {...props} />\n\t\t</SharedTooltipProviderContext.Provider>\n\t);\n}\n\n/** Polymorphic tooltip anchor. */\nexport function TooltipTrigger({ className, ...props }: TooltipTriggerProps) {\n\tconst description = useContext(TooltipDescriptionContext);\n\tconst descriptionId = description?.id;\n\treturn (\n\t\t<TooltipTriggerPrimitive\n\t\t\tclassName={cn('tooltip-trigger--component active:translate-y-0!', className)}\n\t\t\t{...props}\n\t\t\taria-describedby={[props['aria-describedby'], descriptionId].filter(Boolean).join(' ') || undefined}\n\t\t/>\n\t);\n}\n\n/** Inverse contextual-help surface with package spacing and typography. */\nexport function TooltipContent({ children, className, ...props }: TooltipContentProps) {\n\tconst description = useContext(TooltipDescriptionContext);\n\tconst descriptionId = props.id ?? description?.id;\n\tuseLayoutEffect(() => { if (descriptionId) description?.setId(descriptionId); }, [descriptionId, description?.setId]);\n\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\tconst content = isSimpleText ? (\n\t\t\t<Text\n\t\t\t\ttag=\"span\"\n\t\t\t\tsize=\"inherit\"\n\t\t\t\t\n\t\t\t\tlineHeight=\"snug\"\n\t\t\t\tclassName=\"tooltip-content--text text-inherit\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Text>\n\t\t) : children;\n\n\treturn (\n\t\t<TooltipContentPrimitive\n\t\t\tid={descriptionId}\n\t\t\trole=\"tooltip\"\n\t\t\tclassName={cn(\n\t\t\t\t'tooltip-content--component max-w-xs rounded-radius px-space-sm py-space-xs text-xs leading-snug',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{content}\n\t\t</TooltipContentPrimitive>\n\t);\n}\n\nTooltip.displayName = 'Tooltip';\nTooltipProvider.displayName = 'TooltipProvider';\nTooltipTrigger.displayName = 'TooltipTrigger';\nTooltipContent.displayName = 'TooltipContent';\n","/** Shared interaction states and loader anatomy; public variants own geometry. */\nexport const buttonRecipes = {\n\tsolidInteractive: '[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:brightness-95 [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:brightness-90',\n\tneutralInteractive: '[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-accent [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-muted',\n\tsecondaryInteractive: '[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-secondary [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-accent',\n\tprimaryInteractive: '[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-primary/10 [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-primary/20',\n\tdestructiveInteractive: '[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-destructive/10 [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-destructive/20',\n\tsuccessInteractive: '[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-success/10 [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-success/20',\n\twarningInteractive: '[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-warning/10 [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-warning/20',\n\tinfoInteractive: '[&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-info/10 [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-info/20',\n\tisLoading: 'cursor-wait',\n\ticon: 'base-button-icon pointer-events-none shrink-0',\n\tspinner: 'animate-spin',\n} as const;\n","import { cva } from 'class-variance-authority';\nimport { buttonRecipes } from './button.recipes';\n\n/** Shared geometry and semantic tone/treatment pairs; no extra component tokens. */\nexport const buttonVariants = cva('box-border inline-flex shrink-0 items-center justify-center gap-space-sm [&_svg:not([class*=size-])]:size-icon [&_svg]:shrink-0 whitespace-nowrap rounded-inner border font-sans font-medium no-underline outline-none transition-[background-color,border-color,color,filter,box-shadow] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50', {\n variants: {\n tone: {primary: '', neutral: '', secondary: '', destructive: '', success: '', warning: '', info: ''},\n buttonStyle: {\n solid: `border-transparent ${buttonRecipes.solidInteractive}`,\n outline: 'border-input bg-transparent',\n ghost: 'border-transparent bg-transparent',\n },\n // Keep leading after text size: class merging treats a later font size as\n // owning its default line height and would remove an earlier leading-none.\n size: {sm: 'h-action-sm px-control-sm text-sm leading-none', md: 'h-action px-control text-sm leading-none', lg: 'h-action-lg px-control text-sm leading-none'},\n iconOnly: {true: 'px-0', false: ''},\n fullWidth: {true: 'w-full', false: ''},\n },\n compoundVariants: [\n {tone: 'info', buttonStyle: ['outline', 'ghost'], class: buttonRecipes.infoInteractive},\n {tone: 'warning', buttonStyle: ['outline', 'ghost'], class: buttonRecipes.warningInteractive},\n {tone: 'success', buttonStyle: ['outline', 'ghost'], class: buttonRecipes.successInteractive},\n {tone: 'destructive', buttonStyle: ['outline', 'ghost'], class: buttonRecipes.destructiveInteractive},\n {tone: 'secondary', buttonStyle: ['outline', 'ghost'], class: buttonRecipes.secondaryInteractive},\n {tone: 'neutral', buttonStyle: ['outline', 'ghost'], class: buttonRecipes.neutralInteractive},\n {tone: 'primary', buttonStyle: ['outline', 'ghost'], class: buttonRecipes.primaryInteractive},\n {tone: 'primary', buttonStyle: 'solid', class: 'bg-primary text-primary-foreground'},\n {tone: 'primary', buttonStyle: 'outline', class: 'border-primary/60 text-primary-accent'},\n {tone: 'primary', buttonStyle: 'ghost', class: 'text-primary-accent'},\n {tone: 'neutral', buttonStyle: 'solid', class: 'bg-foreground text-background'},\n {tone: 'neutral', buttonStyle: 'outline', class: 'border-foreground/15 text-foreground'},\n {tone: 'neutral', buttonStyle: 'ghost', class: 'text-foreground'},\n {tone: 'secondary', buttonStyle: 'solid', class: 'bg-secondary text-secondary-foreground'},\n {tone: 'secondary', buttonStyle: 'outline', class: 'border-border/60 text-secondary-foreground'},\n {tone: 'secondary', buttonStyle: 'ghost', class: 'text-secondary-foreground'},\n {tone: 'destructive', buttonStyle: 'solid', class: 'bg-destructive text-destructive-foreground'},\n {tone: 'destructive', buttonStyle: 'outline', class: 'border-destructive/60 text-destructive'},\n {tone: 'destructive', buttonStyle: 'ghost', class: 'text-destructive'},\n {tone: 'success', buttonStyle: 'solid', class: 'bg-success text-success-foreground'},\n {tone: 'success', buttonStyle: 'outline', class: 'border-success/60 text-success'},\n {tone: 'success', buttonStyle: 'ghost', class: 'text-success'},\n {tone: 'warning', buttonStyle: 'solid', class: 'bg-warning text-warning-foreground'},\n {tone: 'warning', buttonStyle: 'outline', class: 'border-warning/60 text-warning-accent'},\n {tone: 'warning', buttonStyle: 'ghost', class: 'text-warning-accent'},\n {tone: 'info', buttonStyle: 'solid', class: 'bg-info text-info-foreground'},\n {tone: 'info', buttonStyle: 'outline', class: 'border-info/60 text-info'},\n {tone: 'info', buttonStyle: 'ghost', class: 'text-info'},\n {size: 'sm', iconOnly: true, class: 'size-action-sm'},\n {size: 'md', iconOnly: true, class: 'size-action'},\n {size: 'lg', iconOnly: true, class: 'size-action-lg'},\n ],\n defaultVariants: {tone: 'primary', buttonStyle: 'solid', size: 'md', iconOnly: false, fullWidth: false},\n});\n","import { useCallback, useLayoutEffect, useRef, type ForwardedRef, type RefCallback } from 'react';\n\n/** Native disabling can drop focused busy actions to body; restore only an unclaimed focus. */\nexport function usePendingButtonFocus(pending: boolean, forwardedRef: ForwardedRef<HTMLElement>) {\n const element = useRef<HTMLElement | null>(null);\n const lastFocused = useRef(false);\n const wasPending = useRef(false);\n const restore = useRef(false);\n const ref = useCallback<RefCallback<HTMLElement>>(node => {\n element.current = node;\n const focus = () => {lastFocused.current = true;};\n const blur = () => {\n // Disabling can blur before the pending layout effect runs.\n if (!wasPending.current && !node?.matches(':disabled')) lastFocused.current = false;\n };\n node?.addEventListener('focus', focus);\n node?.addEventListener('blur', blur);\n const cleanup = typeof forwardedRef === 'function' ? (forwardedRef as RefCallback<HTMLElement>)(node) : undefined;\n if (forwardedRef && typeof forwardedRef !== 'function') forwardedRef.current = node;\n return () => {\n node?.removeEventListener('focus', focus);\n node?.removeEventListener('blur', blur);\n if (element.current === node) element.current = null;\n if (typeof cleanup === 'function') cleanup();\n else if (typeof forwardedRef === 'function') forwardedRef(null);\n else if (forwardedRef) forwardedRef.current = null;\n };\n }, [forwardedRef]);\n\n useLayoutEffect(() => {\n const node = element.current;\n const previous = wasPending.current;\n wasPending.current = pending;\n if (!node) return;\n const doc = node.ownerDocument;\n if (!pending && !previous) lastFocused.current = doc.activeElement === node;\n if (pending && !previous) restore.current = lastFocused.current || doc.activeElement === node;\n if (!pending && previous) {\n const eligible = restore.current;\n restore.current = false;\n if (eligible && node.isConnected && !node.matches(':disabled,[aria-disabled=true]') && (doc.activeElement === doc.body || doc.activeElement === doc.documentElement)) node.focus({preventScroll:true});\n }\n if (!pending || !restore.current) return;\n const removeListeners = () => {\n doc.removeEventListener('focusin', focus, true);\n doc.removeEventListener('pointerdown', pointer, true);\n doc.removeEventListener('keydown', keyboard, true);\n };\n const cancel = () => {\n lastFocused.current = false;\n restore.current = false;\n removeListeners();\n };\n const focus = (event: FocusEvent) => {\n // Body is the browser's fallback when a native button becomes disabled.\n if (event.target !== node && event.target !== doc.body && event.target !== doc.documentElement) cancel();\n };\n const pointer = (event: PointerEvent) => {\n if (!node.contains(event.target as Node)) cancel();\n };\n const keyboard = (event: KeyboardEvent) => {\n if (event.key === 'Tab') cancel();\n };\n doc.addEventListener('focusin', focus, true);\n doc.addEventListener('pointerdown', pointer, true);\n doc.addEventListener('keydown', keyboard, true);\n return removeListeners;\n });\n return ref;\n}\n","import { forwardRef, type AnchorHTMLAttributes, type ElementType, type ReactNode } from 'react';\nimport { Button as PrimitiveButton } from '../../ui/button';\nimport { useButtonConfig, useDensityConfig, type ButtonSize, type ButtonStyle, type ButtonTone } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\nimport { buttonVariants } from './button.variants';\nimport { usePendingButtonFocus } from './use-pending-button-focus';\n\nexport type { ButtonSize, ButtonStyle, ButtonTone } from '../../../lib/ui-provider';\nexport type IconPosition = 'left' | 'right';\ninterface PresentationProps {\n tone?: ButtonTone;\n buttonStyle?: ButtonStyle;\n size?: ButtonSize;\n iconOnly?: boolean;\n fullWidth?: boolean;\n icon?: ElementType;\n iconPosition?: IconPosition;\n children?: ReactNode;\n}\nexport interface BaseButtonProps extends Omit<PrimitiveButton.Props, 'children' | 'size' | 'variant'>, PresentationProps {}\nexport interface BaseButtonLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'href'>, PresentationProps {href: string; disabled?: boolean}\n\nfunction usePresentation({tone, buttonStyle, size, iconOnly = false, fullWidth = false}: PresentationProps) {\n const defaults = useButtonConfig();\n const {defaultScale} = useDensityConfig();\n const resolved = {tone: tone ?? defaults.defaultTone, buttonStyle: buttonStyle ?? defaults.defaultButtonStyle, size: resolveComponentScale(size, defaultScale), iconOnly, fullWidth};\n return {\n ...resolved,\n classes: buttonVariants(resolved),\n attributes: {'data-slot': 'button', 'data-tone': resolved.tone, 'data-style': resolved.buttonStyle, 'data-size': resolved.size, 'data-icon-only': iconOnly || undefined, 'data-full-width': fullWidth || undefined},\n };\n}\n\nfunction Content({icon: Icon, iconPosition = 'left', children}: Pick<PresentationProps, 'icon' | 'iconPosition' | 'children'>) {\n const glyph = Icon && <Icon className=\"size-icon shrink-0\" aria-hidden=\"true\" />;\n return <>{iconPosition === 'left' && glyph}{children}{iconPosition === 'right' && glyph}</>;\n}\n\nexport const BaseButton = forwardRef<HTMLElement, BaseButtonProps>(function BaseButton({tone, buttonStyle, size, iconOnly, fullWidth, icon, iconPosition, className, children, ...props}, ref) {\n const presentation = usePresentation({tone, buttonStyle, size, iconOnly, fullWidth, children});\n const focusRef = usePendingButtonFocus(props['aria-busy'] === true || props['aria-busy'] === 'true', ref);\n return <PrimitiveButton {...props} {...presentation.attributes} ref={focusRef} className={(state) => cn('base-button--component', presentation.classes, typeof className === 'function' ? className(state) : className)}><Content icon={icon} iconPosition={iconPosition}>{children}</Content></PrimitiveButton>;\n});\n\n/** Navigation remains an anchor: Base UI's Button render API deliberately enforces button semantics. */\nexport const BaseButtonLink = forwardRef<HTMLAnchorElement, BaseButtonLinkProps>(function BaseButtonLink({tone, buttonStyle, size, iconOnly, fullWidth, icon, iconPosition, className, children, disabled = false, tabIndex, onClick, rel, target, ...props}, ref) {\n const presentation = usePresentation({tone, buttonStyle, size, iconOnly, fullWidth, children});\n const relTokens = new Set(rel?.split(/\\s+/).filter(Boolean));\n if (target?.toLowerCase() === '_blank') {if (!relTokens.size) relTokens.add('noreferrer'); relTokens.add('noopener');}\n return <a {...props} {...presentation.attributes} ref={ref} target={target} rel={relTokens.size ? [...relTokens].join(' ') : undefined} aria-disabled={disabled || props['aria-disabled'] || undefined} tabIndex={disabled ? -1 : tabIndex} className={cn('base-button--component', presentation.classes, className)} onClick={(event) => {\n if (disabled) {event.preventDefault(); event.stopPropagation(); return;}\n onClick?.(event);\n }}><Content icon={icon} iconPosition={iconPosition}>{children}</Content></a>;\n});\n","import { Loader2 } from 'lucide-react';\nimport * as React from 'react';\nimport { useState, useEffect } from 'react';\nimport { cn } from '../../../lib/utils';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { Text } from '../../typography';\nimport { BaseButton, type BaseButtonProps, type ButtonSize } from './base-button';\nimport { buttonRecipes as styles } from './button.recipes';\n\nexport interface ButtonLoadingStrings {\n\t/** Shows the spinner and blocks activation. */\n\tloading: string;\n\tcompleted: string;\n}\n\nexport const defaultButtonLoadingStrings: ButtonLoadingStrings = {\n\tloading: 'Loading...',\n\tcompleted: 'Completed',\n};\n\nexport interface LoaderButtonProps extends BaseButtonProps {\n\t/** Shows the spinner and blocks activation. */\n\tloading?: boolean;\n\t/** Opts into the loading-capable button even before `loading` is true, so the first press does not swap component identity. */\n\thandlesLoading?: boolean;\n\t/** Overrides the loading announcement copy. */\n\tstrings?: StringsProp<ButtonLoadingStrings>;\n}\n\ninterface UseLoaderButtonStateOptions {\n\t/** Shows the spinner and blocks activation. */\n\tloading?: boolean;\n\t/** Opts into the loading-capable button even before `loading` is true, so the first press does not swap component identity. */\n\thandlesLoading?: boolean;\n\t/** Overrides the loading announcement copy. */\n\tstrings?: StringsProp<ButtonLoadingStrings>;\n}\n\nexport function useLoaderButtonState({\n\tloading = false,\n\thandlesLoading,\n\tstrings: stringsProp,\n}: UseLoaderButtonStateOptions) {\n\tconst strings = useStrings(defaultButtonLoadingStrings, stringsProp);\n\tconst [isLoading, setIsLoading] = useState(loading);\n\tconst [, setShowCompletedState] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (loading) {\n\t\t\tsetIsLoading(true);\n\t\t}\n\t}, [loading]);\n\n\tuseEffect(() => {\n\t\tif (handlesLoading && loading) {\n\t\t\tsetIsLoading(true);\n\t\t}\n\t}, [loading, handlesLoading]);\n\n\tuseEffect(() => {\n\t\tlet timeoutId: ReturnType<typeof setTimeout>;\n\t\tif (!loading && isLoading) {\n\t\t\tsetShowCompletedState(true);\n\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\tsetIsLoading(false);\n\t\t\t\tsetShowCompletedState(false);\n\t\t\t}, 300);\n\t\t}\n\t\treturn () => {\n\t\t\tif (timeoutId) clearTimeout(timeoutId);\n\t\t};\n\t}, [loading, isLoading]);\n\n\treturn { isLoading, strings };\n}\n\ninterface LoaderButtonContentProps {\n\tisLoading: boolean;\n\tloadingText: string;\n\ticon?: BaseButtonProps['icon'];\n\ticonPosition?: BaseButtonProps['iconPosition'];\n\tsize?: ButtonSize;\n\tchildren: React.ReactNode;\n}\n\nexport function LoaderButtonContent({\n\tisLoading,\n\tloadingText,\n\ticon: Icon,\n\ticonPosition = 'left',\n\tsize: _size,\n\tchildren,\n}: LoaderButtonContentProps) {\n\tconst content = isLoading ? loadingText : children;\n\tconst isSimpleText = typeof content === 'string' || typeof content === 'number' || typeof content === 'bigint';\n\n\treturn (\n\t\t<>\n\t\t\t{!!isLoading && (\n\t\t\t\t<Loader2\n\t\t\t\t\tclassName={cn(styles.icon, styles.spinner)}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{!!Icon && iconPosition === 'left' && !isLoading && (\n\t\t\t\t<Icon\n\t\t\t\t\tclassName={styles.icon}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{isSimpleText ? (\n\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"none\" className=\"text-inherit\">\n\t\t\t\t\t{content}\n\t\t\t\t</Text>\n\t\t\t) : content}\n\t\t\t{!!Icon && iconPosition === 'right' && !isLoading && (\n\t\t\t\t<Icon\n\t\t\t\t\tclassName={styles.icon}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n}\n\nconst LoaderButton = React.forwardRef<HTMLButtonElement, LoaderButtonProps>(\n\t(\n\t\t{\n\t\t\tloading = false,\n\t\t\thandlesLoading,\n\t\t\tstrings: stringsProp,\n\t\t\ticon: Icon,\n\t\t\ticonPosition = 'left',\n\t\t\tchildren,\n\t\t\tdisabled,\n\t\t\tclassName,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { isLoading, strings } = useLoaderButtonState({\n\t\t\tloading,\n\t\t\thandlesLoading,\n\t\t\tstrings: stringsProp,\n\t\t});\n\n\t\treturn (\n\t\t\t<BaseButton\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t\tdisabled={disabled || isLoading}\n\t\t\t\taria-busy={isLoading || undefined}\n\t\t\t\tclassName={cn('loader-button--component', isLoading && styles.isLoading, className)}\n\t\t\t>\n\t\t\t\t<LoaderButtonContent\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tloadingText={strings.loading}\n\t\t\t\t\ticon={Icon}\n\t\t\t\t\ticonPosition={iconPosition}\n\t\t\t\t\tsize={props.size}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</LoaderButtonContent>\n\t\t\t</BaseButton>\n\t\t);\n\t},\n);\n\nLoaderButton.displayName = 'LoaderButton';\n\nexport { LoaderButton };\n","import * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from '../display/tooltip';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport { BaseButton, type BaseButtonProps } from './base-button';\n\nexport interface TooltipButtonProps extends BaseButtonProps {\n\twithTooltip: string;\n}\n\nconst TooltipButton = React.forwardRef<HTMLButtonElement, TooltipButtonProps>(\n\t({ withTooltip, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger\n\t\t\t\t\trender={(triggerProps) => {\n\t\t\t\t\t\tconst mergedProps = mergeProps<'button'>(\n\t\t\t\t\t\t\tprops as unknown as React.ButtonHTMLAttributes<HTMLButtonElement>,\n\t\t\t\t\t\t\ttriggerProps as React.ButtonHTMLAttributes<HTMLButtonElement>,\n\t\t\t\t\t\t) as unknown as BaseButtonProps;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t\t{...mergedProps}\n\t\t\t\t\t\t\taria-label={props['aria-label'] ?? withTooltip}\n\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\tclassName={cn('tooltip-button--component', mergedProps.className)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</BaseButton>\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<TooltipContent className=\"px-space-md py-space-xs text-pxs\">\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"text-inherit\">{withTooltip}</Text>\n\t\t\t\t</TooltipContent>\n\t\t\t</Tooltip>\n\t\t);\n\t},\n);\n\nTooltipButton.displayName = 'TooltipButton';\n\nexport { TooltipButton };\n","/**\n * Button — everyday action/link wrapper around the base button presentation.\n *\n * Action mode renders one native `<button>`. Supplying `href` switches to one\n * native `<a>` with the same provider-driven variants, sizes, loading state,\n * and optional tooltip. The link path deliberately does not use Base UI\n * Button's non-native `render` mode because that mode adds button semantics to\n * the replacement element; navigation keeps native link semantics instead.\n */\nimport * as React from 'react';\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from '../display/tooltip';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport {\n\tBaseButton,\n\tBaseButtonLink,\n\ttype BaseButtonLinkProps,\n\ttype BaseButtonProps,\n} from './base-button';\nimport {\n\tLoaderButton,\n\tLoaderButtonContent,\n\ttype LoaderButtonProps,\n\tuseLoaderButtonState,\n} from './loader-button';\nimport { TooltipButton } from './tooltip-button';\n\ntype ButtonEnhancementProps = Pick<\n\tLoaderButtonProps,\n\t'loading' | 'handlesLoading' | 'strings'\n> & {\n\t/** Tooltip copy shown on hover and focus. Supply it for icon-only buttons. */\n\twithTooltip?: string;\n};\n\ntype ButtonAnchorAttributes = Pick<\n\tReact.AnchorHTMLAttributes<HTMLAnchorElement>,\n\t| 'download'\n\t| 'hrefLang'\n\t| 'media'\n\t| 'ping'\n\t| 'referrerPolicy'\n\t| 'rel'\n\t| 'target'\n>;\n\n/** Shared all-mode props for generic wrappers that accept either action mode or link mode. */\nexport type ButtonProps = BaseButtonProps &\n\tButtonEnhancementProps &\n\tButtonAnchorAttributes & {\n\t\t/** Destination for the entry, when it navigates. */\n\t\thref?: string;\n\t};\n\n/** Precise props for consumers that explicitly model a navigation button. */\nexport type ButtonLinkProps = Omit<BaseButtonLinkProps, 'href' | 'type'> &\n\tButtonEnhancementProps & {\n\t\t/** Destination for the entry, when it navigates. */\n\t\thref: string;\n\t};\n\n/** Precise props for consumers that explicitly model an action button. */\nexport type ButtonActionProps = BaseButtonProps &\n\tButtonEnhancementProps & {\n\t\t/** Destination for the entry, when it navigates. */\n\t\thref?: undefined;\n\t\tdownload?: never;\n\t\threfLang?: never;\n\t\tmedia?: never;\n\t\tping?: never;\n\t\treferrerPolicy?: never;\n\t\trel?: never;\n\t\ttarget?: never;\n\t};\n\nfunction usesLoaderPath({\n\tloading,\n\thandlesLoading,\n\tstrings,\n}: ButtonEnhancementProps) {\n\treturn (\n\t\tloading === true ||\n\t\tBoolean(handlesLoading) ||\n\t\tstrings !== undefined\n\t);\n}\n\nconst LoadingButtonLink = React.forwardRef<HTMLAnchorElement, ButtonLinkProps>(\n\t(\n\t\t{\n\t\t\tloading,\n\t\t\thandlesLoading,\n\t\t\tstrings,\n\t\t\ticon,\n\t\t\ticonPosition = 'left',\n\t\t\tchildren,\n\t\t\tdisabled,\n\t\t\tsize,\n\t\t\tclassName,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst loader = useLoaderButtonState({\n\t\t\tloading,\n\t\t\thandlesLoading,\n\t\t\tstrings,\n\t\t});\n\n\t\treturn (\n\t\t\t<BaseButtonLink\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t\tsize={size}\n\t\t\t\tdisabled={disabled || loader.isLoading}\n\t\t\t\taria-busy={loader.isLoading || undefined}\n\t\t\t\tclassName={cn('loader-button--component', className)}\n\t\t\t>\n\t\t\t\t<LoaderButtonContent\n\t\t\t\t\tisLoading={loader.isLoading}\n\t\t\t\t\tloadingText={loader.strings.loading}\n\t\t\t\t\ticon={icon}\n\t\t\t\t\ticonPosition={iconPosition}\n\t\t\t\t\tsize={size}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</LoaderButtonContent>\n\t\t\t</BaseButtonLink>\n\t\t);\n\t},\n);\n\nLoadingButtonLink.displayName = 'LoadingButtonLink';\n\nconst ButtonLink = React.forwardRef<HTMLAnchorElement, ButtonLinkProps>(\n\t({ withTooltip: _withTooltip, ...props }, ref) => {\n\t\tif (usesLoaderPath(props)) {\n\t\t\treturn <LoadingButtonLink ref={ref} {...props} />;\n\t\t}\n\n\t\tconst {\n\t\t\tloading: _loading,\n\t\t\thandlesLoading: _handlesLoading,\n\t\t\tstrings: _strings,\n\t\t\t...linkProps\n\t\t} = props;\n\t\treturn <BaseButtonLink ref={ref} {...linkProps} />;\n\t},\n);\n\nButtonLink.displayName = 'ButtonLink';\n\nfunction toLinkProps(\n\tprops: Omit<\n\t\tButtonProps,\n\t\t'href' | 'withTooltip' | 'loading' | 'handlesLoading' | 'strings'\n\t>,\n): Omit<ButtonLinkProps, 'href' | keyof ButtonEnhancementProps> {\n\tconst {\n\t\ttype: _type,\n\t\tform: _form,\n\t\tformAction: _formAction,\n\t\tformEncType: _formEncType,\n\t\tformMethod: _formMethod,\n\t\tformNoValidate: _formNoValidate,\n\t\tformTarget: _formTarget,\n\t\tname: _name,\n\t\tvalue: _value,\n\t\tnativeButton: _nativeButton,\n\t\tfocusableWhenDisabled: _focusableWhenDisabled,\n\t\trender: _render,\n\t\t...linkProps\n\t} = props;\n\n\treturn linkProps as unknown as Omit<\n\t\tButtonLinkProps,\n\t\t'href' | keyof ButtonEnhancementProps\n\t>;\n}\n\nconst ButtonImplementation = React.forwardRef<\n\tHTMLButtonElement | HTMLAnchorElement,\n\tButtonProps\n>(\n\t(\n\t\t{\n\t\t\thref,\n\t\t\twithTooltip,\n\t\t\tloading,\n\t\t\thandlesLoading,\n\t\t\tstrings,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tif (href !== undefined) {\n\t\t\tconst linkProps = toLinkProps(props);\n\t\t\tconst link = (\n\t\t\t\t<ButtonLink\n\t\t\t\t\t{...linkProps}\n\t\t\t\t\tref={ref as React.ForwardedRef<HTMLAnchorElement>}\n\t\t\t\t\thref={href}\n\t\t\t\t\tloading={loading}\n\t\t\t\t\thandlesLoading={handlesLoading}\n\t\t\t\t\tstrings={strings}\n\t\t\t\t\taria-label={props['aria-label'] ?? withTooltip}\n\t\t\t\t\tclassName={cn('button--component', linkProps.className)}\n\t\t\t\t/>\n\t\t\t);\n\n\t\t\tif (withTooltip) {\n\t\t\t\treturn (\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger render={link} />\n\t\t\t\t\t\t<TooltipContent className=\"px-space-md py-space-xs text-pxs\">\n\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"text-inherit\">{withTooltip}</Text>\n\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn link;\n\t\t}\n\n\t\tconst {\n\t\t\tdownload: _download,\n\t\t\threfLang: _hrefLang,\n\t\t\tmedia: _media,\n\t\t\tping: _ping,\n\t\t\treferrerPolicy: _referrerPolicy,\n\t\t\trel: _rel,\n\t\t\ttarget: _target,\n\t\t\t...baseProps\n\t\t} = props;\n\t\tconst actionProps = {\n\t\t\t...baseProps,\n\t\t\tclassName: cn('button--component', baseProps.className),\n\t\t};\n\n\t\tif (usesLoaderPath({ loading, handlesLoading, strings })) {\n\t\t\tif (withTooltip) {\n\t\t\t\treturn (\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger\n\t\t\t\t\t\t\trender={(triggerProps) => (\n\t\t\t\t\t\t\t\t<LoaderButton\n\t\t\t\t\t\t\t\t\t{...actionProps}\n\t\t\t\t\t\t\t\t\t{...triggerProps}\n\t\t\t\t\t\t\t\t\tref={ref as React.ForwardedRef<HTMLButtonElement>}\n\t\t\t\t\t\t\t\t\tloading={loading}\n\t\t\t\t\t\t\t\t\thandlesLoading={handlesLoading}\n\t\t\t\t\t\t\t\t\tstrings={strings}\n\t\t\t\t\t\t\t\t\taria-label={baseProps['aria-label'] ?? withTooltip}\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t(triggerProps as { className?: string }).className,\n\t\t\t\t\t\t\t\t\t\tactionProps.className,\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{baseProps.children}\n\t\t\t\t\t\t\t\t</LoaderButton>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<TooltipContent className=\"px-space-md py-space-xs text-pxs\">\n\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"text-inherit\">{withTooltip}</Text>\n\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<LoaderButton\n\t\t\t\t\t{...actionProps}\n\t\t\t\t\tref={ref as React.ForwardedRef<HTMLButtonElement>}\n\t\t\t\t\tloading={loading}\n\t\t\t\t\thandlesLoading={handlesLoading}\n\t\t\t\t\tstrings={strings}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (withTooltip) {\n\t\t\treturn (\n\t\t\t\t<TooltipButton\n\t\t\t\t\t{...actionProps}\n\t\t\t\t\tref={ref as React.ForwardedRef<HTMLButtonElement>}\n\t\t\t\t\twithTooltip={withTooltip}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<BaseButton\n\t\t\t\t{...actionProps}\n\t\t\t\tref={ref as React.ForwardedRef<HTMLButtonElement>}\n\t\t\t/>\n\t\t);\n\t},\n);\n\ntype ButtonComponent = {\n\t(props: ButtonLinkProps & React.RefAttributes<HTMLAnchorElement>): React.ReactElement | null;\n\t(props: ButtonActionProps & React.RefAttributes<HTMLButtonElement>): React.ReactElement | null;\n\t(\n\t\tprops: ButtonProps &\n\t\t\tReact.RefAttributes<HTMLButtonElement | HTMLAnchorElement>,\n\t): React.ReactElement | null;\n\tdisplayName?: string;\n};\n\nconst Button = ButtonImplementation as ButtonComponent;\nButton.displayName = 'Button';\n\nexport { Button };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,SAASA,EAAgB,EACvB,WAAQ,GACR,kBACA,GAAG+B,KAC4D;CAC/D,OACE,kBAAC9B,EAAiB,UAAlB;EACE,aAAU;EACV,OAAOgC,KAAiBC;EACxB,GAAIH;CACL,CAAA;AAEL;AAEA,SAAS7B,EAAQ,EAAE,GAAG6B,KAAsC;CAC1D,OACE,kBAAC/B,GAAD,EAAA,UACE,kBAACC,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI8B;CAAQ,CAAA,EACxC,CAAA;AAErB;AAEA,SAAS5B,EAAe,EACtB,aAAU,IACV,WACA,aACA,GAAG4B,KACsD;CACzD,IAAMM,IAAaC,IAAU,kBAACZ,GAAD,CAAO,CAAA,IAAI,KAAA,GAClCa,IAAuD,OAAOC,KAAW,eACzE,GAAa,MAAU;EACzB,IAAM,EAAE,cAAcC,GAAe,GAAGC,MAASC;EAEjD,OAAOH,EAAOE,GAA4BE,CAAK;CACjD,KACEJ;CAEJ,OACE,kBAACvC,EAAiB,SAAlB;EACE,aAAU;EACV,QAAQoC,KAAcE;EACtB,GAAIR;EAEH;CACuB,CAAA;AAE9B;AAEA,SAAS3B,EAAe,EACtB,cACA,cACA,UAAO,OACP,gBAAa,GACb,WAAQ,UACR,iBAAc,GACd,oBAAiBoB,GACjB,aACA,GAAGO,KAKuC;CAC1C,IAAMe,IAAoBC,EAAwBC,CAAS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AAClG,GAAD;GAAgB,WAAU;GACzB,UAAA,kBAAC1C,GAAD;IAAM,KAAI;IAAO,MAAK;IAAU,WAAU;IAAgB,UAAAoH;GAAkB,CAAA;EAC7D,CAAA,CACR,EAAA,CAAA,IAIJwB;CACR;CAEA,IAAM,EACL,UAAUC,GACV,UAAUC,GACV,OAAOC,GACP,MAAMC,GACN,gBAAgBC,GAChB,KAAKC,GACL,QAAQC,GACR,GAAGC,MACA5I,GACE6I,IAAc;EACnB,GAAGD;EACH,WAAWrJ,EAAG,qBAAqBqJ,EAAU,SAAS;CACvD;CAqDA,OAnDI/B,EAAe;EAAE;EAAS;EAAgB;CAAQ,CAAC,IAClDD,IAEF,kBAACzH,GAAD,EAAA,UAAA,CACC,kBAAC8C,GAAD,EACC,SAAS,MACR,kBAACsE,GAAD;EACC,GAAIsC;EACJ,GAAIlC;EACC;EACI;EACO;EACP;EACT,cAAYiC,EAAU,iBAAiBhC;EACvC,WAAWrH,EACToH,EAAwC,WACzCkC,EAAY,SACb;EAEC,UAAAD,EAAU;CACE,CAAA,EAEf,CAAA,GACD,kBAAC1G,GAAD;EAAgB,WAAU;EACzB,UAAA,kBAAC1C,GAAD;GAAM,KAAI;GAAO,MAAK;GAAU,WAAU;GAAgB,UAAAoH;EAAkB,CAAA;CAC7D,CAAA,CACR,EAAA,CAAA,IAKV,kBAACL,GAAD;EACC,GAAIsC;EACC;EACI;EACO;EACP;CACT,CAAA,IAICjC,IAEF,kBAACJ,GAAD;EACC,GAAIqC;EACC;EACQ;CACb,CAAA,IAKF,kBAACjE,GAAD;EACC,GAAIiE;EACC;CACL,CAAA;AAEH,CAac;AACf,EAAO,cAAc"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./utils-
|
|
2
|
+
import { t as e } from "./utils-BvH9PSmq.js";
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
import { cva as r } from "class-variance-authority";
|
|
6
6
|
import { Button as i } from "@base-ui/react/button";
|
|
7
7
|
//#region src/components/ui/button.tsx
|
|
8
|
-
var a = r("inline-flex items-center justify-center gap-space-md whitespace-nowrap rounded-
|
|
8
|
+
var a = r("box-border inline-flex items-center justify-center gap-space-md whitespace-nowrap rounded-inner font-sans text-sm font-medium shrink-0 border border-transparent transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-icon", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -44,4 +44,4 @@ var a = r("inline-flex items-center justify-center gap-space-md whitespace-nowra
|
|
|
44
44
|
//#endregion
|
|
45
45
|
export { a as n, o as t };
|
|
46
46
|
|
|
47
|
-
//# sourceMappingURL=button-
|
|
47
|
+
//# sourceMappingURL=button-BZyfTvwm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-BZyfTvwm.js","names":["Button","React","ButtonPrimitive","cn","React$1","buttonVariants","cva","Button$1","props","Button","variant","size","className","state"],"sources":["../src/components/ui/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\n\n/** Internal presentation only; public buttons own the stable tone/style API. */\nexport const buttonVariants = cva('box-border inline-flex items-center justify-center gap-space-md whitespace-nowrap rounded-inner font-sans text-sm font-medium shrink-0 border border-transparent transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-icon', {\n variants: {\n variant: {default:'bg-primary text-primary-foreground hover:bg-primary/90', destructive:'bg-destructive text-destructive-foreground hover:bg-destructive/90', outline:'border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground', secondary:'bg-secondary text-secondary-foreground hover:bg-secondary/80', ghost:'hover:bg-accent hover:text-accent-foreground', link:'text-link-color underline-offset-4 hover:underline'},\n size: {default:'h-action px-control', xs:'h-action-xs px-control-xs', sm:'h-action-sm px-control-sm', lg:'h-action-lg px-control', icon:'size-action p-0', 'icon-xs':'size-action-xs p-0', 'icon-sm':'size-action-sm p-0', 'icon-lg':'size-action-lg p-0'},\n }, defaultVariants:{variant:'default',size:'default'},\n});\nexport namespace Button { export type Props = ButtonPrimitive.Props & VariantProps<typeof buttonVariants>; }\nexport const Button = React.forwardRef<HTMLElement, Button.Props>(function Button({className,variant,size,...props},ref) {\n // Unspecified recipe props leave presentation ownership with the public wrapper.\n return <ButtonPrimitive {...props} ref={ref} data-slot=\"button\" className={state => cn(variant != null || size != null ? buttonVariants({variant,size}) : undefined, typeof className === 'function' ? className(state) : className)} />;\n});\n"],"mappings":";;;;;;;AAMA,IAAaK,IAAiBC,EAAI,ycAAyc;CAC1e,UAAU;EACT,SAAS;GAAC,SAAQ;GAA0D,aAAY;GAAsE,SAAQ;GAA4F,WAAU;GAAgE,OAAM;GAAgD,MAAK;EAAoD;EAC3b,MAAM;GAAC,SAAQ;GAAuB,IAAG;GAA6B,IAAG;GAA6B,IAAG;GAA0B,MAAK;GAAmB,WAAU;GAAsB,WAAU;GAAsB,WAAU;EAAoB;CAC1P;CAAG,iBAAgB;EAAC,SAAQ;EAAU,MAAK;CAAS;AACrD,CAAC,GAEYN,IAASC,EAAM,WAAsC,SAAgB,EAAC,cAAU,YAAQ,SAAK,GAAGO,KAAO,GAAK;CAExH,OAAO,kBAACN,GAAD;EAAiB,GAAIM;EAAY;EAAK,aAAU;EAAS,YAAW,MAASL,EAAGO,KAAW,QAAQC,KAAQ,OAAON,EAAe;GAAC;GAAQ;EAAI,CAAC,IAAI,KAAA,GAAW,OAAOO,KAAc,aAAaA,EAAUC,CAAK,IAAID,CAAS;CAAI,CAAA;AACxO,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { _ as e, s as t } from "./ui-provider-DRPn3qNl.js";
|
|
3
|
+
import { t as n } from "./utils-BvH9PSmq.js";
|
|
4
|
+
import { t as r } from "./separator-BhtFyo4x.js";
|
|
5
|
+
import { a as i } from "./typography-BxQgiZyw.js";
|
|
6
|
+
import { n as a } from "./button-BZDasD04.js";
|
|
7
|
+
import * as o from "react";
|
|
8
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
9
|
+
import { mergeProps as c } from "@base-ui/react/merge-props";
|
|
10
|
+
import { useRender as l } from "@base-ui/react/use-render";
|
|
11
|
+
//#region src/components/ui/button-group.tsx
|
|
12
|
+
var u = ({ orientation: e = "horizontal" } = {}) => e === "vertical" ? "button-group-vertical" : "button-group-horizontal";
|
|
13
|
+
function d({ className: e, orientation: t = "horizontal", ...r }) {
|
|
14
|
+
return /* @__PURE__ */ s("div", {
|
|
15
|
+
role: "group",
|
|
16
|
+
"data-slot": "button-group",
|
|
17
|
+
"data-orientation": t,
|
|
18
|
+
className: n("button-group--primitive", e),
|
|
19
|
+
...r
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function f({ className: e, render: t, ...r }) {
|
|
23
|
+
return l({
|
|
24
|
+
defaultTagName: "div",
|
|
25
|
+
props: c({ className: n("button-group-text--primitive", e) }, r),
|
|
26
|
+
render: t,
|
|
27
|
+
state: { slot: "button-group-text" }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function p({ className: e, orientation: t = "vertical", ...i }) {
|
|
31
|
+
return /* @__PURE__ */ s(r, {
|
|
32
|
+
"data-slot": "button-group-separator",
|
|
33
|
+
orientation: t,
|
|
34
|
+
className: n("button-group-separator--primitive", e),
|
|
35
|
+
...i
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/base/buttons/button-group.recipes.ts
|
|
40
|
+
var m = {
|
|
41
|
+
root: "inline-flex items-stretch rounded-inner box-border data-[orientation=vertical]:flex-col [&[data-orientation=horizontal]>:not(:last-child)]:rounded-e-none [&[data-orientation=horizontal]>:not(:first-child)]:rounded-s-none [&[data-orientation=horizontal]>:not(:first-child)]:-ms-px [&[data-orientation=vertical]>:not(:last-child)]:rounded-b-none [&[data-orientation=vertical]>:not(:first-child)]:rounded-t-none [&[data-orientation=vertical]>:not(:first-child)]:-mt-px",
|
|
42
|
+
text: "inline-flex items-center px-control-sm py-0 bg-muted border border-border text-sm text-muted-foreground",
|
|
43
|
+
separator: "bg-border w-px self-stretch"
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/components/base/buttons/button-group.tsx
|
|
47
|
+
function h({ className: e, ...t }) {
|
|
48
|
+
return /* @__PURE__ */ s(d, {
|
|
49
|
+
className: n("button-group--component", m.root, e),
|
|
50
|
+
...t
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function g(e) {
|
|
54
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
55
|
+
}
|
|
56
|
+
function _({ children: e, className: t, ...r }) {
|
|
57
|
+
return /* @__PURE__ */ s(f, {
|
|
58
|
+
className: n("button-group-text--component", m.text, t),
|
|
59
|
+
...r,
|
|
60
|
+
children: g(e) ? /* @__PURE__ */ s(i, {
|
|
61
|
+
tag: "span",
|
|
62
|
+
size: "inherit",
|
|
63
|
+
weight: "medium",
|
|
64
|
+
lineHeight: "tight",
|
|
65
|
+
className: "text-inherit",
|
|
66
|
+
children: e
|
|
67
|
+
}) : e
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function v({ className: e, ...t }) {
|
|
71
|
+
return /* @__PURE__ */ s(p, {
|
|
72
|
+
className: n("button-group-separator--component", m.separator, e),
|
|
73
|
+
...t
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/components/base/buttons/text-button.tsx
|
|
78
|
+
var y = {
|
|
79
|
+
sm: "text-pxs leading-none h-auto px-0",
|
|
80
|
+
md: "text-pxs leading-none h-auto px-0",
|
|
81
|
+
lg: "text-sm leading-none h-auto px-0"
|
|
82
|
+
}, b = o.forwardRef(({ className: r, type: i = "button", size: o, disabled: c, ...l }, u) => {
|
|
83
|
+
let { defaultScale: d } = t(), f = e(o, d);
|
|
84
|
+
return /* @__PURE__ */ s(a, {
|
|
85
|
+
ref: u,
|
|
86
|
+
type: i,
|
|
87
|
+
tone: "primary",
|
|
88
|
+
buttonStyle: "ghost",
|
|
89
|
+
size: f,
|
|
90
|
+
disabled: c,
|
|
91
|
+
className: n("text-button--component", "hover:bg-transparent dark:hover:bg-transparent", "inline-flex items-center justify-center underline decoration-border underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current", "text-primary-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50", y[f], r),
|
|
92
|
+
...l
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
b.displayName = "TextButton";
|
|
96
|
+
//#endregion
|
|
97
|
+
export { u as a, _ as i, h as n, v as r, b as t };
|
|
98
|
+
|
|
99
|
+
//# sourceMappingURL=buttons-D_6KJvEE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttons-D_6KJvEE.js","names":["ButtonGroup","ButtonGroupText","ButtonGroupSeparator","ButtonGroupPrimitive","styles","ButtonGroupTextPrimitive","ButtonGroupSeparatorPrimitive","React","resolveComponentScale","useDensityConfig","cn","Separator","Text","BaseButton","React$1","buttonGroupVariants","orientation","ButtonGroup$1","props","className","ButtonGroupText$1","useRender","mergeProps","ButtonGroupSeparator$1","buttonGroupRecipes","ButtonGroup","isScalarContent","content","ButtonGroupText","children","ButtonGroupSeparator","sizeClasses","TextButton","resolvedSize","size","defaultScale"],"sources":["../src/components/ui/button-group.tsx","../src/components/base/buttons/button-group.recipes.ts","../src/components/base/buttons/button-group.tsx","../src/components/base/buttons/text-button.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Separator } from \"./separator\"\n\nconst buttonGroupVariants = ({ orientation = \"horizontal\" }: { orientation?: \"horizontal\" | \"vertical\" } = {}) =>\n orientation === \"vertical\" ? \"button-group-vertical\" : \"button-group-horizontal\"\n\nfunction ButtonGroup({\n className,\n orientation = \"horizontal\",\n ...props\n}: React.ComponentProps<\"div\"> & { orientation?: \"horizontal\" | \"vertical\" }) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(\"button-group--primitive\", className)}\n {...props}\n />\n )\n}\n\nfunction ButtonGroupText({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\"button-group-text--primitive\", className),\n },\n props\n ),\n render,\n state: {\n slot: \"button-group-text\",\n },\n })\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\"button-group-separator--primitive\", className)}\n {...props}\n />\n )\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n}\n","/** Private Tailwind recipes; public props and DOM hooks remain owned by the component. */\nexport const buttonGroupRecipes = {\n\troot: \"inline-flex items-stretch rounded-inner box-border data-[orientation=vertical]:flex-col [&[data-orientation=horizontal]>:not(:last-child)]:rounded-e-none [&[data-orientation=horizontal]>:not(:first-child)]:rounded-s-none [&[data-orientation=horizontal]>:not(:first-child)]:-ms-px [&[data-orientation=vertical]>:not(:last-child)]:rounded-b-none [&[data-orientation=vertical]>:not(:first-child)]:rounded-t-none [&[data-orientation=vertical]>:not(:first-child)]:-mt-px\",\n\ttext: \"inline-flex items-center px-control-sm py-0 bg-muted border border-border text-sm text-muted-foreground\",\n\tseparator: \"bg-border w-px self-stretch\",\n} as const satisfies Record<string, string>;\n","/**\n * ButtonGroup — base wrapper around the shadcn `ui/button-group` primitive.\n *\n * What this layer adds on top of the primitive:\n * - Stable BEM hooks (`button-group--component`, `button-group-text--component`,\n * `button-group-separator--component`) on each wrapped part's outermost node.\n * - Design-system typography for the scalar copy inside `ButtonGroupText`,\n * while arbitrary `ReactNode` content (icons, `kbd`, nested controls) passes\n * through untouched so the compound pattern stays composable.\n * - Keeps the primitive's `orientation` variant, segmented-radius handling, and\n * every native `div` prop by spread.\n *\n * Compose it as `<ButtonGroup><Button/><ButtonGroupSeparator/><Button/></ButtonGroup>`.\n * Reach for it when adjacent buttons must read as one segmented control; use\n * `Stack` when the buttons are merely peers with a gap between them.\n */\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport {\n\tButtonGroup as ButtonGroupPrimitive,\n\tButtonGroupSeparator as ButtonGroupSeparatorPrimitive,\n\tButtonGroupText as ButtonGroupTextPrimitive,\n\tbuttonGroupVariants,\n} from '../../ui/button-group';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport { buttonGroupRecipes as styles } from './button-group.recipes';\n\nexport type ButtonGroupProps = ComponentProps<typeof ButtonGroupPrimitive>;\nexport type ButtonGroupTextProps = ComponentProps<typeof ButtonGroupTextPrimitive>;\nexport type ButtonGroupSeparatorProps = ComponentProps<typeof ButtonGroupSeparatorPrimitive>;\n\n/** Segmented shell that joins adjacent buttons into a single control. */\nfunction ButtonGroup({ className, ...props }: ButtonGroupProps) {\n\treturn (\n\t\t<ButtonGroupPrimitive className={cn('button-group--component', styles.root, className)} {...props} />\n\t);\n}\n\nfunction isScalarContent(content: ReactNode): content is string | number | bigint {\n\treturn typeof content === 'string' || typeof content === 'number' || typeof content === 'bigint';\n}\n\n/** Non-interactive label segment — scalar copy renders through Typography. */\nfunction ButtonGroupText({ children, className, ...props }: ButtonGroupTextProps) {\n\treturn (\n\t\t<ButtonGroupTextPrimitive className={cn('button-group-text--component', styles.text, className)} {...props}>\n\t\t\t{isScalarContent(children) ? (\n\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</ButtonGroupTextPrimitive>\n\t);\n}\n\n/** Hairline divider between two segments of the group. */\nfunction ButtonGroupSeparator({ className, ...props }: ButtonGroupSeparatorProps) {\n\treturn (\n\t\t<ButtonGroupSeparatorPrimitive\n\t\t\tclassName={cn('button-group-separator--component', styles.separator, className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };\n","/**\n * TextButton — link-styled button (underline, primary tint, no padding).\n *\n * Wraps `BaseButton` with `tone=\"primary\" buttonStyle=\"ghost\"`. Routine\n * usage omits `size`; the shared component scale controls typography.\n */\nimport * as React from 'react';\nimport { cn } from '../../../lib/utils';\nimport { useDensityConfig, type ComponentScale } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { BaseButton } from './base-button';\n\nexport type TextButtonSize = ComponentScale;\n\nconst sizeClasses: Record<TextButtonSize, string> = {\n\tsm: 'text-pxs leading-none h-auto px-0',\n\tmd: 'text-pxs leading-none h-auto px-0',\n\tlg: 'text-sm leading-none h-auto px-0',\n};\n\nexport type TextButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> & {\n\t/** Size preset. */\n\tsize?: TextButtonSize;\n\tchildren: React.ReactNode;\n};\n\nexport const TextButton = React.forwardRef<HTMLButtonElement, TextButtonProps>(\n\t({ className, type = 'button', size, disabled, ...props }, ref) => {\n\t\tconst { defaultScale } = useDensityConfig();\n\t\tconst resolvedSize = resolveComponentScale(size, defaultScale);\n\t\treturn (\n\t\t\t<BaseButton\n\t\t\t\tref={ref}\n\t\t\t\ttype={type}\n\t\t\t\ttone=\"primary\"\n\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\tsize={resolvedSize}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tclassName={cn('text-button--component',\n\t\t\t\t\t// `ghost` supplies the transparent resting state and the accent\n\t\t\t\t\t// colour, but its hover tint assumes a padded hit area. At\n\t\t\t\t\t// `px-0 h-auto` that tint paints a bare rectangle around the\n\t\t\t\t\t// glyphs, so the underline carries hover on its own. Both\n\t\t\t\t\t// variants are cleared: the light and dark tints are separate\n\t\t\t\t\t// declarations, so overriding one leaves the other painting.\n\t\t\t\t\t'hover:bg-transparent dark:hover:bg-transparent',\n\t\t\t\t\t'inline-flex items-center justify-center underline decoration-border underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current',\n\t\t\t\t\t'text-primary-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',\n\t\t\t\t\t'disabled:pointer-events-none disabled:opacity-50',\n\t\t\t\t\tsizeClasses[resolvedSize],\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nTextButton.displayName = 'TextButton';\n"],"mappings":";;;;;;;;;;;AAOA,IAAMe,KAAuB,EAAE,iBAAc,iBAA8D,CAAC,MAC1GC,MAAgB,aAAa,0BAA0B;AAEzD,SAAShB,EAAY,EACnB,cACA,iBAAc,cACd,GAAGkB,KACyE;CAC5E,OACE,kBAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,oBAAkBF;EAClB,WAAWN,EAAG,2BAA2BS,CAAS;EAClD,GAAID;CACL,CAAA;AAEL;AAEA,SAASjB,EAAgB,EACvB,cACA,WACA,GAAGiB,KAC+B;CAClC,OAAOG,EAAU;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EAAiB,GACpCwB,IAAezB,EAAsB0B,GAAMC,CAAY;CAC7D,OACC,kBAACtB,GAAD;EACM;EACC;EACN,MAAK;EACL,aAAY;EACZ,MAAMoB;EACI;EACV,WAAWvB,EAAG,0BAOb,kDACA,2JACA,2HACA,oDACAqB,EAAYE,IACZd,CACD;EACA,GAAID;CACJ,CAAA;AAEH,CACD;AAEA,EAAW,cAAc"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./utils-
|
|
3
|
-
import {
|
|
4
|
-
import { t as n } from "./structure-
|
|
5
|
-
import {
|
|
6
|
-
import { t as c } from "./action-menu-
|
|
7
|
-
import { t as l } from "./separator-
|
|
2
|
+
import { t as e } from "./utils-BvH9PSmq.js";
|
|
3
|
+
import { t } from "./button-BZDasD04.js";
|
|
4
|
+
import { t as n } from "./structure-CRdqVawd.js";
|
|
5
|
+
import { a as r, c as i, f as a, l as o, u as s } from "./smart-card-DjGVV2xr.js";
|
|
6
|
+
import { t as c } from "./action-menu-Drxw_vJk.js";
|
|
7
|
+
import { t as l } from "./separator-BNIgG3au.js";
|
|
8
8
|
import { forwardRef as u } from "react";
|
|
9
9
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/base/cards/partials/smart-card-skeleton.tsx
|
|
11
11
|
function p({ title: t, lines: c = 2, className: l }) {
|
|
12
12
|
let u = ({ barClassName: t }) => /* @__PURE__ */ d("div", { className: e("animate-pulse rounded bg-muted", t) });
|
|
13
|
-
return /* @__PURE__ */ f(
|
|
14
|
-
className: e("smart-card-skeleton--component",
|
|
15
|
-
children: [/* @__PURE__ */ d(
|
|
13
|
+
return /* @__PURE__ */ f(o, {
|
|
14
|
+
className: e("smart-card-skeleton--component", a.card, "gap-space-xl py-surface", l),
|
|
15
|
+
children: [/* @__PURE__ */ d(i, {
|
|
16
16
|
className: "flex-col gap-normal px-surface pb-0",
|
|
17
|
-
children: t ? /* @__PURE__ */ d(
|
|
18
|
-
}), /* @__PURE__ */ d(
|
|
17
|
+
children: t ? /* @__PURE__ */ d(s, { children: t }) : /* @__PURE__ */ d(u, { barClassName: "h-4 w-32" })
|
|
18
|
+
}), /* @__PURE__ */ d(r, {
|
|
19
19
|
className: "px-surface py-0",
|
|
20
20
|
children: /* @__PURE__ */ d(n, {
|
|
21
21
|
gap: "lg",
|
|
@@ -63,4 +63,4 @@ m.displayName = "CardPrimaryAction", h.displayName = "CardActionStrip";
|
|
|
63
63
|
//#endregion
|
|
64
64
|
export { m as n, p as r, h as t };
|
|
65
65
|
|
|
66
|
-
//# sourceMappingURL=cards-
|
|
66
|
+
//# sourceMappingURL=cards-qGSErLw_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards-
|
|
1
|
+
{"version":3,"file":"cards-qGSErLw_.js","names":["cn","Stack","CardContent","CardHeader","SURFACE_CLASSES","CardShell","CardTitle","ActionButtons","Separator","SmartCardSkeleton","SkeletonBar","barClassName","className","title","lines","i","CardPrimaryAction","forwardRef","props","hidden","Button","CardActionStrip","visible","actions","action","alignClassName","align","separator","compact","fullWidthPrimary","buttonClassName"],"sources":["../src/components/base/cards/partials/smart-card-skeleton.tsx","../src/components/base/cards/card-actions.tsx"],"sourcesContent":["/**\n * SmartCardSkeleton — placeholder shell rendered while a SmartCard's\n * data is loading. Picks up the canonical card surface so the loading\n * state visually matches the eventual `SmartCard` it'll replace.\n */\nimport type { ReactNode } from 'react';\n\nimport { Stack } from '../../structure';\nimport { cn } from '../../../../lib/utils';\n\nimport { SURFACE_CLASSES } from '../smart-card.tokens';\n\nimport { CardContent, CardHeader, CardShell, CardTitle } from './card-primitives';\n\nexport interface SmartCardSkeletonProps {\n\t/** Surface title. */\n\ttitle?: ReactNode;\n\tlines?: number;\n\tclassName?: string;\n}\n\nexport function SmartCardSkeleton({ title, lines = 2, className }: SmartCardSkeletonProps) {\n\tconst SkeletonBar = ({ barClassName }: { barClassName?: string }) => (\n\t\t<div className={cn('animate-pulse rounded bg-muted', barClassName)} />\n\t);\n\n\treturn (\n\t\t<CardShell\n\t\t\tclassName={cn('smart-card-skeleton--component', SURFACE_CLASSES.card, 'gap-space-xl py-surface', className)}\n\t\t>\n\t\t\t<CardHeader className=\"flex-col gap-normal px-surface pb-0\">\n\t\t\t\t{title ? <CardTitle>{title}</CardTitle> : <SkeletonBar barClassName=\"h-4 w-32\" />}\n\t\t\t</CardHeader>\n\t\t\t<CardContent className=\"px-surface py-0\">\n\t\t\t\t<Stack gap=\"lg\">\n\t\t\t\t\t{Array.from({ length: lines }, (_, i) => (\n\t\t\t\t\t\t<SkeletonBar key={`skel-${String(i)}`} barClassName={cn('h-4', i === 0 ? 'w-full' : 'w-3/4')} />\n\t\t\t\t\t))}\n\t\t\t\t</Stack>\n\t\t\t</CardContent>\n\t\t</CardShell>\n\t);\n}\n\nSmartCardSkeleton.displayName = 'SmartCardSkeleton';\n","/**\n * Card action recipes — package-owned chrome for body/footer card actions.\n *\n * Use these instead of hand-rolled footer button rows in resource cards.\n */\nimport { forwardRef, type ComponentProps, type ReactElement, type ReactNode } from 'react';\nimport type { LucideIcon } from 'lucide-react';\n\nimport { Button } from '../buttons';\nimport {\n\tActionButtons,\n\ttype ActionMenuAction,\n\ttype ActionMenuLinkRenderProps,\n} from '../action-menu';\nimport { Separator } from '../display/separator';\nimport { cn } from '../../../lib/utils';\n\nexport interface CardPrimaryActionProps\n\textends Omit<ComponentProps<typeof Button>, 'variant' | 'fullWidth' | 'children'> {\n\tchildren: ReactNode;\n\ticon?: LucideIcon;\n\t/** Renders the action as an anchor to this destination. */\n\thref?: string;\n\t/** Omits the action without changing the others' order. */\n\thidden?: boolean;\n\t/** Stretches the action to the row's width. */\n\tfullWidth?: boolean;\n}\n\nexport const CardPrimaryAction = forwardRef<HTMLButtonElement, CardPrimaryActionProps>(function CardPrimaryAction({\n\tchildren,\n\ticon,\n\thidden = false,\n\tfullWidth = true,\n\tclassName,\n\t...props\n}: CardPrimaryActionProps, ref) {\n\tif (hidden) return null;\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\ttype=\"button\"\n\t\t\ttone=\"primary\"\n\t\t\tfullWidth={fullWidth}\n\t\t\ticon={icon}\n\t\t\tclassName={cn('card-primary-action--component', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Button>\n\t);\n});\n\nexport interface CardActionStripProps {\n\t/** Actions to render, in order. */\n\tactions: readonly ActionMenuAction[];\n\t/** Draws a rule above the action row. */\n\tseparator?: boolean;\n\t/** Horizontal alignment of the action row. */\n\talign?: 'start' | 'end' | 'between' | 'stretch';\n\t/** Tightens the row for dense cards. */\n\tcompact?: boolean;\n\t/** Stretches only the primary action. */\n\tfullWidthPrimary?: boolean;\n\tclassName?: string;\n\t/** Merged onto every button in the row. */\n\tbuttonClassName?: string;\n\t/** Renders actions carrying an `href` through the consumer's router. */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}\n\nexport function CardActionStrip({\n\tactions,\n\tseparator = false,\n\talign = 'start',\n\tcompact = false,\n\tfullWidthPrimary = false,\n\tclassName,\n\tbuttonClassName,\n\trenderLink,\n}: CardActionStripProps) {\n\tconst visible = actions.filter((action) => action.visible !== false);\n\tif (visible.length === 0) return null;\n\n\tconst alignClassName = {\n\t\tstart: 'justify-start',\n\t\tend: 'justify-end',\n\t\tbetween: 'justify-between',\n\t\tstretch: 'justify-stretch',\n\t}[align];\n\n\treturn (\n\t\t<div className={cn('card-action-strip--component', className)}>\n\t\t\t{!!separator && <Separator className={cn(compact ? 'mb-space-sm' : 'mb-space-md')} />}\n\t\t\t<ActionButtons\n\t\t\t\tactions={visible}\n\t\t\t\tsize={compact ? 'sm' : 'md'}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'flex-wrap',\n\t\t\t\t\talignClassName,\n\t\t\t\t\talign === 'stretch' && '[&>.base-button--component]:flex-1',\n\t\t\t\t\tfullWidthPrimary && '[&>.base-button--component:first-child]:flex-1',\n\t\t\t\t)}\n\t\t\t\tbuttonClassName={cn(\n\t\t\t\t\tcompact ? 'min-w-0' : 'min-w-24',\n\t\t\t\t\tbuttonClassName,\n\t\t\t\t)}\n\t\t\t\trenderLink={renderLink}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nCardPrimaryAction.displayName = 'CardPrimaryAction';\nCardActionStrip.displayName = 'CardActionStrip';\n"],"mappings":";;;;;;;;;;AAqBA,SAAgBS,EAAkB,EAAE,UAAO,WAAQ,GAAG,gBAAqC;CAC1F,IAAMC,KAAe,EAAE,sBACtB,kBAAC,OAAD,EAAK,WAAWV,EAAG,kCAAkCW,CAAY,EAAI,CAAA;CAGtE,OACC,kBAACN,GAAD;EACC,WAAWL,EAAG,kCAAkCI,EAAgB,MAAM,2BAA2BQ,CAAS;EAD3G,UAAA,CAGC,kBAACT,GAAD;GAAY,WAAU;GACpB,UAAAU,IAAQ,kBAACP,GAAD,EAAA,UAAYO,EAAiB,CAAA,IAAI,kBAACH,GAAD,EAAa,cAAa,WAAY,CAAA;EACrE,CAAA,GACZ,kBAACR,GAAD;GAAa,WAAU;GACtB,UAAA,kBAACD,GAAD;IAAO,KAAI;IACT,UAAA,MAAM,KAAK,EAAE,QAAQa,EAAM,IAAI,GAAG,MAClC,kBAACJ,GAAD,EAAuC,cAAcV,EAAG,OAAOe,MAAM,IAAI,WAAW,OAAO,EAAI,GAA7E,QAAQ,OAAOA,CAAC,GAA6D,CAC/F;GACK,CAAA;EACK,CAAA,CACH;;AAEb;AAEA,EAAkB,cAAc;;;ACfhC,IAAaC,IAAoBC,EAAsD,SAA2B,EACjH,aACA,SACA,YAAS,IACT,eAAY,IACZ,cACA,GAAGC,KACuB,GAAK;CAG/B,OAFIC,IAAe,OAGlB,kBAACC,GAAD;EACM;EACL,MAAK;EACL,MAAK;EACM;EACL;EACN,WAAWpB,EAAG,kCAAkCY,CAAS;EACzD,GAAIM;EAEH;CACM,CAAA;AAEV,CAAC;AAoBD,SAAgBG,EAAgB,EAC/B,YACA,eAAY,IACZ,WAAQ,SACR,aAAU,IACV,sBAAmB,IACnB,cACA,oBACA,iBACwB;CACxB,IAAMC,IAAUC,EAAQ,QAAQ,MAAWC,EAAO,YAAY,EAAK;CACnE,IAAIF,EAAQ,WAAW,GAAG,OAAO;CAEjC,IAAMG,IAAiB;EACtB,OAAO;EACP,KAAK;EACL,SAAS;EACT,SAAS;CACV,EAAEC;CAEF,OACC,kBAAC,OAAD;EAAK,WAAW1B,EAAG,gCAAgCY,CAAS;EAA5D,UAAA,CACE,CAAC,CAACe,KAAa,kBAACnB,GAAD,EAAW,WAAWR,EAAG4B,IAAU,gBAAgB,aAAa,EAAI,CAAA,GACpF,kBAACrB,GAAD;GACC,SAASe;GACT,MAAMM,IAAU,OAAO;GACvB,WAAW5B,EACV,aACAyB,GACAC,MAAU,aAAa,sCACvBG,KAAoB,gDACrB;GACA,iBAAiB7B,EAChB4B,IAAU,YAAY,YACtBE,CACD;GACY;EACZ,CAAA,CACG;;AAEP;AAEA,EAAkB,cAAc,qBAChC,EAAgB,cAAc"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./utils-BvH9PSmq.js";
|
|
3
|
+
import { a as t } from "./typography-BxQgiZyw.js";
|
|
4
|
+
import { i as n } from "./popover.recipes-QlD4JenO.js";
|
|
5
|
+
import { m as r } from "./primitives-C7ff0QaI.js";
|
|
6
|
+
import { t as i } from "./number-DasMFWEG.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
import * as l from "recharts";
|
|
10
|
+
//#region src/components/base/chart/chart.tsx
|
|
11
|
+
var u = {
|
|
12
|
+
light: "",
|
|
13
|
+
dark: ".dark"
|
|
14
|
+
}, d = {
|
|
15
|
+
width: 320,
|
|
16
|
+
height: 200
|
|
17
|
+
}, f = a.createContext(null);
|
|
18
|
+
function p() {
|
|
19
|
+
let e = a.useContext(f);
|
|
20
|
+
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
21
|
+
return e;
|
|
22
|
+
}
|
|
23
|
+
function m({ id: t, className: n, children: r, config: i, initialDimension: o = d, ...u }) {
|
|
24
|
+
let p = a.useId(), m = `chart-${t ?? p.replace(/:/g, "")}`;
|
|
25
|
+
return /* @__PURE__ */ s(f.Provider, {
|
|
26
|
+
value: { config: i },
|
|
27
|
+
children: /* @__PURE__ */ c("div", {
|
|
28
|
+
"data-slot": "chart",
|
|
29
|
+
"data-chart": m,
|
|
30
|
+
className: e("chart--component flex aspect-video w-full min-w-0 justify-center text-xs", "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-axis-tick-label]:fill-muted-foreground [&_.recharts-cartesian-axis-tick-value]:fill-muted-foreground", "[&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50", "[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border", "[&_.recharts-dot[stroke=\"#fff\"]]:stroke-transparent", "[&_.recharts-layer]:outline-hidden", "[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border", "[&_.recharts-radial-bar-background-sector]:fill-muted", "[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted", "[&_.recharts-reference-line_[stroke='#ccc']]:stroke-border", "[&_.recharts-sector]:outline-hidden", "[&_.recharts-sector[stroke=\"#fff\"]]:stroke-transparent", "[&_.recharts-surface]:outline-hidden", n),
|
|
31
|
+
...u,
|
|
32
|
+
children: [/* @__PURE__ */ s(h, {
|
|
33
|
+
id: m,
|
|
34
|
+
config: i
|
|
35
|
+
}), /* @__PURE__ */ s(l.ResponsiveContainer, {
|
|
36
|
+
initialDimension: o,
|
|
37
|
+
children: r
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function h({ id: e, config: t }) {
|
|
43
|
+
let n = Object.entries(t).filter(([, e]) => e.theme ?? e.color);
|
|
44
|
+
return n.length ? /* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: Object.entries(u).map(([t, r]) => `
|
|
45
|
+
${r} [data-chart=${e}] {
|
|
46
|
+
${n.map(([e, n]) => {
|
|
47
|
+
let r = n.theme?.[t] ?? n.color;
|
|
48
|
+
return r ? ` --color-${e}: ${r};` : null;
|
|
49
|
+
}).join("\n")}
|
|
50
|
+
}
|
|
51
|
+
`).join("\n") } }) : null;
|
|
52
|
+
}
|
|
53
|
+
var g = l.Tooltip;
|
|
54
|
+
function _({ active: l, payload: u, className: d, indicator: f = "dot", hideLabel: m = !1, hideIndicator: h = !1, label: g, labelFormatter: _, labelClassName: v, formatter: y, color: x, nameKey: S, labelKey: C }) {
|
|
55
|
+
let { config: w } = p(), T = a.useMemo(() => {
|
|
56
|
+
if (m || !u?.length) return null;
|
|
57
|
+
let [n] = u, r = `${C ?? n?.dataKey ?? n?.name ?? "value"}`, i = b(w, n, r), a = !C && typeof g == "string" ? w[g]?.label ?? g : i?.label;
|
|
58
|
+
return _ ? /* @__PURE__ */ s(t, {
|
|
59
|
+
tag: "div",
|
|
60
|
+
size: "xs",
|
|
61
|
+
weight: "medium",
|
|
62
|
+
className: e("chart--tooltip-label", v),
|
|
63
|
+
children: _(a, u)
|
|
64
|
+
}) : a ? /* @__PURE__ */ s(t, {
|
|
65
|
+
tag: "div",
|
|
66
|
+
size: "xs",
|
|
67
|
+
weight: "medium",
|
|
68
|
+
className: e("chart--tooltip-label", v),
|
|
69
|
+
children: a
|
|
70
|
+
}) : null;
|
|
71
|
+
}, [
|
|
72
|
+
g,
|
|
73
|
+
_,
|
|
74
|
+
u,
|
|
75
|
+
m,
|
|
76
|
+
v,
|
|
77
|
+
w,
|
|
78
|
+
C
|
|
79
|
+
]);
|
|
80
|
+
if (!l || !u?.length) return null;
|
|
81
|
+
let E = u.length === 1 && f !== "dot";
|
|
82
|
+
return /* @__PURE__ */ c("div", {
|
|
83
|
+
className: e("chart--tooltip grid min-w-32 items-start gap-space-sm rounded-radius border border-border/60 bg-popover text-xs text-popover-foreground shadow-xl", n.compact, d),
|
|
84
|
+
children: [!E && T, /* @__PURE__ */ s("div", {
|
|
85
|
+
className: "grid gap-space-sm",
|
|
86
|
+
children: u.filter((e) => e.type !== "none").map((n, a) => {
|
|
87
|
+
let l = `${S ?? n.name ?? n.dataKey ?? "value"}`, u = b(w, n, l), d = typeof n.payload?.fill == "string" ? n.payload.fill : void 0, p = x ?? d ?? n.color ?? n.fill;
|
|
88
|
+
return /* @__PURE__ */ s("div", {
|
|
89
|
+
className: e("chart--tooltip-item flex w-full flex-wrap items-stretch gap-space-md [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", f === "dot" && "items-center"),
|
|
90
|
+
children: y && n.value !== void 0 && n.name !== void 0 ? y(n.value, n.name, n, a, n.payload) : /* @__PURE__ */ c(o, { children: [u?.icon ? /* @__PURE__ */ s(u.icon, {}) : !h && /* @__PURE__ */ s("div", {
|
|
91
|
+
className: e("shrink-0 rounded-[2px] border-[var(--color-border)] bg-[var(--color-bg)]", f === "dot" && "size-2.5", f === "line" && "h-3 w-1", f === "dashed" && "h-0 w-0 border-[1.5px] border-dashed bg-transparent", E && f === "dashed" && "my-0.5"),
|
|
92
|
+
style: {
|
|
93
|
+
"--color-bg": p,
|
|
94
|
+
"--color-border": p
|
|
95
|
+
}
|
|
96
|
+
}), /* @__PURE__ */ c("div", {
|
|
97
|
+
className: e("flex flex-1 justify-between gap-space-lg leading-none", E ? "items-end" : "items-center"),
|
|
98
|
+
children: [/* @__PURE__ */ c("div", {
|
|
99
|
+
className: "grid gap-space-sm",
|
|
100
|
+
children: [E && T, /* @__PURE__ */ s(t, {
|
|
101
|
+
tag: "span",
|
|
102
|
+
size: "xs",
|
|
103
|
+
type: "secondary",
|
|
104
|
+
children: u?.label ?? n.name
|
|
105
|
+
})]
|
|
106
|
+
}), n.value !== void 0 && (typeof n.value == "number" ? /* @__PURE__ */ s(i, {
|
|
107
|
+
value: n.value,
|
|
108
|
+
size: "xs",
|
|
109
|
+
weight: "medium",
|
|
110
|
+
align: "right"
|
|
111
|
+
}) : /* @__PURE__ */ s(r, {
|
|
112
|
+
size: "xs",
|
|
113
|
+
children: Array.isArray(n.value) ? n.value.join(" - ") : String(n.value)
|
|
114
|
+
}))]
|
|
115
|
+
})] })
|
|
116
|
+
}, `${n.dataKey ?? n.name ?? "value"}-${a}`);
|
|
117
|
+
})
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
var v = l.Legend;
|
|
122
|
+
function y({ className: n, hideIcon: r = !1, payload: i, verticalAlign: a = "bottom", nameKey: o }) {
|
|
123
|
+
let { config: l } = p();
|
|
124
|
+
return i?.length ? /* @__PURE__ */ s("div", {
|
|
125
|
+
className: e("chart--legend flex flex-wrap items-center justify-center gap-x-space-xl gap-y-space-md text-xs", a === "top" ? "pb-space-lg" : "pt-space-lg", n),
|
|
126
|
+
children: i.filter((e) => e.type !== "none").map((e, n) => {
|
|
127
|
+
let i = `${o ?? e.dataKey ?? "value"}`, a = b(l, e, i), u = e.value ?? e.name ?? e.dataKey ?? i;
|
|
128
|
+
return /* @__PURE__ */ c("div", {
|
|
129
|
+
className: "chart--legend-item flex items-center gap-space-sm [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground",
|
|
130
|
+
children: [a?.icon && !r ? /* @__PURE__ */ s(a.icon, {}) : /* @__PURE__ */ s("div", {
|
|
131
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
132
|
+
style: { backgroundColor: e.color }
|
|
133
|
+
}), /* @__PURE__ */ s(t, {
|
|
134
|
+
tag: "span",
|
|
135
|
+
size: "xs",
|
|
136
|
+
children: a?.label ?? u
|
|
137
|
+
})]
|
|
138
|
+
}, `${e.value ?? i}-${n}`);
|
|
139
|
+
})
|
|
140
|
+
}) : null;
|
|
141
|
+
}
|
|
142
|
+
function b(e, t, n) {
|
|
143
|
+
if (typeof t != "object" || !t) return;
|
|
144
|
+
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
145
|
+
return n in t && typeof t[n] == "string" ? i = t[n] : r && n in r && typeof r[n] == "string" && (i = r[n]), i in e ? e[i] : e[n];
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
export { g as a, h as i, v as n, _ as o, y as r, m as t };
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=chart-Bsc5BICK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-Bsc5BICK.js","names":["React","_Fragment","NumberValue","cn","Text","surfaceInsetClasses","MonoValue","Number","React$1","Fragment$1","RechartsPrimitive","THEMES","INITIAL_DIMENSION","ChartContext","useChart","context","ChartContainer","props","uniqueId","chartId","id","className","ChartStyle","colorConfig","config","item","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","tooltipLabel","hideLabel","payload","labelKey","getPayloadConfigFromPayload","value","label","labelFormatter","labelClassName","active","nestLabel","indicator","nameKey","payloadFill","indicatorColor","formatter","index","hideIndicator","ChartLegend","ChartLegendContent","verticalAlign","fallbackLabel","hideIcon","payloadPayload","configLabelKey"],"sources":["../src/components/base/chart/chart.tsx"],"sourcesContent":["/**\n * Chart — Recharts helpers with shadcn-compatible configuration.\n *\n * Localized from the shadcn/ReUI chart helper into the base layer so chart\n * chrome uses this library's tokens, tooltip density, and BEM DOM hooks.\n * The Recharts peer stays isolated to the exact `base/chart` entrypoint.\n */\nimport * as React from 'react';\nimport * as RechartsPrimitive from 'recharts';\n\nimport { MonoValue, Number as NumberValue } from '../../primitives';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport { surfaceInsetClasses } from '../popover/popover.recipes';\n\nconst THEMES = { light: '', dark: '.dark' } as const;\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const;\n\nexport type ChartConfig = Record<\n\tstring,\n\t{\n\t\t/** Axis label for the hovered position. Supplied by Recharts. */\n\t\tlabel?: React.ReactNode;\n\t\t/** Leading glyph. */\n\t\ticon?: React.ComponentType;\n\t} & (\n\t\t| { color?: string; theme?: never }\n\t\t| { color?: never; theme: Record<keyof typeof THEMES, string> }\n\t)\n>;\n\nexport type ChartPayloadItem = {\n\tdataKey?: string | number;\n\t/** Form field name, forwarded for native submits. */\n\tname?: string | number;\n\t/** Current value. Controlled. */\n\tvalue?: string | number | Array<string | number>;\n\ttype?: string;\n\t/** Overrides the colour of the tooltip indicator. */\n\tcolor?: string;\n\tfill?: string;\n\t/** Data points under the cursor. Supplied by Recharts. */\n\tpayload?: Record<string, unknown>;\n};\n\nexport interface ChartInitialDimension {\n\twidth: number;\n\theight: number;\n}\n\ninterface ChartContextProps {\n\t/** Maps each data key to its label, colour, and icon. */\n\tconfig: ChartConfig;\n}\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart(): ChartContextProps {\n\tconst context = React.useContext(ChartContext);\n\n\tif (!context) {\n\t\tthrow new Error('useChart must be used within a <ChartContainer />');\n\t}\n\n\treturn context;\n}\n\nexport interface ChartContainerProps extends React.ComponentPropsWithoutRef<'div'> {\n\t/** Maps each data key to its label, colour, and icon. */\n\tconfig: ChartConfig;\n\tchildren: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n\t/** Starting width and height, so the chart renders before its container is measured. */\n\tinitialDimension?: ChartInitialDimension;\n}\n\nfunction ChartContainer({\n\tid,\n\tclassName,\n\tchildren,\n\tconfig,\n\tinitialDimension = INITIAL_DIMENSION,\n\t...props\n}: ChartContainerProps) {\n\tconst uniqueId = React.useId();\n\tconst chartId = `chart-${id ?? uniqueId.replace(/:/g, '')}`;\n\n\treturn (\n\t\t<ChartContext.Provider value={{ config }}>\n\t\t\t<div\n\t\t\t\tdata-slot=\"chart\"\n\t\t\t\tdata-chart={chartId}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'chart--component flex aspect-video w-full min-w-0 justify-center text-xs',\n\t\t\t\t\t'[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-axis-tick-label]:fill-muted-foreground [&_.recharts-cartesian-axis-tick-value]:fill-muted-foreground',\n\t\t\t\t\t\"[&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50\",\n\t\t\t\t\t'[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border',\n\t\t\t\t\t'[&_.recharts-dot[stroke=\"#fff\"]]:stroke-transparent',\n\t\t\t\t\t'[&_.recharts-layer]:outline-hidden',\n\t\t\t\t\t\"[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border\",\n\t\t\t\t\t'[&_.recharts-radial-bar-background-sector]:fill-muted',\n\t\t\t\t\t'[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted',\n\t\t\t\t\t\"[&_.recharts-reference-line_[stroke='#ccc']]:stroke-border\",\n\t\t\t\t\t'[&_.recharts-sector]:outline-hidden',\n\t\t\t\t\t'[&_.recharts-sector[stroke=\"#fff\"]]:stroke-transparent',\n\t\t\t\t\t'[&_.recharts-surface]:outline-hidden',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<ChartStyle id={chartId} config={config} />\n\t\t\t\t<RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsPrimitive.ResponsiveContainer>\n\t\t\t</div>\n\t\t</ChartContext.Provider>\n\t);\n}\n\nfunction ChartStyle({ id, config }: { id: string; config: ChartConfig }) {\n\tconst colorConfig = Object.entries(config).filter(([, item]) => item.theme ?? item.color);\n\n\tif (!colorConfig.length) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<style\n\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t__html: Object.entries(THEMES)\n\t\t\t\t\t.map(\n\t\t\t\t\t\t([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n\t.map(([key, itemConfig]) => {\n\t\tconst color =\n\t\t\titemConfig.theme?.[theme as keyof typeof itemConfig.theme] ??\n\t\t\titemConfig.color;\n\t\treturn color ? ` --color-${key}: ${color};` : null;\n\t})\n\t.join('\\n')}\n}\n`,\n\t\t\t\t\t)\n\t\t\t\t\t.join('\\n'),\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nexport interface ChartTooltipContentProps extends React.ComponentPropsWithoutRef<'div'> {\n\t/** Whether the tooltip is showing. Supplied by Recharts. */\n\tactive?: boolean;\n\t/** Data points under the cursor. Supplied by Recharts. */\n\tpayload?: ChartPayloadItem[];\n\t/** Axis label for the hovered position. Supplied by Recharts. */\n\tlabel?: React.ReactNode;\n\t/** Merged onto the tooltip label. */\n\tlabelClassName?: string;\n\t/** Formats the tooltip label. */\n\tlabelFormatter?: (label: React.ReactNode, payload: ChartPayloadItem[]) => React.ReactNode;\n\t/** Formats each tooltip value. */\n\tformatter?: (\n\t\t/** Current value. Controlled. */\n\t\tvalue: NonNullable<ChartPayloadItem['value']>,\n\t\t/** Form field name, forwarded for native submits. */\n\t\tname: NonNullable<ChartPayloadItem['name']>,\n\t\titem: ChartPayloadItem,\n\t\tindex: number,\n\t\t/** Data points under the cursor. Supplied by Recharts. */\n\t\tpayload?: Record<string, unknown>,\n\t) => React.ReactNode;\n\t/** Overrides the colour of the tooltip indicator. */\n\tcolor?: string;\n\t/** Hides the tooltip label row. */\n\thideLabel?: boolean;\n\t/** Hides the colour indicator beside each value. */\n\thideIndicator?: boolean;\n\t/** Shape of the colour indicator. */\n\tindicator?: 'line' | 'dot' | 'dashed';\n\t/** Key in the payload holding each series name. */\n\tnameKey?: string;\n\t/** Key in the payload holding the tooltip label. */\n\tlabelKey?: string;\n}\n\nfunction ChartTooltipContent({\n\tactive,\n\tpayload,\n\tclassName,\n\tindicator = 'dot',\n\thideLabel = false,\n\thideIndicator = false,\n\tlabel,\n\tlabelFormatter,\n\tlabelClassName,\n\tformatter,\n\tcolor,\n\tnameKey,\n\tlabelKey,\n}: ChartTooltipContentProps) {\n\tconst { config } = useChart();\n\n\tconst tooltipLabel = React.useMemo(() => {\n\t\tif (hideLabel || !payload?.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst [item] = payload;\n\t\tconst key = `${labelKey ?? item?.dataKey ?? item?.name ?? 'value'}`;\n\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\tconst value =\n\t\t\t!labelKey && typeof label === 'string'\n\t\t\t\t? (config[label]?.label ?? label)\n\t\t\t\t: itemConfig?.label;\n\n\t\tif (labelFormatter) {\n\t\t\treturn (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"div\"\n\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\tweight=\"medium\"\n\t\t\t\t\tclassName={cn('chart--tooltip-label', labelClassName)}\n\t\t\t\t>\n\t\t\t\t\t{labelFormatter(value, payload)}\n\t\t\t\t</Text>\n\t\t\t);\n\t\t}\n\n\t\tif (!value) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<Text\n\t\t\t\ttag=\"div\"\n\t\t\t\tsize=\"xs\"\n\t\t\t\tweight=\"medium\"\n\t\t\t\tclassName={cn('chart--tooltip-label', labelClassName)}\n\t\t\t>\n\t\t\t\t{value}\n\t\t\t</Text>\n\t\t);\n\t}, [\n\t\tlabel,\n\t\tlabelFormatter,\n\t\tpayload,\n\t\thideLabel,\n\t\tlabelClassName,\n\t\tconfig,\n\t\tlabelKey,\n\t]);\n\n\tif (!active || !payload?.length) {\n\t\treturn null;\n\t}\n\n\tconst nestLabel = payload.length === 1 && indicator !== 'dot';\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'chart--tooltip grid min-w-32 items-start gap-space-sm rounded-radius border border-border/60 bg-popover text-xs text-popover-foreground shadow-xl',\n\t\t\t\tsurfaceInsetClasses.compact,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!nestLabel && tooltipLabel}\n\t\t\t<div className=\"grid gap-space-sm\">\n\t\t\t\t{payload\n\t\t\t\t\t.filter((item) => item.type !== 'none')\n\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\tconst key = `${nameKey ?? item.name ?? item.dataKey ?? 'value'}`;\n\t\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\t\t\t\tconst payloadFill =\n\t\t\t\t\t\t\ttypeof item.payload?.fill === 'string'\n\t\t\t\t\t\t\t\t? item.payload.fill\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\tconst indicatorColor = color ?? payloadFill ?? item.color ?? item.fill;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={`${item.dataKey ?? item.name ?? 'value'}-${index}`}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'chart--tooltip-item flex w-full flex-wrap items-stretch gap-space-md [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground',\n\t\t\t\t\t\t\t\t\tindicator === 'dot' && 'items-center',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!formatter && item.value !== undefined && item.name !== undefined ? (\n\t\t\t\t\t\t\t\t\tformatter(item.value, item.name, item, index, item.payload)\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{itemConfig?.icon ? (\n\t\t\t\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t!hideIndicator && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'shrink-0 rounded-[2px] border-[var(--color-border)] bg-[var(--color-bg)]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindicator === 'dot' && 'size-2.5',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindicator === 'line' && 'h-3 w-1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindicator === 'dashed' &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'h-0 w-0 border-[1.5px] border-dashed bg-transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnestLabel && indicator === 'dashed' && 'my-0.5',\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'--color-bg': indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'--color-border': indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t'flex flex-1 justify-between gap-space-lg leading-none',\n\t\t\t\t\t\t\t\t\t\t\t\tnestLabel ? 'items-end' : 'items-center',\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-space-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t{nestLabel && tooltipLabel}\n\t\t\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{itemConfig?.label ?? item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{item.value !== undefined && (\n\t\t\t\t\t\t\t\t\t\t\t\ttypeof item.value === 'number' ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NumberValue value={item.value} size=\"xs\" weight=\"medium\" align=\"right\" />\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<MonoValue size=\"xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{Array.isArray(item.value) ? item.value.join(' - ') : String(item.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</MonoValue>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nexport interface ChartLegendContentProps extends React.ComponentPropsWithoutRef<'div'> {\n\thideIcon?: boolean;\n\t/** Data points under the cursor. Supplied by Recharts. */\n\tpayload?: ChartPayloadItem[];\n\tverticalAlign?: 'top' | 'bottom' | 'middle';\n\t/** Key in the payload holding each series name. */\n\tnameKey?: string;\n}\n\nfunction ChartLegendContent({\n\tclassName,\n\thideIcon = false,\n\tpayload,\n\tverticalAlign = 'bottom',\n\tnameKey,\n}: ChartLegendContentProps) {\n\tconst { config } = useChart();\n\n\tif (!payload?.length) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'chart--legend flex flex-wrap items-center justify-center gap-x-space-xl gap-y-space-md text-xs',\n\t\t\t\tverticalAlign === 'top' ? 'pb-space-lg' : 'pt-space-lg',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{payload\n\t\t\t\t.filter((item) => item.type !== 'none')\n\t\t\t\t.map((item, index) => {\n\t\t\t\t\tconst key = `${nameKey ?? item.dataKey ?? 'value'}`;\n\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\t\t\tconst fallbackLabel = item.value ?? item.name ?? item.dataKey ?? key;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={`${item.value ?? key}-${index}`}\n\t\t\t\t\t\t\tclassName=\"chart--legend-item flex items-center gap-space-sm [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{itemConfig?.icon && !hideIcon ? (\n\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"h-2 w-2 shrink-0 rounded-[2px]\"\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: item.color,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\">\n\t\t\t\t\t\t\t\t{itemConfig?.label ?? fallbackLabel}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t</div>\n\t);\n}\n\nfunction getPayloadConfigFromPayload(\n\tconfig: ChartConfig,\n\tpayload: unknown,\n\tkey: string,\n) {\n\tif (typeof payload !== 'object' || payload === null) {\n\t\treturn undefined;\n\t}\n\n\tconst payloadPayload =\n\t\t'payload' in payload &&\n\t\ttypeof payload.payload === 'object' &&\n\t\tpayload.payload !== null\n\t\t\t? payload.payload\n\t\t\t: undefined;\n\n\tlet configLabelKey = key;\n\n\tif (\n\t\tkey in payload &&\n\t\ttypeof payload[key as keyof typeof payload] === 'string'\n\t) {\n\t\tconfigLabelKey = payload[key as keyof typeof payload] as string;\n\t} else if (\n\t\tpayloadPayload &&\n\t\tkey in payloadPayload &&\n\t\ttypeof payloadPayload[key as keyof typeof payloadPayload] === 'string'\n\t) {\n\t\tconfigLabelKey = payloadPayload[\n\t\t\tkey as keyof typeof payloadPayload\n\t\t] as string;\n\t}\n\n\treturn configLabelKey in config ? config[configLabelKey] : config[key];\n}\n\nexport {\n\tChartContainer,\n\tChartTooltip,\n\tChartTooltipContent,\n\tChartLegend,\n\tChartLegendContent,\n\tChartStyle,\n};\n"],"mappings":";;;;;;;;;;AAeA,IAAMW,IAAS;CAAE,OAAO;CAAI,MAAM;AAAQ,GACpCC,IAAoB;CAAE,OAAO;CAAK,QAAQ;AAAI,GAuC9CC,IAAeb,EAAM,cAAwC,IAAI;AAEvE,SAASc,IAA8B;CACtC,IAAMC,IAAUf,EAAM,WAAWa,CAAY;CAE7C,IAAI,CAACE,GACJ,MAAU,MAAM,mDAAmD;CAGpE,OAAOA;AACR;AAUA,SAASC,EAAe,EACvB,OACA,cACA,aACA,WACA,sBAAmBJ,GACnB,GAAGK,KACoB;CACvB,IAAMC,IAAWlB,EAAM,MAAM,GACvBmB,IAAU,SAASC,KAAMF,EAAS,QAAQ,MAAM,EAAE;CAExD,OACC,kBAACL,EAAa,UAAd;EAAuB,OAAO,EAAE,UAAO;EACtC,UAAA,kBAAC,OAAD;GACC,aAAU;GACV,cAAYM;GACZ,WAAWhB,EACV,4EACA,4LACA,qEACA,6DACA,yDACA,sCACA,0DACA,yDACA,8DACA,8DACA,uCACA,4DACA,wCACAkB,CACD;GACA,GAAIJ;GAnBL,UAAA,CAqBC,kBAACK,GAAD;IAAY,IAAIH;IAAiB;GAAS,CAAA,GAC1C,kBAACT,EAAkB,qBAAnB;IAAyD;IACvD;GACqC,CAAA,CACnC;;CACiB,CAAA;AAEzB;AAEA,SAASY,EAAW,EAAE,OAAI,aAA+C;CACxE,IAAMC,IAAc,OAAO,QAAQC,CAAM,CAAC,CAAC,QAAQ,GAAGC,OAAUA,EAAK,SAASA,EAAK,KAAK;CAMxF,OAJKF,EAAY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B;EAEP,CAAC;CACE,CAAA,IAvCE;AAyCT;AAEA,SAASZ,EACR,GACA,GACA,GACC;CACD,IAAI,OAAOF,KAAY,aAAYA,GAClC;CAGD,IAAMqB,IACL,aAAarB,KACb,OAAOA,EAAQ,WAAY,YAC3BA,EAAQ,YAAY,OACjBA,EAAQ,UACR,KAAA,GAEAsB,IAAiB7B;CAiBrB,OAdCA,KAAOO,KACP,OAAOA,EAAQP,MAAiC,WAEhD,IAAiBO,EAAQP,KAEzB4B,KACA5B,KAAO4B,KACP,OAAOA,EAAe5B,MAAwC,aAE9D,IAAiB4B,EAChB5B,KAIK6B,KAAkBjC,IAASA,EAAOiC,KAAkBjC,EAAOI;AACnE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./utils-BvH9PSmq.js";
|
|
3
|
+
import { forwardRef as t } from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { CheckIcon as r } from "lucide-react";
|
|
6
|
+
import { Checkbox as i } from "@base-ui/react/checkbox";
|
|
7
|
+
//#region src/components/ui/checkbox.tsx
|
|
8
|
+
function a({ className: t, onCheckedChange: a, ...o }) {
|
|
9
|
+
return /* @__PURE__ */ n(i.Root, {
|
|
10
|
+
"data-slot": "checkbox",
|
|
11
|
+
className: e("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-[color,box-shadow] outline-none", "focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 aria-invalid:border-destructive", "data-[checked]:bg-primary data-[checked]:border-primary data-[checked]:text-primary-foreground", "data-[indeterminate]:bg-primary data-[indeterminate]:border-primary data-[indeterminate]:text-primary-foreground", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", t),
|
|
12
|
+
onCheckedChange: a,
|
|
13
|
+
...o,
|
|
14
|
+
children: /* @__PURE__ */ n(i.Indicator, {
|
|
15
|
+
"data-slot": "checkbox-indicator",
|
|
16
|
+
className: "flex items-center justify-center text-current",
|
|
17
|
+
children: /* @__PURE__ */ n(r, { className: "size-3.5" })
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/base/choice-inputs/checkbox.tsx
|
|
23
|
+
var o = t(function({ className: t, ...r }, i) {
|
|
24
|
+
return /* @__PURE__ */ n(a, {
|
|
25
|
+
ref: i,
|
|
26
|
+
className: e("checkbox--component inline-flex items-center justify-center rounded-radius-xs border-muted-foreground", t),
|
|
27
|
+
...r
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
o.displayName = "Checkbox";
|
|
31
|
+
//#endregion
|
|
32
|
+
export { o as t };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=checkbox-BQNDjUCh.js.map
|