@ironsource/shared-ui 2.2.0-rc.23 → 2.2.0-rc.25

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.
Files changed (26) hide show
  1. package/TagsFieldChip.vue_vue_type_style_index_0_scoped_d186b7ef_lang.css +1 -0
  2. package/components/dropdown/v3/SearchInput.vue2.js +82 -1
  3. package/components/dropdown/v4/AppDropdownTrigger.vue2.js +185 -1
  4. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +70 -1
  5. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +54 -1
  6. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +126 -1
  7. package/components/dropdown/v4/ConditionalDropdown.vue2.js +275 -1
  8. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +156 -1
  9. package/components/dropdown/v4/DropdownV4.vue2.js +583 -1
  10. package/components/dropdown/v4/GroupOption.vue2.js +29 -1
  11. package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +23 -1
  12. package/components/dropdown/v4/OptionV4.vue2.js +300 -1
  13. package/components/dropdown/v4/TreeDropdown.vue2.js +272 -1
  14. package/components/emptyState/v3/EmptyState.vue2.js +91 -1
  15. package/components/emptyState/v4/EmptyStateV4.vue2.js +86 -1
  16. package/components/table-cells/v3/Editable.vue.js +7 -0
  17. package/components/table-cells/v3/Editable.vue2.js +1 -10
  18. package/components/tag/Tag.vue.d.ts +100 -0
  19. package/components/tag/index.d.ts +141 -0
  20. package/components/tagsField/TagsFieldChip.vue.d.ts +0 -43
  21. package/components/tagsField/TagsFieldChip.vue.js +5 -5
  22. package/components/tagsField/TagsFieldChip.vue2.js +55 -101
  23. package/components/tagsField/index.d.ts +0 -74
  24. package/index.js +1 -1
  25. package/package.json +1 -1
  26. package/TagsFieldChip.vue_vue_type_style_index_0_scoped_cbb21c6a_lang.css +0 -1
@@ -1 +1,86 @@
1
- import "../../../EmptyStateV4.vue_vue_type_style_index_0_scoped_76757f22_lang.css";
1
+ import "../../../EmptyStateV4.vue_vue_type_style_index_0_scoped_76757f22_lang.css"; import I from "../../../_virtual/dynamic-import-helper.js";
2
+ import { defineComponent as T, computed as N, defineAsyncComponent as b, openBlock as o, createElementBlock as k, mergeProps as s, unref as e, createBlock as n, createCommentVNode as a, createElementVNode as C, renderSlot as p, withCtx as m, createTextVNode as l, toDisplayString as u } from "vue";
3
+ import E from "../../button/v4/ButtonV4.vue.js";
4
+ import "../../button/v4/IconButtonV4.vue.js";
5
+ import "../../button/v4/ButtonGroup.vue.js";
6
+ import "../../button/v4/ToggleButtonGroupAB.vue.js";
7
+ import y from "../../typography/v4/Typography.vue.js";
8
+ import { capitalizeFirstLetter as S, snakeCaseToCamelCase as g } from "../../../utils/string.js";
9
+ import x from "../../icon/v4/IconV4.vue.js";
10
+ import "../../icon/v4/IconFlag.vue.js";
11
+ import { useTestIdAttrs as z } from "../../../utils/testIds.js";
12
+ import { EmptyStateTestIdModifiers as r } from "../../../testids/index.js";
13
+ const A = { class: "title-wrapper" }, P = /* @__PURE__ */ T({
14
+ __name: "EmptyStateV4",
15
+ props: {
16
+ title: { default: "No data to display" },
17
+ subtitle: { default: void 0 },
18
+ variant: { default: "no-data" },
19
+ buttonText: { default: void 0 },
20
+ iconName: { default: null },
21
+ iconType: { default: "regular" },
22
+ iconSize: { default: "48px" },
23
+ testId: { default: "" }
24
+ },
25
+ emits: ["click"],
26
+ setup(t) {
27
+ const d = t, v = N(() => {
28
+ const i = S(g(d.variant));
29
+ return b(() => I(/* @__PURE__ */ Object.assign({ "./icons/IconError.vue": () => import("./icons/IconError.vue.js"), "./icons/IconFiles.vue": () => import("./icons/IconFiles.vue.js"), "./icons/IconNoAccess.vue": () => import("./icons/IconNoAccess.vue.js"), "./icons/IconNoData.vue": () => import("./icons/IconNoData.vue.js"), "./icons/IconNoResults.vue": () => import("./icons/IconNoResults.vue.js"), "./icons/IconSettings.vue": () => import("./icons/IconSettings.vue.js") }), `./icons/Icon${i}.vue`));
30
+ }), c = z(d.testId, r);
31
+ return (i, f) => (o(), k("div", s({ class: "empty-state" }, e(c)[e(r).CONTAINER]), [
32
+ t.variant && !t.iconName ? (o(), n(e(v), {
33
+ key: 0,
34
+ class: "empty-variant-icon"
35
+ })) : a("", !0),
36
+ t.iconName ? (o(), n(e(x), {
37
+ key: 1,
38
+ class: "custom-empty-icon",
39
+ name: t.iconName,
40
+ size: t.iconSize,
41
+ type: t.iconType
42
+ }, null, 8, ["name", "size", "type"])) : a("", !0),
43
+ C("div", A, [
44
+ p(i.$slots, "content", {}, () => [
45
+ t.title ? (o(), n(e(y), s({
46
+ key: 0,
47
+ variant: "h4",
48
+ class: "title"
49
+ }, e(c)[e(r).TITLE]), {
50
+ default: m(() => [
51
+ l(u(t.title), 1)
52
+ ]),
53
+ _: 1
54
+ }, 16)) : a("", !0),
55
+ t.subtitle ? (o(), n(e(y), s({
56
+ key: 1,
57
+ variant: "body1",
58
+ class: "subtitle"
59
+ }, e(c)[e(r).SUBTITLE]), {
60
+ default: m(() => [
61
+ l(u(t.subtitle), 1)
62
+ ]),
63
+ _: 1
64
+ }, 16)) : a("", !0)
65
+ ], !0)
66
+ ]),
67
+ p(i.$slots, "button", {}, () => [
68
+ t.buttonText ? (o(), n(e(E), {
69
+ key: 0,
70
+ variant: "outlined",
71
+ color: "default",
72
+ class: "button",
73
+ onClick: f[0] || (f[0] = (B) => i.$emit("click"))
74
+ }, {
75
+ default: m(() => [
76
+ l(u(t.buttonText), 1)
77
+ ]),
78
+ _: 1
79
+ })) : a("", !0)
80
+ ], !0)
81
+ ], 16));
82
+ }
83
+ });
84
+ export {
85
+ P as default
86
+ };
@@ -0,0 +1,7 @@
1
+ import e from "./Editable.vue2.js";
2
+ /* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../Editable.vue_vue_type_style_index_0_scoped_2561e913_lang.css"; //*');
4
+ const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-2561e913"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, openBlock as i, createElementBlock as a, unref as e, createElementVNode as m, renderSlot as s, createVNode as p, withCtx as y, createTextVNode as g, toDisplayString as k } from "vue";
1
+ import "../../../Editable.vue_vue_type_style_index_0_scoped_2561e913_lang.css"; import { defineComponent as u, openBlock as i, createElementBlock as a, unref as e, createElementVNode as m, renderSlot as s, createVNode as p, withCtx as y, createTextVNode as g, toDisplayString as k } from "vue";
2
2
  import E from "../../typography/Text.vue.js";
3
3
  import { editableCommon as _ } from "../common/Editable.common.js";
4
4
  const v = { class: "editable-container" }, x = {
@@ -38,15 +38,6 @@ const v = { class: "editable-container" }, x = {
38
38
  ], 512));
39
39
  }
40
40
  });
41
- export {
42
- N as default
43
- };
44
- ], !0)
45
- ]))
46
- ])
47
- ], 512));
48
- }
49
- });
50
41
  export {
51
42
  N as default
52
43
  };
@@ -0,0 +1,100 @@
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
+ editable?: boolean;
15
+ selectable?: boolean;
16
+ maxLength?: number;
17
+ }>, {
18
+ isInvalid: boolean;
19
+ label: string;
20
+ testId: string;
21
+ size: string;
22
+ rounded: boolean;
23
+ disabled: boolean;
24
+ color: string;
25
+ variant: string;
26
+ placeholder: string;
27
+ iconName: string;
28
+ editable: boolean;
29
+ selectable: boolean;
30
+ maxLength: any;
31
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ "update:label": (value: string) => void;
33
+ remove: () => void;
34
+ stopEditing: () => void;
35
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
36
+ label: string;
37
+ isSelected: boolean;
38
+ isInvalid?: boolean;
39
+ testId?: string;
40
+ size?: ChipSize;
41
+ rounded?: boolean;
42
+ disabled?: boolean;
43
+ color?: ChipColor;
44
+ variant?: ChipVariant;
45
+ placeholder?: string;
46
+ iconName?: string;
47
+ editable?: boolean;
48
+ selectable?: boolean;
49
+ maxLength?: number;
50
+ }>, {
51
+ isInvalid: boolean;
52
+ label: string;
53
+ testId: string;
54
+ size: string;
55
+ rounded: boolean;
56
+ disabled: boolean;
57
+ color: string;
58
+ variant: string;
59
+ placeholder: string;
60
+ iconName: string;
61
+ editable: boolean;
62
+ selectable: boolean;
63
+ maxLength: any;
64
+ }>>> & {
65
+ onRemove?: () => any;
66
+ "onUpdate:label"?: (value: string) => any;
67
+ onStopEditing?: () => any;
68
+ }, {
69
+ label: string;
70
+ testId: string;
71
+ variant: ChipVariant;
72
+ disabled: boolean;
73
+ color: ChipColor;
74
+ size: ChipSize;
75
+ iconName: string;
76
+ rounded: boolean;
77
+ maxLength: number;
78
+ placeholder: string;
79
+ editable: boolean;
80
+ isInvalid: boolean;
81
+ selectable: boolean;
82
+ }>;
83
+ export default _default;
84
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
85
+ type __VLS_TypePropsToRuntimeProps<T> = {
86
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
87
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
88
+ } : {
89
+ type: import('vue').PropType<T[K]>;
90
+ required: true;
91
+ };
92
+ };
93
+ type __VLS_WithDefaults<P, D> = {
94
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
95
+ default: D[K];
96
+ }> : P[K];
97
+ };
98
+ type __VLS_Prettify<T> = {
99
+ [K in keyof T]: T[K];
100
+ } & {};
@@ -0,0 +1,141 @@
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
+ editable: {
49
+ type: import("vue").PropType<boolean>;
50
+ default: boolean;
51
+ };
52
+ isInvalid: {
53
+ type: import("vue").PropType<boolean>;
54
+ default: boolean;
55
+ };
56
+ selectable: {
57
+ type: import("vue").PropType<boolean>;
58
+ default: boolean;
59
+ };
60
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
61
+ "update:label": (value: string) => void;
62
+ remove: () => void;
63
+ stopEditing: () => void;
64
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
65
+ label: {
66
+ type: import("vue").PropType<string>;
67
+ required: true;
68
+ default: string;
69
+ };
70
+ testId: {
71
+ type: import("vue").PropType<string>;
72
+ default: string;
73
+ };
74
+ variant: {
75
+ type: import("vue").PropType<"filled" | "outlined">;
76
+ default: string;
77
+ };
78
+ disabled: {
79
+ type: import("vue").PropType<boolean>;
80
+ default: boolean;
81
+ };
82
+ color: {
83
+ type: import("vue").PropType<"dark" | "default" | "primary" | "info" | "success" | "warning" | "error">;
84
+ default: string;
85
+ };
86
+ size: {
87
+ type: import("vue").PropType<"small" | "medium">;
88
+ default: string;
89
+ };
90
+ iconName: {
91
+ type: import("vue").PropType<string>;
92
+ default: string;
93
+ };
94
+ rounded: {
95
+ type: import("vue").PropType<boolean>;
96
+ default: boolean;
97
+ };
98
+ maxLength: {
99
+ type: import("vue").PropType<number>;
100
+ default: any;
101
+ };
102
+ placeholder: {
103
+ type: import("vue").PropType<string>;
104
+ default: string;
105
+ };
106
+ isSelected: {
107
+ type: import("vue").PropType<boolean>;
108
+ required: true;
109
+ };
110
+ editable: {
111
+ type: import("vue").PropType<boolean>;
112
+ default: boolean;
113
+ };
114
+ isInvalid: {
115
+ type: import("vue").PropType<boolean>;
116
+ default: boolean;
117
+ };
118
+ selectable: {
119
+ type: import("vue").PropType<boolean>;
120
+ default: boolean;
121
+ };
122
+ }>> & {
123
+ onRemove?: () => any;
124
+ "onUpdate:label"?: (value: string) => any;
125
+ onStopEditing?: () => any;
126
+ }, {
127
+ label: string;
128
+ testId: string;
129
+ variant: "filled" | "outlined";
130
+ disabled: boolean;
131
+ color: "dark" | "default" | "primary" | "info" | "success" | "warning" | "error";
132
+ size: "small" | "medium";
133
+ iconName: string;
134
+ rounded: boolean;
135
+ maxLength: number;
136
+ placeholder: string;
137
+ editable: boolean;
138
+ isInvalid: boolean;
139
+ selectable: boolean;
140
+ }>[];
141
+ export { Tag, TagTypes };
@@ -1,72 +1,29 @@
1
- import { ChipSize, ChipColor, ChipVariant } from '../chip/v4/Chip.types';
2
1
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
2
  label: string;
4
3
  isInvalid?: boolean;
5
4
  testId?: string;
6
- size?: ChipSize;
7
- rounded?: boolean;
8
- disabled?: boolean;
9
- removable?: boolean;
10
- color?: ChipColor;
11
- iconColor?: string;
12
- variant?: ChipVariant;
13
- placeholder?: string;
14
5
  }>, {
15
6
  isInvalid: boolean;
16
7
  label: string;
17
8
  testId: string;
18
- size: string;
19
- rounded: boolean;
20
- disabled: boolean;
21
- removable: boolean;
22
- color: string;
23
- iconColor: string;
24
- variant: string;
25
- placeholder: string;
26
9
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
10
  "update:label": (value: string) => void;
28
11
  remove: () => void;
29
- stopEditing: () => void;
30
12
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
31
13
  label: string;
32
14
  isInvalid?: boolean;
33
15
  testId?: string;
34
- size?: ChipSize;
35
- rounded?: boolean;
36
- disabled?: boolean;
37
- removable?: boolean;
38
- color?: ChipColor;
39
- iconColor?: string;
40
- variant?: ChipVariant;
41
- placeholder?: string;
42
16
  }>, {
43
17
  isInvalid: boolean;
44
18
  label: string;
45
19
  testId: string;
46
- size: string;
47
- rounded: boolean;
48
- disabled: boolean;
49
- removable: boolean;
50
- color: string;
51
- iconColor: string;
52
- variant: string;
53
- placeholder: string;
54
20
  }>>> & {
55
21
  onRemove?: () => any;
56
22
  "onUpdate:label"?: (value: string) => any;
57
- onStopEditing?: () => any;
58
23
  }, {
59
24
  label: string;
60
25
  testId: string;
61
- variant: ChipVariant;
62
- disabled: boolean;
63
- color: ChipColor;
64
- size: ChipSize;
65
- rounded: boolean;
66
- placeholder: string;
67
26
  isInvalid: boolean;
68
- removable: boolean;
69
- iconColor: string;
70
27
  }>;
71
28
  export default _default;
72
29
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
- import o from "./TagsFieldChip.vue2.js";
2
- /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../TagsFieldChip.vue_vue_type_style_index_0_scoped_cbb21c6a_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-cbb21c6a"]]);
1
+ import e from "./TagsFieldChip.vue2.js";
2
+ /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../TagsFieldChip.vue_vue_type_style_index_0_scoped_d186b7ef_lang.css"; //*');
4
+ const t = /* @__PURE__ */ o(e, [["__scopeId", "data-v-d186b7ef"]]);
5
5
  export {
6
- p as default
6
+ t as default
7
7
  };
@@ -1,127 +1,81 @@
1
- import "../../TagsFieldChip.vue_vue_type_style_index_0_scoped_cbb21c6a_lang.css"; import { defineComponent as V, ref as d, computed as b, watch as N, nextTick as k, openBlock as u, createBlock as g, unref as t, normalizeClass as s, normalizeStyle as w, withModifiers as n, withCtx as C, createElementVNode as S, createTextVNode as K, toDisplayString as z, withDirectives as x, createElementBlock as I, isRef as D, withKeys as B, vModelText as F, createCommentVNode as O, createVNode as W, vShow as L } from "vue";
2
- import U from "../typography/v4/Typography.vue.js";
3
- import $ from "../icon/v4/IconV4.vue.js";
1
+ import "../../TagsFieldChip.vue_vue_type_style_index_0_scoped_d186b7ef_lang.css"; import { defineComponent as k, ref as p, computed as x, openBlock as C, createBlock as I, unref as t, normalizeClass as c, withModifiers as s, withCtx as f, createElementVNode as v, createVNode as m, createTextVNode as w, toDisplayString as T, withDirectives as B, isRef as E, withKeys as h, vShow as V, vModelText as K, nextTick as N } from "vue";
2
+ import R from "../typography/v4/Typography.vue.js";
3
+ import z from "../icon/v4/IconV4.vue.js";
4
4
  import "../icon/v4/IconFlag.vue.js";
5
- import j from "../chip/v4/ChipV4.vue.js";
6
- const q = { class: "chip-content" }, A = ["placeholder", "onKeyup"], X = /* @__PURE__ */ V({
5
+ import D from "../chip/v4/ChipV4.vue.js";
6
+ const M = { class: "chip-content" }, S = ["onKeyup"], j = /* @__PURE__ */ k({
7
7
  __name: "TagsFieldChip",
8
8
  props: {
9
9
  label: { default: "" },
10
10
  isInvalid: { type: Boolean, default: !1 },
11
- testId: { default: "" },
12
- size: { default: "small" },
13
- rounded: { type: Boolean, default: !0 },
14
- disabled: { type: Boolean, default: !1 },
15
- removable: { type: Boolean, default: !0 },
16
- color: { default: "default" },
17
- iconColor: { default: "var(--action-active)" },
18
- variant: { default: "filled" },
19
- placeholder: { default: "" }
11
+ testId: { default: "" }
20
12
  },
21
- emits: ["update:label", "remove", "stopEditing"],
22
- setup(e, { emit: r }) {
23
- const i = e, a = d(!1), l = b({
24
- get: () => i.label,
25
- set: (h) => {
26
- r("update:label", h);
13
+ emits: ["update:label", "remove"],
14
+ setup(l, { emit: n }) {
15
+ const b = l, i = p(!1), e = x({
16
+ get: () => b.label,
17
+ set: (d) => {
18
+ n("update:label", d);
27
19
  }
28
- }), p = d(null), E = () => p.value?.focus(), M = async () => {
29
- i.disabled || (a.value = !0, await k(), E());
30
- }, R = () => {
31
- r("stopEditing"), c();
32
- }, c = () => {
33
- a.value = !1, !l.value && !i.placeholder && r("remove");
34
- }, v = d(null), f = d(void 0);
35
- N(
36
- () => [l.value, i.placeholder, a.value],
37
- async () => {
38
- await k(), a.value && v.value ? f.value = v.value.offsetWidth + "px" : f.value = void 0;
39
- },
40
- { immediate: !0 }
41
- );
42
- const m = {
43
- default: "var(--default-outlined-border)",
44
- primary: "var(--primary-main)",
45
- info: "var(--info-dark)",
46
- error: "var(--error-main)",
47
- warning: "var(--warning-main)",
48
- success: "var(--success-main)",
49
- dark: "var(--common-divider)"
50
- }, T = b(() => a.value && i.variant !== "outlined" ? {
51
- "--outline-color": i.isInvalid ? m.error : m[i.color] || "var(--default-outlined-border)"
52
- } : {});
53
- return (h, o) => (u(), g(t(j), {
54
- class: s({
55
- "rounded-chip": e.rounded,
56
- "tags-field-chip--editing": a.value && e.variant !== "outlined"
57
- // outlined chips have an outline
58
- }),
59
- label: t(l),
60
- "test-id": e.testId,
61
- color: e.isInvalid ? "error" : e.color,
62
- size: e.size,
63
- variant: e.variant,
64
- disabled: e.disabled,
65
- style: w(t(T)),
66
- onClick: n(M, ["stop"])
20
+ }), r = p(null), g = () => r.value?.focus(), y = async () => {
21
+ i.value = !0, await N(), g();
22
+ }, o = () => {
23
+ i.value = !1, e.value || n("remove");
24
+ };
25
+ return (d, a) => (C(), I(t(D), {
26
+ class: c(["tags-field-chip", {
27
+ "tags-field-chip--editing": i.value,
28
+ "tags-field-chip--invalid": l.isInvalid
29
+ }]),
30
+ label: t(e),
31
+ "test-id": l.testId,
32
+ color: l.isInvalid ? "error" : "default",
33
+ onClick: s(y, ["stop"])
67
34
  }, {
68
- default: C(() => [
69
- S("div", q, [
70
- a.value ? x((u(), I("input", {
71
- key: 1,
35
+ default: f(() => [
36
+ v("div", M, [
37
+ m(t(R), {
38
+ variant: "chipLabel",
39
+ class: c(["chip-label", { "chip-label--hidden": i.value }])
40
+ }, {
41
+ default: f(() => [
42
+ w(T(t(e)), 1)
43
+ ]),
44
+ _: 1
45
+ }, 8, ["class"]),
46
+ B(v("input", {
72
47
  ref_key: "inputRef",
73
- ref: p,
74
- "onUpdate:modelValue": o[0] || (o[0] = (y) => D(l) ? l.value = y : null),
75
- placeholder: e.placeholder,
76
- class: s(["chip-input", { "chip-input-outline": e.variant === "outlined" }]),
48
+ ref: r,
49
+ "onUpdate:modelValue": a[0] || (a[0] = (u) => E(e) ? e.value = u : null),
50
+ class: "chip-input",
77
51
  spellcheck: "false",
78
- style: w({ width: f.value }),
79
- onBlur: R,
52
+ onBlur: o,
80
53
  onKeyup: [
81
- B(n(c, ["prevent"]), ["enter"]),
82
- B(n(c, ["prevent"]), ["esc"])
54
+ h(s(o, ["prevent"]), ["enter"]),
55
+ h(s(o, ["prevent"]), ["esc"])
83
56
  ]
84
- }, null, 46, A)), [
57
+ }, null, 40, S), [
58
+ [V, i.value],
85
59
  [
86
- F,
87
- t(l),
60
+ K,
61
+ t(e),
88
62
  void 0,
89
63
  { trim: !0 }
90
64
  ]
91
- ]) : (u(), g(t(U), {
92
- key: 0,
93
- variant: "chipLabel",
94
- class: s(["chip-label", { "chip-label--placeholder": !t(l) && e.placeholder }])
95
- }, {
96
- default: C(() => [
97
- K(z(t(l) || e.placeholder), 1)
98
- ]),
99
- _: 1
100
- }, 8, ["class"])),
101
- a.value ? (u(), I("span", {
102
- key: 2,
103
- ref_key: "sizerRef",
104
- ref: v,
105
- class: "chip-input-sizer"
106
- }, z(t(l) || e.placeholder || ""), 513)) : O("", !0)
65
+ ])
107
66
  ]),
108
- x(W(t($), {
109
- class: s(["clear-button", { "clear-button--invalid": e.isInvalid }]),
67
+ m(t(z), {
68
+ class: c(["clear-button", { "clear-button--invalid": l.isInvalid }]),
110
69
  name: "x-circle",
111
70
  size: "16px",
112
71
  type: "fill",
113
- color: e.isInvalid ? "var(--error-dark)" : e.iconColor,
114
- onMousedown: o[1] || (o[1] = n(() => {
115
- }, ["prevent"])),
116
- onClick: o[2] || (o[2] = n((y) => r("remove"), ["stop"]))
117
- }, null, 8, ["class", "color"]), [
118
- [L, e.removable]
119
- ])
72
+ onClick: a[1] || (a[1] = s((u) => n("remove"), ["stop"]))
73
+ }, null, 8, ["class"])
120
74
  ]),
121
75
  _: 1
122
- }, 8, ["class", "label", "test-id", "color", "size", "variant", "disabled", "style", "onClick"]));
76
+ }, 8, ["class", "label", "test-id", "color", "onClick"]));
123
77
  }
124
78
  });
125
79
  export {
126
- X as default
80
+ j as default
127
81
  };