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,6 @@
|
|
|
1
1
|
import { c, cB, cM, cE, cNotM } from '../../../_utils/cssr/index';
|
|
2
2
|
export const zero = '0!important';
|
|
3
3
|
export const n1 = '-1px!important';
|
|
4
|
-
|
|
5
4
|
function createLeftBorderStyle(type) {
|
|
6
5
|
return cM(type + '-type', [c('& +', [cB('button', {}, [cM(type + '-type', [cE('border', {
|
|
7
6
|
borderLeftWidth: zero
|
|
@@ -9,7 +8,6 @@ function createLeftBorderStyle(type) {
|
|
|
9
8
|
left: n1
|
|
10
9
|
})])])])]);
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
function createTopBorderStyle(type) {
|
|
14
12
|
return cM(type + '-type', [c('& +', [cB('button', [cM(type + '-type', [cE('border', {
|
|
15
13
|
borderTopWidth: zero
|
|
@@ -17,7 +15,6 @@ function createTopBorderStyle(type) {
|
|
|
17
15
|
top: n1
|
|
18
16
|
})])])])]);
|
|
19
17
|
}
|
|
20
|
-
|
|
21
18
|
export default cB('button-group', `
|
|
22
19
|
flex-wrap: nowrap;
|
|
23
20
|
display: inline-flex;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { cB, cM, cE, cNotM, c } from '../../../_utils/cssr';
|
|
2
2
|
import { zero, n1 } from './index.cssr';
|
|
3
|
-
|
|
4
3
|
function createRightBorderStyle(type) {
|
|
5
4
|
return cM(type + '-type', [c('& +', [cB('button', {}, [cM(type + '-type', [cE('border', {
|
|
6
5
|
borderRightWidth: zero
|
|
@@ -8,7 +7,6 @@ function createRightBorderStyle(type) {
|
|
|
8
7
|
left: n1
|
|
9
8
|
})])])])]);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
export default cB('button-group', [cNotM('vertical', [cM('rtl', `
|
|
13
11
|
direction: rtl;
|
|
14
12
|
`, [cB('button', [c('&:last-child:not(:first-child)', `
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { cB, cE, cM, c, insideModal, insidePopover } from '../../../_utils/cssr';
|
|
1
|
+
import { cB, cE, cM, c, insideModal, insidePopover } from '../../../_utils/cssr';
|
|
2
|
+
// vars:
|
|
2
3
|
// --n-bezier
|
|
3
4
|
// --n-border-color
|
|
4
5
|
// --n-border-color-modal
|
|
@@ -17,7 +18,6 @@ import { cB, cE, cM, c, insideModal, insidePopover } from '../../../_utils/cssr'
|
|
|
17
18
|
// --n-cell-color-hover-modal
|
|
18
19
|
// --n-cell-color-hover-popover
|
|
19
20
|
// --n-bar-color
|
|
20
|
-
|
|
21
21
|
export default c([cB('calendar', `
|
|
22
22
|
line-height: var(--n-line-height);
|
|
23
23
|
font-size: var(--n-font-size);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { asModal, c, cB, cE, cM, insideModal, insidePopover } from '../../../_utils/cssr';
|
|
1
|
+
import { asModal, c, cB, cE, cM, insideModal, insidePopover } from '../../../_utils/cssr';
|
|
2
|
+
// vars:
|
|
2
3
|
// --n-bezier
|
|
3
4
|
// --n-border-radius
|
|
4
5
|
// --n-color
|
|
@@ -26,7 +27,6 @@ import { asModal, c, cB, cE, cM, insideModal, insidePopover } from '../../../_ut
|
|
|
26
27
|
// --n-color-embedded
|
|
27
28
|
// --n-color-embedded-modal
|
|
28
29
|
// --n-color-embedded-popover
|
|
29
|
-
|
|
30
30
|
export default c([cB('card', `
|
|
31
31
|
font-size: var(--n-font-size);
|
|
32
32
|
line-height: var(--n-line-height);
|
|
@@ -70,6 +70,7 @@ export default c([cB('card', `
|
|
|
70
70
|
font-weight: var(--n-title-font-weight);
|
|
71
71
|
transition: color .3s var(--n-bezier);
|
|
72
72
|
flex: 1;
|
|
73
|
+
min-width: 0;
|
|
73
74
|
color: var(--n-title-text-color);
|
|
74
75
|
`), cE('extra', `
|
|
75
76
|
display: flex;
|
|
@@ -90,7 +91,7 @@ export default c([cB('card', `
|
|
|
90
91
|
border-color .3s var(--n-bezier);
|
|
91
92
|
background-clip: padding-box;
|
|
92
93
|
background-color: var(--n-action-color);
|
|
93
|
-
`), cE('content', 'flex: 1;'), cE('content, footer', `
|
|
94
|
+
`), cE('content', 'flex: 1; min-width: 0;'), cE('content, footer', `
|
|
94
95
|
box-sizing: border-box;
|
|
95
96
|
padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);
|
|
96
97
|
font-size: var(--n-font-size);
|
|
@@ -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-bezier
|
|
3
4
|
// --n-dot-color
|
|
4
5
|
// --n-dot-color-focus
|
|
@@ -7,7 +8,6 @@ import { c, cB, cE, cM } from '../../../_utils/cssr'; // vars:
|
|
|
7
8
|
// --n-dot-line-width
|
|
8
9
|
// --n-dot-line-width-active
|
|
9
10
|
// --n-arrow-color
|
|
10
|
-
|
|
11
11
|
export default cB('carousel', `
|
|
12
12
|
position: relative;
|
|
13
13
|
width: 100%;
|
|
@@ -1749,6 +1749,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1749
1749
|
onRender: (() => void) | undefined;
|
|
1750
1750
|
focus: () => void;
|
|
1751
1751
|
blur: () => void;
|
|
1752
|
+
getCheckedData: () => {
|
|
1753
|
+
keys: import("./interface").ValueAtom[];
|
|
1754
|
+
options: (CascaderOption | null)[];
|
|
1755
|
+
};
|
|
1756
|
+
getIndeterminateData: () => {
|
|
1757
|
+
keys: import("./interface").ValueAtom[];
|
|
1758
|
+
options: (CascaderOption | null)[];
|
|
1759
|
+
};
|
|
1752
1760
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1753
1761
|
readonly allowCheckingNotLoaded: BooleanConstructor;
|
|
1754
1762
|
readonly to: {
|
|
@@ -69,7 +69,7 @@ export const cascaderProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
|
69
69
|
export default defineComponent({
|
|
70
70
|
name: 'Cascader',
|
|
71
71
|
props: cascaderProps,
|
|
72
|
-
setup(props) {
|
|
72
|
+
setup(props, { slots }) {
|
|
73
73
|
if (process.env.NODE_ENV !== 'production') {
|
|
74
74
|
watchEffect(() => {
|
|
75
75
|
if (props.leafOnly) {
|
|
@@ -202,6 +202,10 @@ export default defineComponent({
|
|
|
202
202
|
function updateHoverKey(key) {
|
|
203
203
|
hoverKeyRef.value = key;
|
|
204
204
|
}
|
|
205
|
+
function getOptionsByKeys(keys) {
|
|
206
|
+
const { value: { getNode } } = treeMateRef;
|
|
207
|
+
return keys.map((keys) => { var _a; return ((_a = getNode(keys)) === null || _a === void 0 ? void 0 : _a.rawNode) || null; });
|
|
208
|
+
}
|
|
205
209
|
function doCheck(key) {
|
|
206
210
|
var _a;
|
|
207
211
|
const { cascade, multiple, filterable } = props;
|
|
@@ -213,7 +217,7 @@ export default defineComponent({
|
|
|
213
217
|
checkStrategy: mergedCheckStrategyRef.value,
|
|
214
218
|
allowNotLoaded: props.allowCheckingNotLoaded
|
|
215
219
|
});
|
|
216
|
-
doUpdateValue(checkedKeys, checkedKeys
|
|
220
|
+
doUpdateValue(checkedKeys, getOptionsByKeys(checkedKeys), checkedKeys.map((checkedKey) => { var _a; return getRawNodePath((_a = getPath(checkedKey)) === null || _a === void 0 ? void 0 : _a.treeNodePath); }));
|
|
217
221
|
if (filterable)
|
|
218
222
|
focusSelectionInput();
|
|
219
223
|
keyboardKeyRef.value = key;
|
|
@@ -694,7 +698,15 @@ export default defineComponent({
|
|
|
694
698
|
}
|
|
695
699
|
}
|
|
696
700
|
}
|
|
701
|
+
const showCheckboxRef = computed(() => {
|
|
702
|
+
if (props.multiple && props.cascade)
|
|
703
|
+
return true;
|
|
704
|
+
if (mergedCheckStrategyRef.value !== 'child')
|
|
705
|
+
return true;
|
|
706
|
+
return false;
|
|
707
|
+
});
|
|
697
708
|
provide(cascaderInjectionKey, {
|
|
709
|
+
slots,
|
|
698
710
|
mergedClsPrefixRef,
|
|
699
711
|
mergedThemeRef: themeRef,
|
|
700
712
|
mergedValueRef,
|
|
@@ -702,6 +714,7 @@ export default defineComponent({
|
|
|
702
714
|
indeterminateKeysRef,
|
|
703
715
|
hoverKeyPathRef,
|
|
704
716
|
mergedCheckStrategyRef,
|
|
717
|
+
showCheckboxRef,
|
|
705
718
|
cascadeRef: toRef(props, 'cascade'),
|
|
706
719
|
multipleRef: toRef(props, 'multiple'),
|
|
707
720
|
keyboardKeyRef,
|
|
@@ -737,6 +750,32 @@ export default defineComponent({
|
|
|
737
750
|
blur: () => {
|
|
738
751
|
var _a;
|
|
739
752
|
(_a = triggerInstRef.value) === null || _a === void 0 ? void 0 : _a.blur();
|
|
753
|
+
},
|
|
754
|
+
getCheckedData: () => {
|
|
755
|
+
if (showCheckboxRef.value) {
|
|
756
|
+
const checkedKeys = checkedKeysRef.value;
|
|
757
|
+
return {
|
|
758
|
+
keys: checkedKeys,
|
|
759
|
+
options: getOptionsByKeys(checkedKeys)
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
return {
|
|
763
|
+
keys: [],
|
|
764
|
+
options: []
|
|
765
|
+
};
|
|
766
|
+
},
|
|
767
|
+
getIndeterminateData: () => {
|
|
768
|
+
if (showCheckboxRef.value) {
|
|
769
|
+
const indeterminateKeys = indeterminateKeysRef.value;
|
|
770
|
+
return {
|
|
771
|
+
keys: indeterminateKeys,
|
|
772
|
+
options: getOptionsByKeys(indeterminateKeys)
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
return {
|
|
776
|
+
keys: [],
|
|
777
|
+
options: []
|
|
778
|
+
};
|
|
740
779
|
}
|
|
741
780
|
};
|
|
742
781
|
const cssVarsRef = computed(() => {
|
|
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
hoverPending: import("vue").ComputedRef<boolean>;
|
|
15
15
|
keyboardPending: import("vue").ComputedRef<boolean>;
|
|
16
16
|
isLoading: import("vue").ComputedRef<boolean>;
|
|
17
|
-
showCheckbox: import("vue").
|
|
17
|
+
showCheckbox: import("vue").Ref<boolean>;
|
|
18
18
|
isLeaf: import("vue").ComputedRef<boolean>;
|
|
19
19
|
disabled: import("vue").ComputedRef<boolean>;
|
|
20
20
|
label: import("vue").ComputedRef<any>;
|
|
@@ -14,7 +14,7 @@ export default defineComponent({
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
setup(props) {
|
|
17
|
-
const { expandTriggerRef, remoteRef, multipleRef, mergedValueRef, checkedKeysRef, indeterminateKeysRef, hoverKeyPathRef, keyboardKeyRef, loadingKeySetRef, cascadeRef, mergedCheckStrategyRef, onLoadRef, mergedClsPrefixRef, mergedThemeRef, labelFieldRef, updateHoverKey, updateKeyboardKey, addLoadingKey, deleteLoadingKey, closeMenu, doCheck, doUncheck, renderLabelRef
|
|
17
|
+
const { expandTriggerRef, remoteRef, multipleRef, mergedValueRef, checkedKeysRef, indeterminateKeysRef, hoverKeyPathRef, keyboardKeyRef, loadingKeySetRef, cascadeRef, mergedCheckStrategyRef, onLoadRef, mergedClsPrefixRef, mergedThemeRef, labelFieldRef, showCheckboxRef, updateHoverKey, updateKeyboardKey, addLoadingKey, deleteLoadingKey, closeMenu, doCheck, doUncheck, renderLabelRef
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
19
19
|
} = inject(cascaderInjectionKey);
|
|
20
20
|
const valueRef = computed(() => props.tmNode.key);
|
|
@@ -61,12 +61,6 @@ export default defineComponent({
|
|
|
61
61
|
}
|
|
62
62
|
return false;
|
|
63
63
|
});
|
|
64
|
-
const showCheckboxRef = computed(() => {
|
|
65
|
-
if (multipleRef.value && cascadeRef.value)
|
|
66
|
-
return true;
|
|
67
|
-
if (mergedCheckStrategyRef.value !== 'child')
|
|
68
|
-
return true;
|
|
69
|
-
});
|
|
70
64
|
const isLeafRef = computed(() => props.tmNode.isLeaf);
|
|
71
65
|
const disabledRef = computed(() => props.tmNode.disabled);
|
|
72
66
|
const labelRef = computed(() => props.tmNode.rawNode[labelFieldRef.value]);
|
|
@@ -392,6 +392,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
392
392
|
handleResize: () => void;
|
|
393
393
|
handleToggle: (tmNode: TreeNode<SelectBaseOption>) => void;
|
|
394
394
|
handleClickOutside: (e: MouseEvent) => void;
|
|
395
|
+
cascaderSlots: Readonly<{
|
|
396
|
+
[name: string]: import("vue").Slot | undefined;
|
|
397
|
+
}>;
|
|
395
398
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
396
399
|
value: {
|
|
397
400
|
type: PropType<Value | null>;
|
|
@@ -5,6 +5,7 @@ import { createTmOptions } from '../../select/src/utils';
|
|
|
5
5
|
import { NInternalSelectMenu } from '../../_internal';
|
|
6
6
|
import { createSelectOptions } from './utils';
|
|
7
7
|
import { cascaderInjectionKey } from './interface';
|
|
8
|
+
import { resolveSlot } from '../../_utils';
|
|
8
9
|
export default defineComponent({
|
|
9
10
|
name: 'NCascaderSelectMenu',
|
|
10
11
|
props: {
|
|
@@ -33,7 +34,7 @@ export default defineComponent({
|
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
setup(props) {
|
|
36
|
-
const { isMountedRef, mergedValueRef, mergedClsPrefixRef, mergedThemeRef, mergedCheckStrategyRef, syncSelectMenuPosition, closeMenu, handleSelectMenuClickOutside, doUncheck: cascaderDoUncheck, doCheck: cascaderDoCheck, clearPattern
|
|
37
|
+
const { isMountedRef, mergedValueRef, mergedClsPrefixRef, mergedThemeRef, mergedCheckStrategyRef, slots: cascaderSlots, syncSelectMenuPosition, closeMenu, handleSelectMenuClickOutside, doUncheck: cascaderDoUncheck, doCheck: cascaderDoCheck, clearPattern
|
|
37
38
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
38
39
|
} = inject(cascaderInjectionKey);
|
|
39
40
|
const menuInstRef = ref(null);
|
|
@@ -121,13 +122,16 @@ export default defineComponent({
|
|
|
121
122
|
};
|
|
122
123
|
return Object.assign({ isMounted: isMountedRef, mergedTheme: mergedThemeRef, mergedClsPrefix: mergedClsPrefixRef, menuInstRef, selectTreeMate: selectTreeMateRef, handleResize,
|
|
123
124
|
handleToggle,
|
|
124
|
-
handleClickOutside
|
|
125
|
+
handleClickOutside,
|
|
126
|
+
cascaderSlots }, exposedRef);
|
|
125
127
|
},
|
|
126
128
|
render() {
|
|
127
|
-
const { mergedClsPrefix, isMounted, mergedTheme } = this;
|
|
129
|
+
const { mergedClsPrefix, isMounted, mergedTheme, cascaderSlots } = this;
|
|
128
130
|
return (h(Transition, { name: "fade-in-scale-up-transition", appear: isMounted }, {
|
|
129
131
|
default: () => this.show
|
|
130
|
-
? withDirectives(h(NInternalSelectMenu, { ref: "menuInstRef", onResize: this.handleResize, clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-cascader-menu`, autoPending: true, themeOverrides: mergedTheme.peerOverrides.InternalSelectMenu, theme: mergedTheme.peers.InternalSelectMenu, treeMate: this.selectTreeMate, multiple: this.multiple, value: this.value, onToggle: this.handleToggle }
|
|
132
|
+
? withDirectives(h(NInternalSelectMenu, { ref: "menuInstRef", onResize: this.handleResize, clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-cascader-menu`, autoPending: true, themeOverrides: mergedTheme.peerOverrides.InternalSelectMenu, theme: mergedTheme.peers.InternalSelectMenu, treeMate: this.selectTreeMate, multiple: this.multiple, value: this.value, onToggle: this.handleToggle }, {
|
|
133
|
+
empty: () => resolveSlot(cascaderSlots['not-found'], () => [])
|
|
134
|
+
}), [
|
|
131
135
|
[
|
|
132
136
|
clickoutside,
|
|
133
137
|
this.handleClickOutside,
|
|
@@ -2,7 +2,7 @@ import { CheckStrategy, TreeNode } from 'treemate';
|
|
|
2
2
|
import type { MergedTheme } from '../../_mixins';
|
|
3
3
|
import type { NLocale } from '../../locales';
|
|
4
4
|
import type { CascaderTheme } from '../styles';
|
|
5
|
-
import { Ref, VNodeChild } from 'vue';
|
|
5
|
+
import { Ref, Slots, VNodeChild } from 'vue';
|
|
6
6
|
export declare type ValueAtom = string | number;
|
|
7
7
|
export declare type Value = ValueAtom | ValueAtom[];
|
|
8
8
|
export declare type Key = ValueAtom;
|
|
@@ -21,6 +21,7 @@ export declare type OnUpdateValue = (value: string & number & string[] & number[
|
|
|
21
21
|
export declare type OnUpdateValueImpl = (value: Value | null, option: CascaderOption | null | Array<CascaderOption | null>, path: Array<CascaderOption[] | null> | CascaderOption[] | null) => void;
|
|
22
22
|
export declare type MenuModel = TmNode[][];
|
|
23
23
|
export interface CascaderInjection {
|
|
24
|
+
slots: Slots;
|
|
24
25
|
mergedClsPrefixRef: Ref<string>;
|
|
25
26
|
mergedThemeRef: Ref<MergedTheme<CascaderTheme>>;
|
|
26
27
|
mergedValueRef: Ref<Value | null>;
|
|
@@ -41,6 +42,7 @@ export interface CascaderInjection {
|
|
|
41
42
|
virtualScrollRef: Ref<boolean>;
|
|
42
43
|
optionHeightRef: Ref<string>;
|
|
43
44
|
labelFieldRef: Ref<string>;
|
|
45
|
+
showCheckboxRef: Ref<boolean>;
|
|
44
46
|
syncCascaderMenuPosition: () => void;
|
|
45
47
|
syncSelectMenuPosition: () => void;
|
|
46
48
|
updateKeyboardKey: (value: Key | null) => void;
|
|
@@ -74,4 +76,12 @@ export declare const cascaderInjectionKey: import("vue").InjectionKey<CascaderIn
|
|
|
74
76
|
export interface CascaderInst {
|
|
75
77
|
focus: () => void;
|
|
76
78
|
blur: () => void;
|
|
79
|
+
getCheckedData: () => {
|
|
80
|
+
keys: Key[];
|
|
81
|
+
options: Array<CascaderOption | null>;
|
|
82
|
+
};
|
|
83
|
+
getIndeterminateData: () => {
|
|
84
|
+
keys: Key[];
|
|
85
|
+
options: Array<CascaderOption | null>;
|
|
86
|
+
};
|
|
77
87
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c, cB, cE, 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-menu-border-radius
|
|
4
5
|
// --n-menu-box-shadow
|
|
5
6
|
// --n-menu-height
|
|
@@ -15,7 +16,6 @@ import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-sc
|
|
|
15
16
|
// --n-option-arrow-color
|
|
16
17
|
// --n-menu-mask-color
|
|
17
18
|
// --n-loading-color
|
|
18
|
-
|
|
19
19
|
export default c([cB('cascader-menu', `
|
|
20
20
|
outline: none;
|
|
21
21
|
position: relative;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c, cB, cE, cM, insideModal, insidePopover } 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-label-line-height
|
|
4
5
|
// --n-bezier
|
|
5
6
|
// --n-size
|
|
@@ -23,7 +24,6 @@ import { iconSwitchTransition } from '../../../_styles/transitions/icon-switch.c
|
|
|
23
24
|
// --n-border-radius
|
|
24
25
|
// --n-font-size
|
|
25
26
|
// --n-label-padding
|
|
26
|
-
|
|
27
27
|
export default c([cB('checkbox', `
|
|
28
28
|
line-height: var(--n-label-line-height);
|
|
29
29
|
font-size: var(--n-font-size);
|
|
@@ -43,7 +43,8 @@ export default c([cB('checkbox', `
|
|
|
43
43
|
background-color: var(--n-merged-color-table);
|
|
44
44
|
`)]), cM('checked', [cB('checkbox-box', `
|
|
45
45
|
background-color: var(--n-color-checked);
|
|
46
|
-
`, [cB('checkbox-icon', [
|
|
46
|
+
`, [cB('checkbox-icon', [
|
|
47
|
+
// if not set width to 100%, safari & old chrome won't display the icon
|
|
47
48
|
c('.check-icon', `
|
|
48
49
|
opacity: 1;
|
|
49
50
|
transform: scale(1);
|
|
@@ -139,10 +140,12 @@ c('.check-icon', `
|
|
|
139
140
|
padding: var(--n-label-padding);
|
|
140
141
|
`, [c('&:empty', {
|
|
141
142
|
display: 'none'
|
|
142
|
-
})])]),
|
|
143
|
+
})])]),
|
|
144
|
+
// modal table header checkbox
|
|
143
145
|
insideModal(cB('checkbox', `
|
|
144
146
|
--n-merged-color-table: var(--n-color-table-modal);
|
|
145
|
-
`)),
|
|
147
|
+
`)),
|
|
148
|
+
// popover table header checkbox
|
|
146
149
|
insidePopover(cB('checkbox', `
|
|
147
150
|
--n-merged-color-table: var(--n-color-table-popover);
|
|
148
151
|
`))]);
|
package/es/code/src/Code.d.ts
CHANGED
|
@@ -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-font-family
|
|
4
5
|
// --n-font-weight-strong
|
|
@@ -15,7 +16,6 @@ import { c, cB, cE, cM } from '../../../_utils/cssr'; // vars:
|
|
|
15
16
|
// --n-hue-6-2
|
|
16
17
|
// --n-line-number-color
|
|
17
18
|
// --n-line-number-text-color
|
|
18
|
-
|
|
19
19
|
export default c([cB('code', `
|
|
20
20
|
font-size: var(--n-font-size);
|
|
21
21
|
font-family: var(--n-font-family);
|
|
@@ -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-font-size
|
|
4
5
|
// --n-bezier
|
|
5
6
|
// --n-text-color
|
|
@@ -11,7 +12,6 @@ import { fadeInHeightExpandTransition } from '../../../_styles/transitions/fade-
|
|
|
11
12
|
// --n-arrow-color-disabled
|
|
12
13
|
// --n-title-text-color-disabled
|
|
13
14
|
// --n-item-margin
|
|
14
|
-
|
|
15
15
|
export default cB('collapse', 'width: 100%;', [cB('collapse-item', `
|
|
16
16
|
font-size: var(--n-font-size);
|
|
17
17
|
color: var(--n-text-color);
|
|
@@ -2,7 +2,7 @@ import { PropType, VNode, Ref } from 'vue';
|
|
|
2
2
|
import { RGBA, HSLA } from 'seemly';
|
|
3
3
|
import { FollowerPlacement } from 'vueuc';
|
|
4
4
|
import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
|
|
5
|
-
import type { ColorPickerMode } from './utils';
|
|
5
|
+
import type { ColorPickerMode, ActionType } from './utils';
|
|
6
6
|
import { OnUpdateValue, RenderLabel } from './interface';
|
|
7
7
|
export declare const colorPickerProps: {
|
|
8
8
|
readonly value: PropType<string | null>;
|
|
@@ -35,7 +35,7 @@ export declare const colorPickerProps: {
|
|
|
35
35
|
readonly default: undefined;
|
|
36
36
|
};
|
|
37
37
|
readonly actions: {
|
|
38
|
-
readonly type: PropType<
|
|
38
|
+
readonly type: PropType<ActionType[]>;
|
|
39
39
|
readonly default: null;
|
|
40
40
|
};
|
|
41
41
|
readonly internalActions: PropType<readonly ("undo" | "redo")[]>;
|
|
@@ -923,7 +923,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
923
923
|
readonly default: undefined;
|
|
924
924
|
};
|
|
925
925
|
readonly actions: {
|
|
926
|
-
readonly type: PropType<
|
|
926
|
+
readonly type: PropType<ActionType[]>;
|
|
927
927
|
readonly default: null;
|
|
928
928
|
};
|
|
929
929
|
readonly internalActions: PropType<readonly ("undo" | "redo")[]>;
|
|
@@ -1837,7 +1837,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1837
1837
|
readonly default: undefined;
|
|
1838
1838
|
};
|
|
1839
1839
|
readonly actions: {
|
|
1840
|
-
readonly type: PropType<
|
|
1840
|
+
readonly type: PropType<ActionType[]>;
|
|
1841
1841
|
readonly default: null;
|
|
1842
1842
|
};
|
|
1843
1843
|
readonly internalActions: PropType<readonly ("undo" | "redo")[]>;
|
|
@@ -2698,7 +2698,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2698
2698
|
readonly to: string | boolean | HTMLElement;
|
|
2699
2699
|
readonly placement: FollowerPlacement;
|
|
2700
2700
|
readonly defaultShow: boolean;
|
|
2701
|
-
readonly actions:
|
|
2701
|
+
readonly actions: ActionType[];
|
|
2702
2702
|
readonly showAlpha: boolean;
|
|
2703
2703
|
readonly modes: ColorPickerMode[];
|
|
2704
2704
|
readonly showPreview: boolean;
|
|
@@ -305,6 +305,10 @@ export default defineComponent({
|
|
|
305
305
|
handleComplete(false);
|
|
306
306
|
valueIndexRef.value = valueIndex + 1;
|
|
307
307
|
}
|
|
308
|
+
function handleClear() {
|
|
309
|
+
doUpdateValue(null, 'input');
|
|
310
|
+
doUpdateShow(false);
|
|
311
|
+
}
|
|
308
312
|
function handleConfirm() {
|
|
309
313
|
const { value } = mergedValueRef;
|
|
310
314
|
const { onConfirm } = props;
|
|
@@ -384,7 +388,9 @@ export default defineComponent({
|
|
|
384
388
|
props.showPreview ? (h(ColorPreview, { clsPrefix: mergedClsPrefix, mode: displayedModeRef.value, color: rgbaRef.value && toHexString(rgbaRef.value), onUpdateColor: (color) => doUpdateValue(color, 'input') })) : null),
|
|
385
389
|
h(ColorInput, { clsPrefix: mergedClsPrefix, showAlpha: props.showAlpha, mode: displayedModeRef.value, modes: modes, onUpdateMode: handleUpdateDisplayedMode, value: mergedValueRef.value, valueArr: mergedValueArrRef.value, onUpdateValue: handleInputUpdateValue }),
|
|
386
390
|
((_a = props.swatches) === null || _a === void 0 ? void 0 : _a.length) && (h(ColorPickerSwatches, { clsPrefix: mergedClsPrefix, mode: displayedModeRef.value, swatches: props.swatches, onUpdateColor: (color) => doUpdateValue(color, 'input') }))),
|
|
387
|
-
(actions === null || actions === void 0 ? void 0 : actions.length) ? (h("div", { class: `${mergedClsPrefix}-color-picker-action` },
|
|
391
|
+
(actions === null || actions === void 0 ? void 0 : actions.length) ? (h("div", { class: `${mergedClsPrefix}-color-picker-action` },
|
|
392
|
+
actions.includes('confirm') && (h(NButton, { size: "small", onClick: handleConfirm, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button }, { default: () => localeRef.value.confirm })),
|
|
393
|
+
actions.includes('clear') && (h(NButton, { size: "small", onClick: handleClear, disabled: !mergedValueRef.value, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button }, { default: () => localeRef.value.clear })))) : null,
|
|
388
394
|
slots.action ? (h("div", { class: `${mergedClsPrefix}-color-picker-action` }, { default: slots.action })) : internalActions ? (h("div", { class: `${mergedClsPrefix}-color-picker-action` },
|
|
389
395
|
internalActions.includes('undo') && (h(NButton, { size: "small", onClick: undo, disabled: !undoableRef.value, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button }, { default: () => localeRef.value.undo })),
|
|
390
396
|
internalActions.includes('redo') && (h(NButton, { size: "small", onClick: redo, disabled: !redoableRef.value, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button }, { default: () => localeRef.value.redo })))) : null));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c, cB, cE, 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-text-color
|
|
5
6
|
// --n-border-radius
|
|
@@ -9,7 +10,6 @@ import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-sc
|
|
|
9
10
|
// --n-height
|
|
10
11
|
// --n-box-shadow
|
|
11
12
|
// --n-divider-color
|
|
12
|
-
|
|
13
13
|
export default c([cB('color-picker', `
|
|
14
14
|
display: inline-block;
|
|
15
15
|
box-sizing: border-box;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type ColorPickerMode = 'rgb' | 'hsl' | 'hsv' | 'hex';
|
|
2
|
-
export declare type ActionType = 'confirm';
|
|
2
|
+
export declare type ActionType = 'confirm' | 'clear';
|
|
3
3
|
export declare function deriveDefaultValue(modes: ColorPickerMode[], showAlpha: boolean): string;
|
|
4
4
|
export declare function getModeFromValue(color: string | null): ColorPickerMode | null;
|
|
5
5
|
export declare function floor(color: number[]): number[];
|
package/es/components.d.ts
CHANGED
package/es/components.js
CHANGED
|
@@ -16,6 +16,7 @@ export declare const configProviderProps: {
|
|
|
16
16
|
undo: string;
|
|
17
17
|
redo: string;
|
|
18
18
|
confirm: string;
|
|
19
|
+
clear: string;
|
|
19
20
|
};
|
|
20
21
|
Popconfirm: {
|
|
21
22
|
positiveText: string;
|
|
@@ -136,6 +137,7 @@ export declare const configProviderProps: {
|
|
|
136
137
|
readonly default: "div";
|
|
137
138
|
};
|
|
138
139
|
readonly hljs: PropType<Hljs>;
|
|
140
|
+
readonly katex: PropType<typeof import("katex").default>;
|
|
139
141
|
readonly theme: PropType<GlobalTheme | null>;
|
|
140
142
|
readonly themeOverrides: PropType<GlobalThemeOverrides | null>;
|
|
141
143
|
readonly componentOptions: PropType<GlobalComponentConfig>;
|
|
@@ -166,6 +168,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
166
168
|
undo: string;
|
|
167
169
|
redo: string;
|
|
168
170
|
confirm: string;
|
|
171
|
+
clear: string;
|
|
169
172
|
};
|
|
170
173
|
Popconfirm: {
|
|
171
174
|
positiveText: string;
|
|
@@ -286,6 +289,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
286
289
|
readonly default: "div";
|
|
287
290
|
};
|
|
288
291
|
readonly hljs: PropType<Hljs>;
|
|
292
|
+
readonly katex: PropType<typeof import("katex").default>;
|
|
289
293
|
readonly theme: PropType<GlobalTheme | null>;
|
|
290
294
|
readonly themeOverrides: PropType<GlobalThemeOverrides | null>;
|
|
291
295
|
readonly componentOptions: PropType<GlobalComponentConfig>;
|
|
@@ -320,6 +324,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
320
324
|
undo: string;
|
|
321
325
|
redo: string;
|
|
322
326
|
confirm: string;
|
|
327
|
+
clear: string;
|
|
323
328
|
};
|
|
324
329
|
Popconfirm: {
|
|
325
330
|
positiveText: string;
|
|
@@ -440,6 +445,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
440
445
|
readonly default: "div";
|
|
441
446
|
};
|
|
442
447
|
readonly hljs: PropType<Hljs>;
|
|
448
|
+
readonly katex: PropType<typeof import("katex").default>;
|
|
443
449
|
readonly theme: PropType<GlobalTheme | null>;
|
|
444
450
|
readonly themeOverrides: PropType<GlobalThemeOverrides | null>;
|
|
445
451
|
readonly componentOptions: PropType<GlobalComponentConfig>;
|
|
@@ -21,6 +21,7 @@ export const configProviderProps = {
|
|
|
21
21
|
default: 'div'
|
|
22
22
|
},
|
|
23
23
|
hljs: Object,
|
|
24
|
+
katex: Object,
|
|
24
25
|
theme: Object,
|
|
25
26
|
themeOverrides: Object,
|
|
26
27
|
componentOptions: Object,
|
|
@@ -176,6 +177,12 @@ export default defineComponent({
|
|
|
176
177
|
const { hljs } = props;
|
|
177
178
|
return hljs === undefined ? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedHljsRef.value : hljs;
|
|
178
179
|
}),
|
|
180
|
+
mergedKatexRef: computed(() => {
|
|
181
|
+
const { katex } = props;
|
|
182
|
+
return katex === undefined
|
|
183
|
+
? NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedKatexRef.value
|
|
184
|
+
: katex;
|
|
185
|
+
}),
|
|
179
186
|
mergedThemeRef,
|
|
180
187
|
mergedThemeOverridesRef,
|
|
181
188
|
inlineThemeDisabled: inlineThemeDisabled || false,
|
|
@@ -29,6 +29,7 @@ import type { DynamicTagsTheme } from '../../dynamic-tags/styles';
|
|
|
29
29
|
import type { ElementTheme } from '../../element/styles';
|
|
30
30
|
import type { EllipsisTheme } from '../../ellipsis/styles';
|
|
31
31
|
import type { EmptyTheme } from '../../empty/styles';
|
|
32
|
+
import type { EquationTheme } from '../../equation/styles';
|
|
32
33
|
import type { FormTheme } from '../../form/styles';
|
|
33
34
|
import type { GradientTextTheme } from '../../gradient-text/styles';
|
|
34
35
|
import type { IconTheme } from '../../icon/styles';
|
|
@@ -92,6 +93,7 @@ import type { EmptyProps } from '../../empty';
|
|
|
92
93
|
import type { CollapseTransitionTheme } from '../../collapse-transition/styles';
|
|
93
94
|
import type { ButtonGroupTheme } from '../../button-group/styles/light';
|
|
94
95
|
import type { RowTheme } from '../../legacy-grid/styles';
|
|
96
|
+
import type { Katex } from './katex';
|
|
95
97
|
export interface GlobalThemeWithoutCommon {
|
|
96
98
|
Alert?: AlertTheme;
|
|
97
99
|
Anchor?: AnchorTheme;
|
|
@@ -124,6 +126,7 @@ export interface GlobalThemeWithoutCommon {
|
|
|
124
126
|
Element?: ElementTheme;
|
|
125
127
|
Ellipsis?: EllipsisTheme;
|
|
126
128
|
Empty?: EmptyTheme;
|
|
129
|
+
Equation?: EquationTheme;
|
|
127
130
|
Form?: FormTheme;
|
|
128
131
|
GradientText?: GradientTextTheme;
|
|
129
132
|
Icon?: IconTheme;
|
|
@@ -234,6 +237,7 @@ export interface ConfigProviderInjection {
|
|
|
234
237
|
mergedLocaleRef: Ref<NLocale | undefined>;
|
|
235
238
|
mergedDateLocaleRef: Ref<NDateLocale | undefined>;
|
|
236
239
|
mergedHljsRef: Ref<Hljs | undefined>;
|
|
240
|
+
mergedKatexRef: Ref<Katex | undefined>;
|
|
237
241
|
mergedComponentPropsRef: Ref<GlobalComponentConfig | undefined>;
|
|
238
242
|
mergedIconsRef: Ref<GlobalIconConfig | undefined>;
|
|
239
243
|
mergedThemeRef: Ref<GlobalTheme | undefined>;
|