energy-components 1.19.0 → 1.20.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 (53) hide show
  1. package/dist/components/accordion.es.js +1 -1
  2. package/dist/components/avatar.es.js +1 -1
  3. package/dist/components/button.es.js +1 -1
  4. package/dist/components/checkbox.es.js +1 -1
  5. package/dist/components/collapsable.es.js +1 -1
  6. package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-C2ohjDhp.js → collapsable.scss_vue_type_style_index_0_src_true_lang-6HkNT8L9.js} +1 -1
  7. package/dist/components/datepicker.es.js +1 -1
  8. package/dist/components/directAccess.es.js +1 -1
  9. package/dist/components/dragAndDrop.es.js +1 -1
  10. package/dist/components/dropdown.es.js +1 -1
  11. package/dist/components/fileUploadItem.es.js +45 -34
  12. package/dist/components/filterChip.es.js +1 -1
  13. package/dist/components/filterTag.es.js +1 -1
  14. package/dist/components/{floating-ui.vue-DWAG1g94.js → floating-ui.vue-oA1DfKeS.js} +2 -2
  15. package/dist/components/{icon-svg-arye8CV8.js → icon-svg-C8XeOnqu.js} +805 -767
  16. package/dist/components/iconList.es.js +1 -1
  17. package/dist/components/iconSvg.es.js +1 -1
  18. package/dist/components/index.es.js +44 -41
  19. package/dist/components/infoBox.es.js +1 -1
  20. package/dist/components/link.es.js +1 -1
  21. package/dist/components/modal.es.js +1 -1
  22. package/dist/components/persistentToast.es.js +1 -1
  23. package/dist/components/popover.es.js +107 -74
  24. package/dist/components/popoverMenu.es.js +148 -0
  25. package/dist/components/progressBar.es.js +1 -1
  26. package/dist/components/quantitySelector.es.js +1 -1
  27. package/dist/components/radioButton.es.js +1 -1
  28. package/dist/components/selectionChip.es.js +1 -1
  29. package/dist/components/sidedrawer.es.js +1 -1
  30. package/dist/components/style/fileUploadItem.css +1 -1
  31. package/dist/components/style/overlay.css +1 -1
  32. package/dist/components/style/popover.css +1 -1
  33. package/dist/components/style/popoverMenu.css +1 -0
  34. package/dist/components/style/sidedrawer.css +1 -1
  35. package/dist/components/style/textField.css +1 -1
  36. package/dist/components/style/tooltip.css +1 -1
  37. package/dist/components/switch.es.js +1 -1
  38. package/dist/components/tabBar.es.js +1 -1
  39. package/dist/components/tableslotedcomponent.es.js +1 -1
  40. package/dist/components/tag.es.js +1 -1
  41. package/dist/components/textArea.es.js +1 -1
  42. package/dist/components/textField.es.js +93 -96
  43. package/dist/components/tooltip.es.js +113 -111
  44. package/dist/energy-components.es.js +5202 -4979
  45. package/dist/energy-components.umd.js +2 -2
  46. package/dist/style.css +1 -1
  47. package/dist/types/src/components/index.d.ts +1 -0
  48. package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +17 -0
  49. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +14 -10
  50. package/dist/types/src/components/overlay/popover/popover.vue.d.ts +2 -0
  51. package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +76 -0
  52. package/dist/types/tsconfig.tsbuildinfo +1 -1
  53. package/package.json +2 -2
@@ -1,11 +1,11 @@
1
- import { defineComponent as J, toRefs as K, ref as r, computed as _, onBeforeUnmount as Q, createElementBlock as y, openBlock as c, createElementVNode as p, createBlock as Z, renderSlot as C, Teleport as ee, normalizeClass as M, createCommentVNode as D, unref as N, createVNode as te, toDisplayString as O, createTextVNode as oe, nextTick as le } from "vue";
2
- import { a as ae, c as se, o as ie, f as re, s as ne, b as de, d as ue } from "./floating-ui.vue-DWAG1g94.js";
3
- import { R as ce } from "./icon-svg-arye8CV8.js";
4
- import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import './style/tooltip.css';const fe = ["id"], me = {
1
+ import { defineComponent as q, toRefs as G, ref as u, computed as T, onBeforeUnmount as J, createElementBlock as x, openBlock as m, createElementVNode as v, createBlock as K, renderSlot as D, Teleport as Q, normalizeClass as N, createCommentVNode as O, unref as A, createVNode as Z, toDisplayString as E, createTextVNode as ee, nextTick as te } from "vue";
2
+ import { a as oe, o as le, f as ae, s as ie, b as se, c as re, d as ne } from "./floating-ui.vue-oA1DfKeS.js";
3
+ import { R as ue } from "./icon-svg-C8XeOnqu.js";
4
+ import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import './style/tooltip.css';const ce = ["id"], fe = {
6
6
  key: 0,
7
7
  class: "rds-e-tooltip__header"
8
- }, ve = { class: "rds-e-tooltip__title" }, he = { class: "rds-e-tooltip__content" }, _e = /* @__PURE__ */ J({
8
+ }, pe = { class: "rds-e-tooltip__title" }, me = { class: "rds-e-tooltip__content" }, ve = /* @__PURE__ */ q({
9
9
  __name: "tooltip",
10
10
  props: {
11
11
  /**
@@ -111,145 +111,147 @@ import './style/tooltip.css';const fe = ["id"], me = {
111
111
  */
112
112
  "hide"
113
113
  ],
114
- setup(l, { expose: E, emit: H }) {
115
- const a = l, n = H, { large: g, fullWidth: V, title: s, inverse: j } = K(a), d = r(), i = r(), f = r(), e = r(!0), T = r("");
116
- let o = null, m = !1, v = !1, t = null;
117
- const x = _(() => Math.min(Math.max(a.hideDelay, 0), 3e3)), I = _(() => ({
114
+ setup(a, { expose: H, emit: V }) {
115
+ const o = a, d = V, { large: S, fullWidth: j, title: i, inverse: I } = G(o), c = u(), s = u(), r = u(), e = u(!0), h = u("");
116
+ let l = null, _ = !1, y = !1, t = null;
117
+ const b = T(() => Math.min(Math.max(o.hideDelay, 0), 3e3)), U = T(() => ({
118
118
  "rds-e-tooltip__tooltip": !0,
119
119
  "rds-e-tooltip__tooltip-hidden": e.value,
120
- "rds-e-tooltip__tooltip--large": g.value,
121
- "rds-e-tooltip__tooltip--inverse": j.value
122
- })), w = async () => {
123
- const { x: u, y: k, middlewareData: F, placement: B } = await se(
124
- d.value,
125
- i.value,
120
+ "rds-e-tooltip__tooltip--large": S.value,
121
+ "rds-e-tooltip__tooltip--inverse": I.value
122
+ })), k = async () => {
123
+ const n = [
124
+ le(o.offsetSpace),
125
+ ae(),
126
+ ie(),
127
+ se({
128
+ apply({ availableHeight: f, availableWidth: p, elements: w }) {
129
+ Object.assign(w.floating.style, {
130
+ maxWidth: j.value ? `${Math.max(0, p)}px` : "380px",
131
+ width: "max-content",
132
+ maxHeight: `${Math.max(0, f)}px`
133
+ });
134
+ }
135
+ })
136
+ ];
137
+ !o.hideArrow && r.value && n.push(re({
138
+ element: r.value,
139
+ padding: S.value ? 16 : 8
140
+ }));
141
+ const { x: $, y: Y, middlewareData: C, placement: M } = await ne(
142
+ c.value,
143
+ s.value,
126
144
  {
127
- placement: a.placement,
128
- middleware: [
129
- ie(a.offsetSpace),
130
- re(),
131
- ne(),
132
- de({
133
- apply({ availableHeight: Y, availableWidth: q, elements: G }) {
134
- Object.assign(G.floating.style, {
135
- maxWidth: V.value ? `${Math.max(0, q)}px` : "380px",
136
- width: "max-content",
137
- maxHeight: `${Math.max(0, Y)}px`
138
- });
139
- }
140
- }),
141
- ue({
142
- element: f.value,
143
- padding: g.value ? 16 : 8
144
- })
145
- ]
145
+ placement: o.placement,
146
+ middleware: n
146
147
  }
147
148
  );
148
- Object.assign(i.value.style, {
149
- left: `${u}px`,
150
- top: `${k}px`
151
- });
152
- const { x: R, y: $ } = F.arrow, X = {
153
- left: "right",
154
- right: "left",
155
- bottom: "top",
156
- top: "bottom"
157
- };
158
- T.value = `rds-e-tooltip__tooltip-arrow--${B}`, Object.assign(f.value.style, {
159
- left: R != null ? `${R}px` : "",
160
- top: $ != null ? `${$}px` : "",
161
- bottom: "",
162
- right: "",
163
- [X[B.split("-")[0]]]: "-4px"
164
- });
165
- }, U = () => {
166
- clearTimeout(o), e.value ? e.value = !0 : (e.value = !0, n("hide"));
167
- }, S = () => {
168
- s != null && s.value || (e.value ? e.value = !0 : (e.value = !0, n("hide"))), clearTimeout(o);
169
- }, h = () => {
170
- a.suppressed || (clearTimeout(o), e.value = !1, n("show"), le(() => {
171
- w(), a.autoUpdate && d.value && i.value && (t == null || t(), t = ae(
172
- d.value,
173
- i.value,
149
+ if (Object.assign(s.value.style, {
150
+ left: `${$}px`,
151
+ top: `${Y}px`
152
+ }), !o.hideArrow && r.value && C.arrow) {
153
+ const { x: f, y: p } = C.arrow, w = {
154
+ left: "right",
155
+ right: "left",
156
+ bottom: "top",
157
+ top: "bottom"
158
+ };
159
+ h.value = `rds-e-tooltip__tooltip-arrow--${M}`, Object.assign(r.value.style, {
160
+ left: f != null ? `${f}px` : "",
161
+ top: p != null ? `${p}px` : "",
162
+ bottom: "",
163
+ right: "",
164
+ [w[M.split("-")[0]]]: "-4px"
165
+ });
166
+ } else o.hideArrow && (h.value = "");
167
+ }, W = () => {
168
+ clearTimeout(l), e.value ? e.value = !0 : (e.value = !0, d("hide"));
169
+ }, B = () => {
170
+ i != null && i.value || (e.value ? e.value = !0 : (e.value = !0, d("hide"))), clearTimeout(l);
171
+ }, g = () => {
172
+ o.suppressed || (clearTimeout(l), e.value = !1, d("show"), te(() => {
173
+ k(), o.autoUpdate && c.value && s.value && (t == null || t(), t = oe(
174
+ c.value,
175
+ s.value,
174
176
  () => {
175
- w();
177
+ k();
176
178
  }
177
179
  ));
178
180
  }));
179
- }, W = () => {
180
- v = !0, h();
181
181
  }, z = () => {
182
- v = !1, o = setTimeout(() => {
183
- m || S();
184
- }, x.value);
185
- }, A = () => {
186
- m = !0, clearTimeout(o);
182
+ y = !0, g();
187
183
  }, L = () => {
188
- m = !1, v || (o = setTimeout(() => {
189
- S();
190
- }, x.value));
191
- }, b = () => {
192
- e.value || (e.value = !0, n("hide"), t && (t(), t = null));
184
+ y = !1, l = setTimeout(() => {
185
+ _ || B();
186
+ }, b.value);
193
187
  }, P = () => {
194
- b();
188
+ _ = !0, clearTimeout(l);
189
+ }, F = () => {
190
+ _ = !1, y || (l = setTimeout(() => {
191
+ B();
192
+ }, b.value));
193
+ }, R = () => {
194
+ e.value || (e.value = !0, d("hide"), t && (t(), t = null));
195
+ }, X = () => {
196
+ R();
195
197
  };
196
- return E({
197
- show: h,
198
- hide: b,
199
- isOpen: _(() => !e.value)
200
- }), Q(() => {
201
- clearTimeout(o), t && (t(), t = null);
202
- }), (u, k) => (c(), y("div", {
203
- id: l.id,
198
+ return H({
199
+ show: g,
200
+ hide: R,
201
+ isOpen: T(() => !e.value)
202
+ }), J(() => {
203
+ clearTimeout(l), t && (t(), t = null);
204
+ }), (n, $) => (m(), x("div", {
205
+ id: a.id,
204
206
  class: "rds-e-tooltip"
205
207
  }, [
206
- p("div", {
208
+ v("div", {
207
209
  ref_key: "referenceRef",
208
- ref: d,
210
+ ref: c,
209
211
  class: "rds-e-tooltip__trigger",
210
- onBlur: U,
211
- onFocus: h,
212
- onMouseenter: W,
213
- onMouseleave: z
212
+ onBlur: W,
213
+ onFocus: g,
214
+ onMouseenter: z,
215
+ onMouseleave: L
214
216
  }, [
215
- C(u.$slots, "default", {}, void 0, !0)
217
+ D(n.$slots, "default", {}, void 0, !0)
216
218
  ], 544),
217
- (c(), Z(ee, {
218
- to: l.teleportTo,
219
- disabled: !l.teleportTo
219
+ (m(), K(Q, {
220
+ to: a.teleportTo,
221
+ disabled: !a.teleportTo
220
222
  }, [
221
- p("div", {
223
+ v("div", {
222
224
  ref_key: "floatingRef",
223
- ref: i,
224
- class: M(I.value),
225
- onMouseenter: A,
226
- onMouseleave: L
225
+ ref: s,
226
+ class: N(U.value),
227
+ onMouseenter: P,
228
+ onMouseleave: F
227
229
  }, [
228
- N(s) ? (c(), y("div", me, [
229
- p("h3", ve, O(N(s)), 1),
230
- te(ce, {
230
+ A(i) ? (m(), x("div", fe, [
231
+ v("h3", pe, E(A(i)), 1),
232
+ Z(ue, {
231
233
  name: "close",
232
234
  "aria-hidden": "true",
233
235
  class: "rds-e-tooltip__icon",
234
- onClick: P
236
+ onClick: X
235
237
  })
236
- ])) : D("", !0),
237
- p("div", he, [
238
- C(u.$slots, "tooltip-content", {}, () => [
239
- oe(O(l.content), 1)
238
+ ])) : O("", !0),
239
+ v("div", me, [
240
+ D(n.$slots, "tooltip-content", {}, () => [
241
+ ee(E(a.content), 1)
240
242
  ], !0)
241
243
  ]),
242
- l.hideArrow ? D("", !0) : (c(), y("div", {
244
+ a.hideArrow ? O("", !0) : (m(), x("div", {
243
245
  key: 1,
244
246
  ref_key: "arrowRef",
245
- ref: f,
246
- class: M(["rds-e-tooltip__tooltip-arrow", T.value])
247
+ ref: r,
248
+ class: N(["rds-e-tooltip__tooltip-arrow", h.value])
247
249
  }, null, 2))
248
250
  ], 34)
249
251
  ], 8, ["to", "disabled"]))
250
- ], 8, fe));
252
+ ], 8, ce));
251
253
  }
252
- }), we = /* @__PURE__ */ pe(_e, [["__scopeId", "data-v-5a12657d"]]);
254
+ }), we = /* @__PURE__ */ de(ve, [["__scopeId", "data-v-0165a45d"]]);
253
255
  export {
254
256
  we as default
255
257
  };