themelia-react-ui 1.0.1 → 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 +137 -0
- package/README.md +59 -13
- package/dist/{accordion-B-5Focs8.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-B5tPpXnS.js → ai-artifact-DLVdK0Py.js} +151 -155
- package/dist/ai-artifact-DLVdK0Py.js.map +1 -0
- package/dist/{app-shell-at8Kt4l_.js → app-shell-C_fKpljx.js} +11 -10
- package/dist/app-shell-C_fKpljx.js.map +1 -0
- package/dist/{attachment-BO2R47wn.js → attachment-DbjUWsP0.js} +12 -12
- package/dist/{attachment-BO2R47wn.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-Bpzty83c.js → avatar-Bu2HhitA.js} +6 -6
- package/dist/{avatar-Bpzty83c.js.map → avatar-Bu2HhitA.js.map} +1 -1
- 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 +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +3 -3
- package/dist/base/display.js +7 -7
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +40 -43
- package/dist/base/inline-edit.js.map +1 -1
- 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 +1 -1
- package/dist/blocks/analytics.js +510 -472
- 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 +36 -36
- package/dist/blocks/planning.js.map +1 -1
- 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-Cum56XOF.js → cards-qGSErLw_.js} +12 -12
- package/dist/{cards-Cum56XOF.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-BavDRjF7.js → checkbox-BQNDjUCh.js} +3 -3
- 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-xHKbAJDj.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-DEbdr-3u.js → combobox-BFnbJJp3.js} +18 -18
- package/dist/combobox-BFnbJJp3.js.map +1 -0
- package/dist/{combobox-xv3yJbzl.js → combobox-hozNwUcc.js} +313 -316
- package/dist/combobox-hozNwUcc.js.map +1 -0
- package/dist/{command-C0xe7u9B.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 +1 -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/navigation/tabs.d.ts +3 -5
- package/dist/components/base/popover/popover.recipes.d.ts +3 -3
- 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/types.d.ts +1 -1
- 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/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-6s-ucRQQ.js → containers-DqB-bSYE.js} +33 -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-cWIRdeaf.js → data-display-Bihs9Ven.js} +545 -332
- 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-CA6ogMQB.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-CFM5myut.js → display-CS6Hbk18.js} +8 -8
- package/dist/{display-CFM5myut.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 +1209 -1209
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +52 -52
- 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-DWUkgEjR.js → feedback-CJkUAapr.js} +29 -29
- 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-BhsUtsxW.js → filters-D6FF8L6s.js} +715 -720
- package/dist/filters-D6FF8L6s.js.map +1 -0
- package/dist/{form-field-Bn7ZH1rA.js → form-field-CZwrkP7m.js} +17 -9
- package/dist/form-field-CZwrkP7m.js.map +1 -0
- package/dist/{form-sizing-BWs70_a2.js → form-sizing-QP8aIRaW.js} +8 -5
- package/dist/form-sizing-QP8aIRaW.js.map +1 -0
- package/dist/{forms-B7pzS25o.js → forms-B5NCbkSC.js} +35 -35
- package/dist/{forms-B7pzS25o.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-C59QZyxV.js → header-kxruN3RM.js} +53 -49
- package/dist/header-kxruN3RM.js.map +1 -0
- package/dist/{hooks-CM1Vp9Pe.js → hooks-BrlnCwQd.js} +2 -2
- package/dist/{hooks-CM1Vp9Pe.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 +40 -9
- 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-DhDRgnVZ.js → media-gallery-DLp3HAz0.js} +75 -74
- package/dist/media-gallery-DLp3HAz0.js.map +1 -0
- package/dist/{mentions-B8Ko-fhS.js → mentions-Cl0Kt_Pd.js} +52 -50
- package/dist/{mentions-B8Ko-fhS.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-DBEu4POU.js → navigation-DnQSNMT0.js} +64 -55
- package/dist/navigation-DnQSNMT0.js.map +1 -0
- package/dist/{navigation-BUIn2Qxx.js → navigation-DyytsLRB.js} +37 -37
- package/dist/navigation-DyytsLRB.js.map +1 -0
- package/dist/{navigation-row-recipes-GVh11KiT.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-BV6ioQg3.js → page-hGmT4nWK.js} +75 -64
- package/dist/page-hGmT4nWK.js.map +1 -0
- package/dist/{page-header-DQRa0jug.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-CoLDEg19.js → popover-CghIYdQf.js} +23 -22
- package/dist/popover-CghIYdQf.js.map +1 -0
- package/dist/{popover-menu-GLIQTJTx.js → popover-menu-B4PoWhRl.js} +6 -6
- package/dist/{popover-menu-GLIQTJTx.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-BOe8l_FZ.js → progress-BroqrAyV.js} +10 -9
- package/dist/progress-BroqrAyV.js.map +1 -0
- package/dist/{receipt-BM8xsGFy.js → receipt-BuJynLgf.js} +8 -8
- package/dist/{receipt-BM8xsGFy.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-BnCyyPOJ.js → settings-DOTOzeZ2.js} +10 -9
- package/dist/{settings-BnCyyPOJ.js.map → settings-DOTOzeZ2.js.map} +1 -1
- package/dist/{sheet-B-q914Ad.js → sheet-BFhrNehm.js} +11 -11
- package/dist/sheet-BFhrNehm.js.map +1 -0
- package/dist/{sidebar-DPR7fmqN.js → sidebar-CyR4XKwR.js} +219 -200
- package/dist/sidebar-CyR4XKwR.js.map +1 -0
- package/dist/{sidebar-C_2p3Tfj.js → sidebar-SvGJ0Zwi.js} +63 -58
- package/dist/sidebar-SvGJ0Zwi.js.map +1 -0
- package/dist/{skeleton-CmT1ppqb.js → skeleton-3F0uhYn3.js} +4 -4
- package/dist/{skeleton-CmT1ppqb.js.map → skeleton-3F0uhYn3.js.map} +1 -1
- package/dist/{smart-card-CYLn46e6.js → smart-card-DjGVV2xr.js} +171 -165
- package/dist/smart-card-DjGVV2xr.js.map +1 -0
- package/dist/{spinner-BY9HbUEh.js → spinner-Cpf7oRkF.js} +5 -5
- package/dist/{spinner-BY9HbUEh.js.map → spinner-Cpf7oRkF.js.map} +1 -1
- package/dist/{structure-MvKVq-oL.js → structure-CRdqVawd.js} +2 -2
- package/dist/{structure-MvKVq-oL.js.map → structure-CRdqVawd.js.map} +1 -1
- 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-B9ICkQcV.js → timelines-D1pkt3se.js} +84 -78
- package/dist/timelines-D1pkt3se.js.map +1 -0
- package/dist/{tree-BdWSaoFT.js → tree-BtmYyMZV.js} +8 -8
- package/dist/{tree-BdWSaoFT.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-D8Za5x_c.js → upload-CDbYw1WN.js} +326 -323
- package/dist/upload-CDbYw1WN.js.map +1 -0
- package/dist/{upload-queue-hIIYBLS7.js → upload-queue-CNd_hH_a.js} +25 -25
- package/dist/upload-queue-CNd_hH_a.js.map +1 -0
- package/dist/{usage-card-DnmnJ58D.js → usage-card-VyJLUwRr.js} +53 -54
- 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-C1PZmk8L.js → workspace-CcR8r-Nt.js} +115 -122
- package/dist/workspace-CcR8r-Nt.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +110 -119
- 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 +20 -4
- package/docs/consumer-skill/examples/manifest.json +13 -1
- 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 +116 -2
- package/docs/consumer-skill/references/design-contract.md +33 -7
- package/docs/consumer-skill/references/discovery.md +76 -5
- package/docs/consumer-skill/references/integration.md +14 -0
- package/docs/consumer-skill/references/public-api.json +2023 -218
- package/docs/consumer-skill/references/review.md +55 -3
- 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 +32 -0
- package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +179 -17
- package/docs/consumer-skill/scripts/discovery.mjs +61 -9
- package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
- package/package.json +7 -4
- package/dist/accordion-B-5Focs8.js.map +0 -1
- package/dist/action-menu-Cx3SdfbN.js.map +0 -1
- package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
- package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
- package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
- package/dist/app-shell-at8Kt4l_.js.map +0 -1
- package/dist/auth-OFwWSAap.js +0 -704
- package/dist/auth-OFwWSAap.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/checkbox-BavDRjF7.js.map +0 -1
- package/dist/choice-inputs-CC7XqPQO.js +0 -619
- package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
- package/dist/code-block-xHKbAJDj.js.map +0 -1
- package/dist/combobox-DEbdr-3u.js.map +0 -1
- package/dist/combobox-xv3yJbzl.js.map +0 -1
- package/dist/command-C0xe7u9B.js.map +0 -1
- package/dist/comments-DviPLnwy.js +0 -1132
- package/dist/comments-DviPLnwy.js.map +0 -1
- package/dist/containers-6s-ucRQQ.js.map +0 -1
- package/dist/data-display-cWIRdeaf.js.map +0 -1
- package/dist/date-picker-CA6ogMQB.js.map +0 -1
- package/dist/date-pickers-BPIKLdsD.js +0 -224
- package/dist/date-pickers-BPIKLdsD.js.map +0 -1
- package/dist/feedback-DWUkgEjR.js.map +0 -1
- package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
- package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
- package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
- package/dist/filters-BhsUtsxW.js.map +0 -1
- package/dist/form-field-Bn7ZH1rA.js.map +0 -1
- package/dist/form-sizing-BWs70_a2.js.map +0 -1
- package/dist/forms-numeric-BUBxELBv.js +0 -867
- package/dist/forms-numeric-BUBxELBv.js.map +0 -1
- package/dist/header-C59QZyxV.js.map +0 -1
- package/dist/http-CLTVJc5I.js.map +0 -1
- package/dist/input-WwYQZJzG.js +0 -202
- package/dist/input-WwYQZJzG.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-DhDRgnVZ.js.map +0 -1
- package/dist/message-COsdEvXT.js +0 -108
- package/dist/message-COsdEvXT.js.map +0 -1
- package/dist/navigation-BUIn2Qxx.js.map +0 -1
- package/dist/navigation-DBEu4POU.js.map +0 -1
- package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
- package/dist/overlays-B11wZka6.js +0 -982
- package/dist/overlays-B11wZka6.js.map +0 -1
- package/dist/page-BV6ioQg3.js.map +0 -1
- package/dist/page-header-DQRa0jug.js.map +0 -1
- package/dist/pagination-C29vvt3I.js.map +0 -1
- package/dist/popover-CoLDEg19.js.map +0 -1
- package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
- package/dist/primitives-DKPOGVpj.js.map +0 -1
- package/dist/progress-BOe8l_FZ.js.map +0 -1
- package/dist/rich-text-editor-CoVrTiSv.js +0 -575
- package/dist/rich-text-editor-CoVrTiSv.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-B-q914Ad.js.map +0 -1
- package/dist/sidebar-C_2p3Tfj.js.map +0 -1
- package/dist/sidebar-DPR7fmqN.js.map +0 -1
- package/dist/smart-card-CYLn46e6.js.map +0 -1
- package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
- package/dist/table-BS39xnlq.js +0 -1424
- package/dist/table-BS39xnlq.js.map +0 -1
- package/dist/table-DnlAJ-xR.js.map +0 -1
- package/dist/tabs-B5cNMWiP.js +0 -187
- package/dist/tabs-B5cNMWiP.js.map +0 -1
- package/dist/text-inputs-Dh9XGyiS.js +0 -331
- package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
- package/dist/text.styles-BwB7vAF2.js.map +0 -1
- package/dist/timelines-B9ICkQcV.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-D8Za5x_c.js.map +0 -1
- package/dist/upload-queue-hIIYBLS7.js.map +0 -1
- package/dist/usage-card-DnmnJ58D.js.map +0 -1
- package/dist/utils-C2EKeIw3.js +0 -72
- package/dist/utils-C2EKeIw3.js.map +0 -1
- package/dist/value-inputs-DX2dbxjj.js +0 -824
- package/dist/value-inputs-DX2dbxjj.js.map +0 -1
- package/dist/workspace-C1PZmk8L.js.map +0 -1
|
@@ -1,74 +1,75 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as e } from "./ui-provider-
|
|
3
|
-
import { t } from "./utils-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { c as e } from "./ui-provider-DRPn3qNl.js";
|
|
3
|
+
import { t } from "./utils-BvH9PSmq.js";
|
|
4
|
+
import { n } from "./text.styles-Q4sGAIgA.js";
|
|
5
|
+
import { a as r } from "./typography-BxQgiZyw.js";
|
|
6
|
+
import { n as i } from "./format-iamDSqs2.js";
|
|
7
|
+
import { t as a } from "./initials-format-CDoQEOd_.js";
|
|
7
8
|
import "react";
|
|
8
|
-
import { Fragment as
|
|
9
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
10
|
//#region src/components/primitives/value.tsx
|
|
10
|
-
function
|
|
11
|
+
function l(e, t) {
|
|
11
12
|
return e == null || e === "" ? t : e;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
function u({ children: e, emptyLabel: n = "—", size: i, align: a, weight: o = "regular", type: c = "main", className: u, ref: d, ...f }) {
|
|
15
|
+
return /* @__PURE__ */ s(r, {
|
|
15
16
|
ref: d,
|
|
16
17
|
tag: "span",
|
|
17
18
|
size: i,
|
|
18
19
|
align: a,
|
|
19
|
-
weight:
|
|
20
|
-
type:
|
|
20
|
+
weight: o,
|
|
21
|
+
type: c,
|
|
21
22
|
className: t("value--component inline min-w-0", u),
|
|
22
23
|
...f,
|
|
23
|
-
children:
|
|
24
|
+
children: l(e, n)
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
function d({ children: e, emptyLabel: n = "—", size: i, align: a, weight: o = "regular", type: c = "secondary", className: u, ref: d, ...f }) {
|
|
28
|
+
return /* @__PURE__ */ s(r, {
|
|
28
29
|
ref: d,
|
|
29
30
|
tag: "span",
|
|
30
31
|
size: i,
|
|
31
|
-
type:
|
|
32
|
+
type: c,
|
|
32
33
|
align: a,
|
|
33
|
-
weight:
|
|
34
|
+
weight: o,
|
|
34
35
|
className: t("secondary-value--component inline min-w-0", u),
|
|
35
36
|
...f,
|
|
36
|
-
children:
|
|
37
|
+
children: l(e, n)
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
function f({ children: e, emptyLabel: n = "—", size: i, align: a, weight: o = "regular", type: c = "secondary", className: u, ref: d, ...f }) {
|
|
41
|
+
return /* @__PURE__ */ s(r, {
|
|
41
42
|
ref: d,
|
|
42
43
|
tag: "span",
|
|
43
44
|
size: i,
|
|
44
|
-
type:
|
|
45
|
+
type: c,
|
|
45
46
|
align: a,
|
|
46
|
-
weight:
|
|
47
|
+
weight: o,
|
|
47
48
|
className: t("muted-value--component inline min-w-0 opacity-80", u),
|
|
48
49
|
...f,
|
|
49
|
-
children:
|
|
50
|
+
children: l(e, n)
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
function p({ children: e, emptyLabel: n = "—", size: i, align: a, weight: o = "medium", type: c = "main", className: u, ref: d, ...f }) {
|
|
54
|
+
return /* @__PURE__ */ s(r, {
|
|
54
55
|
ref: d,
|
|
55
56
|
tag: "span",
|
|
56
57
|
size: i,
|
|
57
58
|
align: a,
|
|
58
|
-
weight:
|
|
59
|
-
type:
|
|
59
|
+
weight: o,
|
|
60
|
+
type: c,
|
|
60
61
|
numeric: !0,
|
|
61
62
|
className: t("mono-value--component inline min-w-0 break-words", u),
|
|
62
63
|
...f,
|
|
63
|
-
children:
|
|
64
|
+
children: l(e, n)
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
-
return /* @__PURE__ */
|
|
67
|
+
function m({ children: e = "—", size: n, align: i, weight: a = "regular", type: o = "secondary", className: c, ref: l, ...u }) {
|
|
68
|
+
return /* @__PURE__ */ s(r, {
|
|
68
69
|
ref: l,
|
|
69
70
|
tag: "span",
|
|
70
|
-
size:
|
|
71
|
-
type:
|
|
71
|
+
size: n,
|
|
72
|
+
type: o,
|
|
72
73
|
align: i,
|
|
73
74
|
weight: a,
|
|
74
75
|
className: t("empty-value--component inline min-w-0", c),
|
|
@@ -78,116 +79,122 @@ function p({ children: e = "—", size: r, align: i, weight: a = "regular", type
|
|
|
78
79
|
}
|
|
79
80
|
//#endregion
|
|
80
81
|
//#region src/components/primitives/name.tsx
|
|
81
|
-
var
|
|
82
|
-
function v(e) {
|
|
83
|
-
return e.trim().replace(/\s+/g, " ");
|
|
84
|
-
}
|
|
82
|
+
var h = /(\s+)/u, g = /([-'])/u, _ = /\p{L}/u, v = /\p{L}/gu;
|
|
85
83
|
function y(e) {
|
|
86
|
-
return e.
|
|
84
|
+
return e.trim().replace(/\s+/g, " ");
|
|
87
85
|
}
|
|
88
86
|
function b(e) {
|
|
89
|
-
|
|
87
|
+
return e.match(v)?.join("") ?? "";
|
|
88
|
+
}
|
|
89
|
+
function x(e) {
|
|
90
|
+
let t = _.exec(e);
|
|
90
91
|
return t ? {
|
|
91
92
|
index: t.index,
|
|
92
93
|
value: t[0]
|
|
93
94
|
} : null;
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
let t =
|
|
96
|
+
function S(e) {
|
|
97
|
+
let t = x(e);
|
|
97
98
|
if (!t) return !0;
|
|
98
|
-
let n =
|
|
99
|
+
let n = b(e);
|
|
99
100
|
if (n.length <= 1) return t.value === t.value.toLocaleUpperCase();
|
|
100
101
|
let r = n === n.toLocaleUpperCase(), i = n === n.toLocaleLowerCase();
|
|
101
102
|
return t.value === t.value.toLocaleUpperCase() && !r && !i;
|
|
102
103
|
}
|
|
103
|
-
function S(e) {
|
|
104
|
-
return v(e).split(m).filter((e) => e.trim() !== "").every((e) => e.split(h).filter((e) => e !== "-" && e !== "'").every(x));
|
|
105
|
-
}
|
|
106
104
|
function C(e) {
|
|
107
|
-
|
|
105
|
+
return y(e).split(h).filter((e) => e.trim() !== "").every((e) => e.split(g).filter((e) => e !== "-" && e !== "'").every(S));
|
|
106
|
+
}
|
|
107
|
+
function w(e) {
|
|
108
|
+
let t = x(e);
|
|
108
109
|
if (!t) return e;
|
|
109
110
|
let n = e.slice(0, t.index), r = e.slice(t.index + t.value.length);
|
|
110
111
|
return `${n}${t.value.toLocaleUpperCase()}${r.toLocaleLowerCase()}`;
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
-
return e.split(
|
|
113
|
+
function T(e) {
|
|
114
|
+
return e.split(g).map((e) => e === "-" || e === "'" ? e : w(e)).join("");
|
|
114
115
|
}
|
|
115
|
-
function
|
|
116
|
+
function E(e, t = {}) {
|
|
116
117
|
if (e == null) return "";
|
|
117
|
-
let n =
|
|
118
|
-
return n ? !t.force &&
|
|
118
|
+
let n = y(e);
|
|
119
|
+
return n ? !t.force && C(n) ? n : n.split(h).map((e) => e.trim() === "" ? e : T(e)).join("") : "";
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
-
let c = e ?? (typeof n == "string" ? n : void 0),
|
|
122
|
-
return /* @__PURE__ */
|
|
121
|
+
function D({ value: e, children: n, force: r, className: i, ref: a, ...o }) {
|
|
122
|
+
let c = e ?? (typeof n == "string" ? n : void 0), l = c === void 0 ? n : E(c, { force: r });
|
|
123
|
+
return /* @__PURE__ */ s(u, {
|
|
123
124
|
ref: a,
|
|
124
125
|
className: t("name--component", i),
|
|
125
|
-
...
|
|
126
|
-
children:
|
|
126
|
+
...o,
|
|
127
|
+
children: l
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
130
|
//#endregion
|
|
130
131
|
//#region src/components/primitives/initials.tsx
|
|
131
|
-
function
|
|
132
|
-
return /* @__PURE__ */
|
|
132
|
+
function O({ value: e, strategy: n, maxCharacters: r, locale: i, fallback: o, size: c = "inherit", className: l, ref: d, ...f }) {
|
|
133
|
+
return /* @__PURE__ */ s(u, {
|
|
133
134
|
ref: d,
|
|
134
135
|
...f,
|
|
135
136
|
size: c,
|
|
136
|
-
className: t("initials--component",
|
|
137
|
-
children:
|
|
137
|
+
className: t("initials--component", l),
|
|
138
|
+
children: a(e, {
|
|
138
139
|
strategy: n,
|
|
139
140
|
maxCharacters: r,
|
|
140
|
-
locale:
|
|
141
|
-
fallback:
|
|
141
|
+
locale: i,
|
|
142
|
+
fallback: o
|
|
142
143
|
})
|
|
143
144
|
});
|
|
144
145
|
}
|
|
145
146
|
//#endregion
|
|
146
147
|
//#region src/components/primitives/link.tsx
|
|
147
|
-
function
|
|
148
|
-
let
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
ref:
|
|
148
|
+
function k({ children: e, emptyLabel: r = "—", className: i, ref: a, ...o }) {
|
|
149
|
+
let c = e == null || e === "" ? r : e;
|
|
150
|
+
return /* @__PURE__ */ s("a", {
|
|
151
|
+
ref: a,
|
|
151
152
|
"data-typography": "link",
|
|
152
|
-
className: t(
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
className: t(n({
|
|
154
|
+
type: null,
|
|
155
|
+
size: "sm",
|
|
156
|
+
weight: null,
|
|
157
|
+
align: null,
|
|
158
|
+
lineHeight: null
|
|
159
|
+
}), "link--component text-link-color no-underline underline-offset-4 transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", i),
|
|
160
|
+
...o,
|
|
161
|
+
children: c
|
|
155
162
|
});
|
|
156
163
|
}
|
|
157
|
-
function
|
|
158
|
-
if (!e) return /* @__PURE__ */
|
|
164
|
+
function A({ value: e, display: n, subject: i, body: a, className: o, emptyLabel: c = "—", ref: l, ...u }) {
|
|
165
|
+
if (!e) return /* @__PURE__ */ s(r, {
|
|
159
166
|
ref: l,
|
|
160
167
|
tag: "span",
|
|
161
168
|
size: "inherit",
|
|
162
169
|
type: "secondary",
|
|
163
|
-
className: t("email--component",
|
|
170
|
+
className: t("email--component", o),
|
|
164
171
|
children: c
|
|
165
172
|
});
|
|
166
173
|
let d = new URLSearchParams();
|
|
167
174
|
i && d.set("subject", i), a && d.set("body", a);
|
|
168
175
|
let f = `mailto:${e}${d.size ? `?${d.toString()}` : ""}`;
|
|
169
|
-
return /* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ s(k, {
|
|
170
177
|
ref: l,
|
|
171
|
-
className: t("email--component",
|
|
178
|
+
className: t("email--component", o),
|
|
172
179
|
href: f,
|
|
173
180
|
emptyLabel: c,
|
|
174
181
|
...u,
|
|
175
|
-
children:
|
|
182
|
+
children: n ?? e
|
|
176
183
|
});
|
|
177
184
|
}
|
|
178
|
-
function
|
|
185
|
+
function j(e) {
|
|
179
186
|
return e.replace(/[^\d+*#;,.]/g, "");
|
|
180
187
|
}
|
|
181
|
-
function
|
|
182
|
-
return e ? /* @__PURE__ */
|
|
183
|
-
ref:
|
|
188
|
+
function M({ value: e, display: n, className: i, emptyLabel: a = "—", ref: o, ...c }) {
|
|
189
|
+
return e ? /* @__PURE__ */ s(k, {
|
|
190
|
+
ref: o,
|
|
184
191
|
className: t("phone--component", i),
|
|
185
|
-
href: `tel:${
|
|
192
|
+
href: `tel:${j(e)}`,
|
|
186
193
|
emptyLabel: a,
|
|
187
194
|
...c,
|
|
188
|
-
children:
|
|
189
|
-
}) : /* @__PURE__ */
|
|
190
|
-
ref:
|
|
195
|
+
children: n ?? e
|
|
196
|
+
}) : /* @__PURE__ */ s(r, {
|
|
197
|
+
ref: o,
|
|
191
198
|
tag: "span",
|
|
192
199
|
size: "inherit",
|
|
193
200
|
type: "secondary",
|
|
@@ -195,11 +202,11 @@ function j({ value: e, display: r, className: i, emptyLabel: a = "—", ref: s,
|
|
|
195
202
|
children: a
|
|
196
203
|
});
|
|
197
204
|
}
|
|
198
|
-
function
|
|
205
|
+
function N(e) {
|
|
199
206
|
return /^[a-z][a-z\d+\-.]*:/i.test(e) || e.startsWith("/") || e.startsWith("#") ? e : `https://${e}`;
|
|
200
207
|
}
|
|
201
|
-
function
|
|
202
|
-
if (!e) return /* @__PURE__ */
|
|
208
|
+
function P({ value: e, display: n, external: i, target: a, rel: o, className: c, emptyLabel: l = "—", ref: u, ...d }) {
|
|
209
|
+
if (!e) return /* @__PURE__ */ s(r, {
|
|
203
210
|
ref: u,
|
|
204
211
|
tag: "span",
|
|
205
212
|
size: "inherit",
|
|
@@ -207,8 +214,8 @@ function N({ value: e, display: r, external: i, target: a, rel: s, className: c,
|
|
|
207
214
|
className: t("url--component", c),
|
|
208
215
|
children: l
|
|
209
216
|
});
|
|
210
|
-
let f =
|
|
211
|
-
return /* @__PURE__ */
|
|
217
|
+
let f = N(e), p = i ?? /^https?:\/\//i.test(f), m = a ?? (p ? "_blank" : void 0), h = o ?? (p ? "noreferrer" : void 0);
|
|
218
|
+
return /* @__PURE__ */ s(k, {
|
|
212
219
|
ref: u,
|
|
213
220
|
className: t("url--component", c),
|
|
214
221
|
href: f,
|
|
@@ -216,43 +223,43 @@ function N({ value: e, display: r, external: i, target: a, rel: s, className: c,
|
|
|
216
223
|
rel: h,
|
|
217
224
|
emptyLabel: l,
|
|
218
225
|
...d,
|
|
219
|
-
children:
|
|
226
|
+
children: n ?? e
|
|
220
227
|
});
|
|
221
228
|
}
|
|
222
229
|
//#endregion
|
|
223
230
|
//#region src/components/primitives/file-size.tsx
|
|
224
|
-
var
|
|
231
|
+
var F = [
|
|
225
232
|
"B",
|
|
226
233
|
"KB",
|
|
227
234
|
"MB",
|
|
228
235
|
"GB",
|
|
229
236
|
"TB"
|
|
230
|
-
],
|
|
237
|
+
], I = {
|
|
231
238
|
bytes: 1,
|
|
232
239
|
kb: 1024,
|
|
233
240
|
mb: 1024 ** 2,
|
|
234
241
|
gb: 1024 ** 3,
|
|
235
242
|
tb: 1024 ** 4
|
|
236
243
|
};
|
|
237
|
-
function
|
|
238
|
-
return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? null : e *
|
|
244
|
+
function L(e, t = "bytes") {
|
|
245
|
+
return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? null : e * I[t];
|
|
239
246
|
}
|
|
240
|
-
function
|
|
241
|
-
let n = typeof t == "string" ? t : t?.locale, r =
|
|
247
|
+
function R(e, t) {
|
|
248
|
+
let n = typeof t == "string" ? t : t?.locale, r = L(e, typeof t == "string" ? "bytes" : t?.from ?? "bytes");
|
|
242
249
|
if (r === null) return null;
|
|
243
250
|
let i = r, a = 0;
|
|
244
|
-
for (; i >= 1024 && a <
|
|
251
|
+
for (; i >= 1024 && a < F.length - 1;) i /= 1024, a += 1;
|
|
245
252
|
return `${new Intl.NumberFormat(n, {
|
|
246
253
|
maximumFractionDigits: a === 0 ? 0 : 1,
|
|
247
254
|
minimumFractionDigits: 0
|
|
248
|
-
}).format(i)} ${
|
|
255
|
+
}).format(i)} ${F[a]}`;
|
|
249
256
|
}
|
|
250
|
-
function
|
|
251
|
-
let h = e(), g =
|
|
257
|
+
function z({ value: n, from: i = "bytes", locale: a, emptyLabel: o = "—", size: c, align: l = "right", weight: u = "regular", type: d = "main", className: f, ref: p, ...m }) {
|
|
258
|
+
let h = e(), g = R(n, {
|
|
252
259
|
from: i,
|
|
253
260
|
locale: a ?? h.locale
|
|
254
261
|
});
|
|
255
|
-
return /* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ s(r, {
|
|
256
263
|
ref: p,
|
|
257
264
|
tag: "span",
|
|
258
265
|
size: c,
|
|
@@ -261,21 +268,21 @@ function R({ value: r, from: i = "bytes", locale: a, emptyLabel: s = "—", size
|
|
|
261
268
|
type: g === null ? "secondary" : d,
|
|
262
269
|
className: t("file-size--component inline tabular-nums", f),
|
|
263
270
|
...m,
|
|
264
|
-
children: g ??
|
|
271
|
+
children: g ?? o
|
|
265
272
|
});
|
|
266
273
|
}
|
|
267
274
|
//#endregion
|
|
268
275
|
//#region src/components/primitives/duration.tsx
|
|
269
|
-
function
|
|
270
|
-
let b = e(), x =
|
|
276
|
+
function B({ value: n, from: a = "seconds", locale: o, maxParts: c = 2, unitDisplay: l = "narrow", minimumFractionDigits: u, maximumFractionDigits: d, emptyLabel: f = "—", size: p, align: m = "right", weight: h = "regular", type: g = "main", className: _, ref: v, ...y }) {
|
|
277
|
+
let b = e(), x = n == null ? null : i(n, {
|
|
271
278
|
from: a,
|
|
272
|
-
locale:
|
|
279
|
+
locale: o ?? b.locale,
|
|
273
280
|
maxParts: c,
|
|
274
281
|
unitDisplay: l,
|
|
275
282
|
minimumFractionDigits: u,
|
|
276
283
|
maximumFractionDigits: d ?? (a === "milliseconds" ? 1 : void 0)
|
|
277
284
|
});
|
|
278
|
-
return /* @__PURE__ */
|
|
285
|
+
return /* @__PURE__ */ s(r, {
|
|
279
286
|
ref: v,
|
|
280
287
|
tag: "span",
|
|
281
288
|
size: p,
|
|
@@ -289,7 +296,7 @@ function z({ value: i, from: a = "seconds", locale: s, maxParts: c = 2, unitDisp
|
|
|
289
296
|
}
|
|
290
297
|
//#endregion
|
|
291
298
|
//#region src/components/primitives/dimensions.tsx
|
|
292
|
-
function
|
|
299
|
+
function V(e) {
|
|
293
300
|
if (e == null || e === "") return null;
|
|
294
301
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
295
302
|
let t = e.trim().replace(",", ".");
|
|
@@ -297,22 +304,22 @@ function B(e) {
|
|
|
297
304
|
let n = Number(t);
|
|
298
305
|
return Number.isFinite(n) ? n : null;
|
|
299
306
|
}
|
|
300
|
-
function
|
|
301
|
-
let s =
|
|
307
|
+
function H(e, t, { depth: n, unit: r, separator: i = " × ", locale: a, options: o } = {}) {
|
|
308
|
+
let s = V(e), c = V(t), l = V(n);
|
|
302
309
|
if (s === null || c === null || n != null && n !== "" && l === null) return null;
|
|
303
310
|
let u = new Intl.NumberFormat(a, o), d = [s, c];
|
|
304
311
|
l !== null && d.push(l);
|
|
305
312
|
let f = d.map((e) => u.format(e)).join(i);
|
|
306
313
|
return r ? `${f} ${r}` : f;
|
|
307
314
|
}
|
|
308
|
-
function
|
|
309
|
-
let x = e(), S =
|
|
310
|
-
depth:
|
|
315
|
+
function U({ width: n, height: i, depth: a, unit: l, separator: u = " × ", locale: d, options: f, emptyLabel: p = "—", size: m, align: h = "right", weight: g = "regular", type: _ = "main", className: v, ref: y, ...b }) {
|
|
316
|
+
let x = e(), S = H(n, i, {
|
|
317
|
+
depth: a,
|
|
311
318
|
separator: typeof u == "string" ? u : " × ",
|
|
312
319
|
locale: d ?? x.locale,
|
|
313
320
|
options: f
|
|
314
321
|
});
|
|
315
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ s(r, {
|
|
316
323
|
ref: y,
|
|
317
324
|
tag: "span",
|
|
318
325
|
size: m,
|
|
@@ -321,10 +328,10 @@ function H({ width: r, height: i, depth: c, unit: l, separator: u = " × ", loca
|
|
|
321
328
|
type: S === null ? "secondary" : _,
|
|
322
329
|
className: t("dimensions--component inline tabular-nums", v),
|
|
323
330
|
...b,
|
|
324
|
-
children: S === null ? p : /* @__PURE__ */
|
|
331
|
+
children: S === null ? p : /* @__PURE__ */ c(o, { children: [typeof u == "string" ? S : S.split(" × ").map((e, t) => /* @__PURE__ */ c("span", { children: [t > 0 && u, e] }, `${e}-${t}`)), !!l && /* @__PURE__ */ c(o, { children: [" ", l] })] })
|
|
325
332
|
});
|
|
326
333
|
}
|
|
327
334
|
//#endregion
|
|
328
|
-
export {
|
|
335
|
+
export { u as _, R as a, M as c, D as d, E as f, d as g, f as h, z as i, P as l, p as m, H as n, A as o, m as p, B as r, k as s, U as t, O as u };
|
|
329
336
|
|
|
330
|
-
//# sourceMappingURL=primitives-
|
|
337
|
+
//# sourceMappingURL=primitives-C7ff0QaI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives-C7ff0QaI.js","names":["_Fragment","useFormattingConfig","Text","formatDuration","formatInitials","Fragment$1","renderValueChildren","children","emptyLabel","Value","props","cn","className","SecondaryValue","MutedValue","MonoValue","EmptyValue","WORD_SEPARATOR","NAME_CONNECTOR","LETTER_MATCHER","LETTERS_MATCHER","normalizeNameWhitespace","value","getLetters","getFirstLetter","match","isFormattedSegment","first","segment","letters","isAllUpper","isAllLower","isFormattedName","word","formatNameSegment","before","after","formatNameWord","formatName","normalized","options","Name","rawValue","content","Initials","Link","resolveTextClassNames","Email","query","subject","body","href","display","normalizeTel","Phone","normalizeUrl","Url","isExternal","external","resolvedTarget","target","resolvedRel","rel","FILE_SIZE_UNITS","FILE_SIZE_UNIT_MULTIPLIER","normalizeFileSizeValue","from","formatFileSize","locale","bytes","displayValue","unitIndex","FileSize","formatting","label","type","Duration","maximumFractionDigits","parseDimensionPart","parsed","formatDimensions","parsedWidth","width","parsedHeight","height","parsedDepth","depth","formatter","values","separator","unit","Dimensions","index","part"],"sources":["../src/components/primitives/value.tsx","../src/components/primitives/name.tsx","../src/components/primitives/initials.tsx","../src/components/primitives/link.tsx","../src/components/primitives/file-size.tsx","../src/components/primitives/duration.tsx","../src/components/primitives/dimensions.tsx"],"sourcesContent":["import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { cn } from '../../lib/utils';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\nexport type ValueType = Extract<TextProps['type'], 'main' | 'secondary'>;\n\nexport interface ValueProps extends SpanProps {\n\tchildren?: ReactNode;\n\temptyLabel?: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: ValueType;\n\tref?: Ref<HTMLSpanElement>;\n}\n\nfunction renderValueChildren(children: ReactNode, emptyLabel: ReactNode) {\n\tif (children === null || children === undefined || children === '') return emptyLabel;\n\treturn children;\n}\n\nexport function Value({\n\tchildren,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight = 'regular',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: ValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={type}\n\t\t\tclassName={cn('value--component inline min-w-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{renderValueChildren(children, emptyLabel)}\n\t\t</Text>\n\t);\n}\n\nexport function SecondaryValue({\n\tchildren,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight = 'regular',\n\ttype = 'secondary',\n\tclassName,\n\tref,\n\t...props\n}: ValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\tclassName={cn('secondary-value--component inline min-w-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{renderValueChildren(children, emptyLabel)}\n\t\t</Text>\n\t);\n}\n\nexport function MutedValue({\n\tchildren,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight = 'regular',\n\ttype = 'secondary',\n\tclassName,\n\tref,\n\t...props\n}: ValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\tclassName={cn('muted-value--component inline min-w-0 opacity-80', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{renderValueChildren(children, emptyLabel)}\n\t\t</Text>\n\t);\n}\n\nexport function MonoValue({\n\tchildren,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight = 'medium',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: ValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={type}\n\t\t\tnumeric\n\t\t\tclassName={cn('mono-value--component inline min-w-0 break-words', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{renderValueChildren(children, emptyLabel)}\n\t\t</Text>\n\t);\n}\n\nexport interface EmptyValueProps extends Omit<ValueProps, 'emptyLabel'> {\n\tref?: Ref<HTMLSpanElement>;\n}\n\nexport function EmptyValue({\n\tchildren = EMPTY,\n\tsize,\n\talign,\n\tweight = 'regular',\n\ttype = 'secondary',\n\tclassName,\n\tref,\n\t...props\n}: EmptyValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\tclassName={cn('empty-value--component inline min-w-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n","import { type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nimport { Value, type ValueProps } from './value';\n\nconst WORD_SEPARATOR = /(\\s+)/u;\nconst NAME_CONNECTOR = /([-'])/u;\nconst LETTER_MATCHER = /\\p{L}/u;\nconst LETTERS_MATCHER = /\\p{L}/gu;\n\nexport interface NameFormatOptions {\n\t/** Force title-casing even when the name already looks intentionally cased. */\n\tforce?: boolean;\n}\n\nexport interface NameProps extends Omit<ValueProps, 'children'> {\n\t/** Raw name value to normalize for display. */\n\tvalue?: string | null;\n\t/** String children are normalized when value is not provided. */\n\tchildren?: ReactNode;\n\t/** Force title-casing even when the name already looks intentionally cased. */\n\tforce?: boolean;\n}\n\nfunction normalizeNameWhitespace(value: string) {\n\treturn value.trim().replace(/\\s+/g, ' ');\n}\n\nfunction getLetters(value: string) {\n\treturn value.match(LETTERS_MATCHER)?.join('') ?? '';\n}\n\nfunction getFirstLetter(value: string) {\n\tconst match = LETTER_MATCHER.exec(value);\n\tif (!match) return null;\n\treturn {\n\t\tindex: match.index,\n\t\tvalue: match[0],\n\t};\n}\n\nfunction isFormattedSegment(segment: string) {\n\tconst first = getFirstLetter(segment);\n\tif (!first) return true;\n\n\tconst letters = getLetters(segment);\n\tif (letters.length <= 1) return first.value === first.value.toLocaleUpperCase();\n\n\tconst isAllUpper = letters === letters.toLocaleUpperCase();\n\tconst isAllLower = letters === letters.toLocaleLowerCase();\n\n\treturn first.value === first.value.toLocaleUpperCase() && !isAllUpper && !isAllLower;\n}\n\nfunction isFormattedName(value: string) {\n\treturn normalizeNameWhitespace(value)\n\t\t.split(WORD_SEPARATOR)\n\t\t.filter((word) => word.trim() !== '')\n\t\t.every((word) =>\n\t\t\tword\n\t\t\t\t.split(NAME_CONNECTOR)\n\t\t\t\t.filter((segment) => segment !== '-' && segment !== \"'\")\n\t\t\t\t.every(isFormattedSegment),\n\t\t);\n}\n\nfunction formatNameSegment(segment: string) {\n\tconst first = getFirstLetter(segment);\n\tif (!first) return segment;\n\n\tconst before = segment.slice(0, first.index);\n\tconst after = segment.slice(first.index + first.value.length);\n\n\treturn `${before}${first.value.toLocaleUpperCase()}${after.toLocaleLowerCase()}`;\n}\n\nfunction formatNameWord(word: string) {\n\treturn word\n\t\t.split(NAME_CONNECTOR)\n\t\t.map((segment) => (segment === '-' || segment === \"'\" ? segment : formatNameSegment(segment)))\n\t\t.join('');\n}\n\nexport function formatName(value: string | null | undefined, options: NameFormatOptions = {}) {\n\tif (value === null || value === undefined) return '';\n\n\tconst normalized = normalizeNameWhitespace(value);\n\tif (!normalized) return '';\n\tif (!options.force && isFormattedName(normalized)) return normalized;\n\n\treturn normalized\n\t\t.split(WORD_SEPARATOR)\n\t\t.map((word) => (word.trim() === '' ? word : formatNameWord(word)))\n\t\t.join('');\n}\n\nexport function Name({\n\tvalue,\n\tchildren,\n\tforce,\n\tclassName,\n\tref,\n\t...props\n}: NameProps) {\n\tconst rawValue = value ?? (typeof children === 'string' ? children : undefined);\n\tconst content = rawValue === undefined ? children : formatName(rawValue, { force });\n\n\treturn (\n\t\t<Value ref={ref} className={cn('name--component', className)} {...props}>\n\t\t\t{content}\n\t\t</Value>\n\t);\n}\n","import { cn } from '../../lib/utils';\n\nimport { Value, type ValueProps } from './value';\nimport {\n\tformatInitials,\n\ttype InitialsMaxCharacters,\n\ttype InitialsStrategy,\n} from './initials-format';\n\nexport interface InitialsProps extends Omit<ValueProps, 'children'> {\n\t/** Person, organization, or resource name used to derive initials. */\n\tvalue?: string | null;\n\t/** First + last word by default; use first-words to preserve the first N words. */\n\tstrategy?: InitialsStrategy;\n\t/** Maximum visible characters. Defaults to 2. */\n\tmaxCharacters?: InitialsMaxCharacters;\n\t/** Optional BCP-47 locale used for locale-sensitive uppercasing. */\n\tlocale?: string;\n\t/** Returned when no usable letter or number exists. Defaults to an empty string. */\n\tfallback?: string;\n}\n\n/** Semantic displayed initials for identities and avatar fallbacks. */\nexport function Initials({\n\tvalue,\n\tstrategy,\n\tmaxCharacters,\n\tlocale,\n\tfallback,\n\tsize = 'inherit',\n\tclassName,\n\tref,\n\t...props\n}: InitialsProps) {\n\treturn (\n\t\t<Value\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t\tsize={size}\n\t\t\tclassName={cn('initials--component', className)}\n\t\t>\n\t\t\t{formatInitials(value, {\n\t\t\t\tstrategy,\n\t\t\t\tmaxCharacters,\n\t\t\t\tlocale,\n\t\t\t\tfallback,\n\t\t\t})}\n\t\t</Value>\n\t);\n}\n","import { type AnchorHTMLAttributes, type ReactNode, type Ref } from 'react';\n\nimport { Text } from '../typography';\nimport { resolveTextClassNames } from '../typography/text.styles';\nimport { EMPTY } from '../../lib/format';\nimport { cn } from '../../lib/utils';\n\nexport interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n\tchildren?: ReactNode;\n\temptyLabel?: ReactNode;\n\tref?: Ref<HTMLAnchorElement>;\n}\n\nexport function Link({\n\tchildren,\n\temptyLabel = EMPTY,\n\tclassName,\n\tref,\n\t...props\n}: LinkProps) {\n\tconst content =\n\t\tchildren === null || children === undefined || children === '' ? emptyLabel : children;\n\n\treturn (\n\t\t<a\n\t\t\tref={ref}\n\t\t\tdata-typography=\"link\"\n\t\t\tclassName={cn(\n\t\t\t\tresolveTextClassNames({type: null, size: 'sm', weight: null, align: null, lineHeight: null}),\n\t\t\t\t'link--component text-link-color no-underline underline-offset-4 transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\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</a>\n\t);\n}\n\nexport interface EmailProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\tsubject?: string;\n\tbody?: string;\n\tref?: Ref<HTMLElement>;\n}\n\nexport function Email({\n\tvalue,\n\tdisplay,\n\tsubject,\n\tbody,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: EmailProps) {\n\tif (!value) return <Text ref={ref} tag=\"span\" size=\"inherit\" type=\"secondary\" className={cn('email--component', className)}>{emptyLabel}</Text>;\n\n\tconst query = new URLSearchParams();\n\tif (subject) query.set('subject', subject);\n\tif (body) query.set('body', body);\n\tconst href = `mailto:${value}${query.size ? `?${query.toString()}` : ''}`;\n\n\treturn (\n\t\t<Link ref={ref as Ref<HTMLAnchorElement>} className={cn('email--component', className)} href={href} emptyLabel={emptyLabel} {...props}>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n\nexport interface PhoneProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\tref?: Ref<HTMLElement>;\n}\n\nfunction normalizeTel(value: string) {\n\treturn value.replace(/[^\\d+*#;,.]/g, '');\n}\n\nexport function Phone({\n\tvalue,\n\tdisplay,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: PhoneProps) {\n\tif (!value) return <Text ref={ref} tag=\"span\" size=\"inherit\" type=\"secondary\" className={cn('phone--component', className)}>{emptyLabel}</Text>;\n\n\treturn (\n\t\t<Link ref={ref as Ref<HTMLAnchorElement>} className={cn('phone--component', className)} href={`tel:${normalizeTel(value)}`} emptyLabel={emptyLabel} {...props}>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n\nexport interface UrlProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\texternal?: boolean;\n\tref?: Ref<HTMLElement>;\n}\n\nfunction normalizeUrl(value: string) {\n\tif (/^[a-z][a-z\\d+\\-.]*:/i.test(value) || value.startsWith('/') || value.startsWith('#')) return value;\n\treturn `https://${value}`;\n}\n\nexport function Url({\n\tvalue,\n\tdisplay,\n\texternal,\n\ttarget,\n\trel,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: UrlProps) {\n\tif (!value) return <Text ref={ref} tag=\"span\" size=\"inherit\" type=\"secondary\" className={cn('url--component', className)}>{emptyLabel}</Text>;\n\n\tconst href = normalizeUrl(value);\n\tconst isExternal = external ?? /^https?:\\/\\//i.test(href);\n\tconst resolvedTarget = target ?? (isExternal ? '_blank' : undefined);\n\tconst resolvedRel = rel ?? (isExternal ? 'noreferrer' : undefined);\n\n\treturn (\n\t\t<Link\n\t\t\tref={ref as Ref<HTMLAnchorElement>}\n\t\t\tclassName={cn('url--component', className)}\n\t\t\thref={href}\n\t\t\ttarget={resolvedTarget}\n\t\t\trel={resolvedRel}\n\t\t\temptyLabel={emptyLabel}\n\t\t\t{...props}\n\t\t>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n\nexport type FileSizeUnit = 'bytes' | 'kb' | 'mb' | 'gb' | 'tb';\n\nexport interface FileSizeProps extends SpanProps {\n\tvalue?: number | null;\n\tfrom?: FileSizeUnit;\n\tlocale?: string;\n\temptyLabel?: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nconst FILE_SIZE_UNITS = ['B', 'KB', 'MB', 'GB', 'TB'] as const;\nconst FILE_SIZE_UNIT_MULTIPLIER: Record<FileSizeUnit, number> = {\n\tbytes: 1,\n\tkb: 1024,\n\tmb: 1024 ** 2,\n\tgb: 1024 ** 3,\n\ttb: 1024 ** 4,\n};\n\nexport interface FileSizeFormatOptions {\n\tfrom?: FileSizeUnit;\n\tlocale?: string;\n}\n\nfunction normalizeFileSizeValue(value?: number | null, from: FileSizeUnit = 'bytes') {\n\tif (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) return null;\n\treturn value * FILE_SIZE_UNIT_MULTIPLIER[from];\n}\n\nexport function formatFileSize(\n\tvalue?: number | null,\n\toptions?: FileSizeFormatOptions | string,\n): string | null {\n\tconst locale = typeof options === 'string' ? options : options?.locale;\n\tconst from = typeof options === 'string' ? 'bytes' : options?.from ?? 'bytes';\n\tconst bytes = normalizeFileSizeValue(value, from);\n\tif (bytes === null) return null;\n\n\tlet displayValue = bytes;\n\tlet unitIndex = 0;\n\twhile (displayValue >= 1024 && unitIndex < FILE_SIZE_UNITS.length - 1) {\n\t\tdisplayValue /= 1024;\n\t\tunitIndex += 1;\n\t}\n\n\tconst formattedValue = new Intl.NumberFormat(locale, {\n\t\tmaximumFractionDigits: unitIndex === 0 ? 0 : 1,\n\t\tminimumFractionDigits: 0,\n\t}).format(displayValue);\n\n\treturn `${formattedValue} ${FILE_SIZE_UNITS[unitIndex]}`;\n}\n\nexport function FileSize({\n\tvalue,\n\tfrom = 'bytes',\n\tlocale,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight = 'regular',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: FileSizeProps) {\n\tconst formatting = useFormattingConfig();\n\tconst label = formatFileSize(value, { from, locale: locale ?? formatting.locale });\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={label === null ? 'secondary' : type}\n\t\t\tclassName={cn('file-size--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label ?? emptyLabel}\n\t\t</Text>\n\t);\n}\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport {\n\tEMPTY,\n\tformatDuration,\n\ttype DurationUnit,\n\ttype DurationUnitDisplay,\n} from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n\nexport interface DurationProps extends SpanProps {\n\tvalue?: number | null;\n\tfrom?: DurationUnit;\n\tlocale?: string;\n\tmaxParts?: number;\n\tunitDisplay?: DurationUnitDisplay;\n\tminimumFractionDigits?: number;\n\tmaximumFractionDigits?: number;\n\temptyLabel?: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nexport function Duration({\n\tvalue,\n\tfrom = 'seconds',\n\tlocale,\n\tmaxParts = 2,\n\tunitDisplay = 'narrow',\n\tminimumFractionDigits,\n\tmaximumFractionDigits,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight = 'regular',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: DurationProps) {\n\tconst formatting = useFormattingConfig();\n\tconst label = value === null || value === undefined\n\t\t? null\n\t\t: formatDuration(value, {\n\t\t\t\tfrom,\n\t\t\t\tlocale: locale ?? formatting.locale,\n\t\t\t\tmaxParts,\n\t\t\t\tunitDisplay,\n\t\t\t\tminimumFractionDigits,\n\t\t\t\tmaximumFractionDigits: maximumFractionDigits ?? (\n\t\t\t\t\tfrom === 'milliseconds' ? 1 : undefined\n\t\t\t\t),\n\t\t\t});\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={label === null || label === EMPTY ? 'secondary' : type}\n\t\t\tclassName={cn('duration--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label === null || label === EMPTY ? emptyLabel : label}\n\t\t</Text>\n\t);\n}\n\nexport { formatDuration } from '../../lib/format';\nexport type { DurationUnit, DurationUnitDisplay, FormatDurationOptions } from '../../lib/format';\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\ntype DimensionPart = number | string | null | undefined;\n\nexport interface FormatDimensionsOptions {\n\tdepth?: DimensionPart;\n\tunit?: string;\n\tseparator?: string;\n\tlocale?: string;\n\toptions?: Intl.NumberFormatOptions;\n}\n\nexport interface DimensionsProps extends SpanProps {\n\twidth?: DimensionPart;\n\theight?: DimensionPart;\n\tdepth?: DimensionPart;\n\tunit?: ReactNode;\n\tseparator?: ReactNode;\n\tlocale?: string;\n\toptions?: Intl.NumberFormatOptions;\n\temptyLabel?: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nfunction parseDimensionPart(value: DimensionPart): number | null {\n\tif (value === null || value === undefined || value === '') return null;\n\tif (typeof value === 'number') return Number.isFinite(value) ? value : null;\n\tconst normalized = value.trim().replace(',', '.');\n\tif (!normalized) return null;\n\tconst parsed = Number(normalized);\n\treturn Number.isFinite(parsed) ? parsed : null;\n}\n\nexport function formatDimensions(\n\twidth: DimensionPart,\n\theight: DimensionPart,\n\t{\n\t\tdepth,\n\t\tunit,\n\t\tseparator = ' × ',\n\t\tlocale,\n\t\toptions,\n\t}: FormatDimensionsOptions = {},\n): string | null {\n\tconst parsedWidth = parseDimensionPart(width);\n\tconst parsedHeight = parseDimensionPart(height);\n\tconst parsedDepth = parseDimensionPart(depth);\n\tif (parsedWidth === null || parsedHeight === null) return null;\n\tif (depth !== null && depth !== undefined && depth !== '' && parsedDepth === null) return null;\n\n\tconst formatter = new Intl.NumberFormat(locale, options);\n\tconst values = [parsedWidth, parsedHeight];\n\tif (parsedDepth !== null) values.push(parsedDepth);\n\tconst label = values.map((value) => formatter.format(value)).join(separator);\n\treturn unit ? `${label} ${unit}` : label;\n}\n\nexport function Dimensions({\n\twidth,\n\theight,\n\tdepth,\n\tunit,\n\tseparator = ' × ',\n\tlocale,\n\toptions,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight = 'regular',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: DimensionsProps) {\n\tconst formatting = useFormattingConfig();\n\tconst label = formatDimensions(width, height, {\n\t\tdepth,\n\t\tseparator: typeof separator === 'string' ? separator : ' × ',\n\t\tlocale: locale ?? formatting.locale,\n\t\toptions,\n\t});\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={label === null ? 'secondary' : type}\n\t\t\tclassName={cn('dimensions--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label === null ? emptyLabel : (\n\t\t\t\t<>\n\t\t\t\t\t{typeof separator === 'string' ? label : label.split(' × ').map((part, index) => (\n\t\t\t\t\t\t<span key={`${part}-${index}`}>\n\t\t\t\t\t\t\t{index > 0 && separator}\n\t\t\t\t\t\t\t{part}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t))}\n\t\t\t\t\t{!!unit && <> {unit}</>}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</Text>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAASM,EAAoB,GAAqB,GAAuB;CAExE,OADIC,KAAa,QAAkCA,MAAa,KAAWC,IACpED;AACR;AAEA,SAAgBE,EAAM,EACrB,aACA,gBAAA,KACA,SACA,UACA,YAAS,WACT,UAAO,QACP,cACA,QACA,GAAGC,KACW;CACd,OACC,kBAACR,GAAD;EACM;EACL,KAAI;EACE;EACC;EACC;EACF;EACN,WAAWS,EAAG,mCAAmCC,CAAS;EAC1D,GAAIF;EAEH,UAAAJ,EAAoBC,GAAUC,CAAU;CACpC,CAAA;AAER;AAEA,SAAgBK,EAAe,EAC9B,aACA,gBAAA,KACA,SACA,UACA,YAAS,WACT,UAAO,aACP,cACA,QACA,GAAGH,KACW;CACd,OACC,kBAACR,GAAD;EACM;EACL,KAAI;EACE;EACA;EACC;EACC;EACR,WAAWS,EAAG,6CAA6CC,CAAS;EACpE,GAAIF;EAEH,UAAAJ,EAAoBC,GAAUC,CAAU;CACpC,CAAA;AAER;AAEA,SAAgBM,EAAW,EAC1B,aACA,gBAAA,KACA,SACA,UACA,YAAS,WACT,UAAO,aACP,cACA,QACA,GAAGJ,KACW;CACd,OACC,kBAACR,GAAD;EACM;EACL,KAAI;EACE;EACA;EACC;EACC;EACR,WAAWS,EAAG,oDAAoDC,CAAS;EAC3E,GAAIF;EAEH,UAAAJ,EAAoBC,GAAUC,CAAU;CACpC,CAAA;AAER;AAEA,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C,CAAC,CAAC,KAAKmE,CAAS;CAC3E,OAAOC,IAAO,GAAGhB,EAAM,GAAGgB,MAAShB;AACpC;AAEA,SAAgBiB,EAAW,EAC1B,UACA,WACA,UACA,SACA,eAAY,OACZ,WACA,YACA,gBAAA,KACA,SACA,WAAQ,SACR,YAAS,WACT,UAAO,QACP,cACA,QACA,GAAGjF,KACgB;CACnB,IAAM+D,IAAaxE,EAAoB,GACjCyE,IAAQM,EAAiBE,GAAOE,GAAQ;EAC7C;EACA,WAAW,OAAOK,KAAc,WAAWA,IAAY;EACvD,QAAQrB,KAAUK,EAAW;EAC7B;CACD,CAAC;CAED,OACC,kBAACvE,GAAD;EACM;EACL,KAAI;EACE;EACC;EACC;EACR,MAAMwE,MAAU,OAAO,cAAcC;EACrC,WAAWhE,EAAG,6CAA6CC,CAAS;EACpE,GAAIF;EAEH,UAAAgE,MAAU,OAAOlE,IACjB,kBAAAR,GAAA,EAAA,UAAA,CACE,OAAOyF,KAAc,WAAWf,IAAQA,EAAM,MAAM,KAAK,CAAC,CAAC,KAAK,GAAM,MACtE,kBAAC,QAAD,EAAA,UAAA,CACEkB,IAAQ,KAAKH,GACbI,CACI,EAAA,GAHK,GAAGA,EAAK,GAAGD,GAGhB,CACN,GACA,CAAC,CAACF,KAAQ,kBAAA1F,GAAA,EAAA,UAAA,CAAE,KAAE0F,CAAO,EAAA,CAAA,CACrB,EAAA,CAAA;CAEE,CAAA;AAER"}
|
package/dist/primitives.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { n as e } from "./format-iamDSqs2.js";
|
|
3
|
-
import { _ as t, a as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _ } from "./primitives-
|
|
3
|
+
import { _ as t, a as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _ } from "./primitives-C7ff0QaI.js";
|
|
4
4
|
import { t as v } from "./initials-format-CDoQEOd_.js";
|
|
5
|
-
import { n as y, r as b, t as x } from "./number-
|
|
6
|
-
import { a as S, i as C, n as w, o as T, r as E, s as D, t as O } from "./date-
|
|
5
|
+
import { n as y, r as b, t as x } from "./number-DasMFWEG.js";
|
|
6
|
+
import { a as S, i as C, n as w, o as T, r as E, s as D, t as O } from "./date-DOKhJPu7.js";
|
|
7
7
|
export { O as Date, w as DateRange, E as DateTime, g as Dimensions, m as Duration, f as Email, p as EmptyValue, c as FileSize, _ as Initials, h as Link, b as Money, u as MonoValue, s as MutedValue, i as Name, x as Number, y as Percent, r as Phone, C as RelativeTime, o as SecondaryValue, S as Time, l as Url, t as Value, T as formatDateRange, d as formatDimensions, e as formatDuration, n as formatFileSize, v as formatInitials, a as formatName, D as parseDateInput };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { _ as e, c as t, s as n } from "./ui-provider-
|
|
2
|
+
import { _ as e, c as t, s as n } from "./ui-provider-DRPn3qNl.js";
|
|
3
3
|
import { useStrings as r } from "./lib/strings.js";
|
|
4
|
-
import { t as i } from "./utils-
|
|
5
|
-
import { a } from "./typography-
|
|
6
|
-
import { t as o } from "./structure-
|
|
4
|
+
import { t as i } from "./utils-BvH9PSmq.js";
|
|
5
|
+
import { a } from "./typography-BxQgiZyw.js";
|
|
6
|
+
import { t as o } from "./structure-CRdqVawd.js";
|
|
7
7
|
import { n as s } from "./track-recipes-LLPNVwFg.js";
|
|
8
8
|
import { createContext as c, forwardRef as l, useContext as u, useId as d, useMemo as f } from "react";
|
|
9
9
|
import { Fragment as ee, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
@@ -51,22 +51,23 @@ var C = l(function({ value: i, min: s, max: c, format: l, locale: u, getAriaValu
|
|
|
51
51
|
}, se = f(() => ({
|
|
52
52
|
formattedValue: Q,
|
|
53
53
|
value: Z
|
|
54
|
-
}), [Q, Z]), ce = N ?? C ?? (ie ? /* @__PURE__ */ m(ee, { children: [/* @__PURE__ */ m(
|
|
54
|
+
}), [Q, Z]), ce = N ?? C ?? (ie ? /* @__PURE__ */ m(ee, { children: [/* @__PURE__ */ m(o, {
|
|
55
|
+
gap: "dense",
|
|
55
56
|
className: "progress--summary min-w-0",
|
|
56
57
|
children: [O !== void 0 && /* @__PURE__ */ p(E, { children: O }), k !== void 0 && (v(k) ? /* @__PURE__ */ p(a, {
|
|
57
58
|
id: J,
|
|
58
59
|
tag: "span",
|
|
59
60
|
size: "xs",
|
|
60
61
|
type: "secondary",
|
|
61
|
-
className: "progress--description
|
|
62
|
+
className: "progress--description block",
|
|
62
63
|
children: k
|
|
63
64
|
}) : /* @__PURE__ */ p("div", {
|
|
64
65
|
id: J,
|
|
65
|
-
className: "progress--description
|
|
66
|
+
className: "progress--description",
|
|
66
67
|
children: k
|
|
67
68
|
}))]
|
|
68
69
|
}), ($ || M !== void 0 || A !== void 0) && /* @__PURE__ */ m(o, {
|
|
69
|
-
gap: "
|
|
70
|
+
gap: "dense",
|
|
70
71
|
align: "end",
|
|
71
72
|
className: "progress--details text-right",
|
|
72
73
|
children: [M ?? ($ ? /* @__PURE__ */ p(D, {}) : null), A !== void 0 && (v(A) ? /* @__PURE__ */ p(a, {
|
|
@@ -165,4 +166,4 @@ D.displayName = "ProgressValue";
|
|
|
165
166
|
//#endregion
|
|
166
167
|
export { D as a, w as i, T as n, g as o, E as r, C as t };
|
|
167
168
|
|
|
168
|
-
//# sourceMappingURL=progress-
|
|
169
|
+
//# sourceMappingURL=progress-BroqrAyV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-BroqrAyV.js","names":["Progress","_Fragment","ProgressPrimitive","resolveComponentScale","useFormattingConfig","useDensityConfig","cn","Stack","trackHeightClasses","Fragment$1","defaultProgressStrings","ProgressContext","createContext","isSimpleText","value","INDICATOR_TONE_CLASSNAMES","mergeStateClassName","className","baseClassName","state","normalizeRange","min","minProp","maxCandidate","maxProp","normalizeValue","max","formatProgressValue","format","locale","normalized","Progress$1","forwardRef","valueProp","showValueProp","sizeProp","stringsProp","ariaDescribedBy","props","strings","useStrings","formatting","size","defaultScale","resolvedLocale","descriptionId","useId","formattedValue","usesGeneratedHeader","headerSlot","children","showValue","label","hasSummary","description","metadata","valueSlot","descriptionIds","resolvedGetAriaValueText","normalizedFormattedValue","currentValue","getAriaValueText","contextValue","useMemo","resolvedHeader","ProgressLabel","Text","ProgressValue","resolvedTrack","trackSlot","ProgressTrack","trackProps","ProgressIndicator","indicatorProps","tone","Progress","context","useContext","primitiveValue","_primitiveFormattedValue","content"],"sources":["../src/components/base/feedback/progress.strings.ts","../src/components/base/feedback/progress.tsx"],"sourcesContent":["export interface ProgressStrings {\n\t/** Screen-reader value announced while progress is indeterminate. */\n\tindeterminateValue: string;\n}\n\nexport const defaultProgressStrings: ProgressStrings = {\n\tindeterminateValue: 'In progress',\n};\n","import { trackHeightClasses } from '../../../lib/track-recipes';\n/**\n * Progress — token-driven Base UI progress wrapper for completion, quota,\n * and long-running task states.\n *\n * The root keeps the Base UI accessibility contract while adding a concise\n * admin summary API (`label`, `description`, `metadata`, `showValue`),\n * semantic tones, structural sizes, stable DOM hooks, and composition slots.\n * Consumers can still assemble `ProgressLabel`, `ProgressValue`,\n * `ProgressTrack`, and `ProgressIndicator` directly.\n */\nimport { Progress as ProgressPrimitive } from '@base-ui/react/progress';\nimport { createContext, forwardRef, useContext, useId, useMemo, type ReactNode } from 'react';\n\nimport { Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { useDensityConfig, useFormattingConfig, type ComponentScale } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport type { SemanticTone } from '../../../lib/component-vocabulary';\n\nimport { defaultProgressStrings, type ProgressStrings } from './progress.strings';\n\nexport type ProgressSize = ComponentScale;\nexport type ProgressTone = SemanticTone;\n\ntype ProgressRootState = ProgressPrimitive.Root.State;\ntype ProgressTrackState = ProgressPrimitive.Track.State;\ntype ProgressIndicatorState = ProgressPrimitive.Indicator.State;\ntype ProgressLabelState = ProgressPrimitive.Label.State;\ntype ProgressValueState = ProgressPrimitive.Value.State;\n\ntype StatefulClassName<TState> = string | ((state: TState) => string | undefined) | undefined;\n\nexport interface ProgressProps extends Omit<\n\tProgressPrimitive.Root.Props,\n\t'children' | 'format' | 'getAriaValueText' | 'locale' | 'max' | 'min' | 'value'\n> {\n\t/** Current value. `null` renders an indeterminate state. */\n\tvalue: number | null;\n\t/** Minimum value used to normalize the visual percentage. @default 0 */\n\tmin?: number;\n\t/** Maximum value used to normalize the visual percentage. @default 100 */\n\tmax?: number;\n\t/** Intl options for formatting the raw value instead of the default normalized percentage. */\n\tformat?: Intl.NumberFormatOptions;\n\t/** Locale forwarded to `Intl.NumberFormat`. */\n\tlocale?: Intl.LocalesArgument;\n\t/** Human-readable text for the current value. Receives the wrapper's normalized display value. */\n\tgetAriaValueText?: (formattedValue: string | null, value: number | null) => string;\n\t/** Low-level compound content. `headerSlot` takes precedence when both are supplied. */\n\tchildren?: ReactNode;\n\t/** Accessible visual label. Supplying it also enables `showValue` by default. */\n\tlabel?: ReactNode;\n\t/** Supporting text automatically connected with `aria-describedby`. */\n\tdescription?: ReactNode;\n\t/** Optional right-aligned task metadata, such as \"18,400 of 25,000 rows\". */\n\tmetadata?: ReactNode;\n\t/** Show the formatted value beside the label. Defaults to `true` when `label` is supplied. */\n\tshowValue?: boolean;\n\t/** Replaces the formatted value while retaining the default summary layout. */\n\tvalueSlot?: ReactNode;\n\t/** Replaces the entire content above the track. */\n\theaderSlot?: ReactNode;\n\t/** Replaces the default track and indicator composition. */\n\ttrackSlot?: ReactNode;\n\t/** Track thickness. @default \"default\" */\n\tsize?: ProgressSize;\n\t/** Semantic indicator color. @default \"primary\" */\n\ttone?: ProgressTone;\n\t/** Props forwarded to the default track. Ignored when `trackSlot` is supplied. */\n\ttrackProps?: ProgressTrackProps;\n\t/** Props forwarded to the default indicator. Ignored when `trackSlot` is supplied. */\n\tindicatorProps?: ProgressIndicatorProps;\n\t/** Override the indeterminate screen-reader copy. */\n\tstrings?: StringsProp<ProgressStrings>;\n}\n\nexport interface ProgressTrackProps extends ProgressPrimitive.Track.Props {\n\t/** Track thickness. @default \"default\" */\n\tsize?: ProgressSize;\n}\n\nexport interface ProgressIndicatorProps extends ProgressPrimitive.Indicator.Props {\n\t/** Semantic fill color. @default \"primary\" */\n\ttone?: ProgressTone;\n}\n\nexport interface ProgressLabelProps extends ProgressPrimitive.Label.Props {\n\t/** Accessible label content. */\n\tchildren?: ReactNode;\n}\n\nexport interface ProgressValueProps extends Omit<ProgressPrimitive.Value.Props, 'children'> {\n\t/** Customize the formatted display while preserving the value semantics. */\n\tchildren?: (formattedValue: string | null, value: number | null) => ReactNode;\n}\n\ninterface ProgressContextValue {\n\tformattedValue: string | null;\n\tvalue: number | null;\n}\n\nconst ProgressContext = createContext<ProgressContextValue | null>(null);\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n\n\nconst INDICATOR_TONE_CLASSNAMES: Record<ProgressTone, string> = {\n\tneutral: 'bg-muted-foreground',\n\tprimary: 'bg-primary',\n\tsecondary: 'bg-secondary-foreground',\n\tsuccess: 'bg-success',\n\tinfo: 'bg-info',\n\twarning: 'bg-warning',\n\tdestructive: 'bg-destructive',\n};\n\nfunction mergeStateClassName<TState>(\n\tbaseClassName: string,\n\tclassName: StatefulClassName<TState>,\n): string | ((state: TState) => string) {\n\tif (typeof className === 'function') {\n\t\treturn (state) => cn(baseClassName, className(state));\n\t}\n\n\treturn cn(baseClassName, className);\n}\n\nfunction normalizeRange(minProp: number | undefined, maxProp: number | undefined) {\n\tconst min = Number.isFinite(minProp) ? (minProp as number) : 0;\n\tconst maxCandidate = Number.isFinite(maxProp) ? (maxProp as number) : 100;\n\tconst max = maxCandidate > min ? maxCandidate : min + 100;\n\n\treturn { min, max };\n}\n\nfunction normalizeValue(value: number | null, min: number, max: number): number | null {\n\tif (value === null || !Number.isFinite(value)) return null;\n\treturn Math.min(max, Math.max(min, value));\n}\n\nfunction formatProgressValue(\n\tvalue: number | null,\n\tmin: number,\n\tmax: number,\n\tlocale: Intl.LocalesArgument | undefined,\n\tformat: Intl.NumberFormatOptions | undefined,\n): string | null {\n\tif (value === null) return null;\n\n\tif (format) {\n\t\treturn new Intl.NumberFormat(locale, format).format(value);\n\t}\n\n\tconst normalized = max === min ? 0 : (value - min) / (max - min);\n\treturn new Intl.NumberFormat(locale, {\n\t\tstyle: 'percent',\n\t\tmaximumFractionDigits: 0,\n\t}).format(normalized);\n}\n\nconst Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n\t{\n\t\tvalue: valueProp,\n\t\tmin: minProp,\n\t\tmax: maxProp,\n\t\tformat,\n\t\tlocale,\n\t\tgetAriaValueText,\n\t\tchildren,\n\t\tlabel,\n\t\tdescription,\n\t\tmetadata,\n\t\tshowValue: showValueProp,\n\t\tvalueSlot,\n\t\theaderSlot,\n\t\ttrackSlot,\n\t\tsize: sizeProp,\n\t\ttone = 'primary',\n\t\ttrackProps,\n\t\tindicatorProps,\n\t\tstrings: stringsProp,\n\t\tclassName,\n\t\t'aria-describedby': ariaDescribedBy,\n\t\t...props\n\t},\n\tref,\n) {\n\tconst strings = useStrings(defaultProgressStrings, stringsProp);\n\tconst formatting = useFormattingConfig();\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\tconst resolvedLocale = locale ?? formatting.locale;\n\tconst descriptionId = useId();\n\tconst { min, max } = normalizeRange(minProp, maxProp);\n\tconst value = normalizeValue(valueProp, min, max);\n\tconst formattedValue = formatProgressValue(value, min, max, resolvedLocale, format);\n\tconst usesGeneratedHeader = headerSlot === undefined && children === undefined;\n\tconst showValue = showValueProp ?? label !== undefined;\n\tconst hasSummary =\n\t\tlabel !== undefined || description !== undefined || metadata !== undefined || valueSlot !== undefined || showValue;\n\tconst descriptionIds =\n\t\t[ariaDescribedBy, usesGeneratedHeader && description !== undefined ? descriptionId : undefined]\n\t\t\t.filter(Boolean)\n\t\t\t.join(' ') || undefined;\n\tconst resolvedGetAriaValueText = (_formattedValue: string | null, currentValue: number | null) => {\n\t\tconst normalizedFormattedValue = formatProgressValue(currentValue, min, max, resolvedLocale, format);\n\t\tif (getAriaValueText) {\n\t\t\treturn getAriaValueText(normalizedFormattedValue, currentValue);\n\t\t}\n\t\treturn normalizedFormattedValue ?? strings.indeterminateValue;\n\t};\n\tconst contextValue = useMemo(() => ({ formattedValue, value }), [formattedValue, value]);\n\tconst resolvedHeader =\n\t\theaderSlot ??\n\t\tchildren ??\n\t\t(hasSummary ? (\n\t\t\t<>\n\t\t\t\t<Stack gap=\"dense\" className=\"progress--summary min-w-0\">\n\t\t\t\t\t{label !== undefined && <ProgressLabel>{label}</ProgressLabel>}\n\t\t\t\t\t{description !== undefined &&\n\t\t\t\t\t\t(isSimpleText(description) ? (\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tid={descriptionId}\n\t\t\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t\t\t\tclassName=\"progress--description block\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div id={descriptionId} className=\"progress--description\">\n\t\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t</Stack>\n\t\t\t\t{(showValue || valueSlot !== undefined || metadata !== undefined) && (\n\t\t\t\t\t<Stack gap=\"dense\" align=\"end\" className=\"progress--details text-right\">\n\t\t\t\t\t\t{valueSlot ?? (showValue ? <ProgressValue /> : null)}\n\t\t\t\t\t\t{metadata !== undefined &&\n\t\t\t\t\t\t\t(isSimpleText(metadata) ? (\n\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\" className=\"progress--metadata tabular-nums\">\n\t\t\t\t\t\t\t\t\t{metadata}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tmetadata\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\t\t\t</>\n\t\t) : null);\n\tconst resolvedTrack = trackSlot ?? (\n\t\t<ProgressTrack {...trackProps} size={trackProps?.size ?? size}>\n\t\t\t{trackProps?.children ?? <ProgressIndicator {...indicatorProps} tone={indicatorProps?.tone ?? tone} />}\n\t\t</ProgressTrack>\n\t);\n\n\treturn (\n\t\t<ProgressContext.Provider value={contextValue}>\n\t\t\t<ProgressPrimitive.Root\n\t\t\t\tref={ref}\n\t\t\t\tvalue={value}\n\t\t\t\tmin={min}\n\t\t\t\tmax={max}\n\t\t\t\tformat={format}\n\t\t\t\tlocale={resolvedLocale}\n\t\t\t\tgetAriaValueText={resolvedGetAriaValueText}\n\t\t\t\taria-describedby={descriptionIds}\n\t\t\t\tdata-slot=\"progress\"\n\t\t\t\tdata-size={size}\n\t\t\t\tdata-tone={tone}\n\t\t\t\tclassName={mergeStateClassName<ProgressRootState>(\n\t\t\t\t\t'progress--component grid min-w-0 w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-x-space-lg gap-y-space-sm',\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{resolvedHeader}\n\t\t\t\t{resolvedTrack}\n\t\t\t</ProgressPrimitive.Root>\n\t\t</ProgressContext.Provider>\n\t);\n});\nProgress.displayName = 'Progress';\n\nconst ProgressTrack = forwardRef<HTMLDivElement, ProgressTrackProps>(function ProgressTrack(\n\t{ className, size: sizeProp, ...props },\n\tref,\n) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\treturn (\n\t\t<ProgressPrimitive.Track\n\t\t\tref={ref}\n\t\t\tdata-slot=\"progress-track\"\n\t\t\tdata-size={size}\n\t\t\tclassName={mergeStateClassName<ProgressTrackState>(\n\t\t\t\tcn(\n\t\t\t\t\t'progress-track--component progress--track relative col-span-full flex w-full items-center overflow-hidden rounded-full bg-muted',\n\t\t\t\t\ttrackHeightClasses[size],\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nProgressTrack.displayName = 'ProgressTrack';\n\nconst ProgressIndicator = forwardRef<HTMLDivElement, ProgressIndicatorProps>(function ProgressIndicator(\n\t{ className, tone = 'primary', ...props },\n\tref,\n) {\n\treturn (\n\t\t<ProgressPrimitive.Indicator\n\t\t\tref={ref}\n\t\t\tdata-slot=\"progress-indicator\"\n\t\t\tdata-tone={tone}\n\t\t\tclassName={mergeStateClassName<ProgressIndicatorState>(\n\t\t\t\tcn(\n\t\t\t\t\t'progress-indicator--component progress--indicator h-full rounded-full transition-[width] duration-300 ease-out motion-reduce:transition-none',\n\t\t\t\t\t'data-[indeterminate]:w-full motion-safe:data-[indeterminate]:animate-pulse',\n\t\t\t\t\tINDICATOR_TONE_CLASSNAMES[tone],\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nProgressIndicator.displayName = 'ProgressIndicator';\n\nconst ProgressLabel = forwardRef<HTMLSpanElement, ProgressLabelProps>(function ProgressLabel(\n\t{ className, children, ...props },\n\tref,\n) {\n\treturn (\n\t\t<ProgressPrimitive.Label\n\t\t\tref={ref}\n\t\t\tdata-slot=\"progress-label\"\n\t\t\tclassName={mergeStateClassName<ProgressLabelState>(\n\t\t\t\t'progress-label--component progress--label min-w-0',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text tag=\"span\" weight=\"medium\" lineHeight=\"tight\" className=\"block\">\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</ProgressPrimitive.Label>\n\t);\n});\nProgressLabel.displayName = 'ProgressLabel';\n\nconst ProgressValue = forwardRef<HTMLSpanElement, ProgressValueProps>(function ProgressValue(\n\t{ className, children, ...props },\n\tref,\n) {\n\tconst context = useContext(ProgressContext);\n\n\treturn (\n\t\t<ProgressPrimitive.Value\n\t\t\tref={ref}\n\t\t\tdata-slot=\"progress-value\"\n\t\t\tclassName={mergeStateClassName<ProgressValueState>(\n\t\t\t\t'progress-value--component progress--value whitespace-nowrap',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{(_primitiveFormattedValue, primitiveValue) => {\n\t\t\t\tconst value = context?.value ?? primitiveValue;\n\t\t\t\tconst formattedValue = context?.formattedValue ?? _primitiveFormattedValue;\n\t\t\t\tconst content = children ? children(formattedValue, value) : formattedValue;\n\n\t\t\t\tif (content === null || content === undefined) return null;\n\t\t\t\treturn isSimpleText(content) ? (\n\t\t\t\t\t// The percentage is the bar's primary value, so it mirrors\n\t\t\t\t\t// ProgressLabel: provider-default size and medium weight. Pinning\n\t\t\t\t\t// it to `xs`/secondary demoted the headline number below its own\n\t\t\t\t\t// caption and left the two off a shared baseline.\n\t\t\t\t\t<Text tag=\"span\" weight=\"medium\" lineHeight=\"tight\" className=\"block tabular-nums\">\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\tcontent\n\t\t\t\t);\n\t\t\t}}\n\t\t</ProgressPrimitive.Value>\n\t);\n});\nProgressValue.displayName = 'ProgressValue';\n\nexport { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, defaultProgressStrings };\nexport type { ProgressStrings };\n"],"mappings":";;;;;;;;;;;AAKA,IAAaU,IAA0C,EACtD,oBAAoB,cACrB,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