@aifuxi/semi-ui-vue 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/Button-RCaDTqHh.js +249 -0
- package/dist/Collapsible-DeV0aJ4n.js +199 -0
- package/dist/Cropper-Dy1LPBDN.js +587 -0
- package/dist/Divider-BQmwhGfH.js +57 -0
- package/dist/Input-BYWFIgNn.js +593 -0
- package/dist/InputNumber-BaeViVtG.js +856 -0
- package/dist/Modal-BhmFYVFw.js +975 -0
- package/dist/Pagination-4JvS-gHR.js +572 -0
- package/dist/Progress-BulSV_JR.js +523 -0
- package/dist/SBOM.spdx.json +165 -0
- package/dist/SelectOption-Ce-Lst-e.js +1473 -0
- package/dist/Slider-w9sbxzBw.js +707 -0
- package/dist/Spin-CuFLkqev.js +222 -0
- package/dist/THIRD_PARTY_LICENSES/Semi-Design.txt +83 -0
- package/dist/THIRD_PARTY_LICENSES/async-validator.txt +9 -0
- package/dist/THIRD_PARTY_LICENSES/bezier-easing.txt +22 -0
- package/dist/THIRD_PARTY_LICENSES/date-fns-tz.txt +21 -0
- package/dist/THIRD_PARTY_LICENSES/date-fns.txt +21 -0
- package/dist/THIRD_PARTY_LICENSES/lodash.txt +47 -0
- package/dist/THIRD_PARTY_LICENSES/scroll-into-view-if-needed.txt +21 -0
- package/dist/THIRD_PARTY_NOTICES.md +23 -0
- package/dist/Tooltip-Bq7HZwnS.js +1321 -0
- package/dist/Tree-tqy5xBYJ.js +1275 -0
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/anchor/Anchor.vue.d.ts +29 -0
- package/dist/anchor/AnchorLink.vue.d.ts +16 -0
- package/dist/anchor/AnchorNodeRenderer.d.ts +15 -0
- package/dist/anchor/anchor-context.d.ts +18 -0
- package/dist/anchor/index.d.ts +11 -0
- package/dist/anchor/index.js +2 -0
- package/dist/anchor/types.d.ts +43 -0
- package/dist/anchor-DW0p2t-I.js +503 -0
- package/dist/arrayMove-ByVCXfhS.js +7 -0
- package/dist/auto-complete/AutoComplete.vue.d.ts +33 -0
- package/dist/auto-complete/AutoCompleteNodeRenderer.d.ts +15 -0
- package/dist/auto-complete/AutoCompleteOption.vue.d.ts +19 -0
- package/dist/auto-complete/index.d.ts +10 -0
- package/dist/auto-complete/index.js +2 -0
- package/dist/auto-complete/types.d.ts +117 -0
- package/dist/auto-complete/use-auto-complete-foundation.d.ts +40 -0
- package/dist/auto-complete-BeahBlt9.js +765 -0
- package/dist/avatar/Avatar.vue.d.ts +26 -0
- package/dist/avatar/AvatarGroup.d.ts +54 -0
- package/dist/avatar/AvatarNodeRenderer.d.ts +15 -0
- package/dist/avatar/TopSlotSvg.vue.d.ts +7 -0
- package/dist/avatar/index.d.ts +10 -0
- package/dist/avatar/index.js +2 -0
- package/dist/avatar/types.d.ts +86 -0
- package/dist/avatar-B00xjEzD.js +551 -0
- package/dist/back-top/BackTop.vue.d.ts +19 -0
- package/dist/back-top/index.d.ts +3 -0
- package/dist/back-top/index.js +2 -0
- package/dist/back-top/types.d.ts +15 -0
- package/dist/back-top-C2XqUzoN.js +123 -0
- package/dist/badge/Badge.vue.d.ts +23 -0
- package/dist/badge/BadgeNodeRenderer.d.ts +15 -0
- package/dist/badge/index.d.ts +6 -0
- package/dist/badge/index.js +2 -0
- package/dist/badge/types.d.ts +29 -0
- package/dist/badge-gWsDkzyt.js +120 -0
- package/dist/banner/Banner.vue.d.ts +19 -0
- package/dist/banner/BannerNodeRenderer.d.ts +15 -0
- package/dist/banner/index.d.ts +6 -0
- package/dist/banner/index.js +2 -0
- package/dist/banner/types.d.ts +25 -0
- package/dist/banner-B3O4uDoR.js +220 -0
- package/dist/breadcrumb/Breadcrumb.d.ts +129 -0
- package/dist/breadcrumb/BreadcrumbIconRenderer.d.ts +23 -0
- package/dist/breadcrumb/BreadcrumbItem.vue.d.ts +19 -0
- package/dist/breadcrumb/BreadcrumbNodeRenderer.d.ts +15 -0
- package/dist/breadcrumb/BreadcrumbPopover.vue.d.ts +17 -0
- package/dist/breadcrumb/BreadcrumbPopoverArrow.vue.d.ts +3 -0
- package/dist/breadcrumb/breadcrumb-context.d.ts +9 -0
- package/dist/breadcrumb/index.d.ts +11 -0
- package/dist/breadcrumb/index.js +2 -0
- package/dist/breadcrumb/types.d.ts +72 -0
- package/dist/breadcrumb-BmBbFmGK.js +451 -0
- package/dist/button/Button.vue.d.ts +34 -0
- package/dist/button/ButtonAiLoadingIcon.vue.d.ts +3 -0
- package/dist/button/ButtonGroup.d.ts +69 -0
- package/dist/button/ButtonIconRenderer.d.ts +28 -0
- package/dist/button/ButtonLoadingIcon.vue.d.ts +3 -0
- package/dist/button/SplitButtonGroup.vue.d.ts +16 -0
- package/dist/button/index.d.ts +5 -0
- package/dist/button/index.js +3 -0
- package/dist/button/types.d.ts +57 -0
- package/dist/button-Rcn5pYGh.js +134 -0
- package/dist/calendar/Calendar.vue.d.ts +29 -0
- package/dist/calendar/CalendarDay.vue.d.ts +3 -0
- package/dist/calendar/CalendarMonth.vue.d.ts +3 -0
- package/dist/calendar/CalendarNodeRenderer.d.ts +15 -0
- package/dist/calendar/CalendarTimeColumn.vue.d.ts +6 -0
- package/dist/calendar/CalendarWeek.vue.d.ts +8 -0
- package/dist/calendar/index.d.ts +6 -0
- package/dist/calendar/index.js +2 -0
- package/dist/calendar/types.d.ts +67 -0
- package/dist/calendar-CJTrr4y5.js +1172 -0
- package/dist/card/Card.vue.d.ts +16 -0
- package/dist/card/CardGroup.vue.d.ts +13 -0
- package/dist/card/CardMeta.vue.d.ts +11 -0
- package/dist/card/CardNodeRenderer.d.ts +15 -0
- package/dist/card/CardSkeleton.vue.d.ts +3 -0
- package/dist/card/card-content.d.ts +2 -0
- package/dist/card/index.d.ts +11 -0
- package/dist/card/index.js +2 -0
- package/dist/card/types.d.ts +56 -0
- package/dist/card-DwMOFi6_.js +348 -0
- package/dist/carousel/Carousel.vue.d.ts +29 -0
- package/dist/carousel/CarouselArrow.vue.d.ts +15 -0
- package/dist/carousel/CarouselIndicator.vue.d.ts +17 -0
- package/dist/carousel/CarouselItemRenderer.d.ts +34 -0
- package/dist/carousel/CarouselNodeRenderer.d.ts +15 -0
- package/dist/carousel/index.d.ts +6 -0
- package/dist/carousel/index.js +2 -0
- package/dist/carousel/types.d.ts +70 -0
- package/dist/carousel/use-carousel-foundation.d.ts +19 -0
- package/dist/carousel-B4WlIRJH.js +458 -0
- package/dist/cascader/Cascader.vue.d.ts +71 -0
- package/dist/cascader/CascaderNodeRenderer.d.ts +15 -0
- package/dist/cascader/CascaderPanel.vue.d.ts +36 -0
- package/dist/cascader/index.d.ts +6 -0
- package/dist/cascader/index.js +2 -0
- package/dist/cascader/types.d.ts +192 -0
- package/dist/cascader-Ch6clCeh.js +1525 -0
- package/dist/checkbox/Checkbox.vue.d.ts +19 -0
- package/dist/checkbox/CheckboxGroup.d.ts +161 -0
- package/dist/checkbox/CheckboxNodeRenderer.d.ts +15 -0
- package/dist/checkbox/checkbox-context.d.ts +11 -0
- package/dist/checkbox/index.d.ts +10 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox/types.d.ts +92 -0
- package/dist/checkbox-mJD1ou6k.js +479 -0
- package/dist/collapse/Collapse.vue.d.ts +140 -0
- package/dist/collapse/CollapseNodeRenderer.d.ts +15 -0
- package/dist/collapse/CollapsePanel.vue.d.ts +99 -0
- package/dist/collapse/collapse-context.d.ts +14 -0
- package/dist/collapse/index.d.ts +10 -0
- package/dist/collapse/index.js +2 -0
- package/dist/collapse/types.d.ts +50 -0
- package/dist/collapse-7YtQLWqt.js +278 -0
- package/dist/collapsible/Collapsible.vue.d.ts +136 -0
- package/dist/collapsible/index.d.ts +5 -0
- package/dist/collapsible/index.js +5 -0
- package/dist/collapsible/types.d.ts +28 -0
- package/dist/color-picker/AlphaSlider.vue.d.ts +14 -0
- package/dist/color-picker/ColorChooseArea.vue.d.ts +20 -0
- package/dist/color-picker/ColorDataPart.vue.d.ts +15 -0
- package/dist/color-picker/ColorPicker.vue.d.ts +28 -0
- package/dist/color-picker/ColorPickerNodeRenderer.d.ts +17 -0
- package/dist/color-picker/ColorPickerPanel.vue.d.ts +37 -0
- package/dist/color-picker/ColorSlider.vue.d.ts +13 -0
- package/dist/color-picker/index.d.ts +10 -0
- package/dist/color-picker/index.js +2 -0
- package/dist/color-picker/types.d.ts +67 -0
- package/dist/color-picker-ChC7qsx0.js +885 -0
- package/dist/config-context-CyynTtDb.js +4 -0
- package/dist/config-provider/ConfigConsumer.vue.d.ts +11 -0
- package/dist/config-provider/ConfigProvider.vue.d.ts +16 -0
- package/dist/config-provider/config-context.d.ts +3 -0
- package/dist/config-provider/constants.d.ts +4 -0
- package/dist/config-provider/index.d.ts +13 -0
- package/dist/config-provider/index.js +3 -0
- package/dist/config-provider/semi-global.d.ts +6 -0
- package/dist/config-provider/types.d.ts +74 -0
- package/dist/config-provider/use-responsive-observe.d.ts +6 -0
- package/dist/config-provider-VMfNNSF1.js +188 -0
- package/dist/constants-BF9bZJyc.js +45 -0
- package/dist/constants-BNwzO87W.js +9 -0
- package/dist/cropper/Cropper.vue.d.ts +18 -0
- package/dist/cropper/index.d.ts +4 -0
- package/dist/cropper/index.js +5 -0
- package/dist/cropper/types.d.ts +51 -0
- package/dist/date-picker/DatePicker.vue.d.ts +41 -0
- package/dist/date-picker/DatePickerMonth.vue.d.ts +25 -0
- package/dist/date-picker/DatePickerNodeRenderer.d.ts +17 -0
- package/dist/date-picker/DatePickerPanel.vue.d.ts +33 -0
- package/dist/date-picker/index.d.ts +5 -0
- package/dist/date-picker/index.js +2 -0
- package/dist/date-picker/types.d.ts +211 -0
- package/dist/date-picker-B2lhlKHD.js +2207 -0
- package/dist/descriptions/Descriptions.vue.d.ts +96 -0
- package/dist/descriptions/DescriptionsItem.vue.d.ts +96 -0
- package/dist/descriptions/DescriptionsNodeRenderer.d.ts +15 -0
- package/dist/descriptions/descriptions-context.d.ts +7 -0
- package/dist/descriptions/index.d.ts +10 -0
- package/dist/descriptions/index.js +2 -0
- package/dist/descriptions/types.d.ts +45 -0
- package/dist/descriptions-BU6ahbge.js +272 -0
- package/dist/divider/Divider.vue.d.ts +15 -0
- package/dist/divider/DividerContentRenderer.d.ts +17 -0
- package/dist/divider/index.d.ts +3 -0
- package/dist/divider/index.js +3 -0
- package/dist/divider/types.d.ts +13 -0
- package/dist/divider-DA9U4uOl.js +8 -0
- package/dist/dropdown/Dropdown.vue.d.ts +23 -0
- package/dist/dropdown/DropdownDivider.vue.d.ts +4 -0
- package/dist/dropdown/DropdownItem.vue.d.ts +28 -0
- package/dist/dropdown/DropdownMenu.vue.d.ts +11 -0
- package/dist/dropdown/DropdownNodeRenderer.d.ts +15 -0
- package/dist/dropdown/DropdownTitle.vue.d.ts +11 -0
- package/dist/dropdown/DropdownTriggerRenderer.d.ts +45 -0
- package/dist/dropdown/dropdown-context.d.ts +8 -0
- package/dist/dropdown/index.d.ts +17 -0
- package/dist/dropdown/index.js +2 -0
- package/dist/dropdown/types.d.ts +98 -0
- package/dist/dropdown-D0-UWd65.js +665 -0
- package/dist/empty/Empty.vue.d.ts +13 -0
- package/dist/empty/EmptyNodeRenderer.d.ts +15 -0
- package/dist/empty/index.d.ts +6 -0
- package/dist/empty/index.js +2 -0
- package/dist/empty/types.d.ts +27 -0
- package/dist/empty-Bpms8Z5w.js +152 -0
- package/dist/env-BeIzjQx7.js +4 -0
- package/dist/es-CAWQuPuV.js +93 -0
- package/dist/float-button/FloatButton.vue.d.ts +20 -0
- package/dist/float-button/FloatButtonBadge.vue.d.ts +18 -0
- package/dist/float-button/FloatButtonGroup.vue.d.ts +17 -0
- package/dist/float-button/FloatButtonNodeRenderer.d.ts +17 -0
- package/dist/float-button/index.d.ts +4 -0
- package/dist/float-button/index.js +2 -0
- package/dist/float-button/types.d.ts +59 -0
- package/dist/float-button-qU3b0WBX.js +190 -0
- package/dist/form/ArrayField.d.ts +24 -0
- package/dist/form/Form.vue.d.ts +38 -0
- package/dist/form/FormErrorMessage.vue.d.ts +4 -0
- package/dist/form/FormField.d.ts +9 -0
- package/dist/form/FormInputGroup.d.ts +62 -0
- package/dist/form/FormLabel.vue.d.ts +18 -0
- package/dist/form/FormNodeRenderer.d.ts +15 -0
- package/dist/form/FormSection.vue.d.ts +16 -0
- package/dist/form/FormSlot.d.ts +3 -0
- package/dist/form/form-context.d.ts +4 -0
- package/dist/form/index.d.ts +68 -0
- package/dist/form/index.js +3 -0
- package/dist/form/internal-types.d.ts +67 -0
- package/dist/form/types.d.ts +273 -0
- package/dist/form/use-form.d.ts +11 -0
- package/dist/form/with-form.d.ts +3 -0
- package/dist/form-CLhGuORQ.js +2030 -0
- package/dist/foundation-Cawx37mp.js +1819 -0
- package/dist/grid/Col.vue.d.ts +13 -0
- package/dist/grid/Row.vue.d.ts +14 -0
- package/dist/grid/grid-context.d.ts +6 -0
- package/dist/grid/index.d.ts +5 -0
- package/dist/grid/index.js +2 -0
- package/dist/grid/media-query.d.ts +2 -0
- package/dist/grid/types.d.ts +44 -0
- package/dist/grid-Cn2uBhRd.js +161 -0
- package/dist/highlight/Highlight.vue.d.ts +10 -0
- package/dist/highlight/HighlightNodeRenderer.d.ts +49 -0
- package/dist/highlight/index.d.ts +4 -0
- package/dist/highlight/index.js +2 -0
- package/dist/highlight/internal-types.d.ts +8 -0
- package/dist/highlight/types.d.ts +17 -0
- package/dist/highlight-DHX3RV0C.js +158 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.js +2 -0
- package/dist/image/Image.vue.d.ts +21 -0
- package/dist/image/ImageNodeRenderer.d.ts +15 -0
- package/dist/image/ImagePreview.vue.d.ts +56 -0
- package/dist/image/ImagePreviewFooter.vue.d.ts +38 -0
- package/dist/image/ImagePreviewHeader.vue.d.ts +17 -0
- package/dist/image/ImagePreviewImage.vue.d.ts +27 -0
- package/dist/image/ImagePreviewInner.vue.d.ts +54 -0
- package/dist/image/image-context.d.ts +14 -0
- package/dist/image/index.d.ts +6 -0
- package/dist/image/index.js +2 -0
- package/dist/image/types.d.ts +183 -0
- package/dist/image-C-ifCh_9.js +1615 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +75 -0
- package/dist/input/Input.vue.d.ts +58 -0
- package/dist/input/InputGroup.d.ts +69 -0
- package/dist/input/InputNodeRenderer.d.ts +15 -0
- package/dist/input/TextArea.vue.d.ts +50 -0
- package/dist/input/index.d.ts +11 -0
- package/dist/input/index.js +2 -0
- package/dist/input/types.d.ts +168 -0
- package/dist/input-number/InputNumber.vue.d.ts +52 -0
- package/dist/input-number/index.d.ts +10 -0
- package/dist/input-number/index.js +5 -0
- package/dist/input-number/types.d.ts +56 -0
- package/dist/input-wf0nZCRS.js +747 -0
- package/dist/isBefore-BG1hiM9f.js +37 -0
- package/dist/isElement-Cx0AsIov.js +11 -0
- package/dist/isEnterPress-HTy0eCBp.js +8 -0
- package/dist/isNullOrUndefined-Cg6MZ8r3.js +6 -0
- package/dist/isPromise-D2v3Ejff.js +11 -0
- package/dist/keyCode-DMNg63wX.js +110 -0
- package/dist/layout/Layout.vue.d.ts +14 -0
- package/dist/layout/LayoutContent.vue.d.ts +14 -0
- package/dist/layout/LayoutFooter.vue.d.ts +14 -0
- package/dist/layout/LayoutHeader.vue.d.ts +14 -0
- package/dist/layout/LayoutSection.vue.d.ts +17 -0
- package/dist/layout/LayoutSider.vue.d.ts +18 -0
- package/dist/layout/index.d.ts +17 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout/layout-context.d.ts +6 -0
- package/dist/layout/media-query.d.ts +4 -0
- package/dist/layout/types.d.ts +31 -0
- package/dist/layout-tq-_l_O3.js +171 -0
- package/dist/list/List.vue.d.ts +22 -0
- package/dist/list/ListItem.vue.d.ts +88 -0
- package/dist/list/ListNodeRenderer.d.ts +15 -0
- package/dist/list/ListSpin.vue.d.ts +16 -0
- package/dist/list/index.d.ts +10 -0
- package/dist/list/index.js +2 -0
- package/dist/list/list-context.d.ts +8 -0
- package/dist/list/types.d.ts +66 -0
- package/dist/list-DHIOE2Y-.js +387 -0
- package/dist/modal/ConfirmModal.vue.d.ts +14 -0
- package/dist/modal/Modal.vue.d.ts +15 -0
- package/dist/modal/ModalDefaultFooter.vue.d.ts +22 -0
- package/dist/modal/ModalDialog.vue.d.ts +53 -0
- package/dist/modal/ModalInnerContent.vue.d.ts +38 -0
- package/dist/modal/ModalNodeRenderer.d.ts +15 -0
- package/dist/modal/imperative.d.ts +9 -0
- package/dist/modal/index.d.ts +8 -0
- package/dist/modal/index.js +2 -0
- package/dist/modal/types.d.ts +92 -0
- package/dist/modal/use-modal.d.ts +2 -0
- package/dist/modal-YVolL7Hz.js +221 -0
- package/dist/navigation/CollapseButton.vue.d.ts +12 -0
- package/dist/navigation/NavFooter.vue.d.ts +15 -0
- package/dist/navigation/NavHeader.vue.d.ts +13 -0
- package/dist/navigation/NavItem.d.ts +177 -0
- package/dist/navigation/Navigation.vue.d.ts +29 -0
- package/dist/navigation/NavigationContextProvider.d.ts +16 -0
- package/dist/navigation/NavigationIconRenderer.d.ts +45 -0
- package/dist/navigation/NavigationItemTree.vue.d.ts +8 -0
- package/dist/navigation/NavigationNodeRenderer.d.ts +18 -0
- package/dist/navigation/SubNav.vue.d.ts +18 -0
- package/dist/navigation/index.d.ts +14 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation/navigation-context.d.ts +35 -0
- package/dist/navigation/types.d.ts +177 -0
- package/dist/navigation-DF8R5jFK.js +1479 -0
- package/dist/notification/NotificationHost.vue.d.ts +7 -0
- package/dist/notification/NotificationNodeRenderer.d.ts +15 -0
- package/dist/notification/NotificationNotice.vue.d.ts +16 -0
- package/dist/notification/imperative.d.ts +12 -0
- package/dist/notification/index.d.ts +6 -0
- package/dist/notification/index.js +2 -0
- package/dist/notification/notification-store.d.ts +24 -0
- package/dist/notification/types.d.ts +63 -0
- package/dist/notification/use-notification.d.ts +2 -0
- package/dist/notification-DIsvgiIO.js +445 -0
- package/dist/overflow-list/OverflowList.vue.d.ts +131 -0
- package/dist/overflow-list/OverflowListNodeRenderer.d.ts +35 -0
- package/dist/overflow-list/index.d.ts +5 -0
- package/dist/overflow-list/index.js +2 -0
- package/dist/overflow-list/types.d.ts +35 -0
- package/dist/overflow-list-Df6ixrtB.js +413 -0
- package/dist/pagination/Pagination.vue.d.ts +25 -0
- package/dist/pagination/PaginationNodeRenderer.d.ts +15 -0
- package/dist/pagination/PaginationPopover.vue.d.ts +25 -0
- package/dist/pagination/PaginationRestList.vue.d.ts +11 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/index.js +2 -0
- package/dist/pagination/types.d.ts +46 -0
- package/dist/pin-code/PinCode.vue.d.ts +20 -0
- package/dist/pin-code/index.d.ts +10 -0
- package/dist/pin-code/index.js +2 -0
- package/dist/pin-code/types.d.ts +25 -0
- package/dist/pin-code-wY5g0KLD.js +193 -0
- package/dist/popconfirm/Popconfirm.vue.d.ts +25 -0
- package/dist/popconfirm/PopconfirmNodeRenderer.d.ts +15 -0
- package/dist/popconfirm/index.d.ts +4 -0
- package/dist/popconfirm/index.js +2 -0
- package/dist/popconfirm/types.d.ts +57 -0
- package/dist/popconfirm-DQUtvI0A.js +389 -0
- package/dist/popover/Popover.vue.d.ts +23 -0
- package/dist/popover/PopoverArrow.vue.d.ts +10 -0
- package/dist/popover/index.d.ts +4 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover/types.d.ts +35 -0
- package/dist/popover-hD77YpUM.js +292 -0
- package/dist/progress/Progress.vue.d.ts +24 -0
- package/dist/progress/ProgressCircle.vue.d.ts +26 -0
- package/dist/progress/ProgressLine.vue.d.ts +23 -0
- package/dist/progress/ProgressNodeRenderer.d.ts +15 -0
- package/dist/progress/index.d.ts +6 -0
- package/dist/progress/index.js +2 -0
- package/dist/progress/types.d.ts +44 -0
- package/dist/progress-DIIyWKKD.js +9 -0
- package/dist/radio/Radio.vue.d.ts +30 -0
- package/dist/radio/RadioGroup.d.ts +201 -0
- package/dist/radio/RadioNodeRenderer.d.ts +15 -0
- package/dist/radio/index.d.ts +10 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/radio-context.d.ts +15 -0
- package/dist/radio/types.d.ts +100 -0
- package/dist/radio-y9iAI359.js +565 -0
- package/dist/rating/Rating.vue.d.ts +39 -0
- package/dist/rating/RatingItem.vue.d.ts +33 -0
- package/dist/rating/RatingNodeRenderer.d.ts +17 -0
- package/dist/rating/index.d.ts +6 -0
- package/dist/rating/index.js +2 -0
- package/dist/rating/types.d.ts +57 -0
- package/dist/rating-CJkb4pkD.js +542 -0
- package/dist/resizable/Resizable.vue.d.ts +31 -0
- package/dist/resizable/ResizableNodeRenderer.d.ts +17 -0
- package/dist/resizable/ResizeGroup.vue.d.ts +13 -0
- package/dist/resizable/ResizeHandler.vue.d.ts +11 -0
- package/dist/resizable/ResizeItem.vue.d.ts +19 -0
- package/dist/resizable/SingleResizeHandle.vue.d.ts +21 -0
- package/dist/resizable/index.d.ts +6 -0
- package/dist/resizable/index.js +2 -0
- package/dist/resizable/resizable-context.d.ts +27 -0
- package/dist/resizable/types.d.ts +87 -0
- package/dist/resizable/use-resize-group.d.ts +21 -0
- package/dist/resizable/use-single-resize.d.ts +30 -0
- package/dist/resizable-CEB0ZdGT.js +814 -0
- package/dist/scroll-list/ScrollItem.vue.d.ts +21 -0
- package/dist/scroll-list/ScrollList.vue.d.ts +11 -0
- package/dist/scroll-list/ScrollListNodeRenderer.d.ts +15 -0
- package/dist/scroll-list/index.d.ts +10 -0
- package/dist/scroll-list/index.js +2 -0
- package/dist/scroll-list/types.d.ts +54 -0
- package/dist/scroll-list-BSXksNOR.js +466 -0
- package/dist/select/Select.vue.d.ts +39 -0
- package/dist/select/SelectFragment.d.ts +4 -0
- package/dist/select/SelectNodeRenderer.d.ts +15 -0
- package/dist/select/SelectOption.vue.d.ts +13 -0
- package/dist/select/SelectOptionCollector.d.ts +13 -0
- package/dist/select/SelectOptionGroup.vue.d.ts +14 -0
- package/dist/select/index.d.ts +12 -0
- package/dist/select/index.js +3 -0
- package/dist/select/types.d.ts +165 -0
- package/dist/select/use-select-foundation.d.ts +64 -0
- package/dist/select-BeM6gxAU.js +40 -0
- package/dist/side-sheet/SideSheet.vue.d.ts +19 -0
- package/dist/side-sheet/SideSheetContent.vue.d.ts +37 -0
- package/dist/side-sheet/SideSheetNodeRenderer.d.ts +15 -0
- package/dist/side-sheet/index.d.ts +4 -0
- package/dist/side-sheet/index.js +2 -0
- package/dist/side-sheet/types.d.ts +46 -0
- package/dist/side-sheet-9CBTk23r.js +542 -0
- package/dist/skeleton/Skeleton.vue.d.ts +15 -0
- package/dist/skeleton/SkeletonAvatar.vue.d.ts +9 -0
- package/dist/skeleton/SkeletonButton.vue.d.ts +7 -0
- package/dist/skeleton/SkeletonImage.vue.d.ts +7 -0
- package/dist/skeleton/SkeletonNodeRenderer.d.ts +15 -0
- package/dist/skeleton/SkeletonParagraph.vue.d.ts +8 -0
- package/dist/skeleton/SkeletonTitle.vue.d.ts +7 -0
- package/dist/skeleton/index.d.ts +18 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/skeleton/types.d.ts +36 -0
- package/dist/skeleton-p61lfhoz.js +302 -0
- package/dist/slider/Slider.vue.d.ts +32 -0
- package/dist/slider/SliderFragment.d.ts +4 -0
- package/dist/slider/index.d.ts +5 -0
- package/dist/slider/index.js +5 -0
- package/dist/slider/types.d.ts +57 -0
- package/dist/slider/use-slider-foundation.d.ts +47 -0
- package/dist/space/Space.vue.d.ts +16 -0
- package/dist/space/index.d.ts +3 -0
- package/dist/space/index.js +2 -0
- package/dist/space/types.d.ts +15 -0
- package/dist/space-DVnFbkCz.js +63 -0
- package/dist/spin/Spin.vue.d.ts +105 -0
- package/dist/spin/SpinNodeRenderer.d.ts +15 -0
- package/dist/spin/index.d.ts +6 -0
- package/dist/spin/index.js +2 -0
- package/dist/spin/types.d.ts +20 -0
- package/dist/spin-D-1P0WMW.js +9 -0
- package/dist/src-DNBBthjO.js +490 -0
- package/dist/steps/Step.vue.d.ts +22 -0
- package/dist/steps/Steps.vue.d.ts +24 -0
- package/dist/steps/StepsNodeRenderer.d.ts +17 -0
- package/dist/steps/index.d.ts +9 -0
- package/dist/steps/index.js +2 -0
- package/dist/steps/steps-context.d.ts +6 -0
- package/dist/steps/types.d.ts +54 -0
- package/dist/steps-6p04q-Lz.js +303 -0
- package/dist/switch/Switch.vue.d.ts +27 -0
- package/dist/switch/SwitchNodeRenderer.d.ts +15 -0
- package/dist/switch/SwitchSpin.vue.d.ts +7 -0
- package/dist/switch/index.d.ts +7 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch/types.d.ts +28 -0
- package/dist/switch-Dte2Fl3l.js +284 -0
- package/dist/table/Table.vue.d.ts +29 -0
- package/dist/table/TableBody.vue.d.ts +70 -0
- package/dist/table/TableCell.vue.d.ts +37 -0
- package/dist/table/TableColumn.d.ts +81 -0
- package/dist/table/TableFilterMenu.vue.d.ts +18 -0
- package/dist/table/TableHeader.vue.d.ts +46 -0
- package/dist/table/TableNativeElement.d.ts +9 -0
- package/dist/table/TableNodeRenderer.d.ts +13 -0
- package/dist/table/TableSpin.vue.d.ts +16 -0
- package/dist/table/index.d.ts +13 -0
- package/dist/table/index.js +2 -0
- package/dist/table/table-utils.d.ts +43 -0
- package/dist/table/types.d.ts +323 -0
- package/dist/table-jZkHjf-W.js +2097 -0
- package/dist/tabs/TabBar.vue.d.ts +38 -0
- package/dist/tabs/TabItem.vue.d.ts +26 -0
- package/dist/tabs/TabPane.vue.d.ts +13 -0
- package/dist/tabs/Tabs.vue.d.ts +36 -0
- package/dist/tabs/TabsDropdown.vue.d.ts +27 -0
- package/dist/tabs/TabsNodeRenderer.d.ts +15 -0
- package/dist/tabs/index.d.ts +6 -0
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/tabs-context.d.ts +12 -0
- package/dist/tabs/types.d.ts +110 -0
- package/dist/tabs-CezuYzIu.js +874 -0
- package/dist/tag/SplitTagGroup.d.ts +36 -0
- package/dist/tag/Tag.vue.d.ts +33 -0
- package/dist/tag/TagGroup.d.ts +115 -0
- package/dist/tag/TagNodeRenderer.d.ts +15 -0
- package/dist/tag/index.d.ts +8 -0
- package/dist/tag/index.js +2 -0
- package/dist/tag/types.d.ts +82 -0
- package/dist/tag-BPD0bELU.js +348 -0
- package/dist/tag-input/TagInput.vue.d.ts +51 -0
- package/dist/tag-input/TagInputNodeRenderer.d.ts +17 -0
- package/dist/tag-input/TagInputRestPopover.vue.d.ts +19 -0
- package/dist/tag-input/TagInputTag.vue.d.ts +27 -0
- package/dist/tag-input/index.d.ts +5 -0
- package/dist/tag-input/index.js +2 -0
- package/dist/tag-input/types.d.ts +95 -0
- package/dist/tag-input/use-tag-input-foundation.d.ts +47 -0
- package/dist/tag-input-SxUfNqF0.js +784 -0
- package/dist/time-picker/TimePicker.vue.d.ts +27 -0
- package/dist/time-picker/TimePickerColumn.vue.d.ts +29 -0
- package/dist/time-picker/TimePickerNodeRenderer.d.ts +17 -0
- package/dist/time-picker/TimePickerPanel.vue.d.ts +32 -0
- package/dist/time-picker/index.d.ts +5 -0
- package/dist/time-picker/index.js +2 -0
- package/dist/time-picker/types.d.ts +146 -0
- package/dist/time-picker/use-time-picker-foundation.d.ts +36 -0
- package/dist/time-picker-D6p36ea8.js +3587 -0
- package/dist/timeline/Timeline.vue.d.ts +69 -0
- package/dist/timeline/TimelineItem.vue.d.ts +100 -0
- package/dist/timeline/TimelineNodeRenderer.d.ts +15 -0
- package/dist/timeline/index.d.ts +10 -0
- package/dist/timeline/index.js +2 -0
- package/dist/timeline/types.d.ts +43 -0
- package/dist/timeline-2D5xCZsU.js +191 -0
- package/dist/toast/ToastHost.vue.d.ts +7 -0
- package/dist/toast/ToastIconRenderer.d.ts +17 -0
- package/dist/toast/ToastNodeRenderer.d.ts +15 -0
- package/dist/toast/ToastNotice.vue.d.ts +20 -0
- package/dist/toast/imperative.d.ts +3 -0
- package/dist/toast/index.d.ts +6 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/toast-store.d.ts +30 -0
- package/dist/toast/types.d.ts +65 -0
- package/dist/toast/use-toast.d.ts +2 -0
- package/dist/toast-s8nFLf8t.js +523 -0
- package/dist/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/tooltip/TooltipArrow.vue.d.ts +8 -0
- package/dist/tooltip/TooltipNodeRenderer.d.ts +15 -0
- package/dist/tooltip/TooltipPortal.vue.d.ts +44 -0
- package/dist/tooltip/TooltipTriggerRenderer.d.ts +66 -0
- package/dist/tooltip/index.d.ts +5 -0
- package/dist/tooltip/index.js +3 -0
- package/dist/tooltip/types.d.ts +117 -0
- package/dist/tooltip/use-tooltip-foundation.d.ts +25 -0
- package/dist/tooltip-en9bvXRp.js +28 -0
- package/dist/transfer/Transfer.vue.d.ts +35 -0
- package/dist/transfer/TransferNodeRenderer.d.ts +15 -0
- package/dist/transfer/index.d.ts +5 -0
- package/dist/transfer/index.js +2 -0
- package/dist/transfer/types.d.ts +159 -0
- package/dist/transfer-Doq1sI9z.js +695 -0
- package/dist/tree/Tree.vue.d.ts +73 -0
- package/dist/tree/TreeNode.vue.d.ts +77 -0
- package/dist/tree/TreeNodeMotion.vue.d.ts +20 -0
- package/dist/tree/TreeNodeRenderer.d.ts +15 -0
- package/dist/tree/index.d.ts +9 -0
- package/dist/tree/index.js +5 -0
- package/dist/tree/types.d.ts +180 -0
- package/dist/tree-select/TreeSelect.vue.d.ts +76 -0
- package/dist/tree-select/TreeSelectNodeRenderer.d.ts +15 -0
- package/dist/tree-select/index.d.ts +6 -0
- package/dist/tree-select/index.js +2 -0
- package/dist/tree-select/types.d.ts +156 -0
- package/dist/tree-select-BIu6Owuq.js +1237 -0
- package/dist/treeUtil-IUdRJ6Ws.js +277 -0
- package/dist/typography/Numeral.vue.d.ts +32 -0
- package/dist/typography/Paragraph.vue.d.ts +30 -0
- package/dist/typography/Text.vue.d.ts +30 -0
- package/dist/typography/Title.vue.d.ts +28 -0
- package/dist/typography/Typography.vue.d.ts +13 -0
- package/dist/typography/TypographyBase.vue.d.ts +40 -0
- package/dist/typography/TypographyCopyable.vue.d.ts +29 -0
- package/dist/typography/TypographyDecorations.d.ts +34 -0
- package/dist/typography/TypographyNodeRenderer.d.ts +17 -0
- package/dist/typography/index.d.ts +17 -0
- package/dist/typography/index.js +2 -0
- package/dist/typography/types.d.ts +108 -0
- package/dist/typography/typography-locale.d.ts +5 -0
- package/dist/typography/typography-utils.d.ts +4 -0
- package/dist/typography-DF8KwKuL.js +914 -0
- package/dist/upload/Upload.vue.d.ts +69 -0
- package/dist/upload/UploadFileCard.vue.d.ts +4 -0
- package/dist/upload/UploadNodeRenderer.d.ts +15 -0
- package/dist/upload/index.d.ts +10 -0
- package/dist/upload/index.js +2 -0
- package/dist/upload/types.d.ts +250 -0
- package/dist/upload-BzdpoGJX.js +1777 -0
- package/dist/uuid-BUHV1G8U.js +21 -0
- package/dist/warning-naSiE8G7.js +6 -0
- package/dist/zh-CN-CCu7YvUA.js +1623 -0
- package/package.json +336 -0
|
@@ -0,0 +1,856 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { D as e, _ as t, k as n, s as r, t as i } from "./foundation-Cawx37mp.js";
|
|
3
|
+
import { r as a } from "./keyCode-DMNg63wX.js";
|
|
4
|
+
import { a as o, i as s, o as c } from "./Input-BYWFIgNn.js";
|
|
5
|
+
import { t as l } from "./input-wf0nZCRS.js";
|
|
6
|
+
import { t as u } from "./config-context-CyynTtDb.js";
|
|
7
|
+
import { computed as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createVNode as h, defineComponent as g, getCurrentInstance as _, inject as te, markRaw as ne, mergeProps as re, nextTick as ie, normalizeClass as v, normalizeStyle as ae, onBeforeUnmount as oe, onMounted as se, openBlock as y, renderSlot as b, shallowReactive as ce, unref as x, useAttrs as S, useSlots as C, useTemplateRef as le, watch as ue, withCtx as w } from "vue";
|
|
8
|
+
import { IconChevronDown as T, IconChevronUp as E } from "@aifuxi/semi-icons-vue";
|
|
9
|
+
({ ...s });
|
|
10
|
+
var D = {
|
|
11
|
+
...o,
|
|
12
|
+
DEFAULT_STEP: 1,
|
|
13
|
+
DEFAULT_SHIFT_STEP: 10,
|
|
14
|
+
DEFAULT_PRESS_TIMEOUT: 250,
|
|
15
|
+
DEFAULT_PRESS_INTERVAL: 0,
|
|
16
|
+
MOUSE_BUTTON_LEFT: 0
|
|
17
|
+
};
|
|
18
|
+
({ ...c });
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region bundled-foundation
|
|
21
|
+
function O(e, t) {
|
|
22
|
+
let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = 10 ** Math.max(n, r);
|
|
23
|
+
return Math.round(e * i + t * i) / i;
|
|
24
|
+
}
|
|
25
|
+
function k(e, t) {
|
|
26
|
+
return O(e, -t);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region bundled-foundation
|
|
30
|
+
var de = class extends i {
|
|
31
|
+
constructor(...e) {
|
|
32
|
+
super(...e), this._decimalPointSymbol = void 0, this._currencySymbol = "";
|
|
33
|
+
}
|
|
34
|
+
init() {
|
|
35
|
+
this._isCurrency() && this._setCurrencySymbol(), this._setInitValue();
|
|
36
|
+
}
|
|
37
|
+
destroy() {
|
|
38
|
+
this._unregisterInterval(), this._unregisterTimer(), this._adapter.unregisterGlobalEvent("mouseup");
|
|
39
|
+
}
|
|
40
|
+
isControlled() {
|
|
41
|
+
return this._isControlledComponent("value");
|
|
42
|
+
}
|
|
43
|
+
_isCurrency() {
|
|
44
|
+
let { currency: e } = this.getProps();
|
|
45
|
+
return e === !0 || typeof e == "string" && e.trim() !== "";
|
|
46
|
+
}
|
|
47
|
+
_getFinalCurrency() {
|
|
48
|
+
let { currency: e } = this.getProps();
|
|
49
|
+
return e === !0 ? this.getProp("defaultCurrency") : e;
|
|
50
|
+
}
|
|
51
|
+
_doInput(e = "", t = null, n = null) {
|
|
52
|
+
let r = e, i = e, a = !0, o = this.isControlled();
|
|
53
|
+
typeof e != "number" && (i = this.doParse(e, !1), a = !isNaN(i)), a && (r = i, o || this._adapter.setNumber(i)), o || this._adapter.setValue(e, n), this.getProp("keepFocus") && this._adapter.setFocusing(!0, () => {
|
|
54
|
+
this._adapter.setClickUpOrDown(!0);
|
|
55
|
+
}), this.notifyChange(r, t);
|
|
56
|
+
}
|
|
57
|
+
_registerInterval(e) {
|
|
58
|
+
let t = this.getProp("pressInterval") || D.DEFAULT_PRESS_INTERVAL;
|
|
59
|
+
this._intervalHasRegistered = !0, this._interval = setInterval(() => {
|
|
60
|
+
typeof e == "function" && this._intervalHasRegistered && e();
|
|
61
|
+
}, t);
|
|
62
|
+
}
|
|
63
|
+
_unregisterInterval() {
|
|
64
|
+
this._interval &&= (this._intervalHasRegistered = !1, clearInterval(this._interval), null);
|
|
65
|
+
}
|
|
66
|
+
_registerTimer(e) {
|
|
67
|
+
let t = this.getProp("pressTimeout") || D.DEFAULT_PRESS_TIMEOUT;
|
|
68
|
+
this._timerHasRegistered = !0, this._timer = setTimeout(() => {
|
|
69
|
+
this._timerHasRegistered && typeof e == "function" && e();
|
|
70
|
+
}, t);
|
|
71
|
+
}
|
|
72
|
+
_unregisterTimer() {
|
|
73
|
+
this._timer &&= (this._timerHasRegistered = !1, clearTimeout(this._timer), null);
|
|
74
|
+
}
|
|
75
|
+
_setCurrencySymbol() {
|
|
76
|
+
let { localeCode: e, currencyDisplay: t } = this.getProps(), n = new Intl.NumberFormat(e, {
|
|
77
|
+
style: "currency",
|
|
78
|
+
currency: this._getFinalCurrency() || this.getCurrencyByLocaleCode(),
|
|
79
|
+
currencyDisplay: t
|
|
80
|
+
}).formatToParts(1234.5);
|
|
81
|
+
for (let e of n) e.type === "decimal" && (this._decimalPointSymbol = e.value), e.type === "currency" && (this._currencySymbol = e.value);
|
|
82
|
+
}
|
|
83
|
+
handleInputFocus(e) {
|
|
84
|
+
let t = this.getState("value");
|
|
85
|
+
if (t !== "" && this._isScientificNotation() && !this._isCurrency()) {
|
|
86
|
+
let e = (0, n.default)(t);
|
|
87
|
+
if (/e/i.test(e) && /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)[eE][+-]?\d+$/.test(e.trim())) {
|
|
88
|
+
let t = this.doParse(e, !1, !1, !1);
|
|
89
|
+
if (this.isValidNumber(t)) {
|
|
90
|
+
let e = this.doFormat(t, !0, !1);
|
|
91
|
+
this._adapter.setValue(e);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
this._adapter.recordCursorPosition(), this._adapter.setFocusing(!0, null), this._adapter.setClickUpOrDown(!1), this._adapter.notifyFocus(e);
|
|
96
|
+
}
|
|
97
|
+
handleInputChange(e, t) {
|
|
98
|
+
let n = this.doParse(e, !0, !0, !0), r = this.doParse(e, !1, !1, !1), i = this.afterParser(e);
|
|
99
|
+
this._adapter.recordCursorPosition();
|
|
100
|
+
let a, o = r, s = e;
|
|
101
|
+
if (e === "") this.isControlled() || (o = null);
|
|
102
|
+
else if (this.isValidNumber(r) && this.isValidNumber(n)) a = r, s = this.doFormat(r, !1);
|
|
103
|
+
else {
|
|
104
|
+
if (typeof r == "number" && !isNaN(r)) {
|
|
105
|
+
s = this.doFormat(r, !1);
|
|
106
|
+
let e = i.lastIndexOf("."), t = i.length - 1 - e, n = this._getPrecLen(r);
|
|
107
|
+
if (!n) {
|
|
108
|
+
let t = e > -1 ? i.slice(e) : "";
|
|
109
|
+
s += t;
|
|
110
|
+
} else if (n < t) for (let e = 0; e < t - n; e++) s += "0";
|
|
111
|
+
o = r;
|
|
112
|
+
} else s = this.doFormat(i, !1);
|
|
113
|
+
a = this.isControlled() ? s : i;
|
|
114
|
+
}
|
|
115
|
+
!this.isControlled() && (o === null || typeof o == "number" && !isNaN(o)) && this._adapter.setNumber(o), this._adapter.setValue(this.isControlled() && !this._isCurrency() ? s : this.doFormat(i, !1), () => {
|
|
116
|
+
this._adapter.restoreCursor();
|
|
117
|
+
}), this.notifyChange(a, t);
|
|
118
|
+
}
|
|
119
|
+
handleInputKeyDown(e) {
|
|
120
|
+
let t = e.keyCode;
|
|
121
|
+
if (t === a.UP || t === a.DOWN) {
|
|
122
|
+
this._adapter.setClickUpOrDown(!0), this._adapter.recordCursorPosition();
|
|
123
|
+
let n = t === a.UP ? this.add(null, e) : this.minus(null, e);
|
|
124
|
+
this._doInput(n, e, () => {
|
|
125
|
+
this._adapter.restoreCursor();
|
|
126
|
+
}), e.preventDefault();
|
|
127
|
+
}
|
|
128
|
+
this._adapter.notifyKeyDown(e);
|
|
129
|
+
}
|
|
130
|
+
handleInputBlur(e) {
|
|
131
|
+
let t = (0, n.default)(this.getState("value")), r = this.getState("number");
|
|
132
|
+
if (r != null || t != null && t !== "") {
|
|
133
|
+
let n = this.doParse(t, !1, !0, !0), i = !1, a = !1, o, s;
|
|
134
|
+
if (this.isValidNumber(n) && r !== n && (o = n, this.isControlled() || (r = o), i = !0), !this.isValidNumber(n)) {
|
|
135
|
+
let e = parseFloat(t);
|
|
136
|
+
if (!isNaN(e)) {
|
|
137
|
+
let t = this.fetchMinOrMax(e);
|
|
138
|
+
t !== r && (o = t, this.isControlled() || (r = o), i = !0);
|
|
139
|
+
} else if (typeof r == "number" && !isNaN(r)) {
|
|
140
|
+
let e = this.fetchMinOrMax(r);
|
|
141
|
+
e !== r && (o = e, this.isControlled() || (r = o), i = !0);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
let c = this.doFormat(r, !0, !0);
|
|
145
|
+
if (c !== t && (s = c, a = !0), a || i) {
|
|
146
|
+
let t = s ?? o;
|
|
147
|
+
s != null && this._adapter.setValue(s), o != null && (this._isControlledComponent("value") || this._adapter.setNumber(o)), this.notifyChange(t, e);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
this._adapter.setFocusing(!1), this._adapter.notifyBlur(e);
|
|
151
|
+
}
|
|
152
|
+
handleInputMouseEnter(e) {
|
|
153
|
+
this._adapter.setHovering(!0);
|
|
154
|
+
}
|
|
155
|
+
handleInputMouseLeave(e) {
|
|
156
|
+
this._adapter.setHovering(!1);
|
|
157
|
+
}
|
|
158
|
+
handleInputMouseMove(e) {
|
|
159
|
+
this._adapter.setHovering(!0);
|
|
160
|
+
}
|
|
161
|
+
handleMouseUp(e) {
|
|
162
|
+
this._unregisterInterval(), this._unregisterTimer(), this._adapter.unregisterGlobalEvent("mouseup");
|
|
163
|
+
}
|
|
164
|
+
handleUpClick(e) {
|
|
165
|
+
let { readonly: t } = this.getProps();
|
|
166
|
+
!this._isMouseButtonLeft(e) || t || (this._adapter.setClickUpOrDown(!0), e && (this._persistEvent(e), e.stopPropagation(), this._preventDefault(e)), this.upClick(e), this._registerTimer(() => {
|
|
167
|
+
this._registerInterval(() => {
|
|
168
|
+
this.upClick(e);
|
|
169
|
+
});
|
|
170
|
+
}));
|
|
171
|
+
}
|
|
172
|
+
handleDownClick(e) {
|
|
173
|
+
let { readonly: t } = this.getProps();
|
|
174
|
+
!this._isMouseButtonLeft(e) || t || (this._adapter.setClickUpOrDown(!0), e && (this._persistEvent(e), e.stopPropagation(), this._preventDefault(e)), this.downClick(e), this._registerTimer(() => {
|
|
175
|
+
this._registerInterval(() => {
|
|
176
|
+
this.downClick(e);
|
|
177
|
+
});
|
|
178
|
+
}));
|
|
179
|
+
}
|
|
180
|
+
_isMouseButtonLeft(e) {
|
|
181
|
+
return (0, r.default)(e, "button") === D.MOUSE_BUTTON_LEFT;
|
|
182
|
+
}
|
|
183
|
+
_preventDefault(e) {
|
|
184
|
+
let t = this._adapter.getProp("keepFocus"), n = this._adapter.getProp("innerButtons");
|
|
185
|
+
(t || n) && e.preventDefault();
|
|
186
|
+
}
|
|
187
|
+
handleMouseLeave(e) {
|
|
188
|
+
this._adapter.registerGlobalEvent("mouseup", () => {
|
|
189
|
+
this.handleMouseUp(e);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
upClick(e) {
|
|
193
|
+
let t = this.add(null, e);
|
|
194
|
+
this._doInput(t, e), this._adapter.notifyUpClick(t, e);
|
|
195
|
+
}
|
|
196
|
+
downClick(e) {
|
|
197
|
+
let t = this.minus(null, e);
|
|
198
|
+
this._doInput(t, e), this._adapter.notifyDownClick(t, e);
|
|
199
|
+
}
|
|
200
|
+
_setInitValue() {
|
|
201
|
+
let { defaultValue: e, value: r } = this.getProps(), i = this._isControlledComponent("value") ? r : e, a = i;
|
|
202
|
+
typeof i == "number" && !this._isCurrency() ? a = this.doFormat(i) : this._isCurrency() || (a = (0, n.default)(i));
|
|
203
|
+
let o = this.doParse(a, !1, !0, !0), s = null;
|
|
204
|
+
typeof o == "number" && !isNaN(o) && (s = o);
|
|
205
|
+
let c = typeof s == "number" ? this.doFormat(s, !0, !0) : "";
|
|
206
|
+
this._adapter.setNumber(s), this._adapter.setValue(c), (0, t.default)(c) && c !== String(i ?? "") && this.notifyChange(c, null);
|
|
207
|
+
}
|
|
208
|
+
add(t, n) {
|
|
209
|
+
let r = n && n.shiftKey ? this.getProp("shiftStep") : this.getProp("step");
|
|
210
|
+
t = t == null ? r : Number(t);
|
|
211
|
+
let i = Math.abs((0, e.default)(t)), a = this.getState("number"), o = this.toNumber(a) || 0, s = this.getProp("min"), c = this.getProp("max"), l = this._getPrecLen(s), u = this._getPrecLen(c), d = this._getPrecLen(o), f = this._getPrecLen(t), p = 10 ** Math.max(l, u, d, f);
|
|
212
|
+
return t < 0 ? Math.abs(k(s, o)) >= i && (o = Math.round(o * p + t * p) / p) : t > 0 && Math.abs(k(c, o)) >= i && (o = Math.round(o * p + t * p) / p), typeof s == "number" && s > o && (o = s), typeof c == "number" && c < o && (o = c), this.doFormat(o, !0, this._isCurrency());
|
|
213
|
+
}
|
|
214
|
+
minus(e, t) {
|
|
215
|
+
let n = t && t.shiftKey ? this.getProp("shiftStep") : this.getProp("step");
|
|
216
|
+
return e = e == null ? n : Number(e), this.add(-e, t);
|
|
217
|
+
}
|
|
218
|
+
_getPrecLen(e) {
|
|
219
|
+
if (typeof e != "string") {
|
|
220
|
+
let t = Number(e || "");
|
|
221
|
+
if (!isFinite(t) || t === 0) return 0;
|
|
222
|
+
let n = Math.abs(t).toString();
|
|
223
|
+
if (/e/i.test(n)) {
|
|
224
|
+
let [e, t] = n.split(/e/i), r = (e.split(".")[1] || "").length;
|
|
225
|
+
return Math.max(0, r - parseInt(t, 10));
|
|
226
|
+
}
|
|
227
|
+
e = n;
|
|
228
|
+
}
|
|
229
|
+
let t = e.indexOf(".") + 1;
|
|
230
|
+
return t ? e.length - t : 0;
|
|
231
|
+
}
|
|
232
|
+
_adjustPrec(e) {
|
|
233
|
+
let t = this.getProp("precision");
|
|
234
|
+
return typeof t == "number" && e !== "" && e !== null && !Number.isNaN(Number(e)) && (e = Number(e).toFixed(t)), (0, n.default)(e);
|
|
235
|
+
}
|
|
236
|
+
formatCurrency(e) {
|
|
237
|
+
let { localeCode: t, minimumFractionDigits: n, precision: r, maximumFractionDigits: i, currencyDisplay: a, showCurrencySymbol: o } = this.getProps(), s = e;
|
|
238
|
+
typeof e == "string" && Number.isNaN(Number(e)) && (s = this.parseInternationalCurrency(e));
|
|
239
|
+
let c = new Intl.NumberFormat(t, {
|
|
240
|
+
style: "currency",
|
|
241
|
+
currency: this._getFinalCurrency() || this.getCurrencyByLocaleCode(),
|
|
242
|
+
currencyDisplay: a,
|
|
243
|
+
minimumFractionDigits: n || r || void 0,
|
|
244
|
+
maximumFractionDigits: i || r || void 0
|
|
245
|
+
}).format(Number(s));
|
|
246
|
+
return o ? c : c.replace(this._currencySymbol, "").trim();
|
|
247
|
+
}
|
|
248
|
+
_isScientificNotation() {
|
|
249
|
+
let { scientificNotation: e } = this.getProps();
|
|
250
|
+
return e === !0 || typeof e == "object" && !!e;
|
|
251
|
+
}
|
|
252
|
+
_getScientificNotationThreshold() {
|
|
253
|
+
let { scientificNotation: e } = this.getProps();
|
|
254
|
+
if (typeof e == "object" && e) {
|
|
255
|
+
let t = e.threshold;
|
|
256
|
+
return typeof t == "number" && Number.isFinite(t) && t >= 1 ? t : 15;
|
|
257
|
+
}
|
|
258
|
+
return 15;
|
|
259
|
+
}
|
|
260
|
+
_toScientificNotation(e) {
|
|
261
|
+
let t = this._getScientificNotationThreshold(), n = Math.abs(e), r = String(n), i = /e/i.test(r), a = r.replace(/[.\-+eE]/g, "").replace(/^0+/, "");
|
|
262
|
+
if ((i || a.length >= t) && n !== 0) {
|
|
263
|
+
let n = Math.max(0, Math.min(100, Math.floor(t) - 1));
|
|
264
|
+
return e.toExponential(n).replace(/(\.\d*?)0+e/, "$1e").replace(/\.e/, "e");
|
|
265
|
+
}
|
|
266
|
+
return String(e);
|
|
267
|
+
}
|
|
268
|
+
doFormat(e = 0, t = !0, r = !1) {
|
|
269
|
+
let { formatter: i } = this.getProps(), a;
|
|
270
|
+
if (a = this._isCurrency() && r ? this.formatCurrency(e) : t ? this._adjustPrec(e) : (0, n.default)(e), this._isScientificNotation() && r && !this._isCurrency()) {
|
|
271
|
+
let t = typeof e == "number" ? e : parseFloat(a);
|
|
272
|
+
!isNaN(t) && isFinite(t) && (a = this._toScientificNotation(t));
|
|
273
|
+
}
|
|
274
|
+
return typeof i == "function" && (a = i(a)), a;
|
|
275
|
+
}
|
|
276
|
+
fetchMinOrMax(e) {
|
|
277
|
+
let { min: t, max: n } = this.getProps();
|
|
278
|
+
return e < t ? t : e > n ? n : e;
|
|
279
|
+
}
|
|
280
|
+
parseInternationalCurrency(e) {
|
|
281
|
+
let t = e.replace(this._currencySymbol, "").replace(RegExp(`[^\\d${this._decimalPointSymbol}\\-]`, "g"), "");
|
|
282
|
+
return this._decimalPointSymbol && this._decimalPointSymbol !== "." && (t = t.replace(this._decimalPointSymbol, ".")), parseFloat(t);
|
|
283
|
+
}
|
|
284
|
+
doParse(t, r = !0, i = !1, a = !1) {
|
|
285
|
+
if (this._isCurrency() && typeof t == "string" && (t = this.parseInternationalCurrency(t)), typeof t == "number") return a && (t = this.fetchMinOrMax(t)), i && (t = this._adjustPrec(t)), (0, e.default)(t);
|
|
286
|
+
let o = this.getProp("parser");
|
|
287
|
+
if (typeof o == "function") {
|
|
288
|
+
let e = o(t);
|
|
289
|
+
t = typeof e == "number" ? (0, n.default)(e) : e;
|
|
290
|
+
}
|
|
291
|
+
if (typeof t == "string" && /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)[eE][+-]?\d+$/.test(t.trim())) {
|
|
292
|
+
let n = parseFloat(t.trim());
|
|
293
|
+
if (!isNaN(n)) return a ? this.fetchMinOrMax(n) : i ? (0, e.default)(this._adjustPrec(n)) : n;
|
|
294
|
+
}
|
|
295
|
+
if (r && typeof t == "string") {
|
|
296
|
+
let e = t.indexOf(".") === -1 || t.indexOf(".") > -1 && (t === "0" || t.lastIndexOf("0") < t.length - 1), n = t.lastIndexOf(".") < t.length - 1 && t.split("").filter((e) => e === ".").length < 2;
|
|
297
|
+
if (!e || !n) return NaN;
|
|
298
|
+
}
|
|
299
|
+
return i && (t = this._adjustPrec(t)), typeof t == "string" && t.length ? a ? this.fetchMinOrMax((0, e.default)(t)) : (0, e.default)(t) : NaN;
|
|
300
|
+
}
|
|
301
|
+
afterParser(e) {
|
|
302
|
+
let t = this.getProp("parser");
|
|
303
|
+
return typeof e == "string" && typeof t == "function" ? (0, n.default)(t(e)) : (0, n.default)(e);
|
|
304
|
+
}
|
|
305
|
+
toNumber(t, r = !0) {
|
|
306
|
+
if (typeof t == "number") return t;
|
|
307
|
+
if (typeof t == "string") {
|
|
308
|
+
let { parser: e } = this.getProps();
|
|
309
|
+
if (this._isCurrency() && (t = this.parseInternationalCurrency(t)), typeof e == "function") {
|
|
310
|
+
let r = e(t);
|
|
311
|
+
t = typeof r == "number" ? (0, n.default)(r) : r;
|
|
312
|
+
}
|
|
313
|
+
r && (t = this._adjustPrec(t));
|
|
314
|
+
}
|
|
315
|
+
return (0, e.default)(t);
|
|
316
|
+
}
|
|
317
|
+
isValidNumber(e, t = !0) {
|
|
318
|
+
if (typeof e == "number" && !isNaN(e)) {
|
|
319
|
+
let { min: n, max: r, precision: i } = this.getProps(), a = this._getPrecLen(e);
|
|
320
|
+
if (e >= n && e <= r && (!t || typeof i == "number" && a <= i || typeof i != "number")) return !0;
|
|
321
|
+
}
|
|
322
|
+
return !1;
|
|
323
|
+
}
|
|
324
|
+
isValidString(e) {
|
|
325
|
+
if (typeof e == "string" && e.length) {
|
|
326
|
+
let t = this.doParse(e);
|
|
327
|
+
return this.isValidNumber(t);
|
|
328
|
+
}
|
|
329
|
+
return !1;
|
|
330
|
+
}
|
|
331
|
+
notifyChange(e, t) {
|
|
332
|
+
if (e == null || e === "") this._adapter.notifyChange("", t);
|
|
333
|
+
else {
|
|
334
|
+
let n = this.toNumber(e, !0);
|
|
335
|
+
typeof n == "number" && !isNaN(n) ? (this._adapter.notifyChange(n, t), this.notifyNumberChange(n, t)) : this._adapter.notifyChange(this.afterParser(e), t);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
notifyNumberChange(e, t) {
|
|
339
|
+
let { number: n } = this.getStates();
|
|
340
|
+
this.isValidNumber(e) && e !== n && this._adapter.notifyNumberChange(e, t);
|
|
341
|
+
}
|
|
342
|
+
updateStates(e, t) {
|
|
343
|
+
this._adapter.updateStates(e, t);
|
|
344
|
+
}
|
|
345
|
+
getCurrencyByLocaleCode() {
|
|
346
|
+
let { localeCode: e } = this.getProps(), t = {
|
|
347
|
+
"zh-CN": "CNY",
|
|
348
|
+
"zh-HK": "HKD",
|
|
349
|
+
"zh-TW": "TWD",
|
|
350
|
+
"ja-JP": "JPY",
|
|
351
|
+
"ko-KR": "KRW",
|
|
352
|
+
"th-TH": "THB",
|
|
353
|
+
"vi-VN": "VND",
|
|
354
|
+
"ms-MY": "MYR",
|
|
355
|
+
"id-ID": "IDR",
|
|
356
|
+
"hi-IN": "INR",
|
|
357
|
+
"ar-SA": "SAR",
|
|
358
|
+
"en-GB": "GBP",
|
|
359
|
+
"de-DE": "EUR",
|
|
360
|
+
"fr-FR": "EUR",
|
|
361
|
+
"it-IT": "EUR",
|
|
362
|
+
"es-ES": "EUR",
|
|
363
|
+
"pt-PT": "EUR",
|
|
364
|
+
"ru-RU": "RUB",
|
|
365
|
+
"en-US": "USD",
|
|
366
|
+
"en-CA": "CAD",
|
|
367
|
+
"es-MX": "MXN",
|
|
368
|
+
"pt-BR": "BRL",
|
|
369
|
+
"es-AR": "ARS",
|
|
370
|
+
"en-AU": "AUD",
|
|
371
|
+
"en-NZ": "NZD",
|
|
372
|
+
"en-ZA": "ZAR",
|
|
373
|
+
"ar-EG": "EGP"
|
|
374
|
+
};
|
|
375
|
+
if (t[e]) return t[e];
|
|
376
|
+
let n = e.split("-")[0], r = {
|
|
377
|
+
en: "USD",
|
|
378
|
+
zh: "CNY",
|
|
379
|
+
es: "EUR",
|
|
380
|
+
fr: "EUR",
|
|
381
|
+
de: "EUR",
|
|
382
|
+
it: "EUR",
|
|
383
|
+
ja: "JPY",
|
|
384
|
+
ko: "KRW",
|
|
385
|
+
ru: "RUB",
|
|
386
|
+
ar: "SAR"
|
|
387
|
+
};
|
|
388
|
+
return r[n] ? r[n] : "USD";
|
|
389
|
+
}
|
|
390
|
+
}, A = "semi-input", j = /* @__PURE__ */ g({
|
|
391
|
+
name: "InputNumber",
|
|
392
|
+
inheritAttrs: !1,
|
|
393
|
+
__name: "InputNumber",
|
|
394
|
+
props: {
|
|
395
|
+
autofocus: {
|
|
396
|
+
type: Boolean,
|
|
397
|
+
default: !1
|
|
398
|
+
},
|
|
399
|
+
className: { type: [
|
|
400
|
+
Boolean,
|
|
401
|
+
null,
|
|
402
|
+
String,
|
|
403
|
+
Object,
|
|
404
|
+
Array
|
|
405
|
+
] },
|
|
406
|
+
currency: { type: [String, Boolean] },
|
|
407
|
+
currencyDisplay: {},
|
|
408
|
+
defaultCurrency: {},
|
|
409
|
+
defaultValue: {},
|
|
410
|
+
formatter: {},
|
|
411
|
+
hideButtons: {
|
|
412
|
+
type: Boolean,
|
|
413
|
+
default: !1
|
|
414
|
+
},
|
|
415
|
+
innerButtons: {
|
|
416
|
+
type: Boolean,
|
|
417
|
+
default: !1
|
|
418
|
+
},
|
|
419
|
+
keepFocus: {
|
|
420
|
+
type: Boolean,
|
|
421
|
+
default: !1
|
|
422
|
+
},
|
|
423
|
+
localeCode: {},
|
|
424
|
+
max: { default: Infinity },
|
|
425
|
+
maximumFractionDigits: {},
|
|
426
|
+
min: { default: -Infinity },
|
|
427
|
+
minimumFractionDigits: {},
|
|
428
|
+
modelValue: {},
|
|
429
|
+
parser: {},
|
|
430
|
+
precision: {},
|
|
431
|
+
pressInterval: { default: 250 },
|
|
432
|
+
pressTimeout: { default: 250 },
|
|
433
|
+
scientificNotation: { type: [Boolean, Object] },
|
|
434
|
+
shiftStep: { default: 10 },
|
|
435
|
+
showCurrencySymbol: {
|
|
436
|
+
type: Boolean,
|
|
437
|
+
default: !0
|
|
438
|
+
},
|
|
439
|
+
step: { default: 1 },
|
|
440
|
+
suffix: { type: [
|
|
441
|
+
Object,
|
|
442
|
+
String,
|
|
443
|
+
Number,
|
|
444
|
+
Boolean,
|
|
445
|
+
null,
|
|
446
|
+
Array
|
|
447
|
+
] },
|
|
448
|
+
value: {},
|
|
449
|
+
addonAfter: { type: [
|
|
450
|
+
Object,
|
|
451
|
+
String,
|
|
452
|
+
Number,
|
|
453
|
+
Boolean,
|
|
454
|
+
null,
|
|
455
|
+
Array
|
|
456
|
+
] },
|
|
457
|
+
addonBefore: { type: [
|
|
458
|
+
Object,
|
|
459
|
+
String,
|
|
460
|
+
Number,
|
|
461
|
+
Boolean,
|
|
462
|
+
null,
|
|
463
|
+
Array
|
|
464
|
+
] },
|
|
465
|
+
autoFocus: { type: Boolean },
|
|
466
|
+
borderless: {
|
|
467
|
+
type: Boolean,
|
|
468
|
+
default: !1
|
|
469
|
+
},
|
|
470
|
+
clearIcon: { type: [
|
|
471
|
+
Object,
|
|
472
|
+
String,
|
|
473
|
+
Number,
|
|
474
|
+
Boolean,
|
|
475
|
+
null,
|
|
476
|
+
Array
|
|
477
|
+
] },
|
|
478
|
+
composition: {
|
|
479
|
+
type: Boolean,
|
|
480
|
+
default: !1
|
|
481
|
+
},
|
|
482
|
+
disabled: {
|
|
483
|
+
type: Boolean,
|
|
484
|
+
default: !1
|
|
485
|
+
},
|
|
486
|
+
getValueLength: {},
|
|
487
|
+
hideSuffix: {
|
|
488
|
+
type: Boolean,
|
|
489
|
+
default: !1
|
|
490
|
+
},
|
|
491
|
+
id: {},
|
|
492
|
+
inputStyle: { type: [
|
|
493
|
+
Boolean,
|
|
494
|
+
null,
|
|
495
|
+
String,
|
|
496
|
+
Object,
|
|
497
|
+
Array
|
|
498
|
+
] },
|
|
499
|
+
insetLabel: { type: [
|
|
500
|
+
Object,
|
|
501
|
+
String,
|
|
502
|
+
Number,
|
|
503
|
+
Boolean,
|
|
504
|
+
null,
|
|
505
|
+
Array
|
|
506
|
+
] },
|
|
507
|
+
insetLabelId: {},
|
|
508
|
+
maxLength: {},
|
|
509
|
+
minLength: {},
|
|
510
|
+
mode: {},
|
|
511
|
+
onlyBorder: {},
|
|
512
|
+
placeholder: {},
|
|
513
|
+
prefix: { type: [
|
|
514
|
+
Object,
|
|
515
|
+
String,
|
|
516
|
+
Number,
|
|
517
|
+
Boolean,
|
|
518
|
+
null,
|
|
519
|
+
Array
|
|
520
|
+
] },
|
|
521
|
+
preventScroll: { type: Boolean },
|
|
522
|
+
readonly: {
|
|
523
|
+
type: Boolean,
|
|
524
|
+
default: !1
|
|
525
|
+
},
|
|
526
|
+
showClear: {
|
|
527
|
+
type: Boolean,
|
|
528
|
+
default: !1
|
|
529
|
+
},
|
|
530
|
+
showClearIgnoreDisabled: { type: Boolean },
|
|
531
|
+
size: { default: "default" },
|
|
532
|
+
type: {},
|
|
533
|
+
validateStatus: { default: "default" },
|
|
534
|
+
ariaDescribedby: {},
|
|
535
|
+
ariaErrormessage: {},
|
|
536
|
+
ariaInvalid: { type: [Boolean, String] },
|
|
537
|
+
ariaLabel: {},
|
|
538
|
+
ariaLabelledby: {},
|
|
539
|
+
ariaRequired: { type: [Boolean, String] }
|
|
540
|
+
},
|
|
541
|
+
emits: [
|
|
542
|
+
"blur",
|
|
543
|
+
"change",
|
|
544
|
+
"downClick",
|
|
545
|
+
"focus",
|
|
546
|
+
"keydown",
|
|
547
|
+
"numberChange",
|
|
548
|
+
"upClick",
|
|
549
|
+
"update:modelValue",
|
|
550
|
+
"update:value"
|
|
551
|
+
],
|
|
552
|
+
setup(e, { expose: t, emit: n }) {
|
|
553
|
+
let r = e, i = n, a = S(), o = C(), s = _(), c = te(u, void 0), g = le("inputComponent"), D = ce({
|
|
554
|
+
value: "",
|
|
555
|
+
number: null,
|
|
556
|
+
focusing: !!(r.autofocus || r.autoFocus),
|
|
557
|
+
hovering: !1
|
|
558
|
+
}), O = /* @__PURE__ */ new Map(), k = !1, j, M = null;
|
|
559
|
+
function N(e) {
|
|
560
|
+
let t = e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), n = s?.vnode.props;
|
|
561
|
+
return !!(n && (Object.prototype.hasOwnProperty.call(n, e) || Object.prototype.hasOwnProperty.call(n, t)));
|
|
562
|
+
}
|
|
563
|
+
let P = d(() => N("value")), fe = d(() => N("modelValue")), F = d(() => P.value || fe.value), I = d(() => P.value ? r.value : r.modelValue), pe = d(() => r.localeCode ?? c?.value.locale.code ?? "zh-CN"), L = d(() => r.defaultCurrency ?? c?.value.locale.currency ?? "CNY"), R = d(() => g.value?.input ?? null);
|
|
564
|
+
function z() {
|
|
565
|
+
let e = {
|
|
566
|
+
...r,
|
|
567
|
+
defaultCurrency: L.value,
|
|
568
|
+
localeCode: pe.value
|
|
569
|
+
};
|
|
570
|
+
return F.value ? e.value = I.value : delete e.value, e;
|
|
571
|
+
}
|
|
572
|
+
function B(e, t) {
|
|
573
|
+
let n = R.value;
|
|
574
|
+
if (n?.value) try {
|
|
575
|
+
(n.selectionStart !== e || n.selectionEnd !== t) && n.setSelectionRange(e, t);
|
|
576
|
+
} catch {}
|
|
577
|
+
}
|
|
578
|
+
function V(e) {
|
|
579
|
+
let t = R.value;
|
|
580
|
+
if (e === void 0 || !t) return !1;
|
|
581
|
+
let n = t.value.lastIndexOf(e);
|
|
582
|
+
return n >= 0 && n + e.length === t.value.length && (B(n, n), !0);
|
|
583
|
+
}
|
|
584
|
+
function H(e = j) {
|
|
585
|
+
return e !== void 0 && Array.from(e).some((t, n) => V(e.substring(n)));
|
|
586
|
+
}
|
|
587
|
+
let U = {
|
|
588
|
+
getContext: () => void 0,
|
|
589
|
+
getContexts: () => void 0,
|
|
590
|
+
getProp: (e) => z()[e],
|
|
591
|
+
getProps: z,
|
|
592
|
+
getState: (e) => D[e],
|
|
593
|
+
getStates: () => ({
|
|
594
|
+
...D,
|
|
595
|
+
number: M
|
|
596
|
+
}),
|
|
597
|
+
setState: (e, t) => {
|
|
598
|
+
Object.assign(D, e), t?.();
|
|
599
|
+
},
|
|
600
|
+
getCache: (e) => O.get(e),
|
|
601
|
+
getCaches: () => O,
|
|
602
|
+
setCache: (e, t) => O.set(String(e), t),
|
|
603
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
604
|
+
persistEvent: () => void 0,
|
|
605
|
+
setValue: (e, t) => {
|
|
606
|
+
D.value = e, t?.();
|
|
607
|
+
},
|
|
608
|
+
setNumber: (e, t) => {
|
|
609
|
+
D.number = e, t?.();
|
|
610
|
+
},
|
|
611
|
+
setFocusing: (e, t) => {
|
|
612
|
+
D.focusing = e, t?.();
|
|
613
|
+
},
|
|
614
|
+
setHovering: (e) => {
|
|
615
|
+
D.hovering = e;
|
|
616
|
+
},
|
|
617
|
+
notifyChange: (e, t) => {
|
|
618
|
+
i("change", e, t), i("update:value", e), i("update:modelValue", e);
|
|
619
|
+
},
|
|
620
|
+
notifyNumberChange: (e, t) => {
|
|
621
|
+
i("numberChange", e, t), M = e;
|
|
622
|
+
},
|
|
623
|
+
notifyBlur: (e) => i("blur", e),
|
|
624
|
+
notifyFocus: (e) => i("focus", e),
|
|
625
|
+
notifyUpClick: (e, t) => i("upClick", e, t),
|
|
626
|
+
notifyDownClick: (e, t) => i("downClick", e, t),
|
|
627
|
+
notifyKeyDown: (e) => i("keydown", e),
|
|
628
|
+
registerGlobalEvent: (e, t) => {
|
|
629
|
+
typeof document > "u" || (U.unregisterGlobalEvent(e), O.set(e, t), document.addEventListener(e, t));
|
|
630
|
+
},
|
|
631
|
+
unregisterGlobalEvent: (e) => {
|
|
632
|
+
if (typeof document > "u") return;
|
|
633
|
+
let t = O.get(e);
|
|
634
|
+
typeof t == "function" && document.removeEventListener(e, t), O.delete(e);
|
|
635
|
+
},
|
|
636
|
+
getInputCharacter: (e) => R.value?.value[e] ?? "",
|
|
637
|
+
recordCursorPosition: () => {
|
|
638
|
+
let e = R.value;
|
|
639
|
+
if (e) try {
|
|
640
|
+
let t = e.selectionEnd;
|
|
641
|
+
j = e.value.substring(t ?? e.value.length);
|
|
642
|
+
} catch {
|
|
643
|
+
j = void 0;
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
restoreByAfter: V,
|
|
647
|
+
restoreCursor: H,
|
|
648
|
+
fixCaret: B,
|
|
649
|
+
setClickUpOrDown: (e) => {
|
|
650
|
+
k = e;
|
|
651
|
+
},
|
|
652
|
+
updateStates: (e, t) => {
|
|
653
|
+
Object.assign(D, e), t?.();
|
|
654
|
+
}
|
|
655
|
+
}, W = ne(new de(U));
|
|
656
|
+
function me() {
|
|
657
|
+
let e = F.value ? I.value : r.defaultValue;
|
|
658
|
+
if (e == null || e === "") return {
|
|
659
|
+
number: null,
|
|
660
|
+
value: ""
|
|
661
|
+
};
|
|
662
|
+
if (r.currency === !0 || typeof r.currency == "string" && r.currency.trim()) {
|
|
663
|
+
if (typeof e != "number") return {
|
|
664
|
+
number: null,
|
|
665
|
+
value: String(e)
|
|
666
|
+
};
|
|
667
|
+
let t = W.doParse(e, !1, !0, !0);
|
|
668
|
+
return W.isValidNumber(t) ? {
|
|
669
|
+
number: t,
|
|
670
|
+
value: W.doFormat(t, !0, !1)
|
|
671
|
+
} : {
|
|
672
|
+
number: null,
|
|
673
|
+
value: ""
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
let t = typeof e == "number" ? W.doFormat(e) : e, n = W.doParse(t, !1, !0, !0);
|
|
677
|
+
return W.isValidNumber(n) ? {
|
|
678
|
+
number: n,
|
|
679
|
+
value: W.doFormat(n, !0, !0)
|
|
680
|
+
} : {
|
|
681
|
+
number: null,
|
|
682
|
+
value: ""
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
Object.assign(D, me()), M = D.number;
|
|
686
|
+
let he = d(() => [
|
|
687
|
+
a.class,
|
|
688
|
+
r.className,
|
|
689
|
+
`${A}-number`,
|
|
690
|
+
`${A}-number-size-${r.size}`
|
|
691
|
+
]), ge = d(() => a.style), _e = d(() => Object.fromEntries(Object.entries(a).filter(([e]) => e !== "class" && e !== "style"))), ve = d(() => {
|
|
692
|
+
let e = {
|
|
693
|
+
borderless: r.borderless,
|
|
694
|
+
composition: r.composition,
|
|
695
|
+
disabled: r.disabled,
|
|
696
|
+
readonly: r.readonly,
|
|
697
|
+
showClear: r.showClear,
|
|
698
|
+
size: r.size,
|
|
699
|
+
validateStatus: r.validateStatus,
|
|
700
|
+
value: D.value
|
|
701
|
+
};
|
|
702
|
+
return r.id !== void 0 && (e.id = r.id), r.addonAfter !== void 0 && (e.addonAfter = r.addonAfter), r.addonBefore !== void 0 && (e.addonBefore = r.addonBefore), r.clearIcon !== void 0 && (e.clearIcon = r.clearIcon), r.inputStyle !== void 0 && (e.inputStyle = r.inputStyle), r.insetLabelId !== void 0 && (e.insetLabelId = r.insetLabelId), r.maxLength !== void 0 && (e.maxLength = r.maxLength), r.minLength !== void 0 && (e.minLength = r.minLength), r.onlyBorder !== void 0 && (e.onlyBorder = r.onlyBorder), r.placeholder !== void 0 && (e.placeholder = r.placeholder), r.prefix !== void 0 && (e.prefix = r.prefix), r.preventScroll !== void 0 && (e.preventScroll = r.preventScroll), r.showClearIgnoreDisabled !== void 0 && (e.showClearIgnoreDisabled = r.showClearIgnoreDisabled), r.insetLabel !== void 0 && (e.insetLabel = r.insetLabel), !(r.innerButtons && (D.hovering || D.focusing)) && r.suffix !== void 0 && (e.suffix = r.suffix), r.ariaLabel !== void 0 && (e.ariaLabel = r.ariaLabel), r.ariaLabelledby !== void 0 && (e.ariaLabelledby = r.ariaLabelledby), r.ariaDescribedby !== void 0 && (e.ariaDescribedby = r.ariaDescribedby), r.ariaErrormessage !== void 0 && (e.ariaErrormessage = r.ariaErrormessage), r.ariaRequired !== void 0 && (e.ariaRequired = r.ariaRequired), r.ariaInvalid !== void 0 && (e.ariaInvalid = r.ariaInvalid), e;
|
|
703
|
+
}), ye = d(() => {
|
|
704
|
+
let e = {
|
|
705
|
+
role: "spinbutton",
|
|
706
|
+
"aria-disabled": r.disabled,
|
|
707
|
+
step: r.step
|
|
708
|
+
};
|
|
709
|
+
return D.number && (e["aria-valuenow"] = D.number), r.max !== Infinity && (e["aria-valuemax"] = r.max), r.min !== -Infinity && (e["aria-valuemin"] = r.min), e;
|
|
710
|
+
}), be = d(() => ({
|
|
711
|
+
..._e.value,
|
|
712
|
+
...ve.value,
|
|
713
|
+
...ye.value
|
|
714
|
+
})), G = d(() => r.innerButtons && (D.hovering || D.focusing)), K = d(() => r.disabled || D.number === r.max), q = d(() => r.disabled || D.number === r.min), J = d(() => [
|
|
715
|
+
`${A}-number-suffix-btns`,
|
|
716
|
+
r.innerButtons ? `${A}-number-suffix-btns-inner` : void 0,
|
|
717
|
+
r.innerButtons && D.hovering && !D.focusing ? `${A}-number-suffix-btns-inner-hover` : void 0
|
|
718
|
+
]), Y = d(() => [
|
|
719
|
+
`${A}-number-button`,
|
|
720
|
+
`${A}-number-button-up`,
|
|
721
|
+
r.disabled ? `${A}-number-button-up-disabled` : void 0,
|
|
722
|
+
K.value ? `${A}-number-button-up-not-allowed` : void 0
|
|
723
|
+
]), X = d(() => [
|
|
724
|
+
`${A}-number-button`,
|
|
725
|
+
`${A}-number-button-down`,
|
|
726
|
+
r.disabled ? `${A}-number-button-down-disabled` : void 0,
|
|
727
|
+
q.value ? `${A}-number-button-down-not-allowed` : void 0
|
|
728
|
+
]);
|
|
729
|
+
function Z() {
|
|
730
|
+
g.value?.focus();
|
|
731
|
+
}
|
|
732
|
+
function xe() {
|
|
733
|
+
g.value?.blur();
|
|
734
|
+
}
|
|
735
|
+
function Se() {
|
|
736
|
+
g.value?.select();
|
|
737
|
+
}
|
|
738
|
+
function Ce(e, t) {
|
|
739
|
+
W.handleInputChange(e, t);
|
|
740
|
+
}
|
|
741
|
+
function Q(e) {
|
|
742
|
+
K.value || W.handleUpClick(e);
|
|
743
|
+
}
|
|
744
|
+
function $(e) {
|
|
745
|
+
q.value || W.handleDownClick(e);
|
|
746
|
+
}
|
|
747
|
+
function we(e) {
|
|
748
|
+
if (!F.value) return;
|
|
749
|
+
if (e == null || e === "" || Number.isNaN(e)) {
|
|
750
|
+
W.updateStates({
|
|
751
|
+
value: "",
|
|
752
|
+
number: null
|
|
753
|
+
}), M = null;
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
let t = typeof e == "number" ? W.doFormat(e) : e, n = W.doParse(t, !1, !0, !0), i = typeof e == "number" ? e : W.doParse(t, !1, !1, !1);
|
|
757
|
+
if (D.focusing) {
|
|
758
|
+
if (W.isValidNumber(n) && n !== D.number) {
|
|
759
|
+
let e = { number: n };
|
|
760
|
+
k && (e.value = W.doFormat(n, !0)), W.updateStates(e, () => H());
|
|
761
|
+
} else Number.isNaN(i) ? W.updateStates({ value: t }) : W.updateStates({ value: W.doFormat(i, !1) });
|
|
762
|
+
} else W.isValidNumber(n) ? W.updateStates({
|
|
763
|
+
number: n,
|
|
764
|
+
value: W.doFormat(n, !0, !0)
|
|
765
|
+
}) : W.updateStates({
|
|
766
|
+
number: null,
|
|
767
|
+
value: ""
|
|
768
|
+
});
|
|
769
|
+
M = D.number, ie(() => {
|
|
770
|
+
k && r.keepFocus && D.focusing && R.value !== document.activeElement && R.value?.focus({ preventScroll: r.preventScroll });
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
return ue(I, we), se(() => {
|
|
774
|
+
W.init(), !r.disabled && (r.autofocus || r.autoFocus) && Z();
|
|
775
|
+
}), oe(() => W.destroy()), t({
|
|
776
|
+
get input() {
|
|
777
|
+
return R.value;
|
|
778
|
+
},
|
|
779
|
+
focus: Z,
|
|
780
|
+
blur: xe,
|
|
781
|
+
select: Se
|
|
782
|
+
}), (e, t) => (y(), p("div", {
|
|
783
|
+
class: v(he.value),
|
|
784
|
+
style: ae(ge.value),
|
|
785
|
+
onMousemove: t[11] ||= (e) => x(W).handleInputMouseMove(e),
|
|
786
|
+
onMouseenter: t[12] ||= (e) => x(W).handleInputMouseEnter(e),
|
|
787
|
+
onMouseleave: t[13] ||= (e) => x(W).handleInputMouseLeave(e)
|
|
788
|
+
}, [h(x(l), re(be.value, {
|
|
789
|
+
ref_key: "inputComponent",
|
|
790
|
+
ref: g,
|
|
791
|
+
onChange: Ce,
|
|
792
|
+
onFocus: t[4] ||= (e) => x(W).handleInputFocus(e),
|
|
793
|
+
onBlur: t[5] ||= (e) => x(W).handleInputBlur(e),
|
|
794
|
+
onKeydown: t[6] ||= (e) => x(W).handleInputKeyDown(e)
|
|
795
|
+
}), ee({ _: 2 }, [
|
|
796
|
+
x(o).addonBefore ? {
|
|
797
|
+
name: "addonBefore",
|
|
798
|
+
fn: w(() => [b(e.$slots, "addonBefore")]),
|
|
799
|
+
key: "0"
|
|
800
|
+
} : void 0,
|
|
801
|
+
x(o).addonAfter ? {
|
|
802
|
+
name: "addonAfter",
|
|
803
|
+
fn: w(() => [b(e.$slots, "addonAfter")]),
|
|
804
|
+
key: "1"
|
|
805
|
+
} : void 0,
|
|
806
|
+
x(o).prefix ? {
|
|
807
|
+
name: "prefix",
|
|
808
|
+
fn: w(() => [b(e.$slots, "prefix")]),
|
|
809
|
+
key: "2"
|
|
810
|
+
} : void 0,
|
|
811
|
+
x(o).insetLabel ? {
|
|
812
|
+
name: "insetLabel",
|
|
813
|
+
fn: w(() => [b(e.$slots, "insetLabel")]),
|
|
814
|
+
key: "3"
|
|
815
|
+
} : void 0,
|
|
816
|
+
x(o).clearIcon ? {
|
|
817
|
+
name: "clearIcon",
|
|
818
|
+
fn: w(() => [b(e.$slots, "clearIcon")]),
|
|
819
|
+
key: "4"
|
|
820
|
+
} : void 0,
|
|
821
|
+
G.value || x(o).suffix ? {
|
|
822
|
+
name: "suffix",
|
|
823
|
+
fn: w(() => [G.value ? (y(), p("div", {
|
|
824
|
+
key: 0,
|
|
825
|
+
class: v(J.value)
|
|
826
|
+
}, [m("span", {
|
|
827
|
+
class: v(Y.value),
|
|
828
|
+
onMousedown: Q,
|
|
829
|
+
onMouseup: t[0] ||= (e) => x(W).handleMouseUp(e),
|
|
830
|
+
onMouseleave: t[1] ||= (e) => x(W).handleMouseLeave(e)
|
|
831
|
+
}, [h(x(E), { size: "extra-small" })], 34), m("span", {
|
|
832
|
+
class: v(X.value),
|
|
833
|
+
onMousedown: $,
|
|
834
|
+
onMouseup: t[2] ||= (e) => x(W).handleMouseUp(e),
|
|
835
|
+
onMouseleave: t[3] ||= (e) => x(W).handleMouseLeave(e)
|
|
836
|
+
}, [h(x(T), { size: "extra-small" })], 34)], 2)) : b(e.$slots, "suffix", {}, void 0, void 0, 1)]),
|
|
837
|
+
key: "5"
|
|
838
|
+
} : void 0
|
|
839
|
+
]), 1040), !r.hideButtons && !r.innerButtons ? (y(), p("div", {
|
|
840
|
+
key: 0,
|
|
841
|
+
class: v(J.value)
|
|
842
|
+
}, [m("span", {
|
|
843
|
+
class: v(Y.value),
|
|
844
|
+
onMousedown: Q,
|
|
845
|
+
onMouseup: t[7] ||= (e) => x(W).handleMouseUp(e),
|
|
846
|
+
onMouseleave: t[8] ||= (e) => x(W).handleMouseLeave(e)
|
|
847
|
+
}, [h(x(E), { size: "extra-small" })], 34), m("span", {
|
|
848
|
+
class: v(X.value),
|
|
849
|
+
onMousedown: $,
|
|
850
|
+
onMouseup: t[9] ||= (e) => x(W).handleMouseUp(e),
|
|
851
|
+
onMouseleave: t[10] ||= (e) => x(W).handleMouseLeave(e)
|
|
852
|
+
}, [h(x(T), { size: "extra-small" })], 34)], 2)) : f("", !0)], 38));
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
//#endregion
|
|
856
|
+
export { j as t };
|