energy-components 1.17.0 → 1.19.0-beta.0
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/dist/components/breadcrumbs.es.js +32 -29
- package/dist/components/datepicker.es.js +2725 -2662
- package/dist/components/dropdown.es.js +21 -21
- package/dist/components/{floating-ui.vue-7LKzPqHI.js → floating-ui.vue-DWAG1g94.js} +3 -3
- package/dist/components/link.es.js +51 -49
- package/dist/components/popover.es.js +47 -47
- package/dist/components/sidebar.es.js +143 -59
- package/dist/components/snackBar.es.js +37 -22
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/sidebar.css +1 -1
- package/dist/components/style/snackBar.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/textField.es.js +28 -26
- package/dist/components/tooltip.es.js +135 -84
- package/dist/energy-components.es.js +4967 -4748
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/feedback/snack-bar/snack-bar.vue.d.ts +13 -1
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +19 -4
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +2 -0
- package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +128 -3
- package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +18 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +10 -6
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +2 -2
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +47 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as fe, mergeModels as J, toRefs as ve, useModel as ye, ref as D, computed as i, provide as _, onMounted as be, nextTick as F, onBeforeUnmount as we, createElementBlock as w, openBlock as u, normalizeClass as T, unref as a, createVNode as S, mergeProps as Q, withModifiers as r, createSlots as X, withCtx as d, createElementVNode as c, createCommentVNode as O, createBlock as K, renderSlot as v, Fragment as ge, toDisplayString as E } from "vue";
|
|
2
2
|
import he from "./multiselect.es.js";
|
|
3
3
|
import ke from "./checkbox.es.js";
|
|
4
4
|
import { _ as $e } from "./radio-group.vue_vue_type_script_setup_true_lang-DpguLlRK.js";
|
|
@@ -15,7 +15,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
15
15
|
}, Te = { class: "rds-e-dropdown__before-list-container" }, Ee = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "rds-e-dropdown__before-list"
|
|
18
|
-
}, Le = { class: "rds-e-dropdown__before-list-container" }, Me = { class: "rds-e-dropdown__after-list" }, je = { class: "rds-e-dropdown__after-list-container" }, Ie = /* @__PURE__ */
|
|
18
|
+
}, Le = { class: "rds-e-dropdown__before-list-container" }, Me = { class: "rds-e-dropdown__after-list" }, je = { class: "rds-e-dropdown__after-list-container" }, Ie = /* @__PURE__ */ fe({
|
|
19
19
|
__name: "dropdown",
|
|
20
20
|
props: /* @__PURE__ */ J({
|
|
21
21
|
/**
|
|
@@ -198,13 +198,13 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
198
198
|
multiple: $,
|
|
199
199
|
options: h,
|
|
200
200
|
textOnly: j
|
|
201
|
-
} = ve(s), n = ye(o, "modelValue"), p = D([]),
|
|
201
|
+
} = ve(s), n = ye(o, "modelValue"), p = D([]), m = D(), y = D(), I = D(""), q = D(!1);
|
|
202
202
|
let B = !1;
|
|
203
203
|
const le = () => {
|
|
204
204
|
q.value = !0;
|
|
205
205
|
}, te = i(() => {
|
|
206
206
|
var e;
|
|
207
|
-
return ((e =
|
|
207
|
+
return ((e = m.value) == null ? void 0 : e.isOpen) ?? !1;
|
|
208
208
|
}), C = i(() => s.autocomplete && Object.keys(s.autocomplete).length > 0), oe = i(() => ({
|
|
209
209
|
id: s.autocomplete.id || `autocomplete-${s.id}`,
|
|
210
210
|
label: s.autocomplete.label || s.label,
|
|
@@ -223,7 +223,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
223
223
|
const l = p.value.findIndex((t) => t === e);
|
|
224
224
|
l > -1 && p.value.splice(l, 1);
|
|
225
225
|
}), _("isFocusWithinDropdown", (e) => {
|
|
226
|
-
const l = p.value.some((
|
|
226
|
+
const l = p.value.some((f) => f === e || f.contains(e)), t = e.classList && (e.classList.contains("rds-e-dropdown__before-list") || e.closest(".rds-e-dropdown__before-list") || e.classList.contains("multiselect") || e.closest(".multiselect"));
|
|
227
227
|
return l || t;
|
|
228
228
|
});
|
|
229
229
|
const H = i({
|
|
@@ -276,26 +276,26 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
}, P = (e) => {
|
|
279
|
-
|
|
279
|
+
m.value.select(e), B = !0;
|
|
280
280
|
}, A = () => {
|
|
281
|
-
|
|
281
|
+
m.value.activate();
|
|
282
282
|
}, R = () => {
|
|
283
|
-
|
|
283
|
+
m.value.deactivate();
|
|
284
284
|
}, W = () => {
|
|
285
|
-
|
|
285
|
+
m.value.toggle(), B = !0;
|
|
286
286
|
}, z = () => {
|
|
287
287
|
te.value ? R() : A();
|
|
288
|
-
},
|
|
288
|
+
}, me = () => {
|
|
289
289
|
C.value && y.value && (le(), A(), F(() => {
|
|
290
290
|
y.value.focus();
|
|
291
291
|
}));
|
|
292
292
|
}, G = (e) => {
|
|
293
|
-
var
|
|
293
|
+
var f, g;
|
|
294
294
|
if (B) {
|
|
295
295
|
B = !1;
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
|
-
const l = e.target, t = !((g = (
|
|
298
|
+
const l = e.target, t = !((g = (f = m.value) == null ? void 0 : f.$el) != null && g.contains(l));
|
|
299
299
|
if (q.value) {
|
|
300
300
|
const b = y.value && !y.value.$el.contains(l) && !l.closest(".rds-e-dropdown__before-list");
|
|
301
301
|
t && b && (q.value = !1, R());
|
|
@@ -303,7 +303,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
303
303
|
};
|
|
304
304
|
return be(() => {
|
|
305
305
|
var e;
|
|
306
|
-
(e =
|
|
306
|
+
(e = m.value) != null && e.$el && p.value.push(m.value.$el), F(() => {
|
|
307
307
|
var l;
|
|
308
308
|
if (C.value && ((l = y.value) != null && l.$el)) {
|
|
309
309
|
p.value.push(y.value.$el);
|
|
@@ -330,7 +330,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
330
330
|
}, [
|
|
331
331
|
S(he, Q({
|
|
332
332
|
ref_key: "multiselect",
|
|
333
|
-
ref:
|
|
333
|
+
ref: m,
|
|
334
334
|
modelValue: n.value,
|
|
335
335
|
"onUpdate:modelValue": l[12] || (l[12] = (t) => n.value = t),
|
|
336
336
|
class: re.value,
|
|
@@ -375,7 +375,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
375
375
|
key: 1,
|
|
376
376
|
id: `multiselect-dropdown-${o.id}`,
|
|
377
377
|
modelValue: N.value,
|
|
378
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
378
|
+
"onUpdate:modelValue": l[0] || (l[0] = (f) => N.value = f),
|
|
379
379
|
class: "rds-e-dropdown__input",
|
|
380
380
|
label: o.label,
|
|
381
381
|
error: o.error,
|
|
@@ -409,7 +409,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
409
409
|
placeholder: d(() => [
|
|
410
410
|
l[14] || (l[14] = c("span", null, null, -1))
|
|
411
411
|
]),
|
|
412
|
-
option: d(({ option: t, search:
|
|
412
|
+
option: d(({ option: t, search: f, index: g }) => [
|
|
413
413
|
c("div", Oe, [
|
|
414
414
|
c("div", xe, [
|
|
415
415
|
c("div", Be, [
|
|
@@ -417,10 +417,10 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
417
417
|
key: 0,
|
|
418
418
|
id: `${g}-${t.id}`,
|
|
419
419
|
small: o.small,
|
|
420
|
-
"
|
|
420
|
+
"model-value": V(t),
|
|
421
421
|
disabled: a(x) || (t == null ? void 0 : t.$isDisabled) || !1,
|
|
422
422
|
onClick: r((b) => P(t), ["prevent", "stop"])
|
|
423
|
-
}, null, 8, ["id", "small", "
|
|
423
|
+
}, null, 8, ["id", "small", "model-value", "disabled", "onClick"])) : !a($) && o.showRadio ? (u(), K(a($e), {
|
|
424
424
|
key: 1,
|
|
425
425
|
modelValue: H.value,
|
|
426
426
|
"onUpdate:modelValue": l[1] || (l[1] = (b) => H.value = b),
|
|
@@ -454,7 +454,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
454
454
|
e.$slots.optionAppend ? (u(), w("div", Fe, [
|
|
455
455
|
v(e.$slots, "optionAppend", {
|
|
456
456
|
option: t,
|
|
457
|
-
search:
|
|
457
|
+
search: f,
|
|
458
458
|
index: g
|
|
459
459
|
}, void 0, !0)
|
|
460
460
|
])) : O("", !0)
|
|
@@ -498,7 +498,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
498
498
|
class: "rds-e-dropdown__before-list",
|
|
499
499
|
onMousedown: l[5] || (l[5] = r(() => {
|
|
500
500
|
}, ["stop"])),
|
|
501
|
-
onClick: r(
|
|
501
|
+
onClick: r(me, ["stop"]),
|
|
502
502
|
onBlur: l[6] || (l[6] = r(() => {
|
|
503
503
|
}, ["stop"])),
|
|
504
504
|
onFocus: l[7] || (l[7] = r(() => {
|
|
@@ -549,7 +549,7 @@ import './style/dropdown.css';const Se = ["id"], Oe = { class: "rds-e-dropdown__
|
|
|
549
549
|
]), 1040, ["modelValue", "class", "options", "close-on-select", "disabled", "multiple", "max-height", "small", "open-direction", "limit", "limit-text", "append-to-body", "text-only"])
|
|
550
550
|
], 2));
|
|
551
551
|
}
|
|
552
|
-
}), ze = /* @__PURE__ */ De(Ie, [["__scopeId", "data-v-
|
|
552
|
+
}), ze = /* @__PURE__ */ De(Ie, [["__scopeId", "data-v-570d3e25"]]);
|
|
553
553
|
export {
|
|
554
554
|
ze as default
|
|
555
555
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/link.css';const
|
|
1
|
+
import { defineComponent as $, toRefs as M, computed as m, createBlock as p, openBlock as s, resolveDynamicComponent as O, unref as e, normalizeStyle as P, normalizeClass as k, withCtx as T, createCommentVNode as d, createElementBlock as I, mergeProps as v, renderSlot as D, createTextVNode as R, toDisplayString as j } from "vue";
|
|
2
|
+
import { R as y } from "./icon-svg-arye8CV8.js";
|
|
3
|
+
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/link.css';const A = /* @__PURE__ */ $({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -96,96 +96,98 @@ import './style/link.css';const T = /* @__PURE__ */ N({
|
|
|
96
96
|
default: void 0
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
emits: ["click"],
|
|
100
|
+
setup(o, { emit: w }) {
|
|
101
|
+
const z = o, E = w, {
|
|
102
|
+
text: g,
|
|
103
|
+
to: h,
|
|
103
104
|
icon: r,
|
|
104
105
|
tag: u,
|
|
105
106
|
disabled: i,
|
|
106
|
-
inverse:
|
|
107
|
+
inverse: _,
|
|
107
108
|
arrow: c,
|
|
108
|
-
right:
|
|
109
|
-
underline:
|
|
110
|
-
customClass:
|
|
109
|
+
right: n,
|
|
110
|
+
underline: b,
|
|
111
|
+
customClass: x,
|
|
111
112
|
color: l,
|
|
112
|
-
arrowSmall:
|
|
113
|
-
id:
|
|
114
|
-
} =
|
|
115
|
-
var
|
|
113
|
+
arrowSmall: S,
|
|
114
|
+
id: L
|
|
115
|
+
} = M(z), N = m(() => l.value ? { color: l.value } : void 0), V = m(() => {
|
|
116
|
+
var t, f;
|
|
116
117
|
const a = ["rds-e-link"];
|
|
117
|
-
return
|
|
118
|
-
}),
|
|
119
|
-
var
|
|
118
|
+
return _.value && a.push("rds-e-link--inverse"), b.value && a.push("rds-e-link--underline"), i.value && a.push("rds-e-style-state-disabled"), ((t = r == null ? void 0 : r.value) == null ? void 0 : t.name) !== "arrow" && a.push("rds-e-arrow-link"), ((f = r == null ? void 0 : r.value) == null ? void 0 : f.name) !== "arrow" && _.value && a.push("rds-e-arrow-link__icon--inverse"), x.value === "rds-e-breadcrumbs__link--text" && a.push("rds-e-link__breadcrumbs"), a.join(" ");
|
|
119
|
+
}), C = m(() => {
|
|
120
|
+
var t;
|
|
120
121
|
const a = ["rds-e-arrow-link__icon--arrow"];
|
|
121
|
-
return r != null && r.value && (a.push("rds-e-arrow-link__icon"), i.value && a.push("rds-e-arrow-link__icon--disabled")), ((
|
|
122
|
-
|
|
122
|
+
return r != null && r.value && (a.push("rds-e-arrow-link__icon"), i.value && a.push("rds-e-arrow-link__icon--disabled")), ((t = r == null ? void 0 : r.value) == null ? void 0 : t.name) !== "arrow" && _.value && a.push("rds-e-arrow-link__icon--inverse"), a.push(
|
|
123
|
+
n.value ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left"
|
|
123
124
|
), a.join(" ");
|
|
124
|
-
}),
|
|
125
|
+
}), B = m(() => {
|
|
125
126
|
var a;
|
|
126
127
|
return c.value || ((a = r == null ? void 0 : r.value) == null ? void 0 : a.name);
|
|
127
128
|
});
|
|
128
|
-
return (a,
|
|
129
|
-
id: e(
|
|
130
|
-
class:
|
|
131
|
-
to: e(u) === "router-link" ? e(
|
|
132
|
-
href: e(u) === "a" ? e(
|
|
129
|
+
return (a, t) => (s(), p(O(e(u) === "a" ? e(u) : "router-link"), {
|
|
130
|
+
id: e(L),
|
|
131
|
+
class: k(V.value),
|
|
132
|
+
to: e(u) === "router-link" ? e(h) : null,
|
|
133
|
+
href: e(u) === "a" ? e(h) : null,
|
|
133
134
|
disable: e(i),
|
|
134
|
-
style:
|
|
135
|
+
style: P(N.value),
|
|
135
136
|
tabindex: e(i) ? -1 : void 0,
|
|
136
|
-
"aria-disabled": e(i)
|
|
137
|
+
"aria-disabled": e(i),
|
|
138
|
+
onClick: t[0] || (t[0] = (f) => E("click", f))
|
|
137
139
|
}, {
|
|
138
|
-
default:
|
|
139
|
-
e(r).name && !e(
|
|
140
|
+
default: T(() => [
|
|
141
|
+
e(r).name && !e(n) && !e(c) ? (s(), p(y, v({
|
|
140
142
|
key: 0,
|
|
141
143
|
name: e(r).name
|
|
142
144
|
}, {
|
|
143
145
|
...e(r)
|
|
144
146
|
}, {
|
|
145
|
-
class: ["rds-e-link__icon-left",
|
|
147
|
+
class: ["rds-e-link__icon-left", C.value],
|
|
146
148
|
style: e(l) ? { color: e(l) } : void 0
|
|
147
149
|
}), null, 16, ["name", "class", "style"])) : d("", !0),
|
|
148
|
-
e(
|
|
150
|
+
e(n) ? (s(), I("span", {
|
|
149
151
|
key: 1,
|
|
150
|
-
class:
|
|
151
|
-
"rds-e-mr-xs":
|
|
152
|
-
"rds-e-link__text--underline": e(
|
|
152
|
+
class: k(["rds-e-link__text", [e(x), {
|
|
153
|
+
"rds-e-mr-xs": B.value,
|
|
154
|
+
"rds-e-link__text--underline": e(b)
|
|
153
155
|
}]])
|
|
154
156
|
}, [
|
|
155
157
|
D(a.$slots, "default", {}, () => [
|
|
156
|
-
R(j(e(
|
|
158
|
+
R(j(e(g)), 1)
|
|
157
159
|
], !0)
|
|
158
160
|
], 2)) : d("", !0),
|
|
159
|
-
e(c) ? (s(), p(
|
|
160
|
-
name: e(
|
|
161
|
-
size: e(
|
|
161
|
+
e(c) ? (s(), p(y, v({ key: 2 }, {
|
|
162
|
+
name: e(n) ? "arrow_right" : "arrow_left",
|
|
163
|
+
size: e(S) ? 16 : void 0
|
|
162
164
|
}, {
|
|
163
165
|
class: ["rds-e-arrow-link__icon--arrow", [
|
|
164
|
-
e(
|
|
165
|
-
{ "rds-flex rds-flex-center-center": e(
|
|
166
|
+
e(n) ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left",
|
|
167
|
+
{ "rds-flex rds-flex-center-center": e(S) }
|
|
166
168
|
]],
|
|
167
169
|
style: e(l) ? { color: e(l) } : void 0
|
|
168
170
|
}), null, 16, ["class", "style"])) : d("", !0),
|
|
169
|
-
e(
|
|
171
|
+
e(n) ? d("", !0) : (s(), I("span", {
|
|
170
172
|
key: 3,
|
|
171
|
-
class:
|
|
173
|
+
class: k(["rds-e-link__text", { "rds-e-ml-xs": B.value }])
|
|
172
174
|
}, [
|
|
173
175
|
D(a.$slots, "default", {}, () => [
|
|
174
|
-
R(j(e(
|
|
176
|
+
R(j(e(g)), 1)
|
|
175
177
|
], !0)
|
|
176
178
|
], 2)),
|
|
177
|
-
e(r).name && e(
|
|
179
|
+
e(r).name && e(n) && !e(c) ? (s(), p(y, v({
|
|
178
180
|
key: 4,
|
|
179
181
|
name: e(r).name
|
|
180
182
|
}, e(r), {
|
|
181
|
-
class: ["rds-e-link__icon-right",
|
|
183
|
+
class: ["rds-e-link__icon-right", C.value],
|
|
182
184
|
style: e(l) ? { color: e(l) } : void 0
|
|
183
185
|
}), null, 16, ["name", "class", "style"])) : d("", !0)
|
|
184
186
|
]),
|
|
185
187
|
_: 3
|
|
186
188
|
}, 8, ["id", "class", "to", "href", "disable", "style", "tabindex", "aria-disabled"]));
|
|
187
189
|
}
|
|
188
|
-
}),
|
|
190
|
+
}), J = /* @__PURE__ */ q(A, [["__scopeId", "data-v-16fa62ca"]]);
|
|
189
191
|
export {
|
|
190
|
-
|
|
192
|
+
J as default
|
|
191
193
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
import { o as
|
|
3
|
-
import { R as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/popover.css';const
|
|
1
|
+
import { useSlots as $, computed as v, ref as g, onBeforeUnmount as D, createElementBlock as r, openBlock as s, createElementVNode as w, createBlock as E, renderSlot as y, Teleport as F, createCommentVNode as T, normalizeStyle as N, normalizeClass as B, unref as z, Fragment as H, renderList as M, toDisplayString as V, nextTick as A } from "vue";
|
|
2
|
+
import { o as I, f as U, s as j, b as W, u as q, a as G } from "./floating-ui.vue-DWAG1g94.js";
|
|
3
|
+
import { R as J } from "./icon-svg-arye8CV8.js";
|
|
4
|
+
import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/popover.css';const Q = { class: "rds-e-popover" }, X = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "rds-e-popover__list"
|
|
8
|
-
},
|
|
8
|
+
}, Y = ["onClick"], Z = { class: "rds-e-popover__item-label" }, ee = {
|
|
9
9
|
__name: "popover",
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -80,106 +80,106 @@ import './style/popover.css';const K = { class: "rds-e-popover" }, Q = {
|
|
|
80
80
|
*/
|
|
81
81
|
"close"
|
|
82
82
|
],
|
|
83
|
-
setup(c, { expose:
|
|
84
|
-
const o = c, u =
|
|
83
|
+
setup(c, { expose: L, emit: O }) {
|
|
84
|
+
const o = c, u = O, R = $(), _ = v(() => !!R.default), n = g(!1), l = g(null), i = g(null), C = v(() => {
|
|
85
85
|
const e = [
|
|
86
|
-
|
|
86
|
+
I(o.offsetSpace)
|
|
87
87
|
];
|
|
88
88
|
return o.autoFlip && e.push(
|
|
89
|
-
|
|
89
|
+
U({
|
|
90
90
|
fallbackPlacements: o.fallbackPlacements.length ? o.fallbackPlacements : void 0
|
|
91
91
|
})
|
|
92
92
|
), e.push(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
apply({ availableWidth:
|
|
96
|
-
const d = Math.min(o.width,
|
|
93
|
+
j({ padding: 8 }),
|
|
94
|
+
W({
|
|
95
|
+
apply({ availableWidth: S, elements: t }) {
|
|
96
|
+
const d = Math.min(o.width, S - 32);
|
|
97
97
|
Object.assign(t.floating.style, {
|
|
98
98
|
width: `${d}px`
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
})
|
|
102
102
|
), e;
|
|
103
|
-
}), { floatingStyles: x, update:
|
|
104
|
-
|
|
103
|
+
}), { floatingStyles: x, update: P } = q(
|
|
104
|
+
l,
|
|
105
105
|
i,
|
|
106
106
|
{
|
|
107
107
|
placement: v(() => o.placement),
|
|
108
|
-
middleware:
|
|
109
|
-
whileElementsMounted:
|
|
108
|
+
middleware: C,
|
|
109
|
+
whileElementsMounted: G
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
112
|
let p, f, m;
|
|
113
113
|
const k = () => {
|
|
114
114
|
document.removeEventListener("click", p), document.removeEventListener("keydown", f), document.removeEventListener("scroll", m, !0);
|
|
115
115
|
}, a = () => {
|
|
116
|
-
|
|
116
|
+
n.value && (n.value = !1, u("close"), k());
|
|
117
117
|
};
|
|
118
118
|
p = (e) => {
|
|
119
|
-
i.value && !i.value.contains(e.target) &&
|
|
119
|
+
i.value && !i.value.contains(e.target) && l.value && !l.value.contains(e.target) && a();
|
|
120
120
|
}, f = (e) => {
|
|
121
121
|
e.key === "Escape" && a();
|
|
122
122
|
}, m = () => {
|
|
123
|
-
if (!
|
|
124
|
-
const e =
|
|
123
|
+
if (!l.value) return;
|
|
124
|
+
const e = l.value.getBoundingClientRect();
|
|
125
125
|
(e.bottom < 0 || e.top > window.innerHeight) && a();
|
|
126
126
|
};
|
|
127
|
-
const
|
|
128
|
-
|
|
127
|
+
const b = async () => {
|
|
128
|
+
n.value ? a() : (n.value = !0, u("open"), await A(), P(), setTimeout(() => {
|
|
129
129
|
document.addEventListener("click", p), document.addEventListener("keydown", f), o.closeOnTriggerHidden && document.addEventListener("scroll", m, !0);
|
|
130
130
|
}));
|
|
131
131
|
}, h = (e) => {
|
|
132
132
|
u("select", e), a();
|
|
133
133
|
};
|
|
134
|
-
return
|
|
135
|
-
toggle:
|
|
134
|
+
return D(k), L({
|
|
135
|
+
toggle: b,
|
|
136
136
|
close: a,
|
|
137
|
-
isOpen:
|
|
138
|
-
}), (e,
|
|
139
|
-
|
|
137
|
+
isOpen: n
|
|
138
|
+
}), (e, S) => (s(), r("div", Q, [
|
|
139
|
+
w("button", {
|
|
140
140
|
ref_key: "referenceRef",
|
|
141
|
-
ref:
|
|
141
|
+
ref: l,
|
|
142
142
|
class: "rds-e-popover__trigger-btn",
|
|
143
|
-
onClick:
|
|
143
|
+
onClick: b
|
|
144
144
|
}, [
|
|
145
145
|
y(e.$slots, "trigger", {}, void 0, !0)
|
|
146
146
|
], 512),
|
|
147
|
-
(
|
|
147
|
+
(s(), E(F, {
|
|
148
148
|
to: c.teleportTo,
|
|
149
149
|
disabled: !c.teleportTo
|
|
150
150
|
}, [
|
|
151
|
-
|
|
151
|
+
n.value ? (s(), r("div", {
|
|
152
152
|
key: 0,
|
|
153
153
|
ref_key: "floatingRef",
|
|
154
154
|
ref: i,
|
|
155
|
-
class: "rds-e-popover__content",
|
|
156
|
-
style: N(
|
|
155
|
+
class: B(["rds-e-popover__content", { "rds-e-popover__content--no-styles": _.value }]),
|
|
156
|
+
style: N(z(x))
|
|
157
157
|
}, [
|
|
158
|
-
|
|
159
|
-
(
|
|
158
|
+
_.value ? y(e.$slots, "default", { key: 0 }, void 0, !0) : (s(), r("ul", X, [
|
|
159
|
+
(s(!0), r(H, null, M(c.items, (t, d) => y(e.$slots, "item", {
|
|
160
160
|
item: t,
|
|
161
161
|
index: d,
|
|
162
162
|
onSelect: () => h(t)
|
|
163
163
|
}, () => [
|
|
164
|
-
(
|
|
164
|
+
(s(), r("li", {
|
|
165
165
|
key: d,
|
|
166
|
-
class: "rds-e-popover__item rds-body-02",
|
|
167
|
-
onClick: (
|
|
166
|
+
class: B(["rds-e-popover__item rds-body-02", { "rds-e-popover__item--destructive": t.isDestructive }]),
|
|
167
|
+
onClick: (te) => h(t)
|
|
168
168
|
}, [
|
|
169
|
-
t.icon ? (
|
|
169
|
+
t.icon ? (s(), E(J, {
|
|
170
170
|
key: 0,
|
|
171
171
|
class: "rds-e-popover__item-icon",
|
|
172
172
|
name: t.icon
|
|
173
|
-
}, null, 8, ["name"])) :
|
|
174
|
-
|
|
175
|
-
],
|
|
173
|
+
}, null, 8, ["name"])) : T("", !0),
|
|
174
|
+
w("span", Z, V(t.label), 1)
|
|
175
|
+
], 10, Y))
|
|
176
176
|
], !0)), 256))
|
|
177
177
|
]))
|
|
178
|
-
],
|
|
178
|
+
], 6)) : T("", !0)
|
|
179
179
|
], 8, ["to", "disabled"]))
|
|
180
180
|
]));
|
|
181
181
|
}
|
|
182
|
-
},
|
|
182
|
+
}, ae = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-eb1307b7"]]);
|
|
183
183
|
export {
|
|
184
|
-
|
|
184
|
+
ae as default
|
|
185
185
|
};
|