themelia-react-ui 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +417 -0
- package/README.md +67 -16
- package/dist/{accordion-B-5Focs8.js → accordion-CQXVcd7Q.js} +15 -15
- package/dist/accordion-CQXVcd7Q.js.map +1 -0
- package/dist/action-menu-BTpyPWJ2.js +264 -0
- package/dist/action-menu-BTpyPWJ2.js.map +1 -0
- package/dist/affordance-geometry.generated-CCIXb2A1.js +68 -0
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
- package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-2PQ2fItc.js} +206 -215
- package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
- package/dist/{app-shell-at8Kt4l_.js → app-shell-BE_j8-AT.js} +11 -10
- package/dist/app-shell-BE_j8-AT.js.map +1 -0
- package/dist/{attachment-BO2R47wn.js → attachment-q69dlt5Y.js} +14 -14
- package/dist/attachment-q69dlt5Y.js.map +1 -0
- package/dist/auth-M3vGMgDR.js +723 -0
- package/dist/auth-M3vGMgDR.js.map +1 -0
- package/dist/{avatar-Bpzty83c.js → avatar-djdaaQ_s.js} +15 -13
- package/dist/avatar-djdaaQ_s.js.map +1 -0
- package/dist/{badge-BZXZT9wd.js → badge-0tATj-tW.js} +9 -9
- package/dist/badge-0tATj-tW.js.map +1 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/buttons.js +3 -2
- package/dist/base/cards.js +3 -3
- package/dist/base/carousel.js +33 -35
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +246 -222
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +3 -3
- package/dist/base/display.js +7 -7
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +94 -92
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +7 -4
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +53 -53
- 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 +84 -82
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +7 -7
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/blocks/admin.js +228 -219
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +182 -212
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +665 -620
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +2 -2
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1439 -1553
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +88 -97
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BG_FfMK4.js} +10 -9
- package/dist/breadcrumbs-BG_FfMK4.js.map +1 -0
- package/dist/button-BS3KDg00.js +674 -0
- package/dist/button-BS3KDg00.js.map +1 -0
- package/dist/{button-BS6l5JUw.js → button-R9CCoH7A.js} +3 -3
- package/dist/button-R9CCoH7A.js.map +1 -0
- package/dist/buttons-DS0ZIwJ_.js +99 -0
- package/dist/buttons-DS0ZIwJ_.js.map +1 -0
- package/dist/{cards-Cum56XOF.js → cards-QoJ4syG9.js} +12 -12
- package/dist/{cards-Cum56XOF.js.map → cards-QoJ4syG9.js.map} +1 -1
- package/dist/chart-DwYRKKc-.js +152 -0
- package/dist/chart-DwYRKKc-.js.map +1 -0
- package/dist/checkbox-B7ygNTYp.js +35 -0
- package/dist/checkbox-B7ygNTYp.js.map +1 -0
- package/dist/choice-inputs-DrJ17tpL.js +752 -0
- package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
- package/dist/{code-block-xHKbAJDj.js → code-block-CD0B7M93.js} +27 -27
- package/dist/code-block-CD0B7M93.js.map +1 -0
- package/dist/{collapsible-DsnktFNv.js → collapsible-oMUGM4tr.js} +3 -3
- package/dist/{collapsible-DsnktFNv.js.map → collapsible-oMUGM4tr.js.map} +1 -1
- package/dist/{collection-content-C4fthJV_.js → collection-content-Ys-OZOkY.js} +3 -3
- package/dist/{collection-content-C4fthJV_.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
- package/dist/combobox-6dvVny2q.js +272 -0
- package/dist/combobox-6dvVny2q.js.map +1 -0
- package/dist/combobox-CB7039j7.js +865 -0
- package/dist/combobox-CB7039j7.js.map +1 -0
- package/dist/{command-C0xe7u9B.js → command-kPMPjIxJ.js} +35 -31
- package/dist/command-kPMPjIxJ.js.map +1 -0
- package/dist/{comments-DviPLnwy.js → comments-You0Bzbr.js} +434 -409
- package/dist/comments-You0Bzbr.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
- package/dist/components/base/action-menu/action-menu.d.ts +7 -2
- package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
- package/dist/components/base/badge/badge.d.ts +1 -1
- package/dist/components/base/badge/badge.recipes.d.ts +4 -4
- package/dist/components/base/buttons/base-button.d.ts +7 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.recipes.d.ts +10 -19
- package/dist/components/base/buttons/button.variants.d.ts +1 -0
- package/dist/components/base/buttons/loader-button.d.ts +3 -1
- package/dist/components/base/buttons/text-button.d.ts +2 -2
- package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
- package/dist/components/base/cards/card.recipes.d.ts +13 -5
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
- package/dist/components/base/cards/smart-card.types.d.ts +1 -1
- package/dist/components/base/carousel/carousel.d.ts +3 -1
- package/dist/components/base/chart/chart.d.ts +7 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
- package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
- package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
- package/dist/components/base/date-pickers/datepicker.types.d.ts +16 -3
- package/dist/components/base/display/alert-dialog.d.ts +8 -2
- package/dist/components/base/display/content-block.d.ts +4 -2
- package/dist/components/base/display/date-block.d.ts +1 -1
- package/dist/components/base/display/dialog.d.ts +12 -5
- package/dist/components/base/display/surface-title.d.ts +6 -1
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -4
- package/dist/components/base/forms/form-field.d.ts +1 -0
- package/dist/components/base/forms/form-sizing.d.ts +35 -3
- package/dist/components/base/forms/workflow.d.ts +2 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
- package/dist/components/base/navigation/language-switcher.d.ts +4 -1
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
- package/dist/components/base/navigation/tabs.d.ts +3 -5
- package/dist/components/base/popover/popover.recipes.d.ts +3 -3
- package/dist/components/base/qr-code/qr-code.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +29 -1
- package/dist/components/base/sheet/sheet.d.ts +14 -5
- package/dist/components/base/spinner/spinner.d.ts +3 -2
- package/dist/components/base/structure/structure.types.d.ts +1 -1
- package/dist/components/base/table/index.d.ts +1 -1
- package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
- package/dist/components/base/upload/upload.recipes.d.ts +11 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
- package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
- package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
- package/dist/components/blocks/analytics/index.d.ts +1 -1
- package/dist/components/blocks/analytics/types.d.ts +1 -1
- package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
- package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
- package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/features/combobox/components/error-message.d.ts +1 -1
- package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
- package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
- package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.types.d.ts +9 -1
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/drawer.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
- package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +46 -22
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/partials/index.d.ts +1 -1
- package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
- package/dist/components/features/products/partials/product-tone.d.ts +11 -1
- package/dist/components/features/products/products.types.d.ts +2 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -0
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.d.ts +0 -1
- package/dist/components/layout/page/page.types.d.ts +62 -6
- package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
- package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
- package/dist/components/primitives/date.d.ts +16 -3
- package/dist/components/primitives/dimensions.d.ts +6 -0
- package/dist/components/primitives/duration.d.ts +6 -0
- package/dist/components/primitives/file-size.d.ts +6 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +11 -2
- package/dist/components/primitives/link.d.ts +7 -0
- package/dist/components/primitives/money.d.ts +29 -7
- package/dist/components/primitives/number.d.ts +17 -0
- package/dist/components/primitives/value-typography.d.ts +54 -0
- package/dist/components/primitives/value.d.ts +31 -6
- package/dist/components/typography/heading.d.ts +13 -2
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/label.d.ts +3 -0
- package/dist/components/typography/running-text.d.ts +12 -0
- package/dist/components/typography/text-link.d.ts +23 -1
- package/dist/components/typography/text.d.ts +12 -0
- package/dist/components/typography/text.styles.d.ts +37 -5
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/overlay.recipes.d.ts +15 -2
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/table.d.ts +2 -1
- package/dist/container.recipes-D9t8MHR3.js +27 -0
- package/dist/container.recipes-D9t8MHR3.js.map +1 -0
- package/dist/{containers-6s-ucRQQ.js → containers-D_L4mTVb.js} +34 -57
- package/dist/containers-D_L4mTVb.js.map +1 -0
- package/dist/control-group-recipes-DBXmfh2E.js +21 -0
- package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
- package/dist/{copyable-B7SBXJMr.js → copyable-DDjTeW_j.js} +6 -6
- package/dist/{copyable-B7SBXJMr.js.map → copyable-DDjTeW_j.js.map} +1 -1
- package/dist/data-display-3xWQUnMA.js +1335 -0
- package/dist/data-display-3xWQUnMA.js.map +1 -0
- package/dist/date-picker-DrDFj8Lo.js +1527 -0
- package/dist/date-picker-DrDFj8Lo.js.map +1 -0
- package/dist/date-pickers-CnFCb0n2.js +174 -0
- package/dist/date-pickers-CnFCb0n2.js.map +1 -0
- package/dist/date-uf3z37Nm.js +144 -0
- package/dist/date-uf3z37Nm.js.map +1 -0
- package/dist/{display-CFM5myut.js → display-DrdvPwF0.js} +25 -25
- package/dist/display-DrdvPwF0.js.map +1 -0
- package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-CURh59jb.js} +22 -15
- package/dist/dropdown-menu-CURh59jb.js.map +1 -0
- package/dist/features/activities.js +177 -163
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +187 -183
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +25 -23
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +353 -355
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +346 -354
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +225 -227
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +29 -29
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +59 -58
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +898 -900
- 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 +1412 -1444
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +51 -49
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +103 -97
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +13 -13
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +187 -183
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +7 -7
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +508 -503
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-DWUkgEjR.js → feedback-C7nR0UtT.js} +30 -31
- package/dist/feedback-C7nR0UtT.js.map +1 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
- package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-C-MFBX_8.js} +5 -5
- package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
- package/dist/{filters-BhsUtsxW.js → filters-Da-gNPsE.js} +760 -765
- package/dist/filters-Da-gNPsE.js.map +1 -0
- package/dist/{form-field-Bn7ZH1rA.js → form-field-VZRULhUK.js} +20 -12
- package/dist/form-field-VZRULhUK.js.map +1 -0
- package/dist/form-sizing-uWP4lzVh.js +126 -0
- package/dist/form-sizing-uWP4lzVh.js.map +1 -0
- package/dist/{forms-B7pzS25o.js → forms-DDeEnXSY.js} +38 -38
- package/dist/forms-DDeEnXSY.js.map +1 -0
- package/dist/forms-numeric-D3CO60IF.js +905 -0
- package/dist/forms-numeric-D3CO60IF.js.map +1 -0
- package/dist/{header-C59QZyxV.js → header-2ycNqGOR.js} +42 -37
- package/dist/header-2ycNqGOR.js.map +1 -0
- package/dist/{hooks-CM1Vp9Pe.js → hooks-DQ5SPwZw.js} +2 -2
- package/dist/{hooks-CM1Vp9Pe.js.map → hooks-DQ5SPwZw.js.map} +1 -1
- package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
- package/dist/http-CdEIHyQf.js.map +1 -0
- package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-DKlaKXoo.js} +4 -4
- package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-BoLm9Hks.js +20 -0
- package/dist/input-BoLm9Hks.js.map +1 -0
- package/dist/input-DhQdBnV3.js +255 -0
- package/dist/input-DhQdBnV3.js.map +1 -0
- package/dist/item-xzh8Df65.js +264 -0
- package/dist/item-xzh8Df65.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +46 -10
- package/dist/lib/control-group-recipes.d.ts +22 -0
- package/dist/lib/field-affordance-recipes.d.ts +70 -2
- package/dist/lib/field-state-recipes.d.ts +6 -4
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/navigation-row-recipes.d.ts +3 -2
- package/dist/lib/overlay-anatomy-recipes.d.ts +2 -2
- package/dist/lib/surface-recipes.d.ts +13 -8
- package/dist/lib/token-merge.generated.d.ts +144 -2
- package/dist/lib/track-recipes.d.ts +1 -1
- package/dist/lib/ui-provider/provider.d.ts +7 -2
- package/dist/lib/ui-provider/store.d.ts +6 -2
- package/dist/lib/ui-provider/types.d.ts +9 -4
- package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/lib/utils.js +1 -1
- package/dist/media-gallery-DQUQ0m3O.js +201 -0
- package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
- package/dist/{mentions-B8Ko-fhS.js → mentions-DwnO1hh4.js} +40 -39
- package/dist/{mentions-B8Ko-fhS.js.map → mentions-DwnO1hh4.js.map} +1 -1
- package/dist/message-YfFmbXNP.js +127 -0
- package/dist/message-YfFmbXNP.js.map +1 -0
- package/dist/{navigation-BUIn2Qxx.js → navigation-Cbp5V8gG.js} +27 -28
- package/dist/navigation-Cbp5V8gG.js.map +1 -0
- package/dist/navigation-Cs1npsPm.js +300 -0
- package/dist/navigation-Cs1npsPm.js.map +1 -0
- package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DlU-4QYO.js} +3 -3
- package/dist/navigation-row-recipes-DlU-4QYO.js.map +1 -0
- package/dist/number-CKRBYmZK.js +352 -0
- package/dist/number-CKRBYmZK.js.map +1 -0
- package/dist/overlay.recipes-CNO2S9V6.js +34 -0
- package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
- package/dist/overlays-DhZO7N-I.js +994 -0
- package/dist/overlays-DhZO7N-I.js.map +1 -0
- package/dist/page-C6R_8jFt.js +325 -0
- package/dist/page-C6R_8jFt.js.map +1 -0
- package/dist/{page-header-DQRa0jug.js → page-header-hUTzcRZX.js} +12 -12
- package/dist/page-header-hUTzcRZX.js.map +1 -0
- package/dist/{pagination-C29vvt3I.js → pagination-Cm0jqa3I.js} +21 -21
- package/dist/pagination-Cm0jqa3I.js.map +1 -0
- package/dist/{popover-CoLDEg19.js → popover-Dcv_9jxr.js} +23 -22
- package/dist/popover-Dcv_9jxr.js.map +1 -0
- package/dist/{popover-menu-GLIQTJTx.js → popover-menu-DnRFKnHP.js} +6 -6
- package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
- package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-wmbvL8Ah.js} +5 -5
- package/dist/popover.recipes-wmbvL8Ah.js.map +1 -0
- package/dist/primitives-BHrwQXFC.js +379 -0
- package/dist/primitives-BHrwQXFC.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BOe8l_FZ.js → progress-Br9WTFya.js} +12 -11
- package/dist/progress-Br9WTFya.js.map +1 -0
- package/dist/{receipt-BM8xsGFy.js → receipt-CV89q1fs.js} +8 -8
- package/dist/{receipt-BM8xsGFy.js.map → receipt-CV89q1fs.js.map} +1 -1
- package/dist/rich-text-editor-CF8QYt5p.js +574 -0
- package/dist/rich-text-editor-CF8QYt5p.js.map +1 -0
- package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-CnrbmTS1.js} +35 -26
- package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +1 -0
- package/dist/{rich-text-B7sBAdDG.js → rich-text-j-FGAeZW.js} +4 -4
- package/dist/{rich-text-B7sBAdDG.js.map → rich-text-j-FGAeZW.js.map} +1 -1
- package/dist/{scroll-area-BheMQ270.js → scroll-area-DRdr16Pt.js} +3 -3
- package/dist/scroll-area-DRdr16Pt.js.map +1 -0
- package/dist/{separator-DO0EbCEm.js → separator-BMEvwnSX.js} +2 -2
- package/dist/{separator-DO0EbCEm.js.map → separator-BMEvwnSX.js.map} +1 -1
- package/dist/{separator-Gk_WXH-l.js → separator-Do5GWDYi.js} +4 -4
- package/dist/separator-Do5GWDYi.js.map +1 -0
- package/dist/services/actions/action-adapters.d.ts +4 -0
- package/dist/services/actions.js +8 -3
- package/dist/services/actions.js.map +1 -1
- package/dist/{settings-BnCyyPOJ.js → settings-DHk0L2MF.js} +20 -19
- package/dist/settings-DHk0L2MF.js.map +1 -0
- package/dist/sheet-DRFNY1_D.js +207 -0
- package/dist/sheet-DRFNY1_D.js.map +1 -0
- package/dist/sidebar-Cb8WzOvE.js +511 -0
- package/dist/sidebar-Cb8WzOvE.js.map +1 -0
- package/dist/{sidebar-DPR7fmqN.js → sidebar-Crc9M9JV.js} +220 -201
- package/dist/sidebar-Crc9M9JV.js.map +1 -0
- package/dist/{skeleton-CmT1ppqb.js → skeleton-DVMXr15h.js} +5 -5
- package/dist/{skeleton-CmT1ppqb.js.map → skeleton-DVMXr15h.js.map} +1 -1
- package/dist/smart-card-Bek-TwUp.js +599 -0
- package/dist/smart-card-Bek-TwUp.js.map +1 -0
- package/dist/{spinner-BY9HbUEh.js → spinner-CmTAbEp0.js} +8 -6
- package/dist/spinner-CmTAbEp0.js.map +1 -0
- package/dist/{structure-MvKVq-oL.js → structure-hzCW-XsV.js} +3 -3
- package/dist/{structure-MvKVq-oL.js.map → structure-hzCW-XsV.js.map} +1 -1
- package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
- package/dist/structure.recipes-EPz60cU8.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-recipes-DOdoBXGm.js +28 -0
- package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
- package/dist/table-D6zKeYQX.js +162 -0
- package/dist/table-D6zKeYQX.js.map +1 -0
- package/dist/table-Dn4XSrSB.js +1444 -0
- package/dist/table-Dn4XSrSB.js.map +1 -0
- package/dist/tabs-Dk8E_knt.js +189 -0
- package/dist/tabs-Dk8E_knt.js.map +1 -0
- package/dist/text-inputs-BFpku0Qd.js +331 -0
- package/dist/text-inputs-BFpku0Qd.js.map +1 -0
- package/dist/{text.styles-BwB7vAF2.js → text.styles-g4He6UIW.js} +26 -15
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +90 -124
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-B9ICkQcV.js → timelines-CxuAFIc2.js} +97 -104
- package/dist/timelines-CxuAFIc2.js.map +1 -0
- package/dist/track-recipes-CDcKmndW.js +10 -0
- package/dist/track-recipes-CDcKmndW.js.map +1 -0
- package/dist/{tree-BdWSaoFT.js → tree-BotPlyiD.js} +13 -13
- package/dist/{tree-BdWSaoFT.js.map → tree-BotPlyiD.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CAr3dQhX.js +116 -0
- package/dist/typography-CAr3dQhX.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-CftIB6TY.js → ui-provider-D2_TeLqw.js} +22 -22
- package/dist/ui-provider-D2_TeLqw.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-D8Za5x_c.js → upload-B0WHW7ak.js} +278 -274
- package/dist/upload-B0WHW7ak.js.map +1 -0
- package/dist/{upload-queue-hIIYBLS7.js → upload-queue-BHZ_wBfd.js} +72 -75
- package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
- package/dist/{usage-card-DnmnJ58D.js → usage-card-U0YBLTNT.js} +31 -33
- package/dist/usage-card-U0YBLTNT.js.map +1 -0
- package/dist/utils-Cospvlj1.js +4445 -0
- package/dist/utils-Cospvlj1.js.map +1 -0
- package/dist/value-inputs-CjfzGMsN.js +854 -0
- package/dist/value-inputs-CjfzGMsN.js.map +1 -0
- package/dist/value-typography-Deb3yQZg.js +116 -0
- package/dist/value-typography-Deb3yQZg.js.map +1 -0
- package/dist/{workspace-C1PZmk8L.js → workspace-YoFjXi6i.js} +97 -105
- package/dist/workspace-YoFjXi6i.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +123 -119
- package/docs/consumer-skill/examples/analytics.tsx +34 -0
- package/docs/consumer-skill/examples/app-layout.tsx +42 -14
- package/docs/consumer-skill/examples/detail.tsx +20 -5
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
- package/docs/consumer-skill/examples/manifest.json +37 -3
- package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
- package/docs/consumer-skill/examples/website.tsx +56 -0
- package/docs/consumer-skill/references/analytics.md +70 -0
- package/docs/consumer-skill/references/composition.md +195 -9
- package/docs/consumer-skill/references/design-contract.md +33 -7
- package/docs/consumer-skill/references/discovery.md +80 -5
- package/docs/consumer-skill/references/installation.md +22 -0
- package/docs/consumer-skill/references/integration.md +46 -1
- package/docs/consumer-skill/references/public-api.json +2083 -237
- package/docs/consumer-skill/references/review.md +74 -6
- package/docs/consumer-skill/references/theming.md +59 -8
- package/docs/consumer-skill/references/tokens.json +180 -9
- package/docs/consumer-skill/references/workflows.md +34 -0
- package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +271 -18
- package/docs/consumer-skill/scripts/discovery.mjs +69 -9
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
- package/package.json +11 -6
- package/dist/accordion-B-5Focs8.js.map +0 -1
- package/dist/action-menu-Cx3SdfbN.js +0 -265
- package/dist/action-menu-Cx3SdfbN.js.map +0 -1
- package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
- package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
- package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
- package/dist/app-shell-at8Kt4l_.js.map +0 -1
- package/dist/attachment-BO2R47wn.js.map +0 -1
- package/dist/auth-OFwWSAap.js +0 -704
- package/dist/auth-OFwWSAap.js.map +0 -1
- package/dist/avatar-Bpzty83c.js.map +0 -1
- package/dist/badge-BZXZT9wd.js.map +0 -1
- package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
- package/dist/button-BS6l5JUw.js.map +0 -1
- package/dist/buttons-Co6GavvM.js +0 -674
- package/dist/buttons-Co6GavvM.js.map +0 -1
- package/dist/chart-DVfcwQu6.js +0 -149
- package/dist/chart-DVfcwQu6.js.map +0 -1
- package/dist/checkbox-BavDRjF7.js +0 -34
- package/dist/checkbox-BavDRjF7.js.map +0 -1
- package/dist/choice-inputs-CC7XqPQO.js +0 -619
- package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
- package/dist/code-block-xHKbAJDj.js.map +0 -1
- package/dist/combobox-DEbdr-3u.js +0 -273
- package/dist/combobox-DEbdr-3u.js.map +0 -1
- package/dist/combobox-xv3yJbzl.js +0 -850
- package/dist/combobox-xv3yJbzl.js.map +0 -1
- package/dist/command-C0xe7u9B.js.map +0 -1
- package/dist/comments-DviPLnwy.js.map +0 -1
- package/dist/containers-6s-ucRQQ.js.map +0 -1
- package/dist/data-display-cWIRdeaf.js +0 -1129
- package/dist/data-display-cWIRdeaf.js.map +0 -1
- package/dist/date-BFNMnrS5.js +0 -140
- package/dist/date-BFNMnrS5.js.map +0 -1
- package/dist/date-picker-CA6ogMQB.js +0 -1521
- package/dist/date-picker-CA6ogMQB.js.map +0 -1
- package/dist/date-pickers-BPIKLdsD.js +0 -224
- package/dist/date-pickers-BPIKLdsD.js.map +0 -1
- package/dist/display-CFM5myut.js.map +0 -1
- package/dist/dropdown-menu-BlnyHr-9.js.map +0 -1
- package/dist/feedback-DWUkgEjR.js.map +0 -1
- package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
- package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
- package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
- package/dist/filters-BhsUtsxW.js.map +0 -1
- package/dist/form-field-Bn7ZH1rA.js.map +0 -1
- package/dist/form-sizing-BWs70_a2.js +0 -100
- package/dist/form-sizing-BWs70_a2.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B7pzS25o.js.map +0 -1
- package/dist/forms-numeric-BUBxELBv.js +0 -867
- package/dist/forms-numeric-BUBxELBv.js.map +0 -1
- package/dist/header-C59QZyxV.js.map +0 -1
- package/dist/http-CLTVJc5I.js.map +0 -1
- package/dist/input-WwYQZJzG.js +0 -202
- package/dist/input-WwYQZJzG.js.map +0 -1
- package/dist/input-ci9fIgFH.js +0 -20
- package/dist/input-ci9fIgFH.js.map +0 -1
- package/dist/item-pJ0GsOiJ.js +0 -257
- package/dist/item-pJ0GsOiJ.js.map +0 -1
- package/dist/media-gallery-DhDRgnVZ.js +0 -200
- package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
- package/dist/message-COsdEvXT.js +0 -108
- package/dist/message-COsdEvXT.js.map +0 -1
- package/dist/navigation-BUIn2Qxx.js.map +0 -1
- package/dist/navigation-DBEu4POU.js +0 -267
- package/dist/navigation-DBEu4POU.js.map +0 -1
- package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
- package/dist/number-BNT_BIzJ.js +0 -269
- package/dist/number-BNT_BIzJ.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-B11wZka6.js +0 -982
- package/dist/overlays-B11wZka6.js.map +0 -1
- package/dist/page-BV6ioQg3.js +0 -202
- package/dist/page-BV6ioQg3.js.map +0 -1
- package/dist/page-header-DQRa0jug.js.map +0 -1
- package/dist/pagination-C29vvt3I.js.map +0 -1
- package/dist/popover-CoLDEg19.js.map +0 -1
- package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
- package/dist/primitives-DKPOGVpj.js +0 -330
- package/dist/primitives-DKPOGVpj.js.map +0 -1
- package/dist/progress-BOe8l_FZ.js.map +0 -1
- package/dist/rich-text-editor-CoVrTiSv.js +0 -575
- package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
- package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
- package/dist/scroll-area-BheMQ270.js.map +0 -1
- package/dist/select-B2mb-qN2.js +0 -108
- package/dist/select-B2mb-qN2.js.map +0 -1
- package/dist/separator-Gk_WXH-l.js.map +0 -1
- package/dist/settings-BnCyyPOJ.js.map +0 -1
- package/dist/sheet-B-q914Ad.js +0 -205
- package/dist/sheet-B-q914Ad.js.map +0 -1
- package/dist/sidebar-C_2p3Tfj.js +0 -501
- package/dist/sidebar-C_2p3Tfj.js.map +0 -1
- package/dist/sidebar-DPR7fmqN.js.map +0 -1
- package/dist/smart-card-CYLn46e6.js +0 -578
- package/dist/smart-card-CYLn46e6.js.map +0 -1
- package/dist/spinner-BY9HbUEh.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-CQfRr-VL.js +0 -27
- package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
- package/dist/table-BS39xnlq.js +0 -1424
- package/dist/table-BS39xnlq.js.map +0 -1
- package/dist/table-DnlAJ-xR.js +0 -146
- package/dist/table-DnlAJ-xR.js.map +0 -1
- package/dist/tabs-B5cNMWiP.js +0 -187
- package/dist/tabs-B5cNMWiP.js.map +0 -1
- package/dist/text-inputs-Dh9XGyiS.js +0 -331
- package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
- package/dist/text.styles-BwB7vAF2.js.map +0 -1
- package/dist/timelines-B9ICkQcV.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/typography-Cv8MT-82.js +0 -96
- package/dist/typography-Cv8MT-82.js.map +0 -1
- package/dist/ui-provider-CftIB6TY.js.map +0 -1
- package/dist/upload-D8Za5x_c.js.map +0 -1
- package/dist/upload-queue-hIIYBLS7.js.map +0 -1
- package/dist/usage-card-DnmnJ58D.js.map +0 -1
- package/dist/utils-C2EKeIw3.js +0 -72
- package/dist/utils-C2EKeIw3.js.map +0 -1
- package/dist/value-inputs-DX2dbxjj.js +0 -824
- package/dist/value-inputs-DX2dbxjj.js.map +0 -1
- package/dist/workspace-C1PZmk8L.js.map +0 -1
|
@@ -0,0 +1,865 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { _ as e, s as t } from "./ui-provider-D2_TeLqw.js";
|
|
3
|
+
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
+
import { t as r } from "./utils-Cospvlj1.js";
|
|
5
|
+
import { a as i, s as a } from "./typography-CAr3dQhX.js";
|
|
6
|
+
import { t as o } from "./button-BS3KDg00.js";
|
|
7
|
+
import { t as s } from "./structure-hzCW-XsV.js";
|
|
8
|
+
import { t as c } from "./feedback-C7nR0UtT.js";
|
|
9
|
+
import { n as l, t as u } from "./field-affordance-recipes-CkOCdE2y.js";
|
|
10
|
+
import { S as d, b as f, d as p, g as m, h, l as g, m as _, n as v, o as y, p as b, r as x, u as S, x as C, y as w } from "./combobox-6dvVny2q.js";
|
|
11
|
+
import { c as T, l as E } from "./form-sizing-uWP4lzVh.js";
|
|
12
|
+
import { t as D } from "./input-DhQdBnV3.js";
|
|
13
|
+
import { t as O } from "./scroll-area-DRdr16Pt.js";
|
|
14
|
+
import { t as k } from "./use-debounced-callback-Cx1h-hdv.js";
|
|
15
|
+
import * as A from "react";
|
|
16
|
+
import { useCallback as j, useEffect as M, useMemo as N, useRef as P, useState as F } from "react";
|
|
17
|
+
import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
18
|
+
import { ChevronDownIcon as z, Loader2 as B, PlusIcon as ee, XIcon as V } from "lucide-react";
|
|
19
|
+
import { Combobox as H } from "@base-ui/react/combobox";
|
|
20
|
+
//#region src/components/features/combobox/combobox.strings.ts
|
|
21
|
+
var U = {
|
|
22
|
+
placeholder: "Search...",
|
|
23
|
+
clear: "Clear selection",
|
|
24
|
+
toggle: "Open options",
|
|
25
|
+
searching: "Loading...",
|
|
26
|
+
noResults: "No results found.",
|
|
27
|
+
typeToSearch: "Type at least {min} characters to search...",
|
|
28
|
+
typeMore: "Type {remaining} more character{s} to search...",
|
|
29
|
+
createNew: "Create {value}",
|
|
30
|
+
loadingMore: "Loading...",
|
|
31
|
+
apply: "Apply",
|
|
32
|
+
cancel: "Cancel"
|
|
33
|
+
}, W = Symbol("combobox-create-option");
|
|
34
|
+
function G(e) {
|
|
35
|
+
return typeof e == "object" && !!e && W in e;
|
|
36
|
+
}
|
|
37
|
+
function K(e) {
|
|
38
|
+
if (!G(e)) throw Error("Item is not a create option");
|
|
39
|
+
return e[W];
|
|
40
|
+
}
|
|
41
|
+
function te(e) {
|
|
42
|
+
return { [W]: e };
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/features/combobox/components/loading-more.tsx
|
|
46
|
+
function q({ loading: e, text: t, className: n }) {
|
|
47
|
+
return e ? /* @__PURE__ */ R(s, {
|
|
48
|
+
direction: "horizontal",
|
|
49
|
+
gap: "sm",
|
|
50
|
+
justify: "center",
|
|
51
|
+
wrap: !1,
|
|
52
|
+
className: r("loading-more--component", "px-control py-space-xs text-xs text-muted-foreground", n),
|
|
53
|
+
role: "status",
|
|
54
|
+
"aria-live": "polite",
|
|
55
|
+
children: [/* @__PURE__ */ L(B, {
|
|
56
|
+
className: "size-icon-sm animate-spin",
|
|
57
|
+
"aria-hidden": "true"
|
|
58
|
+
}), /* @__PURE__ */ L(a, {
|
|
59
|
+
tag: "span",
|
|
60
|
+
size: "xs",
|
|
61
|
+
type: "secondary",
|
|
62
|
+
className: "text-inherit",
|
|
63
|
+
children: t
|
|
64
|
+
})]
|
|
65
|
+
}) : null;
|
|
66
|
+
}
|
|
67
|
+
q.displayName = "LoadingMore";
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/features/combobox/components/status-content.tsx
|
|
70
|
+
function J({ children: e }) {
|
|
71
|
+
return /* @__PURE__ */ L(a, {
|
|
72
|
+
tag: "span",
|
|
73
|
+
size: "inherit",
|
|
74
|
+
type: "secondary",
|
|
75
|
+
className: "text-inherit",
|
|
76
|
+
children: e
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function Y({ loading: e, searchValue: t, minSearchLength: n, itemCount: r, strings: i }) {
|
|
80
|
+
let a = t.trim();
|
|
81
|
+
if (e) return /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(B, { className: "size-icon-sm animate-spin" }), /* @__PURE__ */ L(J, { children: i.searching })] });
|
|
82
|
+
if (a === "") return i.typeToSearch.includes("{min}") ? /* @__PURE__ */ L(J, { children: i.typeToSearch.replace("{min}", String(n)) }) : /* @__PURE__ */ L(J, { children: i.typeToSearch });
|
|
83
|
+
if (a.length < n) {
|
|
84
|
+
let e = n - a.length;
|
|
85
|
+
return i.typeMore.includes("{remaining}") || i.typeMore.includes("{s}") ? /* @__PURE__ */ L(J, { children: i.typeMore.replace("{remaining}", String(e)).replace("{s}", e === 1 ? "" : "s") }) : /* @__PURE__ */ L(J, { children: i.typeMore });
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
Y.displayName = "StatusContent";
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/components/features/combobox/components/combobox-dropdown.tsx
|
|
92
|
+
var X = {
|
|
93
|
+
sm: "sm",
|
|
94
|
+
md: "md",
|
|
95
|
+
lg: "lg"
|
|
96
|
+
}, Z = {
|
|
97
|
+
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",
|
|
98
|
+
md: "flex min-h-control items-center justify-center px-row-x py-row-y text-center text-sm leading-tight text-muted-foreground",
|
|
99
|
+
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"
|
|
100
|
+
};
|
|
101
|
+
function ne({ loading: e, showStatus: t, showEmpty: n, searchValue: c, minSearchLength: l, items: u, groupedItems: p, createOptionItem: g, renderItemContent: y, getItemReactKey: S, getItemDisabled: T, renderGroupLabel: E, loadingMore: D, strings: k, size: A = "md", portalContainer: j, listRef: M, anchor: N, applyFooter: P }) {
|
|
102
|
+
let F = j == null ? void 0 : "z-[100]", z = X[A];
|
|
103
|
+
if (!(t || n || u.length > 0 || D || P)) return null;
|
|
104
|
+
let B = /* @__PURE__ */ L(C, {
|
|
105
|
+
anchor: N,
|
|
106
|
+
className: F,
|
|
107
|
+
children: /* @__PURE__ */ R(x, {
|
|
108
|
+
"aria-busy": e || void 0,
|
|
109
|
+
className: r("combobox-dropdown--popup"),
|
|
110
|
+
children: [
|
|
111
|
+
!!t && /* @__PURE__ */ L(d, {
|
|
112
|
+
className: "gap-space-sm px-control py-space-xs text-xs text-muted-foreground",
|
|
113
|
+
children: /* @__PURE__ */ L(Y, {
|
|
114
|
+
loading: e,
|
|
115
|
+
searchValue: c,
|
|
116
|
+
minSearchLength: l,
|
|
117
|
+
itemCount: u.length,
|
|
118
|
+
strings: k
|
|
119
|
+
})
|
|
120
|
+
}),
|
|
121
|
+
!!n && /* @__PURE__ */ L(_, {
|
|
122
|
+
className: Z[A],
|
|
123
|
+
children: /* @__PURE__ */ L(a, {
|
|
124
|
+
tag: "span",
|
|
125
|
+
size: "inherit",
|
|
126
|
+
type: "secondary",
|
|
127
|
+
className: "text-inherit",
|
|
128
|
+
children: k.noResults
|
|
129
|
+
})
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ L(O, {
|
|
132
|
+
viewportRef: M,
|
|
133
|
+
className: "max-h-[min(20rem,var(--available-height))]",
|
|
134
|
+
children: /* @__PURE__ */ L(w, {
|
|
135
|
+
className: "combobox-dropdown--list max-h-none overflow-visible",
|
|
136
|
+
children: p ? /* @__PURE__ */ R(I, { children: [Array.from(p.entries()).map(([e, t]) => {
|
|
137
|
+
let n = typeof E == "function" ? E(e) : e;
|
|
138
|
+
return /* @__PURE__ */ R(h, {
|
|
139
|
+
className: "combobox-dropdown--group p-0",
|
|
140
|
+
items: t,
|
|
141
|
+
children: [/* @__PURE__ */ L(m, { children: typeof n == "string" || typeof n == "number" || typeof n == "bigint" ? /* @__PURE__ */ L(i, { children: n }) : n }), /* @__PURE__ */ L(b, { children: (e) => /* @__PURE__ */ L(v, {
|
|
142
|
+
value: e,
|
|
143
|
+
size: z,
|
|
144
|
+
disabled: T?.(e),
|
|
145
|
+
children: y(e)
|
|
146
|
+
}, S(e)) })]
|
|
147
|
+
}, e);
|
|
148
|
+
}), g != null && /* @__PURE__ */ L(v, {
|
|
149
|
+
value: g,
|
|
150
|
+
size: z,
|
|
151
|
+
children: y(g)
|
|
152
|
+
}, S(g))] }) : /* @__PURE__ */ L(b, { children: (e) => /* @__PURE__ */ L(v, {
|
|
153
|
+
value: e,
|
|
154
|
+
size: z,
|
|
155
|
+
disabled: T?.(e),
|
|
156
|
+
children: y(e)
|
|
157
|
+
}, S(e)) })
|
|
158
|
+
})
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ L(q, {
|
|
161
|
+
loading: !!D,
|
|
162
|
+
text: k.loadingMore
|
|
163
|
+
}),
|
|
164
|
+
!!P && /* @__PURE__ */ R(s, {
|
|
165
|
+
direction: "horizontal",
|
|
166
|
+
gap: "md",
|
|
167
|
+
justify: "end",
|
|
168
|
+
wrap: !1,
|
|
169
|
+
className: "border-t border-border/60 px-control py-space-xs",
|
|
170
|
+
children: [/* @__PURE__ */ L(o, {
|
|
171
|
+
type: "button",
|
|
172
|
+
tone: "secondary",
|
|
173
|
+
buttonStyle: "ghost",
|
|
174
|
+
onClick: (e) => {
|
|
175
|
+
e.preventDefault(), e.stopPropagation(), P.onCancel();
|
|
176
|
+
},
|
|
177
|
+
children: P.cancelLabel
|
|
178
|
+
}), /* @__PURE__ */ L(o, {
|
|
179
|
+
type: "button",
|
|
180
|
+
tone: "primary",
|
|
181
|
+
onClick: (e) => {
|
|
182
|
+
e.preventDefault(), e.stopPropagation(), P.onApply();
|
|
183
|
+
},
|
|
184
|
+
children: P.applyLabel
|
|
185
|
+
})]
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
return j ? /* @__PURE__ */ L(f, {
|
|
191
|
+
container: j,
|
|
192
|
+
children: B
|
|
193
|
+
}) : /* @__PURE__ */ L(f, { children: B });
|
|
194
|
+
}
|
|
195
|
+
ne.displayName = "ComboboxDropdown";
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/components/features/combobox/components/error-message.tsx
|
|
198
|
+
function re({ error: e, size: t, className: n }) {
|
|
199
|
+
return e ? /* @__PURE__ */ L(a, {
|
|
200
|
+
tag: "p",
|
|
201
|
+
size: "xs",
|
|
202
|
+
type: "error",
|
|
203
|
+
className: r("error-message--component", n),
|
|
204
|
+
role: "alert",
|
|
205
|
+
"aria-live": "polite",
|
|
206
|
+
children: e
|
|
207
|
+
}) : null;
|
|
208
|
+
}
|
|
209
|
+
re.displayName = "ErrorMessage";
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/components/features/combobox/components/highlighted-text.tsx
|
|
212
|
+
function ie(e) {
|
|
213
|
+
return e.replace(/[$()*+.?[\\\]^{|}]/g, "\\$&");
|
|
214
|
+
}
|
|
215
|
+
function ae({ text: e, highlight: t, highlightClassName: n = "rounded-radius-sm bg-warning/20 px-space-2xs text-warning-accent dark:bg-warning/25" }) {
|
|
216
|
+
if (!t.trim()) return /* @__PURE__ */ L(a, {
|
|
217
|
+
tag: "span",
|
|
218
|
+
size: "inherit",
|
|
219
|
+
lineHeight: "tight",
|
|
220
|
+
className: "text-inherit",
|
|
221
|
+
children: e
|
|
222
|
+
});
|
|
223
|
+
let r = RegExp(`(${ie(t)})`, "gi"), i = e.split(r), o = 0;
|
|
224
|
+
return /* @__PURE__ */ L(a, {
|
|
225
|
+
tag: "span",
|
|
226
|
+
size: "inherit",
|
|
227
|
+
lineHeight: "tight",
|
|
228
|
+
className: "text-inherit",
|
|
229
|
+
children: i.map((e, t) => {
|
|
230
|
+
let r = t % 2 == 1, i = String(o);
|
|
231
|
+
return o += e.length, r ? /* @__PURE__ */ L("mark", {
|
|
232
|
+
className: n,
|
|
233
|
+
children: e
|
|
234
|
+
}, i) : /* @__PURE__ */ L(A.Fragment, { children: e }, i);
|
|
235
|
+
})
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
ae.displayName = "HighlightedText";
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/components/features/combobox/hooks/use-debounced-search.ts
|
|
241
|
+
function oe({ searchValue: e, onSearch: t, debounceMs: n = 300, minSearchLength: r = 3 }) {
|
|
242
|
+
let i = k((e) => {
|
|
243
|
+
t?.(e);
|
|
244
|
+
}, n);
|
|
245
|
+
M(() => {
|
|
246
|
+
let t = e.trim();
|
|
247
|
+
if (!(t.length < r)) return i(t), i.cancel;
|
|
248
|
+
}, [
|
|
249
|
+
e,
|
|
250
|
+
r,
|
|
251
|
+
i
|
|
252
|
+
]);
|
|
253
|
+
}
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/components/features/combobox/hooks/use-grouped-items.ts
|
|
256
|
+
function se({ items: e, getItemGroup: t }) {
|
|
257
|
+
return N(() => {
|
|
258
|
+
if (!t) return null;
|
|
259
|
+
let n = /* @__PURE__ */ new Map();
|
|
260
|
+
for (let r of e) {
|
|
261
|
+
let e = t(r), i = n.get(e);
|
|
262
|
+
i ? i.push(r) : n.set(e, [r]);
|
|
263
|
+
}
|
|
264
|
+
return n;
|
|
265
|
+
}, [e, t]);
|
|
266
|
+
}
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/components/features/combobox/hooks/use-load-more.ts
|
|
269
|
+
function ce({ hasMore: e, onLoadMore: t, loadingMore: n }) {
|
|
270
|
+
let r = P(!1), i = P(null), a = k(() => {
|
|
271
|
+
r.current = !0, t?.(), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
272
|
+
r.current = !1, i.current = null;
|
|
273
|
+
}, 500);
|
|
274
|
+
}, 100);
|
|
275
|
+
return M(() => () => {
|
|
276
|
+
i.current && clearTimeout(i.current);
|
|
277
|
+
}, []), { handleScroll: j((i) => {
|
|
278
|
+
if (!e || !t || n || r.current) return;
|
|
279
|
+
let { scrollHeight: o, scrollTop: s, clientHeight: c } = i.target;
|
|
280
|
+
(s + c) / o >= .8 && a();
|
|
281
|
+
}, [
|
|
282
|
+
e,
|
|
283
|
+
t,
|
|
284
|
+
n,
|
|
285
|
+
a
|
|
286
|
+
]) };
|
|
287
|
+
}
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/components/features/combobox/hooks/use-combobox-core.tsx
|
|
290
|
+
function le(e) {
|
|
291
|
+
return n(U, e);
|
|
292
|
+
}
|
|
293
|
+
function ue(e, t, n) {
|
|
294
|
+
let r = t.toLowerCase();
|
|
295
|
+
return e.some((e) => n(e).toLowerCase() === r);
|
|
296
|
+
}
|
|
297
|
+
function de({ items: e, searchValue: t, getItemLabel: n, getItemKey: i, loading: o = !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 = [] }) {
|
|
298
|
+
let x = le(l), S = i ?? n, C = P(null), w = t.trim(), T = s && (o || w.length < c);
|
|
299
|
+
oe({
|
|
300
|
+
searchValue: t,
|
|
301
|
+
onSearch: d,
|
|
302
|
+
debounceMs: f,
|
|
303
|
+
minSearchLength: c
|
|
304
|
+
});
|
|
305
|
+
let { handleScroll: E } = ce({
|
|
306
|
+
hasMore: s && !T ? g : !1,
|
|
307
|
+
onLoadMore: _,
|
|
308
|
+
loadingMore: v
|
|
309
|
+
});
|
|
310
|
+
M(() => {
|
|
311
|
+
let e = C.current;
|
|
312
|
+
if (s && !T && e && g && _) return e.addEventListener("scroll", E), () => e.removeEventListener("scroll", E);
|
|
313
|
+
}, [
|
|
314
|
+
E,
|
|
315
|
+
g,
|
|
316
|
+
_,
|
|
317
|
+
s,
|
|
318
|
+
T
|
|
319
|
+
]);
|
|
320
|
+
let D = N(() => {
|
|
321
|
+
if (!s || T) return [];
|
|
322
|
+
if (b.length === 0) return e;
|
|
323
|
+
let t = [...b];
|
|
324
|
+
return e.forEach((e) => {
|
|
325
|
+
let n = S(e);
|
|
326
|
+
b.some((e) => S(e) === n) || t.push(e);
|
|
327
|
+
}), t;
|
|
328
|
+
}, [
|
|
329
|
+
e,
|
|
330
|
+
b,
|
|
331
|
+
S,
|
|
332
|
+
s,
|
|
333
|
+
T
|
|
334
|
+
]), O = se({
|
|
335
|
+
items: D,
|
|
336
|
+
getItemGroup: h
|
|
337
|
+
}), k = N(() => !s || T || !p || !m || w.length < c ? !1 : !ue(D, w, n), [
|
|
338
|
+
p,
|
|
339
|
+
m,
|
|
340
|
+
w,
|
|
341
|
+
c,
|
|
342
|
+
D,
|
|
343
|
+
n,
|
|
344
|
+
s,
|
|
345
|
+
T
|
|
346
|
+
]), A = N(() => k ? te(w) : null, [k, w]);
|
|
347
|
+
return {
|
|
348
|
+
strings: x,
|
|
349
|
+
getKey: S,
|
|
350
|
+
trimmedSearch: w,
|
|
351
|
+
listRef: C,
|
|
352
|
+
baseItems: D,
|
|
353
|
+
allItems: N(() => A ? [...D, A] : D, [D, A]),
|
|
354
|
+
groupedItems: O,
|
|
355
|
+
createOptionItem: A,
|
|
356
|
+
showStatus: T,
|
|
357
|
+
showEmpty: s && !o && w.length >= c && e.length === 0 && !k,
|
|
358
|
+
showCreateOption: k,
|
|
359
|
+
renderItemContent: j((e) => {
|
|
360
|
+
if (G(e)) {
|
|
361
|
+
let t = K(e);
|
|
362
|
+
return /* @__PURE__ */ R("span", {
|
|
363
|
+
className: r("combobox-core--component", "flex items-center gap-space-sm"),
|
|
364
|
+
children: [/* @__PURE__ */ L(ee, { className: "size-icon-sm" }), x.createNew.includes("{value}") ? /* @__PURE__ */ L(a, {
|
|
365
|
+
tag: "span",
|
|
366
|
+
size: "inherit",
|
|
367
|
+
weight: "medium",
|
|
368
|
+
lineHeight: "tight",
|
|
369
|
+
className: "text-inherit",
|
|
370
|
+
children: x.createNew.replace("{value}", t)
|
|
371
|
+
}) : /* @__PURE__ */ R("span", {
|
|
372
|
+
className: "inline-flex items-center gap-space-sm",
|
|
373
|
+
children: [/* @__PURE__ */ L(a, {
|
|
374
|
+
tag: "span",
|
|
375
|
+
size: "inherit",
|
|
376
|
+
weight: "medium",
|
|
377
|
+
lineHeight: "tight",
|
|
378
|
+
className: "text-inherit",
|
|
379
|
+
children: x.createNew
|
|
380
|
+
}), /* @__PURE__ */ L(a, {
|
|
381
|
+
tag: "span",
|
|
382
|
+
size: "inherit",
|
|
383
|
+
weight: "medium",
|
|
384
|
+
lineHeight: "tight",
|
|
385
|
+
className: "text-inherit",
|
|
386
|
+
children: t
|
|
387
|
+
})]
|
|
388
|
+
})]
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
if (u) return u(e);
|
|
392
|
+
let t = n(e);
|
|
393
|
+
return y && w ? /* @__PURE__ */ L(ae, {
|
|
394
|
+
text: t,
|
|
395
|
+
highlight: w
|
|
396
|
+
}) : /* @__PURE__ */ L(a, {
|
|
397
|
+
tag: "span",
|
|
398
|
+
size: "inherit",
|
|
399
|
+
weight: "medium",
|
|
400
|
+
lineHeight: "tight",
|
|
401
|
+
className: "text-inherit",
|
|
402
|
+
children: t
|
|
403
|
+
});
|
|
404
|
+
}, [
|
|
405
|
+
x.createNew,
|
|
406
|
+
u,
|
|
407
|
+
n,
|
|
408
|
+
y,
|
|
409
|
+
w
|
|
410
|
+
]),
|
|
411
|
+
itemToStringLabel: j((e) => G(e) ? K(e) : n(e), [n]),
|
|
412
|
+
getItemReactKey: j((e) => G(e) ? `__create__:${K(e)}` : String(S(e)), [S]),
|
|
413
|
+
handleScroll: E
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/components/features/combobox/combobox.tsx
|
|
418
|
+
function fe(t, n) {
|
|
419
|
+
return e(t, n, "md");
|
|
420
|
+
}
|
|
421
|
+
var pe = {
|
|
422
|
+
sm: "sm",
|
|
423
|
+
md: "md",
|
|
424
|
+
lg: "lg"
|
|
425
|
+
};
|
|
426
|
+
function me(e) {
|
|
427
|
+
return e;
|
|
428
|
+
}
|
|
429
|
+
function he({ placeholder: e, clearLabel: t, toggleLabel: n, size: i, error: a, required: s, disabled: c, clearable: d = !0, className: f, onBlur: p }) {
|
|
430
|
+
return /* @__PURE__ */ R("div", {
|
|
431
|
+
className: "relative",
|
|
432
|
+
children: [/* @__PURE__ */ L(H.Input, {
|
|
433
|
+
render: /* @__PURE__ */ L(D, {
|
|
434
|
+
size: i,
|
|
435
|
+
invalid: a,
|
|
436
|
+
className: r(d ? l.clearPadding[i] : l.padding[i], f)
|
|
437
|
+
}),
|
|
438
|
+
placeholder: e,
|
|
439
|
+
"aria-invalid": a || void 0,
|
|
440
|
+
"aria-required": s,
|
|
441
|
+
disabled: c,
|
|
442
|
+
onBlur: p
|
|
443
|
+
}), /* @__PURE__ */ R("div", {
|
|
444
|
+
className: r("absolute inset-y-0 flex items-center gap-space-xs text-muted-foreground", l.track[i]),
|
|
445
|
+
children: [d ? /* @__PURE__ */ L(H.Clear, { render: /* @__PURE__ */ L(o, {
|
|
446
|
+
type: "button",
|
|
447
|
+
tone: "secondary",
|
|
448
|
+
buttonStyle: "ghost",
|
|
449
|
+
size: "sm",
|
|
450
|
+
iconOnly: !0,
|
|
451
|
+
className: r(u.target, u.focus, u.clear),
|
|
452
|
+
"aria-label": t,
|
|
453
|
+
children: /* @__PURE__ */ L(V, {
|
|
454
|
+
className: u.icon,
|
|
455
|
+
"aria-hidden": "true"
|
|
456
|
+
})
|
|
457
|
+
}) }) : null, /* @__PURE__ */ L(H.Trigger, { render: /* @__PURE__ */ L(o, {
|
|
458
|
+
type: "button",
|
|
459
|
+
tone: "secondary",
|
|
460
|
+
buttonStyle: "ghost",
|
|
461
|
+
size: "sm",
|
|
462
|
+
iconOnly: !0,
|
|
463
|
+
className: r(u.target, u.focus, u.toggle),
|
|
464
|
+
"aria-label": n,
|
|
465
|
+
children: /* @__PURE__ */ L(z, {
|
|
466
|
+
className: r("shrink-0", l.icon[i]),
|
|
467
|
+
"aria-hidden": "true"
|
|
468
|
+
})
|
|
469
|
+
}) })]
|
|
470
|
+
})]
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
function ge({ items: e, 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: b, invalid: x, error: S, required: C, onBlur: w, onSearch: T, debounceMs: E, creatable: D, onCreate: O, getItemGroup: k, renderGroupLabel: A, hasMore: M, onLoadMore: N, loadingMore: P, getItemDisabled: I, highlightMatch: z, size: B, open: ee, onOpenChange: V }) {
|
|
474
|
+
let { defaultScale: H } = t(), U = fe(B, H), W = me(U), te = x || !!S, q = de({
|
|
475
|
+
items: e,
|
|
476
|
+
searchValue: a,
|
|
477
|
+
onSearchValueChange: o,
|
|
478
|
+
getItemLabel: c,
|
|
479
|
+
getItemKey: l,
|
|
480
|
+
loading: u,
|
|
481
|
+
showListContent: d,
|
|
482
|
+
minSearchLength: f,
|
|
483
|
+
strings: p,
|
|
484
|
+
renderItem: _,
|
|
485
|
+
onSearch: T,
|
|
486
|
+
debounceMs: E,
|
|
487
|
+
creatable: D,
|
|
488
|
+
onCreate: O,
|
|
489
|
+
getItemGroup: k,
|
|
490
|
+
hasMore: M,
|
|
491
|
+
onLoadMore: N,
|
|
492
|
+
loadingMore: P,
|
|
493
|
+
highlightMatch: z,
|
|
494
|
+
size: U,
|
|
495
|
+
ensuredItems: n ? [n] : []
|
|
496
|
+
}), [J, Y] = F(!1), X = j((e) => {
|
|
497
|
+
Y(e), !e && i && o(""), V?.(e);
|
|
498
|
+
}, [
|
|
499
|
+
i,
|
|
500
|
+
V,
|
|
501
|
+
o
|
|
502
|
+
]), Z = J ? a : n ? q.itemToStringLabel(n) : "", ie = j((e) => {
|
|
503
|
+
if (e && G(e)) {
|
|
504
|
+
let t = K(e);
|
|
505
|
+
O?.(t);
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
r(e);
|
|
509
|
+
}, [r, O]);
|
|
510
|
+
return /* @__PURE__ */ R(s, {
|
|
511
|
+
gap: "dense",
|
|
512
|
+
className: "combobox--component",
|
|
513
|
+
children: [/* @__PURE__ */ R(y, {
|
|
514
|
+
items: q.allItems,
|
|
515
|
+
value: n,
|
|
516
|
+
onValueChange: (e, t) => {
|
|
517
|
+
if (t.reason === "escape-key") {
|
|
518
|
+
t.allowPropagation();
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
ie(e);
|
|
522
|
+
},
|
|
523
|
+
inputValue: Z,
|
|
524
|
+
onInputValueChange: (e, t) => {
|
|
525
|
+
let { reason: n } = t;
|
|
526
|
+
if (n === "escape-key") {
|
|
527
|
+
t.allowPropagation();
|
|
528
|
+
return;
|
|
529
|
+
}
|
|
530
|
+
if (n === "item-press") {
|
|
531
|
+
o("");
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
o(e);
|
|
535
|
+
},
|
|
536
|
+
itemToStringLabel: q.itemToStringLabel,
|
|
537
|
+
disabled: m,
|
|
538
|
+
filter: null,
|
|
539
|
+
name: b,
|
|
540
|
+
required: C,
|
|
541
|
+
open: ee,
|
|
542
|
+
onOpenChange: X,
|
|
543
|
+
children: [/* @__PURE__ */ L(he, {
|
|
544
|
+
placeholder: q.strings.placeholder,
|
|
545
|
+
clearLabel: q.strings.clear,
|
|
546
|
+
toggleLabel: q.strings.toggle,
|
|
547
|
+
className: h,
|
|
548
|
+
size: W,
|
|
549
|
+
error: te,
|
|
550
|
+
required: C,
|
|
551
|
+
disabled: m,
|
|
552
|
+
clearable: g,
|
|
553
|
+
onBlur: w
|
|
554
|
+
}), /* @__PURE__ */ L(ne, {
|
|
555
|
+
loading: u,
|
|
556
|
+
showStatus: q.showStatus,
|
|
557
|
+
showEmpty: q.showEmpty,
|
|
558
|
+
searchValue: a,
|
|
559
|
+
minSearchLength: f,
|
|
560
|
+
items: q.allItems,
|
|
561
|
+
groupedItems: q.groupedItems,
|
|
562
|
+
createOptionItem: q.createOptionItem,
|
|
563
|
+
renderItemContent: q.renderItemContent,
|
|
564
|
+
getItemReactKey: q.getItemReactKey,
|
|
565
|
+
getItemDisabled: I,
|
|
566
|
+
renderGroupLabel: A,
|
|
567
|
+
loadingMore: d && !q.showStatus ? P : !1,
|
|
568
|
+
strings: q.strings,
|
|
569
|
+
size: U,
|
|
570
|
+
portalContainer: v,
|
|
571
|
+
listRef: q.listRef
|
|
572
|
+
})]
|
|
573
|
+
}), /* @__PURE__ */ L(re, {
|
|
574
|
+
error: S,
|
|
575
|
+
size: U
|
|
576
|
+
})]
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
function _e({ items: e, selectedValues: n, onSelectedValuesChange: i, searchValue: o, onSearchValueChange: c, getItemLabel: l, getItemKey: u, loading: d = !1, showListContent: f = !0, minSearchLength: m = 3, strings: h, disabled: _ = !1, className: v, renderItem: b, portalContainer: x, name: C, invalid: w, error: D, required: O, onBlur: k, onSearch: A, debounceMs: N, creatable: I, onCreate: z, getItemGroup: B, renderGroupLabel: ee, hasMore: V, onLoadMore: H, loadingMore: U, getItemDisabled: W, highlightMatch: te, size: q, open: J, onOpenChange: Y, closeOnSelect: X = !1, applyButton: Z = !1, onApply: ie, onCancel: ae }) {
|
|
580
|
+
let { defaultScale: oe } = t(), se = fe(q, oe), ce = me(se), le = pe[se], ue = w || !!D, he = P(null), ge = u ?? l, [_e, ve] = F(n), [ye, be] = F(!1), xe = J !== void 0, Se = xe ? J : ye;
|
|
581
|
+
M(() => {
|
|
582
|
+
Z && ve(n);
|
|
583
|
+
}, [Z, n]);
|
|
584
|
+
let Q = j((e) => {
|
|
585
|
+
xe || be(e), Y?.(e);
|
|
586
|
+
}, [xe, Y]), $ = de({
|
|
587
|
+
items: e,
|
|
588
|
+
searchValue: o,
|
|
589
|
+
onSearchValueChange: c,
|
|
590
|
+
getItemLabel: l,
|
|
591
|
+
getItemKey: u,
|
|
592
|
+
loading: d,
|
|
593
|
+
showListContent: f,
|
|
594
|
+
minSearchLength: m,
|
|
595
|
+
strings: h,
|
|
596
|
+
renderItem: b,
|
|
597
|
+
onSearch: A,
|
|
598
|
+
debounceMs: N,
|
|
599
|
+
creatable: I,
|
|
600
|
+
onCreate: z,
|
|
601
|
+
getItemGroup: B,
|
|
602
|
+
hasMore: V,
|
|
603
|
+
onLoadMore: H,
|
|
604
|
+
loadingMore: U,
|
|
605
|
+
highlightMatch: te,
|
|
606
|
+
size: se,
|
|
607
|
+
ensuredItems: n
|
|
608
|
+
}), Ce = j((e) => {
|
|
609
|
+
let t = [], n = null;
|
|
610
|
+
for (let r of e) G(r) ? n = K(r) : t.push(r);
|
|
611
|
+
n && z?.(n);
|
|
612
|
+
let r = t.length !== e.length || !n ? t : null;
|
|
613
|
+
r && (Z ? ve(r) : i(r)), X && Q(!1);
|
|
614
|
+
}, [
|
|
615
|
+
i,
|
|
616
|
+
z,
|
|
617
|
+
Z,
|
|
618
|
+
X,
|
|
619
|
+
Q
|
|
620
|
+
]), we = j(() => {
|
|
621
|
+
Z && i(_e), ie?.(), Q(!1);
|
|
622
|
+
}, [
|
|
623
|
+
Z,
|
|
624
|
+
_e,
|
|
625
|
+
ie,
|
|
626
|
+
i,
|
|
627
|
+
Q
|
|
628
|
+
]), Te = j(() => {
|
|
629
|
+
Z && ve(n), ae?.(), Q(!1);
|
|
630
|
+
}, [
|
|
631
|
+
Z,
|
|
632
|
+
n,
|
|
633
|
+
ae,
|
|
634
|
+
Q
|
|
635
|
+
]), Ee = Z ? _e : n, De = Ee.length > 0 ? void 0 : $.strings.placeholder;
|
|
636
|
+
return /* @__PURE__ */ R(s, {
|
|
637
|
+
gap: "dense",
|
|
638
|
+
className: "combobox--component",
|
|
639
|
+
children: [/* @__PURE__ */ R(y, {
|
|
640
|
+
items: $.allItems,
|
|
641
|
+
multiple: !0,
|
|
642
|
+
value: Ee,
|
|
643
|
+
onValueChange: (e, t) => {
|
|
644
|
+
if (t.reason === "escape-key") {
|
|
645
|
+
t.allowPropagation();
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
Ce(e);
|
|
649
|
+
},
|
|
650
|
+
inputValue: o,
|
|
651
|
+
onInputValueChange: (e, t) => {
|
|
652
|
+
let { reason: n } = t;
|
|
653
|
+
if (n === "escape-key") {
|
|
654
|
+
t.allowPropagation();
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
if (n === "item-press") {
|
|
658
|
+
c("");
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
c(e);
|
|
662
|
+
},
|
|
663
|
+
itemToStringLabel: $.itemToStringLabel,
|
|
664
|
+
disabled: _,
|
|
665
|
+
filter: null,
|
|
666
|
+
name: C,
|
|
667
|
+
required: O,
|
|
668
|
+
open: Se,
|
|
669
|
+
onOpenChange: (e) => {
|
|
670
|
+
!e && Z && ve(n), Q(e);
|
|
671
|
+
},
|
|
672
|
+
children: [/* @__PURE__ */ R(S, {
|
|
673
|
+
ref: he,
|
|
674
|
+
className: r(T[ce], E[ce], ce === "sm" ? "text-pxs" : "text-sm", "bg-transparent !shadow-none", v),
|
|
675
|
+
size: le,
|
|
676
|
+
error: ue,
|
|
677
|
+
children: [Ee.map((e) => /* @__PURE__ */ L(g, { children: /* @__PURE__ */ L(a, {
|
|
678
|
+
tag: "span",
|
|
679
|
+
size: "inherit",
|
|
680
|
+
weight: "medium",
|
|
681
|
+
lineHeight: "tight",
|
|
682
|
+
className: "combobox--chip-label text-inherit",
|
|
683
|
+
children: l(e)
|
|
684
|
+
}) }, ge(e))), /* @__PURE__ */ L(p, {
|
|
685
|
+
placeholder: De,
|
|
686
|
+
"aria-invalid": ue || void 0,
|
|
687
|
+
"aria-required": O,
|
|
688
|
+
onBlur: k
|
|
689
|
+
})]
|
|
690
|
+
}), /* @__PURE__ */ L(ne, {
|
|
691
|
+
loading: d,
|
|
692
|
+
showStatus: $.showStatus,
|
|
693
|
+
showEmpty: $.showEmpty,
|
|
694
|
+
searchValue: o,
|
|
695
|
+
minSearchLength: m,
|
|
696
|
+
items: $.allItems,
|
|
697
|
+
groupedItems: $.groupedItems,
|
|
698
|
+
createOptionItem: $.createOptionItem,
|
|
699
|
+
renderItemContent: $.renderItemContent,
|
|
700
|
+
getItemReactKey: $.getItemReactKey,
|
|
701
|
+
getItemDisabled: W,
|
|
702
|
+
renderGroupLabel: ee,
|
|
703
|
+
loadingMore: f && !$.showStatus ? U : !1,
|
|
704
|
+
strings: $.strings,
|
|
705
|
+
size: se,
|
|
706
|
+
portalContainer: x,
|
|
707
|
+
listRef: $.listRef,
|
|
708
|
+
anchor: he,
|
|
709
|
+
applyFooter: f && Z ? {
|
|
710
|
+
applyLabel: $.strings.apply,
|
|
711
|
+
cancelLabel: $.strings.cancel,
|
|
712
|
+
onApply: we,
|
|
713
|
+
onCancel: Te
|
|
714
|
+
} : void 0
|
|
715
|
+
})]
|
|
716
|
+
}), /* @__PURE__ */ L(re, {
|
|
717
|
+
error: D,
|
|
718
|
+
size: se
|
|
719
|
+
})]
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
ge.displayName = "Combobox", _e.displayName = "MultiCombobox";
|
|
723
|
+
//#endregion
|
|
724
|
+
//#region src/components/features/combobox/async-resource-combobox.tsx
|
|
725
|
+
var ve = {
|
|
726
|
+
...U,
|
|
727
|
+
error: "Unable to load options.",
|
|
728
|
+
retry: "Retry"
|
|
729
|
+
};
|
|
730
|
+
function ye(e) {
|
|
731
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
732
|
+
}
|
|
733
|
+
function be({ fetcher: e, value: t, defaultValue: i = null, onValueChange: o, onAfterFetch: l, 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 }) {
|
|
734
|
+
let E = n(ve, S), D = t !== void 0, [O, A] = F(i), I = D ? t : O, [z, B] = F(""), [ee, V] = F([]), [H, U] = F(!1), [W, G] = F(null), [K, te] = F(0), q = P(0), J = z.trim(), Y = j((e) => {
|
|
735
|
+
D || A(e), o?.(e);
|
|
736
|
+
}, [D, o]), X = k((t, n) => {
|
|
737
|
+
U(!0), G(null), e(n).then((e) => {
|
|
738
|
+
n.signal?.aborted || q.current !== t || (V(e), l?.(e, n));
|
|
739
|
+
}).catch((e) => {
|
|
740
|
+
n.signal?.aborted || q.current !== t || (V([]), G({
|
|
741
|
+
error: e,
|
|
742
|
+
query: n.query
|
|
743
|
+
}), u?.(e, n));
|
|
744
|
+
}).finally(() => {
|
|
745
|
+
!n.signal?.aborted && q.current === t && U(!1);
|
|
746
|
+
});
|
|
747
|
+
}, _);
|
|
748
|
+
M(() => {
|
|
749
|
+
if (C) return;
|
|
750
|
+
if (!(J.length > 0 ? J.length >= y : v)) {
|
|
751
|
+
V([]), U(!1), G(null);
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
let e = q.current + 1;
|
|
755
|
+
q.current = e;
|
|
756
|
+
let t = new AbortController();
|
|
757
|
+
return X(e, {
|
|
758
|
+
query: J,
|
|
759
|
+
limit: g,
|
|
760
|
+
signal: t.signal
|
|
761
|
+
}), () => {
|
|
762
|
+
X.cancel(), t.abort();
|
|
763
|
+
};
|
|
764
|
+
}, [
|
|
765
|
+
C,
|
|
766
|
+
g,
|
|
767
|
+
y,
|
|
768
|
+
v,
|
|
769
|
+
K,
|
|
770
|
+
X,
|
|
771
|
+
J
|
|
772
|
+
]);
|
|
773
|
+
let Z = j(() => {
|
|
774
|
+
W && (B(W.query), te((e) => e + 1));
|
|
775
|
+
}, [W]), ne = j((e) => {
|
|
776
|
+
if (h) return h(e, {
|
|
777
|
+
query: J,
|
|
778
|
+
isSelected: I ? d(I) === d(e) : !1
|
|
779
|
+
});
|
|
780
|
+
let t = p?.(e), n = m?.(e);
|
|
781
|
+
return /* @__PURE__ */ R(s, {
|
|
782
|
+
render: /* @__PURE__ */ L("span", {}),
|
|
783
|
+
direction: "horizontal",
|
|
784
|
+
gap: "md",
|
|
785
|
+
wrap: !1,
|
|
786
|
+
className: "async-resource-combobox--option leading-tight",
|
|
787
|
+
children: [/* @__PURE__ */ L(a, {
|
|
788
|
+
tag: "span",
|
|
789
|
+
size: w === "sm" ? "pxs" : void 0,
|
|
790
|
+
weight: "medium",
|
|
791
|
+
className: "min-w-0 shrink truncate",
|
|
792
|
+
children: f(e)
|
|
793
|
+
}), (!!t || !!n) && /* @__PURE__ */ R("span", {
|
|
794
|
+
className: "inline-flex min-w-0 flex-1 items-center gap-space-sm overflow-hidden text-muted-foreground",
|
|
795
|
+
children: [!!t && (ye(t) ? /* @__PURE__ */ L(a, {
|
|
796
|
+
tag: "span",
|
|
797
|
+
size: "xs",
|
|
798
|
+
type: "secondary",
|
|
799
|
+
className: "min-w-0 truncate",
|
|
800
|
+
children: t
|
|
801
|
+
}) : t), !!n && (ye(n) ? /* @__PURE__ */ L(a, {
|
|
802
|
+
tag: "span",
|
|
803
|
+
size: "xs",
|
|
804
|
+
type: "secondary",
|
|
805
|
+
className: "min-w-0 truncate opacity-75",
|
|
806
|
+
children: n
|
|
807
|
+
}) : n)]
|
|
808
|
+
})]
|
|
809
|
+
});
|
|
810
|
+
}, [
|
|
811
|
+
p,
|
|
812
|
+
d,
|
|
813
|
+
f,
|
|
814
|
+
m,
|
|
815
|
+
h,
|
|
816
|
+
I,
|
|
817
|
+
w,
|
|
818
|
+
J
|
|
819
|
+
]), re = N(() => {
|
|
820
|
+
if (W) return b ?? E.error;
|
|
821
|
+
}, [
|
|
822
|
+
b,
|
|
823
|
+
W,
|
|
824
|
+
E.error
|
|
825
|
+
]), ie = W !== null, ae = W ? x?.({
|
|
826
|
+
error: W.error,
|
|
827
|
+
query: W.query,
|
|
828
|
+
retry: Z
|
|
829
|
+
}) ?? /* @__PURE__ */ L(c, {
|
|
830
|
+
variant: "inline",
|
|
831
|
+
title: re,
|
|
832
|
+
onRetry: Z,
|
|
833
|
+
retryLabel: E.retry,
|
|
834
|
+
className: "async-resource-combobox--error mt-space-sm"
|
|
835
|
+
}) : null;
|
|
836
|
+
return /* @__PURE__ */ R("div", {
|
|
837
|
+
"data-component": "async-resource-combobox",
|
|
838
|
+
"data-slot": "async-resource-combobox",
|
|
839
|
+
className: r("async-resource-combobox--component", T.className),
|
|
840
|
+
children: [/* @__PURE__ */ L(ge, {
|
|
841
|
+
...T,
|
|
842
|
+
className: void 0,
|
|
843
|
+
disabled: C,
|
|
844
|
+
size: w,
|
|
845
|
+
items: ee,
|
|
846
|
+
selectedValue: I ?? null,
|
|
847
|
+
onSelectedValueChange: Y,
|
|
848
|
+
clearSearchOnClose: !1,
|
|
849
|
+
searchValue: z,
|
|
850
|
+
onSearchValueChange: B,
|
|
851
|
+
getItemLabel: f,
|
|
852
|
+
getItemKey: d,
|
|
853
|
+
loading: !ie && H,
|
|
854
|
+
showListContent: !ie,
|
|
855
|
+
minSearchLength: y,
|
|
856
|
+
strings: E,
|
|
857
|
+
renderItem: ne
|
|
858
|
+
}), ae]
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
be.displayName = "AsyncResourceCombobox";
|
|
862
|
+
//#endregion
|
|
863
|
+
export { de as a, _e as i, ve as n, U as o, ge as r, be as t };
|
|
864
|
+
|
|
865
|
+
//# sourceMappingURL=combobox-CB7039j7.js.map
|