naive-ui 2.21.2 → 2.22.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/es/_internal/close/src/styles/index.cssr.js +6 -5
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
- package/es/_internal/scrollbar/src/ScrollBar.js +13 -7
- package/es/_internal/selection/src/Selection.js +11 -9
- package/es/_internal/selection/src/styles/index.cssr.js +6 -2
- package/es/alert/src/Alert.d.ts +20 -20
- package/es/alert/src/Alert.js +22 -22
- package/es/alert/src/styles/index.cssr.js +45 -45
- package/es/anchor/src/AnchorAdapter.js +12 -12
- package/es/anchor/src/styles/index.cssr.js +41 -41
- package/es/avatar/src/Avatar.d.ts +5 -3
- package/es/avatar/src/Avatar.js +7 -5
- package/es/avatar/src/styles/index.cssr.js +3 -5
- package/es/button/src/Button.d.ts +60 -60
- package/es/button/src/Button.js +107 -106
- package/es/button/src/styles/button.cssr.js +83 -80
- package/es/button/styles/dark.js +3 -3
- package/es/button/styles/light.d.ts +3 -3
- package/es/button/styles/light.js +1 -1
- package/es/calendar/src/Calendar.d.ts +37 -30
- package/es/calendar/styles/light.d.ts +3 -3
- package/es/cascader/src/Cascader.d.ts +135 -0
- package/es/cascader/src/Cascader.js +2 -4
- package/es/cascader/src/CascaderMenu.d.ts +345 -0
- package/es/cascader/src/CascaderMenu.js +6 -5
- package/es/cascader/src/CascaderOption.d.ts +18 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/es/cascader/styles/dark.js +3 -1
- package/es/cascader/styles/light.d.ts +13 -0
- package/es/cascader/styles/light.js +3 -1
- package/es/color-picker/src/ColorInputUnit.d.ts +3 -3
- package/es/color-picker/src/ColorPicker.d.ts +27 -27
- package/es/color-picker/styles/light.d.ts +3 -3
- package/es/config-provider/src/ConfigProvider.d.ts +21 -0
- package/es/data-table/src/DataTable.d.ts +30 -30
- package/es/data-table/src/DataTable.js +7 -14
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
- package/es/data-table/src/MainTable.js +2 -3
- package/es/data-table/src/TableParts/Body.d.ts +18 -7
- package/es/data-table/src/TableParts/Body.js +80 -28
- package/es/data-table/src/TableParts/Cell.d.ts +6 -6
- package/es/data-table/src/TableParts/Header.d.ts +3 -3
- package/es/data-table/src/TableParts/Header.js +1 -1
- package/es/data-table/src/interface.d.ts +4 -1
- package/es/data-table/src/styles/index.cssr.js +9 -12
- package/es/data-table/src/use-check.js +6 -2
- package/es/data-table/src/use-scroll.d.ts +2 -0
- package/es/data-table/src/use-scroll.js +34 -4
- package/es/data-table/src/use-table-data.js +4 -1
- package/es/data-table/styles/_common.js +1 -1
- package/es/data-table/styles/light.d.ts +3 -3
- package/es/date-picker/src/DatePicker.d.ts +94 -69
- package/es/date-picker/src/DatePicker.js +47 -20
- package/es/date-picker/src/config.d.ts +1 -9
- package/es/date-picker/src/config.js +0 -8
- package/es/date-picker/src/interface.d.ts +2 -1
- package/es/date-picker/src/panel/date.d.ts +23 -10
- package/es/date-picker/src/panel/date.js +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +21 -9
- package/es/date-picker/src/panel/daterange.js +2 -2
- package/es/date-picker/src/panel/datetime.d.ts +23 -16
- package/es/date-picker/src/panel/datetime.js +2 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +21 -9
- package/es/date-picker/src/panel/datetimerange.js +2 -2
- package/es/date-picker/src/panel/month.d.ts +27 -20
- package/es/date-picker/src/panel/month.js +23 -12
- package/es/date-picker/src/panel/use-calendar.d.ts +25 -43
- package/es/date-picker/src/panel/use-calendar.js +35 -18
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
- package/es/date-picker/src/panel/use-dual-calendar.js +23 -8
- package/es/date-picker/src/panel/use-panel-common.d.ts +21 -36
- package/es/date-picker/src/panel/use-panel-common.js +2 -2
- package/es/date-picker/src/utils.d.ts +19 -3
- package/es/date-picker/src/utils.js +40 -5
- package/es/date-picker/styles/_common.d.ts +2 -0
- package/es/date-picker/styles/_common.js +3 -1
- package/es/date-picker/styles/light.d.ts +10 -6
- package/es/dialog/src/Dialog.d.ts +21 -21
- package/es/dialog/src/styles/index.cssr.js +1 -0
- package/es/dialog/styles/light.d.ts +3 -3
- package/es/dynamic-input/src/DynamicInput.d.ts +30 -30
- package/es/dynamic-input/src/InputPreset.d.ts +3 -3
- package/es/dynamic-input/src/PairPreset.d.ts +3 -3
- package/es/dynamic-input/styles/light.d.ts +3 -3
- package/es/dynamic-tags/src/DynamicTags.d.ts +30 -30
- package/es/dynamic-tags/styles/light.d.ts +3 -3
- package/es/element/index.d.ts +1 -0
- package/es/element/index.js +1 -0
- package/es/form/src/interface.d.ts +5 -4
- package/es/image/src/Image.d.ts +25 -16
- package/es/image/src/Image.js +35 -11
- package/es/image/src/ImageGroup.js +2 -2
- package/es/image/src/styles/index.cssr.js +4 -3
- package/es/input/src/Input.js +2 -0
- package/es/input/src/styles/input.cssr.js +2 -1
- package/es/input-number/src/InputNumber.d.ts +30 -30
- package/es/input-number/src/InputNumber.js +10 -5
- package/es/input-number/src/utils.d.ts +1 -0
- package/es/input-number/src/utils.js +4 -0
- package/es/input-number/styles/light.d.ts +3 -3
- package/es/locales/common/deDE.js +8 -0
- package/es/locales/common/enUS.d.ts +7 -0
- package/es/locales/common/enUS.js +8 -1
- package/es/locales/common/frFR.d.ts +3 -0
- package/es/locales/common/frFR.js +101 -0
- package/es/locales/common/idID.d.ts +2 -93
- package/es/locales/common/idID.js +8 -0
- package/es/locales/common/jaJP.js +8 -0
- package/es/locales/common/nbNO.js +8 -0
- package/es/locales/common/ruRU.js +8 -0
- package/es/locales/common/ukUA.js +8 -0
- package/es/locales/common/zhCN.js +7 -0
- package/es/locales/common/zhTW.d.ts +3 -0
- package/es/locales/common/zhTW.js +100 -0
- package/es/locales/date/frFR.d.ts +3 -0
- package/es/locales/date/frFR.js +6 -0
- package/es/locales/date/idID.d.ts +1 -6
- package/es/locales/date/zhTW.d.ts +3 -0
- package/es/locales/date/zhTW.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -0
- package/es/modal/src/BodyWrapper.d.ts +6 -6
- package/es/modal/src/Modal.d.ts +36 -36
- package/es/modal/styles/light.d.ts +3 -3
- package/es/page-header/src/PageHeader.js +3 -3
- package/es/page-header/src/styles/index.cssr.js +2 -4
- package/es/popconfirm/src/Popconfirm.d.ts +30 -30
- package/es/popconfirm/styles/light.d.ts +3 -3
- package/es/popover/src/Popover.js +4 -1
- package/es/popover/src/PopoverBody.js +3 -3
- package/es/popselect/src/Popselect.d.ts +2 -11
- package/es/popselect/src/Popselect.js +2 -2
- package/es/popselect/src/PopselectPanel.d.ts +3 -11
- package/es/popselect/src/PopselectPanel.js +17 -11
- package/es/radio/src/Radio.js +3 -3
- package/es/radio/src/RadioButton.js +4 -5
- package/es/radio/src/styles/radio-group.cssr.js +8 -4
- package/es/radio/src/styles/radio.cssr.js +8 -4
- package/es/radio/src/use-radio.d.ts +0 -3
- package/es/radio/src/use-radio.js +1 -26
- package/es/switch/src/Switch.d.ts +16 -1
- package/es/switch/src/Switch.js +17 -4
- package/es/switch/src/styles/index.cssr.js +1 -1
- package/es/tabs/src/styles/index.cssr.js +1 -0
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/theme-editor/src/ThemeEditor.js +9 -2
- package/es/time-picker/src/Panel.d.ts +3 -3
- package/es/time-picker/src/TimePicker.d.ts +30 -30
- package/es/time-picker/styles/light.d.ts +3 -3
- package/es/transfer/src/Transfer.d.ts +30 -30
- package/es/transfer/src/TransferFilter.d.ts +3 -3
- package/es/transfer/src/TransferList.d.ts +3 -3
- package/es/transfer/src/TransferListItem.d.ts +3 -3
- package/es/transfer/styles/light.d.ts +3 -3
- package/es/tree/src/Tree.d.ts +8 -4
- package/es/tree/src/Tree.js +32 -6
- package/es/tree-select/src/TreeSelect.d.ts +38 -1
- package/es/tree-select/src/TreeSelect.js +25 -10
- package/es/tree-select/src/styles/index.cssr.js +11 -2
- package/es/tree-select/styles/light.d.ts +6 -0
- package/es/tree-select/styles/light.js +5 -2
- package/es/upload/src/Upload.d.ts +41 -30
- package/es/upload/src/Upload.js +33 -23
- package/es/upload/src/UploadFile.d.ts +4 -4
- package/es/upload/src/UploadFileList.js +4 -2
- package/es/upload/src/UploadProgress.d.ts +3 -3
- package/es/upload/src/interface.d.ts +1 -0
- package/es/upload/src/styles/index.cssr.js +2 -3
- package/es/upload/styles/light.d.ts +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/close/src/styles/index.cssr.js +6 -5
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
- package/lib/_internal/scrollbar/src/ScrollBar.js +13 -7
- package/lib/_internal/selection/src/Selection.js +11 -9
- package/lib/_internal/selection/src/styles/index.cssr.js +6 -2
- package/lib/alert/src/Alert.d.ts +20 -20
- package/lib/alert/src/Alert.js +22 -22
- package/lib/alert/src/styles/index.cssr.js +45 -45
- package/lib/anchor/src/AnchorAdapter.js +12 -12
- package/lib/anchor/src/styles/index.cssr.js +41 -41
- package/lib/avatar/src/Avatar.d.ts +5 -3
- package/lib/avatar/src/Avatar.js +7 -5
- package/lib/avatar/src/styles/index.cssr.js +3 -5
- package/lib/button/src/Button.d.ts +60 -60
- package/lib/button/src/Button.js +107 -106
- package/lib/button/src/styles/button.cssr.js +83 -80
- package/lib/button/styles/dark.js +3 -3
- package/lib/button/styles/light.d.ts +3 -3
- package/lib/button/styles/light.js +1 -1
- package/lib/calendar/src/Calendar.d.ts +37 -30
- package/lib/calendar/styles/light.d.ts +3 -3
- package/lib/cascader/src/Cascader.d.ts +135 -0
- package/lib/cascader/src/Cascader.js +2 -4
- package/lib/cascader/src/CascaderMenu.d.ts +345 -0
- package/lib/cascader/src/CascaderMenu.js +6 -5
- package/lib/cascader/src/CascaderOption.d.ts +18 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/lib/cascader/styles/dark.js +3 -1
- package/lib/cascader/styles/light.d.ts +13 -0
- package/lib/cascader/styles/light.js +3 -1
- package/lib/color-picker/src/ColorInputUnit.d.ts +3 -3
- package/lib/color-picker/src/ColorPicker.d.ts +27 -27
- package/lib/color-picker/styles/light.d.ts +3 -3
- package/lib/config-provider/src/ConfigProvider.d.ts +21 -0
- package/lib/data-table/src/DataTable.d.ts +30 -30
- package/lib/data-table/src/DataTable.js +6 -13
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
- package/lib/data-table/src/MainTable.js +1 -2
- package/lib/data-table/src/TableParts/Body.d.ts +18 -7
- package/lib/data-table/src/TableParts/Body.js +78 -26
- package/lib/data-table/src/TableParts/Cell.d.ts +6 -6
- package/lib/data-table/src/TableParts/Header.d.ts +3 -3
- package/lib/data-table/src/TableParts/Header.js +1 -1
- package/lib/data-table/src/interface.d.ts +4 -1
- package/lib/data-table/src/styles/index.cssr.js +9 -12
- package/lib/data-table/src/use-check.js +6 -2
- package/lib/data-table/src/use-scroll.d.ts +2 -0
- package/lib/data-table/src/use-scroll.js +34 -4
- package/lib/data-table/src/use-table-data.js +4 -1
- package/lib/data-table/styles/_common.js +1 -1
- package/lib/data-table/styles/light.d.ts +3 -3
- package/lib/date-picker/src/DatePicker.d.ts +94 -69
- package/lib/date-picker/src/DatePicker.js +46 -19
- package/lib/date-picker/src/config.d.ts +1 -9
- package/lib/date-picker/src/config.js +1 -9
- package/lib/date-picker/src/interface.d.ts +2 -1
- package/lib/date-picker/src/panel/date.d.ts +23 -10
- package/lib/date-picker/src/panel/date.js +1 -1
- package/lib/date-picker/src/panel/daterange.d.ts +21 -9
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetime.d.ts +23 -16
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +21 -9
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +27 -20
- package/lib/date-picker/src/panel/month.js +23 -12
- package/lib/date-picker/src/panel/use-calendar.d.ts +25 -43
- package/lib/date-picker/src/panel/use-calendar.js +34 -16
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
- package/lib/date-picker/src/panel/use-dual-calendar.js +22 -6
- package/lib/date-picker/src/panel/use-panel-common.d.ts +21 -36
- package/lib/date-picker/src/panel/use-panel-common.js +3 -2
- package/lib/date-picker/src/utils.d.ts +19 -3
- package/lib/date-picker/src/utils.js +41 -4
- package/lib/date-picker/styles/_common.d.ts +2 -0
- package/lib/date-picker/styles/_common.js +3 -1
- package/lib/date-picker/styles/light.d.ts +10 -6
- package/lib/dialog/src/Dialog.d.ts +21 -21
- package/lib/dialog/src/styles/index.cssr.js +1 -0
- package/lib/dialog/styles/light.d.ts +3 -3
- package/lib/dynamic-input/src/DynamicInput.d.ts +30 -30
- package/lib/dynamic-input/src/InputPreset.d.ts +3 -3
- package/lib/dynamic-input/src/PairPreset.d.ts +3 -3
- package/lib/dynamic-input/styles/light.d.ts +3 -3
- package/lib/dynamic-tags/src/DynamicTags.d.ts +30 -30
- package/lib/dynamic-tags/styles/light.d.ts +3 -3
- package/lib/element/index.d.ts +1 -0
- package/lib/element/index.js +3 -1
- package/lib/form/src/interface.d.ts +5 -4
- package/lib/image/src/Image.d.ts +25 -16
- package/lib/image/src/Image.js +34 -10
- package/lib/image/src/ImageGroup.js +2 -2
- package/lib/image/src/styles/index.cssr.js +3 -2
- package/lib/input/src/Input.js +2 -0
- package/lib/input/src/styles/input.cssr.js +2 -1
- package/lib/input-number/src/InputNumber.d.ts +30 -30
- package/lib/input-number/src/InputNumber.js +9 -4
- package/lib/input-number/src/utils.d.ts +1 -0
- package/lib/input-number/src/utils.js +6 -1
- package/lib/input-number/styles/light.d.ts +3 -3
- package/lib/locales/common/deDE.js +8 -0
- package/lib/locales/common/enUS.d.ts +7 -0
- package/lib/locales/common/enUS.js +8 -1
- package/lib/locales/common/frFR.d.ts +3 -0
- package/lib/locales/common/frFR.js +103 -0
- package/lib/locales/common/idID.d.ts +2 -93
- package/lib/locales/common/idID.js +8 -0
- package/lib/locales/common/jaJP.js +8 -0
- package/lib/locales/common/nbNO.js +8 -0
- package/lib/locales/common/ruRU.js +8 -0
- package/lib/locales/common/ukUA.js +8 -0
- package/lib/locales/common/zhCN.js +7 -0
- package/lib/locales/common/zhTW.d.ts +3 -0
- package/lib/locales/common/zhTW.js +102 -0
- package/lib/locales/date/frFR.d.ts +3 -0
- package/lib/locales/date/frFR.js +11 -0
- package/lib/locales/date/idID.d.ts +1 -6
- package/lib/locales/date/zhTW.d.ts +3 -0
- package/lib/locales/date/zhTW.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -1
- package/lib/modal/src/BodyWrapper.d.ts +6 -6
- package/lib/modal/src/Modal.d.ts +36 -36
- package/lib/modal/styles/light.d.ts +3 -3
- package/lib/page-header/src/PageHeader.js +3 -3
- package/lib/page-header/src/styles/index.cssr.js +2 -4
- package/lib/popconfirm/src/Popconfirm.d.ts +30 -30
- package/lib/popconfirm/styles/light.d.ts +3 -3
- package/lib/popover/src/Popover.js +4 -1
- package/lib/popover/src/PopoverBody.js +3 -3
- package/lib/popselect/src/Popselect.d.ts +2 -11
- package/lib/popselect/src/Popselect.js +2 -2
- package/lib/popselect/src/PopselectPanel.d.ts +3 -11
- package/lib/popselect/src/PopselectPanel.js +16 -10
- package/lib/radio/src/Radio.js +3 -3
- package/lib/radio/src/RadioButton.js +4 -5
- package/lib/radio/src/styles/radio-group.cssr.js +8 -4
- package/lib/radio/src/styles/radio.cssr.js +8 -4
- package/lib/radio/src/use-radio.d.ts +0 -3
- package/lib/radio/src/use-radio.js +1 -26
- package/lib/switch/src/Switch.d.ts +16 -1
- package/lib/switch/src/Switch.js +17 -4
- package/lib/switch/src/styles/index.cssr.js +1 -1
- package/lib/tabs/src/styles/index.cssr.js +1 -0
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/theme-editor/src/ThemeEditor.js +9 -2
- package/lib/time-picker/src/Panel.d.ts +3 -3
- package/lib/time-picker/src/TimePicker.d.ts +30 -30
- package/lib/time-picker/styles/light.d.ts +3 -3
- package/lib/transfer/src/Transfer.d.ts +30 -30
- package/lib/transfer/src/TransferFilter.d.ts +3 -3
- package/lib/transfer/src/TransferList.d.ts +3 -3
- package/lib/transfer/src/TransferListItem.d.ts +3 -3
- package/lib/transfer/styles/light.d.ts +3 -3
- package/lib/tree/src/Tree.d.ts +8 -4
- package/lib/tree/src/Tree.js +32 -6
- package/lib/tree-select/src/TreeSelect.d.ts +38 -1
- package/lib/tree-select/src/TreeSelect.js +24 -9
- package/lib/tree-select/src/styles/index.cssr.js +11 -2
- package/lib/tree-select/styles/light.d.ts +6 -0
- package/lib/tree-select/styles/light.js +5 -2
- package/lib/upload/src/Upload.d.ts +41 -30
- package/lib/upload/src/Upload.js +33 -23
- package/lib/upload/src/UploadFile.d.ts +4 -4
- package/lib/upload/src/UploadFileList.js +4 -2
- package/lib/upload/src/UploadProgress.d.ts +3 -3
- package/lib/upload/src/interface.d.ts +1 -0
- package/lib/upload/src/styles/index.cssr.js +2 -3
- package/lib/upload/styles/light.d.ts +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +5 -4
- package/web-types.json +99 -7
|
@@ -112,28 +112,6 @@ function setup(props) {
|
|
|
112
112
|
function handleRadioInputFocus() {
|
|
113
113
|
focusRef.value = true;
|
|
114
114
|
}
|
|
115
|
-
function handleKeyUp(e) {
|
|
116
|
-
var _a;
|
|
117
|
-
switch (e.code) {
|
|
118
|
-
case 'Enter':
|
|
119
|
-
case 'NumpadEnter':
|
|
120
|
-
(_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.click();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function handleMouseDown() {
|
|
124
|
-
if (mergedDisabledRef.value)
|
|
125
|
-
return;
|
|
126
|
-
setTimeout(() => {
|
|
127
|
-
var _a, _b;
|
|
128
|
-
if (!((_a = labelRef.value) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement))) {
|
|
129
|
-
(_b = inputRef.value) === null || _b === void 0 ? void 0 : _b.focus();
|
|
130
|
-
}
|
|
131
|
-
}, 0);
|
|
132
|
-
}
|
|
133
|
-
function handleClick() {
|
|
134
|
-
var _a;
|
|
135
|
-
(_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.click();
|
|
136
|
-
}
|
|
137
115
|
return {
|
|
138
116
|
mergedClsPrefix: NRadioGroup
|
|
139
117
|
? NRadioGroup.mergedClsPrefixRef
|
|
@@ -148,10 +126,7 @@ function setup(props) {
|
|
|
148
126
|
mergedSize: mergedSizeRef,
|
|
149
127
|
handleRadioInputChange,
|
|
150
128
|
handleRadioInputBlur,
|
|
151
|
-
handleRadioInputFocus
|
|
152
|
-
handleKeyUp,
|
|
153
|
-
handleMouseDown,
|
|
154
|
-
handleClick
|
|
129
|
+
handleRadioInputFocus
|
|
155
130
|
};
|
|
156
131
|
}
|
|
157
132
|
setup.props = radioProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { CSSProperties, PropType } from 'vue';
|
|
2
2
|
import type { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
3
3
|
import type { OnUpdateValue } from './interface';
|
|
4
4
|
declare const switchProps: {
|
|
@@ -33,6 +33,10 @@ declare const switchProps: {
|
|
|
33
33
|
readonly type: PropType<string | number | boolean>;
|
|
34
34
|
readonly default: false;
|
|
35
35
|
};
|
|
36
|
+
readonly railStyle: PropType<(params: {
|
|
37
|
+
focused: boolean;
|
|
38
|
+
checked: boolean;
|
|
39
|
+
}) => string | CSSProperties>;
|
|
36
40
|
/** @deprecated */
|
|
37
41
|
readonly onChange: PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
38
42
|
readonly theme: PropType<import("../../_mixins").Theme<"Switch", {
|
|
@@ -162,6 +166,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
162
166
|
readonly type: PropType<string | number | boolean>;
|
|
163
167
|
readonly default: false;
|
|
164
168
|
};
|
|
169
|
+
readonly railStyle: PropType<(params: {
|
|
170
|
+
focused: boolean;
|
|
171
|
+
checked: boolean;
|
|
172
|
+
}) => string | CSSProperties>;
|
|
165
173
|
/** @deprecated */
|
|
166
174
|
readonly onChange: PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
167
175
|
readonly theme: PropType<import("../../_mixins").Theme<"Switch", {
|
|
@@ -263,9 +271,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
263
271
|
handleFocus: () => void;
|
|
264
272
|
handleKeyup: (e: KeyboardEvent) => void;
|
|
265
273
|
handleKeydown: (e: KeyboardEvent) => void;
|
|
274
|
+
mergedRailStyle: import("vue").ComputedRef<string | CSSProperties | undefined>;
|
|
266
275
|
pressed: import("vue").Ref<boolean>;
|
|
267
276
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
268
277
|
mergedValue: import("vue").ComputedRef<string | number | boolean>;
|
|
278
|
+
checked: import("vue").ComputedRef<boolean>;
|
|
269
279
|
mergedDisabled: import("vue").ComputedRef<boolean>;
|
|
270
280
|
cssVars: import("vue").ComputedRef<{
|
|
271
281
|
'--bezier': string;
|
|
@@ -299,6 +309,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
299
309
|
readonly onUpdateValue?: unknown;
|
|
300
310
|
readonly checkedValue?: unknown;
|
|
301
311
|
readonly uncheckedValue?: unknown;
|
|
312
|
+
readonly railStyle?: unknown;
|
|
302
313
|
readonly onChange?: unknown;
|
|
303
314
|
readonly theme?: unknown;
|
|
304
315
|
readonly themeOverrides?: unknown;
|
|
@@ -409,6 +420,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
409
420
|
}, any>> | undefined;
|
|
410
421
|
"onUpdate:value"?: MaybeArray<OnUpdateValue> | undefined;
|
|
411
422
|
onUpdateValue?: MaybeArray<OnUpdateValue> | undefined;
|
|
423
|
+
railStyle?: ((params: {
|
|
424
|
+
focused: boolean;
|
|
425
|
+
checked: boolean;
|
|
426
|
+
}) => string | CSSProperties) | undefined;
|
|
412
427
|
}>, {
|
|
413
428
|
value: string | number | boolean | undefined;
|
|
414
429
|
round: boolean;
|
package/es/switch/src/Switch.js
CHANGED
|
@@ -27,7 +27,7 @@ const switchProps = Object.assign(Object.assign({}, useTheme.props), { size: {
|
|
|
27
27
|
}, uncheckedValue: {
|
|
28
28
|
type: [String, Number, Boolean],
|
|
29
29
|
default: false
|
|
30
|
-
},
|
|
30
|
+
}, railStyle: Function,
|
|
31
31
|
/** @deprecated */
|
|
32
32
|
onChange: [Function, Array] });
|
|
33
33
|
export default defineComponent({
|
|
@@ -48,7 +48,17 @@ export default defineComponent({
|
|
|
48
48
|
const uncontrolledValueRef = ref(props.defaultValue);
|
|
49
49
|
const controlledValueRef = toRef(props, 'value');
|
|
50
50
|
const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);
|
|
51
|
+
const checkedRef = computed(() => {
|
|
52
|
+
return mergedValueRef.value === props.checkedValue;
|
|
53
|
+
});
|
|
51
54
|
const pressedRef = ref(false);
|
|
55
|
+
const focusedRef = ref(false);
|
|
56
|
+
const mergedRailStyleRef = computed(() => {
|
|
57
|
+
const { railStyle } = props;
|
|
58
|
+
if (!railStyle)
|
|
59
|
+
return undefined;
|
|
60
|
+
return railStyle({ focused: focusedRef.value, checked: checkedRef.value });
|
|
61
|
+
});
|
|
52
62
|
function doUpdateValue(value) {
|
|
53
63
|
const { 'onUpdate:value': _onUpdateValue, onChange, onUpdateValue } = props;
|
|
54
64
|
const { nTriggerFormInput, nTriggerFormChange } = formItem;
|
|
@@ -81,9 +91,11 @@ export default defineComponent({
|
|
|
81
91
|
}
|
|
82
92
|
}
|
|
83
93
|
function handleFocus() {
|
|
94
|
+
focusedRef.value = true;
|
|
84
95
|
doFocus();
|
|
85
96
|
}
|
|
86
97
|
function handleBlur() {
|
|
98
|
+
focusedRef.value = false;
|
|
87
99
|
doBlur();
|
|
88
100
|
pressedRef.value = false;
|
|
89
101
|
}
|
|
@@ -105,9 +117,11 @@ export default defineComponent({
|
|
|
105
117
|
handleFocus,
|
|
106
118
|
handleKeyup,
|
|
107
119
|
handleKeydown,
|
|
120
|
+
mergedRailStyle: mergedRailStyleRef,
|
|
108
121
|
pressed: pressedRef,
|
|
109
122
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
110
123
|
mergedValue: mergedValueRef,
|
|
124
|
+
checked: checkedRef,
|
|
111
125
|
mergedDisabled: mergedDisabledRef,
|
|
112
126
|
cssVars: computed(() => {
|
|
113
127
|
const { value: size } = mergedSizeRef;
|
|
@@ -142,8 +156,7 @@ export default defineComponent({
|
|
|
142
156
|
};
|
|
143
157
|
},
|
|
144
158
|
render() {
|
|
145
|
-
const { mergedClsPrefix,
|
|
146
|
-
const checked = mergedValue === checkedValue;
|
|
159
|
+
const { mergedClsPrefix, mergedDisabled, checked, mergedRailStyle, $slots } = this;
|
|
147
160
|
const { checked: checkedSlot, unchecked: uncheckedSlot } = $slots;
|
|
148
161
|
return (h("div", { role: "switch", "aria-checked": checked, class: [
|
|
149
162
|
`${mergedClsPrefix}-switch`,
|
|
@@ -152,7 +165,7 @@ export default defineComponent({
|
|
|
152
165
|
this.round && `${mergedClsPrefix}-switch--round`,
|
|
153
166
|
this.pressed && `${mergedClsPrefix}-switch--pressed`
|
|
154
167
|
], tabindex: !this.mergedDisabled ? 0 : undefined, style: this.cssVars, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown },
|
|
155
|
-
h("div", { class: `${mergedClsPrefix}-switch__rail`, "aria-hidden": "true" },
|
|
168
|
+
h("div", { class: `${mergedClsPrefix}-switch__rail`, "aria-hidden": "true", style: mergedRailStyle },
|
|
156
169
|
(checkedSlot || uncheckedSlot) && (h("div", { "aria-hidden": true, class: `${mergedClsPrefix}-switch__children-placeholder` },
|
|
157
170
|
h("div", { class: `${mergedClsPrefix}-switch__rail-placeholder` },
|
|
158
171
|
h("div", { class: `${mergedClsPrefix}-switch__button-placeholder` }), checkedSlot === null || checkedSlot === void 0 ? void 0 :
|
|
@@ -18,6 +18,14 @@ const ColorWandIcon = (h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "ht
|
|
|
18
18
|
h("path", { d: "M3.5 3C3.77615 3 4 3.22386 4 3.5V4H4.5C4.77615 4 5 4.22386 5 4.5C5 4.77614 4.77615 5 4.5 5H4V5.5C4 5.77614 3.77615 6 3.5 6C3.22386 6 3 5.77614 3 5.5V5H2.5C2.22386 5 2 4.77614 2 4.5C2 4.22386 2.22386 4 2.5 4H3V3.5C3 3.22386 3.22386 3 3.5 3Z", fill: "currentColor" }),
|
|
19
19
|
h("path", { d: "M12.5 12C12.7761 12 13 11.7761 13 11.5C13 11.2239 12.7761 11 12.5 11H12V10.5C12 10.2239 11.7761 10 11.5 10C11.2239 10 11 10.2239 11 10.5V11H10.5C10.2239 11 10 11.2239 10 11.5C10 11.7761 10.2239 12 10.5 12H11V12.5C11 12.7761 11.2239 13 11.5 13C11.7761 13 12 12.7761 12 12.5V12H12.5Z", fill: "currentColor" }),
|
|
20
20
|
h("path", { d: "M8.72956 4.56346C9.4771 3.81592 10.6891 3.81592 11.4367 4.56347C12.1842 5.31102 12.1842 6.52303 11.4367 7.27058L4.26679 14.4404C3.51924 15.1879 2.30723 15.1879 1.55968 14.4404C0.812134 13.6928 0.812138 12.4808 1.55969 11.7333L8.72956 4.56346ZM8.25002 6.4572L2.26679 12.4404C1.90977 12.7974 1.90977 13.3763 2.26679 13.7333C2.62381 14.0903 3.20266 14.0903 3.55968 13.7333L9.54292 7.75009L8.25002 6.4572ZM10.25 7.04299L10.7295 6.56347C11.0866 6.20645 11.0866 5.6276 10.7296 5.27057C10.3725 4.91355 9.79368 4.91355 9.43666 5.27057L8.95713 5.7501L10.25 7.04299Z", fill: "currentColor" })));
|
|
21
|
+
// button colorOpacitySecondary var is not color
|
|
22
|
+
const showColorPicker = (key) => {
|
|
23
|
+
if (key.includes('opacity'))
|
|
24
|
+
return false;
|
|
25
|
+
if (key.includes('color') || key.includes('Color'))
|
|
26
|
+
return true;
|
|
27
|
+
return false;
|
|
28
|
+
};
|
|
21
29
|
export default defineComponent({
|
|
22
30
|
name: 'ThemeEditor',
|
|
23
31
|
inheritAttrs: false,
|
|
@@ -255,8 +263,7 @@ export default defineComponent({
|
|
|
255
263
|
var _a, _b, _c, _d;
|
|
256
264
|
return [
|
|
257
265
|
h("div", { key: `${varKey}Label` }, varKey),
|
|
258
|
-
varKey
|
|
259
|
-
varKey.includes('Color') ? (h(NColorPicker, { key: varKey, modes: [
|
|
266
|
+
showColorPicker(varKey) ? (h(NColorPicker, { key: varKey, modes: [
|
|
260
267
|
'rgb',
|
|
261
268
|
'hex'
|
|
262
269
|
], value: ((_b = (_a = this
|
|
@@ -216,9 +216,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
216
216
|
fontSizeMedium: string;
|
|
217
217
|
fontSizeLarge: string;
|
|
218
218
|
opacityDisabled: string;
|
|
219
|
-
colorOpacitySecondary:
|
|
220
|
-
colorOpacitySecondaryHover:
|
|
221
|
-
colorOpacitySecondaryPressed:
|
|
219
|
+
colorOpacitySecondary: string;
|
|
220
|
+
colorOpacitySecondaryHover: string;
|
|
221
|
+
colorOpacitySecondaryPressed: string;
|
|
222
222
|
colorSecondary: string;
|
|
223
223
|
colorSecondaryHover: string;
|
|
224
224
|
colorSecondaryPressed: string;
|
|
@@ -100,9 +100,9 @@ declare const timePickerProps: {
|
|
|
100
100
|
fontSizeMedium: string;
|
|
101
101
|
fontSizeLarge: string;
|
|
102
102
|
opacityDisabled: string;
|
|
103
|
-
colorOpacitySecondary:
|
|
104
|
-
colorOpacitySecondaryHover:
|
|
105
|
-
colorOpacitySecondaryPressed:
|
|
103
|
+
colorOpacitySecondary: string;
|
|
104
|
+
colorOpacitySecondaryHover: string;
|
|
105
|
+
colorOpacitySecondaryPressed: string;
|
|
106
106
|
colorSecondary: string;
|
|
107
107
|
colorSecondaryHover: string;
|
|
108
108
|
colorSecondaryPressed: string;
|
|
@@ -386,9 +386,9 @@ declare const timePickerProps: {
|
|
|
386
386
|
fontSizeMedium: string;
|
|
387
387
|
fontSizeLarge: string;
|
|
388
388
|
opacityDisabled: string;
|
|
389
|
-
colorOpacitySecondary:
|
|
390
|
-
colorOpacitySecondaryHover:
|
|
391
|
-
colorOpacitySecondaryPressed:
|
|
389
|
+
colorOpacitySecondary: string;
|
|
390
|
+
colorOpacitySecondaryHover: string;
|
|
391
|
+
colorOpacitySecondaryPressed: string;
|
|
392
392
|
colorSecondary: string;
|
|
393
393
|
colorSecondaryHover: string;
|
|
394
394
|
colorSecondaryPressed: string;
|
|
@@ -672,9 +672,9 @@ declare const timePickerProps: {
|
|
|
672
672
|
fontSizeMedium: string;
|
|
673
673
|
fontSizeLarge: string;
|
|
674
674
|
opacityDisabled: string;
|
|
675
|
-
colorOpacitySecondary:
|
|
676
|
-
colorOpacitySecondaryHover:
|
|
677
|
-
colorOpacitySecondaryPressed:
|
|
675
|
+
colorOpacitySecondary: string;
|
|
676
|
+
colorOpacitySecondaryHover: string;
|
|
677
|
+
colorOpacitySecondaryPressed: string;
|
|
678
678
|
colorSecondary: string;
|
|
679
679
|
colorSecondaryHover: string;
|
|
680
680
|
colorSecondaryPressed: string;
|
|
@@ -1024,9 +1024,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1024
1024
|
fontSizeMedium: string;
|
|
1025
1025
|
fontSizeLarge: string;
|
|
1026
1026
|
opacityDisabled: string;
|
|
1027
|
-
colorOpacitySecondary:
|
|
1028
|
-
colorOpacitySecondaryHover:
|
|
1029
|
-
colorOpacitySecondaryPressed:
|
|
1027
|
+
colorOpacitySecondary: string;
|
|
1028
|
+
colorOpacitySecondaryHover: string;
|
|
1029
|
+
colorOpacitySecondaryPressed: string;
|
|
1030
1030
|
colorSecondary: string;
|
|
1031
1031
|
colorSecondaryHover: string;
|
|
1032
1032
|
colorSecondaryPressed: string;
|
|
@@ -1310,9 +1310,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1310
1310
|
fontSizeMedium: string;
|
|
1311
1311
|
fontSizeLarge: string;
|
|
1312
1312
|
opacityDisabled: string;
|
|
1313
|
-
colorOpacitySecondary:
|
|
1314
|
-
colorOpacitySecondaryHover:
|
|
1315
|
-
colorOpacitySecondaryPressed:
|
|
1313
|
+
colorOpacitySecondary: string;
|
|
1314
|
+
colorOpacitySecondaryHover: string;
|
|
1315
|
+
colorOpacitySecondaryPressed: string;
|
|
1316
1316
|
colorSecondary: string;
|
|
1317
1317
|
colorSecondaryHover: string;
|
|
1318
1318
|
colorSecondaryPressed: string;
|
|
@@ -1596,9 +1596,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1596
1596
|
fontSizeMedium: string;
|
|
1597
1597
|
fontSizeLarge: string;
|
|
1598
1598
|
opacityDisabled: string;
|
|
1599
|
-
colorOpacitySecondary:
|
|
1600
|
-
colorOpacitySecondaryHover:
|
|
1601
|
-
colorOpacitySecondaryPressed:
|
|
1599
|
+
colorOpacitySecondary: string;
|
|
1600
|
+
colorOpacitySecondaryHover: string;
|
|
1601
|
+
colorOpacitySecondaryPressed: string;
|
|
1602
1602
|
colorSecondary: string;
|
|
1603
1603
|
colorSecondaryHover: string;
|
|
1604
1604
|
colorSecondaryPressed: string;
|
|
@@ -2076,9 +2076,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2076
2076
|
fontSizeMedium: string;
|
|
2077
2077
|
fontSizeLarge: string;
|
|
2078
2078
|
opacityDisabled: string;
|
|
2079
|
-
colorOpacitySecondary:
|
|
2080
|
-
colorOpacitySecondaryHover:
|
|
2081
|
-
colorOpacitySecondaryPressed:
|
|
2079
|
+
colorOpacitySecondary: string;
|
|
2080
|
+
colorOpacitySecondaryHover: string;
|
|
2081
|
+
colorOpacitySecondaryPressed: string;
|
|
2082
2082
|
colorSecondary: string;
|
|
2083
2083
|
colorSecondaryHover: string;
|
|
2084
2084
|
colorSecondaryPressed: string;
|
|
@@ -2451,9 +2451,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2451
2451
|
fontSizeMedium: string;
|
|
2452
2452
|
fontSizeLarge: string;
|
|
2453
2453
|
opacityDisabled: string;
|
|
2454
|
-
colorOpacitySecondary:
|
|
2455
|
-
colorOpacitySecondaryHover:
|
|
2456
|
-
colorOpacitySecondaryPressed:
|
|
2454
|
+
colorOpacitySecondary: string;
|
|
2455
|
+
colorOpacitySecondaryHover: string;
|
|
2456
|
+
colorOpacitySecondaryPressed: string;
|
|
2457
2457
|
colorSecondary: string;
|
|
2458
2458
|
colorSecondaryHover: string;
|
|
2459
2459
|
colorSecondaryPressed: string;
|
|
@@ -2737,9 +2737,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2737
2737
|
fontSizeMedium: string;
|
|
2738
2738
|
fontSizeLarge: string;
|
|
2739
2739
|
opacityDisabled: string;
|
|
2740
|
-
colorOpacitySecondary:
|
|
2741
|
-
colorOpacitySecondaryHover:
|
|
2742
|
-
colorOpacitySecondaryPressed:
|
|
2740
|
+
colorOpacitySecondary: string;
|
|
2741
|
+
colorOpacitySecondaryHover: string;
|
|
2742
|
+
colorOpacitySecondaryPressed: string;
|
|
2743
2743
|
colorSecondary: string;
|
|
2744
2744
|
colorSecondaryHover: string;
|
|
2745
2745
|
colorSecondaryPressed: string;
|
|
@@ -3023,9 +3023,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3023
3023
|
fontSizeMedium: string;
|
|
3024
3024
|
fontSizeLarge: string;
|
|
3025
3025
|
opacityDisabled: string;
|
|
3026
|
-
colorOpacitySecondary:
|
|
3027
|
-
colorOpacitySecondaryHover:
|
|
3028
|
-
colorOpacitySecondaryPressed:
|
|
3026
|
+
colorOpacitySecondary: string;
|
|
3027
|
+
colorOpacitySecondaryHover: string;
|
|
3028
|
+
colorOpacitySecondaryPressed: string;
|
|
3029
3029
|
colorSecondary: string;
|
|
3030
3030
|
colorSecondaryHover: string;
|
|
3031
3031
|
colorSecondaryPressed: string;
|
|
@@ -52,9 +52,9 @@ declare const timePickerLight: import("../../_mixins").Theme<"TimePicker", {
|
|
|
52
52
|
fontSizeMedium: string;
|
|
53
53
|
fontSizeLarge: string;
|
|
54
54
|
opacityDisabled: string;
|
|
55
|
-
colorOpacitySecondary:
|
|
56
|
-
colorOpacitySecondaryHover:
|
|
57
|
-
colorOpacitySecondaryPressed:
|
|
55
|
+
colorOpacitySecondary: string;
|
|
56
|
+
colorOpacitySecondaryHover: string;
|
|
57
|
+
colorOpacitySecondaryPressed: string;
|
|
58
58
|
colorSecondary: string;
|
|
59
59
|
colorSecondaryHover: string;
|
|
60
60
|
colorSecondaryPressed: string;
|
|
@@ -177,9 +177,9 @@ declare const transferProps: {
|
|
|
177
177
|
fontSizeMedium: string;
|
|
178
178
|
fontSizeLarge: string;
|
|
179
179
|
opacityDisabled: string;
|
|
180
|
-
colorOpacitySecondary:
|
|
181
|
-
colorOpacitySecondaryHover:
|
|
182
|
-
colorOpacitySecondaryPressed:
|
|
180
|
+
colorOpacitySecondary: string;
|
|
181
|
+
colorOpacitySecondaryHover: string;
|
|
182
|
+
colorOpacitySecondaryPressed: string;
|
|
183
183
|
colorSecondary: string;
|
|
184
184
|
colorSecondaryHover: string;
|
|
185
185
|
colorSecondaryPressed: string;
|
|
@@ -511,9 +511,9 @@ declare const transferProps: {
|
|
|
511
511
|
fontSizeMedium: string;
|
|
512
512
|
fontSizeLarge: string;
|
|
513
513
|
opacityDisabled: string;
|
|
514
|
-
colorOpacitySecondary:
|
|
515
|
-
colorOpacitySecondaryHover:
|
|
516
|
-
colorOpacitySecondaryPressed:
|
|
514
|
+
colorOpacitySecondary: string;
|
|
515
|
+
colorOpacitySecondaryHover: string;
|
|
516
|
+
colorOpacitySecondaryPressed: string;
|
|
517
517
|
colorSecondary: string;
|
|
518
518
|
colorSecondaryHover: string;
|
|
519
519
|
colorSecondaryPressed: string;
|
|
@@ -845,9 +845,9 @@ declare const transferProps: {
|
|
|
845
845
|
fontSizeMedium: string;
|
|
846
846
|
fontSizeLarge: string;
|
|
847
847
|
opacityDisabled: string;
|
|
848
|
-
colorOpacitySecondary:
|
|
849
|
-
colorOpacitySecondaryHover:
|
|
850
|
-
colorOpacitySecondaryPressed:
|
|
848
|
+
colorOpacitySecondary: string;
|
|
849
|
+
colorOpacitySecondaryHover: string;
|
|
850
|
+
colorOpacitySecondaryPressed: string;
|
|
851
851
|
colorSecondary: string;
|
|
852
852
|
colorSecondaryHover: string;
|
|
853
853
|
colorSecondaryPressed: string;
|
|
@@ -1213,9 +1213,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1213
1213
|
fontSizeMedium: string;
|
|
1214
1214
|
fontSizeLarge: string;
|
|
1215
1215
|
opacityDisabled: string;
|
|
1216
|
-
colorOpacitySecondary:
|
|
1217
|
-
colorOpacitySecondaryHover:
|
|
1218
|
-
colorOpacitySecondaryPressed:
|
|
1216
|
+
colorOpacitySecondary: string;
|
|
1217
|
+
colorOpacitySecondaryHover: string;
|
|
1218
|
+
colorOpacitySecondaryPressed: string;
|
|
1219
1219
|
colorSecondary: string;
|
|
1220
1220
|
colorSecondaryHover: string;
|
|
1221
1221
|
colorSecondaryPressed: string;
|
|
@@ -1547,9 +1547,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1547
1547
|
fontSizeMedium: string;
|
|
1548
1548
|
fontSizeLarge: string;
|
|
1549
1549
|
opacityDisabled: string;
|
|
1550
|
-
colorOpacitySecondary:
|
|
1551
|
-
colorOpacitySecondaryHover:
|
|
1552
|
-
colorOpacitySecondaryPressed:
|
|
1550
|
+
colorOpacitySecondary: string;
|
|
1551
|
+
colorOpacitySecondaryHover: string;
|
|
1552
|
+
colorOpacitySecondaryPressed: string;
|
|
1553
1553
|
colorSecondary: string;
|
|
1554
1554
|
colorSecondaryHover: string;
|
|
1555
1555
|
colorSecondaryPressed: string;
|
|
@@ -1881,9 +1881,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1881
1881
|
fontSizeMedium: string;
|
|
1882
1882
|
fontSizeLarge: string;
|
|
1883
1883
|
opacityDisabled: string;
|
|
1884
|
-
colorOpacitySecondary:
|
|
1885
|
-
colorOpacitySecondaryHover:
|
|
1886
|
-
colorOpacitySecondaryPressed:
|
|
1884
|
+
colorOpacitySecondary: string;
|
|
1885
|
+
colorOpacitySecondaryHover: string;
|
|
1886
|
+
colorOpacitySecondaryPressed: string;
|
|
1887
1887
|
colorSecondary: string;
|
|
1888
1888
|
colorSecondaryHover: string;
|
|
1889
1889
|
colorSecondaryPressed: string;
|
|
@@ -2330,9 +2330,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2330
2330
|
fontSizeMedium: string;
|
|
2331
2331
|
fontSizeLarge: string;
|
|
2332
2332
|
opacityDisabled: string;
|
|
2333
|
-
colorOpacitySecondary:
|
|
2334
|
-
colorOpacitySecondaryHover:
|
|
2335
|
-
colorOpacitySecondaryPressed:
|
|
2333
|
+
colorOpacitySecondary: string;
|
|
2334
|
+
colorOpacitySecondaryHover: string;
|
|
2335
|
+
colorOpacitySecondaryPressed: string;
|
|
2336
2336
|
colorSecondary: string;
|
|
2337
2337
|
colorSecondaryHover: string;
|
|
2338
2338
|
colorSecondaryPressed: string;
|
|
@@ -2759,9 +2759,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2759
2759
|
fontSizeMedium: string;
|
|
2760
2760
|
fontSizeLarge: string;
|
|
2761
2761
|
opacityDisabled: string;
|
|
2762
|
-
colorOpacitySecondary:
|
|
2763
|
-
colorOpacitySecondaryHover:
|
|
2764
|
-
colorOpacitySecondaryPressed:
|
|
2762
|
+
colorOpacitySecondary: string;
|
|
2763
|
+
colorOpacitySecondaryHover: string;
|
|
2764
|
+
colorOpacitySecondaryPressed: string;
|
|
2765
2765
|
colorSecondary: string;
|
|
2766
2766
|
colorSecondaryHover: string;
|
|
2767
2767
|
colorSecondaryPressed: string;
|
|
@@ -3093,9 +3093,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3093
3093
|
fontSizeMedium: string;
|
|
3094
3094
|
fontSizeLarge: string;
|
|
3095
3095
|
opacityDisabled: string;
|
|
3096
|
-
colorOpacitySecondary:
|
|
3097
|
-
colorOpacitySecondaryHover:
|
|
3098
|
-
colorOpacitySecondaryPressed:
|
|
3096
|
+
colorOpacitySecondary: string;
|
|
3097
|
+
colorOpacitySecondaryHover: string;
|
|
3098
|
+
colorOpacitySecondaryPressed: string;
|
|
3099
3099
|
colorSecondary: string;
|
|
3100
3100
|
colorSecondaryHover: string;
|
|
3101
3101
|
colorSecondaryPressed: string;
|
|
@@ -3427,9 +3427,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3427
3427
|
fontSizeMedium: string;
|
|
3428
3428
|
fontSizeLarge: string;
|
|
3429
3429
|
opacityDisabled: string;
|
|
3430
|
-
colorOpacitySecondary:
|
|
3431
|
-
colorOpacitySecondaryHover:
|
|
3432
|
-
colorOpacitySecondaryPressed:
|
|
3430
|
+
colorOpacitySecondary: string;
|
|
3431
|
+
colorOpacitySecondaryHover: string;
|
|
3432
|
+
colorOpacitySecondaryPressed: string;
|
|
3433
3433
|
colorSecondary: string;
|
|
3434
3434
|
colorSecondaryHover: string;
|
|
3435
3435
|
colorSecondaryPressed: string;
|
|
@@ -265,9 +265,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
265
265
|
fontSizeMedium: string;
|
|
266
266
|
fontSizeLarge: string;
|
|
267
267
|
opacityDisabled: string;
|
|
268
|
-
colorOpacitySecondary:
|
|
269
|
-
colorOpacitySecondaryHover:
|
|
270
|
-
colorOpacitySecondaryPressed:
|
|
268
|
+
colorOpacitySecondary: string;
|
|
269
|
+
colorOpacitySecondaryHover: string;
|
|
270
|
+
colorOpacitySecondaryPressed: string;
|
|
271
271
|
colorSecondary: string;
|
|
272
272
|
colorSecondaryHover: string;
|
|
273
273
|
colorSecondaryPressed: string;
|
|
@@ -278,9 +278,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
278
278
|
fontSizeMedium: string;
|
|
279
279
|
fontSizeLarge: string;
|
|
280
280
|
opacityDisabled: string;
|
|
281
|
-
colorOpacitySecondary:
|
|
282
|
-
colorOpacitySecondaryHover:
|
|
283
|
-
colorOpacitySecondaryPressed:
|
|
281
|
+
colorOpacitySecondary: string;
|
|
282
|
+
colorOpacitySecondaryHover: string;
|
|
283
|
+
colorOpacitySecondaryPressed: string;
|
|
284
284
|
colorSecondary: string;
|
|
285
285
|
colorSecondaryHover: string;
|
|
286
286
|
colorSecondaryPressed: string;
|
|
@@ -265,9 +265,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
265
265
|
fontSizeMedium: string;
|
|
266
266
|
fontSizeLarge: string;
|
|
267
267
|
opacityDisabled: string;
|
|
268
|
-
colorOpacitySecondary:
|
|
269
|
-
colorOpacitySecondaryHover:
|
|
270
|
-
colorOpacitySecondaryPressed:
|
|
268
|
+
colorOpacitySecondary: string;
|
|
269
|
+
colorOpacitySecondaryHover: string;
|
|
270
|
+
colorOpacitySecondaryPressed: string;
|
|
271
271
|
colorSecondary: string;
|
|
272
272
|
colorSecondaryHover: string;
|
|
273
273
|
colorSecondaryPressed: string;
|
|
@@ -167,9 +167,9 @@ declare const transferLight: import("../../_mixins").Theme<"Transfer", {
|
|
|
167
167
|
fontSizeMedium: string;
|
|
168
168
|
fontSizeLarge: string;
|
|
169
169
|
opacityDisabled: string;
|
|
170
|
-
colorOpacitySecondary:
|
|
171
|
-
colorOpacitySecondaryHover:
|
|
172
|
-
colorOpacitySecondaryPressed:
|
|
170
|
+
colorOpacitySecondary: string;
|
|
171
|
+
colorOpacitySecondaryHover: string;
|
|
172
|
+
colorOpacitySecondaryPressed: string;
|
|
173
173
|
colorSecondary: string;
|
|
174
174
|
colorSecondaryHover: string;
|
|
175
175
|
colorSecondaryPressed: string;
|
package/es/tree/src/Tree.d.ts
CHANGED
|
@@ -129,6 +129,7 @@ declare const treeProps: {
|
|
|
129
129
|
readonly default: true;
|
|
130
130
|
};
|
|
131
131
|
readonly virtualScroll: BooleanConstructor;
|
|
132
|
+
readonly watchProps: PropType<("defaultExpandedKeys" | "defaultCheckedKeys" | "defaultSelectedKeys")[]>;
|
|
132
133
|
readonly renderLabel: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => import("vue").VNodeChild>;
|
|
133
134
|
readonly renderPrefix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => import("vue").VNodeChild>;
|
|
134
135
|
readonly renderSuffix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => import("vue").VNodeChild>;
|
|
@@ -376,6 +377,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
376
377
|
readonly default: true;
|
|
377
378
|
};
|
|
378
379
|
readonly virtualScroll: BooleanConstructor;
|
|
380
|
+
readonly watchProps: PropType<("defaultExpandedKeys" | "defaultCheckedKeys" | "defaultSelectedKeys")[]>;
|
|
379
381
|
readonly renderLabel: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => import("vue").VNodeChild>;
|
|
380
382
|
readonly renderPrefix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => import("vue").VNodeChild>;
|
|
381
383
|
readonly renderSuffix: PropType<({ option, checked, selected }: import("./interface").TreeRenderProps) => import("vue").VNodeChild>;
|
|
@@ -1017,6 +1019,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1017
1019
|
readonly allowDrop?: unknown;
|
|
1018
1020
|
readonly animated?: unknown;
|
|
1019
1021
|
readonly virtualScroll?: unknown;
|
|
1022
|
+
readonly watchProps?: unknown;
|
|
1020
1023
|
readonly renderLabel?: unknown;
|
|
1021
1024
|
readonly renderPrefix?: unknown;
|
|
1022
1025
|
readonly renderSuffix?: unknown;
|
|
@@ -1056,14 +1059,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1056
1059
|
cancelable: boolean;
|
|
1057
1060
|
blockLine: boolean;
|
|
1058
1061
|
selectable: boolean;
|
|
1062
|
+
defaultCheckedKeys: Key[];
|
|
1063
|
+
defaultSelectedKeys: Key[];
|
|
1059
1064
|
internalUnifySelectCheck: boolean;
|
|
1060
1065
|
internalHideFilteredNode: boolean;
|
|
1061
1066
|
internalCheckboxFocusable: boolean;
|
|
1062
1067
|
internalFocusable: boolean;
|
|
1063
1068
|
expandOnDragenter: boolean;
|
|
1064
1069
|
blockNode: boolean;
|
|
1065
|
-
defaultCheckedKeys: Key[];
|
|
1066
|
-
defaultSelectedKeys: Key[];
|
|
1067
1070
|
allowDrop: AllowDrop;
|
|
1068
1071
|
} & {
|
|
1069
1072
|
filter?: ((pattern: string, node: TreeOption) => boolean) | undefined;
|
|
@@ -1212,6 +1215,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1212
1215
|
renderLabel?: (({ option, checked, selected }: import("./interface").TreeRenderProps) => import("vue").VNodeChild) | undefined;
|
|
1213
1216
|
checkedKeys?: Key[] | undefined;
|
|
1214
1217
|
expandedKeys?: Key[] | undefined;
|
|
1218
|
+
watchProps?: ("defaultExpandedKeys" | "defaultCheckedKeys" | "defaultSelectedKeys")[] | undefined;
|
|
1215
1219
|
"onUpdate:expandedKeys"?: MaybeArray<OnUpdateKeys> | undefined;
|
|
1216
1220
|
onUpdateExpandedKeys?: MaybeArray<OnUpdateKeys> | undefined;
|
|
1217
1221
|
renderPrefix?: (({ option, checked, selected }: import("./interface").TreeRenderProps) => import("vue").VNodeChild) | undefined;
|
|
@@ -1251,14 +1255,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1251
1255
|
cancelable: boolean;
|
|
1252
1256
|
blockLine: boolean;
|
|
1253
1257
|
selectable: boolean;
|
|
1258
|
+
defaultCheckedKeys: Key[];
|
|
1259
|
+
defaultSelectedKeys: Key[];
|
|
1254
1260
|
internalUnifySelectCheck: boolean;
|
|
1255
1261
|
internalHideFilteredNode: boolean;
|
|
1256
1262
|
internalCheckboxFocusable: boolean;
|
|
1257
1263
|
internalFocusable: boolean;
|
|
1258
1264
|
expandOnDragenter: boolean;
|
|
1259
1265
|
blockNode: boolean;
|
|
1260
|
-
defaultCheckedKeys: Key[];
|
|
1261
|
-
defaultSelectedKeys: Key[];
|
|
1262
1266
|
allowDrop: AllowDrop;
|
|
1263
1267
|
}>;
|
|
1264
1268
|
export default _default;
|