naive-ui 2.41.1 → 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3349 -1068
- package/dist/index.mjs +3339 -1070
- package/dist/index.prod.js +1 -1
- package/dist/index.prod.mjs +1 -1
- package/es/_internal/icon/src/styles/index.cssr.mjs +0 -1
- package/es/_internal/icons/replaceable.mjs +1 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +3 -3
- package/es/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/es/_internal/selection/src/Selection.d.ts +115 -13
- package/es/_internal/selection/styles/light.d.ts +14 -1
- package/es/_mixins/use-theme.mjs +1 -1
- package/es/_utils/index.d.ts +1 -0
- package/es/_utils/naive/prop.d.ts +19 -10
- package/es/_utils/naive/prop.mjs +21 -21
- package/es/_utils/ts/ts.d.ts +3 -0
- package/es/alert/src/Alert.d.ts +2 -2
- package/es/anchor/index.d.ts +1 -0
- package/es/anchor/src/AnchorAdapter.d.ts +1 -1
- package/es/anchor/src/BaseAnchor.mjs +29 -5
- package/es/anchor/src/Link.d.ts +3 -2
- package/es/anchor/src/Link.mjs +5 -2
- package/es/anchor/src/public-types.d.ts +5 -0
- package/es/anchor/src/public-types.mjs +1 -0
- package/es/auto-complete/src/AutoComplete.d.ts +155 -14
- package/es/auto-complete/styles/light.d.ts +14 -1
- package/es/avatar-group/index.d.ts +3 -2
- package/es/avatar-group/src/AvatarGroup.d.ts +1 -4
- package/es/avatar-group/src/generic-public-types.d.ts +18 -0
- package/es/avatar-group/src/generic-public-types.mjs +1 -0
- package/es/avatar-group/src/public-types.d.ts +10 -0
- package/es/avatar-group/src/public-types.mjs +1 -0
- package/es/back-top/src/BackTop.d.ts +1 -1
- package/es/badge/src/Badge.d.ts +1 -1
- package/es/button/src/Button.d.ts +1 -1
- package/es/card/src/Card.d.ts +7 -2
- package/es/card/src/Card.mjs +3 -1
- package/es/carousel/src/Carousel.d.ts +4 -4
- package/es/carousel/src/Carousel.mjs +2 -2
- package/es/carousel/src/CarouselDots.d.ts +2 -2
- package/es/carousel/src/CarouselItem.mjs +1 -1
- package/es/cascader/src/Cascader.d.ts +163 -20
- package/es/cascader/src/CascaderMenu.d.ts +56 -4
- package/es/cascader/src/CascaderOption.d.ts +56 -4
- package/es/cascader/src/CascaderSelectMenu.d.ts +57 -5
- package/es/cascader/src/CascaderSubmenu.d.ts +56 -4
- package/es/cascader/styles/light.d.ts +14 -1
- package/es/color-picker/src/ColorInputUnit.d.ts +26 -2
- package/es/color-picker/src/ColorPicker.d.ts +128 -11
- package/es/color-picker/src/ColorPickerTrigger.mjs +2 -1
- package/es/color-picker/src/utils.d.ts +2 -0
- package/es/color-picker/src/utils.mjs +23 -0
- package/es/color-picker/styles/light.d.ts +17 -4
- package/es/components.d.ts +1 -0
- package/es/components.mjs +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +1 -1
- package/es/config-provider/src/ConfigProvider.mjs +1 -1
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/src/DataTable.d.ts +690 -68
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +334 -26
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +332 -24
- package/es/data-table/src/TableParts/Body.d.ts +332 -24
- package/es/data-table/src/TableParts/Cell.mjs +1 -1
- package/es/data-table/src/TableParts/Header.d.ts +332 -24
- package/es/data-table/src/interface.d.ts +253 -18
- package/es/data-table/src/use-sorter.d.ts +2 -5
- package/es/data-table/src/use-table-data.d.ts +1 -4
- package/es/data-table/src/utils.mjs +4 -1
- package/es/data-table/styles/light.d.ts +84 -6
- package/es/date-picker/src/DatePicker.d.ts +229 -23
- package/es/date-picker/src/DatePicker.mjs +1 -1
- package/es/date-picker/src/panel/date.d.ts +110 -10
- package/es/date-picker/src/panel/daterange.d.ts +111 -11
- package/es/date-picker/src/panel/datetime.d.ts +111 -11
- package/es/date-picker/src/panel/datetime.mjs +1 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +112 -12
- package/es/date-picker/src/panel/datetimerange.mjs +2 -2
- package/es/date-picker/src/panel/month.d.ts +110 -10
- package/es/date-picker/src/panel/monthrange.d.ts +111 -11
- package/es/date-picker/src/panel/panelHeader.d.ts +436 -36
- package/es/date-picker/src/panel/use-calendar.d.ts +109 -9
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +110 -10
- package/es/date-picker/src/panel/use-dual-calendar.mjs +3 -3
- package/es/date-picker/src/panel/use-panel-common.d.ts +109 -9
- package/es/date-picker/src/panel/use-panel-common.mjs +1 -1
- package/es/date-picker/src/props.d.ts +85 -7
- package/es/date-picker/src/props.mjs +1 -1
- package/es/date-picker/src/utils.d.ts +2 -1
- package/es/date-picker/src/utils.mjs +4 -1
- package/es/date-picker/styles/light.d.ts +28 -2
- package/es/dialog/src/Dialog.d.ts +9 -6
- package/es/dialog/src/Dialog.mjs +1 -0
- package/es/dialog/src/DialogEnvironment.d.ts +11 -4
- package/es/dialog/src/DialogEnvironment.mjs +3 -0
- package/es/dialog/src/DialogProvider.d.ts +38 -34
- package/es/dialog/src/dialogProps.d.ts +2 -1
- package/es/dialog/src/dialogProps.mjs +2 -1
- package/es/drawer/src/Drawer.d.ts +4 -4
- package/es/drawer/src/DrawerBodyWrapper.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +165 -24
- package/es/dropdown/src/DropdownMenu.d.ts +2 -2
- package/es/dropdown/src/DropdownOption.d.ts +2 -2
- package/es/dropdown/styles/light.d.ts +16 -3
- package/es/dynamic-input/src/DynamicInput.d.ts +153 -12
- package/es/dynamic-input/src/InputPreset.d.ts +52 -4
- package/es/dynamic-input/src/PairPreset.d.ts +52 -4
- package/es/dynamic-input/styles/light.d.ts +14 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +153 -12
- package/es/dynamic-tags/styles/light.d.ts +14 -1
- package/es/element/src/Element.mjs +1 -1
- package/es/ellipsis/src/Ellipsis.d.ts +154 -11
- package/es/ellipsis/src/PerformantEllipsis.d.ts +84 -6
- package/es/ellipsis/styles/light.d.ts +14 -1
- package/es/empty/src/Empty.d.ts +1 -1
- package/es/form/src/FormItem.d.ts +8 -2
- package/es/form/src/FormItem.mjs +6 -3
- package/es/form/src/FormItemCol.d.ts +7 -1
- package/es/form/src/FormItemGridItem.d.ts +7 -1
- package/es/form/src/FormItemRow.d.ts +7 -1
- package/es/form/src/utils.d.ts +1 -1
- package/es/form/src/utils.mjs +1 -1
- package/es/global-style/src/GlobalStyle.mjs +1 -1
- package/es/gradient-text/src/GradientText.d.ts +2 -2
- package/es/grid/src/GridItem.d.ts +1 -1
- package/es/heatmap/index.d.ts +6 -0
- package/es/heatmap/index.mjs +4 -0
- package/es/heatmap/src/ColorIndicator.d.ts +25 -0
- package/es/heatmap/src/ColorIndicator.mjs +41 -0
- package/es/heatmap/src/Heatmap.d.ts +385 -0
- package/es/heatmap/src/Heatmap.mjs +333 -0
- package/es/heatmap/src/Rect.d.ts +57 -0
- package/es/heatmap/src/Rect.mjs +67 -0
- package/es/heatmap/src/animationStyle.d.ts +6 -0
- package/es/heatmap/src/animationStyle.mjs +51 -0
- package/es/heatmap/src/interface.d.ts +7 -0
- package/es/heatmap/src/interface.mjs +1 -0
- package/es/heatmap/src/public-types.d.ts +16 -0
- package/es/heatmap/src/public-types.mjs +1 -0
- package/es/heatmap/src/styles/index.cssr.d.ts +2 -0
- package/es/heatmap/src/styles/index.cssr.mjs +102 -0
- package/es/heatmap/src/styles/rtl.cssr.d.ts +2 -0
- package/es/heatmap/src/styles/rtl.cssr.mjs +4 -0
- package/es/heatmap/src/theme.d.ts +8 -0
- package/es/heatmap/src/theme.mjs +7 -0
- package/es/heatmap/src/utils/index.d.ts +32 -0
- package/es/heatmap/src/utils/index.mjs +148 -0
- package/es/heatmap/styles/dark.d.ts +3 -0
- package/es/heatmap/styles/dark.mjs +16 -0
- package/es/heatmap/styles/index.d.ts +3 -0
- package/es/heatmap/styles/index.mjs +2 -0
- package/es/heatmap/styles/light.d.ts +31 -0
- package/es/heatmap/styles/light.mjs +45 -0
- package/es/heatmap/styles/rtl.d.ts +2 -0
- package/es/heatmap/styles/rtl.mjs +5 -0
- package/es/highlight/src/utils.mjs +10 -10
- package/es/icon/src/styles/index.cssr.mjs +0 -1
- package/es/image/index.d.ts +3 -1
- package/es/image/index.mjs +2 -1
- package/es/image/src/Image.d.ts +133 -23
- package/es/image/src/Image.mjs +48 -23
- package/es/image/src/ImageGroup.d.ts +200 -35
- package/es/image/src/ImageGroup.mjs +130 -26
- package/es/image/src/ImagePreview.d.ts +258 -23
- package/es/image/src/ImagePreview.mjs +84 -42
- package/es/image/src/interface.d.ts +42 -3
- package/es/image/src/public-types.d.ts +14 -0
- package/es/image/styles/light.d.ts +14 -1
- package/es/input/src/Input.d.ts +146 -12
- package/es/input/src/Input.mjs +6 -4
- package/es/input/src/InputGroupLabel.d.ts +129 -22
- package/es/input/src/InputGroupLabel.mjs +14 -8
- package/es/input/styles/dark.d.ts +139 -2
- package/es/input/styles/dark.mjs +114 -108
- package/es/input/styles/light.d.ts +76 -3
- package/es/input/styles/light.mjs +7 -2
- package/es/input-number/src/InputNumber.d.ts +152 -11
- package/es/input-number/styles/light.d.ts +14 -1
- package/es/input-otp/src/InputOtp.d.ts +158 -12
- package/es/input-otp/src/InputOtp.mjs +12 -4
- package/es/input-otp/src/public-types.d.ts +1 -0
- package/es/input-otp/src/styles/index.cssr.mjs +12 -3
- package/es/input-otp/styles/dark.mjs +1 -1
- package/es/input-otp/styles/light.d.ts +14 -1
- package/es/layout/src/LayoutSider.d.ts +1 -1
- package/es/legacy-transfer/src/Transfer.d.ts +154 -13
- package/es/legacy-transfer/src/TransferFilter.d.ts +52 -4
- package/es/legacy-transfer/src/TransferList.d.ts +52 -4
- package/es/legacy-transfer/src/TransferListItem.d.ts +52 -4
- package/es/legacy-transfer/styles/light.d.ts +14 -1
- package/es/locales/common/arDZ.mjs +6 -0
- package/es/locales/common/azAZ.mjs +6 -0
- package/es/locales/common/csCZ.mjs +6 -0
- package/es/locales/common/daDK.d.ts +3 -0
- package/es/locales/common/daDK.mjs +130 -0
- package/es/locales/common/deDE.mjs +6 -0
- package/es/locales/common/enGB.mjs +6 -0
- package/es/locales/common/enUS.d.ts +6 -0
- package/es/locales/common/enUS.mjs +6 -0
- package/es/locales/common/eo.mjs +6 -0
- package/es/locales/common/esAR.mjs +6 -0
- package/es/locales/common/etEE.mjs +6 -0
- package/es/locales/common/faIR.mjs +6 -0
- package/es/locales/common/frFR.mjs +6 -0
- package/es/locales/common/idID.mjs +6 -0
- package/es/locales/common/itIT.mjs +6 -0
- package/es/locales/common/jaJP.mjs +6 -0
- package/es/locales/common/kmKH.mjs +6 -0
- package/es/locales/common/koKR.mjs +6 -0
- package/es/locales/common/nbNO.mjs +6 -0
- package/es/locales/common/nlNL.mjs +6 -0
- package/es/locales/common/plPL.mjs +6 -0
- package/es/locales/common/ptBR.mjs +6 -0
- package/es/locales/common/ruRU.mjs +6 -0
- package/es/locales/common/skSK.mjs +6 -0
- package/es/locales/common/svSE.mjs +8 -2
- package/es/locales/common/thTH.mjs +6 -0
- package/es/locales/common/trTR.mjs +6 -0
- package/es/locales/common/ugCN.mjs +6 -0
- package/es/locales/common/ukUA.mjs +6 -0
- package/es/locales/common/uzUZ.mjs +6 -0
- package/es/locales/common/viVN.mjs +6 -0
- package/es/locales/common/zhCN.mjs +6 -0
- package/es/locales/common/zhTW.mjs +6 -0
- package/es/locales/date/daDK.d.ts +3 -0
- package/es/locales/date/daDK.mjs +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.mjs +2 -0
- package/es/locales/utils/index.mjs +1 -1
- package/es/log/src/Log.d.ts +1 -1
- package/es/log/src/Log.mjs +1 -1
- package/es/marquee/src/Marquee.mjs +12 -10
- package/es/mention/src/Mention.d.ts +155 -14
- package/es/mention/styles/light.d.ts +14 -1
- package/es/menu/src/Menu.d.ts +314 -28
- package/es/menu/src/MenuOption.d.ts +113 -9
- package/es/menu/src/MenuOption.mjs +4 -3
- package/es/menu/src/MenuOptionContent.d.ts +1 -1
- package/es/menu/src/MenuOptionGroup.d.ts +1 -1
- package/es/menu/src/MenuOptionGroup.mjs +11 -4
- package/es/menu/src/Submenu.d.ts +114 -10
- package/es/menu/src/use-menu-child.d.ts +2 -0
- package/es/menu/src/use-menu-child.mjs +2 -1
- package/es/menu/styles/light.d.ts +33 -7
- package/es/message/src/Message.d.ts +1 -0
- package/es/message/src/Message.mjs +3 -1
- package/es/message/src/MessageProvider.d.ts +10 -1
- package/es/message/src/styles/index.cssr.mjs +1 -0
- package/es/message/styles/light.d.ts +1 -0
- package/es/message/styles/light.mjs +2 -1
- package/es/modal/src/BodyWrapper.d.ts +13 -7
- package/es/modal/src/BodyWrapper.mjs +4 -3
- package/es/modal/src/Modal.d.ts +32 -15
- package/es/modal/src/Modal.mjs +14 -6
- package/es/modal/src/ModalEnvironment.d.ts +22 -10
- package/es/modal/src/ModalEnvironment.mjs +1 -1
- package/es/modal/src/ModalProvider.d.ts +2 -1
- package/es/modal/src/ModalProvider.mjs +4 -2
- package/es/modal/src/presetProps.d.ts +3 -2
- package/es/modal/src/styles/index.cssr.mjs +4 -2
- package/es/notification/src/Notification.d.ts +2 -2
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationProvider.d.ts +5 -5
- package/es/number-animation/src/NumberAnimation.mjs +1 -1
- package/es/pagination/src/Pagination.d.ts +460 -33
- package/es/pagination/styles/light.d.ts +42 -3
- package/es/popconfirm/src/Popconfirm.d.ts +163 -22
- package/es/popconfirm/src/Popconfirm.mjs +3 -3
- package/es/popconfirm/src/PopconfirmPanel.d.ts +3 -3
- package/es/popconfirm/styles/light.d.ts +14 -1
- package/es/popover/src/Popover.d.ts +133 -16
- package/es/popover/src/PopoverBody.d.ts +129 -12
- package/es/popover/src/PopoverBody.mjs +8 -4
- package/es/popover/src/styles/index.cssr.mjs +1 -1
- package/es/popover/src/styles/rtl.cssr.d.ts +2 -0
- package/es/popover/src/styles/rtl.cssr.mjs +5 -0
- package/es/popover/styles/dark.mjs +4 -0
- package/es/popover/styles/index.d.ts +1 -0
- package/es/popover/styles/index.mjs +2 -1
- package/es/popover/styles/light.d.ts +27 -2
- package/es/popover/styles/light.mjs +7 -2
- package/es/popover/styles/rtl.d.ts +2 -0
- package/es/popover/styles/rtl.mjs +7 -0
- package/es/popselect/src/Popselect.d.ts +217 -76
- package/es/popselect/src/PopselectPanel.d.ts +55 -7
- package/es/popselect/styles/light.d.ts +14 -1
- package/es/progress/src/Circle.d.ts +1 -1
- package/es/progress/src/Circle.mjs +14 -3
- package/es/progress/src/Progress.d.ts +1 -1
- package/es/radio/src/Radio.mjs +5 -5
- package/es/radio/src/RadioButton.d.ts +2 -2
- package/es/radio/src/styles/radio.cssr.mjs +3 -7
- package/es/rate/src/Rate.d.ts +1 -1
- package/es/result/src/Result.d.ts +1 -1
- package/es/select/src/Select.d.ts +164 -21
- package/es/select/styles/light.d.ts +14 -1
- package/es/styles.d.ts +3 -3
- package/es/styles.mjs +3 -3
- package/es/tabs/src/Tab.d.ts +3 -3
- package/es/tabs/src/Tabs.d.ts +1 -1
- package/es/tabs/src/Tabs.mjs +1 -1
- package/es/tabs/src/styles/index.cssr.mjs +4 -4
- package/es/tag/src/Tag.d.ts +1 -1
- package/es/theme-editor/src/ThemeEditor.mjs +1 -1
- package/es/themes/dark.mjs +2 -0
- package/es/themes/light.mjs +2 -0
- package/es/time-picker/src/Panel.d.ts +59 -11
- package/es/time-picker/src/TimePicker.d.ts +156 -15
- package/es/time-picker/styles/light.d.ts +14 -1
- package/es/timeline/src/TimelineItem.d.ts +1 -1
- package/es/tooltip/src/Tooltip.d.ts +166 -25
- package/es/tooltip/styles/light.d.ts +16 -3
- package/es/transfer/src/Transfer.d.ts +154 -13
- package/es/transfer/src/TransferFilter.d.ts +52 -4
- package/es/transfer/src/TransferList.d.ts +52 -4
- package/es/transfer/src/TransferListItem.d.ts +52 -4
- package/es/transfer/styles/light.d.ts +14 -1
- package/es/tree/src/Tree.d.ts +42 -38
- package/es/tree/src/Tree.mjs +3 -1
- package/es/tree/src/TreeNode.d.ts +2 -2
- package/es/tree/src/TreeNodeContent.d.ts +3 -3
- package/es/tree/src/styles/index.cssr.mjs +7 -2
- package/es/tree/styles/light.d.ts +4 -4
- package/es/tree-select/src/TreeSelect.d.ts +172 -29
- package/es/tree-select/styles/index.d.ts +1 -0
- package/es/tree-select/styles/index.mjs +2 -1
- package/es/tree-select/styles/light.d.ts +22 -9
- package/es/tree-select/styles/rtl.d.ts +2 -0
- package/es/tree-select/styles/rtl.mjs +11 -0
- package/es/typography/src/create-header.d.ts +1 -1
- package/es/typography/src/headers.d.ts +6 -6
- package/es/upload/src/Upload.d.ts +1 -0
- package/es/upload/src/Upload.mjs +6 -3
- package/es/upload/src/UploadFile.d.ts +8 -6
- package/es/upload/src/UploadFile.mjs +1 -1
- package/es/upload/src/icons.d.ts +2 -2
- package/es/upload/src/icons.mjs +22 -18
- package/es/upload/src/styles/rtl.cssr.d.ts +2 -0
- package/es/upload/src/styles/rtl.cssr.mjs +5 -0
- package/es/upload/styles/index.d.ts +1 -0
- package/es/upload/styles/index.mjs +2 -1
- package/es/upload/styles/rtl.d.ts +2 -0
- package/es/upload/styles/rtl.mjs +5 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/virtual-list/src/VirtualList.d.ts +1 -1
- package/generic/AvatarGroup.vue +26 -0
- package/generic/index.ts +1 -0
- package/lib/_internal/icon/src/styles/index.cssr.js +0 -1
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +3 -3
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/lib/_internal/selection/src/Selection.d.ts +115 -13
- package/lib/_internal/selection/styles/light.d.ts +14 -1
- package/lib/_utils/index.d.ts +1 -0
- package/lib/_utils/naive/prop.d.ts +19 -10
- package/lib/_utils/naive/prop.js +21 -21
- package/lib/_utils/ts/ts.d.ts +3 -0
- package/lib/alert/src/Alert.d.ts +2 -2
- package/lib/anchor/index.d.ts +1 -0
- package/lib/anchor/src/AnchorAdapter.d.ts +1 -1
- package/lib/anchor/src/AnchorAdapter.js +17 -7
- package/lib/anchor/src/BaseAnchor.js +30 -5
- package/lib/anchor/src/Link.d.ts +3 -2
- package/lib/anchor/src/Link.js +4 -1
- package/lib/anchor/src/public-types.d.ts +5 -0
- package/lib/anchor/src/public-types.js +2 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +155 -14
- package/lib/auto-complete/styles/light.d.ts +14 -1
- package/lib/avatar-group/index.d.ts +3 -2
- package/lib/avatar-group/src/AvatarGroup.d.ts +1 -4
- package/lib/avatar-group/src/generic-public-types.d.ts +18 -0
- package/lib/avatar-group/src/generic-public-types.js +2 -0
- package/lib/avatar-group/src/public-types.d.ts +10 -0
- package/lib/avatar-group/src/public-types.js +2 -0
- package/lib/back-top/src/BackTop.d.ts +1 -1
- package/lib/badge/src/Badge.d.ts +1 -1
- package/lib/button/src/Button.d.ts +1 -1
- package/lib/card/src/Card.d.ts +7 -2
- package/lib/card/src/Card.js +3 -2
- package/lib/carousel/src/Carousel.d.ts +4 -4
- package/lib/carousel/src/Carousel.js +19 -9
- package/lib/carousel/src/CarouselDots.d.ts +2 -2
- package/lib/cascader/src/Cascader.d.ts +163 -20
- package/lib/cascader/src/CascaderMenu.d.ts +56 -4
- package/lib/cascader/src/CascaderOption.d.ts +56 -4
- package/lib/cascader/src/CascaderSelectMenu.d.ts +57 -5
- package/lib/cascader/src/CascaderSubmenu.d.ts +56 -4
- package/lib/cascader/styles/light.d.ts +14 -1
- package/lib/color-picker/src/ColorInputUnit.d.ts +26 -2
- package/lib/color-picker/src/ColorPicker.d.ts +128 -11
- package/lib/color-picker/src/ColorPickerTrigger.js +2 -1
- package/lib/color-picker/src/utils.d.ts +2 -0
- package/lib/color-picker/src/utils.js +26 -0
- package/lib/color-picker/styles/light.d.ts +14 -1
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +1 -1
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/src/DataTable.d.ts +674 -52
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +333 -25
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +332 -24
- package/lib/data-table/src/TableParts/Body.d.ts +332 -24
- package/lib/data-table/src/TableParts/Header.d.ts +332 -24
- package/lib/data-table/src/interface.d.ts +253 -18
- package/lib/data-table/src/use-sorter.d.ts +2 -5
- package/lib/data-table/src/use-table-data.d.ts +1 -4
- package/lib/data-table/src/utils.js +2 -1
- package/lib/data-table/styles/light.d.ts +84 -6
- package/lib/date-picker/src/DatePicker.d.ts +229 -23
- package/lib/date-picker/src/DatePicker.js +1 -1
- package/lib/date-picker/src/panel/date.d.ts +110 -10
- package/lib/date-picker/src/panel/daterange.d.ts +111 -11
- package/lib/date-picker/src/panel/datetime.d.ts +110 -10
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +111 -11
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +110 -10
- package/lib/date-picker/src/panel/monthrange.d.ts +111 -11
- package/lib/date-picker/src/panel/panelHeader.d.ts +436 -36
- package/lib/date-picker/src/panel/use-calendar.d.ts +109 -9
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +110 -10
- package/lib/date-picker/src/panel/use-dual-calendar.js +3 -3
- package/lib/date-picker/src/panel/use-panel-common.d.ts +109 -9
- package/lib/date-picker/src/panel/use-panel-common.js +1 -1
- package/lib/date-picker/src/props.d.ts +85 -7
- package/lib/date-picker/src/props.js +1 -1
- package/lib/date-picker/src/utils.d.ts +2 -1
- package/lib/date-picker/src/utils.js +5 -1
- package/lib/date-picker/styles/light.d.ts +28 -2
- package/lib/dialog/src/Dialog.d.ts +5 -2
- package/lib/dialog/src/Dialog.js +1 -1
- package/lib/dialog/src/DialogEnvironment.d.ts +11 -4
- package/lib/dialog/src/DialogEnvironment.js +3 -3
- package/lib/dialog/src/DialogProvider.d.ts +38 -34
- package/lib/dialog/src/dialogProps.d.ts +2 -1
- package/lib/dialog/src/dialogProps.js +2 -1
- package/lib/drawer/src/Drawer.d.ts +4 -4
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +162 -21
- package/lib/dropdown/src/DropdownMenu.d.ts +2 -2
- package/lib/dropdown/styles/light.d.ts +14 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +153 -12
- package/lib/dynamic-input/src/InputPreset.d.ts +52 -4
- package/lib/dynamic-input/src/PairPreset.d.ts +52 -4
- package/lib/dynamic-input/styles/light.d.ts +14 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +153 -12
- package/lib/dynamic-tags/styles/light.d.ts +14 -1
- package/lib/ellipsis/src/Ellipsis.d.ts +154 -11
- package/lib/ellipsis/src/PerformantEllipsis.d.ts +84 -6
- package/lib/ellipsis/src/PerformantEllipsis.js +17 -7
- package/lib/ellipsis/styles/light.d.ts +14 -1
- package/lib/empty/src/Empty.d.ts +1 -1
- package/lib/form/src/FormItem.d.ts +8 -2
- package/lib/form/src/FormItem.js +3 -2
- package/lib/form/src/FormItemCol.d.ts +7 -1
- package/lib/form/src/FormItemCol.js +17 -7
- package/lib/form/src/FormItemGridItem.d.ts +7 -1
- package/lib/form/src/FormItemGridItem.js +17 -7
- package/lib/form/src/FormItemRow.d.ts +7 -1
- package/lib/form/src/FormItemRow.js +17 -7
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +2 -2
- package/lib/grid/src/GridItem.d.ts +1 -1
- package/lib/heatmap/index.d.ts +6 -0
- package/lib/heatmap/index.js +27 -0
- package/lib/heatmap/src/ColorIndicator.d.ts +25 -0
- package/lib/heatmap/src/ColorIndicator.js +27 -0
- package/lib/heatmap/src/Heatmap.d.ts +385 -0
- package/lib/heatmap/src/Heatmap.js +248 -0
- package/lib/heatmap/src/Rect.d.ts +57 -0
- package/lib/heatmap/src/Rect.js +64 -0
- package/lib/heatmap/src/animationStyle.d.ts +6 -0
- package/lib/heatmap/src/animationStyle.js +52 -0
- package/lib/heatmap/src/interface.d.ts +7 -0
- package/lib/heatmap/src/interface.js +2 -0
- package/lib/heatmap/src/public-types.d.ts +16 -0
- package/lib/heatmap/src/public-types.js +2 -0
- package/lib/heatmap/src/styles/index.cssr.d.ts +2 -0
- package/lib/heatmap/src/styles/index.cssr.js +107 -0
- package/lib/heatmap/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/heatmap/src/styles/rtl.cssr.js +9 -0
- package/lib/heatmap/src/theme.d.ts +8 -0
- package/lib/heatmap/src/theme.js +10 -0
- package/lib/heatmap/src/utils/index.d.ts +32 -0
- package/lib/heatmap/src/utils/index.js +135 -0
- package/lib/heatmap/styles/dark.d.ts +3 -0
- package/lib/heatmap/styles/dark.js +13 -0
- package/lib/heatmap/styles/index.d.ts +3 -0
- package/lib/heatmap/styles/index.js +10 -0
- package/lib/heatmap/styles/light.d.ts +31 -0
- package/lib/heatmap/styles/light.js +39 -0
- package/lib/heatmap/styles/rtl.d.ts +2 -0
- package/lib/heatmap/styles/rtl.js +11 -0
- package/lib/highlight/src/utils.js +10 -21
- package/lib/icon/src/styles/index.cssr.js +0 -1
- package/lib/image/index.d.ts +3 -1
- package/lib/image/index.js +4 -1
- package/lib/image/src/Image.d.ts +133 -23
- package/lib/image/src/Image.js +43 -23
- package/lib/image/src/ImageGroup.d.ts +200 -35
- package/lib/image/src/ImageGroup.js +111 -26
- package/lib/image/src/ImagePreview.d.ts +258 -23
- package/lib/image/src/ImagePreview.js +60 -33
- package/lib/image/src/interface.d.ts +42 -3
- package/lib/image/src/public-types.d.ts +14 -0
- package/lib/image/styles/light.d.ts +14 -1
- package/lib/input/src/Input.d.ts +146 -12
- package/lib/input/src/Input.js +24 -12
- package/lib/input/src/InputGroupLabel.d.ts +129 -22
- package/lib/input/src/InputGroupLabel.js +8 -6
- package/lib/input/styles/dark.d.ts +139 -2
- package/lib/input/styles/dark.js +35 -29
- package/lib/input/styles/light.d.ts +76 -3
- package/lib/input/styles/light.js +7 -2
- package/lib/input-number/src/InputNumber.d.ts +152 -11
- package/lib/input-number/styles/light.d.ts +14 -1
- package/lib/input-otp/src/InputOtp.d.ts +158 -12
- package/lib/input-otp/src/InputOtp.js +12 -16
- package/lib/input-otp/src/public-types.d.ts +1 -0
- package/lib/input-otp/src/styles/index.cssr.js +11 -2
- package/lib/input-otp/styles/dark.js +1 -1
- package/lib/input-otp/styles/light.d.ts +14 -1
- package/lib/layout/src/LayoutSider.d.ts +1 -1
- package/lib/legacy-transfer/src/Transfer.d.ts +154 -13
- package/lib/legacy-transfer/src/TransferFilter.d.ts +52 -4
- package/lib/legacy-transfer/src/TransferList.d.ts +52 -4
- package/lib/legacy-transfer/src/TransferListItem.d.ts +52 -4
- package/lib/legacy-transfer/styles/light.d.ts +14 -1
- package/lib/locales/common/arDZ.js +6 -0
- package/lib/locales/common/azAZ.js +6 -0
- package/lib/locales/common/csCZ.js +6 -0
- package/lib/locales/common/daDK.d.ts +3 -0
- package/lib/locales/common/daDK.js +132 -0
- package/lib/locales/common/deDE.js +6 -0
- package/lib/locales/common/enGB.js +6 -0
- package/lib/locales/common/enUS.d.ts +6 -0
- package/lib/locales/common/enUS.js +6 -0
- package/lib/locales/common/eo.js +6 -0
- package/lib/locales/common/esAR.js +6 -0
- package/lib/locales/common/etEE.js +6 -0
- package/lib/locales/common/faIR.js +6 -0
- package/lib/locales/common/frFR.js +6 -0
- package/lib/locales/common/idID.js +6 -0
- package/lib/locales/common/itIT.js +6 -0
- package/lib/locales/common/jaJP.js +6 -0
- package/lib/locales/common/kmKH.js +6 -0
- package/lib/locales/common/koKR.js +6 -0
- package/lib/locales/common/nbNO.js +6 -0
- package/lib/locales/common/nlNL.js +6 -0
- package/lib/locales/common/plPL.js +6 -0
- package/lib/locales/common/ptBR.js +6 -0
- package/lib/locales/common/ruRU.js +6 -0
- package/lib/locales/common/skSK.js +6 -0
- package/lib/locales/common/svSE.js +8 -2
- package/lib/locales/common/thTH.js +6 -0
- package/lib/locales/common/trTR.js +6 -0
- package/lib/locales/common/ugCN.js +6 -0
- package/lib/locales/common/ukUA.js +6 -0
- package/lib/locales/common/uzUZ.js +6 -0
- package/lib/locales/common/viVN.js +6 -0
- package/lib/locales/common/zhCN.js +6 -0
- package/lib/locales/common/zhTW.js +6 -0
- package/lib/locales/date/daDK.d.ts +3 -0
- package/lib/locales/date/daDK.js +8 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +6 -2
- package/lib/log/src/Log.d.ts +1 -1
- package/lib/marquee/src/Marquee.js +4 -3
- package/lib/mention/src/Mention.d.ts +155 -14
- package/lib/mention/styles/light.d.ts +14 -1
- package/lib/menu/src/Menu.d.ts +314 -28
- package/lib/menu/src/MenuOption.d.ts +113 -9
- package/lib/menu/src/MenuOption.js +6 -4
- package/lib/menu/src/MenuOptionContent.d.ts +1 -1
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -1
- package/lib/menu/src/MenuOptionGroup.js +8 -2
- package/lib/menu/src/Submenu.d.ts +114 -10
- package/lib/menu/src/use-menu-child.d.ts +2 -0
- package/lib/menu/src/use-menu-child.js +2 -1
- package/lib/menu/styles/light.d.ts +28 -2
- package/lib/message/src/Message.d.ts +1 -0
- package/lib/message/src/Message.js +3 -2
- package/lib/message/src/MessageProvider.d.ts +10 -1
- package/lib/message/src/styles/index.cssr.js +1 -0
- package/lib/message/styles/light.d.ts +1 -0
- package/lib/message/styles/light.js +1 -1
- package/lib/modal/src/BodyWrapper.d.ts +10 -4
- package/lib/modal/src/BodyWrapper.js +7 -3
- package/lib/modal/src/Modal.d.ts +28 -11
- package/lib/modal/src/Modal.js +10 -4
- package/lib/modal/src/ModalEnvironment.d.ts +22 -10
- package/lib/modal/src/ModalEnvironment.js +18 -8
- package/lib/modal/src/ModalProvider.d.ts +2 -1
- package/lib/modal/src/ModalProvider.js +4 -2
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/src/styles/index.cssr.js +3 -1
- package/lib/notification/src/Notification.d.ts +2 -2
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +5 -5
- package/lib/pagination/src/Pagination.d.ts +460 -33
- package/lib/pagination/styles/light.d.ts +42 -3
- package/lib/popconfirm/src/Popconfirm.d.ts +159 -18
- package/lib/popconfirm/src/Popconfirm.js +20 -15
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +1 -1
- package/lib/popconfirm/styles/light.d.ts +14 -1
- package/lib/popover/src/Popover.d.ts +133 -16
- package/lib/popover/src/Popover.js +17 -7
- package/lib/popover/src/PopoverBody.d.ts +129 -12
- package/lib/popover/src/PopoverBody.js +5 -2
- package/lib/popover/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/popover/src/styles/rtl.cssr.js +10 -0
- package/lib/popover/styles/dark.js +4 -0
- package/lib/popover/styles/index.d.ts +1 -0
- package/lib/popover/styles/index.js +3 -1
- package/lib/popover/styles/light.d.ts +27 -2
- package/lib/popover/styles/light.js +7 -2
- package/lib/popover/styles/rtl.d.ts +2 -0
- package/lib/popover/styles/rtl.js +13 -0
- package/lib/popselect/src/Popselect.d.ts +213 -72
- package/lib/popselect/src/Popselect.js +17 -7
- package/lib/popselect/src/PopselectPanel.d.ts +55 -7
- package/lib/popselect/styles/light.d.ts +14 -1
- package/lib/preset.js +17 -7
- package/lib/progress/src/Circle.d.ts +1 -1
- package/lib/progress/src/Circle.js +11 -2
- package/lib/progress/src/Progress.d.ts +1 -1
- package/lib/radio/src/Radio.js +2 -2
- package/lib/radio/src/RadioButton.d.ts +2 -2
- package/lib/radio/src/styles/radio.cssr.js +3 -7
- package/lib/rate/src/Rate.d.ts +1 -1
- package/lib/result/src/Result.d.ts +1 -1
- package/lib/select/src/Select.d.ts +164 -21
- package/lib/select/styles/light.d.ts +14 -1
- package/lib/styles.d.ts +3 -3
- package/lib/styles.js +5 -2
- package/lib/tabs/src/Tab.d.ts +3 -3
- package/lib/tabs/src/Tabs.d.ts +1 -1
- package/lib/tabs/src/styles/index.cssr.js +4 -4
- package/lib/tag/src/Tag.d.ts +1 -1
- package/lib/themes/dark.js +103 -101
- package/lib/themes/light.js +102 -100
- package/lib/time-picker/src/Panel.d.ts +59 -11
- package/lib/time-picker/src/TimePicker.d.ts +156 -15
- package/lib/time-picker/styles/light.d.ts +14 -1
- package/lib/timeline/src/TimelineItem.d.ts +1 -1
- package/lib/tooltip/src/Tooltip.d.ts +159 -18
- package/lib/tooltip/styles/light.d.ts +14 -1
- package/lib/transfer/src/Transfer.d.ts +154 -13
- package/lib/transfer/src/TransferFilter.d.ts +52 -4
- package/lib/transfer/src/TransferList.d.ts +52 -4
- package/lib/transfer/src/TransferListItem.d.ts +52 -4
- package/lib/transfer/styles/light.d.ts +14 -1
- package/lib/tree/src/Tree.d.ts +42 -38
- package/lib/tree/src/Tree.js +4 -3
- package/lib/tree/src/TreeNode.d.ts +2 -2
- package/lib/tree/src/TreeNodeContent.d.ts +3 -3
- package/lib/tree/src/styles/index.cssr.js +7 -2
- package/lib/tree-select/src/TreeSelect.d.ts +169 -26
- package/lib/tree-select/styles/index.d.ts +1 -0
- package/lib/tree-select/styles/index.js +3 -1
- package/lib/tree-select/styles/light.d.ts +14 -1
- package/lib/tree-select/styles/rtl.d.ts +2 -0
- package/lib/tree-select/styles/rtl.js +20 -0
- package/lib/typography/src/create-header.d.ts +1 -1
- package/lib/typography/src/headers.d.ts +6 -6
- package/lib/upload/src/Upload.d.ts +1 -0
- package/lib/upload/src/Upload.js +4 -3
- package/lib/upload/src/UploadFile.d.ts +4 -2
- package/lib/upload/src/UploadFile.js +1 -1
- package/lib/upload/src/icons.d.ts +2 -2
- package/lib/upload/src/icons.js +12 -7
- package/lib/upload/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/upload/src/styles/rtl.cssr.js +10 -0
- package/lib/upload/styles/index.d.ts +1 -0
- package/lib/upload/styles/index.js +3 -1
- package/lib/upload/styles/rtl.d.ts +2 -0
- package/lib/upload/styles/rtl.js +11 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/src/VirtualList.d.ts +1 -1
- package/package.json +30 -19
- package/volar.d.ts +24 -22
- package/web-types.json +599 -61
- package/es/avatar-group/src/interface.d.ts +0 -8
- package/lib/avatar-group/src/interface.d.ts +0 -8
- /package/es/{avatar-group/src/interface.mjs → _utils/ts/ts.mjs} +0 -0
- /package/lib/{avatar-group/src/interface.js → _utils/ts/ts.js} +0 -0
|
@@ -1,16 +1,165 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
|
|
1
2
|
import { type PropType, type VNode } from 'vue';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export declare const imagePreviewProps: {
|
|
4
|
+
src: StringConstructor;
|
|
5
|
+
show: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
default: undefined;
|
|
8
|
+
};
|
|
9
|
+
defaultShow: BooleanConstructor;
|
|
10
|
+
'onUpdate:show': PropType<MaybeArray<(show: boolean) => void>>;
|
|
11
|
+
onUpdateShow: PropType<MaybeArray<(show: boolean) => void>>;
|
|
8
12
|
onNext: PropType<() => void>;
|
|
9
13
|
onPrev: PropType<() => void>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
onClose: PropType<MaybeArray<() => void>>;
|
|
15
|
+
onPreviewPrev: PropType<() => void>;
|
|
16
|
+
onPreviewNext: PropType<() => void>;
|
|
17
|
+
showToolbar: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
13
20
|
};
|
|
21
|
+
showToolbarTooltip: BooleanConstructor;
|
|
22
|
+
renderToolbar: PropType<import("./public-types").ImageRenderToolbar>;
|
|
23
|
+
theme: PropType<import("../../_mixins").Theme<"Image", {
|
|
24
|
+
toolbarIconColor: string;
|
|
25
|
+
toolbarColor: string;
|
|
26
|
+
toolbarBoxShadow: string;
|
|
27
|
+
toolbarBorderRadius: string;
|
|
28
|
+
}, {
|
|
29
|
+
Tooltip: import("../../_mixins").Theme<"Tooltip", {
|
|
30
|
+
borderRadius: string;
|
|
31
|
+
boxShadow: string;
|
|
32
|
+
color: string;
|
|
33
|
+
textColor: string;
|
|
34
|
+
padding: string;
|
|
35
|
+
}, {
|
|
36
|
+
Popover: import("../../_mixins").Theme<"Popover", {
|
|
37
|
+
fontSize: string;
|
|
38
|
+
borderRadius: string;
|
|
39
|
+
color: string;
|
|
40
|
+
dividerColor: string;
|
|
41
|
+
textColor: string;
|
|
42
|
+
boxShadow: string;
|
|
43
|
+
space: string;
|
|
44
|
+
spaceArrow: string;
|
|
45
|
+
arrowOffset: string;
|
|
46
|
+
arrowOffsetVertical: string;
|
|
47
|
+
arrowHeight: string;
|
|
48
|
+
padding: string;
|
|
49
|
+
}, {
|
|
50
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
51
|
+
height: string;
|
|
52
|
+
width: string;
|
|
53
|
+
borderRadius: string;
|
|
54
|
+
color: string;
|
|
55
|
+
colorHover: string;
|
|
56
|
+
railInsetHorizontalBottom: string;
|
|
57
|
+
railInsetHorizontalTop: string;
|
|
58
|
+
railInsetVerticalRight: string;
|
|
59
|
+
railInsetVerticalLeft: string;
|
|
60
|
+
railColor: string;
|
|
61
|
+
}, any>;
|
|
62
|
+
}>;
|
|
63
|
+
}>;
|
|
64
|
+
}>>;
|
|
65
|
+
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", {
|
|
66
|
+
toolbarIconColor: string;
|
|
67
|
+
toolbarColor: string;
|
|
68
|
+
toolbarBoxShadow: string;
|
|
69
|
+
toolbarBorderRadius: string;
|
|
70
|
+
}, {
|
|
71
|
+
Tooltip: import("../../_mixins").Theme<"Tooltip", {
|
|
72
|
+
borderRadius: string;
|
|
73
|
+
boxShadow: string;
|
|
74
|
+
color: string;
|
|
75
|
+
textColor: string;
|
|
76
|
+
padding: string;
|
|
77
|
+
}, {
|
|
78
|
+
Popover: import("../../_mixins").Theme<"Popover", {
|
|
79
|
+
fontSize: string;
|
|
80
|
+
borderRadius: string;
|
|
81
|
+
color: string;
|
|
82
|
+
dividerColor: string;
|
|
83
|
+
textColor: string;
|
|
84
|
+
boxShadow: string;
|
|
85
|
+
space: string;
|
|
86
|
+
spaceArrow: string;
|
|
87
|
+
arrowOffset: string;
|
|
88
|
+
arrowOffsetVertical: string;
|
|
89
|
+
arrowHeight: string;
|
|
90
|
+
padding: string;
|
|
91
|
+
}, {
|
|
92
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
93
|
+
height: string;
|
|
94
|
+
width: string;
|
|
95
|
+
borderRadius: string;
|
|
96
|
+
color: string;
|
|
97
|
+
colorHover: string;
|
|
98
|
+
railInsetHorizontalBottom: string;
|
|
99
|
+
railInsetHorizontalTop: string;
|
|
100
|
+
railInsetVerticalRight: string;
|
|
101
|
+
railInsetVerticalLeft: string;
|
|
102
|
+
railColor: string;
|
|
103
|
+
}, any>;
|
|
104
|
+
}>;
|
|
105
|
+
}>;
|
|
106
|
+
}>>>;
|
|
107
|
+
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", {
|
|
108
|
+
toolbarIconColor: string;
|
|
109
|
+
toolbarColor: string;
|
|
110
|
+
toolbarBoxShadow: string;
|
|
111
|
+
toolbarBorderRadius: string;
|
|
112
|
+
}, {
|
|
113
|
+
Tooltip: import("../../_mixins").Theme<"Tooltip", {
|
|
114
|
+
borderRadius: string;
|
|
115
|
+
boxShadow: string;
|
|
116
|
+
color: string;
|
|
117
|
+
textColor: string;
|
|
118
|
+
padding: string;
|
|
119
|
+
}, {
|
|
120
|
+
Popover: import("../../_mixins").Theme<"Popover", {
|
|
121
|
+
fontSize: string;
|
|
122
|
+
borderRadius: string;
|
|
123
|
+
color: string;
|
|
124
|
+
dividerColor: string;
|
|
125
|
+
textColor: string;
|
|
126
|
+
boxShadow: string;
|
|
127
|
+
space: string;
|
|
128
|
+
spaceArrow: string;
|
|
129
|
+
arrowOffset: string;
|
|
130
|
+
arrowOffsetVertical: string;
|
|
131
|
+
arrowHeight: string;
|
|
132
|
+
padding: string;
|
|
133
|
+
}, {
|
|
134
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
135
|
+
height: string;
|
|
136
|
+
width: string;
|
|
137
|
+
borderRadius: string;
|
|
138
|
+
color: string;
|
|
139
|
+
colorHover: string;
|
|
140
|
+
railInsetHorizontalBottom: string;
|
|
141
|
+
railInsetHorizontalTop: string;
|
|
142
|
+
railInsetVerticalRight: string;
|
|
143
|
+
railInsetVerticalLeft: string;
|
|
144
|
+
railColor: string;
|
|
145
|
+
}, any>;
|
|
146
|
+
}>;
|
|
147
|
+
}>;
|
|
148
|
+
}>>>;
|
|
149
|
+
};
|
|
150
|
+
export type ImagePreviewProps = ExtractPublicPropTypes<typeof imagePreviewProps>;
|
|
151
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
152
|
+
src: StringConstructor;
|
|
153
|
+
show: {
|
|
154
|
+
type: BooleanConstructor;
|
|
155
|
+
default: undefined;
|
|
156
|
+
};
|
|
157
|
+
defaultShow: BooleanConstructor;
|
|
158
|
+
'onUpdate:show': PropType<MaybeArray<(show: boolean) => void>>;
|
|
159
|
+
onUpdateShow: PropType<MaybeArray<(show: boolean) => void>>;
|
|
160
|
+
onNext: PropType<() => void>;
|
|
161
|
+
onPrev: PropType<() => void>;
|
|
162
|
+
onClose: PropType<MaybeArray<() => void>>;
|
|
14
163
|
onPreviewPrev: PropType<() => void>;
|
|
15
164
|
onPreviewNext: PropType<() => void>;
|
|
16
165
|
showToolbar: {
|
|
@@ -45,7 +194,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
45
194
|
arrowOffsetVertical: string;
|
|
46
195
|
arrowHeight: string;
|
|
47
196
|
padding: string;
|
|
48
|
-
},
|
|
197
|
+
}, {
|
|
198
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
199
|
+
height: string;
|
|
200
|
+
width: string;
|
|
201
|
+
borderRadius: string;
|
|
202
|
+
color: string;
|
|
203
|
+
colorHover: string;
|
|
204
|
+
railInsetHorizontalBottom: string;
|
|
205
|
+
railInsetHorizontalTop: string;
|
|
206
|
+
railInsetVerticalRight: string;
|
|
207
|
+
railInsetVerticalLeft: string;
|
|
208
|
+
railColor: string;
|
|
209
|
+
}, any>;
|
|
210
|
+
}>;
|
|
49
211
|
}>;
|
|
50
212
|
}>>;
|
|
51
213
|
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", {
|
|
@@ -74,7 +236,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
74
236
|
arrowOffsetVertical: string;
|
|
75
237
|
arrowHeight: string;
|
|
76
238
|
padding: string;
|
|
77
|
-
},
|
|
239
|
+
}, {
|
|
240
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
241
|
+
height: string;
|
|
242
|
+
width: string;
|
|
243
|
+
borderRadius: string;
|
|
244
|
+
color: string;
|
|
245
|
+
colorHover: string;
|
|
246
|
+
railInsetHorizontalBottom: string;
|
|
247
|
+
railInsetHorizontalTop: string;
|
|
248
|
+
railInsetVerticalRight: string;
|
|
249
|
+
railInsetVerticalLeft: string;
|
|
250
|
+
railColor: string;
|
|
251
|
+
}, any>;
|
|
252
|
+
}>;
|
|
78
253
|
}>;
|
|
79
254
|
}>>>;
|
|
80
255
|
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", {
|
|
@@ -103,21 +278,33 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
103
278
|
arrowOffsetVertical: string;
|
|
104
279
|
arrowHeight: string;
|
|
105
280
|
padding: string;
|
|
106
|
-
},
|
|
281
|
+
}, {
|
|
282
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
283
|
+
height: string;
|
|
284
|
+
width: string;
|
|
285
|
+
borderRadius: string;
|
|
286
|
+
color: string;
|
|
287
|
+
colorHover: string;
|
|
288
|
+
railInsetHorizontalBottom: string;
|
|
289
|
+
railInsetHorizontalTop: string;
|
|
290
|
+
railInsetVerticalRight: string;
|
|
291
|
+
railInsetVerticalLeft: string;
|
|
292
|
+
railColor: string;
|
|
293
|
+
}, any>;
|
|
294
|
+
}>;
|
|
107
295
|
}>;
|
|
108
296
|
}>>>;
|
|
109
297
|
}>, {
|
|
110
298
|
setThumbnailEl: (e: HTMLImageElement | null) => void;
|
|
111
|
-
|
|
112
|
-
toggleShow: () => void;
|
|
299
|
+
clsPrefix: import("vue").Ref<string, string>;
|
|
113
300
|
previewRef: import("vue").Ref<HTMLImageElement | null, HTMLImageElement | null>;
|
|
114
301
|
previewWrapperRef: import("vue").Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
115
302
|
previewSrc: import("vue").Ref<string | undefined, string | undefined>;
|
|
116
|
-
|
|
303
|
+
mergedShow: import("vue").ComputedRef<boolean>;
|
|
117
304
|
appear: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
118
305
|
displayed: import("vue").Ref<boolean, boolean>;
|
|
119
306
|
previewedImgProps: import("vue").Ref<import("vue").ImgHTMLAttributes | undefined, import("vue").ImgHTMLAttributes | undefined> | undefined;
|
|
120
|
-
handleWheel(
|
|
307
|
+
handleWheel: (event: WheelEvent) => void;
|
|
121
308
|
handlePreviewMousedown: (e: MouseEvent) => void;
|
|
122
309
|
handlePreviewDblclick: (e: MouseEvent) => void;
|
|
123
310
|
syncTransformOrigin: () => void;
|
|
@@ -141,13 +328,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
141
328
|
}> | undefined;
|
|
142
329
|
themeClass: import("vue").Ref<string, string> | undefined;
|
|
143
330
|
onRender: (() => void) | undefined;
|
|
331
|
+
doUpdateShow: (value: boolean) => void;
|
|
332
|
+
close: () => void;
|
|
144
333
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
334
|
+
src: StringConstructor;
|
|
335
|
+
show: {
|
|
336
|
+
type: BooleanConstructor;
|
|
337
|
+
default: undefined;
|
|
338
|
+
};
|
|
339
|
+
defaultShow: BooleanConstructor;
|
|
340
|
+
'onUpdate:show': PropType<MaybeArray<(show: boolean) => void>>;
|
|
341
|
+
onUpdateShow: PropType<MaybeArray<(show: boolean) => void>>;
|
|
145
342
|
onNext: PropType<() => void>;
|
|
146
343
|
onPrev: PropType<() => void>;
|
|
147
|
-
|
|
148
|
-
type: StringConstructor;
|
|
149
|
-
required: true;
|
|
150
|
-
};
|
|
344
|
+
onClose: PropType<MaybeArray<() => void>>;
|
|
151
345
|
onPreviewPrev: PropType<() => void>;
|
|
152
346
|
onPreviewNext: PropType<() => void>;
|
|
153
347
|
showToolbar: {
|
|
@@ -182,7 +376,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
182
376
|
arrowOffsetVertical: string;
|
|
183
377
|
arrowHeight: string;
|
|
184
378
|
padding: string;
|
|
185
|
-
},
|
|
379
|
+
}, {
|
|
380
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
381
|
+
height: string;
|
|
382
|
+
width: string;
|
|
383
|
+
borderRadius: string;
|
|
384
|
+
color: string;
|
|
385
|
+
colorHover: string;
|
|
386
|
+
railInsetHorizontalBottom: string;
|
|
387
|
+
railInsetHorizontalTop: string;
|
|
388
|
+
railInsetVerticalRight: string;
|
|
389
|
+
railInsetVerticalLeft: string;
|
|
390
|
+
railColor: string;
|
|
391
|
+
}, any>;
|
|
392
|
+
}>;
|
|
186
393
|
}>;
|
|
187
394
|
}>>;
|
|
188
395
|
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", {
|
|
@@ -211,7 +418,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
211
418
|
arrowOffsetVertical: string;
|
|
212
419
|
arrowHeight: string;
|
|
213
420
|
padding: string;
|
|
214
|
-
},
|
|
421
|
+
}, {
|
|
422
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
423
|
+
height: string;
|
|
424
|
+
width: string;
|
|
425
|
+
borderRadius: string;
|
|
426
|
+
color: string;
|
|
427
|
+
colorHover: string;
|
|
428
|
+
railInsetHorizontalBottom: string;
|
|
429
|
+
railInsetHorizontalTop: string;
|
|
430
|
+
railInsetVerticalRight: string;
|
|
431
|
+
railInsetVerticalLeft: string;
|
|
432
|
+
railColor: string;
|
|
433
|
+
}, any>;
|
|
434
|
+
}>;
|
|
215
435
|
}>;
|
|
216
436
|
}>>>;
|
|
217
437
|
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", {
|
|
@@ -240,10 +460,25 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
240
460
|
arrowOffsetVertical: string;
|
|
241
461
|
arrowHeight: string;
|
|
242
462
|
padding: string;
|
|
243
|
-
},
|
|
463
|
+
}, {
|
|
464
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
465
|
+
height: string;
|
|
466
|
+
width: string;
|
|
467
|
+
borderRadius: string;
|
|
468
|
+
color: string;
|
|
469
|
+
colorHover: string;
|
|
470
|
+
railInsetHorizontalBottom: string;
|
|
471
|
+
railInsetHorizontalTop: string;
|
|
472
|
+
railInsetVerticalRight: string;
|
|
473
|
+
railInsetVerticalLeft: string;
|
|
474
|
+
railColor: string;
|
|
475
|
+
}, any>;
|
|
476
|
+
}>;
|
|
244
477
|
}>;
|
|
245
478
|
}>>>;
|
|
246
479
|
}>> & Readonly<{}>, {
|
|
480
|
+
show: boolean;
|
|
481
|
+
defaultShow: boolean;
|
|
247
482
|
showToolbar: boolean;
|
|
248
483
|
showToolbarTooltip: boolean;
|
|
249
484
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,41 +1,54 @@
|
|
|
1
1
|
import { off, on } from 'evtd';
|
|
2
|
-
import { kebabCase } from 'lodash
|
|
2
|
+
import { kebabCase } from 'lodash';
|
|
3
3
|
import { beforeNextFrameOnce } from 'seemly';
|
|
4
4
|
import { zindexable } from 'vdirs';
|
|
5
|
-
import { useIsMounted } from 'vooks';
|
|
6
|
-
import { computed, defineComponent, Fragment, h, inject, normalizeStyle, onBeforeUnmount, ref, toRef, Transition, vShow, watch, withDirectives } from 'vue';
|
|
5
|
+
import { useIsMounted, useMergedState } from 'vooks';
|
|
6
|
+
import { computed, defineComponent, Fragment, h, inject, normalizeStyle, onBeforeUnmount, ref, toRef, toRefs, Transition, vShow, watch, withDirectives } from 'vue';
|
|
7
7
|
import { LazyTeleport } from 'vueuc';
|
|
8
8
|
import { NBaseIcon } from "../../_internal/index.mjs";
|
|
9
9
|
import { DownloadIcon, ResizeSmallIcon, RotateClockwiseIcon, RotateCounterclockwiseIcon, ZoomInIcon, ZoomOutIcon } from "../../_internal/icons/index.mjs";
|
|
10
10
|
import { useConfig, useLocale, useTheme, useThemeClass } from "../../_mixins/index.mjs";
|
|
11
|
-
import { download } from "../../_utils/index.mjs";
|
|
11
|
+
import { call, download } from "../../_utils/index.mjs";
|
|
12
12
|
import { NTooltip } from "../../tooltip/index.mjs";
|
|
13
13
|
import { imageLight } from "../styles/index.mjs";
|
|
14
14
|
import { renderCloseIcon, renderNextIcon, renderPrevIcon } from "./icons.mjs";
|
|
15
15
|
import { imageContextKey, imagePreviewSharedProps } from "./interface.mjs";
|
|
16
16
|
import style from "./styles/index.cssr.mjs";
|
|
17
17
|
const BLEEDING = 32;
|
|
18
|
+
export const imagePreviewProps = Object.assign(Object.assign({}, imagePreviewSharedProps), {
|
|
19
|
+
src: String,
|
|
20
|
+
show: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: undefined
|
|
23
|
+
},
|
|
24
|
+
defaultShow: Boolean,
|
|
25
|
+
'onUpdate:show': [Function, Array],
|
|
26
|
+
onUpdateShow: [Function, Array],
|
|
27
|
+
onNext: Function,
|
|
28
|
+
onPrev: Function,
|
|
29
|
+
onClose: [Function, Array]
|
|
30
|
+
});
|
|
18
31
|
export default defineComponent({
|
|
19
32
|
name: 'ImagePreview',
|
|
20
|
-
props:
|
|
21
|
-
onNext: Function,
|
|
22
|
-
onPrev: Function,
|
|
23
|
-
clsPrefix: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: true
|
|
26
|
-
}
|
|
27
|
-
}),
|
|
33
|
+
props: imagePreviewProps,
|
|
28
34
|
setup(props) {
|
|
29
|
-
const
|
|
35
|
+
const {
|
|
36
|
+
src
|
|
37
|
+
} = toRefs(props);
|
|
38
|
+
const {
|
|
39
|
+
mergedClsPrefixRef
|
|
40
|
+
} = useConfig(props);
|
|
41
|
+
const themeRef = useTheme('Image', '-image', style, imageLight, props, mergedClsPrefixRef);
|
|
30
42
|
let thumbnailEl = null;
|
|
31
43
|
const previewRef = ref(null);
|
|
32
44
|
const previewWrapperRef = ref(null);
|
|
33
|
-
const previewSrcRef = ref(undefined);
|
|
34
|
-
const showRef = ref(false);
|
|
35
45
|
const displayedRef = ref(false);
|
|
36
46
|
const {
|
|
37
47
|
localeRef
|
|
38
48
|
} = useLocale('Image');
|
|
49
|
+
const uncontrolledShowRef = ref(props.defaultShow);
|
|
50
|
+
const controlledShowRef = toRef(props, 'show');
|
|
51
|
+
const mergedShowRef = useMergedState(controlledShowRef, uncontrolledShowRef);
|
|
39
52
|
function syncTransformOrigin() {
|
|
40
53
|
const {
|
|
41
54
|
value: previewWrapper
|
|
@@ -61,12 +74,34 @@ export default defineComponent({
|
|
|
61
74
|
case 'ArrowRight':
|
|
62
75
|
(_b = props.onNext) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
63
76
|
break;
|
|
77
|
+
case 'ArrowUp':
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
zoomIn();
|
|
80
|
+
break;
|
|
81
|
+
case 'ArrowDown':
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
zoomOut();
|
|
84
|
+
break;
|
|
64
85
|
case 'Escape':
|
|
65
|
-
|
|
86
|
+
close();
|
|
66
87
|
break;
|
|
67
88
|
}
|
|
68
89
|
}
|
|
69
|
-
|
|
90
|
+
function doUpdateShow(value) {
|
|
91
|
+
const {
|
|
92
|
+
onUpdateShow,
|
|
93
|
+
'onUpdate:show': _onUpdateShow
|
|
94
|
+
} = props;
|
|
95
|
+
if (onUpdateShow) {
|
|
96
|
+
call(onUpdateShow, value);
|
|
97
|
+
}
|
|
98
|
+
if (_onUpdateShow) {
|
|
99
|
+
call(_onUpdateShow, value);
|
|
100
|
+
}
|
|
101
|
+
uncontrolledShowRef.value = value;
|
|
102
|
+
displayedRef.value = true;
|
|
103
|
+
}
|
|
104
|
+
watch(mergedShowRef, value => {
|
|
70
105
|
if (value) {
|
|
71
106
|
on('keydown', document, handleKeydown);
|
|
72
107
|
} else {
|
|
@@ -285,9 +320,9 @@ export default defineComponent({
|
|
|
285
320
|
}
|
|
286
321
|
}
|
|
287
322
|
function handleDownloadClick() {
|
|
288
|
-
const
|
|
289
|
-
if (
|
|
290
|
-
download(
|
|
323
|
+
const imgSrc = src.value;
|
|
324
|
+
if (imgSrc) {
|
|
325
|
+
download(imgSrc, undefined);
|
|
291
326
|
}
|
|
292
327
|
}
|
|
293
328
|
function derivePreviewStyle(transition = true) {
|
|
@@ -318,9 +353,15 @@ export default defineComponent({
|
|
|
318
353
|
void preview.offsetHeight;
|
|
319
354
|
}
|
|
320
355
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
323
|
-
|
|
356
|
+
function close() {
|
|
357
|
+
if (mergedShowRef.value) {
|
|
358
|
+
const {
|
|
359
|
+
onClose
|
|
360
|
+
} = props;
|
|
361
|
+
if (onClose) call(onClose);
|
|
362
|
+
doUpdateShow(false);
|
|
363
|
+
uncontrolledShowRef.value = false;
|
|
364
|
+
}
|
|
324
365
|
}
|
|
325
366
|
function resizeToOrignalImageSize() {
|
|
326
367
|
scale = getOrignalImageSizeScale();
|
|
@@ -330,13 +371,9 @@ export default defineComponent({
|
|
|
330
371
|
derivePreviewStyle();
|
|
331
372
|
}
|
|
332
373
|
const exposedMethods = {
|
|
333
|
-
setPreviewSrc: src => {
|
|
334
|
-
previewSrcRef.value = src;
|
|
335
|
-
},
|
|
336
374
|
setThumbnailEl: el => {
|
|
337
375
|
thumbnailEl = el;
|
|
338
|
-
}
|
|
339
|
-
toggleShow
|
|
376
|
+
}
|
|
340
377
|
};
|
|
341
378
|
function withTooltip(node, tooltipKey) {
|
|
342
379
|
if (props.showToolbarTooltip) {
|
|
@@ -382,17 +419,19 @@ export default defineComponent({
|
|
|
382
419
|
inlineThemeDisabled
|
|
383
420
|
} = useConfig();
|
|
384
421
|
const themeClassHandle = inlineThemeDisabled ? useThemeClass('image-preview', undefined, cssVarsRef, props) : undefined;
|
|
422
|
+
function handleWheel(event) {
|
|
423
|
+
event.preventDefault();
|
|
424
|
+
}
|
|
385
425
|
return Object.assign({
|
|
426
|
+
clsPrefix: mergedClsPrefixRef,
|
|
386
427
|
previewRef,
|
|
387
428
|
previewWrapperRef,
|
|
388
|
-
previewSrc:
|
|
389
|
-
|
|
429
|
+
previewSrc: src,
|
|
430
|
+
mergedShow: mergedShowRef,
|
|
390
431
|
appear: useIsMounted(),
|
|
391
432
|
displayed: displayedRef,
|
|
392
433
|
previewedImgProps: imageContext === null || imageContext === void 0 ? void 0 : imageContext.previewedImgPropsRef,
|
|
393
|
-
handleWheel
|
|
394
|
-
e.preventDefault();
|
|
395
|
-
},
|
|
434
|
+
handleWheel,
|
|
396
435
|
handlePreviewMousedown,
|
|
397
436
|
handlePreviewDblclick,
|
|
398
437
|
syncTransformOrigin,
|
|
@@ -417,7 +456,9 @@ export default defineComponent({
|
|
|
417
456
|
resizeToOrignalImageSize,
|
|
418
457
|
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
419
458
|
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
420
|
-
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
459
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,
|
|
460
|
+
doUpdateShow,
|
|
461
|
+
close
|
|
421
462
|
}, exposedMethods);
|
|
422
463
|
},
|
|
423
464
|
render() {
|
|
@@ -473,7 +514,7 @@ export default defineComponent({
|
|
|
473
514
|
}), 'tipDownload');
|
|
474
515
|
const closeNode = withTooltip(h(NBaseIcon, {
|
|
475
516
|
clsPrefix: clsPrefix,
|
|
476
|
-
onClick: this.
|
|
517
|
+
onClick: () => this.close()
|
|
477
518
|
}, {
|
|
478
519
|
default: renderCloseIcon
|
|
479
520
|
}), 'tipClose');
|
|
@@ -484,15 +525,16 @@ export default defineComponent({
|
|
|
484
525
|
default: () => h(ZoomInIcon, null)
|
|
485
526
|
}), 'tipZoomIn');
|
|
486
527
|
return h(Fragment, null, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a), h(LazyTeleport, {
|
|
487
|
-
show: this.
|
|
528
|
+
show: this.mergedShow
|
|
488
529
|
}, {
|
|
489
530
|
default: () => {
|
|
490
531
|
var _a;
|
|
491
|
-
if (!(this.
|
|
532
|
+
if (!(this.mergedShow || this.displayed)) {
|
|
492
533
|
return null;
|
|
493
534
|
}
|
|
494
535
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
495
536
|
return withDirectives(h("div", {
|
|
537
|
+
ref: "containerRef",
|
|
496
538
|
class: [`${clsPrefix}-image-preview-container`, this.themeClass],
|
|
497
539
|
style: this.cssVars,
|
|
498
540
|
onWheel: this.handleWheel
|
|
@@ -500,16 +542,16 @@ export default defineComponent({
|
|
|
500
542
|
name: "fade-in-transition",
|
|
501
543
|
appear: this.appear
|
|
502
544
|
}, {
|
|
503
|
-
default: () => this.
|
|
545
|
+
default: () => this.mergedShow ? h("div", {
|
|
504
546
|
class: `${clsPrefix}-image-preview-overlay`,
|
|
505
|
-
onClick: this.
|
|
547
|
+
onClick: () => this.close()
|
|
506
548
|
}) : null
|
|
507
549
|
}), this.showToolbar ? h(Transition, {
|
|
508
550
|
name: "fade-in-transition",
|
|
509
551
|
appear: this.appear
|
|
510
552
|
}, {
|
|
511
553
|
default: () => {
|
|
512
|
-
if (!this.
|
|
554
|
+
if (!this.mergedShow) return null;
|
|
513
555
|
return h("div", {
|
|
514
556
|
class: `${clsPrefix}-image-preview-toolbar`
|
|
515
557
|
}, renderToolbar ? renderToolbar({
|
|
@@ -552,10 +594,10 @@ export default defineComponent({
|
|
|
552
594
|
src: this.previewSrc,
|
|
553
595
|
ref: "previewRef",
|
|
554
596
|
onDragstart: this.handleDragStart
|
|
555
|
-
}))), [[vShow, this.
|
|
597
|
+
}))), [[vShow, this.mergedShow]]);
|
|
556
598
|
}
|
|
557
599
|
})), [[zindexable, {
|
|
558
|
-
enabled: this.
|
|
600
|
+
enabled: this.mergedShow
|
|
559
601
|
}]]);
|
|
560
602
|
}
|
|
561
603
|
}));
|
|
@@ -41,7 +41,20 @@ export declare const imagePreviewSharedProps: {
|
|
|
41
41
|
arrowOffsetVertical: string;
|
|
42
42
|
arrowHeight: string;
|
|
43
43
|
padding: string;
|
|
44
|
-
},
|
|
44
|
+
}, {
|
|
45
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
46
|
+
height: string;
|
|
47
|
+
width: string;
|
|
48
|
+
borderRadius: string;
|
|
49
|
+
color: string;
|
|
50
|
+
colorHover: string;
|
|
51
|
+
railInsetHorizontalBottom: string;
|
|
52
|
+
railInsetHorizontalTop: string;
|
|
53
|
+
railInsetVerticalRight: string;
|
|
54
|
+
railInsetVerticalLeft: string;
|
|
55
|
+
railColor: string;
|
|
56
|
+
}, any>;
|
|
57
|
+
}>;
|
|
45
58
|
}>;
|
|
46
59
|
}>>;
|
|
47
60
|
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", {
|
|
@@ -70,7 +83,20 @@ export declare const imagePreviewSharedProps: {
|
|
|
70
83
|
arrowOffsetVertical: string;
|
|
71
84
|
arrowHeight: string;
|
|
72
85
|
padding: string;
|
|
73
|
-
},
|
|
86
|
+
}, {
|
|
87
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
88
|
+
height: string;
|
|
89
|
+
width: string;
|
|
90
|
+
borderRadius: string;
|
|
91
|
+
color: string;
|
|
92
|
+
colorHover: string;
|
|
93
|
+
railInsetHorizontalBottom: string;
|
|
94
|
+
railInsetHorizontalTop: string;
|
|
95
|
+
railInsetVerticalRight: string;
|
|
96
|
+
railInsetVerticalLeft: string;
|
|
97
|
+
railColor: string;
|
|
98
|
+
}, any>;
|
|
99
|
+
}>;
|
|
74
100
|
}>;
|
|
75
101
|
}>>>;
|
|
76
102
|
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", {
|
|
@@ -99,7 +125,20 @@ export declare const imagePreviewSharedProps: {
|
|
|
99
125
|
arrowOffsetVertical: string;
|
|
100
126
|
arrowHeight: string;
|
|
101
127
|
padding: string;
|
|
102
|
-
},
|
|
128
|
+
}, {
|
|
129
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
130
|
+
height: string;
|
|
131
|
+
width: string;
|
|
132
|
+
borderRadius: string;
|
|
133
|
+
color: string;
|
|
134
|
+
colorHover: string;
|
|
135
|
+
railInsetHorizontalBottom: string;
|
|
136
|
+
railInsetHorizontalTop: string;
|
|
137
|
+
railInsetVerticalRight: string;
|
|
138
|
+
railInsetVerticalLeft: string;
|
|
139
|
+
railColor: string;
|
|
140
|
+
}, any>;
|
|
141
|
+
}>;
|
|
103
142
|
}>;
|
|
104
143
|
}>>>;
|
|
105
144
|
};
|
|
@@ -15,3 +15,17 @@ export interface ImageRenderToolbarProps {
|
|
|
15
15
|
export type ImageRenderToolbar = (props: ImageRenderToolbarProps) => VNodeChild;
|
|
16
16
|
export type ImageGroupRenderToolbarProps = ImageRenderToolbarProps;
|
|
17
17
|
export type ImageGroupRenderToolbar = ImageRenderToolbar;
|
|
18
|
+
export interface ImageInst {
|
|
19
|
+
/** @deprecated Use `showPreview` instead */
|
|
20
|
+
click: () => void;
|
|
21
|
+
showPreview: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface ImageSlots {
|
|
24
|
+
placeholder?: ImagePlaceholderSlot;
|
|
25
|
+
error?: ImageErrorSlot;
|
|
26
|
+
}
|
|
27
|
+
export type ImagePlaceholderSlot = () => VNode[];
|
|
28
|
+
export type ImageErrorSlot = () => VNode[];
|
|
29
|
+
export interface ImagePreviewInst {
|
|
30
|
+
setThumbnailEl: (e: HTMLImageElement | null) => void;
|
|
31
|
+
}
|