@ironsource/shared-ui 2.1.3-rc.6 → 2.1.3-rc.7

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.
@@ -0,0 +1 @@
1
+ .form-card[data-v-276bd901]{border-radius:var(--border-radius-sm);border:1px solid var(--common-divider);background:var(--background-default)}.card-header[data-v-276bd901]{display:flex;flex-direction:row;align-items:center;min-height:var(--spacing-700);border-radius:calc(var(--border-radius-sm) - 1px) calc(var(--border-radius-sm) - 1px) 0 0;color:var(--text-primary);background:var(--background-paper-elevation-0);padding:0 var(--spacing-300)}.card-header .skeleton-header[data-v-276bd901]{width:220px;height:20px}.card-content[data-v-276bd901]{padding:var(--spacing-300) var(--spacing-400)}.card-content--no-padding[data-v-276bd901]{padding:0}.form-actions[data-v-276bd901]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;min-height:var(--spacing-700)}.form-action[data-v-276bd901]{margin-left:var(--spacing-100)}.content-skeleton-container[data-v-276bd901]{display:flex;flex-direction:column}.content-skeleton-container .skeleton-long[data-v-276bd901]{margin-bottom:24px;width:100%;max-width:896px;height:16px}.content-skeleton-container .skeleton-short[data-v-276bd901]{margin-bottom:24px;width:100%;max-width:436px;height:16px}
@@ -1 +1,90 @@
1
- import "../../../ButtonV4.vue_vue_type_style_index_0_scoped_38c0ed72_lang.css";
1
+ import "../../../ButtonV4.vue_vue_type_style_index_0_scoped_38c0ed72_lang.css"; import { defineComponent as N, computed as h, openBlock as a, createElementBlock as s, normalizeClass as i, createElementVNode as r, createBlock as f, unref as t, createCommentVNode as n, createVNode as c, withCtx as u, renderSlot as m, createTextVNode as z, toDisplayString as g } from "vue";
2
+ import I from "../../typography/v4/Typography.vue.js";
3
+ import y from "../../icon/v4/IconV4.vue.js";
4
+ import b from "../../loader/v4/Loader.vue.js";
5
+ const k = ["data-testid", "disabled"], v = { key: 0 }, V = /* @__PURE__ */ N({
6
+ __name: "ButtonV4",
7
+ props: {
8
+ variant: { default: "contained" },
9
+ color: { default: "primary" },
10
+ size: { default: "medium" },
11
+ loading: { type: Boolean, default: !1 },
12
+ disabled: { type: Boolean, default: !1 },
13
+ testId: { default: "" },
14
+ content: { default: "" },
15
+ startIconName: { default: null },
16
+ endIconName: { default: null },
17
+ startIconType: { default: "regular" },
18
+ endIconType: { default: "regular" }
19
+ },
20
+ setup(e) {
21
+ const d = e, o = h(
22
+ () => d.size === "small" || d.size === "medium" ? 16 : 20
23
+ );
24
+ return (l, w) => (a(), s("button", {
25
+ class: i([[
26
+ e.size,
27
+ e.color,
28
+ e.variant,
29
+ { loading: e.loading },
30
+ {
31
+ "with-start-icon": !!e.startIconName,
32
+ "with-end-icon": !!e.endIconName
33
+ }
34
+ ], "button-wrap"]),
35
+ "data-testid": d.testId,
36
+ disabled: e.disabled
37
+ }, [
38
+ e.loading ? n("", !0) : (a(), s("span", v, [
39
+ r("div", {
40
+ class: i({
41
+ flex: e.startIconName || e.endIconName
42
+ })
43
+ }, [
44
+ e.startIconName ? (a(), f(t(y), {
45
+ key: 0,
46
+ name: e.startIconName,
47
+ size: `${t(o)}px`,
48
+ type: e.startIconType,
49
+ class: "start-icon"
50
+ }, null, 8, ["name", "size", "type"])) : n("", !0),
51
+ c(t(I), { variant: "button" }, {
52
+ default: u(() => [
53
+ m(l.$slots, "default", {}, () => [
54
+ z(g(e.content), 1)
55
+ ], !0)
56
+ ]),
57
+ _: 3
58
+ }),
59
+ e.endIconName ? (a(), f(t(y), {
60
+ key: 1,
61
+ name: e.endIconName,
62
+ size: `${t(o)}px`,
63
+ type: e.endIconType,
64
+ class: "end-icon"
65
+ }, null, 8, ["name", "size", "type"])) : n("", !0)
66
+ ], 2)
67
+ ])),
68
+ e.loading ? m(l.$slots, "loader", { key: 1 }, () => [
69
+ c(t(b), { "max-width": t(o) }, {
70
+ default: u(() => [
71
+ r("div", {
72
+ class: i({ "content-with-icon": e.startIconName || e.endIconName })
73
+ }, [
74
+ c(t(I), { variant: "button" }, {
75
+ default: u(() => [
76
+ m(l.$slots, "default", {}, void 0, !0)
77
+ ]),
78
+ _: 3
79
+ })
80
+ ], 2)
81
+ ]),
82
+ _: 3
83
+ }, 8, ["max-width"])
84
+ ], !0) : n("", !0)
85
+ ], 10, k));
86
+ }
87
+ });
88
+ export {
89
+ V as default
90
+ };
@@ -6,6 +6,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
6
6
  cancelLabel?: string;
7
7
  saveLoading?: boolean;
8
8
  testId?: string;
9
+ isLoading?: boolean;
9
10
  }>, {
10
11
  title: string;
11
12
  noPadding: boolean;
@@ -14,6 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
14
15
  saveLabel: string;
15
16
  saveLoading: boolean;
16
17
  testId: string;
18
+ isLoading: boolean;
17
19
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
20
  save: () => void;
19
21
  cancel: () => void;
@@ -25,6 +27,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
25
27
  cancelLabel?: string;
26
28
  saveLoading?: boolean;
27
29
  testId?: string;
30
+ isLoading?: boolean;
28
31
  }>, {
29
32
  title: string;
30
33
  noPadding: boolean;
@@ -33,6 +36,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
33
36
  saveLabel: string;
34
37
  saveLoading: boolean;
35
38
  testId: string;
39
+ isLoading: boolean;
36
40
  }>>> & {
37
41
  onCancel?: () => any;
38
42
  onSave?: () => any;
@@ -40,6 +44,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
40
44
  title: string;
41
45
  testId: string;
42
46
  actionButtons: boolean;
47
+ isLoading: boolean;
43
48
  noPadding: boolean;
44
49
  saveLabel: string;
45
50
  cancelLabel: string;
@@ -1,7 +1,7 @@
1
1
  import o from "./FormCard.vue2.js";
2
- /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../FormCard.vue_vue_type_style_index_0_scoped_ad5e4be0_lang.css"; //*');
4
- const t = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ad5e4be0"]]);
2
+ /* empty css */import _ from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../FormCard.vue_vue_type_style_index_0_scoped_276bd901_lang.css"; //*');
4
+ const t = /* @__PURE__ */ _(o, [["__scopeId", "data-v-276bd901"]]);
5
5
  export {
6
6
  t as default
7
7
  };
@@ -1,10 +1,14 @@
1
- import "../../FormCard.vue_vue_type_style_index_0_scoped_ad5e4be0_lang.css"; import { defineComponent as g, openBlock as v, createElementBlock as T, createElementVNode as r, mergeProps as n, unref as e, renderSlot as s, createVNode as i, withCtx as c, createTextVNode as f, toDisplayString as u, createCommentVNode as B } from "vue";
2
- import N from "../typography/v4/Typography.vue.js";
3
- import p from "../button/v4/ButtonV4.vue.js";
1
+ import "../../FormCard.vue_vue_type_style_index_0_scoped_276bd901_lang.css"; import { defineComponent as T, openBlock as d, createElementBlock as c, createElementVNode as f, mergeProps as l, unref as e, renderSlot as u, createVNode as a, withCtx as m, createTextVNode as g, toDisplayString as v, createBlock as B, createCommentVNode as C } from "vue";
2
+ import p from "../typography/v4/Typography.vue.js";
3
+ import y from "../button/v4/ButtonV4.vue.js";
4
4
  import "../button/v4/IconButtonV4.vue.js";
5
- import { FormCardTestIdModifiers as a } from "../../testids/index.js";
6
- import { useTestIdAttrs as L } from "../../utils/testIds.js";
7
- const y = { class: "form-card" }, b = /* @__PURE__ */ g({
5
+ import { FormCardTestIdModifiers as o } from "../../testids/index.js";
6
+ import { useTestIdAttrs as N } from "../../utils/testIds.js";
7
+ import i from "../skeleton/v4/SkeletonV4.vue.js";
8
+ const b = { class: "form-card" }, h = {
9
+ key: 1,
10
+ class: "content-skeleton-container"
11
+ }, z = /* @__PURE__ */ T({
8
12
  __name: "FormCard",
9
13
  props: {
10
14
  title: { default: "" },
@@ -13,62 +17,84 @@ const y = { class: "form-card" }, b = /* @__PURE__ */ g({
13
17
  saveLabel: { default: "Save" },
14
18
  cancelLabel: { default: "Cancel" },
15
19
  saveLoading: { type: Boolean, default: !1 },
16
- testId: { default: "" }
20
+ testId: { default: "" },
21
+ isLoading: { type: Boolean, default: !1 }
17
22
  },
18
23
  emits: ["save", "cancel"],
19
- setup(t, { emit: m }) {
20
- const o = L(t.testId, a);
21
- return (d, l) => (v(), T("div", null, [
22
- r("div", y, [
23
- r("header", n({ class: "card-header" }, e(o)[e(a).TITLE]), [
24
- s(d.$slots, "header", {}, () => [
25
- i(e(N), { variant: "h3" }, {
26
- default: c(() => [
27
- f(u(t.title), 1)
24
+ setup(t, { emit: k }) {
25
+ const n = N(t.testId, o);
26
+ return (r, s) => (d(), c("div", null, [
27
+ f("div", b, [
28
+ f("header", l({ class: "card-header" }, e(n)[e(o).TITLE]), [
29
+ t.isLoading ? (d(), B(e(i), {
30
+ key: 1,
31
+ type: "rectangle",
32
+ size: 20,
33
+ class: "skeleton-header"
34
+ })) : u(r.$slots, "header", { key: 0 }, () => [
35
+ a(e(p), { variant: "h3" }, {
36
+ default: m(() => [
37
+ g(v(t.title), 1)
28
38
  ]),
29
39
  _: 1
30
40
  })
31
41
  ], !0)
32
42
  ], 16),
33
- r("div", n({
43
+ f("div", l({
34
44
  class: ["card-content", { "card-content--no-padding": t.noPadding }]
35
- }, e(o)[e(a).CONTENT]), [
36
- s(d.$slots, "default", {}, void 0, !0)
45
+ }, e(n)[e(o).CONTENT]), [
46
+ t.isLoading ? (d(), c("div", h, [
47
+ a(e(i), {
48
+ type: "rectangle",
49
+ size: 20,
50
+ class: "skeleton-long"
51
+ }),
52
+ a(e(i), {
53
+ class: "skeleton-short",
54
+ type: "rectangle"
55
+ }),
56
+ a(e(i), {
57
+ class: "skeleton-short",
58
+ type: "rectangle"
59
+ })
60
+ ])) : u(r.$slots, "default", { key: 0 }, void 0, !0)
37
61
  ], 16)
38
62
  ]),
39
- t.actionButtons ? (v(), T("div", n({
63
+ t.actionButtons ? (d(), c("div", l({
40
64
  key: 0,
41
65
  class: "form-actions"
42
- }, e(o)[e(a).ACTIONS]), [
43
- s(d.$slots, "footer", {}, () => [
44
- i(e(p), n({
66
+ }, e(n)[e(o).ACTIONS]), [
67
+ u(r.$slots, "footer", {}, () => [
68
+ a(e(y), l({
45
69
  class: "form-action",
46
70
  variant: "outlined",
47
71
  color: "default"
48
- }, e(o)[e(a).CANCEL_BUTTON], {
49
- onClick: l[0] || (l[0] = (C) => m("cancel"))
72
+ }, e(n)[e(o).CANCEL_BUTTON], {
73
+ disabled: t.isLoading,
74
+ onClick: s[0] || (s[0] = (L) => k("cancel"))
50
75
  }), {
51
- default: c(() => [
52
- f(u(t.cancelLabel), 1)
76
+ default: m(() => [
77
+ g(v(t.cancelLabel), 1)
53
78
  ]),
54
79
  _: 1
55
- }, 16),
56
- i(e(p), n({
80
+ }, 16, ["disabled"]),
81
+ a(e(y), l({
57
82
  class: "form-action",
58
83
  loading: t.saveLoading
59
- }, e(o)[e(a).SAVE_BUTTON], {
60
- onClick: l[1] || (l[1] = (C) => m("save"))
84
+ }, e(n)[e(o).SAVE_BUTTON], {
85
+ disabled: t.isLoading,
86
+ onClick: s[1] || (s[1] = (L) => k("save"))
61
87
  }), {
62
- default: c(() => [
63
- f(u(t.saveLabel), 1)
88
+ default: m(() => [
89
+ g(v(t.saveLabel), 1)
64
90
  ]),
65
91
  _: 1
66
- }, 16, ["loading"])
92
+ }, 16, ["loading", "disabled"])
67
93
  ], !0)
68
- ], 16)) : B("", !0)
94
+ ], 16)) : C("", !0)
69
95
  ]));
70
96
  }
71
97
  });
72
98
  export {
73
- b as default
99
+ z as default
74
100
  };
@@ -158,6 +158,7 @@ declare const FormCardTypes: () => (({
158
158
  title: string;
159
159
  testId: string;
160
160
  actionButtons: boolean;
161
+ isLoading: boolean;
161
162
  noPadding: boolean;
162
163
  saveLabel: string;
163
164
  cancelLabel: string;
@@ -175,6 +176,10 @@ declare const FormCardTypes: () => (({
175
176
  type: import("vue").PropType<boolean>;
176
177
  default: boolean;
177
178
  };
179
+ isLoading: {
180
+ type: import("vue").PropType<boolean>;
181
+ default: boolean;
182
+ };
178
183
  noPadding: {
179
184
  type: import("vue").PropType<boolean>;
180
185
  default: boolean;
@@ -194,7 +199,7 @@ declare const FormCardTypes: () => (({
194
199
  }>> & {
195
200
  onCancel?: () => any;
196
201
  onSave?: () => any;
197
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "testId" | "actionButtons" | "noPadding" | "saveLabel" | "cancelLabel" | "saveLoading">;
202
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "testId" | "actionButtons" | "isLoading" | "noPadding" | "saveLabel" | "cancelLabel" | "saveLoading">;
198
203
  $attrs: {
199
204
  [x: string]: unknown;
200
205
  };
@@ -221,6 +226,10 @@ declare const FormCardTypes: () => (({
221
226
  type: import("vue").PropType<boolean>;
222
227
  default: boolean;
223
228
  };
229
+ isLoading: {
230
+ type: import("vue").PropType<boolean>;
231
+ default: boolean;
232
+ };
224
233
  noPadding: {
225
234
  type: import("vue").PropType<boolean>;
226
235
  default: boolean;
@@ -247,6 +256,7 @@ declare const FormCardTypes: () => (({
247
256
  title: string;
248
257
  testId: string;
249
258
  actionButtons: boolean;
259
+ isLoading: boolean;
250
260
  noPadding: boolean;
251
261
  saveLabel: string;
252
262
  cancelLabel: string;
@@ -284,6 +294,10 @@ declare const FormCardTypes: () => (({
284
294
  type: import("vue").PropType<boolean>;
285
295
  default: boolean;
286
296
  };
297
+ isLoading: {
298
+ type: import("vue").PropType<boolean>;
299
+ default: boolean;
300
+ };
287
301
  noPadding: {
288
302
  type: import("vue").PropType<boolean>;
289
303
  default: boolean;
@@ -320,6 +334,10 @@ declare const FormCardTypes: () => (({
320
334
  type: import("vue").PropType<boolean>;
321
335
  default: boolean;
322
336
  };
337
+ isLoading: {
338
+ type: import("vue").PropType<boolean>;
339
+ default: boolean;
340
+ };
323
341
  noPadding: {
324
342
  type: import("vue").PropType<boolean>;
325
343
  default: boolean;
@@ -346,6 +364,7 @@ declare const FormCardTypes: () => (({
346
364
  title: string;
347
365
  testId: string;
348
366
  actionButtons: boolean;
367
+ isLoading: boolean;
349
368
  noPadding: boolean;
350
369
  saveLabel: string;
351
370
  cancelLabel: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.3-rc.6",
3
+ "version": "2.1.3-rc.7",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .form-card[data-v-ad5e4be0]{border-radius:var(--border-radius-sm);border:1px solid var(--common-divider);background:var(--background-default)}.card-header[data-v-ad5e4be0]{display:flex;flex-direction:row;align-items:center;min-height:var(--spacing-700);border-radius:calc(var(--border-radius-sm) - 1px) calc(var(--border-radius-sm) - 1px) 0 0;color:var(--text-primary);background:var(--background-paper-elevation-0);padding:0 var(--spacing-300)}.card-content[data-v-ad5e4be0]{padding:var(--spacing-300) var(--spacing-400)}.card-content--no-padding[data-v-ad5e4be0]{padding:0}.form-actions[data-v-ad5e4be0]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;min-height:var(--spacing-700)}.form-action[data-v-ad5e4be0]{margin-left:var(--spacing-100)}