themelia-react-ui 1.0.2 → 2.0.0
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 +281 -1
- package/README.md +10 -5
- package/dist/{accordion-BRTcsp8J.js → accordion-CQXVcd7Q.js} +13 -13
- package/dist/accordion-CQXVcd7Q.js.map +1 -0
- package/dist/action-menu-BTpyPWJ2.js +264 -0
- package/dist/action-menu-BTpyPWJ2.js.map +1 -0
- package/dist/{affordance-geometry.generated-CL84ZN9A.js → affordance-geometry.generated-CCIXb2A1.js} +7 -2
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
- package/dist/{ai-artifact-DLVdK0Py.js → ai-artifact-2PQ2fItc.js} +171 -176
- package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
- package/dist/{app-shell-C_fKpljx.js → app-shell-BE_j8-AT.js} +4 -4
- package/dist/{app-shell-C_fKpljx.js.map → app-shell-BE_j8-AT.js.map} +1 -1
- package/dist/{attachment-DbjUWsP0.js → attachment-q69dlt5Y.js} +9 -9
- package/dist/{attachment-DbjUWsP0.js.map → attachment-q69dlt5Y.js.map} +1 -1
- package/dist/{auth-CAQcasMV.js → auth-M3vGMgDR.js} +42 -42
- package/dist/{auth-CAQcasMV.js.map → auth-M3vGMgDR.js.map} +1 -1
- package/dist/{avatar-Bu2HhitA.js → avatar-djdaaQ_s.js} +14 -12
- package/dist/avatar-djdaaQ_s.js.map +1 -0
- package/dist/{badge-CzId1Wlm.js → badge-0tATj-tW.js} +9 -9
- package/dist/badge-0tATj-tW.js.map +1 -0
- 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 +2 -2
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +11 -11
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +244 -222
- 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 +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +81 -76
- 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 +7 -4
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +42 -42
- 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 +9 -9
- 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 +4 -4
- 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 +229 -220
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +147 -180
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +530 -523
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1390 -1516
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +82 -91
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-BuYz5SDU.js → breadcrumbs-BG_FfMK4.js} +5 -5
- package/dist/{breadcrumbs-BuYz5SDU.js.map → breadcrumbs-BG_FfMK4.js.map} +1 -1
- package/dist/{button-BZDasD04.js → button-BS3KDg00.js} +185 -162
- package/dist/button-BS3KDg00.js.map +1 -0
- package/dist/{button-BZyfTvwm.js → button-R9CCoH7A.js} +2 -2
- package/dist/{button-BZyfTvwm.js.map → button-R9CCoH7A.js.map} +1 -1
- package/dist/{buttons-D_6KJvEE.js → buttons-DS0ZIwJ_.js} +11 -11
- package/dist/buttons-DS0ZIwJ_.js.map +1 -0
- package/dist/{cards-qGSErLw_.js → cards-QoJ4syG9.js} +7 -7
- package/dist/{cards-qGSErLw_.js.map → cards-QoJ4syG9.js.map} +1 -1
- package/dist/{chart-Bsc5BICK.js → chart-DwYRKKc-.js} +17 -15
- package/dist/chart-DwYRKKc-.js.map +1 -0
- package/dist/checkbox-B7ygNTYp.js +35 -0
- package/dist/checkbox-B7ygNTYp.js.map +1 -0
- package/dist/choice-inputs-DrJ17tpL.js +752 -0
- package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
- package/dist/{code-block-DzHKRybS.js → code-block-CD0B7M93.js} +19 -19
- package/dist/{code-block-DzHKRybS.js.map → code-block-CD0B7M93.js.map} +1 -1
- package/dist/{collapsible-ClvC7Bj3.js → collapsible-oMUGM4tr.js} +3 -3
- package/dist/{collapsible-ClvC7Bj3.js.map → collapsible-oMUGM4tr.js.map} +1 -1
- package/dist/{collection-content-D6S8cv_n.js → collection-content-Ys-OZOkY.js} +3 -3
- package/dist/{collection-content-D6S8cv_n.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
- package/dist/{combobox-BFnbJJp3.js → combobox-6dvVny2q.js} +96 -97
- package/dist/combobox-6dvVny2q.js.map +1 -0
- package/dist/{combobox-hozNwUcc.js → combobox-CB7039j7.js} +326 -308
- package/dist/combobox-CB7039j7.js.map +1 -0
- package/dist/{command-BnmSchli.js → command-kPMPjIxJ.js} +34 -30
- package/dist/command-kPMPjIxJ.js.map +1 -0
- package/dist/{comments-u5L0OGip.js → comments-You0Bzbr.js} +349 -348
- package/dist/comments-You0Bzbr.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
- package/dist/components/base/action-menu/action-menu.d.ts +7 -2
- package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
- package/dist/components/base/badge/badge.d.ts +1 -1
- package/dist/components/base/badge/badge.recipes.d.ts +4 -4
- package/dist/components/base/buttons/base-button.d.ts +7 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.variants.d.ts +1 -0
- package/dist/components/base/buttons/loader-button.d.ts +3 -1
- package/dist/components/base/buttons/text-button.d.ts +2 -2
- package/dist/components/base/carousel/carousel.d.ts +3 -1
- package/dist/components/base/chart/chart.d.ts +7 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
- package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +13 -3
- package/dist/components/base/display/alert-dialog.d.ts +8 -2
- package/dist/components/base/display/content-block.d.ts +4 -2
- package/dist/components/base/display/date-block.d.ts +1 -1
- package/dist/components/base/display/dialog.d.ts +12 -5
- package/dist/components/base/display/surface-title.d.ts +6 -1
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -4
- package/dist/components/base/forms/form-sizing.d.ts +32 -0
- package/dist/components/base/forms/workflow.d.ts +2 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
- package/dist/components/base/navigation/language-switcher.d.ts +4 -1
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
- package/dist/components/base/qr-code/qr-code.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +29 -1
- package/dist/components/base/sheet/sheet.d.ts +14 -5
- package/dist/components/base/spinner/spinner.d.ts +3 -2
- package/dist/components/base/structure/structure.types.d.ts +1 -1
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/base/upload/upload.recipes.d.ts +11 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
- package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
- package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
- package/dist/components/blocks/analytics/index.d.ts +1 -1
- package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
- package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/drawer.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +42 -19
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/partials/index.d.ts +1 -1
- package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
- package/dist/components/features/products/partials/product-tone.d.ts +11 -1
- package/dist/components/features/products/products.types.d.ts +2 -1
- package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.types.d.ts +53 -3
- package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/primitives/date.d.ts +16 -3
- package/dist/components/primitives/dimensions.d.ts +6 -0
- package/dist/components/primitives/duration.d.ts +6 -0
- package/dist/components/primitives/file-size.d.ts +6 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +11 -2
- package/dist/components/primitives/link.d.ts +7 -0
- package/dist/components/primitives/money.d.ts +29 -7
- package/dist/components/primitives/number.d.ts +17 -0
- package/dist/components/primitives/value-typography.d.ts +54 -0
- package/dist/components/primitives/value.d.ts +31 -6
- package/dist/components/typography/heading.d.ts +9 -1
- package/dist/components/typography/label.d.ts +3 -0
- package/dist/components/typography/running-text.d.ts +12 -0
- package/dist/components/typography/text-link.d.ts +23 -1
- package/dist/components/typography/text.d.ts +12 -0
- package/dist/components/typography/text.styles.d.ts +35 -13
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/overlay.recipes.d.ts +15 -2
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/{containers-DqB-bSYE.js → containers-D_L4mTVb.js} +3 -3
- package/dist/{containers-DqB-bSYE.js.map → containers-D_L4mTVb.js.map} +1 -1
- package/dist/{copyable-BTSByfmq.js → copyable-DDjTeW_j.js} +4 -4
- package/dist/{copyable-BTSByfmq.js.map → copyable-DDjTeW_j.js.map} +1 -1
- package/dist/{data-display-Bihs9Ven.js → data-display-3xWQUnMA.js} +471 -478
- package/dist/data-display-3xWQUnMA.js.map +1 -0
- package/dist/date-picker-DrDFj8Lo.js +1527 -0
- package/dist/date-picker-DrDFj8Lo.js.map +1 -0
- package/dist/date-pickers-CnFCb0n2.js +174 -0
- package/dist/date-pickers-CnFCb0n2.js.map +1 -0
- package/dist/date-uf3z37Nm.js +144 -0
- package/dist/date-uf3z37Nm.js.map +1 -0
- package/dist/{display-CS6Hbk18.js → display-DrdvPwF0.js} +25 -25
- package/dist/display-DrdvPwF0.js.map +1 -0
- package/dist/{dropdown-menu-D-boNgGO.js → dropdown-menu-CURh59jb.js} +22 -15
- package/dist/dropdown-menu-CURh59jb.js.map +1 -0
- package/dist/features/activities.js +38 -35
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +36 -35
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +325 -326
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +190 -200
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +77 -77
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +4 -4
- package/dist/features/map.js +8 -8
- package/dist/features/media-library.js +499 -502
- 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 +1216 -1248
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +46 -44
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +96 -88
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +11 -11
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +188 -184
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +7 -7
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +469 -470
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-CJkUAapr.js → feedback-C7nR0UtT.js} +9 -10
- package/dist/feedback-C7nR0UtT.js.map +1 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
- package/dist/{field-state-recipes-DQQpiLWC.js → field-state-recipes-C-MFBX_8.js} +3 -3
- package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
- package/dist/{filters-D6FF8L6s.js → filters-Da-gNPsE.js} +467 -467
- package/dist/filters-Da-gNPsE.js.map +1 -0
- package/dist/{form-field-CZwrkP7m.js → form-field-VZRULhUK.js} +7 -7
- package/dist/{form-field-CZwrkP7m.js.map → form-field-VZRULhUK.js.map} +1 -1
- package/dist/form-sizing-uWP4lzVh.js +126 -0
- package/dist/form-sizing-uWP4lzVh.js.map +1 -0
- package/dist/{forms-B5NCbkSC.js → forms-DDeEnXSY.js} +11 -11
- package/dist/forms-DDeEnXSY.js.map +1 -0
- package/dist/forms-numeric-D3CO60IF.js +905 -0
- package/dist/forms-numeric-D3CO60IF.js.map +1 -0
- package/dist/{header-kxruN3RM.js → header-2ycNqGOR.js} +43 -42
- package/dist/header-2ycNqGOR.js.map +1 -0
- package/dist/{hooks-BrlnCwQd.js → hooks-DQ5SPwZw.js} +2 -2
- package/dist/{hooks-BrlnCwQd.js.map → hooks-DQ5SPwZw.js.map} +1 -1
- package/dist/{icon-badge-Btc6pQrp.js → icon-badge-DKlaKXoo.js} +3 -3
- package/dist/{icon-badge-Btc6pQrp.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{input-vxcaNCYC.js → input-BoLm9Hks.js} +3 -3
- package/dist/{input-vxcaNCYC.js.map → input-BoLm9Hks.js.map} +1 -1
- package/dist/input-DhQdBnV3.js +255 -0
- package/dist/{input-SX9V0AL3.js.map → input-DhQdBnV3.js.map} +1 -1
- package/dist/item-xzh8Df65.js +264 -0
- package/dist/item-xzh8Df65.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +6 -1
- package/dist/lib/field-affordance-recipes.d.ts +35 -0
- package/dist/lib/field-state-recipes.d.ts +4 -2
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
- package/dist/lib/surface-recipes.d.ts +8 -6
- package/dist/lib/token-merge.generated.d.ts +11 -11
- package/dist/lib/track-recipes.d.ts +1 -1
- package/dist/lib/ui-provider/provider.d.ts +7 -2
- package/dist/lib/ui-provider/store.d.ts +6 -2
- package/dist/lib/ui-provider/types.d.ts +5 -2
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-DLp3HAz0.js → media-gallery-DQUQ0m3O.js} +8 -8
- package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
- package/dist/{mentions-Cl0Kt_Pd.js → mentions-DwnO1hh4.js} +34 -35
- package/dist/{mentions-Cl0Kt_Pd.js.map → mentions-DwnO1hh4.js.map} +1 -1
- package/dist/{message-SZUNB1eX.js → message-YfFmbXNP.js} +5 -5
- package/dist/{message-SZUNB1eX.js.map → message-YfFmbXNP.js.map} +1 -1
- package/dist/{navigation-DyytsLRB.js → navigation-Cbp5V8gG.js} +33 -34
- package/dist/navigation-Cbp5V8gG.js.map +1 -0
- package/dist/{navigation-DnQSNMT0.js → navigation-Cs1npsPm.js} +111 -87
- package/dist/navigation-Cs1npsPm.js.map +1 -0
- package/dist/{navigation-row-recipes-DQEXQcqY.js → navigation-row-recipes-DlU-4QYO.js} +2 -2
- package/dist/{navigation-row-recipes-DQEXQcqY.js.map → navigation-row-recipes-DlU-4QYO.js.map} +1 -1
- package/dist/number-CKRBYmZK.js +352 -0
- package/dist/number-CKRBYmZK.js.map +1 -0
- package/dist/overlay.recipes-CNO2S9V6.js +34 -0
- package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
- package/dist/overlays-DhZO7N-I.js +994 -0
- package/dist/overlays-DhZO7N-I.js.map +1 -0
- package/dist/page-C6R_8jFt.js +325 -0
- package/dist/page-C6R_8jFt.js.map +1 -0
- package/dist/{page-header-D8nERkn5.js → page-header-hUTzcRZX.js} +9 -9
- package/dist/page-header-hUTzcRZX.js.map +1 -0
- package/dist/{pagination-NLGqRirf.js → pagination-Cm0jqa3I.js} +8 -8
- package/dist/{pagination-NLGqRirf.js.map → pagination-Cm0jqa3I.js.map} +1 -1
- package/dist/{popover-CghIYdQf.js → popover-Dcv_9jxr.js} +6 -6
- package/dist/{popover-CghIYdQf.js.map → popover-Dcv_9jxr.js.map} +1 -1
- package/dist/{popover-menu-B4PoWhRl.js → popover-menu-DnRFKnHP.js} +6 -6
- package/dist/{popover-menu-B4PoWhRl.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
- package/dist/{popover.recipes-QlD4JenO.js → popover.recipes-wmbvL8Ah.js} +2 -2
- package/dist/{popover.recipes-QlD4JenO.js.map → popover.recipes-wmbvL8Ah.js.map} +1 -1
- package/dist/primitives-BHrwQXFC.js +379 -0
- package/dist/primitives-BHrwQXFC.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BroqrAyV.js → progress-Br9WTFya.js} +7 -7
- package/dist/progress-Br9WTFya.js.map +1 -0
- package/dist/{receipt-BuJynLgf.js → receipt-CV89q1fs.js} +6 -6
- package/dist/{receipt-BuJynLgf.js.map → receipt-CV89q1fs.js.map} +1 -1
- package/dist/{rich-text-editor-BKyG7rWz.js → rich-text-editor-CF8QYt5p.js} +6 -6
- package/dist/{rich-text-editor-BKyG7rWz.js.map → rich-text-editor-CF8QYt5p.js.map} +1 -1
- package/dist/{rich-text-editor.recipes-B72Nfuze.js → rich-text-editor.recipes-CnrbmTS1.js} +4 -4
- package/dist/{rich-text-editor.recipes-B72Nfuze.js.map → rich-text-editor.recipes-CnrbmTS1.js.map} +1 -1
- package/dist/{rich-text-DlxDOtf4.js → rich-text-j-FGAeZW.js} +4 -4
- package/dist/{rich-text-DlxDOtf4.js.map → rich-text-j-FGAeZW.js.map} +1 -1
- package/dist/{scroll-area-D-pIhEKl.js → scroll-area-DRdr16Pt.js} +3 -3
- package/dist/scroll-area-DRdr16Pt.js.map +1 -0
- package/dist/{separator-BhtFyo4x.js → separator-BMEvwnSX.js} +2 -2
- package/dist/{separator-BhtFyo4x.js.map → separator-BMEvwnSX.js.map} +1 -1
- package/dist/{separator-BNIgG3au.js → separator-Do5GWDYi.js} +4 -4
- package/dist/separator-Do5GWDYi.js.map +1 -0
- package/dist/services/actions/action-adapters.d.ts +4 -0
- package/dist/services/actions.js +8 -3
- package/dist/services/actions.js.map +1 -1
- package/dist/{settings-DOTOzeZ2.js → settings-DHk0L2MF.js} +17 -17
- package/dist/settings-DHk0L2MF.js.map +1 -0
- package/dist/sheet-DRFNY1_D.js +207 -0
- package/dist/sheet-DRFNY1_D.js.map +1 -0
- package/dist/sidebar-Cb8WzOvE.js +511 -0
- package/dist/sidebar-Cb8WzOvE.js.map +1 -0
- package/dist/{sidebar-CyR4XKwR.js → sidebar-Crc9M9JV.js} +18 -18
- package/dist/sidebar-Crc9M9JV.js.map +1 -0
- package/dist/{skeleton-3F0uhYn3.js → skeleton-DVMXr15h.js} +4 -4
- package/dist/{skeleton-3F0uhYn3.js.map → skeleton-DVMXr15h.js.map} +1 -1
- package/dist/{smart-card-DjGVV2xr.js → smart-card-Bek-TwUp.js} +222 -207
- package/dist/smart-card-Bek-TwUp.js.map +1 -0
- package/dist/{spinner-Cpf7oRkF.js → spinner-CmTAbEp0.js} +8 -6
- package/dist/spinner-CmTAbEp0.js.map +1 -0
- package/dist/{structure-CRdqVawd.js → structure-hzCW-XsV.js} +3 -3
- package/dist/{structure-CRdqVawd.js.map → structure-hzCW-XsV.js.map} +1 -1
- package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
- package/dist/structure.recipes-EPz60cU8.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-recipes-DOdoBXGm.js +28 -0
- package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
- package/dist/table-D6zKeYQX.js +162 -0
- package/dist/table-D6zKeYQX.js.map +1 -0
- package/dist/{table-CcRDZiLP.js → table-Dn4XSrSB.js} +348 -348
- package/dist/table-Dn4XSrSB.js.map +1 -0
- package/dist/{tabs-BNgu7g0u.js → tabs-Dk8E_knt.js} +14 -13
- package/dist/tabs-Dk8E_knt.js.map +1 -0
- package/dist/{text-inputs-DsR56TR-.js → text-inputs-BFpku0Qd.js} +150 -149
- package/dist/text-inputs-BFpku0Qd.js.map +1 -0
- package/dist/{text.styles-Q4sGAIgA.js → text.styles-g4He6UIW.js} +17 -14
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +16 -12
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-D1pkt3se.js → timelines-CxuAFIc2.js} +25 -38
- package/dist/timelines-CxuAFIc2.js.map +1 -0
- package/dist/track-recipes-CDcKmndW.js +10 -0
- package/dist/track-recipes-CDcKmndW.js.map +1 -0
- package/dist/{tree-BtmYyMZV.js → tree-BotPlyiD.js} +13 -13
- package/dist/{tree-BtmYyMZV.js.map → tree-BotPlyiD.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CAr3dQhX.js +116 -0
- package/dist/typography-CAr3dQhX.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-DRPn3qNl.js → ui-provider-D2_TeLqw.js} +20 -21
- package/dist/ui-provider-D2_TeLqw.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-CDbYw1WN.js → upload-B0WHW7ak.js} +221 -220
- package/dist/upload-B0WHW7ak.js.map +1 -0
- package/dist/{upload-queue-CNd_hH_a.js → upload-queue-BHZ_wBfd.js} +59 -62
- package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
- package/dist/{usage-card-VyJLUwRr.js → usage-card-U0YBLTNT.js} +42 -43
- package/dist/{usage-card-VyJLUwRr.js.map → usage-card-U0YBLTNT.js.map} +1 -1
- package/dist/{utils-BvH9PSmq.js → utils-Cospvlj1.js} +221 -51
- package/dist/utils-Cospvlj1.js.map +1 -0
- package/dist/value-inputs-CjfzGMsN.js +854 -0
- package/dist/value-inputs-CjfzGMsN.js.map +1 -0
- package/dist/value-typography-Deb3yQZg.js +116 -0
- package/dist/value-typography-Deb3yQZg.js.map +1 -0
- package/dist/{workspace-CcR8r-Nt.js → workspace-YoFjXi6i.js} +44 -45
- package/dist/workspace-YoFjXi6i.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +51 -38
- package/docs/consumer-skill/examples/app-layout.tsx +2 -4
- package/docs/consumer-skill/examples/detail.tsx +3 -4
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
- package/docs/consumer-skill/examples/manifest.json +28 -6
- package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
- package/docs/consumer-skill/references/composition.md +89 -17
- package/docs/consumer-skill/references/discovery.md +4 -0
- package/docs/consumer-skill/references/installation.md +22 -0
- package/docs/consumer-skill/references/integration.md +32 -1
- package/docs/consumer-skill/references/public-api.json +111 -70
- package/docs/consumer-skill/references/review.md +20 -4
- package/docs/consumer-skill/references/theming.md +7 -1
- package/docs/consumer-skill/references/tokens.json +5 -2
- package/docs/consumer-skill/references/workflows.md +4 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +93 -2
- package/docs/consumer-skill/scripts/discovery.mjs +11 -3
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/package.json +5 -3
- package/dist/accordion-BRTcsp8J.js.map +0 -1
- package/dist/action-menu-Drxw_vJk.js +0 -265
- package/dist/action-menu-Drxw_vJk.js.map +0 -1
- package/dist/affordance-geometry.generated-CL84ZN9A.js.map +0 -1
- package/dist/ai-artifact-DLVdK0Py.js.map +0 -1
- package/dist/avatar-Bu2HhitA.js.map +0 -1
- package/dist/badge-CzId1Wlm.js.map +0 -1
- package/dist/button-BZDasD04.js.map +0 -1
- package/dist/buttons-D_6KJvEE.js.map +0 -1
- package/dist/chart-Bsc5BICK.js.map +0 -1
- package/dist/checkbox-BQNDjUCh.js +0 -34
- package/dist/checkbox-BQNDjUCh.js.map +0 -1
- package/dist/choice-inputs-Mk3iWbhr.js +0 -725
- package/dist/choice-inputs-Mk3iWbhr.js.map +0 -1
- package/dist/combobox-BFnbJJp3.js.map +0 -1
- package/dist/combobox-hozNwUcc.js.map +0 -1
- package/dist/command-BnmSchli.js.map +0 -1
- package/dist/comments-u5L0OGip.js.map +0 -1
- package/dist/data-display-Bihs9Ven.js.map +0 -1
- package/dist/date-DOKhJPu7.js +0 -140
- package/dist/date-DOKhJPu7.js.map +0 -1
- package/dist/date-picker-DzP5HQq7.js +0 -1541
- package/dist/date-picker-DzP5HQq7.js.map +0 -1
- package/dist/date-pickers-BpgGz7S-.js +0 -196
- package/dist/date-pickers-BpgGz7S-.js.map +0 -1
- package/dist/display-CS6Hbk18.js.map +0 -1
- package/dist/dropdown-menu-D-boNgGO.js.map +0 -1
- package/dist/feedback-CJkUAapr.js.map +0 -1
- package/dist/field-affordance-recipes-uKY4MsZ_.js +0 -25
- package/dist/field-affordance-recipes-uKY4MsZ_.js.map +0 -1
- package/dist/field-state-recipes-DQQpiLWC.js.map +0 -1
- package/dist/filters-D6FF8L6s.js.map +0 -1
- package/dist/form-sizing-QP8aIRaW.js +0 -103
- package/dist/form-sizing-QP8aIRaW.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B5NCbkSC.js.map +0 -1
- package/dist/forms-numeric-Crrm80Lm.js +0 -867
- package/dist/forms-numeric-Crrm80Lm.js.map +0 -1
- package/dist/header-kxruN3RM.js.map +0 -1
- package/dist/input-SX9V0AL3.js +0 -255
- package/dist/item-DE4YnuJx.js +0 -258
- package/dist/item-DE4YnuJx.js.map +0 -1
- package/dist/media-gallery-DLp3HAz0.js.map +0 -1
- package/dist/navigation-DnQSNMT0.js.map +0 -1
- package/dist/navigation-DyytsLRB.js.map +0 -1
- package/dist/number-DasMFWEG.js +0 -269
- package/dist/number-DasMFWEG.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-DUbs1KEi.js +0 -1011
- package/dist/overlays-DUbs1KEi.js.map +0 -1
- package/dist/page-hGmT4nWK.js +0 -213
- package/dist/page-hGmT4nWK.js.map +0 -1
- package/dist/page-header-D8nERkn5.js.map +0 -1
- package/dist/primitives-C7ff0QaI.js +0 -337
- package/dist/primitives-C7ff0QaI.js.map +0 -1
- package/dist/progress-BroqrAyV.js.map +0 -1
- package/dist/scroll-area-D-pIhEKl.js.map +0 -1
- package/dist/separator-BNIgG3au.js.map +0 -1
- package/dist/settings-DOTOzeZ2.js.map +0 -1
- package/dist/sheet-BFhrNehm.js +0 -205
- package/dist/sheet-BFhrNehm.js.map +0 -1
- package/dist/sidebar-CyR4XKwR.js.map +0 -1
- package/dist/sidebar-SvGJ0Zwi.js +0 -506
- package/dist/sidebar-SvGJ0Zwi.js.map +0 -1
- package/dist/smart-card-DjGVV2xr.js.map +0 -1
- package/dist/spinner-Cpf7oRkF.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-Dd__PD-w.js +0 -28
- package/dist/surface-recipes-Dd__PD-w.js.map +0 -1
- package/dist/table-CLtJTxoR.js +0 -147
- package/dist/table-CLtJTxoR.js.map +0 -1
- package/dist/table-CcRDZiLP.js.map +0 -1
- package/dist/tabs-BNgu7g0u.js.map +0 -1
- package/dist/text-inputs-DsR56TR-.js.map +0 -1
- package/dist/text.styles-Q4sGAIgA.js.map +0 -1
- package/dist/timelines-D1pkt3se.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/typography-BxQgiZyw.js +0 -96
- package/dist/typography-BxQgiZyw.js.map +0 -1
- package/dist/ui-provider-DRPn3qNl.js.map +0 -1
- package/dist/upload-CDbYw1WN.js.map +0 -1
- package/dist/upload-queue-CNd_hH_a.js.map +0 -1
- package/dist/utils-BvH9PSmq.js.map +0 -1
- package/dist/value-inputs-D0KCrfVC.js +0 -840
- package/dist/value-inputs-D0KCrfVC.js.map +0 -1
- package/dist/workspace-CcR8r-Nt.js.map +0 -1
|
@@ -0,0 +1,905 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { s as e, u as t } from "./ui-provider-D2_TeLqw.js";
|
|
3
|
+
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
+
import { t as r } from "./utils-Cospvlj1.js";
|
|
5
|
+
import { i, s as a, t as o } from "./typography-CAr3dQhX.js";
|
|
6
|
+
import { r as s, t as c } from "./structure-hzCW-XsV.js";
|
|
7
|
+
import { h as l, p as u } from "./smart-card-Bek-TwUp.js";
|
|
8
|
+
import { n as d } from "./field-affordance-recipes-CkOCdE2y.js";
|
|
9
|
+
import { d as f, g as p, o as m, u as h } from "./form-sizing-uWP4lzVh.js";
|
|
10
|
+
import { t as g } from "./input-DhQdBnV3.js";
|
|
11
|
+
import { t as _ } from "./form-field-VZRULhUK.js";
|
|
12
|
+
import { _ as v, c as y, d as b, f as ee, g as x, h as te, u as S } from "./choice-inputs-DrJ17tpL.js";
|
|
13
|
+
import { t as C } from "./control-group-recipes-DBXmfh2E.js";
|
|
14
|
+
import * as w from "react";
|
|
15
|
+
import { forwardRef as T, memo as E, useCallback as D, useEffect as O, useId as k, useMemo as A, useRef as j, useState as M } from "react";
|
|
16
|
+
import { jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
17
|
+
import { AlertTriangle as F, Minus as I, Plus as L } from "lucide-react";
|
|
18
|
+
//#region src/components/base/forms-numeric/decimal-input.tsx
|
|
19
|
+
var R = {
|
|
20
|
+
decrement: "Decrement",
|
|
21
|
+
increment: "Increment"
|
|
22
|
+
}, z = (e, t, n) => {
|
|
23
|
+
if (!e) return "";
|
|
24
|
+
let r = e;
|
|
25
|
+
if (r = r.replace(/,/g, "."), r = n ? r.replace(/[^\d.-]/g, "") : r.replace(/[^\d.]/g, ""), n && r.includes("-")) {
|
|
26
|
+
let e = r.startsWith("-");
|
|
27
|
+
r = r.replace(/-/g, ""), e && (r = "-" + r);
|
|
28
|
+
}
|
|
29
|
+
let i = r.split(".");
|
|
30
|
+
return i.length > 2 && (r = i[0] + "." + i.slice(1).join("")), i.length === 2 && i[1].length > t && (r = i[0] + "." + i[1].substring(0, t)), r;
|
|
31
|
+
}, B = (e, t, n) => {
|
|
32
|
+
if (!e || e === "-") return !0;
|
|
33
|
+
let r = parseFloat(e);
|
|
34
|
+
return Number.isNaN(r) ? !0 : !(t !== void 0 && r < t || n !== void 0 && r > n);
|
|
35
|
+
};
|
|
36
|
+
function V(e, t, n) {
|
|
37
|
+
let r = 10 ** t, i = e * r;
|
|
38
|
+
switch (n) {
|
|
39
|
+
case "floor": return Math.floor(i) / r;
|
|
40
|
+
case "ceil": return Math.ceil(i) / r;
|
|
41
|
+
case "half-even": {
|
|
42
|
+
let e = Math.floor(i), t = i - e;
|
|
43
|
+
return t > .5 ? (e + 1) / r : t < .5 ? e / r : (e % 2 == 0 ? e : e + 1) / r;
|
|
44
|
+
}
|
|
45
|
+
default: return Math.round(i) / r;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function H(e, t, n) {
|
|
49
|
+
let r = e;
|
|
50
|
+
return t !== void 0 && (r = Math.max(t, r)), n !== void 0 && (r = Math.min(n, r)), r;
|
|
51
|
+
}
|
|
52
|
+
function U(e, t, n, r, i = "round") {
|
|
53
|
+
let a = r ?? 0, o = (e - a) / n, s = a + ((i === "floor" ? Math.floor(o) : i === "ceil" ? Math.ceil(o) : Math.round(o)) + t) * n;
|
|
54
|
+
return Number(s.toFixed(12));
|
|
55
|
+
}
|
|
56
|
+
function W(e, t) {
|
|
57
|
+
let n = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
58
|
+
n ? n.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
59
|
+
}
|
|
60
|
+
var ne = {
|
|
61
|
+
sm: "w-control-sm",
|
|
62
|
+
md: "w-control",
|
|
63
|
+
lg: "w-control-lg"
|
|
64
|
+
};
|
|
65
|
+
function G({ decimalPlaces: t = 2, min: i, max: a, allowNegative: o = !0, allowEmpty: s = !0, step: c, roundingMode: l = "round", normalizeOnBlur: u = !0, onChange: d, onBlur: f, onKeyDown: _, placeholder: v, className: y, value: b, defaultValue: ee, disabled: x, size: te, strings: S, ...C }, T) {
|
|
66
|
+
let { defaultScale: E } = e(), O = p(te, E), k = n(R, S), A = Math.min(12, Math.max(0, t)), j = w.useRef(null), M = x || C.loading || C.readOnly, F = D((e) => {
|
|
67
|
+
let t = e.target.value;
|
|
68
|
+
if (!t && s) {
|
|
69
|
+
d?.(e);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let n = z(t, A, o);
|
|
73
|
+
if (B(n, i, a)) {
|
|
74
|
+
if (n !== t) {
|
|
75
|
+
let t = {
|
|
76
|
+
...e,
|
|
77
|
+
target: {
|
|
78
|
+
...e.target,
|
|
79
|
+
value: n
|
|
80
|
+
},
|
|
81
|
+
currentTarget: {
|
|
82
|
+
...e.currentTarget,
|
|
83
|
+
value: n
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
d?.(t);
|
|
87
|
+
} else d?.(e);
|
|
88
|
+
}
|
|
89
|
+
}, [
|
|
90
|
+
d,
|
|
91
|
+
A,
|
|
92
|
+
o,
|
|
93
|
+
s,
|
|
94
|
+
i,
|
|
95
|
+
a
|
|
96
|
+
]), G = D((e) => {
|
|
97
|
+
if (f?.(e), !u) return;
|
|
98
|
+
let t = e.target.value;
|
|
99
|
+
if (!t && s) return;
|
|
100
|
+
let n = Number.parseFloat(t.replace(",", "."));
|
|
101
|
+
if (!Number.isFinite(n)) return;
|
|
102
|
+
let r = V(H(n, i, a), A, l).toFixed(A);
|
|
103
|
+
r !== t && j.current && W(j.current, r);
|
|
104
|
+
}, [
|
|
105
|
+
f,
|
|
106
|
+
d,
|
|
107
|
+
u,
|
|
108
|
+
s,
|
|
109
|
+
i,
|
|
110
|
+
a,
|
|
111
|
+
A,
|
|
112
|
+
l
|
|
113
|
+
]), K = D((e) => {
|
|
114
|
+
if (M || c === void 0) return;
|
|
115
|
+
let t = j.current;
|
|
116
|
+
if (!t) return;
|
|
117
|
+
let n = t.value, r = Number.parseFloat(n.replace(",", "."));
|
|
118
|
+
W(t, V(H(U(Number.isFinite(r) ? r : i ?? 0, e, c, i, l), i, a), A, l).toFixed(A));
|
|
119
|
+
}, [
|
|
120
|
+
M,
|
|
121
|
+
c,
|
|
122
|
+
i,
|
|
123
|
+
a,
|
|
124
|
+
l,
|
|
125
|
+
A,
|
|
126
|
+
d
|
|
127
|
+
]), q = typeof c == "number" && c > 0, J = D((e) => {
|
|
128
|
+
_?.(e), !e.defaultPrevented && q && (e.key === "ArrowUp" || e.key === "ArrowDown") && (e.preventDefault(), K(e.key === "ArrowUp" ? 1 : -1));
|
|
129
|
+
}, [
|
|
130
|
+
_,
|
|
131
|
+
q,
|
|
132
|
+
K
|
|
133
|
+
]), Y = v ?? (A > 0 ? `0.${"0".repeat(A)}` : "0");
|
|
134
|
+
return q ? /* @__PURE__ */ P("div", {
|
|
135
|
+
className: r("decimal-input--component", "flex items-stretch overflow-hidden rounded-inner border border-input bg-transparent [&>.input--component]:h-full", h[O], "has-[input:focus-visible]:border-input has-[input:focus-visible]:ring-2 has-[input:focus-visible]:ring-ring", "has-[input[aria-invalid=true]]:border-destructive has-[input[aria-invalid=true]]:ring-2 has-[input[aria-invalid=true]]:ring-destructive/20 dark:has-[input[aria-invalid=true]]:ring-destructive/40 has-[input[aria-invalid=true]]:has-[input:focus-visible]:ring-destructive", "has-[input:read-only:not(:disabled)]:bg-muted", x && "opacity-50 cursor-not-allowed"),
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ N("button", {
|
|
138
|
+
type: "button",
|
|
139
|
+
tabIndex: -1,
|
|
140
|
+
"aria-label": k.decrement,
|
|
141
|
+
disabled: M,
|
|
142
|
+
onClick: () => K(-1),
|
|
143
|
+
className: r("box-border border-0 bg-transparent p-0 font-sans inline-flex shrink-0 items-center justify-center border-e border-input text-muted-foreground transition-colors", ne[O], "hover:bg-muted hover:text-foreground", "disabled:pointer-events-none disabled:cursor-not-allowed", !x && "disabled:opacity-50"),
|
|
144
|
+
children: /* @__PURE__ */ N(I, {
|
|
145
|
+
"aria-hidden": "true",
|
|
146
|
+
className: m[O]
|
|
147
|
+
})
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ N(g, {
|
|
150
|
+
size: O,
|
|
151
|
+
ref: (e) => {
|
|
152
|
+
j.current = e, typeof T == "function" ? T(e) : T && (T.current = e);
|
|
153
|
+
},
|
|
154
|
+
type: "text",
|
|
155
|
+
inputMode: A > 0 ? "decimal" : "numeric",
|
|
156
|
+
placeholder: Y,
|
|
157
|
+
onChange: F,
|
|
158
|
+
onBlur: G,
|
|
159
|
+
onKeyDown: J,
|
|
160
|
+
value: b,
|
|
161
|
+
defaultValue: ee,
|
|
162
|
+
disabled: x,
|
|
163
|
+
className: r("!h-full min-h-0 flex-1 tabular-nums text-center border-0 shadow-none rounded-none bg-transparent read-only:bg-transparent focus-visible:ring-0 focus-visible:border-0 aria-invalid:ring-0 aria-invalid:focus-visible:ring-0 disabled:opacity-100", y),
|
|
164
|
+
...C
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ N("button", {
|
|
167
|
+
type: "button",
|
|
168
|
+
tabIndex: -1,
|
|
169
|
+
"aria-label": k.increment,
|
|
170
|
+
disabled: M,
|
|
171
|
+
onClick: () => K(1),
|
|
172
|
+
className: r("box-border border-0 bg-transparent p-0 font-sans inline-flex shrink-0 items-center justify-center border-s border-input text-muted-foreground transition-colors", ne[O], "hover:bg-muted hover:text-foreground", "disabled:pointer-events-none disabled:cursor-not-allowed", !x && "disabled:opacity-50"),
|
|
173
|
+
children: /* @__PURE__ */ N(L, {
|
|
174
|
+
"aria-hidden": "true",
|
|
175
|
+
className: m[O]
|
|
176
|
+
})
|
|
177
|
+
})
|
|
178
|
+
]
|
|
179
|
+
}) : /* @__PURE__ */ N(g, {
|
|
180
|
+
size: O,
|
|
181
|
+
ref: (e) => {
|
|
182
|
+
j.current = e, typeof T == "function" ? T(e) : T && (T.current = e);
|
|
183
|
+
},
|
|
184
|
+
type: "text",
|
|
185
|
+
inputMode: A > 0 ? "decimal" : "numeric",
|
|
186
|
+
placeholder: Y,
|
|
187
|
+
onChange: F,
|
|
188
|
+
onBlur: G,
|
|
189
|
+
onKeyDown: _,
|
|
190
|
+
value: b,
|
|
191
|
+
defaultValue: ee,
|
|
192
|
+
disabled: x,
|
|
193
|
+
className: r("tabular-nums text-end", y),
|
|
194
|
+
...C
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
var K = w.forwardRef(G);
|
|
198
|
+
K.displayName = "DecimalInput";
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/components/base/forms-numeric/percentage-input.tsx
|
|
201
|
+
var q = T(function({ decimalPlaces: e = 2, min: t = 0, max: n = 100, step: r, ...i }, a) {
|
|
202
|
+
return /* @__PURE__ */ N(K, {
|
|
203
|
+
className: "percentage-input--component",
|
|
204
|
+
ref: a,
|
|
205
|
+
decimalPlaces: e,
|
|
206
|
+
allowNegative: !1,
|
|
207
|
+
min: t,
|
|
208
|
+
max: n,
|
|
209
|
+
step: r,
|
|
210
|
+
endAddon: "%",
|
|
211
|
+
...i
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
q.displayName = "PercentageInput";
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/components/base/forms-numeric/currency-input.tsx
|
|
217
|
+
var J = {
|
|
218
|
+
...R,
|
|
219
|
+
currencyAriaLabel: "Currency"
|
|
220
|
+
}, Y = {
|
|
221
|
+
USD: "$",
|
|
222
|
+
EUR: "€",
|
|
223
|
+
GBP: "£",
|
|
224
|
+
BGN: "лв",
|
|
225
|
+
JPY: "¥",
|
|
226
|
+
CNY: "¥",
|
|
227
|
+
CHF: "CHF",
|
|
228
|
+
CAD: "C$",
|
|
229
|
+
AUD: "A$"
|
|
230
|
+
}, re = (e) => !e || e.length === 0 ? [] : e.map((e) => typeof e == "string" ? {
|
|
231
|
+
value: e,
|
|
232
|
+
label: `${Y[e] || e} ${e}`
|
|
233
|
+
} : e);
|
|
234
|
+
function ie({ currency: t, defaultCurrency: o, currencies: s, onCurrencyChange: l, currencyPosition: u = "start", disableCurrencySelector: m = !1, currencyPlaceholder: h, currencyWidth: g = "w-28", currencyLabel: _, strings: y, invalid: C, disabled: w, onConfigError: T, size: E, ...j }, F) {
|
|
235
|
+
let { defaultScale: I } = e(), L = p(E, I), R = n(J, y), z = k(), B = A(() => re(s), [s]), [V, H] = M(o ?? B[0]?.value ?? ""), U = t !== void 0, W = U ? t : V;
|
|
236
|
+
O(() => {
|
|
237
|
+
let e = {
|
|
238
|
+
currency: t,
|
|
239
|
+
defaultCurrency: o,
|
|
240
|
+
disableCurrencySelector: m
|
|
241
|
+
};
|
|
242
|
+
m && typeof t == "string" && typeof o == "string" && t.trim() !== "" && o.trim() !== "" && t !== o && T?.("[CurrencyInput] currency/defaultCurrency mismatch while selector is disabled.", e), m && (typeof W != "string" || W.trim().length === 0) && T?.("[CurrencyInput] disableCurrencySelector is enabled but no currency is provided.", e);
|
|
243
|
+
}, [
|
|
244
|
+
t,
|
|
245
|
+
o,
|
|
246
|
+
m,
|
|
247
|
+
T,
|
|
248
|
+
W
|
|
249
|
+
]);
|
|
250
|
+
let ne = D((e) => {
|
|
251
|
+
e !== null && (U || H(e), l?.(e));
|
|
252
|
+
}, [U, l]), G = A(() => r("currency-input--selector-trigger", f(L), g), [L, g]), q = /* @__PURE__ */ P(c, {
|
|
253
|
+
gap: "xs",
|
|
254
|
+
className: "currency-input--selector",
|
|
255
|
+
children: [!!_ && /* @__PURE__ */ N(i, {
|
|
256
|
+
htmlFor: z,
|
|
257
|
+
className: "currency-input--selector-label leading-6",
|
|
258
|
+
children: _
|
|
259
|
+
}), /* @__PURE__ */ P(te, {
|
|
260
|
+
value: W,
|
|
261
|
+
onValueChange: (e) => ne(e),
|
|
262
|
+
disabled: w || m,
|
|
263
|
+
children: [/* @__PURE__ */ N(x, {
|
|
264
|
+
id: z,
|
|
265
|
+
"aria-label": _ || R.currencyAriaLabel,
|
|
266
|
+
"aria-invalid": C || void 0,
|
|
267
|
+
iconClassName: d.icon[L],
|
|
268
|
+
className: G,
|
|
269
|
+
children: /* @__PURE__ */ N(v, { placeholder: h ? /* @__PURE__ */ N(a, {
|
|
270
|
+
tag: "span",
|
|
271
|
+
size: "inherit",
|
|
272
|
+
type: "secondary",
|
|
273
|
+
lineHeight: "tight",
|
|
274
|
+
className: "text-inherit",
|
|
275
|
+
children: h
|
|
276
|
+
}) : void 0 })
|
|
277
|
+
}), /* @__PURE__ */ N(S, { children: /* @__PURE__ */ N(b, { children: B.map((e) => /* @__PURE__ */ N(ee, {
|
|
278
|
+
value: e.value,
|
|
279
|
+
size: L,
|
|
280
|
+
children: /* @__PURE__ */ N(a, {
|
|
281
|
+
tag: "span",
|
|
282
|
+
size: "inherit",
|
|
283
|
+
lineHeight: "tight",
|
|
284
|
+
className: "text-inherit",
|
|
285
|
+
children: e.label
|
|
286
|
+
})
|
|
287
|
+
}, e.value)) }) })]
|
|
288
|
+
})]
|
|
289
|
+
});
|
|
290
|
+
return /* @__PURE__ */ P("div", {
|
|
291
|
+
className: r("currency-input--component", "flex items-end gap-space-md"),
|
|
292
|
+
children: [
|
|
293
|
+
u === "start" && q,
|
|
294
|
+
/* @__PURE__ */ N("div", {
|
|
295
|
+
className: "currency-input--amount min-w-0 flex-1",
|
|
296
|
+
children: /* @__PURE__ */ N(K, {
|
|
297
|
+
ref: F,
|
|
298
|
+
size: L,
|
|
299
|
+
decimalPlaces: 2,
|
|
300
|
+
allowNegative: !1,
|
|
301
|
+
disabled: w,
|
|
302
|
+
invalid: C,
|
|
303
|
+
strings: {
|
|
304
|
+
decrement: R.decrement,
|
|
305
|
+
increment: R.increment
|
|
306
|
+
},
|
|
307
|
+
...j
|
|
308
|
+
})
|
|
309
|
+
}),
|
|
310
|
+
u === "end" && q
|
|
311
|
+
]
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
var X = E(T(ie));
|
|
315
|
+
X.displayName = "CurrencyInput";
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region src/components/base/forms-numeric/money-input.strings.ts
|
|
318
|
+
var ae = {
|
|
319
|
+
originalValue: "Original value: {value}",
|
|
320
|
+
conversionWarning: "Currency will be converted from {from} to {to}."
|
|
321
|
+
};
|
|
322
|
+
function oe(e, t) {
|
|
323
|
+
return Object.entries(t).reduce((e, [t, n]) => e.replaceAll(`{${t}}`, n), e);
|
|
324
|
+
}
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/components/base/forms-numeric/money-input.tsx
|
|
327
|
+
var se = ["USD", "EUR"];
|
|
328
|
+
function ce(e) {
|
|
329
|
+
let t = String(e ?? "").trim();
|
|
330
|
+
if (!t) return null;
|
|
331
|
+
let n = Number.parseFloat(t.replace(",", "."));
|
|
332
|
+
return Number.isFinite(n) ? n : null;
|
|
333
|
+
}
|
|
334
|
+
function le(e) {
|
|
335
|
+
return typeof e == "string" ? e.trim() : "";
|
|
336
|
+
}
|
|
337
|
+
function Z(e) {
|
|
338
|
+
return typeof e == "string" ? e : e.value;
|
|
339
|
+
}
|
|
340
|
+
var ue = T(function({ currency: e, defaultCurrency: i, currencies: o, onCurrencyChange: s, onChangeData: d, money: f, label: p, hint: m, helperText: h, error: g, required: v, invalid: y, recordCurrency: b, showMigrationWarning: ee = !0, migrationWarningMessage: x, showOriginalHint: te = !0, controlStrings: S, controlClassName: C, strings: w, className: T, onChange: E, value: O, defaultValue: k, ...I }, L) {
|
|
341
|
+
let R = t(), z = n(ae, w), B = i ?? R.defaultCurrency ?? "USD", [V, H] = M(B), U = e ?? V, W = j(null), ne = A(() => {
|
|
342
|
+
let e = o?.length ? o : [B, ...se], t = /* @__PURE__ */ new Map();
|
|
343
|
+
for (let n of e) {
|
|
344
|
+
let e = Z(n);
|
|
345
|
+
t.has(e) || t.set(e, n);
|
|
346
|
+
}
|
|
347
|
+
let n = Array.from(t.values());
|
|
348
|
+
return t.has(U) ? n : [U, ...n];
|
|
349
|
+
}, [
|
|
350
|
+
U,
|
|
351
|
+
o,
|
|
352
|
+
B
|
|
353
|
+
]), G = b ?? f?.recordCurrency ?? void 0, K = te ? le(f?.pair?.formatted) : "", q = !!(G && U && G !== U), J = y ?? !!g, Y = D((e) => {
|
|
354
|
+
W.current = e, typeof L == "function" ? L(e) : L && (L.current = e);
|
|
355
|
+
}, [L]), re = D((e) => {
|
|
356
|
+
E?.(e), d?.({
|
|
357
|
+
amount: ce(e.target.value),
|
|
358
|
+
currency: U
|
|
359
|
+
});
|
|
360
|
+
}, [
|
|
361
|
+
U,
|
|
362
|
+
E,
|
|
363
|
+
d
|
|
364
|
+
]), ie = D((t) => {
|
|
365
|
+
e === void 0 && H(t), s?.(t), d?.({
|
|
366
|
+
amount: ce(W.current?.value ?? O ?? k),
|
|
367
|
+
currency: t
|
|
368
|
+
});
|
|
369
|
+
}, [
|
|
370
|
+
e,
|
|
371
|
+
k,
|
|
372
|
+
d,
|
|
373
|
+
s,
|
|
374
|
+
O
|
|
375
|
+
]), ue = /* @__PURE__ */ N(X, {
|
|
376
|
+
...I,
|
|
377
|
+
ref: Y,
|
|
378
|
+
value: O,
|
|
379
|
+
defaultValue: k,
|
|
380
|
+
currency: U,
|
|
381
|
+
currencies: ne,
|
|
382
|
+
onChange: re,
|
|
383
|
+
onCurrencyChange: ie,
|
|
384
|
+
invalid: J,
|
|
385
|
+
required: v,
|
|
386
|
+
"aria-required": v ? !0 : I["aria-required"],
|
|
387
|
+
strings: S,
|
|
388
|
+
className: C
|
|
389
|
+
}), de = !!(p || m || h || g || v);
|
|
390
|
+
return /* @__PURE__ */ P(c, {
|
|
391
|
+
gap: "sm",
|
|
392
|
+
className: r("money-input--component", T),
|
|
393
|
+
children: [/* @__PURE__ */ P(c, {
|
|
394
|
+
gap: "xs",
|
|
395
|
+
className: "money-input--field",
|
|
396
|
+
children: [de ? /* @__PURE__ */ N(_, {
|
|
397
|
+
label: p,
|
|
398
|
+
hint: m,
|
|
399
|
+
helperText: h,
|
|
400
|
+
error: g,
|
|
401
|
+
required: v,
|
|
402
|
+
children: ue
|
|
403
|
+
}) : ue, !!K && !g && /* @__PURE__ */ N(a, {
|
|
404
|
+
tag: "p",
|
|
405
|
+
size: "xs",
|
|
406
|
+
type: "secondary",
|
|
407
|
+
className: "money-input--original",
|
|
408
|
+
children: oe(z.originalValue, { value: K })
|
|
409
|
+
})]
|
|
410
|
+
}), !!q && ee && /* @__PURE__ */ P(u, {
|
|
411
|
+
tone: "warning",
|
|
412
|
+
className: "money-input--warning",
|
|
413
|
+
children: [/* @__PURE__ */ N(F, { "aria-hidden": "true" }), /* @__PURE__ */ N(l, { children: x ?? oe(z.conversionWarning, {
|
|
414
|
+
from: G ?? "",
|
|
415
|
+
to: U
|
|
416
|
+
}) })]
|
|
417
|
+
})]
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
ue.displayName = "MoneyInput";
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region src/components/base/forms-numeric/rounding-mode-select.tsx
|
|
423
|
+
var de = [
|
|
424
|
+
"floor",
|
|
425
|
+
"half_up",
|
|
426
|
+
"ceil"
|
|
427
|
+
], fe = {
|
|
428
|
+
floor: "Round down",
|
|
429
|
+
half_up: "Round half up",
|
|
430
|
+
ceil: "Round up"
|
|
431
|
+
}, pe = T(function(e, t) {
|
|
432
|
+
let n = Object.prototype.hasOwnProperty.call(e, "value"), { value: i, onValueChange: a, labels: o, placeholder: s, className: c, ...l } = e, u = A(() => de.map((e) => ({
|
|
433
|
+
value: e,
|
|
434
|
+
label: o?.[e] ?? fe[e] ?? e
|
|
435
|
+
})), [o]), d = D((e) => {
|
|
436
|
+
a?.(e);
|
|
437
|
+
}, [a]);
|
|
438
|
+
return /* @__PURE__ */ N(y, {
|
|
439
|
+
ref: t,
|
|
440
|
+
className: r("rounding-mode-select--component", c),
|
|
441
|
+
options: u,
|
|
442
|
+
...n ? { value: i } : {},
|
|
443
|
+
onValueChange: d,
|
|
444
|
+
placeholder: s,
|
|
445
|
+
...l
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
pe.displayName = "RoundingModeSelect";
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region src/components/base/forms-numeric/dimensions-input.tsx
|
|
451
|
+
var me = {
|
|
452
|
+
width: "Width",
|
|
453
|
+
height: "Height",
|
|
454
|
+
depth: "Depth",
|
|
455
|
+
unit: "Unit",
|
|
456
|
+
widthPlaceholder: "0.00",
|
|
457
|
+
heightPlaceholder: "0.00",
|
|
458
|
+
depthPlaceholder: "0.00"
|
|
459
|
+
}, he = [
|
|
460
|
+
{
|
|
461
|
+
value: "mm",
|
|
462
|
+
label: "mm"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
value: "cm",
|
|
466
|
+
label: "cm"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
value: "m",
|
|
470
|
+
label: "m"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
value: "in",
|
|
474
|
+
label: "in"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
value: "ft",
|
|
478
|
+
label: "ft"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
value: "px",
|
|
482
|
+
label: "px"
|
|
483
|
+
}
|
|
484
|
+
], ge = (e, t) => {
|
|
485
|
+
if (!e) return {
|
|
486
|
+
width: "",
|
|
487
|
+
height: "",
|
|
488
|
+
depth: ""
|
|
489
|
+
};
|
|
490
|
+
if (t === "string" && typeof e == "string") {
|
|
491
|
+
let t = e.split("x").map((e) => e.trim());
|
|
492
|
+
return {
|
|
493
|
+
width: t[0] || "",
|
|
494
|
+
height: t[1] || "",
|
|
495
|
+
depth: t[2] || ""
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
return t === "object" && typeof e == "object" ? {
|
|
499
|
+
width: e.width || "",
|
|
500
|
+
height: e.height || "",
|
|
501
|
+
depth: e.depth || ""
|
|
502
|
+
} : {
|
|
503
|
+
width: "",
|
|
504
|
+
height: "",
|
|
505
|
+
depth: ""
|
|
506
|
+
};
|
|
507
|
+
}, _e = (e, t, n, r) => r === "string" ? `${e}x${t}x${n}` : {
|
|
508
|
+
width: e,
|
|
509
|
+
height: t,
|
|
510
|
+
depth: n
|
|
511
|
+
}, ve = w.forwardRef(function({ value: t, defaultValue: o, format: s = "string", unit: l, defaultUnit: u = "cm", widthLabel: m, heightLabel: h, depthLabel: g, unitLabel: _, unitPlaceholder: y, widthPlaceholder: w, heightPlaceholder: T, depthPlaceholder: E, onChange: A, onUnitChange: j, decimalPlaces: F = 2, min: I = 0, max: L, showUnitSelector: R = !0, disableUnitSelector: z = !1, layout: B = "horizontal", invalid: V, disabled: H = !1, className: U, size: W, strings: ne }, G) {
|
|
512
|
+
let { defaultScale: q } = e(), J = p(W, q), Y = n(me, ne), re = m ?? Y.width, ie = h ?? Y.height, X = g ?? Y.depth, ae = y ?? Y.unit, oe = w ?? Y.widthPlaceholder, se = T ?? Y.heightPlaceholder, ce = E ?? Y.depthPlaceholder, le = B === "horizontal", Z = B === "vertical", ue = R === !0, de = (_ ?? "").length > 0, fe = Z ? re : "", pe = Z ? ie : "", ve = Z ? X : "", ye = k(), Q = {
|
|
513
|
+
width: `${ye}-width`,
|
|
514
|
+
height: `${ye}-height`,
|
|
515
|
+
depth: `${ye}-depth`,
|
|
516
|
+
unit: `${ye}-unit`
|
|
517
|
+
}, be = "leading-6", $ = t !== void 0, xe = l !== void 0, Se = ge($ ? t : o, s), [Ce, we] = M(Se.width), [Te, Ee] = M(Se.height), [De, Oe] = M(Se.depth), [ke, Ae] = M(l || u), je = ge(t, s), Me = $ ? je.width : Ce, Ne = $ ? je.height : Te, Pe = $ ? je.depth : De, Fe = xe ? l : ke;
|
|
518
|
+
O(() => {
|
|
519
|
+
if ($) {
|
|
520
|
+
let e = ge(t, s);
|
|
521
|
+
we(e.width), Ee(e.height), Oe(e.depth);
|
|
522
|
+
}
|
|
523
|
+
}, [
|
|
524
|
+
t,
|
|
525
|
+
s,
|
|
526
|
+
$
|
|
527
|
+
]);
|
|
528
|
+
let Ie = D((e, t) => {
|
|
529
|
+
let n = Me, r = Ne, i = Pe;
|
|
530
|
+
e === "width" && (n = t), e === "height" && (r = t), e === "depth" && (i = t), $ || (we(n), Ee(r), Oe(i));
|
|
531
|
+
let a = _e(n, r, i, s);
|
|
532
|
+
A?.({ target: { value: a } });
|
|
533
|
+
}, [
|
|
534
|
+
Me,
|
|
535
|
+
Ne,
|
|
536
|
+
Pe,
|
|
537
|
+
$,
|
|
538
|
+
s,
|
|
539
|
+
A
|
|
540
|
+
]), Le = D((e) => {
|
|
541
|
+
if (e === null) return;
|
|
542
|
+
let t = e;
|
|
543
|
+
xe || Ae(t), j?.(t);
|
|
544
|
+
}, [xe, j]), Re = /* @__PURE__ */ P(c, {
|
|
545
|
+
gap: "xs",
|
|
546
|
+
children: [!!de && Z && /* @__PURE__ */ N(i, {
|
|
547
|
+
htmlFor: Q.unit,
|
|
548
|
+
className: be,
|
|
549
|
+
children: _
|
|
550
|
+
}), /* @__PURE__ */ P(te, {
|
|
551
|
+
value: Fe,
|
|
552
|
+
onValueChange: (e) => Le(e),
|
|
553
|
+
disabled: H || z,
|
|
554
|
+
children: [/* @__PURE__ */ N(x, {
|
|
555
|
+
id: Q.unit,
|
|
556
|
+
"aria-label": _ ?? Y.unit,
|
|
557
|
+
"aria-invalid": V || void 0,
|
|
558
|
+
iconClassName: d.icon[J],
|
|
559
|
+
className: r(f(J), B === "vertical" ? "w-full" : "w-full @md/dimensions-input:w-32"),
|
|
560
|
+
children: /* @__PURE__ */ N(v, { placeholder: /* @__PURE__ */ N(a, {
|
|
561
|
+
tag: "span",
|
|
562
|
+
size: "inherit",
|
|
563
|
+
type: "secondary",
|
|
564
|
+
lineHeight: "tight",
|
|
565
|
+
className: "text-inherit",
|
|
566
|
+
children: ae
|
|
567
|
+
}) })
|
|
568
|
+
}), /* @__PURE__ */ N(S, { children: /* @__PURE__ */ N(b, { children: he.map((e) => /* @__PURE__ */ N(ee, {
|
|
569
|
+
value: e.value,
|
|
570
|
+
size: J,
|
|
571
|
+
children: /* @__PURE__ */ N(a, {
|
|
572
|
+
tag: "span",
|
|
573
|
+
size: "inherit",
|
|
574
|
+
lineHeight: "tight",
|
|
575
|
+
className: "text-inherit",
|
|
576
|
+
children: e.label
|
|
577
|
+
})
|
|
578
|
+
}, e.value)) }) })]
|
|
579
|
+
})]
|
|
580
|
+
});
|
|
581
|
+
return /* @__PURE__ */ N(c, {
|
|
582
|
+
ref: G,
|
|
583
|
+
gap: "md",
|
|
584
|
+
className: r("dimensions-input--component @container/dimensions-input", U),
|
|
585
|
+
children: /* @__PURE__ */ P(c, {
|
|
586
|
+
direction: B === "vertical" ? "vertical" : "horizontal",
|
|
587
|
+
gap: "md",
|
|
588
|
+
align: B === "vertical" ? "stretch" : "start",
|
|
589
|
+
className: "dimensions-input--fields",
|
|
590
|
+
children: [
|
|
591
|
+
/* @__PURE__ */ P(c, {
|
|
592
|
+
gap: "xs",
|
|
593
|
+
className: "min-w-0 flex-1",
|
|
594
|
+
children: [
|
|
595
|
+
!!Z && !!fe && /* @__PURE__ */ N(i, {
|
|
596
|
+
htmlFor: Q.width,
|
|
597
|
+
className: be,
|
|
598
|
+
children: fe
|
|
599
|
+
}),
|
|
600
|
+
/* @__PURE__ */ N(K, {
|
|
601
|
+
id: Q.width,
|
|
602
|
+
size: J,
|
|
603
|
+
value: Me,
|
|
604
|
+
onChange: (e) => Ie("width", e.target.value),
|
|
605
|
+
placeholder: oe,
|
|
606
|
+
decimalPlaces: F,
|
|
607
|
+
min: I,
|
|
608
|
+
max: L,
|
|
609
|
+
disabled: H,
|
|
610
|
+
invalid: V,
|
|
611
|
+
"aria-label": re
|
|
612
|
+
}),
|
|
613
|
+
!!le && /* @__PURE__ */ N(a, {
|
|
614
|
+
size: "xs",
|
|
615
|
+
type: "secondary",
|
|
616
|
+
className: "text-center",
|
|
617
|
+
children: re
|
|
618
|
+
})
|
|
619
|
+
]
|
|
620
|
+
}),
|
|
621
|
+
B === "horizontal" && /* @__PURE__ */ N("div", {
|
|
622
|
+
"aria-hidden": "true",
|
|
623
|
+
className: r("dimensions-input--separator flex items-center", C[J]),
|
|
624
|
+
children: /* @__PURE__ */ N(a, {
|
|
625
|
+
tag: "span",
|
|
626
|
+
type: "secondary",
|
|
627
|
+
children: "×"
|
|
628
|
+
})
|
|
629
|
+
}),
|
|
630
|
+
/* @__PURE__ */ P(c, {
|
|
631
|
+
gap: "xs",
|
|
632
|
+
className: "min-w-0 flex-1",
|
|
633
|
+
children: [
|
|
634
|
+
!!Z && !!pe && /* @__PURE__ */ N(i, {
|
|
635
|
+
htmlFor: Q.height,
|
|
636
|
+
className: be,
|
|
637
|
+
children: pe
|
|
638
|
+
}),
|
|
639
|
+
/* @__PURE__ */ N(K, {
|
|
640
|
+
id: Q.height,
|
|
641
|
+
size: J,
|
|
642
|
+
value: Ne,
|
|
643
|
+
onChange: (e) => Ie("height", e.target.value),
|
|
644
|
+
placeholder: se,
|
|
645
|
+
decimalPlaces: F,
|
|
646
|
+
min: I,
|
|
647
|
+
max: L,
|
|
648
|
+
disabled: H,
|
|
649
|
+
invalid: V,
|
|
650
|
+
"aria-label": ie
|
|
651
|
+
}),
|
|
652
|
+
!!le && /* @__PURE__ */ N(a, {
|
|
653
|
+
size: "xs",
|
|
654
|
+
type: "secondary",
|
|
655
|
+
className: "text-center",
|
|
656
|
+
children: ie
|
|
657
|
+
})
|
|
658
|
+
]
|
|
659
|
+
}),
|
|
660
|
+
B === "horizontal" && /* @__PURE__ */ N("div", {
|
|
661
|
+
"aria-hidden": "true",
|
|
662
|
+
className: r("dimensions-input--separator flex items-center", C[J]),
|
|
663
|
+
children: /* @__PURE__ */ N(a, {
|
|
664
|
+
tag: "span",
|
|
665
|
+
type: "secondary",
|
|
666
|
+
children: "×"
|
|
667
|
+
})
|
|
668
|
+
}),
|
|
669
|
+
/* @__PURE__ */ P(c, {
|
|
670
|
+
gap: "xs",
|
|
671
|
+
className: "min-w-0 flex-1",
|
|
672
|
+
children: [
|
|
673
|
+
!!Z && !!ve && /* @__PURE__ */ N(i, {
|
|
674
|
+
htmlFor: Q.depth,
|
|
675
|
+
className: be,
|
|
676
|
+
children: ve
|
|
677
|
+
}),
|
|
678
|
+
/* @__PURE__ */ N(K, {
|
|
679
|
+
id: Q.depth,
|
|
680
|
+
size: J,
|
|
681
|
+
value: Pe,
|
|
682
|
+
onChange: (e) => Ie("depth", e.target.value),
|
|
683
|
+
placeholder: ce,
|
|
684
|
+
decimalPlaces: F,
|
|
685
|
+
min: I,
|
|
686
|
+
max: L,
|
|
687
|
+
disabled: H,
|
|
688
|
+
invalid: V,
|
|
689
|
+
"aria-label": X
|
|
690
|
+
}),
|
|
691
|
+
!!le && /* @__PURE__ */ N(a, {
|
|
692
|
+
size: "xs",
|
|
693
|
+
type: "secondary",
|
|
694
|
+
className: "text-center",
|
|
695
|
+
children: X
|
|
696
|
+
})
|
|
697
|
+
]
|
|
698
|
+
}),
|
|
699
|
+
!!ue && /* @__PURE__ */ P(c, {
|
|
700
|
+
gap: "xs",
|
|
701
|
+
className: r("dimensions-input--unit", B === "vertical" ? "w-full" : "w-full basis-full pt-0 @md/dimensions-input:w-32 @md/dimensions-input:basis-32 @md/dimensions-input:shrink-0"),
|
|
702
|
+
children: [Re, !!le && /* @__PURE__ */ N(a, {
|
|
703
|
+
size: "xs",
|
|
704
|
+
type: "secondary",
|
|
705
|
+
className: "text-center",
|
|
706
|
+
children: de ? _ : ae
|
|
707
|
+
})]
|
|
708
|
+
})
|
|
709
|
+
]
|
|
710
|
+
})
|
|
711
|
+
});
|
|
712
|
+
});
|
|
713
|
+
ve.displayName = "DimensionsInput";
|
|
714
|
+
//#endregion
|
|
715
|
+
//#region src/components/base/forms-numeric/weight-input.tsx
|
|
716
|
+
var ye = {
|
|
717
|
+
unitLabel: "",
|
|
718
|
+
unitAriaLabel: "Unit",
|
|
719
|
+
unitPlaceholder: ""
|
|
720
|
+
}, Q = [
|
|
721
|
+
{
|
|
722
|
+
value: "g",
|
|
723
|
+
label: "g"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
value: "kg",
|
|
727
|
+
label: "kg"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
value: "lb",
|
|
731
|
+
label: "lb"
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
value: "oz",
|
|
735
|
+
label: "oz"
|
|
736
|
+
}
|
|
737
|
+
], be = w.forwardRef(function({ value: t, defaultValue: o, unit: s, defaultUnit: l = "g", onChange: u, onUnitChange: m, decimalPlaces: h = 2, min: g = 0, max: _, showUnitSelector: y = !0, disableUnitSelector: C = !1, unitWidth: w = "w-24", strings: T, invalid: E, disabled: O = !1, size: j, className: F }, I) {
|
|
738
|
+
let { defaultScale: L } = e(), R = p(j, L), z = n(ye, T), B = t !== void 0, V = s !== void 0, [H, U] = M(o ?? ""), [W, ne] = M(s ?? l), G = B ? t ?? "" : H, q = V ? s ?? l : W, J = D((e) => {
|
|
739
|
+
B || U(e.target.value), u?.({ target: { value: e.target.value } });
|
|
740
|
+
}, [B, u]), Y = D((e) => {
|
|
741
|
+
if (e === null) return;
|
|
742
|
+
let t = e;
|
|
743
|
+
V || ne(t), m?.(t);
|
|
744
|
+
}, [V, m]), re = A(() => Q, []), ie = z.unitLabel !== "", X = k();
|
|
745
|
+
return /* @__PURE__ */ P("div", {
|
|
746
|
+
ref: I,
|
|
747
|
+
className: r("weight-input--component", "flex items-end gap-space-md", F),
|
|
748
|
+
children: [/* @__PURE__ */ N("div", {
|
|
749
|
+
className: "flex-1",
|
|
750
|
+
children: /* @__PURE__ */ N(K, {
|
|
751
|
+
size: R,
|
|
752
|
+
value: G,
|
|
753
|
+
onChange: J,
|
|
754
|
+
decimalPlaces: h,
|
|
755
|
+
allowNegative: !1,
|
|
756
|
+
min: g,
|
|
757
|
+
max: _,
|
|
758
|
+
disabled: O,
|
|
759
|
+
invalid: E
|
|
760
|
+
})
|
|
761
|
+
}), !!y && /* @__PURE__ */ P(c, {
|
|
762
|
+
gap: "xs",
|
|
763
|
+
children: [!!ie && /* @__PURE__ */ N(i, {
|
|
764
|
+
htmlFor: X,
|
|
765
|
+
className: "leading-6",
|
|
766
|
+
children: z.unitLabel
|
|
767
|
+
}), /* @__PURE__ */ P(te, {
|
|
768
|
+
value: q,
|
|
769
|
+
onValueChange: (e) => Y(e),
|
|
770
|
+
disabled: O || C,
|
|
771
|
+
children: [/* @__PURE__ */ N(x, {
|
|
772
|
+
id: X,
|
|
773
|
+
"aria-label": z.unitLabel || z.unitAriaLabel,
|
|
774
|
+
"aria-invalid": E || void 0,
|
|
775
|
+
iconClassName: d.icon[R],
|
|
776
|
+
className: r(f(R), w),
|
|
777
|
+
children: /* @__PURE__ */ N(v, { placeholder: z.unitPlaceholder ? /* @__PURE__ */ N(a, {
|
|
778
|
+
tag: "span",
|
|
779
|
+
size: "inherit",
|
|
780
|
+
type: "secondary",
|
|
781
|
+
lineHeight: "tight",
|
|
782
|
+
className: "text-inherit",
|
|
783
|
+
children: z.unitPlaceholder
|
|
784
|
+
}) : void 0 })
|
|
785
|
+
}), /* @__PURE__ */ N(S, { children: /* @__PURE__ */ N(b, { children: re.map((e) => /* @__PURE__ */ N(ee, {
|
|
786
|
+
value: e.value,
|
|
787
|
+
size: R,
|
|
788
|
+
children: /* @__PURE__ */ N(a, {
|
|
789
|
+
tag: "span",
|
|
790
|
+
size: "inherit",
|
|
791
|
+
lineHeight: "tight",
|
|
792
|
+
className: "text-inherit",
|
|
793
|
+
children: e.label
|
|
794
|
+
})
|
|
795
|
+
}, e.value)) }) })]
|
|
796
|
+
})]
|
|
797
|
+
})]
|
|
798
|
+
});
|
|
799
|
+
});
|
|
800
|
+
be.displayName = "WeightInput";
|
|
801
|
+
//#endregion
|
|
802
|
+
//#region src/components/base/forms-numeric/coordinates-input.tsx
|
|
803
|
+
var $ = {
|
|
804
|
+
latLabel: "",
|
|
805
|
+
lngLabel: "",
|
|
806
|
+
latPlaceholder: "",
|
|
807
|
+
lngPlaceholder: "",
|
|
808
|
+
previewLinkLabel: ""
|
|
809
|
+
}, xe = (e, t) => {
|
|
810
|
+
if (!e) return {
|
|
811
|
+
lat: "",
|
|
812
|
+
lng: ""
|
|
813
|
+
};
|
|
814
|
+
if (t === "string" && typeof e == "string") {
|
|
815
|
+
let [t, n] = e.split(",").map((e) => e.trim());
|
|
816
|
+
return {
|
|
817
|
+
lat: t ?? "",
|
|
818
|
+
lng: n ?? ""
|
|
819
|
+
};
|
|
820
|
+
}
|
|
821
|
+
return t === "object" && typeof e == "object" ? {
|
|
822
|
+
lat: e.lat ?? "",
|
|
823
|
+
lng: e.lng ?? ""
|
|
824
|
+
} : {
|
|
825
|
+
lat: "",
|
|
826
|
+
lng: ""
|
|
827
|
+
};
|
|
828
|
+
}, Se = (e, t, n) => n === "string" ? `${e},${t}` : {
|
|
829
|
+
lat: e,
|
|
830
|
+
lng: t
|
|
831
|
+
}, Ce = (e, t, n) => {
|
|
832
|
+
if (!e) return !1;
|
|
833
|
+
let r = Number(e);
|
|
834
|
+
return Number.isFinite(r) && r >= t && r <= n;
|
|
835
|
+
}, we = w.forwardRef(function({ value: e, defaultValue: t, format: i = "object", onChange: a, decimalPlaces: l = 6, showPreviewLink: u = !0, strings: d, invalid: f, className: p, disabled: m, size: h }, g) {
|
|
836
|
+
let v = n($, d), y = e !== void 0, b = xe(y ? e : t, i), [ee, x] = M(b.lat), [te, S] = M(b.lng), C = xe(e, i), w = y ? C.lat : ee, T = y ? C.lng : te;
|
|
837
|
+
O(() => {
|
|
838
|
+
y && (x(C.lat), S(C.lng));
|
|
839
|
+
}, [
|
|
840
|
+
y,
|
|
841
|
+
C.lat,
|
|
842
|
+
C.lng
|
|
843
|
+
]);
|
|
844
|
+
let E = D((e, t) => {
|
|
845
|
+
y || (x(e), S(t)), a?.({ target: { value: Se(e, t, i) } });
|
|
846
|
+
}, [
|
|
847
|
+
y,
|
|
848
|
+
a,
|
|
849
|
+
i
|
|
850
|
+
]), k = A(() => {
|
|
851
|
+
let e = Ce(w, -90, 90), t = Ce(T, -180, 180);
|
|
852
|
+
return !e || !t ? null : `https://www.google.com/maps?q=${encodeURIComponent(`${w},${T}`)}`;
|
|
853
|
+
}, [w, T]);
|
|
854
|
+
return /* @__PURE__ */ P(c, {
|
|
855
|
+
ref: g,
|
|
856
|
+
gap: "lg",
|
|
857
|
+
className: r("coordinates-input--component", p),
|
|
858
|
+
children: [/* @__PURE__ */ P(s, {
|
|
859
|
+
columns: {
|
|
860
|
+
base: 1,
|
|
861
|
+
md: 2
|
|
862
|
+
},
|
|
863
|
+
gap: "lg",
|
|
864
|
+
children: [/* @__PURE__ */ N(_, {
|
|
865
|
+
label: v.latLabel || void 0,
|
|
866
|
+
children: /* @__PURE__ */ N(K, {
|
|
867
|
+
placeholder: v.latPlaceholder || void 0,
|
|
868
|
+
value: w,
|
|
869
|
+
onChange: (e) => E(e.target.value, T),
|
|
870
|
+
decimalPlaces: l,
|
|
871
|
+
allowNegative: !0,
|
|
872
|
+
min: -90,
|
|
873
|
+
max: 90,
|
|
874
|
+
invalid: f,
|
|
875
|
+
disabled: m,
|
|
876
|
+
size: h
|
|
877
|
+
})
|
|
878
|
+
}), /* @__PURE__ */ N(_, {
|
|
879
|
+
label: v.lngLabel || void 0,
|
|
880
|
+
children: /* @__PURE__ */ N(K, {
|
|
881
|
+
placeholder: v.lngPlaceholder || void 0,
|
|
882
|
+
value: T,
|
|
883
|
+
onChange: (e) => E(w, e.target.value),
|
|
884
|
+
decimalPlaces: l,
|
|
885
|
+
allowNegative: !0,
|
|
886
|
+
min: -180,
|
|
887
|
+
max: 180,
|
|
888
|
+
invalid: f,
|
|
889
|
+
disabled: m,
|
|
890
|
+
size: h
|
|
891
|
+
})
|
|
892
|
+
})]
|
|
893
|
+
}), !!u && !!k && !!v.previewLinkLabel && /* @__PURE__ */ N(o, {
|
|
894
|
+
href: k,
|
|
895
|
+
type: "secondary",
|
|
896
|
+
underline: !1,
|
|
897
|
+
children: v.previewLinkLabel
|
|
898
|
+
})]
|
|
899
|
+
});
|
|
900
|
+
});
|
|
901
|
+
we.displayName = "CoordinatesInput";
|
|
902
|
+
//#endregion
|
|
903
|
+
export { pe as a, X as c, K as d, ve as i, J as l, be as n, ue as o, ye as r, ae as s, we as t, q as u };
|
|
904
|
+
|
|
905
|
+
//# sourceMappingURL=forms-numeric-D3CO60IF.js.map
|