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,867 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { s as e, v as t } from "./ui-provider-1D_NSYzO.js";
|
|
3
|
-
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-l5LpDw2z.js";
|
|
5
|
-
import { n as i } from "./buttons-SbIcm1HJ.js";
|
|
6
|
-
import { a, s as o } from "./typography-DTRkE9zL.js";
|
|
7
|
-
import { t as s } from "./structure-DC2dygdA.js";
|
|
8
|
-
import { t as c } from "./tone-recipes-CPoExcTE.js";
|
|
9
|
-
import { t as l } from "./feedback-qNuMBtRH.js";
|
|
10
|
-
import { t as u } from "./layer-recipes-CCpklYME.js";
|
|
11
|
-
import { n as d, r as f } from "./field-affordance-recipes-qQeIf4lG.js";
|
|
12
|
-
import { S as p, b as m, d as h, g, h as _, l as v, m as y, n as b, o as x, p as S, r as C, u as w, x as T, y as E } from "./combobox-2Ic8N9bL.js";
|
|
13
|
-
import { c as D, l as O } from "./form-sizing-By94KzXE.js";
|
|
14
|
-
import { t as k } from "./input-DWhBBBww.js";
|
|
15
|
-
import { t as A } from "./scroll-area-Bt_vXY2b.js";
|
|
16
|
-
import { t as j } from "./use-debounced-callback-Cx1h-hdv.js";
|
|
17
|
-
import * as M from "react";
|
|
18
|
-
import { useCallback as N, useEffect as P, useMemo as F, useRef as I, useState as L } from "react";
|
|
19
|
-
import { Fragment as ee, jsx as R, jsxs as z } from "react/jsx-runtime";
|
|
20
|
-
import { ChevronDownIcon as te, Loader2 as B, PlusIcon as ne, XIcon as V } from "lucide-react";
|
|
21
|
-
import { Combobox as H } from "@base-ui/react/combobox";
|
|
22
|
-
//#region src/components/features/combobox/combobox.strings.ts
|
|
23
|
-
var U = {
|
|
24
|
-
placeholder: "Search...",
|
|
25
|
-
clear: "Clear selection",
|
|
26
|
-
toggle: "Open options",
|
|
27
|
-
searching: "Loading...",
|
|
28
|
-
noResults: "No results found.",
|
|
29
|
-
typeToSearch: "Type at least {min} characters to search...",
|
|
30
|
-
typeMore: "Type {remaining} more character{s} to search...",
|
|
31
|
-
createNew: "Create {value}",
|
|
32
|
-
loadingMore: "Loading...",
|
|
33
|
-
apply: "Apply",
|
|
34
|
-
cancel: "Cancel"
|
|
35
|
-
}, W = Symbol("combobox-create-option");
|
|
36
|
-
function G(e) {
|
|
37
|
-
return typeof e == "object" && !!e && W in e;
|
|
38
|
-
}
|
|
39
|
-
function K(e) {
|
|
40
|
-
if (!G(e)) throw Error("Item is not a create option");
|
|
41
|
-
return e[W];
|
|
42
|
-
}
|
|
43
|
-
function q(e) {
|
|
44
|
-
return { [W]: e };
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/components/features/combobox/components/loading-more.tsx
|
|
48
|
-
function re({ loading: e, text: t, className: n }) {
|
|
49
|
-
return e ? /* @__PURE__ */ z(s, {
|
|
50
|
-
direction: "horizontal",
|
|
51
|
-
gap: "sm",
|
|
52
|
-
justify: "center",
|
|
53
|
-
wrap: !1,
|
|
54
|
-
className: r("loading-more--component", "px-control py-space-xs text-xs text-muted-foreground", n),
|
|
55
|
-
role: "status",
|
|
56
|
-
"aria-live": "polite",
|
|
57
|
-
children: [/* @__PURE__ */ R(B, {
|
|
58
|
-
className: "size-icon-sm animate-spin",
|
|
59
|
-
"aria-hidden": "true"
|
|
60
|
-
}), /* @__PURE__ */ R(o, {
|
|
61
|
-
tag: "span",
|
|
62
|
-
size: "xs",
|
|
63
|
-
type: "secondary",
|
|
64
|
-
className: "text-inherit",
|
|
65
|
-
children: t
|
|
66
|
-
})]
|
|
67
|
-
}) : null;
|
|
68
|
-
}
|
|
69
|
-
re.displayName = "LoadingMore";
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region src/components/features/combobox/components/status-content.tsx
|
|
72
|
-
function J({ children: e }) {
|
|
73
|
-
return /* @__PURE__ */ R(o, {
|
|
74
|
-
tag: "span",
|
|
75
|
-
size: "inherit",
|
|
76
|
-
type: "secondary",
|
|
77
|
-
className: "text-inherit",
|
|
78
|
-
children: e
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function Y({ loading: e, searchValue: t, minSearchLength: n, itemCount: r, strings: i }) {
|
|
82
|
-
let a = t.trim();
|
|
83
|
-
if (e) return /* @__PURE__ */ z(ee, { children: [/* @__PURE__ */ R(B, { className: "size-icon-sm animate-spin" }), /* @__PURE__ */ R(J, { children: i.searching })] });
|
|
84
|
-
if (a === "") return i.typeToSearch.includes("{min}") ? /* @__PURE__ */ R(J, { children: i.typeToSearch.replace("{min}", String(n)) }) : /* @__PURE__ */ R(J, { children: i.typeToSearch });
|
|
85
|
-
if (a.length < n) {
|
|
86
|
-
let e = n - a.length;
|
|
87
|
-
return i.typeMore.includes("{remaining}") || i.typeMore.includes("{s}") ? /* @__PURE__ */ R(J, { children: i.typeMore.replace("{remaining}", String(e)).replace("{s}", e === 1 ? "" : "s") }) : /* @__PURE__ */ R(J, { children: i.typeMore });
|
|
88
|
-
}
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
Y.displayName = "StatusContent";
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/components/features/combobox/components/combobox-dropdown.tsx
|
|
94
|
-
var ie = {
|
|
95
|
-
sm: "sm",
|
|
96
|
-
md: "md",
|
|
97
|
-
lg: "lg"
|
|
98
|
-
}, ae = {
|
|
99
|
-
sm: "flex min-h-control-sm items-center justify-center px-row-x py-row-y text-center text-pxs leading-tight text-muted-foreground",
|
|
100
|
-
md: "flex min-h-control items-center justify-center px-row-x py-row-y text-center text-sm leading-tight text-muted-foreground",
|
|
101
|
-
lg: "flex min-h-control-lg items-center justify-center px-row-x py-row-y-lg text-center text-sm leading-tight text-muted-foreground"
|
|
102
|
-
};
|
|
103
|
-
function oe({ loading: e, showStatus: t, showEmpty: n, searchValue: c, minSearchLength: l, items: d, groupedItems: f, createOptionItem: h, renderItemContent: v, getItemReactKey: x, getItemDisabled: w, renderGroupLabel: D, loadingMore: O, strings: k, size: j = "md", portalContainer: M, listRef: N, anchor: P, applyFooter: F }) {
|
|
104
|
-
let I = M == null ? void 0 : u.nestedOverlay, L = ie[j];
|
|
105
|
-
if (!(t || n || d.length > 0 || O || F)) return null;
|
|
106
|
-
let te = /* @__PURE__ */ R(T, {
|
|
107
|
-
anchor: P,
|
|
108
|
-
className: I,
|
|
109
|
-
children: /* @__PURE__ */ z(C, {
|
|
110
|
-
"aria-busy": e || void 0,
|
|
111
|
-
className: r("combobox-dropdown--popup"),
|
|
112
|
-
children: [
|
|
113
|
-
!!t && /* @__PURE__ */ R(p, {
|
|
114
|
-
className: "gap-space-sm px-control py-space-xs text-xs text-muted-foreground",
|
|
115
|
-
children: /* @__PURE__ */ R(Y, {
|
|
116
|
-
loading: e,
|
|
117
|
-
searchValue: c,
|
|
118
|
-
minSearchLength: l,
|
|
119
|
-
itemCount: d.length,
|
|
120
|
-
strings: k
|
|
121
|
-
})
|
|
122
|
-
}),
|
|
123
|
-
!!n && /* @__PURE__ */ R(y, {
|
|
124
|
-
className: ae[j],
|
|
125
|
-
children: /* @__PURE__ */ R(o, {
|
|
126
|
-
tag: "span",
|
|
127
|
-
size: "inherit",
|
|
128
|
-
type: "secondary",
|
|
129
|
-
className: "text-inherit",
|
|
130
|
-
children: k.noResults
|
|
131
|
-
})
|
|
132
|
-
}),
|
|
133
|
-
/* @__PURE__ */ R(A, {
|
|
134
|
-
viewportRef: N,
|
|
135
|
-
className: "max-h-[min(20rem,var(--available-height))]",
|
|
136
|
-
children: /* @__PURE__ */ R(E, {
|
|
137
|
-
className: "combobox-dropdown--list max-h-none overflow-visible",
|
|
138
|
-
children: f ? /* @__PURE__ */ z(ee, { children: [Array.from(f.entries()).map(([e, t]) => {
|
|
139
|
-
let n = typeof D == "function" ? D(e) : e;
|
|
140
|
-
return /* @__PURE__ */ z(_, {
|
|
141
|
-
className: "combobox-dropdown--group p-0",
|
|
142
|
-
items: t,
|
|
143
|
-
children: [/* @__PURE__ */ R(g, { children: typeof n == "string" || typeof n == "number" || typeof n == "bigint" ? /* @__PURE__ */ R(a, { children: n }) : n }), /* @__PURE__ */ R(S, { children: (e) => /* @__PURE__ */ R(b, {
|
|
144
|
-
value: e,
|
|
145
|
-
size: L,
|
|
146
|
-
disabled: w?.(e),
|
|
147
|
-
children: v(e)
|
|
148
|
-
}, x(e)) })]
|
|
149
|
-
}, e);
|
|
150
|
-
}), h != null && /* @__PURE__ */ R(b, {
|
|
151
|
-
value: h,
|
|
152
|
-
size: L,
|
|
153
|
-
children: v(h)
|
|
154
|
-
}, x(h))] }) : /* @__PURE__ */ R(S, { children: (e) => /* @__PURE__ */ R(b, {
|
|
155
|
-
value: e,
|
|
156
|
-
size: L,
|
|
157
|
-
disabled: w?.(e),
|
|
158
|
-
children: v(e)
|
|
159
|
-
}, x(e)) })
|
|
160
|
-
})
|
|
161
|
-
}),
|
|
162
|
-
/* @__PURE__ */ R(re, {
|
|
163
|
-
loading: !!O,
|
|
164
|
-
text: k.loadingMore
|
|
165
|
-
}),
|
|
166
|
-
!!F && /* @__PURE__ */ z(s, {
|
|
167
|
-
direction: "horizontal",
|
|
168
|
-
gap: "md",
|
|
169
|
-
justify: "end",
|
|
170
|
-
wrap: !1,
|
|
171
|
-
className: "border-t border-border/60 px-control py-space-xs",
|
|
172
|
-
children: [/* @__PURE__ */ R(i, {
|
|
173
|
-
type: "button",
|
|
174
|
-
tone: "secondary",
|
|
175
|
-
buttonStyle: "ghost",
|
|
176
|
-
onClick: (e) => {
|
|
177
|
-
e.preventDefault(), e.stopPropagation(), F.onCancel();
|
|
178
|
-
},
|
|
179
|
-
children: F.cancelLabel
|
|
180
|
-
}), /* @__PURE__ */ R(i, {
|
|
181
|
-
type: "button",
|
|
182
|
-
tone: "primary",
|
|
183
|
-
onClick: (e) => {
|
|
184
|
-
e.preventDefault(), e.stopPropagation(), F.onApply();
|
|
185
|
-
},
|
|
186
|
-
children: F.applyLabel
|
|
187
|
-
})]
|
|
188
|
-
})
|
|
189
|
-
]
|
|
190
|
-
})
|
|
191
|
-
});
|
|
192
|
-
return M ? /* @__PURE__ */ R(m, {
|
|
193
|
-
container: M,
|
|
194
|
-
children: te
|
|
195
|
-
}) : /* @__PURE__ */ R(m, { children: te });
|
|
196
|
-
}
|
|
197
|
-
oe.displayName = "ComboboxDropdown";
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region src/components/features/combobox/components/error-message.tsx
|
|
200
|
-
function se({ error: e, size: t, className: n }) {
|
|
201
|
-
return e ? /* @__PURE__ */ R(o, {
|
|
202
|
-
tag: "p",
|
|
203
|
-
size: "xs",
|
|
204
|
-
type: "error",
|
|
205
|
-
className: r("error-message--component", n),
|
|
206
|
-
role: "alert",
|
|
207
|
-
"aria-live": "polite",
|
|
208
|
-
children: e
|
|
209
|
-
}) : null;
|
|
210
|
-
}
|
|
211
|
-
se.displayName = "ErrorMessage";
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region src/components/features/combobox/components/highlighted-text.tsx
|
|
214
|
-
function ce(e) {
|
|
215
|
-
return e.replace(/[$()*+.?[\\\]^{|}]/g, "\\$&");
|
|
216
|
-
}
|
|
217
|
-
function X({ text: e, highlight: t, highlightClassName: n = c.match }) {
|
|
218
|
-
if (!t.trim()) return /* @__PURE__ */ R(o, {
|
|
219
|
-
tag: "span",
|
|
220
|
-
size: "inherit",
|
|
221
|
-
lineHeight: "tight",
|
|
222
|
-
className: "text-inherit",
|
|
223
|
-
children: e
|
|
224
|
-
});
|
|
225
|
-
let r = RegExp(`(${ce(t)})`, "gi"), i = e.split(r), a = 0;
|
|
226
|
-
return /* @__PURE__ */ R(o, {
|
|
227
|
-
tag: "span",
|
|
228
|
-
size: "inherit",
|
|
229
|
-
lineHeight: "tight",
|
|
230
|
-
className: "text-inherit",
|
|
231
|
-
children: i.map((e, t) => {
|
|
232
|
-
let r = t % 2 == 1, i = String(a);
|
|
233
|
-
return a += e.length, r ? /* @__PURE__ */ R("mark", {
|
|
234
|
-
className: n,
|
|
235
|
-
children: e
|
|
236
|
-
}, i) : /* @__PURE__ */ R(M.Fragment, { children: e }, i);
|
|
237
|
-
})
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
X.displayName = "HighlightedText";
|
|
241
|
-
//#endregion
|
|
242
|
-
//#region src/components/features/combobox/hooks/use-debounced-search.ts
|
|
243
|
-
function le({ searchValue: e, onSearch: t, debounceMs: n = 300, minSearchLength: r = 3 }) {
|
|
244
|
-
let i = j((e) => {
|
|
245
|
-
t?.(e);
|
|
246
|
-
}, n);
|
|
247
|
-
P(() => {
|
|
248
|
-
let t = e.trim();
|
|
249
|
-
if (!(t.length < r)) return i(t), i.cancel;
|
|
250
|
-
}, [
|
|
251
|
-
e,
|
|
252
|
-
r,
|
|
253
|
-
i
|
|
254
|
-
]);
|
|
255
|
-
}
|
|
256
|
-
//#endregion
|
|
257
|
-
//#region src/components/features/combobox/hooks/use-grouped-items.ts
|
|
258
|
-
function ue({ items: e, getItemGroup: t }) {
|
|
259
|
-
return F(() => {
|
|
260
|
-
if (!t) return null;
|
|
261
|
-
let n = /* @__PURE__ */ new Map();
|
|
262
|
-
for (let r of e) {
|
|
263
|
-
let e = t(r), i = n.get(e);
|
|
264
|
-
i ? i.push(r) : n.set(e, [r]);
|
|
265
|
-
}
|
|
266
|
-
return n;
|
|
267
|
-
}, [e, t]);
|
|
268
|
-
}
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region src/components/features/combobox/hooks/use-load-more.ts
|
|
271
|
-
function de({ hasMore: e, onLoadMore: t, loadingMore: n }) {
|
|
272
|
-
let r = I(!1), i = I(null), a = j(() => {
|
|
273
|
-
r.current = !0, t?.(), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
274
|
-
r.current = !1, i.current = null;
|
|
275
|
-
}, 500);
|
|
276
|
-
}, 100);
|
|
277
|
-
return P(() => () => {
|
|
278
|
-
i.current && clearTimeout(i.current);
|
|
279
|
-
}, []), { handleScroll: N((i) => {
|
|
280
|
-
if (!e || !t || n || r.current) return;
|
|
281
|
-
let { scrollHeight: o, scrollTop: s, clientHeight: c } = i.target;
|
|
282
|
-
(s + c) / o >= .8 && a();
|
|
283
|
-
}, [
|
|
284
|
-
e,
|
|
285
|
-
t,
|
|
286
|
-
n,
|
|
287
|
-
a
|
|
288
|
-
]) };
|
|
289
|
-
}
|
|
290
|
-
//#endregion
|
|
291
|
-
//#region src/components/features/combobox/hooks/use-combobox-core.tsx
|
|
292
|
-
function fe(e) {
|
|
293
|
-
return n(U, e);
|
|
294
|
-
}
|
|
295
|
-
function pe(e, t, n) {
|
|
296
|
-
let r = t.toLowerCase();
|
|
297
|
-
return e.some((e) => n(e).toLowerCase() === r);
|
|
298
|
-
}
|
|
299
|
-
function me({ items: e, searchValue: t, getItemLabel: n, getItemKey: i, loading: a = !1, showListContent: s = !0, minSearchLength: c = 3, strings: l, renderItem: u, onSearch: d, debounceMs: f = 300, creatable: p, onCreate: m, getItemGroup: h, hasMore: g, onLoadMore: _, loadingMore: v, highlightMatch: y, ensuredItems: b = [] }) {
|
|
300
|
-
let x = fe(l), S = i ?? n, C = I(null), w = t.trim(), T = s && (a || w.length < c);
|
|
301
|
-
le({
|
|
302
|
-
searchValue: t,
|
|
303
|
-
onSearch: d,
|
|
304
|
-
debounceMs: f,
|
|
305
|
-
minSearchLength: c
|
|
306
|
-
});
|
|
307
|
-
let { handleScroll: E } = de({
|
|
308
|
-
hasMore: s && !T ? g : !1,
|
|
309
|
-
onLoadMore: _,
|
|
310
|
-
loadingMore: v
|
|
311
|
-
});
|
|
312
|
-
P(() => {
|
|
313
|
-
let e = C.current;
|
|
314
|
-
if (s && !T && e && g && _) return e.addEventListener("scroll", E), () => e.removeEventListener("scroll", E);
|
|
315
|
-
}, [
|
|
316
|
-
E,
|
|
317
|
-
g,
|
|
318
|
-
_,
|
|
319
|
-
s,
|
|
320
|
-
T
|
|
321
|
-
]);
|
|
322
|
-
let D = F(() => {
|
|
323
|
-
if (!s || T) return [];
|
|
324
|
-
if (b.length === 0) return e;
|
|
325
|
-
let t = [...b];
|
|
326
|
-
return e.forEach((e) => {
|
|
327
|
-
let n = S(e);
|
|
328
|
-
b.some((e) => S(e) === n) || t.push(e);
|
|
329
|
-
}), t;
|
|
330
|
-
}, [
|
|
331
|
-
e,
|
|
332
|
-
b,
|
|
333
|
-
S,
|
|
334
|
-
s,
|
|
335
|
-
T
|
|
336
|
-
]), O = ue({
|
|
337
|
-
items: D,
|
|
338
|
-
getItemGroup: h
|
|
339
|
-
}), k = F(() => !s || T || !p || !m || w.length < c ? !1 : !pe(D, w, n), [
|
|
340
|
-
p,
|
|
341
|
-
m,
|
|
342
|
-
w,
|
|
343
|
-
c,
|
|
344
|
-
D,
|
|
345
|
-
n,
|
|
346
|
-
s,
|
|
347
|
-
T
|
|
348
|
-
]), A = F(() => k ? q(w) : null, [k, w]);
|
|
349
|
-
return {
|
|
350
|
-
strings: x,
|
|
351
|
-
getKey: S,
|
|
352
|
-
trimmedSearch: w,
|
|
353
|
-
listRef: C,
|
|
354
|
-
baseItems: D,
|
|
355
|
-
allItems: F(() => A ? [...D, A] : D, [D, A]),
|
|
356
|
-
groupedItems: O,
|
|
357
|
-
createOptionItem: A,
|
|
358
|
-
showStatus: T,
|
|
359
|
-
showEmpty: s && !a && w.length >= c && e.length === 0 && !k,
|
|
360
|
-
showCreateOption: k,
|
|
361
|
-
renderItemContent: N((e) => {
|
|
362
|
-
if (G(e)) {
|
|
363
|
-
let t = K(e);
|
|
364
|
-
return /* @__PURE__ */ z("span", {
|
|
365
|
-
className: r("combobox-core--component", "flex items-center gap-space-sm"),
|
|
366
|
-
children: [/* @__PURE__ */ R(ne, { className: "size-icon-sm" }), x.createNew.includes("{value}") ? /* @__PURE__ */ R(o, {
|
|
367
|
-
tag: "span",
|
|
368
|
-
size: "inherit",
|
|
369
|
-
weight: "medium",
|
|
370
|
-
lineHeight: "tight",
|
|
371
|
-
className: "text-inherit",
|
|
372
|
-
children: x.createNew.replace("{value}", t)
|
|
373
|
-
}) : /* @__PURE__ */ z("span", {
|
|
374
|
-
className: "inline-flex items-center gap-space-sm",
|
|
375
|
-
children: [/* @__PURE__ */ R(o, {
|
|
376
|
-
tag: "span",
|
|
377
|
-
size: "inherit",
|
|
378
|
-
weight: "medium",
|
|
379
|
-
lineHeight: "tight",
|
|
380
|
-
className: "text-inherit",
|
|
381
|
-
children: x.createNew
|
|
382
|
-
}), /* @__PURE__ */ R(o, {
|
|
383
|
-
tag: "span",
|
|
384
|
-
size: "inherit",
|
|
385
|
-
weight: "medium",
|
|
386
|
-
lineHeight: "tight",
|
|
387
|
-
className: "text-inherit",
|
|
388
|
-
children: t
|
|
389
|
-
})]
|
|
390
|
-
})]
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
if (u) return u(e);
|
|
394
|
-
let t = n(e);
|
|
395
|
-
return y && w ? /* @__PURE__ */ R(X, {
|
|
396
|
-
text: t,
|
|
397
|
-
highlight: w
|
|
398
|
-
}) : /* @__PURE__ */ R(o, {
|
|
399
|
-
tag: "span",
|
|
400
|
-
size: "inherit",
|
|
401
|
-
weight: "medium",
|
|
402
|
-
lineHeight: "tight",
|
|
403
|
-
className: "text-inherit",
|
|
404
|
-
children: t
|
|
405
|
-
});
|
|
406
|
-
}, [
|
|
407
|
-
x.createNew,
|
|
408
|
-
u,
|
|
409
|
-
n,
|
|
410
|
-
y,
|
|
411
|
-
w
|
|
412
|
-
]),
|
|
413
|
-
itemToStringLabel: N((e) => G(e) ? K(e) : n(e), [n]),
|
|
414
|
-
getItemReactKey: N((e) => G(e) ? `__create__:${K(e)}` : String(S(e)), [S]),
|
|
415
|
-
handleScroll: E
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
//#endregion
|
|
419
|
-
//#region src/components/features/combobox/combobox.tsx
|
|
420
|
-
function he(e, n) {
|
|
421
|
-
return t(e, n, "md");
|
|
422
|
-
}
|
|
423
|
-
var ge = {
|
|
424
|
-
sm: "sm",
|
|
425
|
-
md: "md",
|
|
426
|
-
lg: "lg"
|
|
427
|
-
};
|
|
428
|
-
function _e(e) {
|
|
429
|
-
return e;
|
|
430
|
-
}
|
|
431
|
-
function ve({ placeholder: e, clearLabel: t, toggleLabel: n, size: a, error: o, required: s, disabled: c, clearable: l = !0, className: u, onBlur: p }) {
|
|
432
|
-
return /* @__PURE__ */ z("div", {
|
|
433
|
-
className: "relative",
|
|
434
|
-
children: [/* @__PURE__ */ R(H.Input, {
|
|
435
|
-
render: /* @__PURE__ */ R(k, {
|
|
436
|
-
size: a,
|
|
437
|
-
invalid: o,
|
|
438
|
-
className: r(l ? f.clearPadding[a] : f.padding[a], u)
|
|
439
|
-
}),
|
|
440
|
-
placeholder: e,
|
|
441
|
-
"aria-invalid": o || void 0,
|
|
442
|
-
"aria-required": s,
|
|
443
|
-
disabled: c,
|
|
444
|
-
onBlur: p
|
|
445
|
-
}), /* @__PURE__ */ z("div", {
|
|
446
|
-
className: r("absolute inset-y-0 flex items-center gap-space-xs text-muted-foreground", f.track[a]),
|
|
447
|
-
children: [l ? /* @__PURE__ */ R(H.Clear, { render: /* @__PURE__ */ R(i, {
|
|
448
|
-
type: "button",
|
|
449
|
-
tone: "secondary",
|
|
450
|
-
buttonStyle: "ghost",
|
|
451
|
-
size: "sm",
|
|
452
|
-
iconOnly: !0,
|
|
453
|
-
className: r(d.target, d.focus, d.clear),
|
|
454
|
-
"aria-label": t,
|
|
455
|
-
children: /* @__PURE__ */ R(V, {
|
|
456
|
-
className: d.icon,
|
|
457
|
-
"aria-hidden": "true"
|
|
458
|
-
})
|
|
459
|
-
}) }) : null, /* @__PURE__ */ R(H.Trigger, { render: /* @__PURE__ */ R(i, {
|
|
460
|
-
type: "button",
|
|
461
|
-
tone: "secondary",
|
|
462
|
-
buttonStyle: "ghost",
|
|
463
|
-
size: "sm",
|
|
464
|
-
iconOnly: !0,
|
|
465
|
-
className: r(d.target, d.focus, d.toggle),
|
|
466
|
-
"aria-label": n,
|
|
467
|
-
children: /* @__PURE__ */ R(te, {
|
|
468
|
-
className: r("shrink-0", f.icon[a]),
|
|
469
|
-
"aria-hidden": "true"
|
|
470
|
-
})
|
|
471
|
-
}) })]
|
|
472
|
-
})]
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
function Z({ items: t, selectedValue: n, onSelectedValueChange: r, clearSearchOnClose: i = !0, searchValue: a, onSearchValueChange: o, getItemLabel: c, getItemKey: l, loading: u = !1, showListContent: d = !0, minSearchLength: f = 3, strings: p, disabled: m = !1, className: h, clearable: g = !0, renderItem: _, portalContainer: v, name: y, invalid: b, error: S, required: C, onBlur: w, onSearch: T, debounceMs: E, creatable: D, onCreate: O, getItemGroup: k, renderGroupLabel: A, hasMore: j, onLoadMore: M, loadingMore: P, getItemDisabled: F, highlightMatch: I, size: ee, open: te, onOpenChange: B }) {
|
|
476
|
-
let { defaultScale: ne } = e(), V = he(ee, ne), H = _e(V), U = b || !!S, W = me({
|
|
477
|
-
items: t,
|
|
478
|
-
searchValue: a,
|
|
479
|
-
onSearchValueChange: o,
|
|
480
|
-
getItemLabel: c,
|
|
481
|
-
getItemKey: l,
|
|
482
|
-
loading: u,
|
|
483
|
-
showListContent: d,
|
|
484
|
-
minSearchLength: f,
|
|
485
|
-
strings: p,
|
|
486
|
-
renderItem: _,
|
|
487
|
-
onSearch: T,
|
|
488
|
-
debounceMs: E,
|
|
489
|
-
creatable: D,
|
|
490
|
-
onCreate: O,
|
|
491
|
-
getItemGroup: k,
|
|
492
|
-
hasMore: j,
|
|
493
|
-
onLoadMore: M,
|
|
494
|
-
loadingMore: P,
|
|
495
|
-
highlightMatch: I,
|
|
496
|
-
size: V,
|
|
497
|
-
ensuredItems: n ? [n] : []
|
|
498
|
-
}), [q, re] = L(!1), J = N((e) => {
|
|
499
|
-
re(e), !e && i && o(""), B?.(e);
|
|
500
|
-
}, [
|
|
501
|
-
i,
|
|
502
|
-
B,
|
|
503
|
-
o
|
|
504
|
-
]), Y = q ? a : n ? W.itemToStringLabel(n) : "", ie = N((e) => {
|
|
505
|
-
if (e && G(e)) {
|
|
506
|
-
let t = K(e);
|
|
507
|
-
O?.(t);
|
|
508
|
-
return;
|
|
509
|
-
}
|
|
510
|
-
r(e);
|
|
511
|
-
}, [r, O]);
|
|
512
|
-
return /* @__PURE__ */ z(s, {
|
|
513
|
-
gap: "dense",
|
|
514
|
-
className: "combobox--component",
|
|
515
|
-
children: [/* @__PURE__ */ z(x, {
|
|
516
|
-
items: W.allItems,
|
|
517
|
-
value: n,
|
|
518
|
-
onValueChange: (e, t) => {
|
|
519
|
-
if (t.reason === "escape-key") {
|
|
520
|
-
t.allowPropagation();
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
ie(e);
|
|
524
|
-
},
|
|
525
|
-
inputValue: Y,
|
|
526
|
-
onInputValueChange: (e, t) => {
|
|
527
|
-
let { reason: n } = t;
|
|
528
|
-
if (n === "escape-key") {
|
|
529
|
-
t.allowPropagation();
|
|
530
|
-
return;
|
|
531
|
-
}
|
|
532
|
-
if (n === "item-press") {
|
|
533
|
-
o("");
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
o(e);
|
|
537
|
-
},
|
|
538
|
-
itemToStringLabel: W.itemToStringLabel,
|
|
539
|
-
disabled: m,
|
|
540
|
-
filter: null,
|
|
541
|
-
name: y,
|
|
542
|
-
required: C,
|
|
543
|
-
open: te,
|
|
544
|
-
onOpenChange: J,
|
|
545
|
-
children: [/* @__PURE__ */ R(ve, {
|
|
546
|
-
placeholder: W.strings.placeholder,
|
|
547
|
-
clearLabel: W.strings.clear,
|
|
548
|
-
toggleLabel: W.strings.toggle,
|
|
549
|
-
className: h,
|
|
550
|
-
size: H,
|
|
551
|
-
error: U,
|
|
552
|
-
required: C,
|
|
553
|
-
disabled: m,
|
|
554
|
-
clearable: g,
|
|
555
|
-
onBlur: w
|
|
556
|
-
}), /* @__PURE__ */ R(oe, {
|
|
557
|
-
loading: u,
|
|
558
|
-
showStatus: W.showStatus,
|
|
559
|
-
showEmpty: W.showEmpty,
|
|
560
|
-
searchValue: a,
|
|
561
|
-
minSearchLength: f,
|
|
562
|
-
items: W.allItems,
|
|
563
|
-
groupedItems: W.groupedItems,
|
|
564
|
-
createOptionItem: W.createOptionItem,
|
|
565
|
-
renderItemContent: W.renderItemContent,
|
|
566
|
-
getItemReactKey: W.getItemReactKey,
|
|
567
|
-
getItemDisabled: F,
|
|
568
|
-
renderGroupLabel: A,
|
|
569
|
-
loadingMore: d && !W.showStatus ? P : !1,
|
|
570
|
-
strings: W.strings,
|
|
571
|
-
size: V,
|
|
572
|
-
portalContainer: v,
|
|
573
|
-
listRef: W.listRef
|
|
574
|
-
})]
|
|
575
|
-
}), /* @__PURE__ */ R(se, {
|
|
576
|
-
error: S,
|
|
577
|
-
size: V
|
|
578
|
-
})]
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
function ye({ items: t, selectedValues: n, onSelectedValuesChange: i, searchValue: a, onSearchValueChange: c, getItemLabel: l, getItemKey: u, loading: d = !1, showListContent: f = !0, minSearchLength: p = 3, strings: m, disabled: g = !1, className: _, renderItem: y, portalContainer: b, name: S, invalid: C, error: T, required: E, onBlur: k, onSearch: A, debounceMs: j, creatable: M, onCreate: F, getItemGroup: ee, renderGroupLabel: te, hasMore: B, onLoadMore: ne, loadingMore: V, getItemDisabled: H, highlightMatch: U, size: W, open: q, onOpenChange: re, closeOnSelect: J = !1, applyButton: Y = !1, onApply: ie, onCancel: ae }) {
|
|
582
|
-
let { defaultScale: ce } = e(), X = he(W, ce), le = _e(X), ue = ge[X], de = C || !!T, fe = I(null), pe = u ?? l, [ve, Z] = L(n), [ye, be] = L(!1), xe = q !== void 0, Se = xe ? q : ye;
|
|
583
|
-
P(() => {
|
|
584
|
-
Y && Z(n);
|
|
585
|
-
}, [Y, n]);
|
|
586
|
-
let Q = N((e) => {
|
|
587
|
-
xe || be(e), re?.(e);
|
|
588
|
-
}, [xe, re]), $ = me({
|
|
589
|
-
items: t,
|
|
590
|
-
searchValue: a,
|
|
591
|
-
onSearchValueChange: c,
|
|
592
|
-
getItemLabel: l,
|
|
593
|
-
getItemKey: u,
|
|
594
|
-
loading: d,
|
|
595
|
-
showListContent: f,
|
|
596
|
-
minSearchLength: p,
|
|
597
|
-
strings: m,
|
|
598
|
-
renderItem: y,
|
|
599
|
-
onSearch: A,
|
|
600
|
-
debounceMs: j,
|
|
601
|
-
creatable: M,
|
|
602
|
-
onCreate: F,
|
|
603
|
-
getItemGroup: ee,
|
|
604
|
-
hasMore: B,
|
|
605
|
-
onLoadMore: ne,
|
|
606
|
-
loadingMore: V,
|
|
607
|
-
highlightMatch: U,
|
|
608
|
-
size: X,
|
|
609
|
-
ensuredItems: n
|
|
610
|
-
}), Ce = N((e) => {
|
|
611
|
-
let t = [], n = null;
|
|
612
|
-
for (let r of e) G(r) ? n = K(r) : t.push(r);
|
|
613
|
-
n && F?.(n);
|
|
614
|
-
let r = t.length !== e.length || !n ? t : null;
|
|
615
|
-
r && (Y ? Z(r) : i(r)), J && Q(!1);
|
|
616
|
-
}, [
|
|
617
|
-
i,
|
|
618
|
-
F,
|
|
619
|
-
Y,
|
|
620
|
-
J,
|
|
621
|
-
Q
|
|
622
|
-
]), we = N(() => {
|
|
623
|
-
Y && i(ve), ie?.(), Q(!1);
|
|
624
|
-
}, [
|
|
625
|
-
Y,
|
|
626
|
-
ve,
|
|
627
|
-
ie,
|
|
628
|
-
i,
|
|
629
|
-
Q
|
|
630
|
-
]), Te = N(() => {
|
|
631
|
-
Y && Z(n), ae?.(), Q(!1);
|
|
632
|
-
}, [
|
|
633
|
-
Y,
|
|
634
|
-
n,
|
|
635
|
-
ae,
|
|
636
|
-
Q
|
|
637
|
-
]), Ee = Y ? ve : n, De = Ee.length > 0 ? void 0 : $.strings.placeholder;
|
|
638
|
-
return /* @__PURE__ */ z(s, {
|
|
639
|
-
gap: "dense",
|
|
640
|
-
className: "combobox--component",
|
|
641
|
-
children: [/* @__PURE__ */ z(x, {
|
|
642
|
-
items: $.allItems,
|
|
643
|
-
multiple: !0,
|
|
644
|
-
value: Ee,
|
|
645
|
-
onValueChange: (e, t) => {
|
|
646
|
-
if (t.reason === "escape-key") {
|
|
647
|
-
t.allowPropagation();
|
|
648
|
-
return;
|
|
649
|
-
}
|
|
650
|
-
Ce(e);
|
|
651
|
-
},
|
|
652
|
-
inputValue: a,
|
|
653
|
-
onInputValueChange: (e, t) => {
|
|
654
|
-
let { reason: n } = t;
|
|
655
|
-
if (n === "escape-key") {
|
|
656
|
-
t.allowPropagation();
|
|
657
|
-
return;
|
|
658
|
-
}
|
|
659
|
-
if (n === "item-press") {
|
|
660
|
-
c("");
|
|
661
|
-
return;
|
|
662
|
-
}
|
|
663
|
-
c(e);
|
|
664
|
-
},
|
|
665
|
-
itemToStringLabel: $.itemToStringLabel,
|
|
666
|
-
disabled: g,
|
|
667
|
-
filter: null,
|
|
668
|
-
name: S,
|
|
669
|
-
required: E,
|
|
670
|
-
open: Se,
|
|
671
|
-
onOpenChange: (e) => {
|
|
672
|
-
!e && Y && Z(n), Q(e);
|
|
673
|
-
},
|
|
674
|
-
children: [/* @__PURE__ */ z(w, {
|
|
675
|
-
ref: fe,
|
|
676
|
-
className: r(D[le], O[le], le === "sm" ? "text-pxs" : "text-sm", "bg-transparent !shadow-none", _),
|
|
677
|
-
size: ue,
|
|
678
|
-
error: de,
|
|
679
|
-
children: [Ee.map((e) => /* @__PURE__ */ R(v, { children: /* @__PURE__ */ R(o, {
|
|
680
|
-
tag: "span",
|
|
681
|
-
size: "inherit",
|
|
682
|
-
weight: "medium",
|
|
683
|
-
lineHeight: "tight",
|
|
684
|
-
className: "combobox--chip-label text-inherit",
|
|
685
|
-
children: l(e)
|
|
686
|
-
}) }, pe(e))), /* @__PURE__ */ R(h, {
|
|
687
|
-
placeholder: De,
|
|
688
|
-
"aria-invalid": de || void 0,
|
|
689
|
-
"aria-required": E,
|
|
690
|
-
onBlur: k
|
|
691
|
-
})]
|
|
692
|
-
}), /* @__PURE__ */ R(oe, {
|
|
693
|
-
loading: d,
|
|
694
|
-
showStatus: $.showStatus,
|
|
695
|
-
showEmpty: $.showEmpty,
|
|
696
|
-
searchValue: a,
|
|
697
|
-
minSearchLength: p,
|
|
698
|
-
items: $.allItems,
|
|
699
|
-
groupedItems: $.groupedItems,
|
|
700
|
-
createOptionItem: $.createOptionItem,
|
|
701
|
-
renderItemContent: $.renderItemContent,
|
|
702
|
-
getItemReactKey: $.getItemReactKey,
|
|
703
|
-
getItemDisabled: H,
|
|
704
|
-
renderGroupLabel: te,
|
|
705
|
-
loadingMore: f && !$.showStatus ? V : !1,
|
|
706
|
-
strings: $.strings,
|
|
707
|
-
size: X,
|
|
708
|
-
portalContainer: b,
|
|
709
|
-
listRef: $.listRef,
|
|
710
|
-
anchor: fe,
|
|
711
|
-
applyFooter: f && Y ? {
|
|
712
|
-
applyLabel: $.strings.apply,
|
|
713
|
-
cancelLabel: $.strings.cancel,
|
|
714
|
-
onApply: we,
|
|
715
|
-
onCancel: Te
|
|
716
|
-
} : void 0
|
|
717
|
-
})]
|
|
718
|
-
}), /* @__PURE__ */ R(se, {
|
|
719
|
-
error: T,
|
|
720
|
-
size: X
|
|
721
|
-
})]
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
Z.displayName = "Combobox", ye.displayName = "MultiCombobox";
|
|
725
|
-
//#endregion
|
|
726
|
-
//#region src/components/features/combobox/async-resource-combobox.tsx
|
|
727
|
-
var be = {
|
|
728
|
-
...U,
|
|
729
|
-
error: "Unable to load options.",
|
|
730
|
-
retry: "Retry"
|
|
731
|
-
};
|
|
732
|
-
function xe(e) {
|
|
733
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
734
|
-
}
|
|
735
|
-
function Se({ fetcher: e, value: t, defaultValue: i = null, onValueChange: a, onAfterFetch: c, onError: u, getKey: d, getLabel: f, getDescription: p, getMeta: m, renderOption: h, limit: g = 10, debounceMs: _ = 300, preload: v = !0, minSearchLength: y = 0, errorMessage: b, renderError: x, strings: S, disabled: C, size: w, ...T }) {
|
|
736
|
-
let E = n(be, S), D = t !== void 0, [O, k] = L(i), A = D ? t : O, [M, ee] = L(""), [te, B] = L([]), [ne, V] = L(!1), [H, U] = L(null), [W, G] = L(0), K = I(0), q = M.trim(), re = N((e) => {
|
|
737
|
-
D || k(e), a?.(e);
|
|
738
|
-
}, [D, a]), J = j((t, n) => {
|
|
739
|
-
V(!0), U(null), e(n).then((e) => {
|
|
740
|
-
n.signal?.aborted || K.current !== t || (B(e), c?.(e, n));
|
|
741
|
-
}).catch((e) => {
|
|
742
|
-
n.signal?.aborted || K.current !== t || (B([]), U({
|
|
743
|
-
error: e,
|
|
744
|
-
query: n.query
|
|
745
|
-
}), u?.(e, n));
|
|
746
|
-
}).finally(() => {
|
|
747
|
-
!n.signal?.aborted && K.current === t && V(!1);
|
|
748
|
-
});
|
|
749
|
-
}, _);
|
|
750
|
-
P(() => {
|
|
751
|
-
if (C) return;
|
|
752
|
-
if (!(q.length > 0 ? q.length >= y : v)) {
|
|
753
|
-
B([]), V(!1), U(null);
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
let e = K.current + 1;
|
|
757
|
-
K.current = e;
|
|
758
|
-
let t = new AbortController();
|
|
759
|
-
return J(e, {
|
|
760
|
-
query: q,
|
|
761
|
-
limit: g,
|
|
762
|
-
signal: t.signal
|
|
763
|
-
}), () => {
|
|
764
|
-
J.cancel(), t.abort();
|
|
765
|
-
};
|
|
766
|
-
}, [
|
|
767
|
-
C,
|
|
768
|
-
g,
|
|
769
|
-
y,
|
|
770
|
-
v,
|
|
771
|
-
W,
|
|
772
|
-
J,
|
|
773
|
-
q
|
|
774
|
-
]);
|
|
775
|
-
let Y = N(() => {
|
|
776
|
-
H && (ee(H.query), G((e) => e + 1));
|
|
777
|
-
}, [H]), ie = N((e) => {
|
|
778
|
-
if (h) return h(e, {
|
|
779
|
-
query: q,
|
|
780
|
-
isSelected: A ? d(A) === d(e) : !1
|
|
781
|
-
});
|
|
782
|
-
let t = p?.(e), n = m?.(e);
|
|
783
|
-
return /* @__PURE__ */ z(s, {
|
|
784
|
-
render: /* @__PURE__ */ R("span", {}),
|
|
785
|
-
direction: "horizontal",
|
|
786
|
-
gap: "md",
|
|
787
|
-
wrap: !1,
|
|
788
|
-
className: "async-resource-combobox--option leading-tight",
|
|
789
|
-
children: [/* @__PURE__ */ R(o, {
|
|
790
|
-
tag: "span",
|
|
791
|
-
size: w === "sm" ? "pxs" : void 0,
|
|
792
|
-
weight: "medium",
|
|
793
|
-
className: "min-w-0 shrink truncate",
|
|
794
|
-
children: f(e)
|
|
795
|
-
}), (!!t || !!n) && /* @__PURE__ */ z("span", {
|
|
796
|
-
className: "inline-flex min-w-0 flex-1 items-center gap-space-sm overflow-hidden text-muted-foreground",
|
|
797
|
-
children: [!!t && (xe(t) ? /* @__PURE__ */ R(o, {
|
|
798
|
-
tag: "span",
|
|
799
|
-
size: "xs",
|
|
800
|
-
type: "secondary",
|
|
801
|
-
className: "min-w-0 truncate",
|
|
802
|
-
children: t
|
|
803
|
-
}) : t), !!n && (xe(n) ? /* @__PURE__ */ R(o, {
|
|
804
|
-
tag: "span",
|
|
805
|
-
size: "xs",
|
|
806
|
-
type: "secondary",
|
|
807
|
-
className: "min-w-0 truncate opacity-75",
|
|
808
|
-
children: n
|
|
809
|
-
}) : n)]
|
|
810
|
-
})]
|
|
811
|
-
});
|
|
812
|
-
}, [
|
|
813
|
-
p,
|
|
814
|
-
d,
|
|
815
|
-
f,
|
|
816
|
-
m,
|
|
817
|
-
h,
|
|
818
|
-
A,
|
|
819
|
-
w,
|
|
820
|
-
q
|
|
821
|
-
]), ae = F(() => {
|
|
822
|
-
if (H) return b ?? E.error;
|
|
823
|
-
}, [
|
|
824
|
-
b,
|
|
825
|
-
H,
|
|
826
|
-
E.error
|
|
827
|
-
]), oe = H !== null, se = H ? x?.({
|
|
828
|
-
error: H.error,
|
|
829
|
-
query: H.query,
|
|
830
|
-
retry: Y
|
|
831
|
-
}) ?? /* @__PURE__ */ R(l, {
|
|
832
|
-
variant: "inline",
|
|
833
|
-
title: ae,
|
|
834
|
-
onRetry: Y,
|
|
835
|
-
retryLabel: E.retry,
|
|
836
|
-
className: "async-resource-combobox--error mt-space-sm"
|
|
837
|
-
}) : null;
|
|
838
|
-
return /* @__PURE__ */ z("div", {
|
|
839
|
-
"data-component": "async-resource-combobox",
|
|
840
|
-
"data-slot": "async-resource-combobox",
|
|
841
|
-
className: r("async-resource-combobox--component", T.className),
|
|
842
|
-
children: [/* @__PURE__ */ R(Z, {
|
|
843
|
-
...T,
|
|
844
|
-
className: void 0,
|
|
845
|
-
disabled: C,
|
|
846
|
-
size: w,
|
|
847
|
-
items: te,
|
|
848
|
-
selectedValue: A ?? null,
|
|
849
|
-
onSelectedValueChange: re,
|
|
850
|
-
clearSearchOnClose: !1,
|
|
851
|
-
searchValue: M,
|
|
852
|
-
onSearchValueChange: ee,
|
|
853
|
-
getItemLabel: f,
|
|
854
|
-
getItemKey: d,
|
|
855
|
-
loading: !oe && ne,
|
|
856
|
-
showListContent: !oe,
|
|
857
|
-
minSearchLength: y,
|
|
858
|
-
strings: E,
|
|
859
|
-
renderItem: ie
|
|
860
|
-
}), se]
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
Se.displayName = "AsyncResourceCombobox";
|
|
864
|
-
//#endregion
|
|
865
|
-
export { me as a, ye as i, be as n, U as o, Z as r, Se as t };
|
|
866
|
-
|
|
867
|
-
//# sourceMappingURL=combobox-DLl0bfiq.js.map
|