naive-ui 2.25.1 → 2.25.2
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 +6 -1
- package/es/_internal/select-menu/src/SelectMenu.js +17 -8
- package/es/_internal/selection/src/Selection.d.ts +31 -26
- package/es/_internal/selection/src/Selection.js +78 -80
- package/es/_internal/selection/styles/dark.js +3 -3
- package/es/_internal/selection/styles/light.d.ts +6 -6
- package/es/_internal/selection/styles/light.js +3 -3
- package/es/_mixins/index.d.ts +1 -1
- package/es/_mixins/index.js +1 -1
- package/es/_mixins/use-css-vars-class.d.ts +9 -2
- package/es/_mixins/use-css-vars-class.js +29 -13
- package/es/_mixins/use-form-item.d.ts +1 -1
- package/es/_utils/css/color-to-class.d.ts +1 -0
- package/es/_utils/css/color-to-class.js +3 -0
- package/es/_utils/css/format-length.d.ts +2 -2
- package/es/_utils/css/format-length.js +1 -2
- package/es/_utils/css/index.d.ts +2 -1
- package/es/_utils/css/index.js +2 -1
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/vue/resolve-slot.js +0 -1
- package/es/alert/src/Alert.d.ts +4 -4
- package/es/auto-complete/src/AutoComplete.d.ts +1 -1
- package/es/badge/src/Badge.d.ts +4 -4
- package/es/button/src/Button.d.ts +3 -2
- package/es/button/src/Button.js +13 -24
- package/es/button/styles/index.d.ts +1 -1
- package/es/button/styles/index.js +1 -1
- package/es/button/styles/rtl.d.ts +2 -5
- package/es/button/styles/rtl.js +1 -1
- package/es/card/src/Card.d.ts +3 -1
- package/es/card/src/Card.js +41 -38
- package/es/card/styles/index.d.ts +1 -1
- package/es/card/styles/index.js +1 -1
- package/es/card/styles/rtl.d.ts +2 -5
- package/es/card/styles/rtl.js +1 -1
- package/es/cascader/src/Cascader.d.ts +30 -30
- package/es/cascader/src/CascaderMenu.d.ts +3 -3
- package/es/cascader/src/CascaderOption.d.ts +3 -3
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/es/cascader/src/CascaderSubmenu.d.ts +3 -3
- package/es/cascader/styles/light.d.ts +3 -3
- package/es/checkbox/src/styles/index.cssr.js +12 -12
- package/es/data-table/src/DataTable.d.ts +34 -34
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/es/data-table/src/TableParts/Body.d.ts +6 -6
- package/es/data-table/src/TableParts/Cell.d.ts +12 -12
- package/es/data-table/src/TableParts/Header.d.ts +6 -6
- package/es/data-table/styles/light.d.ts +3 -3
- package/es/descriptions/src/Descriptions.d.ts +1 -1
- package/es/dialog/src/Dialog.d.ts +4 -4
- package/es/dialog/src/DialogEnvironment.d.ts +5 -5
- package/es/dialog/src/DialogProvider.d.ts +2 -2
- package/es/dialog/src/dialogProps.d.ts +2 -2
- package/es/dynamic-tags/src/DynamicTags.d.ts +4 -4
- package/es/form/src/FormItem.d.ts +4 -4
- package/es/form/src/FormItemCol.d.ts +3 -3
- package/es/form/src/FormItemGridItem.d.ts +5 -5
- package/es/form/src/FormItemRow.d.ts +3 -3
- package/es/form/src/utils.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +5 -5
- package/es/icon-wrapper/src/IconWrapper.js +7 -5
- package/es/image/src/Image.d.ts +1 -1
- package/es/input/src/Input.d.ts +1 -1
- package/es/input-number/src/InputNumber.d.ts +1 -1
- package/es/locales/common/eo.d.ts +109 -0
- package/es/locales/common/eo.js +109 -0
- package/es/locales/common/plPL.d.ts +3 -0
- package/es/locales/common/plPL.js +109 -0
- package/es/locales/date/eo.d.ts +3 -0
- package/es/locales/date/eo.js +6 -0
- package/es/locales/date/plPL.d.ts +3 -0
- package/es/locales/date/plPL.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -0
- package/es/mention/src/Mention.d.ts +1 -1
- package/es/menu/src/Menu.d.ts +1 -1
- package/es/modal/src/BodyWrapper.d.ts +6 -6
- package/es/modal/src/Modal.d.ts +8 -8
- package/es/modal/src/presetProps.d.ts +2 -2
- package/es/notification/src/Notification.d.ts +4 -4
- package/es/notification/src/NotificationEnvironment.d.ts +4 -4
- package/es/notification/src/NotificationProvider.d.ts +1 -1
- package/es/pagination/src/Pagination.d.ts +33 -33
- package/es/pagination/styles/light.d.ts +3 -3
- package/es/progress/src/Circle.d.ts +19 -3
- package/es/progress/src/Circle.js +41 -22
- package/es/progress/src/Progress.d.ts +14 -5
- package/es/progress/src/Progress.js +43 -29
- package/es/progress/src/styles/index.cssr.js +1 -1
- package/es/result/src/Result.d.ts +4 -4
- package/es/select/src/Select.d.ts +45 -31
- package/es/select/src/Select.js +13 -8
- package/es/select/styles/light.d.ts +3 -3
- package/es/tag/src/Tag.d.ts +7 -5
- package/es/tag/src/Tag.js +60 -40
- package/es/tag/src/common-props.d.ts +1 -1
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/tag/styles/index.d.ts +1 -1
- package/es/tag/styles/index.js +1 -1
- package/es/tag/styles/rtl.d.ts +2 -5
- package/es/tag/styles/rtl.js +1 -1
- package/es/timeline/src/TimelineItem.d.ts +4 -4
- package/es/tree/src/utils.js +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +30 -30
- package/es/tree-select/styles/light.d.ts +3 -3
- package/es/typography/src/create-header.d.ts +4 -4
- package/es/typography/src/headers.d.ts +18 -18
- package/es/upload/src/UploadFile.d.ts +1 -1
- package/es/upload/src/UploadProgress.d.ts +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +6 -1
- package/lib/_internal/select-menu/src/SelectMenu.js +16 -7
- package/lib/_internal/selection/src/Selection.d.ts +31 -26
- package/lib/_internal/selection/src/Selection.js +77 -79
- package/lib/_internal/selection/styles/dark.js +3 -3
- package/lib/_internal/selection/styles/light.d.ts +6 -6
- package/lib/_internal/selection/styles/light.js +3 -3
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +3 -2
- package/lib/_mixins/use-css-vars-class.d.ts +9 -2
- package/lib/_mixins/use-css-vars-class.js +31 -15
- package/lib/_mixins/use-form-item.d.ts +1 -1
- package/lib/_utils/css/color-to-class.d.ts +1 -0
- package/lib/_utils/css/color-to-class.js +7 -0
- package/lib/_utils/css/format-length.d.ts +2 -2
- package/lib/_utils/css/format-length.js +2 -1
- package/lib/_utils/css/index.d.ts +2 -1
- package/lib/_utils/css/index.js +4 -5
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/_utils/vue/resolve-slot.js +0 -1
- package/lib/alert/src/Alert.d.ts +4 -4
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
- package/lib/badge/src/Badge.d.ts +4 -4
- package/lib/button/src/Button.d.ts +3 -2
- package/lib/button/src/Button.js +11 -22
- package/lib/button/styles/index.d.ts +1 -1
- package/lib/button/styles/index.js +1 -1
- package/lib/button/styles/rtl.d.ts +2 -5
- package/lib/button/styles/rtl.js +2 -1
- package/lib/card/src/Card.d.ts +3 -1
- package/lib/card/src/Card.js +40 -37
- package/lib/card/styles/index.d.ts +1 -1
- package/lib/card/styles/index.js +1 -1
- package/lib/card/styles/rtl.d.ts +2 -5
- package/lib/card/styles/rtl.js +2 -1
- package/lib/cascader/src/Cascader.d.ts +30 -30
- package/lib/cascader/src/CascaderMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderOption.d.ts +3 -3
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderSubmenu.d.ts +3 -3
- package/lib/cascader/styles/light.d.ts +3 -3
- package/lib/checkbox/src/styles/index.cssr.js +12 -12
- package/lib/data-table/src/DataTable.d.ts +34 -34
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/lib/data-table/src/TableParts/Body.d.ts +6 -6
- package/lib/data-table/src/TableParts/Cell.d.ts +12 -12
- package/lib/data-table/src/TableParts/Header.d.ts +6 -6
- package/lib/data-table/styles/light.d.ts +3 -3
- package/lib/descriptions/src/Descriptions.d.ts +1 -1
- package/lib/dialog/src/Dialog.d.ts +4 -4
- package/lib/dialog/src/DialogEnvironment.d.ts +5 -5
- package/lib/dialog/src/DialogProvider.d.ts +2 -2
- package/lib/dialog/src/dialogProps.d.ts +2 -2
- package/lib/dynamic-tags/src/DynamicTags.d.ts +4 -4
- package/lib/form/src/FormItem.d.ts +4 -4
- package/lib/form/src/FormItemCol.d.ts +3 -3
- package/lib/form/src/FormItemGridItem.d.ts +5 -5
- package/lib/form/src/FormItemRow.d.ts +3 -3
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +5 -5
- package/lib/icon-wrapper/src/IconWrapper.js +6 -4
- package/lib/image/src/Image.d.ts +1 -1
- package/lib/input/src/Input.d.ts +1 -1
- package/lib/input-number/src/InputNumber.d.ts +1 -1
- package/lib/locales/common/eo.d.ts +109 -0
- package/lib/locales/common/eo.js +111 -0
- package/lib/locales/common/plPL.d.ts +3 -0
- package/lib/locales/common/plPL.js +111 -0
- package/lib/locales/date/eo.d.ts +3 -0
- package/lib/locales/date/eo.js +11 -0
- package/lib/locales/date/plPL.d.ts +3 -0
- package/lib/locales/date/plPL.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -1
- package/lib/mention/src/Mention.d.ts +1 -1
- package/lib/menu/src/Menu.d.ts +1 -1
- package/lib/modal/src/BodyWrapper.d.ts +6 -6
- package/lib/modal/src/Modal.d.ts +8 -8
- package/lib/modal/src/presetProps.d.ts +2 -2
- package/lib/notification/src/Notification.d.ts +4 -4
- package/lib/notification/src/NotificationEnvironment.d.ts +4 -4
- package/lib/notification/src/NotificationProvider.d.ts +1 -1
- package/lib/pagination/src/Pagination.d.ts +33 -33
- package/lib/pagination/styles/light.d.ts +3 -3
- package/lib/progress/src/Circle.d.ts +19 -3
- package/lib/progress/src/Circle.js +40 -21
- package/lib/progress/src/Progress.d.ts +14 -5
- package/lib/progress/src/Progress.js +42 -28
- package/lib/progress/src/styles/index.cssr.js +1 -1
- package/lib/result/src/Result.d.ts +4 -4
- package/lib/select/src/Select.d.ts +45 -31
- package/lib/select/src/Select.js +13 -8
- package/lib/select/styles/light.d.ts +3 -3
- package/lib/tag/src/Tag.d.ts +7 -5
- package/lib/tag/src/Tag.js +58 -38
- package/lib/tag/src/common-props.d.ts +1 -1
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/tag/styles/index.d.ts +1 -1
- package/lib/tag/styles/index.js +1 -1
- package/lib/tag/styles/rtl.d.ts +2 -5
- package/lib/tag/styles/rtl.js +2 -1
- package/lib/timeline/src/TimelineItem.d.ts +4 -4
- package/lib/tree/src/utils.js +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +30 -30
- package/lib/tree-select/styles/light.d.ts +3 -3
- package/lib/typography/src/create-header.d.ts +4 -4
- package/lib/typography/src/headers.d.ts +18 -18
- package/lib/upload/src/UploadFile.d.ts +1 -1
- package/lib/upload/src/UploadProgress.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/web-types.json +28 -1
|
@@ -51,6 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
51
|
type: BooleanConstructor;
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
|
+
disableInlineTheme: BooleanConstructor;
|
|
54
55
|
onToggle: PropType<(tmNode: TreeNode<SelectOption>) => void>;
|
|
55
56
|
theme: PropType<import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
56
57
|
optionFontSizeSmall: string;
|
|
@@ -209,6 +210,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
209
210
|
}, any>;
|
|
210
211
|
}>>>;
|
|
211
212
|
}, {
|
|
213
|
+
themeClass?: import("vue").Ref<string> | undefined;
|
|
214
|
+
onRender?: (() => void) | undefined;
|
|
212
215
|
selfRef: import("vue").Ref<HTMLElement | null>;
|
|
213
216
|
getPendingTmNode: () => TreeNode<import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>> | null;
|
|
214
217
|
prev: () => void;
|
|
@@ -422,7 +425,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
422
425
|
'--n-loading-size': string;
|
|
423
426
|
} | {
|
|
424
427
|
width: string | undefined;
|
|
425
|
-
})[]>;
|
|
428
|
+
} | undefined)[]>;
|
|
426
429
|
itemSize: import("vue").ComputedRef<number>;
|
|
427
430
|
padding: import("vue").ComputedRef<import("seemly").Margin>;
|
|
428
431
|
flattenedNodes: import("vue").ComputedRef<TreeNode<import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, SelectGroupOption, SelectIgnoredOption>[]>;
|
|
@@ -486,6 +489,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
486
489
|
type: BooleanConstructor;
|
|
487
490
|
default: boolean;
|
|
488
491
|
};
|
|
492
|
+
disableInlineTheme: BooleanConstructor;
|
|
489
493
|
onToggle: PropType<(tmNode: TreeNode<SelectOption>) => void>;
|
|
490
494
|
theme: PropType<import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
491
495
|
optionFontSizeSmall: string;
|
|
@@ -650,6 +654,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
650
654
|
multiple: boolean;
|
|
651
655
|
focusable: boolean;
|
|
652
656
|
loading: boolean;
|
|
657
|
+
disableInlineTheme: boolean;
|
|
653
658
|
scrollable: boolean;
|
|
654
659
|
autoPending: boolean;
|
|
655
660
|
virtualScroll: boolean;
|
|
@@ -6,7 +6,7 @@ import { NEmpty } from '../../../empty';
|
|
|
6
6
|
import { NScrollbar } from '../../scrollbar';
|
|
7
7
|
import { formatLength, resolveSlot, resolveWrappedSlot } from '../../../_utils';
|
|
8
8
|
import { createKey } from '../../../_utils/cssr';
|
|
9
|
-
import { useTheme } from '../../../_mixins';
|
|
9
|
+
import { useThemeClass, useTheme, emptyThemeClassHandle } from '../../../_mixins';
|
|
10
10
|
import NInternalLoading from '../../loading';
|
|
11
11
|
import NFocusDetector from '../../focus-detector';
|
|
12
12
|
import { internalSelectMenuLight } from '../styles';
|
|
@@ -42,7 +42,7 @@ export default defineComponent({
|
|
|
42
42
|
}, loading: Boolean, focusable: Boolean, renderLabel: Function, renderOption: Function, onMousedown: Function, onScroll: Function, onFocus: Function, onBlur: Function, onKeyup: Function, onKeydown: Function, onTabOut: Function, onMouseenter: Function, onMouseleave: Function, resetMenuOnOptionsChange: {
|
|
43
43
|
type: Boolean,
|
|
44
44
|
default: true
|
|
45
|
-
},
|
|
45
|
+
}, disableInlineTheme: Boolean,
|
|
46
46
|
// deprecated
|
|
47
47
|
onToggle: Function }),
|
|
48
48
|
setup(props) {
|
|
@@ -111,9 +111,6 @@ export default defineComponent({
|
|
|
111
111
|
const tmNodes = flattenedNodesRef.value;
|
|
112
112
|
return tmNodes && tmNodes.length === 0;
|
|
113
113
|
});
|
|
114
|
-
const styleRef = computed(() => {
|
|
115
|
-
return [{ width: formatLength(props.width) }, cssVarsRef.value];
|
|
116
|
-
});
|
|
117
114
|
function doToggle(tmNode) {
|
|
118
115
|
const { onToggle } = props;
|
|
119
116
|
if (onToggle)
|
|
@@ -260,13 +257,23 @@ export default defineComponent({
|
|
|
260
257
|
'--n-loading-size': loadingSize
|
|
261
258
|
};
|
|
262
259
|
});
|
|
260
|
+
const { disableInlineTheme } = props;
|
|
261
|
+
const themeClassHandle = disableInlineTheme
|
|
262
|
+
? useThemeClass('internal-select-menu', computed(() => props.size[0]), cssVarsRef, props)
|
|
263
|
+
: emptyThemeClassHandle;
|
|
264
|
+
const styleRef = computed(() => {
|
|
265
|
+
return [
|
|
266
|
+
{ width: formatLength(props.width) },
|
|
267
|
+
disableInlineTheme ? undefined : cssVarsRef.value
|
|
268
|
+
];
|
|
269
|
+
});
|
|
263
270
|
const exposedProps = {
|
|
264
271
|
selfRef,
|
|
265
272
|
next,
|
|
266
273
|
prev,
|
|
267
274
|
getPendingTmNode
|
|
268
275
|
};
|
|
269
|
-
return Object.assign({ mergedTheme: themeRef, virtualListRef,
|
|
276
|
+
return Object.assign(Object.assign({ mergedTheme: themeRef, virtualListRef,
|
|
270
277
|
scrollbarRef, style: styleRef, itemSize: itemSizeRef, padding: paddingRef, flattenedNodes: flattenedNodesRef, empty: emptyRef, virtualListContainer() {
|
|
271
278
|
const { value } = virtualListRef;
|
|
272
279
|
return value === null || value === void 0 ? void 0 : value.listElRef;
|
|
@@ -282,12 +289,14 @@ export default defineComponent({
|
|
|
282
289
|
handleKeyDown,
|
|
283
290
|
handleMouseDown,
|
|
284
291
|
handleVirtualListResize,
|
|
285
|
-
handleVirtualListScroll }, exposedProps);
|
|
292
|
+
handleVirtualListScroll }, exposedProps), themeClassHandle);
|
|
286
293
|
},
|
|
287
294
|
render() {
|
|
288
|
-
const { $slots, virtualScroll, clsPrefix, mergedTheme } = this;
|
|
295
|
+
const { $slots, virtualScroll, clsPrefix, mergedTheme, themeClass, onRender } = this;
|
|
296
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
289
297
|
return (h("div", { ref: "selfRef", tabindex: this.focusable ? 0 : -1, class: [
|
|
290
298
|
`${clsPrefix}-base-select-menu`,
|
|
299
|
+
themeClass,
|
|
291
300
|
this.multiple && `${clsPrefix}-base-select-menu--multiple`
|
|
292
301
|
], style: this.style, onFocusin: this.handleFocusin, onFocusout: this.handleFocusout, onKeyup: this.handleKeyUp, onKeydown: this.handleKeyDown, onMousedown: this.handleMouseDown, onMouseenter: this.onMouseenter, onMouseleave: this.onMouseleave },
|
|
293
302
|
this.loading ? (h("div", { class: `${clsPrefix}-base-select-menu__loading` },
|
|
@@ -63,6 +63,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
63
|
onPatternBlur: PropType<(e: FocusEvent) => void>;
|
|
64
64
|
renderLabel: PropType<RenderLabel>;
|
|
65
65
|
status: PropType<FormValidationStatus>;
|
|
66
|
+
disableInlineTheme: BooleanConstructor;
|
|
66
67
|
theme: PropType<import("../../../_mixins").Theme<"InternalSelection", {
|
|
67
68
|
fontSizeTiny: string;
|
|
68
69
|
fontSizeSmall: string;
|
|
@@ -84,7 +85,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
85
|
borderHover: string;
|
|
85
86
|
borderActive: string;
|
|
86
87
|
borderFocus: string;
|
|
87
|
-
boxShadowHover:
|
|
88
|
+
boxShadowHover: string;
|
|
88
89
|
boxShadowActive: string;
|
|
89
90
|
boxShadowFocus: string;
|
|
90
91
|
caretColor: string;
|
|
@@ -95,7 +96,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
96
|
borderHoverWarning: string;
|
|
96
97
|
borderActiveWarning: string;
|
|
97
98
|
borderFocusWarning: string;
|
|
98
|
-
boxShadowHoverWarning:
|
|
99
|
+
boxShadowHoverWarning: string;
|
|
99
100
|
boxShadowActiveWarning: string;
|
|
100
101
|
boxShadowFocusWarning: string;
|
|
101
102
|
colorActiveWarning: string;
|
|
@@ -104,7 +105,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
104
105
|
borderHoverError: string;
|
|
105
106
|
borderActiveError: string;
|
|
106
107
|
borderFocusError: string;
|
|
107
|
-
boxShadowHoverError:
|
|
108
|
+
boxShadowHoverError: string;
|
|
108
109
|
boxShadowActiveError: string;
|
|
109
110
|
boxShadowFocusError: string;
|
|
110
111
|
colorActiveError: string;
|
|
@@ -153,7 +154,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
153
154
|
borderHover: string;
|
|
154
155
|
borderActive: string;
|
|
155
156
|
borderFocus: string;
|
|
156
|
-
boxShadowHover:
|
|
157
|
+
boxShadowHover: string;
|
|
157
158
|
boxShadowActive: string;
|
|
158
159
|
boxShadowFocus: string;
|
|
159
160
|
caretColor: string;
|
|
@@ -164,7 +165,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
164
165
|
borderHoverWarning: string;
|
|
165
166
|
borderActiveWarning: string;
|
|
166
167
|
borderFocusWarning: string;
|
|
167
|
-
boxShadowHoverWarning:
|
|
168
|
+
boxShadowHoverWarning: string;
|
|
168
169
|
boxShadowActiveWarning: string;
|
|
169
170
|
boxShadowFocusWarning: string;
|
|
170
171
|
colorActiveWarning: string;
|
|
@@ -173,7 +174,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
174
|
borderHoverError: string;
|
|
174
175
|
borderActiveError: string;
|
|
175
176
|
borderFocusError: string;
|
|
176
|
-
boxShadowHoverError:
|
|
177
|
+
boxShadowHoverError: string;
|
|
177
178
|
boxShadowActiveError: string;
|
|
178
179
|
boxShadowFocusError: string;
|
|
179
180
|
colorActiveError: string;
|
|
@@ -222,7 +223,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
222
223
|
borderHover: string;
|
|
223
224
|
borderActive: string;
|
|
224
225
|
borderFocus: string;
|
|
225
|
-
boxShadowHover:
|
|
226
|
+
boxShadowHover: string;
|
|
226
227
|
boxShadowActive: string;
|
|
227
228
|
boxShadowFocus: string;
|
|
228
229
|
caretColor: string;
|
|
@@ -233,7 +234,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
233
234
|
borderHoverWarning: string;
|
|
234
235
|
borderActiveWarning: string;
|
|
235
236
|
borderFocusWarning: string;
|
|
236
|
-
boxShadowHoverWarning:
|
|
237
|
+
boxShadowHoverWarning: string;
|
|
237
238
|
boxShadowActiveWarning: string;
|
|
238
239
|
boxShadowFocusWarning: string;
|
|
239
240
|
colorActiveWarning: string;
|
|
@@ -242,7 +243,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
242
243
|
borderHoverError: string;
|
|
243
244
|
borderActiveError: string;
|
|
244
245
|
borderFocusError: string;
|
|
245
|
-
boxShadowHoverError:
|
|
246
|
+
boxShadowHoverError: string;
|
|
246
247
|
boxShadowActiveError: string;
|
|
247
248
|
boxShadowFocusError: string;
|
|
248
249
|
colorActiveError: string;
|
|
@@ -271,6 +272,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
271
272
|
}, any>;
|
|
272
273
|
}>>>;
|
|
273
274
|
}, {
|
|
275
|
+
themeClass?: import("vue").Ref<string> | undefined;
|
|
276
|
+
onRender?: (() => void) | undefined;
|
|
274
277
|
mergedTheme: import("vue").ComputedRef<{
|
|
275
278
|
common: {
|
|
276
279
|
baseColor: string;
|
|
@@ -396,7 +399,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
396
399
|
borderHover: string;
|
|
397
400
|
borderActive: string;
|
|
398
401
|
borderFocus: string;
|
|
399
|
-
boxShadowHover:
|
|
402
|
+
boxShadowHover: string;
|
|
400
403
|
boxShadowActive: string;
|
|
401
404
|
boxShadowFocus: string;
|
|
402
405
|
caretColor: string;
|
|
@@ -407,7 +410,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
407
410
|
borderHoverWarning: string;
|
|
408
411
|
borderActiveWarning: string;
|
|
409
412
|
borderFocusWarning: string;
|
|
410
|
-
boxShadowHoverWarning:
|
|
413
|
+
boxShadowHoverWarning: string;
|
|
411
414
|
boxShadowActiveWarning: string;
|
|
412
415
|
boxShadowFocusWarning: string;
|
|
413
416
|
colorActiveWarning: string;
|
|
@@ -416,7 +419,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
416
419
|
borderHoverError: string;
|
|
417
420
|
borderActiveError: string;
|
|
418
421
|
borderFocusError: string;
|
|
419
|
-
boxShadowHoverError:
|
|
422
|
+
boxShadowHoverError: string;
|
|
420
423
|
boxShadowActiveError: string;
|
|
421
424
|
boxShadowFocusError: string;
|
|
422
425
|
colorActiveError: string;
|
|
@@ -508,7 +511,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
508
511
|
'--n-border-radius': string;
|
|
509
512
|
'--n-box-shadow-active': string;
|
|
510
513
|
'--n-box-shadow-focus': string;
|
|
511
|
-
'--n-box-shadow-hover':
|
|
514
|
+
'--n-box-shadow-hover': string;
|
|
512
515
|
'--n-caret-color': string;
|
|
513
516
|
'--n-color': string;
|
|
514
517
|
'--n-color-active': string;
|
|
@@ -527,7 +530,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
527
530
|
'--n-color-active-warning': string;
|
|
528
531
|
'--n-box-shadow-focus-warning': string;
|
|
529
532
|
'--n-box-shadow-active-warning': string;
|
|
530
|
-
'--n-box-shadow-hover-warning':
|
|
533
|
+
'--n-box-shadow-hover-warning': string;
|
|
531
534
|
'--n-border-warning': string;
|
|
532
535
|
'--n-border-focus-warning': string;
|
|
533
536
|
'--n-border-hover-warning': string;
|
|
@@ -535,7 +538,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
535
538
|
'--n-color-active-error': string;
|
|
536
539
|
'--n-box-shadow-focus-error': string;
|
|
537
540
|
'--n-box-shadow-active-error': string;
|
|
538
|
-
'--n-box-shadow-hover-error':
|
|
541
|
+
'--n-box-shadow-hover-error': string;
|
|
539
542
|
'--n-border-error': string;
|
|
540
543
|
'--n-border-focus-error': string;
|
|
541
544
|
'--n-border-hover-error': string;
|
|
@@ -545,7 +548,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
545
548
|
'--n-clear-color-hover': string;
|
|
546
549
|
'--n-clear-color-pressed': string;
|
|
547
550
|
'--n-arrow-size': string;
|
|
548
|
-
}
|
|
551
|
+
}> | undefined;
|
|
549
552
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
550
553
|
clsPrefix: {
|
|
551
554
|
type: StringConstructor;
|
|
@@ -599,6 +602,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
599
602
|
onPatternBlur: PropType<(e: FocusEvent) => void>;
|
|
600
603
|
renderLabel: PropType<RenderLabel>;
|
|
601
604
|
status: PropType<FormValidationStatus>;
|
|
605
|
+
disableInlineTheme: BooleanConstructor;
|
|
602
606
|
theme: PropType<import("../../../_mixins").Theme<"InternalSelection", {
|
|
603
607
|
fontSizeTiny: string;
|
|
604
608
|
fontSizeSmall: string;
|
|
@@ -620,7 +624,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
620
624
|
borderHover: string;
|
|
621
625
|
borderActive: string;
|
|
622
626
|
borderFocus: string;
|
|
623
|
-
boxShadowHover:
|
|
627
|
+
boxShadowHover: string;
|
|
624
628
|
boxShadowActive: string;
|
|
625
629
|
boxShadowFocus: string;
|
|
626
630
|
caretColor: string;
|
|
@@ -631,7 +635,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
631
635
|
borderHoverWarning: string;
|
|
632
636
|
borderActiveWarning: string;
|
|
633
637
|
borderFocusWarning: string;
|
|
634
|
-
boxShadowHoverWarning:
|
|
638
|
+
boxShadowHoverWarning: string;
|
|
635
639
|
boxShadowActiveWarning: string;
|
|
636
640
|
boxShadowFocusWarning: string;
|
|
637
641
|
colorActiveWarning: string;
|
|
@@ -640,7 +644,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
640
644
|
borderHoverError: string;
|
|
641
645
|
borderActiveError: string;
|
|
642
646
|
borderFocusError: string;
|
|
643
|
-
boxShadowHoverError:
|
|
647
|
+
boxShadowHoverError: string;
|
|
644
648
|
boxShadowActiveError: string;
|
|
645
649
|
boxShadowFocusError: string;
|
|
646
650
|
colorActiveError: string;
|
|
@@ -689,7 +693,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
689
693
|
borderHover: string;
|
|
690
694
|
borderActive: string;
|
|
691
695
|
borderFocus: string;
|
|
692
|
-
boxShadowHover:
|
|
696
|
+
boxShadowHover: string;
|
|
693
697
|
boxShadowActive: string;
|
|
694
698
|
boxShadowFocus: string;
|
|
695
699
|
caretColor: string;
|
|
@@ -700,7 +704,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
700
704
|
borderHoverWarning: string;
|
|
701
705
|
borderActiveWarning: string;
|
|
702
706
|
borderFocusWarning: string;
|
|
703
|
-
boxShadowHoverWarning:
|
|
707
|
+
boxShadowHoverWarning: string;
|
|
704
708
|
boxShadowActiveWarning: string;
|
|
705
709
|
boxShadowFocusWarning: string;
|
|
706
710
|
colorActiveWarning: string;
|
|
@@ -709,7 +713,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
709
713
|
borderHoverError: string;
|
|
710
714
|
borderActiveError: string;
|
|
711
715
|
borderFocusError: string;
|
|
712
|
-
boxShadowHoverError:
|
|
716
|
+
boxShadowHoverError: string;
|
|
713
717
|
boxShadowActiveError: string;
|
|
714
718
|
boxShadowFocusError: string;
|
|
715
719
|
colorActiveError: string;
|
|
@@ -758,7 +762,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
758
762
|
borderHover: string;
|
|
759
763
|
borderActive: string;
|
|
760
764
|
borderFocus: string;
|
|
761
|
-
boxShadowHover:
|
|
765
|
+
boxShadowHover: string;
|
|
762
766
|
boxShadowActive: string;
|
|
763
767
|
boxShadowFocus: string;
|
|
764
768
|
caretColor: string;
|
|
@@ -769,7 +773,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
769
773
|
borderHoverWarning: string;
|
|
770
774
|
borderActiveWarning: string;
|
|
771
775
|
borderFocusWarning: string;
|
|
772
|
-
boxShadowHoverWarning:
|
|
776
|
+
boxShadowHoverWarning: string;
|
|
773
777
|
boxShadowActiveWarning: string;
|
|
774
778
|
boxShadowFocusWarning: string;
|
|
775
779
|
colorActiveWarning: string;
|
|
@@ -778,7 +782,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
778
782
|
borderHoverError: string;
|
|
779
783
|
borderActiveError: string;
|
|
780
784
|
borderFocusError: string;
|
|
781
|
-
boxShadowHoverError:
|
|
785
|
+
boxShadowHoverError: string;
|
|
782
786
|
boxShadowActiveError: string;
|
|
783
787
|
boxShadowFocusError: string;
|
|
784
788
|
colorActiveError: string;
|
|
@@ -813,8 +817,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
813
817
|
active: boolean;
|
|
814
818
|
disabled: boolean;
|
|
815
819
|
autofocus: boolean;
|
|
816
|
-
bordered: boolean | undefined;
|
|
817
820
|
loading: boolean;
|
|
821
|
+
bordered: boolean | undefined;
|
|
822
|
+
disableInlineTheme: boolean;
|
|
818
823
|
showArrow: boolean;
|
|
819
824
|
selectedOption: SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)> | null;
|
|
820
825
|
selectedOptions: SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>[] | null;
|
|
@@ -3,7 +3,7 @@ import { h, defineComponent, Fragment, ref, computed, watch, toRef, nextTick, wa
|
|
|
3
3
|
import { VOverflow } from 'vueuc';
|
|
4
4
|
import { NPopover } from '../../../popover';
|
|
5
5
|
import { NTag } from '../../../tag';
|
|
6
|
-
import { useTheme } from '../../../_mixins';
|
|
6
|
+
import { useThemeClass, useTheme, emptyThemeClassHandle } from '../../../_mixins';
|
|
7
7
|
import { createKey, getTitleAttribute, render } from '../../../_utils';
|
|
8
8
|
import Suffix from '../../suffix';
|
|
9
9
|
import { internalSelectionLight } from '../styles';
|
|
@@ -31,7 +31,7 @@ export default defineComponent({
|
|
|
31
31
|
}, loading: Boolean, autofocus: Boolean, showArrow: {
|
|
32
32
|
type: Boolean,
|
|
33
33
|
default: true
|
|
34
|
-
}, inputProps: Object, focused: Boolean, renderTag: Function, onKeyup: Function, onKeydown: Function, onClick: Function, onBlur: Function, onFocus: Function, onDeleteOption: Function, maxTagCount: [String, Number], onClear: Function, onPatternInput: Function, onPatternFocus: Function, onPatternBlur: Function, renderLabel: Function, status: String }),
|
|
34
|
+
}, inputProps: Object, focused: Boolean, renderTag: Function, onKeyup: Function, onKeydown: Function, onClick: Function, onBlur: Function, onFocus: Function, onDeleteOption: Function, maxTagCount: [String, Number], onClear: Function, onPatternInput: Function, onPatternFocus: Function, onPatternBlur: Function, renderLabel: Function, status: String, disableInlineTheme: Boolean }),
|
|
35
35
|
setup(props) {
|
|
36
36
|
const patternInputMirrorRef = ref(null);
|
|
37
37
|
const patternInputRef = ref(null);
|
|
@@ -298,15 +298,76 @@ export default defineComponent({
|
|
|
298
298
|
props.disabled || patternInputFocusedRef.value ? -1 : 0;
|
|
299
299
|
});
|
|
300
300
|
});
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
301
|
+
const { disableInlineTheme } = props;
|
|
302
|
+
const cssVarsRef = computed(() => {
|
|
303
|
+
const { size } = props;
|
|
304
|
+
const { common: { cubicBezierEaseInOut }, self: { borderRadius, color, placeholderColor, textColor, paddingSingle, paddingMultiple, caretColor, colorDisabled, textColorDisabled, placeholderColorDisabled, colorActive, boxShadowFocus, boxShadowActive, boxShadowHover, border, borderFocus, borderHover, borderActive, arrowColor, arrowColorDisabled, loadingColor,
|
|
305
|
+
// form warning
|
|
306
|
+
colorActiveWarning, boxShadowFocusWarning, boxShadowActiveWarning, boxShadowHoverWarning, borderWarning, borderFocusWarning, borderHoverWarning, borderActiveWarning,
|
|
307
|
+
// form error
|
|
308
|
+
colorActiveError, boxShadowFocusError, boxShadowActiveError, boxShadowHoverError, borderError, borderFocusError, borderHoverError, borderActiveError,
|
|
309
|
+
// clear
|
|
310
|
+
clearColor, clearColorHover, clearColorPressed, clearSize,
|
|
311
|
+
// arrow
|
|
312
|
+
arrowSize, [createKey('height', size)]: height, [createKey('fontSize', size)]: fontSize } } = themeRef.value;
|
|
313
|
+
return {
|
|
314
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
315
|
+
'--n-border': border,
|
|
316
|
+
'--n-border-active': borderActive,
|
|
317
|
+
'--n-border-focus': borderFocus,
|
|
318
|
+
'--n-border-hover': borderHover,
|
|
319
|
+
'--n-border-radius': borderRadius,
|
|
320
|
+
'--n-box-shadow-active': boxShadowActive,
|
|
321
|
+
'--n-box-shadow-focus': boxShadowFocus,
|
|
322
|
+
'--n-box-shadow-hover': boxShadowHover,
|
|
323
|
+
'--n-caret-color': caretColor,
|
|
324
|
+
'--n-color': color,
|
|
325
|
+
'--n-color-active': colorActive,
|
|
326
|
+
'--n-color-disabled': colorDisabled,
|
|
327
|
+
'--n-font-size': fontSize,
|
|
328
|
+
'--n-height': height,
|
|
329
|
+
'--n-padding-single': paddingSingle,
|
|
330
|
+
'--n-padding-multiple': paddingMultiple,
|
|
331
|
+
'--n-placeholder-color': placeholderColor,
|
|
332
|
+
'--n-placeholder-color-disabled': placeholderColorDisabled,
|
|
333
|
+
'--n-text-color': textColor,
|
|
334
|
+
'--n-text-color-disabled': textColorDisabled,
|
|
335
|
+
'--n-arrow-color': arrowColor,
|
|
336
|
+
'--n-arrow-color-disabled': arrowColorDisabled,
|
|
337
|
+
'--n-loading-color': loadingColor,
|
|
338
|
+
// form warning
|
|
339
|
+
'--n-color-active-warning': colorActiveWarning,
|
|
340
|
+
'--n-box-shadow-focus-warning': boxShadowFocusWarning,
|
|
341
|
+
'--n-box-shadow-active-warning': boxShadowActiveWarning,
|
|
342
|
+
'--n-box-shadow-hover-warning': boxShadowHoverWarning,
|
|
343
|
+
'--n-border-warning': borderWarning,
|
|
344
|
+
'--n-border-focus-warning': borderFocusWarning,
|
|
345
|
+
'--n-border-hover-warning': borderHoverWarning,
|
|
346
|
+
'--n-border-active-warning': borderActiveWarning,
|
|
347
|
+
// form error
|
|
348
|
+
'--n-color-active-error': colorActiveError,
|
|
349
|
+
'--n-box-shadow-focus-error': boxShadowFocusError,
|
|
350
|
+
'--n-box-shadow-active-error': boxShadowActiveError,
|
|
351
|
+
'--n-box-shadow-hover-error': boxShadowHoverError,
|
|
352
|
+
'--n-border-error': borderError,
|
|
353
|
+
'--n-border-focus-error': borderFocusError,
|
|
354
|
+
'--n-border-hover-error': borderHoverError,
|
|
355
|
+
'--n-border-active-error': borderActiveError,
|
|
356
|
+
// clear
|
|
357
|
+
'--n-clear-size': clearSize,
|
|
358
|
+
'--n-clear-color': clearColor,
|
|
359
|
+
'--n-clear-color-hover': clearColorHover,
|
|
360
|
+
'--n-clear-color-pressed': clearColorPressed,
|
|
361
|
+
// arrow-size
|
|
362
|
+
'--n-arrow-size': arrowSize
|
|
363
|
+
};
|
|
364
|
+
});
|
|
365
|
+
const themeClassHandle = disableInlineTheme
|
|
366
|
+
? useThemeClass('internal-selection', computed(() => {
|
|
367
|
+
return props.size[0];
|
|
368
|
+
}), cssVarsRef, props)
|
|
369
|
+
: emptyThemeClassHandle;
|
|
370
|
+
return Object.assign({ mergedTheme: themeRef, mergedClearable: mergedClearableRef, patternInputFocused: patternInputFocusedRef, filterablePlaceholder: filterablePlaceholderRef, label: labelRef, selected: selectedRef, showTagsPanel: showTagsPopoverRef, isCompositing: isCompositingRef,
|
|
310
371
|
// dom ref
|
|
311
372
|
counterRef,
|
|
312
373
|
counterWrapperRef,
|
|
@@ -340,75 +401,11 @@ export default defineComponent({
|
|
|
340
401
|
blurInput,
|
|
341
402
|
updateCounter,
|
|
342
403
|
getCounter,
|
|
343
|
-
getTail,
|
|
344
|
-
renderLabel: props.renderLabel,
|
|
345
|
-
cssVars: computed(() => {
|
|
346
|
-
const { size } = props;
|
|
347
|
-
const { common: { cubicBezierEaseInOut }, self: { borderRadius, color, placeholderColor, textColor, paddingSingle, paddingMultiple, caretColor, colorDisabled, textColorDisabled, placeholderColorDisabled, colorActive, boxShadowFocus, boxShadowActive, boxShadowHover, border, borderFocus, borderHover, borderActive, arrowColor, arrowColorDisabled, loadingColor,
|
|
348
|
-
// form warning
|
|
349
|
-
colorActiveWarning, boxShadowFocusWarning, boxShadowActiveWarning, boxShadowHoverWarning, borderWarning, borderFocusWarning, borderHoverWarning, borderActiveWarning,
|
|
350
|
-
// form error
|
|
351
|
-
colorActiveError, boxShadowFocusError, boxShadowActiveError, boxShadowHoverError, borderError, borderFocusError, borderHoverError, borderActiveError,
|
|
352
|
-
// clear
|
|
353
|
-
clearColor, clearColorHover, clearColorPressed, clearSize,
|
|
354
|
-
// arrow
|
|
355
|
-
arrowSize, [createKey('height', size)]: height, [createKey('fontSize', size)]: fontSize } } = themeRef.value;
|
|
356
|
-
return {
|
|
357
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
358
|
-
'--n-border': border,
|
|
359
|
-
'--n-border-active': borderActive,
|
|
360
|
-
'--n-border-focus': borderFocus,
|
|
361
|
-
'--n-border-hover': borderHover,
|
|
362
|
-
'--n-border-radius': borderRadius,
|
|
363
|
-
'--n-box-shadow-active': boxShadowActive,
|
|
364
|
-
'--n-box-shadow-focus': boxShadowFocus,
|
|
365
|
-
'--n-box-shadow-hover': boxShadowHover,
|
|
366
|
-
'--n-caret-color': caretColor,
|
|
367
|
-
'--n-color': color,
|
|
368
|
-
'--n-color-active': colorActive,
|
|
369
|
-
'--n-color-disabled': colorDisabled,
|
|
370
|
-
'--n-font-size': fontSize,
|
|
371
|
-
'--n-height': height,
|
|
372
|
-
'--n-padding-single': paddingSingle,
|
|
373
|
-
'--n-padding-multiple': paddingMultiple,
|
|
374
|
-
'--n-placeholder-color': placeholderColor,
|
|
375
|
-
'--n-placeholder-color-disabled': placeholderColorDisabled,
|
|
376
|
-
'--n-text-color': textColor,
|
|
377
|
-
'--n-text-color-disabled': textColorDisabled,
|
|
378
|
-
'--n-arrow-color': arrowColor,
|
|
379
|
-
'--n-arrow-color-disabled': arrowColorDisabled,
|
|
380
|
-
'--n-loading-color': loadingColor,
|
|
381
|
-
// form warning
|
|
382
|
-
'--n-color-active-warning': colorActiveWarning,
|
|
383
|
-
'--n-box-shadow-focus-warning': boxShadowFocusWarning,
|
|
384
|
-
'--n-box-shadow-active-warning': boxShadowActiveWarning,
|
|
385
|
-
'--n-box-shadow-hover-warning': boxShadowHoverWarning,
|
|
386
|
-
'--n-border-warning': borderWarning,
|
|
387
|
-
'--n-border-focus-warning': borderFocusWarning,
|
|
388
|
-
'--n-border-hover-warning': borderHoverWarning,
|
|
389
|
-
'--n-border-active-warning': borderActiveWarning,
|
|
390
|
-
// form error
|
|
391
|
-
'--n-color-active-error': colorActiveError,
|
|
392
|
-
'--n-box-shadow-focus-error': boxShadowFocusError,
|
|
393
|
-
'--n-box-shadow-active-error': boxShadowActiveError,
|
|
394
|
-
'--n-box-shadow-hover-error': boxShadowHoverError,
|
|
395
|
-
'--n-border-error': borderError,
|
|
396
|
-
'--n-border-focus-error': borderFocusError,
|
|
397
|
-
'--n-border-hover-error': borderHoverError,
|
|
398
|
-
'--n-border-active-error': borderActiveError,
|
|
399
|
-
// clear
|
|
400
|
-
'--n-clear-size': clearSize,
|
|
401
|
-
'--n-clear-color': clearColor,
|
|
402
|
-
'--n-clear-color-hover': clearColorHover,
|
|
403
|
-
'--n-clear-color-pressed': clearColorPressed,
|
|
404
|
-
// arrow-size
|
|
405
|
-
'--n-arrow-size': arrowSize
|
|
406
|
-
};
|
|
407
|
-
})
|
|
408
|
-
};
|
|
404
|
+
getTail, renderLabel: props.renderLabel, cssVars: disableInlineTheme ? undefined : cssVarsRef }, themeClassHandle);
|
|
409
405
|
},
|
|
410
406
|
render() {
|
|
411
|
-
const { status, multiple, size, disabled, filterable, maxTagCount, bordered, clsPrefix, renderTag, renderLabel } = this;
|
|
407
|
+
const { status, multiple, size, disabled, filterable, maxTagCount, bordered, clsPrefix, onRender, renderTag, renderLabel } = this;
|
|
408
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
412
409
|
const maxTagCountResponsive = maxTagCount === 'responsive';
|
|
413
410
|
const maxTagCountNumeric = typeof maxTagCount === 'number';
|
|
414
411
|
const useMaxTagCount = maxTagCountResponsive || maxTagCountNumeric;
|
|
@@ -434,14 +431,14 @@ export default defineComponent({
|
|
|
434
431
|
// May Overflow
|
|
435
432
|
const renderCounter = maxTagCountResponsive
|
|
436
433
|
? () => (h("div", { class: `${clsPrefix}-base-selection-tag-wrapper`, ref: "counterWrapperRef" },
|
|
437
|
-
h(NTag, { ref: "counterRef", onMouseenter: this.handleMouseEnterCounter, onMouseleave: this.handleMouseLeaveCounter, disabled: disabled })))
|
|
434
|
+
h(NTag, { size: size, ref: "counterRef", onMouseenter: this.handleMouseEnterCounter, onMouseleave: this.handleMouseLeaveCounter, disabled: disabled })))
|
|
438
435
|
: undefined;
|
|
439
436
|
let counter;
|
|
440
437
|
if (maxTagCountNumeric) {
|
|
441
438
|
const rest = this.selectedOptions.length - maxTagCount;
|
|
442
439
|
if (rest > 0) {
|
|
443
440
|
counter = (h("div", { class: `${clsPrefix}-base-selection-tag-wrapper`, key: "__counter__" },
|
|
444
|
-
h(NTag, { ref: "counterRef", onMouseenter: this.handleMouseEnterCounter, disabled: disabled }, {
|
|
441
|
+
h(NTag, { size: size, ref: "counterRef", onMouseenter: this.handleMouseEnterCounter, disabled: disabled }, {
|
|
445
442
|
default: () => `+${rest}`
|
|
446
443
|
})));
|
|
447
444
|
}
|
|
@@ -545,6 +542,7 @@ export default defineComponent({
|
|
|
545
542
|
}
|
|
546
543
|
return (h("div", { ref: "selfRef", class: [
|
|
547
544
|
`${clsPrefix}-base-selection`,
|
|
545
|
+
this.themeClass,
|
|
548
546
|
status && `${clsPrefix}-base-selection--${status}-status`,
|
|
549
547
|
{
|
|
550
548
|
[`${clsPrefix}-base-selection--active`]: this.active,
|
|
@@ -22,19 +22,19 @@ const internalSelectionDark = {
|
|
|
22
22
|
// default
|
|
23
23
|
textColor: textColor2, textColorDisabled,
|
|
24
24
|
placeholderColor,
|
|
25
|
-
placeholderColorDisabled, color: inputColor, colorDisabled: inputColorDisabled, colorActive: changeColor(primaryColor, { alpha: 0.1 }), border: '1px solid #0000', borderHover: `1px solid ${primaryColorHover}`, borderActive: `1px solid ${primaryColor}`, borderFocus: `1px solid ${primaryColorHover}`, boxShadowHover:
|
|
25
|
+
placeholderColorDisabled, color: inputColor, colorDisabled: inputColorDisabled, colorActive: changeColor(primaryColor, { alpha: 0.1 }), border: '1px solid #0000', borderHover: `1px solid ${primaryColorHover}`, borderActive: `1px solid ${primaryColor}`, borderFocus: `1px solid ${primaryColorHover}`, boxShadowHover: 'none', boxShadowActive: `0 0 8px 0 ${changeColor(primaryColor, {
|
|
26
26
|
alpha: 0.4
|
|
27
27
|
})}`, boxShadowFocus: `0 0 8px 0 ${changeColor(primaryColor, {
|
|
28
28
|
alpha: 0.4
|
|
29
29
|
})}`, caretColor: primaryColor, arrowColor: iconColor, arrowColorDisabled: iconColorDisabled, loadingColor: primaryColor,
|
|
30
30
|
// warning
|
|
31
|
-
borderWarning: `1px solid ${warningColor}`, borderHoverWarning: `1px solid ${warningColorHover}`, borderActiveWarning: `1px solid ${warningColor}`, borderFocusWarning: `1px solid ${warningColorHover}`, boxShadowHoverWarning:
|
|
31
|
+
borderWarning: `1px solid ${warningColor}`, borderHoverWarning: `1px solid ${warningColorHover}`, borderActiveWarning: `1px solid ${warningColor}`, borderFocusWarning: `1px solid ${warningColorHover}`, boxShadowHoverWarning: 'none', boxShadowActiveWarning: `0 0 8px 0 ${changeColor(warningColor, {
|
|
32
32
|
alpha: 0.4
|
|
33
33
|
})}`, boxShadowFocusWarning: `0 0 8px 0 ${changeColor(warningColor, {
|
|
34
34
|
alpha: 0.4
|
|
35
35
|
})}`, colorActiveWarning: changeColor(warningColor, { alpha: 0.1 }), caretColorWarning: warningColor,
|
|
36
36
|
// error
|
|
37
|
-
borderError: `1px solid ${errorColor}`, borderHoverError: `1px solid ${errorColorHover}`, borderActiveError: `1px solid ${errorColor}`, borderFocusError: `1px solid ${errorColorHover}`, boxShadowHoverError:
|
|
37
|
+
borderError: `1px solid ${errorColor}`, borderHoverError: `1px solid ${errorColorHover}`, borderActiveError: `1px solid ${errorColor}`, borderFocusError: `1px solid ${errorColorHover}`, boxShadowHoverError: 'none', boxShadowActiveError: `0 0 8px 0 ${changeColor(errorColor, {
|
|
38
38
|
alpha: 0.4
|
|
39
39
|
})}`, boxShadowFocusError: `0 0 8px 0 ${changeColor(errorColor, {
|
|
40
40
|
alpha: 0.4
|
|
@@ -20,7 +20,7 @@ declare const self: (vars: ThemeCommonVars) => {
|
|
|
20
20
|
borderHover: string;
|
|
21
21
|
borderActive: string;
|
|
22
22
|
borderFocus: string;
|
|
23
|
-
boxShadowHover:
|
|
23
|
+
boxShadowHover: string;
|
|
24
24
|
boxShadowActive: string;
|
|
25
25
|
boxShadowFocus: string;
|
|
26
26
|
caretColor: string;
|
|
@@ -31,7 +31,7 @@ declare const self: (vars: ThemeCommonVars) => {
|
|
|
31
31
|
borderHoverWarning: string;
|
|
32
32
|
borderActiveWarning: string;
|
|
33
33
|
borderFocusWarning: string;
|
|
34
|
-
boxShadowHoverWarning:
|
|
34
|
+
boxShadowHoverWarning: string;
|
|
35
35
|
boxShadowActiveWarning: string;
|
|
36
36
|
boxShadowFocusWarning: string;
|
|
37
37
|
colorActiveWarning: string;
|
|
@@ -40,7 +40,7 @@ declare const self: (vars: ThemeCommonVars) => {
|
|
|
40
40
|
borderHoverError: string;
|
|
41
41
|
borderActiveError: string;
|
|
42
42
|
borderFocusError: string;
|
|
43
|
-
boxShadowHoverError:
|
|
43
|
+
boxShadowHoverError: string;
|
|
44
44
|
boxShadowActiveError: string;
|
|
45
45
|
boxShadowFocusError: string;
|
|
46
46
|
colorActiveError: string;
|
|
@@ -75,7 +75,7 @@ declare const internalSelectionLight: import("../../../_mixins").Theme<"Internal
|
|
|
75
75
|
borderHover: string;
|
|
76
76
|
borderActive: string;
|
|
77
77
|
borderFocus: string;
|
|
78
|
-
boxShadowHover:
|
|
78
|
+
boxShadowHover: string;
|
|
79
79
|
boxShadowActive: string;
|
|
80
80
|
boxShadowFocus: string;
|
|
81
81
|
caretColor: string;
|
|
@@ -86,7 +86,7 @@ declare const internalSelectionLight: import("../../../_mixins").Theme<"Internal
|
|
|
86
86
|
borderHoverWarning: string;
|
|
87
87
|
borderActiveWarning: string;
|
|
88
88
|
borderFocusWarning: string;
|
|
89
|
-
boxShadowHoverWarning:
|
|
89
|
+
boxShadowHoverWarning: string;
|
|
90
90
|
boxShadowActiveWarning: string;
|
|
91
91
|
boxShadowFocusWarning: string;
|
|
92
92
|
colorActiveWarning: string;
|
|
@@ -95,7 +95,7 @@ declare const internalSelectionLight: import("../../../_mixins").Theme<"Internal
|
|
|
95
95
|
borderHoverError: string;
|
|
96
96
|
borderActiveError: string;
|
|
97
97
|
borderFocusError: string;
|
|
98
|
-
boxShadowHoverError:
|
|
98
|
+
boxShadowHoverError: string;
|
|
99
99
|
boxShadowActiveError: string;
|
|
100
100
|
boxShadowFocusError: string;
|
|
101
101
|
colorActiveError: string;
|