energy-components 1.7.0 → 1.8.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 +13 -13
- package/dist/components/accordionGroup.es.js +2 -2
- package/dist/components/actionButton.es.js +2 -2
- package/dist/components/breadcrumbs.es.js +3 -3
- package/dist/components/button.es.js +2 -2
- package/dist/components/card.es.js +5 -5
- package/dist/components/checkbox.es.js +5 -5
- package/dist/components/datepicker.es.js +588 -590
- package/dist/components/divider.es.js +2 -2
- package/dist/components/dragAndDrop.es.js +187 -0
- package/dist/components/dropdown.es.js +92 -92
- package/dist/components/filterChip.es.js +2 -2
- package/dist/components/floatingActionButton.es.js +2 -2
- package/dist/components/{icon-svg-BmDOQ0kL.js → icon-svg-_WCkLP8-.js} +12 -63
- package/dist/components/iconList.es.js +4 -4
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +81 -75
- package/dist/components/indicator.es.js +6 -6
- package/dist/components/infoBox.es.js +16 -16
- package/dist/components/link.es.js +2 -2
- package/dist/components/modal.es.js +26 -26
- package/dist/components/multiselect.es.js +5 -5
- package/dist/components/multiselectcontentwrapper.es.js +6 -6
- package/dist/components/overlay.es.js +3 -3
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/persistentToast.es.js +12 -12
- package/dist/components/progressBar.es.js +86 -0
- package/dist/components/quantitySelector.es.js +9 -9
- package/dist/components/{radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js → radio-group.vue_vue_type_script_setup_true_lang-DpguLlRK.js} +2 -2
- package/dist/components/radioButton.es.js +4 -4
- package/dist/components/radioGroup.es.js +1 -1
- package/dist/components/selectionChip.es.js +3 -3
- package/dist/components/sidebar.es.js +13 -13
- package/dist/components/sidedrawer.es.js +11 -11
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/dragAndDrop.css +1 -0
- package/dist/components/style/progressBar.css +1 -0
- package/dist/components/style/switch.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/switch.es.js +45 -38
- package/dist/components/tabBar.es.js +70 -55
- package/dist/components/tablepaginatedcomponent.es.js +22 -22
- package/dist/components/tableslotedcomponent.es.js +26 -26
- package/dist/components/tag.es.js +2 -2
- package/dist/components/textArea.es.js +2 -2
- package/dist/components/textField.es.js +30 -30
- package/dist/components/toggle.es.js +2 -2
- package/dist/components/tooltip.es.js +319 -311
- package/dist/energy-components.es.js +4689 -4450
- package/dist/energy-components.umd.js +2 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +1 -1
- package/dist/types/src/components/buttons/button/button.vue.d.ts +6 -11
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +1 -1
- package/dist/types/src/components/content/accordion/accordion.vue.d.ts +6 -17
- package/dist/types/src/components/content/acordion-group/accordion-group.vue.d.ts +6 -11
- package/dist/types/src/components/content/card/card.vue.d.ts +6 -11
- package/dist/types/src/components/content/divider/divider.vue.d.ts +1 -1
- package/dist/types/src/components/content/table/table-paginated/TablePaginatedComponent.vue.d.ts +88 -0
- package/dist/types/src/components/content/table/table-sloted/TableSlotedComponent.vue.d.ts +32 -31
- package/dist/types/src/components/content/tag/tag.vue.d.ts +1 -1
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +1 -4
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +8 -18
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +8 -12
- package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +101 -0
- package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +1 -1
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +6 -11
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +258 -0
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +203 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +30 -550
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +1 -3
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +1 -4
- package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +1 -1
- package/dist/types/src/components/input/radio-button/radio-group.vue.d.ts +6 -11
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +1 -3
- package/dist/types/src/components/input/switch/switch.vue.d.ts +24 -21
- package/dist/types/src/components/input/text-area/text-area.vue.d.ts +12 -15
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +12 -19
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +1 -1
- package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +10 -17
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +8 -16
- package/dist/types/src/components/navigation/link/link.vue.d.ts +7 -11
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +1 -1
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +24 -18
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +10 -141
- package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +5 -10
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +8 -20
- package/dist/types/src/helpers/mobileMockup.vue.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s, computed as i,
|
|
1
|
+
import { defineComponent as s, computed as i, createElementBlock as d, openBlock as n, normalizeClass as t } from "vue";
|
|
2
2
|
import { _ as l } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
import './style/divider.css';const a = /* @__PURE__ */ s({
|
|
4
4
|
__name: "divider",
|
|
@@ -25,7 +25,7 @@ import './style/divider.css';const a = /* @__PURE__ */ s({
|
|
|
25
25
|
"rds-e-divider--inverse-low": e.low && e.inverse,
|
|
26
26
|
"rds-e-divider--inverse-high": !e.low && e.inverse
|
|
27
27
|
}));
|
|
28
|
-
return (v, c) => (
|
|
28
|
+
return (v, c) => (n(), d("div", {
|
|
29
29
|
class: t(o.value)
|
|
30
30
|
}, null, 2));
|
|
31
31
|
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { defineComponent as W, ref as _, computed as c, createElementBlock as b, openBlock as x, withModifiers as u, normalizeClass as k, createElementVNode as o, renderSlot as L, createVNode as M, createCommentVNode as R, toDisplayString as D } from "vue";
|
|
2
|
+
import { g as A } from "./getInstance-GhoEcxLF.js";
|
|
3
|
+
import { R as V } from "./icon-svg-_WCkLP8-.js";
|
|
4
|
+
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/dragAndDrop.css';const z = ["id", "accept", "multiple", "disabled"], O = ["for"], P = { class: "rds-e-drag-and-drop__icon-wrapper" }, U = { class: "rds-e-drag-and-drop__text-container" }, j = { class: "rds-e-drag-and-drop__text" }, G = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "rds-e-drag-and-drop__detail"
|
|
8
|
+
}, H = /* @__PURE__ */ W({
|
|
9
|
+
__name: "drag-and-drop",
|
|
10
|
+
props: {
|
|
11
|
+
/**
|
|
12
|
+
* Tipos de archivo aceptados por el input (ej. '.png,.jpg,.pdf', 'image/*').
|
|
13
|
+
*/
|
|
14
|
+
accept: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
/**
|
|
19
|
+
* Texto secundario que se muestra debajo del texto principal (ej. formatos permitidos, tamaño máximo).
|
|
20
|
+
*/
|
|
21
|
+
detailText: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* Indica si el componente está deshabilitado.
|
|
27
|
+
*/
|
|
28
|
+
disabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* Indica si el componente está en estado de error.
|
|
34
|
+
*/
|
|
35
|
+
error: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* Mensaje de error específico a mostrar en lugar del texto de detalle cuando `error` es `true`.
|
|
41
|
+
*/
|
|
42
|
+
errorMessage: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ""
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Nombre del icono a mostrar. Por defecto es 'paperclip'.
|
|
48
|
+
*/
|
|
49
|
+
icon: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "add_file"
|
|
52
|
+
// Default icon from the design
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Identificador único para el input de archivo. Si no se proporciona, se genera uno automáticamente.
|
|
56
|
+
*/
|
|
57
|
+
id: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: null
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* Texto principal que se muestra en el componente (ej. "Arrastra para subir un archivo").
|
|
63
|
+
*/
|
|
64
|
+
label: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: !1
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* Número máximo de archivos permitidos. Si es `0` o `null`, no hay límite (excepto el que imponga `multiple`).
|
|
70
|
+
*/
|
|
71
|
+
maxFiles: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: null,
|
|
74
|
+
validator: (r) => r === null || r >= 0
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Indica si se permite la selección múltiple de archivos.
|
|
78
|
+
*/
|
|
79
|
+
multiple: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: !1
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Controla la visibilidad del texto de detalle (`detailText` o `errorMessage`).
|
|
85
|
+
*/
|
|
86
|
+
showDetailText: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: !0
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* Indica si el componente debe ocupar todo el ancho disponible.
|
|
92
|
+
*/
|
|
93
|
+
fullWidth: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: !1
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
emits: ["filesSelected", "error"],
|
|
99
|
+
setup(r, { emit: y }) {
|
|
100
|
+
const e = r, f = y, s = _(null), n = _(!1), S = A(), g = c(() => e.id || `rds-drag-drop-${S}`), w = c(() => [
|
|
101
|
+
"rds-e-drag-and-drop",
|
|
102
|
+
{
|
|
103
|
+
"rds-e-drag-and-drop--dragging": n.value && !e.disabled,
|
|
104
|
+
"rds-e-drag-and-drop--disabled": e.disabled,
|
|
105
|
+
"rds-e-drag-and-drop--full-width": e.fullWidth,
|
|
106
|
+
"rds-e-drag-and-drop--error": e.error && !e.disabled
|
|
107
|
+
}
|
|
108
|
+
]), m = c(() => e.error && e.errorMessage ? e.errorMessage : e.detailText), C = c(() => e.showDetailText && (m.value || !e.error)), F = (t) => {
|
|
109
|
+
var a;
|
|
110
|
+
if (!t || t.length === 0)
|
|
111
|
+
return { valid: !1, message: "No se seleccionaron archivos." };
|
|
112
|
+
if (!e.multiple && t.length > 1)
|
|
113
|
+
return { valid: !1, message: "Solo se permite seleccionar un archivo." };
|
|
114
|
+
if (e.maxFiles !== null && e.maxFiles > 0 && t.length > e.maxFiles)
|
|
115
|
+
return { valid: !1, message: `Se permite un máximo de ${e.maxFiles} archivos.` };
|
|
116
|
+
if (e.accept) {
|
|
117
|
+
const i = e.accept.split(",").map((d) => d.trim().toLowerCase());
|
|
118
|
+
for (let d = 0; d < t.length; d++) {
|
|
119
|
+
const p = t[d], N = `.${(a = p.name.split(".").pop()) == null ? void 0 : a.toLowerCase()}`, h = p.type.toLowerCase();
|
|
120
|
+
if (!i.some((l) => l.startsWith(".") ? N === l : l.includes("/") ? l.endsWith("/*") ? h.startsWith(l.replace("/*", "")) : h === l : !1))
|
|
121
|
+
return { valid: !1, message: `El tipo de archivo '${p.name}' no es válido. Permitidos: ${e.accept}` };
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return { valid: !0 };
|
|
125
|
+
}, v = (t) => {
|
|
126
|
+
if (e.disabled) return;
|
|
127
|
+
const a = F(t);
|
|
128
|
+
a.valid && t ? (f("filesSelected", t), s.value && (s.value.value = "")) : a.message && (f("error", a.message), s.value && (s.value.value = ""));
|
|
129
|
+
}, T = (t) => {
|
|
130
|
+
const a = t.target;
|
|
131
|
+
v(a.files);
|
|
132
|
+
}, B = () => {
|
|
133
|
+
e.disabled || (n.value = !0);
|
|
134
|
+
}, $ = (t) => {
|
|
135
|
+
e.disabled || (t.preventDefault(), n.value = !0);
|
|
136
|
+
}, E = (t) => {
|
|
137
|
+
const a = t.relatedTarget;
|
|
138
|
+
(!t.currentTarget || !t.currentTarget.contains(a)) && (n.value = !1);
|
|
139
|
+
}, I = (t) => {
|
|
140
|
+
var i;
|
|
141
|
+
if (e.disabled) return;
|
|
142
|
+
n.value = !1;
|
|
143
|
+
const a = (i = t.dataTransfer) == null ? void 0 : i.files;
|
|
144
|
+
v(a || null);
|
|
145
|
+
};
|
|
146
|
+
return (t, a) => (x(), b("div", {
|
|
147
|
+
class: k(w.value),
|
|
148
|
+
onDragenter: u(B, ["prevent"]),
|
|
149
|
+
onDragover: u($, ["prevent"]),
|
|
150
|
+
onDragleave: u(E, ["prevent"]),
|
|
151
|
+
onDrop: u(I, ["prevent"])
|
|
152
|
+
}, [
|
|
153
|
+
o("input", {
|
|
154
|
+
id: g.value,
|
|
155
|
+
ref_key: "fileInputRef",
|
|
156
|
+
ref: s,
|
|
157
|
+
type: "file",
|
|
158
|
+
class: "rds-e-drag-and-drop__input",
|
|
159
|
+
accept: r.accept,
|
|
160
|
+
multiple: r.multiple,
|
|
161
|
+
disabled: r.disabled,
|
|
162
|
+
onChange: T
|
|
163
|
+
}, null, 40, z),
|
|
164
|
+
o("label", {
|
|
165
|
+
for: g.value,
|
|
166
|
+
class: "rds-e-drag-and-drop__label"
|
|
167
|
+
}, [
|
|
168
|
+
L(t.$slots, "content", {}, () => [
|
|
169
|
+
o("span", P, [
|
|
170
|
+
M(V, {
|
|
171
|
+
name: r.icon,
|
|
172
|
+
class: "rds-e-drag-and-drop__icon",
|
|
173
|
+
"aria-hidden": "true"
|
|
174
|
+
}, null, 8, ["name"])
|
|
175
|
+
]),
|
|
176
|
+
o("div", U, [
|
|
177
|
+
o("span", j, D(r.label), 1),
|
|
178
|
+
C.value ? (x(), b("span", G, D(m.value), 1)) : R("", !0)
|
|
179
|
+
])
|
|
180
|
+
], !0)
|
|
181
|
+
], 8, O)
|
|
182
|
+
], 34));
|
|
183
|
+
}
|
|
184
|
+
}), Z = /* @__PURE__ */ q(H, [["__scopeId", "data-v-a915c196"]]);
|
|
185
|
+
export {
|
|
186
|
+
Z as default
|
|
187
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as ne, mergeModels as K, toRefs as de, useModel as ie, ref as S, computed as p, provide as T, onMounted as ue, nextTick as F, onBeforeUnmount as ce, createElementBlock as y, openBlock as m, createVNode as V, mergeProps as H, unref as n, withModifiers as a, createSlots as P, withCtx as d, createElementVNode as u, createCommentVNode as D, createBlock as W, renderSlot as f, Fragment as pe, toDisplayString as M, normalizeClass as me } from "vue";
|
|
2
|
+
import fe from "./multiselect.es.js";
|
|
3
|
+
import ve from "./checkbox.es.js";
|
|
4
|
+
import { _ as be } from "./radio-group.vue_vue_type_script_setup_true_lang-DpguLlRK.js";
|
|
5
|
+
import ye from "./radioButton.es.js";
|
|
3
6
|
import z from "./textField.es.js";
|
|
4
|
-
import { R as
|
|
5
|
-
import be from "./checkbox.es.js";
|
|
6
|
-
import { _ as ye } from "./radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js";
|
|
7
|
-
import ge from "./radioButton.es.js";
|
|
7
|
+
import { R as ge } from "./icon-svg-_WCkLP8-.js";
|
|
8
8
|
import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { class: "rds-e-dropdown__option" }, $e = { class: "rds-e-dropdown__option-container" }, Ce = { class: "rds-e-dropdown__option--prepend" }, Se = { class: "rds-e-dropdown__option--content" }, Ve = {
|
|
10
10
|
key: 0,
|
|
@@ -15,7 +15,7 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
15
15
|
}, Oe = { class: "rds-e-dropdown__before-list-container" }, Ae = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "rds-e-dropdown__before-list"
|
|
18
|
-
}, Fe = { class: "rds-e-dropdown__before-list-container" }, Re = { class: "rds-e-dropdown__after-list" }, Ee = { class: "rds-e-dropdown__after-list-container" }, Le = /* @__PURE__ */
|
|
18
|
+
}, Fe = { class: "rds-e-dropdown__before-list-container" }, Re = { class: "rds-e-dropdown__after-list" }, Ee = { class: "rds-e-dropdown__after-list-container" }, Le = /* @__PURE__ */ ne({
|
|
19
19
|
__name: "dropdown",
|
|
20
20
|
props: /* @__PURE__ */ K({
|
|
21
21
|
/**
|
|
@@ -151,32 +151,32 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
151
151
|
}),
|
|
152
152
|
emits: /* @__PURE__ */ K(["open", "close", "select", "change"], ["update:modelValue"]),
|
|
153
153
|
setup(o, { expose: R, emit: G }) {
|
|
154
|
-
const
|
|
154
|
+
const r = o, h = G, {
|
|
155
155
|
disabled: k,
|
|
156
156
|
limit: E,
|
|
157
157
|
multiple: $,
|
|
158
158
|
options: g
|
|
159
|
-
} = de(
|
|
159
|
+
} = de(r), s = ie(o, "modelValue"), i = S([]), v = S(), b = S(), L = S(""), x = S(!1), J = () => {
|
|
160
160
|
x.value = !0;
|
|
161
|
-
}, C = p(() =>
|
|
162
|
-
id:
|
|
163
|
-
label:
|
|
164
|
-
icon:
|
|
165
|
-
rightIcon:
|
|
166
|
-
disabled:
|
|
167
|
-
clearable:
|
|
168
|
-
error:
|
|
169
|
-
helper:
|
|
170
|
-
helperText:
|
|
171
|
-
readonly:
|
|
161
|
+
}, C = p(() => r.autocomplete && Object.keys(r.autocomplete).length > 0), Q = p(() => ({
|
|
162
|
+
id: r.autocomplete.id || `autocomplete-${r.id}`,
|
|
163
|
+
label: r.autocomplete.label || r.label,
|
|
164
|
+
icon: r.autocomplete.icon || "",
|
|
165
|
+
rightIcon: r.autocomplete.rightIcon || "",
|
|
166
|
+
disabled: r.autocomplete.disabled || !1,
|
|
167
|
+
clearable: r.autocomplete.clearable || !1,
|
|
168
|
+
error: r.autocomplete.error ?? !1,
|
|
169
|
+
helper: r.autocomplete.helper ?? "",
|
|
170
|
+
helperText: r.autocomplete.helperText ?? "",
|
|
171
|
+
readonly: r.autocomplete.readonly ?? !1
|
|
172
172
|
}));
|
|
173
173
|
T("registerDropdownFocusElement", (e) => {
|
|
174
|
-
e && !
|
|
174
|
+
e && !i.value.includes(e) && i.value.push(e);
|
|
175
175
|
}), T("unregisterDropdownFocusElement", (e) => {
|
|
176
|
-
const l =
|
|
177
|
-
l > -1 &&
|
|
176
|
+
const l = i.value.findIndex((t) => t === e);
|
|
177
|
+
l > -1 && i.value.splice(l, 1);
|
|
178
178
|
}), T("isFocusWithinDropdown", (e) => {
|
|
179
|
-
const l =
|
|
179
|
+
const l = i.value.some((c) => c === e || c.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"));
|
|
180
180
|
return l || t;
|
|
181
181
|
});
|
|
182
182
|
const I = p({
|
|
@@ -185,20 +185,20 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
185
185
|
const l = g.value.find((t) => typeof t == "object" ? t.id === e : t === e);
|
|
186
186
|
s.value = l || null;
|
|
187
187
|
}
|
|
188
|
-
}), X = p(() => (g.value ?? []).every((e) => typeof e == "object" && (e == null ? void 0 : e.id) && (e == null ? void 0 : e.label))), Y = p(() => !$.value ||
|
|
189
|
-
get: () => s.value ?
|
|
188
|
+
}), X = p(() => (g.value ?? []).every((e) => typeof e == "object" && (e == null ? void 0 : e.id) && (e == null ? void 0 : e.label))), Y = p(() => !$.value || r.closeOnSelect), q = p({
|
|
189
|
+
get: () => s.value ? r.multiple ? Array.isArray(s.value) ? s.value.length > E.value ? r.limitText(E.value) : s.value.map((e) => typeof e == "string" ? e : e.label).join(", ") : "" : typeof s.value == "object" ? s.value.label : typeof s.value == "string" ? s.value : "" : "",
|
|
190
190
|
set: () => null
|
|
191
191
|
}), Z = p(() => ({
|
|
192
192
|
"rds-e-dropdown-input": !0,
|
|
193
193
|
"rds-e-dropdown--disabled": k.value,
|
|
194
|
-
"rds-e-dropdown--small":
|
|
194
|
+
"rds-e-dropdown--small": r.small
|
|
195
195
|
})), j = p(() => {
|
|
196
196
|
const e = {};
|
|
197
197
|
return X.value && Object.assign(e, {
|
|
198
198
|
"track-by": "id",
|
|
199
199
|
label: "label"
|
|
200
200
|
}), e;
|
|
201
|
-
}), ee = p(() => C.value &&
|
|
201
|
+
}), ee = p(() => C.value && r.autocomplete.autocompleteFilter ? g.value.filter((e) => r.autocomplete.autocompleteFilter(e, L.value)) : g.value), B = (e) => {
|
|
202
202
|
if (s.value === e) return !0;
|
|
203
203
|
if (Array.isArray(s.value)) {
|
|
204
204
|
if (typeof e == "string") return s.value.includes(e);
|
|
@@ -234,9 +234,9 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
234
234
|
v.value.activate();
|
|
235
235
|
}, U = () => {
|
|
236
236
|
v.value.deactivate();
|
|
237
|
-
}, ne = () => {
|
|
238
|
-
v.value.toggle();
|
|
239
237
|
}, re = () => {
|
|
238
|
+
v.value.toggle();
|
|
239
|
+
}, ae = () => {
|
|
240
240
|
C.value && b.value && (J(), O(), F(() => {
|
|
241
241
|
b.value.focus();
|
|
242
242
|
}));
|
|
@@ -245,18 +245,18 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
245
245
|
const l = e.target, t = !v.value.$el.contains(l), c = b.value && !b.value.$el.contains(l) && !l.closest(".rds-e-dropdown__before-list");
|
|
246
246
|
t && c && (x.value = !1, U());
|
|
247
247
|
};
|
|
248
|
-
return
|
|
248
|
+
return ue(() => {
|
|
249
249
|
var e;
|
|
250
|
-
(e = v.value) != null && e.$el &&
|
|
250
|
+
(e = v.value) != null && e.$el && i.value.push(v.value.$el), F(() => {
|
|
251
251
|
var l;
|
|
252
252
|
if (C.value && ((l = b.value) != null && l.$el)) {
|
|
253
|
-
|
|
253
|
+
i.value.push(b.value.$el);
|
|
254
254
|
const t = b.value.$el.closest(".rds-e-dropdown__before-list");
|
|
255
|
-
t && !
|
|
255
|
+
t && !i.value.includes(t) && i.value.push(t);
|
|
256
256
|
}
|
|
257
257
|
}), document.addEventListener("click", _);
|
|
258
258
|
}), ce(() => {
|
|
259
|
-
|
|
259
|
+
i.value = [], document.removeEventListener("click", _);
|
|
260
260
|
}), R({
|
|
261
261
|
/**
|
|
262
262
|
* Abre el dropdown
|
|
@@ -266,8 +266,8 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
266
266
|
* Cierra el dropdown
|
|
267
267
|
*/
|
|
268
268
|
deactivate: U
|
|
269
|
-
}), (e, l) => (
|
|
270
|
-
V(
|
|
269
|
+
}), (e, l) => (m(), y("div", he, [
|
|
270
|
+
V(fe, H({
|
|
271
271
|
ref_key: "multiselect",
|
|
272
272
|
ref: v,
|
|
273
273
|
modelValue: s.value,
|
|
@@ -276,13 +276,13 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
276
276
|
options: ee.value,
|
|
277
277
|
"close-on-select": Y.value,
|
|
278
278
|
"show-labels": !1,
|
|
279
|
-
disabled:
|
|
280
|
-
multiple:
|
|
279
|
+
disabled: n(k),
|
|
280
|
+
multiple: n($),
|
|
281
281
|
"max-height": o.maxHeight,
|
|
282
282
|
searchable: !1,
|
|
283
283
|
small: o.small,
|
|
284
284
|
"open-direction": "bottom",
|
|
285
|
-
limit:
|
|
285
|
+
limit: n(E),
|
|
286
286
|
"limit-text": o.limitText
|
|
287
287
|
}, j.value, {
|
|
288
288
|
"append-to-body": o.appendToBody,
|
|
@@ -290,33 +290,33 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
290
290
|
onClose: te,
|
|
291
291
|
onSelect: oe,
|
|
292
292
|
"onUpdate:modelValue": se,
|
|
293
|
-
onFocus: l[14] || (l[14] =
|
|
294
|
-
onBlur:
|
|
293
|
+
onFocus: l[14] || (l[14] = a(() => O(), ["prevent"])),
|
|
294
|
+
onBlur: a(() => null, ["prevent"])
|
|
295
295
|
}), P({
|
|
296
296
|
selection: d(({ isOpen: t }) => [
|
|
297
|
-
V(
|
|
297
|
+
V(n(z), {
|
|
298
298
|
id: `multiselect-dropdown-${o.id}`,
|
|
299
299
|
modelValue: q.value,
|
|
300
300
|
"onUpdate:modelValue": l[1] || (l[1] = (c) => q.value = c),
|
|
301
301
|
class: "rds-e-dropdown__input",
|
|
302
|
-
disabled:
|
|
302
|
+
disabled: n(k),
|
|
303
303
|
label: o.label,
|
|
304
304
|
error: o.error,
|
|
305
305
|
helper: o.helper,
|
|
306
306
|
"helper-text": o.helperText,
|
|
307
307
|
readonly: "",
|
|
308
|
-
onClick:
|
|
308
|
+
onClick: a((c) => t ? null : O(), ["prevent", "stop"])
|
|
309
309
|
}, P({
|
|
310
310
|
"right-icon": d(() => [
|
|
311
|
-
V(
|
|
311
|
+
V(n(ge), {
|
|
312
312
|
name: "arrow_down",
|
|
313
313
|
"aria-hidden": "true",
|
|
314
|
-
class:
|
|
314
|
+
class: me(["rds-e-dropdown__input-caret", {
|
|
315
315
|
"rds-e-dropdown__input-caret--open": t
|
|
316
316
|
}]),
|
|
317
|
-
onClick: l[0] || (l[0] =
|
|
317
|
+
onClick: l[0] || (l[0] = a(() => {
|
|
318
318
|
}, ["self", "stop"])),
|
|
319
|
-
onMousedown:
|
|
319
|
+
onMousedown: a(re, ["self", "prevent", "stop"])
|
|
320
320
|
}, null, 8, ["class"])
|
|
321
321
|
]),
|
|
322
322
|
_: 2
|
|
@@ -324,59 +324,59 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
324
324
|
e.$slots["helper-text"] ? {
|
|
325
325
|
name: "helper-text",
|
|
326
326
|
fn: d(() => [
|
|
327
|
-
|
|
327
|
+
f(e.$slots, "helper-text", {}, void 0, !0)
|
|
328
328
|
]),
|
|
329
329
|
key: "0"
|
|
330
330
|
} : void 0
|
|
331
331
|
]), 1032, ["id", "modelValue", "disabled", "label", "error", "helper", "helper-text", "onClick"])
|
|
332
332
|
]),
|
|
333
333
|
placeholder: d(() => [
|
|
334
|
-
l[15] || (l[15] =
|
|
334
|
+
l[15] || (l[15] = u("span", null, null, -1))
|
|
335
335
|
]),
|
|
336
336
|
option: d(({ option: t, search: c, index: A }) => [
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
337
|
+
u("div", ke, [
|
|
338
|
+
u("div", $e, [
|
|
339
|
+
u("div", Ce, [
|
|
340
|
+
n($) ? (m(), W(n(ve), {
|
|
341
341
|
key: 0,
|
|
342
342
|
id: `${A}-${t.id}`,
|
|
343
343
|
small: o.small,
|
|
344
344
|
"is-checked": B(t),
|
|
345
|
-
disabled:
|
|
346
|
-
onClick:
|
|
347
|
-
}, null, 8, ["id", "small", "is-checked", "disabled", "onClick"])) : !
|
|
345
|
+
disabled: n(k) || (t == null ? void 0 : t.$isDisabled) || !1,
|
|
346
|
+
onClick: a((w) => N(t), ["prevent", "stop"])
|
|
347
|
+
}, null, 8, ["id", "small", "is-checked", "disabled", "onClick"])) : !n($) && o.showRadio ? (m(), W(n(be), {
|
|
348
348
|
key: 1,
|
|
349
349
|
modelValue: I.value,
|
|
350
350
|
"onUpdate:modelValue": l[2] || (l[2] = (w) => I.value = w),
|
|
351
351
|
"group-name": `group-${o.id}`
|
|
352
352
|
}, {
|
|
353
353
|
default: d(() => [
|
|
354
|
-
V(
|
|
354
|
+
V(n(ye), {
|
|
355
355
|
id: `${A}-${typeof t == "object" ? t.id : A}`,
|
|
356
356
|
small: o.small,
|
|
357
357
|
option: typeof t == "object" ? t.id : t,
|
|
358
358
|
checked: B(t),
|
|
359
|
-
disabled:
|
|
360
|
-
onClick:
|
|
359
|
+
disabled: n(k) || (t == null ? void 0 : t.$isDisabled) || !1,
|
|
360
|
+
onClick: a((w) => N(t), ["prevent", "stop"])
|
|
361
361
|
}, null, 8, ["id", "small", "option", "checked", "disabled", "onClick"])
|
|
362
362
|
]),
|
|
363
363
|
_: 2
|
|
364
364
|
}, 1032, ["modelValue", "group-name"])) : D("", !0)
|
|
365
365
|
]),
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
u("div", Se, [
|
|
367
|
+
f(e.$slots, "singleLabel", { option: t }, () => {
|
|
368
368
|
var w;
|
|
369
369
|
return [
|
|
370
|
-
(w = j.value) != null && w.label ? (
|
|
371
|
-
|
|
372
|
-
t != null && t.detail ? (
|
|
373
|
-
], 64)) : (
|
|
370
|
+
(w = j.value) != null && w.label ? (m(), y(pe, { key: 0 }, [
|
|
371
|
+
u("span", null, M(t.label), 1),
|
|
372
|
+
t != null && t.detail ? (m(), y("span", Ve, M(t.detail), 1)) : D("", !0)
|
|
373
|
+
], 64)) : (m(), y("span", De, M(t), 1))
|
|
374
374
|
];
|
|
375
375
|
}, !0)
|
|
376
376
|
])
|
|
377
377
|
]),
|
|
378
|
-
e.$slots.optionAppend ? (
|
|
379
|
-
|
|
378
|
+
e.$slots.optionAppend ? (m(), y("div", Be, [
|
|
379
|
+
f(e.$slots, "optionAppend", {
|
|
380
380
|
option: t,
|
|
381
381
|
search: c,
|
|
382
382
|
index: A
|
|
@@ -389,70 +389,70 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
389
389
|
e.$slots.limit ? {
|
|
390
390
|
name: "limit",
|
|
391
391
|
fn: d(() => [
|
|
392
|
-
|
|
392
|
+
f(e.$slots, "limit", {}, void 0, !0)
|
|
393
393
|
]),
|
|
394
394
|
key: "0"
|
|
395
395
|
} : void 0,
|
|
396
396
|
e.$slots.maxElements ? {
|
|
397
397
|
name: "maxElements",
|
|
398
398
|
fn: d(() => [
|
|
399
|
-
|
|
399
|
+
f(e.$slots, "maxElements", {}, void 0, !0)
|
|
400
400
|
]),
|
|
401
401
|
key: "1"
|
|
402
402
|
} : void 0,
|
|
403
403
|
e.$slots.noResult ? {
|
|
404
404
|
name: "noResult",
|
|
405
405
|
fn: d(({ search: t }) => [
|
|
406
|
-
|
|
406
|
+
f(e.$slots, "noResult", { search: t }, void 0, !0)
|
|
407
407
|
]),
|
|
408
408
|
key: "2"
|
|
409
409
|
} : void 0,
|
|
410
410
|
e.$slots.noOptions ? {
|
|
411
411
|
name: "noOptions",
|
|
412
412
|
fn: d(() => [
|
|
413
|
-
|
|
413
|
+
f(e.$slots, "noOptions", {}, void 0, !0)
|
|
414
414
|
]),
|
|
415
415
|
key: "3"
|
|
416
416
|
} : void 0,
|
|
417
417
|
C.value || e.$slots.beforeList ? {
|
|
418
418
|
name: "beforeList",
|
|
419
419
|
fn: d(() => [
|
|
420
|
-
C.value ? (
|
|
420
|
+
C.value ? (m(), y("div", {
|
|
421
421
|
key: 0,
|
|
422
422
|
class: "rds-e-dropdown__before-list",
|
|
423
|
-
onMousedown: l[6] || (l[6] =
|
|
423
|
+
onMousedown: l[6] || (l[6] = a(() => {
|
|
424
424
|
}, ["stop"])),
|
|
425
|
-
onClick:
|
|
426
|
-
onBlur: l[7] || (l[7] =
|
|
425
|
+
onClick: a(ae, ["stop"]),
|
|
426
|
+
onBlur: l[7] || (l[7] = a(() => {
|
|
427
427
|
}, ["stop"])),
|
|
428
|
-
onFocus: l[8] || (l[8] =
|
|
428
|
+
onFocus: l[8] || (l[8] = a(() => {
|
|
429
429
|
}, ["stop"])),
|
|
430
|
-
onKeydown: l[9] || (l[9] =
|
|
430
|
+
onKeydown: l[9] || (l[9] = a(() => {
|
|
431
431
|
}, ["stop"])),
|
|
432
|
-
onKeyup: l[10] || (l[10] =
|
|
432
|
+
onKeyup: l[10] || (l[10] = a(() => {
|
|
433
433
|
}, ["stop"])),
|
|
434
|
-
onKeypress: l[11] || (l[11] =
|
|
434
|
+
onKeypress: l[11] || (l[11] = a(() => {
|
|
435
435
|
}, ["stop"])),
|
|
436
|
-
onChange: l[12] || (l[12] =
|
|
436
|
+
onChange: l[12] || (l[12] = a(() => {
|
|
437
437
|
}, ["stop"]))
|
|
438
438
|
}, [
|
|
439
|
-
|
|
440
|
-
V(
|
|
439
|
+
u("div", Oe, [
|
|
440
|
+
V(n(z), H({
|
|
441
441
|
ref_key: "textFieldInput",
|
|
442
442
|
ref: b,
|
|
443
443
|
modelValue: L.value,
|
|
444
444
|
"onUpdate:modelValue": l[3] || (l[3] = (t) => L.value = t)
|
|
445
445
|
}, Q.value, {
|
|
446
|
-
onMousedown: l[4] || (l[4] =
|
|
446
|
+
onMousedown: l[4] || (l[4] = a(() => {
|
|
447
447
|
}, ["stop", "prevent"])),
|
|
448
|
-
onFocus: l[5] || (l[5] =
|
|
448
|
+
onFocus: l[5] || (l[5] = a(() => {
|
|
449
449
|
}, ["stop"]))
|
|
450
450
|
}), null, 16, ["modelValue"])
|
|
451
451
|
])
|
|
452
452
|
], 32)) : D("", !0),
|
|
453
|
-
e.$slots.beforeList ? (
|
|
454
|
-
|
|
455
|
-
|
|
453
|
+
e.$slots.beforeList ? (m(), y("div", Ae, [
|
|
454
|
+
u("div", Fe, [
|
|
455
|
+
f(e.$slots, "beforeList", {}, void 0, !0)
|
|
456
456
|
])
|
|
457
457
|
])) : D("", !0)
|
|
458
458
|
]),
|
|
@@ -461,9 +461,9 @@ import './style/dropdown.css';const he = { class: "rds-e-dropdown" }, ke = { cla
|
|
|
461
461
|
e.$slots.afterList ? {
|
|
462
462
|
name: "afterList",
|
|
463
463
|
fn: d(() => [
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
464
|
+
u("div", Re, [
|
|
465
|
+
u("div", Ee, [
|
|
466
|
+
f(e.$slots, "afterList", {}, void 0, !0)
|
|
467
467
|
])
|
|
468
468
|
])
|
|
469
469
|
]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as m, ref as g, computed as y,
|
|
2
|
-
import { R as o } from "./icon-svg-
|
|
1
|
+
import { defineComponent as m, ref as g, computed as y, createElementBlock as c, openBlock as l, normalizeClass as b, createElementVNode as s, createBlock as a, createCommentVNode as r, toDisplayString as n } from "vue";
|
|
2
|
+
import { R as o } from "./icon-svg-_WCkLP8-.js";
|
|
3
3
|
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/filterChip.css';const k = ["disabled"], C = { class: "rds-e-filter-chip__icon-container" }, I = {
|
|
5
5
|
key: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as i, toRefs as p, computed as u,
|
|
1
|
+
import { defineComponent as i, toRefs as p, computed as u, createBlock as f, openBlock as c, mergeProps as d } from "vue";
|
|
2
2
|
import m from "./button.es.js";
|
|
3
3
|
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/floatingActionButton.css';const v = /* @__PURE__ */ i({
|
|
@@ -81,7 +81,7 @@ import './style/floatingActionButton.css';const v = /* @__PURE__ */ i({
|
|
|
81
81
|
const e = "rds-e-btn--fab", o = [];
|
|
82
82
|
return n.value && o.push("rds-e-btn--extra-small"), o.push(`${e}-${l.value}`), o.push(`${e}-${r.value}`), o.join(" ");
|
|
83
83
|
});
|
|
84
|
-
return (e, o) => (
|
|
84
|
+
return (e, o) => (c(), f(m, d({
|
|
85
85
|
class: ["rds-e-btn--fab", [
|
|
86
86
|
s.value
|
|
87
87
|
]]
|