naive-ui 2.33.4 → 2.34.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 +3517 -6061
- package/dist/index.prod.js +2 -2
- package/es/_internal/clear/src/styles/index.cssr.js +2 -2
- package/es/_internal/close/src/styles/index.cssr.js +2 -2
- package/es/_internal/index.d.ts +1 -0
- package/es/_internal/loading/index.d.ts +1 -0
- package/es/_internal/loading/src/Loading.d.ts +26 -14
- package/es/_internal/loading/src/Loading.js +17 -20
- package/es/_internal/scrollbar/src/styles/index.cssr.js +2 -2
- package/es/_internal/select-menu/src/styles/index.cssr.js +2 -2
- package/es/_internal/selection/src/Selection.js +5 -5
- package/es/_internal/selection/src/styles/index.cssr.js +2 -2
- package/es/_internal/slot-machine/src/styles/index.cssr.js +4 -3
- package/es/_styles/global/index.cssr.js +2 -2
- package/es/alert/src/styles/index.cssr.js +2 -2
- package/es/anchor/src/styles/index.cssr.js +2 -2
- package/es/auto-complete/src/styles/index.cssr.js +2 -2
- package/es/avatar/src/Avatar.d.ts +4 -1
- package/es/avatar/src/Avatar.js +12 -13
- package/es/avatar/src/styles/index.cssr.js +2 -2
- package/es/avatar-group/index.d.ts +1 -1
- package/es/avatar-group/src/AvatarGroup.d.ts +7 -7
- package/es/avatar-group/src/styles/avatar-group-rtl.cssr.js +2 -2
- package/es/avatar-group/src/styles/avatar-group.cssr.js +2 -2
- package/es/back-top/src/styles/index.cssr.js +2 -2
- package/es/badge/src/styles/index.cssr.js +2 -2
- package/es/breadcrumb/src/styles/index.cssr.js +2 -2
- package/es/button/src/Button.d.ts +4 -1
- package/es/button/src/Button.js +3 -3
- package/es/button/src/styles/index.cssr.js +2 -2
- package/es/button-group/src/styles/index.cssr.js +0 -3
- package/es/button-group/src/styles/rtl.cssr.js +0 -2
- package/es/calendar/src/styles/index.cssr.js +2 -2
- package/es/card/src/styles/index.cssr.js +4 -3
- package/es/carousel/src/styles/index.cssr.js +2 -2
- package/es/cascader/src/Cascader.d.ts +8 -0
- package/es/cascader/src/Cascader.js +41 -2
- package/es/cascader/src/CascaderOption.d.ts +1 -1
- package/es/cascader/src/CascaderOption.js +1 -7
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -0
- package/es/cascader/src/CascaderSelectMenu.js +8 -4
- package/es/cascader/src/interface.d.ts +11 -1
- package/es/cascader/src/styles/index.cssr.js +2 -2
- package/es/checkbox/src/styles/index.cssr.js +8 -5
- package/es/code/src/Code.d.ts +1 -1
- package/es/code/src/styles/index.cssr.js +2 -2
- package/es/collapse/src/styles/index.cssr.js +2 -2
- package/es/color-picker/src/ColorPicker.d.ts +5 -5
- package/es/color-picker/src/ColorPicker.js +7 -1
- package/es/color-picker/src/styles/index.cssr.js +2 -2
- package/es/color-picker/src/utils.d.ts +1 -1
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +6 -0
- package/es/config-provider/src/ConfigProvider.js +7 -0
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/data-table/src/DataTable.d.ts +11 -0
- package/es/data-table/src/DataTable.js +7 -3
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +14 -6
- package/es/data-table/src/TableParts/Header.js +7 -5
- package/es/data-table/src/interface.d.ts +10 -2
- package/es/data-table/src/interface.js +1 -1
- package/es/data-table/src/styles/index.cssr.js +21 -9
- package/es/date-picker/src/DatePicker.js +5 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +6 -6
- package/es/date-picker/src/styles/index.cssr.js +2 -2
- package/es/descriptions/src/styles/index.cssr.js +2 -2
- package/es/dialog/src/DialogEnvironment.d.ts +3 -0
- package/es/dialog/src/DialogEnvironment.js +2 -2
- package/es/dialog/src/DialogProvider.d.ts +3 -0
- package/es/dialog/src/styles/index.cssr.js +2 -2
- package/es/divider/src/styles/index.cssr.js +2 -2
- package/es/drawer/src/styles/index.cssr.js +2 -2
- package/es/dropdown/src/styles/index.cssr.js +2 -2
- package/es/dynamic-input/src/styles/index.cssr.js +2 -2
- package/es/dynamic-tags/src/styles/index.cssr.js +2 -2
- package/es/empty/src/styles/index.cssr.js +2 -2
- package/es/equation/index.d.ts +1 -0
- package/es/equation/index.js +1 -0
- package/es/equation/src/Equation.d.ts +18 -0
- package/es/equation/src/Equation.js +29 -0
- package/es/equation/styles/dark.d.ts +3 -0
- package/es/equation/styles/dark.js +8 -0
- package/es/equation/styles/index.d.ts +3 -0
- package/es/equation/styles/index.js +2 -0
- package/es/equation/styles/light.d.ts +6 -0
- package/es/equation/styles/light.js +8 -0
- package/es/form/src/FormItem.d.ts +3 -2
- package/es/form/src/FormItem.js +24 -7
- package/es/form/src/styles/form-item.cssr.js +5 -3
- package/es/gradient-text/src/styles/index.cssr.js +2 -2
- package/es/icon/src/styles/index.cssr.js +2 -2
- package/es/icon-wrapper/src/styles/index.cssr.js +2 -2
- package/es/image/src/Image.d.ts +4 -1
- package/es/image/src/Image.js +13 -7
- package/es/image/src/ImagePreview.d.ts +3 -2
- package/es/image/src/ImagePreview.js +41 -8
- package/es/image/src/interface.d.ts +5 -0
- package/es/image/src/interface.js +2 -0
- package/es/image/src/styles/index.cssr.js +2 -2
- package/es/input/src/Input.d.ts +3 -0
- package/es/input/src/Input.js +25 -6
- package/es/input/src/WordCount.js +2 -2
- package/es/input/src/interface.d.ts +1 -0
- package/es/input/src/styles/input-group-label.cssr.js +2 -2
- package/es/input/src/styles/input.cssr.js +11 -7
- package/es/layout/src/styles/layout-footer.cssr.js +2 -2
- package/es/layout/src/styles/layout-header.cssr.js +2 -2
- package/es/layout/src/styles/layout-sider.cssr.js +2 -2
- package/es/layout/src/styles/layout.cssr.js +2 -2
- package/es/list/src/styles/index.cssr.js +2 -2
- package/es/loading-bar/src/styles/index.cssr.js +2 -2
- package/es/locales/common/arDZ.d.ts +3 -0
- package/es/locales/common/arDZ.js +120 -0
- package/es/locales/common/deDE.js +2 -1
- package/es/locales/common/enGB.js +2 -1
- package/es/locales/common/enUS.d.ts +1 -0
- package/es/locales/common/enUS.js +2 -1
- package/es/locales/common/eo.js +2 -1
- package/es/locales/common/esAR.js +2 -1
- package/es/locales/common/frFR.js +2 -1
- package/es/locales/common/idID.js +2 -1
- package/es/locales/common/itIT.js +2 -1
- package/es/locales/common/jaJP.js +2 -1
- package/es/locales/common/koKR.js +2 -1
- package/es/locales/common/nbNO.js +2 -1
- package/es/locales/common/nlNL.js +2 -1
- package/es/locales/common/plPL.js +2 -1
- package/es/locales/common/ptBR.js +2 -1
- package/es/locales/common/ruRU.js +2 -1
- package/es/locales/common/skSK.js +2 -1
- package/es/locales/common/thTH.js +2 -1
- package/es/locales/common/trTR.d.ts +3 -0
- package/es/locales/common/trTR.js +121 -0
- package/es/locales/common/ukUA.js +2 -1
- package/es/locales/common/viVN.js +2 -1
- package/es/locales/common/zhCN.js +2 -1
- package/es/locales/common/zhTW.js +2 -1
- package/es/locales/date/arDZ.d.ts +3 -0
- package/es/locales/date/arDZ.js +6 -0
- package/es/locales/date/trTR.d.ts +3 -0
- package/es/locales/date/trTR.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -0
- package/es/log/src/styles/index.cssr.js +2 -2
- package/es/mention/src/Mention.d.ts +6 -0
- package/es/mention/src/Mention.js +6 -1
- package/es/mention/src/styles/index.cssr.js +2 -2
- package/es/menu/src/styles/index.cssr.js +2 -3
- package/es/message/src/styles/index.cssr.js +2 -2
- package/es/modal/src/BodyWrapper.d.ts +1 -1
- package/es/modal/src/styles/index.cssr.js +2 -2
- package/es/notification/src/styles/index.cssr.js +2 -3
- package/es/page-header/src/styles/index.cssr.js +2 -2
- package/es/pagination/src/Pagination.js +1 -1
- package/es/pagination/src/styles/index.cssr.js +2 -2
- package/es/popconfirm/src/styles/index.cssr.js +2 -2
- package/es/popover/src/styles/index.cssr.js +5 -5
- package/es/popselect/src/styles/index.cssr.js +2 -2
- package/es/progress/src/styles/index.cssr.js +2 -2
- package/es/radio/src/styles/radio-group.cssr.js +2 -2
- package/es/radio/src/styles/radio.cssr.js +2 -2
- package/es/rate/src/styles/index.cssr.js +2 -2
- package/es/result/src/styles/index.cssr.js +2 -2
- package/es/select/src/Select.js +1 -0
- package/es/select/src/styles/index.cssr.js +2 -2
- package/es/skeleton/src/styles/index.cssr.js +2 -2
- package/es/slider/src/styles/index.cssr.js +2 -2
- package/es/spin/src/styles/index.cssr.js +2 -2
- package/es/statistic/src/styles/index.cssr.js +2 -2
- package/es/steps/src/styles/index.cssr.js +2 -2
- package/es/switch/src/styles/index.cssr.js +2 -2
- package/es/table/src/styles/index.cssr.js +2 -2
- package/es/tabs/src/Tabs.d.ts +7 -7
- package/es/tabs/src/styles/index.cssr.js +2 -2
- package/es/tag/src/styles/index.cssr.js +2 -2
- package/es/themes/dark.js +2 -0
- package/es/themes/light.js +2 -0
- package/es/thing/src/styles/index.cssr.js +2 -2
- package/es/time-picker/src/styles/index.cssr.js +2 -2
- package/es/timeline/src/styles/index.cssr.js +6 -3
- package/es/transfer/src/Transfer.d.ts +13 -0
- package/es/transfer/src/Transfer.js +6 -2
- package/es/transfer/src/TransferListItem.d.ts +2 -1
- package/es/transfer/src/TransferListItem.js +5 -4
- package/es/transfer/src/interface.d.ts +1 -0
- package/es/transfer/src/styles/index.cssr.js +2 -2
- package/es/transfer/src/use-transfer-data.d.ts +1 -0
- package/es/transfer/src/use-transfer-data.js +13 -4
- package/es/tree/src/Tree.d.ts +60 -30
- package/es/tree/src/Tree.js +70 -24
- package/es/tree/src/TreeNode.d.ts +1 -1
- package/es/tree/src/TreeNode.js +1 -1
- package/es/tree/src/TreeNodeSwitcher.d.ts +3 -0
- package/es/tree/src/TreeNodeSwitcher.js +7 -5
- package/es/tree/src/interface.d.ts +12 -1
- package/es/tree/src/styles/index.cssr.js +3 -2
- package/es/tree/src/utils.d.ts +6 -0
- package/es/tree/src/utils.js +4 -0
- package/es/tree-select/index.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +38 -19
- package/es/tree-select/src/TreeSelect.js +75 -48
- package/es/tree-select/src/interface.d.ts +33 -2
- package/es/tree-select/src/styles/index.cssr.js +2 -2
- package/es/typography/src/styles/a.cssr.js +2 -2
- package/es/typography/src/styles/blockquote.cssr.js +2 -2
- package/es/typography/src/styles/header.cssr.js +2 -2
- package/es/typography/src/styles/hr.cssr.js +2 -2
- package/es/typography/src/styles/list.cssr.js +2 -2
- package/es/typography/src/styles/p.cssr.js +2 -2
- package/es/typography/src/styles/text.cssr.js +2 -2
- package/es/upload/index.d.ts +1 -1
- package/es/upload/src/Upload.d.ts +77 -1
- package/es/upload/src/Upload.js +28 -11
- package/es/upload/src/UploadFile.d.ts +2 -0
- package/es/upload/src/UploadFile.js +9 -10
- package/es/upload/src/interface.d.ts +7 -3
- package/es/upload/src/utils.d.ts +2 -2
- package/es/upload/src/utils.js +2 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/styles/index.cssr.js +2 -5
- package/lib/_internal/close/src/styles/index.cssr.js +2 -4
- package/lib/_internal/icon/src/styles/index.cssr.js +0 -2
- package/lib/_internal/index.d.ts +1 -0
- package/lib/_internal/loading/index.d.ts +1 -0
- package/lib/_internal/loading/src/Loading.d.ts +26 -14
- package/lib/_internal/loading/src/Loading.js +17 -20
- package/lib/_internal/loading/src/styles/index.cssr.js +0 -3
- package/lib/_internal/menu-mask/src/styles/index.cssr.js +0 -3
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +2 -5
- package/lib/_internal/scrollbar/src/styles/rtl.cssr.js +0 -2
- package/lib/_internal/select-menu/src/styles/index.cssr.js +2 -5
- package/lib/_internal/selection/src/Selection.js +5 -5
- package/lib/_internal/selection/src/styles/index.cssr.js +2 -4
- package/lib/_internal/slot-machine/src/styles/index.cssr.js +4 -7
- package/lib/_internal/wave/src/styles/index.cssr.js +0 -2
- package/lib/_styles/global/index.cssr.js +2 -6
- package/lib/_styles/transitions/fade-down.cssr.js +0 -6
- package/lib/_styles/transitions/fade-in-height-expand.cssr.js +0 -6
- package/lib/_styles/transitions/fade-in-scale-up.cssr.js +0 -6
- package/lib/_styles/transitions/fade-in-width-expand.cssr.js +0 -6
- package/lib/_styles/transitions/fade-in.cssr.js +0 -6
- package/lib/_styles/transitions/fade-up-width-expand.cssr.js +0 -6
- package/lib/_styles/transitions/icon-switch.cssr.js +0 -6
- package/lib/affix/src/styles/index.cssr.js +0 -2
- package/lib/alert/src/styles/index.cssr.js +2 -5
- package/lib/alert/src/styles/rtl.cssr.js +0 -2
- package/lib/anchor/src/styles/index.cssr.js +2 -4
- package/lib/auto-complete/src/styles/index.cssr.js +2 -5
- package/lib/avatar/src/Avatar.d.ts +4 -1
- package/lib/avatar/src/Avatar.js +12 -13
- package/lib/avatar/src/styles/index.cssr.js +2 -4
- package/lib/avatar-group/index.d.ts +1 -1
- package/lib/avatar-group/src/AvatarGroup.d.ts +7 -7
- package/lib/avatar-group/src/styles/avatar-group-rtl.cssr.js +2 -4
- package/lib/avatar-group/src/styles/avatar-group.cssr.js +2 -4
- package/lib/back-top/src/styles/index.cssr.js +2 -5
- package/lib/badge/src/styles/index.cssr.js +2 -5
- package/lib/badge/src/styles/rtl.cssr.js +0 -2
- package/lib/breadcrumb/src/styles/index.cssr.js +2 -4
- package/lib/button/src/Button.d.ts +4 -1
- package/lib/button/src/Button.js +3 -3
- package/lib/button/src/styles/index.cssr.js +2 -7
- package/lib/button/src/styles/rtl.cssr.js +0 -2
- package/lib/button-group/src/styles/index.cssr.js +0 -5
- package/lib/button-group/src/styles/rtl.cssr.js +0 -4
- package/lib/calendar/src/styles/index.cssr.js +2 -4
- package/lib/card/src/styles/index.cssr.js +4 -5
- package/lib/card/src/styles/rtl.cssr.js +0 -2
- package/lib/carousel/src/styles/index.cssr.js +2 -4
- package/lib/cascader/src/Cascader.d.ts +8 -0
- package/lib/cascader/src/Cascader.js +41 -2
- package/lib/cascader/src/CascaderOption.d.ts +1 -1
- package/lib/cascader/src/CascaderOption.js +1 -7
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -0
- package/lib/cascader/src/CascaderSelectMenu.js +8 -4
- package/lib/cascader/src/interface.d.ts +11 -1
- package/lib/cascader/src/styles/index.cssr.js +2 -5
- package/lib/checkbox/src/styles/index.cssr.js +8 -8
- package/lib/checkbox/src/styles/rtl.cssr.js +0 -2
- package/lib/code/src/Code.d.ts +1 -1
- package/lib/code/src/styles/index.cssr.js +2 -4
- package/lib/collapse/src/styles/index.cssr.js +2 -5
- package/lib/collapse/src/styles/rtl.cssr.js +0 -2
- package/lib/collapse-transition/src/styles/index.cssr.js +0 -3
- package/lib/collapse-transition/src/styles/rtl.cssr.js +0 -2
- package/lib/color-picker/src/ColorPicker.d.ts +5 -5
- package/lib/color-picker/src/ColorPicker.js +7 -1
- package/lib/color-picker/src/styles/index.cssr.js +2 -5
- package/lib/color-picker/src/utils.d.ts +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +6 -0
- package/lib/config-provider/src/ConfigProvider.js +7 -0
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/data-table/src/DataTable.d.ts +11 -0
- package/lib/data-table/src/DataTable.js +6 -2
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +13 -5
- package/lib/data-table/src/TableParts/Header.js +7 -5
- package/lib/data-table/src/interface.d.ts +10 -2
- package/lib/data-table/src/interface.js +1 -1
- package/lib/data-table/src/styles/index.cssr.js +21 -13
- package/lib/date-picker/src/DatePicker.js +5 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +6 -6
- package/lib/date-picker/src/styles/index.cssr.js +2 -5
- package/lib/descriptions/src/styles/index.cssr.js +2 -4
- package/lib/dialog/src/DialogEnvironment.d.ts +3 -0
- package/lib/dialog/src/DialogEnvironment.js +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +3 -0
- package/lib/dialog/src/styles/index.cssr.js +2 -4
- package/lib/divider/src/styles/index.cssr.js +2 -4
- package/lib/drawer/src/styles/index.cssr.js +2 -9
- package/lib/drawer/src/styles/rtl.cssr.js +0 -2
- package/lib/dropdown/src/styles/index.cssr.js +2 -5
- package/lib/dynamic-input/src/styles/index.cssr.js +2 -4
- package/lib/dynamic-input/src/styles/rtl.cssr.js +0 -2
- package/lib/dynamic-tags/src/styles/index.cssr.js +2 -4
- package/lib/ellipsis/src/styles/index.cssr.js +0 -2
- package/lib/empty/src/styles/index.cssr.js +2 -4
- package/lib/equation/index.d.ts +1 -0
- package/lib/equation/index.js +6 -0
- package/lib/equation/src/Equation.d.ts +18 -0
- package/lib/equation/src/Equation.js +32 -0
- package/lib/equation/styles/dark.d.ts +3 -0
- package/lib/equation/styles/dark.js +10 -0
- package/lib/equation/styles/index.d.ts +3 -0
- package/lib/equation/styles/index.js +10 -0
- package/lib/equation/styles/light.d.ts +6 -0
- package/lib/equation/styles/light.js +12 -0
- package/lib/form/src/FormItem.d.ts +3 -2
- package/lib/form/src/FormItem.js +24 -7
- package/lib/form/src/styles/form-item.cssr.js +5 -6
- package/lib/form/src/styles/form.cssr.js +0 -2
- package/lib/gradient-text/src/styles/index.cssr.js +2 -4
- package/lib/icon/src/styles/index.cssr.js +2 -4
- package/lib/icon-wrapper/src/styles/index.cssr.js +2 -4
- package/lib/image/src/Image.d.ts +4 -1
- package/lib/image/src/Image.js +11 -5
- package/lib/image/src/ImagePreview.d.ts +3 -2
- package/lib/image/src/ImagePreview.js +39 -6
- package/lib/image/src/interface.d.ts +5 -0
- package/lib/image/src/interface.js +3 -1
- package/lib/image/src/styles/index.cssr.js +2 -6
- package/lib/input/src/Input.d.ts +3 -0
- package/lib/input/src/Input.js +25 -6
- package/lib/input/src/WordCount.js +2 -2
- package/lib/input/src/interface.d.ts +1 -0
- package/lib/input/src/styles/input-group-label.cssr.js +2 -4
- package/lib/input/src/styles/input-group.cssr.js +0 -2
- package/lib/input/src/styles/input.cssr.js +11 -9
- package/lib/input/src/styles/rtl.cssr.js +0 -2
- package/lib/input-number/src/styles/input-number.cssr.js +0 -2
- package/lib/input-number/src/styles/rtl.cssr.js +0 -2
- package/lib/layout/src/styles/layout-footer.cssr.js +2 -4
- package/lib/layout/src/styles/layout-header.cssr.js +2 -4
- package/lib/layout/src/styles/layout-sider.cssr.js +2 -4
- package/lib/layout/src/styles/layout.cssr.js +2 -4
- package/lib/legacy-grid/src/styles/index.cssr.js +0 -2
- package/lib/legacy-grid/src/styles/rtl.cssr.js +0 -2
- package/lib/legacy-transfer/src/styles/index.cssr.js +0 -3
- package/lib/list/src/styles/index.cssr.js +2 -4
- package/lib/list/src/styles/rtl.cssr.js +0 -2
- package/lib/loading-bar/src/styles/index.cssr.js +2 -5
- package/lib/locales/common/arDZ.d.ts +3 -0
- package/lib/locales/common/arDZ.js +122 -0
- package/lib/locales/common/deDE.js +2 -1
- package/lib/locales/common/enGB.js +2 -1
- package/lib/locales/common/enUS.d.ts +1 -0
- package/lib/locales/common/enUS.js +2 -1
- package/lib/locales/common/eo.js +2 -1
- package/lib/locales/common/esAR.js +2 -1
- package/lib/locales/common/frFR.js +2 -1
- package/lib/locales/common/idID.js +2 -1
- package/lib/locales/common/itIT.js +2 -1
- package/lib/locales/common/jaJP.js +2 -1
- package/lib/locales/common/koKR.js +2 -1
- package/lib/locales/common/nbNO.js +2 -1
- package/lib/locales/common/nlNL.js +2 -1
- package/lib/locales/common/plPL.js +2 -1
- package/lib/locales/common/ptBR.js +2 -1
- package/lib/locales/common/ruRU.js +2 -1
- package/lib/locales/common/skSK.js +2 -1
- package/lib/locales/common/thTH.js +2 -1
- package/lib/locales/common/trTR.d.ts +3 -0
- package/lib/locales/common/trTR.js +123 -0
- package/lib/locales/common/ukUA.js +2 -1
- package/lib/locales/common/viVN.js +2 -1
- package/lib/locales/common/zhCN.js +2 -1
- package/lib/locales/common/zhTW.js +2 -1
- package/lib/locales/date/arDZ.d.ts +3 -0
- package/lib/locales/date/arDZ.js +11 -0
- package/lib/locales/date/trTR.d.ts +3 -0
- package/lib/locales/date/trTR.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -1
- package/lib/log/src/styles/index.cssr.js +2 -5
- package/lib/mention/src/Mention.d.ts +6 -0
- package/lib/mention/src/Mention.js +6 -1
- package/lib/mention/src/styles/index.cssr.js +2 -5
- package/lib/menu/src/styles/index.cssr.js +2 -6
- package/lib/message/src/styles/index.cssr.js +2 -6
- package/lib/message/src/styles/rtl.cssr.js +0 -2
- package/lib/modal/src/BodyWrapper.d.ts +1 -1
- package/lib/modal/src/styles/index.cssr.js +2 -6
- package/lib/notification/src/styles/index.cssr.js +2 -5
- package/lib/notification/src/styles/rtl.cssr.js +0 -2
- package/lib/page-header/src/styles/index.cssr.js +2 -4
- package/lib/page-header/src/styles/rtl.cssr.js +0 -2
- package/lib/pagination/src/Pagination.js +1 -1
- package/lib/pagination/src/styles/index.cssr.js +2 -4
- package/lib/pagination/src/styles/rtl.cssr.js +0 -2
- package/lib/popconfirm/src/styles/index.cssr.js +2 -4
- package/lib/popover/src/styles/index.cssr.js +5 -8
- package/lib/popselect/src/styles/index.cssr.js +2 -4
- package/lib/progress/src/styles/index.cssr.js +2 -4
- package/lib/radio/src/styles/radio-group.cssr.js +2 -4
- package/lib/radio/src/styles/radio.cssr.js +2 -4
- package/lib/radio/src/styles/rtl.cssr.js +0 -2
- package/lib/rate/src/styles/index.cssr.js +2 -4
- package/lib/result/src/styles/index.cssr.js +2 -4
- package/lib/select/src/Select.js +1 -0
- package/lib/select/src/styles/index.cssr.js +2 -5
- package/lib/skeleton/src/styles/index.cssr.js +2 -4
- package/lib/slider/src/styles/index.cssr.js +2 -5
- package/lib/space/src/styles/rtl.cssr.js +0 -2
- package/lib/spin/src/styles/index.cssr.js +2 -5
- package/lib/statistic/src/styles/index.cssr.js +2 -4
- package/lib/statistic/src/styles/rtl.cssr.js +0 -2
- package/lib/steps/src/styles/index.cssr.js +2 -5
- package/lib/steps/src/styles/rtl.cssr.js +0 -2
- package/lib/switch/src/styles/index.cssr.js +2 -5
- package/lib/table/src/styles/index.cssr.js +2 -4
- package/lib/table/src/styles/rtl.cssr.js +0 -2
- package/lib/tabs/src/Tabs.d.ts +7 -7
- package/lib/tabs/src/styles/index.cssr.js +2 -4
- package/lib/tag/src/styles/index.cssr.js +2 -4
- package/lib/tag/src/styles/rtl.cssr.js +0 -2
- package/lib/themes/dark.js +100 -98
- package/lib/themes/light.js +100 -98
- package/lib/thing/src/styles/index.cssr.js +2 -4
- package/lib/thing/src/styles/rtl.cssr.js +0 -2
- package/lib/time-picker/src/styles/index.cssr.js +2 -5
- package/lib/timeline/src/styles/index.cssr.js +6 -5
- package/lib/transfer/src/Transfer.d.ts +13 -0
- package/lib/transfer/src/Transfer.js +6 -2
- package/lib/transfer/src/TransferListItem.d.ts +2 -1
- package/lib/transfer/src/TransferListItem.js +5 -4
- package/lib/transfer/src/interface.d.ts +1 -0
- package/lib/transfer/src/styles/index.cssr.js +2 -4
- package/lib/transfer/src/use-transfer-data.d.ts +1 -0
- package/lib/transfer/src/use-transfer-data.js +13 -4
- package/lib/tree/src/Tree.d.ts +60 -30
- package/lib/tree/src/Tree.js +69 -23
- package/lib/tree/src/TreeNode.d.ts +1 -1
- package/lib/tree/src/TreeNode.js +1 -1
- package/lib/tree/src/TreeNodeSwitcher.d.ts +3 -0
- package/lib/tree/src/TreeNodeSwitcher.js +7 -5
- package/lib/tree/src/interface.d.ts +12 -1
- package/lib/tree/src/styles/index.cssr.js +3 -6
- package/lib/tree/src/styles/rtl.cssr.js +0 -2
- package/lib/tree/src/utils.d.ts +6 -0
- package/lib/tree/src/utils.js +6 -1
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +38 -19
- package/lib/tree-select/src/TreeSelect.js +75 -48
- package/lib/tree-select/src/interface.d.ts +33 -2
- package/lib/tree-select/src/styles/index.cssr.js +2 -5
- package/lib/typography/src/styles/a.cssr.js +2 -4
- package/lib/typography/src/styles/blockquote.cssr.js +2 -4
- package/lib/typography/src/styles/header.cssr.js +2 -4
- package/lib/typography/src/styles/hr.cssr.js +2 -4
- package/lib/typography/src/styles/list.cssr.js +2 -4
- package/lib/typography/src/styles/p.cssr.js +2 -4
- package/lib/typography/src/styles/text.cssr.js +2 -4
- package/lib/upload/index.d.ts +1 -1
- package/lib/upload/src/Upload.d.ts +77 -1
- package/lib/upload/src/Upload.js +27 -10
- package/lib/upload/src/UploadFile.d.ts +2 -0
- package/lib/upload/src/UploadFile.js +8 -9
- package/lib/upload/src/interface.d.ts +7 -3
- package/lib/upload/src/styles/index.cssr.js +0 -4
- package/lib/upload/src/utils.d.ts +2 -2
- package/lib/upload/src/utils.js +2 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/src/styles/index.cssr.js +0 -2
- package/package.json +13 -10
- package/volar.d.ts +1 -0
- package/web-types.json +236 -57
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType, CSSProperties, InputHTMLAttributes } from 'vue';
|
|
2
2
|
import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
|
|
3
3
|
import type { ImageGroupProps } from '../../image';
|
|
4
|
-
import type { FileInfo, FuncOrRecordOrUndef, OnFinish, OnRemove, OnDownload, OnChange, OnUpdateFileList, OnBeforeUpload, ListType, OnPreview, CreateThumbnailUrl, CustomRequest, OnError } from './interface';
|
|
4
|
+
import type { FileInfo, FuncOrRecordOrUndef, OnFinish, OnRemove, OnDownload, OnChange, OnUpdateFileList, OnBeforeUpload, ListType, OnPreview, CreateThumbnailUrl, CustomRequest, OnError, SettledFileInfo, ShouldUseThumbnailUrl, RenderIcon } from './interface';
|
|
5
5
|
export declare const uploadProps: {
|
|
6
6
|
readonly name: {
|
|
7
7
|
readonly type: StringConstructor;
|
|
@@ -77,6 +77,10 @@ export declare const uploadProps: {
|
|
|
77
77
|
readonly default: "text";
|
|
78
78
|
};
|
|
79
79
|
readonly onPreview: PropType<OnPreview>;
|
|
80
|
+
readonly shouldUseThumbnailUrl: {
|
|
81
|
+
readonly type: PropType<ShouldUseThumbnailUrl>;
|
|
82
|
+
readonly default: (file: SettledFileInfo) => boolean;
|
|
83
|
+
};
|
|
80
84
|
readonly createThumbnailUrl: PropType<CreateThumbnailUrl>;
|
|
81
85
|
readonly abstract: BooleanConstructor;
|
|
82
86
|
readonly max: NumberConstructor;
|
|
@@ -87,6 +91,7 @@ export declare const uploadProps: {
|
|
|
87
91
|
readonly imageGroupProps: PropType<ImageGroupProps>;
|
|
88
92
|
readonly inputProps: PropType<InputHTMLAttributes>;
|
|
89
93
|
readonly triggerStyle: PropType<string | CSSProperties>;
|
|
94
|
+
readonly renderIcon: PropType<RenderIcon>;
|
|
90
95
|
readonly theme: PropType<import("../../_mixins").Theme<"Upload", {
|
|
91
96
|
fontSize: string;
|
|
92
97
|
lineHeight: string;
|
|
@@ -119,6 +124,9 @@ export declare const uploadProps: {
|
|
|
119
124
|
fontSizeLarge: string;
|
|
120
125
|
opacityDisabled: string;
|
|
121
126
|
colorOpacitySecondary: string;
|
|
127
|
+
/**
|
|
128
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
129
|
+
*/
|
|
122
130
|
colorOpacitySecondaryHover: string;
|
|
123
131
|
colorOpacitySecondaryPressed: string;
|
|
124
132
|
colorSecondary: string;
|
|
@@ -308,6 +316,9 @@ export declare const uploadProps: {
|
|
|
308
316
|
iconSizeLarge: string;
|
|
309
317
|
rippleDuration: string;
|
|
310
318
|
}, any>;
|
|
319
|
+
/**
|
|
320
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
321
|
+
*/
|
|
311
322
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
312
323
|
fontSize: string;
|
|
313
324
|
fontSizeCircle: string;
|
|
@@ -364,6 +375,9 @@ export declare const uploadProps: {
|
|
|
364
375
|
fontSizeLarge: string;
|
|
365
376
|
opacityDisabled: string;
|
|
366
377
|
colorOpacitySecondary: string;
|
|
378
|
+
/**
|
|
379
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
380
|
+
*/
|
|
367
381
|
colorOpacitySecondaryHover: string;
|
|
368
382
|
colorOpacitySecondaryPressed: string;
|
|
369
383
|
colorSecondary: string;
|
|
@@ -553,6 +567,9 @@ export declare const uploadProps: {
|
|
|
553
567
|
iconSizeLarge: string;
|
|
554
568
|
rippleDuration: string;
|
|
555
569
|
}, any>;
|
|
570
|
+
/**
|
|
571
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
572
|
+
*/
|
|
556
573
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
557
574
|
fontSize: string;
|
|
558
575
|
fontSizeCircle: string;
|
|
@@ -609,6 +626,9 @@ export declare const uploadProps: {
|
|
|
609
626
|
fontSizeLarge: string;
|
|
610
627
|
opacityDisabled: string;
|
|
611
628
|
colorOpacitySecondary: string;
|
|
629
|
+
/**
|
|
630
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
631
|
+
*/
|
|
612
632
|
colorOpacitySecondaryHover: string;
|
|
613
633
|
colorOpacitySecondaryPressed: string;
|
|
614
634
|
colorSecondary: string;
|
|
@@ -798,6 +818,9 @@ export declare const uploadProps: {
|
|
|
798
818
|
iconSizeLarge: string;
|
|
799
819
|
rippleDuration: string;
|
|
800
820
|
}, any>;
|
|
821
|
+
/**
|
|
822
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
823
|
+
*/
|
|
801
824
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
802
825
|
fontSize: string;
|
|
803
826
|
fontSizeCircle: string;
|
|
@@ -899,6 +922,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
899
922
|
readonly default: "text";
|
|
900
923
|
};
|
|
901
924
|
readonly onPreview: PropType<OnPreview>;
|
|
925
|
+
readonly shouldUseThumbnailUrl: {
|
|
926
|
+
readonly type: PropType<ShouldUseThumbnailUrl>;
|
|
927
|
+
readonly default: (file: Required<FileInfo>) => boolean;
|
|
928
|
+
};
|
|
902
929
|
readonly createThumbnailUrl: PropType<CreateThumbnailUrl>;
|
|
903
930
|
readonly abstract: BooleanConstructor;
|
|
904
931
|
readonly max: NumberConstructor;
|
|
@@ -909,6 +936,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
909
936
|
readonly imageGroupProps: PropType<ImageGroupProps>;
|
|
910
937
|
readonly inputProps: PropType<InputHTMLAttributes>;
|
|
911
938
|
readonly triggerStyle: PropType<string | CSSProperties>;
|
|
939
|
+
readonly renderIcon: PropType<RenderIcon>;
|
|
912
940
|
readonly theme: PropType<import("../../_mixins").Theme<"Upload", {
|
|
913
941
|
fontSize: string;
|
|
914
942
|
lineHeight: string;
|
|
@@ -941,6 +969,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
941
969
|
fontSizeLarge: string;
|
|
942
970
|
opacityDisabled: string;
|
|
943
971
|
colorOpacitySecondary: string;
|
|
972
|
+
/**
|
|
973
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
974
|
+
*/
|
|
944
975
|
colorOpacitySecondaryHover: string;
|
|
945
976
|
colorOpacitySecondaryPressed: string;
|
|
946
977
|
colorSecondary: string;
|
|
@@ -1130,6 +1161,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1130
1161
|
iconSizeLarge: string;
|
|
1131
1162
|
rippleDuration: string;
|
|
1132
1163
|
}, any>;
|
|
1164
|
+
/**
|
|
1165
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
1166
|
+
*/
|
|
1133
1167
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
1134
1168
|
fontSize: string;
|
|
1135
1169
|
fontSizeCircle: string;
|
|
@@ -1186,6 +1220,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1186
1220
|
fontSizeLarge: string;
|
|
1187
1221
|
opacityDisabled: string;
|
|
1188
1222
|
colorOpacitySecondary: string;
|
|
1223
|
+
/**
|
|
1224
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
1225
|
+
*/
|
|
1189
1226
|
colorOpacitySecondaryHover: string;
|
|
1190
1227
|
colorOpacitySecondaryPressed: string;
|
|
1191
1228
|
colorSecondary: string;
|
|
@@ -1375,6 +1412,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1375
1412
|
iconSizeLarge: string;
|
|
1376
1413
|
rippleDuration: string;
|
|
1377
1414
|
}, any>;
|
|
1415
|
+
/**
|
|
1416
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
1417
|
+
*/
|
|
1378
1418
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
1379
1419
|
fontSize: string;
|
|
1380
1420
|
fontSizeCircle: string;
|
|
@@ -1431,6 +1471,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1431
1471
|
fontSizeLarge: string;
|
|
1432
1472
|
opacityDisabled: string;
|
|
1433
1473
|
colorOpacitySecondary: string;
|
|
1474
|
+
/**
|
|
1475
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
1476
|
+
*/
|
|
1434
1477
|
colorOpacitySecondaryHover: string;
|
|
1435
1478
|
colorOpacitySecondaryPressed: string;
|
|
1436
1479
|
colorSecondary: string;
|
|
@@ -1620,6 +1663,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1620
1663
|
iconSizeLarge: string;
|
|
1621
1664
|
rippleDuration: string;
|
|
1622
1665
|
}, any>;
|
|
1666
|
+
/**
|
|
1667
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
1668
|
+
*/
|
|
1623
1669
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
1624
1670
|
fontSize: string;
|
|
1625
1671
|
fontSizeCircle: string;
|
|
@@ -1792,6 +1838,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1792
1838
|
fontSizeLarge: string;
|
|
1793
1839
|
opacityDisabled: string;
|
|
1794
1840
|
colorOpacitySecondary: string;
|
|
1841
|
+
/**
|
|
1842
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
1843
|
+
*/
|
|
1795
1844
|
colorOpacitySecondaryHover: string;
|
|
1796
1845
|
colorOpacitySecondaryPressed: string;
|
|
1797
1846
|
colorSecondary: string;
|
|
@@ -1981,6 +2030,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1981
2030
|
iconSizeLarge: string;
|
|
1982
2031
|
rippleDuration: string;
|
|
1983
2032
|
}, any>;
|
|
2033
|
+
/**
|
|
2034
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
2035
|
+
*/
|
|
1984
2036
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
1985
2037
|
fontSize: string;
|
|
1986
2038
|
fontSizeCircle: string;
|
|
@@ -2099,6 +2151,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2099
2151
|
readonly default: "text";
|
|
2100
2152
|
};
|
|
2101
2153
|
readonly onPreview: PropType<OnPreview>;
|
|
2154
|
+
readonly shouldUseThumbnailUrl: {
|
|
2155
|
+
readonly type: PropType<ShouldUseThumbnailUrl>;
|
|
2156
|
+
readonly default: (file: Required<FileInfo>) => boolean;
|
|
2157
|
+
};
|
|
2102
2158
|
readonly createThumbnailUrl: PropType<CreateThumbnailUrl>;
|
|
2103
2159
|
readonly abstract: BooleanConstructor;
|
|
2104
2160
|
readonly max: NumberConstructor;
|
|
@@ -2109,6 +2165,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2109
2165
|
readonly imageGroupProps: PropType<ImageGroupProps>;
|
|
2110
2166
|
readonly inputProps: PropType<InputHTMLAttributes>;
|
|
2111
2167
|
readonly triggerStyle: PropType<string | CSSProperties>;
|
|
2168
|
+
readonly renderIcon: PropType<RenderIcon>;
|
|
2112
2169
|
readonly theme: PropType<import("../../_mixins").Theme<"Upload", {
|
|
2113
2170
|
fontSize: string;
|
|
2114
2171
|
lineHeight: string;
|
|
@@ -2141,6 +2198,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2141
2198
|
fontSizeLarge: string;
|
|
2142
2199
|
opacityDisabled: string;
|
|
2143
2200
|
colorOpacitySecondary: string;
|
|
2201
|
+
/**
|
|
2202
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
2203
|
+
*/
|
|
2144
2204
|
colorOpacitySecondaryHover: string;
|
|
2145
2205
|
colorOpacitySecondaryPressed: string;
|
|
2146
2206
|
colorSecondary: string;
|
|
@@ -2330,6 +2390,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2330
2390
|
iconSizeLarge: string;
|
|
2331
2391
|
rippleDuration: string;
|
|
2332
2392
|
}, any>;
|
|
2393
|
+
/**
|
|
2394
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
2395
|
+
*/
|
|
2333
2396
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
2334
2397
|
fontSize: string;
|
|
2335
2398
|
fontSizeCircle: string;
|
|
@@ -2386,6 +2449,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2386
2449
|
fontSizeLarge: string;
|
|
2387
2450
|
opacityDisabled: string;
|
|
2388
2451
|
colorOpacitySecondary: string;
|
|
2452
|
+
/**
|
|
2453
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
2454
|
+
*/
|
|
2389
2455
|
colorOpacitySecondaryHover: string;
|
|
2390
2456
|
colorOpacitySecondaryPressed: string;
|
|
2391
2457
|
colorSecondary: string;
|
|
@@ -2575,6 +2641,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2575
2641
|
iconSizeLarge: string;
|
|
2576
2642
|
rippleDuration: string;
|
|
2577
2643
|
}, any>;
|
|
2644
|
+
/**
|
|
2645
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
2646
|
+
*/
|
|
2578
2647
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
2579
2648
|
fontSize: string;
|
|
2580
2649
|
fontSizeCircle: string;
|
|
@@ -2631,6 +2700,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2631
2700
|
fontSizeLarge: string;
|
|
2632
2701
|
opacityDisabled: string;
|
|
2633
2702
|
colorOpacitySecondary: string;
|
|
2703
|
+
/**
|
|
2704
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
2705
|
+
*/
|
|
2634
2706
|
colorOpacitySecondaryHover: string;
|
|
2635
2707
|
colorOpacitySecondaryPressed: string;
|
|
2636
2708
|
colorSecondary: string;
|
|
@@ -2820,6 +2892,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2820
2892
|
iconSizeLarge: string;
|
|
2821
2893
|
rippleDuration: string;
|
|
2822
2894
|
}, any>;
|
|
2895
|
+
/**
|
|
2896
|
+
* fils status ['pending', 'uploading', 'finished', 'removed', 'error']
|
|
2897
|
+
*/
|
|
2823
2898
|
Progress: import("../../_mixins").Theme<"Progress", {
|
|
2824
2899
|
fontSize: string;
|
|
2825
2900
|
fontSizeCircle: string;
|
|
@@ -2857,6 +2932,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2857
2932
|
readonly showDownloadButton: boolean;
|
|
2858
2933
|
readonly showRetryButton: boolean;
|
|
2859
2934
|
readonly showPreviewButton: boolean;
|
|
2935
|
+
readonly shouldUseThumbnailUrl: ShouldUseThumbnailUrl;
|
|
2860
2936
|
readonly withCredentials: boolean;
|
|
2861
2937
|
readonly responseType: XMLHttpRequestResponseType;
|
|
2862
2938
|
readonly directory: boolean;
|
package/es/upload/src/Upload.js
CHANGED
|
@@ -15,7 +15,7 @@ import { warn, call, throwError } from '../../_utils';
|
|
|
15
15
|
import { uploadLight } from '../styles';
|
|
16
16
|
import { uploadDraggerKey } from './UploadDragger';
|
|
17
17
|
import { uploadInjectionKey } from './interface';
|
|
18
|
-
import { createImageDataUrl, createSettledFileInfo, matchType } from './utils';
|
|
18
|
+
import { createImageDataUrl, createSettledFileInfo, environmentSupportFile, isImageFile, matchType } from './utils';
|
|
19
19
|
import NUploadTrigger from './UploadTrigger';
|
|
20
20
|
import NUploadFileList from './UploadFileList';
|
|
21
21
|
import style from './styles/index.cssr';
|
|
@@ -213,10 +213,17 @@ export const uploadProps = Object.assign(Object.assign({}, useTheme.props), { na
|
|
|
213
213
|
}, listType: {
|
|
214
214
|
type: String,
|
|
215
215
|
default: 'text'
|
|
216
|
-
}, onPreview: Function,
|
|
216
|
+
}, onPreview: Function, shouldUseThumbnailUrl: {
|
|
217
|
+
type: Function,
|
|
218
|
+
default: (file) => {
|
|
219
|
+
if (!environmentSupportFile)
|
|
220
|
+
return false;
|
|
221
|
+
return isImageFile(file);
|
|
222
|
+
}
|
|
223
|
+
}, createThumbnailUrl: Function, abstract: Boolean, max: Number, showTrigger: {
|
|
217
224
|
type: Boolean,
|
|
218
225
|
default: true
|
|
219
|
-
}, imageGroupProps: Object, inputProps: Object, triggerStyle: [String, Object] });
|
|
226
|
+
}, imageGroupProps: Object, inputProps: Object, triggerStyle: [String, Object], renderIcon: Object });
|
|
220
227
|
export default defineComponent({
|
|
221
228
|
name: 'Upload',
|
|
222
229
|
props: uploadProps,
|
|
@@ -405,13 +412,21 @@ export default defineComponent({
|
|
|
405
412
|
warn('upload', 'File has no corresponding id in current file list.');
|
|
406
413
|
}
|
|
407
414
|
};
|
|
408
|
-
function
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
return
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
+
function getFileThumbnailUrlResolver(file) {
|
|
416
|
+
var _a;
|
|
417
|
+
if (file.thumbnailUrl)
|
|
418
|
+
return file.thumbnailUrl;
|
|
419
|
+
const { createThumbnailUrl } = props;
|
|
420
|
+
if (createThumbnailUrl) {
|
|
421
|
+
return (_a = createThumbnailUrl(file.file, file)) !== null && _a !== void 0 ? _a : (file.url || '');
|
|
422
|
+
}
|
|
423
|
+
if (file.url) {
|
|
424
|
+
return file.url;
|
|
425
|
+
}
|
|
426
|
+
else if (file.file) {
|
|
427
|
+
return createImageDataUrl(file.file);
|
|
428
|
+
}
|
|
429
|
+
return '';
|
|
415
430
|
}
|
|
416
431
|
const cssVarsRef = computed(() => {
|
|
417
432
|
const { common: { cubicBezierEaseInOut }, self: { draggerColor, draggerBorder, draggerBorderHover, itemColorHover, itemColorHoverError, itemTextColorError, itemTextColorSuccess, itemTextColor, itemIconColor, itemDisabledOpacity, lineHeight, borderRadius, fontSize, itemBorderImageCardError, itemBorderImageCard } } = themeRef.value;
|
|
@@ -448,12 +463,14 @@ export default defineComponent({
|
|
|
448
463
|
onDownloadRef: toRef(props, 'onDownload'),
|
|
449
464
|
mergedFileListRef,
|
|
450
465
|
triggerStyleRef: toRef(props, 'triggerStyle'),
|
|
466
|
+
shouldUseThumbnailUrlRef: toRef(props, 'shouldUseThumbnailUrl'),
|
|
467
|
+
renderIconRef: toRef(props, 'renderIcon'),
|
|
451
468
|
xhrMap,
|
|
452
469
|
submit,
|
|
453
470
|
doChange,
|
|
454
471
|
showPreviewButtonRef: toRef(props, 'showPreviewButton'),
|
|
455
472
|
onPreviewRef: toRef(props, 'onPreview'),
|
|
456
|
-
|
|
473
|
+
getFileThumbnailUrlResolver,
|
|
457
474
|
listTypeRef: toRef(props, 'listType'),
|
|
458
475
|
dragOverRef,
|
|
459
476
|
openOpenFileDialog,
|
|
@@ -389,6 +389,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
389
389
|
showRetryButton: import("vue").ComputedRef<boolean>;
|
|
390
390
|
showPreviewButton: import("vue").ComputedRef<boolean | "" | null>;
|
|
391
391
|
mergedThumbnailUrl: import("vue").ComputedRef<string | null>;
|
|
392
|
+
shouldUseThumbnailUrl: import("vue").Ref<import("./interface").ShouldUseThumbnailUrl>;
|
|
393
|
+
renderIcon: import("vue").Ref<import("./interface").RenderIcon | undefined>;
|
|
392
394
|
imageRef: import("vue").Ref<{
|
|
393
395
|
click: () => void;
|
|
394
396
|
} | null>;
|
|
@@ -17,7 +17,7 @@ import { warn } from '../../_utils';
|
|
|
17
17
|
import NUploadProgress from './UploadProgress';
|
|
18
18
|
import { uploadInjectionKey } from './interface';
|
|
19
19
|
import { imageIcon, documentIcon } from './icons';
|
|
20
|
-
import { download,
|
|
20
|
+
import { download, isImageFile } from './utils';
|
|
21
21
|
const buttonThemeOverrides = {
|
|
22
22
|
paddingMedium: '0 3px',
|
|
23
23
|
heightMedium: '24px',
|
|
@@ -167,10 +167,9 @@ export default defineComponent({
|
|
|
167
167
|
if (listType !== 'image' && listType !== 'image-card') {
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
|
-
if (
|
|
171
|
-
|
|
170
|
+
if (NUpload.shouldUseThumbnailUrlRef.value(props.file)) {
|
|
171
|
+
thumbnailUrlRef.value = yield NUpload.getFileThumbnailUrlResolver(props.file);
|
|
172
172
|
}
|
|
173
|
-
thumbnailUrlRef.value = yield NUpload.getFileThumbnailUrl(props.file);
|
|
174
173
|
});
|
|
175
174
|
watchEffect(() => {
|
|
176
175
|
void deriveFileThumbnailUrl();
|
|
@@ -187,6 +186,8 @@ export default defineComponent({
|
|
|
187
186
|
showRetryButton: showRetryButtonRef,
|
|
188
187
|
showPreviewButton: showPreviewButtonRef,
|
|
189
188
|
mergedThumbnailUrl: mergedThumbnailUrlRef,
|
|
189
|
+
shouldUseThumbnailUrl: NUpload.shouldUseThumbnailUrlRef,
|
|
190
|
+
renderIcon: NUpload.renderIconRef,
|
|
190
191
|
imageRef,
|
|
191
192
|
handleRemoveOrCancelClick,
|
|
192
193
|
handleDownloadClick,
|
|
@@ -195,19 +196,17 @@ export default defineComponent({
|
|
|
195
196
|
};
|
|
196
197
|
},
|
|
197
198
|
render() {
|
|
198
|
-
const { clsPrefix, mergedTheme, listType, file } = this;
|
|
199
|
+
const { clsPrefix, mergedTheme, listType, file, renderIcon } = this;
|
|
199
200
|
// if there is text list type, show file icon
|
|
200
201
|
let icon;
|
|
201
202
|
const isImageType = listType === 'image';
|
|
202
203
|
const isImageCardType = listType === 'image-card';
|
|
203
204
|
if (isImageType || isImageCardType) {
|
|
204
|
-
icon =
|
|
205
|
-
h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () =>
|
|
206
|
-
h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => imageIcon })));
|
|
205
|
+
icon =
|
|
206
|
+
!this.shouldUseThumbnailUrl(file) || !this.mergedThumbnailUrl ? (h("span", { class: `${clsPrefix}-upload-file-info__thumbnail` }, renderIcon ? (renderIcon(file)) : isImageFile(file) ? (h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => imageIcon })) : (h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => documentIcon })))) : (h("a", { rel: "noopener noreferer", target: "_blank", href: file.url || undefined, class: `${clsPrefix}-upload-file-info__thumbnail`, onClick: this.handlePreviewClick }, listType === 'image-card' ? (h(NImage, { src: this.mergedThumbnailUrl || undefined, previewSrc: file.url || undefined, alt: file.name, ref: "imageRef" })) : (h("img", { src: this.mergedThumbnailUrl || undefined, alt: file.name }))));
|
|
207
207
|
}
|
|
208
208
|
else {
|
|
209
|
-
icon = (h("span", { class: `${clsPrefix}-upload-file-info__thumbnail` },
|
|
210
|
-
h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => h(AttachIcon, null) })));
|
|
209
|
+
icon = (h("span", { class: `${clsPrefix}-upload-file-info__thumbnail` }, renderIcon ? (renderIcon(file)) : (h(NBaseIcon, { clsPrefix: clsPrefix }, { default: () => h(AttachIcon, null) }))));
|
|
211
210
|
}
|
|
212
211
|
const progress = (h(NUploadProgress, { show: this.showProgress, percentage: file.percentage || 0, status: this.progressStatus }));
|
|
213
212
|
const showName = listType === 'text' || listType === 'image';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ref, CSSProperties } from 'vue';
|
|
1
|
+
import { Ref, CSSProperties, VNodeChild } from 'vue';
|
|
2
2
|
import { ImageGroupProps } from '../../image';
|
|
3
3
|
import type { MergedTheme } from '../../_mixins';
|
|
4
4
|
import type { UploadTheme } from '../styles';
|
|
@@ -15,6 +15,7 @@ export interface FileInfo {
|
|
|
15
15
|
fullPath?: string | null;
|
|
16
16
|
}
|
|
17
17
|
export declare type SettledFileInfo = Required<FileInfo>;
|
|
18
|
+
export declare type ShouldUseThumbnailUrl = (file: SettledFileInfo) => boolean;
|
|
18
19
|
export declare type FuncOrRecordOrUndef = Record<string, string> | (({ file }: {
|
|
19
20
|
file: SettledFileInfo;
|
|
20
21
|
}) => Record<string, string>) | undefined;
|
|
@@ -44,6 +45,7 @@ export declare type DoChange = (fileAfterChange: SettledFileInfo, event?: Progre
|
|
|
44
45
|
remove?: boolean;
|
|
45
46
|
}) => void;
|
|
46
47
|
export declare type OnUpdateFileList = (fileList: SettledFileInfo[]) => void;
|
|
48
|
+
export declare type RenderIcon = (file: SettledFileInfo) => VNodeChild;
|
|
47
49
|
export interface UploadInjection {
|
|
48
50
|
mergedClsPrefixRef: Ref<string>;
|
|
49
51
|
mergedThemeRef: Ref<MergedTheme<UploadTheme>>;
|
|
@@ -76,7 +78,9 @@ export interface UploadInjection {
|
|
|
76
78
|
doChange: DoChange;
|
|
77
79
|
onRender: undefined | (() => void);
|
|
78
80
|
submit: (fileId?: string) => void;
|
|
79
|
-
|
|
81
|
+
shouldUseThumbnailUrlRef: Ref<ShouldUseThumbnailUrl>;
|
|
82
|
+
getFileThumbnailUrlResolver: (file: SettledFileInfo) => Promise<string> | string;
|
|
83
|
+
renderIconRef: Ref<RenderIcon | undefined>;
|
|
80
84
|
handleFileAddition: (files: FileAndEntry[] | null, e?: Event) => void;
|
|
81
85
|
openOpenFileDialog: () => void;
|
|
82
86
|
}
|
|
@@ -98,7 +102,7 @@ export declare type OnBeforeUpload = (data: {
|
|
|
98
102
|
}) => Promise<boolean | void> | boolean | void;
|
|
99
103
|
export declare type ListType = 'text' | 'image' | 'image-card';
|
|
100
104
|
export declare type OnPreview = (file: SettledFileInfo) => void;
|
|
101
|
-
export declare type CreateThumbnailUrl = (file: File) => Promise<string
|
|
105
|
+
export declare type CreateThumbnailUrl = (file: File | null, fileInfo: SettledFileInfo) => Promise<string> | string | undefined;
|
|
102
106
|
export interface CustomRequestOptions {
|
|
103
107
|
file: SettledFileInfo;
|
|
104
108
|
action?: string;
|
package/es/upload/src/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FileAndEntry, FileInfo, SettledFileInfo } from './interface';
|
|
1
|
+
import type { FileAndEntry, FileInfo, SettledFileInfo, ShouldUseThumbnailUrl } from './interface';
|
|
2
2
|
export declare const isImageFileType: (type: string) => boolean;
|
|
3
|
-
export declare const isImageFile:
|
|
3
|
+
export declare const isImageFile: ShouldUseThumbnailUrl;
|
|
4
4
|
export declare function createImageDataUrl(file: File): Promise<string>;
|
|
5
5
|
export declare const environmentSupportFile: false | {
|
|
6
6
|
new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag | undefined): File;
|
package/es/upload/src/utils.js
CHANGED
|
@@ -15,6 +15,7 @@ const getExtname = (url = '') => {
|
|
|
15
15
|
const filenameWithoutSuffix = filename.split(/#|\?/)[0];
|
|
16
16
|
return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
|
|
17
17
|
};
|
|
18
|
+
// Do not need File object
|
|
18
19
|
export const isImageFile = (file) => {
|
|
19
20
|
if (file.type) {
|
|
20
21
|
return isImageFileType(file.type);
|
|
@@ -31,7 +32,7 @@ export const isImageFile = (file) => {
|
|
|
31
32
|
if (extension) {
|
|
32
33
|
return false;
|
|
33
34
|
}
|
|
34
|
-
return
|
|
35
|
+
return false;
|
|
35
36
|
};
|
|
36
37
|
export function createImageDataUrl(file) {
|
|
37
38
|
return __awaiter(this, void 0, void 0, function* () {
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.
|
|
1
|
+
declare const _default: "2.34.0";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.
|
|
1
|
+
export default '2.34.0';
|
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
const cssr_1 = require("../../../../_utils/cssr");
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const icon_switch_cssr_1 = require("../../../../_styles/transitions/icon-switch.cssr");
|
|
8
|
+
// vars:
|
|
10
9
|
// --n-bezier
|
|
11
10
|
// --n-clear-color
|
|
12
11
|
// --n-clear-size
|
|
13
12
|
// --n-clear-color-hover
|
|
14
13
|
// --n-clear-color-pressed
|
|
15
|
-
|
|
16
|
-
|
|
17
14
|
exports.default = (0, cssr_1.cB)('base-clear', `
|
|
18
15
|
flex-shrink: 0;
|
|
19
16
|
height: 1em;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const cssr_1 = require("../../../../_utils/cssr");
|
|
7
|
+
// vars:
|
|
8
8
|
// --n-close-border-radius
|
|
9
9
|
// --n-close-color-hover
|
|
10
10
|
// --n-close-color-pressed
|
|
@@ -12,8 +12,6 @@ const cssr_1 = require("../../../../_utils/cssr"); // vars:
|
|
|
12
12
|
// --n-close-icon-color-hover
|
|
13
13
|
// --n-close-icon-color-pressed
|
|
14
14
|
// --n-close-icon-color-disabled
|
|
15
|
-
|
|
16
|
-
|
|
17
15
|
exports.default = (0, cssr_1.cB)('base-close', `
|
|
18
16
|
display: flex;
|
|
19
17
|
align-items: center;
|
package/lib/_internal/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { NBaseClose } from './close';
|
|
|
4
4
|
export { NBaseIcon } from './icon';
|
|
5
5
|
export { default as NBaseFocusDetector } from './focus-detector';
|
|
6
6
|
export { default as NBaseLoading } from './loading';
|
|
7
|
+
export type { BaseLoadingExposedProps } from './loading';
|
|
7
8
|
export { default as NInternalSelectMenu } from './select-menu';
|
|
8
9
|
export type { InternalSelectMenuRef } from './select-menu';
|
|
9
10
|
export { default as NBaseWave } from './wave';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
scale: {
|
|
1
|
+
import { ExtractPublicPropTypes } from '../../../_utils';
|
|
2
|
+
declare const exposedLoadingProps: {
|
|
3
|
+
strokeWidth: {
|
|
7
4
|
type: NumberConstructor;
|
|
8
5
|
default: number;
|
|
9
6
|
};
|
|
10
|
-
|
|
11
|
-
type:
|
|
12
|
-
default:
|
|
7
|
+
stroke: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: undefined;
|
|
13
10
|
};
|
|
11
|
+
};
|
|
12
|
+
export declare type BaseLoadingExposedProps = ExtractPublicPropTypes<typeof exposedLoadingProps>;
|
|
13
|
+
declare const _default: import("vue").DefineComponent<{
|
|
14
14
|
strokeWidth: {
|
|
15
15
|
type: NumberConstructor;
|
|
16
16
|
default: number;
|
|
@@ -19,15 +19,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
type: StringConstructor;
|
|
20
20
|
default: undefined;
|
|
21
21
|
};
|
|
22
|
-
show: {
|
|
23
|
-
type: BooleanConstructor;
|
|
24
|
-
default: boolean;
|
|
25
|
-
};
|
|
26
|
-
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
22
|
clsPrefix: {
|
|
28
23
|
type: StringConstructor;
|
|
29
24
|
required: true;
|
|
30
25
|
};
|
|
26
|
+
show: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
31
30
|
scale: {
|
|
32
31
|
type: NumberConstructor;
|
|
33
32
|
default: number;
|
|
@@ -36,6 +35,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
36
35
|
type: NumberConstructor;
|
|
37
36
|
default: number;
|
|
38
37
|
};
|
|
38
|
+
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
39
|
strokeWidth: {
|
|
40
40
|
type: NumberConstructor;
|
|
41
41
|
default: number;
|
|
@@ -44,10 +44,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
type: StringConstructor;
|
|
45
45
|
default: undefined;
|
|
46
46
|
};
|
|
47
|
+
clsPrefix: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
47
51
|
show: {
|
|
48
52
|
type: BooleanConstructor;
|
|
49
53
|
default: boolean;
|
|
50
54
|
};
|
|
55
|
+
scale: {
|
|
56
|
+
type: NumberConstructor;
|
|
57
|
+
default: number;
|
|
58
|
+
};
|
|
59
|
+
radius: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
default: number;
|
|
62
|
+
};
|
|
51
63
|
}>>, {
|
|
52
64
|
show: boolean;
|
|
53
65
|
stroke: string;
|