energy-components 1.14.1 → 1.15.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 +30 -27
- package/dist/components/actionButton.es.js +56 -11
- package/dist/components/avatar.es.js +24 -16
- package/dist/components/breadcrumbs.es.js +37 -29
- package/dist/components/button.es.js +31 -22
- package/dist/components/card.es.js +17 -9
- package/dist/components/checkbox.es.js +67 -56
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-DfOWp1XD.js → collapsable.scss_vue_type_style_index_0_src_true_lang-Bi5q6Y3n.js} +1 -1
- package/dist/components/directAccess.es.js +26 -18
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +27 -27
- package/dist/components/fileUploadItem.es.js +23 -21
- package/dist/components/filterChip.es.js +22 -14
- package/dist/components/filterTag.es.js +27 -19
- package/dist/components/floating-ui.vue-7LKzPqHI.js +1148 -0
- package/dist/components/floatingActionButton.es.js +19 -11
- package/dist/components/{icon-svg-DuzOdbk1.js → icon-svg-BU0OQFKH.js} +990 -742
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +83 -77
- package/dist/components/indicator.es.js +37 -29
- package/dist/components/infoBox.es.js +47 -39
- package/dist/components/link.es.js +22 -13
- package/dist/components/loader.es.js +22 -21
- package/dist/components/modal.es.js +37 -28
- package/dist/components/overlay.es.js +21 -11
- package/dist/components/pagination.es.js +164 -109
- package/dist/components/persistentToast.es.js +32 -24
- package/dist/components/popover.es.js +166 -0
- package/dist/components/progressBar.es.js +30 -22
- package/dist/components/quantitySelector.es.js +60 -48
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +15 -7
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/snackBar.es.js +131 -0
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/avatar.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/directAccess.css +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/filterTag.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/icon-svg.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/loader.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/popover.css +1 -0
- package/dist/components/style/progressBar.css +1 -1
- package/dist/components/style/quantitySelector.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/snackBar.css +1 -0
- 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/toggle.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +23 -15
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +31 -23
- package/dist/components/textArea.es.js +57 -57
- package/dist/components/textField.es.js +1 -1
- package/dist/components/toggle.es.js +20 -16
- package/dist/components/tooltip.es.js +71 -1019
- package/dist/energy-components.es.js +6825 -5824
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +47 -0
- package/dist/types/src/components/buttons/button/button.vue.d.ts +15 -0
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +15 -0
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +15 -0
- package/dist/types/src/components/content/card/card.vue.d.ts +15 -0
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +1 -1
- package/dist/types/src/components/content/tag/tag.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/loader/loader.vue.d.ts +1 -1
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/snack-bar/snack-bar.vue.d.ts +180 -0
- package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +15 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +24 -7
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +1 -1
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/filter-tag/filter-tag.vue.d.ts +15 -0
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +15 -0
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +15 -0
- package/dist/types/src/components/input/switch/switch.vue.d.ts +1 -1
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +4 -0
- package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +47 -0
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +15 -0
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +35 -0
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +15 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as y, toRefs as
|
|
2
|
-
import { R as f } from "./icon-svg-
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/tag.css';const k = { class: "rds-caption-tag" },
|
|
1
|
+
import { defineComponent as y, toRefs as S, computed as u, createElementBlock as $, openBlock as o, normalizeClass as l, createBlock as d, createCommentVNode as p, createElementVNode as x, unref as s, toDisplayString as B } from "vue";
|
|
2
|
+
import { R as f } from "./icon-svg-BU0OQFKH.js";
|
|
3
|
+
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/tag.css';const k = ["id"], C = { class: "rds-caption-tag" }, N = /* @__PURE__ */ y({
|
|
5
5
|
__name: "tag",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -26,7 +26,7 @@ import './style/tag.css';const k = { class: "rds-caption-tag" }, C = /* @__PURE_
|
|
|
26
26
|
type: {
|
|
27
27
|
type: String,
|
|
28
28
|
default: "default",
|
|
29
|
-
validator: (
|
|
29
|
+
validator: (t) => ["default", "information", "success", "error", "warning", "promo"].includes(t)
|
|
30
30
|
},
|
|
31
31
|
/**
|
|
32
32
|
* Define si el tag tiene una acción asociada.
|
|
@@ -50,42 +50,50 @@ import './style/tag.css';const k = { class: "rds-caption-tag" }, C = /* @__PURE_
|
|
|
50
50
|
small: {
|
|
51
51
|
type: Boolean,
|
|
52
52
|
default: !1
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* ID del tag para testing
|
|
56
|
+
*/
|
|
57
|
+
id: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: void 0
|
|
53
60
|
}
|
|
54
61
|
},
|
|
55
|
-
setup(
|
|
56
|
-
const m =
|
|
62
|
+
setup(t) {
|
|
63
|
+
const m = t, {
|
|
57
64
|
type: r,
|
|
58
|
-
actionable:
|
|
65
|
+
actionable: i,
|
|
59
66
|
icon: n,
|
|
60
67
|
text: _,
|
|
61
68
|
inverse: g,
|
|
62
69
|
small: v
|
|
63
|
-
} =
|
|
70
|
+
} = S(m), h = u(() => {
|
|
64
71
|
const a = "rds-e-tag", e = [];
|
|
65
|
-
return g.value && e.push(`${a}--inverse`),
|
|
66
|
-
}),
|
|
72
|
+
return g.value && e.push(`${a}--inverse`), i.value && e.push(`${a}--actionable`), n.value && e.push(`${a}--icon`), v.value && e.push(`${a}--small`), e.push(`${a}--${r.value}`), e.join(" ");
|
|
73
|
+
}), c = u(() => {
|
|
67
74
|
const a = "rds-e-tag_icon", e = [];
|
|
68
75
|
return e.push(`${a}--${r.value}`), e.join(" ");
|
|
69
76
|
});
|
|
70
|
-
return (a, e) => (o(),
|
|
77
|
+
return (a, e) => (o(), $("div", {
|
|
78
|
+
id: t.id,
|
|
71
79
|
class: l(["rds-e-tag rds-e-caption-tag", h.value])
|
|
72
80
|
}, [
|
|
73
|
-
|
|
81
|
+
s(n) ? (o(), d(f, {
|
|
74
82
|
key: 0,
|
|
75
|
-
name:
|
|
76
|
-
class: l(["rds-e-tag__icon",
|
|
83
|
+
name: s(n),
|
|
84
|
+
class: l(["rds-e-tag__icon", c.value]),
|
|
77
85
|
"aria-hidden": "true"
|
|
78
|
-
}, null, 8, ["name", "class"])) :
|
|
79
|
-
|
|
80
|
-
|
|
86
|
+
}, null, 8, ["name", "class"])) : p("", !0),
|
|
87
|
+
x("span", C, B(s(_)), 1),
|
|
88
|
+
s(i) ? (o(), d(f, {
|
|
81
89
|
key: 1,
|
|
82
90
|
name: "arrow_right",
|
|
83
|
-
class: l(["rds-e-tag__icon-actionable",
|
|
91
|
+
class: l(["rds-e-tag__icon-actionable", c.value]),
|
|
84
92
|
"aria-hidden": "true"
|
|
85
|
-
}, null, 8, ["class"])) :
|
|
86
|
-
],
|
|
93
|
+
}, null, 8, ["class"])) : p("", !0)
|
|
94
|
+
], 10, k));
|
|
87
95
|
}
|
|
88
|
-
}),
|
|
96
|
+
}), w = /* @__PURE__ */ b(N, [["__scopeId", "data-v-ac2ecb64"]]);
|
|
89
97
|
export {
|
|
90
|
-
|
|
98
|
+
w as default
|
|
91
99
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as Q, mergeModels as W, useModel as X, toRefs as Y, ref as k, computed as
|
|
2
|
-
import { R as
|
|
1
|
+
import { defineComponent as Q, mergeModels as W, useModel as X, toRefs as Y, ref as k, computed as s, createElementBlock as f, openBlock as o, normalizeClass as u, createElementVNode as r, withDirectives as Z, unref as e, vModelText as ee, renderSlot as S, createTextVNode as te, createBlock as z, createCommentVNode as i, mergeProps as F, toHandlers as T, toDisplayString as _ } from "vue";
|
|
2
|
+
import { R as A } from "./icon-svg-BU0OQFKH.js";
|
|
3
3
|
import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/textArea.css';function V(t,
|
|
5
|
-
return
|
|
4
|
+
import './style/textArea.css';function V(t, p = !0, d = !0) {
|
|
5
|
+
return p && !t.trim() ? (console.warn("Advertencia: El valor no puede estar vacío"), !1) : d && !/^[\w\s\u00C0-\u017F\-:.,;()¿?¡!%"'$€]+$/.test(t) ? (console.warn("Advertencia: El valor contiene caracteres inválidos"), !1) : !0;
|
|
6
6
|
}
|
|
7
|
-
const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "maxlength", "minlength", "rows", "disabled"], ne = ["for"],
|
|
7
|
+
const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "maxlength", "minlength", "rows", "disabled"], ne = ["for"], oe = { key: 0 }, se = { key: 0 }, ue = { key: 1 }, ie = { key: 0 }, de = /* @__PURE__ */ Q({
|
|
8
8
|
__name: "text-area",
|
|
9
9
|
props: /* @__PURE__ */ W({
|
|
10
10
|
/**
|
|
@@ -136,34 +136,34 @@ const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "ma
|
|
|
136
136
|
}),
|
|
137
137
|
emits: ["update:modelValue"],
|
|
138
138
|
setup(t) {
|
|
139
|
-
const
|
|
139
|
+
const p = t, d = X(t, "modelValue"), {
|
|
140
140
|
label: B,
|
|
141
|
-
id:
|
|
142
|
-
disabled:
|
|
143
|
-
maxlength:
|
|
144
|
-
minlength:
|
|
145
|
-
modelValue:
|
|
146
|
-
icon:
|
|
147
|
-
rightIcon:
|
|
148
|
-
helper:
|
|
149
|
-
error:
|
|
141
|
+
id: E,
|
|
142
|
+
disabled: g,
|
|
143
|
+
maxlength: x,
|
|
144
|
+
minlength: C,
|
|
145
|
+
modelValue: c,
|
|
146
|
+
icon: H,
|
|
147
|
+
rightIcon: M,
|
|
148
|
+
helper: R,
|
|
149
|
+
error: y,
|
|
150
150
|
helperText: P,
|
|
151
|
-
clearable:
|
|
152
|
-
lengthError:
|
|
153
|
-
} = Y(
|
|
154
|
-
|
|
151
|
+
clearable: b,
|
|
152
|
+
lengthError: w
|
|
153
|
+
} = Y(p), v = k(!1), m = k(!1), h = k(!1), j = () => {
|
|
154
|
+
h.value = !0;
|
|
155
155
|
}, K = () => {
|
|
156
|
-
|
|
156
|
+
v.value = !1, m.value = !1, h.value = !1;
|
|
157
157
|
}, U = () => {
|
|
158
|
-
|
|
159
|
-
}, N =
|
|
158
|
+
v.value = !0, m.value = !h.value, h.value = !1;
|
|
159
|
+
}, N = s(() => c.value.length === x.value), I = s(() => c.value.length === 0 ? !1 : c.value.length < C.value), D = s(() => w.value && (N.value || I.value)), G = s(() => {
|
|
160
160
|
const a = [];
|
|
161
|
-
return
|
|
161
|
+
return c.value && a.push("rds-e-textarea--filled"), y.value && a.push("rds-e-textarea--error"), g.value && a.push("rds-e-textarea--disabled"), D.value && a.push("rds-e-textarea--error"), a.join(" ");
|
|
162
162
|
}), J = () => {
|
|
163
|
-
|
|
164
|
-
}, l =
|
|
163
|
+
d.value = "";
|
|
164
|
+
}, l = s(() => {
|
|
165
165
|
const a = {
|
|
166
|
-
name:
|
|
166
|
+
name: H.value,
|
|
167
167
|
class: "",
|
|
168
168
|
events: {
|
|
169
169
|
click: () => {
|
|
@@ -171,9 +171,9 @@ const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "ma
|
|
|
171
171
|
}
|
|
172
172
|
}, n = {
|
|
173
173
|
left: { ...a },
|
|
174
|
-
right: { ...a, name:
|
|
174
|
+
right: { ...a, name: M.value }
|
|
175
175
|
};
|
|
176
|
-
return
|
|
176
|
+
return b.value && (n.right = {
|
|
177
177
|
...a,
|
|
178
178
|
name: "close",
|
|
179
179
|
class: "rds-e-textfield__icon--clear",
|
|
@@ -181,34 +181,34 @@ const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "ma
|
|
|
181
181
|
click: () => J()
|
|
182
182
|
}
|
|
183
183
|
}), n;
|
|
184
|
-
}), L =
|
|
184
|
+
}), L = s(() => c.value.length);
|
|
185
185
|
return (a, n) => {
|
|
186
|
-
var
|
|
187
|
-
return
|
|
186
|
+
var $, q;
|
|
187
|
+
return o(), f("div", {
|
|
188
188
|
class: u(["rds-e-textarea", G.value])
|
|
189
189
|
}, [
|
|
190
190
|
r("div", {
|
|
191
191
|
class: u(["rds-e-textarea__container", {
|
|
192
|
-
"rds-e-textarea__container--keyboard-focus":
|
|
193
|
-
"rds-e-textarea__container--active":
|
|
192
|
+
"rds-e-textarea__container--keyboard-focus": m.value,
|
|
193
|
+
"rds-e-textarea__container--active": v.value && !m.value
|
|
194
194
|
}]),
|
|
195
|
-
onMousedown:
|
|
195
|
+
onMousedown: j
|
|
196
196
|
}, [
|
|
197
197
|
r("div", re, [
|
|
198
198
|
Z(r("textarea", {
|
|
199
|
-
id: (
|
|
200
|
-
"onUpdate:modelValue": n[0] || (n[0] = (O) =>
|
|
199
|
+
id: ($ = e(E)) == null ? void 0 : $.toString(),
|
|
200
|
+
"onUpdate:modelValue": n[0] || (n[0] = (O) => d.value = O),
|
|
201
201
|
type: "text",
|
|
202
|
-
class: u(["rds-e-textarea__input", { "rds-e-textarea__input--active":
|
|
202
|
+
class: u(["rds-e-textarea__input", { "rds-e-textarea__input--active": v.value }]),
|
|
203
203
|
name: t.name,
|
|
204
|
-
maxlength: e(
|
|
205
|
-
minlength: e(
|
|
204
|
+
maxlength: e(x),
|
|
205
|
+
minlength: e(C),
|
|
206
206
|
rows: t.rows,
|
|
207
|
-
disabled: e(
|
|
207
|
+
disabled: e(g),
|
|
208
208
|
onBlur: K,
|
|
209
209
|
onFocus: U
|
|
210
210
|
}, null, 42, le), [
|
|
211
|
-
[ee,
|
|
211
|
+
[ee, d.value]
|
|
212
212
|
]),
|
|
213
213
|
n[1] || (n[1] = r("div", { class: "rds-e-textarea__resize-handle" }, [
|
|
214
214
|
r("svg", {
|
|
@@ -226,53 +226,53 @@ const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "ma
|
|
|
226
226
|
])
|
|
227
227
|
], -1)),
|
|
228
228
|
r("label", {
|
|
229
|
-
for: (q = e(
|
|
229
|
+
for: (q = e(E)) == null ? void 0 : q.toString(),
|
|
230
230
|
class: u(["rds-e-textarea__label", {
|
|
231
231
|
"rds-e-textarea__label--with-icon": l.value.left.name,
|
|
232
|
-
"rds-e-textarea__label--active":
|
|
232
|
+
"rds-e-textarea__label--active": v.value
|
|
233
233
|
}])
|
|
234
234
|
}, [
|
|
235
235
|
S(a.$slots, "left-icon", {}, () => [
|
|
236
|
-
l.value.left.name ? (
|
|
236
|
+
l.value.left.name ? (o(), z(A, F({
|
|
237
237
|
key: 0,
|
|
238
238
|
class: "rds-e-textarea__icon rds-e-textarea__icon--left",
|
|
239
239
|
"aria-hidden": "true"
|
|
240
|
-
}, l.value.left,
|
|
240
|
+
}, l.value.left, T(l.value.left.events)), null, 16)) : i("", !0)
|
|
241
241
|
], !0),
|
|
242
|
-
te(" " +
|
|
242
|
+
te(" " + _(e(B)), 1)
|
|
243
243
|
], 10, ne),
|
|
244
244
|
r("div", {
|
|
245
245
|
class: u(["rds-e-textarea__counter", {
|
|
246
|
-
"rds-e-textarea__counter--disabled": e(
|
|
247
|
-
"rds-e-textarea__counter--clearable": e(
|
|
246
|
+
"rds-e-textarea__counter--disabled": e(g),
|
|
247
|
+
"rds-e-textarea__counter--clearable": e(b)
|
|
248
248
|
}])
|
|
249
249
|
}, [
|
|
250
|
-
t.counter && !e(
|
|
250
|
+
t.counter && !e(M) && !e(b) ? (o(), f("p", oe, _(L.value) + "/" + _(e(x)), 1)) : i("", !0),
|
|
251
251
|
S(a.$slots, "right-icon", {}, () => [
|
|
252
|
-
l.value.right.name ? (
|
|
252
|
+
l.value.right.name ? (o(), z(A, F({
|
|
253
253
|
key: 0,
|
|
254
254
|
class: "rds-e-textarea__icon rds-e-textarea__icon--right",
|
|
255
255
|
"aria-hidden": "true"
|
|
256
|
-
}, l.value.right,
|
|
256
|
+
}, l.value.right, T(l.value.right.events)), null, 16)) : i("", !0)
|
|
257
257
|
], !0)
|
|
258
258
|
], 2)
|
|
259
259
|
])
|
|
260
260
|
], 34),
|
|
261
261
|
r("ul", {
|
|
262
|
-
class: u(["rds-e-textarea__helper", e(
|
|
262
|
+
class: u(["rds-e-textarea__helper", e(y) || D.value ? "rds-e-textarea__helper--error" : ""])
|
|
263
263
|
}, [
|
|
264
|
-
N.value ? (
|
|
265
|
-
|
|
264
|
+
N.value && e(w) ? (o(), f("li", se, " Ha alcanzado el número máximo de carácteres ")) : i("", !0),
|
|
265
|
+
I.value && e(w) ? (o(), f("li", ue, " Ha alcanzado el número mínimo de carácteres ")) : i("", !0),
|
|
266
266
|
r("li", null, [
|
|
267
267
|
S(a.$slots, "helper-text", {}, () => [
|
|
268
|
-
e(
|
|
268
|
+
e(R) || e(y) ? (o(), f("span", ie, _(e(P)), 1)) : i("", !0)
|
|
269
269
|
], !0)
|
|
270
270
|
])
|
|
271
271
|
], 2)
|
|
272
272
|
], 2);
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
}),
|
|
275
|
+
}), me = /* @__PURE__ */ ae(de, [["__scopeId", "data-v-b6c3c9f8"]]);
|
|
276
276
|
export {
|
|
277
|
-
|
|
277
|
+
me as default
|
|
278
278
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as re, toRefs as ie, ref as f, computed as v, watch as F, onMounted as ue, onBeforeUnmount as de, createElementBlock as V, openBlock as h, normalizeClass as k, createElementVNode as g, createCommentVNode as S, renderSlot as E, createBlock as R, mergeProps as A, toHandlers as ce, unref as d, toDisplayString as M, withModifiers as fe } from "vue";
|
|
2
2
|
import { g as ve } from "./getInstance-GhoEcxLF.js";
|
|
3
|
-
import { R as K, s as pe } from "./icon-svg-
|
|
3
|
+
import { R as K, s as pe } from "./icon-svg-BU0OQFKH.js";
|
|
4
4
|
import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/textField.css';const he = { class: "rds-e-textfield__input-container" }, ge = ["id", "type", "maxlength", "minlength", "disabled", "value", "autocomplete", "readonly"], _e = ["for"], ye = {
|
|
6
6
|
key: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, toRefs as c, ref as E, onMounted as L, createElementBlock as y, openBlock as B, normalizeClass as r, createElementVNode as p, unref as u, toDisplayString as f } from "vue";
|
|
2
2
|
import { _ as F } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
import './style/toggle.css';const I = /* @__PURE__ */
|
|
3
|
+
import './style/toggle.css';const I = ["id"], R = ["id"], _ = ["id"], G = /* @__PURE__ */ T({
|
|
4
4
|
__name: "toggle",
|
|
5
5
|
props: {
|
|
6
6
|
small: { type: Boolean },
|
|
@@ -10,19 +10,21 @@ import './style/toggle.css';const I = /* @__PURE__ */ c({
|
|
|
10
10
|
valueLeft: {},
|
|
11
11
|
valueRight: {},
|
|
12
12
|
labelLeft: {},
|
|
13
|
-
labelRight: {}
|
|
13
|
+
labelRight: {},
|
|
14
|
+
id: {}
|
|
14
15
|
},
|
|
15
16
|
emits: ["update:modelValue"],
|
|
16
17
|
setup(m, { emit: v }) {
|
|
17
|
-
const b = m,
|
|
18
|
+
const b = m, i = v, { modelValue: l, switchType: s, valueLeft: d, valueRight: o } = c(b), t = {
|
|
18
19
|
LEFT: "left",
|
|
19
20
|
RIGHT: "right"
|
|
20
|
-
}, a =
|
|
21
|
-
|
|
21
|
+
}, a = E(t.LEFT), g = (e) => {
|
|
22
|
+
i("update:modelValue", e);
|
|
22
23
|
};
|
|
23
|
-
return
|
|
24
|
-
s != null && s.value ? (
|
|
25
|
-
}), (e,
|
|
24
|
+
return L(() => {
|
|
25
|
+
s != null && s.value ? (i("update:modelValue", l == null ? void 0 : l.value), a.value = l != null && l.value ? t.RIGHT : t.LEFT) : (l == null ? void 0 : l.value) === (o == null ? void 0 : o.value) ? (i("update:modelValue", o == null ? void 0 : o.value), a.value = t.RIGHT) : (i("update:modelValue", d == null ? void 0 : d.value), a.value = t.LEFT);
|
|
26
|
+
}), (e, n) => (B(), y("div", {
|
|
27
|
+
id: e.id,
|
|
26
28
|
class: r(["rds-e-toggle", [
|
|
27
29
|
{
|
|
28
30
|
"rds-e-toggle--small-full-width": e.small && e.fullWidth,
|
|
@@ -33,22 +35,24 @@ import './style/toggle.css';const I = /* @__PURE__ */ c({
|
|
|
33
35
|
]])
|
|
34
36
|
}, [
|
|
35
37
|
p("button", {
|
|
38
|
+
id: e.id ? `${e.id}-left` : void 0,
|
|
36
39
|
class: r(["rds-e-toggle__tab", {
|
|
37
40
|
"rds-e-toggle__tab--active": a.value === t.LEFT
|
|
38
41
|
}]),
|
|
39
42
|
type: "button",
|
|
40
|
-
onClick:
|
|
41
|
-
}, f(e.labelLeft),
|
|
43
|
+
onClick: n[0] || (n[0] = (h) => (g(u(s) ? !0 : u(d)), a.value = t.LEFT))
|
|
44
|
+
}, f(e.labelLeft), 11, R),
|
|
42
45
|
p("button", {
|
|
46
|
+
id: e.id ? `${e.id}-right` : void 0,
|
|
43
47
|
class: r(["rds-e-toggle__tab", {
|
|
44
48
|
"rds-e-toggle__tab--active": a.value === t.RIGHT
|
|
45
49
|
}]),
|
|
46
50
|
type: "button",
|
|
47
|
-
onClick:
|
|
48
|
-
}, f(e.labelRight),
|
|
49
|
-
],
|
|
51
|
+
onClick: n[1] || (n[1] = (h) => (g(u(s) ? !1 : u(o)), a.value = t.RIGHT))
|
|
52
|
+
}, f(e.labelRight), 11, _)
|
|
53
|
+
], 10, I));
|
|
50
54
|
}
|
|
51
|
-
}),
|
|
55
|
+
}), k = /* @__PURE__ */ F(G, [["__scopeId", "data-v-be1c5818"]]);
|
|
52
56
|
export {
|
|
53
|
-
|
|
57
|
+
k as default
|
|
54
58
|
};
|