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,11 +1,11 @@
|
|
|
1
1
|
import { cB, c, cE } from '../../../../_utils/cssr';
|
|
2
|
-
import { iconSwitchTransition } from '../../../../_styles/transitions/icon-switch.cssr';
|
|
2
|
+
import { iconSwitchTransition } from '../../../../_styles/transitions/icon-switch.cssr';
|
|
3
|
+
// vars:
|
|
3
4
|
// --n-bezier
|
|
4
5
|
// --n-clear-color
|
|
5
6
|
// --n-clear-size
|
|
6
7
|
// --n-clear-color-hover
|
|
7
8
|
// --n-clear-color-pressed
|
|
8
|
-
|
|
9
9
|
export default cB('base-clear', `
|
|
10
10
|
flex-shrink: 0;
|
|
11
11
|
height: 1em;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { cB, cM, c, cNotM } from '../../../../_utils/cssr';
|
|
1
|
+
import { cB, cM, c, cNotM } from '../../../../_utils/cssr';
|
|
2
|
+
// vars:
|
|
2
3
|
// --n-close-border-radius
|
|
3
4
|
// --n-close-color-hover
|
|
4
5
|
// --n-close-color-pressed
|
|
@@ -6,7 +7,6 @@ import { cB, cM, c, cNotM } from '../../../../_utils/cssr'; // vars:
|
|
|
6
7
|
// --n-close-icon-color-hover
|
|
7
8
|
// --n-close-icon-color-pressed
|
|
8
9
|
// --n-close-icon-color-disabled
|
|
9
|
-
|
|
10
10
|
export default cB('base-close', `
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
package/es/_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;
|
|
@@ -2,34 +2,31 @@ import { h, defineComponent, toRef } from 'vue';
|
|
|
2
2
|
import { useStyle } from '../../../_mixins';
|
|
3
3
|
import NIconSwitchTransition from '../../icon-switch-transition';
|
|
4
4
|
import style from './styles/index.cssr';
|
|
5
|
+
const exposedLoadingProps = {
|
|
6
|
+
strokeWidth: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 28
|
|
9
|
+
},
|
|
10
|
+
stroke: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: undefined
|
|
13
|
+
}
|
|
14
|
+
};
|
|
5
15
|
export default defineComponent({
|
|
6
16
|
name: 'BaseLoading',
|
|
7
|
-
props: {
|
|
8
|
-
clsPrefix: {
|
|
17
|
+
props: Object.assign({ clsPrefix: {
|
|
9
18
|
type: String,
|
|
10
19
|
required: true
|
|
11
|
-
},
|
|
12
|
-
|
|
20
|
+
}, show: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
23
|
+
}, scale: {
|
|
13
24
|
type: Number,
|
|
14
25
|
default: 1
|
|
15
|
-
},
|
|
16
|
-
radius: {
|
|
26
|
+
}, radius: {
|
|
17
27
|
type: Number,
|
|
18
28
|
default: 100
|
|
19
|
-
},
|
|
20
|
-
strokeWidth: {
|
|
21
|
-
type: Number,
|
|
22
|
-
default: 28
|
|
23
|
-
},
|
|
24
|
-
stroke: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: undefined
|
|
27
|
-
},
|
|
28
|
-
show: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: true
|
|
31
|
-
}
|
|
32
|
-
},
|
|
29
|
+
} }, exposedLoadingProps),
|
|
33
30
|
setup(props) {
|
|
34
31
|
useStyle('-base-loading', style, toRef(props, 'clsPrefix'));
|
|
35
32
|
},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { cB, c, cM, cE } from '../../../../_utils/cssr';
|
|
2
|
-
import { fadeInTransition } from '../../../../_styles/transitions/fade-in.cssr';
|
|
2
|
+
import { fadeInTransition } from '../../../../_styles/transitions/fade-in.cssr';
|
|
3
|
+
// vars:
|
|
3
4
|
// --n-scrollbar-bezier
|
|
4
5
|
// --n-scrollbar-color
|
|
5
6
|
// --n-scrollbar-color-hover
|
|
6
7
|
// --n-scrollbar-width
|
|
7
8
|
// --n-scrollbar-height
|
|
8
9
|
// --n-scrollbar-border-radius
|
|
9
|
-
|
|
10
10
|
export default cB('scrollbar', `
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
position: relative;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c, cB, cE, cM, cNotM } from '../../../../_utils/cssr';
|
|
2
|
-
import { fadeInScaleUpTransition } from '../../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
2
|
+
import { fadeInScaleUpTransition } from '../../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
3
|
+
// --n-loading-color
|
|
3
4
|
// --n-loading-size
|
|
4
5
|
// --n-option-padding-right
|
|
5
|
-
|
|
6
6
|
export default cB('base-select-menu', `
|
|
7
7
|
line-height: 1.5;
|
|
8
8
|
outline: none;
|
|
@@ -456,7 +456,7 @@ export default defineComponent({
|
|
|
456
456
|
? renderLabel(option, true)
|
|
457
457
|
: render(option[labelField], option, true)
|
|
458
458
|
}))));
|
|
459
|
-
const
|
|
459
|
+
const createOriginalTagNodes = () => (maxTagCountNumeric
|
|
460
460
|
? this.selectedOptions.slice(0, maxTagCount)
|
|
461
461
|
: this.selectedOptions).map(createTag);
|
|
462
462
|
const input = filterable ? (h("div", { class: `${clsPrefix}-base-selection-input-tag`, ref: "inputTagElRef", key: "__input-tag__" },
|
|
@@ -482,7 +482,7 @@ export default defineComponent({
|
|
|
482
482
|
display: 'flex',
|
|
483
483
|
overflow: 'hidden'
|
|
484
484
|
} }, {
|
|
485
|
-
default:
|
|
485
|
+
default: createOriginalTagNodes,
|
|
486
486
|
counter: renderCounter,
|
|
487
487
|
tail: () => input
|
|
488
488
|
})) : (h(VOverflow, { ref: "overflowRef", updateCounter: this.updateCounter, getCounter: this.getCounter, style: {
|
|
@@ -490,12 +490,12 @@ export default defineComponent({
|
|
|
490
490
|
display: 'flex',
|
|
491
491
|
overflow: 'hidden'
|
|
492
492
|
} }, {
|
|
493
|
-
default:
|
|
493
|
+
default: createOriginalTagNodes,
|
|
494
494
|
counter: renderCounter
|
|
495
|
-
}))) : maxTagCountNumeric ? (
|
|
495
|
+
}))) : maxTagCountNumeric ? (createOriginalTagNodes().concat(counter)) : (createOriginalTagNodes());
|
|
496
496
|
const renderPopover = useMaxTagCount
|
|
497
497
|
? () => (h("div", { class: `${clsPrefix}-base-selection-popover` }, maxTagCountResponsive
|
|
498
|
-
?
|
|
498
|
+
? createOriginalTagNodes()
|
|
499
499
|
: this.selectedOptions.map(createTag)))
|
|
500
500
|
: undefined;
|
|
501
501
|
const popoverProps = useMaxTagCount
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { c, cB, cE, cM, cNotM } from '../../../../_utils/cssr';
|
|
1
|
+
import { c, cB, cE, cM, cNotM } from '../../../../_utils/cssr';
|
|
2
|
+
// vars:
|
|
2
3
|
// --n-bezier
|
|
3
4
|
// --n-border
|
|
4
5
|
// --n-border-active
|
|
@@ -25,7 +26,6 @@ import { c, cB, cE, cM, cNotM } from '../../../../_utils/cssr'; // vars:
|
|
|
25
26
|
// --n-loading-color
|
|
26
27
|
// ...clear vars
|
|
27
28
|
// ...form item vars
|
|
28
|
-
|
|
29
29
|
export default c([cB('base-selection', `
|
|
30
30
|
position: relative;
|
|
31
31
|
z-index: auto;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c, cB, cE, cM } from '../../../../_utils/cssr';
|
|
2
2
|
import { fadeInWidthExpandTransition } from '../../../../_styles/transitions/fade-in-width-expand.cssr';
|
|
3
|
-
import { fadeUpWidthExpandTransition } from '../../../../_styles/transitions/fade-up-width-expand.cssr';
|
|
4
|
-
|
|
3
|
+
import { fadeUpWidthExpandTransition } from '../../../../_styles/transitions/fade-up-width-expand.cssr';
|
|
4
|
+
// ease-out: cubic-bezier(0, 0, .2, 1)
|
|
5
5
|
export default c([c('@keyframes n-base-slot-machine-fade-up-in', `
|
|
6
6
|
from {
|
|
7
7
|
transform: translateY(60%);
|
|
@@ -52,7 +52,8 @@ export default c([c('@keyframes n-base-slot-machine-fade-up-in', `
|
|
|
52
52
|
max-width: .6em;
|
|
53
53
|
`, [fadeUpWidthExpandTransition({
|
|
54
54
|
duration: '.2s'
|
|
55
|
-
}),
|
|
55
|
+
}),
|
|
56
|
+
// use 0s, not 0
|
|
56
57
|
fadeInWidthExpandTransition({
|
|
57
58
|
duration: '.2s',
|
|
58
59
|
delay: '0s'
|
|
@@ -4,7 +4,8 @@ const {
|
|
|
4
4
|
fontSize,
|
|
5
5
|
fontFamily,
|
|
6
6
|
lineHeight
|
|
7
|
-
} = commonVariables;
|
|
7
|
+
} = commonVariables;
|
|
8
|
+
// All the components need the style
|
|
8
9
|
// It is static and won't be changed in the app's lifetime
|
|
9
10
|
// If user want to overrides it they need to use `n-global-style` is provided
|
|
10
11
|
//
|
|
@@ -14,7 +15,6 @@ const {
|
|
|
14
15
|
// -webkit-tap-hilight-color:
|
|
15
16
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color
|
|
16
17
|
// In some android devices, there will be the style.
|
|
17
|
-
|
|
18
18
|
export default c('body', `
|
|
19
19
|
margin: 0;
|
|
20
20
|
font-size: ${fontSize};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c, cB, cE, cM } from '../../../_utils/cssr';
|
|
2
|
-
import { fadeInHeightExpandTransition } from '../../../_styles/transitions/fade-in-height-expand.cssr';
|
|
2
|
+
import { fadeInHeightExpandTransition } from '../../../_styles/transitions/fade-in-height-expand.cssr';
|
|
3
|
+
// vars:
|
|
3
4
|
// --n-bezier
|
|
4
5
|
// --n-color
|
|
5
6
|
// --n-close-color-hover
|
|
@@ -23,7 +24,6 @@ import { fadeInHeightExpandTransition } from '../../../_styles/transitions/fade-
|
|
|
23
24
|
// --n-padding
|
|
24
25
|
// --n-icon-margin-left
|
|
25
26
|
// --n-icon-margin-right
|
|
26
|
-
|
|
27
27
|
export default cB('alert', `
|
|
28
28
|
line-height: var(--n-line-height);
|
|
29
29
|
border-radius: var(--n-border-radius);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { c, cE, cB, cM, cNotM } from '../../../_utils/cssr';
|
|
1
|
+
import { c, cE, cB, cM, cNotM } from '../../../_utils/cssr';
|
|
2
|
+
// vars:
|
|
2
3
|
// --n-link-color
|
|
3
4
|
// --n-link-font-size
|
|
4
5
|
// --n-link-text-color
|
|
@@ -11,7 +12,6 @@ import { c, cE, cB, cM, cNotM } from '../../../_utils/cssr'; // vars:
|
|
|
11
12
|
// --n-rail-width
|
|
12
13
|
// --n-link-padding
|
|
13
14
|
// --n-link-border-radius
|
|
14
|
-
|
|
15
15
|
export default cB('anchor', `
|
|
16
16
|
position: relative;
|
|
17
17
|
`, [cNotM('block', `
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c, cB } from '../../../_utils/cssr';
|
|
2
|
-
import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
2
|
+
import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
3
|
+
// vars:
|
|
3
4
|
// --n-bezier
|
|
4
5
|
// --n-menu-box-shadow
|
|
5
|
-
|
|
6
6
|
export default c([cB('auto-complete', `
|
|
7
7
|
z-index: auto;
|
|
8
8
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType, VNodeChild } from 'vue';
|
|
1
|
+
import { PropType, VNodeChild, ImgHTMLAttributes } from 'vue';
|
|
2
2
|
import { IntersectionObserverOptions } from '../../image/src/utils';
|
|
3
3
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
4
4
|
import type { Size, ObjectFit } from './interface';
|
|
@@ -25,6 +25,7 @@ export declare const avatarProps: {
|
|
|
25
25
|
readonly onLoad: PropType<(e: Event) => void>;
|
|
26
26
|
readonly renderPlaceholder: PropType<() => VNodeChild>;
|
|
27
27
|
readonly renderFallback: PropType<() => VNodeChild>;
|
|
28
|
+
readonly imgProps: PropType<ImgHTMLAttributes>;
|
|
28
29
|
/** @deprecated */
|
|
29
30
|
readonly color: StringConstructor;
|
|
30
31
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
@@ -91,6 +92,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
91
92
|
readonly onLoad: PropType<(e: Event) => void>;
|
|
92
93
|
readonly renderPlaceholder: PropType<() => VNodeChild>;
|
|
93
94
|
readonly renderFallback: PropType<() => VNodeChild>;
|
|
95
|
+
readonly imgProps: PropType<ImgHTMLAttributes>;
|
|
94
96
|
/** @deprecated */
|
|
95
97
|
readonly color: StringConstructor;
|
|
96
98
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
@@ -178,6 +180,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
178
180
|
readonly onLoad: PropType<(e: Event) => void>;
|
|
179
181
|
readonly renderPlaceholder: PropType<() => VNodeChild>;
|
|
180
182
|
readonly renderFallback: PropType<() => VNodeChild>;
|
|
183
|
+
readonly imgProps: PropType<ImgHTMLAttributes>;
|
|
181
184
|
/** @deprecated */
|
|
182
185
|
readonly color: StringConstructor;
|
|
183
186
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
package/es/avatar/src/Avatar.js
CHANGED
|
@@ -17,7 +17,7 @@ export const avatarProps = Object.assign(Object.assign({}, useTheme.props), { si
|
|
|
17
17
|
}, bordered: {
|
|
18
18
|
type: Boolean,
|
|
19
19
|
default: undefined
|
|
20
|
-
}, onError: Function, fallbackSrc: String, intersectionObserverOptions: Object, lazy: Boolean, onLoad: Function, renderPlaceholder: Function, renderFallback: Function,
|
|
20
|
+
}, onError: Function, fallbackSrc: String, intersectionObserverOptions: Object, lazy: Boolean, onLoad: Function, renderPlaceholder: Function, renderFallback: Function, imgProps: Object,
|
|
21
21
|
/** @deprecated */
|
|
22
22
|
color: String });
|
|
23
23
|
export default defineComponent({
|
|
@@ -74,10 +74,12 @@ export default defineComponent({
|
|
|
74
74
|
return props.bordered || false;
|
|
75
75
|
});
|
|
76
76
|
const handleError = (e) => {
|
|
77
|
+
var _a;
|
|
77
78
|
if (!shouldStartLoadingRef.value)
|
|
78
79
|
return;
|
|
79
80
|
hasLoadErrorRef.value = true;
|
|
80
|
-
const { onError } = props;
|
|
81
|
+
const { onError, imgProps } = props;
|
|
82
|
+
(_a = imgProps === null || imgProps === void 0 ? void 0 : imgProps.onError) === null || _a === void 0 ? void 0 : _a.call(imgProps, e);
|
|
81
83
|
if (onError) {
|
|
82
84
|
onError(e);
|
|
83
85
|
}
|
|
@@ -167,8 +169,10 @@ export default defineComponent({
|
|
|
167
169
|
shouldStartLoading: shouldStartLoadingRef,
|
|
168
170
|
loaded: loadedRef,
|
|
169
171
|
mergedOnLoad: (e) => {
|
|
170
|
-
|
|
172
|
+
var _a;
|
|
173
|
+
const { onLoad, imgProps } = props;
|
|
171
174
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(e);
|
|
175
|
+
(_a = imgProps === null || imgProps === void 0 ? void 0 : imgProps.onLoad) === null || _a === void 0 ? void 0 : _a.call(imgProps, e);
|
|
172
176
|
loadedRef.value = true;
|
|
173
177
|
}
|
|
174
178
|
};
|
|
@@ -198,17 +202,13 @@ export default defineComponent({
|
|
|
198
202
|
}));
|
|
199
203
|
}
|
|
200
204
|
else if (src) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
src: isImageSupportNativeLazy
|
|
205
|
+
const { imgProps } = this;
|
|
206
|
+
return h('img', Object.assign(Object.assign({}, imgProps), { loading: isImageSupportNativeLazy && lazy ? 'lazy' : 'eager', src: isImageSupportNativeLazy
|
|
204
207
|
? src
|
|
205
208
|
: shouldStartLoading || loaded
|
|
206
209
|
? src
|
|
207
|
-
: undefined,
|
|
208
|
-
|
|
209
|
-
'data-image-src': src,
|
|
210
|
-
onError: this.handleError,
|
|
211
|
-
style: [
|
|
210
|
+
: undefined, onLoad: mergedOnLoad, 'data-image-src': src, onError: this.handleError, style: [
|
|
211
|
+
imgProps === null || imgProps === void 0 ? void 0 : imgProps.style,
|
|
212
212
|
{ objectFit: this.objectFit },
|
|
213
213
|
placeholderNode
|
|
214
214
|
? {
|
|
@@ -218,8 +218,7 @@ export default defineComponent({
|
|
|
218
218
|
position: 'absolute'
|
|
219
219
|
}
|
|
220
220
|
: ''
|
|
221
|
-
]
|
|
222
|
-
});
|
|
221
|
+
] }));
|
|
223
222
|
}
|
|
224
223
|
});
|
|
225
224
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { c, cE, cB, insideModal, insidePopover } from '../../../_utils/cssr';
|
|
1
|
+
import { c, cE, cB, insideModal, insidePopover } from '../../../_utils/cssr';
|
|
2
|
+
// vars:
|
|
2
3
|
// --n-font-size
|
|
3
4
|
// --n-border-radius
|
|
4
5
|
// --n-color
|
|
@@ -6,7 +7,6 @@ import { c, cE, cB, insideModal, insidePopover } from '../../../_utils/cssr'; //
|
|
|
6
7
|
// --n-color-popover
|
|
7
8
|
// --n-bezier
|
|
8
9
|
// --n-merged-size
|
|
9
|
-
|
|
10
10
|
export default cB('avatar', `
|
|
11
11
|
width: var(--n-merged-size);
|
|
12
12
|
height: var(--n-merged-size);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as NAvatarGroup, avatarGroupProps } from './src/AvatarGroup';
|
|
2
|
-
export type { AvatarGroupProps } from './src/AvatarGroup';
|
|
2
|
+
export type { AvatarGroupProps, AvatarGroupOption } from './src/AvatarGroup';
|
|
@@ -4,14 +4,14 @@ import type { ExtractPublicPropTypes } from '../../_utils';
|
|
|
4
4
|
export interface AvatarGroupInjection {
|
|
5
5
|
size?: Size | undefined;
|
|
6
6
|
}
|
|
7
|
-
interface
|
|
7
|
+
export interface AvatarGroupOption {
|
|
8
8
|
src: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const avatarGroupProps: {
|
|
11
11
|
readonly max: NumberConstructor;
|
|
12
12
|
readonly maxStyle: PropType<string | CSSProperties>;
|
|
13
13
|
readonly options: {
|
|
14
|
-
readonly type: PropType<
|
|
14
|
+
readonly type: PropType<AvatarGroupOption[]>;
|
|
15
15
|
readonly default: () => never[];
|
|
16
16
|
};
|
|
17
17
|
readonly vertical: BooleanConstructor;
|
|
@@ -73,7 +73,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
readonly max: NumberConstructor;
|
|
74
74
|
readonly maxStyle: PropType<string | CSSProperties>;
|
|
75
75
|
readonly options: {
|
|
76
|
-
readonly type: PropType<
|
|
76
|
+
readonly type: PropType<AvatarGroupOption[]>;
|
|
77
77
|
readonly default: () => never[];
|
|
78
78
|
};
|
|
79
79
|
readonly vertical: BooleanConstructor;
|
|
@@ -264,8 +264,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
264
264
|
}>;
|
|
265
265
|
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
266
266
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
267
|
-
restOptions: import("vue").ComputedRef<
|
|
268
|
-
displayedOptions: import("vue").ComputedRef<
|
|
267
|
+
restOptions: import("vue").ComputedRef<AvatarGroupOption[] | undefined>;
|
|
268
|
+
displayedOptions: import("vue").ComputedRef<AvatarGroupOption[]>;
|
|
269
269
|
cssVars: import("vue").ComputedRef<{
|
|
270
270
|
'--n-gap': string;
|
|
271
271
|
}>;
|
|
@@ -273,7 +273,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
273
273
|
readonly max: NumberConstructor;
|
|
274
274
|
readonly maxStyle: PropType<string | CSSProperties>;
|
|
275
275
|
readonly options: {
|
|
276
|
-
readonly type: PropType<
|
|
276
|
+
readonly type: PropType<AvatarGroupOption[]>;
|
|
277
277
|
readonly default: () => never[];
|
|
278
278
|
};
|
|
279
279
|
readonly vertical: BooleanConstructor;
|
|
@@ -331,6 +331,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
331
331
|
}>>>;
|
|
332
332
|
}>>, {
|
|
333
333
|
readonly vertical: boolean;
|
|
334
|
-
readonly options:
|
|
334
|
+
readonly options: AvatarGroupOption[];
|
|
335
335
|
}>;
|
|
336
336
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c, cB, cM } from '../../../_utils/cssr';
|
|
2
|
-
import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
2
|
+
import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
3
|
+
// vars:
|
|
3
4
|
// --n-bezier
|
|
4
5
|
// --n-border-radius
|
|
5
6
|
// --n-height
|
|
@@ -13,7 +14,6 @@ import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-sc
|
|
|
13
14
|
// --n-icon-color-hover
|
|
14
15
|
// --n-icon-color-pressed
|
|
15
16
|
// --n-text-color
|
|
16
|
-
|
|
17
17
|
export default cB('back-top', `
|
|
18
18
|
position: fixed;
|
|
19
19
|
right: 40px;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c, cB, cM } from '../../../_utils/cssr';
|
|
2
|
-
import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
2
|
+
import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
3
|
+
// vars:
|
|
3
4
|
// --n-color
|
|
4
5
|
// --n-ripple-color
|
|
5
6
|
// --n-bezier
|
|
6
7
|
// --n-ripple-bezier
|
|
7
8
|
// --n-font-size
|
|
8
9
|
// --n-font-family
|
|
9
|
-
|
|
10
10
|
export default c([c('@keyframes badge-wave-spread', {
|
|
11
11
|
from: {
|
|
12
12
|
boxShadow: '0 0 0.5px 0px var(--n-ripple-color)',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { c, cB, cE, cM } from '../../../_utils/cssr';
|
|
1
|
+
import { c, cB, cE, cM } from '../../../_utils/cssr';
|
|
2
|
+
// vars:
|
|
2
3
|
// --n-font-size
|
|
3
4
|
// --n-bezier
|
|
4
5
|
// --n-item-text-color
|
|
@@ -11,7 +12,6 @@ import { c, cB, cE, cM } from '../../../_utils/cssr'; // vars:
|
|
|
11
12
|
// --n-item-color-hover
|
|
12
13
|
// --n-item-color-active
|
|
13
14
|
// --n-item-line-height
|
|
14
|
-
|
|
15
15
|
export default cB('breadcrumb', `
|
|
16
16
|
white-space: nowrap;
|
|
17
17
|
cursor: default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType, ButtonHTMLAttributes, ExtractPropTypes } from 'vue';
|
|
1
|
+
import { PropType, ButtonHTMLAttributes, ExtractPropTypes, VNodeChild } from 'vue';
|
|
2
2
|
import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
|
|
3
3
|
import type { Type, Size } from './interface';
|
|
4
4
|
export declare const buttonProps: {
|
|
@@ -33,6 +33,7 @@ export declare const buttonProps: {
|
|
|
33
33
|
readonly default: "default";
|
|
34
34
|
};
|
|
35
35
|
readonly dashed: BooleanConstructor;
|
|
36
|
+
readonly renderIcon: PropType<() => VNodeChild>;
|
|
36
37
|
readonly iconPlacement: {
|
|
37
38
|
readonly type: PropType<"left" | "right">;
|
|
38
39
|
readonly default: "left";
|
|
@@ -696,6 +697,7 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
696
697
|
readonly default: "default";
|
|
697
698
|
};
|
|
698
699
|
readonly dashed: BooleanConstructor;
|
|
700
|
+
readonly renderIcon: PropType<() => VNodeChild>;
|
|
699
701
|
readonly iconPlacement: {
|
|
700
702
|
readonly type: PropType<"left" | "right">;
|
|
701
703
|
readonly default: "left";
|
|
@@ -1413,6 +1415,7 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1413
1415
|
readonly default: "default";
|
|
1414
1416
|
};
|
|
1415
1417
|
readonly dashed: BooleanConstructor;
|
|
1418
|
+
readonly renderIcon: PropType<() => VNodeChild>;
|
|
1416
1419
|
readonly iconPlacement: {
|
|
1417
1420
|
readonly type: PropType<"left" | "right">;
|
|
1418
1421
|
readonly default: "left";
|
package/es/button/src/Button.js
CHANGED
|
@@ -22,7 +22,7 @@ export const buttonProps = Object.assign(Object.assign({}, useTheme.props), { co
|
|
|
22
22
|
}, type: {
|
|
23
23
|
type: String,
|
|
24
24
|
default: 'default'
|
|
25
|
-
}, dashed: Boolean, iconPlacement: {
|
|
25
|
+
}, dashed: Boolean, renderIcon: Function, iconPlacement: {
|
|
26
26
|
type: String,
|
|
27
27
|
default: 'left'
|
|
28
28
|
}, attrType: {
|
|
@@ -445,11 +445,11 @@ const Button = defineComponent({
|
|
|
445
445
|
], tabindex: this.mergedFocusable ? 0 : -1, type: this.attrType, style: this.cssVars, disabled: this.disabled, onClick: this.handleClick, onBlur: this.handleBlur, onMousedown: this.handleMousedown, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown },
|
|
446
446
|
this.iconPlacement === 'right' && children,
|
|
447
447
|
h(NFadeInExpandTransition, { width: true }, {
|
|
448
|
-
default: () => resolveWrappedSlot(this.$slots.icon, (children) => (this.loading || children) && (h("span", { class: `${mergedClsPrefix}-button__icon`, style: {
|
|
448
|
+
default: () => resolveWrappedSlot(this.$slots.icon, (children) => (this.loading || this.renderIcon || children) && (h("span", { class: `${mergedClsPrefix}-button__icon`, style: {
|
|
449
449
|
margin: isSlotEmpty(this.$slots.default) ? '0' : ''
|
|
450
450
|
} },
|
|
451
451
|
h(NIconSwitchTransition, null, {
|
|
452
|
-
default: () => this.loading ? (h(NBaseLoading, { clsPrefix: mergedClsPrefix, key: "loading", class: `${mergedClsPrefix}-icon-slot`, strokeWidth: 20 })) : (h("div", { key: "icon", class: `${mergedClsPrefix}-icon-slot`, role: "none" }, children))
|
|
452
|
+
default: () => this.loading ? (h(NBaseLoading, { clsPrefix: mergedClsPrefix, key: "loading", class: `${mergedClsPrefix}-icon-slot`, strokeWidth: 20 })) : (h("div", { key: "icon", class: `${mergedClsPrefix}-icon-slot`, role: "none" }, this.renderIcon ? this.renderIcon() : children))
|
|
453
453
|
}))))
|
|
454
454
|
}),
|
|
455
455
|
this.iconPlacement === 'left' && children,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { c, cB, cE, cM, cNotM } from '../../../_utils/cssr';
|
|
2
2
|
import { fadeInWidthExpandTransition } from '../../../_styles/transitions/fade-in-width-expand.cssr';
|
|
3
3
|
import { iconSwitchTransition } from '../../../_styles/transitions/icon-switch.cssr';
|
|
4
|
-
import { isBrowser } from '../../../_utils';
|
|
4
|
+
import { isBrowser } from '../../../_utils';
|
|
5
|
+
// vars:
|
|
5
6
|
// --n-bezier
|
|
6
7
|
// --n-bezier-ease-out
|
|
7
8
|
// --n-ripple-duration
|
|
@@ -34,7 +35,6 @@ import { isBrowser } from '../../../_utils'; // vars:
|
|
|
34
35
|
//
|
|
35
36
|
// private-vars:
|
|
36
37
|
// --n-border-color-xxx, used for custom color
|
|
37
|
-
|
|
38
38
|
export default c([cB('button', `
|
|
39
39
|
margin: 0;
|
|
40
40
|
font-weight: var(--n-font-weight);
|