@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,975 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { N as e, r as t, t as n } from "./foundation-Cawx37mp.js";
|
|
3
|
+
import { r } from "./keyCode-DMNg63wX.js";
|
|
4
|
+
import { t as i } from "./isPromise-D2v3Ejff.js";
|
|
5
|
+
import { t as a } from "./isElement-Cx0AsIov.js";
|
|
6
|
+
import { l as o } from "./typography-DF8KwKuL.js";
|
|
7
|
+
import { t as s } from "./config-context-CyynTtDb.js";
|
|
8
|
+
import { n as c, o as l } from "./config-provider-VMfNNSF1.js";
|
|
9
|
+
import { t as u } from "./Button-RCaDTqHh.js";
|
|
10
|
+
import { Teleport as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, getCurrentInstance as b, h as ee, inject as x, markRaw as S, mergeProps as C, nextTick as te, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as E, onMounted as D, openBlock as O, shallowReactive as k, shallowRef as A, toDisplayString as j, unref as M, useAttrs as N, useId as P, useSlots as F, useTemplateRef as I, watch as L, withCtx as R } from "vue";
|
|
11
|
+
import { IconClose as z } from "@aifuxi/semi-icons-vue";
|
|
12
|
+
//#region bundled-foundation
|
|
13
|
+
var ne = class extends n {
|
|
14
|
+
constructor(e) {
|
|
15
|
+
super({ ...e }), this._debouncedOk = (0, t.default)((e) => {
|
|
16
|
+
this._invokeOk(e);
|
|
17
|
+
}, 100, {
|
|
18
|
+
leading: !0,
|
|
19
|
+
trailing: !1
|
|
20
|
+
}), this._debouncedCancel = (0, t.default)((e) => {
|
|
21
|
+
this._invokeCancel(e);
|
|
22
|
+
}, 100, {
|
|
23
|
+
leading: !0,
|
|
24
|
+
trailing: !1
|
|
25
|
+
}), this._lastCancelTarget = null, this._lastOkTarget = null, this.toggleDisplayNone = (e, t) => {
|
|
26
|
+
this._adapter.toggleDisplayNone(e, t);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
destroy() {
|
|
30
|
+
this._debouncedOk.cancel(), this._debouncedCancel.cancel(), this.afterHide();
|
|
31
|
+
}
|
|
32
|
+
handleCancel(e) {
|
|
33
|
+
let t = e?.currentTarget ?? e?.target ?? null;
|
|
34
|
+
t !== this._lastCancelTarget && this._debouncedCancel.cancel(), this._lastCancelTarget = t, this._debouncedCancel(e);
|
|
35
|
+
}
|
|
36
|
+
handleOk(e) {
|
|
37
|
+
let t = e?.currentTarget ?? e?.target ?? null;
|
|
38
|
+
t !== this._lastOkTarget && this._debouncedOk.cancel(), this._lastOkTarget = t, this._debouncedOk(e);
|
|
39
|
+
}
|
|
40
|
+
_invokeCancel(e) {
|
|
41
|
+
let t = this._adapter.notifyCancel(e);
|
|
42
|
+
i(t) && (this._adapter.setState({ onCancelReturnPromiseStatus: "pending" }), t?.then(() => {
|
|
43
|
+
this._adapter.setState({ onCancelReturnPromiseStatus: "fulfilled" });
|
|
44
|
+
})?.catch((e) => {
|
|
45
|
+
throw this._adapter.setState({ onCancelReturnPromiseStatus: "rejected" }), e;
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
_invokeOk(e) {
|
|
49
|
+
let t = this._adapter.notifyOk(e);
|
|
50
|
+
i(t) && (this._adapter.setState({ onOKReturnPromiseStatus: "pending" }), t?.then(() => {
|
|
51
|
+
this._adapter.setState({ onOKReturnPromiseStatus: "fulfilled" });
|
|
52
|
+
})?.catch((e) => {
|
|
53
|
+
throw this._adapter.setState({ onOKReturnPromiseStatus: "rejected" }), e;
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
beforeShow() {
|
|
57
|
+
this._adapter.disabledBodyScroll();
|
|
58
|
+
}
|
|
59
|
+
afterHide() {
|
|
60
|
+
this._adapter.enabledBodyScroll(), this._adapter.notifyClose();
|
|
61
|
+
}
|
|
62
|
+
enabledBodyScroll() {
|
|
63
|
+
this._adapter.enabledBodyScroll();
|
|
64
|
+
}
|
|
65
|
+
}, B = class e extends n {
|
|
66
|
+
constructor(t) {
|
|
67
|
+
super({
|
|
68
|
+
...e.defaultAdapter,
|
|
69
|
+
...t
|
|
70
|
+
}), this.handleKeyDown = (e) => {
|
|
71
|
+
let { closeOnEsc: t } = this.getProps();
|
|
72
|
+
if (t && e.keyCode === r.ESC) {
|
|
73
|
+
e.stopPropagation(), this.close(e);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
destroy() {
|
|
79
|
+
this.handleKeyDownEventListenerUnmount(), this.modalDialogBlur(), this.prevFocusElementReFocus();
|
|
80
|
+
}
|
|
81
|
+
handleDialogMouseDown() {
|
|
82
|
+
this._adapter.notifyDialogMouseDown();
|
|
83
|
+
}
|
|
84
|
+
handleMaskMouseUp() {
|
|
85
|
+
this._adapter.notifyDialogMouseUp();
|
|
86
|
+
}
|
|
87
|
+
handleKeyDownEventListenerMount() {
|
|
88
|
+
this._adapter.addKeyDownEventListener();
|
|
89
|
+
}
|
|
90
|
+
handleKeyDownEventListenerUnmount() {
|
|
91
|
+
this._adapter.removeKeyDownEventListener();
|
|
92
|
+
}
|
|
93
|
+
getMouseState() {
|
|
94
|
+
this._adapter.getMouseState();
|
|
95
|
+
}
|
|
96
|
+
handleMaskClick(e) {
|
|
97
|
+
let { dialogMouseDown: t } = this.getStates();
|
|
98
|
+
e.target === e.currentTarget && !t && this.close(e);
|
|
99
|
+
}
|
|
100
|
+
close(e) {
|
|
101
|
+
this._adapter.notifyClose(e);
|
|
102
|
+
}
|
|
103
|
+
modalDialogFocus() {
|
|
104
|
+
this._adapter.modalDialogFocus();
|
|
105
|
+
}
|
|
106
|
+
modalDialogBlur() {
|
|
107
|
+
this._adapter.modalDialogBlur();
|
|
108
|
+
}
|
|
109
|
+
prevFocusElementReFocus() {
|
|
110
|
+
this._adapter.prevFocusElementReFocus();
|
|
111
|
+
}
|
|
112
|
+
}, V = class t {
|
|
113
|
+
constructor(n, r) {
|
|
114
|
+
this.addFocusRedirectListener = (e) => (this.focusRedirectListenerList.push(e), () => this.removeFocusRedirectListener(e)), this.removeFocusRedirectListener = (t) => {
|
|
115
|
+
this.focusRedirectListenerList = (0, e.default)(this.focusRedirectListenerList, t);
|
|
116
|
+
}, this.destroy = () => {
|
|
117
|
+
this.container?.removeEventListener("keydown", this.onKeyPress);
|
|
118
|
+
}, this.shouldFocusRedirect = (e) => {
|
|
119
|
+
if (!this.enable) return !1;
|
|
120
|
+
for (let t of this.focusRedirectListenerList) if (!t(e)) return !1;
|
|
121
|
+
return !0;
|
|
122
|
+
}, this.focusElement = (e, t) => {
|
|
123
|
+
let { preventScroll: n } = this.options;
|
|
124
|
+
e?.focus({ preventScroll: n }), t.preventDefault();
|
|
125
|
+
}, this.onKeyPress = (e) => {
|
|
126
|
+
if (e && e.key === "Tab") {
|
|
127
|
+
let n = t.getFocusableElements(this.container);
|
|
128
|
+
n.length && (e.shiftKey ? this.handleContainerShiftTabKeyDown(n, e) : this.handleContainerTabKeyDown(n, e));
|
|
129
|
+
}
|
|
130
|
+
}, this.handleContainerTabKeyDown = (e, n) => {
|
|
131
|
+
let r = t.getActiveElement(), i = e[e.length - 1] === r, a = e[0];
|
|
132
|
+
i && this.shouldFocusRedirect(a) && this.focusElement(a, n);
|
|
133
|
+
}, this.handleContainerShiftTabKeyDown = (e, n) => {
|
|
134
|
+
let r = t.getActiveElement(), i = e[0] === r, a = e[e.length - 1];
|
|
135
|
+
i && this.shouldFocusRedirect(a) && this.focusElement(a, n);
|
|
136
|
+
}, Object.freeze(r), this.container = n, this.options = r, this.enable = r?.enable ?? !0, this.focusRedirectListenerList = r?.onFocusRedirectListener ? Array.isArray(r.onFocusRedirectListener) ? [...r.onFocusRedirectListener] : [r.onFocusRedirectListener] : [], this.container.addEventListener("keydown", this.onKeyPress);
|
|
137
|
+
}
|
|
138
|
+
get enable() {
|
|
139
|
+
return this._enable;
|
|
140
|
+
}
|
|
141
|
+
set enable(e) {
|
|
142
|
+
this._enable = e;
|
|
143
|
+
}
|
|
144
|
+
static getFocusableElements(e) {
|
|
145
|
+
if (!a(e)) return [];
|
|
146
|
+
let t = [
|
|
147
|
+
"input:not([disabled]):not([tabindex='-1'])",
|
|
148
|
+
"textarea:not([disabled]):not([tabindex='-1'])",
|
|
149
|
+
"button:not([disabled]):not([tabindex='-1'])",
|
|
150
|
+
"a[href]:not([tabindex='-1'])",
|
|
151
|
+
"select:not([disabled]):not([tabindex='-1'])",
|
|
152
|
+
"area[href]:not([tabindex='-1'])",
|
|
153
|
+
"iframe:not([tabindex='-1'])",
|
|
154
|
+
"object:not([tabindex='-1'])",
|
|
155
|
+
"*[tabindex]:not([tabindex='-1'])",
|
|
156
|
+
"*[contenteditable]:not([tabindex='-1'])"
|
|
157
|
+
].join(",");
|
|
158
|
+
return Array.from(e.querySelectorAll(t));
|
|
159
|
+
}
|
|
160
|
+
static getActiveElement() {
|
|
161
|
+
return document ? document.activeElement : null;
|
|
162
|
+
}
|
|
163
|
+
}, re = /* @__PURE__ */ y({
|
|
164
|
+
__name: "ModalDefaultFooter",
|
|
165
|
+
props: {
|
|
166
|
+
cancelButtonProps: {},
|
|
167
|
+
cancelLoading: { type: Boolean },
|
|
168
|
+
cancelText: {},
|
|
169
|
+
footerFill: { type: Boolean },
|
|
170
|
+
hasCancel: { type: Boolean },
|
|
171
|
+
locale: {},
|
|
172
|
+
okButtonProps: {},
|
|
173
|
+
okLoading: { type: Boolean },
|
|
174
|
+
okText: {},
|
|
175
|
+
okType: {}
|
|
176
|
+
},
|
|
177
|
+
emits: ["cancel", "ok"],
|
|
178
|
+
setup(e, { emit: t }) {
|
|
179
|
+
let n = e, r = t, i = f(() => ({
|
|
180
|
+
"aria-label": "cancel",
|
|
181
|
+
type: "tertiary",
|
|
182
|
+
block: n.footerFill,
|
|
183
|
+
autofocus: !0,
|
|
184
|
+
...n.cancelButtonProps,
|
|
185
|
+
style: [n.footerFill ? { marginLeft: "unset" } : void 0, n.cancelButtonProps?.style]
|
|
186
|
+
})), a = f(() => ({
|
|
187
|
+
"aria-label": "confirm",
|
|
188
|
+
type: n.okType,
|
|
189
|
+
theme: "solid",
|
|
190
|
+
block: n.footerFill,
|
|
191
|
+
...n.okButtonProps
|
|
192
|
+
}));
|
|
193
|
+
return (e, t) => (O(), h("div", { class: w({ "semi-modal-footerfill": n.footerFill }) }, [n.hasCancel ? (O(), p(M(u), C({ key: 0 }, i.value, {
|
|
194
|
+
loading: n.cancelLoading,
|
|
195
|
+
"x-semi-children-alias": "cancelText",
|
|
196
|
+
onClick: t[0] ||= (e) => r("cancel", e)
|
|
197
|
+
}), {
|
|
198
|
+
default: R(() => [_(j(n.cancelText || n.locale.cancel), 1)]),
|
|
199
|
+
_: 1
|
|
200
|
+
}, 16, ["loading"])) : m("", !0), v(M(u), C(a.value, {
|
|
201
|
+
loading: n.okLoading,
|
|
202
|
+
"x-semi-children-alias": "okText",
|
|
203
|
+
onClick: t[1] ||= (e) => r("ok", e)
|
|
204
|
+
}), {
|
|
205
|
+
default: R(() => [_(j(n.okText || n.locale.confirm), 1)]),
|
|
206
|
+
_: 1
|
|
207
|
+
}, 16, ["loading"])], 2));
|
|
208
|
+
}
|
|
209
|
+
}), H = y({
|
|
210
|
+
name: "ModalNodeRenderer",
|
|
211
|
+
props: { content: {
|
|
212
|
+
type: [
|
|
213
|
+
String,
|
|
214
|
+
Number,
|
|
215
|
+
Boolean,
|
|
216
|
+
Array,
|
|
217
|
+
Object
|
|
218
|
+
],
|
|
219
|
+
default: void 0
|
|
220
|
+
} },
|
|
221
|
+
setup(e) {
|
|
222
|
+
return () => e.content;
|
|
223
|
+
}
|
|
224
|
+
}), U = ["id"], W = {
|
|
225
|
+
key: 1,
|
|
226
|
+
class: "semi-modal-header"
|
|
227
|
+
}, G = {
|
|
228
|
+
key: 0,
|
|
229
|
+
class: "semi-modal-icon-wrapper",
|
|
230
|
+
"x-semi-prop": "icon"
|
|
231
|
+
}, K = {
|
|
232
|
+
key: 3,
|
|
233
|
+
class: "semi-modal-body-wrapper"
|
|
234
|
+
}, q = {
|
|
235
|
+
key: 0,
|
|
236
|
+
class: "semi-modal-icon-wrapper",
|
|
237
|
+
"x-semi-prop": "icon"
|
|
238
|
+
}, J = {
|
|
239
|
+
key: 4,
|
|
240
|
+
class: "semi-modal-footer",
|
|
241
|
+
"x-semi-prop": "footer"
|
|
242
|
+
}, Y = /* @__PURE__ */ y({
|
|
243
|
+
__name: "ModalInnerContent",
|
|
244
|
+
props: {
|
|
245
|
+
body: { type: [
|
|
246
|
+
Object,
|
|
247
|
+
String,
|
|
248
|
+
Number,
|
|
249
|
+
Boolean,
|
|
250
|
+
null,
|
|
251
|
+
Array
|
|
252
|
+
] },
|
|
253
|
+
bodyStyle: { type: [
|
|
254
|
+
Boolean,
|
|
255
|
+
null,
|
|
256
|
+
String,
|
|
257
|
+
Object,
|
|
258
|
+
Array
|
|
259
|
+
] },
|
|
260
|
+
centered: { type: Boolean },
|
|
261
|
+
closable: { type: Boolean },
|
|
262
|
+
closeIcon: { type: [
|
|
263
|
+
Object,
|
|
264
|
+
String,
|
|
265
|
+
Number,
|
|
266
|
+
Boolean,
|
|
267
|
+
null,
|
|
268
|
+
Array
|
|
269
|
+
] },
|
|
270
|
+
contentClass: { type: [
|
|
271
|
+
Boolean,
|
|
272
|
+
null,
|
|
273
|
+
String,
|
|
274
|
+
Object,
|
|
275
|
+
Array
|
|
276
|
+
] },
|
|
277
|
+
dialogId: {},
|
|
278
|
+
footer: { type: [
|
|
279
|
+
Object,
|
|
280
|
+
String,
|
|
281
|
+
Number,
|
|
282
|
+
Boolean,
|
|
283
|
+
null,
|
|
284
|
+
Array
|
|
285
|
+
] },
|
|
286
|
+
fullScreen: { type: Boolean },
|
|
287
|
+
header: { type: [
|
|
288
|
+
Object,
|
|
289
|
+
String,
|
|
290
|
+
Number,
|
|
291
|
+
Boolean,
|
|
292
|
+
null,
|
|
293
|
+
Array
|
|
294
|
+
] },
|
|
295
|
+
headerProvided: { type: Boolean },
|
|
296
|
+
height: {},
|
|
297
|
+
icon: { type: [
|
|
298
|
+
Object,
|
|
299
|
+
String,
|
|
300
|
+
Number,
|
|
301
|
+
Boolean,
|
|
302
|
+
null,
|
|
303
|
+
Array
|
|
304
|
+
] },
|
|
305
|
+
outerStyle: { type: [
|
|
306
|
+
Boolean,
|
|
307
|
+
null,
|
|
308
|
+
String,
|
|
309
|
+
Object,
|
|
310
|
+
Array
|
|
311
|
+
] },
|
|
312
|
+
outerClass: { type: [
|
|
313
|
+
Boolean,
|
|
314
|
+
null,
|
|
315
|
+
String,
|
|
316
|
+
Object,
|
|
317
|
+
Array
|
|
318
|
+
] },
|
|
319
|
+
size: {},
|
|
320
|
+
title: { type: [
|
|
321
|
+
Object,
|
|
322
|
+
String,
|
|
323
|
+
Number,
|
|
324
|
+
Boolean,
|
|
325
|
+
null,
|
|
326
|
+
Array
|
|
327
|
+
] },
|
|
328
|
+
width: {}
|
|
329
|
+
},
|
|
330
|
+
emits: [
|
|
331
|
+
"animationEnd",
|
|
332
|
+
"close",
|
|
333
|
+
"mousedown"
|
|
334
|
+
],
|
|
335
|
+
setup(e, { expose: t, emit: n }) {
|
|
336
|
+
let r = e, i = n, a = I("dialog"), s = f(() => r.title !== null && r.title !== void 0), c = f(() => r.headerProvided || s.value), l = f(() => [
|
|
337
|
+
r.outerStyle,
|
|
338
|
+
r.width === void 0 ? void 0 : { width: r.width },
|
|
339
|
+
r.height === void 0 ? void 0 : { height: r.height },
|
|
340
|
+
r.fullScreen ? {
|
|
341
|
+
width: "100%",
|
|
342
|
+
height: "100%",
|
|
343
|
+
margin: "unset"
|
|
344
|
+
} : void 0
|
|
345
|
+
]), d = f(() => [
|
|
346
|
+
"semi-modal-content",
|
|
347
|
+
r.contentClass,
|
|
348
|
+
{
|
|
349
|
+
"semi-modal-content-fullScreen": r.fullScreen,
|
|
350
|
+
"semi-modal-content-height-set": r.height !== void 0
|
|
351
|
+
}
|
|
352
|
+
]), _ = f(() => ["semi-modal-body", { "semi-modal-withIcon": r.icon !== null && r.icon !== void 0 }]);
|
|
353
|
+
return t({ element: a }), (e, t) => (O(), h("div", {
|
|
354
|
+
id: r.dialogId,
|
|
355
|
+
class: w(["semi-modal", [
|
|
356
|
+
r.outerClass,
|
|
357
|
+
`semi-modal-${r.size}`,
|
|
358
|
+
{ "semi-modal-centered": r.centered }
|
|
359
|
+
]]),
|
|
360
|
+
style: T(l.value),
|
|
361
|
+
onMousedown: t[3] ||= (e) => i("mousedown", e)
|
|
362
|
+
}, [g("div", {
|
|
363
|
+
ref: "dialog",
|
|
364
|
+
role: "dialog",
|
|
365
|
+
"aria-modal": "true",
|
|
366
|
+
"aria-labelledby": "semi-modal-title",
|
|
367
|
+
"aria-describedby": "semi-modal-body",
|
|
368
|
+
class: w(d.value),
|
|
369
|
+
onAnimationend: t[2] ||= (e) => i("animationEnd", e)
|
|
370
|
+
}, [
|
|
371
|
+
r.headerProvided ? (O(), p(M(H), {
|
|
372
|
+
key: 0,
|
|
373
|
+
content: r.header
|
|
374
|
+
}, null, 8, ["content"])) : s.value ? (O(), h("div", W, [
|
|
375
|
+
r.icon !== null && r.icon !== void 0 ? (O(), h("span", G, [v(M(H), { content: r.icon }, null, 8, ["content"])])) : m("", !0),
|
|
376
|
+
v(M(o), {
|
|
377
|
+
id: "semi-modal-title",
|
|
378
|
+
heading: 5,
|
|
379
|
+
class: "semi-modal-title",
|
|
380
|
+
"x-semi-prop": "title"
|
|
381
|
+
}, {
|
|
382
|
+
default: R(() => [v(M(H), { content: r.title }, null, 8, ["content"])]),
|
|
383
|
+
_: 1
|
|
384
|
+
}),
|
|
385
|
+
r.closable ? (O(), p(M(u), {
|
|
386
|
+
key: 1,
|
|
387
|
+
"aria-label": "close",
|
|
388
|
+
class: "semi-modal-close",
|
|
389
|
+
type: "tertiary",
|
|
390
|
+
theme: "borderless",
|
|
391
|
+
size: "small",
|
|
392
|
+
onClick: t[0] ||= (e) => i("close", e)
|
|
393
|
+
}, {
|
|
394
|
+
icon: R(() => [r.closeIcon !== null && r.closeIcon !== void 0 ? (O(), p(M(H), {
|
|
395
|
+
key: 0,
|
|
396
|
+
content: r.closeIcon
|
|
397
|
+
}, null, 8, ["content"])) : (O(), p(M(z), {
|
|
398
|
+
key: 1,
|
|
399
|
+
"x-semi-prop": "closeIcon"
|
|
400
|
+
}))]),
|
|
401
|
+
_: 1
|
|
402
|
+
})) : m("", !0)
|
|
403
|
+
])) : m("", !0),
|
|
404
|
+
c.value ? (O(), h("div", {
|
|
405
|
+
key: 2,
|
|
406
|
+
id: "semi-modal-body",
|
|
407
|
+
class: w(_.value),
|
|
408
|
+
style: T(r.bodyStyle),
|
|
409
|
+
"x-semi-prop": "children"
|
|
410
|
+
}, [v(M(H), { content: r.body }, null, 8, ["content"])], 6)) : (O(), h("div", K, [
|
|
411
|
+
r.icon !== null && r.icon !== void 0 ? (O(), h("span", q, [v(M(H), { content: r.icon }, null, 8, ["content"])])) : m("", !0),
|
|
412
|
+
g("div", {
|
|
413
|
+
class: w(_.value),
|
|
414
|
+
style: T(r.bodyStyle),
|
|
415
|
+
"x-semi-prop": "children"
|
|
416
|
+
}, [v(M(H), { content: r.body }, null, 8, ["content"])], 6),
|
|
417
|
+
r.closable ? (O(), p(M(u), {
|
|
418
|
+
key: 1,
|
|
419
|
+
"aria-label": "close",
|
|
420
|
+
class: "semi-modal-close",
|
|
421
|
+
type: "tertiary",
|
|
422
|
+
theme: "borderless",
|
|
423
|
+
size: "small",
|
|
424
|
+
onClick: t[1] ||= (e) => i("close", e)
|
|
425
|
+
}, {
|
|
426
|
+
icon: R(() => [r.closeIcon !== null && r.closeIcon !== void 0 ? (O(), p(M(H), {
|
|
427
|
+
key: 0,
|
|
428
|
+
content: r.closeIcon
|
|
429
|
+
}, null, 8, ["content"])) : (O(), p(M(z), {
|
|
430
|
+
key: 1,
|
|
431
|
+
"x-semi-prop": "closeIcon"
|
|
432
|
+
}))]),
|
|
433
|
+
_: 1
|
|
434
|
+
})) : m("", !0)
|
|
435
|
+
])),
|
|
436
|
+
r.footer !== null && r.footer !== void 0 ? (O(), h("div", J, [v(M(H), { content: r.footer }, null, 8, ["content"])])) : m("", !0)
|
|
437
|
+
], 34)], 46, U));
|
|
438
|
+
}
|
|
439
|
+
}), ie = /* @__PURE__ */ y({
|
|
440
|
+
__name: "ModalDialog",
|
|
441
|
+
props: {
|
|
442
|
+
body: { type: [
|
|
443
|
+
Object,
|
|
444
|
+
String,
|
|
445
|
+
Number,
|
|
446
|
+
Boolean,
|
|
447
|
+
null,
|
|
448
|
+
Array
|
|
449
|
+
] },
|
|
450
|
+
bodyStyle: { type: [
|
|
451
|
+
Boolean,
|
|
452
|
+
null,
|
|
453
|
+
String,
|
|
454
|
+
Object,
|
|
455
|
+
Array
|
|
456
|
+
] },
|
|
457
|
+
centered: { type: Boolean },
|
|
458
|
+
class: { type: [
|
|
459
|
+
Boolean,
|
|
460
|
+
null,
|
|
461
|
+
String,
|
|
462
|
+
Object,
|
|
463
|
+
Array
|
|
464
|
+
] },
|
|
465
|
+
closable: { type: Boolean },
|
|
466
|
+
closeIcon: { type: [
|
|
467
|
+
Object,
|
|
468
|
+
String,
|
|
469
|
+
Number,
|
|
470
|
+
Boolean,
|
|
471
|
+
null,
|
|
472
|
+
Array
|
|
473
|
+
] },
|
|
474
|
+
closeOnEsc: { type: Boolean },
|
|
475
|
+
contentClass: { type: [
|
|
476
|
+
Boolean,
|
|
477
|
+
null,
|
|
478
|
+
String,
|
|
479
|
+
Object,
|
|
480
|
+
Array
|
|
481
|
+
] },
|
|
482
|
+
customContainer: { type: Boolean },
|
|
483
|
+
dataAttrs: {},
|
|
484
|
+
direction: {},
|
|
485
|
+
footer: { type: [
|
|
486
|
+
Object,
|
|
487
|
+
String,
|
|
488
|
+
Number,
|
|
489
|
+
Boolean,
|
|
490
|
+
null,
|
|
491
|
+
Array
|
|
492
|
+
] },
|
|
493
|
+
fullScreen: { type: Boolean },
|
|
494
|
+
header: { type: [
|
|
495
|
+
Object,
|
|
496
|
+
String,
|
|
497
|
+
Number,
|
|
498
|
+
Boolean,
|
|
499
|
+
null,
|
|
500
|
+
Array
|
|
501
|
+
] },
|
|
502
|
+
headerProvided: { type: Boolean },
|
|
503
|
+
height: {},
|
|
504
|
+
hidden: { type: Boolean },
|
|
505
|
+
icon: { type: [
|
|
506
|
+
Object,
|
|
507
|
+
String,
|
|
508
|
+
Number,
|
|
509
|
+
Boolean,
|
|
510
|
+
null,
|
|
511
|
+
Array
|
|
512
|
+
] },
|
|
513
|
+
mask: { type: Boolean },
|
|
514
|
+
maskClass: { type: [
|
|
515
|
+
Boolean,
|
|
516
|
+
null,
|
|
517
|
+
String,
|
|
518
|
+
Object,
|
|
519
|
+
Array
|
|
520
|
+
] },
|
|
521
|
+
maskClosable: { type: Boolean },
|
|
522
|
+
maskFixed: { type: Boolean },
|
|
523
|
+
maskStyle: { type: [
|
|
524
|
+
Boolean,
|
|
525
|
+
null,
|
|
526
|
+
String,
|
|
527
|
+
Object,
|
|
528
|
+
Array
|
|
529
|
+
] },
|
|
530
|
+
modalRender: { type: Function },
|
|
531
|
+
outerStyle: { type: [
|
|
532
|
+
Boolean,
|
|
533
|
+
null,
|
|
534
|
+
String,
|
|
535
|
+
Object,
|
|
536
|
+
Array
|
|
537
|
+
] },
|
|
538
|
+
preventScroll: { type: Boolean },
|
|
539
|
+
size: {},
|
|
540
|
+
title: { type: [
|
|
541
|
+
Object,
|
|
542
|
+
String,
|
|
543
|
+
Number,
|
|
544
|
+
Boolean,
|
|
545
|
+
null,
|
|
546
|
+
Array
|
|
547
|
+
] },
|
|
548
|
+
visible: { type: Boolean },
|
|
549
|
+
width: {}
|
|
550
|
+
},
|
|
551
|
+
emits: ["animationEnd", "close"],
|
|
552
|
+
setup(e, { expose: t, emit: n }) {
|
|
553
|
+
let r = e, i = n, a = P(), o = A(null), s = k({
|
|
554
|
+
dialogMouseDown: !1,
|
|
555
|
+
prevFocusElement: null
|
|
556
|
+
}), c = /* @__PURE__ */ new Map(), l, u, d = !1, p = f(() => ({ closeOnEsc: r.closeOnEsc })), _ = S(new B({
|
|
557
|
+
getContext: () => void 0,
|
|
558
|
+
getContexts: () => ({}),
|
|
559
|
+
getProp: (e) => p.value[e],
|
|
560
|
+
getProps: () => p.value,
|
|
561
|
+
getState: (e) => s[e],
|
|
562
|
+
getStates: () => s,
|
|
563
|
+
setState: (e, t) => {
|
|
564
|
+
Object.assign(s, e), t?.();
|
|
565
|
+
},
|
|
566
|
+
getCache: (e) => c.get(e),
|
|
567
|
+
getCaches: () => c,
|
|
568
|
+
setCache: (e, t) => c.set(e, t),
|
|
569
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
570
|
+
persistEvent: () => void 0,
|
|
571
|
+
notifyClose: (e) => i("close", e),
|
|
572
|
+
notifyDialogMouseDown: () => {
|
|
573
|
+
s.dialogMouseDown = !0;
|
|
574
|
+
},
|
|
575
|
+
notifyDialogMouseUp: () => {
|
|
576
|
+
s.dialogMouseDown && (clearTimeout(u), u = setTimeout(() => {
|
|
577
|
+
s.dialogMouseDown = !1;
|
|
578
|
+
}, 0));
|
|
579
|
+
},
|
|
580
|
+
addKeyDownEventListener: () => document.addEventListener("keydown", _.handleKeyDown),
|
|
581
|
+
removeKeyDownEventListener: () => document.removeEventListener("keydown", _.handleKeyDown),
|
|
582
|
+
getMouseState: () => s.dialogMouseDown,
|
|
583
|
+
modalDialogFocus: () => {
|
|
584
|
+
let e = o.value?.element;
|
|
585
|
+
if (!e) return;
|
|
586
|
+
let t = V.getActiveElement(), n = t instanceof Node && e.contains(t);
|
|
587
|
+
l?.destroy(), l = S(new V(e, { preventScroll: r.preventScroll })), n || e.focus({ preventScroll: r.preventScroll });
|
|
588
|
+
},
|
|
589
|
+
modalDialogBlur: () => {
|
|
590
|
+
o.value?.element?.blur(), l?.destroy(), l = void 0;
|
|
591
|
+
},
|
|
592
|
+
prevFocusElementReFocus: () => {
|
|
593
|
+
s.prevFocusElement?.focus?.({ preventScroll: r.preventScroll });
|
|
594
|
+
}
|
|
595
|
+
})), y = f(() => [r.class, {
|
|
596
|
+
"semi-modal-popup": r.customContainer && !r.maskFixed,
|
|
597
|
+
"semi-modal-fixed": r.maskFixed,
|
|
598
|
+
"semi-modal-rtl": r.direction === "rtl"
|
|
599
|
+
}]), b = f(() => ee(Y, {
|
|
600
|
+
ref: o,
|
|
601
|
+
body: r.body,
|
|
602
|
+
bodyStyle: r.bodyStyle,
|
|
603
|
+
centered: r.centered,
|
|
604
|
+
closable: r.closable,
|
|
605
|
+
closeIcon: r.closeIcon,
|
|
606
|
+
contentClass: r.contentClass,
|
|
607
|
+
dialogId: a,
|
|
608
|
+
footer: r.footer,
|
|
609
|
+
fullScreen: r.fullScreen,
|
|
610
|
+
header: r.header,
|
|
611
|
+
headerProvided: r.headerProvided,
|
|
612
|
+
height: r.height,
|
|
613
|
+
icon: r.icon,
|
|
614
|
+
outerStyle: r.outerStyle,
|
|
615
|
+
size: r.size,
|
|
616
|
+
title: r.title,
|
|
617
|
+
width: r.width,
|
|
618
|
+
onAnimationEnd: (e) => i("animationEnd", e),
|
|
619
|
+
onClose: (e) => _.close(e),
|
|
620
|
+
onMousedown: () => _.handleDialogMouseDown()
|
|
621
|
+
})), x = f(() => r.modalRender?.(b.value) ?? b.value);
|
|
622
|
+
async function j() {
|
|
623
|
+
if (d || typeof document > "u" || (d = !0, s.prevFocusElement = V.getActiveElement(), _.handleKeyDownEventListenerMount(), await te(), !d)) return;
|
|
624
|
+
_.modalDialogFocus();
|
|
625
|
+
let e = o.value?.element;
|
|
626
|
+
if (e && !e.contains(document.activeElement)) {
|
|
627
|
+
let t = e.querySelector("[autofocus]"), n = V.getFocusableElements(e);
|
|
628
|
+
(t ?? n[0])?.focus({ preventScroll: r.preventScroll });
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
function N() {
|
|
632
|
+
!d || typeof document > "u" || (d = !1, _.destroy());
|
|
633
|
+
}
|
|
634
|
+
function F(e) {
|
|
635
|
+
r.maskClosable && _.handleMaskClick(e);
|
|
636
|
+
}
|
|
637
|
+
function I() {
|
|
638
|
+
r.maskClosable && _.handleMaskMouseUp();
|
|
639
|
+
}
|
|
640
|
+
return D(() => {
|
|
641
|
+
r.visible && !r.hidden && j();
|
|
642
|
+
}), L(() => r.visible, (e) => {
|
|
643
|
+
e && !r.hidden && j();
|
|
644
|
+
}), L(() => r.hidden, (e) => {
|
|
645
|
+
e && N();
|
|
646
|
+
}), E(() => {
|
|
647
|
+
clearTimeout(u), N();
|
|
648
|
+
}), t({
|
|
649
|
+
activate: j,
|
|
650
|
+
deactivate: N
|
|
651
|
+
}), (e, t) => (O(), h("div", C(r.dataAttrs, { class: y.value }), [r.mask ? (O(), h("div", {
|
|
652
|
+
key: 0,
|
|
653
|
+
class: w(["semi-modal-mask", r.maskClass]),
|
|
654
|
+
style: T(r.maskStyle),
|
|
655
|
+
onAnimationend: t[0] ||= (e) => i("animationEnd", e)
|
|
656
|
+
}, null, 38)) : m("", !0), g("div", {
|
|
657
|
+
role: "none",
|
|
658
|
+
class: w(["semi-modal-wrap", { "semi-modal-wrap-center": r.centered }]),
|
|
659
|
+
onClick: F,
|
|
660
|
+
onMouseup: I
|
|
661
|
+
}, [v(M(H), { content: x.value }, null, 8, ["content"])], 34)], 16));
|
|
662
|
+
}
|
|
663
|
+
}), X = /* @__PURE__ */ y({
|
|
664
|
+
name: "Modal",
|
|
665
|
+
inheritAttrs: !1,
|
|
666
|
+
__name: "Modal",
|
|
667
|
+
props: {
|
|
668
|
+
afterClose: { type: Function },
|
|
669
|
+
bodyStyle: { type: [
|
|
670
|
+
Boolean,
|
|
671
|
+
null,
|
|
672
|
+
String,
|
|
673
|
+
Object,
|
|
674
|
+
Array
|
|
675
|
+
] },
|
|
676
|
+
cancelButtonProps: {},
|
|
677
|
+
cancelLoading: { type: Boolean },
|
|
678
|
+
cancelText: {},
|
|
679
|
+
centered: { type: Boolean },
|
|
680
|
+
class: { type: [
|
|
681
|
+
Boolean,
|
|
682
|
+
null,
|
|
683
|
+
String,
|
|
684
|
+
Object,
|
|
685
|
+
Array
|
|
686
|
+
] },
|
|
687
|
+
className: { type: [
|
|
688
|
+
Boolean,
|
|
689
|
+
null,
|
|
690
|
+
String,
|
|
691
|
+
Object,
|
|
692
|
+
Array
|
|
693
|
+
] },
|
|
694
|
+
closable: { type: Boolean },
|
|
695
|
+
closeIcon: { type: [
|
|
696
|
+
Object,
|
|
697
|
+
String,
|
|
698
|
+
Number,
|
|
699
|
+
Boolean,
|
|
700
|
+
null,
|
|
701
|
+
Array
|
|
702
|
+
] },
|
|
703
|
+
closeOnEsc: { type: Boolean },
|
|
704
|
+
confirmLoading: { type: Boolean },
|
|
705
|
+
content: { type: [
|
|
706
|
+
Object,
|
|
707
|
+
String,
|
|
708
|
+
Number,
|
|
709
|
+
Boolean,
|
|
710
|
+
null,
|
|
711
|
+
Array
|
|
712
|
+
] },
|
|
713
|
+
direction: {},
|
|
714
|
+
footer: { type: [
|
|
715
|
+
Object,
|
|
716
|
+
String,
|
|
717
|
+
Number,
|
|
718
|
+
Boolean,
|
|
719
|
+
null,
|
|
720
|
+
Array
|
|
721
|
+
] },
|
|
722
|
+
footerFill: { type: Boolean },
|
|
723
|
+
fullScreen: { type: Boolean },
|
|
724
|
+
getContainerContext: { type: Function },
|
|
725
|
+
getPopupContainer: { type: Function },
|
|
726
|
+
hasCancel: { type: Boolean },
|
|
727
|
+
header: { type: [
|
|
728
|
+
Object,
|
|
729
|
+
String,
|
|
730
|
+
Number,
|
|
731
|
+
Boolean,
|
|
732
|
+
null,
|
|
733
|
+
Array
|
|
734
|
+
] },
|
|
735
|
+
height: {},
|
|
736
|
+
icon: { type: [
|
|
737
|
+
Object,
|
|
738
|
+
String,
|
|
739
|
+
Number,
|
|
740
|
+
Boolean,
|
|
741
|
+
null,
|
|
742
|
+
Array
|
|
743
|
+
] },
|
|
744
|
+
keepDOM: { type: Boolean },
|
|
745
|
+
lazyRender: { type: Boolean },
|
|
746
|
+
mask: { type: Boolean },
|
|
747
|
+
maskClosable: { type: Boolean },
|
|
748
|
+
maskFixed: { type: Boolean },
|
|
749
|
+
maskStyle: { type: [
|
|
750
|
+
Boolean,
|
|
751
|
+
null,
|
|
752
|
+
String,
|
|
753
|
+
Object,
|
|
754
|
+
Array
|
|
755
|
+
] },
|
|
756
|
+
modalContentClass: { type: [
|
|
757
|
+
Boolean,
|
|
758
|
+
null,
|
|
759
|
+
String,
|
|
760
|
+
Object,
|
|
761
|
+
Array
|
|
762
|
+
] },
|
|
763
|
+
modalRender: { type: Function },
|
|
764
|
+
motion: { type: Boolean },
|
|
765
|
+
okButtonProps: {},
|
|
766
|
+
okText: {},
|
|
767
|
+
okType: {},
|
|
768
|
+
onAfterClose: { type: Function },
|
|
769
|
+
onCancel: { type: Function },
|
|
770
|
+
onOk: { type: Function },
|
|
771
|
+
preventScroll: { type: Boolean },
|
|
772
|
+
size: {},
|
|
773
|
+
style: { type: [
|
|
774
|
+
Boolean,
|
|
775
|
+
null,
|
|
776
|
+
String,
|
|
777
|
+
Object,
|
|
778
|
+
Array
|
|
779
|
+
] },
|
|
780
|
+
title: { type: [
|
|
781
|
+
Object,
|
|
782
|
+
String,
|
|
783
|
+
Number,
|
|
784
|
+
Boolean,
|
|
785
|
+
null,
|
|
786
|
+
Array
|
|
787
|
+
] },
|
|
788
|
+
visible: { type: Boolean },
|
|
789
|
+
width: {},
|
|
790
|
+
zIndex: {}
|
|
791
|
+
},
|
|
792
|
+
emits: ["update:visible"],
|
|
793
|
+
setup(e, { emit: t }) {
|
|
794
|
+
let n = e, r = t, i = N(), a = F(), o = b(), u = x(s, void 0), g = I("dialog"), _ = A(null), y = A(!1), C = A(!1), j = /* @__PURE__ */ new Map(), P = !1, R, z = null, B = "";
|
|
795
|
+
function V(e) {
|
|
796
|
+
let t = String(e).replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), n = o?.vnode.props;
|
|
797
|
+
return !!(n && (Object.prototype.hasOwnProperty.call(n, e) || Object.prototype.hasOwnProperty.call(n, t)));
|
|
798
|
+
}
|
|
799
|
+
function H(e, t) {
|
|
800
|
+
if (V(e) && n[e] !== void 0) return n[e];
|
|
801
|
+
let r = c.config.overrideDefaultProps?.Modal?.[e];
|
|
802
|
+
return r === void 0 ? t : r;
|
|
803
|
+
}
|
|
804
|
+
function U(e) {
|
|
805
|
+
if (V(e)) return n[e];
|
|
806
|
+
let t = c.config.overrideDefaultProps?.Modal?.[e];
|
|
807
|
+
return t === void 0 ? void 0 : t;
|
|
808
|
+
}
|
|
809
|
+
let W = f(() => u?.value), G = f(() => H("visible", !1)), K = f(() => ({
|
|
810
|
+
centered: H("centered", !1),
|
|
811
|
+
closable: H("closable", !0),
|
|
812
|
+
closeOnEsc: H("closeOnEsc", !0),
|
|
813
|
+
footerFill: H("footerFill", !1),
|
|
814
|
+
fullScreen: H("fullScreen", !1),
|
|
815
|
+
hasCancel: H("hasCancel", !0),
|
|
816
|
+
keepDOM: H("keepDOM", !1),
|
|
817
|
+
lazyRender: H("lazyRender", !0),
|
|
818
|
+
mask: H("mask", !0),
|
|
819
|
+
maskClosable: H("maskClosable", !0),
|
|
820
|
+
maskFixed: H("maskFixed", !1),
|
|
821
|
+
motion: H("motion", !0),
|
|
822
|
+
okType: H("okType", "primary"),
|
|
823
|
+
preventScroll: H("preventScroll", !1),
|
|
824
|
+
size: H("size", "small"),
|
|
825
|
+
visible: G.value,
|
|
826
|
+
zIndex: H("zIndex", 1e3)
|
|
827
|
+
})), q = k({
|
|
828
|
+
displayNone: !G.value,
|
|
829
|
+
isFullScreen: K.value.fullScreen
|
|
830
|
+
});
|
|
831
|
+
function J(e, t) {
|
|
832
|
+
return e?.(t);
|
|
833
|
+
}
|
|
834
|
+
function Y() {
|
|
835
|
+
if (typeof document > "u" || _.value !== document.body || (z = document.body.style.overflow || "", B = document.body.style.width, z === "hidden")) return;
|
|
836
|
+
let e = Math.max(0, window.innerWidth - document.documentElement.clientWidth);
|
|
837
|
+
document.body.style.overflow = "hidden", document.body.style.width = `calc(${B || "100%"} - ${e}px)`;
|
|
838
|
+
}
|
|
839
|
+
function X() {
|
|
840
|
+
typeof document > "u" || z === null || (z !== "hidden" && (document.body.style.overflow = z, document.body.style.width = B), z = null);
|
|
841
|
+
}
|
|
842
|
+
let Z = S(new ne({
|
|
843
|
+
getContext: () => void 0,
|
|
844
|
+
getContexts: () => ({}),
|
|
845
|
+
getProp: (e) => K.value[e],
|
|
846
|
+
getProps: () => K.value,
|
|
847
|
+
getState: (e) => q[e],
|
|
848
|
+
getStates: () => q,
|
|
849
|
+
setState: (e, t) => {
|
|
850
|
+
Object.assign(q, e), t?.();
|
|
851
|
+
},
|
|
852
|
+
getCache: (e) => j.get(e),
|
|
853
|
+
getCaches: () => j,
|
|
854
|
+
setCache: (e, t) => j.set(e, t),
|
|
855
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
856
|
+
persistEvent: () => void 0,
|
|
857
|
+
disabledBodyScroll: Y,
|
|
858
|
+
enabledBodyScroll: X,
|
|
859
|
+
notifyCancel: (e) => (r("update:visible", !1), J(n.onCancel, e)),
|
|
860
|
+
notifyOk: (e) => J(n.onOk, e),
|
|
861
|
+
notifyClose: () => {
|
|
862
|
+
n.afterClose?.(), n.onAfterClose !== n.afterClose && n.onAfterClose?.();
|
|
863
|
+
},
|
|
864
|
+
toggleDisplayNone: (e, t) => {
|
|
865
|
+
q.displayNone !== e && (q.displayNone = e), t?.(e);
|
|
866
|
+
},
|
|
867
|
+
notifyFullScreen: (e) => {
|
|
868
|
+
q.isFullScreen = e;
|
|
869
|
+
}
|
|
870
|
+
})), ae = f(() => U("getPopupContainer") || W.value?.getPopupContainer), oe = f(() => typeof document < "u" && _.value !== document.body), se = f(() => U("direction") ?? W.value?.direction ?? "ltr"), ce = f(() => {
|
|
871
|
+
let e = W.value?.locale.Modal, t = l.Modal;
|
|
872
|
+
return e ?? t ?? {
|
|
873
|
+
confirm: "确定",
|
|
874
|
+
cancel: "取消"
|
|
875
|
+
};
|
|
876
|
+
}), le = f(() => a.body?.() ?? a.default?.() ?? (V("content") ? n.content : void 0)), ue = f(() => a.title?.() ?? (V("title") ? n.title : void 0)), de = f(() => a.icon?.() ?? (V("icon") ? n.icon : void 0)), fe = f(() => a.closeIcon?.() ?? (V("closeIcon") ? n.closeIcon : void 0)), pe = f(() => !!a.header || V("header")), me = f(() => a.header?.() ?? n.header), he = f(() => !!a.footer || V("footer")), ge = f(() => he.value ? a.footer?.() ?? n.footer : ee(re, {
|
|
877
|
+
cancelButtonProps: U("cancelButtonProps"),
|
|
878
|
+
cancelLoading: U("cancelLoading") ?? q.onCancelReturnPromiseStatus === "pending",
|
|
879
|
+
cancelText: U("cancelText"),
|
|
880
|
+
footerFill: K.value.footerFill,
|
|
881
|
+
hasCancel: K.value.hasCancel,
|
|
882
|
+
locale: ce.value,
|
|
883
|
+
okButtonProps: U("okButtonProps"),
|
|
884
|
+
okLoading: U("confirmLoading") ?? q.onOKReturnPromiseStatus === "pending",
|
|
885
|
+
okText: U("okText"),
|
|
886
|
+
okType: K.value.okType,
|
|
887
|
+
onCancel: (e) => Z.handleCancel(e),
|
|
888
|
+
onOk: (e) => Z.handleOk(e)
|
|
889
|
+
})), _e = f(() => Object.fromEntries(Object.entries(i).filter(([e]) => e.startsWith("data-")))), ve = f(() => [
|
|
890
|
+
i.class,
|
|
891
|
+
n.class,
|
|
892
|
+
n.className,
|
|
893
|
+
K.value.keepDOM && q.displayNone ? "semi-modal-displayNone" : void 0
|
|
894
|
+
]), ye = f(() => [U("modalContentClass"), K.value.motion ? G.value ? "semi-modal-content-animate-show" : "semi-modal-content-animate-hide" : void 0]), be = f(() => K.value.motion ? G.value ? "semi-modal-mask-animate-show" : "semi-modal-mask-animate-hide" : void 0), xe = f(() => G.value || K.value.keepDOM && (!K.value.lazyRender || C.value) || K.value.motion && !q.displayNone), Se = f(() => ({
|
|
895
|
+
zIndex: K.value.zIndex,
|
|
896
|
+
...oe.value ? { position: "static" } : {}
|
|
897
|
+
}));
|
|
898
|
+
function Q() {
|
|
899
|
+
if (typeof document > "u") return;
|
|
900
|
+
let e = ae.value, t = e?.();
|
|
901
|
+
_.value = t instanceof HTMLElement ? t : e ? null : document.body;
|
|
902
|
+
}
|
|
903
|
+
async function Ce() {
|
|
904
|
+
clearTimeout(R), P = !0, q.displayNone = !1, q.isFullScreen = K.value.fullScreen, C.value = !0, Q(), Z.beforeShow(), await te(), await g.value?.activate();
|
|
905
|
+
}
|
|
906
|
+
function $() {
|
|
907
|
+
!P || G.value || (clearTimeout(R), g.value?.deactivate(), Z.toggleDisplayNone(!0), P = !1, Z.afterHide());
|
|
908
|
+
}
|
|
909
|
+
function we() {
|
|
910
|
+
if (P) {
|
|
911
|
+
if (!K.value.motion) {
|
|
912
|
+
$();
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
clearTimeout(R), R = setTimeout($, 180);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
function Te() {
|
|
919
|
+
G.value || $();
|
|
920
|
+
}
|
|
921
|
+
return D(() => {
|
|
922
|
+
y.value = !0, Q(), G.value && Ce();
|
|
923
|
+
}), L(G, (e, t) => {
|
|
924
|
+
!y.value || e === t || (e ? Ce() : we());
|
|
925
|
+
}), L(ae, () => {
|
|
926
|
+
y.value && Q();
|
|
927
|
+
}), L(() => K.value.fullScreen, (e) => Z.notifyFullScreen(e)), E(() => {
|
|
928
|
+
clearTimeout(R), g.value?.deactivate(), P ? Z.destroy() : Z.enabledBodyScroll();
|
|
929
|
+
}), (e, t) => (O(), p(d, {
|
|
930
|
+
to: _.value ?? "body",
|
|
931
|
+
disabled: _.value === null
|
|
932
|
+
}, [xe.value ? (O(), h("div", {
|
|
933
|
+
key: 0,
|
|
934
|
+
class: w(["semi-portal", { "semi-portal-rtl": se.value === "rtl" }]),
|
|
935
|
+
style: T(Se.value)
|
|
936
|
+
}, [v(ie, {
|
|
937
|
+
ref_key: "dialog",
|
|
938
|
+
ref: g,
|
|
939
|
+
body: le.value,
|
|
940
|
+
"body-style": U("bodyStyle"),
|
|
941
|
+
centered: K.value.centered,
|
|
942
|
+
class: w(ve.value),
|
|
943
|
+
closable: K.value.closable,
|
|
944
|
+
"close-icon": fe.value,
|
|
945
|
+
"close-on-esc": K.value.closeOnEsc,
|
|
946
|
+
"content-class": ye.value,
|
|
947
|
+
"custom-container": oe.value,
|
|
948
|
+
"data-attrs": _e.value,
|
|
949
|
+
direction: se.value,
|
|
950
|
+
footer: ge.value,
|
|
951
|
+
"full-screen": M(q).isFullScreen,
|
|
952
|
+
header: me.value,
|
|
953
|
+
"header-provided": pe.value,
|
|
954
|
+
height: U("height"),
|
|
955
|
+
hidden: M(q).displayNone,
|
|
956
|
+
icon: de.value,
|
|
957
|
+
mask: K.value.mask,
|
|
958
|
+
"mask-class": be.value,
|
|
959
|
+
"mask-closable": K.value.maskClosable,
|
|
960
|
+
"mask-fixed": K.value.maskFixed,
|
|
961
|
+
"mask-style": U("maskStyle"),
|
|
962
|
+
"modal-render": U("modalRender"),
|
|
963
|
+
"outer-style": [M(i).style, U("style")],
|
|
964
|
+
"prevent-scroll": K.value.preventScroll,
|
|
965
|
+
size: K.value.size,
|
|
966
|
+
title: ue.value,
|
|
967
|
+
visible: G.value,
|
|
968
|
+
width: U("width"),
|
|
969
|
+
onAnimationEnd: Te,
|
|
970
|
+
onClose: t[0] ||= (e) => M(Z).handleCancel(e)
|
|
971
|
+
}, null, 8, /* @__PURE__ */ "body.body-style.centered.class.closable.close-icon.close-on-esc.content-class.custom-container.data-attrs.direction.footer.full-screen.header.header-provided.height.hidden.icon.mask.mask-class.mask-closable.mask-fixed.mask-style.modal-render.outer-style.prevent-scroll.size.title.visible.width".split("."))], 6)) : m("", !0)], 8, ["to", "disabled"]));
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
//#endregion
|
|
975
|
+
export { H as n, X as t };
|