@ironsource/shared-ui 2.2.0-test.2 → 2.2.0-test.20
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/AppHeader.vue_vue_type_style_index_0_scoped_18bc6c0d_lang.css +1 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_a59af1ad_lang.css +1 -0
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_a44769fd_lang.css +1 -0
- package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_6eae923a_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_3ed9f4bc_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_3a061c08_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_6de5cddb_lang.css +1 -0
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_d59af062_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_0967498f_lang.css +1 -0
- package/DateRange.vue_vue_type_style_index_0_scoped_25d03907_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_f8826716_lang.css +1 -0
- package/IconV4.vue_vue_type_style_index_0_scoped_6683c5b5_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_9fa1921a_lang.css +1 -0
- package/SectionDropdown.vue_vue_type_style_index_0_scoped_65877e48_lang.css +1 -0
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_35c79635_lang.css +1 -0
- package/SwitchV4.vue_vue_type_style_index_0_scoped_b71a806e_lang.css +1 -0
- package/Tag.vue_vue_type_style_index_0_scoped_78f19cb0_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_a8aebfee_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/components/appHeader/AppHeader.vue.js +3 -3
- package/components/appHeader/AppHeader.vue2.js +43 -44
- package/components/button/v3/Button.vue.d.ts +6 -6
- package/components/button/v3/index.d.ts +14 -14
- package/components/button/v4/ButtonV4.vue.js +3 -3
- package/components/button/v4/ButtonV4.vue2.js +1 -1
- package/components/chart/Chart.vue.d.ts +5 -0
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +14 -12
- package/components/chart/ChartHeader.vue.d.ts +5 -0
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +73 -49
- package/components/chart/ChartPlane.vue.d.ts +5 -0
- package/components/chart/ChartPlane.vue.js +3 -3
- package/components/chart/ChartPlane.vue2.js +33 -31
- package/components/chart/ChartStoryArgs.d.ts +6 -0
- package/components/chart/index.d.ts +20 -1
- package/components/columnConfigurator/SectionDropdown.vue.js +3 -3
- package/components/columnConfigurator/SectionDropdown.vue2.js +6 -7
- package/components/columnPicker/ColumnPicker.vue.d.ts +2 -0
- package/components/columnPicker/ColumnPicker.vue.js +3 -3
- package/components/columnPicker/ColumnPicker.vue2.js +173 -153
- package/components/columnPicker/index.d.ts +7 -1
- package/components/dateRange/common/CalendarMonth.common.js +46 -41
- package/components/dateRange/common/DateRange.common.d.ts +1 -0
- package/components/dateRange/common/DateRange.common.js +39 -38
- package/components/dateRange/common/consts.common.d.ts +5 -0
- package/components/dateRange/common/consts.common.js +9 -0
- package/components/dateRange/v3/CalendarMonth.vue.d.ts +5 -0
- package/components/dateRange/v3/CalendarMonth.vue.js +3 -3
- package/components/dateRange/v3/CalendarMonth.vue2.js +6 -5
- package/components/dateRange/v3/DateRange.vue.d.ts +8 -3
- package/components/dateRange/v3/DateRange.vue.js +2 -2
- package/components/dateRange/v3/DateRange.vue2.js +2 -1
- package/components/dateRange/v3/DateRangePicker.vue.d.ts +3 -3
- package/components/dateRange/v3/index.d.ts +27 -8
- package/components/dateRange/v4/CalendarMonthV4.vue.d.ts +5 -0
- package/components/dateRange/v4/CalendarMonthV4.vue.js +4 -4
- package/components/dateRange/v4/CalendarMonthV4.vue2.js +12 -11
- package/components/dateRange/v4/DateRangePickerV4.vue.d.ts +3 -3
- package/components/dateRange/v4/DateRangeV4.vue.d.ts +8 -3
- package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
- package/components/dateRange/v4/DateRangeV4.vue2.js +104 -101
- package/components/dateRange/v4/index.d.ts +27 -8
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +1 -1
- package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
- package/components/emptyState/v3/index.d.ts +7 -7
- package/components/icon/v4/IconV4.vue.d.ts +5 -0
- package/components/icon/v4/IconV4.vue.js +2 -2
- package/components/icon/v4/IconV4.vue2.js +27 -26
- package/components/icon/v4/index.d.ts +20 -1
- package/components/includeExclude/index.d.ts +16 -16
- package/components/inlineCopy/InlineCopy.vue.d.ts +15 -0
- package/components/inlineCopy/InlineCopy.vue.js +2 -2
- package/components/inlineCopy/InlineCopy.vue2.js +80 -51
- package/components/inlineCopy/index.d.ts +27 -0
- package/components/snackbar/common/notify.js +25 -25
- package/components/snackbar/common/snackbar.common.js +19 -19
- package/components/snackbar/common/snackbar.types.d.ts +2 -1
- package/components/snackbar/v4/SnackbarV4.vue.d.ts +8 -1
- package/components/snackbar/v4/SnackbarV4.vue.js +2 -2
- package/components/snackbar/v4/SnackbarV4.vue2.js +85 -64
- package/components/switch/v4/SwitchV4.vue.d.ts +5 -0
- package/components/switch/v4/SwitchV4.vue.js +4 -4
- package/components/switch/v4/SwitchV4.vue2.js +14 -13
- package/components/switch/v4/index.d.ts +9 -0
- package/components/table/v4/DataGrid.vue.d.ts +2 -0
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +82 -80
- package/components/table/v4/index.d.ts +7 -1
- package/components/table-cells/v3/Editable.vue.d.ts +1 -1
- package/components/table-cells/v3/index.d.ts +20 -20
- package/components/table-cells/v4/EditableV4.vue.d.ts +1 -1
- package/components/table-cells/v4/index.d.ts +20 -20
- package/components/tag/Tag.vue.d.ts +112 -0
- package/components/tag/Tag.vue.js +7 -0
- package/components/tag/Tag.vue2.js +221 -0
- package/components/tag/index.d.ts +161 -0
- package/components/tag/index.js +6 -0
- package/components/tagsField/index.d.ts +42 -3
- package/components/tagsField/index.js +6 -4
- package/components/tooltip/v4/TooltipV4.vue.d.ts +5 -0
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +76 -36
- package/components/tooltip/v4/index.d.ts +20 -1
- package/design-foundation.stories/colors/ColorsData.d.ts +1 -0
- package/index.d.ts +281 -82
- package/index.js +84 -78
- package/package.json +2 -7
- package/style/v4/colors.scss +1 -1
- package/style/v4/grid.css +1 -1
- package/style/v4/grid.css.map +1 -1
- package/AppHeader.vue_vue_type_style_index_0_scoped_9202b5db_lang.css +0 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_afe44a65_lang.css +0 -1
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_acd3440c_lang.css +0 -1
- package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_b0d3ea50_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_060d02be_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_d90c583e_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_3c887f7e_lang.css +0 -1
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_01c4e08f_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_cd41c5ca_lang.css +0 -1
- package/DateRange.vue_vue_type_style_index_0_scoped_70e316e9_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +0 -1
- package/IconV4.vue_vue_type_style_index_0_scoped_dc433d48_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +0 -1
- package/SectionDropdown.vue_vue_type_style_index_0_scoped_cfad60a8_lang.css +0 -1
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_1b650c39_lang.css +0 -1
- package/SwitchV4.vue_vue_type_style_index_0_scoped_0a80c49f_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_lang.css +0 -1
|
@@ -6,10 +6,10 @@ declare const EditableTypes: () => ({
|
|
|
6
6
|
$props: Partial<{
|
|
7
7
|
type: "input" | "dropdown";
|
|
8
8
|
cell: string;
|
|
9
|
+
isLoading: boolean;
|
|
9
10
|
withIcons: boolean;
|
|
10
11
|
saveOnClickOutside: boolean;
|
|
11
12
|
validateFunction: (value: unknown) => string | boolean;
|
|
12
|
-
isLoading: boolean;
|
|
13
13
|
displayValue: (option: unknown) => unknown;
|
|
14
14
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
15
15
|
type: {
|
|
@@ -21,6 +21,10 @@ declare const EditableTypes: () => ({
|
|
|
21
21
|
type: import("vue").PropType<string>;
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
|
+
isLoading: {
|
|
25
|
+
type: import("vue").PropType<boolean>;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
24
28
|
withIcons: {
|
|
25
29
|
type: import("vue").PropType<boolean>;
|
|
26
30
|
default: boolean;
|
|
@@ -33,10 +37,6 @@ declare const EditableTypes: () => ({
|
|
|
33
37
|
type: import("vue").PropType<(value: unknown) => string | boolean>;
|
|
34
38
|
default: () => false;
|
|
35
39
|
};
|
|
36
|
-
isLoading: {
|
|
37
|
-
type: import("vue").PropType<boolean>;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
40
|
rowIndex: {
|
|
41
41
|
type: import("vue").PropType<number>;
|
|
42
42
|
required: true;
|
|
@@ -49,7 +49,7 @@ declare const EditableTypes: () => ({
|
|
|
49
49
|
type: import("vue").PropType<(option: unknown) => unknown>;
|
|
50
50
|
default: (cell: unknown) => unknown;
|
|
51
51
|
};
|
|
52
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "cell" | "
|
|
52
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "cell" | "isLoading" | "withIcons" | "saveOnClickOutside" | "validateFunction" | "displayValue">;
|
|
53
53
|
$attrs: {
|
|
54
54
|
[x: string]: unknown;
|
|
55
55
|
};
|
|
@@ -73,6 +73,10 @@ declare const EditableTypes: () => ({
|
|
|
73
73
|
type: import("vue").PropType<string>;
|
|
74
74
|
default: string;
|
|
75
75
|
};
|
|
76
|
+
isLoading: {
|
|
77
|
+
type: import("vue").PropType<boolean>;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
76
80
|
withIcons: {
|
|
77
81
|
type: import("vue").PropType<boolean>;
|
|
78
82
|
default: boolean;
|
|
@@ -85,10 +89,6 @@ declare const EditableTypes: () => ({
|
|
|
85
89
|
type: import("vue").PropType<(value: unknown) => string | boolean>;
|
|
86
90
|
default: () => false;
|
|
87
91
|
};
|
|
88
|
-
isLoading: {
|
|
89
|
-
type: import("vue").PropType<boolean>;
|
|
90
|
-
default: boolean;
|
|
91
|
-
};
|
|
92
92
|
rowIndex: {
|
|
93
93
|
type: import("vue").PropType<number>;
|
|
94
94
|
required: true;
|
|
@@ -104,10 +104,10 @@ declare const EditableTypes: () => ({
|
|
|
104
104
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
105
105
|
type: "input" | "dropdown";
|
|
106
106
|
cell: string;
|
|
107
|
+
isLoading: boolean;
|
|
107
108
|
withIcons: boolean;
|
|
108
109
|
saveOnClickOutside: boolean;
|
|
109
110
|
validateFunction: (value: unknown) => string | boolean;
|
|
110
|
-
isLoading: boolean;
|
|
111
111
|
displayValue: (option: unknown) => unknown;
|
|
112
112
|
}, {}, string> & {
|
|
113
113
|
beforeCreate?: (() => void) | (() => void)[];
|
|
@@ -139,6 +139,10 @@ declare const EditableTypes: () => ({
|
|
|
139
139
|
type: import("vue").PropType<string>;
|
|
140
140
|
default: string;
|
|
141
141
|
};
|
|
142
|
+
isLoading: {
|
|
143
|
+
type: import("vue").PropType<boolean>;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
142
146
|
withIcons: {
|
|
143
147
|
type: import("vue").PropType<boolean>;
|
|
144
148
|
default: boolean;
|
|
@@ -151,10 +155,6 @@ declare const EditableTypes: () => ({
|
|
|
151
155
|
type: import("vue").PropType<(value: unknown) => string | boolean>;
|
|
152
156
|
default: () => false;
|
|
153
157
|
};
|
|
154
|
-
isLoading: {
|
|
155
|
-
type: import("vue").PropType<boolean>;
|
|
156
|
-
default: boolean;
|
|
157
|
-
};
|
|
158
158
|
rowIndex: {
|
|
159
159
|
type: import("vue").PropType<number>;
|
|
160
160
|
required: true;
|
|
@@ -181,6 +181,10 @@ declare const EditableTypes: () => ({
|
|
|
181
181
|
type: import("vue").PropType<string>;
|
|
182
182
|
default: string;
|
|
183
183
|
};
|
|
184
|
+
isLoading: {
|
|
185
|
+
type: import("vue").PropType<boolean>;
|
|
186
|
+
default: boolean;
|
|
187
|
+
};
|
|
184
188
|
withIcons: {
|
|
185
189
|
type: import("vue").PropType<boolean>;
|
|
186
190
|
default: boolean;
|
|
@@ -193,10 +197,6 @@ declare const EditableTypes: () => ({
|
|
|
193
197
|
type: import("vue").PropType<(value: unknown) => string | boolean>;
|
|
194
198
|
default: () => false;
|
|
195
199
|
};
|
|
196
|
-
isLoading: {
|
|
197
|
-
type: import("vue").PropType<boolean>;
|
|
198
|
-
default: boolean;
|
|
199
|
-
};
|
|
200
200
|
rowIndex: {
|
|
201
201
|
type: import("vue").PropType<number>;
|
|
202
202
|
required: true;
|
|
@@ -212,10 +212,10 @@ declare const EditableTypes: () => ({
|
|
|
212
212
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
213
213
|
type: "input" | "dropdown";
|
|
214
214
|
cell: string;
|
|
215
|
+
isLoading: boolean;
|
|
215
216
|
withIcons: boolean;
|
|
216
217
|
saveOnClickOutside: boolean;
|
|
217
218
|
validateFunction: (value: unknown) => string | boolean;
|
|
218
|
-
isLoading: boolean;
|
|
219
219
|
displayValue: (option: unknown) => unknown;
|
|
220
220
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
221
221
|
$slots: {
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ChipSize, ChipColor, ChipVariant } from '../chip/v4/Chip.types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
label: string;
|
|
4
|
+
isSelected: boolean;
|
|
5
|
+
isInvalid?: boolean;
|
|
6
|
+
testId?: string;
|
|
7
|
+
size?: ChipSize;
|
|
8
|
+
rounded?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
color?: ChipColor;
|
|
11
|
+
variant?: ChipVariant;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
iconName?: string;
|
|
14
|
+
iconType?: 'regular' | 'fill';
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
selectable?: boolean;
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
maxLengthTooltip?: string;
|
|
19
|
+
}>, {
|
|
20
|
+
isInvalid: boolean;
|
|
21
|
+
label: string;
|
|
22
|
+
testId: string;
|
|
23
|
+
size: string;
|
|
24
|
+
rounded: boolean;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
color: string;
|
|
27
|
+
variant: string;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
iconName: string;
|
|
30
|
+
editable: boolean;
|
|
31
|
+
selectable: boolean;
|
|
32
|
+
maxLength: any;
|
|
33
|
+
iconType: string;
|
|
34
|
+
maxLengthTooltip: string;
|
|
35
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
"update:label": (value: string) => void;
|
|
37
|
+
remove: () => void;
|
|
38
|
+
stopEditing: () => void;
|
|
39
|
+
"update:isSelected": (value: boolean) => void;
|
|
40
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
41
|
+
label: string;
|
|
42
|
+
isSelected: boolean;
|
|
43
|
+
isInvalid?: boolean;
|
|
44
|
+
testId?: string;
|
|
45
|
+
size?: ChipSize;
|
|
46
|
+
rounded?: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
color?: ChipColor;
|
|
49
|
+
variant?: ChipVariant;
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
iconName?: string;
|
|
52
|
+
iconType?: 'regular' | 'fill';
|
|
53
|
+
editable?: boolean;
|
|
54
|
+
selectable?: boolean;
|
|
55
|
+
maxLength?: number;
|
|
56
|
+
maxLengthTooltip?: string;
|
|
57
|
+
}>, {
|
|
58
|
+
isInvalid: boolean;
|
|
59
|
+
label: string;
|
|
60
|
+
testId: string;
|
|
61
|
+
size: string;
|
|
62
|
+
rounded: boolean;
|
|
63
|
+
disabled: boolean;
|
|
64
|
+
color: string;
|
|
65
|
+
variant: string;
|
|
66
|
+
placeholder: string;
|
|
67
|
+
iconName: string;
|
|
68
|
+
editable: boolean;
|
|
69
|
+
selectable: boolean;
|
|
70
|
+
maxLength: any;
|
|
71
|
+
iconType: string;
|
|
72
|
+
maxLengthTooltip: string;
|
|
73
|
+
}>>> & {
|
|
74
|
+
onRemove?: () => any;
|
|
75
|
+
"onUpdate:label"?: (value: string) => any;
|
|
76
|
+
onStopEditing?: () => any;
|
|
77
|
+
"onUpdate:isSelected"?: (value: boolean) => any;
|
|
78
|
+
}, {
|
|
79
|
+
label: string;
|
|
80
|
+
testId: string;
|
|
81
|
+
variant: ChipVariant;
|
|
82
|
+
disabled: boolean;
|
|
83
|
+
color: ChipColor;
|
|
84
|
+
size: ChipSize;
|
|
85
|
+
iconName: string;
|
|
86
|
+
rounded: boolean;
|
|
87
|
+
maxLength: number;
|
|
88
|
+
placeholder: string;
|
|
89
|
+
iconType: 'regular' | 'fill';
|
|
90
|
+
editable: boolean;
|
|
91
|
+
isInvalid: boolean;
|
|
92
|
+
selectable: boolean;
|
|
93
|
+
maxLengthTooltip: string;
|
|
94
|
+
}>;
|
|
95
|
+
export default _default;
|
|
96
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
97
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
98
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
99
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
100
|
+
} : {
|
|
101
|
+
type: import('vue').PropType<T[K]>;
|
|
102
|
+
required: true;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
type __VLS_WithDefaults<P, D> = {
|
|
106
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
107
|
+
default: D[K];
|
|
108
|
+
}> : P[K];
|
|
109
|
+
};
|
|
110
|
+
type __VLS_Prettify<T> = {
|
|
111
|
+
[K in keyof T]: T[K];
|
|
112
|
+
} & {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import o from "./Tag.vue2.js";
|
|
2
|
+
/* empty css */import _ from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../Tag.vue_vue_type_style_index_0_scoped_78f19cb0_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ _(o, [["__scopeId", "data-v-78f19cb0"]]);
|
|
5
|
+
export {
|
|
6
|
+
c as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import "../../Tag.vue_vue_type_style_index_0_scoped_78f19cb0_lang.css"; import { defineComponent as J, ref as s, computed as d, watch as S, nextTick as N, openBlock as f, createBlock as C, unref as l, withCtx as m, createElementVNode as E, createVNode as w, createTextVNode as V, toDisplayString as T, normalizeClass as p, normalizeStyle as R, withModifiers as b, createCommentVNode as $, withDirectives as O, createElementBlock as H, isRef as Q, withKeys as K, vModelText as X, vShow as Z } from "vue";
|
|
2
|
+
import D from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import W from "../icon/v4/IconV4.vue.js";
|
|
4
|
+
import "../icon/v4/IconFlag.vue.js";
|
|
5
|
+
import _ from "../chip/v4/ChipV4.vue.js";
|
|
6
|
+
import ee from "../popover/v4/PopoverV4.vue.js";
|
|
7
|
+
const ae = { class: "tag-max-length-tooltip" }, le = { class: "tag-content" }, te = ["placeholder", "maxlength", "onKeyup"], se = /* @__PURE__ */ J({
|
|
8
|
+
__name: "Tag",
|
|
9
|
+
props: {
|
|
10
|
+
label: { default: "" },
|
|
11
|
+
isSelected: { type: Boolean },
|
|
12
|
+
isInvalid: { type: Boolean, default: !1 },
|
|
13
|
+
testId: { default: "" },
|
|
14
|
+
size: { default: "medium" },
|
|
15
|
+
rounded: { type: Boolean, default: !1 },
|
|
16
|
+
disabled: { type: Boolean, default: !1 },
|
|
17
|
+
color: { default: "primary" },
|
|
18
|
+
variant: { default: "filled" },
|
|
19
|
+
placeholder: { default: "" },
|
|
20
|
+
iconName: { default: "" },
|
|
21
|
+
iconType: { default: "regular" },
|
|
22
|
+
editable: { type: Boolean, default: !1 },
|
|
23
|
+
selectable: { type: Boolean, default: !0 },
|
|
24
|
+
maxLength: { default: void 0 },
|
|
25
|
+
maxLengthTooltip: { default: "You have reached the maximum number of characters" }
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:label", "remove", "stopEditing", "update:isSelected"],
|
|
28
|
+
setup(a, { emit: v }) {
|
|
29
|
+
const e = a, r = s(!1), y = s(null), h = s(void 0), k = s(!1), u = s(!1), i = s(e.isSelected || e.editable), z = d(() => !e.label && !r.value && e.placeholder), I = d(() => (console.log(
|
|
30
|
+
"isTooltipOpen",
|
|
31
|
+
e.maxLength && o.value.length >= e.maxLength && r.value
|
|
32
|
+
), e.maxLength && o.value.length >= e.maxLength && r.value)), g = d(() => e.disabled || !e.selectable || r.value ? "outlined" : u.value ? "filled" : !i.value && !e.editable ? "outlined" : e.variant), F = d(() => e.disabled ? "default" : e.isInvalid ? "error" : i.value || !i.value && e.editable || !e.selectable ? e.color : "default"), o = d({
|
|
33
|
+
get: () => e.label,
|
|
34
|
+
set: (n) => {
|
|
35
|
+
v("update:label", n);
|
|
36
|
+
}
|
|
37
|
+
}), M = s(null), P = () => M.value?.focus(), U = async () => {
|
|
38
|
+
e.disabled || !e.selectable || (e.editable ? (r.value = !0, await N(), P()) : (i.value = !i.value, v("update:isSelected", i.value)));
|
|
39
|
+
}, Y = () => {
|
|
40
|
+
v("stopEditing"), x();
|
|
41
|
+
}, x = () => {
|
|
42
|
+
r.value = !1, !o.value && !e.placeholder && v("remove");
|
|
43
|
+
};
|
|
44
|
+
S(
|
|
45
|
+
() => [o.value, e.placeholder, r.value],
|
|
46
|
+
async () => {
|
|
47
|
+
await N(), r.value && y.value ? h.value = y.value.offsetWidth + "px" : h.value = void 0;
|
|
48
|
+
},
|
|
49
|
+
{ immediate: !0 }
|
|
50
|
+
), S(
|
|
51
|
+
() => e.editable,
|
|
52
|
+
() => {
|
|
53
|
+
e.editable && (i.value = !0);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
const B = {
|
|
57
|
+
default: "var(--default-outlined-border)",
|
|
58
|
+
primary: "var(--primary-main)",
|
|
59
|
+
info: "var(--info-dark)",
|
|
60
|
+
error: "var(--error-main)",
|
|
61
|
+
warning: "var(--warning-main)",
|
|
62
|
+
success: "var(--success-main)",
|
|
63
|
+
dark: "var(--common-divider)"
|
|
64
|
+
}, L = {
|
|
65
|
+
default: "var(--action-active)",
|
|
66
|
+
primary: "var(--primary-dark)",
|
|
67
|
+
info: "var(--info-dark)",
|
|
68
|
+
error: "var(--error-dark)",
|
|
69
|
+
warning: "var(--warning-dark)",
|
|
70
|
+
success: "var(--success-dark)",
|
|
71
|
+
dark: "var(--common-divider)"
|
|
72
|
+
}, j = {
|
|
73
|
+
default: "var(--action-active)",
|
|
74
|
+
primary: "var(--primary-darker)",
|
|
75
|
+
info: "var(--info-darker)",
|
|
76
|
+
error: "var(--error-darker)",
|
|
77
|
+
warning: "var(--warning-darker)",
|
|
78
|
+
success: "var(--success-darker)",
|
|
79
|
+
dark: "var(--common-divider)"
|
|
80
|
+
}, q = d(() => {
|
|
81
|
+
if (e.disabled)
|
|
82
|
+
return "var(--action-disabled)";
|
|
83
|
+
const n = e.isInvalid ? "error" : e.color;
|
|
84
|
+
return k.value ? j[n] : L[n];
|
|
85
|
+
}), A = d(() => {
|
|
86
|
+
if (e.disabled)
|
|
87
|
+
return "var(--action-disabled)";
|
|
88
|
+
const n = e.isInvalid ? "error" : e.color;
|
|
89
|
+
return i.value || !e.selectable ? L[n] : "var(--action-active)";
|
|
90
|
+
}), G = d(() => {
|
|
91
|
+
if (e.editable && e.variant !== "outlined" || !e.selectable) {
|
|
92
|
+
const n = r.value ? B[e.color] : "var(--primary-main-50-p)";
|
|
93
|
+
return {
|
|
94
|
+
"--outline-color": e.isInvalid ? B.error : n
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return u.value && e.variant !== "outlined" && e.color === "primary" && !e.editable ? {
|
|
98
|
+
"--outline-color": i.value ? "var(--primary-main-50-p)" : "var(--action-active)"
|
|
99
|
+
} : {};
|
|
100
|
+
});
|
|
101
|
+
return (n, t) => (f(), C(l(ee), {
|
|
102
|
+
placement: "top",
|
|
103
|
+
text: a.maxLengthTooltip,
|
|
104
|
+
"is-open": l(I),
|
|
105
|
+
disabled: !l(I),
|
|
106
|
+
distance: 10,
|
|
107
|
+
skidding: 10
|
|
108
|
+
}, {
|
|
109
|
+
content: m(() => [
|
|
110
|
+
E("div", ae, [
|
|
111
|
+
w(l(D), { variant: "body2" }, {
|
|
112
|
+
default: m(() => [
|
|
113
|
+
V(T(a.maxLengthTooltip), 1)
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
})
|
|
117
|
+
])
|
|
118
|
+
]),
|
|
119
|
+
trigger: m(() => [
|
|
120
|
+
w(l(_), {
|
|
121
|
+
class: p({
|
|
122
|
+
"rounded-tag": a.rounded,
|
|
123
|
+
"tag-editing": r.value && l(g) !== "outlined",
|
|
124
|
+
// outlined chips have an outline
|
|
125
|
+
"tag-hover-outline": a.label && u.value && l(g) !== "outlined",
|
|
126
|
+
// outlined chips have an outline
|
|
127
|
+
"unselected-tag-hover-outline": a.label && u.value && l(g) !== "outlined" && !i.value && !a.editable,
|
|
128
|
+
// for unselected tags that are not editable, we want to show a hover outline
|
|
129
|
+
"tag-disabled": a.disabled,
|
|
130
|
+
"empty-tag": l(z),
|
|
131
|
+
"unselected-tag": !i.value && a.selectable && a.label && !u.value,
|
|
132
|
+
"editable-tag": a.editable && !a.disabled
|
|
133
|
+
}),
|
|
134
|
+
label: l(o),
|
|
135
|
+
"test-id": a.testId,
|
|
136
|
+
color: l(F),
|
|
137
|
+
size: a.size,
|
|
138
|
+
variant: l(g),
|
|
139
|
+
disabled: a.disabled,
|
|
140
|
+
style: R(l(G)),
|
|
141
|
+
onMouseover: t[5] || (t[5] = (c) => u.value = !0),
|
|
142
|
+
onMouseleave: t[6] || (t[6] = (c) => u.value = !1),
|
|
143
|
+
onClick: b(U, ["stop"])
|
|
144
|
+
}, {
|
|
145
|
+
default: m(() => [
|
|
146
|
+
E("div", le, [
|
|
147
|
+
a.iconName ? (f(), C(l(W), {
|
|
148
|
+
key: 0,
|
|
149
|
+
name: a.iconName,
|
|
150
|
+
size: "16px",
|
|
151
|
+
color: l(A),
|
|
152
|
+
class: "tag-icon",
|
|
153
|
+
type: a.iconType
|
|
154
|
+
}, null, 8, ["name", "color", "type"])) : $("", !0),
|
|
155
|
+
r.value ? O((f(), H("input", {
|
|
156
|
+
key: 2,
|
|
157
|
+
ref_key: "inputRef",
|
|
158
|
+
ref: M,
|
|
159
|
+
"onUpdate:modelValue": t[0] || (t[0] = (c) => Q(o) ? o.value = c : null),
|
|
160
|
+
placeholder: a.placeholder,
|
|
161
|
+
class: p(["tag-input", { "tag-input-outline": a.variant === "outlined" }]),
|
|
162
|
+
spellcheck: "false",
|
|
163
|
+
style: R({ width: h.value }),
|
|
164
|
+
maxlength: a.maxLength,
|
|
165
|
+
onBlur: Y,
|
|
166
|
+
onKeyup: [
|
|
167
|
+
K(b(x, ["prevent"]), ["enter"]),
|
|
168
|
+
K(b(x, ["prevent"]), ["esc"])
|
|
169
|
+
]
|
|
170
|
+
}, null, 46, te)), [
|
|
171
|
+
[
|
|
172
|
+
X,
|
|
173
|
+
l(o),
|
|
174
|
+
void 0,
|
|
175
|
+
{ trim: !0 }
|
|
176
|
+
]
|
|
177
|
+
]) : (f(), C(l(D), {
|
|
178
|
+
key: 1,
|
|
179
|
+
variant: "chipLabel",
|
|
180
|
+
class: p(["tag-label", {
|
|
181
|
+
"tag-label--placeholder": !l(o) && a.placeholder,
|
|
182
|
+
"tag-label--disabled": a.disabled
|
|
183
|
+
}])
|
|
184
|
+
}, {
|
|
185
|
+
default: m(() => [
|
|
186
|
+
V(T(l(o) || a.placeholder), 1)
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}, 8, ["class"])),
|
|
190
|
+
r.value ? (f(), H("span", {
|
|
191
|
+
key: 3,
|
|
192
|
+
ref_key: "sizerRef",
|
|
193
|
+
ref: y,
|
|
194
|
+
class: "tag-input-sizer"
|
|
195
|
+
}, T(l(o) || a.placeholder || ""), 513)) : $("", !0)
|
|
196
|
+
]),
|
|
197
|
+
O(w(l(W), {
|
|
198
|
+
class: p(["clear-button", { "clear-button--invalid": a.isInvalid }]),
|
|
199
|
+
name: "x-circle",
|
|
200
|
+
size: "16px",
|
|
201
|
+
type: "fill",
|
|
202
|
+
color: l(q),
|
|
203
|
+
onMousedown: t[1] || (t[1] = b(() => {
|
|
204
|
+
}, ["prevent"])),
|
|
205
|
+
onMouseover: t[2] || (t[2] = (c) => k.value = !0),
|
|
206
|
+
onMouseleave: t[3] || (t[3] = (c) => k.value = !1),
|
|
207
|
+
onClick: t[4] || (t[4] = b((c) => v("remove"), ["stop"]))
|
|
208
|
+
}, null, 8, ["class", "color"]), [
|
|
209
|
+
[Z, a.editable && !l(z) && a.selectable]
|
|
210
|
+
])
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
}, 8, ["class", "label", "test-id", "color", "size", "variant", "disabled", "style", "onClick"])
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
}, 8, ["text", "is-open", "disabled"]));
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
export {
|
|
220
|
+
se as default
|
|
221
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import Tag from './Tag.vue';
|
|
2
|
+
declare const TagTypes: () => import("vue").DefineComponent<{
|
|
3
|
+
label: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
required: true;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
testId: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
variant: {
|
|
13
|
+
type: import("vue").PropType<"filled" | "outlined">;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
disabled: {
|
|
17
|
+
type: import("vue").PropType<boolean>;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
color: {
|
|
21
|
+
type: import("vue").PropType<"dark" | "default" | "primary" | "info" | "success" | "warning" | "error">;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
type: import("vue").PropType<"small" | "medium">;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
iconName: {
|
|
29
|
+
type: import("vue").PropType<string>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
rounded: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
maxLength: {
|
|
37
|
+
type: import("vue").PropType<number>;
|
|
38
|
+
default: any;
|
|
39
|
+
};
|
|
40
|
+
placeholder: {
|
|
41
|
+
type: import("vue").PropType<string>;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
isSelected: {
|
|
45
|
+
type: import("vue").PropType<boolean>;
|
|
46
|
+
required: true;
|
|
47
|
+
};
|
|
48
|
+
iconType: {
|
|
49
|
+
type: import("vue").PropType<"fill" | "regular">;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
editable: {
|
|
53
|
+
type: import("vue").PropType<boolean>;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
isInvalid: {
|
|
57
|
+
type: import("vue").PropType<boolean>;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
selectable: {
|
|
61
|
+
type: import("vue").PropType<boolean>;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
maxLengthTooltip: {
|
|
65
|
+
type: import("vue").PropType<string>;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
69
|
+
"update:label": (value: string) => void;
|
|
70
|
+
remove: () => void;
|
|
71
|
+
stopEditing: () => void;
|
|
72
|
+
"update:isSelected": (value: boolean) => void;
|
|
73
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
74
|
+
label: {
|
|
75
|
+
type: import("vue").PropType<string>;
|
|
76
|
+
required: true;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
testId: {
|
|
80
|
+
type: import("vue").PropType<string>;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
83
|
+
variant: {
|
|
84
|
+
type: import("vue").PropType<"filled" | "outlined">;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
disabled: {
|
|
88
|
+
type: import("vue").PropType<boolean>;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
color: {
|
|
92
|
+
type: import("vue").PropType<"dark" | "default" | "primary" | "info" | "success" | "warning" | "error">;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
size: {
|
|
96
|
+
type: import("vue").PropType<"small" | "medium">;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
iconName: {
|
|
100
|
+
type: import("vue").PropType<string>;
|
|
101
|
+
default: string;
|
|
102
|
+
};
|
|
103
|
+
rounded: {
|
|
104
|
+
type: import("vue").PropType<boolean>;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
maxLength: {
|
|
108
|
+
type: import("vue").PropType<number>;
|
|
109
|
+
default: any;
|
|
110
|
+
};
|
|
111
|
+
placeholder: {
|
|
112
|
+
type: import("vue").PropType<string>;
|
|
113
|
+
default: string;
|
|
114
|
+
};
|
|
115
|
+
isSelected: {
|
|
116
|
+
type: import("vue").PropType<boolean>;
|
|
117
|
+
required: true;
|
|
118
|
+
};
|
|
119
|
+
iconType: {
|
|
120
|
+
type: import("vue").PropType<"fill" | "regular">;
|
|
121
|
+
default: string;
|
|
122
|
+
};
|
|
123
|
+
editable: {
|
|
124
|
+
type: import("vue").PropType<boolean>;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
isInvalid: {
|
|
128
|
+
type: import("vue").PropType<boolean>;
|
|
129
|
+
default: boolean;
|
|
130
|
+
};
|
|
131
|
+
selectable: {
|
|
132
|
+
type: import("vue").PropType<boolean>;
|
|
133
|
+
default: boolean;
|
|
134
|
+
};
|
|
135
|
+
maxLengthTooltip: {
|
|
136
|
+
type: import("vue").PropType<string>;
|
|
137
|
+
default: string;
|
|
138
|
+
};
|
|
139
|
+
}>> & {
|
|
140
|
+
onRemove?: () => any;
|
|
141
|
+
"onUpdate:label"?: (value: string) => any;
|
|
142
|
+
onStopEditing?: () => any;
|
|
143
|
+
"onUpdate:isSelected"?: (value: boolean) => any;
|
|
144
|
+
}, {
|
|
145
|
+
label: string;
|
|
146
|
+
testId: string;
|
|
147
|
+
variant: "filled" | "outlined";
|
|
148
|
+
disabled: boolean;
|
|
149
|
+
color: "dark" | "default" | "primary" | "info" | "success" | "warning" | "error";
|
|
150
|
+
size: "small" | "medium";
|
|
151
|
+
iconName: string;
|
|
152
|
+
rounded: boolean;
|
|
153
|
+
maxLength: number;
|
|
154
|
+
placeholder: string;
|
|
155
|
+
iconType: "fill" | "regular";
|
|
156
|
+
editable: boolean;
|
|
157
|
+
isInvalid: boolean;
|
|
158
|
+
selectable: boolean;
|
|
159
|
+
maxLengthTooltip: string;
|
|
160
|
+
}>[];
|
|
161
|
+
export { Tag, TagTypes };
|
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
import TagsField from './TagsField.vue';
|
|
2
|
-
|
|
2
|
+
import TagsFieldChip from './TagsFieldChip.vue';
|
|
3
|
+
declare const TagsFieldTypes: () => (import("vue").DefineComponent<{
|
|
4
|
+
label: {
|
|
5
|
+
type: import("vue").PropType<string>;
|
|
6
|
+
required: true;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
testId: {
|
|
10
|
+
type: import("vue").PropType<string>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
isInvalid: {
|
|
14
|
+
type: import("vue").PropType<boolean>;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:label": (value: string) => void;
|
|
19
|
+
remove: () => void;
|
|
20
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
label: {
|
|
22
|
+
type: import("vue").PropType<string>;
|
|
23
|
+
required: true;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
testId: {
|
|
27
|
+
type: import("vue").PropType<string>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
isInvalid: {
|
|
31
|
+
type: import("vue").PropType<boolean>;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
}>> & {
|
|
35
|
+
onRemove?: () => any;
|
|
36
|
+
"onUpdate:label"?: (value: string) => any;
|
|
37
|
+
}, {
|
|
38
|
+
label: string;
|
|
39
|
+
testId: string;
|
|
40
|
+
isInvalid: boolean;
|
|
41
|
+
}> | import("vue").DefineComponent<{
|
|
3
42
|
testId: {
|
|
4
43
|
type: import("vue").PropType<string>;
|
|
5
44
|
default: string;
|
|
@@ -71,5 +110,5 @@ declare const TagsFieldTypes: () => import("vue").DefineComponent<{
|
|
|
71
110
|
feedbackText: string;
|
|
72
111
|
feedbackVariant: "success" | "warning" | "error";
|
|
73
112
|
showFeedbackTextIcon: boolean;
|
|
74
|
-
}>[];
|
|
75
|
-
export { TagsField, TagsFieldTypes };
|
|
113
|
+
}>)[];
|
|
114
|
+
export { TagsField, TagsFieldChip, TagsFieldTypes };
|