naive-ui 2.34.4 → 2.36.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/README.md +2 -0
- package/README.zh-CN.md +2 -0
- package/dist/index.js +47537 -44859
- package/dist/index.prod.js +2 -2
- package/es/_internal/clear/src/Clear.d.ts +1 -1
- package/es/_internal/clear/src/Clear.js +2 -0
- package/es/_internal/close/src/Close.d.ts +1 -1
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +1 -1
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
- package/es/_internal/focus-detector/src/FocusDetector.d.ts +1 -1
- package/es/_internal/icon/src/Icon.d.ts +1 -1
- package/es/_internal/icon-switch-transition/src/IconSwitchTransition.d.ts +1 -1
- package/es/_internal/icons/Add.d.ts +1 -1
- package/es/_internal/icons/ArrowBack.d.ts +1 -1
- package/es/_internal/icons/ArrowDown.d.ts +1 -1
- package/es/_internal/icons/ArrowUp.d.ts +1 -1
- package/es/_internal/icons/Attach.d.ts +1 -1
- package/es/_internal/icons/Backward.d.ts +1 -1
- package/es/_internal/icons/Cancel.d.ts +1 -1
- package/es/_internal/icons/Checkmark.d.ts +1 -1
- package/es/_internal/icons/ChevronDown.d.ts +1 -1
- package/es/_internal/icons/ChevronDownFilled.d.ts +1 -1
- package/es/_internal/icons/ChevronLeft.d.ts +1 -1
- package/es/_internal/icons/ChevronRight.d.ts +1 -1
- package/es/_internal/icons/Clear.d.ts +1 -1
- package/es/_internal/icons/Close.d.ts +1 -1
- package/es/_internal/icons/Date.d.ts +1 -1
- package/es/_internal/icons/Download.d.ts +1 -1
- package/es/_internal/icons/Empty.d.ts +1 -1
- package/es/_internal/icons/Error.d.ts +1 -1
- package/es/_internal/icons/Eye.d.ts +1 -1
- package/es/_internal/icons/EyeOff.d.ts +1 -1
- package/es/_internal/icons/FastBackward.d.ts +1 -1
- package/es/_internal/icons/FastForward.d.ts +1 -1
- package/es/_internal/icons/File.d.ts +1 -1
- package/es/_internal/icons/Filter.d.ts +1 -1
- package/es/_internal/icons/Forward.d.ts +1 -1
- package/es/_internal/icons/Info.d.ts +1 -1
- package/es/_internal/icons/More.d.ts +1 -1
- package/es/_internal/icons/Photo.d.ts +1 -1
- package/es/_internal/icons/Remove.d.ts +1 -1
- package/es/_internal/icons/ResizeSmall.d.ts +1 -1
- package/es/_internal/icons/Retry.d.ts +1 -1
- package/es/_internal/icons/RotateClockwise.d.ts +1 -1
- package/es/_internal/icons/RotateCounterclockwise.d.ts +1 -1
- package/es/_internal/icons/Search.d.ts +1 -1
- package/es/_internal/icons/Success.d.ts +1 -1
- package/es/_internal/icons/Switcher.d.ts +1 -1
- package/es/_internal/icons/Time.d.ts +1 -1
- package/es/_internal/icons/To.d.ts +1 -1
- package/es/_internal/icons/Trash.d.ts +1 -1
- package/es/_internal/icons/Warning.d.ts +1 -1
- package/es/_internal/icons/ZoomIn.d.ts +1 -1
- package/es/_internal/icons/ZoomOut.d.ts +1 -1
- package/es/_internal/icons/replaceable.d.ts +1 -1
- package/es/_internal/loading/src/Loading.d.ts +1 -1
- package/es/_internal/menu-mask/src/MenuMask.d.ts +1 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +2 -2
- package/es/_internal/scrollbar/src/Scrollbar.js +11 -6
- package/es/_internal/scrollbar/src/styles/index.cssr.js +1 -0
- package/es/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -1
- package/es/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/es/_internal/select-menu/src/SelectMenu.js +2 -1
- package/es/_internal/select-menu/src/SelectOption.d.ts +1 -1
- package/es/_internal/select-menu/src/styles/index.cssr.js +8 -0
- package/es/_internal/selection/src/Selection.d.ts +5 -2
- package/es/_internal/selection/src/Selection.js +17 -7
- package/es/_internal/slot-machine/src/SlotMachine.d.ts +1 -1
- package/es/_internal/slot-machine/src/SlotMachineNumber.d.ts +1 -1
- package/es/_internal/suffix/src/Suffix.d.ts +1 -1
- package/es/_internal/wave/src/Wave.d.ts +1 -1
- package/es/_mixins/use-config.d.ts +2 -1
- package/es/_mixins/use-config.js +10 -5
- package/es/_mixins/use-form-item.d.ts +1 -1
- package/es/_mixins/use-style.d.ts +1 -1
- package/es/_mixins/use-style.js +1 -1
- package/es/_styles/common/_common.js +1 -1
- package/es/_styles/common/light.js +2 -2
- package/es/_utils/composable/use-collection.d.ts +1 -1
- package/es/_utils/composable/use-collection.js +2 -0
- package/es/_utils/css/color-to-class.js +1 -1
- package/es/_utils/cssr/index.d.ts +1 -1
- package/es/_utils/vue/wrapper.d.ts +1 -1
- package/es/affix/src/Affix.d.ts +4 -4
- package/es/affix/src/Affix.js +4 -2
- package/es/alert/src/Alert.d.ts +2 -2
- package/es/alert/src/Alert.js +7 -1
- package/es/alert/src/styles/index.cssr.js +4 -0
- package/es/anchor/src/AnchorAdapter.d.ts +2 -2
- package/es/anchor/src/BaseAnchor.d.ts +1 -1
- package/es/anchor/src/BaseAnchor.js +3 -1
- package/es/anchor/src/Link.d.ts +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +3 -3
- package/es/auto-complete/src/interface.d.ts +2 -1
- package/es/avatar/src/Avatar.d.ts +2 -2
- package/es/avatar-group/src/AvatarGroup.d.ts +2 -2
- package/es/back-top/src/BackTop.d.ts +2 -2
- package/es/badge/src/Badge.d.ts +2 -2
- package/es/breadcrumb/src/Breadcrumb.d.ts +2 -2
- package/es/breadcrumb/src/BreadcrumbItem.d.ts +1 -1
- package/es/button/src/Button.d.ts +3 -3
- package/es/button/src/Button.js +2 -2
- package/es/button-group/src/ButtonGroup.d.ts +2 -2
- package/es/calendar/src/Calendar.d.ts +2 -2
- package/es/card/src/Card.d.ts +23 -7
- package/es/card/src/Card.js +12 -5
- package/es/carousel/src/Carousel.d.ts +7 -7
- package/es/carousel/src/Carousel.js +8 -3
- package/es/carousel/src/CarouselArrow.d.ts +2 -2
- package/es/carousel/src/CarouselContext.js +3 -1
- package/es/carousel/src/CarouselDots.d.ts +2 -2
- package/es/carousel/src/CarouselDots.js +7 -1
- package/es/carousel/src/CarouselItem.d.ts +2 -2
- package/es/cascader/src/Cascader.d.ts +3 -2
- package/es/cascader/src/CascaderMenu.d.ts +1 -1
- package/es/cascader/src/CascaderOption.d.ts +1 -1
- package/es/cascader/src/CascaderSelectMenu.d.ts +2 -2
- package/es/cascader/src/CascaderSubmenu.d.ts +1 -1
- package/es/checkbox/src/Checkbox.d.ts +8 -8
- package/es/checkbox/src/Checkbox.js +10 -3
- package/es/checkbox/src/CheckboxGroup.d.ts +2 -2
- package/es/checkbox/src/styles/index.cssr.js +9 -11
- package/es/code/src/Code.d.ts +2 -2
- package/es/collapse/src/Collapse.d.ts +2 -2
- package/es/collapse/src/CollapseItem.d.ts +2 -2
- package/es/collapse/src/CollapseItemContent.d.ts +1 -1
- package/es/collapse-transition/src/CollapseTransition.d.ts +2 -2
- package/es/color-picker/src/AlphaSlider.d.ts +1 -1
- package/es/color-picker/src/ColorInput.d.ts +1 -1
- package/es/color-picker/src/ColorInputUnit.d.ts +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +2 -2
- package/es/color-picker/src/ColorPicker.js +6 -2
- package/es/color-picker/src/ColorPickerSwatches.d.ts +1 -1
- package/es/color-picker/src/ColorPickerSwatches.js +9 -4
- package/es/color-picker/src/ColorPickerTrigger.d.ts +1 -1
- package/es/color-picker/src/ColorPreview.d.ts +1 -1
- package/es/color-picker/src/HueSlider.d.ts +1 -1
- package/es/color-picker/src/Pallete.d.ts +1 -1
- package/es/components.d.ts +3 -0
- package/es/components.js +3 -0
- package/es/config-provider/src/ConfigProvider.d.ts +21 -8
- package/es/config-provider/src/ConfigProvider.js +4 -2
- package/es/config-provider/src/config.js +5 -5
- package/es/config-provider/src/internal-interface.d.ts +5 -1
- package/es/countdown/src/Countdown.d.ts +1 -1
- package/es/data-table/index.d.ts +1 -1
- package/es/data-table/src/DataTable.d.ts +5 -5
- package/es/data-table/src/DataTable.js +2 -7
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +1 -1
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +1 -1
- package/es/data-table/src/HeaderButton/RenderFilter.d.ts +1 -1
- package/es/data-table/src/HeaderButton/RenderSorter.d.ts +1 -1
- package/es/data-table/src/HeaderButton/ResizeButton.d.ts +1 -1
- package/es/data-table/src/HeaderButton/ResizeButton.js +1 -0
- package/es/data-table/src/HeaderButton/SortButton.d.ts +1 -1
- package/es/data-table/src/MainTable.d.ts +1 -1
- package/es/data-table/src/MainTable.js +1 -0
- package/es/data-table/src/TableParts/Body.d.ts +5 -6
- package/es/data-table/src/TableParts/Body.js +22 -15
- package/es/data-table/src/TableParts/BodyCheckbox.d.ts +1 -1
- package/es/data-table/src/TableParts/BodyRadio.d.ts +1 -1
- package/es/data-table/src/TableParts/Cell.d.ts +1 -1
- package/es/data-table/src/TableParts/Cell.js +5 -1
- package/es/data-table/src/TableParts/ExpandTrigger.d.ts +1 -1
- package/es/data-table/src/TableParts/ExpandTrigger.js +3 -1
- package/es/data-table/src/TableParts/Header.d.ts +1 -3
- package/es/data-table/src/TableParts/Header.js +6 -12
- package/es/data-table/src/TableParts/SelectionMenu.d.ts +1 -1
- package/es/data-table/src/interface.d.ts +3 -5
- package/es/data-table/src/styles/index.cssr.js +2 -0
- package/es/data-table/src/use-scroll.d.ts +1 -2
- package/es/data-table/src/use-scroll.js +21 -13
- package/es/date-picker/src/DatePicker.d.ts +2 -2
- package/es/date-picker/src/panel/date.d.ts +4 -4
- package/es/date-picker/src/panel/date.js +3 -1
- package/es/date-picker/src/panel/daterange.d.ts +4 -4
- package/es/date-picker/src/panel/daterange.js +10 -2
- package/es/date-picker/src/panel/datetime.d.ts +4 -4
- package/es/date-picker/src/panel/datetime.js +3 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +4 -4
- package/es/date-picker/src/panel/datetimerange.js +16 -4
- package/es/date-picker/src/panel/month.d.ts +4 -4
- package/es/date-picker/src/panel/month.js +4 -1
- package/es/date-picker/src/panel/monthrange.d.ts +4 -4
- package/es/date-picker/src/panel/panelHeader.d.ts +722 -752
- package/es/date-picker/src/panel/use-calendar.d.ts +3 -3
- package/es/date-picker/src/panel/use-calendar.js +2 -2
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +3 -3
- package/es/date-picker/src/panel/use-dual-calendar.js +4 -4
- package/es/date-picker/src/styles/index.cssr.js +1 -0
- package/es/date-picker/src/utils.js +1 -6
- package/es/date-picker/styles/_common.js +1 -1
- package/es/descriptions/src/Descriptions.d.ts +8 -2
- package/es/descriptions/src/Descriptions.js +28 -8
- package/es/descriptions/src/DescriptionsItem.d.ts +7 -1
- package/es/descriptions/src/DescriptionsItem.js +2 -0
- package/es/dialog/src/Dialog.d.ts +2 -2
- package/es/dialog/src/Dialog.js +6 -2
- package/es/dialog/src/DialogEnvironment.d.ts +2 -2
- package/es/dialog/src/DialogProvider.d.ts +4 -4
- package/es/dialog/src/DialogProvider.js +3 -1
- package/es/dialog/src/dialogProps.d.ts +1 -1
- package/es/discrete/src/InjectionExtractor.d.ts +1 -1
- package/es/divider/src/Divider.d.ts +2 -2
- package/es/drawer/src/Drawer.d.ts +15 -2
- package/es/drawer/src/Drawer.js +2 -2
- package/es/drawer/src/DrawerBodyWrapper.d.ts +9 -1
- package/es/drawer/src/DrawerBodyWrapper.js +25 -1
- package/es/drawer/src/DrawerContent.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +20 -2
- package/es/dropdown/src/Dropdown.js +1 -1
- package/es/dropdown/src/DropdownDivider.d.ts +1 -1
- package/es/dropdown/src/DropdownGroup.d.ts +1 -1
- package/es/dropdown/src/DropdownGroupHeader.d.ts +1 -1
- package/es/dropdown/src/DropdownMenu.d.ts +1 -1
- package/es/dropdown/src/DropdownMenu.js +4 -1
- package/es/dropdown/src/DropdownOption.d.ts +6 -5
- package/es/dropdown/src/DropdownOption.js +2 -4
- package/es/dropdown/src/DropdownRenderOption.d.ts +1 -1
- package/es/dynamic-input/src/DynamicInput.d.ts +5 -2
- package/es/dynamic-input/src/DynamicInput.js +21 -9
- package/es/dynamic-input/src/InputPreset.d.ts +1 -1
- package/es/dynamic-input/src/PairPreset.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +8 -2
- package/es/dynamic-tags/src/DynamicTags.js +6 -4
- package/es/element/src/Element.d.ts +2 -2
- package/es/ellipsis/index.d.ts +1 -0
- package/es/ellipsis/index.js +1 -0
- package/es/ellipsis/src/Ellipsis.d.ts +3 -1
- package/es/ellipsis/src/Ellipsis.js +5 -4
- package/es/ellipsis/src/PerformantEllipsis.d.ts +164 -0
- package/es/ellipsis/src/PerformantEllipsis.js +52 -0
- package/es/empty/src/Empty.d.ts +2 -2
- package/es/equation/index.d.ts +1 -0
- package/es/equation/src/Equation.d.ts +6 -4
- package/es/form/src/Form.d.ts +2 -2
- package/es/form/src/Form.js +3 -1
- package/es/form/src/FormItem.d.ts +3 -3
- package/es/form/src/FormItemCol.d.ts +1 -1
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- package/es/form/src/FormItemRow.d.ts +1 -1
- package/es/form/src/utils.d.ts +1 -1
- package/es/global-style/src/GlobalStyle.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +2 -2
- package/es/grid/src/Grid.d.ts +2 -2
- package/es/grid/src/Grid.js +6 -3
- package/es/grid/src/GridItem.d.ts +1 -1
- package/es/icon/src/Icon.d.ts +2 -2
- package/es/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/es/image/src/Image.d.ts +8 -2
- package/es/image/src/ImageGroup.d.ts +8 -2
- package/es/image/src/ImageGroup.js +8 -2
- package/es/image/src/ImagePreview.d.ts +8 -3
- package/es/image/src/ImagePreview.js +10 -1
- package/es/image/src/icons.d.ts +1 -0
- package/es/image/src/icons.js +2 -0
- package/es/image/src/interface.d.ts +7 -5
- package/es/image/src/interface.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/input/src/Input.d.ts +19 -9
- package/es/input/src/Input.js +30 -8
- package/es/input/src/InputGroup.d.ts +2 -2
- package/es/input/src/InputGroupLabel.d.ts +2 -2
- package/es/input/src/WordCount.d.ts +1 -1
- package/es/input/src/styles/input.cssr.js +2 -1
- package/es/input-number/src/InputNumber.d.ts +3 -2
- package/es/input-number/src/InputNumber.js +2 -1
- package/es/input-number/src/interface.d.ts +1 -0
- package/es/layout/src/Layout.d.ts +10 -4
- package/es/layout/src/Layout.js +8 -1
- package/es/layout/src/LayoutContent.d.ts +4 -2
- package/es/layout/src/LayoutFooter.d.ts +2 -2
- package/es/layout/src/LayoutHeader.d.ts +2 -2
- package/es/layout/src/LayoutSider.d.ts +11 -2
- package/es/layout/src/LayoutSider.js +12 -3
- package/es/layout/src/ToggleBar.d.ts +1 -1
- package/es/layout/src/ToggleButton.d.ts +1 -1
- package/es/legacy-grid/src/Col.d.ts +1 -1
- package/es/legacy-grid/src/Row.d.ts +2 -2
- package/es/legacy-grid/src/styles/index.cssr.js +2 -3
- package/es/legacy-grid/src/styles/rtl.cssr.js +2 -3
- package/es/legacy-transfer/src/Transfer.d.ts +2 -2
- package/es/legacy-transfer/src/TransferFilter.d.ts +1 -1
- package/es/legacy-transfer/src/TransferHeader.d.ts +1 -1
- package/es/legacy-transfer/src/TransferList.d.ts +1 -1
- package/es/legacy-transfer/src/TransferListItem.d.ts +1 -1
- package/es/list/src/List.d.ts +2 -2
- package/es/list/src/ListItem.d.ts +1 -1
- package/es/loading-bar/src/LoadingBar.d.ts +4 -2
- package/es/loading-bar/src/LoadingBar.js +21 -12
- package/es/loading-bar/src/LoadingBarProvider.d.ts +4 -1
- package/es/loading-bar/src/LoadingBarProvider.js +2 -2
- package/es/locales/common/arDZ.js +1 -0
- package/es/locales/common/deDE.js +1 -0
- package/es/locales/common/enGB.js +1 -0
- package/es/locales/common/enUS.d.ts +1 -0
- package/es/locales/common/enUS.js +1 -0
- package/es/locales/common/eo.js +1 -0
- package/es/locales/common/esAR.js +1 -0
- package/es/locales/common/faIR.js +1 -0
- package/es/locales/common/frFR.js +2 -1
- package/es/locales/common/idID.js +1 -0
- package/es/locales/common/itIT.js +1 -0
- package/es/locales/common/jaJP.js +1 -0
- package/es/locales/common/koKR.js +1 -0
- package/es/locales/common/nbNO.js +1 -0
- package/es/locales/common/nlNL.js +1 -0
- package/es/locales/common/plPL.js +1 -0
- package/es/locales/common/ptBR.js +15 -17
- package/es/locales/common/ruRU.js +1 -0
- package/es/locales/common/skSK.js +1 -0
- package/es/locales/common/svSE.d.ts +3 -0
- package/es/locales/common/svSE.js +121 -0
- package/es/locales/common/thTH.js +1 -0
- package/es/locales/common/trTR.js +1 -0
- package/es/locales/common/ukUA.js +1 -0
- package/es/locales/common/viVN.js +1 -0
- package/es/locales/common/zhCN.js +1 -0
- package/es/locales/common/zhTW.js +18 -17
- package/es/locales/date/svSE.d.ts +3 -0
- package/es/locales/date/svSE.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/log/src/Log.d.ts +11 -11
- package/es/log/src/Log.js +12 -12
- package/es/log/src/LogLine.d.ts +1 -1
- package/es/log/src/LogLoader.d.ts +1 -1
- package/es/mention/src/Mention.d.ts +4 -4
- package/es/mention/src/utils.js +4 -4
- package/es/menu/src/Menu.d.ts +32 -15
- package/es/menu/src/Menu.js +101 -7
- package/es/menu/src/MenuDivider.d.ts +1 -1
- package/es/menu/src/MenuOption.d.ts +1 -1
- package/es/menu/src/MenuOptionContent.d.ts +4 -1
- package/es/menu/src/MenuOptionContent.js +7 -2
- package/es/menu/src/MenuOptionGroup.d.ts +1 -1
- package/es/menu/src/Submenu.d.ts +24 -13
- package/es/menu/src/Submenu.js +9 -8
- package/es/menu/src/context.d.ts +2 -2
- package/es/menu/src/interface.d.ts +1 -0
- package/es/menu/src/styles/index.cssr.js +8 -4
- package/es/menu/src/use-menu-child.js +5 -5
- package/es/message/src/Message.d.ts +2 -2
- package/es/message/src/MessageEnvironment.d.ts +1 -1
- package/es/message/src/MessageProvider.d.ts +9 -6
- package/es/message/src/MessageProvider.js +3 -2
- package/es/modal/src/BodyWrapper.d.ts +12 -4
- package/es/modal/src/Modal.d.ts +18 -6
- package/es/modal/src/presetProps.d.ts +5 -1
- package/es/notification/src/Notification.d.ts +1 -1
- package/es/notification/src/NotificationContainer.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.js +1 -1
- package/es/notification/src/NotificationProvider.d.ts +5 -2
- package/es/notification/src/NotificationProvider.js +2 -2
- package/es/number-animation/src/NumberAnimation.d.ts +1 -1
- package/es/page-header/src/PageHeader.d.ts +2 -2
- package/es/pagination/src/Pagination.d.ts +2 -2
- package/es/pagination/src/Pagination.js +3 -1
- package/es/popconfirm/src/Popconfirm.d.ts +22 -3
- package/es/popconfirm/src/Popconfirm.js +13 -5
- package/es/popconfirm/src/PopconfirmPanel.d.ts +1 -1
- package/es/popover/src/Popover.d.ts +25 -1
- package/es/popover/src/Popover.js +10 -4
- package/es/popover/src/PopoverBody.d.ts +23 -2
- package/es/popover/src/PopoverBody.js +26 -10
- package/es/popover/src/interface.d.ts +4 -1
- package/es/popselect/src/Popselect.d.ts +19 -1
- package/es/popselect/src/Popselect.js +2 -1
- package/es/popselect/src/PopselectPanel.d.ts +2 -2
- package/es/popselect/src/PopselectPanel.js +1 -0
- package/es/progress/src/Circle.d.ts +1 -1
- package/es/progress/src/Line.d.ts +1 -1
- package/es/progress/src/Line.js +1 -3
- package/es/progress/src/MultipleCircle.d.ts +1 -1
- package/es/progress/src/Progress.d.ts +3 -3
- package/es/qr-code/index.d.ts +2 -0
- package/es/qr-code/index.js +1 -0
- package/es/qr-code/src/QrCode.d.ts +154 -0
- package/es/qr-code/src/QrCode.js +146 -0
- package/es/qr-code/src/qrcodegen.d.ts +94 -0
- package/es/qr-code/src/qrcodegen.js +948 -0
- package/es/qr-code/src/styles/index.cssr.d.ts +2 -0
- package/es/qr-code/src/styles/index.cssr.js +8 -0
- package/es/qr-code/styles/dark.d.ts +3 -0
- package/es/qr-code/styles/dark.js +11 -0
- package/es/qr-code/styles/index.d.ts +3 -0
- package/es/qr-code/styles/index.js +2 -0
- package/es/qr-code/styles/light.d.ts +9 -0
- package/es/qr-code/styles/light.js +12 -0
- package/es/radio/src/Radio.d.ts +173 -34
- package/es/radio/src/Radio.js +3 -3
- package/es/radio/src/RadioButton.d.ts +3 -3
- package/es/radio/src/RadioButton.js +3 -3
- package/es/radio/src/RadioGroup.d.ts +3 -2
- package/es/radio/src/RadioGroup.js +2 -1
- package/es/radio/src/styles/radio-group.cssr.js +1 -0
- package/es/radio/src/use-radio.d.ts +3 -3
- package/es/radio/src/use-radio.js +1 -1
- package/es/rate/src/Rate.d.ts +2 -2
- package/es/result/src/Result.d.ts +3 -3
- package/es/scrollbar/src/Scrollbar.d.ts +1 -1
- package/es/scrollbar/src/Scrollbar.js +2 -0
- package/es/select/src/Select.d.ts +7 -4
- package/es/select/src/Select.js +17 -3
- package/es/select/src/interface.d.ts +2 -0
- package/es/skeleton/src/Skeleton.d.ts +2 -2
- package/es/skeleton/src/Skeleton.js +4 -7
- package/es/slider/src/Slider.d.ts +8 -2
- package/es/slider/src/Slider.js +19 -4
- package/es/slider/src/utils.d.ts +2 -2
- package/es/slider/src/utils.js +6 -4
- package/es/space/src/Space.d.ts +5 -2
- package/es/space/src/Space.js +3 -3
- package/es/spin/src/Spin.d.ts +13 -4
- package/es/spin/src/Spin.js +26 -7
- package/es/split/index.d.ts +2 -0
- package/es/split/index.js +1 -0
- package/es/split/src/Split.d.ts +135 -0
- package/es/split/src/Split.js +145 -0
- package/es/split/src/styles/index.cssr.d.ts +2 -0
- package/es/split/src/styles/index.cssr.js +25 -0
- package/es/split/styles/dark.d.ts +3 -0
- package/es/split/styles/dark.js +6 -0
- package/es/split/styles/index.d.ts +3 -0
- package/es/split/styles/index.js +2 -0
- package/es/split/styles/light.d.ts +9 -0
- package/es/split/styles/light.js +13 -0
- package/es/statistic/src/Statistic.d.ts +2 -2
- package/es/steps/src/Step.d.ts +2 -2
- package/es/steps/src/Steps.d.ts +3 -3
- package/es/steps/src/styles/index.cssr.js +1 -0
- package/es/switch/src/Switch.d.ts +2 -2
- package/es/table/src/Table.d.ts +2 -2
- package/es/table/src/Tbody.d.ts +1 -1
- package/es/table/src/Td.d.ts +1 -1
- package/es/table/src/Th.d.ts +1 -1
- package/es/table/src/Thead.d.ts +1 -1
- package/es/table/src/Tr.d.ts +1 -1
- package/es/tabs/src/Tab.d.ts +1 -1
- package/es/tabs/src/Tab.js +3 -1
- package/es/tabs/src/TabPane.d.ts +1 -1
- package/es/tabs/src/Tabs.d.ts +13 -13
- package/es/tabs/src/Tabs.js +15 -2
- package/es/tabs/src/styles/index.cssr.js +12 -2
- package/es/tag/src/Tag.d.ts +2 -2
- package/es/theme-editor/src/MaximizeIcon.d.ts +1 -1
- package/es/theme-editor/src/MinimizeIcon.d.ts +1 -1
- package/es/theme-editor/src/ThemeEditor.d.ts +3 -3
- package/es/themes/dark.js +5 -1
- package/es/themes/light.js +5 -1
- package/es/thing/src/Thing.d.ts +7 -1
- package/es/thing/src/Thing.js +13 -4
- package/es/time/src/Time.d.ts +1 -1
- package/es/time/src/Time.js +1 -1
- package/es/time-picker/src/Panel.d.ts +1 -1
- package/es/time-picker/src/PanelCol.d.ts +1 -1
- package/es/time-picker/src/PanelCol.js +5 -1
- package/es/time-picker/src/TimePicker.d.ts +2 -2
- package/es/time-picker/src/TimePicker.js +1 -1
- package/es/timeline/src/Timeline.d.ts +1 -1
- package/es/timeline/src/TimelineItem.d.ts +1 -1
- package/es/tooltip/src/Tooltip.d.ts +19 -1
- package/es/transfer/src/Transfer.d.ts +8 -2
- package/es/transfer/src/Transfer.js +2 -2
- package/es/transfer/src/TransferFilter.d.ts +1 -1
- package/es/transfer/src/TransferHeader.d.ts +5 -1
- package/es/transfer/src/TransferHeader.js +6 -2
- package/es/transfer/src/TransferList.d.ts +1 -1
- package/es/transfer/src/TransferListItem.d.ts +1 -1
- package/es/tree/index.d.ts +1 -0
- package/es/tree/index.js +1 -0
- package/es/tree/src/MotionWrapper.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +59 -5
- package/es/tree/src/Tree.js +32 -19
- package/es/tree/src/TreeNode.d.ts +6 -2
- package/es/tree/src/TreeNode.js +72 -25
- package/es/tree/src/TreeNodeCheckbox.d.ts +13 -1
- package/es/tree/src/TreeNodeCheckbox.js +9 -8
- package/es/tree/src/TreeNodeContent.d.ts +1 -1
- package/es/tree/src/TreeNodeSwitcher.d.ts +19 -2
- package/es/tree/src/TreeNodeSwitcher.js +12 -6
- package/es/tree/src/interface.d.ts +2 -0
- package/es/tree/src/styles/index.cssr.js +47 -51
- package/es/tree/src/utils.d.ts +1 -0
- package/es/tree/src/utils.js +12 -0
- package/es/tree/styles/light.d.ts +8 -0
- package/es/tree/styles/light.js +6 -2
- package/es/tree-select/src/TreeSelect.d.ts +49 -3
- package/es/tree-select/src/TreeSelect.js +5 -3
- package/es/tree-select/src/interface.d.ts +2 -0
- package/es/tree-select/styles/light.d.ts +4 -0
- package/es/typography/src/a.d.ts +2 -2
- package/es/typography/src/blockquote.d.ts +2 -2
- package/es/typography/src/create-header.d.ts +2 -2
- package/es/typography/src/headers.d.ts +12 -12
- package/es/typography/src/hr.d.ts +2 -2
- package/es/typography/src/li.d.ts +1 -1
- package/es/typography/src/ol.d.ts +2 -2
- package/es/typography/src/p.d.ts +2 -2
- package/es/typography/src/text.d.ts +2 -2
- package/es/typography/src/ul.d.ts +2 -2
- package/es/upload/src/Upload.d.ts +11 -5
- package/es/upload/src/Upload.js +8 -3
- package/es/upload/src/UploadDragger.d.ts +1 -1
- package/es/upload/src/UploadFile.d.ts +2 -2
- package/es/upload/src/UploadFileList.d.ts +1 -1
- package/es/upload/src/UploadFileList.js +3 -2
- package/es/upload/src/UploadProgress.d.ts +1 -1
- package/es/upload/src/UploadTrigger.d.ts +1 -1
- package/es/upload/src/UploadTrigger.js +3 -2
- package/es/upload/src/interface.d.ts +5 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/index.d.ts +2 -0
- package/es/virtual-list/index.js +1 -0
- package/es/virtual-list/src/VirtualList.d.ts +146 -0
- package/es/virtual-list/src/VirtualList.js +102 -0
- package/es/watermark/src/Watermark.d.ts +1 -1
- package/es/watermark/src/Watermark.js +7 -0
- package/lib/_internal/clear/src/Clear.d.ts +1 -1
- package/lib/_internal/clear/src/Clear.js +2 -0
- package/lib/_internal/close/src/Close.d.ts +1 -1
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +1 -1
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
- package/lib/_internal/focus-detector/src/FocusDetector.d.ts +1 -1
- package/lib/_internal/icon/src/Icon.d.ts +1 -1
- package/lib/_internal/icon-switch-transition/src/IconSwitchTransition.d.ts +1 -1
- package/lib/_internal/icons/Add.d.ts +1 -1
- package/lib/_internal/icons/ArrowBack.d.ts +1 -1
- package/lib/_internal/icons/ArrowDown.d.ts +1 -1
- package/lib/_internal/icons/ArrowUp.d.ts +1 -1
- package/lib/_internal/icons/Attach.d.ts +1 -1
- package/lib/_internal/icons/Backward.d.ts +1 -1
- package/lib/_internal/icons/Cancel.d.ts +1 -1
- package/lib/_internal/icons/Checkmark.d.ts +1 -1
- package/lib/_internal/icons/ChevronDown.d.ts +1 -1
- package/lib/_internal/icons/ChevronDownFilled.d.ts +1 -1
- package/lib/_internal/icons/ChevronLeft.d.ts +1 -1
- package/lib/_internal/icons/ChevronRight.d.ts +1 -1
- package/lib/_internal/icons/Clear.d.ts +1 -1
- package/lib/_internal/icons/Close.d.ts +1 -1
- package/lib/_internal/icons/Date.d.ts +1 -1
- package/lib/_internal/icons/Download.d.ts +1 -1
- package/lib/_internal/icons/Empty.d.ts +1 -1
- package/lib/_internal/icons/Error.d.ts +1 -1
- package/lib/_internal/icons/Eye.d.ts +1 -1
- package/lib/_internal/icons/EyeOff.d.ts +1 -1
- package/lib/_internal/icons/FastBackward.d.ts +1 -1
- package/lib/_internal/icons/FastForward.d.ts +1 -1
- package/lib/_internal/icons/File.d.ts +1 -1
- package/lib/_internal/icons/Filter.d.ts +1 -1
- package/lib/_internal/icons/Forward.d.ts +1 -1
- package/lib/_internal/icons/Info.d.ts +1 -1
- package/lib/_internal/icons/More.d.ts +1 -1
- package/lib/_internal/icons/Photo.d.ts +1 -1
- package/lib/_internal/icons/Remove.d.ts +1 -1
- package/lib/_internal/icons/ResizeSmall.d.ts +1 -1
- package/lib/_internal/icons/Retry.d.ts +1 -1
- package/lib/_internal/icons/RotateClockwise.d.ts +1 -1
- package/lib/_internal/icons/RotateCounterclockwise.d.ts +1 -1
- package/lib/_internal/icons/Search.d.ts +1 -1
- package/lib/_internal/icons/Success.d.ts +1 -1
- package/lib/_internal/icons/Switcher.d.ts +1 -1
- package/lib/_internal/icons/Time.d.ts +1 -1
- package/lib/_internal/icons/To.d.ts +1 -1
- package/lib/_internal/icons/Trash.d.ts +1 -1
- package/lib/_internal/icons/Warning.d.ts +1 -1
- package/lib/_internal/icons/ZoomIn.d.ts +1 -1
- package/lib/_internal/icons/ZoomOut.d.ts +1 -1
- package/lib/_internal/icons/replaceable.d.ts +1 -1
- package/lib/_internal/loading/src/Loading.d.ts +1 -1
- package/lib/_internal/menu-mask/src/MenuMask.d.ts +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +2 -2
- package/lib/_internal/scrollbar/src/Scrollbar.js +11 -6
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +1 -0
- package/lib/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/lib/_internal/select-menu/src/SelectMenu.js +2 -1
- package/lib/_internal/select-menu/src/SelectOption.d.ts +1 -1
- package/lib/_internal/select-menu/src/styles/index.cssr.js +8 -0
- package/lib/_internal/selection/src/Selection.d.ts +5 -2
- package/lib/_internal/selection/src/Selection.js +17 -7
- package/lib/_internal/slot-machine/src/SlotMachine.d.ts +1 -1
- package/lib/_internal/slot-machine/src/SlotMachineNumber.d.ts +1 -1
- package/lib/_internal/suffix/src/Suffix.d.ts +1 -1
- package/lib/_internal/wave/src/Wave.d.ts +1 -1
- package/lib/_mixins/use-config.d.ts +2 -1
- package/lib/_mixins/use-config.js +11 -5
- package/lib/_mixins/use-form-item.d.ts +1 -1
- package/lib/_mixins/use-style.d.ts +1 -1
- package/lib/_mixins/use-style.js +1 -1
- package/lib/_styles/common/_common.js +1 -1
- package/lib/_styles/common/light.js +2 -2
- package/lib/_utils/composable/use-collection.d.ts +1 -1
- package/lib/_utils/composable/use-collection.js +2 -0
- package/lib/_utils/css/color-to-class.js +1 -1
- package/lib/_utils/cssr/index.d.ts +1 -1
- package/lib/_utils/vue/wrapper.d.ts +1 -1
- package/lib/affix/src/Affix.d.ts +4 -4
- package/lib/affix/src/Affix.js +4 -2
- package/lib/alert/src/Alert.d.ts +2 -2
- package/lib/alert/src/Alert.js +7 -1
- package/lib/alert/src/styles/index.cssr.js +4 -0
- package/lib/anchor/src/AnchorAdapter.d.ts +2 -2
- package/lib/anchor/src/BaseAnchor.d.ts +1 -1
- package/lib/anchor/src/BaseAnchor.js +3 -1
- package/lib/anchor/src/Link.d.ts +1 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +3 -3
- package/lib/auto-complete/src/interface.d.ts +2 -1
- package/lib/avatar/src/Avatar.d.ts +2 -2
- package/lib/avatar-group/src/AvatarGroup.d.ts +2 -2
- package/lib/back-top/src/BackTop.d.ts +2 -2
- package/lib/badge/src/Badge.d.ts +2 -2
- package/lib/breadcrumb/src/Breadcrumb.d.ts +2 -2
- package/lib/breadcrumb/src/BreadcrumbItem.d.ts +1 -1
- package/lib/button/src/Button.d.ts +3 -3
- package/lib/button/src/Button.js +2 -2
- package/lib/button-group/src/ButtonGroup.d.ts +2 -2
- package/lib/calendar/src/Calendar.d.ts +2 -2
- package/lib/card/src/Card.d.ts +23 -7
- package/lib/card/src/Card.js +12 -5
- package/lib/carousel/src/Carousel.d.ts +7 -7
- package/lib/carousel/src/Carousel.js +8 -3
- package/lib/carousel/src/CarouselArrow.d.ts +2 -2
- package/lib/carousel/src/CarouselContext.js +3 -1
- package/lib/carousel/src/CarouselDots.d.ts +2 -2
- package/lib/carousel/src/CarouselDots.js +7 -1
- package/lib/carousel/src/CarouselItem.d.ts +2 -2
- package/lib/cascader/src/Cascader.d.ts +3 -2
- package/lib/cascader/src/CascaderMenu.d.ts +1 -1
- package/lib/cascader/src/CascaderOption.d.ts +1 -1
- package/lib/cascader/src/CascaderSelectMenu.d.ts +2 -2
- package/lib/cascader/src/CascaderSubmenu.d.ts +1 -1
- package/lib/checkbox/src/Checkbox.d.ts +8 -8
- package/lib/checkbox/src/Checkbox.js +9 -2
- package/lib/checkbox/src/CheckboxGroup.d.ts +2 -2
- package/lib/checkbox/src/styles/index.cssr.js +9 -11
- package/lib/code/src/Code.d.ts +2 -2
- package/lib/collapse/src/Collapse.d.ts +2 -2
- package/lib/collapse/src/CollapseItem.d.ts +2 -2
- package/lib/collapse/src/CollapseItemContent.d.ts +1 -1
- package/lib/collapse-transition/src/CollapseTransition.d.ts +2 -2
- package/lib/color-picker/src/AlphaSlider.d.ts +1 -1
- package/lib/color-picker/src/ColorInput.d.ts +1 -1
- package/lib/color-picker/src/ColorInputUnit.d.ts +1 -1
- package/lib/color-picker/src/ColorPicker.d.ts +2 -2
- package/lib/color-picker/src/ColorPicker.js +6 -2
- package/lib/color-picker/src/ColorPickerSwatches.d.ts +1 -1
- package/lib/color-picker/src/ColorPickerSwatches.js +9 -4
- package/lib/color-picker/src/ColorPickerTrigger.d.ts +1 -1
- package/lib/color-picker/src/ColorPreview.d.ts +1 -1
- package/lib/color-picker/src/HueSlider.d.ts +1 -1
- package/lib/color-picker/src/Pallete.d.ts +1 -1
- package/lib/components.d.ts +3 -0
- package/lib/components.js +3 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +21 -8
- package/lib/config-provider/src/ConfigProvider.js +4 -2
- package/lib/config-provider/src/config.js +5 -5
- package/lib/config-provider/src/internal-interface.d.ts +5 -1
- package/lib/countdown/src/Countdown.d.ts +1 -1
- package/lib/data-table/index.d.ts +1 -1
- package/lib/data-table/src/DataTable.d.ts +5 -5
- package/lib/data-table/src/DataTable.js +1 -6
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/RenderFilter.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/RenderSorter.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/ResizeButton.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/ResizeButton.js +1 -0
- package/lib/data-table/src/HeaderButton/SortButton.d.ts +1 -1
- package/lib/data-table/src/MainTable.d.ts +1 -1
- package/lib/data-table/src/MainTable.js +1 -0
- package/lib/data-table/src/TableParts/Body.d.ts +5 -6
- package/lib/data-table/src/TableParts/Body.js +22 -15
- package/lib/data-table/src/TableParts/BodyCheckbox.d.ts +1 -1
- package/lib/data-table/src/TableParts/BodyRadio.d.ts +1 -1
- package/lib/data-table/src/TableParts/Cell.d.ts +1 -1
- package/lib/data-table/src/TableParts/Cell.js +9 -2
- package/lib/data-table/src/TableParts/ExpandTrigger.d.ts +1 -1
- package/lib/data-table/src/TableParts/ExpandTrigger.js +3 -1
- package/lib/data-table/src/TableParts/Header.d.ts +1 -3
- package/lib/data-table/src/TableParts/Header.js +6 -12
- package/lib/data-table/src/TableParts/SelectionMenu.d.ts +1 -1
- package/lib/data-table/src/interface.d.ts +3 -5
- package/lib/data-table/src/styles/index.cssr.js +2 -0
- package/lib/data-table/src/use-scroll.d.ts +1 -2
- package/lib/data-table/src/use-scroll.js +21 -13
- package/lib/date-picker/src/DatePicker.d.ts +2 -2
- package/lib/date-picker/src/panel/date.d.ts +4 -4
- package/lib/date-picker/src/panel/date.js +3 -1
- package/lib/date-picker/src/panel/daterange.d.ts +4 -4
- package/lib/date-picker/src/panel/daterange.js +10 -2
- package/lib/date-picker/src/panel/datetime.d.ts +4 -4
- package/lib/date-picker/src/panel/datetime.js +3 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +4 -4
- package/lib/date-picker/src/panel/datetimerange.js +16 -4
- package/lib/date-picker/src/panel/month.d.ts +4 -4
- package/lib/date-picker/src/panel/month.js +4 -1
- package/lib/date-picker/src/panel/monthrange.d.ts +4 -4
- package/lib/date-picker/src/panel/panelHeader.d.ts +722 -752
- package/lib/date-picker/src/panel/use-calendar.d.ts +3 -3
- package/lib/date-picker/src/panel/use-calendar.js +2 -2
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +3 -3
- package/lib/date-picker/src/panel/use-dual-calendar.js +4 -4
- package/lib/date-picker/src/styles/index.cssr.js +1 -0
- package/lib/date-picker/src/utils.js +1 -6
- package/lib/date-picker/styles/_common.js +1 -1
- package/lib/descriptions/src/Descriptions.d.ts +8 -2
- package/lib/descriptions/src/Descriptions.js +28 -8
- package/lib/descriptions/src/DescriptionsItem.d.ts +7 -1
- package/lib/descriptions/src/DescriptionsItem.js +2 -0
- package/lib/dialog/src/Dialog.d.ts +2 -2
- package/lib/dialog/src/Dialog.js +6 -2
- package/lib/dialog/src/DialogEnvironment.d.ts +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +4 -4
- package/lib/dialog/src/DialogProvider.js +3 -1
- package/lib/dialog/src/dialogProps.d.ts +1 -1
- package/lib/discrete/src/InjectionExtractor.d.ts +1 -1
- package/lib/divider/src/Divider.d.ts +2 -2
- package/lib/drawer/src/Drawer.d.ts +15 -2
- package/lib/drawer/src/Drawer.js +2 -2
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +9 -1
- package/lib/drawer/src/DrawerBodyWrapper.js +25 -1
- package/lib/drawer/src/DrawerContent.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +20 -2
- package/lib/dropdown/src/Dropdown.js +1 -1
- package/lib/dropdown/src/DropdownDivider.d.ts +1 -1
- package/lib/dropdown/src/DropdownGroup.d.ts +1 -1
- package/lib/dropdown/src/DropdownGroupHeader.d.ts +1 -1
- package/lib/dropdown/src/DropdownMenu.d.ts +1 -1
- package/lib/dropdown/src/DropdownMenu.js +4 -1
- package/lib/dropdown/src/DropdownOption.d.ts +6 -5
- package/lib/dropdown/src/DropdownOption.js +2 -4
- package/lib/dropdown/src/DropdownRenderOption.d.ts +1 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +5 -2
- package/lib/dynamic-input/src/DynamicInput.js +21 -9
- package/lib/dynamic-input/src/InputPreset.d.ts +1 -1
- package/lib/dynamic-input/src/PairPreset.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +8 -2
- package/lib/dynamic-tags/src/DynamicTags.js +6 -4
- package/lib/element/src/Element.d.ts +2 -2
- package/lib/ellipsis/index.d.ts +1 -0
- package/lib/ellipsis/index.js +3 -1
- package/lib/ellipsis/src/Ellipsis.d.ts +3 -1
- package/lib/ellipsis/src/Ellipsis.js +5 -2
- package/lib/ellipsis/src/PerformantEllipsis.d.ts +164 -0
- package/lib/ellipsis/src/PerformantEllipsis.js +81 -0
- package/lib/empty/src/Empty.d.ts +2 -2
- package/lib/equation/index.d.ts +1 -0
- package/lib/equation/src/Equation.d.ts +6 -4
- package/lib/form/src/Form.d.ts +2 -2
- package/lib/form/src/Form.js +3 -1
- package/lib/form/src/FormItem.d.ts +3 -3
- package/lib/form/src/FormItemCol.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- package/lib/form/src/FormItemRow.d.ts +1 -1
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/global-style/src/GlobalStyle.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +2 -2
- package/lib/grid/src/Grid.d.ts +2 -2
- package/lib/grid/src/Grid.js +6 -3
- package/lib/grid/src/GridItem.d.ts +1 -1
- package/lib/icon/src/Icon.d.ts +2 -2
- package/lib/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/lib/image/src/Image.d.ts +8 -2
- package/lib/image/src/ImageGroup.d.ts +8 -2
- package/lib/image/src/ImageGroup.js +8 -2
- package/lib/image/src/ImagePreview.d.ts +8 -3
- package/lib/image/src/ImagePreview.js +9 -0
- package/lib/image/src/icons.d.ts +1 -0
- package/lib/image/src/icons.js +3 -1
- package/lib/image/src/interface.d.ts +7 -5
- package/lib/image/src/interface.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/input/src/Input.d.ts +19 -9
- package/lib/input/src/Input.js +30 -8
- package/lib/input/src/InputGroup.d.ts +2 -2
- package/lib/input/src/InputGroupLabel.d.ts +2 -2
- package/lib/input/src/WordCount.d.ts +1 -1
- package/lib/input/src/styles/input.cssr.js +2 -1
- package/lib/input-number/src/InputNumber.d.ts +3 -2
- package/lib/input-number/src/InputNumber.js +2 -1
- package/lib/input-number/src/interface.d.ts +1 -0
- package/lib/layout/src/Layout.d.ts +10 -4
- package/lib/layout/src/Layout.js +8 -1
- package/lib/layout/src/LayoutContent.d.ts +4 -2
- package/lib/layout/src/LayoutFooter.d.ts +2 -2
- package/lib/layout/src/LayoutHeader.d.ts +2 -2
- package/lib/layout/src/LayoutSider.d.ts +11 -2
- package/lib/layout/src/LayoutSider.js +12 -3
- package/lib/layout/src/ToggleBar.d.ts +1 -1
- package/lib/layout/src/ToggleButton.d.ts +1 -1
- package/lib/legacy-grid/src/Col.d.ts +1 -1
- package/lib/legacy-grid/src/Row.d.ts +2 -2
- package/lib/legacy-grid/src/styles/index.cssr.js +2 -3
- package/lib/legacy-grid/src/styles/rtl.cssr.js +2 -3
- package/lib/legacy-transfer/src/Transfer.d.ts +2 -2
- package/lib/legacy-transfer/src/TransferFilter.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferHeader.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferList.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferListItem.d.ts +1 -1
- package/lib/list/src/List.d.ts +2 -2
- package/lib/list/src/ListItem.d.ts +1 -1
- package/lib/loading-bar/src/LoadingBar.d.ts +4 -2
- package/lib/loading-bar/src/LoadingBar.js +21 -12
- package/lib/loading-bar/src/LoadingBarProvider.d.ts +4 -1
- package/lib/loading-bar/src/LoadingBarProvider.js +2 -2
- package/lib/locales/common/arDZ.js +1 -0
- package/lib/locales/common/deDE.js +1 -0
- package/lib/locales/common/enGB.js +1 -0
- package/lib/locales/common/enUS.d.ts +1 -0
- package/lib/locales/common/enUS.js +1 -0
- package/lib/locales/common/eo.js +1 -0
- package/lib/locales/common/esAR.js +1 -0
- package/lib/locales/common/faIR.js +1 -0
- package/lib/locales/common/frFR.js +2 -1
- package/lib/locales/common/idID.js +1 -0
- package/lib/locales/common/itIT.js +1 -0
- package/lib/locales/common/jaJP.js +1 -0
- package/lib/locales/common/koKR.js +1 -0
- package/lib/locales/common/nbNO.js +1 -0
- package/lib/locales/common/nlNL.js +1 -0
- package/lib/locales/common/plPL.js +1 -0
- package/lib/locales/common/ptBR.js +15 -17
- package/lib/locales/common/ruRU.js +1 -0
- package/lib/locales/common/skSK.js +1 -0
- package/lib/locales/common/svSE.d.ts +3 -0
- package/lib/locales/common/svSE.js +123 -0
- package/lib/locales/common/thTH.js +1 -0
- package/lib/locales/common/trTR.js +1 -0
- package/lib/locales/common/ukUA.js +1 -0
- package/lib/locales/common/viVN.js +1 -0
- package/lib/locales/common/zhCN.js +1 -0
- package/lib/locales/common/zhTW.js +18 -17
- package/lib/locales/date/svSE.d.ts +3 -0
- package/lib/locales/date/svSE.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +6 -1
- package/lib/log/src/Log.d.ts +11 -11
- package/lib/log/src/Log.js +12 -12
- package/lib/log/src/LogLine.d.ts +1 -1
- package/lib/log/src/LogLoader.d.ts +1 -1
- package/lib/mention/src/Mention.d.ts +4 -4
- package/lib/mention/src/utils.js +4 -4
- package/lib/menu/src/Menu.d.ts +32 -15
- package/lib/menu/src/Menu.js +101 -7
- package/lib/menu/src/MenuDivider.d.ts +1 -1
- package/lib/menu/src/MenuOption.d.ts +1 -1
- package/lib/menu/src/MenuOptionContent.d.ts +4 -1
- package/lib/menu/src/MenuOptionContent.js +7 -2
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -1
- package/lib/menu/src/Submenu.d.ts +24 -13
- package/lib/menu/src/Submenu.js +9 -8
- package/lib/menu/src/context.d.ts +2 -2
- package/lib/menu/src/interface.d.ts +1 -0
- package/lib/menu/src/styles/index.cssr.js +8 -4
- package/lib/menu/src/use-menu-child.js +5 -5
- package/lib/message/src/Message.d.ts +2 -2
- package/lib/message/src/MessageEnvironment.d.ts +1 -1
- package/lib/message/src/MessageProvider.d.ts +9 -6
- package/lib/message/src/MessageProvider.js +3 -2
- package/lib/modal/src/BodyWrapper.d.ts +12 -4
- package/lib/modal/src/Modal.d.ts +18 -6
- package/lib/modal/src/presetProps.d.ts +5 -1
- package/lib/notification/src/Notification.d.ts +1 -1
- package/lib/notification/src/NotificationContainer.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.js +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +5 -2
- package/lib/notification/src/NotificationProvider.js +2 -2
- package/lib/number-animation/src/NumberAnimation.d.ts +1 -1
- package/lib/page-header/src/PageHeader.d.ts +2 -2
- package/lib/pagination/src/Pagination.d.ts +2 -2
- package/lib/pagination/src/Pagination.js +3 -1
- package/lib/popconfirm/src/Popconfirm.d.ts +22 -3
- package/lib/popconfirm/src/Popconfirm.js +13 -5
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +1 -1
- package/lib/popover/src/Popover.d.ts +25 -1
- package/lib/popover/src/Popover.js +10 -4
- package/lib/popover/src/PopoverBody.d.ts +23 -2
- package/lib/popover/src/PopoverBody.js +26 -10
- package/lib/popover/src/interface.d.ts +4 -1
- package/lib/popselect/src/Popselect.d.ts +19 -1
- package/lib/popselect/src/Popselect.js +2 -1
- package/lib/popselect/src/PopselectPanel.d.ts +2 -2
- package/lib/popselect/src/PopselectPanel.js +1 -0
- package/lib/progress/src/Circle.d.ts +1 -1
- package/lib/progress/src/Line.d.ts +1 -1
- package/lib/progress/src/Line.js +1 -3
- package/lib/progress/src/MultipleCircle.d.ts +1 -1
- package/lib/progress/src/Progress.d.ts +3 -3
- package/lib/qr-code/index.d.ts +2 -0
- package/lib/qr-code/index.js +9 -0
- package/lib/qr-code/src/QrCode.d.ts +154 -0
- package/lib/qr-code/src/QrCode.js +152 -0
- package/lib/qr-code/src/qrcodegen.d.ts +94 -0
- package/lib/qr-code/src/qrcodegen.js +949 -0
- package/lib/qr-code/src/styles/index.cssr.d.ts +2 -0
- package/lib/qr-code/src/styles/index.cssr.js +13 -0
- package/lib/qr-code/styles/dark.d.ts +3 -0
- package/lib/qr-code/styles/dark.js +13 -0
- package/lib/qr-code/styles/index.d.ts +3 -0
- package/lib/qr-code/styles/index.js +10 -0
- package/lib/qr-code/styles/light.d.ts +9 -0
- package/lib/qr-code/styles/light.js +14 -0
- package/lib/radio/src/Radio.d.ts +173 -34
- package/lib/radio/src/Radio.js +2 -2
- package/lib/radio/src/RadioButton.d.ts +3 -3
- package/lib/radio/src/RadioButton.js +2 -2
- package/lib/radio/src/RadioGroup.d.ts +3 -2
- package/lib/radio/src/RadioGroup.js +2 -1
- package/lib/radio/src/styles/radio-group.cssr.js +1 -0
- package/lib/radio/src/use-radio.d.ts +3 -3
- package/lib/radio/src/use-radio.js +2 -2
- package/lib/rate/src/Rate.d.ts +2 -2
- package/lib/result/src/Result.d.ts +3 -3
- package/lib/scrollbar/src/Scrollbar.d.ts +1 -1
- package/lib/scrollbar/src/Scrollbar.js +2 -0
- package/lib/select/src/Select.d.ts +7 -4
- package/lib/select/src/Select.js +17 -3
- package/lib/select/src/interface.d.ts +2 -0
- package/lib/skeleton/src/Skeleton.d.ts +2 -2
- package/lib/skeleton/src/Skeleton.js +3 -6
- package/lib/slider/src/Slider.d.ts +8 -2
- package/lib/slider/src/Slider.js +19 -4
- package/lib/slider/src/utils.d.ts +2 -2
- package/lib/slider/src/utils.js +5 -3
- package/lib/space/src/Space.d.ts +5 -2
- package/lib/space/src/Space.js +3 -3
- package/lib/spin/src/Spin.d.ts +13 -4
- package/lib/spin/src/Spin.js +25 -6
- package/lib/split/index.d.ts +2 -0
- package/lib/split/index.js +9 -0
- package/lib/split/src/Split.d.ts +135 -0
- package/lib/split/src/Split.js +151 -0
- package/lib/split/src/styles/index.cssr.d.ts +2 -0
- package/lib/split/src/styles/index.cssr.js +30 -0
- package/lib/split/styles/dark.d.ts +3 -0
- package/lib/split/styles/dark.js +8 -0
- package/lib/split/styles/index.d.ts +3 -0
- package/lib/split/styles/index.js +10 -0
- package/lib/split/styles/light.d.ts +9 -0
- package/lib/split/styles/light.js +17 -0
- package/lib/statistic/src/Statistic.d.ts +2 -2
- package/lib/steps/src/Step.d.ts +2 -2
- package/lib/steps/src/Steps.d.ts +3 -3
- package/lib/steps/src/styles/index.cssr.js +1 -0
- package/lib/switch/src/Switch.d.ts +2 -2
- package/lib/table/src/Table.d.ts +2 -2
- package/lib/table/src/Tbody.d.ts +1 -1
- package/lib/table/src/Td.d.ts +1 -1
- package/lib/table/src/Th.d.ts +1 -1
- package/lib/table/src/Thead.d.ts +1 -1
- package/lib/table/src/Tr.d.ts +1 -1
- package/lib/tabs/src/Tab.d.ts +1 -1
- package/lib/tabs/src/Tab.js +3 -1
- package/lib/tabs/src/TabPane.d.ts +1 -1
- package/lib/tabs/src/Tabs.d.ts +13 -13
- package/lib/tabs/src/Tabs.js +15 -2
- package/lib/tabs/src/styles/index.cssr.js +12 -2
- package/lib/tag/src/Tag.d.ts +2 -2
- package/lib/theme-editor/src/MaximizeIcon.d.ts +1 -1
- package/lib/theme-editor/src/MinimizeIcon.d.ts +1 -1
- package/lib/theme-editor/src/ThemeEditor.d.ts +3 -3
- package/lib/themes/dark.js +56 -52
- package/lib/themes/light.js +56 -52
- package/lib/thing/src/Thing.d.ts +7 -1
- package/lib/thing/src/Thing.js +13 -4
- package/lib/time/src/Time.d.ts +1 -1
- package/lib/time/src/Time.js +1 -1
- package/lib/time-picker/src/Panel.d.ts +1 -1
- package/lib/time-picker/src/PanelCol.d.ts +1 -1
- package/lib/time-picker/src/PanelCol.js +5 -1
- package/lib/time-picker/src/TimePicker.d.ts +2 -2
- package/lib/time-picker/src/TimePicker.js +1 -1
- package/lib/timeline/src/Timeline.d.ts +1 -1
- package/lib/timeline/src/TimelineItem.d.ts +1 -1
- package/lib/tooltip/src/Tooltip.d.ts +19 -1
- package/lib/transfer/src/Transfer.d.ts +8 -2
- package/lib/transfer/src/Transfer.js +2 -2
- package/lib/transfer/src/TransferFilter.d.ts +1 -1
- package/lib/transfer/src/TransferHeader.d.ts +5 -1
- package/lib/transfer/src/TransferHeader.js +6 -2
- package/lib/transfer/src/TransferList.d.ts +1 -1
- package/lib/transfer/src/TransferListItem.d.ts +1 -1
- package/lib/tree/index.d.ts +1 -0
- package/lib/tree/index.js +3 -1
- package/lib/tree/src/MotionWrapper.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +59 -5
- package/lib/tree/src/Tree.js +31 -18
- package/lib/tree/src/TreeNode.d.ts +6 -2
- package/lib/tree/src/TreeNode.js +72 -25
- package/lib/tree/src/TreeNodeCheckbox.d.ts +13 -1
- package/lib/tree/src/TreeNodeCheckbox.js +9 -8
- package/lib/tree/src/TreeNodeContent.d.ts +1 -1
- package/lib/tree/src/TreeNodeSwitcher.d.ts +19 -2
- package/lib/tree/src/TreeNodeSwitcher.js +12 -6
- package/lib/tree/src/interface.d.ts +2 -0
- package/lib/tree/src/styles/index.cssr.js +47 -51
- package/lib/tree/src/utils.d.ts +1 -0
- package/lib/tree/src/utils.js +15 -1
- package/lib/tree/styles/light.d.ts +8 -0
- package/lib/tree/styles/light.js +6 -2
- package/lib/tree-select/src/TreeSelect.d.ts +49 -3
- package/lib/tree-select/src/TreeSelect.js +5 -3
- package/lib/tree-select/src/interface.d.ts +2 -0
- package/lib/tree-select/styles/light.d.ts +4 -0
- package/lib/typography/src/a.d.ts +2 -2
- package/lib/typography/src/blockquote.d.ts +2 -2
- package/lib/typography/src/create-header.d.ts +2 -2
- package/lib/typography/src/headers.d.ts +12 -12
- package/lib/typography/src/hr.d.ts +2 -2
- package/lib/typography/src/li.d.ts +1 -1
- package/lib/typography/src/ol.d.ts +2 -2
- package/lib/typography/src/p.d.ts +2 -2
- package/lib/typography/src/text.d.ts +2 -2
- package/lib/typography/src/ul.d.ts +2 -2
- package/lib/upload/src/Upload.d.ts +11 -5
- package/lib/upload/src/Upload.js +8 -3
- package/lib/upload/src/UploadDragger.d.ts +1 -1
- package/lib/upload/src/UploadFile.d.ts +2 -2
- package/lib/upload/src/UploadFileList.d.ts +1 -1
- package/lib/upload/src/UploadFileList.js +3 -2
- package/lib/upload/src/UploadProgress.d.ts +1 -1
- package/lib/upload/src/UploadTrigger.d.ts +1 -1
- package/lib/upload/src/UploadTrigger.js +3 -2
- package/lib/upload/src/interface.d.ts +5 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/index.d.ts +2 -0
- package/lib/virtual-list/index.js +9 -0
- package/lib/virtual-list/src/VirtualList.d.ts +146 -0
- package/lib/virtual-list/src/VirtualList.js +105 -0
- package/lib/watermark/src/Watermark.d.ts +1 -1
- package/lib/watermark/src/Watermark.js +7 -0
- package/package.json +69 -69
- package/volar.d.ts +5 -0
- package/web-types.json +917 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pxfy } from 'seemly';
|
|
1
|
+
import { pxfy, repeat } from 'seemly';
|
|
2
2
|
import { computed, defineComponent, h, Fragment, mergeProps } from 'vue';
|
|
3
3
|
import { useConfig, useTheme } from '../../_mixins';
|
|
4
4
|
import { createKey, useHoudini } from '../../_utils';
|
|
@@ -60,7 +60,7 @@ export default defineComponent({
|
|
|
60
60
|
};
|
|
61
61
|
},
|
|
62
62
|
render() {
|
|
63
|
-
const { repeat, style, mergedClsPrefix, $attrs } = this;
|
|
63
|
+
const { repeat: repeatProp, style, mergedClsPrefix, $attrs } = this;
|
|
64
64
|
// BUG:
|
|
65
65
|
// Chrome devtools can't read the element
|
|
66
66
|
// Maybe it's a bug of chrome
|
|
@@ -68,11 +68,8 @@ export default defineComponent({
|
|
|
68
68
|
class: `${mergedClsPrefix}-skeleton`,
|
|
69
69
|
style
|
|
70
70
|
}, $attrs));
|
|
71
|
-
if (
|
|
72
|
-
return
|
|
73
|
-
child,
|
|
74
|
-
'\n'
|
|
75
|
-
])));
|
|
71
|
+
if (repeatProp > 1) {
|
|
72
|
+
return h(Fragment, null, repeat(repeatProp, null).map((_) => [child, '\n']));
|
|
76
73
|
}
|
|
77
74
|
return child;
|
|
78
75
|
}
|
|
@@ -52,6 +52,8 @@ export declare const sliderProps: {
|
|
|
52
52
|
readonly reverse: BooleanConstructor;
|
|
53
53
|
readonly 'onUpdate:value': PropType<MaybeArray<(value: number & number[]) => void>>;
|
|
54
54
|
readonly onUpdateValue: PropType<MaybeArray<(value: number & number[]) => void>>;
|
|
55
|
+
readonly onDragstart: PropType<() => void>;
|
|
56
|
+
readonly onDragend: PropType<() => void>;
|
|
55
57
|
readonly theme: PropType<import("../../_mixins").Theme<"Slider", {
|
|
56
58
|
fontSize: string;
|
|
57
59
|
markFontSize: string;
|
|
@@ -190,6 +192,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
190
192
|
readonly reverse: BooleanConstructor;
|
|
191
193
|
readonly 'onUpdate:value': PropType<MaybeArray<(value: number & number[]) => void>>;
|
|
192
194
|
readonly onUpdateValue: PropType<MaybeArray<(value: number & number[]) => void>>;
|
|
195
|
+
readonly onDragstart: PropType<() => void>;
|
|
196
|
+
readonly onDragend: PropType<() => void>;
|
|
193
197
|
readonly theme: PropType<import("../../_mixins").Theme<"Slider", {
|
|
194
198
|
fontSize: string;
|
|
195
199
|
markFontSize: string;
|
|
@@ -281,7 +285,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
281
285
|
dotBorderRadius: string;
|
|
282
286
|
}, any>>>;
|
|
283
287
|
}, {
|
|
284
|
-
mergedClsPrefix: import("vue").
|
|
288
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
285
289
|
namespace: import("vue").ComputedRef<string | undefined>;
|
|
286
290
|
uncontrolledValue: import("vue").Ref<number | number[]>;
|
|
287
291
|
mergedValue: import("vue").ComputedRef<number | number[]>;
|
|
@@ -403,6 +407,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
403
407
|
readonly reverse: BooleanConstructor;
|
|
404
408
|
readonly 'onUpdate:value': PropType<MaybeArray<(value: number & number[]) => void>>;
|
|
405
409
|
readonly onUpdateValue: PropType<MaybeArray<(value: number & number[]) => void>>;
|
|
410
|
+
readonly onDragstart: PropType<() => void>;
|
|
411
|
+
readonly onDragend: PropType<() => void>;
|
|
406
412
|
readonly theme: PropType<import("../../_mixins").Theme<"Slider", {
|
|
407
413
|
fontSize: string;
|
|
408
414
|
markFontSize: string;
|
|
@@ -506,5 +512,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
506
512
|
readonly defaultValue: number | number[];
|
|
507
513
|
readonly keyboard: boolean;
|
|
508
514
|
readonly showTooltip: boolean | undefined;
|
|
509
|
-
}>;
|
|
515
|
+
}, {}>;
|
|
510
516
|
export default _default;
|
package/es/slider/src/Slider.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/space-before-function-paren */
|
|
1
2
|
import { h, ref, toRef, computed, watch, nextTick, defineComponent, Transition, onBeforeUnmount } from 'vue';
|
|
2
3
|
import { VBinder, VTarget, VFollower } from 'vueuc';
|
|
3
4
|
import { useIsMounted, useMergedState } from 'vooks';
|
|
@@ -33,7 +34,7 @@ export const sliderProps = Object.assign(Object.assign({}, useTheme.props), { to
|
|
|
33
34
|
}, tooltip: {
|
|
34
35
|
type: Boolean,
|
|
35
36
|
default: true
|
|
36
|
-
}, vertical: Boolean, reverse: Boolean, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array] });
|
|
37
|
+
}, vertical: Boolean, reverse: Boolean, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array], onDragstart: [Function], onDragend: [Function] });
|
|
37
38
|
export default defineComponent({
|
|
38
39
|
name: 'Slider',
|
|
39
40
|
props: sliderProps,
|
|
@@ -158,11 +159,11 @@ export default defineComponent({
|
|
|
158
159
|
var _a;
|
|
159
160
|
if (~index) {
|
|
160
161
|
activeIndexRef.value = index;
|
|
161
|
-
(_a = handleRefs.
|
|
162
|
+
(_a = handleRefs.get(index)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
function syncPosition() {
|
|
165
|
-
followerRefs.
|
|
166
|
+
followerRefs.forEach((inst, index) => {
|
|
166
167
|
if (isShowTooltip(index))
|
|
167
168
|
inst.syncPosition();
|
|
168
169
|
});
|
|
@@ -359,6 +360,8 @@ export default defineComponent({
|
|
|
359
360
|
function startDragging() {
|
|
360
361
|
if (!draggingRef.value) {
|
|
361
362
|
draggingRef.value = true;
|
|
363
|
+
if (props.onDragstart)
|
|
364
|
+
call(props.onDragstart);
|
|
362
365
|
on('touchend', document, handleMouseUp);
|
|
363
366
|
on('mouseup', document, handleMouseUp);
|
|
364
367
|
on('touchmove', document, handleMouseMove);
|
|
@@ -368,6 +371,8 @@ export default defineComponent({
|
|
|
368
371
|
function stopDragging() {
|
|
369
372
|
if (draggingRef.value) {
|
|
370
373
|
draggingRef.value = false;
|
|
374
|
+
if (props.onDragend)
|
|
375
|
+
call(props.onDragend);
|
|
371
376
|
off('touchend', document, handleMouseUp);
|
|
372
377
|
off('mouseup', document, handleMouseUp);
|
|
373
378
|
off('touchmove', document, handleMouseMove);
|
|
@@ -381,6 +386,8 @@ export default defineComponent({
|
|
|
381
386
|
return;
|
|
382
387
|
}
|
|
383
388
|
const pointValue = getPointValue(event);
|
|
389
|
+
if (pointValue === undefined)
|
|
390
|
+
return;
|
|
384
391
|
doDispatchValue(sanitizeValue(pointValue, arrifiedValueRef.value[activeIndex]), activeIndex);
|
|
385
392
|
}
|
|
386
393
|
function handleMouseUp() {
|
|
@@ -538,7 +545,15 @@ export default defineComponent({
|
|
|
538
545
|
return (h(VBinder, null, {
|
|
539
546
|
default: () => [
|
|
540
547
|
h(VTarget, null, {
|
|
541
|
-
default: () => (h("div", { ref: this.setHandleRefs(index), class: `${mergedClsPrefix}-slider-handle-wrapper`, tabindex: this.mergedDisabled ? -1 : 0, style: this.getHandleStyle(value, index), onFocus: () => {
|
|
548
|
+
default: () => (h("div", { ref: this.setHandleRefs(index), class: `${mergedClsPrefix}-slider-handle-wrapper`, tabindex: this.mergedDisabled ? -1 : 0, style: this.getHandleStyle(value, index), onFocus: () => {
|
|
549
|
+
this.handleHandleFocus(index);
|
|
550
|
+
}, onBlur: () => {
|
|
551
|
+
this.handleHandleBlur(index);
|
|
552
|
+
}, onMouseenter: () => {
|
|
553
|
+
this.handleHandleMouseEnter(index);
|
|
554
|
+
}, onMouseleave: () => {
|
|
555
|
+
this.handleHandleMouseLeave(index);
|
|
556
|
+
} }, resolveSlot(this.$slots.thumb, () => [
|
|
542
557
|
h("div", { class: `${mergedClsPrefix}-slider-handle` })
|
|
543
558
|
])))
|
|
544
559
|
}),
|
package/es/slider/src/utils.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentPublicInstance } from 'vue';
|
|
2
2
|
export declare function isTouchEvent(e: MouseEvent | TouchEvent): e is TouchEvent;
|
|
3
3
|
type RefType = HTMLElement | ComponentPublicInstance;
|
|
4
4
|
type RefKey = number;
|
|
5
5
|
type RefsValue<T extends RefType> = Map<RefKey, T>;
|
|
6
6
|
export declare function useRefs<T extends RefType>(): [
|
|
7
|
-
|
|
7
|
+
RefsValue<T>,
|
|
8
8
|
(key: RefKey) => (el: any) => void
|
|
9
9
|
];
|
|
10
10
|
export {};
|
package/es/slider/src/utils.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { onBeforeUpdate } from 'vue';
|
|
2
2
|
export function isTouchEvent(e) {
|
|
3
3
|
return window.TouchEvent && e instanceof window.TouchEvent;
|
|
4
4
|
}
|
|
5
5
|
export function useRefs() {
|
|
6
|
-
const refs =
|
|
6
|
+
const refs = new Map();
|
|
7
7
|
const setRefs = (index) => (el) => {
|
|
8
|
-
refs.
|
|
8
|
+
refs.set(index, el);
|
|
9
9
|
};
|
|
10
|
-
onBeforeUpdate(() => {
|
|
10
|
+
onBeforeUpdate(() => {
|
|
11
|
+
refs.clear();
|
|
12
|
+
});
|
|
11
13
|
return [refs, setRefs];
|
|
12
14
|
}
|
package/es/space/src/Space.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare const spaceProps: {
|
|
|
18
18
|
readonly type: BooleanConstructor;
|
|
19
19
|
readonly default: true;
|
|
20
20
|
};
|
|
21
|
+
readonly itemClass: StringConstructor;
|
|
21
22
|
readonly itemStyle: PropType<string | CSSProperties>;
|
|
22
23
|
readonly wrap: {
|
|
23
24
|
readonly type: BooleanConstructor;
|
|
@@ -60,6 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
61
|
readonly type: BooleanConstructor;
|
|
61
62
|
readonly default: true;
|
|
62
63
|
};
|
|
64
|
+
readonly itemClass: StringConstructor;
|
|
63
65
|
readonly itemStyle: PropType<string | CSSProperties>;
|
|
64
66
|
readonly wrap: {
|
|
65
67
|
readonly type: BooleanConstructor;
|
|
@@ -87,7 +89,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
89
|
}, {
|
|
88
90
|
useGap: boolean;
|
|
89
91
|
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
90
|
-
mergedClsPrefix: import("vue").
|
|
92
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
91
93
|
margin: import("vue").ComputedRef<{
|
|
92
94
|
horizontal: number;
|
|
93
95
|
vertical: number;
|
|
@@ -108,6 +110,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
108
110
|
readonly type: BooleanConstructor;
|
|
109
111
|
readonly default: true;
|
|
110
112
|
};
|
|
113
|
+
readonly itemClass: StringConstructor;
|
|
111
114
|
readonly itemStyle: PropType<string | CSSProperties>;
|
|
112
115
|
readonly wrap: {
|
|
113
116
|
readonly type: BooleanConstructor;
|
|
@@ -140,5 +143,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
140
143
|
readonly justify: Justify;
|
|
141
144
|
readonly wrapItem: boolean;
|
|
142
145
|
readonly internalUseGap: boolean;
|
|
143
|
-
}>;
|
|
146
|
+
}, {}>;
|
|
144
147
|
export default _default;
|
package/es/space/src/Space.js
CHANGED
|
@@ -14,7 +14,7 @@ export const spaceProps = Object.assign(Object.assign({}, useTheme.props), { ali
|
|
|
14
14
|
}, wrapItem: {
|
|
15
15
|
type: Boolean,
|
|
16
16
|
default: true
|
|
17
|
-
}, itemStyle: [String, Object], wrap: {
|
|
17
|
+
}, itemClass: String, itemStyle: [String, Object], wrap: {
|
|
18
18
|
type: Boolean,
|
|
19
19
|
default: true
|
|
20
20
|
},
|
|
@@ -58,7 +58,7 @@ export default defineComponent({
|
|
|
58
58
|
};
|
|
59
59
|
},
|
|
60
60
|
render() {
|
|
61
|
-
const { vertical, align, inline, justify, itemStyle, margin, wrap, mergedClsPrefix, rtlEnabled, useGap, wrapItem, internalUseGap } = this;
|
|
61
|
+
const { vertical, align, inline, justify, itemClass, itemStyle, margin, wrap, mergedClsPrefix, rtlEnabled, useGap, wrapItem, internalUseGap } = this;
|
|
62
62
|
const children = flatten(getSlot(this));
|
|
63
63
|
if (!children.length)
|
|
64
64
|
return null;
|
|
@@ -84,7 +84,7 @@ export default defineComponent({
|
|
|
84
84
|
gap: useGap ? `${margin.vertical}px ${margin.horizontal}px` : ''
|
|
85
85
|
} }, !wrapItem && (useGap || internalUseGap)
|
|
86
86
|
? children
|
|
87
|
-
: children.map((child, index) => (h("div", { role: "none", style: [
|
|
87
|
+
: children.map((child, index) => (h("div", { role: "none", class: itemClass, style: [
|
|
88
88
|
itemStyle,
|
|
89
89
|
{
|
|
90
90
|
maxWidth: '100%'
|
package/es/spin/src/Spin.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { type PropType } from 'vue';
|
|
1
|
+
import { type PropType, type CSSProperties } from 'vue';
|
|
2
2
|
import { type ExtractPublicPropTypes } from '../../_utils';
|
|
3
3
|
export declare const spinProps: {
|
|
4
|
+
contentClass: StringConstructor;
|
|
5
|
+
contentStyle: PropType<string | CSSProperties>;
|
|
4
6
|
description: StringConstructor;
|
|
5
7
|
stroke: StringConstructor;
|
|
6
8
|
size: {
|
|
@@ -21,6 +23,7 @@ export declare const spinProps: {
|
|
|
21
23
|
validator: () => boolean;
|
|
22
24
|
default: undefined;
|
|
23
25
|
};
|
|
26
|
+
delay: NumberConstructor;
|
|
24
27
|
theme: PropType<import("../../_mixins").Theme<"Spin", {
|
|
25
28
|
fontSize: string;
|
|
26
29
|
textColor: string;
|
|
@@ -57,6 +60,8 @@ export declare const spinProps: {
|
|
|
57
60
|
};
|
|
58
61
|
export type SpinProps = ExtractPublicPropTypes<typeof spinProps>;
|
|
59
62
|
declare const _default: import("vue").DefineComponent<{
|
|
63
|
+
contentClass: StringConstructor;
|
|
64
|
+
contentStyle: PropType<string | CSSProperties>;
|
|
60
65
|
description: StringConstructor;
|
|
61
66
|
stroke: StringConstructor;
|
|
62
67
|
size: {
|
|
@@ -77,6 +82,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
77
82
|
validator: () => boolean;
|
|
78
83
|
default: undefined;
|
|
79
84
|
};
|
|
85
|
+
delay: NumberConstructor;
|
|
80
86
|
theme: PropType<import("../../_mixins").Theme<"Spin", {
|
|
81
87
|
fontSize: string;
|
|
82
88
|
textColor: string;
|
|
@@ -111,8 +117,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
111
117
|
opacitySpinning: string;
|
|
112
118
|
}, any>>>;
|
|
113
119
|
}, {
|
|
114
|
-
mergedClsPrefix: import("vue").
|
|
115
|
-
|
|
120
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
121
|
+
active: import("vue").Ref<boolean>;
|
|
116
122
|
mergedStrokeWidth: import("vue").ComputedRef<number>;
|
|
117
123
|
cssVars: import("vue").ComputedRef<{
|
|
118
124
|
'--n-bezier': string;
|
|
@@ -124,6 +130,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
124
130
|
themeClass: import("vue").Ref<string> | undefined;
|
|
125
131
|
onRender: (() => void) | undefined;
|
|
126
132
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
133
|
+
contentClass: StringConstructor;
|
|
134
|
+
contentStyle: PropType<string | CSSProperties>;
|
|
127
135
|
description: StringConstructor;
|
|
128
136
|
stroke: StringConstructor;
|
|
129
137
|
size: {
|
|
@@ -144,6 +152,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
144
152
|
validator: () => boolean;
|
|
145
153
|
default: undefined;
|
|
146
154
|
};
|
|
155
|
+
delay: NumberConstructor;
|
|
147
156
|
theme: PropType<import("../../_mixins").Theme<"Spin", {
|
|
148
157
|
fontSize: string;
|
|
149
158
|
textColor: string;
|
|
@@ -182,5 +191,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
182
191
|
show: boolean;
|
|
183
192
|
rotate: boolean;
|
|
184
193
|
spinning: boolean;
|
|
185
|
-
}>;
|
|
194
|
+
}, {}>;
|
|
186
195
|
export default _default;
|
package/es/spin/src/Spin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, defineComponent, h, Transition, watchEffect } from 'vue';
|
|
1
|
+
import { computed, defineComponent, h, Transition, ref, watchEffect } from 'vue';
|
|
2
2
|
import { useCompitable } from 'vooks';
|
|
3
3
|
import { pxfy } from 'seemly';
|
|
4
4
|
import { NBaseLoading } from '../../_internal';
|
|
@@ -11,7 +11,7 @@ const STROKE_WIDTH = {
|
|
|
11
11
|
medium: 18,
|
|
12
12
|
large: 16
|
|
13
13
|
};
|
|
14
|
-
export const spinProps = Object.assign(Object.assign({}, useTheme.props), { description: String, stroke: String, size: {
|
|
14
|
+
export const spinProps = Object.assign(Object.assign({}, useTheme.props), { contentClass: String, contentStyle: [Object, String], description: String, stroke: String, size: {
|
|
15
15
|
type: [String, Number],
|
|
16
16
|
default: 'medium'
|
|
17
17
|
}, show: {
|
|
@@ -26,7 +26,7 @@ export const spinProps = Object.assign(Object.assign({}, useTheme.props), { desc
|
|
|
26
26
|
return true;
|
|
27
27
|
},
|
|
28
28
|
default: undefined
|
|
29
|
-
} });
|
|
29
|
+
}, delay: Number });
|
|
30
30
|
export default defineComponent({
|
|
31
31
|
name: 'Spin',
|
|
32
32
|
props: spinProps,
|
|
@@ -61,9 +61,27 @@ export default defineComponent({
|
|
|
61
61
|
return typeof size === 'number' ? String(size) : size[0];
|
|
62
62
|
}), cssVarsRef, props)
|
|
63
63
|
: undefined;
|
|
64
|
+
const compitableShow = useCompitable(props, ['spinning', 'show']);
|
|
65
|
+
const activeRef = ref(false);
|
|
66
|
+
watchEffect((onCleanup) => {
|
|
67
|
+
let timerId;
|
|
68
|
+
if (compitableShow.value) {
|
|
69
|
+
const { delay } = props;
|
|
70
|
+
if (delay) {
|
|
71
|
+
timerId = window.setTimeout(() => {
|
|
72
|
+
activeRef.value = true;
|
|
73
|
+
}, delay);
|
|
74
|
+
onCleanup(() => {
|
|
75
|
+
clearTimeout(timerId);
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
activeRef.value = compitableShow.value;
|
|
81
|
+
});
|
|
64
82
|
return {
|
|
65
83
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
66
|
-
|
|
84
|
+
active: activeRef,
|
|
67
85
|
mergedStrokeWidth: computed(() => {
|
|
68
86
|
const { strokeWidth } = props;
|
|
69
87
|
if (strokeWidth !== undefined)
|
|
@@ -93,10 +111,11 @@ export default defineComponent({
|
|
|
93
111
|
return $slots.default ? (h("div", { class: [`${mergedClsPrefix}-spin-container`, this.themeClass], style: this.cssVars },
|
|
94
112
|
h("div", { class: [
|
|
95
113
|
`${mergedClsPrefix}-spin-content`,
|
|
96
|
-
this.
|
|
97
|
-
|
|
114
|
+
this.active && `${mergedClsPrefix}-spin-content--spinning`,
|
|
115
|
+
this.contentClass
|
|
116
|
+
], style: this.contentStyle }, $slots),
|
|
98
117
|
h(Transition, { name: "fade-in-transition" }, {
|
|
99
|
-
default: () => (this.
|
|
118
|
+
default: () => (this.active ? icon : null)
|
|
100
119
|
}))) : (icon);
|
|
101
120
|
}
|
|
102
121
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NSplit, splitProps } from './src/Split';
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
export declare const splitProps: {
|
|
4
|
+
readonly direction: {
|
|
5
|
+
readonly type: PropType<"horizontal" | "vertical">;
|
|
6
|
+
readonly default: "horizontal";
|
|
7
|
+
};
|
|
8
|
+
readonly resizeTriggerSize: {
|
|
9
|
+
readonly type: NumberConstructor;
|
|
10
|
+
readonly default: 3;
|
|
11
|
+
};
|
|
12
|
+
readonly disabled: BooleanConstructor;
|
|
13
|
+
readonly defaultSize: {
|
|
14
|
+
readonly type: NumberConstructor;
|
|
15
|
+
readonly default: 0.5;
|
|
16
|
+
};
|
|
17
|
+
readonly min: {
|
|
18
|
+
readonly type: NumberConstructor;
|
|
19
|
+
readonly default: 0;
|
|
20
|
+
};
|
|
21
|
+
readonly max: {
|
|
22
|
+
readonly type: NumberConstructor;
|
|
23
|
+
readonly default: 1;
|
|
24
|
+
};
|
|
25
|
+
readonly onDragStart: PropType<(e: Event) => void>;
|
|
26
|
+
readonly onDragMove: PropType<(e: Event) => void>;
|
|
27
|
+
readonly onDragEnd: PropType<(e: Event) => void>;
|
|
28
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Split", {
|
|
29
|
+
resizableTriggerColorHover: string;
|
|
30
|
+
}, any>>;
|
|
31
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Split", {
|
|
32
|
+
resizableTriggerColorHover: string;
|
|
33
|
+
}, any>>>;
|
|
34
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Split", {
|
|
35
|
+
resizableTriggerColorHover: string;
|
|
36
|
+
}, any>>>;
|
|
37
|
+
};
|
|
38
|
+
export type SplitProps = ExtractPublicPropTypes<typeof splitProps>;
|
|
39
|
+
declare const _default: import("vue").DefineComponent<{
|
|
40
|
+
readonly direction: {
|
|
41
|
+
readonly type: PropType<"horizontal" | "vertical">;
|
|
42
|
+
readonly default: "horizontal";
|
|
43
|
+
};
|
|
44
|
+
readonly resizeTriggerSize: {
|
|
45
|
+
readonly type: NumberConstructor;
|
|
46
|
+
readonly default: 3;
|
|
47
|
+
};
|
|
48
|
+
readonly disabled: BooleanConstructor;
|
|
49
|
+
readonly defaultSize: {
|
|
50
|
+
readonly type: NumberConstructor;
|
|
51
|
+
readonly default: 0.5;
|
|
52
|
+
};
|
|
53
|
+
readonly min: {
|
|
54
|
+
readonly type: NumberConstructor;
|
|
55
|
+
readonly default: 0;
|
|
56
|
+
};
|
|
57
|
+
readonly max: {
|
|
58
|
+
readonly type: NumberConstructor;
|
|
59
|
+
readonly default: 1;
|
|
60
|
+
};
|
|
61
|
+
readonly onDragStart: PropType<(e: Event) => void>;
|
|
62
|
+
readonly onDragMove: PropType<(e: Event) => void>;
|
|
63
|
+
readonly onDragEnd: PropType<(e: Event) => void>;
|
|
64
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Split", {
|
|
65
|
+
resizableTriggerColorHover: string;
|
|
66
|
+
}, any>>;
|
|
67
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Split", {
|
|
68
|
+
resizableTriggerColorHover: string;
|
|
69
|
+
}, any>>>;
|
|
70
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Split", {
|
|
71
|
+
resizableTriggerColorHover: string;
|
|
72
|
+
}, any>>>;
|
|
73
|
+
}, {
|
|
74
|
+
cssVars: import("vue").ComputedRef<{
|
|
75
|
+
'--n-resize-trigger-color-hover': string;
|
|
76
|
+
}> | undefined;
|
|
77
|
+
resizeTriggerElRef: import("vue").Ref<HTMLElement | null>;
|
|
78
|
+
isDragging: import("vue").Ref<boolean>;
|
|
79
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
80
|
+
resizeTriggerWrapperStyle: import("vue").ComputedRef<{
|
|
81
|
+
width: string;
|
|
82
|
+
height: string;
|
|
83
|
+
cursor: string;
|
|
84
|
+
}>;
|
|
85
|
+
resizeTriggerStyle: import("vue").ComputedRef<{
|
|
86
|
+
width: string;
|
|
87
|
+
height: string;
|
|
88
|
+
}>;
|
|
89
|
+
handleMouseDown: (e: MouseEvent) => void;
|
|
90
|
+
firstPaneStyle: import("vue").ComputedRef<{
|
|
91
|
+
flex: string;
|
|
92
|
+
}>;
|
|
93
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
94
|
+
readonly direction: {
|
|
95
|
+
readonly type: PropType<"horizontal" | "vertical">;
|
|
96
|
+
readonly default: "horizontal";
|
|
97
|
+
};
|
|
98
|
+
readonly resizeTriggerSize: {
|
|
99
|
+
readonly type: NumberConstructor;
|
|
100
|
+
readonly default: 3;
|
|
101
|
+
};
|
|
102
|
+
readonly disabled: BooleanConstructor;
|
|
103
|
+
readonly defaultSize: {
|
|
104
|
+
readonly type: NumberConstructor;
|
|
105
|
+
readonly default: 0.5;
|
|
106
|
+
};
|
|
107
|
+
readonly min: {
|
|
108
|
+
readonly type: NumberConstructor;
|
|
109
|
+
readonly default: 0;
|
|
110
|
+
};
|
|
111
|
+
readonly max: {
|
|
112
|
+
readonly type: NumberConstructor;
|
|
113
|
+
readonly default: 1;
|
|
114
|
+
};
|
|
115
|
+
readonly onDragStart: PropType<(e: Event) => void>;
|
|
116
|
+
readonly onDragMove: PropType<(e: Event) => void>;
|
|
117
|
+
readonly onDragEnd: PropType<(e: Event) => void>;
|
|
118
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Split", {
|
|
119
|
+
resizableTriggerColorHover: string;
|
|
120
|
+
}, any>>;
|
|
121
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Split", {
|
|
122
|
+
resizableTriggerColorHover: string;
|
|
123
|
+
}, any>>>;
|
|
124
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Split", {
|
|
125
|
+
resizableTriggerColorHover: string;
|
|
126
|
+
}, any>>>;
|
|
127
|
+
}>>, {
|
|
128
|
+
readonly direction: "horizontal" | "vertical";
|
|
129
|
+
readonly disabled: boolean;
|
|
130
|
+
readonly max: number;
|
|
131
|
+
readonly min: number;
|
|
132
|
+
readonly defaultSize: number;
|
|
133
|
+
readonly resizeTriggerSize: number;
|
|
134
|
+
}, {}>;
|
|
135
|
+
export default _default;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { h, defineComponent, ref, computed } from 'vue';
|
|
2
|
+
import { resolveSlot } from '../../_utils';
|
|
3
|
+
import useConfig from '../../_mixins/use-config';
|
|
4
|
+
import style from './styles/index.cssr';
|
|
5
|
+
import { useTheme } from '../../_mixins';
|
|
6
|
+
import { splitLight } from '../styles';
|
|
7
|
+
import { off, on } from 'evtd';
|
|
8
|
+
export const splitProps = Object.assign(Object.assign({}, useTheme.props), { direction: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: 'horizontal'
|
|
11
|
+
}, resizeTriggerSize: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 3
|
|
14
|
+
}, disabled: Boolean, defaultSize: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 0.5
|
|
17
|
+
}, min: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 0
|
|
20
|
+
}, max: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 1
|
|
23
|
+
}, onDragStart: Function, onDragMove: Function, onDragEnd: Function });
|
|
24
|
+
export default defineComponent({
|
|
25
|
+
name: 'Split',
|
|
26
|
+
props: splitProps,
|
|
27
|
+
setup(props) {
|
|
28
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
29
|
+
const themeRef = useTheme('Split', '-split', style, splitLight, props, mergedClsPrefixRef);
|
|
30
|
+
const cssVarsRef = computed(() => {
|
|
31
|
+
const { self: { resizableTriggerColorHover } } = themeRef.value;
|
|
32
|
+
return {
|
|
33
|
+
'--n-resize-trigger-color-hover': resizableTriggerColorHover
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
const resizeTriggerElRef = ref(null);
|
|
37
|
+
const isDraggingRef = ref(false);
|
|
38
|
+
const currentSize = ref(props.defaultSize);
|
|
39
|
+
const firstPaneStyle = computed(() => {
|
|
40
|
+
const size = currentSize.value * 100;
|
|
41
|
+
return {
|
|
42
|
+
flex: `0 0 calc(${size}% - ${(props.resizeTriggerSize * size) / 100}px)`
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
const resizeTriggerStyle = computed(() => {
|
|
46
|
+
return props.direction === 'horizontal'
|
|
47
|
+
? {
|
|
48
|
+
width: `${props.resizeTriggerSize}px`,
|
|
49
|
+
height: '100%'
|
|
50
|
+
}
|
|
51
|
+
: {
|
|
52
|
+
width: '100%',
|
|
53
|
+
height: `${props.resizeTriggerSize}px`
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
const resizeTriggerWrapperStyle = computed(() => {
|
|
57
|
+
const horizontal = props.direction === 'horizontal';
|
|
58
|
+
return {
|
|
59
|
+
width: horizontal ? `${props.resizeTriggerSize}px` : '',
|
|
60
|
+
height: horizontal ? '' : `${props.resizeTriggerSize}px`,
|
|
61
|
+
cursor: props.direction === 'horizontal' ? 'col-resize' : 'row-resize'
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
let offset = 0;
|
|
65
|
+
const handleMouseDown = (e) => {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
isDraggingRef.value = true;
|
|
68
|
+
if (props.onDragStart)
|
|
69
|
+
props.onDragStart(e);
|
|
70
|
+
const mouseMoveEvent = 'mousemove';
|
|
71
|
+
const mouseUpEvent = 'mouseup';
|
|
72
|
+
const onMouseMove = (e) => {
|
|
73
|
+
updateSize(e);
|
|
74
|
+
if (props.onDragMove)
|
|
75
|
+
props.onDragMove(e);
|
|
76
|
+
};
|
|
77
|
+
const onMouseUp = () => {
|
|
78
|
+
off(mouseMoveEvent, document, onMouseMove);
|
|
79
|
+
off(mouseUpEvent, document, onMouseUp);
|
|
80
|
+
isDraggingRef.value = false;
|
|
81
|
+
if (props.onDragEnd)
|
|
82
|
+
props.onDragEnd(e);
|
|
83
|
+
document.body.style.cursor = '';
|
|
84
|
+
};
|
|
85
|
+
document.body.style.cursor = resizeTriggerWrapperStyle.value.cursor;
|
|
86
|
+
on(mouseMoveEvent, document, onMouseMove);
|
|
87
|
+
on(mouseUpEvent, document, onMouseUp);
|
|
88
|
+
const resizeTriggerEl = resizeTriggerElRef.value;
|
|
89
|
+
if (resizeTriggerEl) {
|
|
90
|
+
const elRect = resizeTriggerEl.getBoundingClientRect();
|
|
91
|
+
if (props.direction === 'horizontal') {
|
|
92
|
+
offset = e.clientX - elRect.left;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
offset = elRect.top - e.clientY;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
updateSize(e);
|
|
99
|
+
};
|
|
100
|
+
const updateSize = (event) => {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
const parentRect = (_b = (_a = resizeTriggerElRef.value) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
103
|
+
if (!parentRect)
|
|
104
|
+
return;
|
|
105
|
+
const newSize = props.direction === 'horizontal'
|
|
106
|
+
? (event.clientX - parentRect.left - offset) /
|
|
107
|
+
(parentRect.width - props.resizeTriggerSize)
|
|
108
|
+
: (event.clientY - parentRect.top + offset) /
|
|
109
|
+
(parentRect.height - props.resizeTriggerSize);
|
|
110
|
+
currentSize.value = newSize;
|
|
111
|
+
if (props.min) {
|
|
112
|
+
currentSize.value = Math.max(newSize, props.min);
|
|
113
|
+
}
|
|
114
|
+
if (props.max) {
|
|
115
|
+
currentSize.value = Math.min(currentSize.value, props.max);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
return {
|
|
119
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
120
|
+
resizeTriggerElRef,
|
|
121
|
+
isDragging: isDraggingRef,
|
|
122
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
123
|
+
resizeTriggerWrapperStyle,
|
|
124
|
+
resizeTriggerStyle,
|
|
125
|
+
handleMouseDown,
|
|
126
|
+
firstPaneStyle
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
render() {
|
|
130
|
+
var _a, _b, _c, _d;
|
|
131
|
+
return (h("div", { class: [
|
|
132
|
+
`${this.mergedClsPrefix}-split`,
|
|
133
|
+
`${this.mergedClsPrefix}-split--${this.direction}`
|
|
134
|
+
], style: this.cssVars },
|
|
135
|
+
h("div", { class: `${this.mergedClsPrefix}-split-pane-1`, style: this.firstPaneStyle }, (_b = (_a = this.$slots)[1]) === null || _b === void 0 ? void 0 : _b.call(_a)),
|
|
136
|
+
!this.disabled && (h("div", { ref: "resizeTriggerElRef", class: `${this.mergedClsPrefix}-split__resize-trigger-wrapper`, style: this.resizeTriggerWrapperStyle, onMousedown: this.handleMouseDown }, resolveSlot(this.$slots['resize-trigger'], () => [
|
|
137
|
+
h("div", { style: this.resizeTriggerStyle, class: [
|
|
138
|
+
`${this.mergedClsPrefix}-split__resize-trigger`,
|
|
139
|
+
this.isDragging &&
|
|
140
|
+
`${this.mergedClsPrefix}-split__resize-trigger--hover`
|
|
141
|
+
] })
|
|
142
|
+
]))),
|
|
143
|
+
h("div", { class: `${this.mergedClsPrefix}-split-pane-2` }, (_d = (_c = this.$slots)[2]) === null || _d === void 0 ? void 0 : _d.call(_c))));
|
|
144
|
+
}
|
|
145
|
+
});
|