naive-ui 2.23.1 → 2.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/es/_internal/clear/src/Clear.d.ts +8 -10
- package/es/_internal/clear/src/styles/index.cssr.js +10 -10
- package/es/_internal/close/src/Close.d.ts +11 -10
- package/es/_internal/close/src/styles/index.cssr.js +9 -10
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +10 -20
- package/es/_internal/focus-detector/src/FocusDetector.d.ts +4 -7
- package/es/_internal/icon/src/Icon.d.ts +19 -20
- 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/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/Close.js +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/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/Switcher.js +2 -3
- 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 +26 -16
- package/es/_internal/menu-mask/src/MenuMask.d.ts +6 -5
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +60 -64
- package/es/_internal/scrollbar/src/ScrollBar.js +96 -73
- package/es/_internal/scrollbar/src/styles/index.cssr.js +15 -15
- package/es/_internal/select-menu/src/SelectGroupHeader.d.ts +10 -7
- package/es/_internal/select-menu/src/SelectMenu.d.ts +88 -84
- package/es/_internal/select-menu/src/SelectMenu.js +43 -42
- package/es/_internal/select-menu/src/SelectOption.d.ts +10 -7
- package/es/_internal/select-menu/src/interface.d.ts +3 -3
- package/es/_internal/select-menu/src/interface.js +3 -2
- package/es/_internal/select-menu/src/styles/index.cssr.js +35 -35
- package/es/_internal/select-menu/styles/_common.js +1 -1
- package/es/_internal/selection/src/Selection.d.ts +111 -113
- package/es/_internal/selection/src/Selection.js +69 -52
- package/es/_internal/selection/src/styles/index.cssr.js +80 -79
- package/es/_internal/selection/styles/_common.d.ts +1 -0
- package/es/_internal/selection/styles/_common.js +2 -1
- package/es/_internal/selection/styles/light.d.ts +2 -0
- package/es/_internal/slot-machine/src/SlotMachine.d.ts +18 -12
- package/es/_internal/slot-machine/src/SlotMachineNumber.d.ts +18 -12
- package/es/_internal/suffix/src/Suffix.d.ts +19 -14
- package/es/_internal/suffix/src/Suffix.js +7 -2
- package/es/_internal/wave/src/Wave.d.ts +6 -5
- package/es/_mixins/common.d.ts +1 -0
- package/es/_mixins/common.js +1 -0
- package/es/_mixins/index.d.ts +1 -0
- package/es/_mixins/index.js +1 -0
- package/es/_mixins/use-css-vars-class.d.ts +2 -0
- package/es/_mixins/use-css-vars-class.js +22 -0
- package/es/_mixins/use-form-item.d.ts +2 -2
- package/es/_mixins/use-form-item.js +2 -1
- package/es/_mixins/use-locale.d.ts +1 -1
- package/es/_mixins/use-locale.js +1 -1
- package/es/_mixins/use-rtl.js +2 -0
- package/es/_mixins/use-style.js +3 -0
- package/es/_mixins/use-theme.js +3 -0
- package/es/_utils/composable/use-houdini.js +2 -2
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/vue/create-injection-key.d.ts +2 -0
- package/es/_utils/vue/create-injection-key.js +3 -0
- package/es/_utils/vue/index.d.ts +2 -0
- package/es/_utils/vue/index.js +2 -0
- package/es/_utils/vue/resolve-slot.d.ts +2 -0
- package/es/_utils/vue/resolve-slot.js +20 -0
- package/es/affix/src/Affix.d.ts +26 -22
- package/es/alert/src/Alert.d.ts +35 -28
- package/es/alert/src/Alert.js +2 -4
- package/es/anchor/src/AnchorAdapter.d.ts +52 -47
- package/es/anchor/src/BaseAnchor.d.ts +25 -20
- package/es/anchor/src/Link.d.ts +6 -9
- package/es/anchor/src/Link.js +6 -5
- package/es/auto-complete/src/AutoComplete.d.ts +60 -67
- package/es/auto-complete/src/AutoComplete.js +13 -15
- package/es/avatar/index.d.ts +2 -0
- package/es/avatar/index.js +1 -0
- package/es/avatar/src/Avatar.d.ts +87 -51
- package/es/avatar/src/Avatar.js +39 -11
- package/es/avatar/src/AvatarGroup.d.ts +48 -0
- package/es/avatar/src/AvatarGroup.js +64 -0
- package/es/avatar/src/interface.d.ts +2 -0
- package/es/avatar/src/interface.js +1 -0
- package/es/avatar/src/styles/avatar-group.cssr.d.ts +2 -0
- package/es/avatar/src/styles/avatar-group.cssr.js +14 -0
- package/es/avatar/src/styles/index.cssr.js +8 -3
- package/es/avatar/styles/light.d.ts +3 -0
- package/es/avatar/styles/light.js +6 -2
- package/es/back-top/src/BackTop.d.ts +50 -35
- package/es/back-top/src/BackTop.js +2 -4
- package/es/badge/src/Badge.d.ts +31 -29
- package/es/badge/src/Badge.js +6 -5
- package/es/breadcrumb/src/Breadcrumb.d.ts +23 -26
- package/es/breadcrumb/src/Breadcrumb.js +10 -9
- package/es/breadcrumb/src/BreadcrumbItem.d.ts +4 -7
- package/es/breadcrumb/src/styles/index.cssr.js +23 -23
- package/es/button/src/Button.d.ts +53 -61
- package/es/button/src/Button.js +5 -2
- package/es/button/src/ButtonGroup.d.ts +10 -11
- package/es/button/src/ButtonGroup.js +2 -1
- package/es/calendar/src/Calendar.d.ts +45 -46
- package/es/calendar/src/Calendar.js +52 -27
- package/es/calendar/src/interface.d.ts +4 -0
- package/es/calendar/src/styles/index.cssr.js +57 -57
- package/es/card/src/Card.d.ts +58 -58
- package/es/card/src/Card.js +30 -29
- package/es/card/src/styles/index.cssr.js +71 -69
- package/es/carousel/index.d.ts +1 -0
- package/es/carousel/index.js +1 -0
- package/es/carousel/src/Carousel.d.ts +271 -45
- package/es/carousel/src/Carousel.js +684 -233
- package/es/carousel/src/CarouselArrow.d.ts +9 -0
- package/es/carousel/src/CarouselArrow.js +43 -0
- package/es/carousel/src/CarouselDots.d.ts +72 -0
- package/es/carousel/src/CarouselDots.js +118 -0
- package/es/carousel/src/CarouselItem.d.ts +11 -0
- package/es/carousel/src/CarouselItem.js +75 -0
- package/es/carousel/src/interface.d.ts +35 -0
- package/es/carousel/src/interface.js +3 -0
- package/es/carousel/src/styles/index.cssr.js +150 -47
- package/es/carousel/src/utils.d.ts +12 -0
- package/es/carousel/src/utils.js +58 -0
- package/es/carousel/styles/light.d.ts +3 -0
- package/es/carousel/styles/light.js +5 -2
- package/es/cascader/index.d.ts +1 -1
- package/es/cascader/src/Cascader.d.ts +130 -97
- package/es/cascader/src/Cascader.js +45 -46
- package/es/cascader/src/CascaderMenu.d.ts +34 -24
- package/es/cascader/src/CascaderMenu.js +3 -5
- package/es/cascader/src/CascaderOption.d.ts +8 -5
- package/es/cascader/src/CascaderOption.js +7 -4
- package/es/cascader/src/CascaderSelectMenu.d.ts +26 -20
- package/es/cascader/src/CascaderSubmenu.d.ts +16 -9
- package/es/cascader/src/interface.d.ts +7 -2
- package/es/cascader/src/interface.js +2 -1
- package/es/cascader/src/styles/index.cssr.js +44 -44
- package/es/cascader/styles/light.d.ts +1 -0
- package/es/cascader/styles/light.js +1 -1
- package/es/checkbox/index.d.ts +1 -0
- package/es/checkbox/src/Checkbox.d.ts +66 -66
- package/es/checkbox/src/Checkbox.js +40 -28
- package/es/checkbox/src/CheckboxGroup.d.ts +23 -24
- package/es/checkbox/src/CheckboxGroup.js +2 -2
- package/es/checkbox/src/interface.d.ts +4 -0
- package/es/checkbox/src/styles/index.cssr.js +59 -59
- package/es/code/src/Code.d.ts +41 -44
- package/es/code/src/Code.js +32 -20
- package/es/code/src/styles/index.cssr.js +33 -30
- package/es/collapse/src/Collapse.d.ts +43 -41
- package/es/collapse/src/Collapse.js +10 -10
- package/es/collapse/src/CollapseItem.d.ts +5 -9
- package/es/collapse/src/CollapseItem.js +8 -15
- package/es/collapse/src/CollapseItemContent.d.ts +11 -9
- package/es/collapse/src/styles/index.cssr.js +24 -24
- package/es/collapse-transition/src/CollapseTransition.d.ts +19 -20
- package/es/collapse-transition/src/CollapseTransition.js +1 -1
- package/es/color-picker/src/AlphaSlider.d.ts +19 -14
- package/es/color-picker/src/ColorInput.d.ts +34 -19
- package/es/color-picker/src/ColorInputUnit.d.ts +15 -11
- package/es/color-picker/src/ColorInputUnit.js +2 -2
- package/es/color-picker/src/ColorPicker.d.ts +65 -62
- package/es/color-picker/src/ColorPicker.js +27 -20
- package/es/color-picker/src/ColorPickerSwatches.d.ts +18 -11
- package/es/color-picker/src/ColorPickerTrigger.d.ts +15 -12
- package/es/color-picker/src/ColorPickerTrigger.js +23 -17
- package/es/color-picker/src/ColorPreview.d.ts +19 -11
- package/es/color-picker/src/HueSlider.d.ts +15 -12
- package/es/color-picker/src/Pallete.d.ts +23 -16
- package/es/color-picker/src/interface.d.ts +2 -0
- package/es/color-picker/src/styles/index.cssr.js +29 -28
- package/es/components.d.ts +2 -0
- package/es/components.js +2 -0
- package/es/composables/use-theme-vars.d.ts +2 -1
- package/es/config-provider/src/ConfigProvider.d.ts +57 -37
- package/es/config-provider/src/ConfigProvider.js +6 -5
- package/es/config-provider/src/interface.d.ts +4 -1
- package/es/countdown/index.d.ts +2 -0
- package/es/countdown/index.js +1 -0
- package/es/countdown/src/Countdown.d.ts +73 -0
- package/es/countdown/src/Countdown.js +126 -0
- package/es/countdown/src/utils.d.ts +0 -0
- package/es/countdown/src/utils.js +1 -0
- package/es/data-table/index.d.ts +1 -1
- package/es/data-table/src/DataTable.d.ts +153 -198
- package/es/data-table/src/DataTable.js +65 -91
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +12 -7
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +36 -19
- package/es/data-table/src/HeaderButton/RenderFilter.d.ts +14 -9
- package/es/data-table/src/HeaderButton/RenderSorter.d.ts +10 -7
- package/es/data-table/src/HeaderButton/SortButton.d.ts +6 -5
- package/es/data-table/src/HeaderButton/SortButton.js +6 -6
- package/es/data-table/src/MainTable.d.ts +1 -1
- package/es/data-table/src/TableParts/Body.d.ts +13 -14
- package/es/data-table/src/TableParts/Body.js +8 -8
- package/es/data-table/src/TableParts/BodyCheckbox.d.ts +14 -9
- package/es/data-table/src/TableParts/Cell.d.ts +865 -855
- package/es/data-table/src/TableParts/ExpandTrigger.d.ts +11 -9
- package/es/data-table/src/TableParts/Header.d.ts +8 -5
- package/es/data-table/src/TableParts/SelectionMenu.d.ts +6 -5
- package/es/data-table/src/interface.d.ts +10 -7
- package/es/data-table/src/interface.js +2 -1
- package/es/data-table/src/styles/index.cssr.js +138 -135
- package/es/data-table/src/utils.js +4 -1
- package/es/data-table/styles/light.d.ts +1 -0
- package/es/date-picker/index.d.ts +1 -0
- package/es/date-picker/src/DatePicker.d.ts +132 -149
- package/es/date-picker/src/DatePicker.js +162 -157
- package/es/date-picker/src/interface.d.ts +23 -5
- package/es/date-picker/src/interface.js +2 -1
- package/es/date-picker/src/panel/date.d.ts +77 -34
- package/es/date-picker/src/panel/date.js +6 -7
- package/es/date-picker/src/panel/daterange.d.ts +31 -26
- package/es/date-picker/src/panel/daterange.js +6 -9
- package/es/date-picker/src/panel/datetime.d.ts +41 -30
- package/es/date-picker/src/panel/datetime.js +4 -5
- package/es/date-picker/src/panel/datetimerange.d.ts +31 -26
- package/es/date-picker/src/panel/datetimerange.js +5 -8
- package/es/date-picker/src/panel/month.d.ts +48 -32
- package/es/date-picker/src/panel/month.js +13 -4
- package/es/date-picker/src/panel/panelHeader.d.ts +2435 -0
- package/es/date-picker/src/panel/panelHeader.js +72 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +16 -4
- package/es/date-picker/src/panel/use-calendar.js +44 -5
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +6 -0
- package/es/date-picker/src/panel/use-dual-calendar.js +10 -1
- package/es/date-picker/src/panel/use-panel-common.d.ts +2 -0
- package/es/date-picker/src/panel/use-panel-common.js +7 -1
- package/es/date-picker/src/styles/index.cssr.js +120 -117
- package/es/descriptions/src/Descriptions.d.ts +51 -51
- package/es/descriptions/src/Descriptions.js +19 -20
- package/es/descriptions/src/DescriptionsItem.d.ts +9 -12
- package/es/descriptions/src/styles/index.cssr.js +61 -61
- package/es/dialog/src/Dialog.d.ts +34 -45
- package/es/dialog/src/Dialog.js +28 -21
- package/es/dialog/src/DialogEnvironment.d.ts +41 -46
- package/es/dialog/src/DialogProvider.d.ts +8 -11
- package/es/dialog/src/DialogProvider.js +3 -3
- package/es/divider/src/Divider.d.ts +14 -19
- package/es/drawer/src/Drawer.d.ts +120 -123
- package/es/drawer/src/Drawer.js +62 -68
- package/es/drawer/src/DrawerBodyWrapper.d.ts +40 -16
- package/es/drawer/src/DrawerBodyWrapper.js +31 -14
- package/es/drawer/src/DrawerContent.d.ts +15 -20
- package/es/drawer/src/DrawerContent.js +6 -6
- package/es/drawer/src/interface.d.ts +3 -3
- package/es/drawer/src/interface.js +3 -2
- package/es/drawer/src/styles/index.cssr.js +41 -40
- package/es/dropdown/src/Dropdown.d.ts +113 -99
- package/es/dropdown/src/Dropdown.js +36 -34
- package/es/dropdown/src/DropdownDivider.d.ts +6 -5
- package/es/dropdown/src/DropdownGroup.d.ts +14 -9
- package/es/dropdown/src/DropdownGroupHeader.d.ts +10 -7
- package/es/dropdown/src/DropdownMenu.d.ts +18 -16
- package/es/dropdown/src/DropdownMenu.js +2 -1
- package/es/dropdown/src/DropdownOption.d.ts +19 -14
- package/es/dropdown/src/DropdownOption.js +2 -2
- package/es/dropdown/src/DropdownRenderOption.d.ts +6 -5
- package/es/dropdown/src/styles/index.cssr.js +59 -59
- package/es/dynamic-input/src/DynamicInput.d.ts +50 -45
- package/es/dynamic-input/src/DynamicInput.js +2 -2
- package/es/dynamic-input/src/InputPreset.d.ts +16 -14
- package/es/dynamic-input/src/PairPreset.d.ts +23 -18
- package/es/dynamic-input/src/interface.d.ts +2 -2
- package/es/dynamic-input/src/interface.js +2 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +41 -41
- package/es/element/src/Element.d.ts +9 -12
- package/es/ellipsis/src/Ellipsis.d.ts +14 -19
- package/es/empty/src/Empty.d.ts +40 -37
- package/es/empty/src/Empty.js +15 -19
- package/es/empty/src/styles/index.cssr.js +20 -19
- package/es/form/src/Feedbacks.d.ts +8 -10
- package/es/form/src/Feedbacks.js +4 -1
- package/es/form/src/Form.d.ts +44 -44
- package/es/form/src/Form.js +17 -8
- package/es/form/src/FormItem.d.ts +60 -70
- package/es/form/src/FormItem.js +45 -29
- package/es/form/src/FormItemCol.d.ts +63 -60
- package/es/form/src/FormItemCol.js +1 -0
- package/es/form/src/FormItemGridItem.d.ts +63 -66
- package/es/form/src/FormItemGridItem.js +1 -0
- package/es/form/src/FormItemRow.d.ts +68 -65
- package/es/form/src/FormItemRow.js +1 -0
- package/es/form/src/interface.d.ts +8 -4
- package/es/form/src/interface.js +3 -2
- package/es/form/src/styles/form-item.cssr.js +39 -37
- package/es/form/src/utils.d.ts +2 -2
- package/es/form/src/utils.js +29 -18
- package/es/global-style/src/GlobalStyle.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +21 -28
- package/es/gradient-text/src/GradientText.js +5 -5
- package/es/gradient-text/src/styles/index.cssr.js +9 -9
- package/es/grid/src/Grid.d.ts +27 -22
- package/es/grid/src/Grid.js +2 -2
- package/es/grid/src/GridItem.d.ts +18 -18
- package/es/grid/src/GridItem.js +3 -2
- package/es/icon/src/Icon.d.ts +17 -24
- package/es/icon/src/Icon.js +4 -4
- package/es/icon/src/styles/index.cssr.js +7 -7
- package/es/image/src/Image.d.ts +295 -39
- package/es/image/src/Image.js +4 -17
- package/es/image/src/ImageGroup.d.ts +274 -8
- package/es/image/src/ImageGroup.js +7 -9
- package/es/image/src/ImagePreview.d.ts +203 -18
- package/es/image/src/ImagePreview.js +70 -46
- package/es/image/src/interface.d.ts +94 -0
- package/es/image/src/interface.js +2 -1
- package/es/image/src/styles/index.cssr.js +11 -7
- package/es/image/styles/dark.js +8 -1
- package/es/image/styles/light.d.ts +32 -3
- package/es/image/styles/light.js +8 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/input/src/Input.d.ts +158 -155
- package/es/input/src/Input.js +123 -77
- package/es/input/src/InputGroup.d.ts +5 -9
- package/es/input/src/InputGroupLabel.d.ts +24 -25
- package/es/input/src/InputGroupLabel.js +12 -11
- package/es/input/src/WordCount.d.ts +1 -1
- package/es/input/src/interface.d.ts +2 -2
- package/es/input/src/interface.js +2 -1
- package/es/input/src/styles/input-group-label.cssr.js +18 -18
- package/es/input/src/styles/input.cssr.js +137 -155
- package/es/input-number/src/InputNumber.d.ts +68 -56
- package/es/input-number/src/InputNumber.js +5 -2
- package/es/input-number/src/utils.js +2 -1
- package/es/layout/src/Layout.d.ts +96 -71
- package/es/layout/src/Layout.js +5 -4
- package/es/layout/src/LayoutContent.d.ts +36 -34
- package/es/layout/src/LayoutFooter.d.ts +14 -19
- package/es/layout/src/LayoutFooter.js +7 -7
- package/es/layout/src/LayoutHeader.d.ts +17 -19
- package/es/layout/src/LayoutHeader.js +7 -7
- package/es/layout/src/LayoutSider.d.ts +64 -61
- package/es/layout/src/LayoutSider.js +13 -13
- package/es/layout/src/ToggleBar.d.ts +7 -8
- package/es/layout/src/ToggleButton.d.ts +7 -8
- package/es/layout/src/interface.d.ts +2 -2
- package/es/layout/src/interface.js +2 -1
- package/es/layout/src/styles/layout-footer.cssr.js +11 -11
- package/es/layout/src/styles/layout-header.cssr.js +11 -11
- package/es/layout/src/styles/layout-sider.cssr.js +45 -37
- package/es/layout/src/styles/layout.cssr.js +8 -8
- package/es/legacy-grid/src/Col.d.ts +18 -11
- package/es/legacy-grid/src/Row.d.ts +11 -13
- package/es/legacy-grid/src/Row.js +2 -2
- package/es/list/src/List.d.ts +29 -30
- package/es/list/src/List.js +17 -15
- package/es/list/src/ListItem.d.ts +1 -1
- package/es/list/src/ListItem.js +3 -3
- package/es/list/src/styles/index.cssr.js +30 -30
- package/es/loading-bar/src/LoadingBar.d.ts +4 -4
- package/es/loading-bar/src/LoadingBar.js +3 -3
- package/es/loading-bar/src/LoadingBarProvider.d.ts +22 -23
- package/es/loading-bar/src/LoadingBarProvider.js +7 -6
- package/es/loading-bar/src/styles/index.cssr.js +7 -7
- package/es/locales/common/deDE.js +10 -0
- package/es/locales/common/enUS.d.ts +9 -0
- package/es/locales/common/enUS.js +10 -0
- package/es/locales/common/esAR.d.ts +109 -0
- package/es/locales/common/esAR.js +110 -0
- package/es/locales/common/frFR.js +17 -8
- package/es/locales/common/idID.js +10 -0
- package/es/locales/common/itIT.d.ts +3 -0
- package/es/locales/common/itIT.js +109 -0
- package/es/locales/common/jaJP.js +10 -0
- package/es/locales/common/nbNO.js +10 -0
- package/es/locales/common/ruRU.js +10 -0
- package/es/locales/common/ukUA.js +10 -0
- package/es/locales/common/zhCN.js +9 -0
- package/es/locales/common/zhTW.js +10 -0
- package/es/locales/date/esAR.d.ts +3 -0
- package/es/locales/date/esAR.js +6 -0
- package/es/locales/date/itIT.d.ts +3 -0
- package/es/locales/date/itIT.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -0
- package/es/log/src/Log.d.ts +48 -46
- package/es/log/src/Log.js +2 -2
- package/es/log/src/LogLine.d.ts +6 -5
- package/es/log/src/LogLoader.d.ts +6 -5
- package/es/mention/src/Mention.d.ts +56 -57
- package/es/mention/src/Mention.js +1 -1
- package/es/mention/src/styles/index.cssr.js +2 -2
- package/es/mention/src/utils.js +0 -1
- package/es/menu/src/Menu.d.ts +87 -88
- package/es/menu/src/Menu.js +45 -42
- package/es/menu/src/MenuDivider.d.ts +1 -1
- package/es/menu/src/MenuOption.d.ts +22 -295
- package/es/menu/src/MenuOption.js +2 -1
- package/es/menu/src/MenuOptionContent.d.ts +33 -305
- package/es/menu/src/MenuOptionGroup.d.ts +20 -20
- package/es/menu/src/MenuOptionGroup.js +4 -3
- package/es/menu/src/Submenu.d.ts +35 -301
- package/es/menu/src/Submenu.js +4 -2
- package/es/menu/src/styles/index.cssr.js +71 -71
- package/es/menu/src/use-menu-child-props.d.ts +2 -1
- package/es/menu/src/use-menu-child.d.ts +5 -7
- package/es/menu/src/use-menu-child.js +0 -2
- package/es/message/index.d.ts +2 -1
- package/es/message/src/Message.d.ts +205 -53
- package/es/message/src/Message.js +35 -33
- package/es/message/src/MessageEnvironment.d.ts +28 -36
- package/es/message/src/MessageProvider.d.ts +29 -40
- package/es/message/src/MessageProvider.js +9 -9
- package/es/message/src/message-props.d.ts +5 -2
- package/es/message/src/styles/index.cssr.js +48 -48
- package/es/message/src/types.d.ts +15 -0
- package/es/message/src/types.js +1 -0
- package/es/modal/src/BodyWrapper.d.ts +97 -64
- package/es/modal/src/BodyWrapper.js +30 -21
- package/es/modal/src/Modal.d.ts +134 -966
- package/es/modal/src/Modal.js +27 -8
- package/es/modal/src/interface.d.ts +3 -3
- package/es/modal/src/interface.js +3 -2
- package/es/modal/src/presetProps.d.ts +2 -1
- package/es/modal/src/styles/index.cssr.js +8 -8
- package/es/notification/src/Notification.d.ts +44 -46
- package/es/notification/src/Notification.js +24 -24
- package/es/notification/src/NotificationContainer.d.ts +10 -7
- package/es/notification/src/NotificationEnvironment.d.ts +32 -40
- package/es/notification/src/NotificationProvider.d.ts +32 -35
- package/es/notification/src/NotificationProvider.js +8 -8
- package/es/notification/src/styles/index.cssr.js +65 -65
- package/es/number-animation/index.d.ts +3 -0
- package/es/number-animation/index.js +1 -0
- package/es/number-animation/src/NumberAnimation.d.ts +91 -0
- package/es/number-animation/src/NumberAnimation.js +96 -0
- package/es/number-animation/src/utils.d.ts +8 -0
- package/es/number-animation/src/utils.js +17 -0
- package/es/page-header/index.d.ts +1 -1
- package/es/page-header/src/PageHeader.d.ts +23 -31
- package/es/page-header/src/PageHeader.js +14 -15
- package/es/page-header/src/styles/index.cssr.js +23 -23
- package/es/pagination/index.d.ts +1 -1
- package/es/pagination/src/Pagination.d.ts +107 -102
- package/es/pagination/src/Pagination.js +118 -64
- package/es/pagination/src/interface.d.ts +10 -1
- package/es/pagination/src/styles/index.cssr.js +81 -81
- package/es/pagination/src/utils.d.ts +2 -2
- package/es/pagination/src/utils.js +2 -4
- package/es/pagination/styles/light.d.ts +1 -0
- package/es/popconfirm/src/Popconfirm.d.ts +94 -86
- package/es/popconfirm/src/PopconfirmPanel.d.ts +20 -18
- package/es/popconfirm/src/PopconfirmPanel.js +8 -9
- package/es/popconfirm/src/interface.d.ts +2 -2
- package/es/popconfirm/src/interface.js +2 -1
- package/es/popconfirm/src/styles/index.cssr.js +8 -8
- package/es/popover/src/Popover.d.ts +93 -77
- package/es/popover/src/Popover.js +24 -1
- package/es/popover/src/PopoverBody.d.ts +35 -51
- package/es/popover/src/PopoverBody.js +47 -62
- package/es/popover/src/interface.d.ts +2 -2
- package/es/popover/src/interface.js +2 -1
- package/es/popover/src/styles/index.cssr.js +63 -62
- package/es/popselect/src/Popselect.d.ts +139 -155
- package/es/popselect/src/Popselect.js +2 -2
- package/es/popselect/src/PopselectPanel.d.ts +24 -30
- package/es/popselect/src/interface.d.ts +2 -2
- package/es/popselect/src/interface.js +2 -1
- package/es/progress/src/Circle.d.ts +40 -26
- package/es/progress/src/Circle.js +8 -1
- package/es/progress/src/Line.d.ts +37 -32
- package/es/progress/src/Line.js +4 -1
- package/es/progress/src/MultipleCircle.d.ts +38 -21
- package/es/progress/src/Progress.d.ts +71 -64
- package/es/progress/src/Progress.js +16 -16
- package/es/progress/src/styles/index.cssr.js +68 -68
- package/es/radio/src/Radio.d.ts +45 -46
- package/es/radio/src/Radio.js +15 -15
- package/es/radio/src/RadioButton.d.ts +24 -22
- package/es/radio/src/RadioGroup.d.ts +35 -41
- package/es/radio/src/RadioGroup.js +14 -14
- package/es/radio/src/styles/radio-group.cssr.js +43 -43
- package/es/radio/src/styles/radio.cssr.js +40 -37
- package/es/radio/src/use-radio.d.ts +2 -2
- package/es/radio/src/use-radio.js +2 -2
- package/es/rate/src/Rate.d.ts +30 -35
- package/es/rate/src/Rate.js +4 -4
- package/es/rate/src/styles/index.cssr.js +11 -11
- package/es/result/src/Result.d.ts +27 -30
- package/es/result/src/Result.js +18 -19
- package/es/result/src/styles/index.cssr.js +26 -26
- package/es/scrollbar/src/ScrollBar.d.ts +10 -17
- package/es/select/index.d.ts +1 -1
- package/es/select/src/Select.d.ts +135 -122
- package/es/select/src/Select.js +42 -65
- package/es/select/src/interface.d.ts +4 -0
- package/es/select/src/styles/index.cssr.js +2 -2
- package/es/select/styles/light.d.ts +1 -0
- package/es/skeleton/src/Skeleton.d.ts +29 -34
- package/es/skeleton/src/Skeleton.js +3 -3
- package/es/skeleton/src/styles/index.cssr.js +12 -12
- package/es/slider/src/Slider.d.ts +80 -80
- package/es/slider/src/Slider.js +31 -30
- package/es/slider/src/styles/index.cssr.js +87 -87
- package/es/space/src/Space.d.ts +24 -27
- package/es/spin/src/Spin.d.ts +33 -32
- package/es/spin/src/Spin.js +5 -5
- package/es/spin/src/styles/index.cssr.js +15 -15
- package/es/statistic/src/Statistic.d.ts +32 -60
- package/es/statistic/src/Statistic.js +15 -22
- package/es/statistic/src/styles/index.cssr.js +19 -19
- package/es/steps/src/Step.d.ts +9 -12
- package/es/steps/src/Step.js +5 -7
- package/es/steps/src/Steps.d.ts +20 -23
- package/es/steps/src/Steps.js +2 -2
- package/es/switch/src/Switch.d.ts +45 -40
- package/es/table/src/Table.d.ts +47 -46
- package/es/table/src/Table.js +21 -21
- 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/table/src/styles/index.cssr.js +55 -55
- package/es/tabs/index.d.ts +1 -0
- package/es/tabs/src/Tab.d.ts +30 -37
- package/es/tabs/src/Tab.js +11 -4
- package/es/tabs/src/TabPane.d.ts +32 -38
- package/es/tabs/src/TabPane.js +14 -15
- package/es/tabs/src/Tabs.d.ts +39 -54
- package/es/tabs/src/Tabs.js +27 -24
- package/es/tabs/src/interface.d.ts +5 -2
- package/es/tabs/src/interface.js +2 -1
- package/es/tabs/src/styles/index.cssr.js +4 -1
- package/es/tabs/styles/light.js +1 -1
- package/es/tag/src/Tag.d.ts +43 -47
- package/es/tag/src/Tag.js +3 -2
- package/es/theme-editor/src/ThemeEditor.d.ts +1 -1
- package/es/theme-editor/src/ThemeEditor.js +161 -158
- package/es/themes/index.d.ts +1 -0
- package/es/themes/index.js +1 -0
- package/es/thing/src/Thing.d.ts +16 -23
- package/es/thing/src/Thing.js +25 -29
- package/es/thing/src/styles/index.cssr.js +11 -11
- package/es/time/src/Time.d.ts +18 -18
- package/es/time-picker/index.d.ts +1 -0
- package/es/time-picker/src/Panel.d.ts +75 -72
- package/es/time-picker/src/PanelCol.d.ts +15 -12
- package/es/time-picker/src/TimePicker.d.ts +111 -78
- package/es/time-picker/src/TimePicker.js +76 -70
- package/es/time-picker/src/interface.d.ts +10 -4
- package/es/time-picker/src/interface.js +2 -1
- package/es/timeline/src/Timeline.d.ts +21 -24
- package/es/timeline/src/Timeline.js +2 -1
- package/es/timeline/src/TimelineItem.d.ts +10 -14
- package/es/timeline/src/TimelineItem.js +4 -4
- package/es/tooltip/src/Tooltip.d.ts +85 -75
- package/es/transfer/src/Transfer.d.ts +60 -64
- package/es/transfer/src/Transfer.js +21 -21
- package/es/transfer/src/TransferFilter.d.ts +17 -16
- package/es/transfer/src/TransferHeader.d.ts +11 -10
- package/es/transfer/src/TransferList.d.ts +35 -19
- package/es/transfer/src/TransferList.js +5 -7
- package/es/transfer/src/TransferListItem.d.ts +18 -11
- package/es/transfer/src/interface.d.ts +2 -2
- package/es/transfer/src/interface.js +2 -1
- package/es/transfer/src/styles/index.cssr.js +38 -38
- package/es/tree/src/MotionWrapper.d.ts +19 -14
- package/es/tree/src/Tree.d.ts +127 -134
- package/es/tree/src/Tree.js +4 -2
- package/es/tree/src/TreeNode.d.ts +10 -7
- package/es/tree/src/TreeNodeCheckbox.d.ts +11 -16
- package/es/tree/src/TreeNodeContent.d.ts +15 -18
- package/es/tree/src/TreeNodeSwitcher.d.ts +10 -14
- package/es/tree/src/TreeNodeSwitcher.js +25 -14
- package/es/tree/src/interface.d.ts +4 -2
- package/es/tree/src/interface.js +2 -1
- package/es/tree/src/styles/index.cssr.js +4 -2
- package/es/tree-select/src/TreeSelect.d.ts +112 -97
- package/es/tree-select/src/TreeSelect.js +2 -4
- package/es/tree-select/src/interface.d.ts +2 -2
- package/es/tree-select/src/interface.js +2 -1
- package/es/tree-select/styles/light.d.ts +1 -0
- package/es/typography/src/a.d.ts +8 -12
- package/es/typography/src/blockquote.d.ts +9 -15
- package/es/typography/src/create-header.d.ts +14 -19
- package/es/typography/src/headers.d.ts +84 -114
- package/es/typography/src/hr.d.ts +8 -12
- package/es/typography/src/li.d.ts +1 -1
- package/es/typography/src/ol.d.ts +9 -15
- package/es/typography/src/p.d.ts +9 -14
- package/es/typography/src/text.d.ts +24 -31
- package/es/typography/src/text.js +4 -3
- package/es/typography/src/ul.d.ts +9 -15
- package/es/upload/src/Upload.d.ts +95 -85
- package/es/upload/src/Upload.js +22 -10
- package/es/upload/src/UploadDragger.d.ts +1 -1
- package/es/upload/src/UploadFile.d.ts +18 -13
- package/es/upload/src/UploadFileList.d.ts +1 -1
- package/es/upload/src/UploadFileList.js +2 -2
- package/es/upload/src/UploadProgress.d.ts +11 -9
- package/es/upload/src/UploadTrigger.d.ts +3 -5
- package/es/upload/src/interface.d.ts +14 -6
- package/es/upload/src/interface.js +2 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/Clear.d.ts +8 -10
- package/lib/_internal/clear/src/styles/index.cssr.js +10 -10
- package/lib/_internal/close/src/Close.d.ts +11 -10
- package/lib/_internal/close/src/styles/index.cssr.js +9 -10
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +10 -20
- package/lib/_internal/focus-detector/src/FocusDetector.d.ts +4 -7
- package/lib/_internal/icon/src/Icon.d.ts +19 -20
- 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/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/Close.js +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/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/Switcher.js +2 -3
- 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 +26 -16
- package/lib/_internal/menu-mask/src/MenuMask.d.ts +6 -5
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +60 -64
- package/lib/_internal/scrollbar/src/ScrollBar.js +95 -72
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +15 -15
- package/lib/_internal/select-menu/src/SelectGroupHeader.d.ts +10 -7
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +88 -84
- package/lib/_internal/select-menu/src/SelectMenu.js +42 -41
- package/lib/_internal/select-menu/src/SelectOption.d.ts +10 -7
- package/lib/_internal/select-menu/src/interface.d.ts +3 -3
- package/lib/_internal/select-menu/src/interface.js +3 -2
- package/lib/_internal/select-menu/src/styles/index.cssr.js +35 -35
- package/lib/_internal/select-menu/styles/_common.js +1 -1
- package/lib/_internal/selection/src/Selection.d.ts +111 -113
- package/lib/_internal/selection/src/Selection.js +69 -52
- package/lib/_internal/selection/src/styles/index.cssr.js +80 -79
- package/lib/_internal/selection/styles/_common.d.ts +1 -0
- package/lib/_internal/selection/styles/_common.js +2 -1
- package/lib/_internal/selection/styles/light.d.ts +2 -0
- package/lib/_internal/slot-machine/src/SlotMachine.d.ts +18 -12
- package/lib/_internal/slot-machine/src/SlotMachineNumber.d.ts +18 -12
- package/lib/_internal/suffix/src/Suffix.d.ts +19 -14
- package/lib/_internal/suffix/src/Suffix.js +7 -2
- package/lib/_internal/wave/src/Wave.d.ts +6 -5
- package/lib/_mixins/common.d.ts +1 -0
- package/lib/_mixins/common.js +4 -0
- package/lib/_mixins/index.d.ts +1 -0
- package/lib/_mixins/index.js +3 -1
- package/lib/_mixins/use-css-vars-class.d.ts +2 -0
- package/lib/_mixins/use-css-vars-class.js +29 -0
- package/lib/_mixins/use-form-item.d.ts +2 -2
- package/lib/_mixins/use-form-item.js +2 -1
- package/lib/_mixins/use-locale.d.ts +1 -1
- package/lib/_mixins/use-locale.js +2 -2
- package/lib/_mixins/use-rtl.js +2 -0
- package/lib/_mixins/use-style.js +3 -0
- package/lib/_mixins/use-theme.js +3 -0
- package/lib/_utils/composable/use-houdini.js +2 -2
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/_utils/vue/create-injection-key.d.ts +2 -0
- package/lib/_utils/vue/create-injection-key.js +7 -0
- package/lib/_utils/vue/index.d.ts +2 -0
- package/lib/_utils/vue/index.js +5 -1
- package/lib/_utils/vue/resolve-slot.d.ts +2 -0
- package/lib/_utils/vue/resolve-slot.js +24 -0
- package/lib/affix/src/Affix.d.ts +26 -22
- package/lib/alert/src/Alert.d.ts +35 -28
- package/lib/alert/src/Alert.js +1 -3
- package/lib/anchor/src/AnchorAdapter.d.ts +52 -47
- package/lib/anchor/src/BaseAnchor.d.ts +25 -20
- package/lib/anchor/src/Link.d.ts +6 -9
- package/lib/anchor/src/Link.js +4 -3
- package/lib/auto-complete/src/AutoComplete.d.ts +60 -67
- package/lib/auto-complete/src/AutoComplete.js +14 -16
- package/lib/avatar/index.d.ts +2 -0
- package/lib/avatar/index.js +3 -1
- package/lib/avatar/src/Avatar.d.ts +87 -51
- package/lib/avatar/src/Avatar.js +41 -12
- package/lib/avatar/src/AvatarGroup.d.ts +48 -0
- package/lib/avatar/src/AvatarGroup.js +70 -0
- package/lib/avatar/src/interface.d.ts +2 -0
- package/lib/avatar/src/interface.js +2 -0
- package/lib/avatar/src/styles/avatar-group.cssr.d.ts +2 -0
- package/lib/avatar/src/styles/avatar-group.cssr.js +21 -0
- package/lib/avatar/src/styles/index.cssr.js +7 -2
- package/lib/avatar/styles/light.d.ts +3 -0
- package/lib/avatar/styles/light.js +6 -2
- package/lib/back-top/src/BackTop.d.ts +50 -35
- package/lib/back-top/src/BackTop.js +1 -3
- package/lib/badge/src/Badge.d.ts +31 -29
- package/lib/badge/src/Badge.js +5 -4
- package/lib/breadcrumb/src/Breadcrumb.d.ts +23 -26
- package/lib/breadcrumb/src/Breadcrumb.js +10 -9
- package/lib/breadcrumb/src/BreadcrumbItem.d.ts +4 -7
- package/lib/breadcrumb/src/styles/index.cssr.js +23 -23
- package/lib/button/src/Button.d.ts +53 -61
- package/lib/button/src/Button.js +4 -1
- package/lib/button/src/ButtonGroup.d.ts +10 -11
- package/lib/button/src/ButtonGroup.js +2 -1
- package/lib/calendar/src/Calendar.d.ts +45 -46
- package/lib/calendar/src/Calendar.js +51 -26
- package/lib/calendar/src/interface.d.ts +4 -0
- package/lib/calendar/src/styles/index.cssr.js +57 -57
- package/lib/card/src/Card.d.ts +58 -58
- package/lib/card/src/Card.js +29 -28
- package/lib/card/src/styles/index.cssr.js +71 -69
- package/lib/carousel/index.d.ts +1 -0
- package/lib/carousel/index.js +3 -1
- package/lib/carousel/src/Carousel.d.ts +271 -45
- package/lib/carousel/src/Carousel.js +682 -231
- package/lib/carousel/src/CarouselArrow.d.ts +9 -0
- package/lib/carousel/src/CarouselArrow.js +45 -0
- package/lib/carousel/src/CarouselDots.d.ts +72 -0
- package/lib/carousel/src/CarouselDots.js +120 -0
- package/lib/carousel/src/CarouselItem.d.ts +11 -0
- package/lib/carousel/src/CarouselItem.js +77 -0
- package/lib/carousel/src/interface.d.ts +35 -0
- package/lib/carousel/src/interface.js +7 -0
- package/lib/carousel/src/styles/index.cssr.js +150 -47
- package/lib/carousel/src/utils.d.ts +12 -0
- package/lib/carousel/src/utils.js +69 -0
- package/lib/carousel/styles/light.d.ts +3 -0
- package/lib/carousel/styles/light.js +5 -2
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cascader/src/Cascader.d.ts +130 -97
- package/lib/cascader/src/Cascader.js +45 -46
- package/lib/cascader/src/CascaderMenu.d.ts +34 -24
- package/lib/cascader/src/CascaderMenu.js +2 -4
- package/lib/cascader/src/CascaderOption.d.ts +8 -5
- package/lib/cascader/src/CascaderOption.js +7 -4
- package/lib/cascader/src/CascaderSelectMenu.d.ts +26 -20
- package/lib/cascader/src/CascaderSubmenu.d.ts +16 -9
- package/lib/cascader/src/interface.d.ts +7 -2
- package/lib/cascader/src/interface.js +2 -1
- package/lib/cascader/src/styles/index.cssr.js +44 -44
- package/lib/cascader/styles/light.d.ts +1 -0
- package/lib/cascader/styles/light.js +1 -1
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/checkbox/src/Checkbox.d.ts +66 -66
- package/lib/checkbox/src/Checkbox.js +39 -27
- package/lib/checkbox/src/CheckboxGroup.d.ts +23 -24
- package/lib/checkbox/src/CheckboxGroup.js +1 -1
- package/lib/checkbox/src/interface.d.ts +4 -0
- package/lib/checkbox/src/styles/index.cssr.js +59 -59
- package/lib/code/src/Code.d.ts +41 -44
- package/lib/code/src/Code.js +32 -20
- package/lib/code/src/styles/index.cssr.js +32 -29
- package/lib/collapse/src/Collapse.d.ts +43 -41
- package/lib/collapse/src/Collapse.js +9 -9
- package/lib/collapse/src/CollapseItem.d.ts +5 -9
- package/lib/collapse/src/CollapseItem.js +7 -14
- package/lib/collapse/src/CollapseItemContent.d.ts +11 -9
- package/lib/collapse/src/styles/index.cssr.js +24 -24
- package/lib/collapse-transition/src/CollapseTransition.d.ts +19 -20
- package/lib/collapse-transition/src/CollapseTransition.js +1 -1
- package/lib/color-picker/src/AlphaSlider.d.ts +19 -14
- package/lib/color-picker/src/ColorInput.d.ts +34 -19
- package/lib/color-picker/src/ColorInputUnit.d.ts +15 -11
- package/lib/color-picker/src/ColorInputUnit.js +1 -1
- package/lib/color-picker/src/ColorPicker.d.ts +65 -62
- package/lib/color-picker/src/ColorPicker.js +27 -20
- package/lib/color-picker/src/ColorPickerSwatches.d.ts +18 -11
- package/lib/color-picker/src/ColorPickerTrigger.d.ts +15 -12
- package/lib/color-picker/src/ColorPickerTrigger.js +22 -16
- package/lib/color-picker/src/ColorPreview.d.ts +19 -11
- package/lib/color-picker/src/HueSlider.d.ts +15 -12
- package/lib/color-picker/src/Pallete.d.ts +23 -16
- package/lib/color-picker/src/interface.d.ts +2 -0
- package/lib/color-picker/src/styles/index.cssr.js +29 -28
- package/lib/components.d.ts +2 -0
- package/lib/components.js +2 -0
- package/lib/composables/use-theme-vars.d.ts +2 -1
- package/lib/config-provider/src/ConfigProvider.d.ts +57 -37
- package/lib/config-provider/src/ConfigProvider.js +4 -3
- package/lib/config-provider/src/interface.d.ts +4 -1
- package/lib/countdown/index.d.ts +2 -0
- package/lib/countdown/index.js +8 -0
- package/lib/countdown/src/Countdown.d.ts +73 -0
- package/lib/countdown/src/Countdown.js +128 -0
- package/lib/countdown/src/utils.d.ts +0 -0
- package/lib/countdown/src/utils.js +1 -0
- package/lib/data-table/index.d.ts +1 -1
- package/lib/data-table/src/DataTable.d.ts +153 -198
- package/lib/data-table/src/DataTable.js +63 -89
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +12 -7
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +36 -19
- package/lib/data-table/src/HeaderButton/RenderFilter.d.ts +14 -9
- package/lib/data-table/src/HeaderButton/RenderSorter.d.ts +10 -7
- package/lib/data-table/src/HeaderButton/SortButton.d.ts +6 -5
- package/lib/data-table/src/HeaderButton/SortButton.js +6 -6
- package/lib/data-table/src/MainTable.d.ts +1 -1
- package/lib/data-table/src/TableParts/Body.d.ts +13 -14
- package/lib/data-table/src/TableParts/Body.js +7 -7
- package/lib/data-table/src/TableParts/BodyCheckbox.d.ts +14 -9
- package/lib/data-table/src/TableParts/Cell.d.ts +865 -855
- package/lib/data-table/src/TableParts/ExpandTrigger.d.ts +11 -9
- package/lib/data-table/src/TableParts/Header.d.ts +8 -5
- package/lib/data-table/src/TableParts/SelectionMenu.d.ts +6 -5
- package/lib/data-table/src/interface.d.ts +10 -7
- package/lib/data-table/src/interface.js +2 -1
- package/lib/data-table/src/styles/index.cssr.js +138 -135
- package/lib/data-table/src/utils.js +3 -0
- package/lib/data-table/styles/light.d.ts +1 -0
- package/lib/date-picker/index.d.ts +1 -0
- package/lib/date-picker/src/DatePicker.d.ts +132 -149
- package/lib/date-picker/src/DatePicker.js +159 -154
- package/lib/date-picker/src/interface.d.ts +23 -5
- package/lib/date-picker/src/interface.js +2 -1
- package/lib/date-picker/src/panel/date.d.ts +77 -34
- package/lib/date-picker/src/panel/date.js +8 -6
- package/lib/date-picker/src/panel/daterange.d.ts +31 -26
- package/lib/date-picker/src/panel/daterange.js +8 -8
- package/lib/date-picker/src/panel/datetime.d.ts +41 -30
- package/lib/date-picker/src/panel/datetime.js +6 -4
- package/lib/date-picker/src/panel/datetimerange.d.ts +31 -26
- package/lib/date-picker/src/panel/datetimerange.js +7 -7
- package/lib/date-picker/src/panel/month.d.ts +48 -32
- package/lib/date-picker/src/panel/month.js +12 -3
- package/lib/date-picker/src/panel/panelHeader.d.ts +2435 -0
- package/lib/date-picker/src/panel/panelHeader.js +77 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +16 -4
- package/lib/date-picker/src/panel/use-calendar.js +43 -4
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +6 -0
- package/lib/date-picker/src/panel/use-dual-calendar.js +10 -1
- package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -0
- package/lib/date-picker/src/panel/use-panel-common.js +7 -1
- package/lib/date-picker/src/styles/index.cssr.js +120 -117
- package/lib/descriptions/src/Descriptions.d.ts +51 -51
- package/lib/descriptions/src/Descriptions.js +19 -20
- package/lib/descriptions/src/DescriptionsItem.d.ts +9 -12
- package/lib/descriptions/src/styles/index.cssr.js +61 -61
- package/lib/dialog/src/Dialog.d.ts +34 -45
- package/lib/dialog/src/Dialog.js +27 -20
- package/lib/dialog/src/DialogEnvironment.d.ts +41 -46
- package/lib/dialog/src/DialogProvider.d.ts +8 -11
- package/lib/dialog/src/DialogProvider.js +2 -2
- package/lib/divider/src/Divider.d.ts +14 -19
- package/lib/drawer/src/Drawer.d.ts +120 -123
- package/lib/drawer/src/Drawer.js +60 -66
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +40 -16
- package/lib/drawer/src/DrawerBodyWrapper.js +31 -14
- package/lib/drawer/src/DrawerContent.d.ts +15 -20
- package/lib/drawer/src/DrawerContent.js +6 -6
- package/lib/drawer/src/interface.d.ts +3 -3
- package/lib/drawer/src/interface.js +3 -2
- package/lib/drawer/src/styles/index.cssr.js +41 -40
- package/lib/dropdown/src/Dropdown.d.ts +113 -99
- package/lib/dropdown/src/Dropdown.js +35 -33
- package/lib/dropdown/src/DropdownDivider.d.ts +6 -5
- package/lib/dropdown/src/DropdownGroup.d.ts +14 -9
- package/lib/dropdown/src/DropdownGroupHeader.d.ts +10 -7
- package/lib/dropdown/src/DropdownMenu.d.ts +18 -16
- package/lib/dropdown/src/DropdownMenu.js +2 -1
- package/lib/dropdown/src/DropdownOption.d.ts +19 -14
- package/lib/dropdown/src/DropdownOption.js +1 -1
- package/lib/dropdown/src/DropdownRenderOption.d.ts +6 -5
- package/lib/dropdown/src/styles/index.cssr.js +59 -59
- package/lib/dynamic-input/src/DynamicInput.d.ts +50 -45
- package/lib/dynamic-input/src/DynamicInput.js +1 -1
- package/lib/dynamic-input/src/InputPreset.d.ts +16 -14
- package/lib/dynamic-input/src/PairPreset.d.ts +23 -18
- package/lib/dynamic-input/src/interface.d.ts +2 -2
- package/lib/dynamic-input/src/interface.js +2 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +41 -41
- package/lib/element/src/Element.d.ts +9 -12
- package/lib/ellipsis/src/Ellipsis.d.ts +14 -19
- package/lib/empty/src/Empty.d.ts +40 -37
- package/lib/empty/src/Empty.js +14 -18
- package/lib/empty/src/styles/index.cssr.js +19 -18
- package/lib/form/src/Feedbacks.d.ts +8 -10
- package/lib/form/src/Feedbacks.js +4 -1
- package/lib/form/src/Form.d.ts +44 -44
- package/lib/form/src/Form.js +16 -7
- package/lib/form/src/FormItem.d.ts +60 -70
- package/lib/form/src/FormItem.js +44 -28
- package/lib/form/src/FormItemCol.d.ts +63 -60
- package/lib/form/src/FormItemCol.js +1 -0
- package/lib/form/src/FormItemGridItem.d.ts +63 -66
- package/lib/form/src/FormItemGridItem.js +1 -0
- package/lib/form/src/FormItemRow.d.ts +68 -65
- package/lib/form/src/FormItemRow.js +1 -0
- package/lib/form/src/interface.d.ts +8 -4
- package/lib/form/src/interface.js +3 -2
- package/lib/form/src/styles/form-item.cssr.js +39 -37
- package/lib/form/src/utils.d.ts +2 -2
- package/lib/form/src/utils.js +29 -18
- package/lib/global-style/src/GlobalStyle.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +21 -28
- package/lib/gradient-text/src/GradientText.js +5 -5
- package/lib/gradient-text/src/styles/index.cssr.js +9 -9
- package/lib/grid/src/Grid.d.ts +27 -22
- package/lib/grid/src/Grid.js +1 -1
- package/lib/grid/src/GridItem.d.ts +18 -18
- package/lib/grid/src/GridItem.js +2 -1
- package/lib/icon/src/Icon.d.ts +17 -24
- package/lib/icon/src/Icon.js +4 -4
- package/lib/icon/src/styles/index.cssr.js +7 -7
- package/lib/image/src/Image.d.ts +295 -39
- package/lib/image/src/Image.js +4 -17
- package/lib/image/src/ImageGroup.d.ts +274 -8
- package/lib/image/src/ImageGroup.js +6 -8
- package/lib/image/src/ImagePreview.d.ts +203 -18
- package/lib/image/src/ImagePreview.js +68 -44
- package/lib/image/src/interface.d.ts +94 -0
- package/lib/image/src/interface.js +3 -0
- package/lib/image/src/styles/index.cssr.js +11 -7
- package/lib/image/styles/dark.js +8 -1
- package/lib/image/styles/light.d.ts +32 -3
- package/lib/image/styles/light.js +8 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/input/src/Input.d.ts +158 -155
- package/lib/input/src/Input.js +122 -76
- package/lib/input/src/InputGroup.d.ts +5 -9
- package/lib/input/src/InputGroupLabel.d.ts +24 -25
- package/lib/input/src/InputGroupLabel.js +11 -10
- package/lib/input/src/WordCount.d.ts +1 -1
- package/lib/input/src/interface.d.ts +2 -2
- package/lib/input/src/interface.js +2 -1
- package/lib/input/src/styles/input-group-label.cssr.js +18 -18
- package/lib/input/src/styles/input.cssr.js +137 -155
- package/lib/input-number/src/InputNumber.d.ts +68 -56
- package/lib/input-number/src/InputNumber.js +5 -2
- package/lib/input-number/src/utils.js +2 -1
- package/lib/layout/src/Layout.d.ts +96 -71
- package/lib/layout/src/Layout.js +5 -4
- package/lib/layout/src/LayoutContent.d.ts +36 -34
- package/lib/layout/src/LayoutFooter.d.ts +14 -19
- package/lib/layout/src/LayoutFooter.js +7 -7
- package/lib/layout/src/LayoutHeader.d.ts +17 -19
- package/lib/layout/src/LayoutHeader.js +7 -7
- package/lib/layout/src/LayoutSider.d.ts +64 -61
- package/lib/layout/src/LayoutSider.js +13 -13
- package/lib/layout/src/ToggleBar.d.ts +7 -8
- package/lib/layout/src/ToggleButton.d.ts +7 -8
- package/lib/layout/src/interface.d.ts +2 -2
- package/lib/layout/src/interface.js +2 -1
- package/lib/layout/src/styles/layout-footer.cssr.js +11 -11
- package/lib/layout/src/styles/layout-header.cssr.js +11 -11
- package/lib/layout/src/styles/layout-sider.cssr.js +45 -37
- package/lib/layout/src/styles/layout.cssr.js +8 -8
- package/lib/legacy-grid/src/Col.d.ts +18 -11
- package/lib/legacy-grid/src/Row.d.ts +11 -13
- package/lib/legacy-grid/src/Row.js +1 -1
- package/lib/list/src/List.d.ts +29 -30
- package/lib/list/src/List.js +16 -14
- package/lib/list/src/ListItem.d.ts +1 -1
- package/lib/list/src/ListItem.js +2 -2
- package/lib/list/src/styles/index.cssr.js +30 -30
- package/lib/loading-bar/src/LoadingBar.d.ts +4 -4
- package/lib/loading-bar/src/LoadingBar.js +3 -3
- package/lib/loading-bar/src/LoadingBarProvider.d.ts +22 -23
- package/lib/loading-bar/src/LoadingBarProvider.js +6 -5
- package/lib/loading-bar/src/styles/index.cssr.js +7 -7
- package/lib/locales/common/deDE.js +10 -0
- package/lib/locales/common/enUS.d.ts +9 -0
- package/lib/locales/common/enUS.js +10 -0
- package/lib/locales/common/esAR.d.ts +109 -0
- package/lib/locales/common/esAR.js +112 -0
- package/lib/locales/common/frFR.js +17 -8
- package/lib/locales/common/idID.js +10 -0
- package/lib/locales/common/itIT.d.ts +3 -0
- package/lib/locales/common/itIT.js +111 -0
- package/lib/locales/common/jaJP.js +10 -0
- package/lib/locales/common/nbNO.js +10 -0
- package/lib/locales/common/ruRU.js +10 -0
- package/lib/locales/common/ukUA.js +10 -0
- package/lib/locales/common/zhCN.js +9 -0
- package/lib/locales/common/zhTW.js +10 -0
- package/lib/locales/date/esAR.d.ts +3 -0
- package/lib/locales/date/esAR.js +11 -0
- package/lib/locales/date/itIT.d.ts +3 -0
- package/lib/locales/date/itIT.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -1
- package/lib/log/src/Log.d.ts +48 -46
- package/lib/log/src/Log.js +1 -1
- package/lib/log/src/LogLine.d.ts +6 -5
- package/lib/log/src/LogLoader.d.ts +6 -5
- package/lib/mention/src/Mention.d.ts +56 -57
- package/lib/mention/src/Mention.js +1 -1
- package/lib/mention/src/styles/index.cssr.js +2 -2
- package/lib/mention/src/utils.js +0 -1
- package/lib/menu/src/Menu.d.ts +87 -88
- package/lib/menu/src/Menu.js +44 -41
- package/lib/menu/src/MenuDivider.d.ts +1 -1
- package/lib/menu/src/MenuOption.d.ts +22 -295
- package/lib/menu/src/MenuOption.js +2 -1
- package/lib/menu/src/MenuOptionContent.d.ts +33 -305
- package/lib/menu/src/MenuOptionGroup.d.ts +20 -20
- package/lib/menu/src/MenuOptionGroup.js +3 -2
- package/lib/menu/src/Submenu.d.ts +35 -301
- package/lib/menu/src/Submenu.js +4 -2
- package/lib/menu/src/styles/index.cssr.js +71 -71
- package/lib/menu/src/use-menu-child-props.d.ts +2 -1
- package/lib/menu/src/use-menu-child.d.ts +5 -7
- package/lib/menu/src/use-menu-child.js +1 -3
- package/lib/message/index.d.ts +2 -1
- package/lib/message/src/Message.d.ts +205 -53
- package/lib/message/src/Message.js +35 -33
- package/lib/message/src/MessageEnvironment.d.ts +28 -36
- package/lib/message/src/MessageProvider.d.ts +29 -40
- package/lib/message/src/MessageProvider.js +7 -7
- package/lib/message/src/message-props.d.ts +5 -2
- package/lib/message/src/styles/index.cssr.js +48 -48
- package/lib/message/src/types.d.ts +15 -0
- package/lib/message/src/types.js +2 -0
- package/lib/modal/src/BodyWrapper.d.ts +97 -64
- package/lib/modal/src/BodyWrapper.js +30 -21
- package/lib/modal/src/Modal.d.ts +134 -966
- package/lib/modal/src/Modal.js +27 -8
- package/lib/modal/src/interface.d.ts +3 -3
- package/lib/modal/src/interface.js +3 -2
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/src/styles/index.cssr.js +8 -8
- package/lib/notification/src/Notification.d.ts +44 -46
- package/lib/notification/src/Notification.js +24 -24
- package/lib/notification/src/NotificationContainer.d.ts +10 -7
- package/lib/notification/src/NotificationEnvironment.d.ts +32 -40
- package/lib/notification/src/NotificationProvider.d.ts +32 -35
- package/lib/notification/src/NotificationProvider.js +6 -6
- package/lib/notification/src/styles/index.cssr.js +65 -65
- package/lib/number-animation/index.d.ts +3 -0
- package/lib/number-animation/index.js +8 -0
- package/lib/number-animation/src/NumberAnimation.d.ts +91 -0
- package/lib/number-animation/src/NumberAnimation.js +98 -0
- package/lib/number-animation/src/utils.d.ts +8 -0
- package/lib/number-animation/src/utils.js +21 -0
- package/lib/page-header/index.d.ts +1 -1
- package/lib/page-header/src/PageHeader.d.ts +23 -31
- package/lib/page-header/src/PageHeader.js +14 -15
- package/lib/page-header/src/styles/index.cssr.js +23 -23
- package/lib/pagination/index.d.ts +1 -1
- package/lib/pagination/src/Pagination.d.ts +107 -102
- package/lib/pagination/src/Pagination.js +117 -63
- package/lib/pagination/src/interface.d.ts +10 -1
- package/lib/pagination/src/styles/index.cssr.js +81 -81
- package/lib/pagination/src/utils.d.ts +2 -2
- package/lib/pagination/src/utils.js +2 -4
- package/lib/pagination/styles/light.d.ts +1 -0
- package/lib/popconfirm/src/Popconfirm.d.ts +94 -86
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +20 -18
- package/lib/popconfirm/src/PopconfirmPanel.js +7 -8
- package/lib/popconfirm/src/interface.d.ts +2 -2
- package/lib/popconfirm/src/interface.js +2 -1
- package/lib/popconfirm/src/styles/index.cssr.js +8 -8
- package/lib/popover/src/Popover.d.ts +93 -77
- package/lib/popover/src/Popover.js +23 -0
- package/lib/popover/src/PopoverBody.d.ts +35 -51
- package/lib/popover/src/PopoverBody.js +45 -60
- package/lib/popover/src/interface.d.ts +2 -2
- package/lib/popover/src/interface.js +2 -1
- package/lib/popover/src/styles/index.cssr.js +63 -62
- package/lib/popselect/src/Popselect.d.ts +139 -155
- package/lib/popselect/src/Popselect.js +2 -2
- package/lib/popselect/src/PopselectPanel.d.ts +24 -30
- package/lib/popselect/src/interface.d.ts +2 -2
- package/lib/popselect/src/interface.js +2 -1
- package/lib/progress/src/Circle.d.ts +40 -26
- package/lib/progress/src/Circle.js +8 -1
- package/lib/progress/src/Line.d.ts +37 -32
- package/lib/progress/src/Line.js +4 -1
- package/lib/progress/src/MultipleCircle.d.ts +38 -21
- package/lib/progress/src/Progress.d.ts +71 -64
- package/lib/progress/src/Progress.js +16 -16
- package/lib/progress/src/styles/index.cssr.js +68 -68
- package/lib/radio/src/Radio.d.ts +45 -46
- package/lib/radio/src/Radio.js +15 -15
- package/lib/radio/src/RadioButton.d.ts +24 -22
- package/lib/radio/src/RadioGroup.d.ts +35 -41
- package/lib/radio/src/RadioGroup.js +14 -14
- package/lib/radio/src/styles/radio-group.cssr.js +43 -43
- package/lib/radio/src/styles/radio.cssr.js +40 -37
- package/lib/radio/src/use-radio.d.ts +2 -2
- package/lib/radio/src/use-radio.js +1 -1
- package/lib/rate/src/Rate.d.ts +30 -35
- package/lib/rate/src/Rate.js +4 -4
- package/lib/rate/src/styles/index.cssr.js +11 -11
- package/lib/result/src/Result.d.ts +27 -30
- package/lib/result/src/Result.js +17 -18
- package/lib/result/src/styles/index.cssr.js +26 -26
- package/lib/scrollbar/src/ScrollBar.d.ts +10 -17
- package/lib/select/index.d.ts +1 -1
- package/lib/select/src/Select.d.ts +135 -122
- package/lib/select/src/Select.js +40 -63
- package/lib/select/src/interface.d.ts +4 -0
- package/lib/select/src/styles/index.cssr.js +2 -2
- package/lib/select/styles/light.d.ts +1 -0
- package/lib/skeleton/src/Skeleton.d.ts +29 -34
- package/lib/skeleton/src/Skeleton.js +3 -3
- package/lib/skeleton/src/styles/index.cssr.js +12 -12
- package/lib/slider/src/Slider.d.ts +80 -80
- package/lib/slider/src/Slider.js +31 -30
- package/lib/slider/src/styles/index.cssr.js +87 -87
- package/lib/space/src/Space.d.ts +24 -27
- package/lib/spin/src/Spin.d.ts +33 -32
- package/lib/spin/src/Spin.js +5 -5
- package/lib/spin/src/styles/index.cssr.js +15 -15
- package/lib/statistic/src/Statistic.d.ts +32 -60
- package/lib/statistic/src/Statistic.js +14 -21
- package/lib/statistic/src/styles/index.cssr.js +19 -19
- package/lib/steps/src/Step.d.ts +9 -12
- package/lib/steps/src/Step.js +4 -6
- package/lib/steps/src/Steps.d.ts +20 -23
- package/lib/steps/src/Steps.js +1 -1
- package/lib/switch/src/Switch.d.ts +45 -40
- package/lib/table/src/Table.d.ts +47 -46
- package/lib/table/src/Table.js +21 -21
- 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/table/src/styles/index.cssr.js +55 -55
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/src/Tab.d.ts +30 -37
- package/lib/tabs/src/Tab.js +10 -3
- package/lib/tabs/src/TabPane.d.ts +32 -38
- package/lib/tabs/src/TabPane.js +12 -13
- package/lib/tabs/src/Tabs.d.ts +39 -54
- package/lib/tabs/src/Tabs.js +27 -24
- package/lib/tabs/src/interface.d.ts +5 -2
- package/lib/tabs/src/interface.js +2 -1
- package/lib/tabs/src/styles/index.cssr.js +4 -1
- package/lib/tabs/styles/light.js +1 -1
- package/lib/tag/src/Tag.d.ts +43 -47
- package/lib/tag/src/Tag.js +2 -1
- package/lib/theme-editor/src/ThemeEditor.d.ts +1 -1
- package/lib/theme-editor/src/ThemeEditor.js +160 -157
- package/lib/themes/index.d.ts +1 -0
- package/lib/themes/index.js +3 -1
- package/lib/thing/src/Thing.d.ts +16 -23
- package/lib/thing/src/Thing.js +24 -28
- package/lib/thing/src/styles/index.cssr.js +11 -11
- package/lib/time/src/Time.d.ts +18 -18
- package/lib/time-picker/index.d.ts +1 -0
- package/lib/time-picker/src/Panel.d.ts +75 -72
- package/lib/time-picker/src/PanelCol.d.ts +15 -12
- package/lib/time-picker/src/TimePicker.d.ts +111 -78
- package/lib/time-picker/src/TimePicker.js +76 -70
- package/lib/time-picker/src/interface.d.ts +10 -4
- package/lib/time-picker/src/interface.js +2 -1
- package/lib/timeline/src/Timeline.d.ts +21 -24
- package/lib/timeline/src/Timeline.js +2 -1
- package/lib/timeline/src/TimelineItem.d.ts +10 -14
- package/lib/timeline/src/TimelineItem.js +3 -3
- package/lib/tooltip/src/Tooltip.d.ts +85 -75
- package/lib/transfer/src/Transfer.d.ts +60 -64
- package/lib/transfer/src/Transfer.js +21 -21
- package/lib/transfer/src/TransferFilter.d.ts +17 -16
- package/lib/transfer/src/TransferHeader.d.ts +11 -10
- package/lib/transfer/src/TransferList.d.ts +35 -19
- package/lib/transfer/src/TransferList.js +5 -7
- package/lib/transfer/src/TransferListItem.d.ts +18 -11
- package/lib/transfer/src/interface.d.ts +2 -2
- package/lib/transfer/src/interface.js +2 -1
- package/lib/transfer/src/styles/index.cssr.js +38 -38
- package/lib/tree/src/MotionWrapper.d.ts +19 -14
- package/lib/tree/src/Tree.d.ts +127 -134
- package/lib/tree/src/Tree.js +4 -2
- package/lib/tree/src/TreeNode.d.ts +10 -7
- package/lib/tree/src/TreeNodeCheckbox.d.ts +11 -16
- package/lib/tree/src/TreeNodeContent.d.ts +15 -18
- package/lib/tree/src/TreeNodeSwitcher.d.ts +10 -14
- package/lib/tree/src/TreeNodeSwitcher.js +24 -13
- package/lib/tree/src/interface.d.ts +4 -2
- package/lib/tree/src/interface.js +2 -1
- package/lib/tree/src/styles/index.cssr.js +4 -2
- package/lib/tree-select/src/TreeSelect.d.ts +112 -97
- package/lib/tree-select/src/TreeSelect.js +1 -3
- package/lib/tree-select/src/interface.d.ts +2 -2
- package/lib/tree-select/src/interface.js +2 -1
- package/lib/tree-select/styles/light.d.ts +1 -0
- package/lib/typography/src/a.d.ts +8 -12
- package/lib/typography/src/blockquote.d.ts +9 -15
- package/lib/typography/src/create-header.d.ts +14 -19
- package/lib/typography/src/headers.d.ts +84 -114
- package/lib/typography/src/hr.d.ts +8 -12
- package/lib/typography/src/li.d.ts +1 -1
- package/lib/typography/src/ol.d.ts +9 -15
- package/lib/typography/src/p.d.ts +9 -14
- package/lib/typography/src/text.d.ts +24 -31
- package/lib/typography/src/text.js +3 -2
- package/lib/typography/src/ul.d.ts +9 -15
- package/lib/upload/src/Upload.d.ts +95 -85
- package/lib/upload/src/Upload.js +22 -10
- package/lib/upload/src/UploadDragger.d.ts +1 -1
- package/lib/upload/src/UploadFile.d.ts +18 -13
- package/lib/upload/src/UploadFileList.d.ts +1 -1
- package/lib/upload/src/UploadFileList.js +2 -2
- package/lib/upload/src/UploadProgress.d.ts +11 -9
- package/lib/upload/src/UploadTrigger.d.ts +3 -5
- package/lib/upload/src/interface.d.ts +14 -6
- package/lib/upload/src/interface.js +2 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +32 -23
- package/volar.d.ts +144 -0
- package/web-types.json +766 -54
|
@@ -4,303 +4,754 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const vue_1 = require("vue");
|
|
7
|
-
const
|
|
7
|
+
const vueuc_1 = require("vueuc");
|
|
8
8
|
const evtd_1 = require("evtd");
|
|
9
|
-
const icons_1 = require("../../_internal/icons");
|
|
10
9
|
const _mixins_1 = require("../../_mixins");
|
|
11
10
|
const _utils_1 = require("../../_utils");
|
|
12
11
|
const styles_1 = require("../styles");
|
|
12
|
+
const utils_1 = require("./utils");
|
|
13
|
+
const CarouselDots_1 = __importDefault(require("./CarouselDots"));
|
|
14
|
+
const CarouselArrow_1 = __importDefault(require("./CarouselArrow"));
|
|
15
|
+
const CarouselItem_1 = __importDefault(require("./CarouselItem"));
|
|
16
|
+
const interface_1 = require("./interface");
|
|
13
17
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
14
|
-
const
|
|
18
|
+
const transitionProperties = (0, interface_1.tuple)('transitionDuration', 'transitionTimingFunction');
|
|
19
|
+
const carouselProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { defaultIndex: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 0
|
|
22
|
+
}, currentIndex: Number, showArrow: Boolean, dotType: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'dot'
|
|
25
|
+
}, dotPlacement: {
|
|
15
26
|
type: String,
|
|
16
27
|
default: 'bottom'
|
|
17
|
-
},
|
|
28
|
+
}, slidesPerView: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
default: 1
|
|
31
|
+
}, spaceBetween: {
|
|
32
|
+
type: Number,
|
|
33
|
+
default: 0
|
|
34
|
+
}, centeredSlides: Boolean, direction: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'horizontal'
|
|
37
|
+
}, autoplay: Boolean, interval: {
|
|
18
38
|
type: Number,
|
|
19
39
|
default: 5000
|
|
40
|
+
}, loop: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
43
|
+
}, effect: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: 'slide'
|
|
46
|
+
}, showDots: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: true
|
|
20
49
|
}, trigger: {
|
|
21
50
|
type: String,
|
|
22
51
|
default: 'click'
|
|
23
|
-
}
|
|
52
|
+
}, transitionStyle: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: () => ({
|
|
55
|
+
transitionDuration: '300ms'
|
|
56
|
+
})
|
|
57
|
+
}, transitionProps: Object, draggable: Boolean, touchable: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: true
|
|
60
|
+
}, mousewheel: Boolean, keyboard: Boolean, 'onUpdate:currentIndex': Function, onUpdateCurrentIndex: Function });
|
|
61
|
+
// only one carousel is allowed to trigger touch globally
|
|
62
|
+
let globalDragging = false;
|
|
24
63
|
exports.default = (0, vue_1.defineComponent)({
|
|
25
64
|
name: 'Carousel',
|
|
26
65
|
props: carouselProps,
|
|
27
66
|
setup(props) {
|
|
28
67
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
29
|
-
|
|
30
|
-
const lengthRef = { value: 1 };
|
|
31
|
-
const touchingRef = (0, vue_1.ref)(false);
|
|
32
|
-
const dragOffsetRef = (0, vue_1.ref)(0);
|
|
68
|
+
// Dom
|
|
33
69
|
const selfElRef = (0, vue_1.ref)(null);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
70
|
+
const slidesElsRef = (0, vue_1.ref)([]);
|
|
71
|
+
const slideVNodesRef = { value: [] };
|
|
72
|
+
// user wants to control the transition animation
|
|
73
|
+
const userWantsControlRef = (0, vue_1.computed)(() => props.effect === 'custom');
|
|
74
|
+
const translateableRef = (0, vue_1.computed)(() => !userWantsControlRef.value && props.effect === 'slide');
|
|
75
|
+
// TODO
|
|
76
|
+
const allowLoopRef = (0, vue_1.computed)(() => props.loop && props.slidesPerView === 1);
|
|
77
|
+
// Because of the nature of the loop slide work,
|
|
78
|
+
// we need to add duplicates to the left and right of the carousel
|
|
79
|
+
// slot [ 0 1 2 ]
|
|
80
|
+
// display 2 0 1 2 0
|
|
81
|
+
// index 0 1 2 3 4
|
|
82
|
+
const duplicatedableRef = (0, vue_1.computed)(
|
|
83
|
+
// only duplicate the copy operation in `slide` mode,
|
|
84
|
+
// because other effects have special process
|
|
85
|
+
() => translateableRef.value && allowLoopRef.value);
|
|
86
|
+
// used to calculate total views
|
|
87
|
+
const displaySlidesPerViewRef = (0, vue_1.computed)(() => userWantsControlRef.value ||
|
|
88
|
+
props.centeredSlides ||
|
|
89
|
+
props.effect !== 'slide'
|
|
90
|
+
? 1
|
|
91
|
+
: props.slidesPerView);
|
|
92
|
+
// used to calculate the size of each slide
|
|
93
|
+
const realSlidesPerViewRef = (0, vue_1.computed)(() => userWantsControlRef.value ? 1 : props.slidesPerView);
|
|
94
|
+
// we automatically calculate total view for special slides per view
|
|
95
|
+
const autoSlideSizeRef = (0, vue_1.computed)(() => displaySlidesPerViewRef.value === 'auto' ||
|
|
96
|
+
(props.slidesPerView === 'auto' && props.centeredSlides));
|
|
97
|
+
const transitionStyleRef = (0, vue_1.computed)(() => props.transitionStyle
|
|
98
|
+
? (0, _utils_1.keep)(props.transitionStyle, transitionProperties)
|
|
99
|
+
: {});
|
|
100
|
+
const speedRef = (0, vue_1.computed)(() => userWantsControlRef.value
|
|
101
|
+
? 0
|
|
102
|
+
: (0, utils_1.resolveSpeed)(transitionStyleRef.value.transitionDuration));
|
|
103
|
+
const verticalRef = (0, vue_1.computed)(() => props.direction === 'vertical');
|
|
104
|
+
const sizeAxisRef = (0, vue_1.computed)(() => (verticalRef.value ? 'height' : 'width'));
|
|
105
|
+
const perViewSizeRef = (0, vue_1.ref)({ width: 0, height: 0 });
|
|
106
|
+
const slideSizesRef = (0, vue_1.computed)(() => {
|
|
107
|
+
const { value: slidesEls } = slidesElsRef;
|
|
108
|
+
const { length } = slidesEls;
|
|
109
|
+
if (!length)
|
|
110
|
+
return [];
|
|
111
|
+
if (autoSlideSizeRef.value) {
|
|
112
|
+
return slidesEls.map((slide) => (0, utils_1.calculateSize)(slide));
|
|
113
|
+
}
|
|
114
|
+
const { value: slidesPerView } = realSlidesPerViewRef;
|
|
115
|
+
const { value: perViewSize } = perViewSizeRef;
|
|
116
|
+
const { value: axis } = sizeAxisRef;
|
|
117
|
+
let slideSize = perViewSize[axis];
|
|
118
|
+
if (slidesPerView !== 'auto') {
|
|
119
|
+
const { spaceBetween } = props;
|
|
120
|
+
const remaining = slideSize - (slidesPerView - 1) * spaceBetween;
|
|
121
|
+
const percentage = 1 / Math.max(1, slidesPerView);
|
|
122
|
+
slideSize = remaining * percentage;
|
|
123
|
+
}
|
|
124
|
+
return slidesEls.map(() => (Object.assign(Object.assign({}, perViewSize), { [axis]: slideSize })));
|
|
125
|
+
});
|
|
126
|
+
// The translate required to reach each slide
|
|
127
|
+
const slideTranlatesRef = (0, vue_1.computed)(() => {
|
|
128
|
+
const { value: slideSizes } = slideSizesRef;
|
|
129
|
+
const { length } = slideSizes;
|
|
130
|
+
if (!length)
|
|
131
|
+
return [];
|
|
132
|
+
const { centeredSlides, spaceBetween } = props;
|
|
133
|
+
const { value: axis } = sizeAxisRef;
|
|
134
|
+
const { [axis]: perViewSize } = perViewSizeRef.value;
|
|
135
|
+
let previousTranslate = 0;
|
|
136
|
+
return slideSizes.map(({ [axis]: slideSize }) => {
|
|
137
|
+
let translate = previousTranslate;
|
|
138
|
+
if (centeredSlides) {
|
|
139
|
+
translate += (slideSize - perViewSize) / 2;
|
|
140
|
+
}
|
|
141
|
+
previousTranslate += slideSize + spaceBetween;
|
|
142
|
+
return translate;
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
let isMounted = false;
|
|
146
|
+
const slideStylesRef = (0, vue_1.computed)(() => {
|
|
147
|
+
const { value: slideSizes } = slideSizesRef;
|
|
148
|
+
const { length } = slideSizes;
|
|
149
|
+
if (!length)
|
|
150
|
+
return [];
|
|
151
|
+
const { value: axis } = sizeAxisRef;
|
|
152
|
+
// when user wants to control the transition animation, we center each slide
|
|
153
|
+
if (userWantsControlRef.value) {
|
|
154
|
+
return slideSizes.map((size) => ({
|
|
155
|
+
[axis]: `${size[axis]}px`
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
158
|
+
const { effect, spaceBetween } = props;
|
|
159
|
+
const { value: vertical } = verticalRef;
|
|
160
|
+
const spaceAxis = vertical ? 'bottom' : 'right';
|
|
161
|
+
const slideStyles = [];
|
|
162
|
+
for (let i = 0; i < length; i++) {
|
|
163
|
+
const size = slideSizes[i][axis];
|
|
164
|
+
const style = {
|
|
165
|
+
[axis]: `${size}px`,
|
|
166
|
+
[`margin-${spaceAxis}`]: `${spaceBetween}px`
|
|
167
|
+
};
|
|
168
|
+
if (isMounted && (effect === 'fade' || effect === 'card')) {
|
|
169
|
+
Object.assign(style, transitionStyleRef.value);
|
|
170
|
+
}
|
|
171
|
+
slideStyles.push(style);
|
|
172
|
+
}
|
|
173
|
+
return slideStyles;
|
|
174
|
+
});
|
|
175
|
+
// Total
|
|
176
|
+
const totalViewRef = (0, vue_1.computed)(() => {
|
|
177
|
+
const { value: slidesPerView } = displaySlidesPerViewRef;
|
|
178
|
+
const { length: originLength } = slidesElsRef.value;
|
|
179
|
+
if (slidesPerView !== 'auto') {
|
|
180
|
+
return originLength - slidesPerView + 1;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
const { value: slideSizes } = slideSizesRef;
|
|
184
|
+
const { length } = slideSizes;
|
|
185
|
+
if (!length)
|
|
186
|
+
return originLength;
|
|
187
|
+
const { value: translates } = slideTranlatesRef;
|
|
188
|
+
const { value: axis } = sizeAxisRef;
|
|
189
|
+
const perViewSize = perViewSizeRef.value[axis];
|
|
190
|
+
let lastViewSize = slideSizes[slideSizes.length - 1][axis];
|
|
191
|
+
let i = length;
|
|
192
|
+
while (i > 1 && lastViewSize < perViewSize) {
|
|
193
|
+
i--;
|
|
194
|
+
lastViewSize += translates[i] - translates[i - 1];
|
|
195
|
+
}
|
|
196
|
+
if (i !== length)
|
|
197
|
+
i++;
|
|
198
|
+
if (i < 1)
|
|
199
|
+
i = 1;
|
|
200
|
+
return i;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
const displayTotalViewRef = (0, vue_1.computed)(() => {
|
|
204
|
+
const { value: totalView } = totalViewRef;
|
|
205
|
+
return duplicatedableRef.value && totalView > 3
|
|
206
|
+
? totalView - 2
|
|
207
|
+
: totalView;
|
|
208
|
+
});
|
|
209
|
+
// Index
|
|
210
|
+
const initializeIndex = props.defaultIndex + (duplicatedableRef.value ? 1 : 0);
|
|
211
|
+
const displayIndexRef = (0, vue_1.ref)((0, utils_1.getDisplayIndex)(initializeIndex, totalViewRef.value, duplicatedableRef.value));
|
|
212
|
+
const virtualIndexRef = (0, vue_1.ref)(initializeIndex);
|
|
213
|
+
const realIndexRef = (0, vue_1.ref)(initializeIndex);
|
|
214
|
+
// record the translate of each slide, so that it can be restored at touch
|
|
215
|
+
let previousTranslate = 0;
|
|
216
|
+
// Reality methods
|
|
217
|
+
function toRealIndex(index, speed = speedRef.value) {
|
|
218
|
+
var _a, _b;
|
|
219
|
+
const { value: length } = totalViewRef;
|
|
220
|
+
if ((index = (0, utils_1.clampValue)(index, 0, length - 1)) !== realIndexRef.value) {
|
|
221
|
+
const { value: lastDisplayIndex } = displayIndexRef;
|
|
222
|
+
// When it is loop from the first silde to the last one,
|
|
223
|
+
// we control its animation effect
|
|
224
|
+
if (duplicatedableRef.value && displayTotalViewRef.value > 2) {
|
|
225
|
+
if (lastDisplayIndex === 0 && index === displayTotalViewRef.value) {
|
|
226
|
+
index = 0;
|
|
227
|
+
}
|
|
228
|
+
else if (lastDisplayIndex === displayTotalViewRef.value - 1 &&
|
|
229
|
+
index === 1) {
|
|
230
|
+
index = length - 1;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const displayIndex = (displayIndexRef.value = (0, utils_1.getDisplayIndex)(index, totalViewRef.value, duplicatedableRef.value));
|
|
234
|
+
virtualIndexRef.value = index;
|
|
235
|
+
realIndexRef.value = (0, utils_1.getRealIndex)(displayIndex, duplicatedableRef.value);
|
|
236
|
+
if (translateableRef.value) {
|
|
237
|
+
translateTo(index, speed);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
if (!userWantsControlRef.value && speed > 0) {
|
|
241
|
+
inTransition = true;
|
|
242
|
+
}
|
|
243
|
+
fixTranslate();
|
|
244
|
+
}
|
|
245
|
+
if (displayIndex !== lastDisplayIndex) {
|
|
246
|
+
(_a = props['onUpdate:currentIndex']) === null || _a === void 0 ? void 0 : _a.call(props, displayIndex, lastDisplayIndex);
|
|
247
|
+
(_b = props.onUpdateCurrentIndex) === null || _b === void 0 ? void 0 : _b.call(props, displayIndex, lastDisplayIndex);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
function getRealPrevIndex(index = realIndexRef.value) {
|
|
252
|
+
return (0, utils_1.getPrevIndex)(index, totalViewRef.value, props.loop);
|
|
253
|
+
}
|
|
254
|
+
function getRealNextIndex(index = realIndexRef.value) {
|
|
255
|
+
return (0, utils_1.getNextIndex)(index, totalViewRef.value, props.loop);
|
|
256
|
+
}
|
|
257
|
+
function isRealPrev(slideOrIndex) {
|
|
258
|
+
const index = getSlideIndex(slideOrIndex);
|
|
259
|
+
return index !== null && getRealPrevIndex() === index;
|
|
260
|
+
}
|
|
261
|
+
function isRealNext(slideOrIndex) {
|
|
262
|
+
const index = getSlideIndex(slideOrIndex);
|
|
263
|
+
return index !== null && getRealNextIndex() === index;
|
|
264
|
+
}
|
|
265
|
+
function isRealActive(slideOrIndex) {
|
|
266
|
+
return realIndexRef.value === getSlideIndex(slideOrIndex);
|
|
267
|
+
}
|
|
268
|
+
// Display methods
|
|
269
|
+
// They are used to deal with the actual values displayed on the UI
|
|
270
|
+
function isDisplayActive(index) {
|
|
271
|
+
return displayIndexRef.value === index;
|
|
272
|
+
}
|
|
273
|
+
function isPrevDisabled() {
|
|
274
|
+
return getRealPrevIndex() === null;
|
|
275
|
+
}
|
|
276
|
+
function isNextDisabled() {
|
|
277
|
+
return getRealNextIndex() === null;
|
|
278
|
+
}
|
|
279
|
+
// Slide to
|
|
280
|
+
function to(index) {
|
|
281
|
+
const realIndex = (0, utils_1.getRealIndex)(index, duplicatedableRef.value);
|
|
282
|
+
if (index !== displayIndexRef.value || realIndex !== realIndexRef.value) {
|
|
283
|
+
toRealIndex(realIndex);
|
|
284
|
+
}
|
|
46
285
|
}
|
|
47
286
|
function prev() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
inTransition = true;
|
|
53
|
-
// no need for reset since transitionend handler will handle it
|
|
54
|
-
currentRef.value--;
|
|
287
|
+
const prevIndex = getRealPrevIndex();
|
|
288
|
+
if (prevIndex !== null) {
|
|
289
|
+
toRealIndex(prevIndex);
|
|
290
|
+
}
|
|
55
291
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
292
|
+
function next() {
|
|
293
|
+
const nextIndex = getRealNextIndex();
|
|
294
|
+
if (nextIndex !== null) {
|
|
295
|
+
toRealIndex(nextIndex);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
// Translate to
|
|
299
|
+
const translateStyleRef = (0, vue_1.ref)({});
|
|
300
|
+
let inTransition = false;
|
|
301
|
+
function updateTranslate(translate, speed = 0) {
|
|
302
|
+
const isVersical = props.direction === 'vertical';
|
|
303
|
+
translateStyleRef.value = Object.assign({}, transitionStyleRef.value, {
|
|
304
|
+
transform: isVersical
|
|
305
|
+
? `translateY(${-translate}px)`
|
|
306
|
+
: `translateX(${-translate}px)`,
|
|
307
|
+
transitionDuration: `${speed}ms`
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
function fixTranslate(speed = 0) {
|
|
311
|
+
if (translateableRef.value) {
|
|
312
|
+
translateTo(realIndexRef.value, speed);
|
|
313
|
+
}
|
|
314
|
+
else if (previousTranslate !== 0) {
|
|
315
|
+
updateTranslate((previousTranslate = 0), speed);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function translateTo(index, speed = speedRef.value) {
|
|
319
|
+
const translate = getTranslate(index);
|
|
320
|
+
if (translate !== previousTranslate && speed > 0) {
|
|
321
|
+
inTransition = true;
|
|
67
322
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
323
|
+
updateTranslate(translate, speed);
|
|
324
|
+
previousTranslate = getTranslate(realIndexRef.value);
|
|
325
|
+
}
|
|
326
|
+
function getTranslate(index) {
|
|
327
|
+
let translate;
|
|
328
|
+
// Deal with auto slides pre view
|
|
329
|
+
if (index >= totalViewRef.value - 1) {
|
|
330
|
+
translate = getLastViewTranslate();
|
|
72
331
|
}
|
|
73
332
|
else {
|
|
74
|
-
|
|
333
|
+
translate = slideTranlatesRef.value[index] || 0;
|
|
75
334
|
}
|
|
76
|
-
|
|
77
|
-
|
|
335
|
+
return translate;
|
|
336
|
+
}
|
|
337
|
+
function getLastViewTranslate() {
|
|
338
|
+
if (displaySlidesPerViewRef.value === 'auto') {
|
|
339
|
+
const { value: axis } = sizeAxisRef;
|
|
340
|
+
const { [axis]: perViewSize } = perViewSizeRef.value;
|
|
341
|
+
const { value: translates } = slideTranlatesRef;
|
|
342
|
+
const lastTranslate = translates[translates.length - 1];
|
|
343
|
+
let overallSize;
|
|
344
|
+
if (lastTranslate === undefined) {
|
|
345
|
+
overallSize = perViewSize;
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
const { value: slideSizes } = slideSizesRef;
|
|
349
|
+
overallSize = lastTranslate + slideSizes[slideSizes.length - 1][axis];
|
|
350
|
+
}
|
|
351
|
+
// Bring the last slide to the edge
|
|
352
|
+
return overallSize - perViewSize;
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
const { value: translates } = slideTranlatesRef;
|
|
356
|
+
return translates[totalViewRef.value - 1] || 0;
|
|
78
357
|
}
|
|
79
358
|
}
|
|
80
|
-
//
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
359
|
+
// Provide
|
|
360
|
+
function addSlide(slide) {
|
|
361
|
+
if (!slide)
|
|
362
|
+
return;
|
|
363
|
+
slidesElsRef.value.push(slide);
|
|
364
|
+
}
|
|
365
|
+
function removeSlide(slide) {
|
|
366
|
+
if (!slide)
|
|
86
367
|
return;
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (nextCurrent !== null) {
|
|
91
|
-
currentRef.value = nextCurrent;
|
|
92
|
-
void (0, vue_1.nextTick)(() => {
|
|
93
|
-
target.style.transition = 'none';
|
|
94
|
-
void target.offsetWidth;
|
|
95
|
-
target.style.transition = '';
|
|
96
|
-
inTransition = false;
|
|
97
|
-
});
|
|
368
|
+
const index = getSlideIndex(slide);
|
|
369
|
+
if (index !== -1) {
|
|
370
|
+
slidesElsRef.value.splice(index, 1);
|
|
98
371
|
}
|
|
99
|
-
|
|
100
|
-
|
|
372
|
+
}
|
|
373
|
+
function getSlideIndex(slideOrIndex) {
|
|
374
|
+
return typeof slideOrIndex === 'number'
|
|
375
|
+
? slideOrIndex
|
|
376
|
+
: slidesElsRef.value.indexOf(slideOrIndex);
|
|
377
|
+
}
|
|
378
|
+
function getSlideStyle(slide) {
|
|
379
|
+
const index = getSlideIndex(slide);
|
|
380
|
+
if (index !== -1) {
|
|
381
|
+
return slideStylesRef.value[index];
|
|
101
382
|
}
|
|
102
383
|
}
|
|
103
|
-
function
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
384
|
+
function onCarouselItemClick(index, event) {
|
|
385
|
+
const isTryDrag = 4 /* PROGRESS */ | 8 /* SUCCESS */ | 16 /* FAIL */;
|
|
386
|
+
let allowClick = !inTransition && !(dragStatus & isTryDrag);
|
|
387
|
+
if (props.effect === 'card' &&
|
|
388
|
+
!userWantsControlRef.value &&
|
|
389
|
+
!(dragStatus & 8 /* SUCCESS */) &&
|
|
390
|
+
!isRealActive(index)) {
|
|
391
|
+
to(index);
|
|
392
|
+
allowClick = false;
|
|
393
|
+
}
|
|
394
|
+
if (!allowClick) {
|
|
395
|
+
event.preventDefault();
|
|
396
|
+
event.stopPropagation();
|
|
109
397
|
}
|
|
110
398
|
}
|
|
399
|
+
const carouselMethods = {
|
|
400
|
+
to,
|
|
401
|
+
prev: () => {
|
|
402
|
+
// wait transition end
|
|
403
|
+
if (!inTransition || !duplicatedableRef.value)
|
|
404
|
+
prev();
|
|
405
|
+
},
|
|
406
|
+
next: () => {
|
|
407
|
+
// wait transition end
|
|
408
|
+
if (!inTransition || !duplicatedableRef.value)
|
|
409
|
+
next();
|
|
410
|
+
},
|
|
411
|
+
isVertical: () => verticalRef.value,
|
|
412
|
+
isHorizontal: () => !verticalRef.value,
|
|
413
|
+
isPrev: isRealPrev,
|
|
414
|
+
isNext: isRealNext,
|
|
415
|
+
isActive: isRealActive,
|
|
416
|
+
isPrevDisabled,
|
|
417
|
+
isNextDisabled,
|
|
418
|
+
getCurrentIndex: () => displayIndexRef.value,
|
|
419
|
+
getSlideIndex,
|
|
420
|
+
getSlideStyle,
|
|
421
|
+
addSlide,
|
|
422
|
+
removeSlide,
|
|
423
|
+
onCarouselItemClick
|
|
424
|
+
};
|
|
425
|
+
(0, vue_1.provide)(interface_1.carouselMethodsInjectionKey, carouselMethods);
|
|
426
|
+
// Autoplay
|
|
427
|
+
let autoplayTimer = null;
|
|
428
|
+
function resetAutoplay(cleanOnly) {
|
|
429
|
+
if (autoplayTimer) {
|
|
430
|
+
clearInterval(autoplayTimer);
|
|
431
|
+
autoplayTimer = null;
|
|
432
|
+
}
|
|
433
|
+
const { autoplay, interval } = props;
|
|
434
|
+
if (autoplay && interval && !cleanOnly) {
|
|
435
|
+
autoplayTimer = setInterval(next, interval);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
function mesureAutoplay() {
|
|
439
|
+
const { autoplay } = props;
|
|
440
|
+
if (autoplay) {
|
|
441
|
+
resetAutoplay();
|
|
442
|
+
}
|
|
443
|
+
else if (displayTotalViewRef.value < 2) {
|
|
444
|
+
resetAutoplay(true);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
// Drag
|
|
111
448
|
let dragStartX = 0;
|
|
112
449
|
let dragStartY = 0;
|
|
450
|
+
let dragOffset = 0;
|
|
113
451
|
let dragStartTime = 0;
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
touchingRef.value = true;
|
|
126
|
-
dragStartTime = Date.now();
|
|
127
|
-
dragStartY = e.touches[0].clientY;
|
|
452
|
+
let dragStatus = 1 /* NORMAL */;
|
|
453
|
+
function handleTouchstart(event) {
|
|
454
|
+
if (globalDragging)
|
|
455
|
+
return;
|
|
456
|
+
dragStartTime = Date.now();
|
|
457
|
+
dragStatus = 2 /* START */;
|
|
458
|
+
globalDragging = true;
|
|
459
|
+
resetAutoplay(true /** cleanOnly */);
|
|
460
|
+
if (event.type !== 'touchstart' &&
|
|
461
|
+
!event.target.isContentEditable) {
|
|
462
|
+
event.preventDefault();
|
|
128
463
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
touchingRef.value = true;
|
|
133
|
-
dragStartTime = Date.now();
|
|
134
|
-
dragStartX = e.touches[0].clientX;
|
|
135
|
-
}
|
|
136
|
-
(0, evtd_1.on)('touchmove', document, handleTouchmove);
|
|
137
|
-
(0, evtd_1.on)('touchend', document, handleTouchend);
|
|
138
|
-
(0, evtd_1.on)('touchcancel', document, handleTouchend);
|
|
139
|
-
}
|
|
140
|
-
function handleTouchmove(e) {
|
|
141
|
-
const { value: dotPlacement } = dotPlacementRef;
|
|
142
|
-
if (dotPlacement === 'left' || dotPlacement === 'right') {
|
|
143
|
-
const dragOffset = e.touches[0].clientY - dragStartY;
|
|
144
|
-
dragOffsetRef.value =
|
|
145
|
-
dragOffset > memorizedContainerHeight
|
|
146
|
-
? memorizedContainerHeight
|
|
147
|
-
: dragOffset < -memorizedContainerHeight
|
|
148
|
-
? -memorizedContainerHeight
|
|
149
|
-
: dragOffset;
|
|
464
|
+
const touchEvent = (0, utils_1.isTouchEvent)(event) ? event.touches[0] : event;
|
|
465
|
+
if (verticalRef.value) {
|
|
466
|
+
dragStartY = touchEvent.clientY;
|
|
150
467
|
}
|
|
151
468
|
else {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
469
|
+
dragStartX = touchEvent.clientX;
|
|
470
|
+
}
|
|
471
|
+
if (props.touchable) {
|
|
472
|
+
(0, evtd_1.on)('touchmove', document, handleTouchmove);
|
|
473
|
+
(0, evtd_1.on)('touchend', document, handleTouchend);
|
|
474
|
+
(0, evtd_1.on)('touchcancel', document, handleTouchend);
|
|
475
|
+
}
|
|
476
|
+
if (props.draggable) {
|
|
477
|
+
(0, evtd_1.on)('mousemove', document, handleTouchmove);
|
|
478
|
+
(0, evtd_1.on)('mouseup', document, handleTouchend);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
function handleTouchmove(event) {
|
|
482
|
+
const { value: vertical } = verticalRef;
|
|
483
|
+
const axis = vertical ? 'height' : 'width';
|
|
484
|
+
const perViewSize = perViewSizeRef.value[axis];
|
|
485
|
+
const touchEvent = (0, utils_1.isTouchEvent)(event) ? event.touches[0] : event;
|
|
486
|
+
const offset = vertical
|
|
487
|
+
? touchEvent.clientY - dragStartY
|
|
488
|
+
: touchEvent.clientX - dragStartX;
|
|
489
|
+
dragOffset = (0, utils_1.clampValue)(offset, -perViewSize, perViewSize);
|
|
490
|
+
dragStatus = 4 /* PROGRESS */;
|
|
491
|
+
if (translateableRef.value) {
|
|
492
|
+
updateTranslate(previousTranslate - dragOffset, 0);
|
|
159
493
|
}
|
|
160
494
|
}
|
|
161
495
|
function handleTouchend() {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
else if (dragOffset < -offsetHeight / 2 ||
|
|
179
|
-
dragOffset / duration < -0.4) {
|
|
180
|
-
next();
|
|
496
|
+
const duration = Date.now() - dragStartTime;
|
|
497
|
+
const { value: axis } = sizeAxisRef;
|
|
498
|
+
const { value: realIndex } = realIndexRef;
|
|
499
|
+
const { value: translateable } = translateableRef;
|
|
500
|
+
let currentIndex = realIndex;
|
|
501
|
+
if (!inTransition && translateable && dragOffset !== 0) {
|
|
502
|
+
const currentTranslate = previousTranslate - dragOffset;
|
|
503
|
+
const translates = [
|
|
504
|
+
...slideTranlatesRef.value.slice(0, totalViewRef.value - 1),
|
|
505
|
+
getLastViewTranslate()
|
|
506
|
+
];
|
|
507
|
+
let prevOffset = null;
|
|
508
|
+
for (let i = 0; i < translates.length; i++) {
|
|
509
|
+
const offset = Math.abs(translates[i] - currentTranslate);
|
|
510
|
+
if (prevOffset !== null && prevOffset < offset) {
|
|
511
|
+
break;
|
|
181
512
|
}
|
|
513
|
+
prevOffset = offset;
|
|
514
|
+
currentIndex = i;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
if (currentIndex === realIndex) {
|
|
518
|
+
const perViewSize = perViewSizeRef.value[axis];
|
|
519
|
+
// more than 50% width or faster than 0.4px per ms
|
|
520
|
+
if (dragOffset > perViewSize / 2 || dragOffset / duration > 0.4) {
|
|
521
|
+
currentIndex = getRealPrevIndex(realIndex);
|
|
522
|
+
}
|
|
523
|
+
else if (dragOffset < -perViewSize / 2 ||
|
|
524
|
+
dragOffset / duration < -0.4) {
|
|
525
|
+
currentIndex = getRealNextIndex(realIndex);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if (currentIndex !== null && currentIndex !== realIndex) {
|
|
529
|
+
dragStatus = 8 /* SUCCESS */;
|
|
530
|
+
toRealIndex(currentIndex);
|
|
531
|
+
}
|
|
532
|
+
else {
|
|
533
|
+
if (dragStatus & 4 /* PROGRESS */) {
|
|
534
|
+
dragStatus = 16 /* FAIL */;
|
|
182
535
|
}
|
|
183
536
|
else {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
537
|
+
dragStatus = 32 /* END */;
|
|
538
|
+
}
|
|
539
|
+
fixTranslate(speedRef.value);
|
|
540
|
+
}
|
|
541
|
+
mesureAutoplay();
|
|
542
|
+
resetDragStatus();
|
|
543
|
+
}
|
|
544
|
+
function resetDragStatus() {
|
|
545
|
+
if (!(dragStatus & 1 /* NORMAL */)) {
|
|
546
|
+
globalDragging = false;
|
|
547
|
+
if (dragStatus & (2 /* START */ | 4 /* PROGRESS */)) {
|
|
548
|
+
dragStatus = 1 /* NORMAL */;
|
|
191
549
|
}
|
|
192
550
|
}
|
|
193
|
-
|
|
551
|
+
dragStartX = 0;
|
|
552
|
+
dragStartY = 0;
|
|
553
|
+
dragOffset = 0;
|
|
554
|
+
dragStartTime = 0;
|
|
194
555
|
(0, evtd_1.off)('touchmove', document, handleTouchmove);
|
|
195
556
|
(0, evtd_1.off)('touchend', document, handleTouchend);
|
|
196
557
|
(0, evtd_1.off)('touchcancel', document, handleTouchend);
|
|
558
|
+
(0, evtd_1.off)('mousemove', document, handleTouchmove);
|
|
559
|
+
(0, evtd_1.off)('mouseup', document, handleTouchend);
|
|
197
560
|
}
|
|
198
|
-
function
|
|
199
|
-
|
|
200
|
-
|
|
561
|
+
function handleTransitionEnd() {
|
|
562
|
+
const { value: virtualIndex } = virtualIndexRef;
|
|
563
|
+
const { value: realIndex } = realIndexRef;
|
|
564
|
+
if (inTransition && virtualIndex !== realIndex) {
|
|
565
|
+
translateTo(realIndex, 0);
|
|
201
566
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
567
|
+
else {
|
|
568
|
+
resetAutoplay();
|
|
569
|
+
}
|
|
570
|
+
if (translateableRef.value) {
|
|
571
|
+
translateStyleRef.value.transitionDuration = '0ms';
|
|
206
572
|
}
|
|
207
|
-
|
|
208
|
-
next();
|
|
209
|
-
}, props.interval);
|
|
573
|
+
inTransition = false;
|
|
210
574
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
575
|
+
function handleMousewheel(event) {
|
|
576
|
+
event.preventDefault();
|
|
577
|
+
if (inTransition)
|
|
578
|
+
return;
|
|
579
|
+
const { value: vertical } = verticalRef;
|
|
580
|
+
let { deltaX, deltaY } = event;
|
|
581
|
+
if (event.shiftKey && !deltaX) {
|
|
582
|
+
deltaX = deltaY;
|
|
583
|
+
}
|
|
584
|
+
const P_MULTIPLIER = -1;
|
|
585
|
+
const N_MULTIPLIER = 1;
|
|
586
|
+
const MULTIPLIER = (deltaX || deltaY) > 0 ? N_MULTIPLIER : P_MULTIPLIER;
|
|
587
|
+
let rx = 0;
|
|
588
|
+
let ry = 0;
|
|
589
|
+
if (vertical) {
|
|
590
|
+
ry = MULTIPLIER;
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
rx = MULTIPLIER;
|
|
594
|
+
}
|
|
595
|
+
const RESPONSE_STEP = 10;
|
|
596
|
+
if (ry * deltaY >= RESPONSE_STEP || rx * deltaX >= RESPONSE_STEP) {
|
|
597
|
+
if (MULTIPLIER === N_MULTIPLIER && !isNextDisabled()) {
|
|
598
|
+
next();
|
|
215
599
|
}
|
|
216
|
-
else {
|
|
217
|
-
|
|
218
|
-
window.clearInterval(timerId);
|
|
219
|
-
}
|
|
600
|
+
else if (MULTIPLIER === P_MULTIPLIER && !isPrevDisabled()) {
|
|
601
|
+
prev();
|
|
220
602
|
}
|
|
221
|
-
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
function handleResize() {
|
|
606
|
+
perViewSizeRef.value = (0, utils_1.calculateSize)(selfElRef.value, true);
|
|
607
|
+
resetAutoplay();
|
|
608
|
+
}
|
|
609
|
+
function handleSlideResize() {
|
|
610
|
+
var _a, _b;
|
|
611
|
+
if (autoSlideSizeRef.value) {
|
|
612
|
+
(_b = (_a = slideSizesRef.effect).scheduler) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
613
|
+
slideSizesRef.effect.run();
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
(0, vue_1.onMounted)(() => {
|
|
617
|
+
(0, vue_1.watchEffect)(mesureAutoplay);
|
|
618
|
+
void (0, vue_1.nextTick)(() => (isMounted = true));
|
|
222
619
|
});
|
|
223
620
|
(0, vue_1.onBeforeUnmount)(() => {
|
|
224
|
-
|
|
225
|
-
|
|
621
|
+
resetDragStatus();
|
|
622
|
+
resetAutoplay(true);
|
|
623
|
+
});
|
|
624
|
+
// Fix index when remounting
|
|
625
|
+
(0, vue_1.onUpdated)(() => {
|
|
626
|
+
const { value: slidesEls } = slidesElsRef;
|
|
627
|
+
const { value: slideVNodes } = slideVNodesRef;
|
|
628
|
+
const indexMap = new Map();
|
|
629
|
+
const getDisplayIndex = (el) =>
|
|
630
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
631
|
+
indexMap.has(el) ? indexMap.get(el) : -1;
|
|
632
|
+
let isChanged = false;
|
|
633
|
+
for (let i = 0; i < slidesEls.length; i++) {
|
|
634
|
+
const index = slideVNodes.findIndex((v) => v.el === slidesEls[i]);
|
|
635
|
+
if (index !== i) {
|
|
636
|
+
isChanged = true;
|
|
637
|
+
}
|
|
638
|
+
indexMap.set(slidesEls[i], index);
|
|
639
|
+
}
|
|
640
|
+
if (isChanged) {
|
|
641
|
+
slidesEls.sort((a, b) => getDisplayIndex(a) - getDisplayIndex(b));
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
(0, vue_1.watch)((0, vue_1.toRef)(props, 'currentIndex'), (index) => index !== undefined && to(index));
|
|
645
|
+
(0, vue_1.watch)(duplicatedableRef, () => void (0, vue_1.nextTick)(() => to(displayIndexRef.value)));
|
|
646
|
+
(0, vue_1.watch)(slideTranlatesRef, () => translateableRef.value && fixTranslate(), {
|
|
647
|
+
deep: true
|
|
648
|
+
});
|
|
649
|
+
(0, vue_1.watch)(translateableRef, (value) => {
|
|
650
|
+
if (!value) {
|
|
651
|
+
inTransition = false;
|
|
652
|
+
// if the current mode does not support translate, reset the position of the wrapper
|
|
653
|
+
updateTranslate((previousTranslate = 0));
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
fixTranslate();
|
|
226
657
|
}
|
|
227
658
|
});
|
|
659
|
+
const caroulseSlotProps = {
|
|
660
|
+
arrowSlotProps: (0, vue_1.computed)(() => (Object.assign({ total: displayTotalViewRef.value, currentIndex: displayIndexRef.value }, (0, _utils_1.keep)(carouselMethods, [
|
|
661
|
+
'to',
|
|
662
|
+
'prev',
|
|
663
|
+
'next',
|
|
664
|
+
'isPrevDisabled',
|
|
665
|
+
'isNextDisabled'
|
|
666
|
+
])))),
|
|
667
|
+
dotSlotProps: (0, vue_1.computed)(() => ({
|
|
668
|
+
total: displayTotalViewRef.value,
|
|
669
|
+
currentIndex: displayIndexRef.value,
|
|
670
|
+
to
|
|
671
|
+
}))
|
|
672
|
+
};
|
|
673
|
+
const caroulseExposedMethod = {
|
|
674
|
+
getCurrentIndex: () => displayIndexRef.value,
|
|
675
|
+
to: to,
|
|
676
|
+
prev: prev,
|
|
677
|
+
next: next
|
|
678
|
+
};
|
|
228
679
|
const themeRef = (0, _mixins_1.useTheme)('Carousel', 'Carousel', index_cssr_1.default, styles_1.carouselLight, props);
|
|
229
|
-
return {
|
|
230
|
-
selfElRef,
|
|
231
|
-
mergedClsPrefix: mergedClsPrefixRef,
|
|
232
|
-
current: currentRef,
|
|
233
|
-
lengthRef,
|
|
234
|
-
touching: touchingRef,
|
|
235
|
-
dragOffset: dragOffsetRef,
|
|
236
|
-
prev,
|
|
237
|
-
next,
|
|
238
|
-
setCurrent,
|
|
239
|
-
handleKeydown,
|
|
240
|
-
handleTouchstart,
|
|
680
|
+
return Object.assign(Object.assign(Object.assign({ mergedClsPrefix: mergedClsPrefixRef, selfElRef, slideVNodes: slideVNodesRef, duplicatedable: duplicatedableRef, userWantsControl: userWantsControlRef, autoSlideSize: autoSlideSizeRef, displayIndex: displayIndexRef, realIndex: realIndexRef, slideStyles: slideStylesRef, translateStyle: translateStyleRef, handleTouchstart,
|
|
241
681
|
handleTransitionEnd,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
682
|
+
handleMousewheel,
|
|
683
|
+
handleResize,
|
|
684
|
+
handleSlideResize, isActive: isDisplayActive }, caroulseSlotProps), caroulseExposedMethod), { cssVars: (0, vue_1.computed)(() => {
|
|
685
|
+
const { common: { cubicBezierEaseInOut }, self: { dotSize, dotColor, dotColorActive, dotColorFocus, dotLineWidth, dotLineWidthActive, arrowColor } } = themeRef.value;
|
|
245
686
|
return {
|
|
246
|
-
'--bezier': cubicBezierEaseInOut,
|
|
247
|
-
'--dot-color': dotColor,
|
|
248
|
-
'--dot-color-
|
|
249
|
-
'--dot-
|
|
250
|
-
'--
|
|
687
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
688
|
+
'--n-dot-color': dotColor,
|
|
689
|
+
'--n-dot-color-focus': dotColorFocus,
|
|
690
|
+
'--n-dot-color-active': dotColorActive,
|
|
691
|
+
'--n-dot-size': dotSize,
|
|
692
|
+
'--n-dot-line-width': dotLineWidth,
|
|
693
|
+
'--n-dot-line-width-active': dotLineWidthActive,
|
|
694
|
+
'--n-arrow-color': arrowColor
|
|
251
695
|
};
|
|
252
|
-
})
|
|
253
|
-
};
|
|
696
|
+
}) });
|
|
254
697
|
},
|
|
255
698
|
render() {
|
|
256
|
-
const { showArrow,
|
|
257
|
-
const children = (0, _utils_1.flatten)(
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
699
|
+
const { mergedClsPrefix, showArrow, userWantsControl, draggable, touchable, slideStyles, dotType, dotPlacement, transitionProps = {}, arrowSlotProps, dotSlotProps, $slots: { default: defaultSlot, dots: dotsSlot, arrow: arrowSlot } } = this;
|
|
700
|
+
const children = (defaultSlot && (0, _utils_1.flatten)(defaultSlot())) || [];
|
|
701
|
+
let slides = filterCarouselItem(children);
|
|
702
|
+
if (!slides.length) {
|
|
703
|
+
slides = children.map((ch) => ((0, vue_1.h)(CarouselItem_1.default, null, {
|
|
704
|
+
default: () => (0, vue_1.cloneVNode)(ch)
|
|
705
|
+
})));
|
|
706
|
+
}
|
|
707
|
+
const { length: realLength } = slides;
|
|
708
|
+
if (realLength > 1 && this.duplicatedable) {
|
|
709
|
+
slides.push(duplicateSlide(slides[0], 0, 'append'));
|
|
710
|
+
slides.unshift(duplicateSlide(slides[realLength - 1], realLength - 1, 'prepend'));
|
|
711
|
+
}
|
|
712
|
+
this.slideVNodes.value = slides;
|
|
713
|
+
// When users need to customize the size of the slide,
|
|
714
|
+
// we listen to them to fix the current translate
|
|
715
|
+
if (this.autoSlideSize) {
|
|
716
|
+
slides = slides.map((slide) => ((0, vue_1.h)(vueuc_1.VResizeObserver, { onResize: this.handleSlideResize }, {
|
|
717
|
+
default: () => slide
|
|
718
|
+
})));
|
|
719
|
+
}
|
|
720
|
+
return ((0, vue_1.h)("div", { ref: "selfElRef", class: [
|
|
265
721
|
`${mergedClsPrefix}-carousel`,
|
|
266
|
-
`${mergedClsPrefix}-carousel--${
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
? (e) => {
|
|
285
|
-
e.preventDefault();
|
|
286
|
-
}
|
|
287
|
-
: undefined, onKeydown: (e) => this.handleKeydown(e, i + 1) }));
|
|
288
|
-
})),
|
|
289
|
-
showArrow && [
|
|
290
|
-
(0, vue_1.h)("div", { class: [
|
|
291
|
-
`${mergedClsPrefix}-carousel__arrow`,
|
|
292
|
-
`${mergedClsPrefix}-carousel__arrow--${vertical ? 'bottom' : 'right'}`
|
|
293
|
-
], role: "button", onClick: () => {
|
|
294
|
-
this.next();
|
|
295
|
-
} },
|
|
296
|
-
(0, vue_1.h)(icons_1.ForwardIcon, null)),
|
|
297
|
-
(0, vue_1.h)("div", { class: [
|
|
298
|
-
`${mergedClsPrefix}-carousel__arrow`,
|
|
299
|
-
`${mergedClsPrefix}-carousel__arrow--${vertical ? 'top' : 'left'}`
|
|
300
|
-
], role: "button", onClick: () => {
|
|
301
|
-
this.prev();
|
|
302
|
-
} },
|
|
303
|
-
(0, vue_1.h)(icons_1.BackwardIcon, null))
|
|
304
|
-
]));
|
|
722
|
+
`${mergedClsPrefix}-carousel--${dotPlacement}`,
|
|
723
|
+
`${mergedClsPrefix}-carousel--${this.direction}`,
|
|
724
|
+
`${mergedClsPrefix}-carousel--${this.effect}`,
|
|
725
|
+
userWantsControl && `${mergedClsPrefix}-carousel--usercontrol`
|
|
726
|
+
], style: this.cssVars },
|
|
727
|
+
(0, vue_1.h)(vueuc_1.VResizeObserver, { onResize: this.handleResize }, {
|
|
728
|
+
default: () => ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-carousel__slides`, role: "listbox", style: this.translateStyle, onMousedown: draggable ? this.handleTouchstart : undefined, onTouchstart: touchable ? this.handleTouchstart : undefined, onWheel: this.mousewheel ? this.handleMousewheel : undefined, onTransitionend: this.handleTransitionEnd }, userWantsControl
|
|
729
|
+
? slides.map((slide, i) => ((0, vue_1.h)("div", { style: slideStyles[i], key: i }, (0, vue_1.withDirectives)((0, vue_1.h)(vue_1.Transition, Object.assign({}, transitionProps), {
|
|
730
|
+
default: () => slide
|
|
731
|
+
}), [[vue_1.vShow, this.isActive(i)]]))))
|
|
732
|
+
: slides))
|
|
733
|
+
}),
|
|
734
|
+
this.showDots &&
|
|
735
|
+
(dotsSlot
|
|
736
|
+
? dotsSlot(dotSlotProps)
|
|
737
|
+
: dotSlotProps.total > 1 && ((0, vue_1.h)(CarouselDots_1.default, { key: dotType + dotPlacement, total: dotSlotProps.total, currentIndex: dotSlotProps.currentIndex, dotType: dotType, trigger: this.trigger, keyboard: this.keyboard }))),
|
|
738
|
+
showArrow &&
|
|
739
|
+
(arrowSlot ? arrowSlot(arrowSlotProps) : (0, vue_1.h)(CarouselArrow_1.default, null))));
|
|
305
740
|
}
|
|
306
741
|
});
|
|
742
|
+
function filterCarouselItem(vnodes, carouselItems = []) {
|
|
743
|
+
if (Array.isArray(vnodes)) {
|
|
744
|
+
vnodes.forEach((vnode) => {
|
|
745
|
+
if (vnode.type && vnode.type.name === 'CarouselItem') {
|
|
746
|
+
carouselItems.push(vnode);
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
return carouselItems;
|
|
751
|
+
}
|
|
752
|
+
function duplicateSlide(child, index, position) {
|
|
753
|
+
return (0, vue_1.cloneVNode)(child, {
|
|
754
|
+
// for patch
|
|
755
|
+
key: `carousel-item-duplicate-${index}-${position}`
|
|
756
|
+
});
|
|
757
|
+
}
|