energy-components 1.1.1 → 1.1.2
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/button.es.js +9 -10
- package/dist/components/getInstance-GhoEcxLF.js +21 -0
- package/dist/components/infoBox.es.js +4 -4
- package/dist/components/link.es.js +41 -30
- package/dist/components/modal.es.js +39 -43
- package/dist/components/persistentToast.es.js +4 -4
- package/dist/components/radioButton.es.js +43 -59
- package/dist/components/sidebar.es.js +48 -50
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/accordionGroup.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/card.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/divider.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/iconList.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/infoBox.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/overlay.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/persistentToast.css +1 -1
- package/dist/components/style/radioButton.css +1 -1
- package/dist/components/style/sidebar.css +1 -1
- package/dist/components/style/switch.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/textArea.es.js +28 -26
- package/dist/components/textField.es.js +72 -70
- package/dist/components/tooltip.es.js +41 -40
- package/dist/energy-components.es.js +2472 -2464
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/button/button.vue.d.ts +0 -2
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +4 -7
- package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +5 -5
- package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -2
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +0 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as R, mergeModels as U, useModel as F, toRefs as G, computed as o, openBlock as
|
|
1
|
+
import { defineComponent as R, mergeModels as U, useModel as F, toRefs as G, computed as o, openBlock as n, createElementBlock as h, normalizeClass as f, createElementVNode as a, withDirectives as J, unref as t, vModelText as K, renderSlot as x, createBlock as C, mergeProps as M, toHandlers as q, createCommentVNode as s, createTextVNode as L, toDisplayString as i, pushScopeId as O, popScopeId as Q } from "vue";
|
|
2
2
|
import { I as T } from "./icon-svg-CEZ-L3iv.js";
|
|
3
3
|
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/textArea.css';function y(e,
|
|
5
|
-
return
|
|
4
|
+
import './style/textArea.css';function y(e, m = !0, u = !0) {
|
|
5
|
+
return m && !e.trim() ? (console.warn("Advertencia: El valor no puede estar vacío"), !1) : u && !/^[\w\-:]+$/.test(e) ? (console.warn("Advertencia: El valor contiene caracteres inválidos"), !1) : !0;
|
|
6
6
|
}
|
|
7
|
-
const X = (e) => (O("data-v-
|
|
7
|
+
const X = (e) => (O("data-v-51c6b51e"), e = e(), Q(), e), Y = { class: "rds-e-textarea__container" }, Z = { class: "rds-e-textarea__input-container" }, ee = ["id", "name", "maxlength", "minlength", "rows", "disabled"], te = /* @__PURE__ */ X(() => /* @__PURE__ */ a("div", { class: "rds-e-textarea__resize-handle" }, [
|
|
8
8
|
/* @__PURE__ */ a("svg", {
|
|
9
9
|
width: "12",
|
|
10
10
|
height: "14",
|
|
@@ -150,24 +150,24 @@ const X = (e) => (O("data-v-a9a6a677"), e = e(), Q(), e), Y = { class: "rds-e-te
|
|
|
150
150
|
}),
|
|
151
151
|
emits: ["update:modelValue"],
|
|
152
152
|
setup(e) {
|
|
153
|
-
const
|
|
153
|
+
const m = e, u = F(e, "modelValue"), {
|
|
154
154
|
label: b,
|
|
155
155
|
id: w,
|
|
156
156
|
disabled: p,
|
|
157
157
|
maxlength: v,
|
|
158
|
-
minlength:
|
|
158
|
+
minlength: _,
|
|
159
159
|
modelValue: d,
|
|
160
160
|
icon: $,
|
|
161
161
|
rightIcon: S,
|
|
162
162
|
helper: A,
|
|
163
|
-
error:
|
|
163
|
+
error: g,
|
|
164
164
|
helperText: z,
|
|
165
165
|
clearable: k,
|
|
166
166
|
lengthError: D
|
|
167
|
-
} = G(
|
|
167
|
+
} = G(m), V = o(() => d.value.length === v.value), B = o(() => d.value.length === 0 ? !1 : d.value.length < _.value), E = o(() => D.value && (V.value || B.value)), P = o(() => {
|
|
168
168
|
const r = [];
|
|
169
|
-
return d.value && r.push("rds-e-textarea--filled"),
|
|
170
|
-
}),
|
|
169
|
+
return d.value && r.push("rds-e-textarea--filled"), g.value && r.push("rds-e-textarea--error"), p.value && r.push("rds-e-textarea--disabled"), E.value && r.push("rds-e-textarea--error"), r.join(" ");
|
|
170
|
+
}), l = o(() => {
|
|
171
171
|
const r = {
|
|
172
172
|
name: $.value,
|
|
173
173
|
class: "",
|
|
@@ -190,8 +190,8 @@ const X = (e) => (O("data-v-a9a6a677"), e = e(), Q(), e), Y = { class: "rds-e-te
|
|
|
190
190
|
}), j = o(() => d.value.length);
|
|
191
191
|
return (r, c) => {
|
|
192
192
|
var I, N;
|
|
193
|
-
return
|
|
194
|
-
class:
|
|
193
|
+
return n(), h("div", {
|
|
194
|
+
class: f(["rds-e-textarea", P.value])
|
|
195
195
|
}, [
|
|
196
196
|
a("div", Y, [
|
|
197
197
|
a("div", Z, [
|
|
@@ -202,7 +202,7 @@ const X = (e) => (O("data-v-a9a6a677"), e = e(), Q(), e), Y = { class: "rds-e-te
|
|
|
202
202
|
class: "rds-e-textarea__input",
|
|
203
203
|
name: e.name,
|
|
204
204
|
maxlength: t(v),
|
|
205
|
-
minlength: t(
|
|
205
|
+
minlength: t(_),
|
|
206
206
|
rows: e.rows,
|
|
207
207
|
disabled: t(p)
|
|
208
208
|
}, null, 8, ee), [
|
|
@@ -211,49 +211,51 @@ const X = (e) => (O("data-v-a9a6a677"), e = e(), Q(), e), Y = { class: "rds-e-te
|
|
|
211
211
|
te,
|
|
212
212
|
a("label", {
|
|
213
213
|
for: (N = t(w)) == null ? void 0 : N.toString(),
|
|
214
|
-
class: "rds-e-textarea__label"
|
|
214
|
+
class: f(["rds-e-textarea__label", {
|
|
215
|
+
"rds-e-textarea__label--with-icon": l.value.left.name
|
|
216
|
+
}])
|
|
215
217
|
}, [
|
|
216
218
|
x(r.$slots, "left-icon", {}, () => [
|
|
217
|
-
|
|
219
|
+
l.value.left.name ? (n(), C(T, M({
|
|
218
220
|
key: 0,
|
|
219
221
|
class: "rds-e-textarea__icon rds-e-textarea__icon--left",
|
|
220
222
|
"aria-hidden": "true"
|
|
221
|
-
},
|
|
223
|
+
}, l.value.left, q(l.value.left.events)), null, 16)) : s("", !0)
|
|
222
224
|
], !0),
|
|
223
225
|
L(" " + i(t(b)), 1)
|
|
224
|
-
],
|
|
226
|
+
], 10, re),
|
|
225
227
|
a("div", {
|
|
226
|
-
class:
|
|
228
|
+
class: f(["rds-e-textarea__counter", {
|
|
227
229
|
"rds-e-textarea__counter--disabled": t(p),
|
|
228
230
|
"rds-e-textarea__counter--clearable": t(k)
|
|
229
231
|
}])
|
|
230
232
|
}, [
|
|
231
|
-
e.counter && !t(S) ? (
|
|
233
|
+
e.counter && !t(S) ? (n(), h("p", ae, i(j.value) + "/" + i(t(v)), 1)) : s("", !0),
|
|
232
234
|
x(r.$slots, "right-icon", {}, () => [
|
|
233
|
-
|
|
235
|
+
l.value.right.name && !l.value.left.name ? (n(), C(T, M({
|
|
234
236
|
key: 0,
|
|
235
237
|
class: "rds-e-textarea__icon rds-e-textarea__icon--right",
|
|
236
238
|
"aria-hidden": "true"
|
|
237
|
-
},
|
|
239
|
+
}, l.value.right, q(l.value.right.events)), null, 16)) : s("", !0)
|
|
238
240
|
], !0)
|
|
239
241
|
], 2)
|
|
240
242
|
])
|
|
241
243
|
]),
|
|
242
244
|
a("ul", {
|
|
243
|
-
class:
|
|
245
|
+
class: f(["rds-e-textarea__helper", t(g) || E.value ? "rds-e-textarea__helper--error" : ""])
|
|
244
246
|
}, [
|
|
245
|
-
V.value ? (
|
|
246
|
-
B.value ? (
|
|
247
|
+
V.value ? (n(), h("li", le, " Max text length is " + i(t(v)), 1)) : s("", !0),
|
|
248
|
+
B.value ? (n(), h("li", ne, " Min text length is " + i(t(_)), 1)) : s("", !0),
|
|
247
249
|
a("li", null, [
|
|
248
250
|
x(r.$slots, "helper-text", {}, () => [
|
|
249
|
-
t(A) || t(
|
|
251
|
+
t(A) || t(g) ? (n(), h("span", oe, i(t(z)), 1)) : s("", !0)
|
|
250
252
|
], !0)
|
|
251
253
|
])
|
|
252
254
|
], 2)
|
|
253
255
|
], 2);
|
|
254
256
|
};
|
|
255
257
|
}
|
|
256
|
-
}), ce = /* @__PURE__ */ W(se, [["__scopeId", "data-v-
|
|
258
|
+
}), ce = /* @__PURE__ */ W(se, [["__scopeId", "data-v-51c6b51e"]]);
|
|
257
259
|
export {
|
|
258
260
|
ce as default
|
|
259
261
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as H, toRefs as M, ref as L, computed as n, watch as U, openBlock as u, createElementBlock as v, normalizeClass as h, createElementVNode as i, renderSlot as _, createBlock as A, mergeProps as S, toHandlers as G, createCommentVNode as g, unref as t, toDisplayString as B, createVNode as J, withModifiers as K } from "vue";
|
|
2
|
+
import { g as O } from "./getInstance-GhoEcxLF.js";
|
|
3
|
+
import { I as V } from "./icon-svg-CEZ-L3iv.js";
|
|
4
|
+
import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/textField.css';const W = { class: "rds-e-textfield__container" }, X = { class: "rds-e-textfield__input-container" }, Y = ["id", "type", "maxLength", "minLength", "disabled", "value", "autocomplete", "readonly"], Z = ["for"], ee = {
|
|
5
6
|
key: 0,
|
|
6
7
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
7
|
-
},
|
|
8
|
+
}, te = { class: "rds-e-textfield__helper" }, le = /* @__PURE__ */ H({
|
|
8
9
|
__name: "text-field",
|
|
9
10
|
props: {
|
|
10
11
|
/**
|
|
@@ -18,9 +19,8 @@ import './style/textField.css';const K = { class: "rds-e-textfield__container" }
|
|
|
18
19
|
* Identificador único del campo de entrada.
|
|
19
20
|
*/
|
|
20
21
|
id: {
|
|
21
|
-
type:
|
|
22
|
-
required: !
|
|
23
|
-
default: "text-field-0"
|
|
22
|
+
type: String,
|
|
23
|
+
required: !1
|
|
24
24
|
},
|
|
25
25
|
/**
|
|
26
26
|
* v-model valor de entrada y salida
|
|
@@ -118,54 +118,55 @@ import './style/textField.css';const K = { class: "rds-e-textfield__container" }
|
|
|
118
118
|
type: String,
|
|
119
119
|
default: "off",
|
|
120
120
|
validator: (l, c) => {
|
|
121
|
-
const
|
|
122
|
-
return c.password && !
|
|
121
|
+
const a = ["new-password", "current-password", "off"];
|
|
122
|
+
return c.password && !a.includes(l) ? (console.info(`[RDSTextfield]: El valor de autocomplete para un campo de contraseña debe ser uno de los siguientes: ${a.join(", ")}`), !1) : !0;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
emits: ["update:modelValue"],
|
|
127
127
|
setup(l, { emit: c }) {
|
|
128
|
-
const
|
|
129
|
-
label:
|
|
130
|
-
|
|
131
|
-
disabled: i,
|
|
128
|
+
const a = l, x = c, {
|
|
129
|
+
label: E,
|
|
130
|
+
disabled: d,
|
|
132
131
|
maxLength: y,
|
|
133
132
|
minLength: b,
|
|
134
|
-
modelValue:
|
|
135
|
-
icon:
|
|
136
|
-
rightIcon:
|
|
137
|
-
helper:
|
|
133
|
+
modelValue: o,
|
|
134
|
+
icon: I,
|
|
135
|
+
rightIcon: T,
|
|
136
|
+
helper: $,
|
|
138
137
|
error: f,
|
|
139
|
-
helperText:
|
|
140
|
-
clearable:
|
|
138
|
+
helperText: C,
|
|
139
|
+
clearable: R,
|
|
141
140
|
password: p,
|
|
142
|
-
autocomplete:
|
|
143
|
-
} =
|
|
141
|
+
autocomplete: q
|
|
142
|
+
} = M(a), s = L(!0), m = L(!1), D = O(), N = n(() => a.id || `text-field-${D}`), F = n(() => {
|
|
144
143
|
if (p.value)
|
|
145
|
-
return
|
|
146
|
-
}),
|
|
147
|
-
|
|
144
|
+
return q.value;
|
|
145
|
+
}), k = (e) => {
|
|
146
|
+
m.value = !1, x(
|
|
148
147
|
"update:modelValue",
|
|
149
148
|
e.target.value
|
|
150
149
|
);
|
|
151
|
-
},
|
|
150
|
+
}, j = () => {
|
|
151
|
+
m.value = !0;
|
|
152
|
+
}, P = n(() => !!(f.value || o.value.length && (o.value.length < b.value || o.value.length > y.value))), z = n(() => {
|
|
152
153
|
const e = [];
|
|
153
|
-
return
|
|
154
|
-
}), r =
|
|
154
|
+
return o.value && e.push("rds-e-textfield--filled"), P.value && e.push("rds-e-textfield--error"), d.value && e.push("rds-e-textfield--disabled"), e.join(" ");
|
|
155
|
+
}), r = n(() => {
|
|
155
156
|
const e = {
|
|
156
|
-
name:
|
|
157
|
+
name: I.value,
|
|
157
158
|
class: "",
|
|
158
159
|
events: {
|
|
159
160
|
click: () => {
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
|
-
},
|
|
163
|
+
}, w = {
|
|
163
164
|
left: {
|
|
164
165
|
...e
|
|
165
166
|
},
|
|
166
167
|
right: {
|
|
167
168
|
...e,
|
|
168
|
-
name:
|
|
169
|
+
name: T.value
|
|
169
170
|
}
|
|
170
171
|
};
|
|
171
172
|
return p.value ? {
|
|
@@ -175,13 +176,13 @@ import './style/textField.css';const K = { class: "rds-e-textfield__container" }
|
|
|
175
176
|
},
|
|
176
177
|
right: {
|
|
177
178
|
...e,
|
|
178
|
-
name:
|
|
179
|
+
name: s.value ? "eye_open" : "eye_close",
|
|
179
180
|
class: "rds-e-textfield__icon--password",
|
|
180
181
|
events: {
|
|
181
|
-
click: () =>
|
|
182
|
+
click: () => s.value = !s.value
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
|
-
} :
|
|
185
|
+
} : R.value ? {
|
|
185
186
|
left: {
|
|
186
187
|
...e
|
|
187
188
|
},
|
|
@@ -190,67 +191,68 @@ import './style/textField.css';const K = { class: "rds-e-textfield__container" }
|
|
|
190
191
|
name: "close",
|
|
191
192
|
class: "rds-e-textfield__icon--clear",
|
|
192
193
|
events: {
|
|
193
|
-
click: () =>
|
|
194
|
+
click: () => x("update:modelValue", "")
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
|
-
} :
|
|
197
|
+
} : w;
|
|
197
198
|
});
|
|
198
|
-
return
|
|
199
|
+
return U(
|
|
199
200
|
p,
|
|
200
|
-
(e) =>
|
|
201
|
+
(e) => s.value = !e,
|
|
201
202
|
{ immediate: !0 }
|
|
202
|
-
), (e,
|
|
203
|
-
class: h(["rds-e-textfield",
|
|
203
|
+
), (e, w) => (u(), v("div", {
|
|
204
|
+
class: h(["rds-e-textfield", z.value])
|
|
204
205
|
}, [
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
r.value.left.name ? (u(),
|
|
206
|
+
i("div", W, [
|
|
207
|
+
_(e.$slots, "left-icon", {}, () => [
|
|
208
|
+
r.value.left.name ? (u(), A(V, S({
|
|
208
209
|
key: 0,
|
|
209
|
-
class: "rds-e-textfield__icon rds-e-textfield__icon--left",
|
|
210
|
+
class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden": m.value }],
|
|
210
211
|
"aria-hidden": "true"
|
|
211
|
-
}, r.value.left,
|
|
212
|
+
}, r.value.left, G(r.value.left.events)), null, 16, ["class"])) : g("", !0)
|
|
212
213
|
], !0),
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
id:
|
|
216
|
-
type:
|
|
214
|
+
i("div", X, [
|
|
215
|
+
i("input", {
|
|
216
|
+
id: N.value,
|
|
217
|
+
type: s.value ? "text" : "password",
|
|
217
218
|
class: "rds-e-textfield__input",
|
|
218
219
|
maxLength: t(y),
|
|
219
220
|
minLength: t(b),
|
|
220
|
-
disabled: t(
|
|
221
|
-
value: t(
|
|
222
|
-
autocomplete:
|
|
221
|
+
disabled: t(d),
|
|
222
|
+
value: t(o),
|
|
223
|
+
autocomplete: F.value,
|
|
223
224
|
readonly: l.readonly,
|
|
224
|
-
onInput:
|
|
225
|
-
onBlur:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
onInput: k,
|
|
226
|
+
onBlur: k,
|
|
227
|
+
onFocus: j
|
|
228
|
+
}, null, 40, Y),
|
|
229
|
+
i("label", {
|
|
230
|
+
for: N.value,
|
|
231
|
+
class: h(["rds-e-textfield__label", t(d) ? "rds-e-textfield__label--disabled" : ""])
|
|
232
|
+
}, B(t(E)), 11, Z)
|
|
231
233
|
]),
|
|
232
|
-
r.value.right.name || e.$slots["right-icon"] ? (u(),
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
r.value.right.name || e.$slots["right-icon"] ? (u(), v("span", ee, [
|
|
235
|
+
_(e.$slots, "right-icon", {}, () => [
|
|
236
|
+
J(V, S({
|
|
235
237
|
"aria-hidden": "true",
|
|
236
238
|
class: "rds-e-textfield__icon rds-e-textfield__icon--right"
|
|
237
239
|
}, r.value.right, {
|
|
238
|
-
onClick:
|
|
240
|
+
onClick: K(r.value.right.events.click, ["stop"])
|
|
239
241
|
}), null, 16, ["onClick"])
|
|
240
242
|
], !0)
|
|
241
|
-
])) :
|
|
243
|
+
])) : g("", !0)
|
|
242
244
|
]),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
(t(
|
|
245
|
+
i("div", te, [
|
|
246
|
+
_(e.$slots, "helper-text", {}, () => [
|
|
247
|
+
(t($) || t(f)) && !t(d) ? (u(), v("span", {
|
|
246
248
|
key: 0,
|
|
247
249
|
class: h(t(f) ? "rds-e-textfield__helper--error" : "")
|
|
248
|
-
},
|
|
250
|
+
}, B(t(C)), 3)) : g("", !0)
|
|
249
251
|
], !0)
|
|
250
252
|
])
|
|
251
253
|
], 2));
|
|
252
254
|
}
|
|
253
|
-
}),
|
|
255
|
+
}), ne = /* @__PURE__ */ Q(le, [["__scopeId", "data-v-2a397de0"]]);
|
|
254
256
|
export {
|
|
255
|
-
|
|
257
|
+
ne as default
|
|
256
258
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unref as at, defineComponent as
|
|
1
|
+
import { unref as at, defineComponent as Mt, toRefs as Vt, ref as U, computed as Ft, openBlock as bt, createElementBlock as At, createElementVNode as Z, renderSlot as Ht, normalizeClass as Ct, toDisplayString as Rt, createVNode as jt, createCommentVNode as Yt } from "vue";
|
|
2
2
|
import { I as Xt } from "./icon-svg-CEZ-L3iv.js";
|
|
3
3
|
import { _ as It } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/tooltip.css';const X = Math.min, O = Math.max, nt = Math.round, H = (t) => ({
|
|
@@ -284,7 +284,7 @@ const te = (t) => ({
|
|
|
284
284
|
}, d = ht(i), m = gt(d), g = await s.getDimensions(a), h = d === "y", w = h ? "top" : "left", x = h ? "bottom" : "right", y = h ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[d] - p[d] - r.floating[m], v = p[d] - r.reference[d], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
|
|
285
285
|
let C = T ? T[y] : 0;
|
|
286
286
|
(!C || !await (s.isElement == null ? void 0 : s.isElement(T))) && (C = l.floating[y] || r.floating[m]);
|
|
287
|
-
const $ = b / 2 - v / 2, E = C / 2 - g[m] / 2 - 1,
|
|
287
|
+
const $ = b / 2 - v / 2, E = C / 2 - g[m] / 2 - 1, S = X(u[w], E), B = X(u[x], E), P = S, M = C - g[m] - B, A = C / 2 - g[m] / 2 + $, K = ft(P, A, M), W = !c.arrow && Q(i) != null && A !== K && r.reference[m] / 2 - (A < P ? S : B) - g[m] / 2 < 0, L = W ? A < P ? A - P : A - M : 0;
|
|
288
288
|
return {
|
|
289
289
|
[d]: p[d] + L,
|
|
290
290
|
data: {
|
|
@@ -324,12 +324,12 @@ const te = (t) => ({
|
|
|
324
324
|
const w = j(i), x = I(l), y = j(l) === l, b = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), v = p || (y || !g ? [ot(l)] : Gt(l)), T = m !== "none";
|
|
325
325
|
!p && T && v.push(...Qt(l, g, m, b));
|
|
326
326
|
const C = [l, ...v], $ = await wt(e, h), E = [];
|
|
327
|
-
let
|
|
327
|
+
let S = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
328
328
|
if (f && E.push($[w]), u) {
|
|
329
329
|
const A = qt(i, s, b);
|
|
330
330
|
E.push($[A[0]], $[A[1]]);
|
|
331
331
|
}
|
|
332
|
-
if (
|
|
332
|
+
if (S = [...S, {
|
|
333
333
|
placement: i,
|
|
334
334
|
overflows: E
|
|
335
335
|
}], !E.every((A) => A <= 0)) {
|
|
@@ -339,26 +339,26 @@ const te = (t) => ({
|
|
|
339
339
|
return {
|
|
340
340
|
data: {
|
|
341
341
|
index: A,
|
|
342
|
-
overflows:
|
|
342
|
+
overflows: S
|
|
343
343
|
},
|
|
344
344
|
reset: {
|
|
345
345
|
placement: K
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
|
-
let W = (P =
|
|
348
|
+
let W = (P = S.filter((L) => L.overflows[0] <= 0).sort((L, V) => L.overflows[1] - V.overflows[1])[0]) == null ? void 0 : P.placement;
|
|
349
349
|
if (!W)
|
|
350
350
|
switch (d) {
|
|
351
351
|
case "bestFit": {
|
|
352
|
-
var
|
|
353
|
-
const L = (
|
|
352
|
+
var M;
|
|
353
|
+
const L = (M = S.filter((V) => {
|
|
354
354
|
if (T) {
|
|
355
|
-
const F = I(
|
|
355
|
+
const F = I(V.placement);
|
|
356
356
|
return F === x || // Create a bias to the `y` side axis due to horizontal
|
|
357
357
|
// reading directions favoring greater width.
|
|
358
358
|
F === "y";
|
|
359
359
|
}
|
|
360
360
|
return !0;
|
|
361
|
-
}).map((
|
|
361
|
+
}).map((V) => [V.placement, V.overflows.filter((F) => F > 0).reduce((F, Bt) => F + Bt, 0)]).sort((V, F) => V[1] - F[1])[0]) == null ? void 0 : M[0];
|
|
362
362
|
L && (W = L);
|
|
363
363
|
break;
|
|
364
364
|
}
|
|
@@ -506,8 +506,8 @@ const oe = function(t) {
|
|
|
506
506
|
const x = g - f.top - f.bottom, y = m - f.left - f.right, b = X(g - f[h], x), v = X(m - f[w], y), T = !e.middlewareData.shift;
|
|
507
507
|
let C = b, $ = v;
|
|
508
508
|
if ((o = e.middlewareData.shift) != null && o.enabled.x && ($ = y), (n = e.middlewareData.shift) != null && n.enabled.y && (C = x), T && !p) {
|
|
509
|
-
const
|
|
510
|
-
d ? $ = m - 2 * (
|
|
509
|
+
const S = O(f.left, 0), B = O(f.right, 0), P = O(f.top, 0), M = O(f.bottom, 0);
|
|
510
|
+
d ? $ = m - 2 * (S !== 0 || B !== 0 ? S + B : O(f.left, f.right)) : C = g - 2 * (P !== 0 || M !== 0 ? P + M : O(f.top, f.bottom));
|
|
511
511
|
}
|
|
512
512
|
await c({
|
|
513
513
|
...e,
|
|
@@ -540,13 +540,13 @@ function N(t) {
|
|
|
540
540
|
function xt(t) {
|
|
541
541
|
return st() ? t instanceof Node || t instanceof R(t).Node : !1;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function _(t) {
|
|
544
544
|
return st() ? t instanceof Element || t instanceof R(t).Element : !1;
|
|
545
545
|
}
|
|
546
546
|
function k(t) {
|
|
547
547
|
return st() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function St(t) {
|
|
550
550
|
return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
|
|
551
551
|
}
|
|
552
552
|
function et(t) {
|
|
@@ -571,7 +571,7 @@ function rt(t) {
|
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
573
|
function yt(t) {
|
|
574
|
-
const e = vt(), o =
|
|
574
|
+
const e = vt(), o = _(t) ? D(t) : t;
|
|
575
575
|
return o.transform !== "none" || o.perspective !== "none" || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
576
576
|
}
|
|
577
577
|
function le(t) {
|
|
@@ -595,7 +595,7 @@ function D(t) {
|
|
|
595
595
|
return R(t).getComputedStyle(t);
|
|
596
596
|
}
|
|
597
597
|
function lt(t) {
|
|
598
|
-
return
|
|
598
|
+
return _(t) ? {
|
|
599
599
|
scrollLeft: t.scrollLeft,
|
|
600
600
|
scrollTop: t.scrollTop
|
|
601
601
|
} : {
|
|
@@ -610,10 +610,10 @@ function Y(t) {
|
|
|
610
610
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
611
611
|
t.assignedSlot || // DOM Element detected.
|
|
612
612
|
t.parentNode || // ShadowRoot detected.
|
|
613
|
-
|
|
613
|
+
St(t) && t.host || // Fallback.
|
|
614
614
|
N(t)
|
|
615
615
|
);
|
|
616
|
-
return
|
|
616
|
+
return St(e) ? e.host : e;
|
|
617
617
|
}
|
|
618
618
|
function Pt(t) {
|
|
619
619
|
const e = Y(t);
|
|
@@ -643,7 +643,7 @@ function Lt(t) {
|
|
|
643
643
|
};
|
|
644
644
|
}
|
|
645
645
|
function kt(t) {
|
|
646
|
-
return
|
|
646
|
+
return _(t) ? t : t.contextElement;
|
|
647
647
|
}
|
|
648
648
|
function q(t) {
|
|
649
649
|
const e = kt(t);
|
|
@@ -675,11 +675,11 @@ function tt(t, e, o, n) {
|
|
|
675
675
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
676
676
|
const i = t.getBoundingClientRect(), r = kt(t);
|
|
677
677
|
let s = H(1);
|
|
678
|
-
e && (n ?
|
|
678
|
+
e && (n ? _(n) && (s = q(n)) : s = q(t));
|
|
679
679
|
const l = ae(r, o, n) ? $t(r) : H(0);
|
|
680
680
|
let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y, f = i.width / s.x, u = i.height / s.y;
|
|
681
681
|
if (r) {
|
|
682
|
-
const p = R(r), d = n &&
|
|
682
|
+
const p = R(r), d = n && _(n) ? R(n) : n;
|
|
683
683
|
let m = p, g = mt(m);
|
|
684
684
|
for (; g && n && d !== m; ) {
|
|
685
685
|
const h = q(g), w = g.getBoundingClientRect(), x = D(g), y = w.left + (g.clientLeft + parseFloat(x.paddingLeft)) * h.x, b = w.top + (g.clientTop + parseFloat(x.paddingTop)) * h.y;
|
|
@@ -761,13 +761,13 @@ function pe(t, e) {
|
|
|
761
761
|
y: a
|
|
762
762
|
};
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function _t(t, e, o) {
|
|
765
765
|
let n;
|
|
766
766
|
if (e === "viewport")
|
|
767
767
|
n = me(t, o);
|
|
768
768
|
else if (e === "document")
|
|
769
769
|
n = de(N(t));
|
|
770
|
-
else if (
|
|
770
|
+
else if (_(e))
|
|
771
771
|
n = pe(e, o);
|
|
772
772
|
else {
|
|
773
773
|
const i = $t(t);
|
|
@@ -781,16 +781,16 @@ function St(t, e, o) {
|
|
|
781
781
|
}
|
|
782
782
|
function Wt(t, e) {
|
|
783
783
|
const o = Y(t);
|
|
784
|
-
return o === e || !
|
|
784
|
+
return o === e || !_(o) || G(o) ? !1 : D(o).position === "fixed" || Wt(o, e);
|
|
785
785
|
}
|
|
786
786
|
function ge(t, e) {
|
|
787
787
|
const o = e.get(t);
|
|
788
788
|
if (o)
|
|
789
789
|
return o;
|
|
790
|
-
let n = dt(t, [], !1).filter((l) =>
|
|
790
|
+
let n = dt(t, [], !1).filter((l) => _(l) && z(l) !== "body"), i = null;
|
|
791
791
|
const r = D(t).position === "fixed";
|
|
792
792
|
let s = r ? Y(t) : t;
|
|
793
|
-
for (;
|
|
793
|
+
for (; _(s) && !G(s); ) {
|
|
794
794
|
const l = D(s), c = yt(s);
|
|
795
795
|
!c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || et(s) && !c && Wt(t, s)) ? n = n.filter((f) => f !== s) : i = l, s = Y(s);
|
|
796
796
|
}
|
|
@@ -804,9 +804,9 @@ function he(t) {
|
|
|
804
804
|
strategy: i
|
|
805
805
|
} = t;
|
|
806
806
|
const s = [...o === "clippingAncestors" ? rt(e) ? [] : ge(e, this._c) : [].concat(o), n], l = s[0], c = s.reduce((a, f) => {
|
|
807
|
-
const u =
|
|
807
|
+
const u = _t(e, f, i);
|
|
808
808
|
return a.top = O(u.top, a.top), a.right = X(u.right, a.right), a.bottom = X(u.bottom, a.bottom), a.left = O(u.left, a.left), a;
|
|
809
|
-
},
|
|
809
|
+
}, _t(e, l, i));
|
|
810
810
|
return {
|
|
811
811
|
width: c.right - c.left,
|
|
812
812
|
height: c.bottom - c.top,
|
|
@@ -868,7 +868,7 @@ function Nt(t, e) {
|
|
|
868
868
|
if (!k(t)) {
|
|
869
869
|
let i = Y(t);
|
|
870
870
|
for (; i && !G(i); ) {
|
|
871
|
-
if (
|
|
871
|
+
if (_(i) && !ct(i))
|
|
872
872
|
return i;
|
|
873
873
|
i = Y(i);
|
|
874
874
|
}
|
|
@@ -903,9 +903,9 @@ const be = {
|
|
|
903
903
|
getClientRects: ue,
|
|
904
904
|
getDimensions: we,
|
|
905
905
|
getScale: q,
|
|
906
|
-
isElement:
|
|
906
|
+
isElement: _,
|
|
907
907
|
isRTL: ve
|
|
908
|
-
}, Ae = oe, Ce = ie, Re = ee, Oe = se,
|
|
908
|
+
}, Ae = oe, Ce = ie, Re = ee, Oe = se, Se = te, _e = (t, e, o) => {
|
|
909
909
|
const n = /* @__PURE__ */ new Map(), i = {
|
|
910
910
|
platform: be,
|
|
911
911
|
...o
|
|
@@ -937,7 +937,7 @@ function Pe(t) {
|
|
|
937
937
|
options: t,
|
|
938
938
|
fn(e) {
|
|
939
939
|
const o = Te(Ee(t.element));
|
|
940
|
-
return o == null ? {} :
|
|
940
|
+
return o == null ? {} : Se({
|
|
941
941
|
element: o,
|
|
942
942
|
padding: t.padding
|
|
943
943
|
}).fn(e);
|
|
@@ -947,7 +947,7 @@ function Pe(t) {
|
|
|
947
947
|
const Le = { class: "rds-e-tooltip" }, ke = {
|
|
948
948
|
key: 0,
|
|
949
949
|
class: "rds-e-tooltip__header"
|
|
950
|
-
}, $e = { class: "rds-e-tooltip__title" }, We = { class: "rds-e-tooltip__content" }, Ne = /* @__PURE__ */
|
|
950
|
+
}, $e = { class: "rds-e-tooltip__title" }, We = { class: "rds-e-tooltip__content" }, Ne = /* @__PURE__ */ Mt({
|
|
951
951
|
__name: "tooltip",
|
|
952
952
|
props: {
|
|
953
953
|
/**
|
|
@@ -994,8 +994,8 @@ const Le = { class: "rds-e-tooltip" }, ke = {
|
|
|
994
994
|
}
|
|
995
995
|
},
|
|
996
996
|
setup(t) {
|
|
997
|
-
const e = t, { large: o, fullWidth: n, title: i } =
|
|
998
|
-
const { x: m, y: g, middlewareData: h, placement: w } = await
|
|
997
|
+
const e = t, { large: o, fullWidth: n, title: i } = Vt(e), r = U(), s = U(), l = U(), c = U(!0), a = U(""), f = async () => {
|
|
998
|
+
const { x: m, y: g, middlewareData: h, placement: w } = await _e(
|
|
999
999
|
r.value,
|
|
1000
1000
|
s.value,
|
|
1001
1001
|
{
|
|
@@ -1005,10 +1005,11 @@ const Le = { class: "rds-e-tooltip" }, ke = {
|
|
|
1005
1005
|
Re(),
|
|
1006
1006
|
Ce(),
|
|
1007
1007
|
Oe({
|
|
1008
|
-
apply({
|
|
1008
|
+
apply({ availableHeight: v, availableWidth: T, elements: C }) {
|
|
1009
1009
|
Object.assign(C.floating.style, {
|
|
1010
|
-
maxWidth: n.value ? `${
|
|
1011
|
-
|
|
1010
|
+
maxWidth: n.value ? `${Math.max(0, T)}px` : "380px",
|
|
1011
|
+
width: "max-content",
|
|
1012
|
+
maxHeight: `${Math.max(0, v)}px`
|
|
1012
1013
|
});
|
|
1013
1014
|
}
|
|
1014
1015
|
}),
|
|
@@ -1040,7 +1041,7 @@ const Le = { class: "rds-e-tooltip" }, ke = {
|
|
|
1040
1041
|
i != null && i.value || (c.value = !0);
|
|
1041
1042
|
}, p = () => {
|
|
1042
1043
|
c.value = !1, f();
|
|
1043
|
-
}, d = Ft(() => `rds-e-tooltip__tooltip ${c.value ? "rds-e-tooltip__tooltip-hidden " : ""}${o.value || i != null && i.value ? "rds-e-tooltip__tooltip--large " : ""}
|
|
1044
|
+
}, d = Ft(() => `rds-e-tooltip__tooltip ${c.value ? "rds-e-tooltip__tooltip-hidden " : ""}${o.value || i != null && i.value ? "rds-e-tooltip__tooltip--large " : ""}`);
|
|
1044
1045
|
return (m, g) => (bt(), At("div", Le, [
|
|
1045
1046
|
Z("div", {
|
|
1046
1047
|
ref_key: "referenceRef",
|
|
@@ -1076,7 +1077,7 @@ const Le = { class: "rds-e-tooltip" }, ke = {
|
|
|
1076
1077
|
], 2)
|
|
1077
1078
|
]));
|
|
1078
1079
|
}
|
|
1079
|
-
}), Fe = /* @__PURE__ */ It(Ne, [["__scopeId", "data-v-
|
|
1080
|
+
}), Fe = /* @__PURE__ */ It(Ne, [["__scopeId", "data-v-064513ce"]]);
|
|
1080
1081
|
export {
|
|
1081
1082
|
Fe as default
|
|
1082
1083
|
};
|