@ironsource/shared-ui 2.2.0-test.9 → 2.2.0-test.90

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 (118) hide show
  1. package/Alert.vue_vue_type_style_index_0_scoped_1036ab1d_lang.css +1 -0
  2. package/ButtonV4.vue_vue_type_style_index_0_scoped_6f05dc63_lang.css +1 -0
  3. package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_73af6757_lang.css +1 -0
  4. package/Chart.vue_vue_type_style_index_0_scoped_a4d7b67a_lang.css +1 -0
  5. package/DatePickerV4.vue_vue_type_style_index_0_scoped_bb0041c1_lang.css +1 -0
  6. package/DateRangeV4.vue_vue_type_style_index_0_scoped_5545bc01_lang.css +1 -0
  7. package/DropdownV4.vue_vue_type_style_index_0_scoped_b2d0a4d2_lang.css +1 -0
  8. package/DropdownV4.vue_vue_type_style_index_1_lang.css +1 -1
  9. package/FormCard.vue_vue_type_style_index_0_scoped_98458a8f_lang.css +1 -0
  10. package/IncludeExclude.vue_vue_type_style_index_0_scoped_cc2adbf5_lang.css +1 -1
  11. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_bd6145ce_lang.css +1 -1
  12. package/Loader.vue_vue_type_style_index_0_scoped_94c3c850_lang.css +1 -0
  13. package/Menu.vue_vue_type_style_index_0_scoped_545aa70b_lang.css +1 -0
  14. package/Menu.vue_vue_type_style_index_1_lang.css +1 -1
  15. package/MultiBar.vue_vue_type_style_index_0_scoped_7c2477ad_lang.css +1 -0
  16. package/OptionV4.vue_vue_type_style_index_0_scoped_7e70c643_lang.css +1 -0
  17. package/PopoverV4.vue_vue_type_style_index_0_scoped_ea1a3e8c_lang.css +1 -0
  18. package/PopoverV4.vue_vue_type_style_index_1_lang.css +1 -1
  19. package/SnackbarV4.vue_vue_type_style_index_0_scoped_f19e742c_lang.css +1 -0
  20. package/Tag.vue_vue_type_style_index_0_scoped_b0662035_lang.css +1 -0
  21. package/ThemeWrapper.vue_vue_type_style_index_0_scoped_8eef6574_lang.css +1 -0
  22. package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
  23. package/TooltipV4.vue_vue_type_style_index_0_scoped_f88fbece_lang.css +1 -0
  24. package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
  25. package/components/ThemeWrapper/ThemeStrore.d.ts +2 -1
  26. package/components/ThemeWrapper/ThemeStrore.js +14 -11
  27. package/components/ThemeWrapper/ThemeWrapper.vue.js +2 -2
  28. package/components/ThemeWrapper/ThemeWrapper.vue2.js +8 -11
  29. package/components/ThemeWrapper/index.d.ts +2 -1
  30. package/components/ThemeWrapper/index.js +4 -2
  31. package/components/alert/Alert.vue.js +4 -4
  32. package/components/alert/Alert.vue2.js +1 -1
  33. package/components/button/v3/ButtonBase.vue.d.ts +1 -1
  34. package/components/button/v4/ButtonV4.vue.js +3 -3
  35. package/components/button/v4/ButtonV4.vue2.js +1 -1
  36. package/components/chart/Chart.vue.d.ts +5 -0
  37. package/components/chart/Chart.vue.js +3 -3
  38. package/components/chart/Chart.vue2.js +17 -15
  39. package/components/chart/composables/useChartHeight.d.ts +1 -1
  40. package/components/chart/composables/useChartHeight.js +16 -15
  41. package/components/chart/index.d.ts +20 -1
  42. package/components/chart/types.d.ts +1 -0
  43. package/components/datePicker/v4/DatePickerV4.vue.js +2 -2
  44. package/components/datePicker/v4/DatePickerV4.vue2.js +1 -1
  45. package/components/dateRange/common/consts.common.d.ts +5 -0
  46. package/components/dateRange/common/consts.common.js +9 -0
  47. package/components/dateRange/v3/DateRange.vue.d.ts +3 -3
  48. package/components/dateRange/v3/DateRangePicker.vue.d.ts +3 -3
  49. package/components/dateRange/v3/index.d.ts +7 -7
  50. package/components/dateRange/v4/CalendarMonthV4.vue.js +4 -4
  51. package/components/dateRange/v4/CalendarMonthV4.vue2.js +1 -1
  52. package/components/dateRange/v4/DateRangePickerV4.vue.d.ts +3 -3
  53. package/components/dateRange/v4/DateRangeV4.vue.d.ts +3 -3
  54. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  55. package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
  56. package/components/dateRange/v4/index.d.ts +7 -7
  57. package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
  58. package/components/dropdown/v3/index.d.ts +12 -12
  59. package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +1 -1
  60. package/components/dropdown/v4/DropdownV4.vue.js +3 -3
  61. package/components/dropdown/v4/DropdownV4.vue2.js +152 -146
  62. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  63. package/components/dropdown/v4/OptionV4.vue2.js +13 -12
  64. package/components/forms/FormCard.vue.js +3 -3
  65. package/components/forms/FormCard.vue2.js +5 -5
  66. package/components/loader/v4/Loader.vue.js +3 -3
  67. package/components/loader/v4/Loader.vue2.js +1 -1
  68. package/components/menu/Menu.vue.js +3 -3
  69. package/components/menu/Menu.vue2.js +33 -30
  70. package/components/multibar/MultiBar.vue.js +3 -3
  71. package/components/multibar/MultiBar.vue2.js +51 -50
  72. package/components/popover/v4/PopoverV4.vue.d.ts +14 -0
  73. package/components/popover/v4/PopoverV4.vue.js +2 -2
  74. package/components/popover/v4/PopoverV4.vue2.js +20 -17
  75. package/components/popover/v4/index.d.ts +41 -1
  76. package/components/snackbar/v4/SnackbarV4.vue.js +3 -3
  77. package/components/snackbar/v4/SnackbarV4.vue2.js +1 -1
  78. package/components/tag/Tag.vue.d.ts +26 -0
  79. package/components/tag/Tag.vue.js +3 -3
  80. package/components/tag/Tag.vue2.js +227 -155
  81. package/components/tag/index.d.ts +42 -0
  82. package/components/tooltip/v3/Tooltip.vue.d.ts +1 -1
  83. package/components/tooltip/v3/index.d.ts +20 -20
  84. package/components/tooltip/v4/TooltipV4.vue.d.ts +6 -1
  85. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  86. package/components/tooltip/v4/TooltipV4.vue2.js +76 -36
  87. package/components/tooltip/v4/index.d.ts +39 -20
  88. package/design-foundation.stories/colors/ColorsData.d.ts +114 -0
  89. package/design-foundation.stories/colors/ColorsStoryWrapper.vue.d.ts +28 -1
  90. package/index.d.ts +195 -76
  91. package/package.json +1 -1
  92. package/style/v4/border-radius.scss +2 -2
  93. package/style/v4/colors.scss +105 -0
  94. package/style/v4/elevations.scss +11 -0
  95. package/style/v4/grid.css +1 -1
  96. package/style/v4/grid.css.map +1 -1
  97. package/style/v4/grid.scss +1 -1
  98. package/style/v4/scrollbar.scss +21 -0
  99. package/style/v4/spacings.scss +1 -1
  100. package/style/v4/styleguideV4.scss +1 -0
  101. package/styleguide.scss +2 -2
  102. package/Alert.vue_vue_type_style_index_0_scoped_5e66710b_lang.css +0 -1
  103. package/ButtonV4.vue_vue_type_style_index_0_scoped_a59af1ad_lang.css +0 -1
  104. package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_6eae923a_lang.css +0 -1
  105. package/Chart.vue_vue_type_style_index_0_scoped_22477735_lang.css +0 -1
  106. package/DatePickerV4.vue_vue_type_style_index_0_scoped_39e6c10c_lang.css +0 -1
  107. package/DateRangeV4.vue_vue_type_style_index_0_scoped_f8826716_lang.css +0 -1
  108. package/DropdownV4.vue_vue_type_style_index_0_scoped_526bf0a1_lang.css +0 -1
  109. package/FormCard.vue_vue_type_style_index_0_scoped_86feae7b_lang.css +0 -1
  110. package/Loader.vue_vue_type_style_index_0_scoped_50d9be64_lang.css +0 -1
  111. package/Menu.vue_vue_type_style_index_0_scoped_eb057818_lang.css +0 -1
  112. package/MultiBar.vue_vue_type_style_index_0_scoped_c4395fb6_lang.css +0 -1
  113. package/OptionV4.vue_vue_type_style_index_0_scoped_752a357d_lang.css +0 -1
  114. package/PopoverV4.vue_vue_type_style_index_0_scoped_66694b4e_lang.css +0 -1
  115. package/SnackbarV4.vue_vue_type_style_index_0_scoped_35c79635_lang.css +0 -1
  116. package/Tag.vue_vue_type_style_index_0_scoped_043adaf5_lang.css +0 -1
  117. package/ThemeWrapper.vue_vue_type_style_index_0_scoped_66bd448a_lang.css +0 -1
  118. package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_lang.css +0 -1
@@ -1,10 +1,10 @@
1
- import "../../Tag.vue_vue_type_style_index_0_scoped_043adaf5_lang.css"; import { defineComponent as J, ref as u, computed as d, watch as S, nextTick as E, openBlock as v, createElementBlock as C, normalizeStyle as T, createVNode as y, unref as l, withCtx as f, createElementVNode as V, createTextVNode as R, toDisplayString as z, normalizeClass as h, withModifiers as m, createBlock as $, createCommentVNode as O, withDirectives 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";
1
+ import "../../Tag.vue_vue_type_style_index_0_scoped_b0662035_lang.css"; import { defineComponent as _, ref as b, computed as u, watch as C, nextTick as W, openBlock as g, createBlock as k, unref as l, withCtx as s, createVNode as w, createTextVNode as L, toDisplayString as V, normalizeClass as h, normalizeStyle as F, withModifiers as y, createElementVNode as ee, createCommentVNode as U, withDirectives as N, createElementBlock as j, isRef as ae, withKeys as q, vModelText as le, vShow as A } from "vue";
2
+ import R from "../typography/v4/Typography.vue.js";
3
+ import P from "../icon/v4/IconV4.vue.js";
4
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({
5
+ import te from "../chip/v4/ChipV4.vue.js";
6
+ import G from "../tooltip/v4/TooltipV4.vue.js";
7
+ const ie = { class: "tag-content" }, re = ["placeholder", "maxlength", "onKeyup"], ce = /* @__PURE__ */ _({
8
8
  __name: "Tag",
9
9
  props: {
10
10
  label: { default: "" },
@@ -18,41 +18,76 @@ const ae = { class: "tag-max-length-tooltip" }, le = { class: "tag-content" }, t
18
18
  variant: { default: "filled" },
19
19
  placeholder: { default: "" },
20
20
  iconName: { default: "" },
21
+ iconType: { default: "regular" },
21
22
  editable: { type: Boolean, default: !1 },
23
+ removable: { type: Boolean, default: !1 },
22
24
  selectable: { type: Boolean, default: !0 },
23
25
  maxLength: { default: void 0 },
24
- maxLengthTooltip: { default: "You have reached the maximum number of characters" }
26
+ maxLengthTooltip: { default: "Character limit reached" },
27
+ validationPattern: { default: "" },
28
+ validationErrorText: { default: "Invalid format" }
25
29
  },
26
- emits: ["update:label", "remove", "stopEditing"],
27
- setup(a, { emit: b }) {
28
- const e = a, r = u(!1), k = u(null), g = u(void 0), x = u(!1), s = u(!1), i = u(e.isSelected || e.editable), I = d(() => !e.label && !r.value && e.placeholder), M = d(() => (console.log(
29
- "isTooltipOpen",
30
- e.maxLength && o.value.length >= e.maxLength && r.value
31
- ), e.maxLength && o.value.length >= e.maxLength && r.value)), p = d(() => e.disabled || !e.selectable || r.value ? "outlined" : s.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({
30
+ emits: ["update:label", "remove", "stopEditing", "update:isSelected", "validationError", "validationSuccess"],
31
+ setup(a, { emit: d }) {
32
+ const e = a, r = b(!1), T = b(null), M = b(void 0), c = b(!1), f = b(!1), n = b(e.isSelected || e.editable), x = u(() => {
33
+ if (!e.validationPattern || !i.value)
34
+ return !0;
35
+ try {
36
+ return new RegExp(e.validationPattern).test(i.value);
37
+ } catch {
38
+ return !0;
39
+ }
40
+ }), v = u(() => !x.value && r.value && i.value), E = u(() => !e.label && !r.value && e.placeholder), I = u(() => e.maxLength && i.value.length >= e.maxLength && r.value), p = u(() => e.disabled || !e.selectable || r.value ? "outlined" : f.value ? "filled" : !n.value && !e.editable ? "outlined" : e.variant), J = u(() => e.disabled ? "default" : e.isInvalid || v.value ? "error" : n.value || !n.value && e.editable || !e.selectable ? e.color : "default"), i = u({
32
41
  get: () => e.label,
33
- set: (n) => {
34
- b("update:label", n);
42
+ set: (o) => {
43
+ d("update:label", o);
44
+ }
45
+ });
46
+ C(
47
+ () => [i.value, r.value],
48
+ () => {
49
+ e.validationPattern && r.value && i.value && (x.value ? d("validationSuccess") : d("validationError", e.validationErrorText));
50
+ }
51
+ );
52
+ const $ = b(null), S = () => $.value?.focus(), D = () => {
53
+ d("remove");
54
+ }, Q = async () => {
55
+ e.disabled || !e.selectable || (e.removable && !e.editable ? (n.value = !n.value, d("update:isSelected", n.value)) : e.editable ? (r.value = !0, await W(), S()) : (n.value = !n.value, d("update:isSelected", n.value)));
56
+ }, X = () => {
57
+ if (e.validationPattern && i.value && !x.value) {
58
+ setTimeout(() => {
59
+ S();
60
+ }, 0);
61
+ return;
62
+ }
63
+ z();
64
+ }, z = () => {
65
+ if (e.validationPattern && i.value && !x.value) {
66
+ setTimeout(() => {
67
+ S();
68
+ }, 0);
69
+ return;
35
70
  }
36
- }), B = u(null), P = () => B.value?.focus(), U = async () => {
37
- e.disabled || !e.selectable || (e.editable ? (r.value = !0, await E(), P()) : i.value = !i.value);
38
- }, Y = () => {
39
- b("stopEditing"), w();
40
- }, w = () => {
41
- r.value = !1, !o.value && !e.placeholder && b("remove");
71
+ r.value = !1, !i.value && !e.placeholder && d("remove"), d("stopEditing");
42
72
  };
43
- S(
44
- () => [o.value, e.placeholder, r.value],
73
+ C(
74
+ () => [i.value, e.placeholder, r.value],
45
75
  async () => {
46
- await E(), r.value && k.value ? g.value = k.value.offsetWidth + "px" : g.value = void 0;
76
+ await W(), r.value && T.value ? M.value = T.value.offsetWidth + "px" : M.value = void 0;
47
77
  },
48
78
  { immediate: !0 }
49
- ), S(
79
+ ), C(
50
80
  () => e.editable,
51
81
  () => {
52
- e.editable && (i.value = !0);
82
+ e.editable && (n.value = !0);
83
+ }
84
+ ), C(
85
+ () => e.isSelected,
86
+ (o) => {
87
+ n.value = o;
53
88
  }
54
89
  );
55
- const L = {
90
+ const H = {
56
91
  default: "var(--default-outlined-border)",
57
92
  primary: "var(--primary-main)",
58
93
  info: "var(--info-dark)",
@@ -60,7 +95,7 @@ const ae = { class: "tag-max-length-tooltip" }, le = { class: "tag-content" }, t
60
95
  warning: "var(--warning-main)",
61
96
  success: "var(--success-main)",
62
97
  dark: "var(--common-divider)"
63
- }, N = {
98
+ }, B = {
64
99
  default: "var(--action-active)",
65
100
  primary: "var(--primary-dark)",
66
101
  info: "var(--info-dark)",
@@ -68,7 +103,7 @@ const ae = { class: "tag-max-length-tooltip" }, le = { class: "tag-content" }, t
68
103
  warning: "var(--warning-dark)",
69
104
  success: "var(--success-dark)",
70
105
  dark: "var(--common-divider)"
71
- }, j = {
106
+ }, K = {
72
107
  default: "var(--action-active)",
73
108
  primary: "var(--primary-darker)",
74
109
  info: "var(--info-darker)",
@@ -76,148 +111,185 @@ const ae = { class: "tag-max-length-tooltip" }, le = { class: "tag-content" }, t
76
111
  warning: "var(--warning-darker)",
77
112
  success: "var(--success-darker)",
78
113
  dark: "var(--common-divider)"
79
- }, q = d(() => {
114
+ }, O = u(() => {
80
115
  if (e.disabled)
81
116
  return "var(--action-disabled)";
82
- const n = e.isInvalid ? "error" : e.color;
83
- return x.value ? j[n] : N[n];
84
- }), A = d(() => {
117
+ const o = e.isInvalid ? "error" : e.color;
118
+ return e.removable && !e.editable ? n.value || !e.selectable ? c.value ? K[o] : o === "primary" ? "var(--primary-contrast-text)" : B[o] : c.value ? "var(--text-primary)" : "var(--action-active)" : c.value ? K[o] : B[o];
119
+ }), Y = u(() => {
85
120
  if (e.disabled)
86
121
  return "var(--action-disabled)";
87
- const n = e.isInvalid ? "error" : e.color;
88
- return i.value || !e.selectable ? N[n] : "var(--action-active)";
89
- }), G = d(() => {
122
+ const o = e.isInvalid ? "error" : e.color;
123
+ return n.value || !e.selectable ? B[o] : "var(--action-active)";
124
+ }), Z = u(() => {
90
125
  if (e.editable && e.variant !== "outlined" || !e.selectable) {
91
- const n = r.value ? L[e.color] : "var(--primary-main-50-p)";
126
+ const o = r.value ? H[e.color] : "var(--primary-main-50-p)";
92
127
  return {
93
- "--outline-color": e.isInvalid ? L.error : n
128
+ "--outline-color": e.isInvalid ? H.error : o
94
129
  };
95
130
  }
96
- return s.value && e.variant !== "outlined" && e.color === "primary" && !e.editable ? {
97
- "--outline-color": i.value ? "var(--primary-main-50-p)" : "var(--action-active)"
131
+ return f.value && e.variant !== "outlined" && e.color === "primary" && !e.editable ? {
132
+ "--outline-color": n.value ? "var(--primary-main-50-p)" : "var(--action-active)"
98
133
  } : {};
99
134
  });
100
- return (n, t) => (v(), C("div", {
101
- style: T(r.value ? { width: g.value } : void 0)
102
- }, [
103
- y(l(ee), {
104
- placement: "top",
105
- text: a.maxLengthTooltip,
106
- "is-open": l(M),
107
- disabled: !l(M),
108
- distance: 10,
109
- skidding: 10
110
- }, {
111
- content: f(() => [
112
- V("div", ae, [
113
- y(l(D), { variant: "body2" }, {
114
- default: f(() => [
115
- R(z(a.maxLengthTooltip), 1)
135
+ return (o, t) => (g(), k(l(G), {
136
+ placement: "top",
137
+ text: l(v) ? a.validationErrorText : a.maxLengthTooltip,
138
+ "is-open": l(I) || l(v),
139
+ shown: l(I) || l(v).length > 0,
140
+ disabled: !l(I) && !l(v),
141
+ trigger: "click",
142
+ distance: 10,
143
+ skidding: 10
144
+ }, {
145
+ tooltip: s(() => [
146
+ w(l(R), { variant: "body2" }, {
147
+ default: s(() => [
148
+ L(V(l(v) ? a.validationErrorText : a.maxLengthTooltip), 1)
149
+ ]),
150
+ _: 1
151
+ })
152
+ ]),
153
+ default: s(() => [
154
+ w(l(te), {
155
+ class: h({
156
+ "rounded-tag": a.rounded,
157
+ "tag-editing": r.value && l(p) !== "outlined",
158
+ // outlined chips have an outline
159
+ "tag-hover-outline": a.label && f.value && l(p) !== "outlined",
160
+ // outlined chips have an outline
161
+ "unselected-tag-hover-outline": a.label && f.value && l(p) !== "outlined" && !n.value && !a.editable,
162
+ // for unselected tags that are not editable, we want to show a hover outline
163
+ "tag-disabled": a.disabled,
164
+ "empty-tag": l(E),
165
+ "unselected-tag": !n.value && a.selectable && a.label && !f.value,
166
+ "editable-tag": a.editable && !a.disabled && !a.removable
167
+ }),
168
+ label: l(i),
169
+ "test-id": a.testId,
170
+ color: l(J),
171
+ size: a.size,
172
+ variant: l(p),
173
+ disabled: a.disabled,
174
+ style: F(l(Z)),
175
+ onMouseover: t[7] || (t[7] = (m) => f.value = !0),
176
+ onMouseleave: t[8] || (t[8] = (m) => f.value = !1),
177
+ onClick: y(Q, ["stop"])
178
+ }, {
179
+ default: s(() => [
180
+ ee("div", ie, [
181
+ a.iconName ? (g(), k(l(P), {
182
+ key: 0,
183
+ name: a.iconName,
184
+ size: "16px",
185
+ color: l(Y),
186
+ class: "tag-icon",
187
+ type: a.iconType
188
+ }, null, 8, ["name", "color", "type"])) : U("", !0),
189
+ r.value ? N((g(), j("input", {
190
+ key: 2,
191
+ ref_key: "inputRef",
192
+ ref: $,
193
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => ae(i) ? i.value = m : null),
194
+ placeholder: a.placeholder,
195
+ class: h(["tag-input", { "tag-input-outline": a.variant === "outlined" }]),
196
+ spellcheck: "false",
197
+ style: F({ width: M.value }),
198
+ maxlength: a.maxLength,
199
+ onBlur: X,
200
+ onKeyup: [
201
+ q(y(z, ["prevent"]), ["enter"]),
202
+ q(y(z, ["prevent"]), ["esc"])
203
+ ]
204
+ }, null, 46, re)), [
205
+ [
206
+ le,
207
+ l(i),
208
+ void 0,
209
+ { trim: !0 }
210
+ ]
211
+ ]) : (g(), k(l(R), {
212
+ key: 1,
213
+ variant: "chipLabel",
214
+ class: h(["tag-label", {
215
+ "tag-label--placeholder": !l(i) && a.placeholder,
216
+ "tag-label--disabled": a.disabled
217
+ }])
218
+ }, {
219
+ default: s(() => [
220
+ L(V(l(i) || a.placeholder), 1)
221
+ ]),
222
+ _: 1
223
+ }, 8, ["class"])),
224
+ r.value ? (g(), j("span", {
225
+ key: 3,
226
+ ref_key: "sizerRef",
227
+ ref: T,
228
+ class: "tag-input-sizer"
229
+ }, V(l(i) || a.placeholder || ""), 513)) : U("", !0)
230
+ ]),
231
+ a.removable && !a.editable && a.selectable ? (g(), k(l(G), {
232
+ key: 0,
233
+ placement: "top",
234
+ text: "Delete",
235
+ trigger: "hover",
236
+ distance: 8,
237
+ skidding: 0
238
+ }, {
239
+ tooltip: s(() => [
240
+ w(l(R), { variant: "body2" }, {
241
+ default: s(() => [
242
+ L("Delete")
243
+ ]),
244
+ _: 1
245
+ })
116
246
  ]),
117
- _: 1
118
- })
119
- ])
120
- ]),
121
- trigger: f(() => [
122
- y(l(_), {
123
- class: h({
124
- "rounded-tag": a.rounded,
125
- "tag-editing": r.value && l(p) !== "outlined",
126
- // outlined chips have an outline
127
- "tag-hover-outline": a.label && s.value && l(p) !== "outlined",
128
- // outlined chips have an outline
129
- "unselected-tag-hover-outline": a.label && s.value && l(p) !== "outlined" && !i.value && !a.editable,
130
- // for unselected tags that are not editable, we want to show a hover outline
131
- "tag-disabled": a.disabled,
132
- "empty-tag": l(I),
133
- "unselected-tag": !i.value && a.selectable && a.label,
134
- "editable-tag": a.editable
135
- }),
136
- label: l(o),
137
- "test-id": a.testId,
138
- color: l(F),
139
- size: a.size,
140
- variant: l(p),
141
- disabled: a.disabled,
142
- style: T(l(G)),
143
- onMouseover: t[5] || (t[5] = (c) => s.value = !0),
144
- onMouseleave: t[6] || (t[6] = (c) => s.value = !1),
145
- onClick: m(U, ["stop"])
146
- }, {
147
- default: f(() => [
148
- V("div", le, [
149
- a.iconName ? (v(), $(l(W), {
150
- key: 0,
151
- name: a.iconName,
247
+ default: s(() => [
248
+ N(w(l(P), {
249
+ class: h(["clear-button", { "clear-button--invalid": a.isInvalid || l(v) }]),
250
+ name: a.editable ? "x-circle" : "trash-simple",
152
251
  size: "16px",
153
- color: l(A),
154
- class: "tag-icon"
155
- }, null, 8, ["name", "color"])) : O("", !0),
156
- r.value ? H((v(), C("input", {
157
- key: 2,
158
- ref_key: "inputRef",
159
- ref: B,
160
- "onUpdate:modelValue": t[0] || (t[0] = (c) => Q(o) ? o.value = c : null),
161
- placeholder: a.placeholder,
162
- class: h(["tag-input", { "tag-input-outline": a.variant === "outlined" }]),
163
- spellcheck: "false",
164
- style: T({ width: g.value }),
165
- maxlength: a.maxLength,
166
- onBlur: Y,
167
- onKeyup: [
168
- K(m(w, ["prevent"]), ["enter"]),
169
- K(m(w, ["prevent"]), ["esc"])
170
- ]
171
- }, null, 46, te)), [
252
+ type: a.editable ? "fill" : "regular",
253
+ color: l(O),
254
+ onMousedown: t[1] || (t[1] = y(() => {
255
+ }, ["prevent"])),
256
+ onMouseover: t[2] || (t[2] = (m) => c.value = !0),
257
+ onMouseleave: t[3] || (t[3] = (m) => c.value = !1),
258
+ onClick: y(D, ["stop"])
259
+ }, null, 8, ["class", "name", "type", "color", "onClick"]), [
172
260
  [
173
- X,
174
- l(o),
175
- void 0,
176
- { trim: !0 }
261
+ A,
262
+ a.editable && a.selectable && (r.value || !l(E)) || a.removable && !a.editable && a.selectable
177
263
  ]
178
- ]) : (v(), $(l(D), {
179
- key: 1,
180
- variant: "chipLabel",
181
- class: h(["tag-label", {
182
- "tag-label--placeholder": !l(o) && a.placeholder,
183
- "tag-label--disabled": a.disabled
184
- }])
185
- }, {
186
- default: f(() => [
187
- R(z(l(o) || a.placeholder), 1)
188
- ]),
189
- _: 1
190
- }, 8, ["class"])),
191
- r.value ? (v(), C("span", {
192
- key: 3,
193
- ref_key: "sizerRef",
194
- ref: k,
195
- class: "tag-input-sizer"
196
- }, z(l(o) || a.placeholder || ""), 513)) : O("", !0)
264
+ ])
197
265
  ]),
198
- H(y(l(W), {
199
- class: h(["clear-button", { "clear-button--invalid": a.isInvalid }]),
200
- name: "x-circle",
201
- size: "16px",
202
- type: "fill",
203
- color: l(q),
204
- onMousedown: t[1] || (t[1] = m(() => {
205
- }, ["prevent"])),
206
- onMouseover: t[2] || (t[2] = (c) => x.value = !0),
207
- onMouseleave: t[3] || (t[3] = (c) => x.value = !1),
208
- onClick: t[4] || (t[4] = m((c) => b("remove"), ["stop"]))
209
- }, null, 8, ["class", "color"]), [
210
- [Z, a.editable && !l(I) && a.selectable]
211
- ])
212
- ]),
213
- _: 1
214
- }, 8, ["class", "label", "test-id", "color", "size", "variant", "disabled", "style", "onClick"])
215
- ]),
216
- _: 1
217
- }, 8, ["text", "is-open", "disabled"])
218
- ], 4));
266
+ _: 1
267
+ })) : N((g(), k(l(P), {
268
+ key: 1,
269
+ class: h(["clear-button", { "clear-button--invalid": a.isInvalid || l(v) }]),
270
+ name: a.editable ? "x-circle" : "trash-simple",
271
+ size: "16px",
272
+ type: a.editable ? "fill" : "regular",
273
+ color: l(O),
274
+ onMousedown: t[4] || (t[4] = y(() => {
275
+ }, ["prevent"])),
276
+ onMouseover: t[5] || (t[5] = (m) => c.value = !0),
277
+ onMouseleave: t[6] || (t[6] = (m) => c.value = !1),
278
+ onClick: y(D, ["stop"])
279
+ }, null, 8, ["class", "name", "type", "color", "onClick"])), [
280
+ [
281
+ A,
282
+ a.editable && a.selectable && (r.value || !l(E)) || a.removable && !a.editable && a.selectable
283
+ ]
284
+ ])
285
+ ]),
286
+ _: 1
287
+ }, 8, ["class", "label", "test-id", "color", "size", "variant", "disabled", "style", "onClick"])
288
+ ]),
289
+ _: 1
290
+ }, 8, ["text", "is-open", "shown", "disabled"]));
219
291
  }
220
292
  });
221
293
  export {
222
- se as default
294
+ ce as default
223
295
  };
@@ -45,6 +45,10 @@ declare const TagTypes: () => import("vue").DefineComponent<{
45
45
  type: import("vue").PropType<boolean>;
46
46
  required: true;
47
47
  };
48
+ iconType: {
49
+ type: import("vue").PropType<"fill" | "regular">;
50
+ default: string;
51
+ };
48
52
  editable: {
49
53
  type: import("vue").PropType<boolean>;
50
54
  default: boolean;
@@ -53,6 +57,10 @@ declare const TagTypes: () => import("vue").DefineComponent<{
53
57
  type: import("vue").PropType<boolean>;
54
58
  default: boolean;
55
59
  };
60
+ removable: {
61
+ type: import("vue").PropType<boolean>;
62
+ default: boolean;
63
+ };
56
64
  selectable: {
57
65
  type: import("vue").PropType<boolean>;
58
66
  default: boolean;
@@ -61,10 +69,21 @@ declare const TagTypes: () => import("vue").DefineComponent<{
61
69
  type: import("vue").PropType<string>;
62
70
  default: string;
63
71
  };
72
+ validationPattern: {
73
+ type: import("vue").PropType<string>;
74
+ default: string;
75
+ };
76
+ validationErrorText: {
77
+ type: import("vue").PropType<string>;
78
+ default: string;
79
+ };
64
80
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
65
81
  "update:label": (value: string) => void;
66
82
  remove: () => void;
67
83
  stopEditing: () => void;
84
+ "update:isSelected": (value: boolean) => void;
85
+ validationError: (value: string) => void;
86
+ validationSuccess: () => void;
68
87
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
69
88
  label: {
70
89
  type: import("vue").PropType<string>;
@@ -111,6 +130,10 @@ declare const TagTypes: () => import("vue").DefineComponent<{
111
130
  type: import("vue").PropType<boolean>;
112
131
  required: true;
113
132
  };
133
+ iconType: {
134
+ type: import("vue").PropType<"fill" | "regular">;
135
+ default: string;
136
+ };
114
137
  editable: {
115
138
  type: import("vue").PropType<boolean>;
116
139
  default: boolean;
@@ -119,6 +142,10 @@ declare const TagTypes: () => import("vue").DefineComponent<{
119
142
  type: import("vue").PropType<boolean>;
120
143
  default: boolean;
121
144
  };
145
+ removable: {
146
+ type: import("vue").PropType<boolean>;
147
+ default: boolean;
148
+ };
122
149
  selectable: {
123
150
  type: import("vue").PropType<boolean>;
124
151
  default: boolean;
@@ -127,10 +154,21 @@ declare const TagTypes: () => import("vue").DefineComponent<{
127
154
  type: import("vue").PropType<string>;
128
155
  default: string;
129
156
  };
157
+ validationPattern: {
158
+ type: import("vue").PropType<string>;
159
+ default: string;
160
+ };
161
+ validationErrorText: {
162
+ type: import("vue").PropType<string>;
163
+ default: string;
164
+ };
130
165
  }>> & {
131
166
  onRemove?: () => any;
132
167
  "onUpdate:label"?: (value: string) => any;
133
168
  onStopEditing?: () => any;
169
+ "onUpdate:isSelected"?: (value: boolean) => any;
170
+ onValidationError?: (value: string) => any;
171
+ onValidationSuccess?: () => any;
134
172
  }, {
135
173
  label: string;
136
174
  testId: string;
@@ -142,9 +180,13 @@ declare const TagTypes: () => import("vue").DefineComponent<{
142
180
  rounded: boolean;
143
181
  maxLength: number;
144
182
  placeholder: string;
183
+ iconType: "fill" | "regular";
145
184
  editable: boolean;
146
185
  isInvalid: boolean;
186
+ removable: boolean;
147
187
  selectable: boolean;
148
188
  maxLengthTooltip: string;
189
+ validationPattern: string;
190
+ validationErrorText: string;
149
191
  }>[];
150
192
  export { Tag, TagTypes };
@@ -40,9 +40,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
40
40
  disabled: boolean;
41
41
  testId: string;
42
42
  }>>>, {
43
+ theme: string;
43
44
  header: string;
44
45
  text: string;
45
- theme: string;
46
46
  testId: string;
47
47
  delay: number;
48
48
  triggers: TooltipTriggers[];