@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,874 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { b as e, s as t, t as n } from "./foundation-Cawx37mp.js";
|
|
3
|
+
import { t as r } from "./Tooltip-Bq7HZwnS.js";
|
|
4
|
+
import { t as i } from "./config-context-CyynTtDb.js";
|
|
5
|
+
import { t as a } from "./Button-RCaDTqHh.js";
|
|
6
|
+
import { Comment as o, Fragment as s, Text as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createVNode as h, defineComponent as g, getCurrentInstance as _, guardReactiveProps as v, h as ee, inject as y, isVNode as b, markRaw as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeProps as te, normalizeStyle as T, onBeforeUnmount as ne, onBeforeUpdate as E, onMounted as re, openBlock as D, provide as O, renderList as k, renderSlot as A, shallowReactive as j, shallowRef as M, toDisplayString as ie, unref as N, useAttrs as P, useSlots as ae, useTemplateRef as F, watch as I, withCtx as L } from "vue";
|
|
7
|
+
import { IconChevronDown as oe, IconChevronLeft as R, IconChevronRight as z, IconClose as B, IconTick as se } from "@aifuxi/semi-icons-vue";
|
|
8
|
+
//#region bundled-foundation
|
|
9
|
+
var ce = class extends n {
|
|
10
|
+
constructor(n) {
|
|
11
|
+
super({ ...n }), this.destroy = e.default, this.handlePrevent = (e) => {
|
|
12
|
+
e.stopPropagation(), e.preventDefault();
|
|
13
|
+
}, this.handleKeyDown = (e, n, r) => {
|
|
14
|
+
let { preventScroll: i } = this.getProps(), a = [...e.target.parentNode.childNodes].filter((e) => (0, t.default)(e, "attributes.data-tabkey.value", "").includes("semiTab") && (0, t.default)(e, "attributes.aria-disabled.value", "") !== "true");
|
|
15
|
+
switch (e.key) {
|
|
16
|
+
case "ArrowLeft":
|
|
17
|
+
case "ArrowRight":
|
|
18
|
+
case "ArrowUp":
|
|
19
|
+
case "ArrowDown":
|
|
20
|
+
this.determineOrientation(e, a);
|
|
21
|
+
break;
|
|
22
|
+
case "Backspace":
|
|
23
|
+
case "Delete":
|
|
24
|
+
this.handleDeleteKeyDown(e, a, n, r);
|
|
25
|
+
break;
|
|
26
|
+
case "Enter":
|
|
27
|
+
case " ":
|
|
28
|
+
this.handleTabClick(n, e), this.handlePrevent(e);
|
|
29
|
+
break;
|
|
30
|
+
case "Home":
|
|
31
|
+
a[0].focus({ preventScroll: i }), this.handlePrevent(e);
|
|
32
|
+
break;
|
|
33
|
+
case "End": a[a.length - 1].focus({ preventScroll: i }), this.handlePrevent(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
init() {
|
|
38
|
+
this._adapter.collectPane();
|
|
39
|
+
}
|
|
40
|
+
_notifyChange(e) {
|
|
41
|
+
let { activeKey: t } = this.getStates();
|
|
42
|
+
t !== e && this._adapter.notifyChange(e);
|
|
43
|
+
}
|
|
44
|
+
handleTabClick(e, t) {
|
|
45
|
+
this._isInProps("activeKey") ? this._notifyChange(e) : (this._notifyChange(e), this.handleNewActiveKey(e)), this._adapter.notifyTabClick(e, t);
|
|
46
|
+
}
|
|
47
|
+
handleNewActiveKey(e) {
|
|
48
|
+
let { activeKey: t } = this.getStates();
|
|
49
|
+
t !== e && this._adapter.setNewActiveKey(e);
|
|
50
|
+
}
|
|
51
|
+
getDefaultActiveKey() {
|
|
52
|
+
let e, t = this.getProps();
|
|
53
|
+
return e = "activeKey" in t ? t.activeKey : "defaultActiveKey" in t ? t.defaultActiveKey : this._adapter.getDefaultActiveKeyFromChildren(), e;
|
|
54
|
+
}
|
|
55
|
+
handleTabListChange() {
|
|
56
|
+
this._adapter.collectPane();
|
|
57
|
+
}
|
|
58
|
+
handleTabPanesChange() {
|
|
59
|
+
this._adapter.collectPane(), this._adapter.collectActiveKey();
|
|
60
|
+
}
|
|
61
|
+
handleTabDelete(e) {
|
|
62
|
+
this._adapter.notifyTabDelete(e);
|
|
63
|
+
}
|
|
64
|
+
determineOrientation(e, t) {
|
|
65
|
+
let { tabPosition: n } = this.getProps();
|
|
66
|
+
n === "left" ? (e.key === "ArrowUp" || e.key === "ArrowDown") && (this.switchTabOnArrowPress(e, t), this.handlePrevent(e)) : (e.key === "ArrowLeft" || e.key === "ArrowRight") && (this.switchTabOnArrowPress(e, t), this.handlePrevent(e));
|
|
67
|
+
}
|
|
68
|
+
handleDeleteKeyDown(e, t, n, r) {
|
|
69
|
+
let { preventScroll: i } = this.getProps();
|
|
70
|
+
if (r) {
|
|
71
|
+
this.handleTabDelete(n);
|
|
72
|
+
let r = t.indexOf(e.target);
|
|
73
|
+
t.length !== 1 && t[r + 1 >= t.length ? r - 1 : r + 1].focus({ preventScroll: i });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
switchTabOnArrowPress(e, t) {
|
|
77
|
+
let { preventScroll: n } = this.getProps(), r = t.indexOf(e.target), i = {
|
|
78
|
+
ArrowLeft: -1,
|
|
79
|
+
ArrowUp: -1,
|
|
80
|
+
ArrowRight: 1,
|
|
81
|
+
ArrowDown: 1
|
|
82
|
+
};
|
|
83
|
+
i[e.key] && r !== void 0 && (t[r + i[e.key]] ? t[r + i[e.key]].focus({ preventScroll: n }) : e.key === "ArrowLeft" || e.key === "ArrowUp" ? t[t.length - 1].focus({ preventScroll: n }) : (e.key === "ArrowRight" || e.key == "ArrowDown") && t[0].focus({ preventScroll: n }));
|
|
84
|
+
}
|
|
85
|
+
}, V = g({
|
|
86
|
+
name: "TabsNodeRenderer",
|
|
87
|
+
props: { content: {
|
|
88
|
+
type: null,
|
|
89
|
+
default: void 0
|
|
90
|
+
} },
|
|
91
|
+
setup(e) {
|
|
92
|
+
return () => e.content;
|
|
93
|
+
}
|
|
94
|
+
}), H = [
|
|
95
|
+
"id",
|
|
96
|
+
"aria-controls",
|
|
97
|
+
"aria-disabled",
|
|
98
|
+
"aria-selected",
|
|
99
|
+
"data-tabkey",
|
|
100
|
+
"tabindex"
|
|
101
|
+
], U = {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "semi-tabs-bar-icon"
|
|
104
|
+
}, W = /* @__PURE__ */ g({
|
|
105
|
+
name: "TabItem",
|
|
106
|
+
inheritAttrs: !1,
|
|
107
|
+
__name: "TabItem",
|
|
108
|
+
props: {
|
|
109
|
+
class: { type: [
|
|
110
|
+
Boolean,
|
|
111
|
+
null,
|
|
112
|
+
String,
|
|
113
|
+
Object,
|
|
114
|
+
Array
|
|
115
|
+
] },
|
|
116
|
+
className: {},
|
|
117
|
+
selected: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: !1
|
|
120
|
+
},
|
|
121
|
+
size: { default: "large" },
|
|
122
|
+
style: {},
|
|
123
|
+
tabPosition: { default: "top" },
|
|
124
|
+
type: { default: "line" },
|
|
125
|
+
disabled: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
default: !1
|
|
128
|
+
},
|
|
129
|
+
icon: { type: [
|
|
130
|
+
Object,
|
|
131
|
+
String,
|
|
132
|
+
Number,
|
|
133
|
+
Boolean,
|
|
134
|
+
null,
|
|
135
|
+
Array
|
|
136
|
+
] },
|
|
137
|
+
itemKey: {},
|
|
138
|
+
tab: { type: [
|
|
139
|
+
Object,
|
|
140
|
+
String,
|
|
141
|
+
Number,
|
|
142
|
+
Boolean,
|
|
143
|
+
null,
|
|
144
|
+
Array
|
|
145
|
+
] },
|
|
146
|
+
closable: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
default: !1
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
emits: [
|
|
152
|
+
"click",
|
|
153
|
+
"keyDown",
|
|
154
|
+
"close"
|
|
155
|
+
],
|
|
156
|
+
setup(e, { emit: t }) {
|
|
157
|
+
let n = e, r = t, i = P(), a = ae(), o = l(() => a.tab?.() ?? n.tab), s = l(() => a.icon?.() ?? n.icon), c = l(() => [
|
|
158
|
+
"semi-tabs-tab",
|
|
159
|
+
`semi-tabs-tab-${n.type}`,
|
|
160
|
+
`semi-tabs-tab-${n.tabPosition}`,
|
|
161
|
+
"semi-tabs-tab-single",
|
|
162
|
+
n.selected ? "semi-tabs-tab-active" : void 0,
|
|
163
|
+
n.disabled ? "semi-tabs-tab-disabled" : void 0,
|
|
164
|
+
n.size === "small" ? "semi-tabs-tab-small" : void 0,
|
|
165
|
+
n.size === "medium" ? "semi-tabs-tab-medium" : void 0,
|
|
166
|
+
n.class,
|
|
167
|
+
n.className,
|
|
168
|
+
i.class
|
|
169
|
+
]), p = l(() => Object.fromEntries(Object.entries(i).filter(([e]) => e !== "class" && e !== "style")));
|
|
170
|
+
function m(e) {
|
|
171
|
+
n.disabled || r("click", n.itemKey, e);
|
|
172
|
+
}
|
|
173
|
+
function g(e) {
|
|
174
|
+
r("keyDown", e, n.itemKey, n.closable);
|
|
175
|
+
}
|
|
176
|
+
function _(e) {
|
|
177
|
+
e.stopPropagation(), r("close", n.itemKey, e);
|
|
178
|
+
}
|
|
179
|
+
return (t, n) => (D(), f("div", S(p.value, {
|
|
180
|
+
id: `semiTab${e.itemKey}`,
|
|
181
|
+
"aria-controls": `semiTabPanel${e.itemKey}`,
|
|
182
|
+
"aria-disabled": e.disabled ? "true" : "false",
|
|
183
|
+
"aria-selected": e.selected ? "true" : "false",
|
|
184
|
+
class: c.value,
|
|
185
|
+
"data-tabkey": `semiTab${e.itemKey}`,
|
|
186
|
+
role: "tab",
|
|
187
|
+
style: [e.style, N(i).style],
|
|
188
|
+
tabindex: e.selected ? 0 : -1,
|
|
189
|
+
onClick: m,
|
|
190
|
+
onKeydown: g
|
|
191
|
+
}), [
|
|
192
|
+
s.value ? (D(), f("span", U, [h(N(V), { content: s.value }, null, 8, ["content"])])) : d("", !0),
|
|
193
|
+
h(N(V), { content: o.value }, null, 8, ["content"]),
|
|
194
|
+
e.closable ? (D(), u(N(B), {
|
|
195
|
+
key: 1,
|
|
196
|
+
"aria-label": "Close",
|
|
197
|
+
class: "semi-tabs-tab-icon-close",
|
|
198
|
+
role: "button",
|
|
199
|
+
onClick: _
|
|
200
|
+
})) : d("", !0)
|
|
201
|
+
], 16, H));
|
|
202
|
+
}
|
|
203
|
+
}), G = {
|
|
204
|
+
class: "semi-dropdown-content",
|
|
205
|
+
"x-semi-prop": "render"
|
|
206
|
+
}, K = {
|
|
207
|
+
"aria-orientation": "vertical",
|
|
208
|
+
class: "semi-dropdown-menu",
|
|
209
|
+
role: "menu"
|
|
210
|
+
}, q = ["aria-disabled", "onClick"], J = {
|
|
211
|
+
key: 0,
|
|
212
|
+
class: "semi-dropdown-item-icon"
|
|
213
|
+
}, Y = /* @__PURE__ */ g({
|
|
214
|
+
__name: "TabsDropdown",
|
|
215
|
+
props: {
|
|
216
|
+
activeKey: {},
|
|
217
|
+
className: { default: "" },
|
|
218
|
+
items: {},
|
|
219
|
+
options: { default: () => ({}) }
|
|
220
|
+
},
|
|
221
|
+
emits: ["select"],
|
|
222
|
+
setup(e, { emit: t }) {
|
|
223
|
+
let n = e, i = t, a = M(!1), o = l(() => n.options.trigger ?? "hover"), c = l(() => n.options.position ?? "bottomLeft");
|
|
224
|
+
function m(e, t) {
|
|
225
|
+
e.disabled || (a.value = !1, i("select", e.itemKey, t));
|
|
226
|
+
}
|
|
227
|
+
return (t, n) => (D(), u(r, {
|
|
228
|
+
visible: a.value,
|
|
229
|
+
"onUpdate:visible": n[0] ||= (e) => a.value = e,
|
|
230
|
+
class: w(e.className),
|
|
231
|
+
"click-to-hide": "",
|
|
232
|
+
"click-trigger-to-hide": "",
|
|
233
|
+
"disable-focus-listener": "",
|
|
234
|
+
motion: !1,
|
|
235
|
+
position: c.value,
|
|
236
|
+
"prefix-cls": "semi-dropdown",
|
|
237
|
+
"show-arrow": !1,
|
|
238
|
+
spacing: 4,
|
|
239
|
+
trigger: o.value
|
|
240
|
+
}, {
|
|
241
|
+
content: L(() => [p("div", {
|
|
242
|
+
class: "semi-dropdown",
|
|
243
|
+
style: T(e.options.style)
|
|
244
|
+
}, [p("div", G, [p("ul", K, [(D(!0), f(s, null, k(e.items, (t) => (D(), f("li", {
|
|
245
|
+
key: t.itemKey,
|
|
246
|
+
"aria-disabled": t.disabled ? "true" : "false",
|
|
247
|
+
class: w([
|
|
248
|
+
"semi-dropdown-item",
|
|
249
|
+
"semi-dropdown-item-withTick",
|
|
250
|
+
t.itemKey === e.activeKey ? "semi-dropdown-item-active" : void 0,
|
|
251
|
+
t.disabled ? "semi-dropdown-item-disabled" : void 0
|
|
252
|
+
]),
|
|
253
|
+
role: "menuitem",
|
|
254
|
+
tabindex: "-1",
|
|
255
|
+
onClick: (e) => m(t, e)
|
|
256
|
+
}, [
|
|
257
|
+
h(N(se), { style: T(t.itemKey === e.activeKey ? void 0 : { color: "transparent" }) }, null, 8, ["style"]),
|
|
258
|
+
t.icon ? (D(), f("div", J, [h(N(V), { content: t.icon }, null, 8, ["content"])])) : d("", !0),
|
|
259
|
+
h(N(V), { content: t.tab }, null, 8, ["content"])
|
|
260
|
+
], 10, q))), 128))])])], 4)]),
|
|
261
|
+
default: L(() => [A(t.$slots, "default")]),
|
|
262
|
+
_: 3
|
|
263
|
+
}, 8, [
|
|
264
|
+
"visible",
|
|
265
|
+
"class",
|
|
266
|
+
"position",
|
|
267
|
+
"trigger"
|
|
268
|
+
]));
|
|
269
|
+
}
|
|
270
|
+
}), X = ["aria-orientation", "data-uuid"], le = {
|
|
271
|
+
key: 0,
|
|
272
|
+
class: "semi-overflow-list semi-tabs-bar-overflow-list"
|
|
273
|
+
}, ue = {
|
|
274
|
+
key: 0,
|
|
275
|
+
class: "semi-tabs-bar-arrow semi-tabs-bar-arrow-start",
|
|
276
|
+
role: "presentation"
|
|
277
|
+
}, Z = {
|
|
278
|
+
key: 1,
|
|
279
|
+
class: "semi-tabs-bar-arrow semi-tabs-bar-arrow-end",
|
|
280
|
+
role: "presentation"
|
|
281
|
+
}, de = { class: "semi-tabs-bar-more-trigger-content" }, fe = /* @__PURE__ */ g({
|
|
282
|
+
name: "TabsTabBar",
|
|
283
|
+
inheritAttrs: !1,
|
|
284
|
+
__name: "TabBar",
|
|
285
|
+
props: {
|
|
286
|
+
activeKey: {},
|
|
287
|
+
arrowPosition: {},
|
|
288
|
+
className: {},
|
|
289
|
+
collapsible: { type: [Boolean, String] },
|
|
290
|
+
dropdownProps: {},
|
|
291
|
+
list: {},
|
|
292
|
+
more: {},
|
|
293
|
+
showRestInDropdown: { type: Boolean },
|
|
294
|
+
size: {},
|
|
295
|
+
style: {},
|
|
296
|
+
tabBarExtraContent: { type: [
|
|
297
|
+
Object,
|
|
298
|
+
String,
|
|
299
|
+
Number,
|
|
300
|
+
Boolean,
|
|
301
|
+
null,
|
|
302
|
+
Array
|
|
303
|
+
] },
|
|
304
|
+
tabPosition: {},
|
|
305
|
+
type: {},
|
|
306
|
+
visibleTabsStyle: {}
|
|
307
|
+
},
|
|
308
|
+
emits: [
|
|
309
|
+
"close",
|
|
310
|
+
"keyDown",
|
|
311
|
+
"select",
|
|
312
|
+
"visibleChange"
|
|
313
|
+
],
|
|
314
|
+
setup(e, { emit: t }) {
|
|
315
|
+
let n = e, r = t, i = ae(), o = F("bar"), c = F("scroller"), m = M(""), g = M(n.collapsible === !0), _ = j(/* @__PURE__ */ new Map()), v, y, b = l(() => n.collapsible === !0 || n.collapsible === "auto" && g.value), x = l(() => typeof n.more == "number" ? Math.min(Math.max(n.more, 0), n.list.length) : n.more && typeof n.more == "object" ? Math.min(Math.max(n.more.count, 0), n.list.length) : 0), te = l(() => x.value ? n.list.slice(0, n.list.length - x.value) : n.list), E = l(() => x.value ? n.list.slice(n.list.length - x.value) : []), O = l(() => n.list.filter((e) => _.get(e.itemKey) === !1).filter((e) => {
|
|
316
|
+
let t = n.list.findIndex((e) => e.itemKey === n.activeKey);
|
|
317
|
+
return n.list.indexOf(e) < Math.max(t, 1);
|
|
318
|
+
})), P = l(() => n.list.filter((e) => _.get(e.itemKey) === !1 && !O.value.includes(e))), B = l(() => i.tabBarExtraContent?.() ?? n.tabBarExtraContent), se = l(() => [
|
|
319
|
+
"semi-tabs-bar",
|
|
320
|
+
`semi-tabs-bar-${n.type}`,
|
|
321
|
+
`semi-tabs-bar-${n.tabPosition}`,
|
|
322
|
+
b.value ? "semi-tabs-bar-collapse" : void 0,
|
|
323
|
+
n.className
|
|
324
|
+
]), ce = l(() => [
|
|
325
|
+
"semi-tabs-bar-extra",
|
|
326
|
+
`semi-tabs-bar-${n.type}-extra`,
|
|
327
|
+
`semi-tabs-bar-${n.type}-extra-${n.size}`
|
|
328
|
+
]);
|
|
329
|
+
function H() {
|
|
330
|
+
return new Map(n.list.map((e) => [e.itemKey, !0]));
|
|
331
|
+
}
|
|
332
|
+
function U() {
|
|
333
|
+
let e = c.value;
|
|
334
|
+
if (!b.value || !e) {
|
|
335
|
+
let e = H();
|
|
336
|
+
_.clear(), e.forEach((e, t) => _.set(t, e)), r("visibleChange", e);
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
let t = e.getBoundingClientRect(), n = document.documentElement.clientHeight;
|
|
340
|
+
if (t.bottom <= 0 || t.top >= n) {
|
|
341
|
+
let e = H();
|
|
342
|
+
_.clear(), e.forEach((e, t) => _.set(t, e)), r("visibleChange", e);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
let i = /* @__PURE__ */ new Map();
|
|
346
|
+
e.querySelectorAll(".semi-tabs-tab[data-item-key]").forEach((e) => {
|
|
347
|
+
let n = e.getBoundingClientRect();
|
|
348
|
+
i.set(e.dataset.itemKey ?? "", n.left >= t.left - .5 && n.right <= t.right + .5);
|
|
349
|
+
}), _.clear(), i.forEach((e, t) => _.set(t, e)), r("visibleChange", i);
|
|
350
|
+
}
|
|
351
|
+
function G() {
|
|
352
|
+
let e = o.value;
|
|
353
|
+
if (e) {
|
|
354
|
+
if (n.collapsible === "auto") {
|
|
355
|
+
let t = Array.from(e.querySelectorAll(".semi-tabs-tab")), n = t[0]?.offsetTop, r = typeof n == "number" && t.some((e) => e.offsetTop !== n);
|
|
356
|
+
g.value = r || e.scrollWidth > e.clientWidth + 1;
|
|
357
|
+
}
|
|
358
|
+
C(U);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function K(e) {
|
|
362
|
+
let t = c.value;
|
|
363
|
+
if (!t) return;
|
|
364
|
+
let n = Math.max(t.clientWidth * .6, 80);
|
|
365
|
+
t.scrollBy({
|
|
366
|
+
left: e === "start" ? -n : n,
|
|
367
|
+
behavior: "smooth"
|
|
368
|
+
}), requestAnimationFrame(U);
|
|
369
|
+
}
|
|
370
|
+
function q() {
|
|
371
|
+
c.value?.querySelector(`[data-item-key="${CSS.escape(n.activeKey)}"]`)?.scrollIntoView({
|
|
372
|
+
behavior: "smooth",
|
|
373
|
+
block: "nearest",
|
|
374
|
+
inline: "nearest"
|
|
375
|
+
}), requestAnimationFrame(U);
|
|
376
|
+
}
|
|
377
|
+
function J(e, t) {
|
|
378
|
+
r("select", e, t);
|
|
379
|
+
}
|
|
380
|
+
function fe(e, t) {
|
|
381
|
+
r("close", e, t);
|
|
382
|
+
}
|
|
383
|
+
function Q(e, t, n) {
|
|
384
|
+
r("keyDown", e, t, n);
|
|
385
|
+
}
|
|
386
|
+
function $(e) {
|
|
387
|
+
return ee(e === "start" ? R : z);
|
|
388
|
+
}
|
|
389
|
+
return re(() => {
|
|
390
|
+
m.value = globalThis.crypto?.randomUUID?.() ?? `tabs-${Math.random().toString(36).slice(2)}`, typeof ResizeObserver < "u" && o.value && (v = new ResizeObserver(G), v.observe(o.value)), typeof IntersectionObserver < "u" && c.value && (y = new IntersectionObserver(U, { threshold: [0, .75] }), y.observe(c.value)), c.value?.addEventListener("scroll", U, { passive: !0 }), G(), requestAnimationFrame(G);
|
|
391
|
+
}), ne(() => {
|
|
392
|
+
v?.disconnect(), y?.disconnect(), c.value?.removeEventListener("scroll", U);
|
|
393
|
+
}), I(() => n.list, () => C(G), { deep: !0 }), I(() => n.activeKey, () => b.value && C(q)), I(() => n.collapsible, () => C(G)), (t, n) => (D(), f("div", {
|
|
394
|
+
ref_key: "bar",
|
|
395
|
+
ref: o,
|
|
396
|
+
"aria-orientation": e.tabPosition === "left" ? "vertical" : "horizontal",
|
|
397
|
+
class: w(se.value),
|
|
398
|
+
"data-uuid": m.value,
|
|
399
|
+
role: "tablist",
|
|
400
|
+
style: T(e.style)
|
|
401
|
+
}, [b.value ? (D(), f("div", le, [
|
|
402
|
+
e.arrowPosition === "both" || e.arrowPosition === "start" ? (D(), f("div", ue, [t.$slots.arrow ? A(t.$slots, "arrow", {
|
|
403
|
+
click: () => K("start"),
|
|
404
|
+
defaultNode: $("start"),
|
|
405
|
+
items: O.value,
|
|
406
|
+
position: "start"
|
|
407
|
+
}, void 0, void 0, 0) : e.showRestInDropdown ? (D(), u(Y, {
|
|
408
|
+
key: 1,
|
|
409
|
+
"active-key": e.activeKey,
|
|
410
|
+
"class-name": "semi-tabs-bar-dropdown",
|
|
411
|
+
items: O.value,
|
|
412
|
+
options: e.dropdownProps?.start,
|
|
413
|
+
onSelect: J
|
|
414
|
+
}, {
|
|
415
|
+
default: L(() => [h(a, {
|
|
416
|
+
disabled: O.value.length === 0,
|
|
417
|
+
theme: "borderless",
|
|
418
|
+
onClick: n[0] ||= (e) => K("start")
|
|
419
|
+
}, {
|
|
420
|
+
icon: L(() => [h(N(R))]),
|
|
421
|
+
_: 1
|
|
422
|
+
}, 8, ["disabled"])]),
|
|
423
|
+
_: 1
|
|
424
|
+
}, 8, [
|
|
425
|
+
"active-key",
|
|
426
|
+
"items",
|
|
427
|
+
"options"
|
|
428
|
+
])) : (D(), u(a, {
|
|
429
|
+
key: 2,
|
|
430
|
+
disabled: O.value.length === 0,
|
|
431
|
+
theme: "borderless",
|
|
432
|
+
onClick: n[1] ||= (e) => K("start")
|
|
433
|
+
}, {
|
|
434
|
+
icon: L(() => [h(N(R))]),
|
|
435
|
+
_: 1
|
|
436
|
+
}, 8, ["disabled"]))])) : d("", !0),
|
|
437
|
+
p("div", {
|
|
438
|
+
ref_key: "scroller",
|
|
439
|
+
ref: c,
|
|
440
|
+
class: "semi-overflow-list-scroll-wrapper",
|
|
441
|
+
style: T(e.visibleTabsStyle)
|
|
442
|
+
}, [(D(!0), f(s, null, k(e.list, (t) => (D(), u(W, S({ key: `${t.itemKey}-bar` }, { ref_for: !0 }, t, {
|
|
443
|
+
"data-item-key": t.itemKey,
|
|
444
|
+
"data-scrollkey": `${t.itemKey}-bar`,
|
|
445
|
+
selected: t.itemKey === e.activeKey,
|
|
446
|
+
size: e.size,
|
|
447
|
+
"tab-position": e.tabPosition,
|
|
448
|
+
type: e.type,
|
|
449
|
+
onClick: J,
|
|
450
|
+
onClose: fe,
|
|
451
|
+
onKeyDown: Q
|
|
452
|
+
}), null, 16, [
|
|
453
|
+
"data-item-key",
|
|
454
|
+
"data-scrollkey",
|
|
455
|
+
"selected",
|
|
456
|
+
"size",
|
|
457
|
+
"tab-position",
|
|
458
|
+
"type"
|
|
459
|
+
]))), 128))], 4),
|
|
460
|
+
e.arrowPosition === "both" || e.arrowPosition === "end" ? (D(), f("div", Z, [t.$slots.arrow ? A(t.$slots, "arrow", {
|
|
461
|
+
click: () => K("end"),
|
|
462
|
+
defaultNode: $("end"),
|
|
463
|
+
items: P.value,
|
|
464
|
+
position: "end"
|
|
465
|
+
}, void 0, void 0, 0) : e.showRestInDropdown ? (D(), u(Y, {
|
|
466
|
+
key: 1,
|
|
467
|
+
"active-key": e.activeKey,
|
|
468
|
+
"class-name": "semi-tabs-bar-dropdown",
|
|
469
|
+
items: P.value,
|
|
470
|
+
options: e.dropdownProps?.end,
|
|
471
|
+
onSelect: J
|
|
472
|
+
}, {
|
|
473
|
+
default: L(() => [h(a, {
|
|
474
|
+
disabled: P.value.length === 0,
|
|
475
|
+
theme: "borderless",
|
|
476
|
+
onClick: n[2] ||= (e) => K("end")
|
|
477
|
+
}, {
|
|
478
|
+
icon: L(() => [h(N(z))]),
|
|
479
|
+
_: 1
|
|
480
|
+
}, 8, ["disabled"])]),
|
|
481
|
+
_: 1
|
|
482
|
+
}, 8, [
|
|
483
|
+
"active-key",
|
|
484
|
+
"items",
|
|
485
|
+
"options"
|
|
486
|
+
])) : (D(), u(a, {
|
|
487
|
+
key: 2,
|
|
488
|
+
disabled: P.value.length === 0,
|
|
489
|
+
theme: "borderless",
|
|
490
|
+
onClick: n[3] ||= (e) => K("end")
|
|
491
|
+
}, {
|
|
492
|
+
icon: L(() => [h(N(z))]),
|
|
493
|
+
_: 1
|
|
494
|
+
}, 8, ["disabled"]))])) : d("", !0)
|
|
495
|
+
])) : (D(), f(s, { key: 1 }, [(D(!0), f(s, null, k(te.value, (t) => (D(), u(W, S({ key: `${t.itemKey}-bar` }, { ref_for: !0 }, t, {
|
|
496
|
+
selected: t.itemKey === e.activeKey,
|
|
497
|
+
size: e.size,
|
|
498
|
+
"tab-position": e.tabPosition,
|
|
499
|
+
type: e.type,
|
|
500
|
+
onClick: J,
|
|
501
|
+
onClose: fe,
|
|
502
|
+
onKeyDown: Q
|
|
503
|
+
}), null, 16, [
|
|
504
|
+
"selected",
|
|
505
|
+
"size",
|
|
506
|
+
"tab-position",
|
|
507
|
+
"type"
|
|
508
|
+
]))), 128)), E.value.length ? (D(), u(Y, {
|
|
509
|
+
key: 0,
|
|
510
|
+
"active-key": e.activeKey,
|
|
511
|
+
"class-name": `semi-tabs-bar-more-dropdown-${e.type}`,
|
|
512
|
+
items: E.value,
|
|
513
|
+
options: typeof e.more == "object" ? e.more.dropdownProps : void 0,
|
|
514
|
+
onSelect: J
|
|
515
|
+
}, {
|
|
516
|
+
default: L(() => [t.$slots.more ? A(t.$slots, "more", { hiddenTabs: E.value }, void 0, void 0, 0) : typeof e.more == "object" && e.more.render ? (D(), u(N(V), {
|
|
517
|
+
key: 1,
|
|
518
|
+
content: e.more.render()
|
|
519
|
+
}, null, 8, ["content"])) : (D(), f("div", {
|
|
520
|
+
key: 2,
|
|
521
|
+
class: w(["semi-tabs-bar-more-trigger", `semi-tabs-bar-more-trigger-${e.type}`])
|
|
522
|
+
}, [p("div", de, [p("div", null, ie(t.$attrs["data-more-label"] ?? "更多"), 1), h(N(oe), { class: "semi-tabs-bar-more-trigger-content-icon" })])], 2))]),
|
|
523
|
+
_: 3
|
|
524
|
+
}, 8, [
|
|
525
|
+
"active-key",
|
|
526
|
+
"class-name",
|
|
527
|
+
"items",
|
|
528
|
+
"options"
|
|
529
|
+
])) : d("", !0)], 64)), B.value ? (D(), f("div", {
|
|
530
|
+
key: 2,
|
|
531
|
+
class: w(ce.value),
|
|
532
|
+
style: { float: "right" },
|
|
533
|
+
"x-semi-prop": "tabBarExtraContent"
|
|
534
|
+
}, [h(N(V), { content: B.value }, null, 8, ["content"])], 2)) : d("", !0)], 14, X));
|
|
535
|
+
}
|
|
536
|
+
}), Q = Symbol("tabs-context"), $ = [
|
|
537
|
+
"id",
|
|
538
|
+
"aria-hidden",
|
|
539
|
+
"aria-labelledby",
|
|
540
|
+
"tabindex"
|
|
541
|
+
], pe = /* @__PURE__ */ g({
|
|
542
|
+
name: "TabPane",
|
|
543
|
+
inheritAttrs: !1,
|
|
544
|
+
__name: "TabPane",
|
|
545
|
+
props: {
|
|
546
|
+
class: { type: [
|
|
547
|
+
Boolean,
|
|
548
|
+
null,
|
|
549
|
+
String,
|
|
550
|
+
Object,
|
|
551
|
+
Array
|
|
552
|
+
] },
|
|
553
|
+
className: {},
|
|
554
|
+
style: {},
|
|
555
|
+
tabIndex: { default: 0 },
|
|
556
|
+
disabled: { type: Boolean },
|
|
557
|
+
icon: { type: [
|
|
558
|
+
Object,
|
|
559
|
+
String,
|
|
560
|
+
Number,
|
|
561
|
+
Boolean,
|
|
562
|
+
null,
|
|
563
|
+
Array
|
|
564
|
+
] },
|
|
565
|
+
itemKey: {},
|
|
566
|
+
tab: { type: [
|
|
567
|
+
Object,
|
|
568
|
+
String,
|
|
569
|
+
Number,
|
|
570
|
+
Boolean,
|
|
571
|
+
null,
|
|
572
|
+
Array
|
|
573
|
+
] },
|
|
574
|
+
closable: { type: Boolean }
|
|
575
|
+
},
|
|
576
|
+
setup(e) {
|
|
577
|
+
let t = e, n = P(), r = y(Q, void 0), i = l(() => !0), a = l(() => r?.activeKey.value === t.itemKey || i.value && !r), o = M(a.value), s = M(""), c, m = l(() => [
|
|
578
|
+
"semi-tabs-pane",
|
|
579
|
+
a.value ? "semi-tabs-pane-active" : "semi-tabs-pane-inactive",
|
|
580
|
+
t.class,
|
|
581
|
+
t.className,
|
|
582
|
+
n.class
|
|
583
|
+
]), h = l(() => !r?.lazyRender.value || o.value), g = l(() => Object.fromEntries(Object.entries(n).filter(([e]) => e !== "class" && e !== "style" && e.startsWith("data-"))));
|
|
584
|
+
function _() {
|
|
585
|
+
if (!r) return "";
|
|
586
|
+
let e = r.panes.value.findIndex((e) => e.itemKey === r.activeKey.value), n = r.panes.value.findIndex((e) => e.itemKey === t.itemKey), i = r.panes.value.findIndex((e) => e.itemKey === r.prevActiveKey.value), a = e === n ? i > e : n < e;
|
|
587
|
+
return r.tabPosition.value === "left" ? a ? "semi-tabs-pane-animate-bottomShow" : "semi-tabs-pane-animate-topShow" : a ? "semi-tabs-pane-animate-rightShow" : "semi-tabs-pane-animate-leftShow";
|
|
588
|
+
}
|
|
589
|
+
return I(a, (e, t) => {
|
|
590
|
+
e && (o.value = !0), e && t === !1 && r?.tabPaneMotion.value && !r.forceDisableMotion.value && typeof window < "u" && (s.value = _(), c && clearTimeout(c), c = setTimeout(() => {
|
|
591
|
+
s.value = "";
|
|
592
|
+
}, 200));
|
|
593
|
+
}, { immediate: !0 }), ne(() => {
|
|
594
|
+
c && clearTimeout(c);
|
|
595
|
+
}), (t, r) => (D(), f("div", S(g.value, {
|
|
596
|
+
id: `semiTabPanel${e.itemKey}`,
|
|
597
|
+
"aria-hidden": a.value ? "false" : "true",
|
|
598
|
+
"aria-labelledby": `semiTab${e.itemKey}`,
|
|
599
|
+
class: m.value,
|
|
600
|
+
role: "tabpanel",
|
|
601
|
+
style: [e.style, N(n).style],
|
|
602
|
+
tabindex: e.tabIndex || 0,
|
|
603
|
+
"x-semi-prop": "children"
|
|
604
|
+
}), [p("div", {
|
|
605
|
+
class: w(["semi-tabs-pane-motion-overlay", s.value]),
|
|
606
|
+
"x-semi-prop": "children"
|
|
607
|
+
}, [h.value ? (D(), u(N(V), {
|
|
608
|
+
key: 0,
|
|
609
|
+
content: t.$slots.default?.()
|
|
610
|
+
}, null, 8, ["content"])) : d("", !0)], 2)], 16, $));
|
|
611
|
+
}
|
|
612
|
+
}), me = /* @__PURE__ */ g({
|
|
613
|
+
name: "Tabs",
|
|
614
|
+
inheritAttrs: !1,
|
|
615
|
+
__name: "Tabs",
|
|
616
|
+
props: {
|
|
617
|
+
activeKey: {},
|
|
618
|
+
modelValue: {},
|
|
619
|
+
class: { type: [
|
|
620
|
+
Boolean,
|
|
621
|
+
null,
|
|
622
|
+
String,
|
|
623
|
+
Object,
|
|
624
|
+
Array
|
|
625
|
+
] },
|
|
626
|
+
className: {},
|
|
627
|
+
collapsible: {
|
|
628
|
+
type: [Boolean, String],
|
|
629
|
+
default: !1
|
|
630
|
+
},
|
|
631
|
+
contentStyle: {},
|
|
632
|
+
defaultActiveKey: {},
|
|
633
|
+
keepDOM: {
|
|
634
|
+
type: Boolean,
|
|
635
|
+
default: !0
|
|
636
|
+
},
|
|
637
|
+
lazyRender: {
|
|
638
|
+
type: Boolean,
|
|
639
|
+
default: !1
|
|
640
|
+
},
|
|
641
|
+
showRestInDropdown: {
|
|
642
|
+
type: Boolean,
|
|
643
|
+
default: !0
|
|
644
|
+
},
|
|
645
|
+
size: { default: "large" },
|
|
646
|
+
style: {},
|
|
647
|
+
tabBarClassName: {},
|
|
648
|
+
tabBarExtraContent: { type: [
|
|
649
|
+
Object,
|
|
650
|
+
String,
|
|
651
|
+
Number,
|
|
652
|
+
Boolean,
|
|
653
|
+
null,
|
|
654
|
+
Array
|
|
655
|
+
] },
|
|
656
|
+
tabBarStyle: {},
|
|
657
|
+
tabList: {},
|
|
658
|
+
tabPaneMotion: {
|
|
659
|
+
type: Boolean,
|
|
660
|
+
default: !0
|
|
661
|
+
},
|
|
662
|
+
tabPosition: { default: "top" },
|
|
663
|
+
type: { default: "line" },
|
|
664
|
+
preventScroll: {
|
|
665
|
+
type: Boolean,
|
|
666
|
+
default: !1
|
|
667
|
+
},
|
|
668
|
+
more: {},
|
|
669
|
+
visibleTabsStyle: {},
|
|
670
|
+
arrowPosition: { default: "both" },
|
|
671
|
+
dropdownProps: {}
|
|
672
|
+
},
|
|
673
|
+
emits: [
|
|
674
|
+
"change",
|
|
675
|
+
"tabClick",
|
|
676
|
+
"tabClose",
|
|
677
|
+
"visibleTabsChange",
|
|
678
|
+
"update:activeKey",
|
|
679
|
+
"update:modelValue"
|
|
680
|
+
],
|
|
681
|
+
setup(e, { emit: t }) {
|
|
682
|
+
let n = e, r = t, a = P(), d = ae(), h = _(), g = y(i, void 0), ee = l(() => g ? g.value : {
|
|
683
|
+
direction: "ltr",
|
|
684
|
+
locale: { code: "zh-CN" }
|
|
685
|
+
});
|
|
686
|
+
function C(e) {
|
|
687
|
+
let t = h?.vnode.props, n = e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
688
|
+
return !!(t && (Object.prototype.hasOwnProperty.call(t, e) || Object.prototype.hasOwnProperty.call(t, n)));
|
|
689
|
+
}
|
|
690
|
+
function re(e) {
|
|
691
|
+
let t = [], n = (e) => {
|
|
692
|
+
if (Array.isArray(e)) {
|
|
693
|
+
e.forEach(n);
|
|
694
|
+
return;
|
|
695
|
+
}
|
|
696
|
+
if (!(!b(e) || e.type === o)) {
|
|
697
|
+
if (e.type === s && Array.isArray(e.children)) {
|
|
698
|
+
e.children.forEach((e) => n(e));
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
(e.type !== c || String(e.children ?? "").trim() !== "") && t.push(e);
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
return e.forEach(n), t;
|
|
705
|
+
}
|
|
706
|
+
function M() {
|
|
707
|
+
return re(d.default?.() ?? []);
|
|
708
|
+
}
|
|
709
|
+
function ie(e) {
|
|
710
|
+
if (e.type === pe) return !0;
|
|
711
|
+
if (typeof e.type != "object" && typeof e.type != "function") return !1;
|
|
712
|
+
let t = e.type;
|
|
713
|
+
return t.name === "TabPane" || t.__name === "TabPane";
|
|
714
|
+
}
|
|
715
|
+
function F(e, t) {
|
|
716
|
+
if (!e.children || typeof e.children != "object" || Array.isArray(e.children)) return;
|
|
717
|
+
let n = e.children[t];
|
|
718
|
+
return typeof n == "function" ? n() : void 0;
|
|
719
|
+
}
|
|
720
|
+
let oe = j({ value: 0 }), R = l(() => (oe.value, M()));
|
|
721
|
+
E(() => {
|
|
722
|
+
oe.value += 1;
|
|
723
|
+
});
|
|
724
|
+
let z = l(() => Array.isArray(n.tabList) && n.tabList.length ? n.tabList : R.value.filter(ie).map((e) => ({
|
|
725
|
+
closable: e.props?.closable === "" || e.props?.closable === !0,
|
|
726
|
+
disabled: e.props?.disabled === "" || e.props?.disabled === !0,
|
|
727
|
+
icon: F(e, "icon") ?? e.props?.icon,
|
|
728
|
+
itemKey: String(e.props?.itemKey ?? e.props?.["item-key"] ?? ""),
|
|
729
|
+
tab: F(e, "tab") ?? e.props?.tab
|
|
730
|
+
}))), B = l(() => C("modelValue")), se = l(() => C("activeKey")), H = l(() => B.value || se.value), U = l(() => B.value ? n.modelValue : n.activeKey), W = () => z.value.find((e) => !e.disabled)?.itemKey ?? "", G = j({
|
|
731
|
+
activeKey: U.value ?? n.defaultActiveKey ?? "",
|
|
732
|
+
forceDisableMotion: !1,
|
|
733
|
+
panes: [],
|
|
734
|
+
prevActiveKey: null
|
|
735
|
+
}), K = /* @__PURE__ */ new Map();
|
|
736
|
+
function q() {
|
|
737
|
+
let e = {};
|
|
738
|
+
return Object.assign(e, n), H.value ? e.activeKey = U.value ?? "" : delete e.activeKey, e;
|
|
739
|
+
}
|
|
740
|
+
let J = x(new ce({
|
|
741
|
+
getContext: () => void 0,
|
|
742
|
+
getContexts: () => void 0,
|
|
743
|
+
getProp: (e) => q()[e],
|
|
744
|
+
getProps: q,
|
|
745
|
+
getState: (e) => e === "activeKey" ? Y.value : G[e],
|
|
746
|
+
getStates: () => ({
|
|
747
|
+
...G,
|
|
748
|
+
activeKey: Y.value,
|
|
749
|
+
panes: z.value
|
|
750
|
+
}),
|
|
751
|
+
setState: (e, t) => {
|
|
752
|
+
Object.assign(G, e), t?.();
|
|
753
|
+
},
|
|
754
|
+
getCache: (e) => K.get(e),
|
|
755
|
+
getCaches: () => K,
|
|
756
|
+
setCache: (e, t) => K.set(e, t),
|
|
757
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
758
|
+
persistEvent: () => void 0,
|
|
759
|
+
collectPane: () => {
|
|
760
|
+
G.panes = z.value;
|
|
761
|
+
},
|
|
762
|
+
collectActiveKey: () => {
|
|
763
|
+
H.value || G.panes.some((e) => e.itemKey === G.activeKey) || (G.activeKey = W());
|
|
764
|
+
},
|
|
765
|
+
notifyTabClick: (e, t) => r("tabClick", e, t),
|
|
766
|
+
notifyChange: (e) => {
|
|
767
|
+
r("change", e), r("update:activeKey", e), r("update:modelValue", e);
|
|
768
|
+
},
|
|
769
|
+
setNewActiveKey: (e) => {
|
|
770
|
+
G.prevActiveKey = G.activeKey, G.activeKey = e;
|
|
771
|
+
},
|
|
772
|
+
getDefaultActiveKeyFromChildren: W,
|
|
773
|
+
notifyTabDelete: (e) => r("tabClose", e)
|
|
774
|
+
}));
|
|
775
|
+
ne(() => J.destroy()), I(U, (e) => {
|
|
776
|
+
!H.value || e === void 0 || e === G.activeKey || (G.prevActiveKey = G.activeKey, G.activeKey = e);
|
|
777
|
+
});
|
|
778
|
+
let Y = l(() => H.value ? U.value ?? "" : z.value.some((e) => e.itemKey === G.activeKey) ? G.activeKey : W()), X = l(() => z.value), le = l(() => n.lazyRender), ue = l(() => n.tabPaneMotion && n.keepDOM), Z = l(() => n.tabPosition), de = l(() => G.prevActiveKey), $ = l(() => G.forceDisableMotion);
|
|
779
|
+
O(Q, {
|
|
780
|
+
activeKey: Y,
|
|
781
|
+
forceDisableMotion: $,
|
|
782
|
+
lazyRender: le,
|
|
783
|
+
panes: X,
|
|
784
|
+
prevActiveKey: de,
|
|
785
|
+
tabPaneMotion: ue,
|
|
786
|
+
tabPosition: Z
|
|
787
|
+
});
|
|
788
|
+
let me = l(() => n.tabList?.length || n.keepDOM ? R.value : R.value.filter((e) => !ie(e) || String(e.props?.itemKey ?? e.props?.["item-key"] ?? "") === Y.value)), he = l(() => [
|
|
789
|
+
"semi-tabs",
|
|
790
|
+
`semi-tabs-${n.tabPosition}`,
|
|
791
|
+
n.class,
|
|
792
|
+
n.className,
|
|
793
|
+
a.class
|
|
794
|
+
]), ge = l(() => Object.fromEntries(Object.entries(a).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-")))), _e = l(() => ee.value.locale.Tabs?.more ?? (ee.value.locale.code === "en-US" ? "More" : "更多"));
|
|
795
|
+
function ve(e, t) {
|
|
796
|
+
J.handleTabClick(e, t);
|
|
797
|
+
}
|
|
798
|
+
function ye(e, t) {
|
|
799
|
+
t.stopPropagation(), J.handleTabDelete(e);
|
|
800
|
+
}
|
|
801
|
+
function be(e, t, n) {
|
|
802
|
+
J.handleKeyDown(e, t, n);
|
|
803
|
+
}
|
|
804
|
+
return (t, n) => (D(), f("div", S(ge.value, {
|
|
805
|
+
class: he.value,
|
|
806
|
+
style: [e.style, N(a).style]
|
|
807
|
+
}), [t.$slots.tabBar ? A(t.$slots, "tabBar", {
|
|
808
|
+
activeKey: Y.value,
|
|
809
|
+
list: X.value,
|
|
810
|
+
onTabClick: ve
|
|
811
|
+
}, void 0, void 0, 0) : (D(), u(fe, {
|
|
812
|
+
key: 1,
|
|
813
|
+
"active-key": Y.value,
|
|
814
|
+
"arrow-position": e.arrowPosition,
|
|
815
|
+
"class-name": e.tabBarClassName,
|
|
816
|
+
collapsible: e.collapsible,
|
|
817
|
+
"data-more-label": _e.value,
|
|
818
|
+
"dropdown-props": e.dropdownProps,
|
|
819
|
+
list: X.value,
|
|
820
|
+
more: e.more,
|
|
821
|
+
"show-rest-in-dropdown": e.showRestInDropdown,
|
|
822
|
+
size: e.size,
|
|
823
|
+
style: T(e.tabBarStyle),
|
|
824
|
+
"tab-bar-extra-content": e.tabBarExtraContent,
|
|
825
|
+
"tab-position": Z.value,
|
|
826
|
+
type: e.type,
|
|
827
|
+
"visible-tabs-style": e.visibleTabsStyle,
|
|
828
|
+
onClose: ye,
|
|
829
|
+
onKeyDown: be,
|
|
830
|
+
onSelect: ve,
|
|
831
|
+
onVisibleChange: n[0] ||= (e) => r("visibleTabsChange", e)
|
|
832
|
+
}, m({ _: 2 }, [
|
|
833
|
+
t.$slots.tabBarExtraContent ? {
|
|
834
|
+
name: "tabBarExtraContent",
|
|
835
|
+
fn: L(() => [A(t.$slots, "tabBarExtraContent")]),
|
|
836
|
+
key: "0"
|
|
837
|
+
} : void 0,
|
|
838
|
+
t.$slots.more ? {
|
|
839
|
+
name: "more",
|
|
840
|
+
fn: L((e) => [A(t.$slots, "more", te(v(e)))]),
|
|
841
|
+
key: "1"
|
|
842
|
+
} : void 0,
|
|
843
|
+
t.$slots.arrow ? {
|
|
844
|
+
name: "arrow",
|
|
845
|
+
fn: L((e) => [A(t.$slots, "arrow", te(v(e)))]),
|
|
846
|
+
key: "2"
|
|
847
|
+
} : void 0
|
|
848
|
+
]), 1032, [
|
|
849
|
+
"active-key",
|
|
850
|
+
"arrow-position",
|
|
851
|
+
"class-name",
|
|
852
|
+
"collapsible",
|
|
853
|
+
"data-more-label",
|
|
854
|
+
"dropdown-props",
|
|
855
|
+
"list",
|
|
856
|
+
"more",
|
|
857
|
+
"show-rest-in-dropdown",
|
|
858
|
+
"size",
|
|
859
|
+
"style",
|
|
860
|
+
"tab-bar-extra-content",
|
|
861
|
+
"tab-position",
|
|
862
|
+
"type",
|
|
863
|
+
"visible-tabs-style"
|
|
864
|
+
])), p("div", {
|
|
865
|
+
class: w(["semi-tabs-content", `semi-tabs-content-${Z.value}`]),
|
|
866
|
+
style: T(e.contentStyle)
|
|
867
|
+
}, [(D(!0), f(s, null, k(me.value, (e, t) => (D(), u(N(V), {
|
|
868
|
+
key: e.key ?? t,
|
|
869
|
+
content: e
|
|
870
|
+
}, null, 8, ["content"]))), 128))], 6)], 16));
|
|
871
|
+
}
|
|
872
|
+
}), he = me;
|
|
873
|
+
//#endregion
|
|
874
|
+
export { W as i, me as n, pe as r, he as t };
|