naive-ui 2.20.3 → 2.21.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/select-menu/src/SelectMenu.d.ts +3 -0
- package/es/_internal/selection/src/Selection.d.ts +3 -0
- package/es/_internal/suffix/src/Suffix.d.ts +4 -1
- package/es/_internal/suffix/src/Suffix.js +4 -1
- package/es/_styles/common/dark.js +1 -1
- package/es/_styles/common/light.d.ts +3 -0
- package/es/_styles/common/light.js +5 -2
- package/es/_styles/global/index.cssr.js +9 -4
- package/es/_styles/transitions/icon-switch.cssr.js +6 -2
- package/es/_utils/naive/extract-public-props.d.ts +1 -1
- package/es/alert/src/Alert.d.ts +3 -0
- package/es/auto-complete/src/AutoComplete.d.ts +8 -1
- package/es/auto-complete/src/AutoComplete.js +2 -2
- package/es/avatar/src/Avatar.d.ts +8 -1
- package/es/avatar/src/Avatar.js +41 -9
- package/es/avatar/src/styles/index.cssr.js +2 -2
- package/es/button/src/Button.d.ts +149 -52
- package/es/button/src/Button.js +128 -56
- package/es/button/src/interface.d.ts +1 -1
- package/es/button/styles/dark.js +3 -0
- package/es/button/styles/light.d.ts +14 -5
- package/es/button/styles/light.js +10 -3
- package/es/calendar/src/Calendar.d.ts +143 -50
- package/es/calendar/styles/light.d.ts +14 -5
- package/es/card/src/Card.d.ts +3 -0
- package/es/cascader/src/Cascader.d.ts +3 -0
- package/es/cascader/src/CascaderOption.d.ts +3 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +3 -0
- package/es/checkbox/src/Checkbox.d.ts +8 -5
- package/es/checkbox/src/Checkbox.js +3 -3
- package/es/collapse/src/Collapse.d.ts +3 -0
- package/es/color-picker/src/ColorInputUnit.d.ts +17 -5
- package/es/color-picker/src/ColorPicker.d.ts +126 -45
- package/es/color-picker/styles/light.d.ts +14 -5
- package/es/data-table/src/DataTable.d.ts +183 -51
- package/es/data-table/src/DataTable.js +11 -6
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +20 -5
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +20 -5
- package/es/data-table/src/TableParts/Body.d.ts +25 -6
- package/es/data-table/src/TableParts/Body.js +60 -22
- package/es/data-table/src/TableParts/BodyCheckbox.js +1 -1
- package/es/data-table/src/TableParts/Cell.d.ts +40 -10
- package/es/data-table/src/TableParts/Header.d.ts +20 -5
- 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 +8 -9
- package/es/data-table/styles/light.d.ts +20 -5
- package/es/data-table/styles/light.js +3 -3
- package/es/date-picker/src/DatePicker.d.ts +298 -105
- package/es/date-picker/src/panel/date.d.ts +45 -15
- package/es/date-picker/src/panel/daterange.d.ts +45 -15
- package/es/date-picker/src/panel/datetime.d.ts +45 -15
- package/es/date-picker/src/panel/datetimerange.d.ts +45 -15
- package/es/date-picker/src/panel/month.d.ts +45 -15
- package/es/date-picker/src/panel/use-calendar.d.ts +45 -15
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +45 -15
- package/es/date-picker/src/panel/use-panel-common.d.ts +45 -15
- package/es/date-picker/styles/light.d.ts +28 -10
- package/es/dialog/src/Dialog.d.ts +101 -35
- package/es/dialog/styles/light.d.ts +14 -5
- package/es/drawer/src/Drawer.d.ts +3 -0
- package/es/drawer/src/DrawerBodyWrapper.d.ts +3 -0
- package/es/drawer/src/DrawerContent.d.ts +3 -0
- package/es/dropdown/index.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +5 -2
- package/es/dropdown/src/DropdownGroup.d.ts +2 -3
- package/es/dropdown/src/DropdownMenu.d.ts +3 -4
- package/es/dropdown/src/DropdownMenu.js +5 -4
- package/es/dropdown/src/DropdownOption.d.ts +3 -4
- package/es/dropdown/src/DropdownOption.js +2 -2
- package/es/dropdown/src/DropdownRenderOption.d.ts +2 -3
- package/es/dropdown/src/interface.d.ts +9 -30
- package/es/dropdown/src/utils.d.ts +1 -0
- package/es/dropdown/src/utils.js +10 -0
- package/es/dynamic-input/src/DynamicInput.d.ts +143 -50
- package/es/dynamic-input/src/InputPreset.d.ts +17 -5
- package/es/dynamic-input/src/PairPreset.d.ts +17 -5
- package/es/dynamic-input/styles/light.d.ts +14 -5
- package/es/dynamic-tags/src/DynamicTags.d.ts +144 -50
- package/es/dynamic-tags/styles/light.d.ts +14 -5
- package/es/ellipsis/src/Ellipsis.d.ts +3 -0
- package/es/global-style/src/GlobalStyle.js +2 -0
- package/es/input/src/Input.d.ts +4 -0
- package/es/input/src/Input.js +6 -0
- package/es/input/src/interface.d.ts +1 -0
- package/es/input-number/src/InputNumber.d.ts +144 -50
- package/es/input-number/styles/light.d.ts +14 -5
- package/es/layout/src/Layout.d.ts +6 -0
- package/es/layout/src/LayoutContent.d.ts +3 -0
- package/es/layout/src/LayoutSider.d.ts +3 -0
- package/es/log/src/Log.d.ts +3 -0
- package/es/mention/src/Mention.d.ts +4 -0
- package/es/menu/index.d.ts +1 -1
- package/es/menu/src/Menu.d.ts +19 -6
- package/es/menu/src/Menu.js +2 -1
- package/es/menu/src/MenuDivider.d.ts +2 -0
- package/es/menu/src/MenuDivider.js +11 -0
- package/es/menu/src/MenuOption.d.ts +8 -1
- package/es/menu/src/MenuOptionContent.d.ts +4 -1
- package/es/menu/src/Submenu.d.ts +18 -16
- package/es/menu/src/interface.d.ts +23 -4
- package/es/menu/src/styles/index.cssr.js +6 -1
- package/es/menu/src/utils.d.ts +4 -2
- package/es/menu/src/utils.js +16 -2
- package/es/menu/styles/light.d.ts +2 -0
- package/es/menu/styles/light.js +3 -2
- package/es/modal/src/BodyWrapper.d.ts +31 -10
- package/es/modal/src/Modal.d.ts +168 -60
- package/es/modal/styles/light.d.ts +14 -5
- package/es/notification/src/NotificationContainer.d.ts +3 -0
- package/es/pagination/src/Pagination.d.ts +4 -0
- package/es/popconfirm/src/Popconfirm.d.ts +143 -50
- package/es/popconfirm/styles/light.d.ts +14 -5
- package/es/popselect/src/Popselect.d.ts +3 -0
- package/es/popselect/src/PopselectPanel.d.ts +3 -0
- package/es/radio/src/Radio.d.ts +3 -0
- package/es/radio/src/RadioButton.d.ts +3 -0
- package/es/radio/src/use-radio.d.ts +2 -0
- package/es/radio/src/use-radio.js +6 -3
- package/es/select/src/Select.d.ts +3 -0
- package/es/slider/src/Slider.d.ts +70 -91
- package/es/slider/src/Slider.js +326 -583
- package/es/slider/src/interface.d.ts +1 -1
- package/es/slider/src/styles/index.cssr.js +86 -16
- package/es/slider/src/utils.d.ts +10 -1
- package/es/slider/src/utils.js +9 -0
- package/es/slider/styles/_common.d.ts +1 -0
- package/es/slider/styles/_common.js +1 -0
- package/es/slider/styles/light.d.ts +1 -0
- package/es/space/src/Space.js +2 -0
- package/es/steps/src/Step.js +1 -1
- package/es/table/src/Table.d.ts +35 -0
- package/es/table/src/Table.js +8 -4
- package/es/table/src/styles/index.cssr.js +1 -1
- package/es/table/styles/light.d.ts +3 -0
- package/es/table/styles/light.js +2 -2
- package/es/tabs/index.d.ts +2 -0
- package/es/tabs/index.js +1 -0
- package/es/tabs/src/Tab.d.ts +35 -18
- package/es/tabs/src/Tab.js +11 -12
- package/es/tabs/src/Tabs.js +58 -18
- package/es/tag/src/Tag.d.ts +8 -3
- package/es/tag/src/Tag.js +10 -2
- package/es/tag/src/styles/index.cssr.js +10 -5
- package/es/tag/src/styles/rtl.cssr.js +7 -1
- package/es/theme-editor/src/ThemeEditor.d.ts +3 -0
- package/es/time-picker/src/Panel.d.ts +17 -5
- package/es/time-picker/src/TimePicker.d.ts +144 -50
- package/es/time-picker/styles/light.d.ts +14 -5
- package/es/tooltip/src/Tooltip.d.ts +3 -0
- package/es/transfer/src/Transfer.d.ts +143 -50
- package/es/transfer/src/TransferFilter.d.ts +17 -5
- package/es/transfer/src/TransferList.d.ts +17 -5
- package/es/transfer/src/TransferListItem.d.ts +17 -5
- package/es/transfer/styles/light.d.ts +14 -5
- package/es/tree/src/Tree.d.ts +3 -0
- package/es/tree/src/TreeNodeCheckbox.d.ts +3 -0
- package/es/tree-select/src/TreeSelect.d.ts +3 -0
- package/es/upload/src/Upload.d.ts +143 -50
- package/es/upload/src/UploadFile.d.ts +18 -6
- package/es/upload/src/UploadProgress.d.ts +17 -5
- package/es/upload/styles/light.d.ts +14 -5
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +3 -0
- package/lib/_internal/selection/src/Selection.d.ts +3 -0
- package/lib/_internal/suffix/src/Suffix.d.ts +4 -1
- package/lib/_internal/suffix/src/Suffix.js +4 -1
- package/lib/_styles/common/dark.js +1 -1
- package/lib/_styles/common/light.d.ts +3 -0
- package/lib/_styles/common/light.js +5 -2
- package/lib/_styles/global/index.cssr.js +10 -5
- package/lib/_styles/transitions/icon-switch.cssr.js +7 -2
- package/lib/_utils/naive/extract-public-props.d.ts +1 -1
- package/lib/alert/src/Alert.d.ts +3 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +8 -1
- package/lib/auto-complete/src/AutoComplete.js +2 -2
- package/lib/avatar/src/Avatar.d.ts +8 -1
- package/lib/avatar/src/Avatar.js +40 -8
- package/lib/avatar/src/styles/index.cssr.js +2 -2
- package/lib/button/src/Button.d.ts +149 -52
- package/lib/button/src/Button.js +126 -54
- package/lib/button/src/interface.d.ts +1 -1
- package/lib/button/styles/dark.js +3 -0
- package/lib/button/styles/light.d.ts +14 -5
- package/lib/button/styles/light.js +10 -3
- package/lib/calendar/src/Calendar.d.ts +143 -50
- package/lib/calendar/styles/light.d.ts +14 -5
- package/lib/card/src/Card.d.ts +3 -0
- package/lib/cascader/src/Cascader.d.ts +3 -0
- package/lib/cascader/src/CascaderOption.d.ts +3 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +3 -0
- package/lib/checkbox/src/Checkbox.d.ts +8 -5
- package/lib/checkbox/src/Checkbox.js +3 -3
- package/lib/collapse/src/Collapse.d.ts +3 -0
- package/lib/color-picker/src/ColorInputUnit.d.ts +17 -5
- package/lib/color-picker/src/ColorPicker.d.ts +126 -45
- package/lib/color-picker/styles/light.d.ts +14 -5
- package/lib/data-table/src/DataTable.d.ts +183 -51
- package/lib/data-table/src/DataTable.js +11 -6
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +20 -5
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +20 -5
- package/lib/data-table/src/TableParts/Body.d.ts +25 -6
- package/lib/data-table/src/TableParts/Body.js +60 -22
- package/lib/data-table/src/TableParts/BodyCheckbox.js +1 -1
- package/lib/data-table/src/TableParts/Cell.d.ts +40 -10
- package/lib/data-table/src/TableParts/Header.d.ts +20 -5
- 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 +8 -9
- package/lib/data-table/styles/light.d.ts +20 -5
- package/lib/data-table/styles/light.js +3 -3
- package/lib/date-picker/src/DatePicker.d.ts +298 -105
- package/lib/date-picker/src/panel/date.d.ts +45 -15
- package/lib/date-picker/src/panel/daterange.d.ts +45 -15
- package/lib/date-picker/src/panel/datetime.d.ts +45 -15
- package/lib/date-picker/src/panel/datetimerange.d.ts +45 -15
- package/lib/date-picker/src/panel/month.d.ts +45 -15
- package/lib/date-picker/src/panel/use-calendar.d.ts +45 -15
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +45 -15
- package/lib/date-picker/src/panel/use-panel-common.d.ts +45 -15
- package/lib/date-picker/styles/light.d.ts +28 -10
- package/lib/dialog/src/Dialog.d.ts +101 -35
- package/lib/dialog/styles/light.d.ts +14 -5
- package/lib/drawer/src/Drawer.d.ts +3 -0
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +3 -0
- package/lib/drawer/src/DrawerContent.d.ts +3 -0
- package/lib/dropdown/index.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +5 -2
- package/lib/dropdown/src/DropdownGroup.d.ts +2 -3
- package/lib/dropdown/src/DropdownMenu.d.ts +3 -4
- package/lib/dropdown/src/DropdownMenu.js +5 -4
- package/lib/dropdown/src/DropdownOption.d.ts +3 -4
- package/lib/dropdown/src/DropdownOption.js +1 -1
- package/lib/dropdown/src/DropdownRenderOption.d.ts +2 -3
- package/lib/dropdown/src/interface.d.ts +9 -30
- package/lib/dropdown/src/utils.d.ts +1 -0
- package/lib/dropdown/src/utils.js +12 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +143 -50
- package/lib/dynamic-input/src/InputPreset.d.ts +17 -5
- package/lib/dynamic-input/src/PairPreset.d.ts +17 -5
- package/lib/dynamic-input/styles/light.d.ts +14 -5
- package/lib/dynamic-tags/src/DynamicTags.d.ts +144 -50
- package/lib/dynamic-tags/styles/light.d.ts +14 -5
- package/lib/ellipsis/src/Ellipsis.d.ts +3 -0
- package/lib/global-style/src/GlobalStyle.js +2 -0
- package/lib/input/src/Input.d.ts +4 -0
- package/lib/input/src/Input.js +6 -0
- package/lib/input/src/interface.d.ts +1 -0
- package/lib/input-number/src/InputNumber.d.ts +144 -50
- package/lib/input-number/styles/light.d.ts +14 -5
- package/lib/layout/src/Layout.d.ts +6 -0
- package/lib/layout/src/LayoutContent.d.ts +3 -0
- package/lib/layout/src/LayoutSider.d.ts +3 -0
- package/lib/log/src/Log.d.ts +3 -0
- package/lib/mention/src/Mention.d.ts +4 -0
- package/lib/menu/index.d.ts +1 -1
- package/lib/menu/src/Menu.d.ts +19 -6
- package/lib/menu/src/Menu.js +2 -1
- package/lib/menu/src/MenuDivider.d.ts +2 -0
- package/lib/menu/src/MenuDivider.js +13 -0
- package/lib/menu/src/MenuOption.d.ts +8 -1
- package/lib/menu/src/MenuOptionContent.d.ts +4 -1
- package/lib/menu/src/Submenu.d.ts +18 -16
- package/lib/menu/src/interface.d.ts +23 -4
- package/lib/menu/src/styles/index.cssr.js +6 -1
- package/lib/menu/src/utils.d.ts +4 -2
- package/lib/menu/src/utils.js +22 -3
- package/lib/menu/styles/light.d.ts +2 -0
- package/lib/menu/styles/light.js +3 -2
- package/lib/modal/src/BodyWrapper.d.ts +31 -10
- package/lib/modal/src/Modal.d.ts +168 -60
- package/lib/modal/styles/light.d.ts +14 -5
- package/lib/notification/src/NotificationContainer.d.ts +3 -0
- package/lib/pagination/src/Pagination.d.ts +4 -0
- package/lib/popconfirm/src/Popconfirm.d.ts +143 -50
- package/lib/popconfirm/styles/light.d.ts +14 -5
- package/lib/popselect/src/Popselect.d.ts +3 -0
- package/lib/popselect/src/PopselectPanel.d.ts +3 -0
- package/lib/radio/src/Radio.d.ts +3 -0
- package/lib/radio/src/RadioButton.d.ts +3 -0
- package/lib/radio/src/use-radio.d.ts +2 -0
- package/lib/radio/src/use-radio.js +6 -3
- package/lib/select/src/Select.d.ts +3 -0
- package/lib/slider/src/Slider.d.ts +70 -91
- package/lib/slider/src/Slider.js +324 -581
- package/lib/slider/src/interface.d.ts +1 -1
- package/lib/slider/src/styles/index.cssr.js +86 -16
- package/lib/slider/src/utils.d.ts +10 -1
- package/lib/slider/src/utils.js +11 -1
- package/lib/slider/styles/_common.d.ts +1 -0
- package/lib/slider/styles/_common.js +1 -0
- package/lib/slider/styles/light.d.ts +1 -0
- package/lib/space/src/Space.js +2 -0
- package/lib/steps/src/Step.js +1 -1
- package/lib/table/src/Table.d.ts +35 -0
- package/lib/table/src/Table.js +8 -4
- package/lib/table/src/styles/index.cssr.js +1 -1
- package/lib/table/styles/light.d.ts +3 -0
- package/lib/table/styles/light.js +2 -2
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/index.js +3 -1
- package/lib/tabs/src/Tab.d.ts +35 -18
- package/lib/tabs/src/Tab.js +10 -11
- package/lib/tabs/src/Tabs.js +57 -17
- package/lib/tag/src/Tag.d.ts +8 -3
- package/lib/tag/src/Tag.js +10 -1
- package/lib/tag/src/styles/index.cssr.js +10 -5
- package/lib/tag/src/styles/rtl.cssr.js +7 -1
- package/lib/theme-editor/src/ThemeEditor.d.ts +3 -0
- package/lib/time-picker/src/Panel.d.ts +17 -5
- package/lib/time-picker/src/TimePicker.d.ts +144 -50
- package/lib/time-picker/styles/light.d.ts +14 -5
- package/lib/tooltip/src/Tooltip.d.ts +3 -0
- package/lib/transfer/src/Transfer.d.ts +143 -50
- package/lib/transfer/src/TransferFilter.d.ts +17 -5
- package/lib/transfer/src/TransferList.d.ts +17 -5
- package/lib/transfer/src/TransferListItem.d.ts +17 -5
- package/lib/transfer/styles/light.d.ts +14 -5
- package/lib/tree/src/Tree.d.ts +3 -0
- package/lib/tree/src/TreeNodeCheckbox.d.ts +3 -0
- package/lib/tree-select/src/TreeSelect.d.ts +3 -0
- package/lib/upload/src/Upload.d.ts +143 -50
- package/lib/upload/src/UploadFile.d.ts +18 -6
- package/lib/upload/src/UploadProgress.d.ts +17 -5
- package/lib/upload/styles/light.d.ts +14 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/web-types.json +146 -9
|
@@ -97,20 +97,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
97
97
|
fontSizeMedium: string;
|
|
98
98
|
fontSizeLarge: string;
|
|
99
99
|
opacityDisabled: string;
|
|
100
|
+
colorOpacitySecondary: number;
|
|
101
|
+
colorOpacitySecondaryHover: number;
|
|
102
|
+
colorOpacitySecondaryPressed: number;
|
|
103
|
+
colorSecondary: string;
|
|
104
|
+
colorSecondaryHover: string;
|
|
105
|
+
colorSecondaryPressed: string;
|
|
106
|
+
colorTertiary: string;
|
|
107
|
+
colorTertiaryHover: string;
|
|
108
|
+
colorTertiaryPressed: string;
|
|
109
|
+
colorQuaternary: string;
|
|
110
|
+
colorQuaternaryHover: string;
|
|
111
|
+
colorQuaternaryPressed: string;
|
|
100
112
|
color: string;
|
|
101
113
|
colorHover: string;
|
|
102
114
|
colorPressed: string;
|
|
103
115
|
colorFocus: string;
|
|
104
116
|
colorDisabled: string;
|
|
105
117
|
textColor: string;
|
|
118
|
+
textColorTertiary: string;
|
|
106
119
|
textColorHover: string;
|
|
107
120
|
textColorPressed: string;
|
|
108
121
|
textColorFocus: string;
|
|
109
122
|
textColorDisabled: string;
|
|
110
123
|
textColorText: string;
|
|
111
|
-
textColorTextDepth1: string;
|
|
112
|
-
textColorTextDepth2: string;
|
|
113
|
-
textColorTextDepth3: string;
|
|
114
124
|
textColorTextHover: string;
|
|
115
125
|
textColorTextPressed: string;
|
|
116
126
|
textColorTextFocus: string;
|
|
@@ -257,9 +267,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
257
267
|
borderDisabledError: string;
|
|
258
268
|
rippleColorError: string;
|
|
259
269
|
waveOpacity: string;
|
|
260
|
-
fontWeightText: string;
|
|
261
270
|
fontWeight: string;
|
|
262
|
-
|
|
271
|
+
fontWeightStrong: string;
|
|
263
272
|
paddingTiny: string;
|
|
264
273
|
paddingSmall: string;
|
|
265
274
|
paddingMedium: string;
|
|
@@ -321,20 +330,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
321
330
|
fontSizeMedium: string;
|
|
322
331
|
fontSizeLarge: string;
|
|
323
332
|
opacityDisabled: string;
|
|
333
|
+
colorOpacitySecondary: number;
|
|
334
|
+
colorOpacitySecondaryHover: number;
|
|
335
|
+
colorOpacitySecondaryPressed: number;
|
|
336
|
+
colorSecondary: string;
|
|
337
|
+
colorSecondaryHover: string;
|
|
338
|
+
colorSecondaryPressed: string;
|
|
339
|
+
colorTertiary: string;
|
|
340
|
+
colorTertiaryHover: string;
|
|
341
|
+
colorTertiaryPressed: string;
|
|
342
|
+
colorQuaternary: string;
|
|
343
|
+
colorQuaternaryHover: string;
|
|
344
|
+
colorQuaternaryPressed: string;
|
|
324
345
|
color: string;
|
|
325
346
|
colorHover: string;
|
|
326
347
|
colorPressed: string;
|
|
327
348
|
colorFocus: string;
|
|
328
349
|
colorDisabled: string;
|
|
329
350
|
textColor: string;
|
|
351
|
+
textColorTertiary: string;
|
|
330
352
|
textColorHover: string;
|
|
331
353
|
textColorPressed: string;
|
|
332
354
|
textColorFocus: string;
|
|
333
355
|
textColorDisabled: string;
|
|
334
356
|
textColorText: string;
|
|
335
|
-
textColorTextDepth1: string;
|
|
336
|
-
textColorTextDepth2: string;
|
|
337
|
-
textColorTextDepth3: string;
|
|
338
357
|
textColorTextHover: string;
|
|
339
358
|
textColorTextPressed: string;
|
|
340
359
|
textColorTextFocus: string;
|
|
@@ -481,9 +500,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
481
500
|
borderDisabledError: string;
|
|
482
501
|
rippleColorError: string;
|
|
483
502
|
waveOpacity: string;
|
|
484
|
-
fontWeightText: string;
|
|
485
503
|
fontWeight: string;
|
|
486
|
-
|
|
504
|
+
fontWeightStrong: string;
|
|
487
505
|
paddingTiny: string;
|
|
488
506
|
paddingSmall: string;
|
|
489
507
|
paddingMedium: string;
|
|
@@ -545,20 +563,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
545
563
|
fontSizeMedium: string;
|
|
546
564
|
fontSizeLarge: string;
|
|
547
565
|
opacityDisabled: string;
|
|
566
|
+
colorOpacitySecondary: number;
|
|
567
|
+
colorOpacitySecondaryHover: number;
|
|
568
|
+
colorOpacitySecondaryPressed: number;
|
|
569
|
+
colorSecondary: string;
|
|
570
|
+
colorSecondaryHover: string;
|
|
571
|
+
colorSecondaryPressed: string;
|
|
572
|
+
colorTertiary: string;
|
|
573
|
+
colorTertiaryHover: string;
|
|
574
|
+
colorTertiaryPressed: string;
|
|
575
|
+
colorQuaternary: string;
|
|
576
|
+
colorQuaternaryHover: string;
|
|
577
|
+
colorQuaternaryPressed: string;
|
|
548
578
|
color: string;
|
|
549
579
|
colorHover: string;
|
|
550
580
|
colorPressed: string;
|
|
551
581
|
colorFocus: string;
|
|
552
582
|
colorDisabled: string;
|
|
553
583
|
textColor: string;
|
|
584
|
+
textColorTertiary: string;
|
|
554
585
|
textColorHover: string;
|
|
555
586
|
textColorPressed: string;
|
|
556
587
|
textColorFocus: string;
|
|
557
588
|
textColorDisabled: string;
|
|
558
589
|
textColorText: string;
|
|
559
|
-
textColorTextDepth1: string;
|
|
560
|
-
textColorTextDepth2: string;
|
|
561
|
-
textColorTextDepth3: string;
|
|
562
590
|
textColorTextHover: string;
|
|
563
591
|
textColorTextPressed: string;
|
|
564
592
|
textColorTextFocus: string;
|
|
@@ -705,9 +733,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
705
733
|
borderDisabledError: string;
|
|
706
734
|
rippleColorError: string;
|
|
707
735
|
waveOpacity: string;
|
|
708
|
-
fontWeightText: string;
|
|
709
736
|
fontWeight: string;
|
|
710
|
-
|
|
737
|
+
fontWeightStrong: string;
|
|
711
738
|
paddingTiny: string;
|
|
712
739
|
paddingSmall: string;
|
|
713
740
|
paddingMedium: string;
|
|
@@ -803,6 +830,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
803
830
|
pressedColor: string;
|
|
804
831
|
opacityDisabled: string;
|
|
805
832
|
inputColorDisabled: string;
|
|
833
|
+
buttonColor2: string;
|
|
834
|
+
buttonColor2Hover: string;
|
|
835
|
+
buttonColor2Pressed: string;
|
|
806
836
|
boxShadow1: string;
|
|
807
837
|
boxShadow2: string;
|
|
808
838
|
boxShadow3: string;
|
|
@@ -873,20 +903,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
873
903
|
fontSizeMedium: string;
|
|
874
904
|
fontSizeLarge: string;
|
|
875
905
|
opacityDisabled: string;
|
|
906
|
+
colorOpacitySecondary: number;
|
|
907
|
+
colorOpacitySecondaryHover: number;
|
|
908
|
+
colorOpacitySecondaryPressed: number;
|
|
909
|
+
colorSecondary: string;
|
|
910
|
+
colorSecondaryHover: string;
|
|
911
|
+
colorSecondaryPressed: string;
|
|
912
|
+
colorTertiary: string;
|
|
913
|
+
colorTertiaryHover: string;
|
|
914
|
+
colorTertiaryPressed: string;
|
|
915
|
+
colorQuaternary: string;
|
|
916
|
+
colorQuaternaryHover: string;
|
|
917
|
+
colorQuaternaryPressed: string;
|
|
876
918
|
color: string;
|
|
877
919
|
colorHover: string;
|
|
878
920
|
colorPressed: string;
|
|
879
921
|
colorFocus: string;
|
|
880
922
|
colorDisabled: string;
|
|
881
923
|
textColor: string;
|
|
924
|
+
textColorTertiary: string;
|
|
882
925
|
textColorHover: string;
|
|
883
926
|
textColorPressed: string;
|
|
884
927
|
textColorFocus: string;
|
|
885
928
|
textColorDisabled: string;
|
|
886
929
|
textColorText: string;
|
|
887
|
-
textColorTextDepth1: string;
|
|
888
|
-
textColorTextDepth2: string;
|
|
889
|
-
textColorTextDepth3: string;
|
|
890
930
|
textColorTextHover: string;
|
|
891
931
|
textColorTextPressed: string;
|
|
892
932
|
textColorTextFocus: string;
|
|
@@ -1033,9 +1073,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1033
1073
|
borderDisabledError: string;
|
|
1034
1074
|
rippleColorError: string;
|
|
1035
1075
|
waveOpacity: string;
|
|
1036
|
-
fontWeightText: string;
|
|
1037
1076
|
fontWeight: string;
|
|
1038
|
-
|
|
1077
|
+
fontWeightStrong: string;
|
|
1039
1078
|
paddingTiny: string;
|
|
1040
1079
|
paddingSmall: string;
|
|
1041
1080
|
paddingMedium: string;
|
|
@@ -1161,20 +1200,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1161
1200
|
fontSizeMedium: string;
|
|
1162
1201
|
fontSizeLarge: string;
|
|
1163
1202
|
opacityDisabled: string;
|
|
1203
|
+
colorOpacitySecondary: number;
|
|
1204
|
+
colorOpacitySecondaryHover: number;
|
|
1205
|
+
colorOpacitySecondaryPressed: number;
|
|
1206
|
+
colorSecondary: string;
|
|
1207
|
+
colorSecondaryHover: string;
|
|
1208
|
+
colorSecondaryPressed: string;
|
|
1209
|
+
colorTertiary: string;
|
|
1210
|
+
colorTertiaryHover: string;
|
|
1211
|
+
colorTertiaryPressed: string;
|
|
1212
|
+
colorQuaternary: string;
|
|
1213
|
+
colorQuaternaryHover: string;
|
|
1214
|
+
colorQuaternaryPressed: string;
|
|
1164
1215
|
color: string;
|
|
1165
1216
|
colorHover: string;
|
|
1166
1217
|
colorPressed: string;
|
|
1167
1218
|
colorFocus: string;
|
|
1168
1219
|
colorDisabled: string;
|
|
1169
1220
|
textColor: string;
|
|
1221
|
+
textColorTertiary: string;
|
|
1170
1222
|
textColorHover: string;
|
|
1171
1223
|
textColorPressed: string;
|
|
1172
1224
|
textColorFocus: string;
|
|
1173
1225
|
textColorDisabled: string;
|
|
1174
1226
|
textColorText: string;
|
|
1175
|
-
textColorTextDepth1: string;
|
|
1176
|
-
textColorTextDepth2: string;
|
|
1177
|
-
textColorTextDepth3: string;
|
|
1178
1227
|
textColorTextHover: string;
|
|
1179
1228
|
textColorTextPressed: string;
|
|
1180
1229
|
textColorTextFocus: string;
|
|
@@ -1321,9 +1370,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1321
1370
|
borderDisabledError: string;
|
|
1322
1371
|
rippleColorError: string;
|
|
1323
1372
|
waveOpacity: string;
|
|
1324
|
-
fontWeightText: string;
|
|
1325
1373
|
fontWeight: string;
|
|
1326
|
-
|
|
1374
|
+
fontWeightStrong: string;
|
|
1327
1375
|
paddingTiny: string;
|
|
1328
1376
|
paddingSmall: string;
|
|
1329
1377
|
paddingMedium: string;
|
|
@@ -1385,20 +1433,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1385
1433
|
fontSizeMedium: string;
|
|
1386
1434
|
fontSizeLarge: string;
|
|
1387
1435
|
opacityDisabled: string;
|
|
1436
|
+
colorOpacitySecondary: number;
|
|
1437
|
+
colorOpacitySecondaryHover: number;
|
|
1438
|
+
colorOpacitySecondaryPressed: number;
|
|
1439
|
+
colorSecondary: string;
|
|
1440
|
+
colorSecondaryHover: string;
|
|
1441
|
+
colorSecondaryPressed: string;
|
|
1442
|
+
colorTertiary: string;
|
|
1443
|
+
colorTertiaryHover: string;
|
|
1444
|
+
colorTertiaryPressed: string;
|
|
1445
|
+
colorQuaternary: string;
|
|
1446
|
+
colorQuaternaryHover: string;
|
|
1447
|
+
colorQuaternaryPressed: string;
|
|
1388
1448
|
color: string;
|
|
1389
1449
|
colorHover: string;
|
|
1390
1450
|
colorPressed: string;
|
|
1391
1451
|
colorFocus: string;
|
|
1392
1452
|
colorDisabled: string;
|
|
1393
1453
|
textColor: string;
|
|
1454
|
+
textColorTertiary: string;
|
|
1394
1455
|
textColorHover: string;
|
|
1395
1456
|
textColorPressed: string;
|
|
1396
1457
|
textColorFocus: string;
|
|
1397
1458
|
textColorDisabled: string;
|
|
1398
1459
|
textColorText: string;
|
|
1399
|
-
textColorTextDepth1: string;
|
|
1400
|
-
textColorTextDepth2: string;
|
|
1401
|
-
textColorTextDepth3: string;
|
|
1402
1460
|
textColorTextHover: string;
|
|
1403
1461
|
textColorTextPressed: string;
|
|
1404
1462
|
textColorTextFocus: string;
|
|
@@ -1545,9 +1603,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1545
1603
|
borderDisabledError: string;
|
|
1546
1604
|
rippleColorError: string;
|
|
1547
1605
|
waveOpacity: string;
|
|
1548
|
-
fontWeightText: string;
|
|
1549
1606
|
fontWeight: string;
|
|
1550
|
-
|
|
1607
|
+
fontWeightStrong: string;
|
|
1551
1608
|
paddingTiny: string;
|
|
1552
1609
|
paddingSmall: string;
|
|
1553
1610
|
paddingMedium: string;
|
|
@@ -1609,20 +1666,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1609
1666
|
fontSizeMedium: string;
|
|
1610
1667
|
fontSizeLarge: string;
|
|
1611
1668
|
opacityDisabled: string;
|
|
1669
|
+
colorOpacitySecondary: number;
|
|
1670
|
+
colorOpacitySecondaryHover: number;
|
|
1671
|
+
colorOpacitySecondaryPressed: number;
|
|
1672
|
+
colorSecondary: string;
|
|
1673
|
+
colorSecondaryHover: string;
|
|
1674
|
+
colorSecondaryPressed: string;
|
|
1675
|
+
colorTertiary: string;
|
|
1676
|
+
colorTertiaryHover: string;
|
|
1677
|
+
colorTertiaryPressed: string;
|
|
1678
|
+
colorQuaternary: string;
|
|
1679
|
+
colorQuaternaryHover: string;
|
|
1680
|
+
colorQuaternaryPressed: string;
|
|
1612
1681
|
color: string;
|
|
1613
1682
|
colorHover: string;
|
|
1614
1683
|
colorPressed: string;
|
|
1615
1684
|
colorFocus: string;
|
|
1616
1685
|
colorDisabled: string;
|
|
1617
1686
|
textColor: string;
|
|
1687
|
+
textColorTertiary: string;
|
|
1618
1688
|
textColorHover: string;
|
|
1619
1689
|
textColorPressed: string;
|
|
1620
1690
|
textColorFocus: string;
|
|
1621
1691
|
textColorDisabled: string;
|
|
1622
1692
|
textColorText: string;
|
|
1623
|
-
textColorTextDepth1: string;
|
|
1624
|
-
textColorTextDepth2: string;
|
|
1625
|
-
textColorTextDepth3: string;
|
|
1626
1693
|
textColorTextHover: string;
|
|
1627
1694
|
textColorTextPressed: string;
|
|
1628
1695
|
textColorTextFocus: string;
|
|
@@ -1769,9 +1836,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1769
1836
|
borderDisabledError: string;
|
|
1770
1837
|
rippleColorError: string;
|
|
1771
1838
|
waveOpacity: string;
|
|
1772
|
-
fontWeightText: string;
|
|
1773
1839
|
fontWeight: string;
|
|
1774
|
-
|
|
1840
|
+
fontWeightStrong: string;
|
|
1775
1841
|
paddingTiny: string;
|
|
1776
1842
|
paddingSmall: string;
|
|
1777
1843
|
paddingMedium: string;
|
|
@@ -70,20 +70,30 @@ declare const dialogLight: import("../../_mixins").Theme<"Dialog", {
|
|
|
70
70
|
fontSizeMedium: string;
|
|
71
71
|
fontSizeLarge: string;
|
|
72
72
|
opacityDisabled: string;
|
|
73
|
+
colorOpacitySecondary: number;
|
|
74
|
+
colorOpacitySecondaryHover: number;
|
|
75
|
+
colorOpacitySecondaryPressed: number;
|
|
76
|
+
colorSecondary: string;
|
|
77
|
+
colorSecondaryHover: string;
|
|
78
|
+
colorSecondaryPressed: string;
|
|
79
|
+
colorTertiary: string;
|
|
80
|
+
colorTertiaryHover: string;
|
|
81
|
+
colorTertiaryPressed: string;
|
|
82
|
+
colorQuaternary: string;
|
|
83
|
+
colorQuaternaryHover: string;
|
|
84
|
+
colorQuaternaryPressed: string;
|
|
73
85
|
color: string;
|
|
74
86
|
colorHover: string;
|
|
75
87
|
colorPressed: string;
|
|
76
88
|
colorFocus: string;
|
|
77
89
|
colorDisabled: string;
|
|
78
90
|
textColor: string;
|
|
91
|
+
textColorTertiary: string;
|
|
79
92
|
textColorHover: string;
|
|
80
93
|
textColorPressed: string;
|
|
81
94
|
textColorFocus: string;
|
|
82
95
|
textColorDisabled: string;
|
|
83
96
|
textColorText: string;
|
|
84
|
-
textColorTextDepth1: string;
|
|
85
|
-
textColorTextDepth2: string;
|
|
86
|
-
textColorTextDepth3: string;
|
|
87
97
|
textColorTextHover: string;
|
|
88
98
|
textColorTextPressed: string;
|
|
89
99
|
textColorTextFocus: string;
|
|
@@ -230,9 +240,8 @@ declare const dialogLight: import("../../_mixins").Theme<"Dialog", {
|
|
|
230
240
|
borderDisabledError: string;
|
|
231
241
|
rippleColorError: string;
|
|
232
242
|
waveOpacity: string;
|
|
233
|
-
fontWeightText: string;
|
|
234
243
|
fontWeight: string;
|
|
235
|
-
|
|
244
|
+
fontWeightStrong: string;
|
|
236
245
|
paddingTiny: string;
|
|
237
246
|
paddingSmall: string;
|
|
238
247
|
paddingMedium: string;
|
|
@@ -336,6 +336,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
336
336
|
pressedColor: string;
|
|
337
337
|
opacityDisabled: string;
|
|
338
338
|
inputColorDisabled: string;
|
|
339
|
+
buttonColor2: string;
|
|
340
|
+
buttonColor2Hover: string;
|
|
341
|
+
buttonColor2Pressed: string;
|
|
339
342
|
boxShadow1: string;
|
|
340
343
|
boxShadow2: string;
|
|
341
344
|
boxShadow3: string;
|
|
@@ -97,6 +97,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
97
97
|
pressedColor: string;
|
|
98
98
|
opacityDisabled: string;
|
|
99
99
|
inputColorDisabled: string;
|
|
100
|
+
buttonColor2: string;
|
|
101
|
+
buttonColor2Hover: string;
|
|
102
|
+
buttonColor2Pressed: string;
|
|
100
103
|
boxShadow1: string;
|
|
101
104
|
boxShadow2: string;
|
|
102
105
|
boxShadow3: string;
|
|
@@ -106,6 +106,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
106
106
|
pressedColor: string;
|
|
107
107
|
opacityDisabled: string;
|
|
108
108
|
inputColorDisabled: string;
|
|
109
|
+
buttonColor2: string;
|
|
110
|
+
buttonColor2Hover: string;
|
|
111
|
+
buttonColor2Pressed: string;
|
|
109
112
|
boxShadow1: string;
|
|
110
113
|
boxShadow2: string;
|
|
111
114
|
boxShadow3: string;
|
package/es/dropdown/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as NDropdown } from './src/Dropdown';
|
|
2
2
|
export type { DropdownProps } from './src/Dropdown';
|
|
3
|
-
export type { DropdownOption, DropdownGroupOption,
|
|
3
|
+
export type { DropdownOption, DropdownGroupOption, DropdownDividerOption, DropdownRenderOption } from './src/interface';
|
|
@@ -2,7 +2,7 @@ import { PropType, CSSProperties, InjectionKey, Ref } from 'vue';
|
|
|
2
2
|
import { Key, TreeNode } from 'treemate';
|
|
3
3
|
import { FollowerPlacement } from 'vueuc';
|
|
4
4
|
import { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
5
|
-
import {
|
|
5
|
+
import { DropdownMixedOption, OnUpdateValue, OnUpdateValueImpl, RenderLabel, RenderIcon, RenderLabelImpl, RenderIconImpl } from './interface';
|
|
6
6
|
export interface DropdownInjection {
|
|
7
7
|
renderLabelRef: Ref<RenderLabelImpl | undefined>;
|
|
8
8
|
renderIconRef: Ref<RenderIconImpl | undefined>;
|
|
@@ -716,6 +716,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
716
716
|
pressedColor: string;
|
|
717
717
|
opacityDisabled: string;
|
|
718
718
|
inputColorDisabled: string;
|
|
719
|
+
buttonColor2: string;
|
|
720
|
+
buttonColor2Hover: string;
|
|
721
|
+
buttonColor2Pressed: string;
|
|
719
722
|
boxShadow1: string;
|
|
720
723
|
boxShadow2: string;
|
|
721
724
|
boxShadow3: string;
|
|
@@ -822,7 +825,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
822
825
|
} | undefined;
|
|
823
826
|
};
|
|
824
827
|
}>;
|
|
825
|
-
tmNodes: import("vue").ComputedRef<TreeNode<
|
|
828
|
+
tmNodes: import("vue").ComputedRef<TreeNode<import("../..").MenuOption | import("../../menu/src/interface").MenuRenderOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>[]>;
|
|
826
829
|
mergedShow: import("vue").ComputedRef<boolean>;
|
|
827
830
|
doUpdateShow: (value: boolean) => void;
|
|
828
831
|
cssVars: import("vue").ComputedRef<any>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { TreeNode } from 'treemate';
|
|
3
|
-
import { DropdownGroupOption, DropdownIgnoredOption, DropdownOption } from './interface';
|
|
4
3
|
declare const _default: import("vue").DefineComponent<{
|
|
5
4
|
clsPrefix: {
|
|
6
5
|
type: StringConstructor;
|
|
7
6
|
required: true;
|
|
8
7
|
};
|
|
9
8
|
tmNode: {
|
|
10
|
-
type: PropType<TreeNode<
|
|
9
|
+
type: PropType<TreeNode<import("../..").MenuOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>>;
|
|
11
10
|
required: true;
|
|
12
11
|
};
|
|
13
12
|
parentKey: {
|
|
@@ -20,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
19
|
parentKey?: unknown;
|
|
21
20
|
} & {
|
|
22
21
|
clsPrefix: string;
|
|
23
|
-
tmNode: TreeNode<
|
|
22
|
+
tmNode: TreeNode<import("../..").MenuOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>;
|
|
24
23
|
parentKey: string | number | null;
|
|
25
24
|
} & {}>, {
|
|
26
25
|
parentKey: string | number | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InjectionKey, PropType, Ref, CSSProperties } from 'vue';
|
|
2
2
|
import { TreeNode } from 'treemate';
|
|
3
|
-
import { DropdownGroupOption, DropdownIgnoredOption, DropdownOption } from './interface';
|
|
4
3
|
export interface NDropdownMenuInjection {
|
|
5
4
|
showIconRef: Ref<boolean>;
|
|
6
5
|
hasSubmenuRef: Ref<boolean>;
|
|
@@ -14,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
13
|
required: true;
|
|
15
14
|
};
|
|
16
15
|
tmNodes: {
|
|
17
|
-
type: PropType<TreeNode<
|
|
16
|
+
type: PropType<TreeNode<import("../..").MenuOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>[]>;
|
|
18
17
|
default: () => never[];
|
|
19
18
|
};
|
|
20
19
|
parentKey: {
|
|
@@ -31,12 +30,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
30
|
clsPrefix: string;
|
|
32
31
|
showArrow: boolean;
|
|
33
32
|
parentKey: string | number;
|
|
34
|
-
tmNodes: TreeNode<
|
|
33
|
+
tmNodes: TreeNode<import("../..").MenuOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>[];
|
|
35
34
|
} & {
|
|
36
35
|
arrowStyle?: string | CSSProperties | undefined;
|
|
37
36
|
}>, {
|
|
38
37
|
showArrow: boolean;
|
|
39
38
|
parentKey: string | number;
|
|
40
|
-
tmNodes: TreeNode<
|
|
39
|
+
tmNodes: TreeNode<import("../..").MenuOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>[];
|
|
41
40
|
}>;
|
|
42
41
|
export default _default;
|
|
@@ -57,16 +57,17 @@ export default defineComponent({
|
|
|
57
57
|
const { parentKey, clsPrefix } = this;
|
|
58
58
|
return (h("div", { class: `${clsPrefix}-dropdown-menu` },
|
|
59
59
|
this.tmNodes.map((tmNode) => {
|
|
60
|
-
|
|
60
|
+
const { rawNode } = tmNode;
|
|
61
|
+
if (isRenderNode(rawNode)) {
|
|
61
62
|
return (h(NDropdownRenderOption, { tmNode: tmNode, key: tmNode.key }));
|
|
62
63
|
}
|
|
63
|
-
if (isDividerNode(
|
|
64
|
+
if (isDividerNode(rawNode)) {
|
|
64
65
|
return h(NDropdownDivider, { clsPrefix: clsPrefix, key: tmNode.key });
|
|
65
66
|
}
|
|
66
|
-
if (isGroupNode(
|
|
67
|
+
if (isGroupNode(rawNode)) {
|
|
67
68
|
return (h(NDropdownGroup, { clsPrefix: clsPrefix, tmNode: tmNode, parentKey: parentKey, key: tmNode.key }));
|
|
68
69
|
}
|
|
69
|
-
return (h(NDropdownOption, { clsPrefix: clsPrefix, tmNode: tmNode, parentKey: parentKey, key: tmNode.key, props:
|
|
70
|
+
return (h(NDropdownOption, { clsPrefix: clsPrefix, tmNode: tmNode, parentKey: parentKey, key: tmNode.key, props: rawNode.props }));
|
|
70
71
|
}),
|
|
71
72
|
this.showArrow
|
|
72
73
|
? renderArrow({
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { PropType, Ref, HTMLAttributes } from 'vue';
|
|
2
2
|
import { FollowerPlacement } from 'vueuc';
|
|
3
3
|
import { TreeNode } from 'treemate';
|
|
4
|
-
import { DropdownGroupOption, DropdownIgnoredOption, DropdownOption } from './interface';
|
|
5
4
|
declare const _default: import("vue").DefineComponent<{
|
|
6
5
|
clsPrefix: {
|
|
7
6
|
type: StringConstructor;
|
|
8
7
|
required: true;
|
|
9
8
|
};
|
|
10
9
|
tmNode: {
|
|
11
|
-
type: PropType<TreeNode<
|
|
10
|
+
type: PropType<TreeNode<import("../..").MenuOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>>;
|
|
12
11
|
required: true;
|
|
13
12
|
};
|
|
14
13
|
parentKey: {
|
|
@@ -28,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
27
|
siblingHasSubmenu: Ref<boolean>;
|
|
29
28
|
animated: Ref<boolean>;
|
|
30
29
|
mergedShowSubmenu: import("vue").ComputedRef<boolean>;
|
|
31
|
-
rawNode: import("vue").ComputedRef<
|
|
30
|
+
rawNode: import("vue").ComputedRef<import("../..").MenuOption | import("../..").MenuGroupOption | import("../../menu/src/interface").MenuIgnoredOption>;
|
|
32
31
|
hasSubmenu: import("vue").ComputedRef<boolean>;
|
|
33
32
|
pending: import("vue").ComputedRef<boolean>;
|
|
34
33
|
childActive: import("vue").ComputedRef<boolean>;
|
|
@@ -49,7 +48,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
48
|
} & {
|
|
50
49
|
clsPrefix: string;
|
|
51
50
|
placement: FollowerPlacement;
|
|
52
|
-
tmNode: TreeNode<
|
|
51
|
+
tmNode: TreeNode<import("../..").MenuOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>;
|
|
53
52
|
parentKey: string | number | null;
|
|
54
53
|
} & {
|
|
55
54
|
props?: HTMLAttributes | undefined;
|
|
@@ -6,7 +6,7 @@ import { render, useDeferredTrue } from '../../_utils';
|
|
|
6
6
|
import { NIcon } from '../../icon';
|
|
7
7
|
import NDropdownMenu, { dropdownMenuInjectionKey } from './DropdownMenu';
|
|
8
8
|
import { dropdownInjectionKey } from './Dropdown';
|
|
9
|
-
import { isSubmenuNode } from './utils';
|
|
9
|
+
import { isDropdownOptionRelatedTarget, isSubmenuNode } from './utils';
|
|
10
10
|
const dropdownOptionInjectionKey = Symbol('dropdown-option');
|
|
11
11
|
export default defineComponent({
|
|
12
12
|
name: 'DropdownOption',
|
|
@@ -104,7 +104,7 @@ export default defineComponent({
|
|
|
104
104
|
return;
|
|
105
105
|
const { relatedTarget } = e;
|
|
106
106
|
if (relatedTarget &&
|
|
107
|
-
!relatedTarget
|
|
107
|
+
!isDropdownOptionRelatedTarget(relatedTarget)) {
|
|
108
108
|
hoverKeyRef.value = null;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { TreeNode } from 'treemate';
|
|
3
|
-
import { DropdownRenderOption } from './interface';
|
|
4
3
|
declare const _default: import("vue").DefineComponent<{
|
|
5
4
|
tmNode: {
|
|
6
|
-
type: PropType<TreeNode<
|
|
5
|
+
type: PropType<TreeNode<import("../../menu/src/interface").MenuRenderOption, import("../../menu/src/interface").MenuRenderOption, import("../../menu/src/interface").MenuRenderOption>>;
|
|
7
6
|
required: true;
|
|
8
7
|
};
|
|
9
8
|
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
10
9
|
tmNode?: unknown;
|
|
11
10
|
} & {
|
|
12
|
-
tmNode: TreeNode<
|
|
11
|
+
tmNode: TreeNode<import("../../menu/src/interface").MenuRenderOption, import("../../menu/src/interface").MenuRenderOption, import("../../menu/src/interface").MenuRenderOption>;
|
|
13
12
|
} & {}>, {}>;
|
|
14
13
|
export default _default;
|
|
@@ -1,35 +1,14 @@
|
|
|
1
1
|
import { TreeNode } from 'treemate';
|
|
2
|
-
import { VNodeChild
|
|
3
|
-
import { MenuOption, MenuGroupOption } from '../../menu/src/interface';
|
|
2
|
+
import { VNodeChild } from 'vue';
|
|
3
|
+
import { MenuOption, MenuGroupOption, MenuDividerOption, MenuIgnoredOption, MenuRenderOption } from '../../menu/src/interface';
|
|
4
4
|
export declare type Key = string | number;
|
|
5
|
-
export declare type
|
|
6
|
-
export declare type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export interface DropdownIgnoredOption {
|
|
13
|
-
key?: Key;
|
|
14
|
-
type: 'render' | 'divider';
|
|
15
|
-
props?: HTMLAttributes;
|
|
16
|
-
render?: () => VNodeChild;
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
}
|
|
19
|
-
export declare type DropdownMixedOption = DropdownOption | DropdownGroupOption | DropdownIgnoredOption;
|
|
20
|
-
export declare type DropdownIntersectionOption = DropdownOption & DropdownGroupOption & DropdownIgnoredOption;
|
|
21
|
-
export interface DropdownRenderOption {
|
|
22
|
-
key?: Key;
|
|
23
|
-
type: 'render';
|
|
24
|
-
props?: HTMLAttributes;
|
|
25
|
-
render?: () => VNodeChild;
|
|
26
|
-
[key: string]: unknown;
|
|
27
|
-
}
|
|
28
|
-
export interface DropdownDividerOption {
|
|
29
|
-
key?: Key;
|
|
30
|
-
type: 'divider';
|
|
31
|
-
[key: string]: unknown;
|
|
32
|
-
}
|
|
5
|
+
export declare type DropdownOption = MenuOption;
|
|
6
|
+
export declare type DropdownGroupOption = MenuGroupOption;
|
|
7
|
+
export declare type DropdownDividerOption = MenuDividerOption;
|
|
8
|
+
export declare type DropdownRenderOption = MenuRenderOption;
|
|
9
|
+
export declare type DropdownMixedOption = DropdownOption | DropdownGroupOption | DropdownDividerOption | DropdownRenderOption;
|
|
10
|
+
export declare type DropdownIgnoredOption = MenuIgnoredOption;
|
|
11
|
+
export declare type DropdownIntersectionOption = DropdownOption & DropdownGroupOption;
|
|
33
12
|
export declare type TmNode = TreeNode<DropdownOption, DropdownGroupOption, DropdownIgnoredOption>;
|
|
34
13
|
export declare type OnUpdateValue = <T extends string & number & (string | number)>(value: T, option: DropdownOption) => void;
|
|
35
14
|
export declare type OnUpdateKeys = <T extends string[] & number[] & Array<string | number>>(keys: T) => void;
|
|
@@ -3,3 +3,4 @@ export declare function isSubmenuNode(rawNode: DropdownMixedOption, childrenFiel
|
|
|
3
3
|
export declare function isGroupNode(rawNode: DropdownMixedOption): boolean;
|
|
4
4
|
export declare function isDividerNode(rawNode: DropdownMixedOption): boolean;
|
|
5
5
|
export declare function isRenderNode(rawNode: DropdownMixedOption): rawNode is DropdownRenderOption;
|
|
6
|
+
export declare function isDropdownOptionRelatedTarget(element: HTMLElement): boolean;
|
package/es/dropdown/src/utils.js
CHANGED
|
@@ -11,3 +11,13 @@ export function isDividerNode(rawNode) {
|
|
|
11
11
|
export function isRenderNode(rawNode) {
|
|
12
12
|
return rawNode.type === 'render';
|
|
13
13
|
}
|
|
14
|
+
export function isDropdownOptionRelatedTarget(element) {
|
|
15
|
+
let currentElement = element;
|
|
16
|
+
while (currentElement !== null) {
|
|
17
|
+
if (currentElement.hasAttribute('__dropdown-option')) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
currentElement = currentElement.parentElement;
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
}
|