themelia-react-ui 2.0.5 → 2.0.6
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 +76 -0
- package/MIGRATION.md +119 -0
- package/README.md +13 -6
- package/dist/{accordion-B9MHG0cT.js → accordion-0tQUZ20r.js} +7 -7
- package/dist/accordion-0tQUZ20r.js.map +1 -0
- package/dist/{action-menu-Dr8K-ghE.js → action-menu-C0gjzLyE.js} +7 -7
- package/dist/{action-menu-Dr8K-ghE.js.map → action-menu-C0gjzLyE.js.map} +1 -1
- package/dist/{ai-artifact-C58tQcBy.js → ai-artifact-CGGpQryR.js} +172 -157
- package/dist/ai-artifact-CGGpQryR.js.map +1 -0
- package/dist/{app-shell-B_IuNWOo.js → app-shell-EHuuRDGy.js} +5 -5
- package/dist/{app-shell-B_IuNWOo.js.map → app-shell-EHuuRDGy.js.map} +1 -1
- package/dist/{attachment-Dg_69lPS.js → attachment-BCpA4e7i.js} +8 -8
- package/dist/{attachment-Dg_69lPS.js.map → attachment-BCpA4e7i.js.map} +1 -1
- package/dist/{auth-DTkkshS8.js → auth-B0girIk_.js} +15 -15
- package/dist/auth-B0girIk_.js.map +1 -0
- package/dist/{avatar-CeZaFmNH.js → avatar-B9Jnp-T-.js} +3 -3
- package/dist/{avatar-CeZaFmNH.js.map → avatar-B9Jnp-T-.js.map} +1 -1
- package/dist/{badge-xIiV_E7f.js → badge-wWauMgAt.js} +3 -3
- package/dist/{badge-xIiV_E7f.js.map → badge-wWauMgAt.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +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 +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +8 -8
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +195 -188
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +7 -7
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +5 -5
- package/dist/base/spinner.js.map +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 +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/{batch-action-bar-Cb8cuvyy.js → batch-action-bar-BoqWIIpV.js} +5 -5
- package/dist/{batch-action-bar-Cb8cuvyy.js.map → batch-action-bar-BoqWIIpV.js.map} +1 -1
- package/dist/blocks/admin.js +17 -17
- package/dist/blocks/ai.js +227 -221
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +424 -449
- 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 +225 -220
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-J-K2kl4c.js → breadcrumbs-Bp9Ke7kd.js} +4 -4
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
- package/dist/{button-S2Cubiiz.js → button-ChBovTx0.js} +2 -2
- package/dist/{button-S2Cubiiz.js.map → button-ChBovTx0.js.map} +1 -1
- package/dist/{buttons-BedGfygC.js → buttons-DeW0bQeK.js} +6 -6
- package/dist/{buttons-BedGfygC.js.map → buttons-DeW0bQeK.js.map} +1 -1
- package/dist/{cards-rNX1M4Xn.js → cards-CNXnmvV5.js} +8 -8
- package/dist/{cards-rNX1M4Xn.js.map → cards-CNXnmvV5.js.map} +1 -1
- package/dist/{cascader-B1MiqkBq.js → cascader-CrAl9zD5.js} +15 -15
- package/dist/{cascader-B1MiqkBq.js.map → cascader-CrAl9zD5.js.map} +1 -1
- package/dist/{chart-Darg_0Kv.js → chart-I7ROnsl8.js} +5 -5
- package/dist/{chart-Darg_0Kv.js.map → chart-I7ROnsl8.js.map} +1 -1
- package/dist/{checkbox-fflqmODR.js → checkbox-MoyHIAPs.js} +3 -3
- package/dist/{checkbox-fflqmODR.js.map → checkbox-MoyHIAPs.js.map} +1 -1
- package/dist/{choice-inputs-zUgBZfE4.js → choice-inputs-DHGtx0QV.js} +122 -110
- package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
- package/dist/{code-block-BzmM9Eig.js → code-block-BSJyq9e-.js} +7 -7
- package/dist/{code-block-BzmM9Eig.js.map → code-block-BSJyq9e-.js.map} +1 -1
- package/dist/{collapsible-BkAI_XD4.js → collapsible-BzJ91LUG.js} +3 -3
- package/dist/{collapsible-BkAI_XD4.js.map → collapsible-BzJ91LUG.js.map} +1 -1
- package/dist/{collection-content-gDh1v6O4.js → collection-content-CSnwtOTH.js} +3 -3
- package/dist/{collection-content-gDh1v6O4.js.map → collection-content-CSnwtOTH.js.map} +1 -1
- package/dist/{combobox-BEx0vJgF.js → combobox-Bcvu5J8O.js} +11 -10
- package/dist/{combobox-BEx0vJgF.js.map → combobox-Bcvu5J8O.js.map} +1 -1
- package/dist/combobox-C2JiSQPc.js +915 -0
- package/dist/combobox-C2JiSQPc.js.map +1 -0
- package/dist/{command-CrlPIL6m.js → command-9e52NPgK.js} +6 -6
- package/dist/{command-CrlPIL6m.js.map → command-9e52NPgK.js.map} +1 -1
- package/dist/{comments-Dmpp0YIc.js → comments-BsgErEqd.js} +33 -28
- package/dist/comments-BsgErEqd.js.map +1 -0
- package/dist/components/base/choice-inputs/choice-types.d.ts +4 -0
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
- package/dist/components/base/combobox/combobox-field.d.ts +2 -2
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
- package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
- package/dist/components/base/feedback/state-display.d.ts +5 -1
- package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
- package/dist/components/base/forms/form-field.d.ts +7 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
- package/dist/components/base/navigation/language-switcher.d.ts +12 -4
- package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
- package/dist/components/base/sidebar/sidebar.d.ts +2 -0
- package/dist/components/base/upload/avatar-upload.d.ts +2 -1
- package/dist/components/base/upload/image-upload.d.ts +2 -1
- package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +2 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
- package/dist/components/blocks/analytics/types.d.ts +2 -2
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
- package/dist/components/features/activities/activities.types.d.ts +18 -11
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
- package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
- package/dist/components/features/combobox/combobox.d.ts +2 -2
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
- package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
- package/dist/components/features/combobox/types.d.ts +37 -8
- package/dist/components/features/email-composer/types.d.ts +3 -1
- package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
- package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -3
- package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +4 -2
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/utils/filter-utils.d.ts +5 -1
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +6 -0
- package/dist/components/features/media-library/media-library.types.d.ts +36 -8
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
- package/dist/components/features/products/products.types.d.ts +2 -2
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +1 -1
- package/dist/components/features/resource/resource.types.d.ts +2 -0
- package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
- package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -0
- package/dist/components/features/table/table-body.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +6 -3
- package/dist/components/features/table/table.strings.d.ts +3 -0
- package/dist/components/features/table/table.types.d.ts +17 -1
- package/dist/components/layout/header/header.types.d.ts +3 -2
- package/dist/components/layout/layout.types.d.ts +5 -3
- package/dist/components/layout/navigation/side-nav.d.ts +3 -2
- package/dist/components/layout/normalize-layout-path.d.ts +1 -0
- package/dist/components/layout/settings/settings.d.ts +1 -1
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +3 -1
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.types.d.ts +2 -0
- package/dist/components/primitives/link.d.ts +3 -2
- package/dist/components/primitives/money.d.ts +1 -1
- package/dist/components/primitives/number.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
- package/dist/{containers-CIxwbZt5.js → containers-CSdc32h9.js} +2 -2
- package/dist/{containers-CIxwbZt5.js.map → containers-CSdc32h9.js.map} +1 -1
- package/dist/{copyable-DIznBqiT.js → copyable-3fdHfMR3.js} +4 -4
- package/dist/{copyable-DIznBqiT.js.map → copyable-3fdHfMR3.js.map} +1 -1
- package/dist/{data-display-BdgCAw8T.js → data-display-Cmj-xZYl.js} +16 -15
- package/dist/data-display-Cmj-xZYl.js.map +1 -0
- package/dist/{date-Cq8ioE4o.js → date-Br0FicVv.js} +4 -4
- package/dist/{date-Cq8ioE4o.js.map → date-Br0FicVv.js.map} +1 -1
- package/dist/date-picker-CyQlFYsP.js +1617 -0
- package/dist/date-picker-CyQlFYsP.js.map +1 -0
- package/dist/date-pickers-tj2MXmXd.js +185 -0
- package/dist/date-pickers-tj2MXmXd.js.map +1 -0
- package/dist/{display-KsZLw9Ov.js → display-CT_N2a3w.js} +7 -7
- package/dist/{display-KsZLw9Ov.js.map → display-CT_N2a3w.js.map} +1 -1
- package/dist/{dropdown-menu-CLs8Lihj.js → dropdown-menu-C08iIugv.js} +6 -6
- package/dist/{dropdown-menu-CLs8Lihj.js.map → dropdown-menu-C08iIugv.js.map} +1 -1
- package/dist/features/activities.js +283 -270
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +40 -27
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +126 -126
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- 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 +24 -19
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +129 -125
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +16 -20
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +18 -28
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +331 -314
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1044 -866
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +2 -2
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +978 -964
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +159 -152
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +74 -71
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +28 -19
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +297 -256
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +57 -50
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +400 -399
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-Dzo1xtAU.js +246 -0
- package/dist/feedback-Dzo1xtAU.js.map +1 -0
- package/dist/{field-affordance-recipes-DWcNcOjh.js → field-affordance-recipes-D6H7tVJi.js} +2 -2
- package/dist/{field-affordance-recipes-DWcNcOjh.js.map → field-affordance-recipes-D6H7tVJi.js.map} +1 -1
- package/dist/field-control-attributes-B6i335wr.js +18 -0
- package/dist/field-control-attributes-B6i335wr.js.map +1 -0
- package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
- package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
- package/dist/{filters-DzgSJpMK.js → filters-Dl80yYtN.js} +763 -605
- package/dist/filters-Dl80yYtN.js.map +1 -0
- package/dist/form-field-CAPdwdnZ.js +74 -0
- package/dist/form-field-CAPdwdnZ.js.map +1 -0
- package/dist/{form-sizing-Bs2qFUeE.js → form-sizing-CgcrUbLU.js} +2 -2
- package/dist/{form-sizing-Bs2qFUeE.js.map → form-sizing-CgcrUbLU.js.map} +1 -1
- package/dist/{forms-C0RGnJTe.js → forms-B3W8CH7-.js} +8 -8
- package/dist/{forms-C0RGnJTe.js.map → forms-B3W8CH7-.js.map} +1 -1
- package/dist/forms-numeric-CwjQJe-O.js +991 -0
- package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
- package/dist/{header-DMMxG__r.js → header-ZIIsRKxP.js} +113 -113
- package/dist/header-ZIIsRKxP.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-DB6CJ4MR.js → hooks-BitHSh-Y.js} +3 -3
- package/dist/{hooks-DB6CJ4MR.js.map → hooks-BitHSh-Y.js.map} +1 -1
- package/dist/{icon-badge-DZF-YjQp.js → icon-badge-npxF1SLX.js} +2 -2
- package/dist/{icon-badge-DZF-YjQp.js.map → icon-badge-npxF1SLX.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{input-CvyDQlY7.js → input-7KAc7XQL.js} +6 -6
- package/dist/{input-CvyDQlY7.js.map → input-7KAc7XQL.js.map} +1 -1
- package/dist/{input-DMBwAZmr.js → input-DIREVYHs.js} +3 -3
- package/dist/{input-DMBwAZmr.js.map → input-DIREVYHs.js.map} +1 -1
- package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
- package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
- package/dist/{item-DjCcM18E.js → item-FfWnaYST.js} +99 -98
- package/dist/item-FfWnaYST.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 +11 -11
- package/dist/layout.types-E_GAApzO.js +30 -0
- package/dist/layout.types-E_GAApzO.js.map +1 -0
- package/dist/lib/field-control-attributes.d.ts +11 -0
- package/dist/lib/field-state-recipes.d.ts +2 -0
- package/dist/lib/format.d.ts +1 -0
- package/dist/lib/surface-recipes.d.ts +1 -1
- package/dist/lib/token-merge.generated.d.ts +6 -6
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-C-vChPmE.js → media-gallery-C81DAnKI.js} +6 -6
- package/dist/{media-gallery-C-vChPmE.js.map → media-gallery-C81DAnKI.js.map} +1 -1
- package/dist/{mentions-0_4nWuI-.js → mentions-qOnedSt4.js} +236 -167
- package/dist/mentions-qOnedSt4.js.map +1 -0
- package/dist/message-BJHnn43M.js +135 -0
- package/dist/message-BJHnn43M.js.map +1 -0
- package/dist/{metadata-list-C3MkU-Om.js → metadata-list-XkqZ_UXH.js} +11 -11
- package/dist/{metadata-list-C3MkU-Om.js.map → metadata-list-XkqZ_UXH.js.map} +1 -1
- package/dist/{navigation-DaRjthVk.js → navigation-BgtPJAhi.js} +119 -119
- package/dist/navigation-BgtPJAhi.js.map +1 -0
- package/dist/{navigation-C90-oQFq.js → navigation-Bt-v7rWP.js} +52 -46
- package/dist/navigation-Bt-v7rWP.js.map +1 -0
- package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
- package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
- package/dist/{number-CRU3kGuk.js → number-CYqBcrSj.js} +78 -86
- package/dist/number-CYqBcrSj.js.map +1 -0
- package/dist/{overflow-tab-bar-IVFVQFV6.js → overflow-tab-bar-BQCA2Zn2.js} +7 -7
- package/dist/{overflow-tab-bar-IVFVQFV6.js.map → overflow-tab-bar-BQCA2Zn2.js.map} +1 -1
- package/dist/{overlays-BSgCtM2v.js → overlays-CC8zI3Du.js} +264 -260
- package/dist/overlays-CC8zI3Du.js.map +1 -0
- package/dist/{page-DUUKDAjo.js → page-BoQ1VaFJ.js} +13 -13
- package/dist/{page-DUUKDAjo.js.map → page-BoQ1VaFJ.js.map} +1 -1
- package/dist/{page-header-commands-7P3sfE9u.js → page-header-commands-DIKspJfx.js} +4 -4
- package/dist/{page-header-commands-7P3sfE9u.js.map → page-header-commands-DIKspJfx.js.map} +1 -1
- package/dist/{pagination-CgCjElfu.js → pagination-Br8TdV9A.js} +4 -4
- package/dist/{pagination-CgCjElfu.js.map → pagination-Br8TdV9A.js.map} +1 -1
- package/dist/{popover-B85RenIl.js → popover-k8TdUcAt.js} +10 -10
- package/dist/popover-k8TdUcAt.js.map +1 -0
- package/dist/{popover-menu-DlnQ2zlR.js → popover-menu-yn-o0kyA.js} +7 -7
- package/dist/{popover-menu-DlnQ2zlR.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
- package/dist/{popover.recipes-DdiEp0rd.js → popover.recipes-DJ0AkUan.js} +2 -2
- package/dist/{popover.recipes-DdiEp0rd.js.map → popover.recipes-DJ0AkUan.js.map} +1 -1
- package/dist/{portal-recipes-BpsV_iRw.js → portal-recipes-DyUXqUtD.js} +2 -2
- package/dist/{portal-recipes-BpsV_iRw.js.map → portal-recipes-DyUXqUtD.js.map} +1 -1
- package/dist/{primitives-ByWgGUgt.js → primitives-BkkQjYl7.js} +22 -17
- package/dist/primitives-BkkQjYl7.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-BJhQP9WX.js → progress-DZFXXzPs.js} +4 -4
- package/dist/{progress-BJhQP9WX.js.map → progress-DZFXXzPs.js.map} +1 -1
- package/dist/{receipt-tOc7B3hw.js → receipt-C7LhOg7Q.js} +6 -6
- package/dist/{receipt-tOc7B3hw.js.map → receipt-C7LhOg7Q.js.map} +1 -1
- package/dist/rich-text-BnTzZjIo.js +45 -0
- package/dist/rich-text-BnTzZjIo.js.map +1 -0
- package/dist/rich-text-editor-CAurDwT5.js +1273 -0
- package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-laT3tpBT.js → rich-text-editor-toolbar-DbXig7Jk.js} +36 -35
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
- package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
- package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
- package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
- package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
- package/dist/{scroll-area-B0dB2cBi.js → scroll-area-Bj6CRUif.js} +2 -2
- package/dist/{scroll-area-B0dB2cBi.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
- package/dist/{separator-Bb17I4pu.js → separator-B9ewiCGO.js} +2 -2
- package/dist/{separator-Bb17I4pu.js.map → separator-B9ewiCGO.js.map} +1 -1
- package/dist/{separator-Ct_WSWTJ.js → separator-DM6gs2vu.js} +3 -3
- package/dist/{separator-Ct_WSWTJ.js.map → separator-DM6gs2vu.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-DZPHgpx4.js +155 -0
- package/dist/settings-DZPHgpx4.js.map +1 -0
- package/dist/{sheet-BGPERY55.js → sheet-C4DHsgLk.js} +6 -6
- package/dist/{sheet-BGPERY55.js.map → sheet-C4DHsgLk.js.map} +1 -1
- package/dist/sidebar-C8BnDwTH.js +709 -0
- package/dist/sidebar-C8BnDwTH.js.map +1 -0
- package/dist/{sidebar-f9gRWXIR.js → sidebar-CmD6a-HK.js} +16 -13
- package/dist/sidebar-CmD6a-HK.js.map +1 -0
- package/dist/{skeleton-BapcJd9C.js → skeleton-DDgdhmu9.js} +5 -5
- package/dist/{skeleton-BapcJd9C.js.map → skeleton-DDgdhmu9.js.map} +1 -1
- package/dist/{smart-card-CW0hjetE.js → smart-card-B6vLxqa_.js} +8 -8
- package/dist/{smart-card-CW0hjetE.js.map → smart-card-B6vLxqa_.js.map} +1 -1
- package/dist/{structure-DuxKl954.js → structure-DZJ2wbAU.js} +2 -2
- package/dist/{structure-DuxKl954.js.map → structure-DZJ2wbAU.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
- package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
- package/dist/{table-CFOWY9pQ.js → table-CBonSdTp.js} +534 -486
- package/dist/table-CBonSdTp.js.map +1 -0
- package/dist/{table-B4TE7iOV.js → table-CXSPHH25.js} +75 -71
- package/dist/table-CXSPHH25.js.map +1 -0
- package/dist/{tabs-e7ko9S2o.js → tabs-C4Kr_hCr.js} +50 -49
- package/dist/tabs-C4Kr_hCr.js.map +1 -0
- package/dist/{text-inputs-B1culiSK.js → text-inputs-jdkS3ReG.js} +9 -9
- package/dist/{text-inputs-B1culiSK.js.map → text-inputs-jdkS3ReG.js.map} +1 -1
- package/dist/{timelines-D3Sl9ueq.js → timelines-CoPwdJP0.js} +10 -10
- package/dist/{timelines-D3Sl9ueq.js.map → timelines-CoPwdJP0.js.map} +1 -1
- package/dist/{tooltip-8wz5S_Zr.js → tooltip-31NwIpTo.js} +4 -4
- package/dist/{tooltip-8wz5S_Zr.js.map → tooltip-31NwIpTo.js.map} +1 -1
- package/dist/{tree-CzUJHnFs.js → tree-CeYVzdFE.js} +6 -6
- package/dist/{tree-CzUJHnFs.js.map → tree-CeYVzdFE.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-BQnine1k.js → typography-C7-YMW1S.js} +2 -2
- package/dist/{typography-BQnine1k.js.map → typography-C7-YMW1S.js.map} +1 -1
- package/dist/typography.js +1 -1
- package/dist/{upload-BOW6U2tI.js → upload-Hdm5gObf.js} +303 -291
- package/dist/upload-Hdm5gObf.js.map +1 -0
- package/dist/{upload-queue-qUXn1ykN.js → upload-queue-D0sYPuqo.js} +8 -8
- package/dist/{upload-queue-qUXn1ykN.js.map → upload-queue-D0sYPuqo.js.map} +1 -1
- package/dist/{usage-card-BeSLY0i0.js → usage-card-9s8hLDfn.js} +9 -9
- package/dist/{usage-card-BeSLY0i0.js.map → usage-card-9s8hLDfn.js.map} +1 -1
- package/dist/{utils-B6kKb8jB.js → utils-DhuoqFy4.js} +31 -37
- package/dist/utils-DhuoqFy4.js.map +1 -0
- package/dist/{value-inputs-skdVB2zh.js → value-inputs-D3aPgq9H.js} +15 -15
- package/dist/{value-inputs-skdVB2zh.js.map → value-inputs-D3aPgq9H.js.map} +1 -1
- package/dist/{value-typography-uAmWUAL1.js → value-typography-uSzzG9Gf.js} +32 -26
- package/dist/value-typography-uSzzG9Gf.js.map +1 -0
- package/dist/{workspace-DHeHv0qw.js → workspace-CC8Vchiu.js} +12 -12
- package/dist/{workspace-DHeHv0qw.js.map → workspace-CC8Vchiu.js.map} +1 -1
- package/docs/consumer-skill/examples/edit.tsx +3 -3
- package/docs/consumer-skill/references/agents-md.md +19 -19
- package/docs/consumer-skill/references/analytics.md +15 -0
- package/docs/consumer-skill/references/component-contracts.json +14724 -13057
- package/docs/consumer-skill/references/composition.md +21 -4
- package/docs/consumer-skill/references/design-contract.md +1 -0
- package/docs/consumer-skill/references/installation.md +51 -8
- package/docs/consumer-skill/references/integration.md +24 -1
- package/docs/consumer-skill/references/public-api.json +172 -34
- package/docs/consumer-skill/references/review.md +51 -11
- package/docs/consumer-skill/references/rhf-workflows.md +72 -0
- package/docs/consumer-skill/references/theming.md +7 -2
- package/docs/consumer-skill/references/tokens.json +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +144 -30
- package/docs/consumer-skill/scripts/setup-skills.mjs +46 -9
- package/package.json +4 -2
- package/templates/admin-shell-template.tsx +1 -2
- package/templates/customers-template.tsx +18 -16
- package/dist/accordion-B9MHG0cT.js.map +0 -1
- package/dist/ai-artifact-C58tQcBy.js.map +0 -1
- package/dist/auth-DTkkshS8.js.map +0 -1
- package/dist/breadcrumbs-J-K2kl4c.js.map +0 -1
- package/dist/choice-inputs-zUgBZfE4.js.map +0 -1
- package/dist/combobox-BwzoXFSG.js +0 -884
- package/dist/combobox-BwzoXFSG.js.map +0 -1
- package/dist/comments-Dmpp0YIc.js.map +0 -1
- package/dist/data-display-BdgCAw8T.js.map +0 -1
- package/dist/date-picker-RlIzKom_.js +0 -1551
- package/dist/date-picker-RlIzKom_.js.map +0 -1
- package/dist/date-pickers-DY-CpXS1.js +0 -179
- package/dist/date-pickers-DY-CpXS1.js.map +0 -1
- package/dist/feedback-Dm4izqFn.js +0 -240
- package/dist/feedback-Dm4izqFn.js.map +0 -1
- package/dist/filters-DzgSJpMK.js.map +0 -1
- package/dist/form-field-BriWAXyg.js +0 -63
- package/dist/form-field-BriWAXyg.js.map +0 -1
- package/dist/forms-numeric-DIhghX1Q.js +0 -910
- package/dist/forms-numeric-DIhghX1Q.js.map +0 -1
- package/dist/header-DMMxG__r.js.map +0 -1
- package/dist/item-DjCcM18E.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/mentions-0_4nWuI-.js.map +0 -1
- package/dist/message-g8p7eVtN.js +0 -128
- package/dist/message-g8p7eVtN.js.map +0 -1
- package/dist/navigation-C90-oQFq.js.map +0 -1
- package/dist/navigation-DaRjthVk.js.map +0 -1
- package/dist/number-CRU3kGuk.js.map +0 -1
- package/dist/overlays-BSgCtM2v.js.map +0 -1
- package/dist/popover-B85RenIl.js.map +0 -1
- package/dist/primitives-ByWgGUgt.js.map +0 -1
- package/dist/rich-text-Dth5E882.js +0 -78
- package/dist/rich-text-Dth5E882.js.map +0 -1
- package/dist/rich-text-editor-C1fOjBTd.js +0 -1195
- package/dist/rich-text-editor-C1fOjBTd.js.map +0 -1
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +0 -1
- package/dist/safe-image-src-C6kQSMBZ.js +0 -17
- package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
- package/dist/sanitize-html-DsQmI48u.js.map +0 -1
- package/dist/settings-Bar5wiSo.js +0 -167
- package/dist/settings-Bar5wiSo.js.map +0 -1
- package/dist/sidebar-D-JYMMbY.js +0 -686
- package/dist/sidebar-D-JYMMbY.js.map +0 -1
- package/dist/sidebar-f9gRWXIR.js.map +0 -1
- package/dist/table-B4TE7iOV.js.map +0 -1
- package/dist/table-CFOWY9pQ.js.map +0 -1
- package/dist/tabs-e7ko9S2o.js.map +0 -1
- package/dist/upload-BOW6U2tI.js.map +0 -1
- package/dist/utils-B6kKb8jB.js.map +0 -1
- package/dist/value-typography-uAmWUAL1.js.map +0 -1
|
@@ -1,910 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { d as e, m as t } from "./ui-provider-C-74NVLc.js";
|
|
3
|
-
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-B6kKb8jB.js";
|
|
5
|
-
import { a as i, c as a, t as o } from "./typography-BQnine1k.js";
|
|
6
|
-
import { r as s, t as c } from "./structure-DuxKl954.js";
|
|
7
|
-
import { h as l, p as u } from "./smart-card-CW0hjetE.js";
|
|
8
|
-
import { t as d } from "./interaction-recipes-XR9ZpVYL.js";
|
|
9
|
-
import { r as f } from "./field-affordance-recipes-DWcNcOjh.js";
|
|
10
|
-
import { d as p, m, p as h, s as g, y as _ } from "./form-sizing-Bs2qFUeE.js";
|
|
11
|
-
import { t as v } from "./input-CvyDQlY7.js";
|
|
12
|
-
import { t as y } from "./form-field-BriWAXyg.js";
|
|
13
|
-
import { _ as b, d as ee, f as x, g as te, l as S, p as C, v as w } from "./choice-inputs-zUgBZfE4.js";
|
|
14
|
-
import { t as T } from "./control-group-recipes-fMuFo0H7.js";
|
|
15
|
-
import * as E from "react";
|
|
16
|
-
import { forwardRef as D, memo as O, useCallback as k, useEffect as A, useId as j, useMemo as M, useRef as N, useState as P } from "react";
|
|
17
|
-
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
18
|
-
import { AlertTriangle as L, Minus as R, Plus as z } from "lucide-react";
|
|
19
|
-
//#region src/components/base/forms-numeric/decimal-input.tsx
|
|
20
|
-
var B = {
|
|
21
|
-
decrement: "Decrement",
|
|
22
|
-
increment: "Increment"
|
|
23
|
-
}, V = (e, t, n) => {
|
|
24
|
-
if (!e) return "";
|
|
25
|
-
let r = e;
|
|
26
|
-
if (r = r.replace(/,/g, "."), r = n ? r.replace(/[^\d.-]/g, "") : r.replace(/[^\d.]/g, ""), n && r.includes("-")) {
|
|
27
|
-
let e = r.startsWith("-");
|
|
28
|
-
r = r.replace(/-/g, ""), e && (r = "-" + r);
|
|
29
|
-
}
|
|
30
|
-
let i = r.split(".");
|
|
31
|
-
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;
|
|
32
|
-
}, H = (e, t, n) => {
|
|
33
|
-
if (!e || e === "-") return !0;
|
|
34
|
-
let r = parseFloat(e);
|
|
35
|
-
return Number.isNaN(r) ? !0 : !(t !== void 0 && r < t || n !== void 0 && r > n);
|
|
36
|
-
};
|
|
37
|
-
function U(e, t, n) {
|
|
38
|
-
let r = 10 ** t, i = e * r;
|
|
39
|
-
switch (n) {
|
|
40
|
-
case "floor": return Math.floor(i) / r;
|
|
41
|
-
case "ceil": return Math.ceil(i) / r;
|
|
42
|
-
case "half-even": {
|
|
43
|
-
let e = Math.floor(i), t = i - e;
|
|
44
|
-
return t > .5 ? (e + 1) / r : t < .5 ? e / r : (e % 2 == 0 ? e : e + 1) / r;
|
|
45
|
-
}
|
|
46
|
-
default: return Math.round(i) / r;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function W(e, t, n) {
|
|
50
|
-
let r = e;
|
|
51
|
-
return t !== void 0 && (r = Math.max(t, r)), n !== void 0 && (r = Math.min(n, r)), r;
|
|
52
|
-
}
|
|
53
|
-
function ne(e, t, n, r, i = "round") {
|
|
54
|
-
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;
|
|
55
|
-
return Number(s.toFixed(12));
|
|
56
|
-
}
|
|
57
|
-
function re(e, t) {
|
|
58
|
-
let n = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
59
|
-
n ? n.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
60
|
-
}
|
|
61
|
-
var G = {
|
|
62
|
-
sm: "w-control-sm",
|
|
63
|
-
md: "w-control",
|
|
64
|
-
lg: "w-control-lg"
|
|
65
|
-
};
|
|
66
|
-
function ie(t, i) {
|
|
67
|
-
let { decimalPlaces: a = 2, min: o, max: s, allowNegative: c = !0, allowEmpty: l = !0, step: u, roundingMode: f = "round", normalizeOnBlur: m = !0, onChange: h, onBlur: y, onKeyDown: b, placeholder: ee, className: x, value: te, defaultValue: S, disabled: C, size: w, strings: T, ...D } = t, { defaultScale: O } = e(), A = _(w, O), j = n(B, T), M = Math.min(12, Math.max(0, a)), N = E.useRef(null), P = C || D.loading || D.readOnly, L = k((e) => {
|
|
68
|
-
let t = e.target.value;
|
|
69
|
-
if (!t && l) {
|
|
70
|
-
h?.(e);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
let n = V(t, M, c);
|
|
74
|
-
if (H(n, o, s)) {
|
|
75
|
-
if (n !== t) {
|
|
76
|
-
let t = {
|
|
77
|
-
...e,
|
|
78
|
-
target: {
|
|
79
|
-
...e.target,
|
|
80
|
-
value: n
|
|
81
|
-
},
|
|
82
|
-
currentTarget: {
|
|
83
|
-
...e.currentTarget,
|
|
84
|
-
value: n
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
h?.(t);
|
|
88
|
-
} else h?.(e);
|
|
89
|
-
}
|
|
90
|
-
}, [
|
|
91
|
-
h,
|
|
92
|
-
M,
|
|
93
|
-
c,
|
|
94
|
-
l,
|
|
95
|
-
o,
|
|
96
|
-
s
|
|
97
|
-
]), ie = k((e) => {
|
|
98
|
-
if (y?.(e), !m) return;
|
|
99
|
-
let t = e.target.value;
|
|
100
|
-
if (!t && l) return;
|
|
101
|
-
let n = Number.parseFloat(t.replace(",", "."));
|
|
102
|
-
if (!Number.isFinite(n)) return;
|
|
103
|
-
let r = U(W(n, o, s), M, f).toFixed(M);
|
|
104
|
-
r !== t && N.current && re(N.current, r);
|
|
105
|
-
}, [
|
|
106
|
-
y,
|
|
107
|
-
h,
|
|
108
|
-
m,
|
|
109
|
-
l,
|
|
110
|
-
o,
|
|
111
|
-
s,
|
|
112
|
-
M,
|
|
113
|
-
f
|
|
114
|
-
]), K = k((e) => {
|
|
115
|
-
if (P || u === void 0) return;
|
|
116
|
-
let t = N.current;
|
|
117
|
-
if (!t) return;
|
|
118
|
-
let n = t.value, r = Number.parseFloat(n.replace(",", "."));
|
|
119
|
-
re(t, U(W(ne(Number.isFinite(r) ? r : o ?? 0, e, u, o, f), o, s), M, f).toFixed(M));
|
|
120
|
-
}, [
|
|
121
|
-
P,
|
|
122
|
-
u,
|
|
123
|
-
o,
|
|
124
|
-
s,
|
|
125
|
-
f,
|
|
126
|
-
M,
|
|
127
|
-
h
|
|
128
|
-
]), q = typeof u == "number" && u > 0, J = k((e) => {
|
|
129
|
-
b?.(e), !e.defaultPrevented && q && (e.key === "ArrowUp" || e.key === "ArrowDown") && (e.preventDefault(), K(e.key === "ArrowUp" ? 1 : -1));
|
|
130
|
-
}, [
|
|
131
|
-
b,
|
|
132
|
-
q,
|
|
133
|
-
K
|
|
134
|
-
]), Y = ee ?? (M > 0 ? `0.${"0".repeat(M)}` : "0"), X = D.endAddon && !D.startAddon ? "text-end" : D.startAddon && !D.endAddon ? "text-start" : "text-center";
|
|
135
|
-
return q ? /* @__PURE__ */ I("div", {
|
|
136
|
-
className: r("decimal-input--component", "flex items-stretch overflow-hidden rounded-radius border border-input bg-transparent [&>.input--component]:h-full", p[A], "has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-3 has-[input:focus-visible]:ring-ring/50", "has-[input[aria-invalid=true]]:border-destructive has-[input[aria-invalid=true]]:has-[input:focus-visible]:border-destructive has-[input[aria-invalid=true]]:has-[input:focus-visible]:ring-destructive/30 dark:has-[input[aria-invalid=true]]:has-[input:focus-visible]:ring-destructive/50", "has-[input:read-only:not(:disabled)]:bg-muted", C && "opacity-50 cursor-not-allowed"),
|
|
137
|
-
children: [
|
|
138
|
-
/* @__PURE__ */ F("button", {
|
|
139
|
-
type: "button",
|
|
140
|
-
tabIndex: -1,
|
|
141
|
-
"aria-label": j.decrement,
|
|
142
|
-
disabled: P,
|
|
143
|
-
onClick: () => K(-1),
|
|
144
|
-
className: r(d.nativeButtonReset, "inline-flex shrink-0 items-center justify-center border-e border-input text-muted-foreground transition-colors", G[A], d.rowHover, "disabled:pointer-events-none disabled:cursor-not-allowed", !C && "disabled:opacity-50"),
|
|
145
|
-
children: /* @__PURE__ */ F(R, {
|
|
146
|
-
"aria-hidden": "true",
|
|
147
|
-
className: g[A]
|
|
148
|
-
})
|
|
149
|
-
}),
|
|
150
|
-
/* @__PURE__ */ F(v, {
|
|
151
|
-
size: A,
|
|
152
|
-
ref: (e) => {
|
|
153
|
-
N.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
154
|
-
},
|
|
155
|
-
type: "text",
|
|
156
|
-
inputMode: M > 0 ? "decimal" : "numeric",
|
|
157
|
-
placeholder: Y,
|
|
158
|
-
onChange: L,
|
|
159
|
-
onBlur: ie,
|
|
160
|
-
onKeyDown: J,
|
|
161
|
-
..."value" in t ? { value: te } : {},
|
|
162
|
-
defaultValue: S,
|
|
163
|
-
disabled: C,
|
|
164
|
-
className: r("!h-full min-h-0 flex-1 tabular-nums 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", X, x),
|
|
165
|
-
...D
|
|
166
|
-
}),
|
|
167
|
-
/* @__PURE__ */ F("button", {
|
|
168
|
-
type: "button",
|
|
169
|
-
tabIndex: -1,
|
|
170
|
-
"aria-label": j.increment,
|
|
171
|
-
disabled: P,
|
|
172
|
-
onClick: () => K(1),
|
|
173
|
-
className: r(d.nativeButtonReset, "inline-flex shrink-0 items-center justify-center border-s border-input text-muted-foreground transition-colors", G[A], d.rowHover, "disabled:pointer-events-none disabled:cursor-not-allowed", !C && "disabled:opacity-50"),
|
|
174
|
-
children: /* @__PURE__ */ F(z, {
|
|
175
|
-
"aria-hidden": "true",
|
|
176
|
-
className: g[A]
|
|
177
|
-
})
|
|
178
|
-
})
|
|
179
|
-
]
|
|
180
|
-
}) : /* @__PURE__ */ F(v, {
|
|
181
|
-
size: A,
|
|
182
|
-
ref: (e) => {
|
|
183
|
-
N.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
184
|
-
},
|
|
185
|
-
type: "text",
|
|
186
|
-
inputMode: M > 0 ? "decimal" : "numeric",
|
|
187
|
-
placeholder: Y,
|
|
188
|
-
onChange: L,
|
|
189
|
-
onBlur: ie,
|
|
190
|
-
onKeyDown: b,
|
|
191
|
-
..."value" in t ? { value: te } : {},
|
|
192
|
-
defaultValue: S,
|
|
193
|
-
disabled: C,
|
|
194
|
-
className: r("tabular-nums text-end", x),
|
|
195
|
-
...D
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
var K = E.forwardRef(ie);
|
|
199
|
-
K.displayName = "DecimalInput";
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region src/components/base/forms-numeric/percentage-input.tsx
|
|
202
|
-
var q = D(function({ decimalPlaces: e = 2, min: t = 0, max: n = 100, step: r, ...i }, a) {
|
|
203
|
-
return /* @__PURE__ */ F(K, {
|
|
204
|
-
className: "percentage-input--component",
|
|
205
|
-
ref: a,
|
|
206
|
-
decimalPlaces: e,
|
|
207
|
-
allowNegative: !1,
|
|
208
|
-
min: t,
|
|
209
|
-
max: n,
|
|
210
|
-
step: r,
|
|
211
|
-
endAddon: "%",
|
|
212
|
-
...i
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
q.displayName = "PercentageInput";
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region src/components/base/forms-numeric/currency-input.tsx
|
|
218
|
-
var J = {
|
|
219
|
-
...B,
|
|
220
|
-
currencyAriaLabel: "Currency"
|
|
221
|
-
}, Y = {
|
|
222
|
-
USD: "$",
|
|
223
|
-
EUR: "€",
|
|
224
|
-
GBP: "£",
|
|
225
|
-
BGN: "лв",
|
|
226
|
-
JPY: "¥",
|
|
227
|
-
CNY: "¥",
|
|
228
|
-
CHF: "CHF",
|
|
229
|
-
CAD: "C$",
|
|
230
|
-
AUD: "A$"
|
|
231
|
-
}, X = (e) => !e || e.length === 0 ? [] : e.map((e) => typeof e == "string" ? {
|
|
232
|
-
value: e,
|
|
233
|
-
label: `${Y[e] || e} ${e}`
|
|
234
|
-
} : e);
|
|
235
|
-
function ae({ currency: t, defaultCurrency: o, currencies: s, onCurrencyChange: l, currencyPosition: u = "start", disableCurrencySelector: d = !1, currencyPlaceholder: p, currencyWidth: m = "w-28", currencyLabel: g, strings: v, invalid: y, disabled: S, onConfigError: T, size: E, ...D }, O) {
|
|
236
|
-
let { defaultScale: N } = e(), L = _(E, N), R = n(J, v), z = j(), B = M(() => X(s), [s]), [V, H] = P(o ?? B[0]?.value ?? ""), U = t !== void 0, W = U ? t : V;
|
|
237
|
-
A(() => {
|
|
238
|
-
let e = {
|
|
239
|
-
currency: t,
|
|
240
|
-
defaultCurrency: o,
|
|
241
|
-
disableCurrencySelector: d
|
|
242
|
-
};
|
|
243
|
-
d && typeof t == "string" && typeof o == "string" && t.trim() !== "" && o.trim() !== "" && t !== o && T?.("[CurrencyInput] currency/defaultCurrency mismatch while selector is disabled.", e), d && (typeof W != "string" || W.trim().length === 0) && T?.("[CurrencyInput] disableCurrencySelector is enabled but no currency is provided.", e);
|
|
244
|
-
}, [
|
|
245
|
-
t,
|
|
246
|
-
o,
|
|
247
|
-
d,
|
|
248
|
-
T,
|
|
249
|
-
W
|
|
250
|
-
]);
|
|
251
|
-
let ne = k((e) => {
|
|
252
|
-
e !== null && (U || H(e), l?.(e));
|
|
253
|
-
}, [U, l]), re = M(() => r("currency-input--selector-trigger", h(L), m), [L, m]), G = /* @__PURE__ */ I(c, {
|
|
254
|
-
gap: "xs",
|
|
255
|
-
className: "currency-input--selector",
|
|
256
|
-
children: [!!g && /* @__PURE__ */ F(i, {
|
|
257
|
-
htmlFor: z,
|
|
258
|
-
className: r("currency-input--selector-label text-inherit", "leading-6"),
|
|
259
|
-
children: g
|
|
260
|
-
}), /* @__PURE__ */ I(te, {
|
|
261
|
-
value: W,
|
|
262
|
-
onValueChange: (e) => ne(e),
|
|
263
|
-
disabled: S || d,
|
|
264
|
-
children: [/* @__PURE__ */ F(b, {
|
|
265
|
-
id: z,
|
|
266
|
-
"aria-label": g || R.currencyAriaLabel,
|
|
267
|
-
"aria-invalid": y || void 0,
|
|
268
|
-
iconClassName: f.icon[L],
|
|
269
|
-
className: re,
|
|
270
|
-
children: /* @__PURE__ */ F(w, { placeholder: p ? /* @__PURE__ */ F(a, {
|
|
271
|
-
tag: "span",
|
|
272
|
-
size: "inherit",
|
|
273
|
-
type: "secondary",
|
|
274
|
-
lineHeight: "tight",
|
|
275
|
-
className: "text-inherit",
|
|
276
|
-
children: p
|
|
277
|
-
}) : void 0 })
|
|
278
|
-
}), /* @__PURE__ */ F(ee, { children: /* @__PURE__ */ F(x, { children: B.map((e) => /* @__PURE__ */ F(C, {
|
|
279
|
-
value: e.value,
|
|
280
|
-
size: L,
|
|
281
|
-
children: /* @__PURE__ */ F(a, {
|
|
282
|
-
tag: "span",
|
|
283
|
-
size: "inherit",
|
|
284
|
-
lineHeight: "tight",
|
|
285
|
-
className: "text-inherit",
|
|
286
|
-
children: e.label
|
|
287
|
-
})
|
|
288
|
-
}, e.value)) }) })]
|
|
289
|
-
})]
|
|
290
|
-
});
|
|
291
|
-
return /* @__PURE__ */ I("div", {
|
|
292
|
-
className: r("currency-input--component", "flex items-end gap-space-md"),
|
|
293
|
-
children: [
|
|
294
|
-
u === "start" && G,
|
|
295
|
-
/* @__PURE__ */ F("div", {
|
|
296
|
-
className: "currency-input--amount min-w-0 flex-1",
|
|
297
|
-
children: /* @__PURE__ */ F(K, {
|
|
298
|
-
ref: O,
|
|
299
|
-
size: L,
|
|
300
|
-
decimalPlaces: 2,
|
|
301
|
-
allowNegative: !1,
|
|
302
|
-
disabled: S,
|
|
303
|
-
invalid: y,
|
|
304
|
-
strings: {
|
|
305
|
-
decrement: R.decrement,
|
|
306
|
-
increment: R.increment
|
|
307
|
-
},
|
|
308
|
-
...D
|
|
309
|
-
})
|
|
310
|
-
}),
|
|
311
|
-
u === "end" && G
|
|
312
|
-
]
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
var oe = O(D(ae));
|
|
316
|
-
oe.displayName = "CurrencyInput";
|
|
317
|
-
//#endregion
|
|
318
|
-
//#region src/components/base/forms-numeric/money-input.strings.ts
|
|
319
|
-
var se = {
|
|
320
|
-
originalValue: "Original value: {value}",
|
|
321
|
-
conversionWarning: "Currency will be converted from {from} to {to}."
|
|
322
|
-
};
|
|
323
|
-
function ce(e, t) {
|
|
324
|
-
return Object.entries(t).reduce((e, [t, n]) => e.replaceAll(`{${t}}`, n), e);
|
|
325
|
-
}
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region src/components/base/forms-numeric/money-input.tsx
|
|
328
|
-
var le = ["USD", "EUR"];
|
|
329
|
-
function ue(e) {
|
|
330
|
-
let t = String(e ?? "").trim();
|
|
331
|
-
if (!t) return null;
|
|
332
|
-
let n = Number.parseFloat(t.replace(",", "."));
|
|
333
|
-
return Number.isFinite(n) ? n : null;
|
|
334
|
-
}
|
|
335
|
-
function Z(e) {
|
|
336
|
-
return typeof e == "string" ? e.trim() : "";
|
|
337
|
-
}
|
|
338
|
-
function de(e) {
|
|
339
|
-
return typeof e == "string" ? e : e.value;
|
|
340
|
-
}
|
|
341
|
-
var fe = D(function(e, i) {
|
|
342
|
-
let { currency: o, defaultCurrency: s, currencies: d, onCurrencyChange: f, onChangeData: p, money: m, label: h, hint: g, helperText: _, error: v, required: b, invalid: ee, recordCurrency: x, showMigrationWarning: te = !0, migrationWarningMessage: S, showOriginalHint: C = !0, controlStrings: w, controlClassName: T, strings: E, className: D, onChange: O, value: A, defaultValue: j, ...R } = e, z = t(), B = n(se, E), V = s ?? z.defaultCurrency ?? "USD", [H, U] = P(V), W = o ?? H, ne = N(null), re = M(() => {
|
|
343
|
-
let e = d?.length ? d : [V, ...le], t = /* @__PURE__ */ new Map();
|
|
344
|
-
for (let n of e) {
|
|
345
|
-
let e = de(n);
|
|
346
|
-
t.has(e) || t.set(e, n);
|
|
347
|
-
}
|
|
348
|
-
let n = Array.from(t.values());
|
|
349
|
-
return t.has(W) ? n : [W, ...n];
|
|
350
|
-
}, [
|
|
351
|
-
W,
|
|
352
|
-
d,
|
|
353
|
-
V
|
|
354
|
-
]), G = x ?? m?.recordCurrency ?? void 0, ie = C ? Z(m?.pair?.formatted) : "", K = !!(G && W && G !== W), q = ee ?? !!v, J = k((e) => {
|
|
355
|
-
ne.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
356
|
-
}, [i]), Y = k((e) => {
|
|
357
|
-
O?.(e), p?.({
|
|
358
|
-
amount: ue(e.target.value),
|
|
359
|
-
currency: W
|
|
360
|
-
});
|
|
361
|
-
}, [
|
|
362
|
-
W,
|
|
363
|
-
O,
|
|
364
|
-
p
|
|
365
|
-
]), X = k((e) => {
|
|
366
|
-
o === void 0 && U(e), f?.(e), p?.({
|
|
367
|
-
amount: ue(ne.current?.value ?? A ?? j),
|
|
368
|
-
currency: e
|
|
369
|
-
});
|
|
370
|
-
}, [
|
|
371
|
-
o,
|
|
372
|
-
j,
|
|
373
|
-
p,
|
|
374
|
-
f,
|
|
375
|
-
A
|
|
376
|
-
]), ae = /* @__PURE__ */ F(oe, {
|
|
377
|
-
...R,
|
|
378
|
-
ref: J,
|
|
379
|
-
..."value" in e ? { value: A } : {},
|
|
380
|
-
defaultValue: j,
|
|
381
|
-
currency: W,
|
|
382
|
-
currencies: re,
|
|
383
|
-
onChange: Y,
|
|
384
|
-
onCurrencyChange: X,
|
|
385
|
-
invalid: q,
|
|
386
|
-
required: b,
|
|
387
|
-
"aria-required": b ? !0 : R["aria-required"],
|
|
388
|
-
strings: w,
|
|
389
|
-
className: T
|
|
390
|
-
}), fe = !!(h || g || _ || v || b);
|
|
391
|
-
return /* @__PURE__ */ I(c, {
|
|
392
|
-
gap: "sm",
|
|
393
|
-
className: r("money-input--component", D),
|
|
394
|
-
children: [/* @__PURE__ */ I(c, {
|
|
395
|
-
gap: "xs",
|
|
396
|
-
className: "money-input--field",
|
|
397
|
-
children: [fe ? /* @__PURE__ */ F(y, {
|
|
398
|
-
label: h,
|
|
399
|
-
hint: g,
|
|
400
|
-
helperText: _,
|
|
401
|
-
error: v,
|
|
402
|
-
required: b,
|
|
403
|
-
children: ae
|
|
404
|
-
}) : ae, !!ie && !v && /* @__PURE__ */ F(a, {
|
|
405
|
-
tag: "p",
|
|
406
|
-
size: "xs",
|
|
407
|
-
type: "secondary",
|
|
408
|
-
className: "money-input--original",
|
|
409
|
-
children: ce(B.originalValue, { value: ie })
|
|
410
|
-
})]
|
|
411
|
-
}), !!K && te && /* @__PURE__ */ I(u, {
|
|
412
|
-
tone: "warning",
|
|
413
|
-
className: "money-input--warning",
|
|
414
|
-
children: [/* @__PURE__ */ F(L, { "aria-hidden": "true" }), /* @__PURE__ */ F(l, { children: S ?? ce(B.conversionWarning, {
|
|
415
|
-
from: G ?? "",
|
|
416
|
-
to: W
|
|
417
|
-
}) })]
|
|
418
|
-
})]
|
|
419
|
-
});
|
|
420
|
-
});
|
|
421
|
-
fe.displayName = "MoneyInput";
|
|
422
|
-
//#endregion
|
|
423
|
-
//#region src/components/base/forms-numeric/rounding-mode-select.tsx
|
|
424
|
-
var pe = [
|
|
425
|
-
"floor",
|
|
426
|
-
"half_up",
|
|
427
|
-
"ceil"
|
|
428
|
-
], me = {
|
|
429
|
-
floor: "Round down",
|
|
430
|
-
half_up: "Round half up",
|
|
431
|
-
ceil: "Round up"
|
|
432
|
-
}, he = D(function(e, t) {
|
|
433
|
-
let n = Object.prototype.hasOwnProperty.call(e, "value"), { value: i, onValueChange: a, labels: o, placeholder: s, className: c, ...l } = e, u = M(() => pe.map((e) => ({
|
|
434
|
-
value: e,
|
|
435
|
-
label: o?.[e] ?? me[e] ?? e
|
|
436
|
-
})), [o]), d = k((e) => {
|
|
437
|
-
a?.(e);
|
|
438
|
-
}, [a]);
|
|
439
|
-
return /* @__PURE__ */ F(S, {
|
|
440
|
-
ref: t,
|
|
441
|
-
className: r("rounding-mode-select--component", c),
|
|
442
|
-
options: u,
|
|
443
|
-
...n ? { value: i } : {},
|
|
444
|
-
onValueChange: d,
|
|
445
|
-
placeholder: s,
|
|
446
|
-
...l
|
|
447
|
-
});
|
|
448
|
-
});
|
|
449
|
-
he.displayName = "RoundingModeSelect";
|
|
450
|
-
//#endregion
|
|
451
|
-
//#region src/components/base/forms-numeric/dimensions-input.tsx
|
|
452
|
-
var ge = {
|
|
453
|
-
width: "Width",
|
|
454
|
-
height: "Height",
|
|
455
|
-
depth: "Depth",
|
|
456
|
-
unit: "Unit",
|
|
457
|
-
widthPlaceholder: "0.00",
|
|
458
|
-
heightPlaceholder: "0.00",
|
|
459
|
-
depthPlaceholder: "0.00"
|
|
460
|
-
}, _e = [
|
|
461
|
-
{
|
|
462
|
-
value: "mm",
|
|
463
|
-
label: "mm"
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
value: "cm",
|
|
467
|
-
label: "cm"
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
value: "m",
|
|
471
|
-
label: "m"
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
value: "in",
|
|
475
|
-
label: "in"
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
value: "ft",
|
|
479
|
-
label: "ft"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
value: "px",
|
|
483
|
-
label: "px"
|
|
484
|
-
}
|
|
485
|
-
], ve = (e, t) => {
|
|
486
|
-
if (!e) return {
|
|
487
|
-
width: "",
|
|
488
|
-
height: "",
|
|
489
|
-
depth: ""
|
|
490
|
-
};
|
|
491
|
-
if (t === "string" && typeof e == "string") {
|
|
492
|
-
let t = e.split("x").map((e) => e.trim());
|
|
493
|
-
return {
|
|
494
|
-
width: t[0] || "",
|
|
495
|
-
height: t[1] || "",
|
|
496
|
-
depth: t[2] || ""
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
return t === "object" && typeof e == "object" ? {
|
|
500
|
-
width: e.width || "",
|
|
501
|
-
height: e.height || "",
|
|
502
|
-
depth: e.depth || ""
|
|
503
|
-
} : {
|
|
504
|
-
width: "",
|
|
505
|
-
height: "",
|
|
506
|
-
depth: ""
|
|
507
|
-
};
|
|
508
|
-
}, ye = (e, t, n, r) => r === "string" ? `${e}x${t}x${n}` : {
|
|
509
|
-
width: e,
|
|
510
|
-
height: t,
|
|
511
|
-
depth: n
|
|
512
|
-
}, be = E.forwardRef(function({ value: t, defaultValue: o, format: s = "string", unit: l, defaultUnit: u = "cm", widthLabel: d, heightLabel: p, depthLabel: g, unitLabel: v, unitPlaceholder: y, widthPlaceholder: S, heightPlaceholder: E, depthPlaceholder: D, onChange: O, onUnitChange: M, decimalPlaces: N = 2, min: L = 0, max: R, showUnitSelector: z = !0, disableUnitSelector: B = !1, layout: V = "horizontal", invalid: H, disabled: U = !1, className: W, size: ne, strings: re }, G) {
|
|
513
|
-
let { defaultScale: ie } = e(), q = _(ne, ie), J = n(ge, re), Y = d ?? J.width, X = p ?? J.height, ae = g ?? J.depth, oe = y ?? J.unit, se = S ?? J.widthPlaceholder, ce = E ?? J.heightPlaceholder, le = D ?? J.depthPlaceholder, ue = V === "horizontal", Z = V === "vertical", de = z === !0, fe = (v ?? "").length > 0, pe = Z ? Y : "", me = Z ? X : "", he = Z ? ae : "", be = j(), Q = {
|
|
514
|
-
width: `${be}-width`,
|
|
515
|
-
height: `${be}-height`,
|
|
516
|
-
depth: `${be}-depth`,
|
|
517
|
-
unit: `${be}-unit`
|
|
518
|
-
}, xe = r("text-inherit", m), $ = t !== void 0, Se = l !== void 0, Ce = ve($ ? t : o, s), [we, Te] = P(Ce.width), [Ee, De] = P(Ce.height), [Oe, ke] = P(Ce.depth), [Ae, je] = P(l || u), Me = ve(t, s), Ne = $ ? Me.width : we, Pe = $ ? Me.height : Ee, Fe = $ ? Me.depth : Oe, Ie = Se ? l : Ae;
|
|
519
|
-
A(() => {
|
|
520
|
-
if ($) {
|
|
521
|
-
let e = ve(t, s);
|
|
522
|
-
Te(e.width), De(e.height), ke(e.depth);
|
|
523
|
-
}
|
|
524
|
-
}, [
|
|
525
|
-
t,
|
|
526
|
-
s,
|
|
527
|
-
$
|
|
528
|
-
]);
|
|
529
|
-
let Le = k((e, t) => {
|
|
530
|
-
let n = Ne, r = Pe, i = Fe;
|
|
531
|
-
e === "width" && (n = t), e === "height" && (r = t), e === "depth" && (i = t), $ || (Te(n), De(r), ke(i));
|
|
532
|
-
let a = ye(n, r, i, s);
|
|
533
|
-
O?.({ target: { value: a } });
|
|
534
|
-
}, [
|
|
535
|
-
Ne,
|
|
536
|
-
Pe,
|
|
537
|
-
Fe,
|
|
538
|
-
$,
|
|
539
|
-
s,
|
|
540
|
-
O
|
|
541
|
-
]), Re = k((e) => {
|
|
542
|
-
if (e === null) return;
|
|
543
|
-
let t = e;
|
|
544
|
-
Se || je(t), M?.(t);
|
|
545
|
-
}, [Se, M]), ze = /* @__PURE__ */ I(c, {
|
|
546
|
-
gap: "xs",
|
|
547
|
-
children: [!!fe && Z && /* @__PURE__ */ F(i, {
|
|
548
|
-
htmlFor: Q.unit,
|
|
549
|
-
className: xe,
|
|
550
|
-
children: v
|
|
551
|
-
}), /* @__PURE__ */ I(te, {
|
|
552
|
-
value: Ie,
|
|
553
|
-
onValueChange: (e) => Re(e),
|
|
554
|
-
disabled: U || B,
|
|
555
|
-
children: [/* @__PURE__ */ F(b, {
|
|
556
|
-
id: Q.unit,
|
|
557
|
-
"aria-label": v ?? J.unit,
|
|
558
|
-
"aria-invalid": H || void 0,
|
|
559
|
-
iconClassName: f.icon[q],
|
|
560
|
-
className: r(h(q), V === "vertical" ? "w-full" : "w-full @md/dimensions-input:w-32"),
|
|
561
|
-
children: /* @__PURE__ */ F(w, { placeholder: /* @__PURE__ */ F(a, {
|
|
562
|
-
tag: "span",
|
|
563
|
-
size: "inherit",
|
|
564
|
-
type: "secondary",
|
|
565
|
-
lineHeight: "tight",
|
|
566
|
-
className: "text-inherit",
|
|
567
|
-
children: oe
|
|
568
|
-
}) })
|
|
569
|
-
}), /* @__PURE__ */ F(ee, { children: /* @__PURE__ */ F(x, { children: _e.map((e) => /* @__PURE__ */ F(C, {
|
|
570
|
-
value: e.value,
|
|
571
|
-
size: q,
|
|
572
|
-
children: /* @__PURE__ */ F(a, {
|
|
573
|
-
tag: "span",
|
|
574
|
-
size: "inherit",
|
|
575
|
-
lineHeight: "tight",
|
|
576
|
-
className: "text-inherit",
|
|
577
|
-
children: e.label
|
|
578
|
-
})
|
|
579
|
-
}, e.value)) }) })]
|
|
580
|
-
})]
|
|
581
|
-
});
|
|
582
|
-
return /* @__PURE__ */ F(c, {
|
|
583
|
-
ref: G,
|
|
584
|
-
gap: "md",
|
|
585
|
-
className: r("dimensions-input--component @container/dimensions-input", W),
|
|
586
|
-
children: /* @__PURE__ */ I(c, {
|
|
587
|
-
direction: V === "vertical" ? "vertical" : "horizontal",
|
|
588
|
-
gap: "md",
|
|
589
|
-
align: V === "vertical" ? "stretch" : "start",
|
|
590
|
-
className: "dimensions-input--fields",
|
|
591
|
-
children: [
|
|
592
|
-
/* @__PURE__ */ I(c, {
|
|
593
|
-
gap: "xs",
|
|
594
|
-
className: "min-w-0 flex-1",
|
|
595
|
-
children: [
|
|
596
|
-
!!Z && !!pe && /* @__PURE__ */ F(i, {
|
|
597
|
-
htmlFor: Q.width,
|
|
598
|
-
className: xe,
|
|
599
|
-
children: pe
|
|
600
|
-
}),
|
|
601
|
-
/* @__PURE__ */ F(K, {
|
|
602
|
-
id: Q.width,
|
|
603
|
-
size: q,
|
|
604
|
-
value: Ne,
|
|
605
|
-
onChange: (e) => Le("width", e.target.value),
|
|
606
|
-
placeholder: se,
|
|
607
|
-
decimalPlaces: N,
|
|
608
|
-
min: L,
|
|
609
|
-
max: R,
|
|
610
|
-
disabled: U,
|
|
611
|
-
invalid: H,
|
|
612
|
-
"aria-label": Y
|
|
613
|
-
}),
|
|
614
|
-
!!ue && /* @__PURE__ */ F(a, {
|
|
615
|
-
size: "xs",
|
|
616
|
-
type: "secondary",
|
|
617
|
-
className: "text-center",
|
|
618
|
-
children: Y
|
|
619
|
-
})
|
|
620
|
-
]
|
|
621
|
-
}),
|
|
622
|
-
V === "horizontal" && /* @__PURE__ */ F("div", {
|
|
623
|
-
"aria-hidden": "true",
|
|
624
|
-
className: r("dimensions-input--separator flex items-center", T[q]),
|
|
625
|
-
children: /* @__PURE__ */ F(a, {
|
|
626
|
-
tag: "span",
|
|
627
|
-
type: "secondary",
|
|
628
|
-
children: "×"
|
|
629
|
-
})
|
|
630
|
-
}),
|
|
631
|
-
/* @__PURE__ */ I(c, {
|
|
632
|
-
gap: "xs",
|
|
633
|
-
className: "min-w-0 flex-1",
|
|
634
|
-
children: [
|
|
635
|
-
!!Z && !!me && /* @__PURE__ */ F(i, {
|
|
636
|
-
htmlFor: Q.height,
|
|
637
|
-
className: xe,
|
|
638
|
-
children: me
|
|
639
|
-
}),
|
|
640
|
-
/* @__PURE__ */ F(K, {
|
|
641
|
-
id: Q.height,
|
|
642
|
-
size: q,
|
|
643
|
-
value: Pe,
|
|
644
|
-
onChange: (e) => Le("height", e.target.value),
|
|
645
|
-
placeholder: ce,
|
|
646
|
-
decimalPlaces: N,
|
|
647
|
-
min: L,
|
|
648
|
-
max: R,
|
|
649
|
-
disabled: U,
|
|
650
|
-
invalid: H,
|
|
651
|
-
"aria-label": X
|
|
652
|
-
}),
|
|
653
|
-
!!ue && /* @__PURE__ */ F(a, {
|
|
654
|
-
size: "xs",
|
|
655
|
-
type: "secondary",
|
|
656
|
-
className: "text-center",
|
|
657
|
-
children: X
|
|
658
|
-
})
|
|
659
|
-
]
|
|
660
|
-
}),
|
|
661
|
-
V === "horizontal" && /* @__PURE__ */ F("div", {
|
|
662
|
-
"aria-hidden": "true",
|
|
663
|
-
className: r("dimensions-input--separator flex items-center", T[q]),
|
|
664
|
-
children: /* @__PURE__ */ F(a, {
|
|
665
|
-
tag: "span",
|
|
666
|
-
type: "secondary",
|
|
667
|
-
children: "×"
|
|
668
|
-
})
|
|
669
|
-
}),
|
|
670
|
-
/* @__PURE__ */ I(c, {
|
|
671
|
-
gap: "xs",
|
|
672
|
-
className: "min-w-0 flex-1",
|
|
673
|
-
children: [
|
|
674
|
-
!!Z && !!he && /* @__PURE__ */ F(i, {
|
|
675
|
-
htmlFor: Q.depth,
|
|
676
|
-
className: xe,
|
|
677
|
-
children: he
|
|
678
|
-
}),
|
|
679
|
-
/* @__PURE__ */ F(K, {
|
|
680
|
-
id: Q.depth,
|
|
681
|
-
size: q,
|
|
682
|
-
value: Fe,
|
|
683
|
-
onChange: (e) => Le("depth", e.target.value),
|
|
684
|
-
placeholder: le,
|
|
685
|
-
decimalPlaces: N,
|
|
686
|
-
min: L,
|
|
687
|
-
max: R,
|
|
688
|
-
disabled: U,
|
|
689
|
-
invalid: H,
|
|
690
|
-
"aria-label": ae
|
|
691
|
-
}),
|
|
692
|
-
!!ue && /* @__PURE__ */ F(a, {
|
|
693
|
-
size: "xs",
|
|
694
|
-
type: "secondary",
|
|
695
|
-
className: "text-center",
|
|
696
|
-
children: ae
|
|
697
|
-
})
|
|
698
|
-
]
|
|
699
|
-
}),
|
|
700
|
-
!!de && /* @__PURE__ */ I(c, {
|
|
701
|
-
gap: "xs",
|
|
702
|
-
className: r("dimensions-input--unit", V === "vertical" ? "w-full" : "w-full basis-full pt-0 @md/dimensions-input:w-32 @md/dimensions-input:basis-32 @md/dimensions-input:shrink-0"),
|
|
703
|
-
children: [ze, !!ue && /* @__PURE__ */ F(a, {
|
|
704
|
-
size: "xs",
|
|
705
|
-
type: "secondary",
|
|
706
|
-
className: "text-center",
|
|
707
|
-
children: fe ? v : oe
|
|
708
|
-
})]
|
|
709
|
-
})
|
|
710
|
-
]
|
|
711
|
-
})
|
|
712
|
-
});
|
|
713
|
-
});
|
|
714
|
-
be.displayName = "DimensionsInput";
|
|
715
|
-
//#endregion
|
|
716
|
-
//#region src/components/base/forms-numeric/weight-input.tsx
|
|
717
|
-
var Q = {
|
|
718
|
-
unitLabel: "",
|
|
719
|
-
unitAriaLabel: "Unit",
|
|
720
|
-
unitPlaceholder: ""
|
|
721
|
-
}, xe = [
|
|
722
|
-
{
|
|
723
|
-
value: "g",
|
|
724
|
-
label: "g"
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
value: "kg",
|
|
728
|
-
label: "kg"
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
value: "lb",
|
|
732
|
-
label: "lb"
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
value: "oz",
|
|
736
|
-
label: "oz"
|
|
737
|
-
}
|
|
738
|
-
], $ = E.forwardRef(function({ value: t, defaultValue: o, unit: s, defaultUnit: l = "g", onChange: u, onUnitChange: d, decimalPlaces: p = 2, min: m = 0, max: g, showUnitSelector: v = !0, disableUnitSelector: y = !1, unitWidth: S = "w-24", strings: T, invalid: E, disabled: D = !1, size: O, className: A }, N) {
|
|
739
|
-
let { defaultScale: L } = e(), R = _(O, L), z = n(Q, T), B = t !== void 0, V = s !== void 0, [H, U] = P(o ?? ""), [W, ne] = P(s ?? l), re = B ? t ?? "" : H, G = V ? s ?? l : W, ie = k((e) => {
|
|
740
|
-
B || U(e.target.value), u?.({ target: { value: e.target.value } });
|
|
741
|
-
}, [B, u]), q = k((e) => {
|
|
742
|
-
if (e === null) return;
|
|
743
|
-
let t = e;
|
|
744
|
-
V || ne(t), d?.(t);
|
|
745
|
-
}, [V, d]), J = M(() => xe, []), Y = z.unitLabel !== "", X = j();
|
|
746
|
-
return /* @__PURE__ */ I("div", {
|
|
747
|
-
ref: N,
|
|
748
|
-
className: r("weight-input--component", "flex items-end gap-space-md", A),
|
|
749
|
-
children: [/* @__PURE__ */ F("div", {
|
|
750
|
-
className: "flex-1",
|
|
751
|
-
children: /* @__PURE__ */ F(K, {
|
|
752
|
-
size: R,
|
|
753
|
-
value: re,
|
|
754
|
-
onChange: ie,
|
|
755
|
-
decimalPlaces: p,
|
|
756
|
-
allowNegative: !1,
|
|
757
|
-
min: m,
|
|
758
|
-
max: g,
|
|
759
|
-
disabled: D,
|
|
760
|
-
invalid: E
|
|
761
|
-
})
|
|
762
|
-
}), !!v && /* @__PURE__ */ I(c, {
|
|
763
|
-
gap: "xs",
|
|
764
|
-
children: [!!Y && /* @__PURE__ */ F(i, {
|
|
765
|
-
htmlFor: X,
|
|
766
|
-
className: r("text-inherit", "leading-6"),
|
|
767
|
-
children: z.unitLabel
|
|
768
|
-
}), /* @__PURE__ */ I(te, {
|
|
769
|
-
value: G,
|
|
770
|
-
onValueChange: (e) => q(e),
|
|
771
|
-
disabled: D || y,
|
|
772
|
-
children: [/* @__PURE__ */ F(b, {
|
|
773
|
-
id: X,
|
|
774
|
-
"aria-label": z.unitLabel || z.unitAriaLabel,
|
|
775
|
-
"aria-invalid": E || void 0,
|
|
776
|
-
iconClassName: f.icon[R],
|
|
777
|
-
className: r(h(R), S),
|
|
778
|
-
children: /* @__PURE__ */ F(w, { placeholder: z.unitPlaceholder ? /* @__PURE__ */ F(a, {
|
|
779
|
-
tag: "span",
|
|
780
|
-
size: "inherit",
|
|
781
|
-
type: "secondary",
|
|
782
|
-
lineHeight: "tight",
|
|
783
|
-
className: "text-inherit",
|
|
784
|
-
children: z.unitPlaceholder
|
|
785
|
-
}) : void 0 })
|
|
786
|
-
}), /* @__PURE__ */ F(ee, { children: /* @__PURE__ */ F(x, { children: J.map((e) => /* @__PURE__ */ F(C, {
|
|
787
|
-
value: e.value,
|
|
788
|
-
size: R,
|
|
789
|
-
children: /* @__PURE__ */ F(a, {
|
|
790
|
-
tag: "span",
|
|
791
|
-
size: "inherit",
|
|
792
|
-
lineHeight: "tight",
|
|
793
|
-
className: "text-inherit",
|
|
794
|
-
children: e.label
|
|
795
|
-
})
|
|
796
|
-
}, e.value)) }) })]
|
|
797
|
-
})]
|
|
798
|
-
})]
|
|
799
|
-
});
|
|
800
|
-
});
|
|
801
|
-
$.displayName = "WeightInput";
|
|
802
|
-
//#endregion
|
|
803
|
-
//#region src/components/base/forms-numeric/coordinates-input.tsx
|
|
804
|
-
var Se = {
|
|
805
|
-
latLabel: "",
|
|
806
|
-
lngLabel: "",
|
|
807
|
-
latPlaceholder: "",
|
|
808
|
-
lngPlaceholder: "",
|
|
809
|
-
previewLinkLabel: "",
|
|
810
|
-
latAccessibleLabel: "Latitude",
|
|
811
|
-
lngAccessibleLabel: "Longitude"
|
|
812
|
-
}, Ce = (e, t) => {
|
|
813
|
-
if (!e) return {
|
|
814
|
-
lat: "",
|
|
815
|
-
lng: ""
|
|
816
|
-
};
|
|
817
|
-
if (t === "string" && typeof e == "string") {
|
|
818
|
-
let [t, n] = e.split(",").map((e) => e.trim());
|
|
819
|
-
return {
|
|
820
|
-
lat: t ?? "",
|
|
821
|
-
lng: n ?? ""
|
|
822
|
-
};
|
|
823
|
-
}
|
|
824
|
-
return t === "object" && typeof e == "object" ? {
|
|
825
|
-
lat: e.lat ?? "",
|
|
826
|
-
lng: e.lng ?? ""
|
|
827
|
-
} : {
|
|
828
|
-
lat: "",
|
|
829
|
-
lng: ""
|
|
830
|
-
};
|
|
831
|
-
}, we = (e, t, n) => n === "string" ? `${e},${t}` : {
|
|
832
|
-
lat: e,
|
|
833
|
-
lng: t
|
|
834
|
-
}, Te = (e, t, n) => {
|
|
835
|
-
if (!e) return !1;
|
|
836
|
-
let r = Number(e);
|
|
837
|
-
return Number.isFinite(r) && r >= t && r <= n;
|
|
838
|
-
}, Ee = E.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) {
|
|
839
|
-
let _ = n(Se, d), v = e !== void 0, b = Ce(v ? e : t, i), [ee, x] = P(b.lat), [te, S] = P(b.lng), C = Ce(e, i), w = v ? C.lat : ee, T = v ? C.lng : te;
|
|
840
|
-
A(() => {
|
|
841
|
-
v && (x(C.lat), S(C.lng));
|
|
842
|
-
}, [
|
|
843
|
-
v,
|
|
844
|
-
C.lat,
|
|
845
|
-
C.lng
|
|
846
|
-
]);
|
|
847
|
-
let E = k((e, t) => {
|
|
848
|
-
v || (x(e), S(t)), a?.({ target: { value: we(e, t, i) } });
|
|
849
|
-
}, [
|
|
850
|
-
v,
|
|
851
|
-
a,
|
|
852
|
-
i
|
|
853
|
-
]), D = M(() => {
|
|
854
|
-
let e = Te(w, -90, 90), t = Te(T, -180, 180);
|
|
855
|
-
return !e || !t ? null : `https://www.google.com/maps?q=${encodeURIComponent(`${w},${T}`)}`;
|
|
856
|
-
}, [w, T]);
|
|
857
|
-
return /* @__PURE__ */ I(c, {
|
|
858
|
-
ref: g,
|
|
859
|
-
gap: "lg",
|
|
860
|
-
className: r("coordinates-input--component", p),
|
|
861
|
-
children: [/* @__PURE__ */ I(s, {
|
|
862
|
-
columns: {
|
|
863
|
-
base: 1,
|
|
864
|
-
md: 2
|
|
865
|
-
},
|
|
866
|
-
gap: "lg",
|
|
867
|
-
children: [/* @__PURE__ */ F(y, {
|
|
868
|
-
label: _.latLabel || void 0,
|
|
869
|
-
children: /* @__PURE__ */ F(K, {
|
|
870
|
-
placeholder: _.latPlaceholder || void 0,
|
|
871
|
-
"aria-label": _.latLabel ? void 0 : _.latAccessibleLabel || void 0,
|
|
872
|
-
value: w,
|
|
873
|
-
onChange: (e) => E(e.target.value, T),
|
|
874
|
-
decimalPlaces: l,
|
|
875
|
-
allowNegative: !0,
|
|
876
|
-
min: -90,
|
|
877
|
-
max: 90,
|
|
878
|
-
invalid: f,
|
|
879
|
-
disabled: m,
|
|
880
|
-
size: h
|
|
881
|
-
})
|
|
882
|
-
}), /* @__PURE__ */ F(y, {
|
|
883
|
-
label: _.lngLabel || void 0,
|
|
884
|
-
children: /* @__PURE__ */ F(K, {
|
|
885
|
-
placeholder: _.lngPlaceholder || void 0,
|
|
886
|
-
"aria-label": _.lngLabel ? void 0 : _.lngAccessibleLabel || void 0,
|
|
887
|
-
value: T,
|
|
888
|
-
onChange: (e) => E(w, e.target.value),
|
|
889
|
-
decimalPlaces: l,
|
|
890
|
-
allowNegative: !0,
|
|
891
|
-
min: -180,
|
|
892
|
-
max: 180,
|
|
893
|
-
invalid: f,
|
|
894
|
-
disabled: m,
|
|
895
|
-
size: h
|
|
896
|
-
})
|
|
897
|
-
})]
|
|
898
|
-
}), !!u && !!D && !!_.previewLinkLabel && /* @__PURE__ */ F(o, {
|
|
899
|
-
href: D,
|
|
900
|
-
type: "secondary",
|
|
901
|
-
underline: !1,
|
|
902
|
-
children: _.previewLinkLabel
|
|
903
|
-
})]
|
|
904
|
-
});
|
|
905
|
-
});
|
|
906
|
-
Ee.displayName = "CoordinatesInput";
|
|
907
|
-
//#endregion
|
|
908
|
-
export { he as a, oe as c, K as d, be as i, J as l, $ as n, fe as o, Q as r, se as s, Ee as t, q as u };
|
|
909
|
-
|
|
910
|
-
//# sourceMappingURL=forms-numeric-DIhghX1Q.js.map
|