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
|
@@ -6,7 +6,7 @@ declare const resultProps: {
|
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
8
|
status: {
|
|
9
|
-
type: PropType<"500" | "
|
|
9
|
+
type: PropType<"500" | "error" | "info" | "success" | "warning" | "404" | "403" | "418">;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
12
|
title: StringConstructor;
|
|
@@ -97,7 +97,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
97
97
|
default: string;
|
|
98
98
|
};
|
|
99
99
|
status: {
|
|
100
|
-
type: PropType<"500" | "
|
|
100
|
+
type: PropType<"500" | "error" | "info" | "success" | "warning" | "404" | "403" | "418">;
|
|
101
101
|
default: string;
|
|
102
102
|
};
|
|
103
103
|
title: StringConstructor;
|
|
@@ -199,7 +199,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
199
199
|
default: string;
|
|
200
200
|
};
|
|
201
201
|
status: {
|
|
202
|
-
type: PropType<"500" | "
|
|
202
|
+
type: PropType<"500" | "error" | "info" | "success" | "warning" | "404" | "403" | "418">;
|
|
203
203
|
default: string;
|
|
204
204
|
};
|
|
205
205
|
title: StringConstructor;
|
|
@@ -284,6 +284,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
284
284
|
}, any>>>;
|
|
285
285
|
}>>, {
|
|
286
286
|
size: "small" | "medium" | "large" | "huge";
|
|
287
|
-
status: "500" | "
|
|
287
|
+
status: "500" | "error" | "info" | "success" | "warning" | "404" | "403" | "418";
|
|
288
288
|
}>;
|
|
289
289
|
export default _default;
|
|
@@ -16,6 +16,10 @@ declare const selectProps: {
|
|
|
16
16
|
readonly default: undefined;
|
|
17
17
|
};
|
|
18
18
|
readonly clearable: BooleanConstructor;
|
|
19
|
+
readonly clearFilterAfterSelect: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: true;
|
|
22
|
+
};
|
|
19
23
|
readonly options: {
|
|
20
24
|
readonly type: PropType<SelectMixedOption[]>;
|
|
21
25
|
readonly default: () => never[];
|
|
@@ -128,7 +132,7 @@ declare const selectProps: {
|
|
|
128
132
|
borderHover: string;
|
|
129
133
|
borderActive: string;
|
|
130
134
|
borderFocus: string;
|
|
131
|
-
boxShadowHover:
|
|
135
|
+
boxShadowHover: string;
|
|
132
136
|
boxShadowActive: string;
|
|
133
137
|
boxShadowFocus: string;
|
|
134
138
|
caretColor: string;
|
|
@@ -139,7 +143,7 @@ declare const selectProps: {
|
|
|
139
143
|
borderHoverWarning: string;
|
|
140
144
|
borderActiveWarning: string;
|
|
141
145
|
borderFocusWarning: string;
|
|
142
|
-
boxShadowHoverWarning:
|
|
146
|
+
boxShadowHoverWarning: string;
|
|
143
147
|
boxShadowActiveWarning: string;
|
|
144
148
|
boxShadowFocusWarning: string;
|
|
145
149
|
colorActiveWarning: string;
|
|
@@ -148,7 +152,7 @@ declare const selectProps: {
|
|
|
148
152
|
borderHoverError: string;
|
|
149
153
|
borderActiveError: string;
|
|
150
154
|
borderFocusError: string;
|
|
151
|
-
boxShadowHoverError:
|
|
155
|
+
boxShadowHoverError: string;
|
|
152
156
|
boxShadowActiveError: string;
|
|
153
157
|
boxShadowFocusError: string;
|
|
154
158
|
colorActiveError: string;
|
|
@@ -253,7 +257,7 @@ declare const selectProps: {
|
|
|
253
257
|
borderHover: string;
|
|
254
258
|
borderActive: string;
|
|
255
259
|
borderFocus: string;
|
|
256
|
-
boxShadowHover:
|
|
260
|
+
boxShadowHover: string;
|
|
257
261
|
boxShadowActive: string;
|
|
258
262
|
boxShadowFocus: string;
|
|
259
263
|
caretColor: string;
|
|
@@ -264,7 +268,7 @@ declare const selectProps: {
|
|
|
264
268
|
borderHoverWarning: string;
|
|
265
269
|
borderActiveWarning: string;
|
|
266
270
|
borderFocusWarning: string;
|
|
267
|
-
boxShadowHoverWarning:
|
|
271
|
+
boxShadowHoverWarning: string;
|
|
268
272
|
boxShadowActiveWarning: string;
|
|
269
273
|
boxShadowFocusWarning: string;
|
|
270
274
|
colorActiveWarning: string;
|
|
@@ -273,7 +277,7 @@ declare const selectProps: {
|
|
|
273
277
|
borderHoverError: string;
|
|
274
278
|
borderActiveError: string;
|
|
275
279
|
borderFocusError: string;
|
|
276
|
-
boxShadowHoverError:
|
|
280
|
+
boxShadowHoverError: string;
|
|
277
281
|
boxShadowActiveError: string;
|
|
278
282
|
boxShadowFocusError: string;
|
|
279
283
|
colorActiveError: string;
|
|
@@ -378,7 +382,7 @@ declare const selectProps: {
|
|
|
378
382
|
borderHover: string;
|
|
379
383
|
borderActive: string;
|
|
380
384
|
borderFocus: string;
|
|
381
|
-
boxShadowHover:
|
|
385
|
+
boxShadowHover: string;
|
|
382
386
|
boxShadowActive: string;
|
|
383
387
|
boxShadowFocus: string;
|
|
384
388
|
caretColor: string;
|
|
@@ -389,7 +393,7 @@ declare const selectProps: {
|
|
|
389
393
|
borderHoverWarning: string;
|
|
390
394
|
borderActiveWarning: string;
|
|
391
395
|
borderFocusWarning: string;
|
|
392
|
-
boxShadowHoverWarning:
|
|
396
|
+
boxShadowHoverWarning: string;
|
|
393
397
|
boxShadowActiveWarning: string;
|
|
394
398
|
boxShadowFocusWarning: string;
|
|
395
399
|
colorActiveWarning: string;
|
|
@@ -398,7 +402,7 @@ declare const selectProps: {
|
|
|
398
402
|
borderHoverError: string;
|
|
399
403
|
borderActiveError: string;
|
|
400
404
|
borderFocusError: string;
|
|
401
|
-
boxShadowHoverError:
|
|
405
|
+
boxShadowHoverError: string;
|
|
402
406
|
boxShadowActiveError: string;
|
|
403
407
|
boxShadowFocusError: string;
|
|
404
408
|
colorActiveError: string;
|
|
@@ -491,6 +495,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
491
495
|
readonly default: undefined;
|
|
492
496
|
};
|
|
493
497
|
readonly clearable: BooleanConstructor;
|
|
498
|
+
readonly clearFilterAfterSelect: {
|
|
499
|
+
readonly type: BooleanConstructor;
|
|
500
|
+
readonly default: true;
|
|
501
|
+
};
|
|
494
502
|
readonly options: {
|
|
495
503
|
readonly type: PropType<SelectMixedOption[]>;
|
|
496
504
|
readonly default: () => never[];
|
|
@@ -603,7 +611,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
603
611
|
borderHover: string;
|
|
604
612
|
borderActive: string;
|
|
605
613
|
borderFocus: string;
|
|
606
|
-
boxShadowHover:
|
|
614
|
+
boxShadowHover: string;
|
|
607
615
|
boxShadowActive: string;
|
|
608
616
|
boxShadowFocus: string;
|
|
609
617
|
caretColor: string;
|
|
@@ -614,7 +622,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
614
622
|
borderHoverWarning: string;
|
|
615
623
|
borderActiveWarning: string;
|
|
616
624
|
borderFocusWarning: string;
|
|
617
|
-
boxShadowHoverWarning:
|
|
625
|
+
boxShadowHoverWarning: string;
|
|
618
626
|
boxShadowActiveWarning: string;
|
|
619
627
|
boxShadowFocusWarning: string;
|
|
620
628
|
colorActiveWarning: string;
|
|
@@ -623,7 +631,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
623
631
|
borderHoverError: string;
|
|
624
632
|
borderActiveError: string;
|
|
625
633
|
borderFocusError: string;
|
|
626
|
-
boxShadowHoverError:
|
|
634
|
+
boxShadowHoverError: string;
|
|
627
635
|
boxShadowActiveError: string;
|
|
628
636
|
boxShadowFocusError: string;
|
|
629
637
|
colorActiveError: string;
|
|
@@ -728,7 +736,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
728
736
|
borderHover: string;
|
|
729
737
|
borderActive: string;
|
|
730
738
|
borderFocus: string;
|
|
731
|
-
boxShadowHover:
|
|
739
|
+
boxShadowHover: string;
|
|
732
740
|
boxShadowActive: string;
|
|
733
741
|
boxShadowFocus: string;
|
|
734
742
|
caretColor: string;
|
|
@@ -739,7 +747,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
739
747
|
borderHoverWarning: string;
|
|
740
748
|
borderActiveWarning: string;
|
|
741
749
|
borderFocusWarning: string;
|
|
742
|
-
boxShadowHoverWarning:
|
|
750
|
+
boxShadowHoverWarning: string;
|
|
743
751
|
boxShadowActiveWarning: string;
|
|
744
752
|
boxShadowFocusWarning: string;
|
|
745
753
|
colorActiveWarning: string;
|
|
@@ -748,7 +756,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
748
756
|
borderHoverError: string;
|
|
749
757
|
borderActiveError: string;
|
|
750
758
|
borderFocusError: string;
|
|
751
|
-
boxShadowHoverError:
|
|
759
|
+
boxShadowHoverError: string;
|
|
752
760
|
boxShadowActiveError: string;
|
|
753
761
|
boxShadowFocusError: string;
|
|
754
762
|
colorActiveError: string;
|
|
@@ -853,7 +861,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
853
861
|
borderHover: string;
|
|
854
862
|
borderActive: string;
|
|
855
863
|
borderFocus: string;
|
|
856
|
-
boxShadowHover:
|
|
864
|
+
boxShadowHover: string;
|
|
857
865
|
boxShadowActive: string;
|
|
858
866
|
boxShadowFocus: string;
|
|
859
867
|
caretColor: string;
|
|
@@ -864,7 +872,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
864
872
|
borderHoverWarning: string;
|
|
865
873
|
borderActiveWarning: string;
|
|
866
874
|
borderFocusWarning: string;
|
|
867
|
-
boxShadowHoverWarning:
|
|
875
|
+
boxShadowHoverWarning: string;
|
|
868
876
|
boxShadowActiveWarning: string;
|
|
869
877
|
boxShadowFocusWarning: string;
|
|
870
878
|
colorActiveWarning: string;
|
|
@@ -873,7 +881,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
873
881
|
borderHoverError: string;
|
|
874
882
|
borderActiveError: string;
|
|
875
883
|
borderFocusError: string;
|
|
876
|
-
boxShadowHoverError:
|
|
884
|
+
boxShadowHoverError: string;
|
|
877
885
|
boxShadowActiveError: string;
|
|
878
886
|
boxShadowFocusError: string;
|
|
879
887
|
colorActiveError: string;
|
|
@@ -990,6 +998,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
990
998
|
mergedDisabled: import("vue").ComputedRef<boolean>;
|
|
991
999
|
focused: import("vue").Ref<boolean>;
|
|
992
1000
|
activeWithoutMenuOpen: import("vue").Ref<boolean>;
|
|
1001
|
+
disableInlineTheme: boolean | undefined;
|
|
993
1002
|
onTriggerInputFocus: () => void;
|
|
994
1003
|
onTriggerInputBlur: () => void;
|
|
995
1004
|
handleMenuFocus: (e: FocusEvent) => void;
|
|
@@ -1138,7 +1147,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1138
1147
|
borderHover: string;
|
|
1139
1148
|
borderActive: string;
|
|
1140
1149
|
borderFocus: string;
|
|
1141
|
-
boxShadowHover:
|
|
1150
|
+
boxShadowHover: string;
|
|
1142
1151
|
boxShadowActive: string;
|
|
1143
1152
|
boxShadowFocus: string;
|
|
1144
1153
|
caretColor: string;
|
|
@@ -1149,7 +1158,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1149
1158
|
borderHoverWarning: string;
|
|
1150
1159
|
borderActiveWarning: string;
|
|
1151
1160
|
borderFocusWarning: string;
|
|
1152
|
-
boxShadowHoverWarning:
|
|
1161
|
+
boxShadowHoverWarning: string;
|
|
1153
1162
|
boxShadowActiveWarning: string;
|
|
1154
1163
|
boxShadowFocusWarning: string;
|
|
1155
1164
|
colorActiveWarning: string;
|
|
@@ -1158,7 +1167,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1158
1167
|
borderHoverError: string;
|
|
1159
1168
|
borderActiveError: string;
|
|
1160
1169
|
borderFocusError: string;
|
|
1161
|
-
boxShadowHoverError:
|
|
1170
|
+
boxShadowHoverError: string;
|
|
1162
1171
|
boxShadowActiveError: string;
|
|
1163
1172
|
boxShadowFocusError: string;
|
|
1164
1173
|
colorActiveError: string;
|
|
@@ -1296,6 +1305,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1296
1305
|
readonly default: undefined;
|
|
1297
1306
|
};
|
|
1298
1307
|
readonly clearable: BooleanConstructor;
|
|
1308
|
+
readonly clearFilterAfterSelect: {
|
|
1309
|
+
readonly type: BooleanConstructor;
|
|
1310
|
+
readonly default: true;
|
|
1311
|
+
};
|
|
1299
1312
|
readonly options: {
|
|
1300
1313
|
readonly type: PropType<SelectMixedOption[]>;
|
|
1301
1314
|
readonly default: () => never[];
|
|
@@ -1408,7 +1421,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1408
1421
|
borderHover: string;
|
|
1409
1422
|
borderActive: string;
|
|
1410
1423
|
borderFocus: string;
|
|
1411
|
-
boxShadowHover:
|
|
1424
|
+
boxShadowHover: string;
|
|
1412
1425
|
boxShadowActive: string;
|
|
1413
1426
|
boxShadowFocus: string;
|
|
1414
1427
|
caretColor: string;
|
|
@@ -1419,7 +1432,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1419
1432
|
borderHoverWarning: string;
|
|
1420
1433
|
borderActiveWarning: string;
|
|
1421
1434
|
borderFocusWarning: string;
|
|
1422
|
-
boxShadowHoverWarning:
|
|
1435
|
+
boxShadowHoverWarning: string;
|
|
1423
1436
|
boxShadowActiveWarning: string;
|
|
1424
1437
|
boxShadowFocusWarning: string;
|
|
1425
1438
|
colorActiveWarning: string;
|
|
@@ -1428,7 +1441,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1428
1441
|
borderHoverError: string;
|
|
1429
1442
|
borderActiveError: string;
|
|
1430
1443
|
borderFocusError: string;
|
|
1431
|
-
boxShadowHoverError:
|
|
1444
|
+
boxShadowHoverError: string;
|
|
1432
1445
|
boxShadowActiveError: string;
|
|
1433
1446
|
boxShadowFocusError: string;
|
|
1434
1447
|
colorActiveError: string;
|
|
@@ -1533,7 +1546,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1533
1546
|
borderHover: string;
|
|
1534
1547
|
borderActive: string;
|
|
1535
1548
|
borderFocus: string;
|
|
1536
|
-
boxShadowHover:
|
|
1549
|
+
boxShadowHover: string;
|
|
1537
1550
|
boxShadowActive: string;
|
|
1538
1551
|
boxShadowFocus: string;
|
|
1539
1552
|
caretColor: string;
|
|
@@ -1544,7 +1557,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1544
1557
|
borderHoverWarning: string;
|
|
1545
1558
|
borderActiveWarning: string;
|
|
1546
1559
|
borderFocusWarning: string;
|
|
1547
|
-
boxShadowHoverWarning:
|
|
1560
|
+
boxShadowHoverWarning: string;
|
|
1548
1561
|
boxShadowActiveWarning: string;
|
|
1549
1562
|
boxShadowFocusWarning: string;
|
|
1550
1563
|
colorActiveWarning: string;
|
|
@@ -1553,7 +1566,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1553
1566
|
borderHoverError: string;
|
|
1554
1567
|
borderActiveError: string;
|
|
1555
1568
|
borderFocusError: string;
|
|
1556
|
-
boxShadowHoverError:
|
|
1569
|
+
boxShadowHoverError: string;
|
|
1557
1570
|
boxShadowActiveError: string;
|
|
1558
1571
|
boxShadowFocusError: string;
|
|
1559
1572
|
colorActiveError: string;
|
|
@@ -1658,7 +1671,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1658
1671
|
borderHover: string;
|
|
1659
1672
|
borderActive: string;
|
|
1660
1673
|
borderFocus: string;
|
|
1661
|
-
boxShadowHover:
|
|
1674
|
+
boxShadowHover: string;
|
|
1662
1675
|
boxShadowActive: string;
|
|
1663
1676
|
boxShadowFocus: string;
|
|
1664
1677
|
caretColor: string;
|
|
@@ -1669,7 +1682,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1669
1682
|
borderHoverWarning: string;
|
|
1670
1683
|
borderActiveWarning: string;
|
|
1671
1684
|
borderFocusWarning: string;
|
|
1672
|
-
boxShadowHoverWarning:
|
|
1685
|
+
boxShadowHoverWarning: string;
|
|
1673
1686
|
boxShadowActiveWarning: string;
|
|
1674
1687
|
boxShadowFocusWarning: string;
|
|
1675
1688
|
colorActiveWarning: string;
|
|
@@ -1678,7 +1691,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1678
1691
|
borderHoverError: string;
|
|
1679
1692
|
borderActiveError: string;
|
|
1680
1693
|
borderFocusError: string;
|
|
1681
|
-
boxShadowHoverError:
|
|
1694
|
+
boxShadowHoverError: string;
|
|
1682
1695
|
boxShadowActiveError: string;
|
|
1683
1696
|
boxShadowFocusError: string;
|
|
1684
1697
|
colorActiveError: string;
|
|
@@ -1767,8 +1780,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1767
1780
|
disabled: boolean | undefined;
|
|
1768
1781
|
to: string | boolean | HTMLElement;
|
|
1769
1782
|
options: SelectMixedOption[];
|
|
1770
|
-
bordered: boolean | undefined;
|
|
1771
1783
|
loading: boolean;
|
|
1784
|
+
bordered: boolean | undefined;
|
|
1772
1785
|
placement: FollowerPlacement;
|
|
1773
1786
|
virtualScroll: boolean;
|
|
1774
1787
|
resetMenuOnOptionsChange: boolean;
|
|
@@ -1776,6 +1789,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1776
1789
|
displayDirective: "show" | "if";
|
|
1777
1790
|
filterable: boolean;
|
|
1778
1791
|
clearable: boolean;
|
|
1792
|
+
clearFilterAfterSelect: boolean;
|
|
1779
1793
|
defaultValue: Value | null;
|
|
1780
1794
|
remote: boolean;
|
|
1781
1795
|
widthMode: string;
|
package/lib/select/src/Select.js
CHANGED
|
@@ -18,7 +18,10 @@ const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
|
18
18
|
const selectProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { to: _utils_1.useAdjustedTo.propTo, bordered: {
|
|
19
19
|
type: Boolean,
|
|
20
20
|
default: undefined
|
|
21
|
-
}, clearable: Boolean,
|
|
21
|
+
}, clearable: Boolean, clearFilterAfterSelect: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
}, options: {
|
|
22
25
|
type: Array,
|
|
23
26
|
default: () => []
|
|
24
27
|
}, defaultValue: {
|
|
@@ -85,7 +88,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
85
88
|
}
|
|
86
89
|
});
|
|
87
90
|
}
|
|
88
|
-
const { mergedClsPrefixRef, mergedBorderedRef, namespaceRef } = (0, _mixins_1.useConfig)(props);
|
|
91
|
+
const { mergedClsPrefixRef, mergedBorderedRef, namespaceRef, NConfigProvider } = (0, _mixins_1.useConfig)(props);
|
|
89
92
|
const themeRef = (0, _mixins_1.useTheme)('Select', '-select', index_cssr_1.default, styles_1.selectLight, props, mergedClsPrefixRef);
|
|
90
93
|
const uncontrolledValueRef = (0, vue_1.ref)(props.defaultValue);
|
|
91
94
|
const controlledValueRef = (0, vue_1.toRef)(props, 'value');
|
|
@@ -361,7 +364,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
361
364
|
function handleToggleByOption(option) {
|
|
362
365
|
if (mergedDisabledRef.value)
|
|
363
366
|
return;
|
|
364
|
-
const { tag, remote } = props;
|
|
367
|
+
const { tag, remote, clearFilterAfterSelect } = props;
|
|
365
368
|
if (tag && !remote) {
|
|
366
369
|
const { value: beingCreatedOptions } = beingCreatedOptionsRef;
|
|
367
370
|
const beingCreatedOption = beingCreatedOptions[0] || null;
|
|
@@ -382,13 +385,15 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
382
385
|
const createdOptionIndex = getCreatedOptionIndex(option.value);
|
|
383
386
|
if (~createdOptionIndex) {
|
|
384
387
|
createdOptionsRef.value.splice(createdOptionIndex, 1);
|
|
385
|
-
|
|
388
|
+
if (clearFilterAfterSelect)
|
|
389
|
+
patternRef.value = '';
|
|
386
390
|
}
|
|
387
391
|
}
|
|
388
392
|
}
|
|
389
393
|
else {
|
|
390
394
|
changedValue.push(option.value);
|
|
391
|
-
|
|
395
|
+
if (clearFilterAfterSelect)
|
|
396
|
+
patternRef.value = '';
|
|
392
397
|
}
|
|
393
398
|
doUpdateValue(changedValue, getMergedOptions(changedValue));
|
|
394
399
|
}
|
|
@@ -568,7 +573,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
568
573
|
}
|
|
569
574
|
};
|
|
570
575
|
return Object.assign(Object.assign({}, exposedMethods), { mergedStatus: mergedStatusRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, namespace: namespaceRef, treeMate: treeMateRef, isMounted: (0, vooks_1.useIsMounted)(), triggerRef,
|
|
571
|
-
menuRef, pattern: patternRef, uncontrolledShow: uncontrolledShowRef, mergedShow: mergedShowRef, adjustedTo: (0, _utils_1.useAdjustedTo)(props), uncontrolledValue: uncontrolledValueRef, mergedValue: mergedValueRef, followerRef, localizedPlaceholder: localizedPlaceholderRef, selectedOption: selectedOptionRef, selectedOptions: selectedOptionsRef, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, focused: focusedRef, activeWithoutMenuOpen: activeWithoutMenuOpenRef, onTriggerInputFocus,
|
|
576
|
+
menuRef, pattern: patternRef, uncontrolledShow: uncontrolledShowRef, mergedShow: mergedShowRef, adjustedTo: (0, _utils_1.useAdjustedTo)(props), uncontrolledValue: uncontrolledValueRef, mergedValue: mergedValueRef, followerRef, localizedPlaceholder: localizedPlaceholderRef, selectedOption: selectedOptionRef, selectedOptions: selectedOptionsRef, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, focused: focusedRef, activeWithoutMenuOpen: activeWithoutMenuOpenRef, disableInlineTheme: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme, onTriggerInputFocus,
|
|
572
577
|
onTriggerInputBlur,
|
|
573
578
|
handleMenuFocus,
|
|
574
579
|
handleMenuBlur,
|
|
@@ -593,7 +598,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
593
598
|
(0, vue_1.h)(vueuc_1.VBinder, null, {
|
|
594
599
|
default: () => [
|
|
595
600
|
(0, vue_1.h)(vueuc_1.VTarget, null, {
|
|
596
|
-
default: () => ((0, vue_1.h)(_internal_1.NInternalSelection, { ref: "triggerRef", status: this.mergedStatus, inputProps: this.inputProps, clsPrefix: this.mergedClsPrefix, showArrow: this.showArrow, maxTagCount: this.maxTagCount, bordered: this.mergedBordered, active: this.activeWithoutMenuOpen || this.mergedShow, pattern: this.pattern, placeholder: this.localizedPlaceholder, selectedOption: this.selectedOption, selectedOptions: this.selectedOptions, multiple: this.multiple, renderTag: this.renderTag, renderLabel: this.renderLabel, filterable: this.filterable, clearable: this.clearable, disabled: this.mergedDisabled, size: this.mergedSize, theme: this.mergedTheme.peers.InternalSelection, themeOverrides: this.mergedTheme.peerOverrides.InternalSelection, loading: this.loading, focused: this.focused, onClick: this.handleTriggerClick, onDeleteOption: this.handleDeleteOption, onPatternInput: this.handlePatternInput, onClear: this.handleClear, onBlur: this.handleTriggerBlur, onFocus: this.handleTriggerFocus, onKeydown: this.handleKeydown, onPatternBlur: this.onTriggerInputBlur, onPatternFocus: this.onTriggerInputFocus }, {
|
|
601
|
+
default: () => ((0, vue_1.h)(_internal_1.NInternalSelection, { ref: "triggerRef", disableInlineTheme: this.disableInlineTheme, status: this.mergedStatus, inputProps: this.inputProps, clsPrefix: this.mergedClsPrefix, showArrow: this.showArrow, maxTagCount: this.maxTagCount, bordered: this.mergedBordered, active: this.activeWithoutMenuOpen || this.mergedShow, pattern: this.pattern, placeholder: this.localizedPlaceholder, selectedOption: this.selectedOption, selectedOptions: this.selectedOptions, multiple: this.multiple, renderTag: this.renderTag, renderLabel: this.renderLabel, filterable: this.filterable, clearable: this.clearable, disabled: this.mergedDisabled, size: this.mergedSize, theme: this.mergedTheme.peers.InternalSelection, themeOverrides: this.mergedTheme.peerOverrides.InternalSelection, loading: this.loading, focused: this.focused, onClick: this.handleTriggerClick, onDeleteOption: this.handleDeleteOption, onPatternInput: this.handlePatternInput, onClear: this.handleClear, onBlur: this.handleTriggerBlur, onFocus: this.handleTriggerFocus, onKeydown: this.handleKeydown, onPatternBlur: this.onTriggerInputBlur, onPatternFocus: this.onTriggerInputFocus }, {
|
|
597
602
|
arrow: () => { var _a, _b; return [(_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)]; }
|
|
598
603
|
}))
|
|
599
604
|
}),
|
|
@@ -603,7 +608,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
603
608
|
var _a, _b;
|
|
604
609
|
return (this.mergedShow ||
|
|
605
610
|
this.displayDirective === 'show') &&
|
|
606
|
-
(0, vue_1.withDirectives)((0, vue_1.h)(_internal_1.NInternalSelectMenu, Object.assign({}, this.menuProps, { ref: "menuRef", virtualScroll: this.consistentMenuWidth && this.virtualScroll, class: [
|
|
611
|
+
(0, vue_1.withDirectives)((0, vue_1.h)(_internal_1.NInternalSelectMenu, Object.assign({}, this.menuProps, { ref: "menuRef", disableInlineTheme: this.disableInlineTheme, virtualScroll: this.consistentMenuWidth && this.virtualScroll, class: [
|
|
607
612
|
`${this.mergedClsPrefix}-select-menu`,
|
|
608
613
|
(_a = this.menuProps) === null || _a === void 0 ? void 0 : _a.class
|
|
609
614
|
], clsPrefix: this.mergedClsPrefix, focusable: true, autoPending: true, theme: this.mergedTheme.peers.InternalSelectMenu, themeOverrides: this.mergedTheme.peerOverrides
|
|
@@ -26,7 +26,7 @@ declare const selectLight: import("../../_mixins").Theme<"Select", {
|
|
|
26
26
|
borderHover: string;
|
|
27
27
|
borderActive: string;
|
|
28
28
|
borderFocus: string;
|
|
29
|
-
boxShadowHover:
|
|
29
|
+
boxShadowHover: string;
|
|
30
30
|
boxShadowActive: string;
|
|
31
31
|
boxShadowFocus: string;
|
|
32
32
|
caretColor: string;
|
|
@@ -37,7 +37,7 @@ declare const selectLight: import("../../_mixins").Theme<"Select", {
|
|
|
37
37
|
borderHoverWarning: string;
|
|
38
38
|
borderActiveWarning: string;
|
|
39
39
|
borderFocusWarning: string;
|
|
40
|
-
boxShadowHoverWarning:
|
|
40
|
+
boxShadowHoverWarning: string;
|
|
41
41
|
boxShadowActiveWarning: string;
|
|
42
42
|
boxShadowFocusWarning: string;
|
|
43
43
|
colorActiveWarning: string;
|
|
@@ -46,7 +46,7 @@ declare const selectLight: import("../../_mixins").Theme<"Select", {
|
|
|
46
46
|
borderHoverError: string;
|
|
47
47
|
borderActiveError: string;
|
|
48
48
|
borderFocusError: string;
|
|
49
|
-
boxShadowHoverError:
|
|
49
|
+
boxShadowHoverError: string;
|
|
50
50
|
boxShadowActiveError: string;
|
|
51
51
|
boxShadowFocusError: string;
|
|
52
52
|
colorActiveError: string;
|
package/lib/tag/src/Tag.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare const tagProps: {
|
|
|
26
26
|
};
|
|
27
27
|
color: PropType<import("./common-props").TagColor>;
|
|
28
28
|
type: {
|
|
29
|
-
readonly type: PropType<"default" | "
|
|
29
|
+
readonly type: PropType<"default" | "error" | "info" | "success" | "warning" | "primary">;
|
|
30
30
|
readonly default: "default";
|
|
31
31
|
};
|
|
32
32
|
round: BooleanConstructor;
|
|
@@ -251,7 +251,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
251
251
|
};
|
|
252
252
|
color: PropType<import("./common-props").TagColor>;
|
|
253
253
|
type: {
|
|
254
|
-
readonly type: PropType<"default" | "
|
|
254
|
+
readonly type: PropType<"default" | "error" | "info" | "success" | "warning" | "primary">;
|
|
255
255
|
readonly default: "default";
|
|
256
256
|
};
|
|
257
257
|
round: BooleanConstructor;
|
|
@@ -451,6 +451,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
451
451
|
closeMarginRtl: string;
|
|
452
452
|
}, any>>>;
|
|
453
453
|
}, {
|
|
454
|
+
themeClass?: Ref<string> | undefined;
|
|
455
|
+
onRender?: (() => void) | undefined;
|
|
454
456
|
rtlEnabled: Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
455
457
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
456
458
|
contentRef: Ref<HTMLElement | null>;
|
|
@@ -485,7 +487,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
485
487
|
'--n-text-color-checked': string;
|
|
486
488
|
'--n-text-color-hover-checkable': string;
|
|
487
489
|
'--n-text-color-pressed-checkable': string;
|
|
488
|
-
}
|
|
490
|
+
}> | undefined;
|
|
489
491
|
setTextContent: (textContent: string) => void;
|
|
490
492
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
491
493
|
bordered: {
|
|
@@ -507,7 +509,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
507
509
|
};
|
|
508
510
|
color: PropType<import("./common-props").TagColor>;
|
|
509
511
|
type: {
|
|
510
|
-
readonly type: PropType<"default" | "
|
|
512
|
+
readonly type: PropType<"default" | "error" | "info" | "success" | "warning" | "primary">;
|
|
511
513
|
readonly default: "default";
|
|
512
514
|
};
|
|
513
515
|
round: BooleanConstructor;
|
|
@@ -707,7 +709,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
707
709
|
closeMarginRtl: string;
|
|
708
710
|
}, any>>>;
|
|
709
711
|
}>>, {
|
|
710
|
-
type: "default" | "
|
|
712
|
+
type: "default" | "error" | "info" | "success" | "warning" | "primary";
|
|
711
713
|
round: boolean;
|
|
712
714
|
size: "small" | "medium" | "large";
|
|
713
715
|
disabled: boolean | undefined;
|
package/lib/tag/src/Tag.js
CHANGED
|
@@ -72,45 +72,65 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
const rtlEnabledRef = (0, use_rtl_1.default)('Tag', NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef, mergedClsPrefixRef);
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
const disableInlineTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme;
|
|
76
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
77
|
+
const { type, size, color: { color, textColor } = {} } = props;
|
|
78
|
+
const { common: { cubicBezierEaseInOut }, self: { padding, closeMargin, closeMarginRtl, borderRadius, opacityDisabled, textColorCheckable, textColorHoverCheckable, textColorPressedCheckable, textColorChecked, colorCheckable, colorHoverCheckable, colorPressedCheckable, colorChecked, colorCheckedHover, colorCheckedPressed, [(0, _utils_1.createKey)('closeSize', size)]: closeSize, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('height', size)]: height, [(0, _utils_1.createKey)('color', type)]: typedColor, [(0, _utils_1.createKey)('textColor', type)]: typeTextColor, [(0, _utils_1.createKey)('border', type)]: border, [(0, _utils_1.createKey)('closeColor', type)]: closeColor, [(0, _utils_1.createKey)('closeColorHover', type)]: closeColorHover, [(0, _utils_1.createKey)('closeColorPressed', type)]: closeColorPressed } } = themeRef.value;
|
|
79
|
+
return {
|
|
80
|
+
'--n-avatar-size-override': `calc(${height} - 8px)`,
|
|
81
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
82
|
+
'--n-border-radius': borderRadius,
|
|
83
|
+
'--n-border': border,
|
|
84
|
+
'--n-close-color': closeColor,
|
|
85
|
+
'--n-close-color-hover': closeColorHover,
|
|
86
|
+
'--n-close-color-pressed': closeColorPressed,
|
|
87
|
+
'--n-close-color-disabled': closeColor,
|
|
88
|
+
'--n-close-margin': closeMargin,
|
|
89
|
+
'--n-close-margin-rtl': closeMarginRtl,
|
|
90
|
+
'--n-close-size': closeSize,
|
|
91
|
+
'--n-color': color || typedColor,
|
|
92
|
+
'--n-color-checkable': colorCheckable,
|
|
93
|
+
'--n-color-checked': colorChecked,
|
|
94
|
+
'--n-color-checked-hover': colorCheckedHover,
|
|
95
|
+
'--n-color-checked-pressed': colorCheckedPressed,
|
|
96
|
+
'--n-color-hover-checkable': colorHoverCheckable,
|
|
97
|
+
'--n-color-pressed-checkable': colorPressedCheckable,
|
|
98
|
+
'--n-font-size': fontSize,
|
|
99
|
+
'--n-height': height,
|
|
100
|
+
'--n-opacity-disabled': opacityDisabled,
|
|
101
|
+
'--n-padding': padding,
|
|
102
|
+
'--n-text-color': textColor || typeTextColor,
|
|
103
|
+
'--n-text-color-checkable': textColorCheckable,
|
|
104
|
+
'--n-text-color-checked': textColorChecked,
|
|
105
|
+
'--n-text-color-hover-checkable': textColorHoverCheckable,
|
|
106
|
+
'--n-text-color-pressed-checkable': textColorPressedCheckable
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
const themeClassHandle = disableInlineTheme
|
|
110
|
+
? (0, _mixins_1.useThemeClass)('tag', (0, vue_1.computed)(() => {
|
|
111
|
+
let hash = '';
|
|
77
112
|
const { type, size, color: { color, textColor } = {} } = props;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
'--n-color': color || typedColor,
|
|
92
|
-
'--n-color-checkable': colorCheckable,
|
|
93
|
-
'--n-color-checked': colorChecked,
|
|
94
|
-
'--n-color-checked-hover': colorCheckedHover,
|
|
95
|
-
'--n-color-checked-pressed': colorCheckedPressed,
|
|
96
|
-
'--n-color-hover-checkable': colorHoverCheckable,
|
|
97
|
-
'--n-color-pressed-checkable': colorPressedCheckable,
|
|
98
|
-
'--n-font-size': fontSize,
|
|
99
|
-
'--n-height': height,
|
|
100
|
-
'--n-opacity-disabled': opacityDisabled,
|
|
101
|
-
'--n-padding': padding,
|
|
102
|
-
'--n-text-color': textColor || typeTextColor,
|
|
103
|
-
'--n-text-color-checkable': textColorCheckable,
|
|
104
|
-
'--n-text-color-checked': textColorChecked,
|
|
105
|
-
'--n-text-color-hover-checkable': textColorHoverCheckable,
|
|
106
|
-
'--n-text-color-pressed-checkable': textColorPressedCheckable
|
|
107
|
-
};
|
|
108
|
-
}) });
|
|
113
|
+
hash += type[0];
|
|
114
|
+
hash += size[0];
|
|
115
|
+
if (color) {
|
|
116
|
+
hash += `a${(0, _utils_1.color2Class)(color)}`;
|
|
117
|
+
}
|
|
118
|
+
if (textColor) {
|
|
119
|
+
hash += `b${(0, _utils_1.color2Class)(textColor)}`;
|
|
120
|
+
}
|
|
121
|
+
return hash;
|
|
122
|
+
}), cssVarsRef, props)
|
|
123
|
+
: _mixins_1.emptyThemeClassHandle;
|
|
124
|
+
return Object.assign(Object.assign(Object.assign({}, tagPublicMethods), { rtlEnabled: rtlEnabledRef, mergedClsPrefix: mergedClsPrefixRef, contentRef, mergedBordered: mergedBorderedRef, handleClick,
|
|
125
|
+
handleCloseClick, cssVars: disableInlineTheme ? undefined : cssVarsRef }), themeClassHandle);
|
|
109
126
|
},
|
|
110
127
|
render() {
|
|
111
|
-
|
|
128
|
+
var _a, _b;
|
|
129
|
+
const { mergedClsPrefix, rtlEnabled, color: { borderColor } = {}, onRender, $slots } = this;
|
|
130
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
112
131
|
return ((0, vue_1.h)("div", { class: [
|
|
113
132
|
`${mergedClsPrefix}-tag`,
|
|
133
|
+
this.themeClass,
|
|
114
134
|
{
|
|
115
135
|
[`${mergedClsPrefix}-tag--rtl`]: rtlEnabled,
|
|
116
136
|
[`${mergedClsPrefix}-tag--disabled`]: this.disabled,
|
|
@@ -119,10 +139,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
119
139
|
[`${mergedClsPrefix}-tag--round`]: this.round
|
|
120
140
|
}
|
|
121
141
|
], style: this.cssVars, onClick: this.handleClick, onMouseenter: this.onMouseenter, onMouseleave: this.onMouseleave },
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
(0, vue_1.h)("span", { class: `${mergedClsPrefix}-tag__content`, ref: "contentRef" }, this.$slots),
|
|
142
|
+
(0, _utils_1.resolveWrappedSlot)($slots.avatar, (children) => [
|
|
143
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-tag__avatar` }, children)
|
|
144
|
+
]),
|
|
145
|
+
(0, vue_1.h)("span", { class: `${mergedClsPrefix}-tag__content`, ref: "contentRef" }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)),
|
|
126
146
|
!this.checkable && this.closable ? ((0, vue_1.h)(_internal_1.NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-tag__close`, disabled: this.disabled, onClick: this.handleCloseClick })) : null,
|
|
127
147
|
!this.checkable && this.mergedBordered ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tag__border`, style: { borderColor } })) : null));
|
|
128
148
|
}
|
|
@@ -7,7 +7,7 @@ export interface TagColor {
|
|
|
7
7
|
declare const _default: {
|
|
8
8
|
readonly color: PropType<TagColor>;
|
|
9
9
|
readonly type: {
|
|
10
|
-
readonly type: PropType<"default" | "
|
|
10
|
+
readonly type: PropType<"default" | "error" | "info" | "success" | "warning" | "primary">;
|
|
11
11
|
readonly default: "default";
|
|
12
12
|
};
|
|
13
13
|
readonly round: BooleanConstructor;
|
|
@@ -85,5 +85,5 @@ exports.default = (0, cssr_1.cB)('tag', `
|
|
|
85
85
|
background-color: var(--n-color-checkable);
|
|
86
86
|
`, [(0, cssr_1.cNotM)('disabled', [(0, cssr_1.c)('&:hover', 'background-color: var(--n-color-hover-checkable);', [(0, cssr_1.cNotM)('checked', 'color: var(--n-text-color-hover-checkable);')]), (0, cssr_1.c)('&:active', 'background-color: var(--n-color-pressed-checkable);', [(0, cssr_1.cNotM)('checked', 'color: var(--n-text-color-pressed-checkable);')])]), (0, cssr_1.cM)('checked', `
|
|
87
87
|
color: var(--n-text-color-checked);
|
|
88
|
-
background-color:
|
|
88
|
+
background-color: var(--n-color-checked);
|
|
89
89
|
`, [(0, cssr_1.cNotM)('disabled', [(0, cssr_1.c)('&:hover', 'background-color: var(--n-color-checked-hover);'), (0, cssr_1.c)('&:active', 'background-color: var(--n-color-checked-pressed);')])])])]);
|