@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,814 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { r as e, t } from "./foundation-Cawx37mp.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createVNode as s, defineComponent as c, inject as l, markRaw as u, mergeProps as d, nextTick as f, normalizeClass as p, normalizeProps as m, normalizeStyle as h, onBeforeUnmount as g, onMounted as _, openBlock as v, provide as y, renderList as b, renderSlot as x, shallowReactive as S, unref as C, useAttrs as w, useTemplateRef as T, watch as E, withCtx as D } from "vue";
|
|
4
|
+
import { IconHandle as O } from "@aifuxi/semi-icons-vue";
|
|
5
|
+
//#region bundled-foundation
|
|
6
|
+
var k = {
|
|
7
|
+
width: "auto",
|
|
8
|
+
height: "auto"
|
|
9
|
+
}, A = (e, t, n) => Math.max(Math.min(e, n), t), j = (e, t) => Math.round(e / t) * t, M = (e, t) => new RegExp(e, "i").test(t), N = (e, t, n = 0) => {
|
|
10
|
+
let r = t.reduce((n, r, i) => Math.abs(r - e) < Math.abs(t[n] - e) ? i : n, 0), i = Math.abs(t[r] - e);
|
|
11
|
+
return n === 0 || i < n ? t[r] : e;
|
|
12
|
+
}, P = (e) => (e = e.toString(), e === "auto" || e.endsWith("px") || e.endsWith("%") || e.endsWith("vh") || e.endsWith("vw") || e.endsWith("vmax") || e.endsWith("vmin") ? e : `${e}px`), F = (e, t, n, r) => {
|
|
13
|
+
if (e && typeof e == "string") {
|
|
14
|
+
if (e.endsWith("px")) return Number(e.replace("px", ""));
|
|
15
|
+
if (e.endsWith("%")) return t * (Number(e.replace("%", "")) / 100);
|
|
16
|
+
if (e.endsWith("vw")) return n * (Number(e.replace("vw", "")) / 100);
|
|
17
|
+
if (e.endsWith("vh")) return r * (Number(e.replace("vh", "")) / 100);
|
|
18
|
+
}
|
|
19
|
+
return e === void 0 ? e : Number(e);
|
|
20
|
+
}, I = (e, t, n, r, i, a, o) => (r = F(r, e.width, t, n), i = F(i, e.height, t, n), a = F(a, e.width, t, n), o = F(o, e.height, t, n), {
|
|
21
|
+
maxWidth: r,
|
|
22
|
+
maxHeight: i,
|
|
23
|
+
minWidth: a,
|
|
24
|
+
minHeight: o
|
|
25
|
+
}), L = (e) => e === "vertical" ? ["bottom", "top"] : ["right", "left"], R = (e, t) => e.endsWith("px") ? Number(e.replace("px", "")) : e.endsWith("%") ? Number(e.replace("%", "")) / 100 * t : e === void 0 ? e : Number(e), z = (e, t, n, r, i = 0) => {
|
|
26
|
+
t ??= "0%", n ??= "100%";
|
|
27
|
+
let a = R(t, r), o = R(n, r);
|
|
28
|
+
return e < a + i || e > o;
|
|
29
|
+
}, B = (e, t, n, r, i) => {
|
|
30
|
+
t ??= "0%", n ??= "100%";
|
|
31
|
+
let a = R(t, r), o = R(n, r);
|
|
32
|
+
return e < a + i ? a + i : e > o ? o : e;
|
|
33
|
+
}, V = (e, t) => {
|
|
34
|
+
if (t === "horizontal") {
|
|
35
|
+
let t = parseFloat(e.paddingLeft), n = parseFloat(e.paddingRight), r = parseFloat(e.borderLeftWidth), i = parseFloat(e.borderRightWidth);
|
|
36
|
+
return t + n + r + i;
|
|
37
|
+
}
|
|
38
|
+
{
|
|
39
|
+
let t = parseFloat(e.paddingTop), n = parseFloat(e.paddingBottom), r = parseFloat(e.borderTopWidth), i = parseFloat(e.borderBottomWidth);
|
|
40
|
+
return t + n + r + i;
|
|
41
|
+
}
|
|
42
|
+
}, H = class extends t {
|
|
43
|
+
constructor(e) {
|
|
44
|
+
super({ ...e }), this.lockAspectRatio = 1, this.resizable = null, this.parentLeft = 0, this.parentTop = 0, this.boundaryLeft = 0, this.boundaryRight = 0, this.boundaryTop = 0, this.boundaryBottom = 0, this.targetLeft = 0, this.targetTop = 0, this.onResizeStart = (e, t, n) => {
|
|
45
|
+
if (this.type = n, this.resizable = this._adapter.getResizable(), !this.resizable || !this.window) return;
|
|
46
|
+
let { clientX: r, clientY: i } = e, a = this.getProps(), o = this.getStates();
|
|
47
|
+
if (a.onResizeStart && a.onResizeStart(e, t) === !1) return;
|
|
48
|
+
let { size: s } = a;
|
|
49
|
+
if (s) {
|
|
50
|
+
let { height: e, width: t } = s, { height: n, width: r } = o;
|
|
51
|
+
e !== void 0 && e !== n && this.setState({ height: e }), t !== void 0 && t !== r && this.setState({ width: t });
|
|
52
|
+
}
|
|
53
|
+
this.lockAspectRatio = typeof a.lockAspectRatio == "number" ? a.lockAspectRatio : this.size.width / this.size.height;
|
|
54
|
+
let c, l = this.window.getComputedStyle(this.resizable);
|
|
55
|
+
if (l.flexBasis !== "auto") {
|
|
56
|
+
let e = this.parent;
|
|
57
|
+
if (e) {
|
|
58
|
+
let t = this.window.getComputedStyle(e);
|
|
59
|
+
this.flexDirection = t.flexDirection.startsWith("row") ? "row" : "column", c = l.flexBasis;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
this.setBoundary(), this.registerEvents();
|
|
63
|
+
let u = {
|
|
64
|
+
original: {
|
|
65
|
+
x: r,
|
|
66
|
+
y: i,
|
|
67
|
+
width: this.size.width,
|
|
68
|
+
height: this.size.height
|
|
69
|
+
},
|
|
70
|
+
isResizing: !0,
|
|
71
|
+
backgroundStyle: {
|
|
72
|
+
...o.backgroundStyle,
|
|
73
|
+
cursor: this.window.getComputedStyle(e.target).cursor || "auto"
|
|
74
|
+
},
|
|
75
|
+
direction: t,
|
|
76
|
+
flexBasis: c
|
|
77
|
+
};
|
|
78
|
+
this.setState(u);
|
|
79
|
+
}, this.onMouseMove = (e) => {
|
|
80
|
+
this.changePosition(e);
|
|
81
|
+
}, this.onTouchMove = (e) => {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
let t = e.targetTouches[0];
|
|
84
|
+
this.changePosition(t);
|
|
85
|
+
}, this.changePosition = (e) => {
|
|
86
|
+
let t = this.getStates(), n = this.getProps();
|
|
87
|
+
if (!t.isResizing || !this.resizable || !this.window) return;
|
|
88
|
+
let { clientX: r, clientY: i } = e, { direction: a, original: o, width: s, height: c } = t, l = this.getParentSize(), { maxWidth: u, maxHeight: d, minWidth: f, minHeight: p } = n, m = I(l, this.window.innerWidth, this.window.innerHeight, u, d, f, p);
|
|
89
|
+
u = m.maxWidth, d = m.maxHeight, f = m.minWidth, p = m.minHeight;
|
|
90
|
+
let { newWidth: h, newHeight: g } = this.calDirectionSize(r, i), _ = this.calBoundaryMax(u, d);
|
|
91
|
+
h = F(h, l.width, this.window.innerWidth, this.window.innerHeight), g = F(g, l.height, this.window.innerWidth, this.window.innerHeight), n.snap && (n.snap.x && (h = N(h, n.snap.x, n.snapGap)), n.snap.y && (g = N(g, n.snap.y, n.snapGap)));
|
|
92
|
+
let v = this.calAspectRatioSize(h, g, {
|
|
93
|
+
width: _.maxWidth,
|
|
94
|
+
height: _.maxHeight
|
|
95
|
+
}, {
|
|
96
|
+
width: f,
|
|
97
|
+
height: p
|
|
98
|
+
});
|
|
99
|
+
if (h = v.newWidth, g = v.newHeight, n.grid) {
|
|
100
|
+
let [e, t] = Array.isArray(n.grid) ? n.grid : [n.grid, n.grid], r = n.snapGap || 0, i = j(h, e), a = j(g, t);
|
|
101
|
+
h = r === 0 || Math.abs(i - h) <= r ? i : h, g = r === 0 || Math.abs(a - g) <= r ? a : g;
|
|
102
|
+
}
|
|
103
|
+
let y = (e, t, n) => n.endsWith("%") ? `${e / t * 100}%` : n.endsWith("vw") ? `${e / this.window.innerWidth * 100}vw` : n.endsWith("vh") ? `${e / this.window.innerHeight * 100}vh` : e;
|
|
104
|
+
typeof s == "string" && (h = y(h, l.width, s || "")), typeof c == "string" && (g = y(g, l.height, c || ""));
|
|
105
|
+
let b = {
|
|
106
|
+
width: this.getCssPropertySize(h, "width"),
|
|
107
|
+
height: this.getCssPropertySize(g, "height")
|
|
108
|
+
};
|
|
109
|
+
this.flexDirection === "row" ? b.flexBasis = b.width : this.flexDirection === "column" && (b.flexBasis = b.height);
|
|
110
|
+
let x = t.width !== b.width, S = t.height !== b.height, C = t.flexBasis !== b.flexBasis;
|
|
111
|
+
if (x || S || C) {
|
|
112
|
+
if (this.setState(b), n.onChange) {
|
|
113
|
+
let t = {
|
|
114
|
+
width: b.width,
|
|
115
|
+
height: b.height
|
|
116
|
+
};
|
|
117
|
+
n.onChange(t, e, a);
|
|
118
|
+
}
|
|
119
|
+
let t = n.size;
|
|
120
|
+
t && this.setState({
|
|
121
|
+
width: t.width ?? "auto",
|
|
122
|
+
height: t.height ?? "auto"
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}, this.onMouseUp = (e) => {
|
|
126
|
+
let { isResizing: t, direction: n, original: r } = this.getStates();
|
|
127
|
+
if (!t || !this.resizable) return;
|
|
128
|
+
let { width: i, height: a } = this.size;
|
|
129
|
+
i - r.width, a - r.height;
|
|
130
|
+
let { onResizeEnd: o, size: s } = this.getProps();
|
|
131
|
+
o && o(this.size, e, n), s && this.setState({
|
|
132
|
+
width: s.width ?? "auto",
|
|
133
|
+
height: s.height ?? "auto"
|
|
134
|
+
}), this.unregisterEvents(), this.setState({
|
|
135
|
+
isResizing: !1,
|
|
136
|
+
backgroundStyle: {
|
|
137
|
+
...this.getStates().backgroundStyle,
|
|
138
|
+
cursor: "auto"
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
init() {
|
|
144
|
+
if (!this.resizable || !this.window) return;
|
|
145
|
+
let e = this.window.getComputedStyle(this.resizable).flexBasis;
|
|
146
|
+
this.setState({
|
|
147
|
+
width: this.propSize.width,
|
|
148
|
+
height: this.propSize.height,
|
|
149
|
+
flexBasis: e === "auto" ? void 0 : e
|
|
150
|
+
}), this.onResizeStart = this.onResizeStart.bind(this), this.onMouseMove = this.onMouseMove.bind(this), this.onMouseUp = this.onMouseUp.bind(this);
|
|
151
|
+
}
|
|
152
|
+
get parent() {
|
|
153
|
+
return this.resizable ? this.resizable.parentNode : null;
|
|
154
|
+
}
|
|
155
|
+
get window() {
|
|
156
|
+
return !this.resizable || !this.resizable.ownerDocument ? null : this.resizable.ownerDocument.defaultView;
|
|
157
|
+
}
|
|
158
|
+
get propSize() {
|
|
159
|
+
let e = this.getProps();
|
|
160
|
+
return e.size || e.defaultSize || k;
|
|
161
|
+
}
|
|
162
|
+
get size() {
|
|
163
|
+
let e = 0, t = 0;
|
|
164
|
+
return this.resizable && this.window && (e = this.resizable.offsetWidth, t = this.resizable.offsetHeight), {
|
|
165
|
+
width: e,
|
|
166
|
+
height: t
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
get sizeStyle() {
|
|
170
|
+
let e = this.getProp("size"), t = (e) => {
|
|
171
|
+
let t = this.getStates()[e];
|
|
172
|
+
if (t === void 0 || t === "auto") return "auto";
|
|
173
|
+
if ((this.propSize?.[e])?.toString().endsWith("%")) {
|
|
174
|
+
if (t.toString().endsWith("%")) return t.toString();
|
|
175
|
+
let n = this.getParentSize();
|
|
176
|
+
return `${Number(t.toString().replace("px", "")) / n[e] * 100}%`;
|
|
177
|
+
}
|
|
178
|
+
return P(t);
|
|
179
|
+
}, n = this.getStates().isResizing;
|
|
180
|
+
return {
|
|
181
|
+
width: e && e.width !== void 0 && !n ? P(e.width) : t("width"),
|
|
182
|
+
height: e && e.height !== void 0 && !n ? P(e.height) : t("height")
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
getParentSize() {
|
|
186
|
+
let e = () => {
|
|
187
|
+
if (!this.resizable || !this.window) return null;
|
|
188
|
+
let e = this.parent;
|
|
189
|
+
if (!e) return null;
|
|
190
|
+
let t = this.window.document.createElement("div");
|
|
191
|
+
return t.style.width = "100%", t.style.height = "100%", t.style.position = "absolute", t.style.transform = "scale(0, 0)", t.style.left = "0", t.style.flex = "0 0 100%", e.appendChild(t), t;
|
|
192
|
+
}, t = (e) => {
|
|
193
|
+
let t = this.parent;
|
|
194
|
+
t && t.removeChild(e);
|
|
195
|
+
};
|
|
196
|
+
if (!this.parent) return this.window ? {
|
|
197
|
+
width: this.window.innerWidth,
|
|
198
|
+
height: this.window.innerHeight
|
|
199
|
+
} : {
|
|
200
|
+
width: 0,
|
|
201
|
+
height: 0
|
|
202
|
+
};
|
|
203
|
+
let n = e();
|
|
204
|
+
if (!n) return {
|
|
205
|
+
width: 0,
|
|
206
|
+
height: 0
|
|
207
|
+
};
|
|
208
|
+
let r = !1, i = this.parent.style.flexWrap;
|
|
209
|
+
i !== "wrap" && (r = !0, this.parent.style.flexWrap = "wrap"), n.style.position = "relative", n.style.minWidth = "100%", n.style.minHeight = "100%";
|
|
210
|
+
let a = {
|
|
211
|
+
width: n.offsetWidth,
|
|
212
|
+
height: n.offsetHeight
|
|
213
|
+
};
|
|
214
|
+
return r && (this.parent.style.flexWrap = i), t(n), a;
|
|
215
|
+
}
|
|
216
|
+
registerEvents() {
|
|
217
|
+
this._adapter.registerEvent(this.type);
|
|
218
|
+
}
|
|
219
|
+
unregisterEvents() {
|
|
220
|
+
this._adapter.unregisterEvent(this.type);
|
|
221
|
+
}
|
|
222
|
+
getCssPropertySize(e, t) {
|
|
223
|
+
let n = this.propSize?.[t], r = this.getStates();
|
|
224
|
+
return r[t] === "auto" && r.original[t] === e && (n === void 0 || n === "auto") ? "auto" : e;
|
|
225
|
+
}
|
|
226
|
+
calBoundaryMax(e, t) {
|
|
227
|
+
let { boundsByDirection: n } = this.getProps(), { direction: r } = this.getStates(), i = n && M("left", r), a = n && M("top", r), o, s, c = this.getProps();
|
|
228
|
+
if (c.boundElement === "parent") {
|
|
229
|
+
let e = this.parent;
|
|
230
|
+
e && (o = i ? this.boundaryRight - this.parentLeft : e.offsetWidth + (this.parentLeft - this.boundaryLeft), s = a ? this.boundaryBottom - this.parentTop : e.offsetHeight + (this.parentTop - this.boundaryTop));
|
|
231
|
+
} else if (c.boundElement === "window" && this.window) o = i ? this.boundaryRight : this.window.innerWidth - this.boundaryLeft, s = a ? this.boundaryBottom : this.window.innerHeight - this.boundaryTop;
|
|
232
|
+
else if (c.boundElement) {
|
|
233
|
+
let e = c.boundElement;
|
|
234
|
+
o = i ? this.boundaryRight - this.targetLeft : e.offsetWidth + (this.targetLeft - this.boundaryLeft), s = a ? this.boundaryBottom - this.targetTop : e.offsetHeight + (this.targetTop - this.boundaryTop);
|
|
235
|
+
}
|
|
236
|
+
return o && Number.isFinite(o) && (e = e && e < o ? e : o), s && Number.isFinite(s) && (t = t && t < s ? t : s), {
|
|
237
|
+
maxWidth: e,
|
|
238
|
+
maxHeight: t
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
calDirectionSize(e, t) {
|
|
242
|
+
let n = this.getProps(), r = n.scale || 1, i = n.ratio, [a, o] = Array.isArray(i) ? i : [i, i], { direction: s, original: c } = this.getStates(), { lockAspectRatio: l, lockAspectRatioExtraHeight: u = 0, lockAspectRatioExtraWidth: d = 0 } = n, f = c.width, p = c.height, m = (e) => c.width + e * a / r, h = (e) => c.height + e * o / r;
|
|
243
|
+
return M("top", s) && (p = h(c.y - t), l && (f = (p - u) * this.lockAspectRatio + d)), M("bottom", s) && (p = h(t - c.y), l && (f = (p - u) * this.lockAspectRatio + d)), M("right", s) && (f = m(e - c.x), l && (p = (f - d) / this.lockAspectRatio + u)), M("left", s) && (f = m(c.x - e), l && (p = (f - d) / this.lockAspectRatio + u)), {
|
|
244
|
+
newWidth: f,
|
|
245
|
+
newHeight: p
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
calAspectRatioSize(e, t, n, r) {
|
|
249
|
+
let { lockAspectRatio: i, lockAspectRatioExtraHeight: a = 0, lockAspectRatioExtraWidth: o = 0 } = this.getProps(), s = r.width === void 0 ? 10 : r.width, c = n.width === void 0 || n.width < 0 ? e : n.width, l = r.height === void 0 ? 10 : r.height, u = n.height === void 0 || n.height < 0 ? t : n.height;
|
|
250
|
+
if (i) {
|
|
251
|
+
let n = (l - a) * this.lockAspectRatio + o, r = (u - a) * this.lockAspectRatio + o, i = (s - o) / this.lockAspectRatio + a, d = (c - o) / this.lockAspectRatio + a, f = Math.max(s, n), p = Math.min(c, r), m = Math.max(l, i), h = Math.min(u, d);
|
|
252
|
+
e = A(e, f, p), t = A(t, m, h);
|
|
253
|
+
} else e = A(e, s, c), t = A(t, l, u);
|
|
254
|
+
return {
|
|
255
|
+
newWidth: e,
|
|
256
|
+
newHeight: t
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
setBoundary() {
|
|
260
|
+
let e = this.getProps();
|
|
261
|
+
if (e.boundElement === "parent") {
|
|
262
|
+
let e = this.parent;
|
|
263
|
+
if (e) {
|
|
264
|
+
let t = e.getBoundingClientRect();
|
|
265
|
+
this.parentLeft = t.left, this.parentTop = t.top;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (e.boundElement && typeof e.boundElement != "string") {
|
|
269
|
+
let t = e.boundElement.getBoundingClientRect();
|
|
270
|
+
this.targetLeft = t.left, this.targetTop = t.top;
|
|
271
|
+
}
|
|
272
|
+
if (this.resizable) {
|
|
273
|
+
let { left: e, top: t, right: n, bottom: r } = this.resizable.getBoundingClientRect();
|
|
274
|
+
this.boundaryLeft = e, this.boundaryRight = n, this.boundaryTop = t, this.boundaryBottom = r;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
destroy() {
|
|
278
|
+
this.unregisterEvents();
|
|
279
|
+
}
|
|
280
|
+
}, U = class extends t {
|
|
281
|
+
constructor(t) {
|
|
282
|
+
super({ ...t }), this.registerEvents = () => {
|
|
283
|
+
this._adapter.registerEvents(this.type);
|
|
284
|
+
}, this.unregisterEvents = () => {
|
|
285
|
+
this._adapter.unregisterEvents(this.type);
|
|
286
|
+
}, this.onResizeStart = (e, t, n) => {
|
|
287
|
+
this.type = n;
|
|
288
|
+
let { clientX: r, clientY: i } = t, a = this._adapter.getItem(e), o = this._adapter.getItem(e + 1), s, c, l = this.window.getComputedStyle(a), u = this.window.getComputedStyle(o);
|
|
289
|
+
s = V(l, this.direction) + this.itemMinusMap.get(e), c = V(u, this.direction) + this.itemMinusMap.get(e + 1);
|
|
290
|
+
let d = (this.direction === "horizontal" ? a.offsetWidth : a.offsetHeight) + this.itemMinusMap.get(e), f = (this.direction === "horizontal" ? o.offsetWidth : o.offsetHeight) + this.itemMinusMap.get(e + 1), p = this.getStates();
|
|
291
|
+
this.setState({
|
|
292
|
+
isResizing: !0,
|
|
293
|
+
originalPosition: {
|
|
294
|
+
x: r,
|
|
295
|
+
y: i,
|
|
296
|
+
lastItemSize: d,
|
|
297
|
+
nextItemSize: f,
|
|
298
|
+
lastOffset: s,
|
|
299
|
+
nextOffset: c
|
|
300
|
+
},
|
|
301
|
+
backgroundStyle: {
|
|
302
|
+
...p.backgroundStyle,
|
|
303
|
+
cursor: this.window.getComputedStyle(t.target).cursor || "auto"
|
|
304
|
+
},
|
|
305
|
+
curHandler: e
|
|
306
|
+
}), this.registerEvents();
|
|
307
|
+
let m = this._adapter.getItemStart(e), h = this._adapter.getItemStart(e + 1), [g, _] = L(this.direction);
|
|
308
|
+
m && m(t, g), h && h(t, _);
|
|
309
|
+
}, this.onMouseMove = (e) => {
|
|
310
|
+
this.onResizing(e);
|
|
311
|
+
}, this.onTouchMove = (e) => {
|
|
312
|
+
e.preventDefault(), this.onResizing(e);
|
|
313
|
+
}, this.onResizing = (e) => {
|
|
314
|
+
let t = this.getStates();
|
|
315
|
+
if (!t.isResizing) return;
|
|
316
|
+
let { curHandler: n, originalPosition: r } = t, { x: i, y: a, lastItemSize: o, nextItemSize: s, lastOffset: c, nextOffset: l } = r, { clientX: u, clientY: d } = this.type === "mouse" ? e : e.targetTouches[0], { direction: f } = this.getProps(), p = this._adapter.getItem(n), m = this._adapter.getItem(n + 1), h = this.groupSize, g = f === "horizontal" ? u - i : d - a, _ = o + g, v = s - g, y = z(_, this._adapter.getItemMin(n), this._adapter.getItemMax(n), h, c), b = z(v, this._adapter.getItemMin(n + 1), this._adapter.getItemMax(n + 1), h, l);
|
|
317
|
+
y && (_ = B(_, this._adapter.getItemMin(n), this._adapter.getItemMax(n), h, c), v = o + s - _), b && (v = B(v, this._adapter.getItemMin(n + 1), this._adapter.getItemMax(n + 1), h, l), _ = o + s - v);
|
|
318
|
+
let x = this.itemPercentMap.get(n), S = this.itemPercentMap.get(n + 1), C = _ / h * 100, w = x + S - C;
|
|
319
|
+
this.itemPercentMap.set(n, C), this.itemPercentMap.set(n + 1, w), f === "horizontal" ? (p.style.width = `calc(${C}% - ${this.itemMinusMap.get(n)}px)`, m.style.width = `calc(${w}% - ${this.itemMinusMap.get(n + 1)}px)`) : f === "vertical" && (p.style.height = `calc(${C}% - ${this.itemMinusMap.get(n)}px)`, m.style.height = `calc(${w}% - ${this.itemMinusMap.get(n + 1)}px)`);
|
|
320
|
+
let T = this._adapter.getItemChange(n), E = this._adapter.getItemChange(n + 1), [D, O] = L(this.direction);
|
|
321
|
+
T && T({
|
|
322
|
+
width: p.offsetWidth,
|
|
323
|
+
height: p.offsetHeight
|
|
324
|
+
}, e, D), E && E({
|
|
325
|
+
width: m.offsetWidth,
|
|
326
|
+
height: m.offsetHeight
|
|
327
|
+
}, e, O);
|
|
328
|
+
}, this.onResizeEnd = (e) => {
|
|
329
|
+
let { curHandler: t } = this.getStates(), n = this._adapter.getItem(t), r = this._adapter.getItem(t + 1), i = this._adapter.getItemEnd(t), a = this._adapter.getItemEnd(t + 1), [o, s] = L(this.direction);
|
|
330
|
+
i && i({
|
|
331
|
+
width: n.offsetWidth,
|
|
332
|
+
height: n.offsetHeight
|
|
333
|
+
}, e, o), a && a({
|
|
334
|
+
width: r.offsetWidth,
|
|
335
|
+
height: r.offsetHeight
|
|
336
|
+
}, e, s), this.setState({
|
|
337
|
+
isResizing: !1,
|
|
338
|
+
curHandler: null
|
|
339
|
+
}), this.unregisterEvents();
|
|
340
|
+
}, this.initSpace = () => {
|
|
341
|
+
let { direction: e } = this.getProps(), t = Array(this._adapter.getHandlerCount()).fill(0), n = this.groupSize;
|
|
342
|
+
this.totalMinus = 0;
|
|
343
|
+
for (let n = 0; n < this._adapter.getHandlerCount(); n++) {
|
|
344
|
+
let r = e === "horizontal" ? this._adapter.getHandler(n).offsetWidth : this._adapter.getHandler(n).offsetHeight;
|
|
345
|
+
t[n] = r, this.totalMinus += r;
|
|
346
|
+
}
|
|
347
|
+
let r = 0, i = /* @__PURE__ */ new Map(), a = 0;
|
|
348
|
+
for (let o = 0; o < this._adapter.getItemCount(); o++) {
|
|
349
|
+
o === 0 ? this.itemMinusMap.set(o, t[o] / 2) : o === this._adapter.getItemCount() - 1 ? this.itemMinusMap.set(o, t[o - 1] / 2) : this.itemMinusMap.set(o, t[o - 1] / 2 + t[o] / 2);
|
|
350
|
+
let s = this._adapter.getItem(o), c = this._adapter.getItemMin(o), l = this._adapter.getItemMax(o), u = c ? R(c, n) / n * 100 : 0, d = l ? R(l, n) / n * 100 : 100;
|
|
351
|
+
u > d && console.warn("[Semi ResizableItem]: min size bigger than max size");
|
|
352
|
+
let f = this._adapter.getItemDefaultSize(o);
|
|
353
|
+
if (f) {
|
|
354
|
+
let t;
|
|
355
|
+
if (typeof f == "string") {
|
|
356
|
+
if (f.endsWith("%")) t = parseFloat(f.slice(0, -1)), this.itemPercentMap.set(o, t);
|
|
357
|
+
else if (f.endsWith("px")) t = parseFloat(f.slice(0, -2)) / n * 100, this.itemPercentMap.set(o, t);
|
|
358
|
+
else if (/^-?\d+(\.\d+)?$/.test(f)) {
|
|
359
|
+
i.set(o, parseFloat(f)), a += parseFloat(f);
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
} else if (typeof f == "number") {
|
|
363
|
+
i.set(o, f), a += f;
|
|
364
|
+
continue;
|
|
365
|
+
}
|
|
366
|
+
r += t, e === "horizontal" ? s.style.width = `calc(${t}% - ${this.itemMinusMap.get(o)}px)` : s.style.height = `calc(${t}% - ${this.itemMinusMap.get(o)}px)`, t < u && console.warn("[Semi ResizableGroup]: item size smaller than min size"), t > d && console.warn("[Semi ResizableGroup]: item size bigger than max size");
|
|
367
|
+
} else i.set(o, 1), a += 1;
|
|
368
|
+
}
|
|
369
|
+
let o = 100 - r;
|
|
370
|
+
r > 100 && (console.warn("[Semi ResizableGroup]: total Size bigger than 100%"), o = 10), i.forEach((t, n) => {
|
|
371
|
+
let r = this._adapter.getItem(n), i = t / a * o;
|
|
372
|
+
this.itemPercentMap.set(n, i), e === "horizontal" ? r.style.width = `calc(${i}% - ${this.itemMinusMap.get(n)}px)` : r.style.height = `calc(${i}% - ${this.itemMinusMap.get(n)}px)`;
|
|
373
|
+
});
|
|
374
|
+
}, this.ensureConstraint = (0, e.default)(() => {
|
|
375
|
+
let { direction: e } = this.getProps(), t = this._adapter.getItemCount(), n = !0;
|
|
376
|
+
for (let r = 0; r < t; r++) {
|
|
377
|
+
let i = this._adapter.getItem(r), a = e === "horizontal" ? i.offsetWidth : i.offsetHeight;
|
|
378
|
+
if (z(a, this._adapter.getItemMin(r), this._adapter.getItemMax(r), this.groupSize, this.itemMinusMap.get(r))) {
|
|
379
|
+
let o = B(a, this._adapter.getItemMin(r), this._adapter.getItemMax(r), this.groupSize, this.itemMinusMap.get(r));
|
|
380
|
+
for (let a = r + 1; a < t; a++) {
|
|
381
|
+
let s = this._adapter.getItem(a);
|
|
382
|
+
if (z(e === "horizontal" ? s.offsetWidth : s.offsetHeight, this._adapter.getItemMin(a), this._adapter.getItemMax(a), this.groupSize, this.itemMinusMap.get(a))) a === t - 1 && (n = !1, console.warn("[Semi ResizableGroup]: no enough space to adjust min/max size"));
|
|
383
|
+
else {
|
|
384
|
+
let t = this.itemPercentMap.get(r), n = this.itemPercentMap.get(a), c = o / this.groupSize * 100, l = t + n - c;
|
|
385
|
+
this.itemPercentMap.set(r, c), this.itemPercentMap.set(a, l), e === "horizontal" ? (i.style.width = `calc(${c}% - ${this.itemMinusMap.get(r)}px)`, s.style.width = `calc(${l}% - ${this.itemMinusMap.get(a)}px)`) : (i.style.height = `calc(${c}% - ${this.itemMinusMap.get(r)}px)`, s.style.height = `calc(${l}% - ${this.itemMinusMap.get(a)}px)`);
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
if (!n) break;
|
|
391
|
+
}
|
|
392
|
+
}, 200);
|
|
393
|
+
}
|
|
394
|
+
get groupRef() {
|
|
395
|
+
return this._adapter.getGroupRef();
|
|
396
|
+
}
|
|
397
|
+
get groupSize() {
|
|
398
|
+
let { direction: e } = this.getProps();
|
|
399
|
+
return e === "horizontal" ? this.groupRef.offsetWidth : this.groupRef.offsetHeight;
|
|
400
|
+
}
|
|
401
|
+
init() {
|
|
402
|
+
this.direction = this.getProp("direction"), this.itemMinusMap = /* @__PURE__ */ new Map(), this.itemPercentMap = /* @__PURE__ */ new Map(), this.initSpace();
|
|
403
|
+
}
|
|
404
|
+
get window() {
|
|
405
|
+
return this.groupRef.ownerDocument.defaultView ?? null;
|
|
406
|
+
}
|
|
407
|
+
destroy() {}
|
|
408
|
+
}, W = c({
|
|
409
|
+
name: "ResizableNodeRenderer",
|
|
410
|
+
props: { content: {
|
|
411
|
+
type: null,
|
|
412
|
+
default: null
|
|
413
|
+
} },
|
|
414
|
+
setup(e) {
|
|
415
|
+
return () => e.content;
|
|
416
|
+
}
|
|
417
|
+
}), G = /* @__PURE__ */ c({
|
|
418
|
+
name: "SingleResizeHandle",
|
|
419
|
+
inheritAttrs: !1,
|
|
420
|
+
__name: "SingleResizeHandle",
|
|
421
|
+
props: { direction: {} },
|
|
422
|
+
emits: ["start"],
|
|
423
|
+
setup(e, { emit: t }) {
|
|
424
|
+
let n = e, i = t, a = w(), s = r(() => [
|
|
425
|
+
"semi-resizable-resizableHandler",
|
|
426
|
+
`semi-resizable-resizableHandler-${n.direction}`,
|
|
427
|
+
a.class
|
|
428
|
+
]);
|
|
429
|
+
function c(e) {
|
|
430
|
+
i("start", e, n.direction, "mouse");
|
|
431
|
+
}
|
|
432
|
+
function l(e) {
|
|
433
|
+
let t = e.targetTouches[0];
|
|
434
|
+
t && i("start", t, n.direction, "touch");
|
|
435
|
+
}
|
|
436
|
+
return (e, t) => (v(), o("div", {
|
|
437
|
+
class: p(s.value),
|
|
438
|
+
style: h(C(a).style),
|
|
439
|
+
onMousedown: c,
|
|
440
|
+
onTouchstart: l
|
|
441
|
+
}, [x(e.$slots, "default")], 38));
|
|
442
|
+
}
|
|
443
|
+
}), K = [
|
|
444
|
+
"top",
|
|
445
|
+
"right",
|
|
446
|
+
"bottom",
|
|
447
|
+
"left",
|
|
448
|
+
"topRight",
|
|
449
|
+
"bottomRight",
|
|
450
|
+
"bottomLeft",
|
|
451
|
+
"topLeft"
|
|
452
|
+
];
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region src/resizable/use-single-resize.ts
|
|
455
|
+
function q(e, t, n) {
|
|
456
|
+
let i = e.size ?? e.defaultSize ?? {}, a = S({
|
|
457
|
+
isResizing: !1,
|
|
458
|
+
direction: "right",
|
|
459
|
+
original: {
|
|
460
|
+
x: 0,
|
|
461
|
+
y: 0,
|
|
462
|
+
width: 0,
|
|
463
|
+
height: 0
|
|
464
|
+
},
|
|
465
|
+
width: i.width ?? "auto",
|
|
466
|
+
height: i.height ?? "auto",
|
|
467
|
+
backgroundStyle: { cursor: "auto" }
|
|
468
|
+
}), o = /* @__PURE__ */ new Map();
|
|
469
|
+
function s() {
|
|
470
|
+
return n.value?.ownerDocument.defaultView ?? null;
|
|
471
|
+
}
|
|
472
|
+
function c() {
|
|
473
|
+
return {
|
|
474
|
+
...e,
|
|
475
|
+
snap: e.snap === void 0 ? void 0 : {
|
|
476
|
+
...e.snap.x === void 0 ? {} : { x: [...e.snap.x] },
|
|
477
|
+
...e.snap.y === void 0 ? {} : { y: [...e.snap.y] }
|
|
478
|
+
},
|
|
479
|
+
onResizeStart: (n, r) => {
|
|
480
|
+
if (e.beforeResizeStart?.(n, r) === !1) return !1;
|
|
481
|
+
t("resizeStart", n, r);
|
|
482
|
+
},
|
|
483
|
+
onChange: (e, n, r) => {
|
|
484
|
+
t("change", e, n, r), t("update:size", e);
|
|
485
|
+
},
|
|
486
|
+
onResizeEnd: (e, n, r) => {
|
|
487
|
+
t("resizeEnd", e, n, r);
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
let l = u(new H({
|
|
492
|
+
getContext: () => void 0,
|
|
493
|
+
getContexts: () => void 0,
|
|
494
|
+
getProp: (e) => c()[e],
|
|
495
|
+
getProps: c,
|
|
496
|
+
getState: (e) => a[e],
|
|
497
|
+
getStates: () => a,
|
|
498
|
+
setState: (e, t) => {
|
|
499
|
+
Object.assign(a, e), t?.();
|
|
500
|
+
},
|
|
501
|
+
getCache: (e) => o.get(e),
|
|
502
|
+
getCaches: () => o,
|
|
503
|
+
setCache: (e, t) => o.set(String(e), t),
|
|
504
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
505
|
+
persistEvent: () => void 0,
|
|
506
|
+
getResizable: () => n.value,
|
|
507
|
+
registerEvent: (e = "mouse") => {
|
|
508
|
+
let t = s();
|
|
509
|
+
t && (e === "mouse" ? (t.addEventListener("mouseup", l.onMouseUp), t.addEventListener("mousemove", l.onMouseMove), t.addEventListener("mouseleave", l.onMouseUp)) : (t.addEventListener("touchmove", l.onTouchMove, { passive: !1 }), t.addEventListener("touchend", l.onMouseUp), t.addEventListener("touchcancel", l.onMouseUp)));
|
|
510
|
+
},
|
|
511
|
+
unregisterEvent: (e = "mouse") => {
|
|
512
|
+
let t = s();
|
|
513
|
+
t && (e === "mouse" ? (t.removeEventListener("mouseup", l.onMouseUp), t.removeEventListener("mousemove", l.onMouseMove), t.removeEventListener("mouseleave", l.onMouseUp)) : (t.removeEventListener("touchmove", l.onTouchMove), t.removeEventListener("touchend", l.onMouseUp), t.removeEventListener("touchcancel", l.onMouseUp)));
|
|
514
|
+
}
|
|
515
|
+
})), d = r(() => ({
|
|
516
|
+
...l.sizeStyle,
|
|
517
|
+
...a.flexBasis === void 0 ? {} : { flexBasis: a.flexBasis }
|
|
518
|
+
})), f = (e) => typeof e == "number" ? `${e}px` : e, p = r(() => ({
|
|
519
|
+
userSelect: a.isResizing ? "none" : "auto",
|
|
520
|
+
minWidth: f(e.minWidth),
|
|
521
|
+
minHeight: f(e.minHeight),
|
|
522
|
+
maxWidth: f(e.maxWidth),
|
|
523
|
+
maxHeight: f(e.maxHeight)
|
|
524
|
+
}));
|
|
525
|
+
function m(e, t, n) {
|
|
526
|
+
l.onResizeStart(e, t, n);
|
|
527
|
+
}
|
|
528
|
+
return _(() => l.init()), g(() => l.destroy()), {
|
|
529
|
+
state: a,
|
|
530
|
+
sizeStyle: d,
|
|
531
|
+
constraintStyle: p,
|
|
532
|
+
startResize: m
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
//#endregion
|
|
536
|
+
//#region src/resizable/Resizable.vue
|
|
537
|
+
var J = /* @__PURE__ */ c({
|
|
538
|
+
name: "Resizable",
|
|
539
|
+
inheritAttrs: !1,
|
|
540
|
+
__name: "Resizable",
|
|
541
|
+
props: {
|
|
542
|
+
size: {},
|
|
543
|
+
defaultSize: {},
|
|
544
|
+
minWidth: {},
|
|
545
|
+
minHeight: {},
|
|
546
|
+
maxWidth: {},
|
|
547
|
+
maxHeight: {},
|
|
548
|
+
grid: { default: () => [1, 1] },
|
|
549
|
+
snap: {},
|
|
550
|
+
snapGap: { default: 0 },
|
|
551
|
+
boundElement: {},
|
|
552
|
+
boundsByDirection: {
|
|
553
|
+
type: Boolean,
|
|
554
|
+
default: !1
|
|
555
|
+
},
|
|
556
|
+
lockAspectRatio: {
|
|
557
|
+
type: [Boolean, Number],
|
|
558
|
+
default: !1
|
|
559
|
+
},
|
|
560
|
+
lockAspectRatioExtraWidth: { default: 0 },
|
|
561
|
+
lockAspectRatioExtraHeight: { default: 0 },
|
|
562
|
+
enable: {
|
|
563
|
+
type: [Object, Boolean],
|
|
564
|
+
default: () => ({})
|
|
565
|
+
},
|
|
566
|
+
handleStyle: {},
|
|
567
|
+
handleClass: {},
|
|
568
|
+
handleWrapperStyle: {},
|
|
569
|
+
handleWrapperClass: {},
|
|
570
|
+
handleNode: {},
|
|
571
|
+
scale: { default: 1 },
|
|
572
|
+
ratio: { default: 1 },
|
|
573
|
+
beforeResizeStart: {}
|
|
574
|
+
},
|
|
575
|
+
emits: [
|
|
576
|
+
"resizeStart",
|
|
577
|
+
"change",
|
|
578
|
+
"resizeEnd",
|
|
579
|
+
"update:size"
|
|
580
|
+
],
|
|
581
|
+
setup(e, { emit: t }) {
|
|
582
|
+
let c = e, l = t, u = w(), f = T("root"), { state: g, sizeStyle: _, constraintStyle: y, startResize: S } = q(c, l, f), E = r(() => Object.fromEntries(Object.entries(u).filter(([e]) => e !== "class" && e !== "style"))), O = r(() => ({
|
|
583
|
+
...c.handleWrapperClass ? { class: c.handleWrapperClass } : {},
|
|
584
|
+
...c.handleWrapperStyle ? { style: c.handleWrapperStyle } : {}
|
|
585
|
+
}));
|
|
586
|
+
return (e, t) => (v(), o("div", d(E.value, {
|
|
587
|
+
ref_key: "root",
|
|
588
|
+
ref: f,
|
|
589
|
+
class: [C(u).class, "semi-resizable-resizable"],
|
|
590
|
+
style: [
|
|
591
|
+
C(y),
|
|
592
|
+
C(u).style,
|
|
593
|
+
C(_)
|
|
594
|
+
]
|
|
595
|
+
}), [
|
|
596
|
+
C(g).isResizing ? (v(), o("div", {
|
|
597
|
+
key: 0,
|
|
598
|
+
class: "semi-resizable-background",
|
|
599
|
+
style: h({ cursor: C(g).backgroundStyle.cursor })
|
|
600
|
+
}, null, 4)) : a("", !0),
|
|
601
|
+
x(e.$slots, "default"),
|
|
602
|
+
c.enable === !1 ? a("", !0) : (v(), o("div", m(d({ key: 1 }, O.value)), [(v(!0), o(n, null, b(C(K), (t) => (v(), o(n, { key: t }, [c.enable?.[t] === !1 ? a("", !0) : (v(), i(G, {
|
|
603
|
+
key: 0,
|
|
604
|
+
direction: t,
|
|
605
|
+
class: p(c.handleClass?.[t]),
|
|
606
|
+
style: h(c.handleStyle?.[t]),
|
|
607
|
+
onStart: C(S)
|
|
608
|
+
}, {
|
|
609
|
+
default: D(() => [x(e.$slots, `handle-${t}`, {}, () => [s(C(W), { content: c.handleNode?.[t] }, null, 8, ["content"])])]),
|
|
610
|
+
_: 2
|
|
611
|
+
}, 1032, [
|
|
612
|
+
"direction",
|
|
613
|
+
"class",
|
|
614
|
+
"style",
|
|
615
|
+
"onStart"
|
|
616
|
+
]))], 64))), 128))], 16))
|
|
617
|
+
], 16));
|
|
618
|
+
}
|
|
619
|
+
}), Y = Symbol("resize-group");
|
|
620
|
+
//#endregion
|
|
621
|
+
//#region src/resizable/use-resize-group.ts
|
|
622
|
+
function X(e, t) {
|
|
623
|
+
let n = S([]), r = S([]), i = S({
|
|
624
|
+
isResizing: !1,
|
|
625
|
+
originalPosition: {
|
|
626
|
+
x: 0,
|
|
627
|
+
y: 0,
|
|
628
|
+
lastItemSize: 0,
|
|
629
|
+
nextItemSize: 0,
|
|
630
|
+
lastOffset: 0,
|
|
631
|
+
nextOffset: 0
|
|
632
|
+
},
|
|
633
|
+
backgroundStyle: { cursor: "auto" },
|
|
634
|
+
curHandler: null
|
|
635
|
+
}), a = /* @__PURE__ */ new Map(), o = !1;
|
|
636
|
+
function s() {
|
|
637
|
+
return t.value?.ownerDocument.defaultView ?? null;
|
|
638
|
+
}
|
|
639
|
+
function c() {
|
|
640
|
+
return { direction: e.value };
|
|
641
|
+
}
|
|
642
|
+
let l = {
|
|
643
|
+
getContext: () => void 0,
|
|
644
|
+
getContexts: () => void 0,
|
|
645
|
+
getProp: (e) => c()[e],
|
|
646
|
+
getProps: c,
|
|
647
|
+
getState: (e) => i[e],
|
|
648
|
+
getStates: () => i,
|
|
649
|
+
setState: (e, t) => {
|
|
650
|
+
Object.assign(i, e), t?.();
|
|
651
|
+
},
|
|
652
|
+
getCache: (e) => a.get(e),
|
|
653
|
+
getCaches: () => a,
|
|
654
|
+
setCache: (e, t) => a.set(String(e), t),
|
|
655
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
656
|
+
persistEvent: () => void 0,
|
|
657
|
+
getGroupRef: () => t.value,
|
|
658
|
+
getItem: (e) => n[e].element,
|
|
659
|
+
getItemCount: () => n.length,
|
|
660
|
+
getHandler: (e) => r[e].element,
|
|
661
|
+
getHandlerCount: () => r.length,
|
|
662
|
+
getItemMin: (e) => n[e]?.min,
|
|
663
|
+
getItemMax: (e) => n[e]?.max,
|
|
664
|
+
getItemStart: (e) => n[e].onResizeStart,
|
|
665
|
+
getItemChange: (e) => n[e].onChange,
|
|
666
|
+
getItemEnd: (e) => n[e].onResizeEnd,
|
|
667
|
+
getItemDefaultSize: (e) => n[e]?.defaultSize,
|
|
668
|
+
registerEvents: (e = "mouse") => {
|
|
669
|
+
let t = s();
|
|
670
|
+
t && (e === "mouse" ? (t.addEventListener("mousemove", d.onMouseMove), t.addEventListener("mouseup", d.onResizeEnd), t.addEventListener("mouseleave", d.onResizeEnd)) : (t.addEventListener("touchmove", d.onTouchMove, { passive: !1 }), t.addEventListener("touchend", d.onResizeEnd), t.addEventListener("touchcancel", d.onResizeEnd)));
|
|
671
|
+
},
|
|
672
|
+
unregisterEvents: (e = "mouse") => {
|
|
673
|
+
let t = s();
|
|
674
|
+
t && (e === "mouse" ? (t.removeEventListener("mousemove", d.onMouseMove), t.removeEventListener("mouseup", d.onResizeEnd), t.removeEventListener("mouseleave", d.onResizeEnd)) : (t.removeEventListener("touchmove", d.onTouchMove), t.removeEventListener("touchend", d.onResizeEnd), t.removeEventListener("touchcancel", d.onResizeEnd)));
|
|
675
|
+
}
|
|
676
|
+
}, d = u(new U(l));
|
|
677
|
+
function p() {
|
|
678
|
+
o && t.value && f(() => d.initSpace());
|
|
679
|
+
}
|
|
680
|
+
function m(e) {
|
|
681
|
+
n.some((t) => t.id === e.id) || (n.push(e), p());
|
|
682
|
+
}
|
|
683
|
+
function h(e) {
|
|
684
|
+
let t = n.findIndex((t) => t.id === e);
|
|
685
|
+
t >= 0 && n.splice(t, 1), p();
|
|
686
|
+
}
|
|
687
|
+
function v(e) {
|
|
688
|
+
r.some((t) => t.id === e.id) || (r.push(e), p());
|
|
689
|
+
}
|
|
690
|
+
function y(e) {
|
|
691
|
+
let t = r.findIndex((t) => t.id === e);
|
|
692
|
+
t >= 0 && r.splice(t, 1), p();
|
|
693
|
+
}
|
|
694
|
+
function b(e, t, i) {
|
|
695
|
+
let a = r.findIndex((t) => t.id === e);
|
|
696
|
+
a < 0 || !n[a] || !n[a + 1] || d.onResizeStart(a, t, i);
|
|
697
|
+
}
|
|
698
|
+
return E(e, async (e) => {
|
|
699
|
+
d.direction = e;
|
|
700
|
+
for (let t of n) e === "horizontal" ? (t.element.style.width = t.element.style.height, t.element.style.removeProperty("height")) : (t.element.style.height = t.element.style.width, t.element.style.removeProperty("width"));
|
|
701
|
+
await f();
|
|
702
|
+
}), _(() => {
|
|
703
|
+
o = !0, d.init(), s()?.addEventListener("resize", d.ensureConstraint);
|
|
704
|
+
}), g(() => {
|
|
705
|
+
o = !1, s()?.removeEventListener("resize", d.ensureConstraint), l.unregisterEvents("mouse"), l.unregisterEvents("touch"), d.destroy();
|
|
706
|
+
}), {
|
|
707
|
+
state: i,
|
|
708
|
+
context: {
|
|
709
|
+
direction: e,
|
|
710
|
+
registerItem: m,
|
|
711
|
+
unregisterItem: h,
|
|
712
|
+
registerHandler: v,
|
|
713
|
+
unregisterHandler: y,
|
|
714
|
+
startResize: b
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
//#endregion
|
|
719
|
+
//#region src/resizable/ResizeGroup.vue
|
|
720
|
+
var Z = /* @__PURE__ */ c({
|
|
721
|
+
name: "ResizeGroup",
|
|
722
|
+
inheritAttrs: !1,
|
|
723
|
+
__name: "ResizeGroup",
|
|
724
|
+
props: { direction: { default: "horizontal" } },
|
|
725
|
+
setup(e) {
|
|
726
|
+
let t = e, n = w(), i = T("root"), { state: s, context: c } = X(r(() => t.direction), i);
|
|
727
|
+
y(Y, c);
|
|
728
|
+
let l = r(() => Object.fromEntries(Object.entries(n).filter(([e]) => e !== "class" && e !== "style")));
|
|
729
|
+
return (e, r) => (v(), o("div", d(l.value, {
|
|
730
|
+
ref_key: "root",
|
|
731
|
+
ref: i,
|
|
732
|
+
class: [C(n).class, "semi-resizable-group"],
|
|
733
|
+
style: [{ flexDirection: t.direction === "vertical" ? "column" : "row" }, C(n).style]
|
|
734
|
+
}), [C(s).isResizing ? (v(), o("div", {
|
|
735
|
+
key: 0,
|
|
736
|
+
class: "semi-resizable-background",
|
|
737
|
+
style: h({ cursor: C(s).backgroundStyle.cursor })
|
|
738
|
+
}, null, 4)) : a("", !0), x(e.$slots, "default")], 16));
|
|
739
|
+
}
|
|
740
|
+
}), Q = /* @__PURE__ */ c({
|
|
741
|
+
name: "ResizeHandler",
|
|
742
|
+
inheritAttrs: !1,
|
|
743
|
+
__name: "ResizeHandler",
|
|
744
|
+
setup(e) {
|
|
745
|
+
let t = w(), n = T("root"), i = l(Y);
|
|
746
|
+
if (!i) throw Error("please make sure <ResizeHandler> inside <ResizeGroup>");
|
|
747
|
+
let a = i, c = Symbol("resize-handler"), u = r(() => [
|
|
748
|
+
t.class,
|
|
749
|
+
"semi-resizable-handler",
|
|
750
|
+
`semi-resizable-handler-${a.direction.value}`
|
|
751
|
+
]);
|
|
752
|
+
function d(e) {
|
|
753
|
+
a.startResize(c, e, "mouse");
|
|
754
|
+
}
|
|
755
|
+
function f(e) {
|
|
756
|
+
let t = e.targetTouches[0];
|
|
757
|
+
t && a.startResize(c, t, "touch");
|
|
758
|
+
}
|
|
759
|
+
return _(() => {
|
|
760
|
+
n.value && a.registerHandler({
|
|
761
|
+
id: c,
|
|
762
|
+
element: n.value
|
|
763
|
+
});
|
|
764
|
+
}), g(() => a.unregisterHandler(c)), (e, r) => (v(), o("div", {
|
|
765
|
+
ref_key: "root",
|
|
766
|
+
ref: n,
|
|
767
|
+
class: p(u.value),
|
|
768
|
+
style: h(C(t).style),
|
|
769
|
+
onMousedown: d,
|
|
770
|
+
onTouchstart: f
|
|
771
|
+
}, [x(e.$slots, "default", {}, () => [s(C(O), {
|
|
772
|
+
size: "inherit",
|
|
773
|
+
style: h({ rotate: C(a).direction.value === "horizontal" ? "0deg" : "90deg" })
|
|
774
|
+
}, null, 8, ["style"])])], 38));
|
|
775
|
+
}
|
|
776
|
+
}), $ = /* @__PURE__ */ c({
|
|
777
|
+
name: "ResizeItem",
|
|
778
|
+
inheritAttrs: !1,
|
|
779
|
+
__name: "ResizeItem",
|
|
780
|
+
props: {
|
|
781
|
+
min: {},
|
|
782
|
+
max: {},
|
|
783
|
+
defaultSize: {}
|
|
784
|
+
},
|
|
785
|
+
emits: [
|
|
786
|
+
"resizeStart",
|
|
787
|
+
"change",
|
|
788
|
+
"resizeEnd"
|
|
789
|
+
],
|
|
790
|
+
setup(e, { emit: t }) {
|
|
791
|
+
let n = e, r = t, i = w(), a = T("root"), s = l(Y);
|
|
792
|
+
if (!s) throw Error("please make sure <ResizeItem> inside <ResizeGroup>");
|
|
793
|
+
let c = Symbol("resize-item");
|
|
794
|
+
return _(() => {
|
|
795
|
+
a.value && s.registerItem({
|
|
796
|
+
id: c,
|
|
797
|
+
element: a.value,
|
|
798
|
+
...n.min === void 0 ? {} : { min: n.min },
|
|
799
|
+
...n.max === void 0 ? {} : { max: n.max },
|
|
800
|
+
...n.defaultSize === void 0 ? {} : { defaultSize: n.defaultSize },
|
|
801
|
+
onResizeStart: (e, t) => r("resizeStart", e, t),
|
|
802
|
+
onChange: (e, t, n) => r("change", e, t, n),
|
|
803
|
+
onResizeEnd: (e, t, n) => r("resizeEnd", e, t, n)
|
|
804
|
+
});
|
|
805
|
+
}), g(() => s.unregisterItem(c)), (e, t) => (v(), o("div", {
|
|
806
|
+
ref_key: "root",
|
|
807
|
+
ref: a,
|
|
808
|
+
class: p([C(i).class, "semi-resizable-item"]),
|
|
809
|
+
style: h(C(i).style)
|
|
810
|
+
}, [x(e.$slots, "default")], 6));
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
//#endregion
|
|
814
|
+
export { J as i, Q as n, Z as r, $ as t };
|