@rhino-design/vue 0.2.2 → 0.2.3
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/README.md +1 -1
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/_virtual/alignment-pattern.js +4 -0
- package/dist/_virtual/browser.js +4 -0
- package/dist/_virtual/canvas.js +4 -0
- package/dist/_virtual/dijkstra.js +4 -0
- package/dist/_virtual/error-correction-code.js +4 -0
- package/dist/_virtual/error-correction-level.js +4 -0
- package/dist/_virtual/finder-pattern.js +4 -0
- package/dist/_virtual/format-info.js +4 -0
- package/dist/_virtual/galois-field.js +4 -0
- package/dist/_virtual/mask-pattern.js +4 -0
- package/dist/_virtual/mode.js +4 -0
- package/dist/_virtual/polynomial.js +4 -0
- package/dist/_virtual/qrcode.js +4 -0
- package/dist/_virtual/regex.js +4 -0
- package/dist/_virtual/segments.js +4 -0
- package/dist/_virtual/svg-tag.js +4 -0
- package/dist/_virtual/utils.js +4 -0
- package/dist/_virtual/utils2.js +4 -0
- package/dist/_virtual/version-check.js +4 -0
- package/dist/_virtual/version.js +4 -0
- package/dist/arco.less +14834 -0
- package/dist/components/XAffix.vue.js +7 -0
- package/dist/components/XAffix.vue2.js +181 -0
- package/dist/components/XAlert.vue.js +106 -0
- package/dist/components/XAlert.vue2.js +4 -0
- package/dist/components/XAnchor.vue.js +9 -0
- package/dist/components/XAnchor.vue2.js +204 -0
- package/dist/components/XAnchorLink.vue.js +7 -0
- package/dist/components/XAnchorLink.vue2.js +44 -0
- package/dist/components/XApp.vue.js +12 -0
- package/dist/components/XAutoComplete.vue.js +399 -0
- package/dist/components/XAutoComplete.vue2.js +4 -0
- package/dist/components/XAvatar.vue.js +166 -0
- package/dist/components/XAvatar.vue2.js +4 -0
- package/dist/components/XAvatarGroup.vue.js +27 -0
- package/dist/components/XAvatarGroup.vue2.js +4 -0
- package/dist/components/XBackTop.vue.js +118 -0
- package/dist/components/XBackTop.vue2.js +4 -0
- package/dist/components/XBadge.vue.js +64 -0
- package/dist/components/XBadge.vue2.js +4 -0
- package/dist/components/XBaseMenu.vue.js +37 -0
- package/dist/components/XBaseMenu.vue2.js +334 -0
- package/dist/components/XBreadcrumb.vue.d.ts +12 -7
- package/dist/components/XBreadcrumb.vue.js +97 -0
- package/dist/components/XBreadcrumb.vue2.js +4 -0
- package/dist/components/XBreadcrumbItem.vue.d.ts +7 -4
- package/dist/components/XBreadcrumbItem.vue.js +136 -0
- package/dist/components/XBreadcrumbItem.vue2.js +4 -0
- package/dist/components/XButton.vue.js +7 -0
- package/dist/components/XButton.vue2.js +142 -0
- package/dist/components/XButtonG.vue.js +7 -0
- package/dist/components/XButtonG.vue2.js +67 -0
- package/dist/components/XButtonGroup.vue.js +39 -0
- package/dist/components/XButtonGroup.vue3.js +5 -0
- package/dist/components/XCalendar.vue.js +309 -0
- package/dist/components/XCalendar.vue2.js +4 -0
- package/dist/components/XCard.vue.js +80 -0
- package/dist/components/XCard.vue2.js +4 -0
- package/dist/components/XCarousel.vue.js +7 -0
- package/dist/components/XCarousel.vue2.js +150 -0
- package/dist/components/XCarouselItem.vue.js +7 -0
- package/dist/components/XCarouselItem.vue2.js +112 -0
- package/dist/components/XCascader.vue.js +1015 -0
- package/dist/components/XCascader.vue2.js +4 -0
- package/dist/components/XCascaderPanel.vue.js +466 -0
- package/dist/components/XCascaderPanel.vue2.js +4 -0
- package/dist/components/XChatInput.vue.js +7 -0
- package/dist/components/XChatInput.vue2.js +454 -0
- package/dist/components/XCheckbox.vue.js +154 -0
- package/dist/components/XCheckbox.vue2.js +4 -0
- package/dist/components/XCheckboxGroup.vue.js +87 -0
- package/dist/components/XCheckboxGroup.vue2.js +4 -0
- package/dist/components/XCollapse.vue.js +54 -0
- package/dist/components/XCollapse.vue2.js +4 -0
- package/dist/components/XCollapseItem.vue.js +152 -0
- package/dist/components/XCollapseItem.vue2.js +4 -0
- package/dist/components/XColorGroup.vue.js +7 -0
- package/dist/components/XColorGroup.vue2.js +306 -0
- package/dist/components/XColorPicker.vue.js +62 -0
- package/dist/components/XColorPicker.vue2.js +4 -0
- package/dist/components/XComment.vue.js +129 -0
- package/dist/components/XComment.vue2.js +4 -0
- package/dist/components/XCompact.vue.js +17 -0
- package/dist/components/XCompact.vue2.js +4 -0
- package/dist/components/XConfigProvider.vue.js +78 -0
- package/dist/components/XConfigProvider.vue2.js +4 -0
- package/dist/components/XCountdown.vue.js +7 -0
- package/dist/components/XCountdown.vue2.js +104 -0
- package/dist/components/XCropper.vue.js +7 -0
- package/dist/components/XCropper.vue2.js +525 -0
- package/dist/components/XDatePicker.vue.js +1798 -0
- package/dist/components/XDatePicker.vue2.js +4 -0
- package/dist/components/XDescriptions.vue.js +260 -0
- package/dist/components/XDescriptions.vue2.js +4 -0
- package/dist/components/XDescriptionsItem.vue.js +21 -0
- package/dist/components/XDescriptionsItem.vue2.js +4 -0
- package/dist/components/XDgroup.vue.js +21 -0
- package/dist/components/XDgroup.vue2.js +4 -0
- package/dist/components/XDivider.vue.js +54 -0
- package/dist/components/XDivider.vue2.js +4 -0
- package/dist/components/XDoption.vue.js +59 -0
- package/dist/components/XDoption.vue2.js +4 -0
- package/dist/components/XDrawer.vue.js +7 -0
- package/dist/components/XDrawer.vue2.js +320 -0
- package/dist/components/XDrawerService.d.ts +2 -0
- package/dist/components/XDrawerService.js +97 -0
- package/dist/components/XDropdown.vue.d.ts +8 -7
- package/dist/components/XDropdown.vue.js +127 -0
- package/dist/components/XDropdown.vue2.js +4 -0
- package/dist/components/XDropdownButton.vue.js +84 -0
- package/dist/components/XDropdownButton.vue2.js +4 -0
- package/dist/components/XDropdownItem.vue.js +47 -0
- package/dist/components/XDropdownItem.vue2.js +4 -0
- package/dist/components/XDropdownPanel.vue.js +58 -0
- package/dist/components/XDropdownPanel.vue2.js +4 -0
- package/dist/components/XDsubmenu.vue.js +82 -0
- package/dist/components/XDsubmenu.vue2.js +4 -0
- package/dist/components/XEmpty.vue.js +54 -0
- package/dist/components/XEmpty.vue2.js +4 -0
- package/dist/components/XFlex.vue.js +7 -0
- package/dist/components/XFlex.vue2.js +122 -0
- package/dist/components/XFloatButton.vue.js +28 -0
- package/dist/components/XFloatButton.vue2.js +4 -0
- package/dist/components/XFloatButtonGroup.vue.js +17 -0
- package/dist/components/XFloatButtonGroup.vue2.js +4 -0
- package/dist/components/XForm.vue.js +156 -0
- package/dist/components/XForm.vue2.js +4 -0
- package/dist/components/XFormItem.vue.js +425 -0
- package/dist/components/XFormItem.vue2.js +4 -0
- package/dist/components/XGrid.vue.js +7 -0
- package/dist/components/XGrid.vue2.js +88 -0
- package/dist/components/XGridItem.vue.js +8 -0
- package/dist/components/XGridItem.vue2.js +112 -0
- package/dist/components/XGridLayout.vue.js +7 -0
- package/dist/components/XGridLayout.vue2.js +66 -0
- package/dist/components/XGridLayoutItem.vue.js +7 -0
- package/dist/components/XGridLayoutItem.vue2.js +56 -0
- package/dist/components/XIcon.js +5 -0
- package/dist/components/XIconLite.js +8 -0
- package/dist/components/XImage.vue.js +7 -0
- package/dist/components/XImage.vue2.js +241 -0
- package/dist/components/XImageGroup.vue.js +7 -0
- package/dist/components/XImageGroup.vue2.js +22 -0
- package/dist/components/XInput.vue.js +7 -0
- package/dist/components/XInput.vue2.js +537 -0
- package/dist/components/XInputComposite.vue.js +7 -0
- package/dist/components/XInputComposite.vue2.js +176 -0
- package/dist/components/XInputGroup.vue.js +19 -0
- package/dist/components/XInputGroup.vue3.js +5 -0
- package/dist/components/XInputNumber.vue.js +7 -0
- package/dist/components/XInputNumber.vue2.js +344 -0
- package/dist/components/XInputPassword.vue.js +7 -0
- package/dist/components/XInputPassword.vue2.js +125 -0
- package/dist/components/XInputSearch.vue.js +7 -0
- package/dist/components/XInputSearch.vue2.js +154 -0
- package/dist/components/XInputTag.vue.js +367 -0
- package/dist/components/XInputTag.vue2.js +4 -0
- package/dist/components/XLayout.vue.js +22 -0
- package/dist/components/XLayout.vue2.js +4 -0
- package/dist/components/XLayoutContent.vue.js +13 -0
- package/dist/components/XLayoutContent.vue2.js +4 -0
- package/dist/components/XLayoutFooter.vue.js +22 -0
- package/dist/components/XLayoutFooter.vue2.js +4 -0
- package/dist/components/XLayoutHeader.vue.js +128 -0
- package/dist/components/XLayoutHeader.vue2.js +4 -0
- package/dist/components/XLayoutSider.vue.js +108 -0
- package/dist/components/XLayoutSider.vue2.js +4 -0
- package/dist/components/XLink.vue.js +21 -0
- package/dist/components/XLink.vue2.js +4 -0
- package/dist/components/XList.vue.js +295 -0
- package/dist/components/XList.vue2.js +4 -0
- package/dist/components/XListItem.vue.js +53 -0
- package/dist/components/XListItem.vue2.js +4 -0
- package/dist/components/XListItemMeta.vue.js +43 -0
- package/dist/components/XListItemMeta.vue2.js +4 -0
- package/dist/components/XMention.vue.js +456 -0
- package/dist/components/XMention.vue2.js +4 -0
- package/dist/components/XMentions.vue.js +16 -0
- package/dist/components/XMentions.vue2.js +4 -0
- package/dist/components/XMenu.vue.js +57 -0
- package/dist/components/XMenu.vue2.js +123 -0
- package/dist/components/XMenuIndent.vue.js +19 -0
- package/dist/components/XMenuIndent.vue2.js +21 -0
- package/dist/components/XMenuItem.vue.js +71 -0
- package/dist/components/XMenuItem.vue2.js +92 -0
- package/dist/components/XMenuItemGroup.vue.js +27 -0
- package/dist/components/XMenuItemGroup.vue2.js +26 -0
- package/dist/components/XMenuOverflowWrap.vue.js +116 -0
- package/dist/components/XMenuOverflowWrap.vue2.js +4 -0
- package/dist/components/XMessage.vue.js +7 -0
- package/dist/components/XMessage.vue2.js +89 -0
- package/dist/components/XMessageList.js +61 -0
- package/dist/components/XMessageService.js +118 -0
- package/dist/components/XModal.vue.js +7 -0
- package/dist/components/XModal.vue2.js +364 -0
- package/dist/components/XModalService.js +157 -0
- package/dist/components/XNotification.vue.js +7 -0
- package/dist/components/XNotification.vue2.js +107 -0
- package/dist/components/XNotificationList.js +70 -0
- package/dist/components/XNotificationService.js +119 -0
- package/dist/components/XOptgroup.vue.js +14 -0
- package/dist/components/XOptgroup.vue2.js +4 -0
- package/dist/components/XOption.vue.js +21 -0
- package/dist/components/XOption.vue2.js +4 -0
- package/dist/components/XOverflowList.vue.js +149 -0
- package/dist/components/XOverflowList.vue2.js +4 -0
- package/dist/components/XPageHeader.vue.js +84 -0
- package/dist/components/XPageHeader.vue2.js +4 -0
- package/dist/components/XPagination.vue.js +121 -0
- package/dist/components/XPagination.vue2.js +4 -0
- package/dist/components/XPopconfirm.vue.js +90 -0
- package/dist/components/XPopconfirm.vue2.js +4 -0
- package/dist/components/XPopover.vue.js +53 -0
- package/dist/components/XPopover.vue2.js +4 -0
- package/dist/components/XProgress.vue.js +263 -0
- package/dist/components/XProgress.vue2.js +4 -0
- package/dist/components/XQRCode.vue.js +141 -0
- package/dist/components/XQRCode.vue2.js +4 -0
- package/dist/components/XRadio.vue.js +138 -0
- package/dist/components/XRadio.vue2.js +4 -0
- package/dist/components/XRadioButton.vue.js +41 -0
- package/dist/components/XRadioButton.vue2.js +4 -0
- package/dist/components/XRadioGroup.vue.js +168 -0
- package/dist/components/XRadioGroup.vue2.js +4 -0
- package/dist/components/XRate.vue.js +145 -0
- package/dist/components/XRate.vue2.js +4 -0
- package/dist/components/XResizeBox.vue.js +184 -0
- package/dist/components/XResizeBox.vue2.js +4 -0
- package/dist/components/XResult.vue.js +78 -0
- package/dist/components/XResult.vue2.js +4 -0
- package/dist/components/XRichTextEditor.vue.js +7 -0
- package/dist/components/XRichTextEditor.vue2.js +742 -0
- package/dist/components/XScrollbar.vue.d.ts +192 -0
- package/dist/components/XScrollbar.vue.js +190 -0
- package/dist/components/XScrollbar.vue2.js +4 -0
- package/dist/components/XScrollbarThumb.vue.d.ts +2 -6
- package/dist/components/XScrollbarThumb.vue.js +97 -0
- package/dist/components/XScrollbarThumb.vue2.js +4 -0
- package/dist/components/XSegmented.vue.js +7 -0
- package/dist/components/XSegmented.vue2.js +71 -0
- package/dist/components/XSelect.vue.js +858 -0
- package/dist/components/XSelect.vue2.js +4 -0
- package/dist/components/XSkeleton.vue.js +37 -0
- package/dist/components/XSkeleton.vue2.js +59 -0
- package/dist/components/XSkeletonLine.vue.js +36 -0
- package/dist/components/XSkeletonLine.vue2.js +4 -0
- package/dist/components/XSkeletonShape.vue.js +21 -0
- package/dist/components/XSkeletonShape.vue2.js +4 -0
- package/dist/components/XSlider.vue.js +402 -0
- package/dist/components/XSlider.vue2.js +4 -0
- package/dist/components/XSpace.vue.js +125 -0
- package/dist/components/XSpace.vue2.js +4 -0
- package/dist/components/XSpin.vue.js +54 -0
- package/dist/components/XSpin.vue2.js +4 -0
- package/dist/components/XSplit.vue.js +7 -0
- package/dist/components/XSplit.vue2.js +126 -0
- package/dist/components/XStatistic.vue.js +7 -0
- package/dist/components/XStatistic.vue2.js +176 -0
- package/dist/components/XStep.vue.js +91 -0
- package/dist/components/XStep.vue2.js +4 -0
- package/dist/components/XSteps.vue.js +73 -0
- package/dist/components/XSteps.vue2.js +4 -0
- package/dist/components/XSubMenu.vue.js +109 -0
- package/dist/components/XSubMenu.vue2.js +69 -0
- package/dist/components/XSubMenuInline.vue.js +74 -0
- package/dist/components/XSubMenuInline.vue2.js +56 -0
- package/dist/components/XSubMenuPop.vue.js +91 -0
- package/dist/components/XSubMenuPop.vue2.js +113 -0
- package/dist/components/XSwitch.vue.js +133 -0
- package/dist/components/XSwitch.vue2.js +4 -0
- package/dist/components/XTabPane.vue.js +59 -0
- package/dist/components/XTabPane.vue2.js +4 -0
- package/dist/components/XTable.vue.js +7 -0
- package/dist/components/XTable.vue2.js +1059 -0
- package/dist/components/XTableFilter.vue.js +7 -0
- package/dist/components/XTableFilter.vue2.js +141 -0
- package/dist/components/XTabs.vue.js +402 -0
- package/dist/components/XTabs.vue2.js +4 -0
- package/dist/components/XTag.vue.js +126 -0
- package/dist/components/XTag.vue2.js +4 -0
- package/dist/components/XTextarea.vue.js +261 -0
- package/dist/components/XTextarea.vue2.js +4 -0
- package/dist/components/XTimePicker.vue.js +827 -0
- package/dist/components/XTimePicker.vue2.js +4 -0
- package/dist/components/XTimeline.vue.js +84 -0
- package/dist/components/XTimeline.vue2.js +4 -0
- package/dist/components/XTimelineItem.vue.js +202 -0
- package/dist/components/XTimelineItem.vue2.js +4 -0
- package/dist/components/XTooltip.vue.js +78 -0
- package/dist/components/XTooltip.vue2.js +4 -0
- package/dist/components/XTour.vue.js +120 -0
- package/dist/components/XTour.vue2.js +4 -0
- package/dist/components/XTr.vue.js +12 -0
- package/dist/components/XTransfer.vue.js +128 -0
- package/dist/components/XTransfer.vue2.js +4 -0
- package/dist/components/XTree.vue.js +7 -0
- package/dist/components/XTree.vue2.js +601 -0
- package/dist/components/XTreeNode.vue.js +7 -0
- package/dist/components/XTreeNode.vue2.js +314 -0
- package/dist/components/XTreeSelect.vue.js +7 -0
- package/dist/components/XTreeSelect.vue2.js +715 -0
- package/dist/components/XTrigger.vue.js +492 -0
- package/dist/components/XTrigger.vue2.js +4 -0
- package/dist/components/XTypography.vue.js +51 -0
- package/dist/components/XTypography.vue2.js +126 -0
- package/dist/components/XTypographyParagraph.vue.js +83 -0
- package/dist/components/XTypographyParagraph.vue2.js +4 -0
- package/dist/components/XTypographyText.vue.js +76 -0
- package/dist/components/XTypographyText.vue2.js +4 -0
- package/dist/components/XTypographyTitle.vue.js +77 -0
- package/dist/components/XTypographyTitle.vue2.js +4 -0
- package/dist/components/XUpload.vue.js +7 -0
- package/dist/components/XUpload.vue2.js +1060 -0
- package/dist/components/XVerificationCode.vue.js +149 -0
- package/dist/components/XVerificationCode.vue2.js +4 -0
- package/dist/components/XWatermark.vue.js +204 -0
- package/dist/components/XWatermark.vue2.js +4 -0
- package/dist/components/index.d.ts +10 -6
- package/dist/components/index.js +308 -0
- package/dist/components/result-assets/result-403.svg.js +4 -0
- package/dist/components/result-assets/result-404.svg.js +4 -0
- package/dist/components/result-assets/result-500.svg.js +4 -0
- package/dist/components/statistic-utils.js +81 -0
- package/dist/components/timelineContext.js +4 -0
- package/dist/components/x-breadcrumb-context.js +4 -0
- package/dist/components/x-checkbox-context.js +4 -0
- package/dist/components/x-dropdown-context.js +4 -0
- package/dist/components/x-icon-shared.js +151 -0
- package/dist/components/x-radio-context.js +4 -0
- package/dist/components/x-scrollbar-types.d.ts +5 -0
- package/dist/composables/collapse.js +9 -0
- package/dist/composables/config-provider.js +48 -0
- package/dist/composables/config.js +39 -0
- package/dist/composables/form.js +397 -0
- package/dist/composables/i18n.js +257 -0
- package/dist/composables/menu-context.js +6 -0
- package/dist/composables/menu-hooks/use-level.js +25 -0
- package/dist/composables/menu-hooks/use-menu-context.js +8 -0
- package/dist/composables/menu-hooks/use-menu-data-collector.js +63 -0
- package/dist/composables/menu-hooks/use-menu-open-state.js +120 -0
- package/dist/composables/menu-hooks/use-menu.js +19 -0
- package/dist/composables/popup.js +177 -0
- package/dist/composables/scrollbar-visibility.js +96 -0
- package/dist/composables/steps.js +9 -0
- package/dist/composables/tabs.js +10 -0
- package/dist/composables/theme-context.js +24 -0
- package/dist/composables/theme.js +53 -0
- package/dist/composables/useMergeState.js +27 -0
- package/dist/composables/useResponsive.js +36 -0
- package/dist/iconfont/generated/icons/guanbi.js +7 -0
- package/dist/iconfont/generated/icons/shijian.js +7 -0
- package/dist/iconfont/internal-icons.js +71 -0
- package/dist/index.cjs +1 -2
- package/dist/index.css +14834 -0
- package/dist/index.js +382 -31255
- package/dist/index.less +14834 -0
- package/dist/install.js +39 -0
- package/dist/locales/ar-EG.js +5 -0
- package/dist/locales/da-DK.js +5 -0
- package/dist/locales/de-DE.js +5 -0
- package/dist/locales/en-US.js +312 -0
- package/dist/locales/es-ES.js +5 -0
- package/dist/locales/fr-FR.js +5 -0
- package/dist/locales/id-ID.js +5 -0
- package/dist/locales/it-IT.js +5 -0
- package/dist/locales/ja-JP.js +5 -0
- package/dist/locales/km-KH.js +5 -0
- package/dist/locales/ko-KR.js +5 -0
- package/dist/locales/ms-MY.js +5 -0
- package/dist/locales/nl-NL.js +5 -0
- package/dist/locales/pt-PT.js +5 -0
- package/dist/locales/ru-RU.js +5 -0
- package/dist/locales/th-TH.js +5 -0
- package/dist/locales/vi-VN.js +5 -0
- package/dist/locales/zh-CN.js +312 -0
- package/dist/locales/zh-TW.js +5 -0
- package/dist/node_modules/dijkstrajs/dijkstra.js +70 -0
- package/dist/node_modules/qrcode/lib/browser.js +45 -0
- package/dist/node_modules/qrcode/lib/can-promise.js +6 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +21 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.js +24 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.js +22 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.js +23 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.js +359 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.js +35 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.js +18 -0
- package/dist/node_modules/qrcode/lib/core/format-info.js +14 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.js +22 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.js +37 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.js +96 -0
- package/dist/node_modules/qrcode/lib/core/mode.js +64 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.js +26 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.js +29 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.js +159 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +25 -0
- package/dist/node_modules/qrcode/lib/core/regex.js +24 -0
- package/dist/node_modules/qrcode/lib/core/segments.js +143 -0
- package/dist/node_modules/qrcode/lib/core/utils.js +74 -0
- package/dist/node_modules/qrcode/lib/core/version-check.js +7 -0
- package/dist/node_modules/qrcode/lib/core/version.js +74 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.js +27 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +28 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.js +52 -0
- package/dist/style.css +14834 -1
- package/dist/style.less +14834 -0
- package/package.json +12 -4
- package/dist/components/XRangePicker.vue.d.ts +0 -45
- package/dist/components/__tests__/XAffix.test.d.ts +0 -1
- package/dist/components/__tests__/XAutoComplete.test.d.ts +0 -1
- package/dist/components/__tests__/XBackTop.test.d.ts +0 -1
- package/dist/components/__tests__/XBreadcrumb.test.d.ts +0 -1
- package/dist/components/__tests__/XButton.test.d.ts +0 -1
- package/dist/components/__tests__/XCard.test.d.ts +0 -1
- package/dist/components/__tests__/XCarousel.test.d.ts +0 -1
- package/dist/components/__tests__/XCascader.test.d.ts +0 -1
- package/dist/components/__tests__/XCheckbox.test.d.ts +0 -1
- package/dist/components/__tests__/XCollapse.test.d.ts +0 -1
- package/dist/components/__tests__/XComplexTriggerTheme.test.d.ts +0 -1
- package/dist/components/__tests__/XCropper.test.d.ts +0 -1
- package/dist/components/__tests__/XDropdown.test.d.ts +0 -1
- package/dist/components/__tests__/XImage.test.d.ts +0 -1
- package/dist/components/__tests__/XMention.test.d.ts +0 -1
- package/dist/components/__tests__/XMenuAccordion.test.d.ts +0 -1
- package/dist/components/__tests__/XOverflowList.test.d.ts +0 -1
- package/dist/components/__tests__/XOverlayServiceTheme.test.d.ts +0 -1
- package/dist/components/__tests__/XPageHeader.test.d.ts +0 -1
- package/dist/components/__tests__/XRadioGroup.test.d.ts +0 -1
- package/dist/components/__tests__/XResizeBox.test.d.ts +0 -1
- package/dist/components/__tests__/XSkeleton.test.d.ts +0 -1
- package/dist/components/__tests__/XStatistic.test.d.ts +0 -1
- package/dist/components/__tests__/XSteps.test.d.ts +0 -1
- package/dist/components/__tests__/XSwitch.test.d.ts +0 -1
- package/dist/components/__tests__/XTable.test.d.ts +0 -1
- package/dist/components/__tests__/XTabs.test.d.ts +0 -1
- package/dist/components/__tests__/XTag.test.d.ts +0 -1
- package/dist/components/__tests__/XThemeAttrAllComponentsSmoke.test.d.ts +0 -1
- package/dist/components/__tests__/XThemeAttrsForwarding.test.d.ts +0 -1
- package/dist/components/__tests__/XTimePicker.test.d.ts +0 -1
- package/dist/components/__tests__/XTour.test.d.ts +0 -1
- package/dist/components/__tests__/XTree.test.d.ts +0 -1
- package/dist/components/__tests__/XTreeSelect.test.d.ts +0 -1
- package/dist/components/__tests__/XTrigger.test.d.ts +0 -1
- package/dist/components/__tests__/XTriggerWrappersTheme.test.d.ts +0 -1
- package/dist/components/__tests__/XWatermark.test.d.ts +0 -1
- package/dist/favicon.ico +0 -1
- package/dist/favicon.svg +0 -5
- package/dist/images/carousel-0.png +0 -0
- package/dist/images/carousel-2.png +0 -0
- package/dist/images/carousel-3.png +0 -0
- package/dist/images/image-1.png +0 -0
- package/dist/img/avatar-1.jpg +0 -0
- package/dist/img/avatar.jpg +0 -0
- package/dist/img/avatar0.jpg +0 -0
- package/dist/img/avatar1.jpg +0 -0
- package/dist/img/image-1.png +0 -0
- package/dist/img/image-2.png +0 -0
- package/dist/img/image-3.png +0 -0
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { defineComponent as Qe, useAttrs as et, useSlots as tt, ref as r, computed as n, watch as G, onMounted as ot, onBeforeUnmount as lt, openBlock as c, createBlock as ve, Teleport as nt, withDirectives as R, createElementBlock as w, mergeProps as Y, unref as me, createVNode as V, Transition as pe, withCtx as N, normalizeStyle as _, vShow as q, createCommentVNode as m, createElementVNode as U, withModifiers as W, normalizeClass as B, renderSlot as j, createTextVNode as K, toDisplayString as J } from "vue";
|
|
2
|
+
import we from "./XButton.vue.js";
|
|
3
|
+
import at from "./XIcon.js";
|
|
4
|
+
import { useXI18n as rt } from "../composables/i18n.js";
|
|
5
|
+
const it = ["innerHTML"], st = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "x-modal-footer"
|
|
8
|
+
}, vt = /* @__PURE__ */ Qe({
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
__name: "XModal",
|
|
11
|
+
props: {
|
|
12
|
+
visible: { type: Boolean, default: void 0 },
|
|
13
|
+
open: { type: Boolean, default: void 0 },
|
|
14
|
+
defaultVisible: { type: Boolean, default: !1 },
|
|
15
|
+
width: { default: void 0 },
|
|
16
|
+
top: { default: void 0 },
|
|
17
|
+
mask: { type: Boolean, default: !0 },
|
|
18
|
+
title: { default: "" },
|
|
19
|
+
titleAlign: { default: "center" },
|
|
20
|
+
alignCenter: { type: Boolean, default: !0 },
|
|
21
|
+
unmountOnClose: { type: Boolean, default: !1 },
|
|
22
|
+
maskClosable: { type: Boolean, default: !0 },
|
|
23
|
+
hideCancel: { type: Boolean, default: !1 },
|
|
24
|
+
simple: { type: Boolean, default: void 0 },
|
|
25
|
+
notice: { type: Boolean, default: void 0 },
|
|
26
|
+
closable: { type: Boolean, default: !0 },
|
|
27
|
+
okText: { default: void 0 },
|
|
28
|
+
cancelText: { default: void 0 },
|
|
29
|
+
okLoading: { type: Boolean, default: !1 },
|
|
30
|
+
okButtonProps: { default: void 0 },
|
|
31
|
+
cancelButtonProps: { default: void 0 },
|
|
32
|
+
footer: { type: Boolean, default: !0 },
|
|
33
|
+
showFooter: { type: Boolean, default: void 0 },
|
|
34
|
+
renderToBody: { type: Boolean, default: !0 },
|
|
35
|
+
popupContainer: { default: "body" },
|
|
36
|
+
maskStyle: { default: void 0 },
|
|
37
|
+
modalClass: { default: void 0 },
|
|
38
|
+
modalStyle: { default: void 0 },
|
|
39
|
+
bodyClass: { default: void 0 },
|
|
40
|
+
bodyStyle: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
41
|
+
onBeforeOk: { type: Function, default: void 0 },
|
|
42
|
+
onBeforeCancel: { type: Function, default: void 0 },
|
|
43
|
+
beforeOk: { type: Function, default: void 0 },
|
|
44
|
+
beforeClose: { type: Function, default: void 0 },
|
|
45
|
+
escToClose: { type: Boolean, default: !0 },
|
|
46
|
+
draggable: { type: Boolean, default: !1 },
|
|
47
|
+
fullscreen: { type: Boolean, default: !1 },
|
|
48
|
+
maskAnimationName: { default: void 0 },
|
|
49
|
+
modalAnimationName: { default: void 0 },
|
|
50
|
+
hideTitle: { type: Boolean, default: !1 },
|
|
51
|
+
messageType: { default: void 0 }
|
|
52
|
+
},
|
|
53
|
+
emits: ["update:visible", "update:open", "ok", "cancel", "open", "close", "beforeOpen", "beforeClose"],
|
|
54
|
+
setup(s, { emit: ge }) {
|
|
55
|
+
function g() {
|
|
56
|
+
const e = globalThis;
|
|
57
|
+
return e.__xModalGlobalState__ || (e.__xModalGlobalState__ = {
|
|
58
|
+
stack: [],
|
|
59
|
+
overflowMap: /* @__PURE__ */ new Map()
|
|
60
|
+
}), e.__xModalGlobalState__;
|
|
61
|
+
}
|
|
62
|
+
function Q(e) {
|
|
63
|
+
return !!e && typeof e.then == "function";
|
|
64
|
+
}
|
|
65
|
+
function ee(e) {
|
|
66
|
+
return typeof e == "number" ? `${e}px` : e;
|
|
67
|
+
}
|
|
68
|
+
const ye = {
|
|
69
|
+
info: '<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z" fill="currentColor"/></svg>',
|
|
70
|
+
success: '<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm10.207-24.379a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0L22 26.172l-4.878-4.88a1 1 0 0 0-1.415 0l-1.414 1.415a1 1 0 0 0 0 1.414l7 7a1 1 0 0 0 1.414 0l11.5-11.5Z" fill="currentColor"/></svg>',
|
|
71
|
+
warning: '<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm-2-11a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2Zm4-18a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V15Z" fill="currentColor"/></svg>',
|
|
72
|
+
error: '<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm4.955-27.771-4.95 4.95-4.95-4.95a1 1 0 0 0-1.414 0l-1.414 1.414a1 1 0 0 0 0 1.414l4.95 4.95-4.95 4.95a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0l4.95-4.95 4.95 4.95a1 1 0 0 0 1.414 0l1.414-1.414a1 1 0 0 0 0-1.414l-4.95-4.95 4.95-4.95a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0Z" fill="currentColor"/></svg>'
|
|
73
|
+
}, t = s, v = ge, ke = et(), te = tt(), { t: oe } = rt(), p = r(), x = r(), le = r(t.defaultVisible), M = r(!!(t.visible ?? t.open ?? t.defaultVisible)), S = r(!1), Z = r(), T = r(!1), f = r(), I = r([0, 0]), $ = r([0, 0]), k = r([0, 0]), h = r([0, 0]), C = r(!1);
|
|
74
|
+
let D = 0;
|
|
75
|
+
const b = `x-modal-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
76
|
+
let O = !1, y = !1;
|
|
77
|
+
const ne = n(() => t.visible ?? t.open), i = n(() => ne.value ?? le.value), he = n(() => !t.unmountOnClose || i.value || M.value), Ce = n(() => t.showFooter ?? t.footer), be = n(() => t.okLoading || C.value), ae = n(() => t.simple ?? t.notice ?? !1), H = n(() => t.draggable && !t.fullscreen), Be = n(() => t.maskAnimationName || (t.fullscreen ? "fade-in-standard" : "fade-modal")), xe = n(() => t.modalAnimationName || (t.fullscreen ? "zoom-in" : "zoom-modal")), Me = n(() => t.okText || oe("modal.okText", void 0, "确定")), Se = n(() => t.cancelText || oe("modal.cancelText", void 0, "取消")), Te = n(() => t.cancelButtonProps ?? {}), Oe = n(() => t.okButtonProps ?? {}), Le = n(() => [
|
|
78
|
+
"x-modal-wrapper",
|
|
79
|
+
{
|
|
80
|
+
"x-modal-wrapper-align-center": t.alignCenter && !t.fullscreen,
|
|
81
|
+
"x-modal-wrapper-moved": !!f.value
|
|
82
|
+
}
|
|
83
|
+
]), Ee = n(() => [
|
|
84
|
+
"x-modal",
|
|
85
|
+
t.modalClass,
|
|
86
|
+
{
|
|
87
|
+
"x-modal-simple": ae.value,
|
|
88
|
+
"x-modal-draggable": H.value,
|
|
89
|
+
"x-modal-fullscreen": t.fullscreen
|
|
90
|
+
}
|
|
91
|
+
]), Ae = n(() => {
|
|
92
|
+
const o = g().stack.indexOf(b);
|
|
93
|
+
return o >= 0 ? 1e3 + o : 1e3;
|
|
94
|
+
}), Pe = n(() => ({
|
|
95
|
+
zIndex: String(Ae.value)
|
|
96
|
+
})), Ve = n(() => {
|
|
97
|
+
const e = {
|
|
98
|
+
...t.modalStyle ?? {}
|
|
99
|
+
};
|
|
100
|
+
return t.width !== void 0 && !t.fullscreen && (e.width = ee(t.width)), !t.alignCenter && t.top !== void 0 && (e.top = ee(t.top)), f.value && (e.transform = `translate(${f.value[0]}px, ${f.value[1]}px)`), e;
|
|
101
|
+
}), Ne = n(() => !t.hideTitle && (!!te.title || !!t.title || t.closable)), Ze = n(() => !!te.title || !!t.title), Ie = n(() => !ae.value && t.closable), re = n(() => {
|
|
102
|
+
if (t.messageType)
|
|
103
|
+
return ye[t.messageType];
|
|
104
|
+
}), $e = n(() => typeof t.popupContainer == "string" && t.popupContainer.trim() || typeof HTMLElement < "u" && t.popupContainer instanceof HTMLElement ? t.popupContainer : "body");
|
|
105
|
+
function De() {
|
|
106
|
+
if (!(typeof document > "u"))
|
|
107
|
+
return typeof t.popupContainer == "string" && t.popupContainer.trim() ? document.querySelector(t.popupContainer) ?? document.body : t.popupContainer instanceof HTMLElement ? t.popupContainer : document.body;
|
|
108
|
+
}
|
|
109
|
+
function X() {
|
|
110
|
+
Z.value = De();
|
|
111
|
+
}
|
|
112
|
+
function ie() {
|
|
113
|
+
if (O) return;
|
|
114
|
+
const e = g();
|
|
115
|
+
e.stack.includes(b) || e.stack.push(b), O = !0;
|
|
116
|
+
}
|
|
117
|
+
function se() {
|
|
118
|
+
if (!O) return;
|
|
119
|
+
const e = g();
|
|
120
|
+
e.stack = e.stack.filter((o) => o !== b), O = !1;
|
|
121
|
+
}
|
|
122
|
+
function He() {
|
|
123
|
+
const e = g();
|
|
124
|
+
return e.stack[e.stack.length - 1] === b;
|
|
125
|
+
}
|
|
126
|
+
function F() {
|
|
127
|
+
if (y)
|
|
128
|
+
return;
|
|
129
|
+
const e = Z.value;
|
|
130
|
+
if (!e)
|
|
131
|
+
return;
|
|
132
|
+
const o = g(), l = o.overflowMap.get(e) ?? {
|
|
133
|
+
count: 0,
|
|
134
|
+
overflow: e.style.overflow
|
|
135
|
+
};
|
|
136
|
+
l.count === 0 && (l.overflow = e.style.overflow, e.style.overflow = "hidden"), l.count += 1, o.overflowMap.set(e, l), y = !0;
|
|
137
|
+
}
|
|
138
|
+
function z() {
|
|
139
|
+
if (!y)
|
|
140
|
+
return;
|
|
141
|
+
const e = Z.value;
|
|
142
|
+
if (!e) {
|
|
143
|
+
y = !1;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const o = g(), l = o.overflowMap.get(e);
|
|
147
|
+
if (!l) {
|
|
148
|
+
y = !1;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
l.count = Math.max(0, l.count - 1), l.count === 0 ? (e.style.overflow = l.overflow, o.overflowMap.delete(e)) : o.overflowMap.set(e, l), y = !1;
|
|
152
|
+
}
|
|
153
|
+
function Xe(e) {
|
|
154
|
+
ne.value === void 0 && (le.value = e), v("update:visible", e), v("update:open", e);
|
|
155
|
+
}
|
|
156
|
+
function ue() {
|
|
157
|
+
D += 1, C.value = !1, T.value = !1, Xe(!1);
|
|
158
|
+
}
|
|
159
|
+
async function Fe() {
|
|
160
|
+
return t.onBeforeOk ? await new Promise((o) => {
|
|
161
|
+
var u;
|
|
162
|
+
let l = !1;
|
|
163
|
+
const a = (d = !0) => {
|
|
164
|
+
l || (l = !0, o(d));
|
|
165
|
+
};
|
|
166
|
+
try {
|
|
167
|
+
const d = (u = t.onBeforeOk) == null ? void 0 : u.call(t, a);
|
|
168
|
+
if ((Q(d) || typeof d != "boolean") && (C.value = !0), Q(d)) {
|
|
169
|
+
d.then((A) => {
|
|
170
|
+
l || a(A ?? !0);
|
|
171
|
+
}).catch(() => {
|
|
172
|
+
l || a(!1);
|
|
173
|
+
});
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
typeof d == "boolean" && a(d);
|
|
177
|
+
} catch {
|
|
178
|
+
a(!1);
|
|
179
|
+
}
|
|
180
|
+
}) : t.beforeOk ? await Promise.resolve(t.beforeOk()) !== !1 : !0;
|
|
181
|
+
}
|
|
182
|
+
async function ze(e) {
|
|
183
|
+
const o = D, l = await Fe();
|
|
184
|
+
if (o === D) {
|
|
185
|
+
if (!l) {
|
|
186
|
+
C.value && (C.value = !1);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
v("ok", e), ue();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
async function L(e, o) {
|
|
193
|
+
t.onBeforeCancel && (t.onBeforeCancel() ?? !1) === !1 || t.beforeClose && await Promise.resolve(t.beforeClose(e)) === !1 || (v("cancel", o), ue());
|
|
194
|
+
}
|
|
195
|
+
function Ge(e) {
|
|
196
|
+
S.value = e.target === p.value;
|
|
197
|
+
}
|
|
198
|
+
function Re(e) {
|
|
199
|
+
t.mask && t.maskClosable && S.value && L("mask", e), S.value = !1;
|
|
200
|
+
}
|
|
201
|
+
function de(e) {
|
|
202
|
+
!t.escToClose || !i.value || !He() || e.key === "Escape" && L("esc", e);
|
|
203
|
+
}
|
|
204
|
+
function Ye() {
|
|
205
|
+
if (!p.value || !x.value)
|
|
206
|
+
return;
|
|
207
|
+
const { top: e, left: o } = p.value.getBoundingClientRect(), { clientWidth: l, clientHeight: a } = p.value, { top: u, left: d, width: A, height: ce } = x.value.getBoundingClientRect(), P = t.alignCenter ? 0 : x.value.offsetTop ?? 0, We = d - o, je = u - e - P, Ke = l > A ? l - A : 0, Je = a > ce ? a - ce - P : 0;
|
|
208
|
+
$.value = f.value ?? [We, je], h.value = [Ke, Je], k.value = [0, P ? 0 - P : 0];
|
|
209
|
+
}
|
|
210
|
+
function _e(e) {
|
|
211
|
+
!H.value || e.button !== 0 || (T.value = !0, Ye(), I.value = [e.clientX, e.clientY], e.preventDefault());
|
|
212
|
+
}
|
|
213
|
+
function fe(e) {
|
|
214
|
+
if (!T.value || !H.value || !i.value)
|
|
215
|
+
return;
|
|
216
|
+
const o = e.clientX - I.value[0], l = e.clientY - I.value[1];
|
|
217
|
+
let a = $.value[0] + o, u = $.value[1] + l;
|
|
218
|
+
a < k.value[0] && (a = k.value[0]), a > h.value[0] && (a = h.value[0]), u < k.value[1] && (u = k.value[1]), u > h.value[1] && (u = h.value[1]), f.value = [a, u];
|
|
219
|
+
}
|
|
220
|
+
function E() {
|
|
221
|
+
T.value = !1;
|
|
222
|
+
}
|
|
223
|
+
function qe() {
|
|
224
|
+
i.value && (p.value && typeof document < "u" && document.activeElement instanceof HTMLElement && !p.value.contains(document.activeElement) && document.activeElement.blur(), v("open"));
|
|
225
|
+
}
|
|
226
|
+
function Ue() {
|
|
227
|
+
i.value || (M.value = !1, f.value = void 0, se(), z(), v("close"));
|
|
228
|
+
}
|
|
229
|
+
return G(i, (e, o) => {
|
|
230
|
+
e !== o && (e ? (X(), M.value = !0, S.value = !1, ie(), F(), v("beforeOpen")) : v("beforeClose"));
|
|
231
|
+
}), G(
|
|
232
|
+
() => t.fullscreen,
|
|
233
|
+
() => {
|
|
234
|
+
f.value && (f.value = void 0);
|
|
235
|
+
}
|
|
236
|
+
), G(
|
|
237
|
+
() => t.popupContainer,
|
|
238
|
+
() => {
|
|
239
|
+
const e = i.value;
|
|
240
|
+
e && z(), X(), e && F();
|
|
241
|
+
}
|
|
242
|
+
), ot(() => {
|
|
243
|
+
X(), i.value && (ie(), F()), typeof window < "u" && (window.addEventListener("keydown", de), window.addEventListener("mousemove", fe), window.addEventListener("mouseup", E), window.addEventListener("contextmenu", E));
|
|
244
|
+
}), lt(() => {
|
|
245
|
+
typeof window < "u" && (window.removeEventListener("keydown", de), window.removeEventListener("mousemove", fe), window.removeEventListener("mouseup", E), window.removeEventListener("contextmenu", E)), se(), z();
|
|
246
|
+
}), (e, o) => (c(), ve(nt, {
|
|
247
|
+
to: $e.value,
|
|
248
|
+
disabled: !s.renderToBody
|
|
249
|
+
}, [
|
|
250
|
+
he.value ? R((c(), w("div", Y({
|
|
251
|
+
key: 0,
|
|
252
|
+
class: "x-modal-container",
|
|
253
|
+
style: Pe.value
|
|
254
|
+
}, me(ke)), [
|
|
255
|
+
V(pe, {
|
|
256
|
+
name: Be.value,
|
|
257
|
+
appear: ""
|
|
258
|
+
}, {
|
|
259
|
+
default: N(() => [
|
|
260
|
+
s.mask ? R((c(), w("div", {
|
|
261
|
+
key: 0,
|
|
262
|
+
class: "x-modal-mask",
|
|
263
|
+
style: _(s.maskStyle)
|
|
264
|
+
}, null, 4)), [
|
|
265
|
+
[q, i.value]
|
|
266
|
+
]) : m("", !0)
|
|
267
|
+
]),
|
|
268
|
+
_: 1
|
|
269
|
+
}, 8, ["name"]),
|
|
270
|
+
U("div", {
|
|
271
|
+
ref_key: "wrapperRef",
|
|
272
|
+
ref: p,
|
|
273
|
+
class: B(Le.value),
|
|
274
|
+
onClick: W(Re, ["self"]),
|
|
275
|
+
onMousedown: W(Ge, ["self"])
|
|
276
|
+
}, [
|
|
277
|
+
V(pe, {
|
|
278
|
+
name: xe.value,
|
|
279
|
+
appear: "",
|
|
280
|
+
onAfterEnter: qe,
|
|
281
|
+
onAfterLeave: Ue
|
|
282
|
+
}, {
|
|
283
|
+
default: N(() => [
|
|
284
|
+
R(U("section", {
|
|
285
|
+
ref_key: "modalRef",
|
|
286
|
+
ref: x,
|
|
287
|
+
class: B(Ee.value),
|
|
288
|
+
style: _(Ve.value),
|
|
289
|
+
role: "dialog",
|
|
290
|
+
"aria-modal": "true"
|
|
291
|
+
}, [
|
|
292
|
+
Ne.value ? (c(), w("header", {
|
|
293
|
+
key: 0,
|
|
294
|
+
class: "x-modal-header",
|
|
295
|
+
onMousedown: _e
|
|
296
|
+
}, [
|
|
297
|
+
Ze.value ? (c(), w("div", {
|
|
298
|
+
key: 0,
|
|
299
|
+
class: B(["x-modal-title", `x-modal-title-align-${s.titleAlign}`])
|
|
300
|
+
}, [
|
|
301
|
+
re.value ? (c(), w("span", {
|
|
302
|
+
key: 0,
|
|
303
|
+
class: B(["x-modal-title-icon", `is-${s.messageType}`]),
|
|
304
|
+
innerHTML: re.value
|
|
305
|
+
}, null, 10, it)) : m("", !0),
|
|
306
|
+
j(e.$slots, "title", {}, () => [
|
|
307
|
+
K(J(s.title), 1)
|
|
308
|
+
], !0)
|
|
309
|
+
], 2)) : m("", !0),
|
|
310
|
+
Ie.value ? (c(), w("button", {
|
|
311
|
+
key: 1,
|
|
312
|
+
type: "button",
|
|
313
|
+
class: "x-modal-close-btn",
|
|
314
|
+
"aria-label": "Close",
|
|
315
|
+
onClick: o[0] || (o[0] = (l) => L("close", l)),
|
|
316
|
+
onMousedown: o[1] || (o[1] = W(() => {
|
|
317
|
+
}, ["stop"]))
|
|
318
|
+
}, [
|
|
319
|
+
V(me(at), { name: "guanbi" })
|
|
320
|
+
], 32)) : m("", !0)
|
|
321
|
+
], 32)) : m("", !0),
|
|
322
|
+
U("div", {
|
|
323
|
+
class: B(["x-modal-body", s.bodyClass]),
|
|
324
|
+
style: _(s.bodyStyle)
|
|
325
|
+
}, [
|
|
326
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
327
|
+
], 6),
|
|
328
|
+
Ce.value ? (c(), w("footer", st, [
|
|
329
|
+
j(e.$slots, "footer", {}, () => [
|
|
330
|
+
s.hideCancel ? m("", !0) : (c(), ve(we, Y({ key: 0 }, Te.value, {
|
|
331
|
+
onClick: o[2] || (o[2] = (l) => L("cancel", l))
|
|
332
|
+
}), {
|
|
333
|
+
default: N(() => [
|
|
334
|
+
K(J(Se.value), 1)
|
|
335
|
+
]),
|
|
336
|
+
_: 1
|
|
337
|
+
}, 16)),
|
|
338
|
+
V(we, Y({ type: "primary" }, Oe.value, {
|
|
339
|
+
loading: be.value,
|
|
340
|
+
onClick: ze
|
|
341
|
+
}), {
|
|
342
|
+
default: N(() => [
|
|
343
|
+
K(J(Me.value), 1)
|
|
344
|
+
]),
|
|
345
|
+
_: 1
|
|
346
|
+
}, 16, ["loading"])
|
|
347
|
+
], !0)
|
|
348
|
+
])) : m("", !0)
|
|
349
|
+
], 6), [
|
|
350
|
+
[q, i.value]
|
|
351
|
+
])
|
|
352
|
+
]),
|
|
353
|
+
_: 3
|
|
354
|
+
}, 8, ["name"])
|
|
355
|
+
], 34)
|
|
356
|
+
], 16)), [
|
|
357
|
+
[q, i.value || M.value]
|
|
358
|
+
]) : m("", !0)
|
|
359
|
+
], 8, ["to", "disabled"]));
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
export {
|
|
363
|
+
vt as default
|
|
364
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { reactive as C, createVNode as b, h as y, render as p, nextTick as c } from "vue";
|
|
2
|
+
import h from "./XModal.vue.js";
|
|
3
|
+
import { resolveDarkThemeEnabled as T } from "../composables/theme-context.js";
|
|
4
|
+
function u(e) {
|
|
5
|
+
if (e != null)
|
|
6
|
+
return typeof e == "function" ? e : () => e;
|
|
7
|
+
}
|
|
8
|
+
function f(e) {
|
|
9
|
+
if (e === "light" || e === "dark")
|
|
10
|
+
return e;
|
|
11
|
+
if (typeof document > "u")
|
|
12
|
+
return;
|
|
13
|
+
const r = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
14
|
+
return T(void 0, r) ? "dark" : void 0;
|
|
15
|
+
}
|
|
16
|
+
function s(e, r) {
|
|
17
|
+
const n = document.createElement("div");
|
|
18
|
+
n.className = "x-modal-service-container";
|
|
19
|
+
const l = C({
|
|
20
|
+
visible: !0,
|
|
21
|
+
theme: f(e.theme),
|
|
22
|
+
closable: !0,
|
|
23
|
+
mask: !0,
|
|
24
|
+
footer: !0,
|
|
25
|
+
maskClosable: !0,
|
|
26
|
+
alignCenter: !0,
|
|
27
|
+
escToClose: !0,
|
|
28
|
+
draggable: !1,
|
|
29
|
+
fullscreen: !1,
|
|
30
|
+
hideCancel: !1,
|
|
31
|
+
simple: !1,
|
|
32
|
+
renderToBody: !1,
|
|
33
|
+
unmountOnClose: !0,
|
|
34
|
+
...e
|
|
35
|
+
});
|
|
36
|
+
let d = !1;
|
|
37
|
+
const v = () => {
|
|
38
|
+
d || (d = !0, p(null, n), n.remove());
|
|
39
|
+
}, m = b(
|
|
40
|
+
{
|
|
41
|
+
setup() {
|
|
42
|
+
return () => {
|
|
43
|
+
const a = {
|
|
44
|
+
...l,
|
|
45
|
+
visible: l.visible,
|
|
46
|
+
footer: typeof e.footer == "boolean" ? e.footer : void 0,
|
|
47
|
+
"onUpdate:visible": (t) => {
|
|
48
|
+
l.visible = t;
|
|
49
|
+
},
|
|
50
|
+
onOk: (t) => {
|
|
51
|
+
var o;
|
|
52
|
+
l.visible = !1, (o = e.onOk) == null || o.call(e, t);
|
|
53
|
+
},
|
|
54
|
+
onCancel: (t) => {
|
|
55
|
+
var o;
|
|
56
|
+
l.visible = !1, (o = e.onCancel) == null || o.call(e, t);
|
|
57
|
+
},
|
|
58
|
+
onOpen: () => {
|
|
59
|
+
var t;
|
|
60
|
+
(t = e.onOpen) == null || t.call(e);
|
|
61
|
+
},
|
|
62
|
+
onClose: async () => {
|
|
63
|
+
var t;
|
|
64
|
+
await c(), v(), (t = e.onClose) == null || t.call(e);
|
|
65
|
+
},
|
|
66
|
+
onBeforeOpen: () => {
|
|
67
|
+
var t;
|
|
68
|
+
(t = e.onBeforeOpen) == null || t.call(e);
|
|
69
|
+
},
|
|
70
|
+
onBeforeClose: () => {
|
|
71
|
+
var t;
|
|
72
|
+
(t = e.onBeforeClose) == null || t.call(e);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return y(h, a, {
|
|
76
|
+
default: u(e.content),
|
|
77
|
+
title: u(e.title),
|
|
78
|
+
footer: typeof e.footer != "boolean" ? u(e.footer) : void 0
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
), i = r ?? k._context;
|
|
84
|
+
return i && (m.appContext = i), p(m, n), document.body.appendChild(n), {
|
|
85
|
+
close: () => {
|
|
86
|
+
l.visible = !1;
|
|
87
|
+
},
|
|
88
|
+
update: (a) => {
|
|
89
|
+
Object.entries(a).forEach(([t, o]) => {
|
|
90
|
+
l[t] = o;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const k = {
|
|
96
|
+
open(e, r) {
|
|
97
|
+
return s(e, r);
|
|
98
|
+
},
|
|
99
|
+
confirm(e, r) {
|
|
100
|
+
return s(
|
|
101
|
+
{
|
|
102
|
+
simple: !0,
|
|
103
|
+
messageType: "warning",
|
|
104
|
+
...e
|
|
105
|
+
},
|
|
106
|
+
r
|
|
107
|
+
);
|
|
108
|
+
},
|
|
109
|
+
info(e, r) {
|
|
110
|
+
return s(
|
|
111
|
+
{
|
|
112
|
+
simple: !0,
|
|
113
|
+
hideCancel: !0,
|
|
114
|
+
messageType: "info",
|
|
115
|
+
...e
|
|
116
|
+
},
|
|
117
|
+
r
|
|
118
|
+
);
|
|
119
|
+
},
|
|
120
|
+
success(e, r) {
|
|
121
|
+
return s(
|
|
122
|
+
{
|
|
123
|
+
simple: !0,
|
|
124
|
+
hideCancel: !0,
|
|
125
|
+
messageType: "success",
|
|
126
|
+
...e
|
|
127
|
+
},
|
|
128
|
+
r
|
|
129
|
+
);
|
|
130
|
+
},
|
|
131
|
+
warning(e, r) {
|
|
132
|
+
return s(
|
|
133
|
+
{
|
|
134
|
+
simple: !0,
|
|
135
|
+
hideCancel: !0,
|
|
136
|
+
messageType: "warning",
|
|
137
|
+
...e
|
|
138
|
+
},
|
|
139
|
+
r
|
|
140
|
+
);
|
|
141
|
+
},
|
|
142
|
+
error(e, r) {
|
|
143
|
+
return s(
|
|
144
|
+
{
|
|
145
|
+
simple: !0,
|
|
146
|
+
hideCancel: !0,
|
|
147
|
+
messageType: "error",
|
|
148
|
+
...e
|
|
149
|
+
},
|
|
150
|
+
r
|
|
151
|
+
);
|
|
152
|
+
},
|
|
153
|
+
_context: null
|
|
154
|
+
};
|
|
155
|
+
export {
|
|
156
|
+
k as Modal
|
|
157
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as m, computed as g, onMounted as k, onUpdated as _, onUnmounted as L, openBlock as t, createElementBlock as o, normalizeClass as x, createElementVNode as c, renderSlot as n, createCommentVNode as s, createVNode as b, unref as M } from "vue";
|
|
2
|
+
import u from "../iconfont/generated/icons/guanbi.js";
|
|
3
|
+
import V from "./XIcon.js";
|
|
4
|
+
import "./XIconLite.js";
|
|
5
|
+
import { XIconRegistry as f } from "./x-icon-shared.js";
|
|
6
|
+
const y = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "x-notification__left"
|
|
9
|
+
}, H = { class: "x-notification__icon" }, B = ["innerHTML"], Z = { class: "x-notification__right" }, $ = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "x-notification__title"
|
|
12
|
+
}, T = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "x-notification__content"
|
|
15
|
+
}, I = {
|
|
16
|
+
key: 2,
|
|
17
|
+
class: "x-notification__footer"
|
|
18
|
+
}, N = {
|
|
19
|
+
class: "x-notification__close-icon-wrap",
|
|
20
|
+
role: "button",
|
|
21
|
+
"aria-label": "close"
|
|
22
|
+
}, A = /* @__PURE__ */ m({
|
|
23
|
+
__name: "XNotification",
|
|
24
|
+
props: {
|
|
25
|
+
type: { default: "info" },
|
|
26
|
+
showIcon: { type: Boolean, default: !0 },
|
|
27
|
+
closable: { type: Boolean, default: !1 },
|
|
28
|
+
duration: { default: 3e3 },
|
|
29
|
+
resetOnUpdate: { type: Boolean, default: !1 }
|
|
30
|
+
},
|
|
31
|
+
emits: ["close"],
|
|
32
|
+
setup(i, { emit: h }) {
|
|
33
|
+
const l = i, w = h;
|
|
34
|
+
f.has("guanbi") || f.register("guanbi", {
|
|
35
|
+
viewBox: u.viewBox,
|
|
36
|
+
content: u.content
|
|
37
|
+
});
|
|
38
|
+
const v = {
|
|
39
|
+
info: '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor" stroke-width="4"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44ZM26 14C26 13.4477 25.5523 13 25 13H23C22.4477 13 22 13.4477 22 14V16C22 16.5523 22.4477 17 23 17H25C25.5523 17 26 16.5523 26 16V14ZM26 31H27C27.5523 31 28 31.4477 28 32V34C28 34.5523 27.5523 35 27 35H21C20.4477 35 20 34.5523 20 34V32C20 31.4477 20.4477 31 21 31H22V23C21.4477 23 21 22.5523 21 22V20C21 19.4477 21.4477 19 22 19H25C25.5523 19 26 19.4477 26 20V31Z" fill="currentColor" stroke="none" stroke-width="none" stroke-linecap="butt"></path></svg>',
|
|
40
|
+
success: '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor" stroke-width="4"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44ZM34.2073 19.6214C34.5978 19.2308 34.5978 18.5977 34.2073 18.2071L32.793 16.7929C32.4025 16.4024 31.7694 16.4024 31.3788 16.7929L22.0002 26.1716L17.1215 21.2929C16.7309 20.9024 16.0978 20.9024 15.7073 21.2929L14.293 22.7071C13.9025 23.0977 13.9025 23.7308 14.293 24.1213L21.293 31.1213C21.6836 31.5119 22.3167 31.5119 22.7073 31.1213L34.2073 19.6214Z" fill="currentColor" stroke="none" stroke-width="none" stroke-linecap="butt"></path></svg>',
|
|
41
|
+
warning: '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor" stroke-width="4"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44ZM22 33C22 33.5523 22.4477 34 23 34H25C25.5523 34 26 33.5523 26 33V31C26 30.4477 25.5523 30 25 30H23C22.4477 30 22 30.4477 22 31V33ZM26 15C26 14.4477 25.5523 14 25 14H23C22.4477 14 22 14.4477 22 15L22 27C22 27.5523 22.4477 28 23 28H25C25.5523 28 26 27.5523 26 27L26 15Z" fill="currentColor" stroke="none" stroke-width="none" stroke-linecap="butt"></path></svg>',
|
|
42
|
+
error: '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor" stroke-width="4"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44ZM28.9547 16.2287L24.005 21.1785L19.0552 16.2287C18.6647 15.8382 18.0315 15.8382 17.641 16.2287L16.2268 17.6429C15.8363 18.0335 15.8363 18.6666 16.2268 19.0571L21.1765 24.0069L16.2268 28.9566C15.8363 29.3472 15.8363 29.9803 16.2268 30.3708L17.641 31.7851C18.0315 32.1756 18.6647 32.1756 19.0552 31.7851L24.005 26.8353L28.9547 31.7851C29.3452 32.1756 29.9784 32.1756 30.3689 31.7851L31.7831 30.3708C32.1737 29.9803 32.1737 29.3472 31.7831 28.9566L26.8334 24.0069L31.7831 19.0571C32.1737 18.6666 32.1737 18.0335 31.7831 17.6429L30.3689 16.2287C29.9784 15.8382 29.3452 15.8382 28.9547 16.2287Z" fill="currentColor" stroke="none" stroke-width="none" stroke-linecap="butt"></path></svg>'
|
|
43
|
+
}, p = g(() => v[l.type]);
|
|
44
|
+
let r = 0;
|
|
45
|
+
const a = () => {
|
|
46
|
+
w("close");
|
|
47
|
+
}, d = () => {
|
|
48
|
+
r && (window.clearTimeout(r), r = 0);
|
|
49
|
+
}, C = () => {
|
|
50
|
+
d(), l.duration > 0 && (r = window.setTimeout(a, l.duration));
|
|
51
|
+
};
|
|
52
|
+
return k(() => {
|
|
53
|
+
C();
|
|
54
|
+
}), _(() => {
|
|
55
|
+
l.resetOnUpdate && C();
|
|
56
|
+
}), L(() => {
|
|
57
|
+
d();
|
|
58
|
+
}), (e, S) => (t(), o("li", {
|
|
59
|
+
role: "alert",
|
|
60
|
+
class: x(["x-notification", [
|
|
61
|
+
`x-notification--${i.type}`,
|
|
62
|
+
{ "x-notification--closable": i.closable }
|
|
63
|
+
]])
|
|
64
|
+
}, [
|
|
65
|
+
i.showIcon ? (t(), o("div", y, [
|
|
66
|
+
c("div", H, [
|
|
67
|
+
n(e.$slots, "icon", {}, () => [
|
|
68
|
+
c("span", {
|
|
69
|
+
class: "x-notification__status-svg",
|
|
70
|
+
innerHTML: p.value
|
|
71
|
+
}, null, 8, B)
|
|
72
|
+
], !0)
|
|
73
|
+
])
|
|
74
|
+
])) : s("", !0),
|
|
75
|
+
c("div", Z, [
|
|
76
|
+
e.$slots.default ? (t(), o("div", $, [
|
|
77
|
+
n(e.$slots, "default", {}, void 0, !0)
|
|
78
|
+
])) : s("", !0),
|
|
79
|
+
e.$slots.content ? (t(), o("div", T, [
|
|
80
|
+
n(e.$slots, "content", {}, void 0, !0)
|
|
81
|
+
])) : s("", !0),
|
|
82
|
+
e.$slots.footer ? (t(), o("div", I, [
|
|
83
|
+
n(e.$slots, "footer", {}, void 0, !0)
|
|
84
|
+
])) : s("", !0)
|
|
85
|
+
]),
|
|
86
|
+
i.closable ? (t(), o("div", {
|
|
87
|
+
key: 1,
|
|
88
|
+
class: "x-notification__close-btn",
|
|
89
|
+
onClick: a
|
|
90
|
+
}, [
|
|
91
|
+
n(e.$slots, "closeIconElement", {}, () => [
|
|
92
|
+
c("span", N, [
|
|
93
|
+
n(e.$slots, "closeIcon", {}, () => [
|
|
94
|
+
b(M(V), {
|
|
95
|
+
name: "guanbi",
|
|
96
|
+
size: 12
|
|
97
|
+
})
|
|
98
|
+
], !0)
|
|
99
|
+
])
|
|
100
|
+
], !0)
|
|
101
|
+
])) : s("", !0)
|
|
102
|
+
], 2));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
A as default
|
|
107
|
+
};
|