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.
- package/dist/components/accordion.es.js +44 -45
- package/dist/components/accordionGroup.es.js +12 -12
- package/dist/components/actionButton.es.js +2 -2
- package/dist/components/breadcrumbs.es.js +8 -8
- package/dist/components/button.es.js +20 -20
- package/dist/components/card.es.js +12 -0
- package/dist/components/checkbox.es.js +16 -16
- package/dist/components/datepicker.es.js +8208 -0
- package/dist/components/divider.es.js +6 -6
- package/dist/components/dropdown.es.js +55 -47
- package/dist/components/floatingActionButton.es.js +4 -4
- package/dist/components/{icon-svg-Cpx09myr.js → icon-svg-CEZ-L3iv.js} +6 -5
- package/dist/components/iconList.es.js +10 -10
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +84 -63
- package/dist/components/indicator.es.js +21 -21
- package/dist/components/infoBox.es.js +152 -0
- package/dist/components/link.es.js +21 -21
- package/dist/components/modal.es.js +96 -0
- package/dist/components/overlay.es.js +31 -0
- package/dist/components/pagination.es.js +20 -20
- package/dist/components/persistentToast.es.js +130 -0
- package/dist/components/radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js +28 -0
- package/dist/components/radioButton.es.js +69 -57
- package/dist/components/radioGroup.es.js +4 -0
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/accordionGroup.css +1 -1
- package/dist/components/style/actionButton.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 -0
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/datepicker.css +1 -0
- package/dist/components/style/divider.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/iconList.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/infoBox.css +1 -0
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/modal.css +1 -0
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/overlay.css +1 -0
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/persistentToast.css +1 -0
- package/dist/components/style/radioButton.css +1 -1
- package/dist/components/style/switch.css +1 -1
- 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/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +14 -14
- package/dist/components/tabBar.es.js +35 -35
- package/dist/components/tag.es.js +12 -12
- package/dist/components/textArea.es.js +31 -31
- package/dist/components/textField.es.js +52 -50
- package/dist/components/tooltip.es.js +59 -59
- package/dist/energy-components.es.js +10417 -1771
- package/dist/energy-components.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/accordion/accordion.vue.d.ts +0 -2
- package/dist/types/src/components/content/card/card.vue.d.ts +24 -0
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +134 -0
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +161 -0
- package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +2 -0
- package/dist/types/src/components/index.d.ts +7 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +15 -0
- package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +13 -32
- package/dist/types/src/components/input/radio-button/radio-group.vue.d.ts +50 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/link/link.vue.d.ts +1 -1
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +186 -0
- package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +46 -0
- package/dist/types/src/helpers/getInstance.d.ts +6 -0
- package/dist/types/src/helpers/mobileMockup.vue.d.ts +9 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as v, ref as
|
|
2
|
-
import {
|
|
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
|
-
},
|
|
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 =
|
|
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,
|
|
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(),
|
|
80
|
-
|
|
81
|
-
|
|
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(
|
|
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
|
|
2
|
-
import {
|
|
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,
|
|
53
|
-
if (o ===
|
|
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:
|
|
65
|
-
const i = o,
|
|
64
|
+
setup(o, { emit: f }) {
|
|
65
|
+
const i = o, M = f, {
|
|
66
66
|
options: n
|
|
67
|
-
} = W(i),
|
|
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
|
|
96
|
-
await
|
|
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),
|
|
103
|
-
}), L(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
144
|
-
|
|
143
|
+
V(A(x, ["prevent"]), ["left"]),
|
|
144
|
+
V(A(I, ["prevent"]), ["right"])
|
|
145
145
|
]
|
|
146
146
|
}, [
|
|
147
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/tag.css';const
|
|
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
|
-
|
|
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
|
-
}),
|
|
88
|
+
}), j = /* @__PURE__ */ k(C, [["__scopeId", "data-v-e784d437"]]);
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
j as default
|
|
91
91
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
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 && !/^[
|
|
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-
|
|
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__ */
|
|
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:
|
|
155
|
-
id:
|
|
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:
|
|
162
|
-
helper:
|
|
161
|
+
rightIcon: S,
|
|
162
|
+
helper: A,
|
|
163
163
|
error: _,
|
|
164
|
-
helperText:
|
|
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)),
|
|
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:
|
|
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
|
-
}),
|
|
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",
|
|
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(
|
|
200
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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-
|
|
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
|
|
2
|
-
import {
|
|
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" },
|
|
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
|
-
},
|
|
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:
|
|
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:
|
|
136
|
-
rightIcon:
|
|
137
|
-
helper:
|
|
135
|
+
icon: V,
|
|
136
|
+
rightIcon: E,
|
|
137
|
+
helper: I,
|
|
138
138
|
error: f,
|
|
139
|
-
helperText:
|
|
140
|
-
clearable:
|
|
139
|
+
helperText: T,
|
|
140
|
+
clearable: C,
|
|
141
141
|
password: p,
|
|
142
|
-
autocomplete:
|
|
143
|
-
} =
|
|
142
|
+
autocomplete: $
|
|
143
|
+
} = P(s), o = z(!0), q = d(() => {
|
|
144
144
|
if (p.value)
|
|
145
|
-
return
|
|
146
|
-
}),
|
|
145
|
+
return $.value;
|
|
146
|
+
}), N = (e) => {
|
|
147
147
|
g(
|
|
148
148
|
"update:modelValue",
|
|
149
149
|
e.target.value
|
|
150
150
|
);
|
|
151
|
-
},
|
|
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"),
|
|
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:
|
|
156
|
+
name: V.value,
|
|
157
157
|
class: "",
|
|
158
158
|
events: {
|
|
159
159
|
click: () => {
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
},
|
|
162
|
+
}, S = {
|
|
163
163
|
left: {
|
|
164
164
|
...e
|
|
165
165
|
},
|
|
166
166
|
right: {
|
|
167
167
|
...e,
|
|
168
|
-
name:
|
|
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
|
-
} :
|
|
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
|
-
} :
|
|
196
|
+
} : S;
|
|
197
197
|
});
|
|
198
|
-
return
|
|
198
|
+
return F(
|
|
199
199
|
p,
|
|
200
200
|
(e) => o.value = !e,
|
|
201
201
|
{ immediate: !0 }
|
|
202
|
-
), (e,
|
|
203
|
-
class:
|
|
202
|
+
), (e, S) => (u(), m("div", {
|
|
203
|
+
class: h(["rds-e-textfield", R.value])
|
|
204
204
|
}, [
|
|
205
205
|
n("div", K, [
|
|
206
|
-
|
|
207
|
-
r.value.left.name ? (u(),
|
|
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,
|
|
211
|
+
}, r.value.left, M(r.value.left.events)), null, 16)) : _("", !0)
|
|
212
212
|
], !0),
|
|
213
|
-
n("div",
|
|
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:
|
|
225
|
-
onBlur:
|
|
226
|
-
}, null, 40,
|
|
224
|
+
onInput: N,
|
|
225
|
+
onBlur: N
|
|
226
|
+
}, null, 40, Q),
|
|
227
227
|
n("label", {
|
|
228
228
|
for: t(x).toString(),
|
|
229
|
-
class:
|
|
230
|
-
},
|
|
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",
|
|
233
|
-
|
|
234
|
-
|
|
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,
|
|
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",
|
|
242
|
-
|
|
243
|
-
(t(
|
|
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:
|
|
246
|
-
},
|
|
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
|
-
}),
|
|
253
|
+
}), le = /* @__PURE__ */ J(Y, [["__scopeId", "data-v-4c840b96"]]);
|
|
252
254
|
export {
|
|
253
|
-
|
|
255
|
+
le as default
|
|
254
256
|
};
|