@aifuxi/semi-ui-vue 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/Button-RCaDTqHh.js +249 -0
- package/dist/Collapsible-DeV0aJ4n.js +199 -0
- package/dist/Cropper-Dy1LPBDN.js +587 -0
- package/dist/Divider-BQmwhGfH.js +57 -0
- package/dist/Input-BYWFIgNn.js +593 -0
- package/dist/InputNumber-BaeViVtG.js +856 -0
- package/dist/Modal-BhmFYVFw.js +975 -0
- package/dist/Pagination-4JvS-gHR.js +572 -0
- package/dist/Progress-BulSV_JR.js +523 -0
- package/dist/SBOM.spdx.json +165 -0
- package/dist/SelectOption-Ce-Lst-e.js +1473 -0
- package/dist/Slider-w9sbxzBw.js +707 -0
- package/dist/Spin-CuFLkqev.js +222 -0
- package/dist/THIRD_PARTY_LICENSES/Semi-Design.txt +83 -0
- package/dist/THIRD_PARTY_LICENSES/async-validator.txt +9 -0
- package/dist/THIRD_PARTY_LICENSES/bezier-easing.txt +22 -0
- package/dist/THIRD_PARTY_LICENSES/date-fns-tz.txt +21 -0
- package/dist/THIRD_PARTY_LICENSES/date-fns.txt +21 -0
- package/dist/THIRD_PARTY_LICENSES/lodash.txt +47 -0
- package/dist/THIRD_PARTY_LICENSES/scroll-into-view-if-needed.txt +21 -0
- package/dist/THIRD_PARTY_NOTICES.md +23 -0
- package/dist/Tooltip-Bq7HZwnS.js +1321 -0
- package/dist/Tree-tqy5xBYJ.js +1275 -0
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/anchor/Anchor.vue.d.ts +29 -0
- package/dist/anchor/AnchorLink.vue.d.ts +16 -0
- package/dist/anchor/AnchorNodeRenderer.d.ts +15 -0
- package/dist/anchor/anchor-context.d.ts +18 -0
- package/dist/anchor/index.d.ts +11 -0
- package/dist/anchor/index.js +2 -0
- package/dist/anchor/types.d.ts +43 -0
- package/dist/anchor-DW0p2t-I.js +503 -0
- package/dist/arrayMove-ByVCXfhS.js +7 -0
- package/dist/auto-complete/AutoComplete.vue.d.ts +33 -0
- package/dist/auto-complete/AutoCompleteNodeRenderer.d.ts +15 -0
- package/dist/auto-complete/AutoCompleteOption.vue.d.ts +19 -0
- package/dist/auto-complete/index.d.ts +10 -0
- package/dist/auto-complete/index.js +2 -0
- package/dist/auto-complete/types.d.ts +117 -0
- package/dist/auto-complete/use-auto-complete-foundation.d.ts +40 -0
- package/dist/auto-complete-BeahBlt9.js +765 -0
- package/dist/avatar/Avatar.vue.d.ts +26 -0
- package/dist/avatar/AvatarGroup.d.ts +54 -0
- package/dist/avatar/AvatarNodeRenderer.d.ts +15 -0
- package/dist/avatar/TopSlotSvg.vue.d.ts +7 -0
- package/dist/avatar/index.d.ts +10 -0
- package/dist/avatar/index.js +2 -0
- package/dist/avatar/types.d.ts +86 -0
- package/dist/avatar-B00xjEzD.js +551 -0
- package/dist/back-top/BackTop.vue.d.ts +19 -0
- package/dist/back-top/index.d.ts +3 -0
- package/dist/back-top/index.js +2 -0
- package/dist/back-top/types.d.ts +15 -0
- package/dist/back-top-C2XqUzoN.js +123 -0
- package/dist/badge/Badge.vue.d.ts +23 -0
- package/dist/badge/BadgeNodeRenderer.d.ts +15 -0
- package/dist/badge/index.d.ts +6 -0
- package/dist/badge/index.js +2 -0
- package/dist/badge/types.d.ts +29 -0
- package/dist/badge-gWsDkzyt.js +120 -0
- package/dist/banner/Banner.vue.d.ts +19 -0
- package/dist/banner/BannerNodeRenderer.d.ts +15 -0
- package/dist/banner/index.d.ts +6 -0
- package/dist/banner/index.js +2 -0
- package/dist/banner/types.d.ts +25 -0
- package/dist/banner-B3O4uDoR.js +220 -0
- package/dist/breadcrumb/Breadcrumb.d.ts +129 -0
- package/dist/breadcrumb/BreadcrumbIconRenderer.d.ts +23 -0
- package/dist/breadcrumb/BreadcrumbItem.vue.d.ts +19 -0
- package/dist/breadcrumb/BreadcrumbNodeRenderer.d.ts +15 -0
- package/dist/breadcrumb/BreadcrumbPopover.vue.d.ts +17 -0
- package/dist/breadcrumb/BreadcrumbPopoverArrow.vue.d.ts +3 -0
- package/dist/breadcrumb/breadcrumb-context.d.ts +9 -0
- package/dist/breadcrumb/index.d.ts +11 -0
- package/dist/breadcrumb/index.js +2 -0
- package/dist/breadcrumb/types.d.ts +72 -0
- package/dist/breadcrumb-BmBbFmGK.js +451 -0
- package/dist/button/Button.vue.d.ts +34 -0
- package/dist/button/ButtonAiLoadingIcon.vue.d.ts +3 -0
- package/dist/button/ButtonGroup.d.ts +69 -0
- package/dist/button/ButtonIconRenderer.d.ts +28 -0
- package/dist/button/ButtonLoadingIcon.vue.d.ts +3 -0
- package/dist/button/SplitButtonGroup.vue.d.ts +16 -0
- package/dist/button/index.d.ts +5 -0
- package/dist/button/index.js +3 -0
- package/dist/button/types.d.ts +57 -0
- package/dist/button-Rcn5pYGh.js +134 -0
- package/dist/calendar/Calendar.vue.d.ts +29 -0
- package/dist/calendar/CalendarDay.vue.d.ts +3 -0
- package/dist/calendar/CalendarMonth.vue.d.ts +3 -0
- package/dist/calendar/CalendarNodeRenderer.d.ts +15 -0
- package/dist/calendar/CalendarTimeColumn.vue.d.ts +6 -0
- package/dist/calendar/CalendarWeek.vue.d.ts +8 -0
- package/dist/calendar/index.d.ts +6 -0
- package/dist/calendar/index.js +2 -0
- package/dist/calendar/types.d.ts +67 -0
- package/dist/calendar-CJTrr4y5.js +1172 -0
- package/dist/card/Card.vue.d.ts +16 -0
- package/dist/card/CardGroup.vue.d.ts +13 -0
- package/dist/card/CardMeta.vue.d.ts +11 -0
- package/dist/card/CardNodeRenderer.d.ts +15 -0
- package/dist/card/CardSkeleton.vue.d.ts +3 -0
- package/dist/card/card-content.d.ts +2 -0
- package/dist/card/index.d.ts +11 -0
- package/dist/card/index.js +2 -0
- package/dist/card/types.d.ts +56 -0
- package/dist/card-DwMOFi6_.js +348 -0
- package/dist/carousel/Carousel.vue.d.ts +29 -0
- package/dist/carousel/CarouselArrow.vue.d.ts +15 -0
- package/dist/carousel/CarouselIndicator.vue.d.ts +17 -0
- package/dist/carousel/CarouselItemRenderer.d.ts +34 -0
- package/dist/carousel/CarouselNodeRenderer.d.ts +15 -0
- package/dist/carousel/index.d.ts +6 -0
- package/dist/carousel/index.js +2 -0
- package/dist/carousel/types.d.ts +70 -0
- package/dist/carousel/use-carousel-foundation.d.ts +19 -0
- package/dist/carousel-B4WlIRJH.js +458 -0
- package/dist/cascader/Cascader.vue.d.ts +71 -0
- package/dist/cascader/CascaderNodeRenderer.d.ts +15 -0
- package/dist/cascader/CascaderPanel.vue.d.ts +36 -0
- package/dist/cascader/index.d.ts +6 -0
- package/dist/cascader/index.js +2 -0
- package/dist/cascader/types.d.ts +192 -0
- package/dist/cascader-Ch6clCeh.js +1525 -0
- package/dist/checkbox/Checkbox.vue.d.ts +19 -0
- package/dist/checkbox/CheckboxGroup.d.ts +161 -0
- package/dist/checkbox/CheckboxNodeRenderer.d.ts +15 -0
- package/dist/checkbox/checkbox-context.d.ts +11 -0
- package/dist/checkbox/index.d.ts +10 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox/types.d.ts +92 -0
- package/dist/checkbox-mJD1ou6k.js +479 -0
- package/dist/collapse/Collapse.vue.d.ts +140 -0
- package/dist/collapse/CollapseNodeRenderer.d.ts +15 -0
- package/dist/collapse/CollapsePanel.vue.d.ts +99 -0
- package/dist/collapse/collapse-context.d.ts +14 -0
- package/dist/collapse/index.d.ts +10 -0
- package/dist/collapse/index.js +2 -0
- package/dist/collapse/types.d.ts +50 -0
- package/dist/collapse-7YtQLWqt.js +278 -0
- package/dist/collapsible/Collapsible.vue.d.ts +136 -0
- package/dist/collapsible/index.d.ts +5 -0
- package/dist/collapsible/index.js +5 -0
- package/dist/collapsible/types.d.ts +28 -0
- package/dist/color-picker/AlphaSlider.vue.d.ts +14 -0
- package/dist/color-picker/ColorChooseArea.vue.d.ts +20 -0
- package/dist/color-picker/ColorDataPart.vue.d.ts +15 -0
- package/dist/color-picker/ColorPicker.vue.d.ts +28 -0
- package/dist/color-picker/ColorPickerNodeRenderer.d.ts +17 -0
- package/dist/color-picker/ColorPickerPanel.vue.d.ts +37 -0
- package/dist/color-picker/ColorSlider.vue.d.ts +13 -0
- package/dist/color-picker/index.d.ts +10 -0
- package/dist/color-picker/index.js +2 -0
- package/dist/color-picker/types.d.ts +67 -0
- package/dist/color-picker-ChC7qsx0.js +885 -0
- package/dist/config-context-CyynTtDb.js +4 -0
- package/dist/config-provider/ConfigConsumer.vue.d.ts +11 -0
- package/dist/config-provider/ConfigProvider.vue.d.ts +16 -0
- package/dist/config-provider/config-context.d.ts +3 -0
- package/dist/config-provider/constants.d.ts +4 -0
- package/dist/config-provider/index.d.ts +13 -0
- package/dist/config-provider/index.js +3 -0
- package/dist/config-provider/semi-global.d.ts +6 -0
- package/dist/config-provider/types.d.ts +74 -0
- package/dist/config-provider/use-responsive-observe.d.ts +6 -0
- package/dist/config-provider-VMfNNSF1.js +188 -0
- package/dist/constants-BF9bZJyc.js +45 -0
- package/dist/constants-BNwzO87W.js +9 -0
- package/dist/cropper/Cropper.vue.d.ts +18 -0
- package/dist/cropper/index.d.ts +4 -0
- package/dist/cropper/index.js +5 -0
- package/dist/cropper/types.d.ts +51 -0
- package/dist/date-picker/DatePicker.vue.d.ts +41 -0
- package/dist/date-picker/DatePickerMonth.vue.d.ts +25 -0
- package/dist/date-picker/DatePickerNodeRenderer.d.ts +17 -0
- package/dist/date-picker/DatePickerPanel.vue.d.ts +33 -0
- package/dist/date-picker/index.d.ts +5 -0
- package/dist/date-picker/index.js +2 -0
- package/dist/date-picker/types.d.ts +211 -0
- package/dist/date-picker-B2lhlKHD.js +2207 -0
- package/dist/descriptions/Descriptions.vue.d.ts +96 -0
- package/dist/descriptions/DescriptionsItem.vue.d.ts +96 -0
- package/dist/descriptions/DescriptionsNodeRenderer.d.ts +15 -0
- package/dist/descriptions/descriptions-context.d.ts +7 -0
- package/dist/descriptions/index.d.ts +10 -0
- package/dist/descriptions/index.js +2 -0
- package/dist/descriptions/types.d.ts +45 -0
- package/dist/descriptions-BU6ahbge.js +272 -0
- package/dist/divider/Divider.vue.d.ts +15 -0
- package/dist/divider/DividerContentRenderer.d.ts +17 -0
- package/dist/divider/index.d.ts +3 -0
- package/dist/divider/index.js +3 -0
- package/dist/divider/types.d.ts +13 -0
- package/dist/divider-DA9U4uOl.js +8 -0
- package/dist/dropdown/Dropdown.vue.d.ts +23 -0
- package/dist/dropdown/DropdownDivider.vue.d.ts +4 -0
- package/dist/dropdown/DropdownItem.vue.d.ts +28 -0
- package/dist/dropdown/DropdownMenu.vue.d.ts +11 -0
- package/dist/dropdown/DropdownNodeRenderer.d.ts +15 -0
- package/dist/dropdown/DropdownTitle.vue.d.ts +11 -0
- package/dist/dropdown/DropdownTriggerRenderer.d.ts +45 -0
- package/dist/dropdown/dropdown-context.d.ts +8 -0
- package/dist/dropdown/index.d.ts +17 -0
- package/dist/dropdown/index.js +2 -0
- package/dist/dropdown/types.d.ts +98 -0
- package/dist/dropdown-D0-UWd65.js +665 -0
- package/dist/empty/Empty.vue.d.ts +13 -0
- package/dist/empty/EmptyNodeRenderer.d.ts +15 -0
- package/dist/empty/index.d.ts +6 -0
- package/dist/empty/index.js +2 -0
- package/dist/empty/types.d.ts +27 -0
- package/dist/empty-Bpms8Z5w.js +152 -0
- package/dist/env-BeIzjQx7.js +4 -0
- package/dist/es-CAWQuPuV.js +93 -0
- package/dist/float-button/FloatButton.vue.d.ts +20 -0
- package/dist/float-button/FloatButtonBadge.vue.d.ts +18 -0
- package/dist/float-button/FloatButtonGroup.vue.d.ts +17 -0
- package/dist/float-button/FloatButtonNodeRenderer.d.ts +17 -0
- package/dist/float-button/index.d.ts +4 -0
- package/dist/float-button/index.js +2 -0
- package/dist/float-button/types.d.ts +59 -0
- package/dist/float-button-qU3b0WBX.js +190 -0
- package/dist/form/ArrayField.d.ts +24 -0
- package/dist/form/Form.vue.d.ts +38 -0
- package/dist/form/FormErrorMessage.vue.d.ts +4 -0
- package/dist/form/FormField.d.ts +9 -0
- package/dist/form/FormInputGroup.d.ts +62 -0
- package/dist/form/FormLabel.vue.d.ts +18 -0
- package/dist/form/FormNodeRenderer.d.ts +15 -0
- package/dist/form/FormSection.vue.d.ts +16 -0
- package/dist/form/FormSlot.d.ts +3 -0
- package/dist/form/form-context.d.ts +4 -0
- package/dist/form/index.d.ts +68 -0
- package/dist/form/index.js +3 -0
- package/dist/form/internal-types.d.ts +67 -0
- package/dist/form/types.d.ts +273 -0
- package/dist/form/use-form.d.ts +11 -0
- package/dist/form/with-form.d.ts +3 -0
- package/dist/form-CLhGuORQ.js +2030 -0
- package/dist/foundation-Cawx37mp.js +1819 -0
- package/dist/grid/Col.vue.d.ts +13 -0
- package/dist/grid/Row.vue.d.ts +14 -0
- package/dist/grid/grid-context.d.ts +6 -0
- package/dist/grid/index.d.ts +5 -0
- package/dist/grid/index.js +2 -0
- package/dist/grid/media-query.d.ts +2 -0
- package/dist/grid/types.d.ts +44 -0
- package/dist/grid-Cn2uBhRd.js +161 -0
- package/dist/highlight/Highlight.vue.d.ts +10 -0
- package/dist/highlight/HighlightNodeRenderer.d.ts +49 -0
- package/dist/highlight/index.d.ts +4 -0
- package/dist/highlight/index.js +2 -0
- package/dist/highlight/internal-types.d.ts +8 -0
- package/dist/highlight/types.d.ts +17 -0
- package/dist/highlight-DHX3RV0C.js +158 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.js +2 -0
- package/dist/image/Image.vue.d.ts +21 -0
- package/dist/image/ImageNodeRenderer.d.ts +15 -0
- package/dist/image/ImagePreview.vue.d.ts +56 -0
- package/dist/image/ImagePreviewFooter.vue.d.ts +38 -0
- package/dist/image/ImagePreviewHeader.vue.d.ts +17 -0
- package/dist/image/ImagePreviewImage.vue.d.ts +27 -0
- package/dist/image/ImagePreviewInner.vue.d.ts +54 -0
- package/dist/image/image-context.d.ts +14 -0
- package/dist/image/index.d.ts +6 -0
- package/dist/image/index.js +2 -0
- package/dist/image/types.d.ts +183 -0
- package/dist/image-C-ifCh_9.js +1615 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +75 -0
- package/dist/input/Input.vue.d.ts +58 -0
- package/dist/input/InputGroup.d.ts +69 -0
- package/dist/input/InputNodeRenderer.d.ts +15 -0
- package/dist/input/TextArea.vue.d.ts +50 -0
- package/dist/input/index.d.ts +11 -0
- package/dist/input/index.js +2 -0
- package/dist/input/types.d.ts +168 -0
- package/dist/input-number/InputNumber.vue.d.ts +52 -0
- package/dist/input-number/index.d.ts +10 -0
- package/dist/input-number/index.js +5 -0
- package/dist/input-number/types.d.ts +56 -0
- package/dist/input-wf0nZCRS.js +747 -0
- package/dist/isBefore-BG1hiM9f.js +37 -0
- package/dist/isElement-Cx0AsIov.js +11 -0
- package/dist/isEnterPress-HTy0eCBp.js +8 -0
- package/dist/isNullOrUndefined-Cg6MZ8r3.js +6 -0
- package/dist/isPromise-D2v3Ejff.js +11 -0
- package/dist/keyCode-DMNg63wX.js +110 -0
- package/dist/layout/Layout.vue.d.ts +14 -0
- package/dist/layout/LayoutContent.vue.d.ts +14 -0
- package/dist/layout/LayoutFooter.vue.d.ts +14 -0
- package/dist/layout/LayoutHeader.vue.d.ts +14 -0
- package/dist/layout/LayoutSection.vue.d.ts +17 -0
- package/dist/layout/LayoutSider.vue.d.ts +18 -0
- package/dist/layout/index.d.ts +17 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout/layout-context.d.ts +6 -0
- package/dist/layout/media-query.d.ts +4 -0
- package/dist/layout/types.d.ts +31 -0
- package/dist/layout-tq-_l_O3.js +171 -0
- package/dist/list/List.vue.d.ts +22 -0
- package/dist/list/ListItem.vue.d.ts +88 -0
- package/dist/list/ListNodeRenderer.d.ts +15 -0
- package/dist/list/ListSpin.vue.d.ts +16 -0
- package/dist/list/index.d.ts +10 -0
- package/dist/list/index.js +2 -0
- package/dist/list/list-context.d.ts +8 -0
- package/dist/list/types.d.ts +66 -0
- package/dist/list-DHIOE2Y-.js +387 -0
- package/dist/modal/ConfirmModal.vue.d.ts +14 -0
- package/dist/modal/Modal.vue.d.ts +15 -0
- package/dist/modal/ModalDefaultFooter.vue.d.ts +22 -0
- package/dist/modal/ModalDialog.vue.d.ts +53 -0
- package/dist/modal/ModalInnerContent.vue.d.ts +38 -0
- package/dist/modal/ModalNodeRenderer.d.ts +15 -0
- package/dist/modal/imperative.d.ts +9 -0
- package/dist/modal/index.d.ts +8 -0
- package/dist/modal/index.js +2 -0
- package/dist/modal/types.d.ts +92 -0
- package/dist/modal/use-modal.d.ts +2 -0
- package/dist/modal-YVolL7Hz.js +221 -0
- package/dist/navigation/CollapseButton.vue.d.ts +12 -0
- package/dist/navigation/NavFooter.vue.d.ts +15 -0
- package/dist/navigation/NavHeader.vue.d.ts +13 -0
- package/dist/navigation/NavItem.d.ts +177 -0
- package/dist/navigation/Navigation.vue.d.ts +29 -0
- package/dist/navigation/NavigationContextProvider.d.ts +16 -0
- package/dist/navigation/NavigationIconRenderer.d.ts +45 -0
- package/dist/navigation/NavigationItemTree.vue.d.ts +8 -0
- package/dist/navigation/NavigationNodeRenderer.d.ts +18 -0
- package/dist/navigation/SubNav.vue.d.ts +18 -0
- package/dist/navigation/index.d.ts +14 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation/navigation-context.d.ts +35 -0
- package/dist/navigation/types.d.ts +177 -0
- package/dist/navigation-DF8R5jFK.js +1479 -0
- package/dist/notification/NotificationHost.vue.d.ts +7 -0
- package/dist/notification/NotificationNodeRenderer.d.ts +15 -0
- package/dist/notification/NotificationNotice.vue.d.ts +16 -0
- package/dist/notification/imperative.d.ts +12 -0
- package/dist/notification/index.d.ts +6 -0
- package/dist/notification/index.js +2 -0
- package/dist/notification/notification-store.d.ts +24 -0
- package/dist/notification/types.d.ts +63 -0
- package/dist/notification/use-notification.d.ts +2 -0
- package/dist/notification-DIsvgiIO.js +445 -0
- package/dist/overflow-list/OverflowList.vue.d.ts +131 -0
- package/dist/overflow-list/OverflowListNodeRenderer.d.ts +35 -0
- package/dist/overflow-list/index.d.ts +5 -0
- package/dist/overflow-list/index.js +2 -0
- package/dist/overflow-list/types.d.ts +35 -0
- package/dist/overflow-list-Df6ixrtB.js +413 -0
- package/dist/pagination/Pagination.vue.d.ts +25 -0
- package/dist/pagination/PaginationNodeRenderer.d.ts +15 -0
- package/dist/pagination/PaginationPopover.vue.d.ts +25 -0
- package/dist/pagination/PaginationRestList.vue.d.ts +11 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/index.js +2 -0
- package/dist/pagination/types.d.ts +46 -0
- package/dist/pin-code/PinCode.vue.d.ts +20 -0
- package/dist/pin-code/index.d.ts +10 -0
- package/dist/pin-code/index.js +2 -0
- package/dist/pin-code/types.d.ts +25 -0
- package/dist/pin-code-wY5g0KLD.js +193 -0
- package/dist/popconfirm/Popconfirm.vue.d.ts +25 -0
- package/dist/popconfirm/PopconfirmNodeRenderer.d.ts +15 -0
- package/dist/popconfirm/index.d.ts +4 -0
- package/dist/popconfirm/index.js +2 -0
- package/dist/popconfirm/types.d.ts +57 -0
- package/dist/popconfirm-DQUtvI0A.js +389 -0
- package/dist/popover/Popover.vue.d.ts +23 -0
- package/dist/popover/PopoverArrow.vue.d.ts +10 -0
- package/dist/popover/index.d.ts +4 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover/types.d.ts +35 -0
- package/dist/popover-hD77YpUM.js +292 -0
- package/dist/progress/Progress.vue.d.ts +24 -0
- package/dist/progress/ProgressCircle.vue.d.ts +26 -0
- package/dist/progress/ProgressLine.vue.d.ts +23 -0
- package/dist/progress/ProgressNodeRenderer.d.ts +15 -0
- package/dist/progress/index.d.ts +6 -0
- package/dist/progress/index.js +2 -0
- package/dist/progress/types.d.ts +44 -0
- package/dist/progress-DIIyWKKD.js +9 -0
- package/dist/radio/Radio.vue.d.ts +30 -0
- package/dist/radio/RadioGroup.d.ts +201 -0
- package/dist/radio/RadioNodeRenderer.d.ts +15 -0
- package/dist/radio/index.d.ts +10 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/radio-context.d.ts +15 -0
- package/dist/radio/types.d.ts +100 -0
- package/dist/radio-y9iAI359.js +565 -0
- package/dist/rating/Rating.vue.d.ts +39 -0
- package/dist/rating/RatingItem.vue.d.ts +33 -0
- package/dist/rating/RatingNodeRenderer.d.ts +17 -0
- package/dist/rating/index.d.ts +6 -0
- package/dist/rating/index.js +2 -0
- package/dist/rating/types.d.ts +57 -0
- package/dist/rating-CJkb4pkD.js +542 -0
- package/dist/resizable/Resizable.vue.d.ts +31 -0
- package/dist/resizable/ResizableNodeRenderer.d.ts +17 -0
- package/dist/resizable/ResizeGroup.vue.d.ts +13 -0
- package/dist/resizable/ResizeHandler.vue.d.ts +11 -0
- package/dist/resizable/ResizeItem.vue.d.ts +19 -0
- package/dist/resizable/SingleResizeHandle.vue.d.ts +21 -0
- package/dist/resizable/index.d.ts +6 -0
- package/dist/resizable/index.js +2 -0
- package/dist/resizable/resizable-context.d.ts +27 -0
- package/dist/resizable/types.d.ts +87 -0
- package/dist/resizable/use-resize-group.d.ts +21 -0
- package/dist/resizable/use-single-resize.d.ts +30 -0
- package/dist/resizable-CEB0ZdGT.js +814 -0
- package/dist/scroll-list/ScrollItem.vue.d.ts +21 -0
- package/dist/scroll-list/ScrollList.vue.d.ts +11 -0
- package/dist/scroll-list/ScrollListNodeRenderer.d.ts +15 -0
- package/dist/scroll-list/index.d.ts +10 -0
- package/dist/scroll-list/index.js +2 -0
- package/dist/scroll-list/types.d.ts +54 -0
- package/dist/scroll-list-BSXksNOR.js +466 -0
- package/dist/select/Select.vue.d.ts +39 -0
- package/dist/select/SelectFragment.d.ts +4 -0
- package/dist/select/SelectNodeRenderer.d.ts +15 -0
- package/dist/select/SelectOption.vue.d.ts +13 -0
- package/dist/select/SelectOptionCollector.d.ts +13 -0
- package/dist/select/SelectOptionGroup.vue.d.ts +14 -0
- package/dist/select/index.d.ts +12 -0
- package/dist/select/index.js +3 -0
- package/dist/select/types.d.ts +165 -0
- package/dist/select/use-select-foundation.d.ts +64 -0
- package/dist/select-BeM6gxAU.js +40 -0
- package/dist/side-sheet/SideSheet.vue.d.ts +19 -0
- package/dist/side-sheet/SideSheetContent.vue.d.ts +37 -0
- package/dist/side-sheet/SideSheetNodeRenderer.d.ts +15 -0
- package/dist/side-sheet/index.d.ts +4 -0
- package/dist/side-sheet/index.js +2 -0
- package/dist/side-sheet/types.d.ts +46 -0
- package/dist/side-sheet-9CBTk23r.js +542 -0
- package/dist/skeleton/Skeleton.vue.d.ts +15 -0
- package/dist/skeleton/SkeletonAvatar.vue.d.ts +9 -0
- package/dist/skeleton/SkeletonButton.vue.d.ts +7 -0
- package/dist/skeleton/SkeletonImage.vue.d.ts +7 -0
- package/dist/skeleton/SkeletonNodeRenderer.d.ts +15 -0
- package/dist/skeleton/SkeletonParagraph.vue.d.ts +8 -0
- package/dist/skeleton/SkeletonTitle.vue.d.ts +7 -0
- package/dist/skeleton/index.d.ts +18 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/skeleton/types.d.ts +36 -0
- package/dist/skeleton-p61lfhoz.js +302 -0
- package/dist/slider/Slider.vue.d.ts +32 -0
- package/dist/slider/SliderFragment.d.ts +4 -0
- package/dist/slider/index.d.ts +5 -0
- package/dist/slider/index.js +5 -0
- package/dist/slider/types.d.ts +57 -0
- package/dist/slider/use-slider-foundation.d.ts +47 -0
- package/dist/space/Space.vue.d.ts +16 -0
- package/dist/space/index.d.ts +3 -0
- package/dist/space/index.js +2 -0
- package/dist/space/types.d.ts +15 -0
- package/dist/space-DVnFbkCz.js +63 -0
- package/dist/spin/Spin.vue.d.ts +105 -0
- package/dist/spin/SpinNodeRenderer.d.ts +15 -0
- package/dist/spin/index.d.ts +6 -0
- package/dist/spin/index.js +2 -0
- package/dist/spin/types.d.ts +20 -0
- package/dist/spin-D-1P0WMW.js +9 -0
- package/dist/src-DNBBthjO.js +490 -0
- package/dist/steps/Step.vue.d.ts +22 -0
- package/dist/steps/Steps.vue.d.ts +24 -0
- package/dist/steps/StepsNodeRenderer.d.ts +17 -0
- package/dist/steps/index.d.ts +9 -0
- package/dist/steps/index.js +2 -0
- package/dist/steps/steps-context.d.ts +6 -0
- package/dist/steps/types.d.ts +54 -0
- package/dist/steps-6p04q-Lz.js +303 -0
- package/dist/switch/Switch.vue.d.ts +27 -0
- package/dist/switch/SwitchNodeRenderer.d.ts +15 -0
- package/dist/switch/SwitchSpin.vue.d.ts +7 -0
- package/dist/switch/index.d.ts +7 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch/types.d.ts +28 -0
- package/dist/switch-Dte2Fl3l.js +284 -0
- package/dist/table/Table.vue.d.ts +29 -0
- package/dist/table/TableBody.vue.d.ts +70 -0
- package/dist/table/TableCell.vue.d.ts +37 -0
- package/dist/table/TableColumn.d.ts +81 -0
- package/dist/table/TableFilterMenu.vue.d.ts +18 -0
- package/dist/table/TableHeader.vue.d.ts +46 -0
- package/dist/table/TableNativeElement.d.ts +9 -0
- package/dist/table/TableNodeRenderer.d.ts +13 -0
- package/dist/table/TableSpin.vue.d.ts +16 -0
- package/dist/table/index.d.ts +13 -0
- package/dist/table/index.js +2 -0
- package/dist/table/table-utils.d.ts +43 -0
- package/dist/table/types.d.ts +323 -0
- package/dist/table-jZkHjf-W.js +2097 -0
- package/dist/tabs/TabBar.vue.d.ts +38 -0
- package/dist/tabs/TabItem.vue.d.ts +26 -0
- package/dist/tabs/TabPane.vue.d.ts +13 -0
- package/dist/tabs/Tabs.vue.d.ts +36 -0
- package/dist/tabs/TabsDropdown.vue.d.ts +27 -0
- package/dist/tabs/TabsNodeRenderer.d.ts +15 -0
- package/dist/tabs/index.d.ts +6 -0
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/tabs-context.d.ts +12 -0
- package/dist/tabs/types.d.ts +110 -0
- package/dist/tabs-CezuYzIu.js +874 -0
- package/dist/tag/SplitTagGroup.d.ts +36 -0
- package/dist/tag/Tag.vue.d.ts +33 -0
- package/dist/tag/TagGroup.d.ts +115 -0
- package/dist/tag/TagNodeRenderer.d.ts +15 -0
- package/dist/tag/index.d.ts +8 -0
- package/dist/tag/index.js +2 -0
- package/dist/tag/types.d.ts +82 -0
- package/dist/tag-BPD0bELU.js +348 -0
- package/dist/tag-input/TagInput.vue.d.ts +51 -0
- package/dist/tag-input/TagInputNodeRenderer.d.ts +17 -0
- package/dist/tag-input/TagInputRestPopover.vue.d.ts +19 -0
- package/dist/tag-input/TagInputTag.vue.d.ts +27 -0
- package/dist/tag-input/index.d.ts +5 -0
- package/dist/tag-input/index.js +2 -0
- package/dist/tag-input/types.d.ts +95 -0
- package/dist/tag-input/use-tag-input-foundation.d.ts +47 -0
- package/dist/tag-input-SxUfNqF0.js +784 -0
- package/dist/time-picker/TimePicker.vue.d.ts +27 -0
- package/dist/time-picker/TimePickerColumn.vue.d.ts +29 -0
- package/dist/time-picker/TimePickerNodeRenderer.d.ts +17 -0
- package/dist/time-picker/TimePickerPanel.vue.d.ts +32 -0
- package/dist/time-picker/index.d.ts +5 -0
- package/dist/time-picker/index.js +2 -0
- package/dist/time-picker/types.d.ts +146 -0
- package/dist/time-picker/use-time-picker-foundation.d.ts +36 -0
- package/dist/time-picker-D6p36ea8.js +3587 -0
- package/dist/timeline/Timeline.vue.d.ts +69 -0
- package/dist/timeline/TimelineItem.vue.d.ts +100 -0
- package/dist/timeline/TimelineNodeRenderer.d.ts +15 -0
- package/dist/timeline/index.d.ts +10 -0
- package/dist/timeline/index.js +2 -0
- package/dist/timeline/types.d.ts +43 -0
- package/dist/timeline-2D5xCZsU.js +191 -0
- package/dist/toast/ToastHost.vue.d.ts +7 -0
- package/dist/toast/ToastIconRenderer.d.ts +17 -0
- package/dist/toast/ToastNodeRenderer.d.ts +15 -0
- package/dist/toast/ToastNotice.vue.d.ts +20 -0
- package/dist/toast/imperative.d.ts +3 -0
- package/dist/toast/index.d.ts +6 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/toast-store.d.ts +30 -0
- package/dist/toast/types.d.ts +65 -0
- package/dist/toast/use-toast.d.ts +2 -0
- package/dist/toast-s8nFLf8t.js +523 -0
- package/dist/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/tooltip/TooltipArrow.vue.d.ts +8 -0
- package/dist/tooltip/TooltipNodeRenderer.d.ts +15 -0
- package/dist/tooltip/TooltipPortal.vue.d.ts +44 -0
- package/dist/tooltip/TooltipTriggerRenderer.d.ts +66 -0
- package/dist/tooltip/index.d.ts +5 -0
- package/dist/tooltip/index.js +3 -0
- package/dist/tooltip/types.d.ts +117 -0
- package/dist/tooltip/use-tooltip-foundation.d.ts +25 -0
- package/dist/tooltip-en9bvXRp.js +28 -0
- package/dist/transfer/Transfer.vue.d.ts +35 -0
- package/dist/transfer/TransferNodeRenderer.d.ts +15 -0
- package/dist/transfer/index.d.ts +5 -0
- package/dist/transfer/index.js +2 -0
- package/dist/transfer/types.d.ts +159 -0
- package/dist/transfer-Doq1sI9z.js +695 -0
- package/dist/tree/Tree.vue.d.ts +73 -0
- package/dist/tree/TreeNode.vue.d.ts +77 -0
- package/dist/tree/TreeNodeMotion.vue.d.ts +20 -0
- package/dist/tree/TreeNodeRenderer.d.ts +15 -0
- package/dist/tree/index.d.ts +9 -0
- package/dist/tree/index.js +5 -0
- package/dist/tree/types.d.ts +180 -0
- package/dist/tree-select/TreeSelect.vue.d.ts +76 -0
- package/dist/tree-select/TreeSelectNodeRenderer.d.ts +15 -0
- package/dist/tree-select/index.d.ts +6 -0
- package/dist/tree-select/index.js +2 -0
- package/dist/tree-select/types.d.ts +156 -0
- package/dist/tree-select-BIu6Owuq.js +1237 -0
- package/dist/treeUtil-IUdRJ6Ws.js +277 -0
- package/dist/typography/Numeral.vue.d.ts +32 -0
- package/dist/typography/Paragraph.vue.d.ts +30 -0
- package/dist/typography/Text.vue.d.ts +30 -0
- package/dist/typography/Title.vue.d.ts +28 -0
- package/dist/typography/Typography.vue.d.ts +13 -0
- package/dist/typography/TypographyBase.vue.d.ts +40 -0
- package/dist/typography/TypographyCopyable.vue.d.ts +29 -0
- package/dist/typography/TypographyDecorations.d.ts +34 -0
- package/dist/typography/TypographyNodeRenderer.d.ts +17 -0
- package/dist/typography/index.d.ts +17 -0
- package/dist/typography/index.js +2 -0
- package/dist/typography/types.d.ts +108 -0
- package/dist/typography/typography-locale.d.ts +5 -0
- package/dist/typography/typography-utils.d.ts +4 -0
- package/dist/typography-DF8KwKuL.js +914 -0
- package/dist/upload/Upload.vue.d.ts +69 -0
- package/dist/upload/UploadFileCard.vue.d.ts +4 -0
- package/dist/upload/UploadNodeRenderer.d.ts +15 -0
- package/dist/upload/index.d.ts +10 -0
- package/dist/upload/index.js +2 -0
- package/dist/upload/types.d.ts +250 -0
- package/dist/upload-BzdpoGJX.js +1777 -0
- package/dist/uuid-BUHV1G8U.js +21 -0
- package/dist/warning-naSiE8G7.js +6 -0
- package/dist/zh-CN-CCu7YvUA.js +1623 -0
- package/package.json +336 -0
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { _ as e, g as t, h as n, t as r, v as i } from "./foundation-Cawx37mp.js";
|
|
3
|
+
import { t as a } from "./warning-naSiE8G7.js";
|
|
4
|
+
import { r as o } from "./keyCode-DMNg63wX.js";
|
|
5
|
+
import { t as s } from "./Tooltip-Bq7HZwnS.js";
|
|
6
|
+
import { t as c } from "./config-context-CyynTtDb.js";
|
|
7
|
+
import { n as l } from "./config-provider-VMfNNSF1.js";
|
|
8
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as ee, defineComponent as g, getCurrentInstance as te, inject as ne, markRaw as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as S, onMounted as C, openBlock as w, renderList as re, renderSlot as T, shallowReactive as E, shallowRef as D, toDisplayString as ie, unref as O, useAttrs as k, useId as ae, useSlots as oe, useTemplateRef as A, watch as j, withCtx as M, withModifiers as N } from "vue";
|
|
9
|
+
import { IconClear as se } from "@aifuxi/semi-icons-vue";
|
|
10
|
+
//#region bundled-foundation
|
|
11
|
+
var P = class extends r {
|
|
12
|
+
constructor(e) {
|
|
13
|
+
super({ ...e }), this.isPanelOpen = !1;
|
|
14
|
+
}
|
|
15
|
+
init() {
|
|
16
|
+
this._setDropdownWidth();
|
|
17
|
+
let { defaultOpen: e, data: t, defaultValue: n, value: r } = this.getProps();
|
|
18
|
+
if (t && t.length) {
|
|
19
|
+
let e = this._generateList(t);
|
|
20
|
+
this._adapter.updateOptionList(e);
|
|
21
|
+
}
|
|
22
|
+
e && this.openDropdown();
|
|
23
|
+
let i;
|
|
24
|
+
n !== void 0 && (i = n), r !== void 0 && (i = r), i !== void 0 && this.handleValueChange(i);
|
|
25
|
+
}
|
|
26
|
+
destroy() {
|
|
27
|
+
this._adapter.unregisterClickOutsideHandler();
|
|
28
|
+
}
|
|
29
|
+
_setDropdownWidth() {
|
|
30
|
+
let { style: t, dropdownMatchSelectWidth: r } = this.getProps(), i;
|
|
31
|
+
r && (i = t && (0, n.default)(t.width) || t && (0, e.default)(t.width) && !t.width.includes("%") ? t.width : this._adapter.getTriggerWidth(), this._adapter.setOptionWrapperWidth(i));
|
|
32
|
+
}
|
|
33
|
+
handleInputClick(e) {
|
|
34
|
+
let { options: t } = this.getStates(), { disabled: n } = this.getProps();
|
|
35
|
+
n || (this.isPanelOpen ? this.closeDropdown() : this.openDropdown());
|
|
36
|
+
}
|
|
37
|
+
openDropdown() {
|
|
38
|
+
this.isPanelOpen = !0, this._adapter.toggleListVisible(!0), this._setDropdownWidth(), this._adapter.registerClickOutsideHandler((e) => this.closeDropdown(e)), this._adapter.notifyDropdownVisibleChange(!0), this._modifyFocusIndexOnPanelOpen();
|
|
39
|
+
}
|
|
40
|
+
closeDropdown(e) {
|
|
41
|
+
this.isPanelOpen = !1, this._adapter.toggleListVisible(!1), this._adapter.unregisterClickOutsideHandler(), this._adapter.notifyDropdownVisibleChange(!1);
|
|
42
|
+
}
|
|
43
|
+
_generateList(r) {
|
|
44
|
+
let { renderItem: a } = this.getProps(), o = [];
|
|
45
|
+
return r && r.length && r.forEach((r, s) => {
|
|
46
|
+
let c = String((/* @__PURE__ */ new Date()).getTime()) + s, l = {};
|
|
47
|
+
(0, e.default)(r) || (0, n.default)(r) ? l = {
|
|
48
|
+
value: r,
|
|
49
|
+
key: c,
|
|
50
|
+
label: r,
|
|
51
|
+
show: !0
|
|
52
|
+
} : (0, t.default)(r) && !(0, i.default)(r.value) && (l = {
|
|
53
|
+
show: !0,
|
|
54
|
+
...r
|
|
55
|
+
}), a && typeof a == "function" && (l._renderedLabel = a(r)), o.push(l);
|
|
56
|
+
}), o;
|
|
57
|
+
}
|
|
58
|
+
handleSearch(e) {
|
|
59
|
+
this._adapter.updateInputValue(e), this._adapter.notifySearch(e), this._adapter.notifyChange(e), this._modifyFocusIndex(e), this.isPanelOpen || this.openDropdown();
|
|
60
|
+
}
|
|
61
|
+
handleSelect(e, t) {
|
|
62
|
+
let { renderSelectedItem: n } = this.getProps(), r = "";
|
|
63
|
+
n && typeof n == "function" ? (r = n(e), a(typeof r != "string", "Warning: [Semi AutoComplete] renderSelectedItem must return string, please check your function return")) : r = e.value, this._isControlledComponent() ? (this.closeDropdown(), this.notifySelect(e)) : (this._adapter.updateInputValue(r), this.updateSelection(e), this.notifySelect(e), this.closeDropdown()), this._adapter.notifyChange(r), this._adapter.updateFocusIndex(t);
|
|
64
|
+
}
|
|
65
|
+
updateSelection(e) {
|
|
66
|
+
let t = /* @__PURE__ */ new Map();
|
|
67
|
+
e && t.set(e.label, e), this._adapter.updateSelection(t);
|
|
68
|
+
}
|
|
69
|
+
notifySelect(e) {
|
|
70
|
+
this._backwardLabelInValue() ? this._adapter.notifySelect(e) : this._adapter.notifySelect(e.value);
|
|
71
|
+
}
|
|
72
|
+
_backwardLabelInValue() {
|
|
73
|
+
let { onSelectWithObject: e } = this.getProps();
|
|
74
|
+
return e;
|
|
75
|
+
}
|
|
76
|
+
handleDataChange(e) {
|
|
77
|
+
let t = this._generateList(e);
|
|
78
|
+
this._adapter.updateOptionList(t), this._adapter.rePositionDropdown();
|
|
79
|
+
let { inputValue: n } = this.getStates();
|
|
80
|
+
this._modifyFocusIndex(n);
|
|
81
|
+
}
|
|
82
|
+
handleValueChange(e) {
|
|
83
|
+
let { data: t, defaultActiveFirstOption: n } = this.getProps(), r = "";
|
|
84
|
+
r = this._backwardLabelInValue() && Object.prototype.toString.call(e) === "[object Object]" ? e.value : e;
|
|
85
|
+
let i = this._getRenderSelectedItem(), a = this._generateList(t), o = a.length ? a.filter((e) => i(e) === r) : [], s = o.length, c = a.findIndex((e) => i(e) === r), l = "";
|
|
86
|
+
s ? (o = o[0], l = i(o)) : l = i(this._backwardLabelInValue() ? e : {
|
|
87
|
+
label: r,
|
|
88
|
+
value: r
|
|
89
|
+
}), this._adapter.updateInputValue(l), this.updateSelection(s ? o : null), c === -1 && n ? this._adapter.updateFocusIndex(0) : this._adapter.updateFocusIndex(c);
|
|
90
|
+
}
|
|
91
|
+
_modifyFocusIndex(e) {
|
|
92
|
+
let { focusIndex: t } = this.getStates(), { data: n, defaultActiveFirstOption: r } = this.getProps(), i = -1;
|
|
93
|
+
if (e) {
|
|
94
|
+
let t = this._getRenderSelectedItem();
|
|
95
|
+
i = this._generateList(n).findIndex((n) => t(n) === e);
|
|
96
|
+
}
|
|
97
|
+
i === -1 && r ? t !== 0 && this._adapter.updateFocusIndex(0) : i !== t && this._adapter.updateFocusIndex(i);
|
|
98
|
+
}
|
|
99
|
+
_modifyFocusIndexOnPanelOpen() {
|
|
100
|
+
let { inputValue: e } = this.getStates();
|
|
101
|
+
this._modifyFocusIndex(e);
|
|
102
|
+
}
|
|
103
|
+
_getRenderSelectedItem() {
|
|
104
|
+
let { renderSelectedItem: e } = this.getProps();
|
|
105
|
+
return e === void 0 && (e = (e) => e?.value), e;
|
|
106
|
+
}
|
|
107
|
+
handleClear() {
|
|
108
|
+
this._adapter.notifyClear();
|
|
109
|
+
}
|
|
110
|
+
bindKeyBoardEvent() {
|
|
111
|
+
this._keydownHandler = (e) => {
|
|
112
|
+
this._handleKeyDown(e);
|
|
113
|
+
}, this._adapter.registerKeyDown(this._keydownHandler);
|
|
114
|
+
}
|
|
115
|
+
_handleKeyDown(e) {
|
|
116
|
+
let t = e.keyCode, { visible: n } = this.getStates();
|
|
117
|
+
switch (t) {
|
|
118
|
+
case o.UP:
|
|
119
|
+
e.preventDefault(), this._handleArrowKeyDown(-1);
|
|
120
|
+
break;
|
|
121
|
+
case o.DOWN:
|
|
122
|
+
e.preventDefault(), this._handleArrowKeyDown(1);
|
|
123
|
+
break;
|
|
124
|
+
case o.ENTER:
|
|
125
|
+
e.preventDefault(), this._handleEnterKeyDown();
|
|
126
|
+
break;
|
|
127
|
+
case o.ESC:
|
|
128
|
+
this.closeDropdown();
|
|
129
|
+
break;
|
|
130
|
+
case o.TAB: this.closeDropdown();
|
|
131
|
+
}
|
|
132
|
+
this._adapter.notifyKeyDown(e);
|
|
133
|
+
}
|
|
134
|
+
_getEnableFocusIndex(e) {
|
|
135
|
+
let { focusIndex: t, options: n } = this.getStates(), r = n.filter((e) => e.show), i = r.length, a = t + e;
|
|
136
|
+
if (a < 0 && (a = i - 1), a >= i && (a = 0), e > 0) {
|
|
137
|
+
let e = -1;
|
|
138
|
+
for (let t = 0; t < r.length && (r[t].disabled || (e = t), !(e >= a)); t++);
|
|
139
|
+
a = e;
|
|
140
|
+
} else {
|
|
141
|
+
let e = r.length;
|
|
142
|
+
for (let t = i - 1; t >= 0 && (r[t].disabled || (e = t), !(e <= a)); t--);
|
|
143
|
+
a = e;
|
|
144
|
+
}
|
|
145
|
+
this._adapter.updateFocusIndex(a), this._adapter.updateScrollTop(a);
|
|
146
|
+
}
|
|
147
|
+
_handleArrowKeyDown(e) {
|
|
148
|
+
let { visible: t } = this.getStates();
|
|
149
|
+
t ? this._getEnableFocusIndex(e) : this.openDropdown();
|
|
150
|
+
}
|
|
151
|
+
_handleEnterKeyDown() {
|
|
152
|
+
let { visible: e, options: t, focusIndex: n } = this.getStates();
|
|
153
|
+
if (!e) this.openDropdown();
|
|
154
|
+
else if (n !== void 0 && n !== -1 && t.length !== 0) {
|
|
155
|
+
let e = t.filter((e) => e.show)[n];
|
|
156
|
+
e && this.handleSelect(e, n);
|
|
157
|
+
} else this.closeDropdown();
|
|
158
|
+
}
|
|
159
|
+
handleOptionMouseEnter(e) {
|
|
160
|
+
this._adapter.updateFocusIndex(e);
|
|
161
|
+
}
|
|
162
|
+
handleFocus(e) {
|
|
163
|
+
this.bindKeyBoardEvent(), this._adapter.notifyFocus(e);
|
|
164
|
+
}
|
|
165
|
+
handleBlur(e) {
|
|
166
|
+
this._persistEvent(e), this._adapter.notifyBlur(e);
|
|
167
|
+
}
|
|
168
|
+
}, F = g({
|
|
169
|
+
name: "AutoCompleteNodeRenderer",
|
|
170
|
+
props: { content: {
|
|
171
|
+
type: null,
|
|
172
|
+
default: void 0
|
|
173
|
+
} },
|
|
174
|
+
setup: (e) => () => e.content
|
|
175
|
+
}), I = ["aria-selected", "aria-disabled"], L = {
|
|
176
|
+
key: 0,
|
|
177
|
+
class: "semi-autocomplete-option-icon"
|
|
178
|
+
}, R = /* @__PURE__ */ g({
|
|
179
|
+
name: "AutoCompleteOption",
|
|
180
|
+
inheritAttrs: !1,
|
|
181
|
+
__name: "AutoCompleteOption",
|
|
182
|
+
props: {
|
|
183
|
+
empty: { type: Boolean },
|
|
184
|
+
emptyContent: { type: [
|
|
185
|
+
Object,
|
|
186
|
+
String,
|
|
187
|
+
Number,
|
|
188
|
+
Boolean,
|
|
189
|
+
null,
|
|
190
|
+
Array
|
|
191
|
+
] },
|
|
192
|
+
focused: { type: Boolean },
|
|
193
|
+
inputValue: {},
|
|
194
|
+
selected: { type: Boolean },
|
|
195
|
+
showTick: { type: Boolean },
|
|
196
|
+
value: {},
|
|
197
|
+
label: { type: [
|
|
198
|
+
Object,
|
|
199
|
+
String,
|
|
200
|
+
Number,
|
|
201
|
+
Boolean,
|
|
202
|
+
null,
|
|
203
|
+
Array
|
|
204
|
+
] },
|
|
205
|
+
disabled: { type: Boolean },
|
|
206
|
+
class: { type: [
|
|
207
|
+
Boolean,
|
|
208
|
+
null,
|
|
209
|
+
String,
|
|
210
|
+
Object,
|
|
211
|
+
Array
|
|
212
|
+
] },
|
|
213
|
+
className: {},
|
|
214
|
+
style: { type: [
|
|
215
|
+
Boolean,
|
|
216
|
+
null,
|
|
217
|
+
String,
|
|
218
|
+
Object,
|
|
219
|
+
Array
|
|
220
|
+
] }
|
|
221
|
+
},
|
|
222
|
+
emits: ["mouseenter", "select"],
|
|
223
|
+
setup(e, { emit: t }) {
|
|
224
|
+
let n = e, r = k(), i = t, a = d(() => [
|
|
225
|
+
"semi-autocomplete-option",
|
|
226
|
+
n.class,
|
|
227
|
+
n.className,
|
|
228
|
+
n.disabled ? "semi-autocomplete-option-disabled" : void 0,
|
|
229
|
+
n.selected ? "semi-autocomplete-option-selected" : void 0,
|
|
230
|
+
n.focused ? "semi-autocomplete-option-focused" : void 0,
|
|
231
|
+
n.empty ? "semi-autocomplete-option-empty" : void 0
|
|
232
|
+
]);
|
|
233
|
+
function o(e) {
|
|
234
|
+
!n.disabled && !n.empty && i("select", e);
|
|
235
|
+
}
|
|
236
|
+
return (e, t) => (w(), m("div", v(O(r), {
|
|
237
|
+
class: a.value,
|
|
238
|
+
style: n.style,
|
|
239
|
+
role: "option",
|
|
240
|
+
"aria-selected": n.selected ? "true" : "false",
|
|
241
|
+
"aria-disabled": n.disabled ? "true" : "false",
|
|
242
|
+
onClick: o,
|
|
243
|
+
onMouseenter: t[0] ||= (e) => i("mouseenter", e)
|
|
244
|
+
}), [n.showTick ? (w(), m("div", L)) : p("", !0), T(e.$slots, "default")], 16, I));
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
//#endregion
|
|
248
|
+
//#region src/auto-complete/use-auto-complete-foundation.ts
|
|
249
|
+
function z(e) {
|
|
250
|
+
let t = { ...e };
|
|
251
|
+
for (let e of Object.keys(t)) (e.startsWith("_") || e === "show" || e === "key") && delete t[e];
|
|
252
|
+
return t;
|
|
253
|
+
}
|
|
254
|
+
function ce(e) {
|
|
255
|
+
let { controlled: t, emit: n, listElement: r, runtimeProps: i, triggerElement: a } = e, o = t.value ? i.value.modelValue ?? i.value.value ?? "" : i.value.defaultValue ?? "", s = E({
|
|
256
|
+
dropdownMinWidth: void 0,
|
|
257
|
+
focusIndex: i.value.defaultActiveFirstOption ? 0 : -1,
|
|
258
|
+
inputValue: o,
|
|
259
|
+
keyboardEventSet: {},
|
|
260
|
+
options: [],
|
|
261
|
+
rePosKey: 1,
|
|
262
|
+
selection: /* @__PURE__ */ new Map(),
|
|
263
|
+
visible: !1
|
|
264
|
+
}), c = /* @__PURE__ */ new Map(), l, u = !1;
|
|
265
|
+
function d() {
|
|
266
|
+
let e = { ...i.value };
|
|
267
|
+
return t.value ? e.value = i.value.modelValue ?? i.value.value : delete e.value, e;
|
|
268
|
+
}
|
|
269
|
+
let f = _(new P({
|
|
270
|
+
getContext: () => void 0,
|
|
271
|
+
getContexts: () => void 0,
|
|
272
|
+
getProp: (e) => d()[String(e)],
|
|
273
|
+
getProps: d,
|
|
274
|
+
getState: (e) => s[e],
|
|
275
|
+
getStates: () => s,
|
|
276
|
+
setState: (e, t) => {
|
|
277
|
+
Object.assign(s, e), t?.();
|
|
278
|
+
},
|
|
279
|
+
getCache: (e) => c.get(e),
|
|
280
|
+
getCaches: () => c,
|
|
281
|
+
setCache: (e, t) => c.set(e, t),
|
|
282
|
+
stopPropagation: (e) => e?.stopPropagation(),
|
|
283
|
+
persistEvent: () => void 0,
|
|
284
|
+
getTriggerWidth: () => a.value?.getBoundingClientRect().width,
|
|
285
|
+
setOptionWrapperWidth: (e) => {
|
|
286
|
+
s.dropdownMinWidth = e;
|
|
287
|
+
},
|
|
288
|
+
updateInputValue: (e) => {
|
|
289
|
+
s.inputValue = e;
|
|
290
|
+
},
|
|
291
|
+
toggleListVisible: (e) => {
|
|
292
|
+
s.visible = e;
|
|
293
|
+
},
|
|
294
|
+
updateOptionList: (e) => {
|
|
295
|
+
s.options = e;
|
|
296
|
+
},
|
|
297
|
+
updateScrollTop: (e) => {
|
|
298
|
+
y(() => {
|
|
299
|
+
let t = e === void 0 ? r.value?.querySelector(".semi-autocomplete-option-selected") : r.value?.querySelector(`.semi-autocomplete-option:nth-child(${e + 1})`);
|
|
300
|
+
!t || !r.value || (r.value.scrollTop = t.offsetTop - r.value.offsetTop - r.value.clientHeight / 2 + t.clientHeight / 2);
|
|
301
|
+
});
|
|
302
|
+
},
|
|
303
|
+
updateSelection: (e) => {
|
|
304
|
+
s.selection = e;
|
|
305
|
+
},
|
|
306
|
+
notifySearch: (e) => n("search", e),
|
|
307
|
+
notifyChange: (e) => {
|
|
308
|
+
n("change", e), n("update:modelValue", e), n("update:value", e);
|
|
309
|
+
},
|
|
310
|
+
notifySelect: (e) => {
|
|
311
|
+
n("select", typeof e == "object" && e ? z(e) : e);
|
|
312
|
+
},
|
|
313
|
+
notifyDropdownVisibleChange: (e) => n("dropdownVisibleChange", e),
|
|
314
|
+
notifyClear: () => n("clear"),
|
|
315
|
+
notifyFocus: (e) => {
|
|
316
|
+
e && n("focus", e);
|
|
317
|
+
},
|
|
318
|
+
notifyBlur: (e) => {
|
|
319
|
+
e && n("blur", e);
|
|
320
|
+
},
|
|
321
|
+
notifyKeyDown: (e) => n("keydown", e),
|
|
322
|
+
rePositionDropdown: () => {
|
|
323
|
+
s.rePosKey += 1;
|
|
324
|
+
},
|
|
325
|
+
registerKeyDown: (e) => {
|
|
326
|
+
s.keyboardEventSet = { onKeyDown: e };
|
|
327
|
+
},
|
|
328
|
+
unregisterKeyDown: () => {
|
|
329
|
+
s.keyboardEventSet = {};
|
|
330
|
+
},
|
|
331
|
+
updateFocusIndex: (e) => {
|
|
332
|
+
s.focusIndex = e;
|
|
333
|
+
},
|
|
334
|
+
registerClickOutsideHandler: (e) => {
|
|
335
|
+
typeof document > "u" || (l && document.removeEventListener("mousedown", l), l = (t) => {
|
|
336
|
+
let n = t.target;
|
|
337
|
+
n instanceof Node && (a.value?.contains(n) || r.value?.contains(n) || e(t));
|
|
338
|
+
}, document.addEventListener("mousedown", l));
|
|
339
|
+
},
|
|
340
|
+
unregisterClickOutsideHandler: () => {
|
|
341
|
+
l && typeof document < "u" && document.removeEventListener("mousedown", l), l = void 0;
|
|
342
|
+
}
|
|
343
|
+
}));
|
|
344
|
+
return C(() => {
|
|
345
|
+
u = !0, f.init();
|
|
346
|
+
}), S(() => {
|
|
347
|
+
u = !1, f.destroy();
|
|
348
|
+
}), j(() => i.value.data, (e) => {
|
|
349
|
+
u && f.handleDataChange(e);
|
|
350
|
+
}, { deep: !0 }), j(() => t.value ? i.value.modelValue ?? i.value.value : void 0, (e) => {
|
|
351
|
+
u && t.value && f.handleValueChange(e);
|
|
352
|
+
}), {
|
|
353
|
+
foundation: f,
|
|
354
|
+
state: s
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/auto-complete/AutoComplete.vue?vue&type=script&setup=true&lang.ts
|
|
359
|
+
var le = {
|
|
360
|
+
key: 0,
|
|
361
|
+
class: "semi-autocomplete-loading-wrapper"
|
|
362
|
+
}, ue = {
|
|
363
|
+
key: 1,
|
|
364
|
+
class: "semi-autocomplete-option-text"
|
|
365
|
+
}, de = [
|
|
366
|
+
"id",
|
|
367
|
+
"aria-expanded",
|
|
368
|
+
"aria-disabled",
|
|
369
|
+
"aria-activedescendant"
|
|
370
|
+
], fe = ["id"], pe = [
|
|
371
|
+
"value",
|
|
372
|
+
"disabled",
|
|
373
|
+
"placeholder",
|
|
374
|
+
"autofocus",
|
|
375
|
+
"aria-label",
|
|
376
|
+
"aria-labelledby",
|
|
377
|
+
"aria-invalid",
|
|
378
|
+
"aria-errormessage",
|
|
379
|
+
"aria-describedby",
|
|
380
|
+
"aria-required",
|
|
381
|
+
"aria-expanded",
|
|
382
|
+
"aria-activedescendant"
|
|
383
|
+
], B = Object.assign(/* @__PURE__ */ g({
|
|
384
|
+
name: "AutoComplete",
|
|
385
|
+
inheritAttrs: !1,
|
|
386
|
+
__name: "AutoComplete",
|
|
387
|
+
props: {
|
|
388
|
+
ariaDescribedby: {},
|
|
389
|
+
ariaErrormessage: {},
|
|
390
|
+
ariaInvalid: { type: [Boolean, String] },
|
|
391
|
+
ariaLabel: {},
|
|
392
|
+
ariaLabelledby: {},
|
|
393
|
+
ariaRequired: { type: Boolean },
|
|
394
|
+
autoAdjustOverflow: { type: Boolean },
|
|
395
|
+
autoFocus: { type: Boolean },
|
|
396
|
+
clearIcon: { type: [
|
|
397
|
+
Object,
|
|
398
|
+
String,
|
|
399
|
+
Number,
|
|
400
|
+
Boolean,
|
|
401
|
+
null,
|
|
402
|
+
Array
|
|
403
|
+
] },
|
|
404
|
+
data: {},
|
|
405
|
+
defaultActiveFirstOption: { type: Boolean },
|
|
406
|
+
defaultOpen: { type: Boolean },
|
|
407
|
+
defaultValue: {},
|
|
408
|
+
disabled: { type: Boolean },
|
|
409
|
+
dropdownClassName: { type: [
|
|
410
|
+
Boolean,
|
|
411
|
+
null,
|
|
412
|
+
String,
|
|
413
|
+
Object,
|
|
414
|
+
Array
|
|
415
|
+
] },
|
|
416
|
+
dropdownMatchSelectWidth: { type: Boolean },
|
|
417
|
+
dropdownStyle: { type: [
|
|
418
|
+
Boolean,
|
|
419
|
+
null,
|
|
420
|
+
String,
|
|
421
|
+
Object,
|
|
422
|
+
Array
|
|
423
|
+
] },
|
|
424
|
+
emptyContent: { type: [
|
|
425
|
+
Object,
|
|
426
|
+
String,
|
|
427
|
+
Number,
|
|
428
|
+
Boolean,
|
|
429
|
+
null,
|
|
430
|
+
Array
|
|
431
|
+
] },
|
|
432
|
+
getPopupContainer: { type: Function },
|
|
433
|
+
id: {},
|
|
434
|
+
insetLabel: { type: [
|
|
435
|
+
Object,
|
|
436
|
+
String,
|
|
437
|
+
Number,
|
|
438
|
+
Boolean,
|
|
439
|
+
null,
|
|
440
|
+
Array
|
|
441
|
+
] },
|
|
442
|
+
insetLabelId: {},
|
|
443
|
+
loading: { type: Boolean },
|
|
444
|
+
maxHeight: {},
|
|
445
|
+
modelValue: {},
|
|
446
|
+
motion: { type: Boolean },
|
|
447
|
+
mouseEnterDelay: {},
|
|
448
|
+
mouseLeaveDelay: {},
|
|
449
|
+
onChangeWithObject: { type: Boolean },
|
|
450
|
+
onSelectWithObject: { type: Boolean },
|
|
451
|
+
placeholder: {},
|
|
452
|
+
position: {},
|
|
453
|
+
prefix: { type: [
|
|
454
|
+
Object,
|
|
455
|
+
String,
|
|
456
|
+
Number,
|
|
457
|
+
Boolean,
|
|
458
|
+
null,
|
|
459
|
+
Array
|
|
460
|
+
] },
|
|
461
|
+
renderItem: { type: Function },
|
|
462
|
+
renderSelectedItem: { type: Function },
|
|
463
|
+
showClear: { type: Boolean },
|
|
464
|
+
size: {},
|
|
465
|
+
style: { type: [
|
|
466
|
+
Boolean,
|
|
467
|
+
null,
|
|
468
|
+
String,
|
|
469
|
+
Object,
|
|
470
|
+
Array
|
|
471
|
+
] },
|
|
472
|
+
stopPropagation: { type: [Boolean, String] },
|
|
473
|
+
suffix: { type: [
|
|
474
|
+
Object,
|
|
475
|
+
String,
|
|
476
|
+
Number,
|
|
477
|
+
Boolean,
|
|
478
|
+
null,
|
|
479
|
+
Array
|
|
480
|
+
] },
|
|
481
|
+
validateStatus: {},
|
|
482
|
+
value: {},
|
|
483
|
+
zIndex: {}
|
|
484
|
+
},
|
|
485
|
+
emits: [
|
|
486
|
+
"blur",
|
|
487
|
+
"change",
|
|
488
|
+
"clear",
|
|
489
|
+
"dropdownVisibleChange",
|
|
490
|
+
"focus",
|
|
491
|
+
"keydown",
|
|
492
|
+
"search",
|
|
493
|
+
"select",
|
|
494
|
+
"update:modelValue",
|
|
495
|
+
"update:value"
|
|
496
|
+
],
|
|
497
|
+
setup(e, { expose: t, emit: n }) {
|
|
498
|
+
let r = e, i = n, a = k(), o = oe(), g = te(), _ = ne(c, void 0), y = A("triggerElement"), S = A("inputElement"), C = A("listElement"), E = D(!1), j = D(!1), P = D(!1), I = `semi-autocomplete-${ae().replaceAll(":", "")}`, L = d(() => _?.value ?? {
|
|
499
|
+
direction: "ltr",
|
|
500
|
+
getPopupContainer: void 0
|
|
501
|
+
});
|
|
502
|
+
function z(e, t) {
|
|
503
|
+
let n = String(e).replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), i = g?.vnode.props;
|
|
504
|
+
if (i && (Object.prototype.hasOwnProperty.call(i, e) || Object.prototype.hasOwnProperty.call(i, n)) && r[e] !== void 0) return r[e];
|
|
505
|
+
let a = l.config.overrideDefaultProps?.AutoComplete?.[e];
|
|
506
|
+
return a === void 0 ? t : a;
|
|
507
|
+
}
|
|
508
|
+
let B = d(() => ({
|
|
509
|
+
...r,
|
|
510
|
+
autoAdjustOverflow: z("autoAdjustOverflow", !0),
|
|
511
|
+
autoFocus: z("autoFocus", !1),
|
|
512
|
+
data: z("data", []),
|
|
513
|
+
defaultActiveFirstOption: z("defaultActiveFirstOption", !1),
|
|
514
|
+
defaultOpen: z("defaultOpen", !1),
|
|
515
|
+
disabled: z("disabled", !1),
|
|
516
|
+
dropdownMatchSelectWidth: z("dropdownMatchSelectWidth", !0),
|
|
517
|
+
emptyContent: z("emptyContent", null),
|
|
518
|
+
loading: z("loading", !1),
|
|
519
|
+
maxHeight: z("maxHeight", 300),
|
|
520
|
+
motion: z("motion", !0),
|
|
521
|
+
onSelectWithObject: z("onSelectWithObject", !1),
|
|
522
|
+
position: z("position", "bottomLeft"),
|
|
523
|
+
showClear: z("showClear", !1),
|
|
524
|
+
size: z("size", "default"),
|
|
525
|
+
stopPropagation: z("stopPropagation", !0),
|
|
526
|
+
validateStatus: z("validateStatus", "default"),
|
|
527
|
+
zIndex: z("zIndex", 1030),
|
|
528
|
+
style: r.style
|
|
529
|
+
})), V = d(() => {
|
|
530
|
+
let e = g?.vnode.props;
|
|
531
|
+
return !!(e && (Object.prototype.hasOwnProperty.call(e, "value") || Object.prototype.hasOwnProperty.call(e, "modelValue") || Object.prototype.hasOwnProperty.call(e, "model-value")));
|
|
532
|
+
}), { foundation: H, state: U } = ce({
|
|
533
|
+
controlled: V,
|
|
534
|
+
emit: i,
|
|
535
|
+
listElement: C,
|
|
536
|
+
runtimeProps: B,
|
|
537
|
+
triggerElement: y
|
|
538
|
+
}), W = d(() => V.value ? B.value.modelValue ?? B.value.value ?? "" : U.inputValue), G = d(() => U.options.filter((e) => e.show !== !1)), K = d(() => B.value.getPopupContainer ?? L.value.getPopupContainer), q = d(() => U.focusIndex >= 0 ? `${I}-option-${U.focusIndex}` : void 0), J = d(() => B.value.showClear && !B.value.disabled && String(W.value).length > 0 && (E.value || j.value)), me = d(() => [
|
|
539
|
+
a.class,
|
|
540
|
+
o.trigger ? void 0 : "semi-autocomplete",
|
|
541
|
+
!o.trigger && B.value.disabled ? "semi-autocomplete-disabled" : void 0
|
|
542
|
+
]), he = d(() => [
|
|
543
|
+
"semi-input-wrapper",
|
|
544
|
+
`semi-input-wrapper-${B.value.size}`,
|
|
545
|
+
E.value ? "semi-input-wrapper-focus" : void 0,
|
|
546
|
+
B.value.disabled ? "semi-input-wrapper-disabled" : void 0,
|
|
547
|
+
B.value.validateStatus === "warning" ? "semi-input-wrapper-warning" : void 0,
|
|
548
|
+
B.value.validateStatus === "error" ? "semi-input-wrapper-error" : void 0,
|
|
549
|
+
B.value.showClear ? "semi-input-wrapper-clearable" : void 0,
|
|
550
|
+
o.prefix || B.value.prefix || o.insetLabel || B.value.insetLabel ? "semi-input-wrapper__with-prefix" : void 0,
|
|
551
|
+
o.suffix || B.value.suffix ? "semi-input-wrapper__with-suffix" : void 0
|
|
552
|
+
]), ge = d(() => [
|
|
553
|
+
"semi-input",
|
|
554
|
+
`semi-input-${B.value.size}`,
|
|
555
|
+
B.value.disabled ? "semi-input-disabled" : void 0,
|
|
556
|
+
J.value ? "semi-input-sibling-clearbtn" : void 0
|
|
557
|
+
]), _e = d(() => ({
|
|
558
|
+
maxHeight: typeof B.value.maxHeight == "number" ? `${B.value.maxHeight}px` : B.value.maxHeight,
|
|
559
|
+
minWidth: typeof U.dropdownMinWidth == "number" ? `${U.dropdownMinWidth}px` : U.dropdownMinWidth,
|
|
560
|
+
...B.value.dropdownStyle && typeof B.value.dropdownStyle == "object" && !Array.isArray(B.value.dropdownStyle) ? B.value.dropdownStyle : {}
|
|
561
|
+
})), ve = d(() => Object.fromEntries(Object.entries(a).filter(([e]) => e.startsWith("data-"))));
|
|
562
|
+
function ye(e) {
|
|
563
|
+
P.value || H.handleSearch(e.target.value);
|
|
564
|
+
}
|
|
565
|
+
function be(e) {
|
|
566
|
+
P.value = !1, H.handleSearch(e.target.value);
|
|
567
|
+
}
|
|
568
|
+
function Y(e) {
|
|
569
|
+
E.value = !0, H.handleFocus(e);
|
|
570
|
+
}
|
|
571
|
+
function xe(e) {
|
|
572
|
+
E.value = !1, H.handleBlur(e);
|
|
573
|
+
}
|
|
574
|
+
function Se(e) {
|
|
575
|
+
U.keyboardEventSet.onKeyDown?.(e);
|
|
576
|
+
}
|
|
577
|
+
function Ce(e) {
|
|
578
|
+
e.target?.closest(".semi-input-clearbtn") || H.handleInputClick(e);
|
|
579
|
+
}
|
|
580
|
+
function X(e) {
|
|
581
|
+
e.preventDefault(), e.stopPropagation(), H.handleSearch(""), H.handleClear(), S.value?.focus();
|
|
582
|
+
}
|
|
583
|
+
function Z(e, t) {
|
|
584
|
+
H.handleSelect(e, t);
|
|
585
|
+
}
|
|
586
|
+
function we(e) {
|
|
587
|
+
return B.value.data.find((t) => typeof t == "string" || typeof t == "number" ? t === e.value : t.value === e.value) ?? e;
|
|
588
|
+
}
|
|
589
|
+
function Q(e) {
|
|
590
|
+
return e._renderedLabel ?? e.label ?? e.value;
|
|
591
|
+
}
|
|
592
|
+
function Te() {
|
|
593
|
+
H.openDropdown();
|
|
594
|
+
}
|
|
595
|
+
function Ee() {
|
|
596
|
+
H.closeDropdown();
|
|
597
|
+
}
|
|
598
|
+
function De() {
|
|
599
|
+
S.value?.focus();
|
|
600
|
+
}
|
|
601
|
+
function $(e) {
|
|
602
|
+
H.handleSearch(e);
|
|
603
|
+
}
|
|
604
|
+
return t({
|
|
605
|
+
close: Ee,
|
|
606
|
+
focus: De,
|
|
607
|
+
open: Te,
|
|
608
|
+
search: $
|
|
609
|
+
}), (e, t) => (w(), f(s, v({
|
|
610
|
+
"prefix-cls": "semi-popover",
|
|
611
|
+
role: "presentation",
|
|
612
|
+
trigger: "custom",
|
|
613
|
+
visible: O(U).visible,
|
|
614
|
+
position: B.value.position,
|
|
615
|
+
"show-arrow": !1,
|
|
616
|
+
spacing: 4,
|
|
617
|
+
"z-index": B.value.zIndex,
|
|
618
|
+
motion: B.value.motion,
|
|
619
|
+
"auto-adjust-overflow": B.value.autoAdjustOverflow,
|
|
620
|
+
"mouse-enter-delay": B.value.mouseEnterDelay ?? 0,
|
|
621
|
+
"mouse-leave-delay": B.value.mouseLeaveDelay ?? 0,
|
|
622
|
+
"stop-propagation": !!B.value.stopPropagation,
|
|
623
|
+
"re-pos-key": O(U).rePosKey
|
|
624
|
+
}, K.value ? { getPopupContainer: K.value } : {}, { "onUpdate:visible": t[5] ||= (e) => {
|
|
625
|
+
!e && O(U).visible && O(H).closeDropdown();
|
|
626
|
+
} }), {
|
|
627
|
+
content: M(() => [h("div", {
|
|
628
|
+
id: I,
|
|
629
|
+
ref_key: "listElement",
|
|
630
|
+
ref: C,
|
|
631
|
+
class: b(["semi-autocomplete-option-list", B.value.dropdownClassName]),
|
|
632
|
+
style: x(_e.value),
|
|
633
|
+
role: "listbox"
|
|
634
|
+
}, [B.value.loading ? (w(), m("div", le, [...t[6] ||= [h("span", { class: "semi-spin semi-spin-middle" }, [h("span", { class: "semi-spin-wrapper" }, [h("span", { class: "semi-spin-spinIcon" })])], -1)]])) : G.value.length ? (w(!0), m(u, { key: 1 }, re(G.value, (t, n) => (w(), f(R, {
|
|
635
|
+
id: `${I}-option-${n}`,
|
|
636
|
+
key: t._key ?? `${String(t.label)}-${String(t.value)}-${n}`,
|
|
637
|
+
class: b(t.class),
|
|
638
|
+
"class-name": t.className,
|
|
639
|
+
disabled: t.disabled,
|
|
640
|
+
focused: n === O(U).focusIndex,
|
|
641
|
+
selected: !1,
|
|
642
|
+
style: x(t.style),
|
|
643
|
+
value: t.value,
|
|
644
|
+
onSelect: (e) => Z(t, n),
|
|
645
|
+
onMouseenter: (e) => O(H).handleOptionMouseEnter(n)
|
|
646
|
+
}, {
|
|
647
|
+
default: M(() => [e.$slots.option ? T(e.$slots, "option", {
|
|
648
|
+
focused: n === O(U).focusIndex,
|
|
649
|
+
inputValue: W.value,
|
|
650
|
+
item: we(t),
|
|
651
|
+
onClick: () => Z(t, n),
|
|
652
|
+
onMouseenter: () => O(H).handleOptionMouseEnter(n),
|
|
653
|
+
option: t
|
|
654
|
+
}, void 0, void 0, 0) : typeof Q(t) == "string" ? (w(), m("div", ue, ie(Q(t)), 1)) : (w(), f(O(F), {
|
|
655
|
+
key: 2,
|
|
656
|
+
content: Q(t)
|
|
657
|
+
}, null, 8, ["content"]))]),
|
|
658
|
+
_: 2
|
|
659
|
+
}, 1032, [
|
|
660
|
+
"id",
|
|
661
|
+
"class",
|
|
662
|
+
"class-name",
|
|
663
|
+
"disabled",
|
|
664
|
+
"focused",
|
|
665
|
+
"style",
|
|
666
|
+
"value",
|
|
667
|
+
"onSelect",
|
|
668
|
+
"onMouseenter"
|
|
669
|
+
]))), 128)) : e.$slots.emptyContent ? T(e.$slots, "emptyContent", {}, void 0, void 0, 2) : B.value.emptyContent === null ? p("", !0) : (w(), f(O(F), {
|
|
670
|
+
key: 3,
|
|
671
|
+
content: B.value.emptyContent
|
|
672
|
+
}, null, 8, ["content"]))], 6)]),
|
|
673
|
+
default: M(() => [h("div", v({
|
|
674
|
+
id: B.value.id,
|
|
675
|
+
ref_key: "triggerElement",
|
|
676
|
+
ref: y
|
|
677
|
+
}, ve.value, {
|
|
678
|
+
role: "combobox",
|
|
679
|
+
"aria-haspopup": "listbox",
|
|
680
|
+
"aria-controls": I,
|
|
681
|
+
"aria-expanded": O(U).visible ? "true" : "false",
|
|
682
|
+
"aria-disabled": B.value.disabled ? "true" : "false",
|
|
683
|
+
"aria-activedescendant": q.value,
|
|
684
|
+
class: me.value,
|
|
685
|
+
style: B.value.style,
|
|
686
|
+
tabindex: "-1",
|
|
687
|
+
onClick: Ce,
|
|
688
|
+
onMouseenter: t[3] ||= (e) => j.value = !0,
|
|
689
|
+
onMouseleave: t[4] ||= (e) => j.value = !1,
|
|
690
|
+
onKeydown: Se
|
|
691
|
+
}), [e.$slots.trigger ? T(e.$slots, "trigger", {
|
|
692
|
+
componentProps: B.value,
|
|
693
|
+
inputValue: W.value,
|
|
694
|
+
onClear: X,
|
|
695
|
+
onSearch: $,
|
|
696
|
+
value: Array.from(O(U).selection.values())
|
|
697
|
+
}, void 0, void 0, 0) : (w(), m("div", {
|
|
698
|
+
key: 1,
|
|
699
|
+
class: b(he.value)
|
|
700
|
+
}, [
|
|
701
|
+
e.$slots.prefix || B.value.prefix || e.$slots.insetLabel || B.value.insetLabel ? (w(), m("div", {
|
|
702
|
+
key: 0,
|
|
703
|
+
id: B.value.insetLabelId,
|
|
704
|
+
class: b(["semi-input-prefix", e.$slots.insetLabel || B.value.insetLabel ? "semi-input-inset-label" : "semi-input-prefix-icon"]),
|
|
705
|
+
"x-semi-prop": "prefix,insetLabel",
|
|
706
|
+
onMousedown: t[0] ||= N(() => {}, ["prevent"])
|
|
707
|
+
}, [e.$slots.prefix ? T(e.$slots, "prefix", {}, void 0, void 0, 0) : e.$slots.insetLabel ? T(e.$slots, "insetLabel", {}, void 0, void 0, 1) : (w(), f(O(F), {
|
|
708
|
+
key: 2,
|
|
709
|
+
content: B.value.prefix ?? B.value.insetLabel
|
|
710
|
+
}, null, 8, ["content"]))], 42, fe)) : p("", !0),
|
|
711
|
+
h("input", {
|
|
712
|
+
ref_key: "inputElement",
|
|
713
|
+
ref: S,
|
|
714
|
+
class: b(ge.value),
|
|
715
|
+
value: W.value,
|
|
716
|
+
disabled: B.value.disabled,
|
|
717
|
+
placeholder: B.value.placeholder,
|
|
718
|
+
autofocus: B.value.autoFocus,
|
|
719
|
+
"aria-label": B.value.ariaLabel,
|
|
720
|
+
"aria-labelledby": B.value.ariaLabelledby,
|
|
721
|
+
"aria-invalid": B.value.validateStatus === "error" ? "true" : B.value.ariaInvalid,
|
|
722
|
+
"aria-errormessage": B.value.ariaErrormessage,
|
|
723
|
+
"aria-describedby": B.value.ariaDescribedby,
|
|
724
|
+
"aria-required": B.value.ariaRequired,
|
|
725
|
+
"aria-controls": I,
|
|
726
|
+
"aria-expanded": O(U).visible ? "true" : "false",
|
|
727
|
+
"aria-activedescendant": q.value,
|
|
728
|
+
autocomplete: "off",
|
|
729
|
+
onInput: ye,
|
|
730
|
+
onFocus: Y,
|
|
731
|
+
onBlur: xe,
|
|
732
|
+
onCompositionstart: t[1] ||= (e) => P.value = !0,
|
|
733
|
+
onCompositionend: be
|
|
734
|
+
}, null, 42, pe),
|
|
735
|
+
J.value ? (w(), m("div", {
|
|
736
|
+
key: 1,
|
|
737
|
+
class: "semi-input-clearbtn",
|
|
738
|
+
onMousedown: X
|
|
739
|
+
}, [T(e.$slots, "clearIcon", {}, () => [B.value.clearIcon ? (w(), f(O(F), {
|
|
740
|
+
key: 0,
|
|
741
|
+
content: B.value.clearIcon
|
|
742
|
+
}, null, 8, ["content"])) : (w(), f(O(se), { key: 1 }))])], 32)) : p("", !0),
|
|
743
|
+
e.$slots.suffix || B.value.suffix ? (w(), m("div", {
|
|
744
|
+
key: 2,
|
|
745
|
+
class: "semi-input-suffix semi-input-suffix-icon",
|
|
746
|
+
"x-semi-prop": "suffix",
|
|
747
|
+
onMousedown: t[2] ||= N(() => {}, ["prevent"])
|
|
748
|
+
}, [T(e.$slots, "suffix", {}, () => [ee(O(F), { content: B.value.suffix }, null, 8, ["content"])])], 32)) : p("", !0)
|
|
749
|
+
], 2))], 16, de)]),
|
|
750
|
+
_: 3
|
|
751
|
+
}, 16, [
|
|
752
|
+
"visible",
|
|
753
|
+
"position",
|
|
754
|
+
"z-index",
|
|
755
|
+
"motion",
|
|
756
|
+
"auto-adjust-overflow",
|
|
757
|
+
"mouse-enter-delay",
|
|
758
|
+
"mouse-leave-delay",
|
|
759
|
+
"stop-propagation",
|
|
760
|
+
"re-pos-key"
|
|
761
|
+
]));
|
|
762
|
+
}
|
|
763
|
+
}), { Option: R });
|
|
764
|
+
//#endregion
|
|
765
|
+
export { R as n, B as t };
|