energy-components 1.23.0 → 2.0.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/README.md +21 -6
- package/dist/components/accordion.es.js +17 -17
- package/dist/components/avatar.es.js +7 -7
- package/dist/components/breadcrumbs.es.js +32 -32
- package/dist/components/button.es.js +24 -24
- package/dist/components/checkbox.es.js +14 -17
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-f-OHx-l3.js → collapsable.scss_vue_type_style_index_0_src_true_lang-BERfoghR.js} +10 -10
- package/dist/components/datepicker.es.js +4644 -4639
- package/dist/components/directAccess.es.js +45 -50
- package/dist/components/dragAndDrop.es.js +44 -46
- package/dist/components/dropdown.es.js +154 -163
- package/dist/components/fileUploadItem.es.js +18 -18
- package/dist/components/filterChip.es.js +9 -9
- package/dist/components/filterTag.es.js +7 -7
- package/dist/components/{floating-ui.vue-DHEoOe5S.js → floating-ui.vue-C-DgKOwt.js} +1 -1
- package/dist/components/functions-D3GA3OzJ.js +24 -0
- package/dist/components/icon-svg-DxlNo61Q.js +869 -0
- package/dist/components/iconList.es.js +25 -29
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +46 -46
- package/dist/components/indicator.es.js +27 -28
- package/dist/components/infoBox.es.js +17 -17
- package/dist/components/link.es.js +82 -85
- package/dist/components/modal.es.js +20 -20
- package/dist/components/multiselect.es.js +54 -55
- package/dist/components/overlay.es.js +20 -15
- package/dist/components/pagination.es.js +111 -111
- package/dist/components/persistentToast.es.js +11 -11
- package/dist/components/popover.es.js +18 -18
- package/dist/components/popoverMenu.es.js +22 -22
- package/dist/components/progressBar.es.js +8 -8
- package/dist/components/quantitySelector.es.js +12 -12
- package/dist/components/radioButton.es.js +26 -26
- package/dist/components/selectionChip.es.js +5 -5
- package/dist/components/sidedrawer.es.js +19 -19
- package/dist/components/style/accordionGroup.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/dragAndDrop.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/iconList.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/modal.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/selectionChip.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tableslotedcomponent.css +1 -1
- package/dist/components/switch.es.js +9 -9
- package/dist/components/tabBar.es.js +32 -33
- package/dist/components/tablepaginatedcomponent.es.js +35 -36
- package/dist/components/tableslotedcomponent.es.js +116 -121
- package/dist/components/tag.es.js +6 -6
- package/dist/components/textArea.es.js +103 -106
- package/dist/components/textField.es.js +21 -22
- package/dist/components/toggle.es.js +23 -23
- package/dist/components/tooltip.es.js +59 -59
- package/dist/energy-components.css +1 -0
- package/dist/energy-components.es.js +8931 -24801
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/icon-svg/icon-list.d.ts +8 -9
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +2 -2
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/link/link.vue.d.ts +5 -8
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +1 -1
- package/dist/types/src/helpers/functions.d.ts +1 -0
- package/dist/types/style.d.ts +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -17
- package/dist/components/functions-DIHwdgF0.js +0 -18
- package/dist/components/icon-svg-K8-vLJgV.js +0 -16718
- package/dist/composables/index.es.js +0 -37
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, toRefs as G, ref as J, computed as r, watch as K, onBeforeMount as Q, createElementBlock as f, openBlock as u, createElementVNode as m, createCommentVNode as P, createBlock as x, createVNode as k, Fragment as W, renderList as X, unref as C, toDisplayString as B } from "vue";
|
|
2
2
|
import p from "./actionButton.es.js";
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/pagination.css';const ee = ["id"], ae = { class: "rds-e-pagination" },
|
|
3
|
+
import Y from "./dropdown.es.js";
|
|
4
|
+
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/pagination.css';const ee = ["id"], ae = { class: "rds-e-pagination" }, te = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "rds-e-pagination__item rds-e-pagination__item-elipsis"
|
|
8
|
-
},
|
|
8
|
+
}, le = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "rds-e-pagination__dropdown"
|
|
11
|
-
},
|
|
11
|
+
}, ie = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "rds-e-pagination-leyend"
|
|
14
|
-
}, ne = /* @__PURE__ */
|
|
14
|
+
}, ne = /* @__PURE__ */ z({
|
|
15
15
|
__name: "pagination",
|
|
16
16
|
props: {
|
|
17
17
|
/**
|
|
@@ -110,198 +110,198 @@ import './style/pagination.css';const ee = ["id"], ae = { class: "rds-e-paginati
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
emits: ["pageChanged", "ellipsisClicked"],
|
|
113
|
-
setup(
|
|
114
|
-
const
|
|
115
|
-
itemsPerPage:
|
|
116
|
-
totalItems:
|
|
117
|
-
totalPages:
|
|
118
|
-
hideLeyend:
|
|
119
|
-
disableFirstLoad:
|
|
120
|
-
enableEllipsis:
|
|
113
|
+
setup(n, { expose: L, emit: I }) {
|
|
114
|
+
const b = n, $ = I, {
|
|
115
|
+
itemsPerPage: c,
|
|
116
|
+
totalItems: s,
|
|
117
|
+
totalPages: h,
|
|
118
|
+
hideLeyend: M,
|
|
119
|
+
disableFirstLoad: E,
|
|
120
|
+
enableEllipsis: V,
|
|
121
121
|
enablePageDropdown: w,
|
|
122
122
|
pageDropdownLabel: S
|
|
123
|
-
} =
|
|
124
|
-
if (!
|
|
125
|
-
const a =
|
|
126
|
-
return Math.min(a,
|
|
127
|
-
}), D =
|
|
128
|
-
const a = [], e =
|
|
129
|
-
if (!
|
|
123
|
+
} = G(b), l = J(b.currentPage), g = r(() => typeof s?.value == "number" && s.value >= 0), d = r(() => g.value && typeof s?.value == "number" ? s.value <= 0 || c.value <= 0 ? 1 : Math.ceil(s.value / c.value) : typeof h?.value == "number" && h.value > 0 ? h.value : (typeof h?.value > "u" && typeof s?.value > "u" && console.warn("[RDSPagination] Props `totalItems` o `totalPages` son requeridas."), 1)), _ = r(() => g.value && !M.value && typeof s?.value == "number" && s.value > 0), F = r(() => !g.value || typeof s?.value != "number" || s.value === 0 ? 0 : (l.value - 1) * c.value + 1), R = r(() => {
|
|
124
|
+
if (!g.value || typeof s?.value != "number") return 0;
|
|
125
|
+
const a = l.value * c.value;
|
|
126
|
+
return Math.min(a, s.value);
|
|
127
|
+
}), D = r(() => l.value === 1), N = r(() => l.value === d.value), q = r(() => {
|
|
128
|
+
const a = [], e = d.value, t = l.value;
|
|
129
|
+
if (!V.value || w.value) {
|
|
130
130
|
if (e <= 3)
|
|
131
|
-
for (let
|
|
132
|
-
a.push(
|
|
133
|
-
else
|
|
134
|
-
return [...new Set(a)].filter((
|
|
131
|
+
for (let i = 1; i <= e; i++)
|
|
132
|
+
a.push(i);
|
|
133
|
+
else t === 1 ? a.push(1, 2, Math.min(3, e)) : t === e ? a.push(Math.max(1, e - 2), e - 1, e) : a.push(t - 1, t, t + 1);
|
|
134
|
+
return [...new Set(a)].filter((i) => typeof i == "number" && i >= 1 && i <= e);
|
|
135
135
|
}
|
|
136
136
|
if (e <= 5) {
|
|
137
|
-
for (let
|
|
138
|
-
a.push(
|
|
137
|
+
for (let i = 1; i <= e; i++)
|
|
138
|
+
a.push(i);
|
|
139
139
|
return a;
|
|
140
140
|
}
|
|
141
|
-
return a.push(1),
|
|
142
|
-
}),
|
|
143
|
-
const a =
|
|
144
|
-
return Array.from({ length: a }, (e,
|
|
145
|
-
}),
|
|
146
|
-
const e =
|
|
141
|
+
return a.push(1), t <= 3 ? (a.push(2, 3), e > 4 && a.push("ellipsis_end"), a.push(e)) : t >= e - 2 ? (e > 4 && a.push("ellipsis_start"), a.push(e - 2, e - 1, e)) : (a.push("ellipsis_start"), a.push(t - 1, t, t + 1), a.push("ellipsis_end"), a.push(e)), a.filter((i, o, y) => y.indexOf(i) === o);
|
|
142
|
+
}), j = r(() => {
|
|
143
|
+
const a = d.value;
|
|
144
|
+
return Array.from({ length: a }, (e, t) => String(t + 1));
|
|
145
|
+
}), T = (a) => {
|
|
146
|
+
const e = d.value, t = l.value, i = [];
|
|
147
147
|
if (a === "ellipsis_start")
|
|
148
|
-
for (let
|
|
149
|
-
|
|
148
|
+
for (let o = 2; o < t - 1; o++)
|
|
149
|
+
i.push(o);
|
|
150
150
|
else if (a === "ellipsis_end")
|
|
151
|
-
for (let
|
|
152
|
-
|
|
153
|
-
return
|
|
154
|
-
},
|
|
155
|
-
const e =
|
|
151
|
+
for (let o = t + 2; o < e; o++)
|
|
152
|
+
i.push(o);
|
|
153
|
+
return i;
|
|
154
|
+
}, A = (a) => {
|
|
155
|
+
const e = T(a);
|
|
156
156
|
$("ellipsisClicked", {
|
|
157
157
|
hiddenPages: e,
|
|
158
158
|
ellipsisType: a,
|
|
159
|
-
currentPage:
|
|
160
|
-
totalPages:
|
|
159
|
+
currentPage: l.value,
|
|
160
|
+
totalPages: d.value
|
|
161
161
|
});
|
|
162
|
-
},
|
|
163
|
-
let e =
|
|
164
|
-
const
|
|
162
|
+
}, O = (a) => {
|
|
163
|
+
let e = l.value;
|
|
164
|
+
const t = d.value;
|
|
165
165
|
if ("navigator" in a)
|
|
166
166
|
switch (a.navigator) {
|
|
167
167
|
case "next":
|
|
168
|
-
|
|
168
|
+
l.value < t && (e = l.value + 1);
|
|
169
169
|
break;
|
|
170
170
|
case "prev":
|
|
171
|
-
|
|
171
|
+
l.value > 1 && (e = l.value - 1);
|
|
172
172
|
break;
|
|
173
173
|
case "first":
|
|
174
|
-
|
|
174
|
+
l.value !== 1 && (e = 1);
|
|
175
175
|
break;
|
|
176
176
|
case "last":
|
|
177
|
-
|
|
177
|
+
l.value !== t && (e = t);
|
|
178
178
|
break;
|
|
179
179
|
}
|
|
180
|
-
else "page" in a && typeof a.page == "number" && a.page >= 1 && a.page <=
|
|
181
|
-
return e !==
|
|
182
|
-
},
|
|
183
|
-
if (
|
|
184
|
-
const
|
|
185
|
-
let y =
|
|
186
|
-
|
|
187
|
-
const
|
|
180
|
+
else "page" in a && typeof a.page == "number" && a.page >= 1 && a.page <= t && a.page !== l.value && (e = a.page);
|
|
181
|
+
return e !== l.value ? (l.value = e, !0) : !1;
|
|
182
|
+
}, v = (a, e = !1) => {
|
|
183
|
+
if (O(a) || e) {
|
|
184
|
+
const i = c.value, o = (l.value - 1) * i;
|
|
185
|
+
let y = o + i;
|
|
186
|
+
g.value && typeof s?.value == "number" && (y = Math.min(o + i, s.value));
|
|
187
|
+
const H = {
|
|
188
188
|
...a,
|
|
189
|
-
page:
|
|
190
|
-
offset:
|
|
191
|
-
limit:
|
|
189
|
+
page: l.value,
|
|
190
|
+
offset: o,
|
|
191
|
+
limit: i,
|
|
192
192
|
end: y,
|
|
193
193
|
reset: e || void 0
|
|
194
194
|
};
|
|
195
|
-
$("pageChanged",
|
|
195
|
+
$("pageChanged", H);
|
|
196
196
|
}
|
|
197
|
-
},
|
|
197
|
+
}, U = (a) => {
|
|
198
198
|
const e = Number(a);
|
|
199
|
-
e !==
|
|
199
|
+
e !== l.value && e >= 1 && e <= d.value && v({ page: e });
|
|
200
200
|
};
|
|
201
|
-
return
|
|
202
|
-
a !==
|
|
203
|
-
}),
|
|
204
|
-
|
|
201
|
+
return K(() => b.currentPage, (a) => {
|
|
202
|
+
a !== l.value && a >= 1 && a <= d.value && (l.value = a);
|
|
203
|
+
}), Q(() => {
|
|
204
|
+
E.value || v({ navigator: "first", page: 1 });
|
|
205
205
|
}), L({
|
|
206
206
|
/** Resetea la paginación a la primera página y emite el evento pageChanged. */
|
|
207
207
|
resetPagination: () => {
|
|
208
|
-
|
|
208
|
+
l.value !== 1 && v({ page: 1 }, !0);
|
|
209
209
|
}
|
|
210
|
-
}), (a, e) => (
|
|
211
|
-
id:
|
|
210
|
+
}), (a, e) => (u(), f("div", {
|
|
211
|
+
id: n.id,
|
|
212
212
|
class: "rds-e-pagination-container rds-flex"
|
|
213
213
|
}, [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
m("ul", ae, [
|
|
215
|
+
m("li", null, [
|
|
216
|
+
n.jumpTo ? (u(), x(p, {
|
|
217
217
|
key: 0,
|
|
218
|
-
id:
|
|
218
|
+
id: n.id ? `${n.id}-first` : void 0,
|
|
219
219
|
class: "rds-e-pagination__actionBtn",
|
|
220
220
|
variant: "ghost",
|
|
221
221
|
small: "",
|
|
222
222
|
icon: "back",
|
|
223
223
|
"aria-label": "First Page",
|
|
224
224
|
disabled: D.value,
|
|
225
|
-
onClick: e[0] || (e[0] = (
|
|
226
|
-
}, null, 8, ["id", "disabled"])) :
|
|
225
|
+
onClick: e[0] || (e[0] = (t) => v({ navigator: "first" }))
|
|
226
|
+
}, null, 8, ["id", "disabled"])) : P("", !0)
|
|
227
227
|
]),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
id:
|
|
228
|
+
m("li", null, [
|
|
229
|
+
k(p, {
|
|
230
|
+
id: n.id ? `${n.id}-prev` : void 0,
|
|
231
231
|
class: "rds-e-pagination__actionBtn",
|
|
232
232
|
variant: "ghost",
|
|
233
233
|
small: "",
|
|
234
234
|
icon: "arrow_left",
|
|
235
235
|
"aria-label": "Prev page",
|
|
236
236
|
disabled: D.value,
|
|
237
|
-
onClick: e[1] || (e[1] = (
|
|
237
|
+
onClick: e[1] || (e[1] = (t) => v({ navigator: "prev" }))
|
|
238
238
|
}, null, 8, ["id", "disabled"])
|
|
239
239
|
]),
|
|
240
|
-
(
|
|
241
|
-
typeof
|
|
242
|
-
|
|
243
|
-
id:
|
|
240
|
+
(u(!0), f(W, null, X(q.value, (t) => (u(), f("li", { key: t }, [
|
|
241
|
+
typeof t == "string" && t.includes("ellipsis") ? (u(), f("div", te, [
|
|
242
|
+
k(p, {
|
|
243
|
+
id: n.id ? `${n.id}-ellipsis-${t}` : void 0,
|
|
244
244
|
variant: "ghost",
|
|
245
245
|
small: "",
|
|
246
246
|
text: "...",
|
|
247
247
|
icon: "",
|
|
248
248
|
"aria-label": "Más páginas",
|
|
249
|
-
onClick: (
|
|
249
|
+
onClick: (i) => A(t)
|
|
250
250
|
}, null, 8, ["id", "onClick"])
|
|
251
|
-
])) : (
|
|
251
|
+
])) : (u(), x(p, {
|
|
252
252
|
key: 1,
|
|
253
|
-
id:
|
|
253
|
+
id: n.id ? `${n.id}-page-${t}` : void 0,
|
|
254
254
|
class: "rds-e-pagination__item",
|
|
255
|
-
variant:
|
|
255
|
+
variant: t === l.value && b.selected ? "primary" : "ghost",
|
|
256
256
|
small: "",
|
|
257
|
-
text: String(
|
|
257
|
+
text: String(t),
|
|
258
258
|
icon: "",
|
|
259
|
-
"aria-label": `page number ${
|
|
260
|
-
onClick: (
|
|
259
|
+
"aria-label": `page number ${t}`,
|
|
260
|
+
onClick: (i) => v({ page: t })
|
|
261
261
|
}, null, 8, ["id", "variant", "text", "aria-label", "onClick"]))
|
|
262
262
|
]))), 128)),
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
id:
|
|
263
|
+
m("li", null, [
|
|
264
|
+
k(p, {
|
|
265
|
+
id: n.id ? `${n.id}-next` : void 0,
|
|
266
266
|
class: "rds-e-pagination__actionBtn",
|
|
267
267
|
variant: "ghost",
|
|
268
268
|
icon: "arrow_right",
|
|
269
269
|
small: "",
|
|
270
270
|
"aria-label": "next page",
|
|
271
271
|
disabled: N.value,
|
|
272
|
-
onClick: e[2] || (e[2] = (
|
|
272
|
+
onClick: e[2] || (e[2] = (t) => v({ navigator: "next" }))
|
|
273
273
|
}, null, 8, ["id", "disabled"])
|
|
274
274
|
]),
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
m("li", null, [
|
|
276
|
+
n.jumpTo ? (u(), x(p, {
|
|
277
277
|
key: 0,
|
|
278
|
-
id:
|
|
278
|
+
id: n.id ? `${n.id}-last` : void 0,
|
|
279
279
|
class: "rds-e-pagination__actionBtn",
|
|
280
280
|
variant: "ghost",
|
|
281
281
|
small: "",
|
|
282
282
|
icon: "last",
|
|
283
283
|
"aria-label": "last page",
|
|
284
284
|
disabled: N.value,
|
|
285
|
-
onClick: e[3] || (e[3] = (
|
|
286
|
-
}, null, 8, ["id", "disabled"])) :
|
|
285
|
+
onClick: e[3] || (e[3] = (t) => v({ navigator: "last" }))
|
|
286
|
+
}, null, 8, ["id", "disabled"])) : P("", !0)
|
|
287
287
|
]),
|
|
288
|
-
C(w) ? (
|
|
289
|
-
|
|
288
|
+
C(w) ? (u(), f("li", le, [
|
|
289
|
+
k(Y, {
|
|
290
290
|
id: "rds-dropdown-pagination",
|
|
291
|
-
modelValue:
|
|
292
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
293
|
-
label: C(S) ? C(S) :
|
|
294
|
-
options:
|
|
291
|
+
modelValue: l.value,
|
|
292
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => l.value = t),
|
|
293
|
+
label: C(S) ? C(S) : l.value.toString(),
|
|
294
|
+
options: j.value,
|
|
295
295
|
small: "",
|
|
296
296
|
"text-only": "",
|
|
297
|
-
onSelect:
|
|
297
|
+
onSelect: U
|
|
298
298
|
}, null, 8, ["modelValue", "label", "options"])
|
|
299
|
-
])) :
|
|
299
|
+
])) : P("", !0)
|
|
300
300
|
]),
|
|
301
|
-
|
|
301
|
+
_.value ? (u(), f("p", ie, " Mostrando resultados " + B(F.value) + "-" + B(R.value) + " de " + B(C(s)), 1)) : P("", !0)
|
|
302
302
|
], 8, ee));
|
|
303
303
|
}
|
|
304
|
-
}), de = /* @__PURE__ */
|
|
304
|
+
}), de = /* @__PURE__ */ Z(ne, [["__scopeId", "data-v-755635ef"]]);
|
|
305
305
|
export {
|
|
306
306
|
de as default
|
|
307
307
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, toRefs as y, computed as g, createElementBlock as t, openBlock as s, normalizeClass as h, createElementVNode as r, createCommentVNode as o, createVNode as a, toDisplayString as c, renderSlot as d } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { I as l } from "./icon-svg-DxlNo61Q.js";
|
|
3
3
|
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/persistentToast.css';const S = ["id"], $ = { class: "alert" }, C = {
|
|
5
5
|
key: 0,
|
|
@@ -7,16 +7,16 @@ import './style/persistentToast.css';const S = ["id"], $ = { class: "alert" }, C
|
|
|
7
7
|
}, q = { class: "rds-e-persistent-toast__wrapper" }, w = { class: "rds-e-persistent-toast__title__wrapper" }, b = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "rds-e-persistent-toast__title rds-mb-03"
|
|
10
|
-
},
|
|
10
|
+
}, T = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "rds-e-persistent-toast__text"
|
|
13
|
-
},
|
|
13
|
+
}, B = {
|
|
14
14
|
key: 2,
|
|
15
15
|
class: "rds-e-persistent-toast__content-section"
|
|
16
|
-
},
|
|
16
|
+
}, I = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "rds-e-persistent-toast__action-section"
|
|
19
|
-
},
|
|
19
|
+
}, N = /* @__PURE__ */ f({
|
|
20
20
|
__name: "persistent-toast",
|
|
21
21
|
props: {
|
|
22
22
|
/**
|
|
@@ -99,7 +99,7 @@ import './style/persistentToast.css';const S = ["id"], $ = { class: "alert" }, C
|
|
|
99
99
|
), v = () => {
|
|
100
100
|
m("onCloseToastAction");
|
|
101
101
|
};
|
|
102
|
-
return (i,
|
|
102
|
+
return (i, V) => (s(), t("div", {
|
|
103
103
|
id: e.id,
|
|
104
104
|
class: h(["rds-e-persistent-toast", p.value]),
|
|
105
105
|
role: "alert"
|
|
@@ -115,8 +115,8 @@ import './style/persistentToast.css';const S = ["id"], $ = { class: "alert" }, C
|
|
|
115
115
|
r("div", q, [
|
|
116
116
|
r("div", w, [
|
|
117
117
|
e.title ? (s(), t("div", b, c(e.title), 1)) : o("", !0),
|
|
118
|
-
e.message && !i.$slots["content-section"] ? (s(), t("p",
|
|
119
|
-
i.$slots["content-section"] ? (s(), t("div",
|
|
118
|
+
e.message && !i.$slots["content-section"] ? (s(), t("p", T, c(e.message), 1)) : o("", !0),
|
|
119
|
+
i.$slots["content-section"] ? (s(), t("div", B, [
|
|
120
120
|
d(i.$slots, "content-section", {}, void 0, !0)
|
|
121
121
|
])) : o("", !0)
|
|
122
122
|
]),
|
|
@@ -133,12 +133,12 @@ import './style/persistentToast.css';const S = ["id"], $ = { class: "alert" }, C
|
|
|
133
133
|
])) : o("", !0)
|
|
134
134
|
])
|
|
135
135
|
]),
|
|
136
|
-
i.$slots["action-section"] ? (s(), t("div",
|
|
136
|
+
i.$slots["action-section"] ? (s(), t("div", I, [
|
|
137
137
|
d(i.$slots, "action-section", {}, void 0, !0)
|
|
138
138
|
])) : o("", !0)
|
|
139
139
|
], 10, S));
|
|
140
140
|
}
|
|
141
|
-
}),
|
|
141
|
+
}), R = /* @__PURE__ */ k(N, [["__scopeId", "data-v-9c8ae892"]]);
|
|
142
142
|
export {
|
|
143
|
-
|
|
143
|
+
R as default
|
|
144
144
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useSlots as V, computed as y, ref as _, watch as A, nextTick as L, onBeforeUnmount as U, createElementBlock as c, openBlock as a, createElementVNode as B, createBlock as H, renderSlot as h, Teleport as j, createCommentVNode as C, normalizeStyle as G, normalizeClass as
|
|
2
|
-
import { o as Q, f as X, s as Y, b as Z, u as ee, a as te } from "./floating-ui.vue-
|
|
3
|
-
import {
|
|
1
|
+
import { useSlots as V, computed as y, ref as _, watch as A, nextTick as L, onBeforeUnmount as U, createElementBlock as c, openBlock as a, createElementVNode as B, createBlock as H, renderSlot as h, Teleport as j, createCommentVNode as C, normalizeStyle as G, normalizeClass as F, unref as W, Fragment as q, renderList as J, toDisplayString as K } from "vue";
|
|
2
|
+
import { o as Q, f as X, s as Y, b as Z, u as ee, a as te } from "./floating-ui.vue-C-DgKOwt.js";
|
|
3
|
+
import { I as oe } from "./icon-svg-DxlNo61Q.js";
|
|
4
4
|
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
6
6
|
key: 1,
|
|
@@ -87,8 +87,8 @@ import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
|
87
87
|
*/
|
|
88
88
|
"close"
|
|
89
89
|
],
|
|
90
|
-
setup(u, { expose:
|
|
91
|
-
const t = u, p =
|
|
90
|
+
setup(u, { expose: P, emit: x }) {
|
|
91
|
+
const t = u, p = x, M = V(), k = y(() => !!M.default), n = _(!1), i = _(null), l = _(null), R = y(() => {
|
|
92
92
|
const e = [
|
|
93
93
|
Q(t.offsetSpace)
|
|
94
94
|
];
|
|
@@ -107,12 +107,12 @@ import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
|
107
107
|
}
|
|
108
108
|
})
|
|
109
109
|
), e;
|
|
110
|
-
}), { floatingStyles:
|
|
110
|
+
}), { floatingStyles: $, update: D } = ee(
|
|
111
111
|
i,
|
|
112
112
|
l,
|
|
113
113
|
{
|
|
114
114
|
placement: y(() => t.placement),
|
|
115
|
-
middleware:
|
|
115
|
+
middleware: R,
|
|
116
116
|
whileElementsMounted: te
|
|
117
117
|
}
|
|
118
118
|
);
|
|
@@ -132,22 +132,22 @@ import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
|
132
132
|
(e.bottom < 0 || e.top > window.innerHeight) && r();
|
|
133
133
|
};
|
|
134
134
|
const d = async () => {
|
|
135
|
-
n.value ? r() : (n.value = !0, p("open"), await L(),
|
|
135
|
+
n.value ? r() : (n.value = !0, p("open"), await L(), D(), setTimeout(() => {
|
|
136
136
|
document.addEventListener("click", v), document.addEventListener("keydown", m), t.closeOnTriggerHidden && document.addEventListener("scroll", g, !0);
|
|
137
137
|
}));
|
|
138
|
-
},
|
|
138
|
+
}, I = () => {
|
|
139
139
|
t.triggerOnHover && (o && (clearTimeout(o), o = null), n.value || d());
|
|
140
140
|
}, T = () => {
|
|
141
141
|
t.triggerOnHover && (o && (clearTimeout(o), o = null), o = setTimeout(() => {
|
|
142
142
|
l.value && l.value.matches(":hover, :focus-within") || r();
|
|
143
143
|
}, 120));
|
|
144
|
-
},
|
|
144
|
+
}, N = (e) => {
|
|
145
145
|
t.triggerOnHover ? (e.preventDefault(), e.stopPropagation(), n.value || d()) : d();
|
|
146
146
|
}, E = () => {
|
|
147
|
-
|
|
147
|
+
I();
|
|
148
148
|
}, w = () => {
|
|
149
149
|
T();
|
|
150
|
-
},
|
|
150
|
+
}, z = () => {
|
|
151
151
|
l.value && (l.value.addEventListener("mouseenter", () => {
|
|
152
152
|
o && (clearTimeout(o), o = null);
|
|
153
153
|
}), l.value.addEventListener("mouseleave", () => {
|
|
@@ -155,12 +155,12 @@ import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
|
155
155
|
}));
|
|
156
156
|
};
|
|
157
157
|
A(n, (e) => {
|
|
158
|
-
e && t.triggerOnHover && L(() =>
|
|
158
|
+
e && t.triggerOnHover && L(() => z());
|
|
159
159
|
});
|
|
160
160
|
const O = (e) => {
|
|
161
161
|
p("select", e), r();
|
|
162
162
|
};
|
|
163
|
-
return U(b),
|
|
163
|
+
return U(b), P({
|
|
164
164
|
toggle: d,
|
|
165
165
|
close: r,
|
|
166
166
|
isOpen: n
|
|
@@ -169,7 +169,7 @@ import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
|
169
169
|
ref_key: "referenceRef",
|
|
170
170
|
ref: i,
|
|
171
171
|
class: "rds-e-popover__trigger-btn",
|
|
172
|
-
onClick:
|
|
172
|
+
onClick: N,
|
|
173
173
|
onMouseenter: E,
|
|
174
174
|
onMouseleave: w,
|
|
175
175
|
onFocus: E,
|
|
@@ -185,8 +185,8 @@ import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
|
185
185
|
key: 0,
|
|
186
186
|
ref_key: "floatingRef",
|
|
187
187
|
ref: l,
|
|
188
|
-
class:
|
|
189
|
-
style: G(W(
|
|
188
|
+
class: F(["rds-e-popover__content", { "rds-e-popover__content--no-styles": k.value }]),
|
|
189
|
+
style: G(W($))
|
|
190
190
|
}, [
|
|
191
191
|
k.value ? h(e.$slots, "default", { key: 0 }, void 0, !0) : (a(), c("ul", se, [
|
|
192
192
|
(a(!0), c(q, null, J(u.items, (s, f) => h(e.$slots, "item", {
|
|
@@ -196,7 +196,7 @@ import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
|
196
196
|
}, () => [
|
|
197
197
|
(a(), c("li", {
|
|
198
198
|
key: f,
|
|
199
|
-
class:
|
|
199
|
+
class: F(["rds-e-popover__item rds-body-02-bold", { "rds-e-popover__item--destructive": s.isDestructive }]),
|
|
200
200
|
onClick: (ce) => O(s)
|
|
201
201
|
}, [
|
|
202
202
|
s.icon ? (a(), H(oe, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as N, useSlots as U, computed as h, ref as k, watch as j, nextTick as
|
|
2
|
-
import { o as X, f as Y, s as Z, b as ee, u as te, a as oe } from "./floating-ui.vue-
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as N, useSlots as U, computed as h, ref as k, watch as j, nextTick as L, onBeforeUnmount as G, createElementBlock as u, openBlock as a, createElementVNode as S, createBlock as C, renderSlot as y, Teleport as W, createCommentVNode as H, normalizeStyle as q, normalizeClass as F, unref as A, Fragment as J, renderList as K, toDisplayString as Q } from "vue";
|
|
2
|
+
import { o as X, f as Y, s as Z, b as ee, u as te, a as oe } from "./floating-ui.vue-C-DgKOwt.js";
|
|
3
|
+
import { I as ne } from "./icon-svg-DxlNo61Q.js";
|
|
4
4
|
import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/popoverMenu.css';const se = { class: "rds-e-popover-menu" }, re = {
|
|
6
6
|
key: 1,
|
|
@@ -19,8 +19,8 @@ import './style/popoverMenu.css';const se = { class: "rds-e-popover-menu" }, re
|
|
|
19
19
|
triggerOnHover: { type: Boolean, default: !1 }
|
|
20
20
|
},
|
|
21
21
|
emits: ["select", "open", "close"],
|
|
22
|
-
setup(d, { expose:
|
|
23
|
-
const t = d, m =
|
|
22
|
+
setup(d, { expose: M, emit: P }) {
|
|
23
|
+
const t = d, m = P, x = U(), b = h(() => !!x.default), n = k(!1), i = k(null), l = k(null), R = h(() => {
|
|
24
24
|
const e = [X(t.offsetSpace)];
|
|
25
25
|
return t.autoFlip && e.push(
|
|
26
26
|
Y({
|
|
@@ -37,12 +37,12 @@ import './style/popoverMenu.css';const se = { class: "rds-e-popover-menu" }, re
|
|
|
37
37
|
}
|
|
38
38
|
})
|
|
39
39
|
), e;
|
|
40
|
-
}), { floatingStyles:
|
|
40
|
+
}), { floatingStyles: $, update: D } = te(
|
|
41
41
|
i,
|
|
42
42
|
l,
|
|
43
43
|
{
|
|
44
44
|
placement: h(() => t.placement),
|
|
45
|
-
middleware:
|
|
45
|
+
middleware: R,
|
|
46
46
|
whileElementsMounted: oe
|
|
47
47
|
}
|
|
48
48
|
);
|
|
@@ -63,18 +63,18 @@ import './style/popoverMenu.css';const se = { class: "rds-e-popover-menu" }, re
|
|
|
63
63
|
(e.bottom < 0 || e.top > window.innerHeight) && r();
|
|
64
64
|
};
|
|
65
65
|
const f = async () => {
|
|
66
|
-
n.value ? r() : (n.value = !0, m("open"), await
|
|
66
|
+
n.value ? r() : (n.value = !0, m("open"), await L(), D(), setTimeout(() => {
|
|
67
67
|
document.addEventListener("click", v), document.addEventListener("keydown", g), t.closeOnTriggerHidden && document.addEventListener("scroll", _, !0);
|
|
68
68
|
}));
|
|
69
|
-
},
|
|
69
|
+
}, I = () => {
|
|
70
70
|
t.triggerOnHover && (o && (clearTimeout(o), o = null), n.value || f());
|
|
71
71
|
}, E = () => {
|
|
72
72
|
t.triggerOnHover && (o && (clearTimeout(o), o = null), o = setTimeout(() => {
|
|
73
73
|
l.value && l.value.matches(":hover, :focus-within") || r();
|
|
74
74
|
}, 120));
|
|
75
|
-
},
|
|
75
|
+
}, z = (e) => {
|
|
76
76
|
t.triggerOnHover ? (e.preventDefault(), e.stopPropagation(), n.value || f()) : f();
|
|
77
|
-
}, w = () =>
|
|
77
|
+
}, w = () => I(), O = () => E(), V = () => {
|
|
78
78
|
l.value && (l.value.addEventListener("mouseenter", () => {
|
|
79
79
|
o && (clearTimeout(o), o = null);
|
|
80
80
|
}), l.value.addEventListener("mouseleave", () => {
|
|
@@ -82,12 +82,12 @@ import './style/popoverMenu.css';const se = { class: "rds-e-popover-menu" }, re
|
|
|
82
82
|
}));
|
|
83
83
|
};
|
|
84
84
|
j(n, (e) => {
|
|
85
|
-
e && t.triggerOnHover &&
|
|
85
|
+
e && t.triggerOnHover && L(() => V());
|
|
86
86
|
});
|
|
87
|
-
const
|
|
87
|
+
const B = (e) => {
|
|
88
88
|
m("select", e), r();
|
|
89
89
|
};
|
|
90
|
-
return G(T),
|
|
90
|
+
return G(T), M({
|
|
91
91
|
/** Alterna el estado abierto/cerrado del popover */
|
|
92
92
|
toggle: f,
|
|
93
93
|
/** Cierra programáticamente el popover */
|
|
@@ -95,11 +95,11 @@ import './style/popoverMenu.css';const se = { class: "rds-e-popover-menu" }, re
|
|
|
95
95
|
/** Ref reactiva del estado abierto */
|
|
96
96
|
isOpen: n
|
|
97
97
|
}), (e, c) => (a(), u("div", se, [
|
|
98
|
-
|
|
98
|
+
S("button", {
|
|
99
99
|
ref_key: "referenceRef",
|
|
100
100
|
ref: i,
|
|
101
101
|
class: "rds-e-popover-menu__trigger-btn",
|
|
102
|
-
onClick:
|
|
102
|
+
onClick: z,
|
|
103
103
|
onMouseenter: w,
|
|
104
104
|
onMouseleave: O,
|
|
105
105
|
onFocus: w,
|
|
@@ -115,26 +115,26 @@ import './style/popoverMenu.css';const se = { class: "rds-e-popover-menu" }, re
|
|
|
115
115
|
key: 0,
|
|
116
116
|
ref_key: "floatingRef",
|
|
117
117
|
ref: l,
|
|
118
|
-
class:
|
|
119
|
-
style: q(A(
|
|
118
|
+
class: F(["rds-e-popover-menu__content", { "rds-e-popover-menu__content--no-styles": b.value }]),
|
|
119
|
+
style: q(A($))
|
|
120
120
|
}, [
|
|
121
121
|
b.value ? y(e.$slots, "default", { key: 0 }, void 0, !0) : (a(), u("ul", re, [
|
|
122
122
|
(a(!0), u(J, null, K(d.items, (s, p) => y(e.$slots, "item", {
|
|
123
123
|
item: s,
|
|
124
124
|
index: p,
|
|
125
|
-
onSelect: () =>
|
|
125
|
+
onSelect: () => B(s)
|
|
126
126
|
}, () => [
|
|
127
127
|
(a(), u("li", {
|
|
128
128
|
key: p,
|
|
129
|
-
class:
|
|
130
|
-
onClick: (ue) =>
|
|
129
|
+
class: F(["rds-e-popover-menu__item rds-body-02-bold", { "rds-e-popover-menu__item--destructive": s.isDestructive }]),
|
|
130
|
+
onClick: (ue) => B(s)
|
|
131
131
|
}, [
|
|
132
132
|
s.icon ? (a(), C(ne, {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "rds-e-popover-menu__item-icon",
|
|
135
135
|
name: s.icon
|
|
136
136
|
}, null, 8, ["name"])) : H("", !0),
|
|
137
|
-
|
|
137
|
+
S("span", ie, Q(s.label), 1)
|
|
138
138
|
], 10, ae))
|
|
139
139
|
], !0)), 256))
|
|
140
140
|
]))
|