@ironsource/shared-ui 2.1.12-test.80 → 2.1.12-test.82

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 (28) hide show
  1. package/ChartPlane.vue_vue_type_style_index_0_scoped_ff7e556e_lang.css +1 -0
  2. package/DataGrid.vue_vue_type_style_index_0_scoped_0963bb3c_lang.css +1 -0
  3. package/OptionV4.vue_vue_type_style_index_0_scoped_9560a062_lang.css +1 -0
  4. package/SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css +1 -0
  5. package/components/chart/Chart.vue.d.ts +1 -1
  6. package/components/chart/ChartPlane.vue.d.ts +1 -1
  7. package/components/chart/ChartPlane.vue.js +3 -3
  8. package/components/chart/ChartPlane.vue2.js +141 -154
  9. package/components/chart/index.d.ts +24 -24
  10. package/components/chart/utils/utils.d.ts +0 -1
  11. package/components/chart/utils/utils.js +13 -19
  12. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  13. package/components/dropdown/v4/OptionV4.vue2.js +35 -34
  14. package/components/switch/v4/SwitchV4.vue.d.ts +11 -0
  15. package/components/switch/v4/SwitchV4.vue.js +2 -2
  16. package/components/switch/v4/SwitchV4.vue2.js +39 -26
  17. package/components/switch/v4/index.d.ts +18 -0
  18. package/components/table/v4/DataGrid.vue.js +4 -4
  19. package/components/table/v4/DataGrid.vue2.js +4 -4
  20. package/index.d.ts +36 -0
  21. package/mocks/optionsWithIcons.d.ts +1 -0
  22. package/package.json +1 -1
  23. package/ChartPlane.vue_vue_type_style_index_0_scoped_e2c0c2af_lang.css +0 -1
  24. package/DataGrid.vue_vue_type_style_index_0_scoped_5b72e35a_lang.css +0 -1
  25. package/OptionV4.vue_vue_type_style_index_0_scoped_a8de6151_lang.css +0 -1
  26. package/SwitchV4.vue_vue_type_style_index_0_scoped_fa120cf6_lang.css +0 -1
  27. package/components/chart/composables/useChartValues.d.ts +0 -12
  28. package/components/chart/composables/useChartValues.js +0 -32
@@ -23,12 +23,12 @@ declare const ChartTypes: () => ({
23
23
  yAxisFormat: import("./types").ValueFormat;
24
24
  valueSuffix: string;
25
25
  valuePrefix: string;
26
- dataSets: import("./types").ChartDataSet[];
27
26
  trendTooltip: any;
28
27
  subheader: string;
29
28
  subheaderTooltip: any;
30
29
  trendValue: string | number;
31
30
  trendDirection: TrendDirection;
31
+ dataSets: import("./types").ChartDataSet[];
32
32
  tickCount: number;
33
33
  truncateTickLabels: boolean;
34
34
  keepSubheaderVisible: boolean;
@@ -118,11 +118,6 @@ declare const ChartTypes: () => ({
118
118
  type: import("vue").PropType<string>;
119
119
  default: string;
120
120
  };
121
- dataSets: {
122
- type: import("vue").PropType<import("./types").ChartDataSet[]>;
123
- required: true;
124
- default: () => any[];
125
- };
126
121
  trendTooltip: {
127
122
  type: import("vue").PropType<{
128
123
  header?: string;
@@ -150,6 +145,11 @@ declare const ChartTypes: () => ({
150
145
  type: import("vue").PropType<TrendDirection>;
151
146
  default: TrendDirection;
152
147
  };
148
+ dataSets: {
149
+ type: import("vue").PropType<import("./types").ChartDataSet[]>;
150
+ required: true;
151
+ default: () => any[];
152
+ };
153
153
  tickCount: {
154
154
  type: import("vue").PropType<number>;
155
155
  default: number;
@@ -214,7 +214,7 @@ declare const ChartTypes: () => ({
214
214
  "onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
215
215
  "onUpdate:sortSelected"?: (sortOption: unknown) => any;
216
216
  "onUpdate:chartType"?: (chartType: ChartType) => any;
217
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "dataSets" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "fullHeightBottomSpacing" | "withSettingsHeader" | "extraCharts">;
217
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "dataSets" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "fullHeightBottomSpacing" | "withSettingsHeader" | "extraCharts">;
218
218
  $attrs: {
219
219
  [x: string]: unknown;
220
220
  };
@@ -302,11 +302,6 @@ declare const ChartTypes: () => ({
302
302
  type: import("vue").PropType<string>;
303
303
  default: string;
304
304
  };
305
- dataSets: {
306
- type: import("vue").PropType<import("./types").ChartDataSet[]>;
307
- required: true;
308
- default: () => any[];
309
- };
310
305
  trendTooltip: {
311
306
  type: import("vue").PropType<{
312
307
  header?: string;
@@ -334,6 +329,11 @@ declare const ChartTypes: () => ({
334
329
  type: import("vue").PropType<TrendDirection>;
335
330
  default: TrendDirection;
336
331
  };
332
+ dataSets: {
333
+ type: import("vue").PropType<import("./types").ChartDataSet[]>;
334
+ required: true;
335
+ default: () => any[];
336
+ };
337
337
  tickCount: {
338
338
  type: import("vue").PropType<number>;
339
339
  default: number;
@@ -421,12 +421,12 @@ declare const ChartTypes: () => ({
421
421
  yAxisFormat: import("./types").ValueFormat;
422
422
  valueSuffix: string;
423
423
  valuePrefix: string;
424
- dataSets: import("./types").ChartDataSet[];
425
424
  trendTooltip: any;
426
425
  subheader: string;
427
426
  subheaderTooltip: any;
428
427
  trendValue: string | number;
429
428
  trendDirection: TrendDirection;
429
+ dataSets: import("./types").ChartDataSet[];
430
430
  tickCount: number;
431
431
  truncateTickLabels: boolean;
432
432
  keepSubheaderVisible: boolean;
@@ -536,11 +536,6 @@ declare const ChartTypes: () => ({
536
536
  type: import("vue").PropType<string>;
537
537
  default: string;
538
538
  };
539
- dataSets: {
540
- type: import("vue").PropType<import("./types").ChartDataSet[]>;
541
- required: true;
542
- default: () => any[];
543
- };
544
539
  trendTooltip: {
545
540
  type: import("vue").PropType<{
546
541
  header?: string;
@@ -568,6 +563,11 @@ declare const ChartTypes: () => ({
568
563
  type: import("vue").PropType<TrendDirection>;
569
564
  default: TrendDirection;
570
565
  };
566
+ dataSets: {
567
+ type: import("vue").PropType<import("./types").ChartDataSet[]>;
568
+ required: true;
569
+ default: () => any[];
570
+ };
571
571
  tickCount: {
572
572
  type: import("vue").PropType<number>;
573
573
  default: number;
@@ -710,11 +710,6 @@ declare const ChartTypes: () => ({
710
710
  type: import("vue").PropType<string>;
711
711
  default: string;
712
712
  };
713
- dataSets: {
714
- type: import("vue").PropType<import("./types").ChartDataSet[]>;
715
- required: true;
716
- default: () => any[];
717
- };
718
713
  trendTooltip: {
719
714
  type: import("vue").PropType<{
720
715
  header?: string;
@@ -742,6 +737,11 @@ declare const ChartTypes: () => ({
742
737
  type: import("vue").PropType<TrendDirection>;
743
738
  default: TrendDirection;
744
739
  };
740
+ dataSets: {
741
+ type: import("vue").PropType<import("./types").ChartDataSet[]>;
742
+ required: true;
743
+ default: () => any[];
744
+ };
745
745
  tickCount: {
746
746
  type: import("vue").PropType<number>;
747
747
  default: number;
@@ -829,12 +829,12 @@ declare const ChartTypes: () => ({
829
829
  yAxisFormat: import("./types").ValueFormat;
830
830
  valueSuffix: string;
831
831
  valuePrefix: string;
832
- dataSets: import("./types").ChartDataSet[];
833
832
  trendTooltip: any;
834
833
  subheader: string;
835
834
  subheaderTooltip: any;
836
835
  trendValue: string | number;
837
836
  trendDirection: TrendDirection;
837
+ dataSets: import("./types").ChartDataSet[];
838
838
  tickCount: number;
839
839
  truncateTickLabels: boolean;
840
840
  keepSubheaderVisible: boolean;
@@ -1,4 +1,3 @@
1
1
  import { PrepareTicksLabelArgs, ValueFormat } from '@/components/chart/types';
2
- export declare const calcStepSize: (min: number, max: number, tickCount: number) => number;
3
2
  export declare const formatValue: (value: number | string | Date, valueFormat: ValueFormat, formatLowDigits?: boolean) => string;
4
3
  export declare const prepareTickLabel: ({ label, format, availableSpace, truncate, }: PrepareTicksLabelArgs) => string | string[];
@@ -1,27 +1,21 @@
1
- import { format as m } from "date-fns";
2
- import { TICK_LABEL_FONT as c } from "../consts.js";
3
- import { nFormatter as p } from "../../../utils/formatNumbers.js";
4
- import { truncateTextToFit as d } from "../../../utils/text.js";
5
- import { REGEX_LINEBREAK as i } from "../../../consts/regex.js";
6
- const g = (r, t, e) => {
7
- if (e === 0)
8
- return 0;
9
- const n = Math.max(t - r, 1), f = n / e, o = n > 1 ? f * 0.4 : 0;
10
- return (n + o) / e;
11
- }, E = (r, t, e = !1) => t === "day" ? m(new Date(r), "EEEE") : t === "number" ? p(r, e) : t === "date" ? m(new Date(r), "MMM dd") : t === "dateLong" ? m(new Date(r), "MMM dd, yyyy") : String(r), w = ({
1
+ import { format as e } from "date-fns";
2
+ import { TICK_LABEL_FONT as p } from "../consts.js";
3
+ import { nFormatter as E } from "../../../utils/formatNumbers.js";
4
+ import { truncateTextToFit as a } from "../../../utils/text.js";
5
+ import { REGEX_LINEBREAK as m } from "../../../consts/regex.js";
6
+ const c = (r, t, n = !1) => t === "day" ? e(new Date(r), "EEEE") : t === "number" ? E(r, n) : t === "date" ? e(new Date(r), "MMM dd") : t === "dateLong" ? e(new Date(r), "MMM dd, yyyy") : String(r), w = ({
12
7
  label: r,
13
8
  format: t,
14
- availableSpace: e,
15
- truncate: n = !1
9
+ availableSpace: n,
10
+ truncate: i = !1
16
11
  }) => {
17
- const f = i.test(r), o = (a) => {
18
- const s = E(a, t);
19
- return n && e > 0 ? d(s, c, e) : s;
12
+ const s = m.test(r), o = (d) => {
13
+ const f = c(d, t);
14
+ return i && n > 0 ? a(f, p, n) : f;
20
15
  };
21
- return f ? r.split(i).map(o) : o(r);
16
+ return s ? r.split(m).map(o) : o(r);
22
17
  };
23
18
  export {
24
- g as calcStepSize,
25
- E as formatValue,
19
+ c as formatValue,
26
20
  w as prepareTickLabel
27
21
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./OptionV4.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../OptionV4.vue_vue_type_style_index_0_scoped_a8de6151_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-a8de6151"]]);
2
+ /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9560a062_lang.css"; //*');
4
+ const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-9560a062"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../../OptionV4.vue_vue_type_style_index_0_scoped_a8de6151_lang.css"; import { defineComponent as A, ref as w, watch as F, computed as L, openBlock as o, createBlock as f, unref as n, createSlots as N, withCtx as s, createElementVNode as c, normalizeClass as v, createCommentVNode as i, createElementBlock as l, renderSlot as u, createVNode as a, toDisplayString as r, createTextVNode as g, withModifiers as C, Fragment as j, renderList as R } from "vue";
1
+ import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9560a062_lang.css"; import { defineComponent as A, ref as w, watch as F, computed as L, openBlock as o, createBlock as f, unref as n, createSlots as N, withCtx as d, createElementVNode as c, normalizeClass as v, createCommentVNode as i, createElementBlock as l, renderSlot as r, createVNode as a, toDisplayString as u, createTextVNode as g, withModifiers as C, Fragment as j, renderList as R } from "vue";
2
2
  import "../../typography/Heading.vue.js";
3
3
  import D from "../../typography/Text.vue.js";
4
4
  import q from "../../checkbox/v4/CheckboxV4.vue.js";
@@ -67,24 +67,24 @@ const U = { class: "multiline-tooltip" }, W = {
67
67
  },
68
68
  emits: ["toggleTreeCollapse"],
69
69
  setup(e, { emit: $ }) {
70
- const d = e, { selected: K, id: B, onClick: z, api: x } = H(d), M = (t) => {
71
- d.stopOptionClickEventPropagation && t.stopPropagation(), d.disabled ? I() : z(t);
70
+ const s = e, { selected: K, id: B, onClick: z, api: h } = H(s), M = (t) => {
71
+ s.stopOptionClickEventPropagation && t.stopPropagation(), s.disabled ? I() : z(t);
72
72
  }, p = w(null), b = w(!1), E = (t) => {
73
- d.disabled && (t.stopPropagation(), I());
73
+ s.disabled && (t.stopPropagation(), I());
74
74
  };
75
- F([() => d.treeChildShown, p], async () => {
75
+ F([() => s.treeChildShown, p], async () => {
76
76
  await Q(100), b.value = p.value && J(p.value);
77
77
  });
78
- const P = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[d.nameKey] : "", h = L(() => P(d.option)), S = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, V = () => {
79
- $("toggleTreeCollapse", d.option);
78
+ const P = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[s.nameKey] : "", x = L(() => P(s.option)), S = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, V = () => {
79
+ $("toggleTreeCollapse", s.option);
80
80
  };
81
81
  return (t, k) => (o(), f(n(O), {
82
- text: n(h),
82
+ text: n(x),
83
83
  "test-id": S(e.option),
84
84
  placement: e.toolTipPlacement,
85
85
  class: "tooltip-option"
86
86
  }, N({
87
- default: s(() => [
87
+ default: d(() => [
88
88
  c("div", {
89
89
  ref: "el",
90
90
  class: v(["item-container", {
@@ -111,7 +111,7 @@ const U = { class: "multiline-tooltip" }, W = {
111
111
  onClick: k[0] || (k[0] = (y) => M(y))
112
112
  }, null, 8, ["id", "is-checked", "is-indeterminate"])) : i("", !0),
113
113
  !e.option?.conditionalOptions && (t.$slots.image || e.imageKey) ? (o(), l("div", W, [
114
- u(t.$slots, "image", {}, () => [
114
+ r(t.$slots, "image", {}, () => [
115
115
  e.imageKey ? (o(), l("img", {
116
116
  key: 0,
117
117
  src: e.option[e.imageKey]
@@ -119,7 +119,7 @@ const U = { class: "multiline-tooltip" }, W = {
119
119
  ], !0)
120
120
  ])) : i("", !0),
121
121
  !e.option?.conditionalOptions && (t.$slots.flag || e.optionFlagKey) ? (o(), l("div", Y, [
122
- u(t.$slots, "flag", {}, () => [
122
+ r(t.$slots, "flag", {}, () => [
123
123
  e.optionFlagKey ? (o(), f(n(G), {
124
124
  key: 0,
125
125
  "country-code": e.option[e.optionFlagKey]
@@ -127,12 +127,13 @@ const U = { class: "multiline-tooltip" }, W = {
127
127
  ], !0)
128
128
  ])) : i("", !0),
129
129
  !e.option?.conditionalOptions && (t.$slots["icon-start"] || e.iconKey) ? (o(), l("div", Z, [
130
- u(t.$slots, "icon-start", {}, () => [
130
+ r(t.$slots, "icon-start", {}, () => [
131
131
  a(n(m), {
132
132
  type: e.iconType,
133
133
  name: e.option[e.iconKey],
134
+ color: e.option.disabled ? "var(--text-disabled)" : null,
134
135
  size: e.iconType === "regular" ? "20px" : "16px"
135
- }, null, 8, ["type", "name", "size"])
136
+ }, null, 8, ["type", "name", "color", "size"])
136
137
  ], !0)
137
138
  ])) : i("", !0),
138
139
  c("div", {
@@ -144,8 +145,8 @@ const U = { class: "multiline-tooltip" }, W = {
144
145
  class: "option-text",
145
146
  variant: "body2"
146
147
  }, {
147
- default: s(() => [
148
- u(t.$slots, "default", {}, () => [
148
+ default: d(() => [
149
+ r(t.$slots, "default", {}, () => [
149
150
  c("div", {
150
151
  class: v(`option-content-${e.optionTwoLinesVariant} option-content`)
151
152
  }, [
@@ -154,8 +155,8 @@ const U = { class: "multiline-tooltip" }, W = {
154
155
  variant: "body2",
155
156
  class: "conditional-option-label"
156
157
  }, {
157
- default: s(() => [
158
- g(r(e.option.conditionalName) + ": ", 1)
158
+ default: d(() => [
159
+ g(u(e.option.conditionalName) + ": ", 1)
159
160
  ]),
160
161
  _: 1
161
162
  }),
@@ -163,12 +164,12 @@ const U = { class: "multiline-tooltip" }, W = {
163
164
  variant: "h5",
164
165
  class: "conditional-option-value"
165
166
  }, {
166
- default: s(() => [
167
- g('"' + r(e.option[e.nameKey]) + '"', 1)
167
+ default: d(() => [
168
+ g('"' + u(e.option[e.nameKey]) + '"', 1)
168
169
  ]),
169
170
  _: 1
170
171
  })
171
- ])) : (o(), l("div", _, r(e.option[e.nameKey]), 1)),
172
+ ])) : (o(), l("div", _, u(e.option[e.nameKey]), 1)),
172
173
  e.endTextIconKey && e.option[e.endTextIconKey] ? (o(), l("span", te, [
173
174
  a(n(m), {
174
175
  type: "regular",
@@ -178,8 +179,8 @@ const U = { class: "multiline-tooltip" }, W = {
178
179
  ])) : i("", !0),
179
180
  e.optionTwoLinesKey ? (o(), l("div", ne, [
180
181
  a(n(T), { variant: "caption" }, {
181
- default: s(() => [
182
- g(r(e.option[e.optionTwoLinesKey]), 1)
182
+ default: d(() => [
183
+ g(u(e.option[e.optionTwoLinesKey]), 1)
183
184
  ]),
184
185
  _: 1
185
186
  })
@@ -194,14 +195,14 @@ const U = { class: "multiline-tooltip" }, W = {
194
195
  class: "subtitle",
195
196
  size: "xs"
196
197
  }, {
197
- default: s(() => [
198
- g(r(e.subtitle), 1)
198
+ default: d(() => [
199
+ g(u(e.subtitle), 1)
199
200
  ]),
200
201
  _: 1
201
202
  })) : i("", !0)
202
203
  ], 512),
203
204
  t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (o(), l("div", oe, [
204
- u(t.$slots, "icon-end", {}, () => [
205
+ r(t.$slots, "icon-end", {}, () => [
205
206
  a(n(m), {
206
207
  type: e.endIconType || "regular",
207
208
  name: e.option[e.endIconKey],
@@ -214,7 +215,7 @@ const U = { class: "multiline-tooltip" }, W = {
214
215
  text: e.option[e.warningKey],
215
216
  placement: "top"
216
217
  }, {
217
- default: s(() => [
218
+ default: d(() => [
218
219
  a(n(m), {
219
220
  class: "option-warning__icon",
220
221
  name: "warning-circle",
@@ -224,7 +225,7 @@ const U = { class: "multiline-tooltip" }, W = {
224
225
  _: 1
225
226
  }, 8, ["text"])
226
227
  ])) : i("", !0),
227
- t.$slots["option-end"] ? u(t.$slots, "option-end", {
228
+ t.$slots["option-end"] ? r(t.$slots, "option-end", {
228
229
  key: 6,
229
230
  option: e.option
230
231
  }, void 0, !0) : i("", !0),
@@ -240,10 +241,10 @@ const U = { class: "multiline-tooltip" }, W = {
240
241
  }, null, 8, ["class"])
241
242
  ], 8, le)) : i("", !0)
242
243
  ], 2),
243
- n(x).clearable && n(K) ? (o(), l("div", ae, [
244
+ n(h).clearable && n(K) ? (o(), l("div", ae, [
244
245
  c("button", {
245
246
  class: "clear-button",
246
- onClick: k[1] || (k[1] = C((y) => n(x).clearSelection(), ["prevent", "stop"]))
247
+ onClick: k[1] || (k[1] = C((y) => n(h).clearSelection(), ["prevent", "stop"]))
247
248
  }, [
248
249
  a(n(m), {
249
250
  name: "close",
@@ -256,16 +257,16 @@ const U = { class: "multiline-tooltip" }, W = {
256
257
  ]),
257
258
  _: 2
258
259
  }, [
259
- Array.isArray(n(h)) ? {
260
+ Array.isArray(n(x)) ? {
260
261
  name: "tooltip",
261
- fn: s(() => [
262
+ fn: d(() => [
262
263
  c("div", U, [
263
- (o(!0), l(j, null, R(n(h), (y) => (o(), f(n(T), {
264
+ (o(!0), l(j, null, R(n(x), (y) => (o(), f(n(T), {
264
265
  key: y,
265
266
  variant: "body2"
266
267
  }, {
267
- default: s(() => [
268
- g(r(y), 1)
268
+ default: d(() => [
269
+ g(u(y), 1)
269
270
  ]),
270
271
  _: 2
271
272
  }, 1024))), 128))
@@ -1,13 +1,18 @@
1
+ import { TooltipPositions } from '@/components/tooltip/common/Tooltip.types';
1
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
3
  options: unknown[];
3
4
  modelValue: unknown;
4
5
  variant: 'primary' | 'default';
5
6
  testId?: string;
6
7
  iconKey?: string;
8
+ tooltipTextKey?: string;
9
+ tooltipPlacement?: TooltipPositions;
7
10
  }>, {
8
11
  testId: string;
9
12
  variant: string;
10
13
  iconKey: string;
14
+ tooltipTextKey: string;
15
+ tooltipPlacement: string;
11
16
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
17
  "update:modelValue": (...args: any[]) => void;
13
18
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -16,16 +21,22 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
16
21
  variant: 'primary' | 'default';
17
22
  testId?: string;
18
23
  iconKey?: string;
24
+ tooltipTextKey?: string;
25
+ tooltipPlacement?: TooltipPositions;
19
26
  }>, {
20
27
  testId: string;
21
28
  variant: string;
22
29
  iconKey: string;
30
+ tooltipTextKey: string;
31
+ tooltipPlacement: string;
23
32
  }>>> & {
24
33
  "onUpdate:modelValue"?: (...args: any[]) => any;
25
34
  }, {
26
35
  testId: string;
27
36
  variant: 'primary' | 'default';
37
+ tooltipPlacement: TooltipPositions;
28
38
  iconKey: string;
39
+ tooltipTextKey: string;
29
40
  }>;
30
41
  export default _default;
31
42
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
1
  import o from "./SwitchV4.vue2.js";
2
2
  /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../SwitchV4.vue_vue_type_style_index_0_scoped_fa120cf6_lang.css"; //*');
4
- const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-fa120cf6"]]);
3
+ // import "../../../SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css"; //*');
4
+ const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-cd6621a7"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,46 +1,59 @@
1
- import "../../../SwitchV4.vue_vue_type_style_index_0_scoped_fa120cf6_lang.css"; import { defineComponent as k, ref as h, onMounted as I, openBlock as l, createElementBlock as r, normalizeClass as u, unref as i, Fragment as V, renderList as $, createBlock as B } from "vue";
2
- import { useVModel as C } from "@vueuse/core";
1
+ import "../../../SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css"; import { defineComponent as T, ref as h, onMounted as k, openBlock as c, createElementBlock as r, normalizeClass as m, unref as a, Fragment as x, renderList as V, createBlock as w, withCtx as y, createVNode as C } from "vue";
2
+ import { useVModel as I } from "@vueuse/core";
3
+ import { SwitchTestIdModifiers as u } from "../../../testids/index.js";
3
4
  import "../../button/v4/ButtonV4.vue.js";
4
- import w from "../../button/v4/IconButtonV4.vue.js";
5
+ import $ from "../../button/v4/IconButtonV4.vue.js";
5
6
  import "../../button/v4/ButtonGroup.vue.js";
6
7
  import "../../button/v4/ToggleButtonGroupAB.vue.js";
7
- import { SwitchTestIdModifiers as m } from "../../../testids/index.js";
8
- const y = ["data-testid"], g = /* @__PURE__ */ k({
8
+ import B from "../../tooltip/v4/TooltipV4.vue.js";
9
+ const K = ["data-testid"], A = /* @__PURE__ */ T({
9
10
  __name: "SwitchV4",
10
11
  props: {
11
12
  options: null,
12
13
  modelValue: null,
13
14
  variant: { default: "default" },
14
15
  testId: { default: "" },
15
- iconKey: { default: "icon" }
16
+ iconKey: { default: "icon" },
17
+ tooltipTextKey: { default: "tooltipText" },
18
+ tooltipPlacement: { default: "top" }
16
19
  },
17
20
  emits: ["update:modelValue"],
18
21
  setup(t, { emit: f }) {
19
- const a = t, n = h(), v = C(a, "modelValue", f), c = (e) => n.value === e;
20
- I(() => {
21
- n.value = a.options.findIndex(
22
- (e) => e === a.modelValue
22
+ const i = t, n = h(), p = I(i, "modelValue", f), d = (e) => n.value === e;
23
+ k(() => {
24
+ n.value = i.options.findIndex(
25
+ (e) => e === i.modelValue
23
26
  );
24
27
  });
25
- const p = (e, s) => {
26
- n.value = s, v.value = e;
28
+ const v = (e, s) => {
29
+ n.value = s, p.value = e;
27
30
  };
28
- return (e, s) => (l(), r("div", {
29
- class: u(["switch", [`switch--variant-${t.variant}`]]),
30
- "data-testid": `${t.testId}-${i(m).WRAPPER}`
31
+ return (e, s) => (c(), r("div", {
32
+ class: m(["switch", [`switch--variant-${t.variant}`]]),
33
+ "data-testid": `${t.testId}-${a(u).WRAPPER}`
31
34
  }, [
32
- (l(!0), r(V, null, $(t.options, (d, o) => (l(), B(i(w), {
33
- key: o,
34
- class: u(["option", { "option--selected": c(o) }]),
35
- "icon-name": d[t.iconKey],
36
- size: "small",
37
- color: c(o) ? t.variant : "default",
38
- "data-testid": `${t.testId}-${i(m).BUTTON}`,
39
- onClick: (M) => p(d, o)
40
- }, null, 8, ["class", "icon-name", "color", "data-testid", "onClick"]))), 128))
41
- ], 10, y));
35
+ (c(!0), r(x, null, V(t.options, (o, l) => (c(), w(a(B), {
36
+ key: l,
37
+ text: o[t.tooltipTextKey],
38
+ disabled: !o[t.tooltipTextKey],
39
+ placement: t.tooltipPlacement,
40
+ class: "option-wrapper"
41
+ }, {
42
+ default: y(() => [
43
+ C(a($), {
44
+ class: m(["option", { "option--selected": d(l) }]),
45
+ "icon-name": o[t.iconKey],
46
+ size: "small",
47
+ color: d(l) ? t.variant : "default",
48
+ "data-testid": `${t.testId}-${a(u).BUTTON}`,
49
+ onClick: (P) => v(o, l)
50
+ }, null, 8, ["class", "icon-name", "color", "data-testid", "onClick"])
51
+ ]),
52
+ _: 2
53
+ }, 1032, ["text", "disabled", "placement"]))), 128))
54
+ ], 10, K));
42
55
  }
43
56
  });
44
57
  export {
45
- g as default
58
+ A as default
46
59
  };
@@ -8,6 +8,10 @@ declare const SwitchTypes: () => import("vue").DefineComponent<{
8
8
  required: true;
9
9
  default: string;
10
10
  };
11
+ tooltipPlacement: {
12
+ type: import("vue").PropType<"top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end">;
13
+ default: string;
14
+ };
11
15
  modelValue: {
12
16
  type: import("vue").PropType<unknown>;
13
17
  required: true;
@@ -20,6 +24,10 @@ declare const SwitchTypes: () => import("vue").DefineComponent<{
20
24
  type: import("vue").PropType<string>;
21
25
  default: string;
22
26
  };
27
+ tooltipTextKey: {
28
+ type: import("vue").PropType<string>;
29
+ default: string;
30
+ };
23
31
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
32
  "update:modelValue": (...args: any[]) => void;
25
33
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -32,6 +40,10 @@ declare const SwitchTypes: () => import("vue").DefineComponent<{
32
40
  required: true;
33
41
  default: string;
34
42
  };
43
+ tooltipPlacement: {
44
+ type: import("vue").PropType<"top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end">;
45
+ default: string;
46
+ };
35
47
  modelValue: {
36
48
  type: import("vue").PropType<unknown>;
37
49
  required: true;
@@ -44,12 +56,18 @@ declare const SwitchTypes: () => import("vue").DefineComponent<{
44
56
  type: import("vue").PropType<string>;
45
57
  default: string;
46
58
  };
59
+ tooltipTextKey: {
60
+ type: import("vue").PropType<string>;
61
+ default: string;
62
+ };
47
63
  }>> & {
48
64
  "onUpdate:modelValue"?: (...args: any[]) => any;
49
65
  }, {
50
66
  testId: string;
51
67
  variant: "default" | "primary";
68
+ tooltipPlacement: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
52
69
  iconKey: string;
70
+ tooltipTextKey: string;
53
71
  }>[];
54
72
  export { default as Switch } from './SwitchV4.vue';
55
73
  export { SwitchTypes };
@@ -1,7 +1,7 @@
1
1
  import o from "./DataGrid.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DataGrid.vue_vue_type_style_index_0_scoped_5b72e35a_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-5b72e35a"]]);
2
+ /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DataGrid.vue_vue_type_style_index_0_scoped_0963bb3c_lang.css"; //*');
4
+ const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-0963bb3c"]]);
5
5
  export {
6
- s as default
6
+ a as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../../DataGrid.vue_vue_type_style_index_0_scoped_5b72e35a_lang.css"; import { defineComponent as he, useCssVars as ye, unref as t, useSlots as fe, computed as g, openBlock as i, createElementBlock as o, createElementVNode as f, normalizeStyle as v, normalizeClass as u, renderSlot as c, createVNode as h, withCtx as $, createTextVNode as R, toDisplayString as P, createCommentVNode as n, isRef as Se, Fragment as T, renderList as x, mergeProps as L, createBlock as D } from "vue";
1
+ import "../../../DataGrid.vue_vue_type_style_index_0_scoped_0963bb3c_lang.css"; import { defineComponent as he, useCssVars as ye, unref as t, useSlots as fe, computed as g, openBlock as i, createElementBlock as o, createElementVNode as f, normalizeStyle as v, normalizeClass as u, renderSlot as c, createVNode as h, withCtx as $, createTextVNode as R, toDisplayString as P, createCommentVNode as n, isRef as Se, Fragment as T, renderList as x, mergeProps as L, createBlock as D } from "vue";
2
2
  import p from "../../typography/v4/Typography.vue.js";
3
3
  import ke from "../../skeleton/v4/SkeletonV4.vue.js";
4
4
  import ge from "../../emptyState/v4/EmptyStateV4.vue.js";
@@ -67,9 +67,9 @@ const we = ["data-testid"], Ee = ["data-testid"], He = ["data-testid"], Be = ["d
67
67
  setup(l, { expose: m, emit: k }) {
68
68
  const a = l;
69
69
  ye((s) => ({
70
- "6eb1b581": l.zIndexBase,
71
- "4420f996": t(ee),
72
- "3030c624": t(K)
70
+ "63c838b5": l.zIndexBase,
71
+ "8cc8612e": t(ee),
72
+ ec9ca7bc: t(K)
73
73
  }));
74
74
  const b = fe(), Q = (s) => a.rowCustomClassKey && a.rows[s] ? a.rows[s][a.rowCustomClassKey] : "", {
75
75
  list: w,