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.
Files changed (33) hide show
  1. package/dist/components/breadcrumbs.es.js +32 -29
  2. package/dist/components/datepicker.es.js +2725 -2662
  3. package/dist/components/dropdown.es.js +21 -21
  4. package/dist/components/{floating-ui.vue-7LKzPqHI.js → floating-ui.vue-DWAG1g94.js} +3 -3
  5. package/dist/components/link.es.js +51 -49
  6. package/dist/components/popover.es.js +47 -47
  7. package/dist/components/sidebar.es.js +143 -59
  8. package/dist/components/snackBar.es.js +37 -22
  9. package/dist/components/style/breadcrumbs.css +1 -1
  10. package/dist/components/style/datepicker.css +1 -1
  11. package/dist/components/style/dropdown.css +1 -1
  12. package/dist/components/style/link.css +1 -1
  13. package/dist/components/style/overlay.css +1 -1
  14. package/dist/components/style/popover.css +1 -1
  15. package/dist/components/style/sidebar.css +1 -1
  16. package/dist/components/style/snackBar.css +1 -1
  17. package/dist/components/style/textField.css +1 -1
  18. package/dist/components/style/tooltip.css +1 -1
  19. package/dist/components/textField.es.js +28 -26
  20. package/dist/components/tooltip.es.js +135 -84
  21. package/dist/energy-components.es.js +4967 -4748
  22. package/dist/energy-components.umd.js +2 -2
  23. package/dist/style.css +1 -1
  24. package/dist/types/src/components/feedback/snack-bar/snack-bar.vue.d.ts +13 -1
  25. package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +19 -4
  26. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +2 -0
  27. package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +128 -3
  28. package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +18 -0
  29. package/dist/types/src/components/navigation/link/link.vue.d.ts +10 -6
  30. package/dist/types/src/components/overlay/popover/popover.vue.d.ts +2 -2
  31. package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +47 -2
  32. package/dist/types/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as me, 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";
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__ */ me({
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([]), f = D(), y = D(), I = D(""), q = D(!1);
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 = f.value) == null ? void 0 : e.isOpen) ?? !1;
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((m) => m === e || m.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"));
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
- f.value.select(e), B = !0;
279
+ m.value.select(e), B = !0;
280
280
  }, A = () => {
281
- f.value.activate();
281
+ m.value.activate();
282
282
  }, R = () => {
283
- f.value.deactivate();
283
+ m.value.deactivate();
284
284
  }, W = () => {
285
- f.value.toggle(), B = !0;
285
+ m.value.toggle(), B = !0;
286
286
  }, z = () => {
287
287
  te.value ? R() : A();
288
- }, fe = () => {
288
+ }, me = () => {
289
289
  C.value && y.value && (le(), A(), F(() => {
290
290
  y.value.focus();
291
291
  }));
292
292
  }, G = (e) => {
293
- var m, g;
293
+ var f, g;
294
294
  if (B) {
295
295
  B = !1;
296
296
  return;
297
297
  }
298
- const l = e.target, t = !((g = (m = f.value) == null ? void 0 : m.$el) != null && g.contains(l));
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 = f.value) != null && e.$el && p.value.push(f.value.$el), F(() => {
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: f,
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] = (m) => N.value = m),
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: m, index: g }) => [
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
- "is-checked": V(t),
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", "is-checked", "disabled", "onClick"])) : !a($) && o.showRadio ? (u(), K(a($e), {
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: m,
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(fe, ["stop"]),
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-e408ffba"]]);
552
+ }), ze = /* @__PURE__ */ De(Ie, [["__scopeId", "data-v-570d3e25"]]);
553
553
  export {
554
554
  ze as default
555
555
  };
@@ -1137,10 +1137,10 @@ function Xe(t, e, n) {
1137
1137
  };
1138
1138
  }
1139
1139
  export {
1140
- Ye as a,
1141
- qe as b,
1140
+ He as a,
1141
+ Ye as b,
1142
1142
  Ne as c,
1143
- He as d,
1143
+ qe as d,
1144
1144
  je as f,
1145
1145
  ze as o,
1146
1146
  Ie as s,
@@ -1,7 +1,7 @@
1
- import { defineComponent as N, toRefs as V, computed as f, createBlock as p, openBlock as s, resolveDynamicComponent as $, unref as e, normalizeStyle as M, normalizeClass as _, withCtx as O, createCommentVNode as d, createElementBlock as I, mergeProps as k, renderSlot as D, createTextVNode as R, toDisplayString as j } from "vue";
2
- import { R as v } from "./icon-svg-arye8CV8.js";
3
- import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/link.css';const T = /* @__PURE__ */ N({
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
- setup(o) {
100
- const y = o, {
101
- text: w,
102
- to: g,
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: m,
107
+ inverse: _,
107
108
  arrow: c,
108
- right: t,
109
- underline: h,
110
- customClass: b,
109
+ right: n,
110
+ underline: b,
111
+ customClass: x,
111
112
  color: l,
112
- arrowSmall: x,
113
- id: z
114
- } = V(y), E = f(() => l.value ? { color: l.value } : void 0), L = f(() => {
115
- var n, B;
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 m.value && a.push("rds-e-link--inverse"), h.value && a.push("rds-e-link--underline"), i.value && a.push("rds-e-style-state-disabled"), ((n = r == null ? void 0 : r.value) == null ? void 0 : n.name) !== "arrow" && a.push("rds-e-arrow-link"), ((B = r == null ? void 0 : r.value) == null ? void 0 : B.name) !== "arrow" && m.value && a.push("rds-e-arrow-link__icon--inverse"), b.value === "rds-e-breadcrumbs__link--text" && a.push("rds-e-link__breadcrumbs"), a.join(" ");
118
- }), S = f(() => {
119
- var n;
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")), ((n = r == null ? void 0 : r.value) == null ? void 0 : n.name) !== "arrow" && m.value && a.push("rds-e-arrow-link__icon--inverse"), a.push(
122
- t.value ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left"
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
- }), C = f(() => {
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, n) => (s(), p($(e(u) === "a" ? e(u) : "router-link"), {
129
- id: e(z),
130
- class: _(L.value),
131
- to: e(u) === "router-link" ? e(g) : null,
132
- href: e(u) === "a" ? e(g) : null,
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: M(E.value),
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: O(() => [
139
- e(r).name && !e(t) && !e(c) ? (s(), p(v, k({
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", S.value],
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(t) ? (s(), I("span", {
150
+ e(n) ? (s(), I("span", {
149
151
  key: 1,
150
- class: _(["rds-e-link__text", [e(b), {
151
- "rds-e-mr-xs": C.value,
152
- "rds-e-link__text--underline": e(h)
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(w)), 1)
158
+ R(j(e(g)), 1)
157
159
  ], !0)
158
160
  ], 2)) : d("", !0),
159
- e(c) ? (s(), p(v, k({ key: 2 }, {
160
- name: e(t) ? "arrow_right" : "arrow_left",
161
- size: e(x) ? 16 : void 0
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(t) ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left",
165
- { "rds-flex rds-flex-center-center": e(x) }
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(t) ? d("", !0) : (s(), I("span", {
171
+ e(n) ? d("", !0) : (s(), I("span", {
170
172
  key: 3,
171
- class: _(["rds-e-link__text", { "rds-e-ml-xs": C.value }])
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(w)), 1)
176
+ R(j(e(g)), 1)
175
177
  ], !0)
176
178
  ], 2)),
177
- e(r).name && e(t) && !e(c) ? (s(), p(v, k({
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", S.value],
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
- }), G = /* @__PURE__ */ P(T, [["__scopeId", "data-v-3a1cb6f7"]]);
190
+ }), J = /* @__PURE__ */ q(A, [["__scopeId", "data-v-16fa62ca"]]);
189
191
  export {
190
- G as default
192
+ J as default
191
193
  };
@@ -1,11 +1,11 @@
1
- import { useSlots as P, computed as v, ref as g, onBeforeUnmount as $, createElementBlock as r, openBlock as n, createElementVNode as S, createBlock as w, renderSlot as y, Teleport as F, createCommentVNode as E, normalizeStyle as N, unref as D, Fragment as H, renderList as M, toDisplayString as V, nextTick as z } from "vue";
2
- import { o as A, f as I, s as U, a as j, u as W, d as q } from "./floating-ui.vue-7LKzPqHI.js";
3
- import { R as G } from "./icon-svg-arye8CV8.js";
4
- import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import './style/popover.css';const K = { class: "rds-e-popover" }, Q = {
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
- }, X = ["onClick"], Y = { class: "rds-e-popover__item-label" }, Z = {
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: T, emit: B }) {
84
- const o = c, u = B, L = P(), O = v(() => !!L.default), l = g(!1), s = g(null), i = g(null), R = v(() => {
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
- A(o.offsetSpace)
86
+ I(o.offsetSpace)
87
87
  ];
88
88
  return o.autoFlip && e.push(
89
- I({
89
+ U({
90
90
  fallbackPlacements: o.fallbackPlacements.length ? o.fallbackPlacements : void 0
91
91
  })
92
92
  ), e.push(
93
- U({ padding: 8 }),
94
- j({
95
- apply({ availableWidth: b, elements: t }) {
96
- const d = Math.min(o.width, b - 32);
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: C } = W(
104
- s,
103
+ }), { floatingStyles: x, update: P } = q(
104
+ l,
105
105
  i,
106
106
  {
107
107
  placement: v(() => o.placement),
108
- middleware: R,
109
- whileElementsMounted: q
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
- l.value && (l.value = !1, u("close"), k());
116
+ n.value && (n.value = !1, u("close"), k());
117
117
  };
118
118
  p = (e) => {
119
- i.value && !i.value.contains(e.target) && s.value && !s.value.contains(e.target) && a();
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 (!s.value) return;
124
- const e = s.value.getBoundingClientRect();
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 _ = async () => {
128
- l.value ? a() : (l.value = !0, u("open"), await z(), C(), setTimeout(() => {
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 $(k), T({
135
- toggle: _,
134
+ return D(k), L({
135
+ toggle: b,
136
136
  close: a,
137
- isOpen: l
138
- }), (e, b) => (n(), r("div", K, [
139
- S("button", {
137
+ isOpen: n
138
+ }), (e, S) => (s(), r("div", Q, [
139
+ w("button", {
140
140
  ref_key: "referenceRef",
141
- ref: s,
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
- (n(), w(F, {
147
+ (s(), E(F, {
148
148
  to: c.teleportTo,
149
149
  disabled: !c.teleportTo
150
150
  }, [
151
- l.value ? (n(), r("div", {
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(D(x))
155
+ class: B(["rds-e-popover__content", { "rds-e-popover__content--no-styles": _.value }]),
156
+ style: N(z(x))
157
157
  }, [
158
- O.value ? y(e.$slots, "default", { key: 0 }, void 0, !0) : (n(), r("ul", Q, [
159
- (n(!0), r(H, null, M(c.items, (t, d) => y(e.$slots, "item", {
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
- (n(), r("li", {
164
+ (s(), r("li", {
165
165
  key: d,
166
- class: "rds-e-popover__item rds-body-02",
167
- onClick: (ee) => h(t)
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 ? (n(), w(G, {
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"])) : E("", !0),
174
- S("span", Y, V(t.label), 1)
175
- ], 8, X))
173
+ }, null, 8, ["name"])) : T("", !0),
174
+ w("span", Z, V(t.label), 1)
175
+ ], 10, Y))
176
176
  ], !0)), 256))
177
177
  ]))
178
- ], 4)) : E("", !0)
178
+ ], 6)) : T("", !0)
179
179
  ], 8, ["to", "disabled"]))
180
180
  ]));
181
181
  }
182
- }, se = /* @__PURE__ */ J(Z, [["__scopeId", "data-v-d86bc1ef"]]);
182
+ }, ae = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-eb1307b7"]]);
183
183
  export {
184
- se as default
184
+ ae as default
185
185
  };