energy-components 1.0.2 → 1.0.4

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 (79) hide show
  1. package/dist/components/accordion.es.js +44 -45
  2. package/dist/components/accordionGroup.es.js +12 -12
  3. package/dist/components/actionButton.es.js +2 -2
  4. package/dist/components/breadcrumbs.es.js +8 -8
  5. package/dist/components/button.es.js +20 -20
  6. package/dist/components/card.es.js +12 -0
  7. package/dist/components/checkbox.es.js +16 -16
  8. package/dist/components/datepicker.es.js +8208 -0
  9. package/dist/components/divider.es.js +6 -6
  10. package/dist/components/dropdown.es.js +55 -47
  11. package/dist/components/floatingActionButton.es.js +4 -4
  12. package/dist/components/{icon-svg-Cpx09myr.js → icon-svg-CEZ-L3iv.js} +6 -5
  13. package/dist/components/iconList.es.js +10 -10
  14. package/dist/components/iconSvg.es.js +1 -1
  15. package/dist/components/index.es.js +84 -63
  16. package/dist/components/indicator.es.js +21 -21
  17. package/dist/components/infoBox.es.js +152 -0
  18. package/dist/components/link.es.js +21 -21
  19. package/dist/components/modal.es.js +96 -0
  20. package/dist/components/overlay.es.js +31 -0
  21. package/dist/components/pagination.es.js +20 -20
  22. package/dist/components/persistentToast.es.js +130 -0
  23. package/dist/components/radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js +28 -0
  24. package/dist/components/radioButton.es.js +69 -57
  25. package/dist/components/radioGroup.es.js +4 -0
  26. package/dist/components/style/accordion.css +1 -1
  27. package/dist/components/style/accordionGroup.css +1 -1
  28. package/dist/components/style/actionButton.css +1 -1
  29. package/dist/components/style/breadcrumbs.css +1 -1
  30. package/dist/components/style/button.css +1 -1
  31. package/dist/components/style/card.css +1 -0
  32. package/dist/components/style/checkbox.css +1 -1
  33. package/dist/components/style/datepicker.css +1 -0
  34. package/dist/components/style/divider.css +1 -1
  35. package/dist/components/style/dropdown.css +1 -1
  36. package/dist/components/style/floatingActionButton.css +1 -1
  37. package/dist/components/style/icon-svg.css +1 -1
  38. package/dist/components/style/iconList.css +1 -1
  39. package/dist/components/style/indicator.css +1 -1
  40. package/dist/components/style/infoBox.css +1 -0
  41. package/dist/components/style/link.css +1 -1
  42. package/dist/components/style/modal.css +1 -0
  43. package/dist/components/style/multiselect.css +1 -1
  44. package/dist/components/style/overlay.css +1 -0
  45. package/dist/components/style/pagination.css +1 -1
  46. package/dist/components/style/persistentToast.css +1 -0
  47. package/dist/components/style/radioButton.css +1 -1
  48. package/dist/components/style/switch.css +1 -1
  49. package/dist/components/style/tabBar.css +1 -1
  50. package/dist/components/style/tag.css +1 -1
  51. package/dist/components/style/textArea.css +1 -1
  52. package/dist/components/style/textField.css +1 -1
  53. package/dist/components/style/tooltip.css +1 -1
  54. package/dist/components/switch.es.js +14 -14
  55. package/dist/components/tabBar.es.js +35 -35
  56. package/dist/components/tag.es.js +12 -12
  57. package/dist/components/textArea.es.js +31 -31
  58. package/dist/components/textField.es.js +52 -50
  59. package/dist/components/tooltip.es.js +59 -59
  60. package/dist/energy-components.es.js +10417 -1771
  61. package/dist/energy-components.umd.js +1 -1
  62. package/dist/style.css +1 -1
  63. package/dist/types/src/components/content/accordion/accordion.vue.d.ts +0 -2
  64. package/dist/types/src/components/content/card/card.vue.d.ts +24 -0
  65. package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +134 -0
  66. package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +161 -0
  67. package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +2 -0
  68. package/dist/types/src/components/index.d.ts +7 -0
  69. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +15 -0
  70. package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +13 -32
  71. package/dist/types/src/components/input/radio-button/radio-group.vue.d.ts +50 -0
  72. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +2 -2
  73. package/dist/types/src/components/navigation/link/link.vue.d.ts +1 -1
  74. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +186 -0
  75. package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +46 -0
  76. package/dist/types/src/helpers/getInstance.d.ts +6 -0
  77. package/dist/types/src/helpers/mobileMockup.vue.d.ts +9 -0
  78. package/dist/types/tsconfig.tsbuildinfo +1 -1
  79. package/package.json +3 -2
@@ -1,10 +1,10 @@
1
- import { defineComponent as v, ref as c, onMounted as k, onBeforeUnmount as y, openBlock as n, createElementBlock as i, normalizeClass as g, createElementVNode as r, renderSlot as S, createTextVNode as p, toDisplayString as B, createBlock as V, createCommentVNode as u } from "vue";
2
- import { R as x } from "./icon-svg-Cpx09myr.js";
1
+ import { defineComponent as v, ref as i, onMounted as k, onBeforeUnmount as y, openBlock as n, createElementBlock as c, normalizeClass as g, createElementVNode as r, renderSlot as p, createTextVNode as S, toDisplayString as B, createBlock as V, createCommentVNode as u } from "vue";
2
+ import { I as x } from "./icon-svg-CEZ-L3iv.js";
3
3
  import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/switch.css';const _ = ["id", "disabled", "checked"], N = ["for", "aria-label"], C = {
5
5
  key: 0,
6
- class: "rds-switch__label-text"
7
- }, D = /* @__PURE__ */ v({
6
+ class: "rds-e-switch__label-text"
7
+ }, L = /* @__PURE__ */ v({
8
8
  __name: "switch",
9
9
  props: {
10
10
  /**
@@ -45,7 +45,7 @@ import './style/switch.css';const _ = ["id", "disabled", "checked"], N = ["for",
45
45
  },
46
46
  emits: ["update:modelValue"],
47
47
  setup(e, { emit: m }) {
48
- const f = e, l = m, a = c(!1), o = c(!1), h = () => {
48
+ const f = e, l = m, a = i(!1), o = i(!1), h = () => {
49
49
  o.value && (a.value = !0);
50
50
  }, w = () => a.value = !1, s = (t) => {
51
51
  t.key === "Tab" && (o.value = !0);
@@ -58,12 +58,12 @@ import './style/switch.css';const _ = ["id", "disabled", "checked"], N = ["for",
58
58
  l("update:modelValue", f.checked), window.addEventListener("keydown", s), window.addEventListener("mousedown", d);
59
59
  }), y(() => {
60
60
  window.removeEventListener("keydown", s), window.removeEventListener("mousedown", d);
61
- }), (t, L) => (n(), i("div", {
62
- class: g(["rds-switch", { "rds-switch--focused": a.value }])
61
+ }), (t, D) => (n(), c("div", {
62
+ class: g(["rds-e-switch", { "rds-e-switch--focused": a.value }])
63
63
  }, [
64
64
  r("input", {
65
65
  id: e.id.toString(),
66
- class: "rds-switch__input",
66
+ class: "rds-e-switch__input",
67
67
  type: "checkbox",
68
68
  disabled: e.disabled,
69
69
  checked: e.checked,
@@ -72,25 +72,25 @@ import './style/switch.css';const _ = ["id", "disabled", "checked"], N = ["for",
72
72
  onBlur: w
73
73
  }, null, 40, _),
74
74
  r("label", {
75
- class: "rds-switch__label",
75
+ class: "rds-e-switch__label",
76
76
  for: e.id.toString(),
77
77
  "aria-label": e.label
78
78
  }, [
79
- e.label || t.$slots["text-label"] ? (n(), i("span", C, [
80
- S(t.$slots, "text-label", {}, () => [
81
- p(B(e.label), 1)
79
+ e.label || t.$slots["text-label"] ? (n(), c("span", C, [
80
+ p(t.$slots, "text-label", {}, () => [
81
+ S(B(e.label), 1)
82
82
  ], !0),
83
83
  e.icon ? (n(), V(x, {
84
84
  key: 0,
85
85
  name: e.icon,
86
- class: "rds-switch__label-icon",
86
+ class: "rds-e-switch__label-icon",
87
87
  "aria-hidden": "true"
88
88
  }, null, 8, ["name"])) : u("", !0)
89
89
  ])) : u("", !0)
90
90
  ], 8, N)
91
91
  ], 2));
92
92
  }
93
- }), M = /* @__PURE__ */ E(D, [["__scopeId", "data-v-69c77348"]]);
93
+ }), M = /* @__PURE__ */ E(L, [["__scopeId", "data-v-5f2be083"]]);
94
94
  export {
95
95
  M as default
96
96
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as N, mergeModels as B, toRefs as W, useModel as D, ref as m, computed as h, onMounted as K, nextTick as $, onUnmounted as F, watch as L, openBlock as s, createElementBlock as d, normalizeClass as u, createVNode as R, createCommentVNode as g, createElementVNode as f, Fragment as q, renderList as H, unref as O, withKeys as S, withModifiers as V, createBlock as P, createTextVNode as U, toDisplayString as j, renderSlot as G } from "vue";
2
- import { R as w } from "./icon-svg-Cpx09myr.js";
1
+ import { defineComponent as N, mergeModels as B, toRefs as W, useModel as K, ref as m, computed as h, onMounted as $, nextTick as D, onUnmounted as F, watch as L, openBlock as s, createElementBlock as d, normalizeClass as u, createVNode as S, createCommentVNode as g, createElementVNode as v, Fragment as q, renderList as H, unref as O, withKeys as V, withModifiers as A, createBlock as P, createTextVNode as U, toDisplayString as j, renderSlot as G } from "vue";
2
+ import { I as w } from "./icon-svg-CEZ-L3iv.js";
3
3
  import { d as J } from "./functions-DIHwdgF0.js";
4
4
  import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "onKeydown"], Y = { class: "rds-top-bar__item-title" }, Z = {
6
- class: "rds-top-bar__content",
5
+ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "onKeydown"], Y = { class: "rds-e-top-bar__item-title" }, Z = {
6
+ class: "rds-e-top-bar__content",
7
7
  role: "tabpanel"
8
8
  }, ee = /* @__PURE__ */ N({
9
9
  __name: "tab-bar",
@@ -49,8 +49,8 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
49
49
  */
50
50
  beforeTabChange: {
51
51
  type: Function,
52
- default: (o, v) => {
53
- if (o === v.id) return Promise.resolve(!0);
52
+ default: (o, f) => {
53
+ if (o === f.id) return Promise.resolve(!0);
54
54
  }
55
55
  }
56
56
  }, {
@@ -61,10 +61,10 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
61
61
  activeTabModifiers: {}
62
62
  }),
63
63
  emits: /* @__PURE__ */ B(["activeTabChanged"], ["update:activeTab"]),
64
- setup(o, { emit: v }) {
65
- const i = o, A = v, {
64
+ setup(o, { emit: f }) {
65
+ const i = o, M = f, {
66
66
  options: n
67
- } = W(i), M = D(o, "activeTab"), a = m(""), b = m(null), l = m(null);
67
+ } = W(i), R = K(o, "activeTab"), a = m(""), b = m(null), l = m(null);
68
68
  let p = [];
69
69
  const y = h(() => l.value ? l.value.scrollWidth > l.value.clientWidth : !1), z = h(() => n.value.findIndex((t) => t.id === a.value) > 0 && y.value), E = h(() => l.value ? n.value.findIndex((t) => t.id === a.value) < i.options.length - 1 && y.value : !1), k = (e) => {
70
70
  const t = i.options.find((r) => r.id === a.value);
@@ -92,47 +92,47 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
92
92
  const C = () => {
93
93
  T(a.value);
94
94
  };
95
- return K(async () => {
96
- await $(), b.value && (p = Array.from(
95
+ return $(async () => {
96
+ await D(), b.value && (p = Array.from(
97
97
  b.value.children
98
98
  )), a.value = i.options[0].id ?? "", window.addEventListener("resize", J(C, 200));
99
99
  }), F(() => {
100
100
  window.removeEventListener("resize", C);
101
101
  }), L(a, (e) => {
102
- T(e), A("activeTabChanged", k(!1));
103
- }), L(M, (e) => c(e)), (e, t) => (s(), d("div", {
104
- class: u(["rds-top-bar", {
105
- "rds-top-bar--fluid": o.fluid,
106
- "rds-top-bar--divider": o.divider
102
+ T(e), M("activeTabChanged", k(!1));
103
+ }), L(R, (e) => c(e)), (e, t) => (s(), d("div", {
104
+ class: u(["rds-e-top-bar", {
105
+ "rds-e-top-bar--fluid": o.fluid,
106
+ "rds-e-top-bar--divider": o.divider
107
107
  }])
108
108
  }, [
109
109
  z.value ? (s(), d("div", {
110
110
  key: 0,
111
111
  class: u([
112
- "rds-top-bar__button",
113
- o.backgroundAlternative ? "rds-top-bar__button--left-bg2" : "rds-top-bar__button--left"
112
+ "rds-e-top-bar__button",
113
+ o.backgroundAlternative ? "rds-e-top-bar__button--left-bg2" : "rds-e-top-bar__button--left"
114
114
  ]),
115
115
  onClick: x
116
116
  }, [
117
- R(w, {
118
- class: "rds-top-bar__icon",
117
+ S(w, {
118
+ class: "rds-e-top-bar__icon",
119
119
  name: "arrow_left"
120
120
  })
121
121
  ], 2)) : g("", !0),
122
- f("div", {
122
+ v("div", {
123
123
  ref_key: "tabsListWrapper",
124
124
  ref: l,
125
- class: "rds-top-bar__wrapper"
125
+ class: "rds-e-top-bar__wrapper"
126
126
  }, [
127
- f("ul", {
127
+ v("ul", {
128
128
  ref_key: "tabsList",
129
129
  ref: b,
130
- class: "rds-top-bar__list",
130
+ class: "rds-e-top-bar__list",
131
131
  role: "tablist"
132
132
  }, [
133
133
  (s(!0), d(q, null, H(O(n), (r, _) => (s(), d("li", {
134
134
  key: _,
135
- class: u(["rds-top-bar__item", {
135
+ class: u(["rds-e-top-bar__item", {
136
136
  active: a.value === r.id
137
137
  }]),
138
138
  role: "tab",
@@ -140,14 +140,14 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
140
140
  tabindex: a.value === r.id ? 0 : -1,
141
141
  onClick: (te) => c(r.id),
142
142
  onKeydown: [
143
- S(V(x, ["prevent"]), ["left"]),
144
- S(V(I, ["prevent"]), ["right"])
143
+ V(A(x, ["prevent"]), ["left"]),
144
+ V(A(I, ["prevent"]), ["right"])
145
145
  ]
146
146
  }, [
147
- f("span", Y, [
147
+ v("span", Y, [
148
148
  r.icon ? (s(), P(w, {
149
149
  key: 0,
150
- class: "rds-top-bar__item-title--icon",
150
+ class: "rds-e-top-bar__item-title--icon",
151
151
  name: r.icon
152
152
  }, null, 8, ["name"])) : g("", !0),
153
153
  U(" " + j(r.title), 1)
@@ -158,24 +158,24 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
158
158
  E.value ? (s(), d("div", {
159
159
  key: 1,
160
160
  class: u([
161
- "rds-top-bar__button",
162
- o.backgroundAlternative ? "rds-top-bar__button--right-bg2" : "rds-top-bar__button--right"
161
+ "rds-e-top-bar__button",
162
+ o.backgroundAlternative ? "rds-e-top-bar__button--right-bg2" : "rds-e-top-bar__button--right"
163
163
  ]),
164
164
  onClick: I
165
165
  }, [
166
- R(w, {
167
- class: "rds-top-bar__icon",
166
+ S(w, {
167
+ class: "rds-e-top-bar__icon",
168
168
  name: "arrow_right"
169
169
  })
170
170
  ], 2)) : g("", !0),
171
- f("div", Z, [
171
+ v("div", Z, [
172
172
  G(e.$slots, a.value, {
173
173
  tab: k(!0)
174
174
  }, void 0, !0)
175
175
  ])
176
176
  ], 2));
177
177
  }
178
- }), ie = /* @__PURE__ */ Q(ee, [["__scopeId", "data-v-1eaefe52"]]);
178
+ }), ie = /* @__PURE__ */ Q(ee, [["__scopeId", "data-v-26223c41"]]);
179
179
  export {
180
180
  ie as default
181
181
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as h, toRefs as x, computed as u, openBlock as o, createElementBlock as $, normalizeClass as r, unref as t, createBlock as p, createCommentVNode as d, createTextVNode as S, toDisplayString as B } from "vue";
2
- import { R as f } from "./icon-svg-Cpx09myr.js";
3
- import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/tag.css';const k = /* @__PURE__ */ h({
1
+ import { defineComponent as h, toRefs as x, computed as u, openBlock as o, createElementBlock as $, normalizeClass as r, unref as t, createBlock as p, createCommentVNode as d, createTextVNode as B, toDisplayString as S } from "vue";
2
+ import { I as f } from "./icon-svg-CEZ-L3iv.js";
3
+ import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import './style/tag.css';const C = /* @__PURE__ */ h({
5
5
  __name: "tag",
6
6
  props: {
7
7
  /**
@@ -61,31 +61,31 @@ import './style/tag.css';const k = /* @__PURE__ */ h({
61
61
  inverse: g,
62
62
  small: v
63
63
  } = x(m), y = u(() => {
64
- const a = "rds-tag", e = [];
64
+ const a = "rds-e-tag", e = [];
65
65
  return g.value && e.push(`${a}--inverse`), c.value && e.push(`${a}--actionable`), n.value && e.push(`${a}--icon`), v.value && e.push(`${a}--small`), e.push(`${a}--${l.value}`), e.join(" ");
66
66
  }), i = u(() => {
67
- const a = "rds-tag_icon", e = [];
67
+ const a = "rds-e-tag_icon", e = [];
68
68
  return e.push(`${a}--${l.value}`), e.join(" ");
69
69
  });
70
70
  return (a, e) => (o(), $("div", {
71
- class: r(["rds-tag rds-caption-tag", y.value])
71
+ class: r(["rds-e-tag rds-e-caption-tag", y.value])
72
72
  }, [
73
73
  t(n) ? (o(), p(f, {
74
74
  key: 0,
75
75
  name: t(n),
76
- class: r(["rds-tag__icon", i.value]),
76
+ class: r(["rds-e-tag__icon", i.value]),
77
77
  "aria-hidden": "true"
78
78
  }, null, 8, ["name", "class"])) : d("", !0),
79
- S(" " + B(t(_)) + " ", 1),
79
+ B(" " + S(t(_)) + " ", 1),
80
80
  t(c) ? (o(), p(f, {
81
81
  key: 1,
82
82
  name: "arrow_right",
83
- class: r(["rds-tag__icon-actionable", i.value]),
83
+ class: r(["rds-e-tag__icon-actionable", i.value]),
84
84
  "aria-hidden": "true"
85
85
  }, null, 8, ["class"])) : d("", !0)
86
86
  ], 2));
87
87
  }
88
- }), D = /* @__PURE__ */ b(k, [["__scopeId", "data-v-9781baa5"]]);
88
+ }), j = /* @__PURE__ */ k(C, [["__scopeId", "data-v-e784d437"]]);
89
89
  export {
90
- D as default
90
+ j as default
91
91
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as H, mergeModels as U, useModel as F, toRefs as G, computed as o, openBlock as l, createElementBlock as h, normalizeClass as g, createElementVNode as a, withDirectives as J, unref as t, vModelText as K, renderSlot as x, createBlock as C, mergeProps as M, toHandlers as q, createCommentVNode as s, createTextVNode as L, toDisplayString as i, pushScopeId as O, popScopeId as Q } from "vue";
2
- import { R as T } from "./icon-svg-Cpx09myr.js";
1
+ import { defineComponent as R, mergeModels as U, useModel as F, toRefs as G, computed as o, openBlock as l, createElementBlock as h, normalizeClass as g, createElementVNode as a, withDirectives as J, unref as t, vModelText as K, renderSlot as x, createBlock as C, mergeProps as M, toHandlers as q, createCommentVNode as s, createTextVNode as L, toDisplayString as i, pushScopeId as O, popScopeId as Q } from "vue";
2
+ import { I as T } from "./icon-svg-CEZ-L3iv.js";
3
3
  import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import './style/textArea.css';function y(e, f = !0, u = !0) {
5
- return f && !e.trim() ? (console.warn("Advertencia: El valor no puede estar vacío"), !1) : u && !/^[a-z0-9\s]+$/i.test(e) ? (console.warn("Advertencia: El valor contiene caracteres inválidos"), !1) : !0;
5
+ return f && !e.trim() ? (console.warn("Advertencia: El valor no puede estar vacío"), !1) : u && !/^[\w\-:]+$/.test(e) ? (console.warn("Advertencia: El valor contiene caracteres inválidos"), !1) : !0;
6
6
  }
7
- const X = (e) => (O("data-v-dc860073"), e = e(), Q(), e), Y = { class: "rds-textarea__container" }, Z = { class: "rds-textarea__input-container" }, ee = ["id", "name", "maxlength", "minlength", "rows", "disabled"], te = /* @__PURE__ */ X(() => /* @__PURE__ */ a("div", { class: "rds-textarea__resize-handle" }, [
7
+ const X = (e) => (O("data-v-a9a6a677"), e = e(), Q(), e), Y = { class: "rds-e-textarea__container" }, Z = { class: "rds-e-textarea__input-container" }, ee = ["id", "name", "maxlength", "minlength", "rows", "disabled"], te = /* @__PURE__ */ X(() => /* @__PURE__ */ a("div", { class: "rds-e-textarea__resize-handle" }, [
8
8
  /* @__PURE__ */ a("svg", {
9
9
  width: "12",
10
10
  height: "14",
@@ -18,7 +18,7 @@ const X = (e) => (O("data-v-dc860073"), e = e(), Q(), e), Y = { class: "rds-text
18
18
  "stroke-linecap": "round"
19
19
  })
20
20
  ])
21
- ], -1)), re = ["for"], ae = { key: 0 }, le = { key: 0 }, ne = { key: 1 }, oe = { key: 0 }, se = /* @__PURE__ */ H({
21
+ ], -1)), re = ["for"], ae = { key: 0 }, le = { key: 0 }, ne = { key: 1 }, oe = { key: 0 }, se = /* @__PURE__ */ R({
22
22
  __name: "text-area",
23
23
  props: /* @__PURE__ */ U({
24
24
  /**
@@ -151,22 +151,22 @@ const X = (e) => (O("data-v-dc860073"), e = e(), Q(), e), Y = { class: "rds-text
151
151
  emits: ["update:modelValue"],
152
152
  setup(e) {
153
153
  const f = e, u = F(e, "modelValue"), {
154
- label: S,
155
- id: b,
154
+ label: b,
155
+ id: w,
156
156
  disabled: p,
157
157
  maxlength: v,
158
158
  minlength: m,
159
159
  modelValue: d,
160
160
  icon: $,
161
- rightIcon: w,
162
- helper: z,
161
+ rightIcon: S,
162
+ helper: A,
163
163
  error: _,
164
- helperText: A,
164
+ helperText: z,
165
165
  clearable: k,
166
166
  lengthError: D
167
- } = G(f), V = o(() => d.value.length === v.value), B = o(() => d.value.length === 0 ? !1 : d.value.length < m.value), E = o(() => D.value && (V.value || B.value)), R = o(() => {
167
+ } = G(f), V = o(() => d.value.length === v.value), B = o(() => d.value.length === 0 ? !1 : d.value.length < m.value), E = o(() => D.value && (V.value || B.value)), P = o(() => {
168
168
  const r = [];
169
- return d.value && r.push("rds-textarea--filled"), _.value && r.push("rds-textarea--error"), p.value && r.push("rds-textarea--disabled"), E.value && r.push("rds-textarea--error"), r.join(" ");
169
+ return d.value && r.push("rds-e-textarea--filled"), _.value && r.push("rds-e-textarea--error"), p.value && r.push("rds-e-textarea--disabled"), E.value && r.push("rds-e-textarea--error"), r.join(" ");
170
170
  }), n = o(() => {
171
171
  const r = {
172
172
  name: $.value,
@@ -177,29 +177,29 @@ const X = (e) => (O("data-v-dc860073"), e = e(), Q(), e), Y = { class: "rds-text
177
177
  }
178
178
  }, c = {
179
179
  left: { ...r },
180
- right: { ...r, name: w.value }
180
+ right: { ...r, name: S.value }
181
181
  };
182
182
  return k.value && (c.right = {
183
183
  ...r,
184
184
  name: "close",
185
- class: "rds-textfield__icon--clear",
185
+ class: "rds-e-textfield__icon--clear",
186
186
  events: {
187
187
  click: () => u.value = ""
188
188
  }
189
189
  }), c;
190
- }), P = o(() => d.value.length);
190
+ }), j = o(() => d.value.length);
191
191
  return (r, c) => {
192
192
  var I, N;
193
193
  return l(), h("div", {
194
- class: g(["rds-textarea", R.value])
194
+ class: g(["rds-e-textarea", P.value])
195
195
  }, [
196
196
  a("div", Y, [
197
197
  a("div", Z, [
198
198
  J(a("textarea", {
199
- id: (I = t(b)) == null ? void 0 : I.toString(),
200
- "onUpdate:modelValue": c[0] || (c[0] = (j) => u.value = j),
199
+ id: (I = t(w)) == null ? void 0 : I.toString(),
200
+ "onUpdate:modelValue": c[0] || (c[0] = (H) => u.value = H),
201
201
  type: "text",
202
- class: "rds-textarea__input",
202
+ class: "rds-e-textarea__input",
203
203
  name: e.name,
204
204
  maxlength: t(v),
205
205
  minlength: t(m),
@@ -210,29 +210,29 @@ const X = (e) => (O("data-v-dc860073"), e = e(), Q(), e), Y = { class: "rds-text
210
210
  ]),
211
211
  te,
212
212
  a("label", {
213
- for: (N = t(b)) == null ? void 0 : N.toString(),
214
- class: "rds-textarea__label"
213
+ for: (N = t(w)) == null ? void 0 : N.toString(),
214
+ class: "rds-e-textarea__label"
215
215
  }, [
216
216
  x(r.$slots, "left-icon", {}, () => [
217
217
  n.value.left.name ? (l(), C(T, M({
218
218
  key: 0,
219
- class: "rds-textarea__icon rds-textarea__icon--left",
219
+ class: "rds-e-textarea__icon rds-e-textarea__icon--left",
220
220
  "aria-hidden": "true"
221
221
  }, n.value.left, q(n.value.left.events)), null, 16)) : s("", !0)
222
222
  ], !0),
223
- L(" " + i(t(S)), 1)
223
+ L(" " + i(t(b)), 1)
224
224
  ], 8, re),
225
225
  a("div", {
226
- class: g(["rds-textarea__counter", {
227
- "rds-textarea__counter--disabled": t(p),
228
- "rds-textarea__counter--clearable": t(k)
226
+ class: g(["rds-e-textarea__counter", {
227
+ "rds-e-textarea__counter--disabled": t(p),
228
+ "rds-e-textarea__counter--clearable": t(k)
229
229
  }])
230
230
  }, [
231
- e.counter && !t(w) ? (l(), h("p", ae, i(P.value) + "/" + i(t(v)), 1)) : s("", !0),
231
+ e.counter && !t(S) ? (l(), h("p", ae, i(j.value) + "/" + i(t(v)), 1)) : s("", !0),
232
232
  x(r.$slots, "right-icon", {}, () => [
233
233
  n.value.right.name ? (l(), C(T, M({
234
234
  key: 0,
235
- class: "rds-textarea__icon rds-textarea__icon--right",
235
+ class: "rds-e-textarea__icon rds-e-textarea__icon--right",
236
236
  "aria-hidden": "true"
237
237
  }, n.value.right, q(n.value.right.events)), null, 16)) : s("", !0)
238
238
  ], !0)
@@ -240,20 +240,20 @@ const X = (e) => (O("data-v-dc860073"), e = e(), Q(), e), Y = { class: "rds-text
240
240
  ])
241
241
  ]),
242
242
  a("ul", {
243
- class: g(["rds-textarea__helper", t(_) || E.value ? "rds-textarea__helper--error" : ""])
243
+ class: g(["rds-e-textarea__helper", t(_) || E.value ? "rds-e-textarea__helper--error" : ""])
244
244
  }, [
245
245
  V.value ? (l(), h("li", le, " Max text length is " + i(t(v)), 1)) : s("", !0),
246
246
  B.value ? (l(), h("li", ne, " Min text length is " + i(t(m)), 1)) : s("", !0),
247
247
  a("li", null, [
248
248
  x(r.$slots, "helper-text", {}, () => [
249
- t(z) || t(_) ? (l(), h("span", oe, i(t(A)), 1)) : s("", !0)
249
+ t(A) || t(_) ? (l(), h("span", oe, i(t(z)), 1)) : s("", !0)
250
250
  ], !0)
251
251
  ])
252
252
  ], 2)
253
253
  ], 2);
254
254
  };
255
255
  }
256
- }), ce = /* @__PURE__ */ W(se, [["__scopeId", "data-v-dc860073"]]);
256
+ }), ce = /* @__PURE__ */ W(se, [["__scopeId", "data-v-a9a6a677"]]);
257
257
  export {
258
258
  ce as default
259
259
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as P, toRefs as z, ref as F, computed as d, watch as H, openBlock as u, createElementBlock as m, normalizeClass as v, createElementVNode as n, renderSlot as h, createBlock as A, mergeProps as L, toHandlers as w, createCommentVNode as _, unref as t, toDisplayString as B, createVNode as G } from "vue";
2
- import { R as V } from "./icon-svg-Cpx09myr.js";
1
+ import { defineComponent as j, toRefs as P, ref as z, computed as d, watch as F, openBlock as u, createElementBlock as m, normalizeClass as h, createElementVNode as n, renderSlot as v, createBlock as H, mergeProps as k, toHandlers as M, createCommentVNode as _, unref as t, toDisplayString as w, createVNode as A, withModifiers as G } from "vue";
2
+ import { I as L } from "./icon-svg-CEZ-L3iv.js";
3
3
  import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/textField.css';const K = { class: "rds-textfield__container" }, M = { class: "rds-textfield__input-container" }, O = ["id", "type", "maxLength", "minLength", "disabled", "value", "autocomplete", "readonly"], Q = ["for"], U = {
4
+ import './style/textField.css';const K = { class: "rds-e-textfield__container" }, O = { class: "rds-e-textfield__input-container" }, Q = ["id", "type", "maxLength", "minLength", "disabled", "value", "autocomplete", "readonly"], U = ["for"], W = {
5
5
  key: 0,
6
- class: "rds-textfield__icon rds-textfield__icon--right"
7
- }, W = { class: "rds-textfield__helper" }, X = /* @__PURE__ */ P({
6
+ class: "rds-e-textfield__icon rds-e-textfield__icon--right"
7
+ }, X = { class: "rds-e-textfield__helper" }, Y = /* @__PURE__ */ j({
8
8
  __name: "text-field",
9
9
  props: {
10
10
  /**
@@ -126,46 +126,46 @@ import './style/textField.css';const K = { class: "rds-textfield__container" },
126
126
  emits: ["update:modelValue"],
127
127
  setup(l, { emit: c }) {
128
128
  const s = l, g = c, {
129
- label: k,
129
+ label: B,
130
130
  id: x,
131
131
  disabled: i,
132
132
  maxLength: y,
133
133
  minLength: b,
134
134
  modelValue: a,
135
- icon: E,
136
- rightIcon: I,
137
- helper: T,
135
+ icon: V,
136
+ rightIcon: E,
137
+ helper: I,
138
138
  error: f,
139
- helperText: R,
140
- clearable: $,
139
+ helperText: T,
140
+ clearable: C,
141
141
  password: p,
142
- autocomplete: D
143
- } = z(s), o = F(!0), q = d(() => {
142
+ autocomplete: $
143
+ } = P(s), o = z(!0), q = d(() => {
144
144
  if (p.value)
145
- return D.value;
146
- }), S = (e) => {
145
+ return $.value;
146
+ }), N = (e) => {
147
147
  g(
148
148
  "update:modelValue",
149
149
  e.target.value
150
150
  );
151
- }, C = d(() => !!(f.value || a.value.length && (a.value.length < b.value || a.value.length > y.value))), j = d(() => {
151
+ }, D = d(() => !!(f.value || a.value.length && (a.value.length < b.value || a.value.length > y.value))), R = d(() => {
152
152
  const e = [];
153
- return a.value && e.push("rds-textfield--filled"), C.value && e.push("rds-textfield--error"), i.value && e.push("rds-textfield--disabled"), e.join(" ");
153
+ return a.value && e.push("rds-e-textfield--filled"), D.value && e.push("rds-e-textfield--error"), i.value && e.push("rds-e-textfield--disabled"), e.join(" ");
154
154
  }), r = d(() => {
155
155
  const e = {
156
- name: E.value,
156
+ name: V.value,
157
157
  class: "",
158
158
  events: {
159
159
  click: () => {
160
160
  }
161
161
  }
162
- }, N = {
162
+ }, S = {
163
163
  left: {
164
164
  ...e
165
165
  },
166
166
  right: {
167
167
  ...e,
168
- name: I.value
168
+ name: E.value
169
169
  }
170
170
  };
171
171
  return p.value ? {
@@ -176,79 +176,81 @@ import './style/textField.css';const K = { class: "rds-textfield__container" },
176
176
  right: {
177
177
  ...e,
178
178
  name: o.value ? "eye_open" : "eye_close",
179
- class: "rds-textfield__icon--password",
179
+ class: "rds-e-textfield__icon--password",
180
180
  events: {
181
181
  click: () => o.value = !o.value
182
182
  }
183
183
  }
184
- } : $.value ? {
184
+ } : C.value ? {
185
185
  left: {
186
186
  ...e
187
187
  },
188
188
  right: {
189
189
  ...e,
190
190
  name: "close",
191
- class: "rds-textfield__icon--clear",
191
+ class: "rds-e-textfield__icon--clear",
192
192
  events: {
193
193
  click: () => g("update:modelValue", "")
194
194
  }
195
195
  }
196
- } : N;
196
+ } : S;
197
197
  });
198
- return H(
198
+ return F(
199
199
  p,
200
200
  (e) => o.value = !e,
201
201
  { immediate: !0 }
202
- ), (e, N) => (u(), m("div", {
203
- class: v(["rds-textfield", j.value])
202
+ ), (e, S) => (u(), m("div", {
203
+ class: h(["rds-e-textfield", R.value])
204
204
  }, [
205
205
  n("div", K, [
206
- h(e.$slots, "left-icon", {}, () => [
207
- r.value.left.name ? (u(), A(V, L({
206
+ v(e.$slots, "left-icon", {}, () => [
207
+ r.value.left.name ? (u(), H(L, k({
208
208
  key: 0,
209
- class: "rds-textfield__icon rds-textfield__icon--left",
209
+ class: "rds-e-textfield__icon rds-e-textfield__icon--left",
210
210
  "aria-hidden": "true"
211
- }, r.value.left, w(r.value.left.events)), null, 16)) : _("", !0)
211
+ }, r.value.left, M(r.value.left.events)), null, 16)) : _("", !0)
212
212
  ], !0),
213
- n("div", M, [
213
+ n("div", O, [
214
214
  n("input", {
215
215
  id: t(x).toString(),
216
216
  type: o.value ? "text" : "password",
217
- class: "rds-textfield__input",
217
+ class: "rds-e-textfield__input",
218
218
  maxLength: t(y),
219
219
  minLength: t(b),
220
220
  disabled: t(i),
221
221
  value: t(a),
222
222
  autocomplete: q.value,
223
223
  readonly: l.readonly,
224
- onInput: S,
225
- onBlur: S
226
- }, null, 40, O),
224
+ onInput: N,
225
+ onBlur: N
226
+ }, null, 40, Q),
227
227
  n("label", {
228
228
  for: t(x).toString(),
229
- class: v(["rds-textfield__label", t(i) ? "rds-textfield__label--disabled" : ""])
230
- }, B(t(k)), 11, Q)
229
+ class: h(["rds-e-textfield__label", t(i) ? "rds-e-textfield__label--disabled" : ""])
230
+ }, w(t(B)), 11, U)
231
231
  ]),
232
- r.value.right.name || e.$slots["right-icon"] ? (u(), m("span", U, [
233
- h(e.$slots, "right-icon", {}, () => [
234
- G(V, L({
232
+ r.value.right.name || e.$slots["right-icon"] ? (u(), m("span", W, [
233
+ v(e.$slots, "right-icon", {}, () => [
234
+ A(L, k({
235
235
  "aria-hidden": "true",
236
- class: "rds-textfield__icon rds-textfield__icon--right"
237
- }, r.value.right, w(r.value.right.events)), null, 16)
236
+ class: "rds-e-textfield__icon rds-e-textfield__icon--right"
237
+ }, r.value.right, {
238
+ onClick: G(r.value.right.events.click, ["stop"])
239
+ }), null, 16, ["onClick"])
238
240
  ], !0)
239
241
  ])) : _("", !0)
240
242
  ]),
241
- n("div", W, [
242
- h(e.$slots, "helper-text", {}, () => [
243
- (t(T) || t(f)) && !t(i) ? (u(), m("span", {
243
+ n("div", X, [
244
+ v(e.$slots, "helper-text", {}, () => [
245
+ (t(I) || t(f)) && !t(i) ? (u(), m("span", {
244
246
  key: 0,
245
- class: v(t(f) ? "rds-textfield__helper--error" : "")
246
- }, B(t(R)), 3)) : _("", !0)
247
+ class: h(t(f) ? "rds-e-textfield__helper--error" : "")
248
+ }, w(t(T)), 3)) : _("", !0)
247
249
  ], !0)
248
250
  ])
249
251
  ], 2));
250
252
  }
251
- }), te = /* @__PURE__ */ J(X, [["__scopeId", "data-v-e9626824"]]);
253
+ }), le = /* @__PURE__ */ J(Y, [["__scopeId", "data-v-4c840b96"]]);
252
254
  export {
253
- te as default
255
+ le as default
254
256
  };