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.
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsable.es.js +1 -1
- 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
- package/dist/components/datepicker.es.js +1 -1
- package/dist/components/directAccess.es.js +1 -1
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +1 -1
- package/dist/components/fileUploadItem.es.js +45 -34
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/filterTag.es.js +1 -1
- package/dist/components/{floating-ui.vue-DWAG1g94.js → floating-ui.vue-oA1DfKeS.js} +2 -2
- package/dist/components/{icon-svg-arye8CV8.js → icon-svg-C8XeOnqu.js} +805 -767
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +44 -41
- package/dist/components/infoBox.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/modal.es.js +1 -1
- package/dist/components/persistentToast.es.js +1 -1
- package/dist/components/popover.es.js +107 -74
- package/dist/components/popoverMenu.es.js +148 -0
- package/dist/components/progressBar.es.js +1 -1
- package/dist/components/quantitySelector.es.js +1 -1
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +1 -1
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/popoverMenu.css +1 -0
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +1 -1
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +1 -1
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +93 -96
- package/dist/components/tooltip.es.js +113 -111
- package/dist/energy-components.es.js +5202 -4979
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +17 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +14 -10
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +2 -0
- package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +76 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import { R as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/tooltip.css';const
|
|
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
|
-
},
|
|
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(
|
|
115
|
-
const
|
|
116
|
-
let
|
|
117
|
-
const
|
|
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":
|
|
121
|
-
"rds-e-tooltip__tooltip--inverse":
|
|
122
|
-
})),
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
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:
|
|
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(
|
|
149
|
-
left: `${
|
|
150
|
-
top: `${
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
177
|
+
k();
|
|
176
178
|
}
|
|
177
179
|
));
|
|
178
180
|
}));
|
|
179
|
-
}, W = () => {
|
|
180
|
-
v = !0, h();
|
|
181
181
|
}, z = () => {
|
|
182
|
-
|
|
183
|
-
m || S();
|
|
184
|
-
}, x.value);
|
|
185
|
-
}, A = () => {
|
|
186
|
-
m = !0, clearTimeout(o);
|
|
182
|
+
y = !0, g();
|
|
187
183
|
}, L = () => {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
},
|
|
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
|
-
|
|
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
|
|
197
|
-
show:
|
|
198
|
-
hide:
|
|
199
|
-
isOpen:
|
|
200
|
-
}),
|
|
201
|
-
clearTimeout(
|
|
202
|
-
}), (
|
|
203
|
-
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
|
-
|
|
208
|
+
v("div", {
|
|
207
209
|
ref_key: "referenceRef",
|
|
208
|
-
ref:
|
|
210
|
+
ref: c,
|
|
209
211
|
class: "rds-e-tooltip__trigger",
|
|
210
|
-
onBlur:
|
|
211
|
-
onFocus:
|
|
212
|
-
onMouseenter:
|
|
213
|
-
onMouseleave:
|
|
212
|
+
onBlur: W,
|
|
213
|
+
onFocus: g,
|
|
214
|
+
onMouseenter: z,
|
|
215
|
+
onMouseleave: L
|
|
214
216
|
}, [
|
|
215
|
-
|
|
217
|
+
D(n.$slots, "default", {}, void 0, !0)
|
|
216
218
|
], 544),
|
|
217
|
-
(
|
|
218
|
-
to:
|
|
219
|
-
disabled: !
|
|
219
|
+
(m(), K(Q, {
|
|
220
|
+
to: a.teleportTo,
|
|
221
|
+
disabled: !a.teleportTo
|
|
220
222
|
}, [
|
|
221
|
-
|
|
223
|
+
v("div", {
|
|
222
224
|
ref_key: "floatingRef",
|
|
223
|
-
ref:
|
|
224
|
-
class:
|
|
225
|
-
onMouseenter:
|
|
226
|
-
onMouseleave:
|
|
225
|
+
ref: s,
|
|
226
|
+
class: N(U.value),
|
|
227
|
+
onMouseenter: P,
|
|
228
|
+
onMouseleave: F
|
|
227
229
|
}, [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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:
|
|
236
|
+
onClick: X
|
|
235
237
|
})
|
|
236
|
-
])) :
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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
|
-
|
|
244
|
+
a.hideArrow ? O("", !0) : (m(), x("div", {
|
|
243
245
|
key: 1,
|
|
244
246
|
ref_key: "arrowRef",
|
|
245
|
-
ref:
|
|
246
|
-
class:
|
|
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,
|
|
252
|
+
], 8, ce));
|
|
251
253
|
}
|
|
252
|
-
}), we = /* @__PURE__ */
|
|
254
|
+
}), we = /* @__PURE__ */ de(ve, [["__scopeId", "data-v-0165a45d"]]);
|
|
253
255
|
export {
|
|
254
256
|
we as default
|
|
255
257
|
};
|