@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,320 @@
|
|
|
1
|
+
import { defineComponent as ge, ref as k, computed as a, watch as R, onMounted as Be, onBeforeUnmount as xe, openBlock as i, createBlock as U, Teleport as Te, withDirectives as V, createElementBlock as p, mergeProps as $, createVNode as x, Transition as Z, withCtx as T, vShow as E, createCommentVNode as c, createElementVNode as J, normalizeStyle as Q, normalizeClass as W, renderSlot as S, createTextVNode as D, toDisplayString as F, unref as Se } from "vue";
|
|
2
|
+
import Y from "./XButton.vue.js";
|
|
3
|
+
import Oe from "./XIcon.js";
|
|
4
|
+
import { useXI18n as Me } from "../composables/i18n.js";
|
|
5
|
+
const Le = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "x-drawer-header"
|
|
8
|
+
}, Pe = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "x-drawer-title"
|
|
11
|
+
}, Ve = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "x-drawer-footer"
|
|
14
|
+
}, ze = /* @__PURE__ */ ge({
|
|
15
|
+
inheritAttrs: !1,
|
|
16
|
+
__name: "XDrawer",
|
|
17
|
+
props: {
|
|
18
|
+
visible: { type: Boolean, default: void 0 },
|
|
19
|
+
open: { type: Boolean, default: void 0 },
|
|
20
|
+
defaultVisible: { type: Boolean, default: !1 },
|
|
21
|
+
placement: { default: "right" },
|
|
22
|
+
title: { default: "" },
|
|
23
|
+
mask: { type: Boolean, default: !0 },
|
|
24
|
+
maskClosable: { type: Boolean, default: !0 },
|
|
25
|
+
closable: { type: Boolean, default: !0 },
|
|
26
|
+
okText: { default: void 0 },
|
|
27
|
+
cancelText: { default: void 0 },
|
|
28
|
+
okLoading: { type: Boolean, default: !1 },
|
|
29
|
+
okButtonProps: { default: void 0 },
|
|
30
|
+
cancelButtonProps: { default: void 0 },
|
|
31
|
+
unmountOnClose: { type: Boolean, default: !1 },
|
|
32
|
+
width: { default: 250 },
|
|
33
|
+
height: { default: 250 },
|
|
34
|
+
popupContainer: { default: "body" },
|
|
35
|
+
drawerStyle: { default: void 0 },
|
|
36
|
+
bodyClass: { default: void 0 },
|
|
37
|
+
bodyStyle: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
38
|
+
onBeforeOk: { type: Function, default: void 0 },
|
|
39
|
+
onBeforeCancel: { type: Function, default: void 0 },
|
|
40
|
+
beforeOk: { type: Function, default: void 0 },
|
|
41
|
+
beforeClose: { type: Function, default: void 0 },
|
|
42
|
+
escToClose: { type: Boolean, default: !0 },
|
|
43
|
+
renderToBody: { type: Boolean, default: !0 },
|
|
44
|
+
header: { type: Boolean, default: !0 },
|
|
45
|
+
footer: { type: Boolean, default: !0 },
|
|
46
|
+
showFooter: { type: Boolean, default: void 0 },
|
|
47
|
+
hideCancel: { type: Boolean, default: !1 }
|
|
48
|
+
},
|
|
49
|
+
emits: ["update:visible", "update:open", "ok", "cancel", "open", "close", "beforeOpen", "beforeClose"],
|
|
50
|
+
setup(l, { emit: _ }) {
|
|
51
|
+
function v() {
|
|
52
|
+
const e = globalThis;
|
|
53
|
+
return e.__xDrawerGlobalState__ || (e.__xDrawerGlobalState__ = {
|
|
54
|
+
stack: [],
|
|
55
|
+
overflowMap: /* @__PURE__ */ new Map()
|
|
56
|
+
}), e.__xDrawerGlobalState__;
|
|
57
|
+
}
|
|
58
|
+
function z(e) {
|
|
59
|
+
return !!e && typeof e.then == "function";
|
|
60
|
+
}
|
|
61
|
+
function I(e) {
|
|
62
|
+
return typeof e == "number" ? `${e}px` : e;
|
|
63
|
+
}
|
|
64
|
+
const t = l, s = _, { t: G } = Me(), N = k(t.defaultVisible), b = k(!!(t.visible ?? t.open ?? t.defaultVisible)), y = k(!1), h = k(), m = `x-drawer-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
65
|
+
let C = !1, f = !1, O = 0;
|
|
66
|
+
const A = a(() => t.visible ?? t.open), r = a(() => A.value ?? N.value), ee = a(() => !t.unmountOnClose || r.value || b.value), te = a(() => t.showFooter ?? t.footer), oe = a(() => t.okLoading || y.value), ne = a(() => t.okText || G("drawer.okText", void 0, "确定")), ae = a(() => t.cancelText || G("drawer.cancelText", void 0, "取消")), le = a(() => t.okButtonProps ?? {}), re = a(() => t.cancelButtonProps ?? {}), se = a(() => [
|
|
67
|
+
"x-drawer-container",
|
|
68
|
+
{
|
|
69
|
+
"x-drawer-penetrable": !t.mask
|
|
70
|
+
}
|
|
71
|
+
]), d = k("body"), ue = a(() => typeof document > "u" ? !0 : h.value === document.body), ie = a(() => {
|
|
72
|
+
const o = v().stack.indexOf(m);
|
|
73
|
+
return o >= 0 ? 1e3 + o : 1e3;
|
|
74
|
+
}), fe = a(() => ue.value ? {
|
|
75
|
+
zIndex: String(ie.value)
|
|
76
|
+
} : {
|
|
77
|
+
zIndex: "inherit",
|
|
78
|
+
position: "absolute"
|
|
79
|
+
}), de = a(() => ({
|
|
80
|
+
...t.drawerStyle ?? {},
|
|
81
|
+
"--x-drawer-size-width": I(t.width),
|
|
82
|
+
"--x-drawer-size-height": I(t.height)
|
|
83
|
+
}));
|
|
84
|
+
function M() {
|
|
85
|
+
if (typeof t.popupContainer == "string" && t.popupContainer.trim()) {
|
|
86
|
+
if (typeof document < "u") {
|
|
87
|
+
const e = document.querySelector(t.popupContainer);
|
|
88
|
+
if (e instanceof HTMLElement) {
|
|
89
|
+
d.value = e;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
d.value = "body";
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (typeof HTMLElement < "u" && t.popupContainer instanceof HTMLElement) {
|
|
97
|
+
d.value = t.popupContainer;
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
d.value = "body";
|
|
101
|
+
}
|
|
102
|
+
function ce() {
|
|
103
|
+
if (!(typeof document > "u"))
|
|
104
|
+
return d.value instanceof HTMLElement ? d.value : document.body;
|
|
105
|
+
}
|
|
106
|
+
function g() {
|
|
107
|
+
h.value = ce();
|
|
108
|
+
}
|
|
109
|
+
function H() {
|
|
110
|
+
if (C)
|
|
111
|
+
return;
|
|
112
|
+
const e = v();
|
|
113
|
+
e.stack.includes(m) || e.stack.push(m), C = !0;
|
|
114
|
+
}
|
|
115
|
+
function X() {
|
|
116
|
+
if (!C)
|
|
117
|
+
return;
|
|
118
|
+
const e = v();
|
|
119
|
+
e.stack = e.stack.filter((o) => o !== m), C = !1;
|
|
120
|
+
}
|
|
121
|
+
function ve() {
|
|
122
|
+
const e = v();
|
|
123
|
+
return e.stack[e.stack.length - 1] === m;
|
|
124
|
+
}
|
|
125
|
+
function L() {
|
|
126
|
+
if (f)
|
|
127
|
+
return;
|
|
128
|
+
const e = h.value;
|
|
129
|
+
if (!e)
|
|
130
|
+
return;
|
|
131
|
+
const o = v(), n = o.overflowMap.get(e) ?? {
|
|
132
|
+
count: 0,
|
|
133
|
+
overflow: e.style.overflow
|
|
134
|
+
};
|
|
135
|
+
n.count === 0 && (n.overflow = e.style.overflow, e.style.overflow = "hidden"), n.count += 1, o.overflowMap.set(e, n), f = !0;
|
|
136
|
+
}
|
|
137
|
+
function P() {
|
|
138
|
+
if (!f)
|
|
139
|
+
return;
|
|
140
|
+
const e = h.value;
|
|
141
|
+
if (!e) {
|
|
142
|
+
f = !1;
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const o = v(), n = o.overflowMap.get(e);
|
|
146
|
+
if (!n) {
|
|
147
|
+
f = !1;
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
n.count = Math.max(0, n.count - 1), n.count === 0 ? (e.style.overflow = n.overflow, o.overflowMap.delete(e)) : o.overflowMap.set(e, n), f = !1;
|
|
151
|
+
}
|
|
152
|
+
function pe(e) {
|
|
153
|
+
A.value === void 0 && (N.value = e), s("update:visible", e), s("update:open", e);
|
|
154
|
+
}
|
|
155
|
+
function j() {
|
|
156
|
+
O += 1, y.value = !1, pe(!1);
|
|
157
|
+
}
|
|
158
|
+
async function ye() {
|
|
159
|
+
return t.onBeforeOk ? await new Promise((o) => {
|
|
160
|
+
var K;
|
|
161
|
+
let n = !1;
|
|
162
|
+
const w = (u = !0) => {
|
|
163
|
+
n || (n = !0, o(u));
|
|
164
|
+
};
|
|
165
|
+
try {
|
|
166
|
+
const u = (K = t.onBeforeOk) == null ? void 0 : K.call(t, w);
|
|
167
|
+
if ((z(u) || typeof u != "boolean") && (y.value = !0), z(u)) {
|
|
168
|
+
u.then((Ce) => {
|
|
169
|
+
n || w(Ce ?? !0);
|
|
170
|
+
}).catch(() => {
|
|
171
|
+
n || w(!1);
|
|
172
|
+
});
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
typeof u == "boolean" && w(u);
|
|
176
|
+
} catch {
|
|
177
|
+
w(!1);
|
|
178
|
+
}
|
|
179
|
+
}) : t.beforeOk ? await Promise.resolve(t.beforeOk()) !== !1 : !0;
|
|
180
|
+
}
|
|
181
|
+
async function me(e) {
|
|
182
|
+
const o = O, n = await ye();
|
|
183
|
+
if (o === O) {
|
|
184
|
+
if (!n) {
|
|
185
|
+
y.value && (y.value = !1);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
s("ok", e), j();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
async function we(e) {
|
|
192
|
+
return !(t.onBeforeCancel && (t.onBeforeCancel() ?? !1) === !1 || t.beforeClose && await Promise.resolve(t.beforeClose(e)) === !1);
|
|
193
|
+
}
|
|
194
|
+
async function B(e, o) {
|
|
195
|
+
await we(e) && (s("cancel", o), j());
|
|
196
|
+
}
|
|
197
|
+
function ke(e) {
|
|
198
|
+
t.maskClosable && B("mask", e);
|
|
199
|
+
}
|
|
200
|
+
function q(e) {
|
|
201
|
+
!t.escToClose || !r.value || !ve() || e.key === "Escape" && B("esc", e);
|
|
202
|
+
}
|
|
203
|
+
function be() {
|
|
204
|
+
r.value && s("open");
|
|
205
|
+
}
|
|
206
|
+
function he() {
|
|
207
|
+
r.value || (b.value = !1, s("close"));
|
|
208
|
+
}
|
|
209
|
+
return R(r, (e, o) => {
|
|
210
|
+
e !== o && (e ? (b.value = !0, M(), g(), H(), L(), s("beforeOpen")) : (s("beforeClose"), X(), P()));
|
|
211
|
+
}), R(
|
|
212
|
+
() => t.popupContainer,
|
|
213
|
+
() => {
|
|
214
|
+
if (M(), !r.value) {
|
|
215
|
+
g();
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
f && P(), g(), L();
|
|
219
|
+
}
|
|
220
|
+
), Be(() => {
|
|
221
|
+
M(), g(), r.value && (H(), L()), typeof window < "u" && window.addEventListener("keydown", q);
|
|
222
|
+
}), xe(() => {
|
|
223
|
+
typeof window < "u" && window.removeEventListener("keydown", q), X(), P();
|
|
224
|
+
}), (e, o) => (i(), U(Te, {
|
|
225
|
+
to: d.value,
|
|
226
|
+
disabled: !l.renderToBody
|
|
227
|
+
}, [
|
|
228
|
+
ee.value ? V((i(), p("div", $({
|
|
229
|
+
key: 0,
|
|
230
|
+
class: se.value,
|
|
231
|
+
style: fe.value
|
|
232
|
+
}, e.$attrs), [
|
|
233
|
+
x(Z, {
|
|
234
|
+
name: "fade-drawer",
|
|
235
|
+
appear: ""
|
|
236
|
+
}, {
|
|
237
|
+
default: T(() => [
|
|
238
|
+
l.mask ? V((i(), p("div", {
|
|
239
|
+
key: 0,
|
|
240
|
+
class: "x-drawer-mask",
|
|
241
|
+
onClick: ke
|
|
242
|
+
}, null, 512)), [
|
|
243
|
+
[E, r.value]
|
|
244
|
+
]) : c("", !0)
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}),
|
|
248
|
+
x(Z, {
|
|
249
|
+
name: `slide-${l.placement}-drawer`,
|
|
250
|
+
appear: "",
|
|
251
|
+
onAfterEnter: be,
|
|
252
|
+
onAfterLeave: he
|
|
253
|
+
}, {
|
|
254
|
+
default: T(() => [
|
|
255
|
+
V(J("section", {
|
|
256
|
+
class: W(["x-drawer", `x-drawer--${l.placement}`]),
|
|
257
|
+
style: Q(de.value),
|
|
258
|
+
role: "dialog",
|
|
259
|
+
"aria-modal": "true"
|
|
260
|
+
}, [
|
|
261
|
+
l.header ? (i(), p("header", Le, [
|
|
262
|
+
S(e.$slots, "header", {}, () => [
|
|
263
|
+
e.$slots.title || l.title ? (i(), p("div", Pe, [
|
|
264
|
+
S(e.$slots, "title", {}, () => [
|
|
265
|
+
D(F(l.title), 1)
|
|
266
|
+
], !0)
|
|
267
|
+
])) : c("", !0),
|
|
268
|
+
l.closable ? (i(), p("button", {
|
|
269
|
+
key: 1,
|
|
270
|
+
type: "button",
|
|
271
|
+
class: "x-drawer-close-btn",
|
|
272
|
+
"aria-label": "Close",
|
|
273
|
+
onClick: o[0] || (o[0] = (n) => B("close", n))
|
|
274
|
+
}, [
|
|
275
|
+
x(Se(Oe), { name: "guanbi" })
|
|
276
|
+
])) : c("", !0)
|
|
277
|
+
], !0)
|
|
278
|
+
])) : c("", !0),
|
|
279
|
+
J("div", {
|
|
280
|
+
class: W(["x-drawer-body", l.bodyClass]),
|
|
281
|
+
style: Q(l.bodyStyle)
|
|
282
|
+
}, [
|
|
283
|
+
S(e.$slots, "default", {}, void 0, !0)
|
|
284
|
+
], 6),
|
|
285
|
+
te.value ? (i(), p("footer", Ve, [
|
|
286
|
+
S(e.$slots, "footer", {}, () => [
|
|
287
|
+
l.hideCancel ? c("", !0) : (i(), U(Y, $({ key: 0 }, re.value, {
|
|
288
|
+
onClick: o[1] || (o[1] = (n) => B("cancel", n))
|
|
289
|
+
}), {
|
|
290
|
+
default: T(() => [
|
|
291
|
+
D(F(ae.value), 1)
|
|
292
|
+
]),
|
|
293
|
+
_: 1
|
|
294
|
+
}, 16)),
|
|
295
|
+
x(Y, $({
|
|
296
|
+
type: "primary",
|
|
297
|
+
loading: oe.value
|
|
298
|
+
}, le.value, { onClick: me }), {
|
|
299
|
+
default: T(() => [
|
|
300
|
+
D(F(ne.value), 1)
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}, 16, ["loading"])
|
|
304
|
+
], !0)
|
|
305
|
+
])) : c("", !0)
|
|
306
|
+
], 6), [
|
|
307
|
+
[E, r.value]
|
|
308
|
+
])
|
|
309
|
+
]),
|
|
310
|
+
_: 3
|
|
311
|
+
}, 8, ["name"])
|
|
312
|
+
], 16)), [
|
|
313
|
+
[E, r.value || b.value]
|
|
314
|
+
]) : c("", !0)
|
|
315
|
+
], 8, ["to", "disabled"]));
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
export {
|
|
319
|
+
ze as default
|
|
320
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AppContext, CSSProperties, StyleValue, VNodeChild } from 'vue';
|
|
2
|
+
import { XThemeMode } from '../composables/theme-context';
|
|
2
3
|
type DrawerRenderContent = VNodeChild | (() => VNodeChild);
|
|
3
4
|
interface DrawerButtonProps {
|
|
4
5
|
[key: string]: unknown;
|
|
5
6
|
}
|
|
6
7
|
interface DrawerConfig {
|
|
8
|
+
theme?: XThemeMode;
|
|
7
9
|
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
8
10
|
title?: DrawerRenderContent;
|
|
9
11
|
content: DrawerRenderContent;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { reactive as C, createVNode as h, h as m, render as v } from "vue";
|
|
2
|
+
import O from "./XDrawer.vue.js";
|
|
3
|
+
function l(e) {
|
|
4
|
+
if (e != null)
|
|
5
|
+
return typeof e == "function" ? e : () => e;
|
|
6
|
+
}
|
|
7
|
+
function y(e, s) {
|
|
8
|
+
const a = document.createElement("div");
|
|
9
|
+
a.className = "x-drawer-service-container";
|
|
10
|
+
const t = C({
|
|
11
|
+
visible: !0,
|
|
12
|
+
mask: !0,
|
|
13
|
+
maskClosable: !0,
|
|
14
|
+
closable: !0,
|
|
15
|
+
footer: !0,
|
|
16
|
+
header: !0,
|
|
17
|
+
hideCancel: !1,
|
|
18
|
+
escToClose: !0,
|
|
19
|
+
renderToBody: !1,
|
|
20
|
+
unmountOnClose: !0,
|
|
21
|
+
...e
|
|
22
|
+
});
|
|
23
|
+
let u = !1;
|
|
24
|
+
const b = () => {
|
|
25
|
+
u || (u = !0, v(null, a), a.remove());
|
|
26
|
+
}, n = h(
|
|
27
|
+
{
|
|
28
|
+
setup() {
|
|
29
|
+
return () => {
|
|
30
|
+
const d = {
|
|
31
|
+
...t,
|
|
32
|
+
visible: t.visible,
|
|
33
|
+
onBeforeOk: e.onBeforeOk,
|
|
34
|
+
onBeforeCancel: e.onBeforeCancel,
|
|
35
|
+
header: typeof e.header == "boolean" ? e.header : t.header,
|
|
36
|
+
footer: typeof e.footer == "boolean" ? e.footer : t.footer,
|
|
37
|
+
"onUpdate:visible": (r) => {
|
|
38
|
+
t.visible = r;
|
|
39
|
+
},
|
|
40
|
+
"onUpdate:open": (r) => {
|
|
41
|
+
t.visible = r;
|
|
42
|
+
},
|
|
43
|
+
onOk: (r) => {
|
|
44
|
+
var o;
|
|
45
|
+
(o = e.onOk) == null || o.call(e, r);
|
|
46
|
+
},
|
|
47
|
+
onCancel: (r) => {
|
|
48
|
+
var o;
|
|
49
|
+
(o = e.onCancel) == null || o.call(e, r);
|
|
50
|
+
},
|
|
51
|
+
onOpen: () => {
|
|
52
|
+
var r;
|
|
53
|
+
(r = e.onOpen) == null || r.call(e);
|
|
54
|
+
},
|
|
55
|
+
onClose: () => {
|
|
56
|
+
var r;
|
|
57
|
+
b(), (r = e.onClose) == null || r.call(e);
|
|
58
|
+
},
|
|
59
|
+
onBeforeOpen: () => {
|
|
60
|
+
var r;
|
|
61
|
+
(r = e.onBeforeOpen) == null || r.call(e);
|
|
62
|
+
},
|
|
63
|
+
onBeforeClose: () => {
|
|
64
|
+
var r;
|
|
65
|
+
(r = e.onBeforeClose) == null || r.call(e);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return m(O, d, {
|
|
69
|
+
default: l(e.content),
|
|
70
|
+
title: l(e.title),
|
|
71
|
+
header: typeof e.header != "boolean" ? l(e.header) : void 0,
|
|
72
|
+
footer: typeof e.footer != "boolean" ? l(e.footer) : void 0
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
), p = s ?? B._context;
|
|
78
|
+
return p && (n.appContext = p), v(n, a), document.body.appendChild(a), {
|
|
79
|
+
close: () => {
|
|
80
|
+
t.visible = !1;
|
|
81
|
+
},
|
|
82
|
+
update: (d) => {
|
|
83
|
+
Object.entries(d).forEach(([r, o]) => {
|
|
84
|
+
t[r] = o;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
const B = {
|
|
90
|
+
open(e, s) {
|
|
91
|
+
return y(e, s);
|
|
92
|
+
},
|
|
93
|
+
_context: null
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
B as Drawer
|
|
97
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
1
2
|
import { XPopupPlacement } from '../composables/popup';
|
|
2
3
|
import { XDropdownValue } from './x-dropdown-context';
|
|
3
4
|
type XDropdownTrigger = 'click' | 'hover' | 'focus' | 'contextMenu';
|
|
@@ -8,6 +9,12 @@ export interface XDropdownOption {
|
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
icon?: string;
|
|
10
11
|
}
|
|
12
|
+
type XDropdownSlots = {
|
|
13
|
+
default?: (_: Record<string, never>) => VNode[];
|
|
14
|
+
trigger?: (_: Record<string, never>) => VNode[];
|
|
15
|
+
content?: (_: Record<string, never>) => VNode[];
|
|
16
|
+
footer?: (_: Record<string, never>) => VNode[];
|
|
17
|
+
};
|
|
11
18
|
type __VLS_Props = {
|
|
12
19
|
popupVisible?: boolean;
|
|
13
20
|
defaultPopupVisible?: boolean;
|
|
@@ -25,13 +32,7 @@ type __VLS_Props = {
|
|
|
25
32
|
};
|
|
26
33
|
declare function __VLS_template(): {
|
|
27
34
|
attrs: Partial<{}>;
|
|
28
|
-
slots:
|
|
29
|
-
trigger?(_: {}): any;
|
|
30
|
-
default?(_: {}): any;
|
|
31
|
-
default?(_: {}): any;
|
|
32
|
-
content?(_: {}): any;
|
|
33
|
-
footer?(_: {}): any;
|
|
34
|
-
};
|
|
35
|
+
slots: Readonly<XDropdownSlots> & XDropdownSlots;
|
|
35
36
|
refs: {};
|
|
36
37
|
rootEl: any;
|
|
37
38
|
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { defineComponent as A, useAttrs as M, useSlots as E, ref as I, computed as o, provide as H, openBlock as r, createBlock as d, mergeProps as X, unref as V, withCtx as l, createElementVNode as z, renderSlot as s, createCommentVNode as k, createSlots as C, createElementBlock as L, Fragment as j, renderList as F, createTextVNode as K, toDisplayString as R, createVNode as W, Comment as q } from "vue";
|
|
2
|
+
import G from "./XIcon.js";
|
|
3
|
+
import J from "./XDoption.vue.js";
|
|
4
|
+
import B from "./XDropdownPanel.vue.js";
|
|
5
|
+
import Q from "./XTrigger.vue.js";
|
|
6
|
+
import { xDropdownInjectionKey as U } from "./x-dropdown-context.js";
|
|
7
|
+
const Y = { class: "x-dropdown__trigger" }, le = /* @__PURE__ */ A({
|
|
8
|
+
name: "XDropdown",
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
__name: "XDropdown",
|
|
11
|
+
props: {
|
|
12
|
+
popupVisible: { type: Boolean, default: void 0 },
|
|
13
|
+
defaultPopupVisible: { type: Boolean, default: !1 },
|
|
14
|
+
open: { type: Boolean, default: void 0 },
|
|
15
|
+
defaultOpen: { type: Boolean, default: !1 },
|
|
16
|
+
trigger: { default: "click" },
|
|
17
|
+
position: { default: "bottom" },
|
|
18
|
+
placement: { default: void 0 },
|
|
19
|
+
popupContainer: { default: void 0 },
|
|
20
|
+
popupMaxHeight: { type: [Boolean, Number], default: !0 },
|
|
21
|
+
hideOnSelect: { type: Boolean, default: !0 },
|
|
22
|
+
options: { default: () => [] },
|
|
23
|
+
disabled: { type: Boolean, default: !1 },
|
|
24
|
+
alignPoint: { type: Boolean, default: !1 }
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:popupVisible", "popupVisibleChange", "popup-visible-change", "update:open", "select"],
|
|
27
|
+
setup(p, { emit: P }) {
|
|
28
|
+
const O = {
|
|
29
|
+
top: "top",
|
|
30
|
+
tl: "top-start",
|
|
31
|
+
tr: "top-end",
|
|
32
|
+
bottom: "bottom",
|
|
33
|
+
bl: "bottom-start",
|
|
34
|
+
br: "bottom-end"
|
|
35
|
+
}, t = p, u = P, S = M(), n = E(), g = I(!!(t.defaultPopupVisible ?? t.defaultOpen)), _ = o(() => t.popupVisible !== void 0 || t.open !== void 0), $ = o(() => t.popupVisible !== void 0 ? !!t.popupVisible : t.open !== void 0 ? !!t.open : g.value), D = o(() => t.placement ? t.placement : O[t.position]), v = o(() => t.options ?? []);
|
|
36
|
+
function f(e) {
|
|
37
|
+
return e != null && e.length ? e.some((i) => i.type === q ? !1 : typeof i.children == "string" ? i.children.trim().length > 0 : !0) : !1;
|
|
38
|
+
}
|
|
39
|
+
const c = o(() => {
|
|
40
|
+
var e;
|
|
41
|
+
return f((e = n.trigger) == null ? void 0 : e.call(n, {}));
|
|
42
|
+
}), m = o(() => {
|
|
43
|
+
var e;
|
|
44
|
+
return f((e = n.content) == null ? void 0 : e.call(n, {}));
|
|
45
|
+
}), b = o(() => {
|
|
46
|
+
var e;
|
|
47
|
+
return f((e = n.default) == null ? void 0 : e.call(n, {}));
|
|
48
|
+
}), h = o(() => !m.value && c.value && b.value), N = o(() => !c.value && b.value && !h.value);
|
|
49
|
+
function y(e) {
|
|
50
|
+
t.disabled && e || (_.value || (g.value = e), u("update:popupVisible", e), u("popupVisibleChange", e), u("popup-visible-change", e), u("update:open", e));
|
|
51
|
+
}
|
|
52
|
+
function w(e) {
|
|
53
|
+
y(e);
|
|
54
|
+
}
|
|
55
|
+
function x(e, i) {
|
|
56
|
+
u("select", e, i), t.hideOnSelect && y(!1);
|
|
57
|
+
}
|
|
58
|
+
return H(U, {
|
|
59
|
+
popupMaxHeight: o(() => t.popupMaxHeight),
|
|
60
|
+
onOptionClick: x
|
|
61
|
+
}), (e, i) => (r(), d(Q, X(V(S), {
|
|
62
|
+
"popup-visible": $.value,
|
|
63
|
+
"animation-name": "x-fade",
|
|
64
|
+
"auto-fit-transform-origin": "",
|
|
65
|
+
trigger: p.trigger,
|
|
66
|
+
position: D.value,
|
|
67
|
+
"popup-offset": 4,
|
|
68
|
+
"popup-container": p.popupContainer,
|
|
69
|
+
disabled: p.disabled,
|
|
70
|
+
"align-point": p.alignPoint,
|
|
71
|
+
"opened-class": "x-dropdown-open",
|
|
72
|
+
"content-class": "x-dropdown__popup",
|
|
73
|
+
onPopupVisibleChange: w
|
|
74
|
+
}), {
|
|
75
|
+
content: l(() => [
|
|
76
|
+
m.value || h.value ? (r(), d(B, { key: 0 }, C({
|
|
77
|
+
default: l(() => [
|
|
78
|
+
m.value ? s(e.$slots, "content", { key: 0 }) : s(e.$slots, "default", { key: 1 })
|
|
79
|
+
]),
|
|
80
|
+
_: 2
|
|
81
|
+
}, [
|
|
82
|
+
e.$slots.footer ? {
|
|
83
|
+
name: "footer",
|
|
84
|
+
fn: l(() => [
|
|
85
|
+
s(e.$slots, "footer")
|
|
86
|
+
]),
|
|
87
|
+
key: "0"
|
|
88
|
+
} : void 0
|
|
89
|
+
]), 1024)) : v.value.length > 0 ? (r(), d(B, { key: 1 }, {
|
|
90
|
+
default: l(() => [
|
|
91
|
+
(r(!0), L(j, null, F(v.value, (a, T) => (r(), d(J, {
|
|
92
|
+
key: a.value === void 0 ? `option-${T}` : String(a.value),
|
|
93
|
+
value: a.value,
|
|
94
|
+
disabled: a.disabled
|
|
95
|
+
}, C({
|
|
96
|
+
default: l(() => [
|
|
97
|
+
K(" " + R(a.label ?? a.value), 1)
|
|
98
|
+
]),
|
|
99
|
+
_: 2
|
|
100
|
+
}, [
|
|
101
|
+
a.icon ? {
|
|
102
|
+
name: "icon",
|
|
103
|
+
fn: l(() => [
|
|
104
|
+
W(V(G), {
|
|
105
|
+
name: a.icon,
|
|
106
|
+
size: 14
|
|
107
|
+
}, null, 8, ["name"])
|
|
108
|
+
]),
|
|
109
|
+
key: "0"
|
|
110
|
+
} : void 0
|
|
111
|
+
]), 1032, ["value", "disabled"]))), 128))
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
})) : k("", !0)
|
|
115
|
+
]),
|
|
116
|
+
default: l(() => [
|
|
117
|
+
z("span", Y, [
|
|
118
|
+
c.value ? s(e.$slots, "trigger", { key: 0 }) : N.value ? s(e.$slots, "default", { key: 1 }) : k("", !0)
|
|
119
|
+
])
|
|
120
|
+
]),
|
|
121
|
+
_: 3
|
|
122
|
+
}, 16, ["popup-visible", "trigger", "position", "popup-container", "disabled", "align-point"]));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
export {
|
|
126
|
+
le as default
|
|
127
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineComponent as V, ref as v, computed as s, openBlock as B, createBlock as h, withCtx as l, createVNode as n, mergeProps as y, renderSlot as p, unref as C } from "vue";
|
|
2
|
+
import c from "./XButton.vue.js";
|
|
3
|
+
import P from "./XButtonGroup.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import k from "./XDropdown.vue.js";
|
|
6
|
+
import z from "./XIcon.js";
|
|
7
|
+
const D = /* @__PURE__ */ V({
|
|
8
|
+
name: "XDropdownButton",
|
|
9
|
+
__name: "XDropdownButton",
|
|
10
|
+
props: {
|
|
11
|
+
popupVisible: { type: Boolean, default: void 0 },
|
|
12
|
+
defaultPopupVisible: { type: Boolean, default: !1 },
|
|
13
|
+
open: { type: Boolean, default: void 0 },
|
|
14
|
+
defaultOpen: { type: Boolean, default: !1 },
|
|
15
|
+
trigger: { default: "click" },
|
|
16
|
+
position: { default: "br" },
|
|
17
|
+
popupContainer: { default: void 0 },
|
|
18
|
+
disabled: { type: Boolean, default: !1 },
|
|
19
|
+
type: { default: void 0 },
|
|
20
|
+
size: { default: void 0 },
|
|
21
|
+
buttonProps: { default: void 0 },
|
|
22
|
+
hideOnSelect: { type: Boolean, default: !0 }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:popupVisible", "popupVisibleChange", "popup-visible-change", "update:open", "click", "select"],
|
|
25
|
+
setup(e, { emit: f }) {
|
|
26
|
+
const t = e, i = f, a = v(!!(t.defaultPopupVisible ?? t.defaultOpen)), r = s(() => t.popupVisible !== void 0 || t.open !== void 0), u = s(() => t.popupVisible !== void 0 ? !!t.popupVisible : t.open !== void 0 ? !!t.open : a.value);
|
|
27
|
+
function b(o) {
|
|
28
|
+
r.value || (a.value = o), i("update:popupVisible", o), i("popupVisibleChange", o), i("popup-visible-change", o), i("update:open", o);
|
|
29
|
+
}
|
|
30
|
+
function m(o) {
|
|
31
|
+
i("click", o);
|
|
32
|
+
}
|
|
33
|
+
function g(o, d) {
|
|
34
|
+
i("select", o, d);
|
|
35
|
+
}
|
|
36
|
+
return (o, d) => (B(), h(P, null, {
|
|
37
|
+
default: l(() => [
|
|
38
|
+
n(c, y({
|
|
39
|
+
size: e.size,
|
|
40
|
+
type: e.type,
|
|
41
|
+
disabled: e.disabled
|
|
42
|
+
}, e.buttonProps, { onClick: m }), {
|
|
43
|
+
default: l(() => [
|
|
44
|
+
p(o.$slots, "default")
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 16, ["size", "type", "disabled"]),
|
|
48
|
+
n(k, {
|
|
49
|
+
"popup-visible": u.value,
|
|
50
|
+
trigger: e.trigger,
|
|
51
|
+
position: e.position,
|
|
52
|
+
"popup-container": e.popupContainer,
|
|
53
|
+
"hide-on-select": e.hideOnSelect,
|
|
54
|
+
disabled: e.disabled,
|
|
55
|
+
onSelect: g,
|
|
56
|
+
onPopupVisibleChange: b
|
|
57
|
+
}, {
|
|
58
|
+
default: l(() => [
|
|
59
|
+
n(c, {
|
|
60
|
+
size: e.size,
|
|
61
|
+
type: e.type,
|
|
62
|
+
disabled: e.disabled
|
|
63
|
+
}, {
|
|
64
|
+
icon: l(() => [
|
|
65
|
+
p(o.$slots, "icon", { popupVisible: u.value }, () => [
|
|
66
|
+
n(C(z), { name: "xiangxia" })
|
|
67
|
+
])
|
|
68
|
+
]),
|
|
69
|
+
_: 3
|
|
70
|
+
}, 8, ["size", "type", "disabled"])
|
|
71
|
+
]),
|
|
72
|
+
content: l(() => [
|
|
73
|
+
p(o.$slots, "content")
|
|
74
|
+
]),
|
|
75
|
+
_: 3
|
|
76
|
+
}, 8, ["popup-visible", "trigger", "position", "popup-container", "hide-on-select", "disabled"])
|
|
77
|
+
]),
|
|
78
|
+
_: 3
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
D as default
|
|
84
|
+
};
|