@rhino-design/vue 0.2.2 → 0.2.6
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 +10 -40
- 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,176 @@
|
|
|
1
|
+
import { defineComponent as L, ref as s, watch as V, onMounted as U, onBeforeUnmount as R, openBlock as y, createElementBlock as m, createVNode as N, withCtx as X, createElementVNode as c, withModifiers as h, unref as T, Fragment as W, renderList as z, normalizeClass as F, toDisplayString as H, createCommentVNode as O, nextTick as P } from "vue";
|
|
2
|
+
import j from "./XInput.vue.js";
|
|
3
|
+
import { useXI18n as q } from "../composables/i18n.js";
|
|
4
|
+
const G = ["data-row-key"], J = ["aria-label"], Q = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "x-input-composite__panel"
|
|
7
|
+
}, Y = { class: "x-input-composite__list" }, Z = ["onMouseenter", "onClick"], re = /* @__PURE__ */ L({
|
|
8
|
+
__name: "XInputComposite",
|
|
9
|
+
props: {
|
|
10
|
+
listData: { default: () => [] },
|
|
11
|
+
placeholder: { default: "" },
|
|
12
|
+
keyworld: { default: "" },
|
|
13
|
+
rowKey: { default: "" },
|
|
14
|
+
btnValue: { default: "" },
|
|
15
|
+
isClera: { type: Boolean, default: !0 }
|
|
16
|
+
},
|
|
17
|
+
emits: ["captureItem", "sentWord", "clickUseAppend", "changename"],
|
|
18
|
+
setup(f, { emit: _ }) {
|
|
19
|
+
const n = f, v = _, g = s(null), K = s(null), w = s([]), { t: S } = q(), u = s(""), a = s(!1), d = s(!1), r = s(-1);
|
|
20
|
+
function C() {
|
|
21
|
+
return typeof n.keyworld == "string" ? [n.keyworld, ""] : Array.isArray(n.keyworld) ? [String(n.keyworld[0] ?? ""), String(n.keyworld[1] ?? "")] : ["", ""];
|
|
22
|
+
}
|
|
23
|
+
function A(e) {
|
|
24
|
+
const [t, o] = C();
|
|
25
|
+
if (!t) return "";
|
|
26
|
+
const l = String(e[t] ?? ""), i = o ? String(e[o] ?? "") : "";
|
|
27
|
+
return typeof n.keyworld == "string" ? l : i ? `${l} ${i}` : l;
|
|
28
|
+
}
|
|
29
|
+
function $(e) {
|
|
30
|
+
const [t, o] = C();
|
|
31
|
+
if (!t) return "";
|
|
32
|
+
const l = String(e[t] ?? ""), i = o ? String(e[o] ?? "") : "";
|
|
33
|
+
return typeof n.keyworld == "string" ? l : i ? `${l} (${i})` : l;
|
|
34
|
+
}
|
|
35
|
+
function p() {
|
|
36
|
+
r.value = -1, w.value = [];
|
|
37
|
+
}
|
|
38
|
+
function k() {
|
|
39
|
+
a.value = n.listData.length > 0 && d.value, a.value || p();
|
|
40
|
+
}
|
|
41
|
+
function D(e) {
|
|
42
|
+
n.isClera ? u.value = "" : u.value = $(e), a.value = !1, d.value = !1, p(), v("captureItem", e);
|
|
43
|
+
}
|
|
44
|
+
function B(e) {
|
|
45
|
+
const t = e.trim();
|
|
46
|
+
t !== e && (u.value = t), d.value = !0, v("sentWord", t), k();
|
|
47
|
+
}
|
|
48
|
+
function b() {
|
|
49
|
+
u.value && v("changename", u.value), d.value = !1, a.value = !1, p();
|
|
50
|
+
}
|
|
51
|
+
function M() {
|
|
52
|
+
v("clickUseAppend");
|
|
53
|
+
}
|
|
54
|
+
function x() {
|
|
55
|
+
P(() => {
|
|
56
|
+
const e = w.value[r.value];
|
|
57
|
+
e == null || e.scrollIntoView({ block: "nearest" });
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function E(e) {
|
|
61
|
+
if (e.key === "ArrowDown") {
|
|
62
|
+
if (!a.value && (d.value = !0, k(), !a.value) || (e.preventDefault(), n.listData.length === 0)) return;
|
|
63
|
+
r.value < 0 ? r.value = 0 : r.value = (r.value + 1) % n.listData.length, x();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (e.key === "ArrowUp") {
|
|
67
|
+
if (!a.value || n.listData.length === 0)
|
|
68
|
+
return;
|
|
69
|
+
e.preventDefault(), r.value <= 0 ? r.value = 0 : r.value -= 1, x();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (e.key === "Enter") {
|
|
73
|
+
if (!a.value || n.listData.length === 0)
|
|
74
|
+
return;
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
const t = r.value >= 0 ? r.value : 0, o = n.listData[t];
|
|
77
|
+
o && D(o);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
e.key === "Escape" && (a.value = !1, p());
|
|
81
|
+
}
|
|
82
|
+
function I(e) {
|
|
83
|
+
const t = e.target;
|
|
84
|
+
t && g.value && (g.value.contains(t) || (a.value = !1, p()));
|
|
85
|
+
}
|
|
86
|
+
return V(
|
|
87
|
+
() => n.listData,
|
|
88
|
+
() => {
|
|
89
|
+
k();
|
|
90
|
+
},
|
|
91
|
+
{ deep: !0 }
|
|
92
|
+
), V(
|
|
93
|
+
() => n.btnValue,
|
|
94
|
+
(e) => {
|
|
95
|
+
u.value = e ?? "";
|
|
96
|
+
},
|
|
97
|
+
{ immediate: !0 }
|
|
98
|
+
), U(() => {
|
|
99
|
+
document.addEventListener("mousedown", I);
|
|
100
|
+
}), R(() => {
|
|
101
|
+
document.removeEventListener("mousedown", I);
|
|
102
|
+
}), (e, t) => (y(), m("div", {
|
|
103
|
+
ref_key: "compositeRef",
|
|
104
|
+
ref: g,
|
|
105
|
+
class: "x-input-composite",
|
|
106
|
+
"data-row-key": f.rowKey
|
|
107
|
+
}, [
|
|
108
|
+
N(j, {
|
|
109
|
+
ref_key: "inputRef",
|
|
110
|
+
ref: K,
|
|
111
|
+
modelValue: u.value,
|
|
112
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => u.value = o),
|
|
113
|
+
placeholder: f.placeholder,
|
|
114
|
+
"allow-clear": "",
|
|
115
|
+
onInput: B,
|
|
116
|
+
onClear: b,
|
|
117
|
+
onBlur: b,
|
|
118
|
+
onKeydown: E
|
|
119
|
+
}, {
|
|
120
|
+
append: X(() => [
|
|
121
|
+
c("button", {
|
|
122
|
+
class: "x-input-composite__append",
|
|
123
|
+
type: "button",
|
|
124
|
+
"aria-label": T(S)("input.compositeMoreAria", void 0, "更多"),
|
|
125
|
+
onMousedown: t[0] || (t[0] = h(() => {
|
|
126
|
+
}, ["prevent"])),
|
|
127
|
+
onClick: M
|
|
128
|
+
}, [...t[3] || (t[3] = [
|
|
129
|
+
c("svg", {
|
|
130
|
+
viewBox: "0 0 24 24",
|
|
131
|
+
fill: "none",
|
|
132
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
133
|
+
}, [
|
|
134
|
+
c("circle", {
|
|
135
|
+
cx: "5",
|
|
136
|
+
cy: "12",
|
|
137
|
+
r: "2",
|
|
138
|
+
fill: "currentColor"
|
|
139
|
+
}),
|
|
140
|
+
c("circle", {
|
|
141
|
+
cx: "12",
|
|
142
|
+
cy: "12",
|
|
143
|
+
r: "2",
|
|
144
|
+
fill: "currentColor"
|
|
145
|
+
}),
|
|
146
|
+
c("circle", {
|
|
147
|
+
cx: "19",
|
|
148
|
+
cy: "12",
|
|
149
|
+
r: "2",
|
|
150
|
+
fill: "currentColor"
|
|
151
|
+
})
|
|
152
|
+
], -1)
|
|
153
|
+
])], 40, J)
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 8, ["modelValue", "placeholder"]),
|
|
157
|
+
a.value ? (y(), m("div", Q, [
|
|
158
|
+
c("ul", Y, [
|
|
159
|
+
(y(!0), m(W, null, z(f.listData, (o, l) => (y(), m("li", {
|
|
160
|
+
key: `${f.rowKey}-${l}`,
|
|
161
|
+
ref_for: !0,
|
|
162
|
+
ref: (i) => w.value[l] = i,
|
|
163
|
+
class: F(["x-input-composite__option", { "is-active": r.value === l }]),
|
|
164
|
+
onMouseenter: (i) => r.value = l,
|
|
165
|
+
onMousedown: t[2] || (t[2] = h(() => {
|
|
166
|
+
}, ["prevent"])),
|
|
167
|
+
onClick: h((i) => D(o), ["stop"])
|
|
168
|
+
}, H(A(o)), 43, Z))), 128))
|
|
169
|
+
])
|
|
170
|
+
])) : O("", !0)
|
|
171
|
+
], 8, G));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
export {
|
|
175
|
+
re as default
|
|
176
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as r, computed as i, openBlock as c, createElementBlock as p, normalizeClass as a, unref as l, renderSlot as u } from "vue";
|
|
2
|
+
import { useXConfig as m, sizeClass as f } from "../composables/config.js";
|
|
3
|
+
const C = /* @__PURE__ */ r({
|
|
4
|
+
__name: "XInputGroup",
|
|
5
|
+
props: {
|
|
6
|
+
size: {}
|
|
7
|
+
},
|
|
8
|
+
setup(e) {
|
|
9
|
+
const o = e, s = m(), n = i(() => o.size ?? s.size.value);
|
|
10
|
+
return (t, d) => (c(), p("div", {
|
|
11
|
+
class: a(["x-input-combine", l(f)(n.value)])
|
|
12
|
+
}, [
|
|
13
|
+
u(t.$slots, "default")
|
|
14
|
+
], 2));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
C as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { defineComponent as we, useSlots as Ve, ref as V, computed as o, watch as J, onBeforeUnmount as Ie, openBlock as s, createElementBlock as r, normalizeClass as I, renderSlot as m, createVNode as B, unref as x, createCommentVNode as g, createElementVNode as A, mergeProps as Be, withModifiers as Me } from "vue";
|
|
2
|
+
import { useXConfig as Se, sizeClass as Q } from "../composables/config.js";
|
|
3
|
+
import { useXFormField as ke } from "../composables/form.js";
|
|
4
|
+
import { useXI18n as Ee } from "../composables/i18n.js";
|
|
5
|
+
import M from "./XIcon.js";
|
|
6
|
+
const Ce = ["disabled"], Oe = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "x-input-number__prefix"
|
|
9
|
+
}, Te = ["id", "value", "placeholder", "disabled", "readonly", "aria-invalid"], Ae = ["aria-label"], De = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "x-input-number__suffix"
|
|
12
|
+
}, Fe = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "x-input-number__step"
|
|
15
|
+
}, $e = ["disabled"], Pe = ["disabled"], ze = {
|
|
16
|
+
key: 3,
|
|
17
|
+
class: "x-input-number__suffix"
|
|
18
|
+
}, Re = ["disabled"], Le = 800, Xe = 150, je = /* @__PURE__ */ we({
|
|
19
|
+
__name: "XInputNumber",
|
|
20
|
+
props: {
|
|
21
|
+
modelValue: { default: void 0 },
|
|
22
|
+
defaultValue: { default: void 0 },
|
|
23
|
+
mode: { default: "embed" },
|
|
24
|
+
precision: { default: void 0 },
|
|
25
|
+
step: { default: 1 },
|
|
26
|
+
disabled: { type: Boolean, default: !1 },
|
|
27
|
+
error: { type: Boolean, default: !1 },
|
|
28
|
+
max: { default: Number.POSITIVE_INFINITY },
|
|
29
|
+
min: { default: Number.NEGATIVE_INFINITY },
|
|
30
|
+
formatter: { type: Function, default: void 0 },
|
|
31
|
+
parser: { type: Function, default: void 0 },
|
|
32
|
+
placeholder: { default: void 0 },
|
|
33
|
+
hideButton: { type: Boolean, default: !1 },
|
|
34
|
+
size: { default: void 0 },
|
|
35
|
+
allowClear: { type: Boolean, default: !1 },
|
|
36
|
+
modelEvent: { default: "change" },
|
|
37
|
+
readOnly: { type: Boolean, default: !1 },
|
|
38
|
+
inputAttrs: { default: void 0 }
|
|
39
|
+
},
|
|
40
|
+
emits: ["update:modelValue", "change", "focus", "blur", "clear", "input", "keydown"],
|
|
41
|
+
setup(S, { expose: W, emit: ee }) {
|
|
42
|
+
const n = S, a = ee, _ = Ve(), ne = Se(), p = ke(), { t: te } = Ee(), N = V(null), D = V(!1), L = o(() => n.size ?? ne.size.value), c = o(() => !!(n.disabled || p.disabled.value)), k = o(() => {
|
|
43
|
+
if (typeof n.precision != "number" || Number.isNaN(n.precision))
|
|
44
|
+
return;
|
|
45
|
+
const e = $(n.step);
|
|
46
|
+
return Math.max(e, n.precision);
|
|
47
|
+
}), h = o(() => n.mode === "button" && !n.hideButton), X = o(() => h.value || !!_.prepend), Y = o(() => h.value || !!_.append), ue = o(() => !!_.prefix), F = o(() => n.mode === "embed" && !n.hideButton && !n.readOnly), G = o(() => !(!_.suffix || n.mode === "embed" && !n.hideButton && n.readOnly)), oe = o(() => n.mode === "embed" && (F.value || G.value)), ae = o(() => n.mode === "button" && !!_.suffix), K = o(() => n.allowClear && l.value.length > 0 && !c.value && !n.readOnly), U = o(() => c.value || z.value || n.readOnly), Z = o(() => c.value || P.value || n.readOnly), le = o(() => [
|
|
48
|
+
Q(L.value),
|
|
49
|
+
`x-input-number-group-mode-${n.mode}`,
|
|
50
|
+
{
|
|
51
|
+
"is-disabled": c.value,
|
|
52
|
+
"is-error": n.error,
|
|
53
|
+
"is-readonly": n.readOnly,
|
|
54
|
+
"has-prepend": X.value,
|
|
55
|
+
"has-append": Y.value
|
|
56
|
+
}
|
|
57
|
+
]), se = o(() => [
|
|
58
|
+
Q(L.value),
|
|
59
|
+
`x-input-number-mode-${n.mode}`,
|
|
60
|
+
{
|
|
61
|
+
"is-disabled": c.value,
|
|
62
|
+
"is-error": n.error,
|
|
63
|
+
"is-readonly": n.readOnly,
|
|
64
|
+
"is-focus": D.value,
|
|
65
|
+
"has-clear": K.value
|
|
66
|
+
}
|
|
67
|
+
]);
|
|
68
|
+
function b(e) {
|
|
69
|
+
return typeof e == "number" && !Number.isNaN(e);
|
|
70
|
+
}
|
|
71
|
+
function $(e) {
|
|
72
|
+
const t = String(e);
|
|
73
|
+
if (t.includes("e-")) {
|
|
74
|
+
const [u, f] = t.split("e-"), v = (u.split(".")[1] ?? "").length, T = Number(f) || 0;
|
|
75
|
+
return v + T;
|
|
76
|
+
}
|
|
77
|
+
return (t.split(".")[1] ?? "").length;
|
|
78
|
+
}
|
|
79
|
+
function re(e, t) {
|
|
80
|
+
const u = 10 ** t;
|
|
81
|
+
return Math.round((e + Number.EPSILON) * u) / u;
|
|
82
|
+
}
|
|
83
|
+
function E(e) {
|
|
84
|
+
if (!b(e))
|
|
85
|
+
return "";
|
|
86
|
+
const t = b(k.value) ? e.toFixed(k.value) : String(e);
|
|
87
|
+
return n.formatter ? String(n.formatter(t)) : t;
|
|
88
|
+
}
|
|
89
|
+
function ie(e) {
|
|
90
|
+
if (!e)
|
|
91
|
+
return;
|
|
92
|
+
const t = n.parser ? String(n.parser(e)) : e, u = Number(t);
|
|
93
|
+
return Number.isNaN(u) ? void 0 : u;
|
|
94
|
+
}
|
|
95
|
+
const l = V(E(n.modelValue ?? n.defaultValue)), i = o(() => ie(l.value)), P = V(!1), z = V(!1);
|
|
96
|
+
function y(e) {
|
|
97
|
+
P.value = b(e) && e <= n.min, z.value = b(e) && e >= n.max;
|
|
98
|
+
}
|
|
99
|
+
y(i.value);
|
|
100
|
+
function j(e) {
|
|
101
|
+
if (e === void 0)
|
|
102
|
+
return;
|
|
103
|
+
let t = e;
|
|
104
|
+
return b(n.min) && t < n.min && (t = n.min), b(n.max) && t > n.max && (t = n.max), b(k.value) && (t = re(t, k.value)), t;
|
|
105
|
+
}
|
|
106
|
+
function q() {
|
|
107
|
+
const e = j(i.value), t = E(e);
|
|
108
|
+
return (e !== i.value || l.value !== t) && (l.value = t), y(e), a("update:modelValue", e), e;
|
|
109
|
+
}
|
|
110
|
+
J(
|
|
111
|
+
() => [n.max, n.min],
|
|
112
|
+
() => {
|
|
113
|
+
q();
|
|
114
|
+
}
|
|
115
|
+
), J(
|
|
116
|
+
() => n.modelValue,
|
|
117
|
+
(e) => {
|
|
118
|
+
e !== i.value && (l.value = E(e), y(e));
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
function de(e, t, u) {
|
|
122
|
+
const f = 10 ** Math.max($(e), $(t)), v = Math.round(e * f), T = Math.round(t * f);
|
|
123
|
+
return u === "plus" ? (v + T) / f : (v - T) / f;
|
|
124
|
+
}
|
|
125
|
+
let w = 0, C = !1;
|
|
126
|
+
function d() {
|
|
127
|
+
w && (window.clearTimeout(w), w = 0);
|
|
128
|
+
}
|
|
129
|
+
Ie(() => {
|
|
130
|
+
d();
|
|
131
|
+
});
|
|
132
|
+
function R(e, t) {
|
|
133
|
+
if (c.value || n.readOnly || e === "plus" && z.value || e === "minus" && P.value)
|
|
134
|
+
return;
|
|
135
|
+
let u;
|
|
136
|
+
b(i.value) ? u = j(de(i.value, n.step, e)) : u = n.min === Number.NEGATIVE_INFINITY ? 0 : n.min, l.value = E(u), y(u), a("update:modelValue", u), a("change", u, t), p.notifyChange(t);
|
|
137
|
+
}
|
|
138
|
+
function O(e, t, u = !1) {
|
|
139
|
+
var f;
|
|
140
|
+
if (e.preventDefault(), !n.readOnly && ((f = N.value) == null || f.focus(), R(t, e), u)) {
|
|
141
|
+
const v = e.currentTarget;
|
|
142
|
+
w = window.setTimeout(() => {
|
|
143
|
+
v == null || v.dispatchEvent(new MouseEvent("mousedown", { bubbles: !0 }));
|
|
144
|
+
}, w ? Xe : Le);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function pe(e) {
|
|
148
|
+
return e.trim().replace(/。/g, ".");
|
|
149
|
+
}
|
|
150
|
+
function fe(e) {
|
|
151
|
+
return !Number.isNaN(Number(e)) || /^(\.|-)$/.test(e);
|
|
152
|
+
}
|
|
153
|
+
function H(e) {
|
|
154
|
+
const t = q();
|
|
155
|
+
a("change", t, e), p.notifyChange(e);
|
|
156
|
+
}
|
|
157
|
+
function me(e) {
|
|
158
|
+
const t = e.target;
|
|
159
|
+
let u = pe(t.value);
|
|
160
|
+
if (u = n.parser ? String(n.parser(u)) : u, !fe(u)) {
|
|
161
|
+
t.value = l.value;
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
l.value = n.formatter ? String(n.formatter(u)) : u, y(i.value), a("input", i.value, l.value, e), p.notifyInput(e), n.modelEvent === "input" && (a("update:modelValue", i.value), a("change", i.value, e), p.notifyChange(e));
|
|
165
|
+
}
|
|
166
|
+
function ce(e) {
|
|
167
|
+
if (C) {
|
|
168
|
+
C = !1;
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (e instanceof MouseEvent) {
|
|
172
|
+
const t = e.target;
|
|
173
|
+
if (t && !t.value)
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
H(e);
|
|
177
|
+
}
|
|
178
|
+
function be(e) {
|
|
179
|
+
D.value = !0, a("focus", e), p.notifyFocus(e);
|
|
180
|
+
}
|
|
181
|
+
function ve(e) {
|
|
182
|
+
D.value = !1, C = !1, d(), a("blur", e), p.notifyBlur(e);
|
|
183
|
+
}
|
|
184
|
+
function ge(e) {
|
|
185
|
+
l.value = "", y(void 0), a("update:modelValue", void 0), a("change", void 0, e), p.notifyChange(e), a("clear", e);
|
|
186
|
+
}
|
|
187
|
+
function xe(e) {
|
|
188
|
+
if (a("keydown", e), !e.defaultPrevented) {
|
|
189
|
+
if (e.key === "ArrowUp") {
|
|
190
|
+
e.preventDefault(), R("plus", e);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (e.key === "ArrowDown") {
|
|
194
|
+
e.preventDefault(), R("minus", e);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
e.key === "Enter" && (C = !0, H(e));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function he(e) {
|
|
201
|
+
var u;
|
|
202
|
+
c.value || e.target.closest("button") || (u = N.value) == null || u.focus();
|
|
203
|
+
}
|
|
204
|
+
const ye = o(() => ({
|
|
205
|
+
role: "spinbutton",
|
|
206
|
+
"aria-valuemax": n.max,
|
|
207
|
+
"aria-valuemin": n.min,
|
|
208
|
+
"aria-valuenow": l.value || void 0,
|
|
209
|
+
...n.inputAttrs
|
|
210
|
+
}));
|
|
211
|
+
function _e() {
|
|
212
|
+
var e;
|
|
213
|
+
(e = N.value) == null || e.focus();
|
|
214
|
+
}
|
|
215
|
+
function Ne() {
|
|
216
|
+
var e;
|
|
217
|
+
(e = N.value) == null || e.blur();
|
|
218
|
+
}
|
|
219
|
+
return W({
|
|
220
|
+
focus: _e,
|
|
221
|
+
blur: Ne
|
|
222
|
+
}), (e, t) => (s(), r("div", {
|
|
223
|
+
class: I(["x-input-group x-input-number-group", le.value])
|
|
224
|
+
}, [
|
|
225
|
+
X.value ? (s(), r("span", {
|
|
226
|
+
key: 0,
|
|
227
|
+
class: I(["x-input-group__addon x-input-group__addon--prepend x-input-number__addon", { "is-step": h.value }])
|
|
228
|
+
}, [
|
|
229
|
+
h.value ? (s(), r("button", {
|
|
230
|
+
key: 0,
|
|
231
|
+
class: "x-input-number__step-button x-input-number__step-button--outer x-input-number__step-button--minus",
|
|
232
|
+
type: "button",
|
|
233
|
+
tabindex: "-1",
|
|
234
|
+
disabled: Z.value,
|
|
235
|
+
onMousedown: t[0] || (t[0] = (u) => O(u, "minus", !0)),
|
|
236
|
+
onMouseup: d,
|
|
237
|
+
onMouseleave: d
|
|
238
|
+
}, [
|
|
239
|
+
m(e.$slots, "minus", {}, () => [
|
|
240
|
+
B(x(M), { name: "checkbox-indeterminate" })
|
|
241
|
+
], !0)
|
|
242
|
+
], 40, Ce)) : m(e.$slots, "prepend", { key: 1 }, void 0, !0)
|
|
243
|
+
], 2)) : g("", !0),
|
|
244
|
+
A("label", {
|
|
245
|
+
class: I(["x-input-number", se.value]),
|
|
246
|
+
onMousedown: he
|
|
247
|
+
}, [
|
|
248
|
+
ue.value ? (s(), r("span", Oe, [
|
|
249
|
+
m(e.$slots, "prefix", {}, void 0, !0)
|
|
250
|
+
])) : g("", !0),
|
|
251
|
+
A("input", Be({
|
|
252
|
+
ref_key: "inputRef",
|
|
253
|
+
ref: N,
|
|
254
|
+
id: x(p).id
|
|
255
|
+
}, ye.value, {
|
|
256
|
+
class: "x-input-number__inner",
|
|
257
|
+
type: "text",
|
|
258
|
+
value: l.value,
|
|
259
|
+
placeholder: S.placeholder,
|
|
260
|
+
disabled: c.value,
|
|
261
|
+
readonly: S.readOnly,
|
|
262
|
+
"aria-invalid": S.error || void 0,
|
|
263
|
+
onInput: me,
|
|
264
|
+
onChange: ce,
|
|
265
|
+
onFocus: be,
|
|
266
|
+
onBlur: ve,
|
|
267
|
+
onKeydown: xe
|
|
268
|
+
}), null, 16, Te),
|
|
269
|
+
K.value ? (s(), r("button", {
|
|
270
|
+
key: 1,
|
|
271
|
+
class: "x-input-number__clear",
|
|
272
|
+
type: "button",
|
|
273
|
+
"aria-label": x(te)("input.clearAria", void 0, "清空"),
|
|
274
|
+
onMousedown: t[1] || (t[1] = Me(() => {
|
|
275
|
+
}, ["prevent"])),
|
|
276
|
+
onClick: ge
|
|
277
|
+
}, [
|
|
278
|
+
B(x(M), { name: "guanbi" })
|
|
279
|
+
], 40, Ae)) : g("", !0),
|
|
280
|
+
oe.value ? (s(), r("span", {
|
|
281
|
+
key: 2,
|
|
282
|
+
class: I(["x-input-number__suffix-zone", { "has-step": F.value }])
|
|
283
|
+
}, [
|
|
284
|
+
G.value ? (s(), r("span", De, [
|
|
285
|
+
m(e.$slots, "suffix", {}, void 0, !0)
|
|
286
|
+
])) : g("", !0),
|
|
287
|
+
F.value ? (s(), r("span", Fe, [
|
|
288
|
+
A("button", {
|
|
289
|
+
class: "x-input-number__step-button x-input-number__step-button--embed",
|
|
290
|
+
type: "button",
|
|
291
|
+
tabindex: "-1",
|
|
292
|
+
disabled: U.value,
|
|
293
|
+
onMousedown: t[2] || (t[2] = (u) => O(u, "plus", !0)),
|
|
294
|
+
onMouseup: d,
|
|
295
|
+
onMouseleave: d
|
|
296
|
+
}, [
|
|
297
|
+
m(e.$slots, "plus", {}, () => [
|
|
298
|
+
B(x(M), { name: "xiangshang" })
|
|
299
|
+
], !0)
|
|
300
|
+
], 40, $e),
|
|
301
|
+
A("button", {
|
|
302
|
+
class: "x-input-number__step-button x-input-number__step-button--embed",
|
|
303
|
+
type: "button",
|
|
304
|
+
tabindex: "-1",
|
|
305
|
+
disabled: Z.value,
|
|
306
|
+
onMousedown: t[3] || (t[3] = (u) => O(u, "minus", !0)),
|
|
307
|
+
onMouseup: d,
|
|
308
|
+
onMouseleave: d
|
|
309
|
+
}, [
|
|
310
|
+
m(e.$slots, "minus", {}, () => [
|
|
311
|
+
B(x(M), { name: "xiangxia" })
|
|
312
|
+
], !0)
|
|
313
|
+
], 40, Pe)
|
|
314
|
+
])) : g("", !0)
|
|
315
|
+
], 2)) : g("", !0),
|
|
316
|
+
ae.value ? (s(), r("span", ze, [
|
|
317
|
+
m(e.$slots, "suffix", {}, void 0, !0)
|
|
318
|
+
])) : g("", !0)
|
|
319
|
+
], 34),
|
|
320
|
+
Y.value ? (s(), r("span", {
|
|
321
|
+
key: 1,
|
|
322
|
+
class: I(["x-input-group__addon x-input-group__addon--append x-input-number__addon", { "is-step": h.value }])
|
|
323
|
+
}, [
|
|
324
|
+
h.value ? (s(), r("button", {
|
|
325
|
+
key: 0,
|
|
326
|
+
class: "x-input-number__step-button x-input-number__step-button--outer x-input-number__step-button--plus",
|
|
327
|
+
type: "button",
|
|
328
|
+
tabindex: "-1",
|
|
329
|
+
disabled: U.value,
|
|
330
|
+
onMousedown: t[4] || (t[4] = (u) => O(u, "plus", !0)),
|
|
331
|
+
onMouseup: d,
|
|
332
|
+
onMouseleave: d
|
|
333
|
+
}, [
|
|
334
|
+
m(e.$slots, "plus", {}, () => [
|
|
335
|
+
B(x(M), { name: "checkbox-plus" })
|
|
336
|
+
], !0)
|
|
337
|
+
], 40, Re)) : m(e.$slots, "append", { key: 1 }, void 0, !0)
|
|
338
|
+
], 2)) : g("", !0)
|
|
339
|
+
], 2));
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
export {
|
|
343
|
+
je as default
|
|
344
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { defineComponent as V, useAttrs as $, ref as v, computed as y, openBlock as s, createBlock as M, mergeProps as _, unref as w, createSlots as A, withCtx as n, createElementBlock as a, withModifiers as I, createElementVNode as o, createCommentVNode as P, renderSlot as r } from "vue";
|
|
2
|
+
import X from "./XInput.vue.js";
|
|
3
|
+
import { useXI18n as E } from "../composables/i18n.js";
|
|
4
|
+
const N = ["aria-label"], R = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "x-input-password__icon",
|
|
7
|
+
viewBox: "0 0 24 24",
|
|
8
|
+
fill: "none",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
+
}, S = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "x-input-password__icon",
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
fill: "none",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
16
|
+
}, q = /* @__PURE__ */ V({
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
__name: "XInputPassword",
|
|
19
|
+
props: {
|
|
20
|
+
visibility: { type: Boolean, default: void 0 },
|
|
21
|
+
defaultVisibility: { type: Boolean, default: !0 },
|
|
22
|
+
invisibleButton: { type: Boolean, default: !0 }
|
|
23
|
+
},
|
|
24
|
+
emits: ["visibility-change", "update:visibility"],
|
|
25
|
+
setup(p, { expose: m, emit: k }) {
|
|
26
|
+
const l = p, d = k, b = $(), { t: C } = E(), u = v(null), f = v(l.defaultVisibility), c = y(() => l.visibility !== void 0), i = y(() => c.value ? !!l.visibility : f.value);
|
|
27
|
+
function g(e) {
|
|
28
|
+
e !== i.value && (c.value || (f.value = e), d("visibility-change", e), d("update:visibility", e));
|
|
29
|
+
}
|
|
30
|
+
function h() {
|
|
31
|
+
g(!i.value);
|
|
32
|
+
}
|
|
33
|
+
function x() {
|
|
34
|
+
var e;
|
|
35
|
+
(e = u.value) == null || e.focus();
|
|
36
|
+
}
|
|
37
|
+
function B() {
|
|
38
|
+
var e;
|
|
39
|
+
(e = u.value) == null || e.blur();
|
|
40
|
+
}
|
|
41
|
+
return m({
|
|
42
|
+
focus: x,
|
|
43
|
+
blur: B
|
|
44
|
+
}), (e, t) => (s(), M(X, _({
|
|
45
|
+
ref_key: "inputRef",
|
|
46
|
+
ref: u,
|
|
47
|
+
class: "x-input-password"
|
|
48
|
+
}, w(b), {
|
|
49
|
+
type: i.value ? "password" : "text"
|
|
50
|
+
}), A({
|
|
51
|
+
suffix: n(() => [
|
|
52
|
+
p.invisibleButton ? (s(), a("button", {
|
|
53
|
+
key: 0,
|
|
54
|
+
type: "button",
|
|
55
|
+
class: "x-input-password__toggle",
|
|
56
|
+
"aria-label": w(C)("inputPassword.toggleVisibilityAria", void 0, "切换密码可见性"),
|
|
57
|
+
onMousedown: t[0] || (t[0] = I(() => {
|
|
58
|
+
}, ["prevent"])),
|
|
59
|
+
onClick: h
|
|
60
|
+
}, [
|
|
61
|
+
i.value ? (s(), a("svg", R, [...t[1] || (t[1] = [
|
|
62
|
+
o("path", {
|
|
63
|
+
d: "M2 12C3.8 8.5 7.6 6 12 6C16.4 6 20.2 8.5 22 12C20.2 15.5 16.4 18 12 18C7.6 18 3.8 15.5 2 12Z",
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
"stroke-width": "2"
|
|
66
|
+
}, null, -1),
|
|
67
|
+
o("circle", {
|
|
68
|
+
cx: "12",
|
|
69
|
+
cy: "12",
|
|
70
|
+
r: "3",
|
|
71
|
+
stroke: "currentColor",
|
|
72
|
+
"stroke-width": "2"
|
|
73
|
+
}, null, -1)
|
|
74
|
+
])])) : (s(), a("svg", S, [...t[2] || (t[2] = [
|
|
75
|
+
o("path", {
|
|
76
|
+
d: "M2 12C3.8 8.5 7.6 6 12 6C16.4 6 20.2 8.5 22 12C20.2 15.5 16.4 18 12 18C7.6 18 3.8 15.5 2 12Z",
|
|
77
|
+
stroke: "currentColor",
|
|
78
|
+
"stroke-width": "2"
|
|
79
|
+
}, null, -1),
|
|
80
|
+
o("circle", {
|
|
81
|
+
cx: "12",
|
|
82
|
+
cy: "12",
|
|
83
|
+
r: "3",
|
|
84
|
+
stroke: "currentColor",
|
|
85
|
+
"stroke-width": "2"
|
|
86
|
+
}, null, -1),
|
|
87
|
+
o("path", {
|
|
88
|
+
d: "M4 4L20 20",
|
|
89
|
+
stroke: "currentColor",
|
|
90
|
+
"stroke-width": "2",
|
|
91
|
+
"stroke-linecap": "round"
|
|
92
|
+
}, null, -1)
|
|
93
|
+
])]))
|
|
94
|
+
], 40, N)) : P("", !0),
|
|
95
|
+
r(e.$slots, "suffix", {}, void 0, !0)
|
|
96
|
+
]),
|
|
97
|
+
_: 2
|
|
98
|
+
}, [
|
|
99
|
+
e.$slots.prepend ? {
|
|
100
|
+
name: "prepend",
|
|
101
|
+
fn: n(() => [
|
|
102
|
+
r(e.$slots, "prepend", {}, void 0, !0)
|
|
103
|
+
]),
|
|
104
|
+
key: "0"
|
|
105
|
+
} : void 0,
|
|
106
|
+
e.$slots.prefix ? {
|
|
107
|
+
name: "prefix",
|
|
108
|
+
fn: n(() => [
|
|
109
|
+
r(e.$slots, "prefix", {}, void 0, !0)
|
|
110
|
+
]),
|
|
111
|
+
key: "1"
|
|
112
|
+
} : void 0,
|
|
113
|
+
e.$slots.append ? {
|
|
114
|
+
name: "append",
|
|
115
|
+
fn: n(() => [
|
|
116
|
+
r(e.$slots, "append", {}, void 0, !0)
|
|
117
|
+
]),
|
|
118
|
+
key: "2"
|
|
119
|
+
} : void 0
|
|
120
|
+
]), 1040, ["type"]));
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
export {
|
|
124
|
+
q as default
|
|
125
|
+
};
|