themelia-react-ui 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +307 -131
- package/README.md +28 -8
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/dist/{accordion-B6a3vVgA.js → accordion-Cjb6sx0G.js} +14 -13
- package/dist/accordion-Cjb6sx0G.js.map +1 -0
- package/dist/action-menu-CllU52Mm.js +280 -0
- package/dist/action-menu-CllU52Mm.js.map +1 -0
- package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
- package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
- package/dist/ai-artifact-DvTwDVyL.js +1148 -0
- package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
- package/dist/{app-shell-ZK5RWdo6.js → app-shell-C4FhvCqF.js} +5 -5
- package/dist/{app-shell-ZK5RWdo6.js.map → app-shell-C4FhvCqF.js.map} +1 -1
- package/dist/attachment-BxDfL2mw.js +246 -0
- package/dist/attachment-BxDfL2mw.js.map +1 -0
- package/dist/{auth-CYxKfo69.js → auth-ax2BqjrI.js} +58 -54
- package/dist/auth-ax2BqjrI.js.map +1 -0
- package/dist/{avatar-BBnEJIx8.js → avatar-DAPlDvhJ.js} +7 -7
- package/dist/avatar-DAPlDvhJ.js.map +1 -0
- package/dist/{badge-MrKVNzW9.js → badge-HpFqoqSY.js} +40 -40
- package/dist/badge-HpFqoqSY.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/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 +40 -36
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +92 -92
- 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 +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +14 -14
- 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/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 +171 -176
- 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 +6 -6
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +79 -2
- package/dist/base/spinner.js.map +1 -0
- 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 +46 -45
- 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/{batch-action-bar-BZGDG-Si.js → batch-action-bar-DnUJ21NQ.js} +6 -5
- package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
- package/dist/blocks/admin.js +42 -42
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +260 -240
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +620 -585
- 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 +1152 -1109
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +48 -39
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +13 -12
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-D5t7I023.js → breadcrumbs-C-oqs1sQ.js} +5 -5
- package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
- package/dist/{button-QYwiyhD2.js → button-DVzspB_G.js} +2 -2
- package/dist/{button-QYwiyhD2.js.map → button-DVzspB_G.js.map} +1 -1
- package/dist/{buttons-SbIcm1HJ.js → buttons-DPZekJFu.js} +20 -15
- package/dist/buttons-DPZekJFu.js.map +1 -0
- package/dist/cards-BaBZR-AU.js +68 -0
- package/dist/cards-BaBZR-AU.js.map +1 -0
- package/dist/{chart-QfrARkXl.js → chart-ZOYyK2xG.js} +58 -55
- package/dist/chart-ZOYyK2xG.js.map +1 -0
- package/dist/{checkbox-DhB6K0bK.js → checkbox-AWIhNhmo.js} +2 -2
- package/dist/{checkbox-DhB6K0bK.js.map → checkbox-AWIhNhmo.js.map} +1 -1
- package/dist/{choice-inputs-t6w3ATNz.js → choice-inputs-CNHvARCJ.js} +49 -45
- package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
- package/dist/{code-block-Dgbu-CU3.js → code-block-DeneBJR_.js} +8 -8
- package/dist/code-block-DeneBJR_.js.map +1 -0
- package/dist/{collapsible-D8AEGU1-.js → collapsible-C-_l4hpy.js} +3 -3
- package/dist/{collapsible-D8AEGU1-.js.map → collapsible-C-_l4hpy.js.map} +1 -1
- package/dist/{collection-content-uK16Grv0.js → collection-content-By56pLog.js} +3 -3
- package/dist/{collection-content-uK16Grv0.js.map → collection-content-By56pLog.js.map} +1 -1
- package/dist/combobox-C0EQW6dr.js +875 -0
- package/dist/combobox-C0EQW6dr.js.map +1 -0
- package/dist/combobox-xCQ2RMNE.js +309 -0
- package/dist/combobox-xCQ2RMNE.js.map +1 -0
- package/dist/{command-kNR20o7x.js → command-C25VMRII.js} +7 -7
- package/dist/{command-kNR20o7x.js.map → command-C25VMRII.js.map} +1 -1
- package/dist/{comments-BpDuCUUu.js → comments-BYYlTA8E.js} +114 -105
- package/dist/comments-BYYlTA8E.js.map +1 -0
- package/dist/components/base/badge/badge.recipes.d.ts +1 -1
- package/dist/components/base/buttons/loader-button.d.ts +2 -1
- package/dist/components/base/cards/card.recipes.d.ts +2 -3
- package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
- package/dist/components/base/cards/smart-card.types.d.ts +11 -4
- package/dist/components/base/chart/chart.d.ts +2 -5
- package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +30 -4
- package/dist/components/base/forms/form-sizing.d.ts +11 -3
- package/dist/components/base/navigation/pagination.d.ts +5 -2
- package/dist/components/base/popover/popover.recipes.d.ts +15 -1
- package/dist/components/base/table/index.d.ts +9 -2
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
- package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +3 -1
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
- package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
- package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
- package/dist/components/features/appointment-calendar/index.d.ts +3 -0
- package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
- package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
- package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
- package/dist/components/features/combobox/types.d.ts +4 -0
- package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
- package/dist/components/features/rich-text-editor/index.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +6 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +9 -1
- package/dist/components/features/table/table-header.d.ts +1 -1
- package/dist/components/features/table/table.strings.d.ts +55 -1
- package/dist/components/features/table/table.types.d.ts +17 -4
- package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
- package/dist/components/primitives/number.d.ts +4 -2
- package/dist/components/primitives/value.d.ts +3 -1
- package/dist/components/typography/text-link.d.ts +4 -0
- package/dist/components/ui/combobox.d.ts +6 -2
- package/dist/components/ui/item.d.ts +8 -8
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/{containers-DmWiJa2I.js → containers-Mu1LMGV1.js} +2 -2
- package/dist/{containers-DmWiJa2I.js.map → containers-Mu1LMGV1.js.map} +1 -1
- package/dist/{copyable-B3Gwgdqc.js → copyable-ClBuk_UK.js} +4 -4
- package/dist/{copyable-B3Gwgdqc.js.map → copyable-ClBuk_UK.js.map} +1 -1
- package/dist/{data-display-DafIvCl5.js → data-display-DT_khPl_.js} +98 -87
- package/dist/data-display-DT_khPl_.js.map +1 -0
- package/dist/{date-BgK3bTdo.js → date-DCrsDTZc.js} +5 -5
- package/dist/{date-BgK3bTdo.js.map → date-DCrsDTZc.js.map} +1 -1
- package/dist/{date-picker-CF-DtUpF.js → date-picker-ay0Pha_a.js} +594 -593
- package/dist/date-picker-ay0Pha_a.js.map +1 -0
- package/dist/date-pickers-Ccw8DL2b.js +175 -0
- package/dist/date-pickers-Ccw8DL2b.js.map +1 -0
- package/dist/{display-DsQTVzMz.js → display-hAc1HjpI.js} +49 -49
- package/dist/display-hAc1HjpI.js.map +1 -0
- package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
- package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
- package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
- package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
- package/dist/features/activities.js +398 -375
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +188 -179
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +683 -0
- package/dist/features/appointment-calendar.js.map +1 -0
- package/dist/features/async-preview.js +109 -107
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +137 -137
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +255 -255
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +254 -248
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +35 -32
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +118 -117
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +233 -231
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +789 -775
- 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 +922 -902
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +28 -24
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +18 -15
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +12 -12
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +15 -13
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +11 -5
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +493 -489
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-BYIhtitP.js +239 -0
- package/dist/feedback-BYIhtitP.js.map +1 -0
- package/dist/{field-affordance-recipes-qQeIf4lG.js → field-affordance-recipes-DZhnIL_Y.js} +11 -18
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
- package/dist/{filters-BkHH53uv.js → filters-BGfvjP4d.js} +589 -580
- package/dist/filters-BGfvjP4d.js.map +1 -0
- package/dist/{form-field-DUt4UxSV.js → form-field-CwH9y77i.js} +6 -5
- package/dist/form-field-CwH9y77i.js.map +1 -0
- package/dist/{form-sizing-By94KzXE.js → form-sizing-BdP_Mf5p.js} +39 -44
- package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
- package/dist/{forms-Bzha-Y3B.js → forms-B9G_xwzi.js} +8 -8
- package/dist/{forms-Bzha-Y3B.js.map → forms-B9G_xwzi.js.map} +1 -1
- package/dist/{forms-numeric-C0bvjRPZ.js → forms-numeric-B_jraJaQ.js} +309 -309
- package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
- package/dist/{header-BOefOKd1.js → header-CGXuhcRm.js} +160 -153
- package/dist/header-CGXuhcRm.js.map +1 -0
- package/dist/{hooks-9k_TtmKh.js → hooks-Dkz0K2WT.js} +2 -2
- package/dist/{hooks-9k_TtmKh.js.map → hooks-Dkz0K2WT.js.map} +1 -1
- package/dist/{icon-badge-CAuKupo9.js → icon-badge-DYKIwvOV.js} +4 -4
- package/dist/{icon-badge-CAuKupo9.js.map → icon-badge-DYKIwvOV.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/input-CZw8iU99.js +21 -0
- package/dist/input-CZw8iU99.js.map +1 -0
- package/dist/input-DQdEd0YD.js +263 -0
- package/dist/input-DQdEd0YD.js.map +1 -0
- package/dist/{interaction-recipes-CHr0dJUs.js → interaction-recipes-XR9ZpVYL.js} +2 -1
- package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
- package/dist/item-K5_ghvze.js +275 -0
- package/dist/item-K5_ghvze.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 +71 -0
- package/dist/lib/editable-text-recipe.d.ts +4 -4
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/interaction-recipes.d.ts +5 -0
- package/dist/lib/theme-mode-css.d.ts +7 -0
- package/dist/lib/tone-recipes.d.ts +8 -0
- package/dist/lib/ui-provider/types.d.ts +2 -2
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-DcTtAaeC.js → media-gallery-3zIVLMWH.js} +8 -8
- package/dist/media-gallery-3zIVLMWH.js.map +1 -0
- package/dist/{mentions-D-uyCh01.js → mentions-utuUvH1K.js} +144 -142
- package/dist/mentions-utuUvH1K.js.map +1 -0
- package/dist/{message-CdHgIWKf.js → message-DZ_ruyUV.js} +6 -5
- package/dist/message-DZ_ruyUV.js.map +1 -0
- package/dist/{metadata-list-X5rYAKSB.js → metadata-list-8N16ZMW_.js} +130 -119
- package/dist/metadata-list-8N16ZMW_.js.map +1 -0
- package/dist/{navigation-D3KwXmaq.js → navigation-Bnotn4AQ.js} +19 -19
- package/dist/navigation-Bnotn4AQ.js.map +1 -0
- package/dist/{navigation-HJf5zxlH.js → navigation-BzhHI3lo.js} +36 -35
- package/dist/navigation-BzhHI3lo.js.map +1 -0
- package/dist/{navigation-row-recipes-BVowojQw.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
- package/dist/{navigation-row-recipes-BVowojQw.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
- package/dist/{number-DMhe-Vsk.js → number-DbV1Dija.js} +36 -34
- package/dist/{number-DMhe-Vsk.js.map → number-DbV1Dija.js.map} +1 -1
- package/dist/{overflow-tab-bar-sQHXLlwQ.js → overflow-tab-bar-CWY7Nogn.js} +105 -103
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
- package/dist/{overlays-I0axtYA6.js → overlays-DNWmZrJ4.js} +14 -12
- package/dist/overlays-DNWmZrJ4.js.map +1 -0
- package/dist/{page-B5dTH9gE.js → page-Bgl1F560.js} +8 -8
- package/dist/{page-B5dTH9gE.js.map → page-Bgl1F560.js.map} +1 -1
- package/dist/{page-header-commands-DjzFEq3E.js → page-header-commands-DOb6WsfD.js} +5 -5
- package/dist/{page-header-commands-DjzFEq3E.js.map → page-header-commands-DOb6WsfD.js.map} +1 -1
- package/dist/pagination-BL25hu2s.js +158 -0
- package/dist/pagination-BL25hu2s.js.map +1 -0
- package/dist/{popover-Di55PyAI.js → popover-7_m66eYW.js} +8 -7
- package/dist/{popover-Di55PyAI.js.map → popover-7_m66eYW.js.map} +1 -1
- package/dist/popover-menu-B9WWygpa.js +100 -0
- package/dist/popover-menu-B9WWygpa.js.map +1 -0
- package/dist/{popover.recipes-Bdyhj2db.js → popover.recipes-D3j8R8Yp.js} +17 -10
- package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
- package/dist/{primitives-B-CkiEMU.js → primitives-BFK08r9M.js} +45 -44
- package/dist/primitives-BFK08r9M.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-rnS8-uAW.js → progress-B1VnCT0K.js} +5 -5
- package/dist/{progress-rnS8-uAW.js.map → progress-B1VnCT0K.js.map} +1 -1
- package/dist/{receipt-D0oswZ0p.js → receipt-BVSOH3Xo.js} +9 -6
- package/dist/{receipt-D0oswZ0p.js.map → receipt-BVSOH3Xo.js.map} +1 -1
- package/dist/{rich-text-DvGulsNJ.js → rich-text-GOUyKQ-s.js} +3 -3
- package/dist/{rich-text-DvGulsNJ.js.map → rich-text-GOUyKQ-s.js.map} +1 -1
- package/dist/{rich-text-editor-sMU_Scqm.js → rich-text-editor-cRLC-eBK.js} +418 -426
- package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
- package/dist/{scroll-area-Bt_vXY2b.js → scroll-area-DcI-M1UT.js} +2 -2
- package/dist/{scroll-area-Bt_vXY2b.js.map → scroll-area-DcI-M1UT.js.map} +1 -1
- package/dist/{separator-C8DlRGwF.js → separator-BDV-Y648.js} +3 -3
- package/dist/{separator-C8DlRGwF.js.map → separator-BDV-Y648.js.map} +1 -1
- package/dist/{separator-CYHnjsAb.js → separator-Bom7NsGO.js} +2 -2
- package/dist/{separator-CYHnjsAb.js.map → separator-Bom7NsGO.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/{settings-CQW3b-Cu.js → settings-ybnjVwbd.js} +20 -19
- package/dist/settings-ybnjVwbd.js.map +1 -0
- package/dist/{sheet-4SEvVYzA.js → sheet-CGpB3omz.js} +8 -7
- package/dist/{sheet-4SEvVYzA.js.map → sheet-CGpB3omz.js.map} +1 -1
- package/dist/{sidebar-d7Dg80ln.js → sidebar-A0ElHINE.js} +14 -13
- package/dist/{sidebar-d7Dg80ln.js.map → sidebar-A0ElHINE.js.map} +1 -1
- package/dist/{sidebar-C7WWR29L.js → sidebar-CPx_7YBa.js} +183 -182
- package/dist/sidebar-CPx_7YBa.js.map +1 -0
- package/dist/{skeleton-Cz890JZF.js → skeleton-Byjnt7qr.js} +3 -3
- package/dist/{skeleton-Cz890JZF.js.map → skeleton-Byjnt7qr.js.map} +1 -1
- package/dist/smart-card-DiC5aac3.js +604 -0
- package/dist/smart-card-DiC5aac3.js.map +1 -0
- package/dist/{structure-DC2dygdA.js → structure-BmisBK-3.js} +2 -2
- package/dist/{structure-DC2dygdA.js.map → structure-BmisBK-3.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/table-BweFy_P9.js +1530 -0
- package/dist/table-BweFy_P9.js.map +1 -0
- package/dist/{table-CIKyLUsy.js → table-DsfzoUia.js} +75 -63
- package/dist/table-DsfzoUia.js.map +1 -0
- package/dist/{tabs-DwBJfjxX.js → tabs-CDocW5D1.js} +14 -13
- package/dist/tabs-CDocW5D1.js.map +1 -0
- package/dist/text-inputs-f9Ia-aCi.js +353 -0
- package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
- package/dist/theme-mode-css-BB-_RYab.js +14 -0
- package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
- package/dist/theme-scope-BJ6eE2xt.js +50 -0
- package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
- package/dist/theme.css +285 -228
- package/dist/themes/green.css +16 -12
- package/dist/timelines-CwM_9IhD.js +457 -0
- package/dist/timelines-CwM_9IhD.js.map +1 -0
- package/dist/{tone-recipes-CPoExcTE.js → tone-recipes-BPsRAvhu.js} +5 -2
- package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
- package/dist/{tooltip-CsfgrfS7.js → tooltip-yiRJUFjp.js} +4 -4
- package/dist/{tooltip-CsfgrfS7.js.map → tooltip-yiRJUFjp.js.map} +1 -1
- package/dist/{tree-BiKhg8AY.js → tree-WnKQzwbq.js} +9 -9
- package/dist/{tree-BiKhg8AY.js.map → tree-WnKQzwbq.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-DTRkE9zL.js → typography-UTnveOEy.js} +6 -6
- package/dist/typography-UTnveOEy.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-1D_NSYzO.js → ui-provider-C_U0Xma4.js} +3 -3
- package/dist/ui-provider-C_U0Xma4.js.map +1 -0
- package/dist/ui-provider.js +2 -2
- package/dist/{upload-BO8-CLN6.js → upload-CXyxmQBP.js} +13 -12
- package/dist/upload-CXyxmQBP.js.map +1 -0
- package/dist/{upload-queue-EOC8g1gf.js → upload-queue-Boscubn9.js} +11 -9
- package/dist/upload-queue-Boscubn9.js.map +1 -0
- package/dist/{usage-card-obRaBskq.js → usage-card-BhO5eqkX.js} +53 -37
- package/dist/usage-card-BhO5eqkX.js.map +1 -0
- package/dist/{utils-l5LpDw2z.js → utils-BRhFDwuU.js} +59 -44
- package/dist/utils-BRhFDwuU.js.map +1 -0
- package/dist/{value-inputs-TAYMX111.js → value-inputs-DXPDjvBU.js} +268 -252
- package/dist/value-inputs-DXPDjvBU.js.map +1 -0
- package/dist/{value-typography-b8wpz1eX.js → value-typography-BP8OG6h5.js} +2 -2
- package/dist/{value-typography-b8wpz1eX.js.map → value-typography-BP8OG6h5.js.map} +1 -1
- package/dist/{workspace-DH0v0KcB.js → workspace-Cdrg7k9f.js} +34 -33
- package/dist/workspace-Cdrg7k9f.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +2 -2
- package/docs/consumer-skill/references/agents-md.md +1 -1
- package/docs/consumer-skill/references/composition.md +8 -6
- package/docs/consumer-skill/references/integration.md +4 -3
- package/docs/consumer-skill/references/public-api.json +105 -2
- package/docs/consumer-skill/references/review.md +7 -0
- package/docs/consumer-skill/references/theming.md +71 -6
- package/docs/consumer-skill/references/tokens.json +1 -1
- package/docs/consumer-skill/references/workflows.md +25 -0
- package/docs/consumer-skill/scripts/composition-policy.mjs +3 -2
- package/docs/consumer-skill/scripts/surface-policy.mjs +11 -0
- package/package.json +8 -4
- package/dist/accordion-B6a3vVgA.js.map +0 -1
- package/dist/action-menu-TzCoSlwL.js +0 -280
- package/dist/action-menu-TzCoSlwL.js.map +0 -1
- package/dist/affordance-geometry.generated-B5iu-Mkr.js +0 -69
- package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +0 -1
- package/dist/ai-artifact-BMJdv-6q.js +0 -1115
- package/dist/ai-artifact-BMJdv-6q.js.map +0 -1
- package/dist/attachment-BtfhGm8i.js +0 -245
- package/dist/attachment-BtfhGm8i.js.map +0 -1
- package/dist/auth-CYxKfo69.js.map +0 -1
- package/dist/avatar-BBnEJIx8.js.map +0 -1
- package/dist/badge-MrKVNzW9.js.map +0 -1
- package/dist/batch-action-bar-BZGDG-Si.js.map +0 -1
- package/dist/breadcrumbs-D5t7I023.js.map +0 -1
- package/dist/buttons-SbIcm1HJ.js.map +0 -1
- package/dist/cards-CiiHpKYd.js +0 -66
- package/dist/cards-CiiHpKYd.js.map +0 -1
- package/dist/chart-QfrARkXl.js.map +0 -1
- package/dist/choice-inputs-t6w3ATNz.js.map +0 -1
- package/dist/code-block-Dgbu-CU3.js.map +0 -1
- package/dist/combobox-2Ic8N9bL.js +0 -278
- package/dist/combobox-2Ic8N9bL.js.map +0 -1
- package/dist/combobox-DLl0bfiq.js +0 -867
- package/dist/combobox-DLl0bfiq.js.map +0 -1
- package/dist/comments-BpDuCUUu.js.map +0 -1
- package/dist/data-display-DafIvCl5.js.map +0 -1
- package/dist/date-picker-CF-DtUpF.js.map +0 -1
- package/dist/date-pickers-BmzxJl5l.js +0 -174
- package/dist/date-pickers-BmzxJl5l.js.map +0 -1
- package/dist/display-DsQTVzMz.js.map +0 -1
- package/dist/dropdown-menu-E2qmdC7o.js +0 -193
- package/dist/dropdown-menu-E2qmdC7o.js.map +0 -1
- package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
- package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
- package/dist/feedback-qNuMBtRH.js +0 -233
- package/dist/feedback-qNuMBtRH.js.map +0 -1
- package/dist/field-affordance-recipes-qQeIf4lG.js.map +0 -1
- package/dist/filters-BkHH53uv.js.map +0 -1
- package/dist/form-field-DUt4UxSV.js.map +0 -1
- package/dist/form-sizing-By94KzXE.js.map +0 -1
- package/dist/forms-numeric-C0bvjRPZ.js.map +0 -1
- package/dist/header-BOefOKd1.js.map +0 -1
- package/dist/input-DWhBBBww.js +0 -262
- package/dist/input-DWhBBBww.js.map +0 -1
- package/dist/input-Ddi_LSYv.js +0 -20
- package/dist/input-Ddi_LSYv.js.map +0 -1
- package/dist/interaction-recipes-CHr0dJUs.js.map +0 -1
- package/dist/item-DEmDiTlD.js +0 -265
- package/dist/item-DEmDiTlD.js.map +0 -1
- package/dist/media-gallery-DcTtAaeC.js.map +0 -1
- package/dist/mentions-D-uyCh01.js.map +0 -1
- package/dist/message-CdHgIWKf.js.map +0 -1
- package/dist/metadata-list-X5rYAKSB.js.map +0 -1
- package/dist/navigation-D3KwXmaq.js.map +0 -1
- package/dist/navigation-HJf5zxlH.js.map +0 -1
- package/dist/overflow-tab-bar-sQHXLlwQ.js.map +0 -1
- package/dist/overlays-I0axtYA6.js.map +0 -1
- package/dist/pagination-3bPA_a6K.js +0 -149
- package/dist/pagination-3bPA_a6K.js.map +0 -1
- package/dist/popover-menu-B71Tn2Qz.js +0 -99
- package/dist/popover-menu-B71Tn2Qz.js.map +0 -1
- package/dist/popover.recipes-Bdyhj2db.js.map +0 -1
- package/dist/primitives-B-CkiEMU.js.map +0 -1
- package/dist/rich-text-editor-sMU_Scqm.js.map +0 -1
- package/dist/rich-text-editor.recipes-CadiF_Uu.js +0 -88
- package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +0 -1
- package/dist/settings-CQW3b-Cu.js.map +0 -1
- package/dist/sidebar-C7WWR29L.js.map +0 -1
- package/dist/smart-card-lFKxn5Hu.js +0 -595
- package/dist/smart-card-lFKxn5Hu.js.map +0 -1
- package/dist/spinner-fa3h1Aif.js +0 -80
- package/dist/spinner-fa3h1Aif.js.map +0 -1
- package/dist/table-CIKyLUsy.js.map +0 -1
- package/dist/table-CrcLN9Io.js +0 -1458
- package/dist/table-CrcLN9Io.js.map +0 -1
- package/dist/tabs-DwBJfjxX.js.map +0 -1
- package/dist/text-inputs-aaK9wcDT.js +0 -326
- package/dist/text-inputs-aaK9wcDT.js.map +0 -1
- package/dist/theme-scope-kStaAer0.js +0 -39
- package/dist/theme-scope-kStaAer0.js.map +0 -1
- package/dist/timelines-C_SBwHNP.js +0 -442
- package/dist/timelines-C_SBwHNP.js.map +0 -1
- package/dist/tone-recipes-CPoExcTE.js.map +0 -1
- package/dist/typography-DTRkE9zL.js.map +0 -1
- package/dist/ui-provider-1D_NSYzO.js.map +0 -1
- package/dist/upload-BO8-CLN6.js.map +0 -1
- package/dist/upload-queue-EOC8g1gf.js.map +0 -1
- package/dist/usage-card-obRaBskq.js.map +0 -1
- package/dist/utils-l5LpDw2z.js.map +0 -1
- package/dist/value-inputs-TAYMX111.js.map +0 -1
- package/dist/workspace-DH0v0KcB.js.map +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { s as e, u as t } from "./ui-provider-
|
|
2
|
+
import { s as e, u as t } from "./ui-provider-C_U0Xma4.js";
|
|
3
3
|
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-
|
|
5
|
-
import { i,
|
|
6
|
-
import { r as s, t as c } from "./structure-
|
|
7
|
-
import { h as l, p as u } from "./smart-card-
|
|
8
|
-
import { t as d } from "./interaction-recipes-
|
|
9
|
-
import { r as f } from "./field-affordance-recipes-
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { t as
|
|
15
|
-
import * as
|
|
16
|
-
import { forwardRef as
|
|
17
|
-
import { jsx as
|
|
18
|
-
import { AlertTriangle as
|
|
4
|
+
import { t as r } from "./utils-BRhFDwuU.js";
|
|
5
|
+
import { a as i, c as a, t as o } from "./typography-UTnveOEy.js";
|
|
6
|
+
import { r as s, t as c } from "./structure-BmisBK-3.js";
|
|
7
|
+
import { h as l, p as u } from "./smart-card-DiC5aac3.js";
|
|
8
|
+
import { t as d } from "./interaction-recipes-XR9ZpVYL.js";
|
|
9
|
+
import { r as f } from "./field-affordance-recipes-DZhnIL_Y.js";
|
|
10
|
+
import { d as p, m, p as h, s as g, y as _ } from "./form-sizing-BdP_Mf5p.js";
|
|
11
|
+
import { t as v } from "./input-DQdEd0YD.js";
|
|
12
|
+
import { t as y } from "./form-field-CwH9y77i.js";
|
|
13
|
+
import { _ as b, d as ee, f as te, g as x, l as S, p as C, v as w } from "./choice-inputs-CNHvARCJ.js";
|
|
14
|
+
import { t as T } from "./control-group-recipes-DBXmfh2E.js";
|
|
15
|
+
import * as E from "react";
|
|
16
|
+
import { forwardRef as D, memo as O, useCallback as k, useEffect as ne, useId as A, useMemo as j, useRef as M, useState as N } from "react";
|
|
17
|
+
import { jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
18
|
+
import { AlertTriangle as I, Minus as L, Plus as R } from "lucide-react";
|
|
19
19
|
//#region src/components/base/forms-numeric/decimal-input.tsx
|
|
20
|
-
var
|
|
20
|
+
var z = {
|
|
21
21
|
decrement: "Decrement",
|
|
22
22
|
increment: "Increment"
|
|
23
|
-
},
|
|
23
|
+
}, B = (e, t, n) => {
|
|
24
24
|
if (!e) return "";
|
|
25
25
|
let r = e;
|
|
26
26
|
if (r = r.replace(/,/g, "."), r = n ? r.replace(/[^\d.-]/g, "") : r.replace(/[^\d.]/g, ""), n && r.includes("-")) {
|
|
@@ -29,12 +29,12 @@ var R = {
|
|
|
29
29
|
}
|
|
30
30
|
let i = r.split(".");
|
|
31
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
|
-
},
|
|
32
|
+
}, V = (e, t, n) => {
|
|
33
33
|
if (!e || e === "-") return !0;
|
|
34
34
|
let r = parseFloat(e);
|
|
35
35
|
return Number.isNaN(r) ? !0 : !(t !== void 0 && r < t || n !== void 0 && r > n);
|
|
36
36
|
};
|
|
37
|
-
function
|
|
37
|
+
function H(e, t, n) {
|
|
38
38
|
let r = 10 ** t, i = e * r;
|
|
39
39
|
switch (n) {
|
|
40
40
|
case "floor": return Math.floor(i) / r;
|
|
@@ -46,32 +46,32 @@ function V(e, t, n) {
|
|
|
46
46
|
default: return Math.round(i) / r;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function U(e, t, n) {
|
|
50
50
|
let r = e;
|
|
51
51
|
return t !== void 0 && (r = Math.max(t, r)), n !== void 0 && (r = Math.min(n, r)), r;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function re(e, t, n, r, i = "round") {
|
|
54
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
55
|
return Number(s.toFixed(12));
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function W(e, t) {
|
|
58
58
|
let n = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
59
59
|
n ? n.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
60
60
|
}
|
|
61
|
-
var
|
|
61
|
+
var G = {
|
|
62
62
|
sm: "w-control-sm",
|
|
63
63
|
md: "w-control",
|
|
64
64
|
lg: "w-control-lg"
|
|
65
65
|
};
|
|
66
|
-
function
|
|
67
|
-
let { defaultScale: D } = e(),
|
|
66
|
+
function K({ decimalPlaces: t = 2, min: i, max: a, allowNegative: o = !0, allowEmpty: s = !0, step: c, roundingMode: l = "round", normalizeOnBlur: u = !0, onChange: f, onBlur: m, onKeyDown: h, placeholder: y, className: b, value: ee, defaultValue: te, disabled: x, size: S, strings: C, ...w }, T) {
|
|
67
|
+
let { defaultScale: D } = e(), O = _(S, D), ne = n(z, C), A = Math.min(12, Math.max(0, t)), j = E.useRef(null), M = x || w.loading || w.readOnly, N = k((e) => {
|
|
68
68
|
let t = e.target.value;
|
|
69
69
|
if (!t && s) {
|
|
70
70
|
f?.(e);
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
let n =
|
|
74
|
-
if (
|
|
73
|
+
let n = B(t, A, o);
|
|
74
|
+
if (V(n, i, a)) {
|
|
75
75
|
if (n !== t) {
|
|
76
76
|
let t = {
|
|
77
77
|
...e,
|
|
@@ -94,16 +94,16 @@ function G({ decimalPlaces: t = 2, min: i, max: a, allowNegative: o = !0, allowE
|
|
|
94
94
|
s,
|
|
95
95
|
i,
|
|
96
96
|
a
|
|
97
|
-
]),
|
|
98
|
-
if (
|
|
97
|
+
]), I = k((e) => {
|
|
98
|
+
if (m?.(e), !u) return;
|
|
99
99
|
let t = e.target.value;
|
|
100
100
|
if (!t && s) return;
|
|
101
101
|
let n = Number.parseFloat(t.replace(",", "."));
|
|
102
102
|
if (!Number.isFinite(n)) return;
|
|
103
|
-
let r =
|
|
104
|
-
r !== t && j.current &&
|
|
103
|
+
let r = H(U(n, i, a), A, l).toFixed(A);
|
|
104
|
+
r !== t && j.current && W(j.current, r);
|
|
105
105
|
}, [
|
|
106
|
-
|
|
106
|
+
m,
|
|
107
107
|
f,
|
|
108
108
|
u,
|
|
109
109
|
s,
|
|
@@ -111,12 +111,12 @@ function G({ decimalPlaces: t = 2, min: i, max: a, allowNegative: o = !0, allowE
|
|
|
111
111
|
a,
|
|
112
112
|
A,
|
|
113
113
|
l
|
|
114
|
-
]), K =
|
|
114
|
+
]), K = k((e) => {
|
|
115
115
|
if (M || c === void 0) return;
|
|
116
116
|
let t = j.current;
|
|
117
117
|
if (!t) return;
|
|
118
118
|
let n = t.value, r = Number.parseFloat(n.replace(",", "."));
|
|
119
|
-
|
|
119
|
+
W(t, H(U(re(Number.isFinite(r) ? r : i ?? 0, e, c, i, l), i, a), A, l).toFixed(A));
|
|
120
120
|
}, [
|
|
121
121
|
M,
|
|
122
122
|
c,
|
|
@@ -125,82 +125,82 @@ function G({ decimalPlaces: t = 2, min: i, max: a, allowNegative: o = !0, allowE
|
|
|
125
125
|
l,
|
|
126
126
|
A,
|
|
127
127
|
f
|
|
128
|
-
]), q = typeof c == "number" && c > 0, J =
|
|
129
|
-
|
|
128
|
+
]), q = typeof c == "number" && c > 0, J = k((e) => {
|
|
129
|
+
h?.(e), !e.defaultPrevented && q && (e.key === "ArrowUp" || e.key === "ArrowDown") && (e.preventDefault(), K(e.key === "ArrowUp" ? 1 : -1));
|
|
130
130
|
}, [
|
|
131
|
-
|
|
131
|
+
h,
|
|
132
132
|
q,
|
|
133
133
|
K
|
|
134
|
-
]), Y =
|
|
135
|
-
return q ? /* @__PURE__ */
|
|
136
|
-
className: r("decimal-input--component", "flex items-stretch overflow-hidden rounded-inner border border-input bg-transparent [&>.input--component]:h-full",
|
|
134
|
+
]), Y = y ?? (A > 0 ? `0.${"0".repeat(A)}` : "0");
|
|
135
|
+
return q ? /* @__PURE__ */ F("div", {
|
|
136
|
+
className: r("decimal-input--component", "flex items-stretch overflow-hidden rounded-inner border border-input bg-transparent [&>.input--component]:h-full", p[O], "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", x && "opacity-50 cursor-not-allowed"),
|
|
137
137
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ P("button", {
|
|
139
139
|
type: "button",
|
|
140
140
|
tabIndex: -1,
|
|
141
141
|
"aria-label": ne.decrement,
|
|
142
142
|
disabled: M,
|
|
143
143
|
onClick: () => K(-1),
|
|
144
|
-
className: r("
|
|
145
|
-
children: /* @__PURE__ */
|
|
144
|
+
className: r(d.nativeButtonReset, "inline-flex shrink-0 items-center justify-center border-e border-input text-muted-foreground transition-colors", G[O], d.rowHover, "disabled:pointer-events-none disabled:cursor-not-allowed", !x && "disabled:opacity-50"),
|
|
145
|
+
children: /* @__PURE__ */ P(L, {
|
|
146
146
|
"aria-hidden": "true",
|
|
147
|
-
className:
|
|
147
|
+
className: g[O]
|
|
148
148
|
})
|
|
149
149
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
size:
|
|
150
|
+
/* @__PURE__ */ P(v, {
|
|
151
|
+
size: O,
|
|
152
152
|
ref: (e) => {
|
|
153
|
-
j.current = e, typeof
|
|
153
|
+
j.current = e, typeof T == "function" ? T(e) : T && (T.current = e);
|
|
154
154
|
},
|
|
155
155
|
type: "text",
|
|
156
156
|
inputMode: A > 0 ? "decimal" : "numeric",
|
|
157
157
|
placeholder: Y,
|
|
158
|
-
onChange:
|
|
159
|
-
onBlur:
|
|
158
|
+
onChange: N,
|
|
159
|
+
onBlur: I,
|
|
160
160
|
onKeyDown: J,
|
|
161
|
-
value:
|
|
162
|
-
defaultValue:
|
|
163
|
-
disabled:
|
|
164
|
-
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",
|
|
161
|
+
value: ee,
|
|
162
|
+
defaultValue: te,
|
|
163
|
+
disabled: x,
|
|
164
|
+
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", b),
|
|
165
165
|
...w
|
|
166
166
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ P("button", {
|
|
168
168
|
type: "button",
|
|
169
169
|
tabIndex: -1,
|
|
170
170
|
"aria-label": ne.increment,
|
|
171
171
|
disabled: M,
|
|
172
172
|
onClick: () => K(1),
|
|
173
|
-
className: r("
|
|
174
|
-
children: /* @__PURE__ */
|
|
173
|
+
className: r(d.nativeButtonReset, "inline-flex shrink-0 items-center justify-center border-s border-input text-muted-foreground transition-colors", G[O], d.rowHover, "disabled:pointer-events-none disabled:cursor-not-allowed", !x && "disabled:opacity-50"),
|
|
174
|
+
children: /* @__PURE__ */ P(R, {
|
|
175
175
|
"aria-hidden": "true",
|
|
176
|
-
className:
|
|
176
|
+
className: g[O]
|
|
177
177
|
})
|
|
178
178
|
})
|
|
179
179
|
]
|
|
180
|
-
}) : /* @__PURE__ */
|
|
181
|
-
size:
|
|
180
|
+
}) : /* @__PURE__ */ P(v, {
|
|
181
|
+
size: O,
|
|
182
182
|
ref: (e) => {
|
|
183
|
-
j.current = e, typeof
|
|
183
|
+
j.current = e, typeof T == "function" ? T(e) : T && (T.current = e);
|
|
184
184
|
},
|
|
185
185
|
type: "text",
|
|
186
186
|
inputMode: A > 0 ? "decimal" : "numeric",
|
|
187
187
|
placeholder: Y,
|
|
188
|
-
onChange:
|
|
189
|
-
onBlur:
|
|
190
|
-
onKeyDown:
|
|
191
|
-
value:
|
|
192
|
-
defaultValue:
|
|
193
|
-
disabled:
|
|
194
|
-
className: r("tabular-nums text-end",
|
|
188
|
+
onChange: N,
|
|
189
|
+
onBlur: I,
|
|
190
|
+
onKeyDown: h,
|
|
191
|
+
value: ee,
|
|
192
|
+
defaultValue: te,
|
|
193
|
+
disabled: x,
|
|
194
|
+
className: r("tabular-nums text-end", b),
|
|
195
195
|
...w
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
var
|
|
199
|
-
|
|
198
|
+
var q = E.forwardRef(K);
|
|
199
|
+
q.displayName = "DecimalInput";
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/components/base/forms-numeric/percentage-input.tsx
|
|
202
|
-
var
|
|
203
|
-
return /* @__PURE__ */
|
|
202
|
+
var J = D(function({ decimalPlaces: e = 2, min: t = 0, max: n = 100, step: r, ...i }, a) {
|
|
203
|
+
return /* @__PURE__ */ P(q, {
|
|
204
204
|
className: "percentage-input--component",
|
|
205
205
|
ref: a,
|
|
206
206
|
decimalPlaces: e,
|
|
@@ -212,13 +212,13 @@ var q = E(function({ decimalPlaces: e = 2, min: t = 0, max: n = 100, step: r, ..
|
|
|
212
212
|
...i
|
|
213
213
|
});
|
|
214
214
|
});
|
|
215
|
-
|
|
215
|
+
J.displayName = "PercentageInput";
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region src/components/base/forms-numeric/currency-input.tsx
|
|
218
|
-
var
|
|
219
|
-
...
|
|
218
|
+
var Y = {
|
|
219
|
+
...z,
|
|
220
220
|
currencyAriaLabel: "Currency"
|
|
221
|
-
},
|
|
221
|
+
}, ie = {
|
|
222
222
|
USD: "$",
|
|
223
223
|
EUR: "€",
|
|
224
224
|
GBP: "£",
|
|
@@ -228,13 +228,13 @@ var J = {
|
|
|
228
228
|
CHF: "CHF",
|
|
229
229
|
CAD: "C$",
|
|
230
230
|
AUD: "A$"
|
|
231
|
-
},
|
|
231
|
+
}, X = (e) => !e || e.length === 0 ? [] : e.map((e) => typeof e == "string" ? {
|
|
232
232
|
value: e,
|
|
233
|
-
label: `${
|
|
233
|
+
label: `${ie[e] || e} ${e}`
|
|
234
234
|
} : e);
|
|
235
|
-
function
|
|
236
|
-
let { defaultScale:
|
|
237
|
-
|
|
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: M } = e(), I = _(E, M), L = n(Y, v), R = A(), z = j(() => X(s), [s]), [B, V] = N(o ?? z[0]?.value ?? ""), H = t !== void 0, U = H ? t : B;
|
|
237
|
+
ne(() => {
|
|
238
238
|
let e = {
|
|
239
239
|
currency: t,
|
|
240
240
|
defaultCurrency: o,
|
|
@@ -248,37 +248,37 @@ function X({ currency: t, defaultCurrency: o, currencies: s, onCurrencyChange: l
|
|
|
248
248
|
T,
|
|
249
249
|
U
|
|
250
250
|
]);
|
|
251
|
-
let re =
|
|
251
|
+
let re = k((e) => {
|
|
252
252
|
e !== null && (H || V(e), l?.(e));
|
|
253
|
-
}, [H, l]), W =
|
|
253
|
+
}, [H, l]), W = j(() => r("currency-input--selector-trigger", h(I), m), [I, m]), G = /* @__PURE__ */ F(c, {
|
|
254
254
|
gap: "xs",
|
|
255
255
|
className: "currency-input--selector",
|
|
256
|
-
children: [!!g && /* @__PURE__ */
|
|
256
|
+
children: [!!g && /* @__PURE__ */ P(i, {
|
|
257
257
|
htmlFor: R,
|
|
258
|
-
className: "currency-input--selector-label leading-6",
|
|
258
|
+
className: r("currency-input--selector-label text-inherit", "leading-6"),
|
|
259
259
|
children: g
|
|
260
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ F(x, {
|
|
261
261
|
value: U,
|
|
262
262
|
onValueChange: (e) => re(e),
|
|
263
|
-
disabled:
|
|
264
|
-
children: [/* @__PURE__ */
|
|
263
|
+
disabled: S || d,
|
|
264
|
+
children: [/* @__PURE__ */ P(b, {
|
|
265
265
|
id: R,
|
|
266
266
|
"aria-label": g || L.currencyAriaLabel,
|
|
267
|
-
"aria-invalid":
|
|
267
|
+
"aria-invalid": y || void 0,
|
|
268
268
|
iconClassName: f.icon[I],
|
|
269
269
|
className: W,
|
|
270
|
-
children: /* @__PURE__ */
|
|
270
|
+
children: /* @__PURE__ */ P(w, { placeholder: p ? /* @__PURE__ */ P(a, {
|
|
271
271
|
tag: "span",
|
|
272
272
|
size: "inherit",
|
|
273
273
|
type: "secondary",
|
|
274
274
|
lineHeight: "tight",
|
|
275
275
|
className: "text-inherit",
|
|
276
|
-
children:
|
|
276
|
+
children: p
|
|
277
277
|
}) : void 0 })
|
|
278
|
-
}), /* @__PURE__ */
|
|
278
|
+
}), /* @__PURE__ */ P(ee, { children: /* @__PURE__ */ P(te, { children: z.map((e) => /* @__PURE__ */ P(C, {
|
|
279
279
|
value: e.value,
|
|
280
280
|
size: I,
|
|
281
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ P(a, {
|
|
282
282
|
tag: "span",
|
|
283
283
|
size: "inherit",
|
|
284
284
|
lineHeight: "tight",
|
|
@@ -288,19 +288,19 @@ function X({ currency: t, defaultCurrency: o, currencies: s, onCurrencyChange: l
|
|
|
288
288
|
}, e.value)) }) })]
|
|
289
289
|
})]
|
|
290
290
|
});
|
|
291
|
-
return /* @__PURE__ */
|
|
291
|
+
return /* @__PURE__ */ F("div", {
|
|
292
292
|
className: r("currency-input--component", "flex items-end gap-space-md"),
|
|
293
293
|
children: [
|
|
294
294
|
u === "start" && G,
|
|
295
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ P("div", {
|
|
296
296
|
className: "currency-input--amount min-w-0 flex-1",
|
|
297
|
-
children: /* @__PURE__ */
|
|
298
|
-
ref:
|
|
297
|
+
children: /* @__PURE__ */ P(q, {
|
|
298
|
+
ref: O,
|
|
299
299
|
size: I,
|
|
300
300
|
decimalPlaces: 2,
|
|
301
301
|
allowNegative: !1,
|
|
302
|
-
disabled:
|
|
303
|
-
invalid:
|
|
302
|
+
disabled: S,
|
|
303
|
+
invalid: y,
|
|
304
304
|
strings: {
|
|
305
305
|
decrement: L.decrement,
|
|
306
306
|
increment: L.increment
|
|
@@ -312,21 +312,21 @@ function X({ currency: t, defaultCurrency: o, currencies: s, onCurrencyChange: l
|
|
|
312
312
|
]
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
-
var
|
|
316
|
-
|
|
315
|
+
var oe = O(D(ae));
|
|
316
|
+
oe.displayName = "CurrencyInput";
|
|
317
317
|
//#endregion
|
|
318
318
|
//#region src/components/base/forms-numeric/money-input.strings.ts
|
|
319
|
-
var
|
|
319
|
+
var se = {
|
|
320
320
|
originalValue: "Original value: {value}",
|
|
321
321
|
conversionWarning: "Currency will be converted from {from} to {to}."
|
|
322
322
|
};
|
|
323
|
-
function
|
|
323
|
+
function ce(e, t) {
|
|
324
324
|
return Object.entries(t).reduce((e, [t, n]) => e.replaceAll(`{${t}}`, n), e);
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region src/components/base/forms-numeric/money-input.tsx
|
|
328
|
-
var
|
|
329
|
-
function
|
|
328
|
+
var le = ["USD", "EUR"];
|
|
329
|
+
function ue(e) {
|
|
330
330
|
let t = String(e ?? "").trim();
|
|
331
331
|
if (!t) return null;
|
|
332
332
|
let n = Number.parseFloat(t.replace(",", "."));
|
|
@@ -335,14 +335,14 @@ function le(e) {
|
|
|
335
335
|
function Z(e) {
|
|
336
336
|
return typeof e == "string" ? e.trim() : "";
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function de(e) {
|
|
339
339
|
return typeof e == "string" ? e : e.value;
|
|
340
340
|
}
|
|
341
|
-
var
|
|
342
|
-
let L = t(), R = n(
|
|
343
|
-
let e = o?.length ? o : [z, ...
|
|
341
|
+
var fe = D(function({ currency: e, defaultCurrency: i, currencies: o, onCurrencyChange: s, onChangeData: d, money: f, label: p, hint: m, helperText: h, error: g, required: _, invalid: v, recordCurrency: b, showMigrationWarning: ee = !0, migrationWarningMessage: te, showOriginalHint: x = !0, controlStrings: S, controlClassName: C, strings: w, className: T, onChange: E, value: D, defaultValue: O, ...ne }, A) {
|
|
342
|
+
let L = t(), R = n(se, w), z = i ?? L.defaultCurrency ?? "USD", [B, V] = N(z), H = e ?? B, U = M(null), re = j(() => {
|
|
343
|
+
let e = o?.length ? o : [z, ...le], t = /* @__PURE__ */ new Map();
|
|
344
344
|
for (let n of e) {
|
|
345
|
-
let e =
|
|
345
|
+
let e = de(n);
|
|
346
346
|
t.has(e) || t.set(e, n);
|
|
347
347
|
}
|
|
348
348
|
let n = Array.from(t.values());
|
|
@@ -351,92 +351,92 @@ var de = E(function({ currency: e, defaultCurrency: i, currencies: o, onCurrency
|
|
|
351
351
|
H,
|
|
352
352
|
o,
|
|
353
353
|
z
|
|
354
|
-
]), W =
|
|
355
|
-
U.current = e, typeof
|
|
356
|
-
}, [
|
|
354
|
+
]), W = b ?? f?.recordCurrency ?? void 0, G = x ? Z(f?.pair?.formatted) : "", K = !!(W && H && W !== H), q = v ?? !!g, J = k((e) => {
|
|
355
|
+
U.current = e, typeof A == "function" ? A(e) : A && (A.current = e);
|
|
356
|
+
}, [A]), Y = k((e) => {
|
|
357
357
|
E?.(e), d?.({
|
|
358
|
-
amount:
|
|
358
|
+
amount: ue(e.target.value),
|
|
359
359
|
currency: H
|
|
360
360
|
});
|
|
361
361
|
}, [
|
|
362
362
|
H,
|
|
363
363
|
E,
|
|
364
364
|
d
|
|
365
|
-
]), ie =
|
|
365
|
+
]), ie = k((t) => {
|
|
366
366
|
e === void 0 && V(t), s?.(t), d?.({
|
|
367
|
-
amount:
|
|
367
|
+
amount: ue(U.current?.value ?? D ?? O),
|
|
368
368
|
currency: t
|
|
369
369
|
});
|
|
370
370
|
}, [
|
|
371
371
|
e,
|
|
372
|
-
|
|
372
|
+
O,
|
|
373
373
|
d,
|
|
374
374
|
s,
|
|
375
375
|
D
|
|
376
|
-
]), X = /* @__PURE__ */
|
|
376
|
+
]), X = /* @__PURE__ */ P(oe, {
|
|
377
377
|
...ne,
|
|
378
378
|
ref: J,
|
|
379
379
|
value: D,
|
|
380
|
-
defaultValue:
|
|
380
|
+
defaultValue: O,
|
|
381
381
|
currency: H,
|
|
382
382
|
currencies: re,
|
|
383
383
|
onChange: Y,
|
|
384
384
|
onCurrencyChange: ie,
|
|
385
385
|
invalid: q,
|
|
386
|
-
required:
|
|
387
|
-
"aria-required":
|
|
388
|
-
strings:
|
|
386
|
+
required: _,
|
|
387
|
+
"aria-required": _ ? !0 : ne["aria-required"],
|
|
388
|
+
strings: S,
|
|
389
389
|
className: C
|
|
390
|
-
}),
|
|
391
|
-
return /* @__PURE__ */
|
|
390
|
+
}), ae = !!(p || m || h || g || _);
|
|
391
|
+
return /* @__PURE__ */ F(c, {
|
|
392
392
|
gap: "sm",
|
|
393
393
|
className: r("money-input--component", T),
|
|
394
|
-
children: [/* @__PURE__ */
|
|
394
|
+
children: [/* @__PURE__ */ F(c, {
|
|
395
395
|
gap: "xs",
|
|
396
396
|
className: "money-input--field",
|
|
397
|
-
children: [
|
|
398
|
-
label:
|
|
399
|
-
hint:
|
|
400
|
-
helperText:
|
|
401
|
-
error:
|
|
402
|
-
required:
|
|
397
|
+
children: [ae ? /* @__PURE__ */ P(y, {
|
|
398
|
+
label: p,
|
|
399
|
+
hint: m,
|
|
400
|
+
helperText: h,
|
|
401
|
+
error: g,
|
|
402
|
+
required: _,
|
|
403
403
|
children: X
|
|
404
|
-
}) : X, !!G && !
|
|
404
|
+
}) : X, !!G && !g && /* @__PURE__ */ P(a, {
|
|
405
405
|
tag: "p",
|
|
406
406
|
size: "xs",
|
|
407
407
|
type: "secondary",
|
|
408
408
|
className: "money-input--original",
|
|
409
|
-
children:
|
|
409
|
+
children: ce(R.originalValue, { value: G })
|
|
410
410
|
})]
|
|
411
|
-
}), !!K &&
|
|
411
|
+
}), !!K && ee && /* @__PURE__ */ F(u, {
|
|
412
412
|
tone: "warning",
|
|
413
413
|
className: "money-input--warning",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ P(I, { "aria-hidden": "true" }), /* @__PURE__ */ P(l, { children: te ?? ce(R.conversionWarning, {
|
|
415
415
|
from: W ?? "",
|
|
416
416
|
to: H
|
|
417
417
|
}) })]
|
|
418
418
|
})]
|
|
419
419
|
});
|
|
420
420
|
});
|
|
421
|
-
|
|
421
|
+
fe.displayName = "MoneyInput";
|
|
422
422
|
//#endregion
|
|
423
423
|
//#region src/components/base/forms-numeric/rounding-mode-select.tsx
|
|
424
|
-
var
|
|
424
|
+
var pe = [
|
|
425
425
|
"floor",
|
|
426
426
|
"half_up",
|
|
427
427
|
"ceil"
|
|
428
|
-
],
|
|
428
|
+
], me = {
|
|
429
429
|
floor: "Round down",
|
|
430
430
|
half_up: "Round half up",
|
|
431
431
|
ceil: "Round up"
|
|
432
|
-
},
|
|
433
|
-
let n = Object.prototype.hasOwnProperty.call(e, "value"), { value: i, onValueChange: a, labels: o, placeholder: s, className: c, ...l } = e, u =
|
|
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 = j(() => pe.map((e) => ({
|
|
434
434
|
value: e,
|
|
435
|
-
label: o?.[e] ??
|
|
436
|
-
})), [o]), d =
|
|
435
|
+
label: o?.[e] ?? me[e] ?? e
|
|
436
|
+
})), [o]), d = k((e) => {
|
|
437
437
|
a?.(e);
|
|
438
438
|
}, [a]);
|
|
439
|
-
return /* @__PURE__ */
|
|
439
|
+
return /* @__PURE__ */ P(S, {
|
|
440
440
|
ref: t,
|
|
441
441
|
className: r("rounding-mode-select--component", c),
|
|
442
442
|
options: u,
|
|
@@ -446,10 +446,10 @@ var fe = [
|
|
|
446
446
|
...l
|
|
447
447
|
});
|
|
448
448
|
});
|
|
449
|
-
|
|
449
|
+
he.displayName = "RoundingModeSelect";
|
|
450
450
|
//#endregion
|
|
451
451
|
//#region src/components/base/forms-numeric/dimensions-input.tsx
|
|
452
|
-
var
|
|
452
|
+
var ge = {
|
|
453
453
|
width: "Width",
|
|
454
454
|
height: "Height",
|
|
455
455
|
depth: "Depth",
|
|
@@ -457,7 +457,7 @@ var he = {
|
|
|
457
457
|
widthPlaceholder: "0.00",
|
|
458
458
|
heightPlaceholder: "0.00",
|
|
459
459
|
depthPlaceholder: "0.00"
|
|
460
|
-
},
|
|
460
|
+
}, _e = [
|
|
461
461
|
{
|
|
462
462
|
value: "mm",
|
|
463
463
|
label: "mm"
|
|
@@ -482,7 +482,7 @@ var he = {
|
|
|
482
482
|
value: "px",
|
|
483
483
|
label: "px"
|
|
484
484
|
}
|
|
485
|
-
],
|
|
485
|
+
], ve = (e, t) => {
|
|
486
486
|
if (!e) return {
|
|
487
487
|
width: "",
|
|
488
488
|
height: "",
|
|
@@ -505,71 +505,71 @@ var he = {
|
|
|
505
505
|
height: "",
|
|
506
506
|
depth: ""
|
|
507
507
|
};
|
|
508
|
-
},
|
|
508
|
+
}, ye = (e, t, n, r) => r === "string" ? `${e}x${t}x${n}` : {
|
|
509
509
|
width: e,
|
|
510
510
|
height: t,
|
|
511
511
|
depth: n
|
|
512
|
-
},
|
|
513
|
-
let { defaultScale:
|
|
514
|
-
width: `${
|
|
515
|
-
height: `${
|
|
516
|
-
depth: `${
|
|
517
|
-
unit: `${
|
|
518
|
-
},
|
|
519
|
-
|
|
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: j, decimalPlaces: M = 2, min: I = 0, max: L, showUnitSelector: R = !0, disableUnitSelector: z = !1, layout: B = "horizontal", invalid: V, disabled: H = !1, className: U, size: re, strings: W }, G) {
|
|
513
|
+
let { defaultScale: K } = e(), J = _(re, K), Y = n(ge, W), ie = d ?? Y.width, X = p ?? Y.height, ae = g ?? Y.depth, oe = y ?? Y.unit, se = S ?? Y.widthPlaceholder, ce = E ?? Y.heightPlaceholder, le = D ?? Y.depthPlaceholder, ue = B === "horizontal", Z = B === "vertical", de = R === !0, fe = (v ?? "").length > 0, pe = Z ? ie : "", me = Z ? X : "", he = Z ? ae : "", be = A(), 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] = N(Ce.width), [Ee, De] = N(Ce.height), [Oe, ke] = N(Ce.depth), [Ae, je] = N(l || u), Me = ve(t, s), Ne = $ ? Me.width : we, Pe = $ ? Me.height : Ee, Fe = $ ? Me.depth : Oe, Ie = Se ? l : Ae;
|
|
519
|
+
ne(() => {
|
|
520
520
|
if ($) {
|
|
521
|
-
let e =
|
|
522
|
-
|
|
521
|
+
let e = ve(t, s);
|
|
522
|
+
Te(e.width), De(e.height), ke(e.depth);
|
|
523
523
|
}
|
|
524
524
|
}, [
|
|
525
525
|
t,
|
|
526
526
|
s,
|
|
527
527
|
$
|
|
528
528
|
]);
|
|
529
|
-
let
|
|
530
|
-
let n =
|
|
531
|
-
e === "width" && (n = t), e === "height" && (r = t), e === "depth" && (i = t), $ || (
|
|
532
|
-
let a =
|
|
533
|
-
|
|
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
534
|
}, [
|
|
535
|
-
Me,
|
|
536
535
|
Ne,
|
|
537
536
|
Pe,
|
|
537
|
+
Fe,
|
|
538
538
|
$,
|
|
539
539
|
s,
|
|
540
|
-
|
|
541
|
-
]),
|
|
540
|
+
O
|
|
541
|
+
]), Re = k((e) => {
|
|
542
542
|
if (e === null) return;
|
|
543
543
|
let t = e;
|
|
544
|
-
|
|
545
|
-
}, [
|
|
544
|
+
Se || je(t), j?.(t);
|
|
545
|
+
}, [Se, j]), ze = /* @__PURE__ */ F(c, {
|
|
546
546
|
gap: "xs",
|
|
547
|
-
children: [!!
|
|
547
|
+
children: [!!fe && Z && /* @__PURE__ */ P(i, {
|
|
548
548
|
htmlFor: Q.unit,
|
|
549
|
-
className:
|
|
550
|
-
children:
|
|
551
|
-
}), /* @__PURE__ */
|
|
552
|
-
value:
|
|
553
|
-
onValueChange: (e) =>
|
|
554
|
-
disabled:
|
|
555
|
-
children: [/* @__PURE__ */
|
|
549
|
+
className: xe,
|
|
550
|
+
children: v
|
|
551
|
+
}), /* @__PURE__ */ F(x, {
|
|
552
|
+
value: Ie,
|
|
553
|
+
onValueChange: (e) => Re(e),
|
|
554
|
+
disabled: H || z,
|
|
555
|
+
children: [/* @__PURE__ */ P(b, {
|
|
556
556
|
id: Q.unit,
|
|
557
|
-
"aria-label":
|
|
558
|
-
"aria-invalid":
|
|
559
|
-
iconClassName: f.icon[
|
|
560
|
-
className: r(
|
|
561
|
-
children: /* @__PURE__ */
|
|
557
|
+
"aria-label": v ?? Y.unit,
|
|
558
|
+
"aria-invalid": V || void 0,
|
|
559
|
+
iconClassName: f.icon[J],
|
|
560
|
+
className: r(h(J), B === "vertical" ? "w-full" : "w-full @md/dimensions-input:w-32"),
|
|
561
|
+
children: /* @__PURE__ */ P(w, { placeholder: /* @__PURE__ */ P(a, {
|
|
562
562
|
tag: "span",
|
|
563
563
|
size: "inherit",
|
|
564
564
|
type: "secondary",
|
|
565
565
|
lineHeight: "tight",
|
|
566
566
|
className: "text-inherit",
|
|
567
|
-
children:
|
|
567
|
+
children: oe
|
|
568
568
|
}) })
|
|
569
|
-
}), /* @__PURE__ */
|
|
569
|
+
}), /* @__PURE__ */ P(ee, { children: /* @__PURE__ */ P(te, { children: _e.map((e) => /* @__PURE__ */ P(C, {
|
|
570
570
|
value: e.value,
|
|
571
|
-
size:
|
|
572
|
-
children: /* @__PURE__ */
|
|
571
|
+
size: J,
|
|
572
|
+
children: /* @__PURE__ */ P(a, {
|
|
573
573
|
tag: "span",
|
|
574
574
|
size: "inherit",
|
|
575
575
|
lineHeight: "tight",
|
|
@@ -579,146 +579,146 @@ var he = {
|
|
|
579
579
|
}, e.value)) }) })]
|
|
580
580
|
})]
|
|
581
581
|
});
|
|
582
|
-
return /* @__PURE__ */
|
|
583
|
-
ref:
|
|
582
|
+
return /* @__PURE__ */ P(c, {
|
|
583
|
+
ref: G,
|
|
584
584
|
gap: "md",
|
|
585
|
-
className: r("dimensions-input--component @container/dimensions-input",
|
|
586
|
-
children: /* @__PURE__ */
|
|
587
|
-
direction:
|
|
585
|
+
className: r("dimensions-input--component @container/dimensions-input", U),
|
|
586
|
+
children: /* @__PURE__ */ F(c, {
|
|
587
|
+
direction: B === "vertical" ? "vertical" : "horizontal",
|
|
588
588
|
gap: "md",
|
|
589
|
-
align:
|
|
589
|
+
align: B === "vertical" ? "stretch" : "start",
|
|
590
590
|
className: "dimensions-input--fields",
|
|
591
591
|
children: [
|
|
592
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ F(c, {
|
|
593
593
|
gap: "xs",
|
|
594
594
|
className: "min-w-0 flex-1",
|
|
595
595
|
children: [
|
|
596
|
-
!!Z && !!
|
|
596
|
+
!!Z && !!pe && /* @__PURE__ */ P(i, {
|
|
597
597
|
htmlFor: Q.width,
|
|
598
|
-
className:
|
|
599
|
-
children:
|
|
598
|
+
className: xe,
|
|
599
|
+
children: pe
|
|
600
600
|
}),
|
|
601
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ P(q, {
|
|
602
602
|
id: Q.width,
|
|
603
|
-
size:
|
|
604
|
-
value:
|
|
605
|
-
onChange: (e) =>
|
|
606
|
-
placeholder:
|
|
607
|
-
decimalPlaces:
|
|
608
|
-
min:
|
|
609
|
-
max:
|
|
610
|
-
disabled:
|
|
611
|
-
invalid:
|
|
612
|
-
"aria-label":
|
|
603
|
+
size: J,
|
|
604
|
+
value: Ne,
|
|
605
|
+
onChange: (e) => Le("width", e.target.value),
|
|
606
|
+
placeholder: se,
|
|
607
|
+
decimalPlaces: M,
|
|
608
|
+
min: I,
|
|
609
|
+
max: L,
|
|
610
|
+
disabled: H,
|
|
611
|
+
invalid: V,
|
|
612
|
+
"aria-label": ie
|
|
613
613
|
}),
|
|
614
|
-
!!
|
|
614
|
+
!!ue && /* @__PURE__ */ P(a, {
|
|
615
615
|
size: "xs",
|
|
616
616
|
type: "secondary",
|
|
617
617
|
className: "text-center",
|
|
618
|
-
children:
|
|
618
|
+
children: ie
|
|
619
619
|
})
|
|
620
620
|
]
|
|
621
621
|
}),
|
|
622
|
-
|
|
622
|
+
B === "horizontal" && /* @__PURE__ */ P("div", {
|
|
623
623
|
"aria-hidden": "true",
|
|
624
|
-
className: r("dimensions-input--separator flex items-center",
|
|
625
|
-
children: /* @__PURE__ */
|
|
624
|
+
className: r("dimensions-input--separator flex items-center", T[J]),
|
|
625
|
+
children: /* @__PURE__ */ P(a, {
|
|
626
626
|
tag: "span",
|
|
627
627
|
type: "secondary",
|
|
628
628
|
children: "×"
|
|
629
629
|
})
|
|
630
630
|
}),
|
|
631
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ F(c, {
|
|
632
632
|
gap: "xs",
|
|
633
633
|
className: "min-w-0 flex-1",
|
|
634
634
|
children: [
|
|
635
|
-
!!Z && !!
|
|
635
|
+
!!Z && !!me && /* @__PURE__ */ P(i, {
|
|
636
636
|
htmlFor: Q.height,
|
|
637
|
-
className:
|
|
638
|
-
children:
|
|
637
|
+
className: xe,
|
|
638
|
+
children: me
|
|
639
639
|
}),
|
|
640
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ P(q, {
|
|
641
641
|
id: Q.height,
|
|
642
|
-
size:
|
|
643
|
-
value:
|
|
644
|
-
onChange: (e) =>
|
|
645
|
-
placeholder:
|
|
646
|
-
decimalPlaces:
|
|
647
|
-
min:
|
|
648
|
-
max:
|
|
649
|
-
disabled:
|
|
650
|
-
invalid:
|
|
651
|
-
"aria-label":
|
|
642
|
+
size: J,
|
|
643
|
+
value: Pe,
|
|
644
|
+
onChange: (e) => Le("height", e.target.value),
|
|
645
|
+
placeholder: ce,
|
|
646
|
+
decimalPlaces: M,
|
|
647
|
+
min: I,
|
|
648
|
+
max: L,
|
|
649
|
+
disabled: H,
|
|
650
|
+
invalid: V,
|
|
651
|
+
"aria-label": X
|
|
652
652
|
}),
|
|
653
|
-
!!
|
|
653
|
+
!!ue && /* @__PURE__ */ P(a, {
|
|
654
654
|
size: "xs",
|
|
655
655
|
type: "secondary",
|
|
656
656
|
className: "text-center",
|
|
657
|
-
children:
|
|
657
|
+
children: X
|
|
658
658
|
})
|
|
659
659
|
]
|
|
660
660
|
}),
|
|
661
|
-
|
|
661
|
+
B === "horizontal" && /* @__PURE__ */ P("div", {
|
|
662
662
|
"aria-hidden": "true",
|
|
663
|
-
className: r("dimensions-input--separator flex items-center",
|
|
664
|
-
children: /* @__PURE__ */
|
|
663
|
+
className: r("dimensions-input--separator flex items-center", T[J]),
|
|
664
|
+
children: /* @__PURE__ */ P(a, {
|
|
665
665
|
tag: "span",
|
|
666
666
|
type: "secondary",
|
|
667
667
|
children: "×"
|
|
668
668
|
})
|
|
669
669
|
}),
|
|
670
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ F(c, {
|
|
671
671
|
gap: "xs",
|
|
672
672
|
className: "min-w-0 flex-1",
|
|
673
673
|
children: [
|
|
674
|
-
!!Z && !!
|
|
674
|
+
!!Z && !!he && /* @__PURE__ */ P(i, {
|
|
675
675
|
htmlFor: Q.depth,
|
|
676
|
-
className:
|
|
677
|
-
children:
|
|
676
|
+
className: xe,
|
|
677
|
+
children: he
|
|
678
678
|
}),
|
|
679
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ P(q, {
|
|
680
680
|
id: Q.depth,
|
|
681
|
-
size:
|
|
682
|
-
value:
|
|
683
|
-
onChange: (e) =>
|
|
684
|
-
placeholder:
|
|
685
|
-
decimalPlaces:
|
|
686
|
-
min:
|
|
687
|
-
max:
|
|
688
|
-
disabled:
|
|
689
|
-
invalid:
|
|
690
|
-
"aria-label":
|
|
681
|
+
size: J,
|
|
682
|
+
value: Fe,
|
|
683
|
+
onChange: (e) => Le("depth", e.target.value),
|
|
684
|
+
placeholder: le,
|
|
685
|
+
decimalPlaces: M,
|
|
686
|
+
min: I,
|
|
687
|
+
max: L,
|
|
688
|
+
disabled: H,
|
|
689
|
+
invalid: V,
|
|
690
|
+
"aria-label": ae
|
|
691
691
|
}),
|
|
692
|
-
!!
|
|
692
|
+
!!ue && /* @__PURE__ */ P(a, {
|
|
693
693
|
size: "xs",
|
|
694
694
|
type: "secondary",
|
|
695
695
|
className: "text-center",
|
|
696
|
-
children:
|
|
696
|
+
children: ae
|
|
697
697
|
})
|
|
698
698
|
]
|
|
699
699
|
}),
|
|
700
|
-
!!
|
|
700
|
+
!!de && /* @__PURE__ */ F(c, {
|
|
701
701
|
gap: "xs",
|
|
702
|
-
className: r("dimensions-input--unit",
|
|
703
|
-
children: [
|
|
702
|
+
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"),
|
|
703
|
+
children: [ze, !!ue && /* @__PURE__ */ P(a, {
|
|
704
704
|
size: "xs",
|
|
705
705
|
type: "secondary",
|
|
706
706
|
className: "text-center",
|
|
707
|
-
children:
|
|
707
|
+
children: fe ? v : oe
|
|
708
708
|
})]
|
|
709
709
|
})
|
|
710
710
|
]
|
|
711
711
|
})
|
|
712
712
|
});
|
|
713
713
|
});
|
|
714
|
-
|
|
714
|
+
be.displayName = "DimensionsInput";
|
|
715
715
|
//#endregion
|
|
716
716
|
//#region src/components/base/forms-numeric/weight-input.tsx
|
|
717
717
|
var Q = {
|
|
718
718
|
unitLabel: "",
|
|
719
719
|
unitAriaLabel: "Unit",
|
|
720
720
|
unitPlaceholder: ""
|
|
721
|
-
},
|
|
721
|
+
}, xe = [
|
|
722
722
|
{
|
|
723
723
|
value: "g",
|
|
724
724
|
label: "g"
|
|
@@ -735,47 +735,47 @@ var Q = {
|
|
|
735
735
|
value: "oz",
|
|
736
736
|
label: "oz"
|
|
737
737
|
}
|
|
738
|
-
], $ =
|
|
739
|
-
let { defaultScale: I } = e(), L =
|
|
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: ne }, M) {
|
|
739
|
+
let { defaultScale: I } = e(), L = _(O, I), R = n(Q, T), z = t !== void 0, B = s !== void 0, [V, H] = N(o ?? ""), [U, re] = N(s ?? l), W = z ? t ?? "" : V, G = B ? s ?? l : U, K = k((e) => {
|
|
740
740
|
z || H(e.target.value), u?.({ target: { value: e.target.value } });
|
|
741
|
-
}, [z, u]), J =
|
|
741
|
+
}, [z, u]), J = k((e) => {
|
|
742
742
|
if (e === null) return;
|
|
743
743
|
let t = e;
|
|
744
744
|
B || re(t), d?.(t);
|
|
745
|
-
}, [B, d]), Y =
|
|
746
|
-
return /* @__PURE__ */
|
|
747
|
-
ref:
|
|
748
|
-
className: r("weight-input--component", "flex items-end gap-space-md",
|
|
749
|
-
children: [/* @__PURE__ */
|
|
745
|
+
}, [B, d]), Y = j(() => xe, []), ie = R.unitLabel !== "", X = A();
|
|
746
|
+
return /* @__PURE__ */ F("div", {
|
|
747
|
+
ref: M,
|
|
748
|
+
className: r("weight-input--component", "flex items-end gap-space-md", ne),
|
|
749
|
+
children: [/* @__PURE__ */ P("div", {
|
|
750
750
|
className: "flex-1",
|
|
751
|
-
children: /* @__PURE__ */
|
|
751
|
+
children: /* @__PURE__ */ P(q, {
|
|
752
752
|
size: L,
|
|
753
753
|
value: W,
|
|
754
|
-
onChange:
|
|
755
|
-
decimalPlaces:
|
|
754
|
+
onChange: K,
|
|
755
|
+
decimalPlaces: p,
|
|
756
756
|
allowNegative: !1,
|
|
757
|
-
min:
|
|
757
|
+
min: m,
|
|
758
758
|
max: g,
|
|
759
759
|
disabled: D,
|
|
760
760
|
invalid: E
|
|
761
761
|
})
|
|
762
|
-
}), !!
|
|
762
|
+
}), !!v && /* @__PURE__ */ F(c, {
|
|
763
763
|
gap: "xs",
|
|
764
|
-
children: [!!ie && /* @__PURE__ */
|
|
764
|
+
children: [!!ie && /* @__PURE__ */ P(i, {
|
|
765
765
|
htmlFor: X,
|
|
766
|
-
className: "leading-6",
|
|
766
|
+
className: r("text-inherit", "leading-6"),
|
|
767
767
|
children: R.unitLabel
|
|
768
|
-
}), /* @__PURE__ */
|
|
768
|
+
}), /* @__PURE__ */ F(x, {
|
|
769
769
|
value: G,
|
|
770
770
|
onValueChange: (e) => J(e),
|
|
771
|
-
disabled: D ||
|
|
772
|
-
children: [/* @__PURE__ */
|
|
771
|
+
disabled: D || y,
|
|
772
|
+
children: [/* @__PURE__ */ P(b, {
|
|
773
773
|
id: X,
|
|
774
774
|
"aria-label": R.unitLabel || R.unitAriaLabel,
|
|
775
775
|
"aria-invalid": E || void 0,
|
|
776
776
|
iconClassName: f.icon[L],
|
|
777
|
-
className: r(
|
|
778
|
-
children: /* @__PURE__ */
|
|
777
|
+
className: r(h(L), S),
|
|
778
|
+
children: /* @__PURE__ */ P(w, { placeholder: R.unitPlaceholder ? /* @__PURE__ */ P(a, {
|
|
779
779
|
tag: "span",
|
|
780
780
|
size: "inherit",
|
|
781
781
|
type: "secondary",
|
|
@@ -783,10 +783,10 @@ var Q = {
|
|
|
783
783
|
className: "text-inherit",
|
|
784
784
|
children: R.unitPlaceholder
|
|
785
785
|
}) : void 0 })
|
|
786
|
-
}), /* @__PURE__ */
|
|
786
|
+
}), /* @__PURE__ */ P(ee, { children: /* @__PURE__ */ P(te, { children: Y.map((e) => /* @__PURE__ */ P(C, {
|
|
787
787
|
value: e.value,
|
|
788
788
|
size: L,
|
|
789
|
-
children: /* @__PURE__ */
|
|
789
|
+
children: /* @__PURE__ */ P(a, {
|
|
790
790
|
tag: "span",
|
|
791
791
|
size: "inherit",
|
|
792
792
|
lineHeight: "tight",
|
|
@@ -801,13 +801,13 @@ var Q = {
|
|
|
801
801
|
$.displayName = "WeightInput";
|
|
802
802
|
//#endregion
|
|
803
803
|
//#region src/components/base/forms-numeric/coordinates-input.tsx
|
|
804
|
-
var
|
|
804
|
+
var Se = {
|
|
805
805
|
latLabel: "",
|
|
806
806
|
lngLabel: "",
|
|
807
807
|
latPlaceholder: "",
|
|
808
808
|
lngPlaceholder: "",
|
|
809
809
|
previewLinkLabel: ""
|
|
810
|
-
},
|
|
810
|
+
}, Ce = (e, t) => {
|
|
811
811
|
if (!e) return {
|
|
812
812
|
lat: "",
|
|
813
813
|
lng: ""
|
|
@@ -826,46 +826,46 @@ var xe = {
|
|
|
826
826
|
lat: "",
|
|
827
827
|
lng: ""
|
|
828
828
|
};
|
|
829
|
-
},
|
|
829
|
+
}, we = (e, t, n) => n === "string" ? `${e},${t}` : {
|
|
830
830
|
lat: e,
|
|
831
831
|
lng: t
|
|
832
|
-
},
|
|
832
|
+
}, Te = (e, t, n) => {
|
|
833
833
|
if (!e) return !1;
|
|
834
834
|
let r = Number(e);
|
|
835
835
|
return Number.isFinite(r) && r >= t && r <= n;
|
|
836
|
-
},
|
|
837
|
-
let
|
|
838
|
-
|
|
839
|
-
v && (
|
|
836
|
+
}, 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) {
|
|
837
|
+
let _ = n(Se, d), v = e !== void 0, b = Ce(v ? e : t, i), [ee, te] = N(b.lat), [x, S] = N(b.lng), C = Ce(e, i), w = v ? C.lat : ee, T = v ? C.lng : x;
|
|
838
|
+
ne(() => {
|
|
839
|
+
v && (te(C.lat), S(C.lng));
|
|
840
840
|
}, [
|
|
841
841
|
v,
|
|
842
842
|
C.lat,
|
|
843
843
|
C.lng
|
|
844
844
|
]);
|
|
845
|
-
let E =
|
|
846
|
-
v || (
|
|
845
|
+
let E = k((e, t) => {
|
|
846
|
+
v || (te(e), S(t)), a?.({ target: { value: we(e, t, i) } });
|
|
847
847
|
}, [
|
|
848
848
|
v,
|
|
849
849
|
a,
|
|
850
850
|
i
|
|
851
|
-
]), D =
|
|
852
|
-
let e =
|
|
851
|
+
]), D = j(() => {
|
|
852
|
+
let e = Te(w, -90, 90), t = Te(T, -180, 180);
|
|
853
853
|
return !e || !t ? null : `https://www.google.com/maps?q=${encodeURIComponent(`${w},${T}`)}`;
|
|
854
854
|
}, [w, T]);
|
|
855
|
-
return /* @__PURE__ */
|
|
856
|
-
ref:
|
|
855
|
+
return /* @__PURE__ */ F(c, {
|
|
856
|
+
ref: g,
|
|
857
857
|
gap: "lg",
|
|
858
|
-
className: r("coordinates-input--component",
|
|
859
|
-
children: [/* @__PURE__ */
|
|
858
|
+
className: r("coordinates-input--component", p),
|
|
859
|
+
children: [/* @__PURE__ */ F(s, {
|
|
860
860
|
columns: {
|
|
861
861
|
base: 1,
|
|
862
862
|
md: 2
|
|
863
863
|
},
|
|
864
864
|
gap: "lg",
|
|
865
|
-
children: [/* @__PURE__ */
|
|
866
|
-
label:
|
|
867
|
-
children: /* @__PURE__ */
|
|
868
|
-
placeholder:
|
|
865
|
+
children: [/* @__PURE__ */ P(y, {
|
|
866
|
+
label: _.latLabel || void 0,
|
|
867
|
+
children: /* @__PURE__ */ P(q, {
|
|
868
|
+
placeholder: _.latPlaceholder || void 0,
|
|
869
869
|
value: w,
|
|
870
870
|
onChange: (e) => E(e.target.value, T),
|
|
871
871
|
decimalPlaces: l,
|
|
@@ -873,13 +873,13 @@ var xe = {
|
|
|
873
873
|
min: -90,
|
|
874
874
|
max: 90,
|
|
875
875
|
invalid: f,
|
|
876
|
-
disabled:
|
|
877
|
-
size:
|
|
876
|
+
disabled: m,
|
|
877
|
+
size: h
|
|
878
878
|
})
|
|
879
|
-
}), /* @__PURE__ */
|
|
880
|
-
label:
|
|
881
|
-
children: /* @__PURE__ */
|
|
882
|
-
placeholder:
|
|
879
|
+
}), /* @__PURE__ */ P(y, {
|
|
880
|
+
label: _.lngLabel || void 0,
|
|
881
|
+
children: /* @__PURE__ */ P(q, {
|
|
882
|
+
placeholder: _.lngPlaceholder || void 0,
|
|
883
883
|
value: T,
|
|
884
884
|
onChange: (e) => E(w, e.target.value),
|
|
885
885
|
decimalPlaces: l,
|
|
@@ -887,20 +887,20 @@ var xe = {
|
|
|
887
887
|
min: -180,
|
|
888
888
|
max: 180,
|
|
889
889
|
invalid: f,
|
|
890
|
-
disabled:
|
|
891
|
-
size:
|
|
890
|
+
disabled: m,
|
|
891
|
+
size: h
|
|
892
892
|
})
|
|
893
893
|
})]
|
|
894
|
-
}), !!u && !!D && !!
|
|
894
|
+
}), !!u && !!D && !!_.previewLinkLabel && /* @__PURE__ */ P(o, {
|
|
895
895
|
href: D,
|
|
896
896
|
type: "secondary",
|
|
897
897
|
underline: !1,
|
|
898
|
-
children:
|
|
898
|
+
children: _.previewLinkLabel
|
|
899
899
|
})]
|
|
900
900
|
});
|
|
901
901
|
});
|
|
902
|
-
|
|
902
|
+
Ee.displayName = "CoordinatesInput";
|
|
903
903
|
//#endregion
|
|
904
|
-
export {
|
|
904
|
+
export { he as a, oe as c, q as d, be as i, Y as l, $ as n, fe as o, Q as r, se as s, Ee as t, J as u };
|
|
905
905
|
|
|
906
|
-
//# sourceMappingURL=forms-numeric-
|
|
906
|
+
//# sourceMappingURL=forms-numeric-B_jraJaQ.js.map
|