themelia-ui 3.0.0 → 3.2.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/.agents/skills/themelia-ui/SKILL.md +60 -33
- package/.agents/skills/themelia-ui/manifest.json +23 -0
- package/.agents/skills/themelia-ui/references/api-compatibility.md +5 -4
- package/.agents/skills/themelia-ui/references/blocks.md +123 -0
- package/.agents/skills/themelia-ui/references/composition-ladder.md +8 -8
- package/.agents/skills/themelia-ui/references/composition.md +100 -19
- package/.agents/skills/themelia-ui/references/forms.md +23 -3
- package/.agents/skills/themelia-ui/references/framework-wiring.md +41 -13
- package/.agents/skills/themelia-ui/references/i18n.md +4 -2
- package/.agents/skills/themelia-ui/references/imports.md +104 -104
- package/.agents/skills/themelia-ui/references/installation.md +60 -31
- package/.agents/skills/themelia-ui/references/migration.md +156 -5
- package/.agents/skills/themelia-ui/references/provider-and-scoping.md +37 -25
- package/.agents/skills/themelia-ui/references/reference-workflows.md +43 -0
- package/.agents/skills/themelia-ui/references/structure-and-spacing.md +147 -0
- package/.agents/skills/themelia-ui/references/theming.md +174 -131
- package/.agents/skills/themelia-ui/references/troubleshooting.md +88 -30
- package/.agents/skills/themelia-ui/references/verification.md +60 -5
- package/CHANGELOG.md +212 -0
- package/README.md +48 -60
- package/dist/accordion-CHuzMmWL.js +143 -0
- package/dist/{action-menu-BNLURfMK.js → action-menu-BwiL_F6I.js} +35 -33
- package/dist/{alert-dialog-BMVo6Z-8.js → alert-dialog-Cg2HhuBe.js} +1 -1
- package/dist/avatar-Dc_BNYfB.js +93 -0
- package/dist/badge-VlJVZjdm.js +45 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/alert-dialog.js +1 -1
- package/dist/base/aspect-ratio.js +3 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +2 -2
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +1 -1
- package/dist/base/carousel.js +6 -4
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/context-menu.js +22 -21
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +1 -1
- package/dist/base/dialog.js +1 -1
- package/dist/base/display.js +1 -1
- package/dist/base/dropdown-menu.js +1 -1
- package/dist/base/feedback.js +1 -1
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +1 -1
- package/dist/base/hover-card.js +26 -23
- package/dist/base/input-group.js +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/label.js +1 -1
- package/dist/base/menubar.js +20 -14
- package/dist/base/navigation-menu.js +47 -38
- package/dist/base/navigation.js +1 -1
- package/dist/base/otp-input.js +36 -30
- package/dist/base/overlay.js +1 -1
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +51 -47
- package/dist/base/repeaters.js +1 -1
- package/dist/base/resizable.js +2 -0
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +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 +1 -1
- package/dist/base/timeline.js +1 -1
- package/dist/base/toaster.js +1 -1
- package/dist/base/toggle.js +21 -15
- package/dist/base/toolbar.js +1 -1
- package/dist/base/tooltip.js +1 -1
- package/dist/base/typography.js +2 -2
- package/dist/base/upload.js +1 -1
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-BZYNKXdV.js → batch-action-bar-DZVMVW83.js} +11 -8
- package/dist/{admin/patterns → blocks/admin}/access.js +79 -76
- package/dist/blocks/admin/commerce.js +2493 -0
- package/dist/{patterns → blocks}/analytics.js +312 -303
- package/dist/{patterns → blocks}/onboarding.js +27 -23
- package/dist/{patterns → blocks}/timelines.js +1 -1
- package/dist/buttons-BX2JfL5X.js +173 -0
- package/dist/cards-Ddhz43Bz.js +279 -0
- package/dist/chart-BkK3Xm10.js +201 -0
- package/dist/choice-inputs-NwRxvmZN.js +694 -0
- package/dist/combobox-519ubijc.js +292 -0
- package/dist/command-JjApYFds.js +156 -0
- package/dist/comments-CCQ2QRaU.js +1443 -0
- package/dist/components/base/action-menu/action-menu.d.ts +1 -1
- package/dist/components/base/action-menu/action-menu.types.d.ts +2 -2
- package/dist/components/base/avatar/avatar.d.ts +5 -2
- package/dist/components/base/badge/badge.d.ts +10 -10
- package/dist/components/base/badge/badge.variants.d.ts +1 -2
- package/dist/components/base/badge/index.d.ts +1 -2
- package/dist/components/base/buttons/button.d.ts +9 -8
- package/dist/components/base/buttons/button.types.d.ts +2 -2
- package/dist/components/base/buttons/index.d.ts +1 -1
- package/dist/components/base/buttons/text-button.d.ts +1 -1
- package/dist/components/base/cards/card-actions.d.ts +1 -1
- package/dist/components/base/cards/card.d.ts +3 -1
- package/dist/components/base/cards/partials/card-header.d.ts +2 -1
- package/dist/components/base/choice-inputs/choice.types.d.ts +2 -2
- package/dist/components/base/choice-inputs/partials/choice-parts.d.ts +3 -3
- package/dist/components/base/command/command.d.ts +5 -2
- package/dist/components/base/display/icon-badge.d.ts +5 -3
- package/dist/components/base/display/index.d.ts +1 -1
- package/dist/components/base/display/metadata-list.d.ts +6 -6
- package/dist/components/base/display/metadata-value.d.ts +1 -1
- package/dist/components/base/display/separator.d.ts +2 -2
- package/dist/components/base/feedback/alert.d.ts +3 -2
- package/dist/components/base/feedback/empty.d.ts +5 -4
- package/dist/components/base/feedback/progress-circle.d.ts +2 -2
- package/dist/components/base/feedback/progress.d.ts +3 -1
- package/dist/components/base/forms/form-field.d.ts +2 -2
- package/dist/components/base/input-group/input-group.d.ts +8 -10
- package/dist/components/base/item/item.d.ts +2 -2
- package/dist/components/base/overlay/index.d.ts +1 -1
- package/dist/components/base/overlay/overlay.types.d.ts +7 -5
- package/dist/components/base/qr-code/qr-code.d.ts +4 -4
- package/dist/components/base/sheet/sheet.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +9 -13
- package/dist/components/base/spinner/spinner.d.ts +2 -2
- package/dist/components/base/structure/adaptive-grid.d.ts +3 -3
- package/dist/components/base/structure/bleed.d.ts +4 -2
- package/dist/components/base/structure/grid.d.ts +10 -4
- package/dist/components/base/structure/index.d.ts +1 -1
- package/dist/components/base/structure/split.d.ts +4 -3
- package/dist/components/base/structure/stack.d.ts +5 -5
- package/dist/components/base/structure/structure.maps.d.ts +2 -1
- package/dist/components/base/structure/structure.types.d.ts +10 -4
- package/dist/components/base/toggle/toggle.d.ts +2 -2
- package/dist/components/base/toolbar/toolbar.d.ts +3 -3
- package/dist/components/base/typography/index.d.ts +2 -0
- package/dist/components/base/typography/rich-text/rich-text.variants.d.ts +9 -0
- package/dist/components/base/typography/text/index.d.ts +1 -0
- package/dist/components/base/typography/text/text.d.ts +15 -8
- package/dist/components/base/typography/text/text.variants.d.ts +41 -0
- package/dist/components/base/value-inputs/color-input.d.ts +1 -7
- package/dist/components/base/value-inputs/slider.d.ts +2 -7
- package/dist/components/{admin/patterns → blocks/admin}/commerce/vendor-profile.d.ts +2 -1
- package/dist/components/{patterns → blocks}/analytics/analytics.strings.d.ts +2 -5
- package/dist/components/features/actions/action-adapters.d.ts +3 -3
- package/dist/components/features/actions/actions.types.d.ts +3 -5
- package/dist/components/features/actions/index.d.ts +1 -1
- package/dist/components/features/activities/activities-feed.d.ts +1 -1
- package/dist/components/features/activities/activities.types.d.ts +4 -4
- package/dist/components/features/activities/activity-parts.d.ts +3 -3
- package/dist/components/features/activities/activity-row.d.ts +4 -4
- package/dist/components/features/activities/index.d.ts +1 -1
- package/dist/components/features/ai-chat/ai-chat.types.d.ts +10 -3
- package/dist/components/features/ai-chat/ai-message-surfaces.d.ts +1 -1
- package/dist/components/features/ai-chat/ai-work-surfaces.d.ts +1 -1
- package/dist/components/features/combobox/combobox.strings.d.ts +2 -2
- package/dist/components/features/combobox/fetching-combobox.d.ts +2 -1
- package/dist/components/features/combobox/resource-combobox.d.ts +3 -0
- package/dist/components/features/combobox/use-suggestions.d.ts +7 -0
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +3 -0
- package/dist/components/features/media-library/index.d.ts +1 -1
- package/dist/components/features/media-library/media-library-parts.d.ts +4 -3
- package/dist/components/features/media-library/media-library-views.d.ts +4 -3
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +12 -13
- package/dist/components/features/media-library/media-library.types.d.ts +11 -9
- package/dist/components/features/media-library/media-resource-gallery.d.ts +1 -1
- package/dist/components/features/media-library/use-media-library.d.ts +1 -4
- package/dist/components/features/overlays/action-overlay-frame.d.ts +1 -1
- package/dist/components/features/overlays/index.d.ts +1 -1
- package/dist/components/features/overlays/overlay-parts.d.ts +3 -3
- package/dist/components/features/overlays/overlays.types.d.ts +8 -7
- package/dist/components/features/rich-text-editor/index.d.ts +0 -1
- package/dist/components/features/table/data-table-body.d.ts +1 -1
- package/dist/components/features/table/data-table-expanded-row.d.ts +27 -0
- package/dist/components/features/table/data-table-header.d.ts +1 -1
- package/dist/components/features/table/data-table-size.d.ts +1 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/index.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +9 -3
- package/dist/components/features/table/table.strings.d.ts +11 -0
- package/dist/components/features/table/table.types.d.ts +60 -2
- package/dist/components/features/theme-tweaker/index.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +6 -10
- package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +22 -6
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/auth/auth.d.ts +1 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -1
- package/dist/components/primitives/value.d.ts +3 -1
- package/dist/containers-B8d8U9GS.js +2 -0
- package/dist/{copyable-H1TUEY-H.js → copyable-D9Okb1w6.js} +12 -11
- package/dist/core.css +2 -2
- package/dist/css/access.css +2 -1
- package/dist/css/accordion.css +2 -1
- package/dist/css/action-menu.css +2 -1
- package/dist/css/activities.css +2 -1
- package/dist/css/ai-chat.css +2 -1
- package/dist/css/analytics.css +2 -1
- package/dist/css/app-shell.css +2 -1
- package/dist/css/aspect-ratio.css +2 -1
- package/dist/css/async-preview.css +2 -1
- package/dist/css/auth.css +2 -1
- package/dist/css/avatar.css +2 -1
- package/dist/css/badge.css +2 -1
- package/dist/css/batch-action-bar.css +2 -1
- package/dist/css/buttons.css +2 -1
- package/dist/css/cards.css +2 -1
- package/dist/css/carousel.css +2 -1
- package/dist/css/chart.css +2 -1
- package/dist/css/choice-inputs.css +2 -1
- package/dist/css/combobox.css +2 -1
- package/dist/css/combobox2.css +2 -1
- package/dist/css/command.css +2 -1
- package/dist/css/comments.css +2 -1
- package/dist/css/commerce.css +2 -1
- package/dist/css/containers.css +2 -1
- package/dist/css/copyable.css +2 -1
- package/dist/css/data-view.css +2 -1
- package/dist/css/date-pickers.css +2 -1
- package/dist/css/display.css +2 -1
- package/dist/css/dropdown-menu.css +2 -1
- package/dist/css/event-calendar.css +2 -1
- package/dist/css/feedback.css +2 -1
- package/dist/css/filters.css +2 -1
- package/dist/css/forms-numeric.css +2 -1
- package/dist/css/forms.css +2 -1
- package/dist/css/global-search.css +2 -1
- package/dist/css/header.css +2 -1
- package/dist/css/hover-card.css +2 -1
- package/dist/css/input-group.css +2 -1
- package/dist/css/item.css +2 -1
- package/dist/css/kanban.css +2 -1
- package/dist/css/label.css +2 -1
- package/dist/css/map.css +2 -1
- package/dist/css/media-library.css +2 -1
- package/dist/css/mentions.css +2 -1
- package/dist/css/menubar.css +2 -1
- package/dist/css/navigation-menu.css +2 -1
- package/dist/css/navigation.css +2 -1
- package/dist/css/navigation2.css +2 -1
- package/dist/css/onboarding.css +2 -1
- package/dist/css/otp-input.css +2 -1
- package/dist/css/overlay.css +2 -1
- package/dist/css/overlays.css +2 -1
- package/dist/css/page.css +2 -1
- package/dist/css/popover-menu.css +2 -1
- package/dist/css/popover.css +2 -1
- package/dist/css/primitives.css +2 -1
- package/dist/css/products.css +2 -1
- package/dist/css/qr-code.css +2 -1
- package/dist/css/repeaters.css +2 -1
- package/dist/css/resizable.css +2 -1
- package/dist/css/resource-assignment.css +2 -1
- package/dist/css/resource.css +2 -1
- package/dist/css/rich-text-editor.css +2 -1
- package/dist/css/schema-form.css +2 -1
- package/dist/css/sidebar.css +2 -1
- package/dist/css/sidebar2.css +2 -1
- package/dist/css/skeleton.css +2 -1
- package/dist/css/spinner.css +2 -1
- package/dist/css/structure.css +2 -1
- package/dist/css/sync.css +2 -1
- package/dist/css/table.css +2 -1
- package/dist/css/table2.css +2 -1
- package/dist/css/text-inputs.css +2 -1
- package/dist/css/theme-tweaker.css +2 -1
- package/dist/css/timeline.css +2 -1
- package/dist/css/timelines.css +2 -1
- package/dist/css/toaster.css +2 -1
- package/dist/css/toggle.css +2 -1
- package/dist/css/toolbar.css +2 -1
- package/dist/css/tooltip.css +2 -1
- package/dist/css/typography.css +2 -1
- package/dist/css/upload.css +2 -1
- package/dist/css/value-inputs.css +2 -1
- package/dist/css/workspace.css +2 -1
- package/dist/css-graph.json +1027 -0
- package/dist/date-pickers-BwCwKIVM.js +685 -0
- package/dist/{dialog-CtFCuTUF.js → dialog-CAnwRNrm.js} +1 -1
- package/dist/display-a7AoX_u7.js +664 -0
- package/dist/dropdown-menu-Br8kvjrF.js +235 -0
- package/dist/empty.js +0 -0
- package/dist/features/actions.js +6 -6
- package/dist/features/activities.js +219 -216
- package/dist/features/ai-chat.js +593 -565
- package/dist/features/async-preview.js +105 -286
- package/dist/features/combobox.js +328 -314
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +56 -55
- package/dist/features/event-calendar.js +189 -185
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +259 -260
- package/dist/features/kanban.js +39 -37
- package/dist/features/map.js +357 -354
- package/dist/features/media-library.js +931 -931
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +950 -942
- package/dist/features/resource-assignment.js +39 -37
- package/dist/features/resource.js +70 -71
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +342 -338
- package/dist/features/sync.js +14 -12
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +1002 -962
- package/dist/feedback-D4qVsKlD.js +430 -0
- package/dist/{filters-DOLKRSmb.js → filters-BhsTkWpZ.js} +386 -383
- package/dist/forms-C0WeNPFF.js +250 -0
- package/dist/forms-numeric-IwQ1ltNf.js +582 -0
- package/dist/hooks/use-native-dialog.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/input-group-HS_Z0Ei_.js +119 -0
- package/dist/item-M2pmpWXh.js +150 -0
- package/dist/{label-DumoMDm6.js → label-HOBXAscw.js} +7 -5
- package/dist/layout/app-shell.js +4 -2
- package/dist/layout/auth.js +102 -100
- package/dist/layout/header.js +190 -180
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +18 -16
- package/dist/layout/settings.js +2 -2
- package/dist/layout/sidebar.js +50 -46
- package/dist/layout/workspace.js +71 -69
- package/dist/lib/action-presentation.d.ts +3 -3
- package/dist/lib/component-vocabulary.d.ts +2 -2
- package/dist/lib/css-length.d.ts +2 -0
- package/dist/lib/responsive.d.ts +1 -1
- package/dist/lib/theming/index.d.ts +1 -0
- package/dist/lib/theming/recipes.d.ts +2 -2
- package/dist/lib/theming/themes/dense.d.ts +3 -0
- package/dist/lib/theming/themes/editorial.d.ts +3 -0
- package/dist/lib/theming/themes/index.d.ts +8 -0
- package/dist/lib/theming/themes/pair.d.ts +7 -0
- package/dist/lib/theming/themes/sharp.d.ts +3 -0
- package/dist/lib/theming/themes/soft.d.ts +3 -0
- package/dist/lib/theming/themes/types.d.ts +12 -0
- package/dist/lib/ui-provider/index.d.ts +1 -1
- package/dist/lib/ui-provider/scope.d.ts +5 -8
- package/dist/lib/ui-provider/tokens.d.ts +11 -3
- package/dist/lib/ui-provider/tokens.generated.d.ts +6 -4
- package/dist/lib/ui-provider/types.d.ts +17 -19
- package/dist/lib/ui-provider/ui-scope.d.ts +1 -1
- package/dist/{mentions-BbsEHlcH.js → mentions-BOxbigwp.js} +113 -111
- package/dist/navigation-Bgu7Vc0M.js +622 -0
- package/dist/navigation-DiYACqpE.js +216 -0
- package/dist/overlay-BuQOl8aP.js +356 -0
- package/dist/{overlays-DvVoS3td.js → overlays-1sULyytH.js} +77 -75
- package/dist/popover-CA7SP_iz.js +127 -0
- package/dist/popover-menu-QXgQeWeG.js +192 -0
- package/dist/{primitives-D0bdDozz.js → primitives-BskKlf35.js} +181 -178
- package/dist/primitives.js +1 -1
- package/dist/profiles/admin.json +6 -36
- package/dist/profiles/general.json +6 -96
- package/dist/repeaters-CeH20dvr.js +445 -0
- package/dist/rich-text-editor-D_Ppm8yh.js +491 -0
- package/dist/{sheet-CKcmRbJ9.js → sheet-CJ1-OAla.js} +3 -3
- package/dist/sidebar-D8uGqxio.js +421 -0
- package/dist/skeleton-BTKNKTdj.js +173 -0
- package/dist/spinner-Tc1QCnxM.js +30 -0
- package/dist/{structure-D0WGQAP3.js → structure-CynEZ-OY.js} +15 -23
- package/dist/style.css +1 -1
- package/dist/styles/TOKENS.md +116 -275
- package/dist/styles/animation.css +114 -0
- package/dist/styles/base.css +7 -6
- package/dist/styles/fields.css +45 -63
- package/dist/styles/focus.css +12 -0
- package/dist/styles/forced-colors.css +11 -10
- package/dist/styles/index.css +23 -30
- package/dist/styles/map.css +45 -34
- package/dist/styles/mentions.css +14 -52
- package/dist/styles/overlays.css +7 -7
- package/dist/styles/tailwind.css +76 -127
- package/dist/styles/targets.css +3 -3
- package/dist/styles/theme/colour.css +86 -0
- package/dist/styles/theme/density.css +31 -0
- package/dist/styles/theme/elevation.css +9 -0
- package/dist/styles/theme/layout.css +18 -0
- package/dist/styles/theme/motion.css +18 -0
- package/dist/styles/theme/shape.css +12 -0
- package/dist/styles/theme/size.css +10 -0
- package/dist/styles/theme/spacing.css +11 -0
- package/dist/styles/theme/typography.css +20 -0
- package/dist/styles/tone.css +61 -0
- package/dist/table-B7dtIFUx.js +1262 -0
- package/dist/table-Ds_eO9av.js +191 -0
- package/dist/tailwind.css +76 -127
- package/dist/text-inputs-BboE77nZ.js +395 -0
- package/dist/theming-C5ygF5uf.js +292 -0
- package/dist/theming.js +2 -2
- package/dist/{timeline-BdaGRyj-.js → timeline-BR_jNgvz.js} +57 -49
- package/dist/{timelines-BB7550mz.js → timelines-DXG1BfIN.js} +69 -67
- package/dist/{toaster-bBMgXm8z.js → toaster-CXL8L7Mm.js} +106 -99
- package/dist/tokens.json +1027 -636
- package/dist/toolbar-DBK-c4yy.js +74 -0
- package/dist/tooltip-BPYP-jUm.js +76 -0
- package/dist/{typography-BkxEiwQ1.js → typography-DmeR05Er.js} +87 -53
- package/dist/{ui-provider-Cmoq6i_D.js → ui-provider-DpzLUD12.js} +117 -69
- package/dist/ui-provider.js +1 -1
- package/dist/upload-CYuoJykZ.js +968 -0
- package/dist/use-async-preview-BFwf9ElY.js +188 -0
- package/dist/value-inputs-ng8aVJJZ.js +728 -0
- package/docs/README.md +13 -3
- package/docs/build/browser-composition-fixture.ts +28 -0
- package/docs/build/recipes.md +11484 -10723
- package/docs/generated/component-index.json +9809 -9169
- package/docs/generated/components/INDEX.md +5 -5
- package/docs/generated/components/base--accordion.md +51 -2
- package/docs/generated/components/base--action-menu.md +14 -15
- package/docs/generated/components/base--alert-dialog.md +3 -4
- package/docs/generated/components/base--aspect-ratio.md +3 -4
- package/docs/generated/components/base--avatar.md +7 -7
- package/docs/generated/components/base--badge.md +159 -27
- package/docs/generated/components/base--batch-action-bar.md +6 -7
- package/docs/generated/components/base--buttons.md +151 -47
- package/docs/generated/components/base--cards.md +107 -14
- package/docs/generated/components/base--carousel.md +1 -2
- package/docs/generated/components/base--chart.md +44 -8
- package/docs/generated/components/base--choice-inputs.md +10 -11
- package/docs/generated/components/base--combobox.md +3 -4
- package/docs/generated/components/base--command.md +6 -6
- package/docs/generated/components/base--context-menu.md +1 -2
- package/docs/generated/components/base--copyable.md +6 -7
- package/docs/generated/components/base--date-pickers.md +6 -7
- package/docs/generated/components/base--dialog.md +6 -7
- package/docs/generated/components/base--direction.md +1 -1
- package/docs/generated/components/base--display.md +234 -54
- package/docs/generated/components/base--dropdown-menu.md +6 -7
- package/docs/generated/components/base--feedback.md +71 -18
- package/docs/generated/components/base--forms-numeric.md +6 -7
- package/docs/generated/components/base--forms.md +84 -14
- package/docs/generated/components/base--hover-card.md +3 -4
- package/docs/generated/components/base--input-group.md +27 -30
- package/docs/generated/components/base--item.md +8 -9
- package/docs/generated/components/base--label.md +2 -3
- package/docs/generated/components/base--menubar.md +2 -4
- package/docs/generated/components/base--navigation-menu.md +2 -3
- package/docs/generated/components/base--navigation.md +2 -3
- package/docs/generated/components/base--otp-input.md +3 -4
- package/docs/generated/components/base--overlay.md +56 -47
- package/docs/generated/components/base--popover-menu.md +7 -8
- package/docs/generated/components/base--popover.md +9 -10
- package/docs/generated/components/base--qr-code.md +7 -8
- package/docs/generated/components/base--repeaters.md +6 -7
- package/docs/generated/components/base--resizable.md +2 -3
- package/docs/generated/components/base--sheet.md +12 -13
- package/docs/generated/components/base--sidebar.md +9 -11
- package/docs/generated/components/base--skeleton.md +6 -7
- package/docs/generated/components/base--slot.md +1 -1
- package/docs/generated/components/base--spinner.md +5 -7
- package/docs/generated/components/base--structure.md +320 -70
- package/docs/generated/components/base--table.md +61 -3
- package/docs/generated/components/base--text-inputs.md +17 -18
- package/docs/generated/components/base--timeline.md +45 -4
- package/docs/generated/components/base--toaster.md +43 -12
- package/docs/generated/components/base--toggle.md +11 -12
- package/docs/generated/components/base--toolbar.md +7 -8
- package/docs/generated/components/base--tooltip.md +5 -6
- package/docs/generated/components/base--typography.md +317 -32
- package/docs/generated/components/base--upload.md +8 -9
- package/docs/generated/components/base--value-inputs.md +9 -38
- package/docs/generated/components/{admin--patterns--access.md → blocks--admin--access.md} +15 -6
- package/docs/generated/components/{admin--patterns--commerce.md → blocks--admin--commerce.md} +40 -41
- package/docs/generated/components/{patterns--analytics.md → blocks--analytics.md} +57 -14
- package/docs/generated/components/{patterns--onboarding.md → blocks--onboarding.md} +6 -7
- package/docs/generated/components/{patterns--timelines.md → blocks--timelines.md} +6 -7
- package/docs/generated/components/features--actions.md +8 -18
- package/docs/generated/components/features--activities.md +31 -32
- package/docs/generated/components/features--ai-chat.md +15 -15
- package/docs/generated/components/features--async-preview.md +5 -6
- package/docs/generated/components/features--combobox.md +71 -5
- package/docs/generated/components/features--comments.md +0 -1
- package/docs/generated/components/features--data-view.md +63 -8
- package/docs/generated/components/features--event-calendar.md +1 -2
- package/docs/generated/components/features--filters.md +11 -2
- package/docs/generated/components/features--global-search.md +1 -2
- package/docs/generated/components/features--kanban.md +1 -2
- package/docs/generated/components/features--map.md +1 -2
- package/docs/generated/components/features--media-library.md +105 -38
- package/docs/generated/components/features--mentions.md +7 -7
- package/docs/generated/components/features--overlays.md +75 -22
- package/docs/generated/components/features--products.md +10 -11
- package/docs/generated/components/features--resource-assignment.md +2 -3
- package/docs/generated/components/features--resource.md +3 -4
- package/docs/generated/components/features--rich-text-editor.md +42 -13
- package/docs/generated/components/features--schema-form.md +1 -2
- package/docs/generated/components/features--sync.md +2 -3
- package/docs/generated/components/features--table.md +162 -12
- package/docs/generated/components/features--theme-tweaker.md +30 -15
- package/docs/generated/components/forms.md +2 -2
- package/docs/generated/components/layout--app-shell.md +41 -11
- package/docs/generated/components/layout--auth.md +8 -9
- package/docs/generated/components/layout--containers.md +40 -1
- package/docs/generated/components/layout--header.md +2 -3
- package/docs/generated/components/layout--navigation.md +0 -1
- package/docs/generated/components/layout--page.md +33 -5
- package/docs/generated/components/layout--settings.md +0 -1
- package/docs/generated/components/layout--sidebar.md +47 -7
- package/docs/generated/components/layout--workspace.md +3 -4
- package/docs/generated/components/primitives.md +128 -17
- package/docs/generated/components/theming.md +147 -4
- package/docs/generated/components/ui-provider.md +96 -78
- package/docs/generated/composition-ladder.md +8 -8
- package/docs/generated/consumer-contract.json +5736 -0
- package/docs/generated/imports.md +104 -104
- package/docs/generated/migration-broad-imports.json +267 -90
- package/docs/generated/migration-broad-imports.md +266 -101
- package/docs/generated/migration-codemod.json +365 -70
- package/docs/generated/migration.md +665 -95
- package/docs/generated/profiles.md +27 -27
- package/docs/generated/public-api.md +104 -102
- package/docs/generated/recipes.json +755 -810
- package/docs/generated/workflows/communications-overview/analytics/communications-reference.tsx +19 -0
- package/docs/generated/workflows/index.json +691 -0
- package/docs/generated/workflows/media-picking/media-library/media-picking-reference.tsx +63 -0
- package/docs/generated/workflows/media-picking/media-library/reference-data.ts +3 -0
- package/docs/generated/workflows/multi-section-form/form-workflow/multi-section-reference.tsx +46 -0
- package/docs/generated/workflows/nested-action-flow/action-overlays/nested-action-reference.tsx +39 -0
- package/docs/generated/workflows/record-detail/page-layout/record-detail-reference.tsx +24 -0
- package/docs/generated/workflows/resource-index/data-view/resource-index-reference.tsx +51 -0
- package/docs/generated/workflows/scoped-resource-selection/combobox/scoped-resource-reference.tsx +50 -0
- package/docs/generated/workflows/website-content-editor/media-library/reference-data.ts +3 -0
- package/docs/generated/workflows/website-content-editor/rich-text-editor/website-content-reference.tsx +33 -0
- package/docs/generated/workflows/workspace-navigation/app-shell/workspace-navigation-reference.tsx +26 -0
- package/docs/learn/api-compatibility.md +5 -4
- package/docs/learn/blocks.md +123 -0
- package/docs/learn/composition.md +100 -19
- package/docs/learn/forms.md +23 -3
- package/docs/learn/framework-wiring.md +41 -13
- package/docs/learn/i18n.md +4 -2
- package/docs/learn/installation.md +60 -31
- package/docs/learn/migration.md +156 -5
- package/docs/learn/provider-and-scoping.md +37 -25
- package/docs/learn/reference-workflows.md +43 -0
- package/docs/learn/structure-and-spacing.md +147 -0
- package/docs/learn/theming.md +174 -131
- package/docs/learn/troubleshooting.md +88 -30
- package/docs/learn/verification.md +60 -5
- package/package.json +42 -473
- package/scripts/consumer/codemod.mjs +50 -32
- package/scripts/consumer/contract-reader.mjs +42 -0
- package/scripts/consumer/css-scan.mjs +51 -0
- package/scripts/consumer/diagnose.mjs +136 -0
- package/scripts/consumer/find-component.mjs +30 -17
- package/scripts/consumer/install-skill.mjs +93 -11
- package/src/styles/TOKENS.md +116 -275
- package/dist/accordion-6YPJ9XRO.js +0 -135
- package/dist/admin/patterns/access.css +0 -15
- package/dist/admin/patterns/commerce.css +0 -29
- package/dist/admin/patterns/commerce.js +0 -2493
- package/dist/avatar-CS7zow2q.js +0 -85
- package/dist/badge-CxOuTfVr.js +0 -63
- package/dist/base/accordion.css +0 -3
- package/dist/base/action-menu.css +0 -6
- package/dist/base/alert-dialog.css +0 -4
- package/dist/base/aspect-ratio.css +0 -2
- package/dist/base/avatar.css +0 -4
- package/dist/base/badge.css +0 -2
- package/dist/base/batch-action-bar.css +0 -5
- package/dist/base/buttons.css +0 -4
- package/dist/base/cards.css +0 -13
- package/dist/base/carousel.css +0 -5
- package/dist/base/chart.css +0 -2
- package/dist/base/choice-inputs.css +0 -10
- package/dist/base/combobox.css +0 -3
- package/dist/base/command.css +0 -9
- package/dist/base/context-menu.css +0 -2
- package/dist/base/copyable.css +0 -6
- package/dist/base/date-pickers.css +0 -11
- package/dist/base/dialog.css +0 -4
- package/dist/base/display.css +0 -8
- package/dist/base/dropdown-menu.css +0 -2
- package/dist/base/feedback.css +0 -5
- package/dist/base/forms-numeric.css +0 -12
- package/dist/base/forms.css +0 -14
- package/dist/base/hover-card.css +0 -2
- package/dist/base/input-group.css +0 -6
- package/dist/base/item.css +0 -9
- package/dist/base/label.css +0 -3
- package/dist/base/menubar.css +0 -2
- package/dist/base/navigation-menu.css +0 -2
- package/dist/base/navigation.css +0 -12
- package/dist/base/otp-input.css +0 -9
- package/dist/base/overlay.css +0 -4
- package/dist/base/popover-menu.css +0 -11
- package/dist/base/popover.css +0 -3
- package/dist/base/qr-code.css +0 -2
- package/dist/base/repeaters.css +0 -18
- package/dist/base/resizable.css +0 -2
- package/dist/base/sheet.css +0 -4
- package/dist/base/sidebar.css +0 -12
- package/dist/base/skeleton.css +0 -9
- package/dist/base/spinner.css +0 -2
- package/dist/base/structure.css +0 -2
- package/dist/base/table.css +0 -3
- package/dist/base/text-inputs.css +0 -2
- package/dist/base/timeline.css +0 -9
- package/dist/base/toaster.css +0 -2
- package/dist/base/toggle.css +0 -2
- package/dist/base/toolbar.css +0 -5
- package/dist/base/tooltip.css +0 -2
- package/dist/base/typography.css +0 -2
- package/dist/base/upload.css +0 -10
- package/dist/base/value-inputs.css +0 -14
- package/dist/buttons-CqXKWty3.js +0 -179
- package/dist/cards-C6Ulbkw7.js +0 -271
- package/dist/chart-nomhJ87z.js +0 -193
- package/dist/choice-inputs-OUDn0kQw.js +0 -680
- package/dist/combobox-C8oP92bT.js +0 -266
- package/dist/command-Bp3B6pUu.js +0 -143
- package/dist/comments-CAnDlyXO.js +0 -1438
- package/dist/components/admin/patterns/index.d.ts +0 -2
- package/dist/components/features/rich-text-editor/exec-command-engine.d.ts +0 -2
- package/dist/components/patterns/index.d.ts +0 -3
- package/dist/css/styles.css +0 -1
- package/dist/date-pickers-DOwIT-Nk.js +0 -661
- package/dist/display-B3Q17h5z.js +0 -645
- package/dist/dropdown-menu-TyNLCLML.js +0 -223
- package/dist/features/actions.css +0 -11
- package/dist/features/activities.css +0 -25
- package/dist/features/ai-chat.css +0 -14
- package/dist/features/async-preview.css +0 -10
- package/dist/features/combobox.css +0 -12
- package/dist/features/comments.css +0 -24
- package/dist/features/data-view.css +0 -31
- package/dist/features/event-calendar.css +0 -17
- package/dist/features/filters.css +0 -24
- package/dist/features/global-search.css +0 -19
- package/dist/features/kanban.css +0 -7
- package/dist/features/map.css +0 -15
- package/dist/features/media-library.css +0 -27
- package/dist/features/mentions.css +0 -17
- package/dist/features/overlays.css +0 -11
- package/dist/features/products.css +0 -29
- package/dist/features/resource-assignment.css +0 -14
- package/dist/features/resource.css +0 -15
- package/dist/features/rich-text-editor.css +0 -8
- package/dist/features/schema-form.css +0 -22
- package/dist/features/sync.css +0 -11
- package/dist/features/table.css +0 -20
- package/dist/features/theme-tweaker.css +0 -27
- package/dist/feedback-DRerHGuV.js +0 -469
- package/dist/forms-CPrGGif_.js +0 -242
- package/dist/forms-numeric-CPVsL7Vf.js +0 -569
- package/dist/index.css +0 -3
- package/dist/input-group-BYe0rhoB.js +0 -126
- package/dist/item-B3yQ26as.js +0 -146
- package/dist/layout/app-shell.css +0 -13
- package/dist/layout/auth.css +0 -14
- package/dist/layout/containers.css +0 -2
- package/dist/layout/header.css +0 -20
- package/dist/layout/navigation.css +0 -11
- package/dist/layout/page.css +0 -15
- package/dist/layout/settings.css +0 -16
- package/dist/layout/sidebar.css +0 -16
- package/dist/layout/workspace.css +0 -15
- package/dist/navigation-CsqTA16F.js +0 -614
- package/dist/navigation-DzxzPuwg.js +0 -202
- package/dist/overlay-WQOsLd69.js +0 -345
- package/dist/patterns/analytics.css +0 -15
- package/dist/patterns/onboarding.css +0 -11
- package/dist/patterns/timelines.css +0 -11
- package/dist/popover-DriLnIFc.js +0 -123
- package/dist/popover-menu-C2UCMAe7.js +0 -189
- package/dist/primitives.css +0 -3
- package/dist/repeaters-DuP1N0nw.js +0 -438
- package/dist/rich-text-editor-BQXFe9oN.js +0 -595
- package/dist/sidebar-D0N6ckJL.js +0 -412
- package/dist/skeleton-DGR9df28.js +0 -172
- package/dist/spinner-CUAVFecI.js +0 -52
- package/dist/styles/FACTORS.md +0 -36
- package/dist/styles/SCOPES.md +0 -86
- package/dist/styles/themes/default.css +0 -164
- package/dist/styles/theming/animation.css +0 -143
- package/dist/styles/theming/colors.css +0 -97
- package/dist/styles/theming/feedback.css +0 -17
- package/dist/styles/theming/field.css +0 -21
- package/dist/styles/theming/focus.css +0 -88
- package/dist/styles/theming/layers.css +0 -13
- package/dist/styles/theming/layout.css +0 -21
- package/dist/styles/theming/motion.css +0 -42
- package/dist/styles/theming/overlay.css +0 -52
- package/dist/styles/theming/sizing.css +0 -118
- package/dist/styles/theming/text.css +0 -30
- package/dist/styles/theming/typography.css +0 -26
- package/dist/styles/tokens/components.css +0 -22
- package/dist/styles/tokens/foundation.css +0 -80
- package/dist/styles/tokens/layout.css +0 -19
- package/dist/styles/tokens/palette.css +0 -88
- package/dist/styles/tokens/primitives.css +0 -18
- package/dist/styles/tokens/states.css +0 -77
- package/dist/table-BC4qqsUb.js +0 -180
- package/dist/table-BHDpjajL.js +0 -982
- package/dist/text-inputs-DF_lD7pA.js +0 -385
- package/dist/theming-D6KRU7hO.js +0 -104
- package/dist/toolbar-DWRywF0R.js +0 -68
- package/dist/tooltip-t1VQQ2tZ.js +0 -73
- package/dist/upload-B38YZeFJ.js +0 -938
- package/dist/value-inputs-Q4ymjXlV.js +0 -716
- package/src/styles/FACTORS.md +0 -36
- package/src/styles/SCOPES.md +0 -86
- /package/dist/components/{admin/patterns → blocks/admin}/access/admin.strings.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/credential-list.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/index.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/role-permissions.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/access/sensitive-action.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/account.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/address-lines.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/booking.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/cart.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.strings.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.types.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/format-amount.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/index.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/inventory-section.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/invoice.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/loyalty.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-customer.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-detail.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-line-item.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-transactions.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/order.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-listing.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-score.d.ts +0 -0
- /package/dist/components/{admin/patterns → blocks/admin}/commerce/summary-panel.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/activity-heatmap.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/analytics.types.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/chart-card.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/format-metric-value.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-bar.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-comparison.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-gradient.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-grid.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-micro-grid.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-skeleton.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric-trend-chip.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/metric.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/analytics/time-ruler.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/checklist.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/onboarding/onboarding.strings.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/changelog-timeline.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/index.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/milestones-timeline.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/steps.d.ts +0 -0
- /package/dist/components/{patterns → blocks}/timelines/timelines.strings.d.ts +0 -0
- /package/dist/styles/{theming/breakpoints.css → breakpoints.css} +0 -0
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { t
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { C as
|
|
9
|
-
import { t as
|
|
2
|
+
import "#core.css";
|
|
3
|
+
import { s as e } from "../typography-DmeR05Er.js";
|
|
4
|
+
import { t } from "../cx--CBrhWH0.js";
|
|
5
|
+
import { c as n } from "../buttons-BX2JfL5X.js";
|
|
6
|
+
import { t as r } from "../feedback-D4qVsKlD.js";
|
|
7
|
+
import { m as i } from "../display-a7AoX_u7.js";
|
|
8
|
+
import { C as a, E as o, _ as s, a as c, b as l, c as u, d, g as f, i as p, m, o as h, p as g, u as _, x as v, y } from "../combobox-519ubijc.js";
|
|
9
|
+
import { t as b } from "../use-debounced-callback-BcKYwxqp.js";
|
|
10
|
+
import { t as x } from "../spinner-Tc1QCnxM.js";
|
|
10
11
|
import { PlusIcon as S } from "lucide-react";
|
|
11
|
-
import { useCallback as C, useEffect as w, useId as T,
|
|
12
|
-
import { Fragment as
|
|
13
|
-
|
|
12
|
+
import { useCallback as C, useEffect as w, useId as T, useLayoutEffect as E, useMemo as D, useRef as O, useState as k } from "react";
|
|
13
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
14
|
+
import "#css/combobox.css";
|
|
15
|
+
var N = {
|
|
14
16
|
root: "combobox__root___FdCB-",
|
|
15
17
|
error: "combobox__error___2R4DY",
|
|
16
18
|
errorState: "combobox__errorState___0HPSR",
|
|
@@ -28,74 +30,74 @@ var M = {
|
|
|
28
30
|
};
|
|
29
31
|
//#endregion
|
|
30
32
|
//#region src/components/features/combobox/combobox-dropdown.tsx
|
|
31
|
-
function
|
|
32
|
-
return
|
|
33
|
+
function P({ loading: t, trimmedSearch: n, minSearchLength: r, strings: i }) {
|
|
34
|
+
return t ? /* @__PURE__ */ j(x, { label: i.searching }) : n === "" ? /* @__PURE__ */ j(e, {
|
|
33
35
|
size: "xs",
|
|
34
36
|
type: "secondary",
|
|
35
37
|
children: i.formatTypeToSearch(r)
|
|
36
|
-
}) : n.length < r ? /* @__PURE__ */
|
|
38
|
+
}) : n.length < r ? /* @__PURE__ */ j(e, {
|
|
37
39
|
size: "xs",
|
|
38
40
|
type: "secondary",
|
|
39
41
|
children: i.formatTypeMore(r - n.length)
|
|
40
42
|
}) : null;
|
|
41
43
|
}
|
|
42
|
-
function
|
|
43
|
-
let L = !!I ||
|
|
44
|
+
function F({ loading: t, showStatus: r, showEmpty: o, trimmedSearch: c, minSearchLength: p, items: h, groupedItems: g, createOptionItem: v, renderItemContent: b, getItemReactKey: S, getItemDisabled: C, renderGroupLabel: w, loadingMore: T, strings: E, portalContainer: D, listRef: O, anchor: k, applyFooter: F, errorSlot: I }) {
|
|
45
|
+
let L = !!I || r || o || h.length > 0 || !!T || !!F, R = (e) => /* @__PURE__ */ j(m, {
|
|
44
46
|
value: e,
|
|
45
47
|
disabled: C?.(e),
|
|
46
|
-
children:
|
|
47
|
-
}, S(e)), z = /* @__PURE__ */
|
|
48
|
-
anchor:
|
|
49
|
-
className: D ?
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
"aria-busy":
|
|
48
|
+
children: b(e)
|
|
49
|
+
}, S(e)), z = /* @__PURE__ */ j(l, {
|
|
50
|
+
anchor: k,
|
|
51
|
+
className: D ? N.positioner : void 0,
|
|
52
|
+
children: /* @__PURE__ */ j(s, {
|
|
53
|
+
"aria-busy": t || void 0,
|
|
52
54
|
"data-empty": !L || void 0,
|
|
53
|
-
className:
|
|
54
|
-
children: I ?? /* @__PURE__ */
|
|
55
|
-
|
|
56
|
-
className:
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
loading:
|
|
59
|
-
trimmedSearch:
|
|
60
|
-
minSearchLength:
|
|
55
|
+
className: N.popup,
|
|
56
|
+
children: I ?? /* @__PURE__ */ M(A, { children: [
|
|
57
|
+
r && /* @__PURE__ */ j(a, {
|
|
58
|
+
className: N.status,
|
|
59
|
+
children: /* @__PURE__ */ j(P, {
|
|
60
|
+
loading: t,
|
|
61
|
+
trimmedSearch: c,
|
|
62
|
+
minSearchLength: p,
|
|
61
63
|
strings: E
|
|
62
64
|
})
|
|
63
65
|
}),
|
|
64
|
-
|
|
65
|
-
className:
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
o && /* @__PURE__ */ j(a, {
|
|
67
|
+
className: N.empty,
|
|
68
|
+
children: /* @__PURE__ */ j(e, {
|
|
67
69
|
type: "secondary",
|
|
68
70
|
children: E.noResults
|
|
69
71
|
})
|
|
70
72
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ j(i, {
|
|
72
74
|
ref: O,
|
|
73
|
-
className:
|
|
74
|
-
children: /* @__PURE__ */
|
|
75
|
-
className:
|
|
76
|
-
children: g ? /* @__PURE__ */
|
|
75
|
+
className: N.scroller,
|
|
76
|
+
children: /* @__PURE__ */ j(f, {
|
|
77
|
+
className: N.list,
|
|
78
|
+
children: g ? /* @__PURE__ */ M(A, { children: [Array.from(g.entries()).map(([e, t]) => /* @__PURE__ */ M(_, {
|
|
77
79
|
items: t,
|
|
78
|
-
children: [/* @__PURE__ */
|
|
79
|
-
}, e)),
|
|
80
|
+
children: [/* @__PURE__ */ j(d, { children: w ? w(e) : e }), /* @__PURE__ */ j(u, { children: R })]
|
|
81
|
+
}, e)), v !== null && R(v)] }) : /* @__PURE__ */ j(u, { children: R })
|
|
80
82
|
})
|
|
81
83
|
}),
|
|
82
|
-
!!T && /* @__PURE__ */
|
|
84
|
+
!!T && /* @__PURE__ */ j("div", {
|
|
83
85
|
role: "status",
|
|
84
86
|
"aria-live": "polite",
|
|
85
|
-
className:
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
+
className: N.loadingMore,
|
|
88
|
+
children: /* @__PURE__ */ j(x, { label: E.loadingMore })
|
|
87
89
|
}),
|
|
88
|
-
!!F && /* @__PURE__ */
|
|
89
|
-
className:
|
|
90
|
-
children: [/* @__PURE__ */
|
|
90
|
+
!!F && /* @__PURE__ */ M("div", {
|
|
91
|
+
className: N.footer,
|
|
92
|
+
children: [/* @__PURE__ */ j(n, {
|
|
91
93
|
type: "button",
|
|
92
94
|
tone: "neutral",
|
|
93
|
-
|
|
95
|
+
appearance: "ghost",
|
|
94
96
|
onClick: (e) => {
|
|
95
97
|
e.preventDefault(), e.stopPropagation(), F.onCancel();
|
|
96
98
|
},
|
|
97
99
|
children: F.cancelLabel
|
|
98
|
-
}), /* @__PURE__ */
|
|
100
|
+
}), /* @__PURE__ */ j(n, {
|
|
99
101
|
type: "button",
|
|
100
102
|
onClick: (e) => {
|
|
101
103
|
e.preventDefault(), e.stopPropagation(), F.onApply();
|
|
@@ -106,14 +108,14 @@ function P({ loading: e, showStatus: n, showEmpty: a, trimmedSearch: s, minSearc
|
|
|
106
108
|
] })
|
|
107
109
|
})
|
|
108
110
|
});
|
|
109
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ j(y, {
|
|
110
112
|
container: D,
|
|
111
113
|
children: z
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
116
|
//#endregion
|
|
115
117
|
//#region src/components/features/combobox/combobox.strings.ts
|
|
116
|
-
var
|
|
118
|
+
var I = {
|
|
117
119
|
placeholder: "Search…",
|
|
118
120
|
clear: "Clear selection",
|
|
119
121
|
toggle: "Show options",
|
|
@@ -128,31 +130,31 @@ var F = {
|
|
|
128
130
|
errorTitle: "Could not load results",
|
|
129
131
|
retry: "Retry",
|
|
130
132
|
removeChip: (e) => `Remove ${e}`
|
|
131
|
-
},
|
|
133
|
+
}, L = {
|
|
132
134
|
placeholder: "Search…",
|
|
133
135
|
emptyMessage: "No results found.",
|
|
134
136
|
loadingMessage: "Searching…",
|
|
135
137
|
startTypingMessage: "Type to search.",
|
|
136
|
-
formatTypeMore:
|
|
138
|
+
formatTypeMore: I.formatTypeMore,
|
|
137
139
|
errorMessage: "Could not load suggestions.",
|
|
138
140
|
retry: "Retry"
|
|
139
141
|
};
|
|
140
142
|
//#endregion
|
|
141
143
|
//#region src/components/features/combobox/highlighted-text.tsx
|
|
142
|
-
function
|
|
144
|
+
function R(e) {
|
|
143
145
|
return e.replace(/[$()*+.?[\\\]^{|}]/g, "\\$&");
|
|
144
146
|
}
|
|
145
|
-
function
|
|
146
|
-
if (!n.trim()) return /* @__PURE__ */
|
|
147
|
+
function z({ text: t, highlight: n }) {
|
|
148
|
+
if (!n.trim()) return /* @__PURE__ */ j(e, {
|
|
147
149
|
tag: "span",
|
|
148
150
|
size: "inherit",
|
|
149
151
|
type: "inherit",
|
|
150
152
|
lineHeight: "tight",
|
|
151
153
|
className: "highlighted-text--component",
|
|
152
|
-
children:
|
|
154
|
+
children: t
|
|
153
155
|
});
|
|
154
|
-
let r =
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
+
let r = t.split(RegExp(`(${R(n)})`, "gi")), i = r.reduce((e, t, n) => [...e, (e[n] ?? 0) + t.length], [0]);
|
|
157
|
+
return /* @__PURE__ */ j(e, {
|
|
156
158
|
tag: "span",
|
|
157
159
|
size: "inherit",
|
|
158
160
|
type: "inherit",
|
|
@@ -162,25 +164,25 @@ function R({ text: e, highlight: n }) {
|
|
|
162
164
|
let n = t % 2 == 1;
|
|
163
165
|
if (!n && e === "") return null;
|
|
164
166
|
let r = `${i[t]}:${n ? "match" : "text"}`;
|
|
165
|
-
return
|
|
167
|
+
return j(n ? "mark" : "span", { children: e }, r);
|
|
166
168
|
})
|
|
167
169
|
});
|
|
168
170
|
}
|
|
169
171
|
//#endregion
|
|
170
172
|
//#region src/components/features/combobox/use-combobox-core.tsx
|
|
171
|
-
var
|
|
172
|
-
function W(e) {
|
|
173
|
-
return typeof e == "object" && !!e && U in e;
|
|
174
|
-
}
|
|
173
|
+
var B = 3, V = .8, H = 100, U = 500, W = Symbol("combobox-create-option");
|
|
175
174
|
function G(e) {
|
|
176
|
-
|
|
177
|
-
return e[U];
|
|
175
|
+
return typeof e == "object" && !!e && W in e;
|
|
178
176
|
}
|
|
179
177
|
function K(e) {
|
|
180
|
-
|
|
178
|
+
if (!G(e)) throw Error("That item is not a create option.");
|
|
179
|
+
return e[W];
|
|
180
|
+
}
|
|
181
|
+
function q(e) {
|
|
182
|
+
return { [W]: e };
|
|
181
183
|
}
|
|
182
|
-
function
|
|
183
|
-
let i =
|
|
184
|
+
function J({ searchValue: e, onSearch: t, debounceMs: n = 300, minSearchLength: r = 3 }) {
|
|
185
|
+
let i = b((e) => t?.(e), n);
|
|
184
186
|
w(() => {
|
|
185
187
|
let t = e.trim();
|
|
186
188
|
if (!(t.length < r)) return i(t), i.cancel;
|
|
@@ -190,115 +192,115 @@ function q({ searchValue: e, onSearch: t, debounceMs: n = 300, minSearchLength:
|
|
|
190
192
|
e
|
|
191
193
|
]);
|
|
192
194
|
}
|
|
193
|
-
function
|
|
194
|
-
let r =
|
|
195
|
+
function ee({ hasMore: e, onLoadMore: t, loadingMore: n }) {
|
|
196
|
+
let r = O(!1), i = O(null), a = b(() => {
|
|
195
197
|
r.current = !0, t?.(), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
196
198
|
r.current = !1, i.current = null;
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
+
}, U);
|
|
200
|
+
}, H);
|
|
199
201
|
return w(() => () => {
|
|
200
202
|
i.current && clearTimeout(i.current);
|
|
201
203
|
}, []), { handleScroll: C((i) => {
|
|
202
204
|
if (!e || !t || n || r.current) return;
|
|
203
|
-
let { scrollHeight:
|
|
204
|
-
(s + c) /
|
|
205
|
+
let { scrollHeight: o, scrollTop: s, clientHeight: c } = i.target;
|
|
206
|
+
(s + c) / o >= V && a();
|
|
205
207
|
}, [
|
|
206
208
|
e,
|
|
207
209
|
n,
|
|
208
210
|
t,
|
|
209
|
-
|
|
211
|
+
a
|
|
210
212
|
]) };
|
|
211
213
|
}
|
|
212
|
-
function Y({ items:
|
|
214
|
+
function Y({ items: t, searchValue: n, getItemLabel: r, getItemKey: i, loading: a = !1, showListContent: o = !0, minSearchLength: s = 3, strings: c, renderItem: l, onSearch: u, debounceMs: d = 300, creatable: f, onCreate: p, getItemGroup: m, hasMore: h, onLoadMore: g, loadingMore: _, highlightMatch: v, ensuredItems: y = [] }) {
|
|
213
215
|
let b = {
|
|
214
|
-
...
|
|
216
|
+
...I,
|
|
215
217
|
...c
|
|
216
|
-
}, { formatCreate: x } = b, T = i ?? r,
|
|
217
|
-
|
|
218
|
+
}, { formatCreate: x } = b, T = i ?? r, E = O(null), k = n.trim(), A = o && (a || k.length < s);
|
|
219
|
+
J({
|
|
218
220
|
searchValue: n,
|
|
219
221
|
onSearch: u,
|
|
220
222
|
debounceMs: d,
|
|
221
223
|
minSearchLength: s
|
|
222
224
|
});
|
|
223
|
-
let { handleScroll: P } =
|
|
224
|
-
hasMore: o && !
|
|
225
|
+
let { handleScroll: P } = ee({
|
|
226
|
+
hasMore: o && !A ? h : !1,
|
|
225
227
|
onLoadMore: g,
|
|
226
228
|
loadingMore: _
|
|
227
229
|
});
|
|
228
230
|
w(() => {
|
|
229
|
-
let e =
|
|
230
|
-
if (!(!o ||
|
|
231
|
+
let e = E.current;
|
|
232
|
+
if (!(!o || A || !e || !h || !g)) return e.addEventListener("scroll", P), () => e.removeEventListener("scroll", P);
|
|
231
233
|
}, [
|
|
232
234
|
P,
|
|
233
235
|
h,
|
|
234
236
|
g,
|
|
235
237
|
o,
|
|
236
|
-
|
|
238
|
+
A
|
|
237
239
|
]);
|
|
238
|
-
let
|
|
239
|
-
if (!o ||
|
|
240
|
-
if (y.length === 0) return
|
|
241
|
-
let
|
|
242
|
-
for (let n of
|
|
243
|
-
return
|
|
240
|
+
let F = D(() => {
|
|
241
|
+
if (!o || A) return [];
|
|
242
|
+
if (y.length === 0) return t;
|
|
243
|
+
let e = [...y];
|
|
244
|
+
for (let n of t) y.some((e) => T(e) === T(n)) || e.push(n);
|
|
245
|
+
return e;
|
|
244
246
|
}, [
|
|
245
247
|
y,
|
|
246
248
|
T,
|
|
247
|
-
|
|
249
|
+
t,
|
|
248
250
|
o,
|
|
249
|
-
|
|
250
|
-
]), L =
|
|
251
|
+
A
|
|
252
|
+
]), L = D(() => {
|
|
251
253
|
if (!m) return null;
|
|
252
254
|
let e = /* @__PURE__ */ new Map();
|
|
253
|
-
for (let t of
|
|
255
|
+
for (let t of F) {
|
|
254
256
|
let n = m(t), r = e.get(n);
|
|
255
257
|
r ? r.push(t) : e.set(n, [t]);
|
|
256
258
|
}
|
|
257
259
|
return e;
|
|
258
|
-
}, [
|
|
259
|
-
if (!o ||
|
|
260
|
+
}, [F, m]), R = D(() => {
|
|
261
|
+
if (!o || A || !f || !p || k === "" || k.length < s) return !1;
|
|
260
262
|
let e = k.toLowerCase();
|
|
261
|
-
return !
|
|
263
|
+
return !F.some((t) => r(t).toLowerCase() === e);
|
|
262
264
|
}, [
|
|
263
|
-
|
|
265
|
+
F,
|
|
264
266
|
f,
|
|
265
267
|
r,
|
|
266
268
|
s,
|
|
267
269
|
p,
|
|
268
270
|
o,
|
|
269
|
-
|
|
271
|
+
A,
|
|
270
272
|
k
|
|
271
|
-
]), B =
|
|
273
|
+
]), B = D(() => R ? q(k) : null, [R, k]);
|
|
272
274
|
return {
|
|
273
275
|
strings: b,
|
|
274
276
|
getKey: T,
|
|
275
277
|
trimmedSearch: k,
|
|
276
|
-
listRef:
|
|
277
|
-
baseItems:
|
|
278
|
-
allItems:
|
|
278
|
+
listRef: E,
|
|
279
|
+
baseItems: F,
|
|
280
|
+
allItems: D(() => B ? [...F, B] : F, [F, B]),
|
|
279
281
|
groupedItems: L,
|
|
280
282
|
createOptionItem: B,
|
|
281
|
-
showStatus:
|
|
282
|
-
showEmpty: o && !a && k.length >= s &&
|
|
283
|
-
showCreateOption:
|
|
284
|
-
renderItemContent: C((
|
|
285
|
-
if (
|
|
286
|
-
className:
|
|
287
|
-
children: [/* @__PURE__ */
|
|
283
|
+
showStatus: A,
|
|
284
|
+
showEmpty: o && !a && k.length >= s && t.length === 0 && !R,
|
|
285
|
+
showCreateOption: R,
|
|
286
|
+
renderItemContent: C((t) => {
|
|
287
|
+
if (G(t)) return /* @__PURE__ */ M("span", {
|
|
288
|
+
className: N.createRow,
|
|
289
|
+
children: [/* @__PURE__ */ j(S, { "aria-hidden": !0 }), /* @__PURE__ */ j(e, {
|
|
288
290
|
tag: "span",
|
|
289
291
|
size: "inherit",
|
|
290
292
|
type: "inherit",
|
|
291
293
|
weight: "medium",
|
|
292
294
|
lineHeight: "tight",
|
|
293
|
-
children: x(
|
|
295
|
+
children: x(K(t))
|
|
294
296
|
})]
|
|
295
297
|
});
|
|
296
|
-
if (l) return l(
|
|
297
|
-
let n = r(
|
|
298
|
-
return v && k ? /* @__PURE__ */
|
|
298
|
+
if (l) return l(t);
|
|
299
|
+
let n = r(t);
|
|
300
|
+
return v && k ? /* @__PURE__ */ j(z, {
|
|
299
301
|
text: n,
|
|
300
302
|
highlight: k
|
|
301
|
-
}) : /* @__PURE__ */
|
|
303
|
+
}) : /* @__PURE__ */ j(e, {
|
|
302
304
|
tag: "span",
|
|
303
305
|
size: "inherit",
|
|
304
306
|
type: "inherit",
|
|
@@ -312,23 +314,23 @@ function Y({ items: e, searchValue: n, getItemLabel: r, getItemKey: i, loading:
|
|
|
312
314
|
l,
|
|
313
315
|
k
|
|
314
316
|
]),
|
|
315
|
-
itemToStringLabel: C((e) =>
|
|
316
|
-
getItemReactKey: C((e) =>
|
|
317
|
+
itemToStringLabel: C((e) => G(e) ? K(e) : r(e), [r]),
|
|
318
|
+
getItemReactKey: C((e) => G(e) ? `__create__:${K(e)}` : String(T(e)), [T]),
|
|
317
319
|
handleScroll: P
|
|
318
320
|
};
|
|
319
321
|
}
|
|
320
322
|
//#endregion
|
|
321
323
|
//#region src/components/features/combobox/async-combobox.tsx
|
|
322
|
-
function X({ error:
|
|
323
|
-
return
|
|
324
|
+
function X({ error: t, id: n }) {
|
|
325
|
+
return t ? /* @__PURE__ */ j(e, {
|
|
324
326
|
id: n,
|
|
325
327
|
tag: "p",
|
|
326
328
|
size: "xs",
|
|
327
329
|
type: "error",
|
|
328
330
|
role: "alert",
|
|
329
331
|
"aria-live": "polite",
|
|
330
|
-
className:
|
|
331
|
-
children:
|
|
332
|
+
className: N.error,
|
|
333
|
+
children: t
|
|
332
334
|
}) : null;
|
|
333
335
|
}
|
|
334
336
|
function Z(e, t) {
|
|
@@ -373,146 +375,146 @@ function Z(e, t) {
|
|
|
373
375
|
describedBy: d ? g : void 0
|
|
374
376
|
};
|
|
375
377
|
}
|
|
376
|
-
function
|
|
377
|
-
let { id: u, searchValue: d, onSearchValueChange: f, className: p, error: m, required: h, onBlur:
|
|
378
|
+
function te({ selectedValue: e, onSelectedValueChange: n, clearSearchOnClose: r = !0, minSearchLength: i = 3, loading: a = !1, showListContent: o = !0, disabled: s = !1, clearable: c = !0, ...l }) {
|
|
379
|
+
let { id: u, searchValue: d, onSearchValueChange: f, className: p, error: m, required: h, onBlur: _, onCreate: y, open: b, onOpenChange: x } = l, S = D(() => e ? [e] : [], [e]), { core: w, dropdown: T, root: E, invalid: O, errorId: A, describedBy: P } = Z({
|
|
378
380
|
...l,
|
|
379
381
|
minSearchLength: i,
|
|
380
382
|
loading: a,
|
|
381
383
|
showListContent: o,
|
|
382
384
|
disabled: s
|
|
383
|
-
}, S), [I, L] =
|
|
385
|
+
}, S), [I, L] = k(!1), R = C((e) => {
|
|
384
386
|
L(e), !e && r && f(""), x?.(e);
|
|
385
387
|
}, [
|
|
386
388
|
r,
|
|
387
389
|
x,
|
|
388
390
|
f
|
|
389
|
-
]), z = b ?? I ? d :
|
|
390
|
-
if (e &&
|
|
391
|
-
|
|
391
|
+
]), z = b ?? I ? d : e ? w.itemToStringLabel(e) : "", B = C((e) => {
|
|
392
|
+
if (e && G(e)) {
|
|
393
|
+
y?.(K(e));
|
|
392
394
|
return;
|
|
393
395
|
}
|
|
394
396
|
n(e);
|
|
395
|
-
}, [
|
|
396
|
-
return /* @__PURE__ */
|
|
397
|
-
className:
|
|
398
|
-
children: [/* @__PURE__ */
|
|
399
|
-
...
|
|
400
|
-
value:
|
|
397
|
+
}, [y, n]);
|
|
398
|
+
return /* @__PURE__ */ M("div", {
|
|
399
|
+
className: t("async-combobox--component", N.root),
|
|
400
|
+
children: [/* @__PURE__ */ M(v, {
|
|
401
|
+
...E,
|
|
402
|
+
value: e,
|
|
401
403
|
onValueChange: B,
|
|
402
404
|
inputValue: z,
|
|
403
405
|
open: b,
|
|
404
406
|
onOpenChange: R,
|
|
405
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ j(g, {
|
|
406
408
|
id: u,
|
|
407
409
|
placeholder: w.strings.placeholder,
|
|
408
410
|
showClear: c,
|
|
409
|
-
invalid:
|
|
410
|
-
"aria-describedby":
|
|
411
|
+
invalid: O,
|
|
412
|
+
"aria-describedby": P,
|
|
411
413
|
"aria-required": h,
|
|
412
414
|
disabled: s,
|
|
413
|
-
onBlur:
|
|
415
|
+
onBlur: _,
|
|
414
416
|
className: p,
|
|
415
417
|
strings: {
|
|
416
418
|
clear: w.strings.clear,
|
|
417
419
|
toggle: w.strings.toggle
|
|
418
420
|
}
|
|
419
|
-
}), /* @__PURE__ */
|
|
420
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ j(F, { ...T })]
|
|
422
|
+
}), /* @__PURE__ */ j(X, {
|
|
421
423
|
error: m,
|
|
422
|
-
id:
|
|
424
|
+
id: A
|
|
423
425
|
})]
|
|
424
426
|
});
|
|
425
427
|
}
|
|
426
|
-
function
|
|
427
|
-
let { id:
|
|
428
|
-
u &&
|
|
429
|
-
let [H, U] =
|
|
430
|
-
H !== z && (U(z), !z && u &&
|
|
431
|
-
let
|
|
428
|
+
function ne({ selectedValues: e, onSelectedValuesChange: n, minSearchLength: r = 3, loading: i = !1, showListContent: a = !0, disabled: s = !1, closeOnSelect: l = !1, applyButton: u = !1, onApply: d, onCancel: f, open: m, onOpenChange: g, ..._ }) {
|
|
429
|
+
let { id: y, searchValue: b, className: x, error: S, required: w, onBlur: T, onCreate: E } = _, D = O(null), [A, P] = k(e), [I, L] = k(!1), R = m !== void 0, z = R ? m : I, [B, V] = k(e);
|
|
430
|
+
u && e !== B && (V(e), P(e));
|
|
431
|
+
let [H, U] = k(z);
|
|
432
|
+
H !== z && (U(z), !z && u && P(e));
|
|
433
|
+
let W = u ? A : e, { core: q, dropdown: J, root: ee, invalid: Y, errorId: te, describedBy: ne } = Z({
|
|
432
434
|
..._,
|
|
433
|
-
open:
|
|
434
|
-
onOpenChange:
|
|
435
|
+
open: m,
|
|
436
|
+
onOpenChange: g,
|
|
435
437
|
minSearchLength: r,
|
|
436
438
|
loading: i,
|
|
437
439
|
showListContent: a,
|
|
438
|
-
disabled:
|
|
439
|
-
},
|
|
440
|
-
R || L(e),
|
|
441
|
-
}, [R,
|
|
440
|
+
disabled: s
|
|
441
|
+
}, W), re = q.strings.removeChip ?? o.removeChip, Q = C((e) => {
|
|
442
|
+
R || L(e), g?.(e);
|
|
443
|
+
}, [R, g]), ie = C((e) => {
|
|
442
444
|
let t = [], r = null;
|
|
443
|
-
for (let n of e)
|
|
444
|
-
r === null ? u ?
|
|
445
|
+
for (let n of e) G(n) ? r = K(n) : t.push(n);
|
|
446
|
+
r === null ? u ? P(t) : n(t) : E?.(r), l && !u && Q(!1);
|
|
445
447
|
}, [
|
|
446
448
|
u,
|
|
447
|
-
|
|
449
|
+
l,
|
|
448
450
|
E,
|
|
449
451
|
n,
|
|
450
|
-
|
|
451
|
-
]),
|
|
452
|
-
u && n(
|
|
452
|
+
Q
|
|
453
|
+
]), ae = C(() => {
|
|
454
|
+
u && n(A), d?.(), Q(!1);
|
|
453
455
|
}, [
|
|
454
456
|
u,
|
|
455
|
-
|
|
457
|
+
A,
|
|
456
458
|
d,
|
|
457
459
|
n,
|
|
458
|
-
|
|
459
|
-
]),
|
|
460
|
-
u &&
|
|
460
|
+
Q
|
|
461
|
+
]), oe = C(() => {
|
|
462
|
+
u && P(e), f?.(), Q(!1);
|
|
461
463
|
}, [
|
|
462
464
|
u,
|
|
463
465
|
f,
|
|
464
|
-
|
|
465
|
-
|
|
466
|
+
e,
|
|
467
|
+
Q
|
|
466
468
|
]);
|
|
467
|
-
return /* @__PURE__ */
|
|
468
|
-
className:
|
|
469
|
-
children: [/* @__PURE__ */
|
|
470
|
-
...
|
|
469
|
+
return /* @__PURE__ */ M("div", {
|
|
470
|
+
className: t("async-multi-combobox--component", N.root),
|
|
471
|
+
children: [/* @__PURE__ */ M(v, {
|
|
472
|
+
...ee,
|
|
471
473
|
multiple: !0,
|
|
472
|
-
value:
|
|
473
|
-
onValueChange:
|
|
474
|
+
value: W,
|
|
475
|
+
onValueChange: ie,
|
|
474
476
|
inputValue: b,
|
|
475
477
|
open: z,
|
|
476
|
-
onOpenChange: (
|
|
477
|
-
!
|
|
478
|
+
onOpenChange: (t) => {
|
|
479
|
+
!t && u && P(e), Q(t);
|
|
478
480
|
},
|
|
479
|
-
children: [/* @__PURE__ */
|
|
480
|
-
ref:
|
|
481
|
-
invalid:
|
|
481
|
+
children: [/* @__PURE__ */ M(c, {
|
|
482
|
+
ref: D,
|
|
483
|
+
invalid: Y,
|
|
482
484
|
className: x,
|
|
483
|
-
children: [
|
|
484
|
-
strings: { removeChip:
|
|
485
|
+
children: [W.map((e) => /* @__PURE__ */ j(p, {
|
|
486
|
+
strings: { removeChip: re },
|
|
485
487
|
children: q.itemToStringLabel(e)
|
|
486
|
-
}, q.getKey(e))), /* @__PURE__ */
|
|
487
|
-
id:
|
|
488
|
-
placeholder:
|
|
489
|
-
"aria-invalid":
|
|
490
|
-
"aria-describedby":
|
|
488
|
+
}, q.getKey(e))), /* @__PURE__ */ j(h, {
|
|
489
|
+
id: y,
|
|
490
|
+
placeholder: W.length > 0 ? void 0 : q.strings.placeholder,
|
|
491
|
+
"aria-invalid": Y || void 0,
|
|
492
|
+
"aria-describedby": ne,
|
|
491
493
|
"aria-required": w,
|
|
492
494
|
onBlur: T
|
|
493
495
|
})]
|
|
494
|
-
}), /* @__PURE__ */
|
|
496
|
+
}), /* @__PURE__ */ j(F, {
|
|
495
497
|
...J,
|
|
496
|
-
anchor:
|
|
498
|
+
anchor: D,
|
|
497
499
|
applyFooter: a && u ? {
|
|
498
500
|
applyLabel: q.strings.apply,
|
|
499
501
|
cancelLabel: q.strings.cancel,
|
|
500
|
-
onApply:
|
|
501
|
-
onCancel:
|
|
502
|
+
onApply: ae,
|
|
503
|
+
onCancel: oe
|
|
502
504
|
} : void 0
|
|
503
505
|
})]
|
|
504
|
-
}), /* @__PURE__ */
|
|
506
|
+
}), /* @__PURE__ */ j(X, {
|
|
505
507
|
error: S,
|
|
506
|
-
id:
|
|
508
|
+
id: te
|
|
507
509
|
})]
|
|
508
510
|
});
|
|
509
511
|
}
|
|
510
512
|
//#endregion
|
|
511
513
|
//#region src/components/features/combobox/use-suggestions.ts
|
|
512
|
-
function
|
|
514
|
+
function re(e) {
|
|
513
515
|
return !!(e && e.name === "AbortError");
|
|
514
516
|
}
|
|
515
|
-
function
|
|
517
|
+
function Q(e, t) {
|
|
516
518
|
return new Promise((n, r) => {
|
|
517
519
|
if (t.aborted) {
|
|
518
520
|
r(new DOMException("Aborted", "AbortError"));
|
|
@@ -524,188 +526,200 @@ function ne(e, t) {
|
|
|
524
526
|
});
|
|
525
527
|
});
|
|
526
528
|
}
|
|
527
|
-
var
|
|
528
|
-
function
|
|
529
|
-
let { fetchData: t,
|
|
529
|
+
var ie = [];
|
|
530
|
+
function ae(e) {
|
|
531
|
+
let { fetchData: t, scopeKey: n, minQueryLength: r = 1, debounceMs: i = 300, requestDelay: a = 0, preload: o = !1, query: s, defaultQuery: c = "", onQueryChange: l, value: u, defaultValue: d = null, onValueChange: f, open: p, defaultOpen: m = !1, onOpenChange: h, onError: g } = e, [_, v] = k({ key: n });
|
|
532
|
+
Object.is(_.key, n) || v({ key: n });
|
|
533
|
+
let [y, x] = k(null), [S, T] = k(null), [D, A] = k(null), j = O(_), M = O(null);
|
|
534
|
+
E(() => () => {
|
|
535
|
+
M.current?.abort();
|
|
536
|
+
}, [_]);
|
|
537
|
+
let [N, P] = k(c), [F, I] = k(d), [L, R] = k(m), [z, B] = k(0), V = O(!1), H = O(t), U = O(g);
|
|
530
538
|
w(() => {
|
|
531
|
-
|
|
539
|
+
H.current = t, U.current = g;
|
|
532
540
|
});
|
|
533
|
-
let
|
|
534
|
-
s === void 0 &&
|
|
535
|
-
}, [s, l]),
|
|
536
|
-
u === void 0 &&
|
|
537
|
-
}, [u, f]),
|
|
538
|
-
p === void 0 &&
|
|
539
|
-
}, [p, h]),
|
|
540
|
-
|
|
541
|
-
}, []),
|
|
541
|
+
let W = s ?? N, G = u === void 0 ? F : u, K = p ?? L, q = C((e) => {
|
|
542
|
+
s === void 0 && P(e), l?.(e);
|
|
543
|
+
}, [s, l]), J = C((e) => {
|
|
544
|
+
u === void 0 && I(e), f?.(e);
|
|
545
|
+
}, [u, f]), ee = C((e) => {
|
|
546
|
+
p === void 0 && R(e), h?.(e);
|
|
547
|
+
}, [p, h]), Y = C(() => {
|
|
548
|
+
V.current = !0, B((e) => e + 1);
|
|
549
|
+
}, []), X = W.trim().length, Z = X >= r || o && X === 0, te = y?.scope === _ && y.query === W || S?.scope === _ && S.query === W, ne = Z && y?.scope === _ ? y.items : ie, ae = Z && (D === _ || !te), oe = Z && S?.scope === _ && S.query === W ? S.error : null, $ = b((e, t, n, r) => {
|
|
542
550
|
(async () => {
|
|
543
|
-
|
|
551
|
+
A(r), T(null);
|
|
544
552
|
try {
|
|
545
|
-
if (t > 0 && await
|
|
546
|
-
let
|
|
547
|
-
n.aborted ||
|
|
553
|
+
if (t > 0 && await Q(t, n), n.aborted) return;
|
|
554
|
+
let i = await H.current(e, { signal: n });
|
|
555
|
+
n.aborted || x({
|
|
556
|
+
scope: r,
|
|
548
557
|
query: e,
|
|
549
|
-
items: Array.isArray(
|
|
558
|
+
items: Array.isArray(i) ? i : []
|
|
550
559
|
});
|
|
551
560
|
} catch (t) {
|
|
552
|
-
if (n.aborted ||
|
|
553
|
-
|
|
561
|
+
if (n.aborted || re(t)) return;
|
|
562
|
+
x({
|
|
563
|
+
scope: r,
|
|
554
564
|
query: e,
|
|
555
565
|
items: []
|
|
556
|
-
}),
|
|
566
|
+
}), T({
|
|
567
|
+
scope: r,
|
|
557
568
|
query: e,
|
|
558
569
|
error: t
|
|
559
|
-
}),
|
|
570
|
+
}), U.current?.(t, e);
|
|
560
571
|
} finally {
|
|
561
|
-
n.aborted ||
|
|
572
|
+
n.aborted || A(null);
|
|
562
573
|
}
|
|
563
574
|
})();
|
|
564
|
-
},
|
|
575
|
+
}, i);
|
|
565
576
|
return w(() => {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
577
|
+
let e = j.current !== _;
|
|
578
|
+
if (j.current = _, !Z) return;
|
|
579
|
+
let t = new AbortController();
|
|
580
|
+
return M.current = t, $(W, a, t.signal, _), (e || V.current || W.trim() === "") && $.flush(), V.current = !1, () => {
|
|
581
|
+
$.cancel(), t.abort();
|
|
570
582
|
};
|
|
571
583
|
}, [
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
584
|
+
W,
|
|
585
|
+
a,
|
|
586
|
+
z,
|
|
587
|
+
$,
|
|
575
588
|
Z,
|
|
576
|
-
|
|
589
|
+
_
|
|
577
590
|
]), {
|
|
578
|
-
items:
|
|
579
|
-
isLoading:
|
|
580
|
-
error:
|
|
581
|
-
isError:
|
|
582
|
-
retry:
|
|
583
|
-
query:
|
|
584
|
-
setQuery:
|
|
585
|
-
value:
|
|
586
|
-
setValue:
|
|
587
|
-
open:
|
|
588
|
-
setOpen:
|
|
591
|
+
items: ne,
|
|
592
|
+
isLoading: ae,
|
|
593
|
+
error: oe,
|
|
594
|
+
isError: oe !== null,
|
|
595
|
+
retry: Y,
|
|
596
|
+
query: W,
|
|
597
|
+
setQuery: q,
|
|
598
|
+
value: G,
|
|
599
|
+
setValue: J,
|
|
600
|
+
open: K,
|
|
601
|
+
setOpen: ee
|
|
589
602
|
};
|
|
590
603
|
}
|
|
591
604
|
//#endregion
|
|
592
605
|
//#region src/components/features/combobox/fetching-combobox.tsx
|
|
593
|
-
function
|
|
606
|
+
function oe(e) {
|
|
594
607
|
return typeof e == "string" || typeof e == "number";
|
|
595
608
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
609
|
+
function $({ children: t }) {
|
|
610
|
+
return oe(t) ? /* @__PURE__ */ j(e, {
|
|
598
611
|
tag: "span",
|
|
599
612
|
size: "xs",
|
|
600
613
|
type: "secondary",
|
|
601
614
|
truncate: !0,
|
|
602
|
-
children:
|
|
603
|
-
}) :
|
|
615
|
+
children: t
|
|
616
|
+
}) : t;
|
|
604
617
|
}
|
|
605
|
-
function
|
|
606
|
-
let
|
|
607
|
-
...
|
|
608
|
-
...
|
|
609
|
-
},
|
|
618
|
+
function se({ hook: n, slot: i, fetchData: a, onError: o, preload: s, scopeKey: c, requestDelay: l, minSearchLength: u = 0, debounceMs: d, searchValue: f, defaultSearchValue: p, onSearchValueChange: m, value: h, defaultValue: g, onValueChange: _, open: v, defaultOpen: y, onOpenChange: b, clearSearchOnClose: x = !1, getItemLabel: S, getItemKey: w, getDescription: T, getMeta: E, renderOption: D, highlightMatch: O, errorTitle: k, renderError: A, strings: P, disabled: F = !1, className: L, ...R }) {
|
|
619
|
+
let B = {
|
|
620
|
+
...I,
|
|
621
|
+
...P
|
|
622
|
+
}, V = w ?? S, H = ae({
|
|
623
|
+
scopeKey: c,
|
|
610
624
|
fetchData: (e, t) => a(e.trim(), t ?? {}),
|
|
611
625
|
onError: (e, t) => o?.(e, t.trim()),
|
|
612
|
-
minQueryLength:
|
|
613
|
-
preload: s && !
|
|
614
|
-
debounceMs:
|
|
615
|
-
requestDelay:
|
|
616
|
-
query:
|
|
617
|
-
defaultQuery:
|
|
618
|
-
onQueryChange:
|
|
619
|
-
value:
|
|
620
|
-
defaultValue:
|
|
621
|
-
onValueChange:
|
|
622
|
-
open:
|
|
623
|
-
defaultOpen:
|
|
624
|
-
onOpenChange:
|
|
625
|
-
}),
|
|
626
|
-
|
|
626
|
+
minQueryLength: F ? Infinity : Math.max(1, u),
|
|
627
|
+
preload: s && !F,
|
|
628
|
+
debounceMs: d,
|
|
629
|
+
requestDelay: l,
|
|
630
|
+
query: f,
|
|
631
|
+
defaultQuery: p,
|
|
632
|
+
onQueryChange: m,
|
|
633
|
+
value: h,
|
|
634
|
+
defaultValue: g,
|
|
635
|
+
onValueChange: _,
|
|
636
|
+
open: v,
|
|
637
|
+
defaultOpen: y,
|
|
638
|
+
onOpenChange: b
|
|
639
|
+
}), U = H.query.trim(), W = H.isError, { setOpen: G, setQuery: K, retry: q } = H, J = U === "" ? s && !F ? 0 : Math.max(1, u) : u, ee = C((e) => {
|
|
640
|
+
G(e), !e && x && !W && K("");
|
|
627
641
|
}, [
|
|
628
|
-
|
|
629
|
-
U,
|
|
642
|
+
x,
|
|
630
643
|
W,
|
|
631
|
-
G
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
644
|
+
G,
|
|
645
|
+
K
|
|
646
|
+
]), Y = H.value ? V(H.value) : null, X = C((t) => {
|
|
647
|
+
if (D) return D(t, {
|
|
648
|
+
query: U,
|
|
649
|
+
isSelected: Y !== null && V(t) === Y
|
|
636
650
|
});
|
|
637
|
-
let n =
|
|
638
|
-
return /* @__PURE__ */
|
|
639
|
-
className:
|
|
640
|
-
children: [/* @__PURE__ */
|
|
651
|
+
let n = S(t), r = T?.(t), i = E?.(t), a = !!r || !!i;
|
|
652
|
+
return /* @__PURE__ */ M("span", {
|
|
653
|
+
className: N.option,
|
|
654
|
+
children: [/* @__PURE__ */ j(e, {
|
|
641
655
|
tag: "span",
|
|
642
656
|
size: "inherit",
|
|
643
657
|
type: "inherit",
|
|
644
658
|
weight: a ? "medium" : void 0,
|
|
645
659
|
lineHeight: "tight",
|
|
646
660
|
truncate: !0,
|
|
647
|
-
children:
|
|
661
|
+
children: O && U ? /* @__PURE__ */ j(z, {
|
|
648
662
|
text: n,
|
|
649
|
-
highlight:
|
|
663
|
+
highlight: U
|
|
650
664
|
}) : n
|
|
651
|
-
}), a && /* @__PURE__ */
|
|
652
|
-
className:
|
|
653
|
-
children: [!!r && /* @__PURE__ */
|
|
665
|
+
}), a && /* @__PURE__ */ M("span", {
|
|
666
|
+
className: N.optionMeta,
|
|
667
|
+
children: [!!r && /* @__PURE__ */ j($, { children: r }), !!i && /* @__PURE__ */ j($, { children: i })]
|
|
654
668
|
})]
|
|
655
669
|
});
|
|
656
670
|
}, [
|
|
657
|
-
w,
|
|
658
|
-
x,
|
|
659
|
-
B,
|
|
660
671
|
T,
|
|
661
|
-
|
|
662
|
-
|
|
672
|
+
S,
|
|
673
|
+
V,
|
|
663
674
|
E,
|
|
675
|
+
O,
|
|
676
|
+
U,
|
|
677
|
+
D,
|
|
664
678
|
Y
|
|
665
|
-
]), Z =
|
|
666
|
-
error:
|
|
667
|
-
query:
|
|
668
|
-
retry:
|
|
669
|
-
}) ?? /* @__PURE__ */
|
|
670
|
-
title:
|
|
671
|
-
onRetry:
|
|
672
|
-
strings: { retry:
|
|
673
|
-
className:
|
|
679
|
+
]), Z = W ? A?.({
|
|
680
|
+
error: H.error,
|
|
681
|
+
query: U,
|
|
682
|
+
retry: q
|
|
683
|
+
}) ?? /* @__PURE__ */ j(r, {
|
|
684
|
+
title: k ?? B.errorTitle,
|
|
685
|
+
onRetry: q,
|
|
686
|
+
strings: { retry: B.retry },
|
|
687
|
+
className: N.errorState
|
|
674
688
|
}) : null;
|
|
675
|
-
return /* @__PURE__ */
|
|
689
|
+
return /* @__PURE__ */ M("div", {
|
|
676
690
|
"data-slot": i,
|
|
677
|
-
className:
|
|
678
|
-
children: [/* @__PURE__ */
|
|
679
|
-
...
|
|
680
|
-
disabled:
|
|
681
|
-
items:
|
|
682
|
-
selectedValue:
|
|
683
|
-
onSelectedValueChange:
|
|
691
|
+
className: t(n, L),
|
|
692
|
+
children: [/* @__PURE__ */ j(te, {
|
|
693
|
+
...R,
|
|
694
|
+
disabled: F,
|
|
695
|
+
items: H.items,
|
|
696
|
+
selectedValue: H.value,
|
|
697
|
+
onSelectedValueChange: H.setValue,
|
|
684
698
|
clearSearchOnClose: !1,
|
|
685
|
-
searchValue:
|
|
686
|
-
onSearchValueChange:
|
|
687
|
-
getItemLabel:
|
|
688
|
-
getItemKey:
|
|
689
|
-
loading: !
|
|
690
|
-
showListContent: !
|
|
691
|
-
minSearchLength:
|
|
692
|
-
debounceMs:
|
|
693
|
-
strings:
|
|
699
|
+
searchValue: H.query,
|
|
700
|
+
onSearchValueChange: K,
|
|
701
|
+
getItemLabel: S,
|
|
702
|
+
getItemKey: w,
|
|
703
|
+
loading: !W && H.isLoading,
|
|
704
|
+
showListContent: !W,
|
|
705
|
+
minSearchLength: J,
|
|
706
|
+
debounceMs: d,
|
|
707
|
+
strings: P,
|
|
694
708
|
renderItem: X,
|
|
695
|
-
open:
|
|
696
|
-
onOpenChange:
|
|
709
|
+
open: H.open,
|
|
710
|
+
onOpenChange: ee
|
|
697
711
|
}), Z]
|
|
698
712
|
});
|
|
699
713
|
}
|
|
700
714
|
//#endregion
|
|
701
715
|
//#region src/components/features/combobox/resource-combobox.tsx
|
|
702
|
-
function
|
|
716
|
+
function ce({ fetcher: e, onAfterFetch: t, onError: n, getKey: r, getLabel: i, limit: a = 10, debounceMs: o = 300, preload: s = !0, minSearchLength: c = 0, defaultValue: l = null, errorMessage: u, ...d }) {
|
|
703
717
|
let f = (e, t) => ({
|
|
704
718
|
query: e,
|
|
705
719
|
limit: a,
|
|
706
720
|
signal: t
|
|
707
721
|
});
|
|
708
|
-
return /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ j(se, {
|
|
709
723
|
...d,
|
|
710
724
|
hook: "resource-combobox--component",
|
|
711
725
|
slot: "resource-combobox",
|
|
@@ -725,12 +739,12 @@ function se({ fetcher: e, onAfterFetch: t, onError: n, getKey: r, getLabel: i, l
|
|
|
725
739
|
}
|
|
726
740
|
//#endregion
|
|
727
741
|
//#region src/components/features/combobox/suggestions-combobox.tsx
|
|
728
|
-
function
|
|
742
|
+
function le({ fetchData: e, itemKey: t, itemText: n, renderItem: r, minQueryLength: i = 1, preload: a = !1, query: o, defaultQuery: s, onQueryChange: c, allowClear: l = !0, clearInputOnClose: u = !1, disabled: d = !1, strings: f, ...p }) {
|
|
729
743
|
let m = {
|
|
730
|
-
...
|
|
744
|
+
...L,
|
|
731
745
|
...f
|
|
732
|
-
}, h = f?.formatTypeMore ?? (f?.startTypingMessage === void 0 ?
|
|
733
|
-
return /* @__PURE__ */
|
|
746
|
+
}, h = f?.formatTypeMore ?? (f?.startTypingMessage === void 0 ? I.formatTypeMore : () => m.startTypingMessage);
|
|
747
|
+
return /* @__PURE__ */ j(se, {
|
|
734
748
|
...p,
|
|
735
749
|
hook: "suggestions-combobox--component",
|
|
736
750
|
slot: "suggestions",
|
|
@@ -758,4 +772,4 @@ function ce({ fetchData: e, itemKey: t, itemText: n, renderItem: r, minQueryLeng
|
|
|
758
772
|
});
|
|
759
773
|
}
|
|
760
774
|
//#endregion
|
|
761
|
-
export {
|
|
775
|
+
export { te as AsyncCombobox, ne as AsyncMultiCombobox, F as ComboboxDropdown, B as DEFAULT_MIN_SEARCH_LENGTH, z as HighlightedText, ce as ResourceCombobox, le as SuggestionsCombobox, I as defaultAsyncComboboxStrings, L as defaultSuggestionsStrings, Y as useComboboxCore, ae as useSuggestions };
|