@ironsource/shared-ui 2.1.2 → 2.1.3-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AppHeader.vue_vue_type_style_index_0_scoped_209ecc03_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_f0c4710f_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_78c1497e_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_2f0a0202_lang.css +1 -0
- package/README.md +1 -1
- package/components/appHeader/AppHeader.vue.js +2 -2
- package/components/appHeader/AppHeader.vue2.js +16 -15
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +5 -0
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +15 -13
- package/components/dropdown/v4/DropdownV4.vue.d.ts +5 -0
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +60 -58
- package/components/dropdown/v4/dropdownStoryArgs.d.ts +8 -0
- package/components/dropdown/v4/index.d.ts +40 -2
- package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
- package/components/inlineCopy/InlineCopy.vue.js +2 -2
- package/components/inlineCopy/InlineCopy.vue2.js +22 -21
- package/components/inlineCopy/index.d.ts +9 -0
- package/index.d.ts +98 -4
- package/package.json +6 -2
- package/AppHeader.vue_vue_type_style_index_0_scoped_aa538d40_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_5fa01c78_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_258b9f7e_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_117ac157_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.app-header[data-v-209ecc03]{display:flex}.app-header .image-container[data-v-209ecc03]{height:48px;width:48px;border-radius:4px}.app-header .image-container img[data-v-209ecc03]{min-width:100%;max-width:100%;max-height:100%;object-fit:cover;border-radius:4px}.app-header .icon-container[data-v-209ecc03]{color:var(--action-active);display:flex;align-items:center;padding:0 8px}.app-header .name-container .title[data-v-209ecc03]{color:var(--text-primary)}.app-header .name-container .inline-copy[data-v-209ecc03]{color:var(--text-secondary)}.app-header.size-small[data-v-209ecc03]{align-items:center}.app-header.size-small .image-container[data-v-209ecc03]{height:28px;width:28px;border-radius:6px}.app-header.size-small .image-container img[data-v-209ecc03]{border-radius:6px}.app-header.size-small .name-container[data-v-209ecc03]{display:flex}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.default-dropdown-wrapper[data-v-f0c4710f]{position:relative}.dropdown-trigger[data-v-f0c4710f]{width:100%;padding:.3125rem .4375rem;display:flex;column-gap:.5rem;max-width:100%;box-sizing:border-box;border-radius:var(--border-radius-md);border:1px solid var(--action-outlined-border);background:var(--default-main);cursor:pointer;user-select:none;position:relative}.dropdown-trigger[data-v-f0c4710f]:hover{border:1px solid var(--action-active);background:var(--action-hover)}.dropdown-trigger.small[data-v-f0c4710f]{padding:.1875rem .4375rem}.dropdown-trigger.large[data-v-f0c4710f]{padding:.5625rem .4375rem}.dropdown-trigger.disabled[data-v-f0c4710f]{border:1px solid var(--action-outlined-border, #bbb);background:var(--action-disabled-background, #f1f1f1);cursor:not-allowed}.dropdown-trigger.open[data-v-f0c4710f]{padding:.25rem .375rem;border:2px solid var(--primary-main)}.dropdown-trigger.open.small[data-v-f0c4710f]{padding:.125rem .375rem}.dropdown-trigger.open.large[data-v-f0c4710f]{padding:.5rem .375rem}.dropdown-trigger.state-error[data-v-f0c4710f]{padding:4px 6px;border:2px solid var(--error-main)}.dropdown-trigger.state-success[data-v-f0c4710f]{padding:4px 6px;border:2px solid var(--success-main)}.dropdown-trigger.state-warning[data-v-f0c4710f]{padding:4px 6px;border:2px solid var(--warning-dark)}.dropdown-trigger .caret-down[data-v-f0c4710f]{color:var(--action-active)}.content[data-v-f0c4710f]{width:calc(100% - 28px);display:flex;gap:.25rem;align-items:center;color:var(--text-primary)}.content .displayed-value[data-v-f0c4710f]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content .image[data-v-f0c4710f]{width:20px;height:20px;flex:none}.content .image img[data-v-f0c4710f]{border-radius:4px;width:100%;height:100%}.content .start-icon[data-v-f0c4710f]{display:flex;color:var(--action-active)}.content .status-dot[data-v-f0c4710f]{padding-right:.25rem}.content .status-dot>div[data-v-f0c4710f]{position:relative;top:-1px}.dropdown-field-label[data-v-f0c4710f]{color:var(--text-primary)}.dropdown-field-help-text[data-v-f0c4710f]{margin-top:4px;position:absolute}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.v-enter-active[data-v-78c1497e],.v-leave-active[data-v-78c1497e]{transition:opacity .25s ease}ol[data-v-78c1497e],ul[data-v-78c1497e],menu[data-v-78c1497e]{list-style:none;margin:0;padding:0}.dropdown.full-width[data-v-78c1497e],.dropdown.full-width .button__container[data-v-78c1497e]{width:100%}.dropdown-list-wrapper[data-v-78c1497e]{display:flex;flex-direction:column;padding:.5rem}.list-container--multi[data-v-78c1497e]{margin-bottom:0}.inline-search .inline-search-wrapper[data-v-78c1497e]{padding-bottom:.25rem}.inline-search .list-container[data-v-78c1497e]{padding-top:0}.no-result-container[data-v-78c1497e]{height:100%;display:flex;align-items:center;padding:.375rem .5rem;color:var(--text-disabled)}.no-result[data-v-78c1497e]{color:var(--text-disabled);padding-left:.5rem}.list[data-v-78c1497e]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem}.list--multi[data-v-78c1497e]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.list li[data-v-78c1497e]:last-child .item-container{margin-bottom:0}.image-slot[data-v-78c1497e]{margin-right:.5rem}.actions-wrapper[data-v-78c1497e]{display:flex;width:100%;padding:.5rem .5rem .5rem .125rem;padding-bottom:0;border-top:1px solid var(--common-divider);justify-content:space-between}.apply-button[data-v-78c1497e]{margin-left:.5rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.inline-copy[data-v-2f0a0202]{display:inline-flex;cursor:pointer;color:var(--action-active)}.inline-copy .icon-copy[data-v-2f0a0202]{padding:0 4px;cursor:pointer;color:var(--action-active)}.inline-copy .icon-copy[data-v-2f0a0202]:hover{color:var(--action-primary)}
|
package/README.md
CHANGED
|
@@ -129,4 +129,4 @@ cd e2e/playwright
|
|
|
129
129
|
npm run pw:ui:local
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
Read more about this project <a href="https://github.com/ironsource-mobile/shared-ui-ssp/blob/main/e2e/playwright/README.md">here</a
|
|
132
|
+
Read more about this project <a href="https://github.com/ironsource-mobile/shared-ui-ssp/blob/main/e2e/playwright/README.md">here</a>.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./AppHeader.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../AppHeader.
|
|
4
|
-
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../AppHeader.vue_vue_type_style_index_0_scoped_209ecc03_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-209ecc03"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../AppHeader.
|
|
1
|
+
import "../../AppHeader.vue_vue_type_style_index_0_scoped_209ecc03_lang.css"; import { defineComponent as m, computed as r, openBlock as d, createElementBlock as c, normalizeClass as p, createElementVNode as a, createVNode as i, unref as t, mergeProps as u, withCtx as f, createTextVNode as y, toDisplayString as h } from "vue";
|
|
2
2
|
import x from "../icon/v4/IconV4.vue.js";
|
|
3
3
|
import v from "../typography/v4/Typography.vue.js";
|
|
4
4
|
import I from "../inlineCopy/InlineCopy.vue.js";
|
|
5
5
|
import { useTestIdAttrs as g } from "../../utils/testIds.js";
|
|
6
|
-
import { AppHeaderTestIdModifiers as
|
|
7
|
-
const
|
|
6
|
+
import { AppHeaderTestIdModifiers as o } from "../../testids/index.js";
|
|
7
|
+
const z = { class: "image-container" }, T = ["src", "alt"], C = { class: "icon-container" }, A = { class: "name-container" }, K = /* @__PURE__ */ m({
|
|
8
8
|
__name: "AppHeader",
|
|
9
9
|
props: {
|
|
10
10
|
image: { default: "" },
|
|
@@ -15,43 +15,44 @@ const T = { class: "image-container" }, z = ["src", "alt"], C = { class: "icon-c
|
|
|
15
15
|
type: { default: "normal" }
|
|
16
16
|
},
|
|
17
17
|
setup(e) {
|
|
18
|
-
const n = e, l =
|
|
18
|
+
const n = e, l = r(
|
|
19
19
|
() => n.platform ? n.platform.toLowerCase() : ""
|
|
20
|
-
), s = g(n.testId,
|
|
21
|
-
return (N, E) => (
|
|
20
|
+
), s = g(n.testId, o);
|
|
21
|
+
return (N, E) => (d(), c("div", {
|
|
22
22
|
class: p(["app-header", `size-${e.type}`])
|
|
23
23
|
}, [
|
|
24
|
-
a("div",
|
|
24
|
+
a("div", z, [
|
|
25
25
|
a("img", {
|
|
26
26
|
src: e.image,
|
|
27
27
|
alt: e.name
|
|
28
|
-
}, null, 8,
|
|
28
|
+
}, null, 8, T)
|
|
29
29
|
]),
|
|
30
30
|
a("div", C, [
|
|
31
|
-
|
|
31
|
+
i(t(x), {
|
|
32
32
|
type: "branded",
|
|
33
33
|
name: t(l),
|
|
34
34
|
size: e.type === "normal" ? "24px" : "20px"
|
|
35
35
|
}, null, 8, ["name", "size"])
|
|
36
36
|
]),
|
|
37
37
|
a("div", A, [
|
|
38
|
-
|
|
38
|
+
i(t(v), u({
|
|
39
39
|
variant: e.type === "normal" ? "h2" : "button",
|
|
40
40
|
class: "title"
|
|
41
|
-
}, t(s)[t(
|
|
42
|
-
default:
|
|
41
|
+
}, t(s)[t(o).TITLE]), {
|
|
42
|
+
default: f(() => [
|
|
43
43
|
y(h(e.name), 1)
|
|
44
44
|
]),
|
|
45
45
|
_: 1
|
|
46
46
|
}, 16, ["variant"]),
|
|
47
47
|
a("div", null, [
|
|
48
|
-
|
|
48
|
+
i(t(I), {
|
|
49
49
|
text: e.appKey,
|
|
50
50
|
size: "medium",
|
|
51
51
|
class: "inline-copy",
|
|
52
52
|
"hide-text-value": e.type === "small",
|
|
53
|
-
"test-id": e.testId
|
|
54
|
-
|
|
53
|
+
"test-id": e.testId,
|
|
54
|
+
"icon-size": e.type === "small" ? "18px" : null
|
|
55
|
+
}, null, 8, ["text", "hide-text-value", "test-id", "icon-size"])
|
|
55
56
|
])
|
|
56
57
|
])
|
|
57
58
|
], 2));
|
|
@@ -13,6 +13,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
13
13
|
hoverHelpTextPlacement?: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
14
14
|
feedbackVariant?: "success" | "warning" | "error";
|
|
15
15
|
feedbackText?: string;
|
|
16
|
+
showFeedbackIcon?: boolean;
|
|
16
17
|
loading?: boolean;
|
|
17
18
|
singleAppSelection?: boolean;
|
|
18
19
|
brandIconType?: "android" | "ios";
|
|
@@ -37,6 +38,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
37
38
|
hoverHelpTextPlacement: string;
|
|
38
39
|
feedbackText: string;
|
|
39
40
|
feedbackVariant: any;
|
|
41
|
+
showFeedbackIcon: boolean;
|
|
40
42
|
loading: boolean;
|
|
41
43
|
singleAppSelection: boolean;
|
|
42
44
|
brandIconType: any;
|
|
@@ -62,6 +64,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
62
64
|
hoverHelpTextPlacement?: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
63
65
|
feedbackVariant?: "success" | "warning" | "error";
|
|
64
66
|
feedbackText?: string;
|
|
67
|
+
showFeedbackIcon?: boolean;
|
|
65
68
|
loading?: boolean;
|
|
66
69
|
singleAppSelection?: boolean;
|
|
67
70
|
brandIconType?: "android" | "ios";
|
|
@@ -86,6 +89,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
86
89
|
hoverHelpTextPlacement: string;
|
|
87
90
|
feedbackText: string;
|
|
88
91
|
feedbackVariant: any;
|
|
92
|
+
showFeedbackIcon: boolean;
|
|
89
93
|
loading: boolean;
|
|
90
94
|
singleAppSelection: boolean;
|
|
91
95
|
brandIconType: any;
|
|
@@ -118,6 +122,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
118
122
|
hoverHelpTextPlacement: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
119
123
|
feedbackText: string;
|
|
120
124
|
feedbackVariant: "success" | "warning" | "error";
|
|
125
|
+
showFeedbackIcon: boolean;
|
|
121
126
|
statusDotType: "default" | "disabled" | "success" | "warning" | "error" | "archive";
|
|
122
127
|
}>, {
|
|
123
128
|
image?(_: {}): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DefaultDropdownTrigger.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DefaultDropdownTrigger.
|
|
4
|
-
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_f0c4710f_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-f0c4710f"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../DefaultDropdownTrigger.
|
|
2
|
-
import
|
|
1
|
+
import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_f0c4710f_lang.css"; import { defineComponent as I, computed as r, openBlock as a, createElementBlock as n, createBlock as m, createCommentVNode as o, createElementVNode as c, mergeProps as y, unref as l, renderSlot as h, createVNode as s, withCtx as O, createTextVNode as x, toDisplayString as w } from "vue";
|
|
2
|
+
import V from "../../typography/v4/Typography.vue.js";
|
|
3
3
|
import { DropdownTestIdModifiers as u } from "../../../testids/index.js";
|
|
4
4
|
import T from "../../icon/v4/IconV4.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import B from "../../shared/FieldLabel.vue.js";
|
|
6
6
|
import D from "../../shared/FieldHelpText.vue.js";
|
|
7
7
|
import { useTestIdAttrs as A } from "../../../utils/testIds.js";
|
|
8
8
|
import N from "../../statusDot/StatusDot.vue.js";
|
|
@@ -15,7 +15,7 @@ const K = { class: "default-dropdown-wrapper" }, $ = { class: "content" }, C = {
|
|
|
15
15
|
}, S = {
|
|
16
16
|
key: 2,
|
|
17
17
|
class: "status-dot"
|
|
18
|
-
}, z = { class: "caret-down" }, G = /* @__PURE__ */
|
|
18
|
+
}, z = { class: "caret-down" }, G = /* @__PURE__ */ I({
|
|
19
19
|
__name: "DefaultDropdownTrigger",
|
|
20
20
|
props: {
|
|
21
21
|
placeholder: { default: "Select" },
|
|
@@ -32,6 +32,7 @@ const K = { class: "default-dropdown-wrapper" }, $ = { class: "content" }, C = {
|
|
|
32
32
|
hoverHelpTextPlacement: { default: "top" },
|
|
33
33
|
feedbackVariant: { default: null },
|
|
34
34
|
feedbackText: { default: "" },
|
|
35
|
+
showFeedbackIcon: { type: Boolean, default: !1 },
|
|
35
36
|
loading: { type: Boolean, default: !1 },
|
|
36
37
|
singleAppSelection: { type: Boolean, default: !1 },
|
|
37
38
|
brandIconType: { default: null },
|
|
@@ -43,11 +44,11 @@ const K = { class: "default-dropdown-wrapper" }, $ = { class: "content" }, C = {
|
|
|
43
44
|
statusDotType: { default: null }
|
|
44
45
|
},
|
|
45
46
|
emits: ["click"],
|
|
46
|
-
setup(t, { emit:
|
|
47
|
-
const e = t,
|
|
47
|
+
setup(t, { emit: b }) {
|
|
48
|
+
const e = t, g = r(
|
|
48
49
|
() => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
|
|
49
50
|
), k = () => {
|
|
50
|
-
|
|
51
|
+
b("click");
|
|
51
52
|
}, f = A(e.testId, u), v = r(() => e.multi ? !Array.isArray(e.selectedOption) || !e.selectedOption?.length ? e.placeholder : e.options?.length === e.selectedOption.length ? `All selected (${e.selectedOption.length})` : e.selectedOption?.length === 1 && e.displayValue ? e.displayValue(e.selectedOption[0]) : `${e.selectedOption.length} selected` : e.selectedOption ? e.displayValue(e.selectedOption) : e.placeholder), d = r(() => {
|
|
52
53
|
if (!e.selectedOption)
|
|
53
54
|
return null;
|
|
@@ -57,7 +58,7 @@ const K = { class: "default-dropdown-wrapper" }, $ = { class: "content" }, C = {
|
|
|
57
58
|
return e.selectedOption.length === 1 ? e.selectedOption[0] : null;
|
|
58
59
|
});
|
|
59
60
|
return (i, p) => (a(), n("div", K, [
|
|
60
|
-
t.label ? (a(), m(
|
|
61
|
+
t.label ? (a(), m(B, {
|
|
61
62
|
key: 0,
|
|
62
63
|
label: t.label,
|
|
63
64
|
mandatory: t.mandatory,
|
|
@@ -68,7 +69,7 @@ const K = { class: "default-dropdown-wrapper" }, $ = { class: "content" }, C = {
|
|
|
68
69
|
class: "dropdown-field-label"
|
|
69
70
|
}, null, 8, ["label", "mandatory", "hover-help-text", "hover-help-text-placement", "disabled", "test-id"])) : o("", !0),
|
|
70
71
|
c("div", y({
|
|
71
|
-
class: ["dropdown-trigger", [t.size, l(
|
|
72
|
+
class: ["dropdown-trigger", [t.size, l(g), { open: t.open, disabled: t.disabled }]]
|
|
72
73
|
}, l(f)[l(u).BUTTON_WRAPPER], {
|
|
73
74
|
onClick: p[0] || (p[0] = (E) => k())
|
|
74
75
|
}), [
|
|
@@ -93,9 +94,9 @@ const K = { class: "default-dropdown-wrapper" }, $ = { class: "content" }, C = {
|
|
|
93
94
|
t.statusDotType ? (a(), n("div", S, [
|
|
94
95
|
s(l(N), { type: t.statusDotType }, null, 8, ["type"])
|
|
95
96
|
])) : o("", !0),
|
|
96
|
-
s(l(
|
|
97
|
-
default:
|
|
98
|
-
x(
|
|
97
|
+
s(l(V), y({ variant: "body1" }, l(f)[l(u).BUTTON_CONTENT], { class: "displayed-value" }), {
|
|
98
|
+
default: O(() => [
|
|
99
|
+
x(w(l(v)), 1)
|
|
99
100
|
]),
|
|
100
101
|
_: 1
|
|
101
102
|
}, 16)
|
|
@@ -111,9 +112,10 @@ const K = { class: "default-dropdown-wrapper" }, $ = { class: "content" }, C = {
|
|
|
111
112
|
key: 1,
|
|
112
113
|
text: t.feedbackText,
|
|
113
114
|
variant: t.feedbackVariant,
|
|
115
|
+
"show-icon": t.showFeedbackIcon,
|
|
114
116
|
"test-id": t.testId,
|
|
115
117
|
class: "dropdown-field-help-text"
|
|
116
|
-
}, null, 8, ["text", "variant", "test-id"])) : o("", !0)
|
|
118
|
+
}, null, 8, ["text", "variant", "show-icon", "test-id"])) : o("", !0)
|
|
117
119
|
]));
|
|
118
120
|
}
|
|
119
121
|
});
|
|
@@ -28,6 +28,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
28
28
|
triggerHelperText?: string;
|
|
29
29
|
triggerFeedbackText?: string;
|
|
30
30
|
triggerFeedbackVariant?: "success" | "warning" | "error";
|
|
31
|
+
triggerFeedbackShowIcon?: boolean;
|
|
31
32
|
size?: "small" | "medium" | "large";
|
|
32
33
|
mandatory?: boolean;
|
|
33
34
|
predefinedTrigger?: "default" | "icon-button" | "chip" | "app";
|
|
@@ -79,6 +80,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
79
80
|
triggerHelperText: string;
|
|
80
81
|
triggerFeedbackText: string;
|
|
81
82
|
triggerFeedbackVariant: any;
|
|
83
|
+
triggerFeedbackShowIcon: boolean;
|
|
82
84
|
searchAutoFocus: boolean;
|
|
83
85
|
predefinedTrigger: "default" | "icon-button" | "chip" | "app";
|
|
84
86
|
optionNameKey: string;
|
|
@@ -127,6 +129,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
127
129
|
triggerHelperText?: string;
|
|
128
130
|
triggerFeedbackText?: string;
|
|
129
131
|
triggerFeedbackVariant?: "success" | "warning" | "error";
|
|
132
|
+
triggerFeedbackShowIcon?: boolean;
|
|
130
133
|
size?: "small" | "medium" | "large";
|
|
131
134
|
mandatory?: boolean;
|
|
132
135
|
predefinedTrigger?: "default" | "icon-button" | "chip" | "app";
|
|
@@ -178,6 +181,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
178
181
|
triggerHelperText: string;
|
|
179
182
|
triggerFeedbackText: string;
|
|
180
183
|
triggerFeedbackVariant: any;
|
|
184
|
+
triggerFeedbackShowIcon: boolean;
|
|
181
185
|
searchAutoFocus: boolean;
|
|
182
186
|
predefinedTrigger: "default" | "icon-button" | "chip" | "app";
|
|
183
187
|
optionNameKey: string;
|
|
@@ -230,6 +234,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
230
234
|
triggerHelperText: string;
|
|
231
235
|
triggerFeedbackText: string;
|
|
232
236
|
triggerFeedbackVariant: "success" | "warning" | "error";
|
|
237
|
+
triggerFeedbackShowIcon: boolean;
|
|
233
238
|
searchAutoFocus: boolean;
|
|
234
239
|
predefinedTrigger: "default" | "icon-button" | "chip" | "app";
|
|
235
240
|
fullWidth: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./DropdownV4.vue2.js";
|
|
2
2
|
/* empty css *//* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DropdownV4.
|
|
3
|
+
// import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_78c1497e_lang.css"; //*');
|
|
4
4
|
// import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
|
|
5
|
-
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
5
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-78c1497e"]]);
|
|
6
6
|
export {
|
|
7
7
|
r as default
|
|
8
8
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "../../../DropdownV4.
|
|
1
|
+
import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_78c1497e_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as ae, computed as F, openBlock as i, createElementBlock as n, mergeProps as s, unref as e, renderSlot as I, createElementVNode as y, createVNode as a, withCtx as u, Transition as de, normalizeClass as V, normalizeStyle as re, isRef as se, createCommentVNode as d, createTextVNode as g, toDisplayString as ue, withModifiers as x, Fragment as ce, renderList as fe, toRaw as T, createBlock as me, resolveDynamicComponent as ye } from "vue";
|
|
2
2
|
import A from "../../button/v4/ButtonV4.vue.js";
|
|
3
3
|
import "../../button/v4/IconButtonV4.vue.js";
|
|
4
4
|
import "./DropdownV4.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import pe from "./DefaultDropdownTrigger.vue.js";
|
|
6
6
|
import ge from "./IconButtonDropdownTrigger.vue.js";
|
|
7
7
|
import he from "./ChipDropdownTrigger.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import ke from "./AppDropdownTrigger.vue.js";
|
|
9
9
|
import $ from "./OptionV4.vue.js";
|
|
10
|
-
import
|
|
10
|
+
import Te from "../../search/v4/SearchV4.vue.js";
|
|
11
11
|
import H from "../../typography/v4/Typography.vue.js";
|
|
12
|
-
import { Dropdown as
|
|
12
|
+
import { Dropdown as be } from "floating-vue";
|
|
13
13
|
import { DropdownTestIdModifiers as c } from "../../../testids/index.js";
|
|
14
|
-
import { dropdownCommon as
|
|
14
|
+
import { dropdownCommon as ve } from "../common/Dropdown.common.js";
|
|
15
15
|
import Ie from "../../loader/v4/Loader.vue.js";
|
|
16
|
-
import { useTestIdAttrs as
|
|
17
|
-
import { TRIGGERS as
|
|
18
|
-
import { useElementSize as
|
|
19
|
-
const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 },
|
|
16
|
+
import { useTestIdAttrs as we } from "../../../utils/testIds.js";
|
|
17
|
+
import { TRIGGERS as p } from "./Dropdown.types.js";
|
|
18
|
+
import { useElementSize as Ce } from "@vueuse/core";
|
|
19
|
+
const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Be = { key: 1 }, Ne = { key: 2 }, Oe = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "inline-search-wrapper"
|
|
22
22
|
}, De = {
|
|
@@ -28,7 +28,7 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
28
28
|
}, Re = { key: 2 }, Pe = ["aria-selected", "aria-disabled", "onClick"], ze = {
|
|
29
29
|
key: 1,
|
|
30
30
|
class: "actions-wrapper"
|
|
31
|
-
}, Ke = { class: "actions-clear-all" },
|
|
31
|
+
}, Ke = { class: "actions-clear-all" }, Fe = { class: "actions-apply-cancel" }, ot = /* @__PURE__ */ ae({
|
|
32
32
|
__name: "DropdownV4",
|
|
33
33
|
props: {
|
|
34
34
|
modelValue: { default: null },
|
|
@@ -56,9 +56,10 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
56
56
|
triggerHelperText: { default: "" },
|
|
57
57
|
triggerFeedbackText: { default: "" },
|
|
58
58
|
triggerFeedbackVariant: { default: null },
|
|
59
|
+
triggerFeedbackShowIcon: { type: Boolean, default: !1 },
|
|
59
60
|
size: { default: "medium" },
|
|
60
61
|
mandatory: { type: Boolean, default: !1 },
|
|
61
|
-
predefinedTrigger: { default:
|
|
62
|
+
predefinedTrigger: { default: p.DEFAULT },
|
|
62
63
|
inlineSearch: { type: Boolean, default: !1 },
|
|
63
64
|
inlineSearchPlaceholder: { default: "Search" },
|
|
64
65
|
onSearch: { type: Function, default: null },
|
|
@@ -87,19 +88,19 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
87
88
|
}, {
|
|
88
89
|
onKeydown: h,
|
|
89
90
|
open: f,
|
|
90
|
-
toggleMenu:
|
|
91
|
+
toggleMenu: w,
|
|
91
92
|
onButtonKeydown: M,
|
|
92
|
-
query:
|
|
93
|
+
query: C,
|
|
93
94
|
containerProps: G,
|
|
94
95
|
calculateTableHeight: X,
|
|
95
|
-
wrapperProps:
|
|
96
|
+
wrapperProps: B,
|
|
96
97
|
filteredOptions: q,
|
|
97
|
-
allSelected:
|
|
98
|
+
allSelected: N,
|
|
98
99
|
isIndeterminate: Y,
|
|
99
100
|
onSelectAll: j,
|
|
100
101
|
virtualOptions: O,
|
|
101
102
|
isSelected: S,
|
|
102
|
-
selectedOption:
|
|
103
|
+
selectedOption: k,
|
|
103
104
|
onSelect: D,
|
|
104
105
|
activeIndex: E,
|
|
105
106
|
onCancel: J,
|
|
@@ -112,15 +113,15 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
112
113
|
el: le,
|
|
113
114
|
onClearAllSelections: P,
|
|
114
115
|
clearAll: oe
|
|
115
|
-
} =
|
|
116
|
+
} = ve(r, W, L);
|
|
116
117
|
U({
|
|
117
118
|
selectItem: D,
|
|
118
119
|
scrollTo: Z
|
|
119
120
|
});
|
|
120
|
-
const m =
|
|
121
|
-
|
|
121
|
+
const m = we(r.testId, c), z = F(() => !r.predefinedTrigger || r.predefinedTrigger === p.DEFAULT ? pe : r.predefinedTrigger === p.APP ? ke : null), { width: K } = Ce(R), ie = F(() => r.optionsListWidth ? r.optionsListWidth : !r.predefinedTrigger || r.predefinedTrigger === p.DEFAULT || r.predefinedTrigger === p.APP ? K.value - 2 > 240 ? `${K.value - 2}px` : `${L.DROPLIST_MIN_WIDTH}px` : "auto"), ne = () => {
|
|
122
|
+
w();
|
|
122
123
|
};
|
|
123
|
-
return (
|
|
124
|
+
return (b, o) => (i(), n("div", s({
|
|
124
125
|
ref_key: "el",
|
|
125
126
|
ref: le,
|
|
126
127
|
class: ["dropdown dropdown--main-wrapper", [{ "dropdown--disabled": t.disabled, "full-width": t.fullWidth }]],
|
|
@@ -129,9 +130,9 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
129
130
|
onKeydown: o[6] || (o[6] = //@ts-ignore
|
|
130
131
|
(...l) => e(h) && e(h)(...l))
|
|
131
132
|
}), [
|
|
132
|
-
I(
|
|
133
|
-
|
|
134
|
-
a(e(
|
|
133
|
+
I(b.$slots, "label", {}, void 0, !0),
|
|
134
|
+
y("div", Ae, [
|
|
135
|
+
a(e(be), s({
|
|
135
136
|
theme: t.theme,
|
|
136
137
|
"popper-class": [
|
|
137
138
|
t.popperClass,
|
|
@@ -156,7 +157,7 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
156
157
|
key: 0,
|
|
157
158
|
ref_key: "listRef",
|
|
158
159
|
ref: _,
|
|
159
|
-
class:
|
|
160
|
+
class: V(["light-theme-v4", {
|
|
160
161
|
"dropdown--disabled": t.disabled,
|
|
161
162
|
"inline-search": t.inlineSearch
|
|
162
163
|
}]),
|
|
@@ -169,10 +170,10 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
169
170
|
(...l) => e(h) && e(h)(...l))
|
|
170
171
|
}, [
|
|
171
172
|
e(f) && t.inlineSearch ? (i(), n("div", Oe, [
|
|
172
|
-
a(e(
|
|
173
|
-
modelValue: e(
|
|
173
|
+
a(e(Te), {
|
|
174
|
+
modelValue: e(C),
|
|
174
175
|
"onUpdate:modelValue": [
|
|
175
|
-
o[3] || (o[3] = (l) => se(
|
|
176
|
+
o[3] || (o[3] = (l) => se(C) ? C.value = l : null),
|
|
176
177
|
t.onClear
|
|
177
178
|
],
|
|
178
179
|
placeholder: t.inlineSearchPlaceholder,
|
|
@@ -183,17 +184,17 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
183
184
|
onKeydown: e(h)
|
|
184
185
|
}, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id", "onUpdate:modelValue", "onKeydown"])
|
|
185
186
|
])) : d("", !0),
|
|
186
|
-
I(
|
|
187
|
-
|
|
187
|
+
I(b.$slots, "input-list", { open: e(f) }, void 0, !0),
|
|
188
|
+
y("div", s({
|
|
188
189
|
class: ["list-container", { "list-container--multi": t.multi }],
|
|
189
190
|
style: { height: `${e(X)}rem` }
|
|
190
191
|
}, {
|
|
191
192
|
...e(G),
|
|
192
193
|
...e(m)[e(c).LIST_CONTAINER]
|
|
193
194
|
}), [
|
|
194
|
-
|
|
195
|
+
y("ul", s(e(B), {
|
|
195
196
|
style: {
|
|
196
|
-
height: Number(e(
|
|
197
|
+
height: Number(e(B).style.height) - 4
|
|
197
198
|
},
|
|
198
199
|
role: "listbox",
|
|
199
200
|
class: ["list", { "list--multi": t.multi }]
|
|
@@ -218,15 +219,15 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
218
219
|
t.showSelectAll !== !1 && t.multi ? (i(), n("li", Re, [
|
|
219
220
|
a(e($), s(
|
|
220
221
|
{
|
|
221
|
-
"aria-selected": e(
|
|
222
|
+
"aria-selected": e(N),
|
|
222
223
|
"aria-disabled": !!t.disabled,
|
|
223
|
-
"selected-prop": e(
|
|
224
|
+
"selected-prop": e(N),
|
|
224
225
|
"is-indeterminate": e(Y),
|
|
225
226
|
"select-all-option": ""
|
|
226
227
|
},
|
|
227
228
|
e(m)[e(c).SELECT_ALL],
|
|
228
229
|
{
|
|
229
|
-
onClick: o[4] || (o[4] =
|
|
230
|
+
onClick: o[4] || (o[4] = x((l) => e(j)(), ["stop"]))
|
|
230
231
|
}
|
|
231
232
|
), {
|
|
232
233
|
default: u(() => [
|
|
@@ -235,21 +236,21 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
235
236
|
_: 1
|
|
236
237
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
|
|
237
238
|
])) : d("", !0),
|
|
238
|
-
e(O).length && !t.loading ? (i(!0), n(ce, { key: 3 }, fe(e(O), ({ data: l, index:
|
|
239
|
-
key:
|
|
240
|
-
"aria-selected": e(S)(
|
|
239
|
+
e(O).length && !t.loading ? (i(!0), n(ce, { key: 3 }, fe(e(O), ({ data: l, index: v }) => (i(), n("li", {
|
|
240
|
+
key: v,
|
|
241
|
+
"aria-selected": e(S)(T(e(k)), l),
|
|
241
242
|
"aria-disabled": !!t.disabled,
|
|
242
|
-
onClick:
|
|
243
|
+
onClick: x(() => e(D)(l, v), ["stop"])
|
|
243
244
|
}, [
|
|
244
|
-
I(
|
|
245
|
+
I(b.$slots, "default", {
|
|
245
246
|
option: l,
|
|
246
|
-
selected: e(S)(
|
|
247
|
-
active:
|
|
247
|
+
selected: e(S)(T(e(k)), l),
|
|
248
|
+
active: T(e(E)) === v
|
|
248
249
|
}, () => [
|
|
249
250
|
a(e($), {
|
|
250
251
|
option: l,
|
|
251
|
-
selected: e(S)(
|
|
252
|
-
active:
|
|
252
|
+
selected: e(S)(T(e(k)), l),
|
|
253
|
+
active: T(e(E)) === v,
|
|
253
254
|
"name-key": t.optionNameKey,
|
|
254
255
|
"image-key": t.optionImageKey,
|
|
255
256
|
"icon-key": t.optionIconKey,
|
|
@@ -260,7 +261,7 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
260
261
|
], 16)
|
|
261
262
|
], 16),
|
|
262
263
|
t.multi ? (i(), n("div", ze, [
|
|
263
|
-
|
|
264
|
+
y("div", Ke, [
|
|
264
265
|
a(e(A), s(
|
|
265
266
|
{
|
|
266
267
|
ref_key: "clearAll",
|
|
@@ -278,7 +279,7 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
278
279
|
_: 1
|
|
279
280
|
}, 16, ["onClick"])
|
|
280
281
|
]),
|
|
281
|
-
|
|
282
|
+
y("div", Fe, [
|
|
282
283
|
a(e(A), s(
|
|
283
284
|
{
|
|
284
285
|
ref_key: "cancel",
|
|
@@ -316,31 +317,32 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
316
317
|
})
|
|
317
318
|
]),
|
|
318
319
|
default: u(() => [
|
|
319
|
-
|
|
320
|
-
class:
|
|
320
|
+
y("div", {
|
|
321
|
+
class: V(["button__container", {
|
|
321
322
|
"button__container--open": !!e(f),
|
|
322
323
|
[`button__container--${t.size}`]: !0,
|
|
323
324
|
"button__container--disabled": t.disabled
|
|
324
325
|
}])
|
|
325
326
|
}, [
|
|
326
|
-
I(
|
|
327
|
-
|
|
327
|
+
I(b.$slots, "dropdown-trigger", {}, () => [
|
|
328
|
+
y("div", {
|
|
328
329
|
ref_key: "buttonRef",
|
|
329
330
|
ref: R
|
|
330
331
|
}, [
|
|
331
332
|
e(z) ? (i(), n("div", Le, [
|
|
332
|
-
(i(), me(
|
|
333
|
+
(i(), me(ye(e(z)), {
|
|
333
334
|
placeholder: t.placeholder,
|
|
334
335
|
open: e(f),
|
|
335
336
|
label: t.triggerLabel,
|
|
336
337
|
"hover-help-text": t.triggerHelperText,
|
|
337
338
|
"feedback-text": t.triggerFeedbackText,
|
|
338
339
|
"feedback-variant": t.triggerFeedbackVariant,
|
|
340
|
+
"show-feedback-icon": t.triggerFeedbackShowIcon,
|
|
339
341
|
mandatory: t.mandatory,
|
|
340
342
|
"test-id": t.testId,
|
|
341
343
|
multi: t.multi,
|
|
342
344
|
disabled: t.disabled,
|
|
343
|
-
"selected-option": e(
|
|
345
|
+
"selected-option": e(k),
|
|
344
346
|
"display-value": t.displayValue,
|
|
345
347
|
options: t.options,
|
|
346
348
|
"option-name-key": t.optionNameKey,
|
|
@@ -352,23 +354,23 @@ const Se = ["tabindex"], Ae = { style: { width: "100%" } }, Le = { key: 0 }, Ne
|
|
|
352
354
|
size: t.size,
|
|
353
355
|
onKeydown: e(M),
|
|
354
356
|
onClick: ne
|
|
355
|
-
}, null, 40, ["placeholder", "open", "label", "hover-help-text", "feedback-text", "feedback-variant", "mandatory", "test-id", "multi", "disabled", "selected-option", "display-value", "options", "option-name-key", "option-image-key", "option-icon-key", "option-icon-type", "value-to-copy", "status-dot-type", "size", "onKeydown"]))
|
|
357
|
+
}, null, 40, ["placeholder", "open", "label", "hover-help-text", "feedback-text", "feedback-variant", "show-feedback-icon", "mandatory", "test-id", "multi", "disabled", "selected-option", "display-value", "options", "option-name-key", "option-image-key", "option-icon-key", "option-icon-type", "value-to-copy", "status-dot-type", "size", "onKeydown"]))
|
|
356
358
|
])) : d("", !0),
|
|
357
|
-
t.predefinedTrigger === e(
|
|
359
|
+
t.predefinedTrigger === e(p).ICON_BUTTON ? (i(), n("div", Be, [
|
|
358
360
|
a(e(ge), {
|
|
359
|
-
onClick: o[0] || (o[0] = (l) => e(
|
|
361
|
+
onClick: o[0] || (o[0] = (l) => e(w)())
|
|
360
362
|
})
|
|
361
363
|
])) : d("", !0),
|
|
362
|
-
t.predefinedTrigger === e(
|
|
364
|
+
t.predefinedTrigger === e(p).CHIP ? (i(), n("div", Ne, [
|
|
363
365
|
a(e(he), {
|
|
364
366
|
open: e(f),
|
|
365
367
|
label: t.placeholder,
|
|
366
368
|
"test-id": t.testId,
|
|
367
369
|
options: t.options,
|
|
368
|
-
"selected-option": e(
|
|
370
|
+
"selected-option": e(k),
|
|
369
371
|
"display-value": t.displayValue,
|
|
370
372
|
multi: t.multi,
|
|
371
|
-
onClick: o[1] || (o[1] = (l) => e(
|
|
373
|
+
onClick: o[1] || (o[1] = (l) => e(w)()),
|
|
372
374
|
onClear: o[2] || (o[2] = (l) => e(P)())
|
|
373
375
|
}, null, 8, ["open", "label", "test-id", "options", "selected-option", "display-value", "multi"])
|
|
374
376
|
])) : d("", !0)
|
|
@@ -29,6 +29,14 @@ export declare const dropDownStoryArgs: {
|
|
|
29
29
|
category: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
triggerFeedbackShowIcon: {
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
table: {
|
|
37
|
+
category: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
32
40
|
predefinedTrigger: {
|
|
33
41
|
description: string;
|
|
34
42
|
options: ("default" | "icon-button" | "chip" | "app")[];
|