energy-components 1.22.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.
Files changed (80) hide show
  1. package/README.md +21 -6
  2. package/dist/components/accordion.es.js +17 -17
  3. package/dist/components/avatar.es.js +7 -7
  4. package/dist/components/breadcrumbs.es.js +32 -32
  5. package/dist/components/button.es.js +24 -24
  6. package/dist/components/checkbox.es.js +14 -17
  7. package/dist/components/collapsable.es.js +1 -1
  8. 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
  9. package/dist/components/datepicker.es.js +4644 -4639
  10. package/dist/components/directAccess.es.js +45 -50
  11. package/dist/components/dragAndDrop.es.js +44 -46
  12. package/dist/components/dropdown.es.js +154 -163
  13. package/dist/components/fileUploadItem.es.js +18 -18
  14. package/dist/components/filterChip.es.js +9 -9
  15. package/dist/components/filterTag.es.js +7 -7
  16. package/dist/components/{floating-ui.vue-DHEoOe5S.js → floating-ui.vue-C-DgKOwt.js} +1 -1
  17. package/dist/components/functions-D3GA3OzJ.js +24 -0
  18. package/dist/components/icon-svg-DxlNo61Q.js +869 -0
  19. package/dist/components/iconList.es.js +25 -29
  20. package/dist/components/iconSvg.es.js +1 -1
  21. package/dist/components/index.es.js +46 -46
  22. package/dist/components/indicator.es.js +27 -28
  23. package/dist/components/infoBox.es.js +17 -17
  24. package/dist/components/link.es.js +51 -55
  25. package/dist/components/modal.es.js +20 -20
  26. package/dist/components/multiselect.es.js +2 -3
  27. package/dist/components/overlay.es.js +20 -15
  28. package/dist/components/pagination.es.js +111 -111
  29. package/dist/components/persistentToast.es.js +11 -11
  30. package/dist/components/popover.es.js +18 -18
  31. package/dist/components/popoverMenu.es.js +22 -22
  32. package/dist/components/progressBar.es.js +8 -8
  33. package/dist/components/quantitySelector.es.js +12 -12
  34. package/dist/components/radioButton.es.js +26 -26
  35. package/dist/components/selectionChip.es.js +5 -5
  36. package/dist/components/sidedrawer.es.js +19 -19
  37. package/dist/components/style/accordionGroup.css +1 -1
  38. package/dist/components/style/actionButton.css +1 -1
  39. package/dist/components/style/button.css +1 -1
  40. package/dist/components/style/checkbox.css +1 -1
  41. package/dist/components/style/datepicker.css +1 -1
  42. package/dist/components/style/directAccess.css +1 -1
  43. package/dist/components/style/dragAndDrop.css +1 -1
  44. package/dist/components/style/filterChip.css +1 -1
  45. package/dist/components/style/icon-svg.css +1 -1
  46. package/dist/components/style/iconList.css +1 -1
  47. package/dist/components/style/link.css +1 -1
  48. package/dist/components/style/modal.css +1 -1
  49. package/dist/components/style/overlay.css +1 -1
  50. package/dist/components/style/pagination.css +1 -1
  51. package/dist/components/style/persistentToast.css +1 -1
  52. package/dist/components/style/selectionChip.css +1 -1
  53. package/dist/components/style/sidedrawer.css +1 -1
  54. package/dist/components/style/tabBar.css +1 -1
  55. package/dist/components/style/tableslotedcomponent.css +1 -1
  56. package/dist/components/switch.es.js +9 -9
  57. package/dist/components/tabBar.es.js +32 -33
  58. package/dist/components/tablepaginatedcomponent.es.js +35 -36
  59. package/dist/components/tableslotedcomponent.es.js +116 -121
  60. package/dist/components/tag.es.js +6 -6
  61. package/dist/components/textArea.es.js +103 -106
  62. package/dist/components/textField.es.js +21 -22
  63. package/dist/components/toggle.es.js +23 -23
  64. package/dist/components/tooltip.es.js +59 -59
  65. package/dist/energy-components.css +1 -0
  66. package/dist/energy-components.es.js +9101 -24972
  67. package/dist/energy-components.umd.js +2 -2
  68. package/dist/style.css +1 -1
  69. package/dist/types/src/components/icon-svg/icon-list.d.ts +8 -9
  70. package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +2 -2
  71. package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +2 -2
  72. package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +2 -2
  73. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +1 -1
  74. package/dist/types/src/helpers/functions.d.ts +1 -0
  75. package/dist/types/style.d.ts +1 -0
  76. package/dist/types/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +24 -17
  78. package/dist/components/functions-DIHwdgF0.js +0 -18
  79. package/dist/components/icon-svg-K8-vLJgV.js +0 -16718
  80. package/dist/composables/index.es.js +0 -37
@@ -1,12 +1,12 @@
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-K8-vLJgV.js";
3
- import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
1
+ import { defineComponent as L, mergeModels as O, useModel as Q, toRefs as W, ref as k, computed as s, createElementBlock as f, openBlock as o, normalizeClass as u, createElementVNode as r, withDirectives as X, unref as e, vModelText as Y, renderSlot as S, createTextVNode as Z, createBlock as q, createCommentVNode as i, mergeProps as z, toHandlers as D, toDisplayString as _ } from "vue";
2
+ import { I as F } from "./icon-svg-DxlNo61Q.js";
3
+ import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/textArea.css';function V(t, p = !0, d = !0) {
5
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"], oe = { key: 0 }, se = { key: 0 }, ue = { key: 1 }, ie = { key: 0 }, de = /* @__PURE__ */ Q({
7
+ const te = { class: "rds-e-textarea__input-container" }, ae = ["id", "name", "maxlength", "minlength", "rows", "disabled"], re = ["for"], le = { key: 0 }, ne = { key: 0 }, oe = { key: 1 }, se = { key: 0 }, ue = /* @__PURE__ */ L({
8
8
  __name: "text-area",
9
- props: /* @__PURE__ */ W({
9
+ props: /* @__PURE__ */ O({
10
10
  /**
11
11
  * Etiqueta que se muestra sobre el campo de entrada. y Placeholder
12
12
  */
@@ -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 p = t, d = X(t, "modelValue"), {
139
+ const p = t, d = Q(t, "modelValue"), {
140
140
  label: B,
141
141
  id: E,
142
142
  disabled: g,
143
143
  maxlength: x,
144
144
  minlength: C,
145
145
  modelValue: c,
146
- icon: H,
146
+ icon: T,
147
147
  rightIcon: M,
148
- helper: R,
148
+ helper: A,
149
149
  error: y,
150
- helperText: P,
150
+ helperText: H,
151
151
  clearable: b,
152
152
  lengthError: w
153
- } = Y(p), v = k(!1), m = k(!1), h = k(!1), j = () => {
153
+ } = W(p), v = k(!1), m = k(!1), h = k(!1), P = () => {
154
154
  h.value = !0;
155
- }, K = () => {
155
+ }, j = () => {
156
156
  v.value = !1, m.value = !1, h.value = !1;
157
- }, U = () => {
157
+ }, K = () => {
158
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(() => {
159
+ }, N = s(() => c.value.length === x.value), I = s(() => c.value.length === 0 ? !1 : c.value.length < C.value), $ = s(() => w.value && (N.value || I.value)), R = s(() => {
160
160
  const a = [];
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
- }), J = () => {
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"), $.value && a.push("rds-e-textarea--error"), a.join(" ");
162
+ }), U = () => {
163
163
  d.value = "";
164
164
  }, l = s(() => {
165
165
  const a = {
166
- name: H.value,
166
+ name: T.value,
167
167
  class: "",
168
168
  events: {
169
169
  click: () => {
@@ -178,101 +178,98 @@ const re = { class: "rds-e-textarea__input-container" }, le = ["id", "name", "ma
178
178
  name: "close",
179
179
  class: "rds-e-textfield__icon--clear",
180
180
  events: {
181
- click: () => J()
181
+ click: () => U()
182
182
  }
183
183
  }), n;
184
- }), L = s(() => c.value.length);
185
- return (a, n) => {
186
- var $, q;
187
- return o(), f("div", {
188
- class: u(["rds-e-textarea", G.value])
184
+ }), G = s(() => c.value.length);
185
+ return (a, n) => (o(), f("div", {
186
+ class: u(["rds-e-textarea", R.value])
187
+ }, [
188
+ r("div", {
189
+ class: u(["rds-e-textarea__container", {
190
+ "rds-e-textarea__container--keyboard-focus": m.value,
191
+ "rds-e-textarea__container--active": v.value && !m.value
192
+ }]),
193
+ onMousedown: P
189
194
  }, [
190
- r("div", {
191
- class: u(["rds-e-textarea__container", {
192
- "rds-e-textarea__container--keyboard-focus": m.value,
193
- "rds-e-textarea__container--active": v.value && !m.value
194
- }]),
195
- onMousedown: j
196
- }, [
197
- r("div", re, [
198
- Z(r("textarea", {
199
- id: ($ = e(E)) == null ? void 0 : $.toString(),
200
- "onUpdate:modelValue": n[0] || (n[0] = (O) => d.value = O),
201
- type: "text",
202
- class: u(["rds-e-textarea__input", { "rds-e-textarea__input--active": v.value }]),
203
- name: t.name,
204
- maxlength: e(x),
205
- minlength: e(C),
206
- rows: t.rows,
207
- disabled: e(g),
208
- onBlur: K,
209
- onFocus: U
210
- }, null, 42, le), [
211
- [ee, d.value]
212
- ]),
213
- n[1] || (n[1] = r("div", { class: "rds-e-textarea__resize-handle" }, [
214
- r("svg", {
215
- width: "12",
216
- height: "14",
217
- viewBox: "0 0 12 14",
218
- fill: "none",
219
- xmlns: "http://www.w3.org/2000/svg"
220
- }, [
221
- r("path", {
222
- d: "M11 1V3C11 8.52285 6.52285 13 1 13V13",
223
- "stroke-width": "1.2",
224
- "stroke-linecap": "round"
225
- })
226
- ])
227
- ], -1)),
228
- r("label", {
229
- for: (q = e(E)) == null ? void 0 : q.toString(),
230
- class: u(["rds-e-textarea__label", {
231
- "rds-e-textarea__label--with-icon": l.value.left.name,
232
- "rds-e-textarea__label--active": v.value
233
- }])
195
+ r("div", te, [
196
+ X(r("textarea", {
197
+ id: e(E)?.toString(),
198
+ "onUpdate:modelValue": n[0] || (n[0] = (J) => d.value = J),
199
+ type: "text",
200
+ class: u(["rds-e-textarea__input", { "rds-e-textarea__input--active": v.value }]),
201
+ name: t.name,
202
+ maxlength: e(x),
203
+ minlength: e(C),
204
+ rows: t.rows,
205
+ disabled: e(g),
206
+ onBlur: j,
207
+ onFocus: K
208
+ }, null, 42, ae), [
209
+ [Y, d.value]
210
+ ]),
211
+ n[1] || (n[1] = r("div", { class: "rds-e-textarea__resize-handle" }, [
212
+ r("svg", {
213
+ width: "12",
214
+ height: "14",
215
+ viewBox: "0 0 12 14",
216
+ fill: "none",
217
+ xmlns: "http://www.w3.org/2000/svg"
234
218
  }, [
235
- S(a.$slots, "left-icon", {}, () => [
236
- l.value.left.name ? (o(), z(A, F({
237
- key: 0,
238
- class: "rds-e-textarea__icon rds-e-textarea__icon--left",
239
- "aria-hidden": "true"
240
- }, l.value.left, T(l.value.left.events)), null, 16)) : i("", !0)
241
- ], !0),
242
- te(" " + _(e(B)), 1)
243
- ], 10, ne),
244
- r("div", {
245
- class: u(["rds-e-textarea__counter", {
246
- "rds-e-textarea__counter--disabled": e(g),
247
- "rds-e-textarea__counter--clearable": e(b)
248
- }])
249
- }, [
250
- t.counter && !e(M) && !e(b) ? (o(), f("p", oe, _(L.value) + "/" + _(e(x)), 1)) : i("", !0),
251
- S(a.$slots, "right-icon", {}, () => [
252
- l.value.right.name ? (o(), z(A, F({
253
- key: 0,
254
- class: "rds-e-textarea__icon rds-e-textarea__icon--right",
255
- "aria-hidden": "true"
256
- }, l.value.right, T(l.value.right.events)), null, 16)) : i("", !0)
257
- ], !0)
258
- ], 2)
259
- ])
260
- ], 34),
261
- r("ul", {
262
- class: u(["rds-e-textarea__helper", e(y) || D.value ? "rds-e-textarea__helper--error" : ""])
263
- }, [
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
- r("li", null, [
267
- S(a.$slots, "helper-text", {}, () => [
268
- e(R) || e(y) ? (o(), f("span", ie, _(e(P)), 1)) : i("", !0)
219
+ r("path", {
220
+ d: "M11 1V3C11 8.52285 6.52285 13 1 13V13",
221
+ "stroke-width": "1.2",
222
+ "stroke-linecap": "round"
223
+ })
224
+ ])
225
+ ], -1)),
226
+ r("label", {
227
+ for: e(E)?.toString(),
228
+ class: u(["rds-e-textarea__label", {
229
+ "rds-e-textarea__label--with-icon": l.value.left.name,
230
+ "rds-e-textarea__label--active": v.value
231
+ }])
232
+ }, [
233
+ S(a.$slots, "left-icon", {}, () => [
234
+ l.value.left.name ? (o(), q(F, z({
235
+ key: 0,
236
+ class: "rds-e-textarea__icon rds-e-textarea__icon--left",
237
+ "aria-hidden": "true"
238
+ }, l.value.left, D(l.value.left.events)), null, 16)) : i("", !0)
239
+ ], !0),
240
+ Z(" " + _(e(B)), 1)
241
+ ], 10, re),
242
+ r("div", {
243
+ class: u(["rds-e-textarea__counter", {
244
+ "rds-e-textarea__counter--disabled": e(g),
245
+ "rds-e-textarea__counter--clearable": e(b)
246
+ }])
247
+ }, [
248
+ t.counter && !e(M) && !e(b) ? (o(), f("p", le, _(G.value) + "/" + _(e(x)), 1)) : i("", !0),
249
+ S(a.$slots, "right-icon", {}, () => [
250
+ l.value.right.name ? (o(), q(F, z({
251
+ key: 0,
252
+ class: "rds-e-textarea__icon rds-e-textarea__icon--right",
253
+ "aria-hidden": "true"
254
+ }, l.value.right, D(l.value.right.events)), null, 16)) : i("", !0)
269
255
  ], !0)
270
- ])
271
- ], 2)
272
- ], 2);
273
- };
256
+ ], 2)
257
+ ])
258
+ ], 34),
259
+ r("ul", {
260
+ class: u(["rds-e-textarea__helper", e(y) || $.value ? "rds-e-textarea__helper--error" : ""])
261
+ }, [
262
+ N.value && e(w) ? (o(), f("li", ne, " Ha alcanzado el número máximo de carácteres ")) : i("", !0),
263
+ I.value && e(w) ? (o(), f("li", oe, " Ha alcanzado el número mínimo de carácteres ")) : i("", !0),
264
+ r("li", null, [
265
+ S(a.$slots, "helper-text", {}, () => [
266
+ e(A) || e(y) ? (o(), f("span", se, _(e(H)), 1)) : i("", !0)
267
+ ], !0)
268
+ ])
269
+ ], 2)
270
+ ], 2));
274
271
  }
275
- }), me = /* @__PURE__ */ ae(de, [["__scopeId", "data-v-b6c3c9f8"]]);
272
+ }), ve = /* @__PURE__ */ ee(ue, [["__scopeId", "data-v-b6c3c9f8"]]);
276
273
  export {
277
- me as default
274
+ ve as default
278
275
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as ie, toRefs as ue, ref as c, computed as y, watch as P, onMounted as de, onBeforeUnmount as ce, createElementBlock as L, openBlock as m, normalizeClass as V, createElementVNode as g, createCommentVNode as _, renderSlot as T, createBlock as E, mergeProps as j, toHandlers as fe, unref as f, toDisplayString as W, withModifiers as ve } from "vue";
2
2
  import { g as me } from "./getInstance-GhoEcxLF.js";
3
- import { R as F, s as pe } from "./icon-svg-K8-vLJgV.js";
3
+ import { I as F, s as pe } from "./icon-svg-DxlNo61Q.js";
4
4
  import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  import './style/textField.css';const ye = { class: "rds-e-textfield__input-container" }, ge = ["id", "type", "maxlength", "minlength", "disabled", "value", "autocomplete", "readonly"], _e = ["for"], xe = {
6
6
  key: 0,
@@ -161,18 +161,18 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
161
161
  const o = l, u = i, {
162
162
  type: v,
163
163
  label: O,
164
- disabled: B,
164
+ disabled: I,
165
165
  modelValue: x,
166
166
  icon: U,
167
167
  rightIcon: z,
168
168
  helper: H,
169
- error: C,
169
+ error: B,
170
170
  helperText: G,
171
171
  clearable: J,
172
172
  password: b,
173
173
  autocomplete: Q,
174
174
  fullWidth: X
175
- } = ue(o), a = c(null), p = c(!0), d = c(!1), w = c(!1), S = c(!1), Y = me(), h = c(""), n = c(!1), I = () => {
175
+ } = ue(o), a = c(null), p = c(!0), d = c(!1), w = c(!1), S = c(!1), Y = me(), h = c(""), n = c(!1), C = () => {
176
176
  if (a.value)
177
177
  if (v.value === "number") {
178
178
  const e = a.value, t = e.value !== "" || e.selectionStart !== null && e.selectionStart > 0 || e.validity.badInput;
@@ -199,14 +199,13 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
199
199
  }
200
200
  K === "" && !t.validity.badInput && (n.value = !1);
201
201
  } else t.value === "" && x.value === null && (k = null);
202
- u("update:modelValue", k), I();
202
+ u("update:modelValue", k), C();
203
203
  }, le = () => {
204
204
  S.value = !0;
205
205
  }, D = () => {
206
- var t;
207
- const e = ((t = a.value) == null ? void 0 : t.value.trim()) || "";
208
- n.value = e !== "", d.value = !1, w.value = !1, S.value = !1, e === "" && (h.value = ""), I();
209
- }, R = () => {
206
+ const e = a.value?.value.trim() || "";
207
+ n.value = e !== "", d.value = !1, w.value = !1, S.value = !1, e === "" && (h.value = ""), C();
208
+ }, M = () => {
210
209
  d.value = !0, w.value = !S.value, S.value = !1;
211
210
  }, ae = (e) => {
212
211
  u("keydown", e);
@@ -218,7 +217,7 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
218
217
  u("change", e);
219
218
  }, re = y(() => {
220
219
  const e = [];
221
- return h.value && e.push(h.value), (x.value !== null && String(x.value).trim().length > 0 || n.value || d.value) && e.push("rds-e-textfield--filled"), C.value && e.push("rds-e-textfield--error"), B.value && e.push("rds-e-textfield--disabled"), X.value && e.push("rds-e-textfield--full-width"), e.join(" ");
220
+ return h.value && e.push(h.value), (x.value !== null && String(x.value).trim().length > 0 || n.value || d.value) && e.push("rds-e-textfield--filled"), B.value && e.push("rds-e-textfield--error"), I.value && e.push("rds-e-textfield--disabled"), X.value && e.push("rds-e-textfield--full-width"), e.join(" ");
222
221
  });
223
222
  P(
224
223
  () => x.value,
@@ -277,7 +276,7 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
277
276
  (e) => p.value = !e,
278
277
  { immediate: !0 }
279
278
  );
280
- const M = (e) => {
279
+ const R = (e) => {
281
280
  const t = pe.includes(e);
282
281
  return t || console.warn(`[RDSTextfield]: El icono "${e}" no es un icono válido.`), t;
283
282
  }, q = (e) => {
@@ -286,12 +285,12 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
286
285
  t.matches(":-webkit-autofill") && e.animationName.startsWith("onAutoFillStart") && t.value.trim().length > 0 && (h.value = "rds-e-textfield--filled", n.value = !0);
287
286
  };
288
287
  return de(() => {
289
- a.value && (a.value.addEventListener("animationstart", q), I());
288
+ a.value && (a.value.addEventListener("animationstart", q), C());
290
289
  }), ce(() => {
291
290
  a.value && a.value.removeEventListener("animationstart", q);
292
291
  }), r({
293
292
  focus: () => {
294
- a.value && (a.value.focus(), R());
293
+ a.value && (a.value.focus(), M());
295
294
  },
296
295
  blur: () => {
297
296
  a.value && (a.value.blur(), D());
@@ -312,7 +311,7 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
312
311
  name: "loading",
313
312
  class: "rds-e-textfield__icon--loading"
314
313
  })) : _("", !0),
315
- s.value.left.name && M(s.value.left.name) && !l.loading ? (m(), E(F, j({
314
+ s.value.left.name && R(s.value.left.name) && !l.loading ? (m(), E(F, j({
316
315
  key: 1,
317
316
  class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden": d.value }],
318
317
  "aria-hidden": "true"
@@ -327,13 +326,13 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
327
326
  class: "rds-e-textfield__input",
328
327
  maxlength: o.type === "number" ? void 0 : o.maxLength,
329
328
  minlength: o.type === "number" ? void 0 : o.minLength,
330
- disabled: f(B),
329
+ disabled: f(I),
331
330
  value: o.modelValue === null ? "" : o.modelValue,
332
331
  autocomplete: ee.value,
333
332
  readonly: l.readonly,
334
333
  onInput: te,
335
334
  onBlur: D,
336
- onFocus: R,
335
+ onFocus: M,
337
336
  onKeydown: ae,
338
337
  onKeyup: ne,
339
338
  onKeypress: oe,
@@ -341,12 +340,12 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
341
340
  }, null, 40, ge),
342
341
  g("label", {
343
342
  for: $.value,
344
- class: V(["rds-e-textfield__label", f(B) ? "rds-e-textfield__label--disabled" : ""])
343
+ class: V(["rds-e-textfield__label", f(I) ? "rds-e-textfield__label--disabled" : ""])
345
344
  }, W(f(O)), 11, _e)
346
345
  ]),
347
346
  s.value.right.name || e.$slots["right-icon"] ? (m(), L("span", xe, [
348
347
  T(e.$slots, "right-icon", {}, () => [
349
- s.value.right.name && M(s.value.right.name) ? (m(), E(F, j({
348
+ s.value.right.name && R(s.value.right.name) ? (m(), E(F, j({
350
349
  key: 0,
351
350
  "aria-hidden": "true",
352
351
  class: "rds-e-textfield__icon rds-e-textfield__icon--right"
@@ -356,16 +355,16 @@ import './style/textField.css';const ye = { class: "rds-e-textfield__input-conta
356
355
  ], !0)
357
356
  ])) : _("", !0)
358
357
  ], 34),
359
- f(H) || f(C) ? (m(), L("div", be, [
358
+ f(H) || f(B) ? (m(), L("div", be, [
360
359
  T(e.$slots, "helper-text", {}, () => [
361
360
  g("span", {
362
- class: V(f(C) ? "rds-e-textfield__helper--error" : "")
361
+ class: V(f(B) ? "rds-e-textfield__helper--error" : "")
363
362
  }, W(f(G)), 3)
364
363
  ], !0)
365
364
  ])) : _("", !0)
366
365
  ], 2));
367
366
  }
368
- }), Be = /* @__PURE__ */ he(we, [["__scopeId", "data-v-f6902be3"]]);
367
+ }), Ie = /* @__PURE__ */ he(we, [["__scopeId", "data-v-f6902be3"]]);
369
368
  export {
370
- Be as default
369
+ Ie as default
371
370
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as T, toRefs as E, ref as L, onMounted as y, createElementBlock as B, openBlock as F, normalizeClass as g, createElementVNode as m, unref as u, toDisplayString as v } from "vue";
2
- import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import './style/toggle.css';const R = ["id"], G = ["id"], H = ["id"], W = /* @__PURE__ */ T({
1
+ import { defineComponent as T, toRefs as L, ref as R, onMounted as y, createElementBlock as V, openBlock as E, normalizeClass as n, createElementVNode as c, unref as i, toDisplayString as f } from "vue";
2
+ import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ import './style/toggle.css';const B = ["id"], F = ["id"], I = ["id"], G = /* @__PURE__ */ T({
4
4
  __name: "toggle",
5
5
  props: {
6
6
  small: { type: Boolean },
@@ -14,18 +14,18 @@ import './style/toggle.css';const R = ["id"], G = ["id"], H = ["id"], W = /* @__
14
14
  id: {}
15
15
  },
16
16
  emits: ["update:modelValue"],
17
- setup(e, { emit: r }) {
18
- const b = e, d = r, { modelValue: t, switchType: i, valueLeft: n, valueRight: a } = E(b), l = {
17
+ setup(e, { emit: h }) {
18
+ const r = e, a = h, { modelValue: d, switchType: u, valueLeft: g, valueRight: s } = L(r), l = {
19
19
  LEFT: "left",
20
20
  RIGHT: "right"
21
- }, o = L(l.LEFT), c = (f) => {
22
- d("update:modelValue", f);
21
+ }, t = R(l.LEFT), m = (v) => {
22
+ a("update:modelValue", v);
23
23
  };
24
24
  return y(() => {
25
- i != null && i.value ? (d("update:modelValue", t == null ? void 0 : t.value), o.value = t != null && t.value ? l.RIGHT : l.LEFT) : (t == null ? void 0 : t.value) === (a == null ? void 0 : a.value) ? (d("update:modelValue", a == null ? void 0 : a.value), o.value = l.RIGHT) : (d("update:modelValue", n == null ? void 0 : n.value), o.value = l.LEFT);
26
- }), (f, s) => (F(), B("div", {
25
+ u?.value ? (a("update:modelValue", d?.value), t.value = d?.value ? l.RIGHT : l.LEFT) : d?.value === s?.value ? (a("update:modelValue", s?.value), t.value = l.RIGHT) : (a("update:modelValue", g?.value), t.value = l.LEFT);
26
+ }), (v, o) => (E(), V("div", {
27
27
  id: e.id,
28
- class: g(["rds-e-toggle", [
28
+ class: n(["rds-e-toggle", [
29
29
  {
30
30
  "rds-e-toggle--small-full-width": e.small && e.fullWidth,
31
31
  "rds-e-toggle--full-width": e.fullWidth && !e.small,
@@ -34,25 +34,25 @@ import './style/toggle.css';const R = ["id"], G = ["id"], H = ["id"], W = /* @__
34
34
  }
35
35
  ]])
36
36
  }, [
37
- m("button", {
37
+ c("button", {
38
38
  id: e.id ? `${e.id}-left` : void 0,
39
- class: g(["rds-e-toggle__tab", {
40
- "rds-e-toggle__tab--active": o.value === l.LEFT
39
+ class: n(["rds-e-toggle__tab", {
40
+ "rds-e-toggle__tab--active": t.value === l.LEFT
41
41
  }]),
42
42
  type: "button",
43
- onClick: s[0] || (s[0] = (h) => (c(u(i) ? !0 : u(n)), o.value = l.LEFT))
44
- }, v(e.labelLeft), 11, G),
45
- m("button", {
43
+ onClick: o[0] || (o[0] = (b) => (m(i(u) ? !0 : i(g)), t.value = l.LEFT))
44
+ }, f(e.labelLeft), 11, F),
45
+ c("button", {
46
46
  id: e.id ? `${e.id}-right` : void 0,
47
- class: g(["rds-e-toggle__tab", {
48
- "rds-e-toggle__tab--active": o.value === l.RIGHT
47
+ class: n(["rds-e-toggle__tab", {
48
+ "rds-e-toggle__tab--active": t.value === l.RIGHT
49
49
  }]),
50
50
  type: "button",
51
- onClick: s[1] || (s[1] = (h) => (c(u(i) ? !1 : u(a)), o.value = l.RIGHT))
52
- }, v(e.labelRight), 11, H)
53
- ], 10, R));
51
+ onClick: o[1] || (o[1] = (b) => (m(i(u) ? !1 : i(s)), t.value = l.RIGHT))
52
+ }, f(e.labelRight), 11, I)
53
+ ], 10, B));
54
54
  }
55
- }), C = /* @__PURE__ */ I(W, [["__scopeId", "data-v-be1c5818"]]);
55
+ }), k = /* @__PURE__ */ w(G, [["__scopeId", "data-v-be1c5818"]]);
56
56
  export {
57
- C as default
57
+ k as default
58
58
  };