energy-components 2.1.0 → 2.2.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/datepicker.es.js +322 -308
- package/dist/components/dropdown.es.js +173 -159
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/textField.es.js +204 -145
- package/dist/components/tooltip.es.js +129 -113
- package/dist/energy-components.css +1 -1
- package/dist/energy-components.es.js +4313 -4210
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +25 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +25 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +64 -3
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +2 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/llms/rdsdate-picker.md +1 -0
- package/llms/rdsdropdown.md +1 -0
- package/llms/rdstext-field.md +5 -0
- package/llms/rdstooltip.md +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as ge, useSlots as we, toRefs as he, useModel as ke, ref as
|
|
1
|
+
import { defineComponent as ge, useSlots as we, toRefs as he, useModel as ke, ref as L, computed as u, provide as U, onMounted as xe, nextTick as V, onBeforeUnmount as $e, openBlock as c, createElementBlock as b, normalizeClass as T, unref as a, createVNode as S, mergeProps as X, withModifiers as r, createSlots as Y, withCtx as d, createElementVNode as m, createBlock as Z, createCommentVNode as A, renderSlot as v, Fragment as Se, toDisplayString as R, mergeModels as ee } from "vue";
|
|
2
2
|
import De from "./multiselect.es.js";
|
|
3
3
|
import Ce from "./checkbox.es.js";
|
|
4
4
|
import { _ as Oe } from "./radio-group.vue_vue_type_script_setup_true_lang-CwgSZYeD.js";
|
|
5
5
|
import Be from "./radioButton.es.js";
|
|
6
|
-
import { R as
|
|
7
|
-
import
|
|
6
|
+
import { R as te } from "./icon-svg-CW3eQRcp.js";
|
|
7
|
+
import oe from "./textField.es.js";
|
|
8
8
|
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"], Ae = ["aria-expanded", "aria-controls"], Ee = { class: "rds-e-dropdown__option" },
|
|
9
|
+
import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"], Ae = ["aria-expanded", "aria-controls"], Ee = { class: "rds-e-dropdown__option" }, Te = { class: "rds-e-dropdown__option-container" }, Re = ["onClick"], _e = { class: "rds-e-dropdown__option--content" }, Fe = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "rds-e-dropdown__option-detail"
|
|
12
|
-
},
|
|
12
|
+
}, je = { key: 1 }, Ne = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "rds-e-dropdown__option--append"
|
|
15
15
|
}, Me = { class: "rds-e-dropdown__before-list-container" }, Ie = {
|
|
@@ -17,7 +17,7 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
17
17
|
class: "rds-e-dropdown__before-list"
|
|
18
18
|
}, qe = { class: "rds-e-dropdown__before-list-container" }, Ke = { class: "rds-e-dropdown__after-list" }, Ue = { class: "rds-e-dropdown__after-list-container" }, Pe = "beforeList", He = "afterList", We = "singleLabel", ze = "noOptions", Ge = "noResult", Je = "limit", Qe = "maxElements", Xe = /* @__PURE__ */ ge({
|
|
19
19
|
__name: "dropdown",
|
|
20
|
-
props: /* @__PURE__ */
|
|
20
|
+
props: /* @__PURE__ */ ee({
|
|
21
21
|
/**
|
|
22
22
|
* Id del dropdown
|
|
23
23
|
*/
|
|
@@ -26,6 +26,18 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
26
26
|
required: !0,
|
|
27
27
|
validator: (l) => !l || String(l).trim() === "" ? (console.error("[RDSDropdown]: `id` prop is required."), !1) : !0
|
|
28
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* Versión compacta del dropdown con altura reducida (42px en lugar de 52px).
|
|
31
|
+
* En este modo se ocultan visualmente el label y el helper text para ahorrar espacio.
|
|
32
|
+
*
|
|
33
|
+
* ⚠️ **Uso recomendado**: Solo para celdas de tablas editables.
|
|
34
|
+
* No se recomienda fuera de este contexto por cuestiones de accesibilidad,
|
|
35
|
+
* ya que la ausencia del label visible puede dificultar la comprensión del campo.
|
|
36
|
+
*/
|
|
37
|
+
compact: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
},
|
|
29
41
|
label: {
|
|
30
42
|
type: String,
|
|
31
43
|
required: !0,
|
|
@@ -189,19 +201,19 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
189
201
|
},
|
|
190
202
|
modelModifiers: {}
|
|
191
203
|
}),
|
|
192
|
-
emits: /* @__PURE__ */
|
|
193
|
-
setup(l, { expose: _, emit:
|
|
194
|
-
const n = l,
|
|
195
|
-
disabled:
|
|
204
|
+
emits: /* @__PURE__ */ ee(["open", "close", "select", "change"], ["update:modelValue"]),
|
|
205
|
+
setup(l, { expose: _, emit: le }) {
|
|
206
|
+
const n = l, D = le, P = we(), p = (e) => !!(P && P[e]), {
|
|
207
|
+
disabled: w,
|
|
196
208
|
limit: F,
|
|
197
|
-
multiple:
|
|
209
|
+
multiple: C,
|
|
198
210
|
options: k,
|
|
199
|
-
textOnly:
|
|
200
|
-
} = he(n), s = ke(l, "modelValue"), f =
|
|
201
|
-
let
|
|
202
|
-
const
|
|
211
|
+
textOnly: j
|
|
212
|
+
} = he(n), s = ke(l, "modelValue"), f = L([]), i = L(), g = L(), N = L(""), M = L(!1);
|
|
213
|
+
let O = !1;
|
|
214
|
+
const ne = () => {
|
|
203
215
|
M.value = !0;
|
|
204
|
-
},
|
|
216
|
+
}, h = u(() => i.value?.isOpen ?? !1), B = u(() => n.autocomplete && Object.keys(n.autocomplete).length > 0), se = u(() => ({
|
|
205
217
|
id: n.autocomplete.id || `autocomplete-${n.id}`,
|
|
206
218
|
label: n.autocomplete.label || n.label,
|
|
207
219
|
icon: n.autocomplete.icon || "",
|
|
@@ -213,35 +225,35 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
213
225
|
helperText: n.autocomplete.helperText ?? "",
|
|
214
226
|
readonly: n.autocomplete.readonly ?? !1
|
|
215
227
|
}));
|
|
216
|
-
|
|
228
|
+
U("registerDropdownFocusElement", (e) => {
|
|
217
229
|
e && !f.value.includes(e) && f.value.push(e);
|
|
218
|
-
}),
|
|
230
|
+
}), U("unregisterDropdownFocusElement", (e) => {
|
|
219
231
|
const t = f.value.findIndex((o) => o === e);
|
|
220
232
|
t > -1 && f.value.splice(t, 1);
|
|
221
|
-
}),
|
|
222
|
-
const t = f.value.some((
|
|
233
|
+
}), U("isFocusWithinDropdown", (e) => {
|
|
234
|
+
const t = f.value.some((y) => y === e || y.contains(e)), o = e.classList && (e.classList.contains("rds-e-dropdown__before-list") || e.closest(".rds-e-dropdown__before-list") || e.classList.contains("multiselect") || e.closest(".multiselect"));
|
|
223
235
|
return t || o;
|
|
224
236
|
});
|
|
225
|
-
const
|
|
237
|
+
const H = u({
|
|
226
238
|
get: () => s.value && typeof s.value == "object" && !Array.isArray(s.value) ? s.value.id : typeof s.value == "string" || typeof s.value == "number" ? s.value : null,
|
|
227
239
|
set: (e) => {
|
|
228
240
|
const t = k.value.find((o) => typeof o == "object" ? o.id === e : o === e);
|
|
229
241
|
s.value = t || null;
|
|
230
242
|
}
|
|
231
|
-
}),
|
|
243
|
+
}), ae = u(() => (k.value ?? []).every((e) => typeof e == "object" && e?.id && e?.label)), W = u(() => !C.value || n.closeOnSelect), I = u({
|
|
232
244
|
get: () => s.value ? n.multiple ? Array.isArray(s.value) ? s.value.length > F.value ? n.limitText(F.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 : "" : "",
|
|
233
245
|
set: () => null
|
|
234
|
-
}),
|
|
246
|
+
}), re = u(() => ({
|
|
235
247
|
"rds-e-dropdown-input": !0,
|
|
236
|
-
"rds-e-dropdown--disabled":
|
|
248
|
+
"rds-e-dropdown--disabled": w.value,
|
|
237
249
|
"rds-e-dropdown--small": n.small
|
|
238
|
-
})),
|
|
250
|
+
})), ie = u(() => n.openDirection !== "auto" ? n.openDirection : "auto"), q = u(() => {
|
|
239
251
|
const e = {};
|
|
240
|
-
return
|
|
252
|
+
return ae.value && Object.assign(e, {
|
|
241
253
|
"track-by": "id",
|
|
242
254
|
label: "label"
|
|
243
255
|
}), e;
|
|
244
|
-
}),
|
|
256
|
+
}), de = u(() => B.value && n.autocomplete.autocompleteFilter ? k.value.filter((e) => n.autocomplete.autocompleteFilter(e, N.value)) : k.value), E = (e) => {
|
|
245
257
|
if (s.value === e) return !0;
|
|
246
258
|
if (Array.isArray(s.value)) {
|
|
247
259
|
if (typeof e == "string") return s.value.includes(e);
|
|
@@ -249,48 +261,48 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
249
261
|
return s.value.some((t) => t.id === e.id);
|
|
250
262
|
}
|
|
251
263
|
return !1;
|
|
264
|
+
}, ue = (e) => {
|
|
265
|
+
D("open", e, n.id);
|
|
252
266
|
}, ce = (e) => {
|
|
253
|
-
|
|
267
|
+
D("close", e, n.id);
|
|
254
268
|
}, pe = (e) => {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
L(() => {
|
|
258
|
-
S("select", e);
|
|
269
|
+
V(() => {
|
|
270
|
+
D("select", e);
|
|
259
271
|
});
|
|
260
|
-
},
|
|
261
|
-
|
|
262
|
-
if (
|
|
272
|
+
}, fe = () => {
|
|
273
|
+
V(() => {
|
|
274
|
+
if (C.value) {
|
|
263
275
|
const e = k.value.filter(
|
|
264
|
-
(t) =>
|
|
276
|
+
(t) => E(t)
|
|
265
277
|
) || [];
|
|
266
|
-
|
|
278
|
+
D("change", e);
|
|
267
279
|
} else {
|
|
268
280
|
const e = k.value.find(
|
|
269
|
-
(t) =>
|
|
281
|
+
(t) => E(t)
|
|
270
282
|
);
|
|
271
|
-
|
|
283
|
+
D("change", [e]);
|
|
272
284
|
}
|
|
273
285
|
});
|
|
274
|
-
},
|
|
275
|
-
i.value.select(e),
|
|
286
|
+
}, me = (e) => {
|
|
287
|
+
w.value || typeof e == "object" && e?.$isDisabled || (i.value.select(e), O = !0);
|
|
276
288
|
}, K = () => {
|
|
277
289
|
i.value.activate();
|
|
278
290
|
}, x = () => {
|
|
279
291
|
i.value.deactivate();
|
|
280
|
-
},
|
|
281
|
-
i.value.toggle(),
|
|
292
|
+
}, ve = () => {
|
|
293
|
+
i.value.toggle(), O = !0;
|
|
282
294
|
}, ye = () => {
|
|
283
|
-
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
},
|
|
287
|
-
if (!
|
|
288
|
-
if (!
|
|
295
|
+
h.value ? x() : K();
|
|
296
|
+
}, z = () => {
|
|
297
|
+
O = !0;
|
|
298
|
+
}, G = (e) => {
|
|
299
|
+
if (!w.value && e.key !== "Tab") {
|
|
300
|
+
if (!h.value && (e.key === "Enter" || e.key === " ")) {
|
|
289
301
|
e.preventDefault(), i.value?.toggle();
|
|
290
302
|
return;
|
|
291
303
|
}
|
|
292
|
-
if (!
|
|
293
|
-
e.preventDefault(), i.value?.toggle(),
|
|
304
|
+
if (!h.value && e.key === "ArrowDown") {
|
|
305
|
+
e.preventDefault(), i.value?.toggle(), V(() => {
|
|
294
306
|
try {
|
|
295
307
|
i.value?.pointerForward?.();
|
|
296
308
|
} catch {
|
|
@@ -298,44 +310,44 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
298
310
|
});
|
|
299
311
|
return;
|
|
300
312
|
}
|
|
301
|
-
if (
|
|
313
|
+
if (h.value && e.key === "Escape") {
|
|
302
314
|
e.preventDefault(), x();
|
|
303
315
|
return;
|
|
304
316
|
}
|
|
305
|
-
if (
|
|
317
|
+
if (h.value && (e.key === "Enter" || e.key === " ")) {
|
|
306
318
|
e.preventDefault();
|
|
307
319
|
try {
|
|
308
320
|
i.value?.addPointerElement?.({ key: e.key });
|
|
309
321
|
} catch {
|
|
310
322
|
}
|
|
311
|
-
|
|
323
|
+
W.value && x();
|
|
312
324
|
}
|
|
313
325
|
}
|
|
314
326
|
}, be = () => {
|
|
315
|
-
|
|
316
|
-
|
|
327
|
+
B.value && g.value && (ne(), K(), V(() => {
|
|
328
|
+
g.value.focus();
|
|
317
329
|
}));
|
|
318
|
-
},
|
|
319
|
-
if (
|
|
320
|
-
|
|
330
|
+
}, J = (e) => {
|
|
331
|
+
if (O) {
|
|
332
|
+
O = !1;
|
|
321
333
|
return;
|
|
322
334
|
}
|
|
323
|
-
const t = e.target, o = !i.value?.$el?.contains(t);
|
|
335
|
+
const t = e.target, o = t.closest(".multiselect__content-wrapper--teleported"), y = !i.value?.$el?.contains(t) && !o;
|
|
324
336
|
if (M.value) {
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
} else
|
|
337
|
+
const $ = g.value && !g.value.$el.contains(t) && !t.closest(".rds-e-dropdown__before-list");
|
|
338
|
+
y && $ && (M.value = !1, x());
|
|
339
|
+
} else y && x();
|
|
328
340
|
};
|
|
329
341
|
return xe(() => {
|
|
330
|
-
i.value?.$el && f.value.push(i.value.$el),
|
|
331
|
-
if (
|
|
332
|
-
f.value.push(
|
|
333
|
-
const e =
|
|
342
|
+
i.value?.$el && f.value.push(i.value.$el), V(() => {
|
|
343
|
+
if (B.value && g.value?.$el) {
|
|
344
|
+
f.value.push(g.value.$el);
|
|
345
|
+
const e = g.value.$el.closest(".rds-e-dropdown__before-list");
|
|
334
346
|
e && !f.value.includes(e) && f.value.push(e);
|
|
335
347
|
}
|
|
336
|
-
}), document.addEventListener("pointerdown",
|
|
348
|
+
}), document.addEventListener("pointerdown", J);
|
|
337
349
|
}), $e(() => {
|
|
338
|
-
f.value = [], document.removeEventListener("pointerdown",
|
|
350
|
+
f.value = [], document.removeEventListener("pointerdown", J);
|
|
339
351
|
}), _({
|
|
340
352
|
/**
|
|
341
353
|
* Abre el dropdown
|
|
@@ -345,90 +357,91 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
345
357
|
* Cierra el dropdown
|
|
346
358
|
*/
|
|
347
359
|
deactivate: x
|
|
348
|
-
}), (e, t) => (c(),
|
|
349
|
-
class:
|
|
350
|
-
"rds-e-dropdown--text-only": a(
|
|
360
|
+
}), (e, t) => (c(), b("div", {
|
|
361
|
+
class: T(["rds-e-dropdown", {
|
|
362
|
+
"rds-e-dropdown--text-only": a(j),
|
|
351
363
|
"rds-e-dropdown--inverse": l.inverse
|
|
352
364
|
}])
|
|
353
365
|
}, [
|
|
354
|
-
|
|
366
|
+
S(De, X({
|
|
355
367
|
ref_key: "multiselect",
|
|
356
368
|
ref: i,
|
|
357
369
|
modelValue: s.value,
|
|
358
370
|
"onUpdate:modelValue": t[12] || (t[12] = (o) => s.value = o),
|
|
359
|
-
class:
|
|
360
|
-
options:
|
|
361
|
-
"close-on-select":
|
|
371
|
+
class: re.value,
|
|
372
|
+
options: de.value,
|
|
373
|
+
"close-on-select": W.value,
|
|
362
374
|
"show-labels": !1,
|
|
363
|
-
disabled: a(
|
|
364
|
-
multiple: a(
|
|
375
|
+
disabled: a(w),
|
|
376
|
+
multiple: a(C),
|
|
365
377
|
"max-height": l.maxHeight,
|
|
366
378
|
searchable: !1,
|
|
367
379
|
"open-on-focus": !1,
|
|
368
380
|
small: l.small,
|
|
369
|
-
"open-direction":
|
|
381
|
+
"open-direction": ie.value,
|
|
370
382
|
limit: a(F),
|
|
371
383
|
"limit-text": l.limitText
|
|
372
384
|
}, { ...q.value, ...e.$attrs }, {
|
|
373
385
|
"append-to-body": l.appendToBody,
|
|
374
|
-
"text-only": a(
|
|
375
|
-
onOpen:
|
|
376
|
-
onClose:
|
|
377
|
-
onSelect:
|
|
378
|
-
"onUpdate:modelValue":
|
|
386
|
+
"text-only": a(j),
|
|
387
|
+
onOpen: ue,
|
|
388
|
+
onClose: ce,
|
|
389
|
+
onSelect: pe,
|
|
390
|
+
"onUpdate:modelValue": fe,
|
|
379
391
|
onBlur: r(() => null, ["prevent"])
|
|
380
|
-
}),
|
|
392
|
+
}), Y({
|
|
381
393
|
selection: d(({ isOpen: o }) => [
|
|
382
|
-
a(
|
|
394
|
+
a(j) ? (c(), b("div", {
|
|
383
395
|
key: 0,
|
|
384
396
|
id: `multiselect-dropdown-${l.id}`,
|
|
385
|
-
class:
|
|
397
|
+
class: T([l.customTriggerClass, "rds-e-dropdown__text-only"]),
|
|
386
398
|
role: "combobox",
|
|
387
399
|
"aria-haspopup": "listbox",
|
|
388
|
-
"aria-expanded":
|
|
400
|
+
"aria-expanded": h.value ? "true" : "false",
|
|
389
401
|
"aria-controls": `listbox-${l.id}`,
|
|
390
402
|
tabindex: "0",
|
|
391
403
|
onClick: r(ye, ["prevent", "stop"]),
|
|
392
|
-
onMousedown: r(
|
|
393
|
-
onKeydown:
|
|
404
|
+
onMousedown: r(z, ["prevent", "stop"]),
|
|
405
|
+
onKeydown: G
|
|
394
406
|
}, [
|
|
395
|
-
|
|
396
|
-
|
|
407
|
+
m("span", null, R(I.value || l.label), 1),
|
|
408
|
+
S(a(te), {
|
|
397
409
|
name: "arrow_down",
|
|
398
410
|
"aria-hidden": "true",
|
|
399
|
-
class:
|
|
411
|
+
class: T(["rds-e-dropdown__input-caret", {
|
|
400
412
|
"rds-e-dropdown__input-caret--open": o
|
|
401
413
|
}])
|
|
402
414
|
}, null, 8, ["class"])
|
|
403
|
-
], 42, Ve)) : (c(),
|
|
415
|
+
], 42, Ve)) : (c(), b("div", {
|
|
404
416
|
key: 1,
|
|
405
417
|
class: "rds-e-dropdown__input-wrapper",
|
|
406
418
|
role: "button",
|
|
407
419
|
"aria-haspopup": "listbox",
|
|
408
|
-
"aria-expanded":
|
|
420
|
+
"aria-expanded": h.value ? "true" : "false",
|
|
409
421
|
"aria-controls": `listbox-${l.id}`,
|
|
410
|
-
onClick: r(
|
|
411
|
-
onMousedown: r(
|
|
412
|
-
onKeydown:
|
|
422
|
+
onClick: r(ve, ["prevent"]),
|
|
423
|
+
onMousedown: r(z, ["prevent"]),
|
|
424
|
+
onKeydown: G
|
|
413
425
|
}, [
|
|
414
|
-
|
|
426
|
+
S(a(oe), {
|
|
415
427
|
id: `multiselect-dropdown-${l.id}`,
|
|
416
428
|
modelValue: I.value,
|
|
417
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
429
|
+
"onUpdate:modelValue": t[0] || (t[0] = (y) => I.value = y),
|
|
418
430
|
class: "rds-e-dropdown__input",
|
|
419
431
|
label: l.label,
|
|
420
|
-
disabled: a(
|
|
432
|
+
disabled: a(w),
|
|
421
433
|
error: l.error,
|
|
422
434
|
helper: l.helper,
|
|
423
435
|
"helper-text": l.helperText,
|
|
424
436
|
loading: l.loading,
|
|
437
|
+
compact: l.compact,
|
|
425
438
|
readonly: ""
|
|
426
|
-
},
|
|
439
|
+
}, Y({
|
|
427
440
|
"right-icon": d(() => [
|
|
428
|
-
|
|
441
|
+
S(a(te), {
|
|
429
442
|
name: "arrow_down",
|
|
430
443
|
"aria-hidden": "true",
|
|
431
|
-
class:
|
|
444
|
+
class: T(["rds-e-dropdown__input-caret", {
|
|
432
445
|
"rds-e-dropdown__input-caret--open": o
|
|
433
446
|
}])
|
|
434
447
|
}, null, 8, ["class"])
|
|
@@ -438,67 +451,68 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
438
451
|
p("helper-text") ? {
|
|
439
452
|
name: "helper-text",
|
|
440
453
|
fn: d(() => [
|
|
441
|
-
|
|
454
|
+
v(e.$slots, "helper-text", {}, void 0, !0)
|
|
442
455
|
]),
|
|
443
456
|
key: "0"
|
|
444
457
|
} : void 0
|
|
445
|
-
]), 1032, ["id", "modelValue", "label", "disabled", "error", "helper", "helper-text", "loading"])
|
|
458
|
+
]), 1032, ["id", "modelValue", "label", "disabled", "error", "helper", "helper-text", "loading", "compact"])
|
|
446
459
|
], 40, Ae))
|
|
447
460
|
]),
|
|
448
|
-
option: d(({ option: o, search:
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
461
|
+
option: d(({ option: o, search: y, index: $ }) => [
|
|
462
|
+
m("div", Ee, [
|
|
463
|
+
m("div", Te, [
|
|
464
|
+
m("div", {
|
|
465
|
+
class: "rds-e-dropdown__option--prepend",
|
|
466
|
+
onClick: r((Q) => me(o), ["prevent", "stop"])
|
|
467
|
+
}, [
|
|
468
|
+
a(C) ? (c(), Z(a(Ce), {
|
|
453
469
|
key: 0,
|
|
454
|
-
id: `${
|
|
470
|
+
id: `${$}-${o.id}`,
|
|
455
471
|
small: l.small,
|
|
456
|
-
"model-value":
|
|
457
|
-
disabled: a(
|
|
458
|
-
|
|
459
|
-
}, null, 8, ["id", "small", "model-value", "disabled", "onClick"])) : !a(D) && l.showRadio ? (c(), ee(a(Oe), {
|
|
472
|
+
"model-value": E(o),
|
|
473
|
+
disabled: a(w) || o?.$isDisabled || !1
|
|
474
|
+
}, null, 8, ["id", "small", "model-value", "disabled"])) : !a(C) && l.showRadio ? (c(), Z(a(Oe), {
|
|
460
475
|
key: 1,
|
|
461
|
-
modelValue:
|
|
462
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
476
|
+
modelValue: H.value,
|
|
477
|
+
"onUpdate:modelValue": t[1] || (t[1] = (Q) => H.value = Q),
|
|
463
478
|
"group-name": `group-${l.id}`
|
|
464
479
|
}, {
|
|
465
480
|
default: d(() => [
|
|
466
|
-
|
|
467
|
-
id: `${
|
|
481
|
+
S(a(Be), {
|
|
482
|
+
id: `${$}-${typeof o == "object" ? o.id : $}`,
|
|
468
483
|
small: l.small,
|
|
469
484
|
option: typeof o == "object" ? o.id : o,
|
|
470
|
-
checked:
|
|
471
|
-
disabled: a(
|
|
472
|
-
|
|
473
|
-
}, null, 8, ["id", "small", "option", "checked", "disabled", "onClick"])
|
|
485
|
+
checked: E(o),
|
|
486
|
+
disabled: a(w) || o?.$isDisabled || !1
|
|
487
|
+
}, null, 8, ["id", "small", "option", "checked", "disabled"])
|
|
474
488
|
]),
|
|
475
489
|
_: 2
|
|
476
|
-
}, 1032, ["modelValue", "group-name"])) :
|
|
477
|
-
]),
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
q.value?.label ? (c(),
|
|
481
|
-
|
|
482
|
-
o?.detail ? (c(),
|
|
483
|
-
], 64)) : (c(),
|
|
490
|
+
}, 1032, ["modelValue", "group-name"])) : A("", !0)
|
|
491
|
+
], 8, Re),
|
|
492
|
+
m("div", _e, [
|
|
493
|
+
v(e.$slots, "singleLabel", { option: o }, () => [
|
|
494
|
+
q.value?.label ? (c(), b(Se, { key: 0 }, [
|
|
495
|
+
m("span", null, R(o.label), 1),
|
|
496
|
+
o?.detail ? (c(), b("span", Fe, R(o.detail), 1)) : A("", !0)
|
|
497
|
+
], 64)) : (c(), b("span", je, R(o), 1))
|
|
484
498
|
], !0)
|
|
485
499
|
])
|
|
486
500
|
]),
|
|
487
|
-
p("optionAppend") ? (c(),
|
|
488
|
-
|
|
501
|
+
p("optionAppend") ? (c(), b("div", Ne, [
|
|
502
|
+
v(e.$slots, "optionAppend", {
|
|
489
503
|
option: o,
|
|
490
|
-
search:
|
|
491
|
-
index:
|
|
504
|
+
search: y,
|
|
505
|
+
index: $
|
|
492
506
|
}, void 0, !0)
|
|
493
|
-
])) :
|
|
507
|
+
])) : A("", !0)
|
|
494
508
|
])
|
|
495
509
|
]),
|
|
496
510
|
_: 2
|
|
497
511
|
}, [
|
|
498
|
-
|
|
512
|
+
B.value || p("beforeList") ? {
|
|
499
513
|
name: Pe,
|
|
500
514
|
fn: d(() => [
|
|
501
|
-
|
|
515
|
+
B.value ? (c(), b("div", {
|
|
502
516
|
key: 0,
|
|
503
517
|
class: "rds-e-dropdown__before-list",
|
|
504
518
|
onMousedown: t[5] || (t[5] = r(() => {
|
|
@@ -517,13 +531,13 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
517
531
|
onChange: t[11] || (t[11] = r(() => {
|
|
518
532
|
}, ["stop"]))
|
|
519
533
|
}, [
|
|
520
|
-
|
|
521
|
-
|
|
534
|
+
m("div", Me, [
|
|
535
|
+
S(a(oe), X({
|
|
522
536
|
ref_key: "textFieldInput",
|
|
523
|
-
ref:
|
|
524
|
-
modelValue:
|
|
525
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) =>
|
|
526
|
-
},
|
|
537
|
+
ref: g,
|
|
538
|
+
modelValue: N.value,
|
|
539
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => N.value = o)
|
|
540
|
+
}, se.value, {
|
|
527
541
|
"full-width": "",
|
|
528
542
|
onMousedown: t[3] || (t[3] = r(() => {
|
|
529
543
|
}, ["stop", "prevent"])),
|
|
@@ -531,21 +545,21 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
531
545
|
}, ["stop"]))
|
|
532
546
|
}), null, 16, ["modelValue"])
|
|
533
547
|
])
|
|
534
|
-
], 32)) :
|
|
535
|
-
p("beforeList") ? (c(),
|
|
536
|
-
|
|
537
|
-
|
|
548
|
+
], 32)) : A("", !0),
|
|
549
|
+
p("beforeList") ? (c(), b("div", Ie, [
|
|
550
|
+
m("div", qe, [
|
|
551
|
+
v(e.$slots, "beforeList", {}, void 0, !0)
|
|
538
552
|
])
|
|
539
|
-
])) :
|
|
553
|
+
])) : A("", !0)
|
|
540
554
|
]),
|
|
541
555
|
key: "0"
|
|
542
556
|
} : void 0,
|
|
543
557
|
p("afterList") ? {
|
|
544
558
|
name: He,
|
|
545
559
|
fn: d(() => [
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
560
|
+
m("div", Ke, [
|
|
561
|
+
m("div", Ue, [
|
|
562
|
+
v(e.$slots, "afterList", {}, void 0, !0)
|
|
549
563
|
])
|
|
550
564
|
])
|
|
551
565
|
]),
|
|
@@ -554,42 +568,42 @@ import './style/dropdown.css';const Ve = ["id", "aria-expanded", "aria-controls"
|
|
|
554
568
|
p("noOptions") ? {
|
|
555
569
|
name: ze,
|
|
556
570
|
fn: d(() => [
|
|
557
|
-
|
|
571
|
+
v(e.$slots, "noOptions", {}, void 0, !0)
|
|
558
572
|
]),
|
|
559
573
|
key: "2"
|
|
560
574
|
} : void 0,
|
|
561
575
|
p("noResult") ? {
|
|
562
576
|
name: Ge,
|
|
563
577
|
fn: d(({ search: o }) => [
|
|
564
|
-
|
|
578
|
+
v(e.$slots, "noResult", { search: o }, void 0, !0)
|
|
565
579
|
]),
|
|
566
580
|
key: "3"
|
|
567
581
|
} : void 0,
|
|
568
582
|
p("limit") ? {
|
|
569
583
|
name: Je,
|
|
570
584
|
fn: d(() => [
|
|
571
|
-
|
|
585
|
+
v(e.$slots, "limit", {}, void 0, !0)
|
|
572
586
|
]),
|
|
573
587
|
key: "4"
|
|
574
588
|
} : void 0,
|
|
575
589
|
p("maxElements") ? {
|
|
576
590
|
name: Qe,
|
|
577
591
|
fn: d(() => [
|
|
578
|
-
|
|
592
|
+
v(e.$slots, "maxElements", {}, void 0, !0)
|
|
579
593
|
]),
|
|
580
594
|
key: "5"
|
|
581
595
|
} : void 0,
|
|
582
596
|
p("singleLabel") ? {
|
|
583
597
|
name: We,
|
|
584
598
|
fn: d(({ option: o }) => [
|
|
585
|
-
|
|
599
|
+
v(e.$slots, "singleLabel", { option: o }, void 0, !0)
|
|
586
600
|
]),
|
|
587
601
|
key: "6"
|
|
588
602
|
} : void 0
|
|
589
603
|
]), 1040, ["modelValue", "class", "options", "close-on-select", "disabled", "multiple", "max-height", "small", "open-direction", "limit", "limit-text", "append-to-body", "text-only"])
|
|
590
604
|
], 2));
|
|
591
605
|
}
|
|
592
|
-
}), at = /* @__PURE__ */ Le(Xe, [["__scopeId", "data-v-
|
|
606
|
+
}), at = /* @__PURE__ */ Le(Xe, [["__scopeId", "data-v-b0db67b1"]]);
|
|
593
607
|
export {
|
|
594
608
|
at as default
|
|
595
609
|
};
|