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.
- package/README.md +21 -6
- package/dist/components/accordion.es.js +17 -17
- package/dist/components/avatar.es.js +7 -7
- package/dist/components/breadcrumbs.es.js +32 -32
- package/dist/components/button.es.js +24 -24
- package/dist/components/checkbox.es.js +14 -17
- package/dist/components/collapsable.es.js +1 -1
- 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
- package/dist/components/datepicker.es.js +4644 -4639
- package/dist/components/directAccess.es.js +45 -50
- package/dist/components/dragAndDrop.es.js +44 -46
- package/dist/components/dropdown.es.js +154 -163
- package/dist/components/fileUploadItem.es.js +18 -18
- package/dist/components/filterChip.es.js +9 -9
- package/dist/components/filterTag.es.js +7 -7
- package/dist/components/{floating-ui.vue-DHEoOe5S.js → floating-ui.vue-C-DgKOwt.js} +1 -1
- package/dist/components/functions-D3GA3OzJ.js +24 -0
- package/dist/components/icon-svg-DxlNo61Q.js +869 -0
- package/dist/components/iconList.es.js +25 -29
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +46 -46
- package/dist/components/indicator.es.js +27 -28
- package/dist/components/infoBox.es.js +17 -17
- package/dist/components/link.es.js +51 -55
- package/dist/components/modal.es.js +20 -20
- package/dist/components/multiselect.es.js +2 -3
- package/dist/components/overlay.es.js +20 -15
- package/dist/components/pagination.es.js +111 -111
- package/dist/components/persistentToast.es.js +11 -11
- package/dist/components/popover.es.js +18 -18
- package/dist/components/popoverMenu.es.js +22 -22
- package/dist/components/progressBar.es.js +8 -8
- package/dist/components/quantitySelector.es.js +12 -12
- package/dist/components/radioButton.es.js +26 -26
- package/dist/components/selectionChip.es.js +5 -5
- package/dist/components/sidedrawer.es.js +19 -19
- package/dist/components/style/accordionGroup.css +1 -1
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/datepicker.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/dragAndDrop.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/iconList.css +1 -1
- package/dist/components/style/link.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/selectionChip.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tableslotedcomponent.css +1 -1
- package/dist/components/switch.es.js +9 -9
- package/dist/components/tabBar.es.js +32 -33
- package/dist/components/tablepaginatedcomponent.es.js +35 -36
- package/dist/components/tableslotedcomponent.es.js +116 -121
- package/dist/components/tag.es.js +6 -6
- package/dist/components/textArea.es.js +103 -106
- package/dist/components/textField.es.js +21 -22
- package/dist/components/toggle.es.js +23 -23
- package/dist/components/tooltip.es.js +59 -59
- package/dist/energy-components.css +1 -0
- package/dist/energy-components.es.js +9101 -24972
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/icon-svg/icon-list.d.ts +8 -9
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +2 -2
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +2 -2
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +1 -1
- package/dist/types/src/helpers/functions.d.ts +1 -0
- package/dist/types/style.d.ts +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -17
- package/dist/components/functions-DIHwdgF0.js +0 -18
- package/dist/components/icon-svg-K8-vLJgV.js +0 -16718
- package/dist/composables/index.es.js +0 -37
package/README.md
CHANGED
|
@@ -34,11 +34,16 @@ If you use npm version >=7.0.0, it will automatically install the `energy-founda
|
|
|
34
34
|
|
|
35
35
|
## Usage
|
|
36
36
|
|
|
37
|
-
### Before You Begin
|
|
37
|
+
### Before You Begin
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Import Foundations CSS once at app entry, before any component styles. If you haven't installed the library yet, follow
|
|
40
40
|
this [documentation](https://www.npmjs.com/package/energy-foundations?activeTab=readme).
|
|
41
41
|
|
|
42
|
+
```ts
|
|
43
|
+
// main.ts
|
|
44
|
+
import 'energy-foundations/dist/style.css';
|
|
45
|
+
```
|
|
46
|
+
|
|
42
47
|
### Recommended: Independent Components (tree-shaking)
|
|
43
48
|
|
|
44
49
|
This approach includes only the components you use in the final bundle of your application.
|
|
@@ -86,9 +91,19 @@ affecting the performance of your application.
|
|
|
86
91
|
app.use(RDSLibrary);
|
|
87
92
|
```
|
|
88
93
|
|
|
89
|
-
**Important:** If you choose this method of importing the library, you must add an additional CSS file
|
|
90
|
-
below the energy-foundations CSS.
|
|
94
|
+
**Important:** If you choose this method of importing the library, you must add an additional CSS file below the energy-foundations CSS.
|
|
91
95
|
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
Recommended in JS entry:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
// main.ts
|
|
100
|
+
import 'energy-foundations/dist/style.css';
|
|
101
|
+
import 'energy-components/style';
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Optional Sass alternative (do not mix both to avoid duplicates):
|
|
105
|
+
|
|
106
|
+
```scss
|
|
107
|
+
// src/styles/index.scss
|
|
108
|
+
@use 'energy-foundations/dist/style.scss';
|
|
94
109
|
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as O, toRefs as q, ref as p, watch as B, nextTick as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
1
|
+
import { defineComponent as O, toRefs as q, ref as p, watch as B, nextTick as w, inject as k, onMounted as D, onBeforeUnmount as A, createElementBlock as S, openBlock as f, createElementVNode as i, toDisplayString as v, createBlock as N, createCommentVNode as V, createVNode as H, unref as m, mergeProps as I, normalizeClass as x, renderSlot as P, createTextVNode as T } from "vue";
|
|
2
|
+
import { I as j } from "./icon-svg-DxlNo61Q.js";
|
|
3
|
+
import E from "./tag.es.js";
|
|
4
|
+
import { _ as F } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/accordion.css';const M = ["id"], $ = { class: "rds-e-accordion-title" }, L = { class: "rds-e-accordion-title_right" }, U = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "rds-e-accordion-title_label"
|
|
@@ -61,8 +61,8 @@ import './style/accordion.css';const M = ["id"], $ = { class: "rds-e-accordion-t
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
emits: ["update:open", "resized"],
|
|
64
|
-
setup(o, { expose:
|
|
65
|
-
const r = o, g =
|
|
64
|
+
setup(o, { expose: z, emit: R }) {
|
|
65
|
+
const r = o, g = R, { tag: c } = q(r), e = p(r.open), d = p(null), n = p(null);
|
|
66
66
|
let a = null, l = null;
|
|
67
67
|
const u = () => {
|
|
68
68
|
if (!d.value || !n.value) return;
|
|
@@ -77,13 +77,13 @@ import './style/accordion.css';const M = ["id"], $ = { class: "rds-e-accordion-t
|
|
|
77
77
|
};
|
|
78
78
|
B(
|
|
79
79
|
() => r.open,
|
|
80
|
-
(t) =>
|
|
80
|
+
(t) => w(() => {
|
|
81
81
|
s(t);
|
|
82
82
|
}),
|
|
83
83
|
{ immediate: !0 }
|
|
84
84
|
);
|
|
85
|
-
const h =
|
|
86
|
-
return
|
|
85
|
+
const h = k("registerRDSAccordionChild"), y = k("unregisterRDSAccordionChild");
|
|
86
|
+
return D(() => {
|
|
87
87
|
h && h({
|
|
88
88
|
id: r.id,
|
|
89
89
|
open: _,
|
|
@@ -99,7 +99,7 @@ import './style/accordion.css';const M = ["id"], $ = { class: "rds-e-accordion-t
|
|
|
99
99
|
})));
|
|
100
100
|
}), A(() => {
|
|
101
101
|
y && y(r.id), a && n.value && a.unobserve(n.value), l && l.disconnect();
|
|
102
|
-
}),
|
|
102
|
+
}), z({
|
|
103
103
|
/**
|
|
104
104
|
* Abre el panel.
|
|
105
105
|
*/
|
|
@@ -118,12 +118,12 @@ import './style/accordion.css';const M = ["id"], $ = { class: "rds-e-accordion-t
|
|
|
118
118
|
}, [
|
|
119
119
|
i("span", $, v(o.title), 1),
|
|
120
120
|
i("div", L, [
|
|
121
|
-
m(c) && m(c).icon ? (f(), N(
|
|
121
|
+
m(c) && m(c).icon ? (f(), N(E, I({
|
|
122
122
|
key: 0,
|
|
123
123
|
class: "rds-e-accordion-title_tag"
|
|
124
124
|
}, m(c), { small: "" }), null, 16)) : o.label ? (f(), S("span", U, v(o.label), 1)) : V("", !0),
|
|
125
|
-
H(
|
|
126
|
-
class:
|
|
125
|
+
H(j, {
|
|
126
|
+
class: x(["rds-e-accordion-title_icon", { "rds-e-accordion-title_icon--open": e.value }]),
|
|
127
127
|
name: "arrow_down"
|
|
128
128
|
}, null, 8, ["class"])
|
|
129
129
|
])
|
|
@@ -131,21 +131,21 @@ import './style/accordion.css';const M = ["id"], $ = { class: "rds-e-accordion-t
|
|
|
131
131
|
i("div", {
|
|
132
132
|
ref_key: "panel",
|
|
133
133
|
ref: d,
|
|
134
|
-
class:
|
|
134
|
+
class: x(["rds-e-accordion-panel", { "rds-e-accordion-panel--open": e.value }])
|
|
135
135
|
}, [
|
|
136
136
|
i("div", {
|
|
137
137
|
ref_key: "panelContent",
|
|
138
138
|
ref: n,
|
|
139
139
|
class: "rds-e-accordion-panel_content"
|
|
140
140
|
}, [
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
P(t.$slots, "default", {}, () => [
|
|
142
|
+
T(v(o.content), 1)
|
|
143
143
|
], !0)
|
|
144
144
|
], 512)
|
|
145
145
|
], 2)
|
|
146
146
|
], 8, M));
|
|
147
147
|
}
|
|
148
|
-
}), X = /* @__PURE__ */
|
|
148
|
+
}), X = /* @__PURE__ */ F(G, [["__scopeId", "data-v-478849c0"]]);
|
|
149
149
|
export {
|
|
150
150
|
X as default
|
|
151
151
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as h, computed as a, createElementBlock as s, openBlock as n, withKeys as o, normalizeStyle as u, normalizeClass as k, createBlock as _, createCommentVNode as b, toDisplayString as z } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { I as C } from "./icon-svg-DxlNo61Q.js";
|
|
3
3
|
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"],
|
|
4
|
+
import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"], I = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "rds-e-avatar__initials"
|
|
7
7
|
}, N = {
|
|
8
8
|
key: 3,
|
|
9
9
|
class: "rds-e-avatar__badge",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
11
|
+
}, D = /* @__PURE__ */ h({
|
|
12
12
|
__name: "avatar",
|
|
13
13
|
props: {
|
|
14
14
|
/**
|
|
@@ -135,7 +135,7 @@ import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"],
|
|
|
135
135
|
})), S = a(() => e.alt && e.type === "image" ? e.alt : e.type === "initials" && r.value ? `Avatar con iniciales ${r.value}` : e.type === "icon" ? `Avatar con icono ${c.value}` : e.badge ? "Avatar de usuario con notificación" : "Avatar de usuario"), l = (i) => {
|
|
136
136
|
p("click", i);
|
|
137
137
|
};
|
|
138
|
-
return (i,
|
|
138
|
+
return (i, E) => (n(), s("div", {
|
|
139
139
|
id: t.id,
|
|
140
140
|
class: k(["rds-e-avatar", [v.value]]),
|
|
141
141
|
style: u(f.value),
|
|
@@ -153,7 +153,7 @@ import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"],
|
|
|
153
153
|
src: t.src,
|
|
154
154
|
alt: t.alt,
|
|
155
155
|
class: "rds-e-avatar__image"
|
|
156
|
-
}, null, 8, B)) : t.type === "initials" && r.value ? (n(), s("span",
|
|
156
|
+
}, null, 8, B)) : t.type === "initials" && r.value ? (n(), s("span", I, z(r.value), 1)) : (n(), _(C, {
|
|
157
157
|
key: 2,
|
|
158
158
|
name: c.value,
|
|
159
159
|
class: "rds-e-avatar__icon",
|
|
@@ -163,7 +163,7 @@ import './style/avatar.css';const A = ["id", "aria-label"], B = ["src", "alt"],
|
|
|
163
163
|
t.badge ? (n(), s("span", N)) : b("", !0)
|
|
164
164
|
], 46, A));
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), V = /* @__PURE__ */ w(D, [["__scopeId", "data-v-11470780"]]);
|
|
167
167
|
export {
|
|
168
|
-
|
|
168
|
+
V as default
|
|
169
169
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as C, toRefs as h, ref as y, watchEffect as I, onMounted as L, createElementBlock as u, openBlock as
|
|
1
|
+
import { defineComponent as C, toRefs as h, ref as y, watchEffect as I, onMounted as L, createElementBlock as u, openBlock as m, Fragment as T, renderList as w, normalizeClass as x, unref as B, createVNode as E, mergeProps as j, toHandlers as P, withCtx as S, createCommentVNode as D } from "vue";
|
|
2
2
|
import N from "./link.es.js";
|
|
3
3
|
import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/breadcrumbs.css';const R = ["id"], V = { key: 0 }, q = /* @__PURE__ */ C({
|
|
@@ -41,15 +41,15 @@ import './style/breadcrumbs.css';const R = ["id"], V = { key: 0 }, q = /* @__PUR
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
emits: ["onClickTrimmedList", "onClickItem", "onClickEllipsis"],
|
|
44
|
-
setup(
|
|
45
|
-
const s =
|
|
46
|
-
items:
|
|
47
|
-
inverse:
|
|
48
|
-
} = h(s),
|
|
49
|
-
s.leftTrim ?
|
|
44
|
+
setup(o, { emit: f }) {
|
|
45
|
+
const s = o, a = f, {
|
|
46
|
+
items: e,
|
|
47
|
+
inverse: c
|
|
48
|
+
} = h(s), i = y(), v = () => {
|
|
49
|
+
s.leftTrim ? a("onClickTrimmedList", e.value.slice(0, -2)) : a("onClickTrimmedList", e.value.slice(1, -1));
|
|
50
50
|
}, p = () => {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
i.value = [
|
|
52
|
+
e.value[0],
|
|
53
53
|
{
|
|
54
54
|
text: "...",
|
|
55
55
|
active: !1,
|
|
@@ -57,10 +57,10 @@ import './style/breadcrumbs.css';const R = ["id"], V = { key: 0 }, q = /* @__PUR
|
|
|
57
57
|
to: "",
|
|
58
58
|
clickable: !0
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
e.value[e.value.length - 1]
|
|
61
61
|
];
|
|
62
62
|
}, k = () => {
|
|
63
|
-
|
|
63
|
+
i.value = [
|
|
64
64
|
{
|
|
65
65
|
text: "...",
|
|
66
66
|
active: !1,
|
|
@@ -68,48 +68,48 @@ import './style/breadcrumbs.css';const R = ["id"], V = { key: 0 }, q = /* @__PUR
|
|
|
68
68
|
to: "",
|
|
69
69
|
clickable: !0
|
|
70
70
|
},
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
e.value[e.value.length - 2],
|
|
72
|
+
e.value[e.value.length - 1]
|
|
73
73
|
];
|
|
74
|
-
},
|
|
75
|
-
s.trimItems &&
|
|
76
|
-
}, b = (
|
|
74
|
+
}, d = () => {
|
|
75
|
+
s.trimItems && e.value.length >= 3 ? p() : s.leftTrim && e.value.length >= 3 ? k() : typeof s.items == "object" ? i.value = s.items : console.error("energy-components: The prop is not an Object");
|
|
76
|
+
}, b = (r, n) => {
|
|
77
77
|
const t = {
|
|
78
|
-
...
|
|
79
|
-
inverse:
|
|
78
|
+
...r,
|
|
79
|
+
inverse: c.value,
|
|
80
80
|
customClass: "rds-e-breadcrumbs__link--text"
|
|
81
81
|
};
|
|
82
|
-
return
|
|
82
|
+
return n !== i.value.length - 1 && Object.assign(t, {
|
|
83
83
|
arrow: !0,
|
|
84
84
|
right: !0,
|
|
85
85
|
arrowSmall: !0
|
|
86
86
|
}), t;
|
|
87
|
-
}, _ = (
|
|
87
|
+
}, _ = (r, n) => ({
|
|
88
88
|
click: (t) => {
|
|
89
|
-
if (
|
|
90
|
-
const l = s.leftTrim ?
|
|
91
|
-
|
|
89
|
+
if (a("onClickItem", { item: r, index: n ?? -1, event: t }), r?.clickable) {
|
|
90
|
+
const l = s.leftTrim ? e.value.slice(0, -2) : e.value.slice(1, -1);
|
|
91
|
+
a("onClickEllipsis", { trimmed: l, event: t }), v(), t.preventDefault(), t.stopPropagation();
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
}), g = (
|
|
94
|
+
}), g = (r) => [
|
|
95
95
|
"rds-e-breadcrumbs__link",
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
r?.active ? "rds-e-breadcrumbs__link--active" : "",
|
|
97
|
+
c.value && r?.active ? "rds-e-breadcrumbs__link--inverse-active" : ""
|
|
98
98
|
];
|
|
99
99
|
return I(() => {
|
|
100
|
-
|
|
100
|
+
d();
|
|
101
101
|
}), L(() => {
|
|
102
|
-
|
|
103
|
-
}), (
|
|
104
|
-
id:
|
|
102
|
+
d();
|
|
103
|
+
}), (r, n) => (m(!0), u(T, null, w(i.value, (t, l) => (m(), u("ul", {
|
|
104
|
+
id: o.id ? `${o.id}-${l}` : void 0,
|
|
105
105
|
key: l,
|
|
106
|
-
class: x(["rds-e-breadcrumbs", `${B(
|
|
106
|
+
class: x(["rds-e-breadcrumbs", `${B(c) ? "rds-e-breadcrumbs--inverse" : ""}`])
|
|
107
107
|
}, [
|
|
108
108
|
E(N, j({
|
|
109
109
|
class: g(t)
|
|
110
110
|
}, { ref_for: !0 }, b(t, l), P(_(t, l))), {
|
|
111
111
|
default: S(() => [
|
|
112
|
-
t
|
|
112
|
+
t?.clickable ? (m(), u("span", V, "...")) : D("", !0)
|
|
113
113
|
]),
|
|
114
114
|
_: 2
|
|
115
115
|
}, 1040, ["class"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/button.css';const
|
|
1
|
+
import { defineComponent as S, toRefs as I, computed as s, createElementBlock as $, openBlock as b, normalizeClass as m, unref as n, createBlock as k, createCommentVNode as C, createElementVNode as N, renderSlot as V, createTextVNode as E, toDisplayString as L } from "vue";
|
|
2
|
+
import { I as w } from "./icon-svg-DxlNo61Q.js";
|
|
3
|
+
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/button.css';const R = ["id", "type", "disabled"], W = { class: "rds-e-btn__text" }, j = /* @__PURE__ */ S({
|
|
5
5
|
__name: "button",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -113,48 +113,48 @@ import './style/button.css';const w = ["id", "type", "disabled"], W = { class: "
|
|
|
113
113
|
},
|
|
114
114
|
setup(t) {
|
|
115
115
|
const a = t, {
|
|
116
|
-
text:
|
|
117
|
-
icon:
|
|
118
|
-
type:
|
|
119
|
-
variant:
|
|
116
|
+
text: c,
|
|
117
|
+
icon: f,
|
|
118
|
+
type: l,
|
|
119
|
+
variant: r,
|
|
120
120
|
small: p,
|
|
121
|
-
disabled:
|
|
121
|
+
disabled: i,
|
|
122
122
|
mobileWidth: y,
|
|
123
|
-
inverse:
|
|
123
|
+
inverse: u,
|
|
124
124
|
revertIcon: h,
|
|
125
125
|
loading: v,
|
|
126
126
|
destructive: _,
|
|
127
127
|
id: g
|
|
128
|
-
} = I(a),
|
|
128
|
+
} = I(a), d = s(() => v.value ? "loading" : f?.value ? f?.value : ""), B = s(() => l.value && ["button", "submit", "reset"].includes(l.value) ? l.value : "button"), o = s(() => ["primary", "secondary", "ghost", "commercial"].includes(r.value) ? r.value : "primary"), x = s(() => {
|
|
129
129
|
const e = ["rds-e-btn"];
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
), p.value && e.push("rds-e-btn--small"), h.value && e.push("rds-e-btn--revert"),
|
|
130
|
+
return r.value && e.push(`rds-e-btn--${o.value}`), u.value && e.push(`rds-e-btn--${o.value}-inverse`), d.value && e.push(
|
|
131
|
+
c?.value ? "rds-e-btn--with-icon" : "rds-e-btn--icon"
|
|
132
|
+
), p.value && e.push("rds-e-btn--small"), h.value && e.push("rds-e-btn--revert"), i.value && e.push("rds-e-style-state-disabled"), v.value && e.push("rds-e-btn--loading"), y.value && e.push("rds-e-btn--mobile-width"), _.value && (o.value === "secondary" || o.value === "ghost") && e.push(`rds-e-btn--${o.value}-destructive`), e.join(" ");
|
|
133
133
|
});
|
|
134
134
|
return (e, z) => (b(), $("button", {
|
|
135
135
|
id: n(g),
|
|
136
136
|
type: B.value,
|
|
137
|
-
disabled: n(
|
|
138
|
-
class: m(
|
|
137
|
+
disabled: n(i),
|
|
138
|
+
class: m(x.value)
|
|
139
139
|
}, [
|
|
140
|
-
|
|
140
|
+
d.value ? (b(), k(w, {
|
|
141
141
|
key: 0,
|
|
142
|
-
name:
|
|
142
|
+
name: d.value,
|
|
143
143
|
small: n(p),
|
|
144
144
|
class: m(["rds-e-btn__icon", [
|
|
145
|
-
n(
|
|
146
|
-
n(
|
|
145
|
+
n(u) ? `rds-e-btn__icon--${n(u)}` : "",
|
|
146
|
+
n(i) ? "rds-e-btn__icon--disabled" : ""
|
|
147
147
|
]]),
|
|
148
148
|
"aria-hidden": "true"
|
|
149
149
|
}, null, 8, ["name", "small", "class"])) : C("", !0),
|
|
150
150
|
N("span", W, [
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
V(e.$slots, "default", {}, () => [
|
|
152
|
+
E(L(n(c)), 1)
|
|
153
153
|
], !0)
|
|
154
154
|
])
|
|
155
|
-
], 10,
|
|
155
|
+
], 10, R));
|
|
156
156
|
}
|
|
157
|
-
}), A = /* @__PURE__ */
|
|
157
|
+
}), A = /* @__PURE__ */ D(j, [["__scopeId", "data-v-508169ab"]]);
|
|
158
158
|
export {
|
|
159
159
|
A as default
|
|
160
160
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as L, computed as b, ref as i, watch as y, onMounted as N, onBeforeUnmount as D, createElementBlock as E, openBlock as m, normalizeClass as n, createElementVNode as f, renderSlot as T, createTextVNode as p, createBlock as x, createCommentVNode as R, toDisplayString as U, withCtx as I, createVNode as z } from "vue";
|
|
2
|
+
import { I as g } from "./icon-svg-DxlNo61Q.js";
|
|
3
3
|
import F from "./tooltip.es.js";
|
|
4
4
|
import { g as K } from "./getInstance-GhoEcxLF.js";
|
|
5
5
|
import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-invalid", "aria-required", "aria-describedby", "aria-checked", "required", "disabled", "readonly", "name", "value"], j = ["for"], A = /* @__PURE__ */
|
|
6
|
+
import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-invalid", "aria-required", "aria-describedby", "aria-checked", "required", "disabled", "readonly", "name", "value"], j = ["for"], A = /* @__PURE__ */ L({
|
|
7
7
|
__name: "checkbox",
|
|
8
8
|
props: {
|
|
9
9
|
/**
|
|
@@ -115,10 +115,7 @@ import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-in
|
|
|
115
115
|
},
|
|
116
116
|
emits: ["update:modelValue"],
|
|
117
117
|
setup(e, { emit: w }) {
|
|
118
|
-
const l = e, C = w, c = b(() => l.modelValue !== void 0), r = i(l.isChecked ?? !1), s = i(!1), u = i(!1), t = i(null),
|
|
119
|
-
var a;
|
|
120
|
-
return ((a = l.id) == null ? void 0 : a.toString()) || S.value;
|
|
121
|
-
}), o = b(() => c.value ? l.modelValue ?? !1 : r.value);
|
|
118
|
+
const l = e, C = w, c = b(() => l.modelValue !== void 0), r = i(l.isChecked ?? !1), s = i(!1), u = i(!1), t = i(null), B = i(`rds-e-checkbox-${K()}`), v = b(() => l.id?.toString() || B.value), o = b(() => c.value ? l.modelValue ?? !1 : r.value);
|
|
122
119
|
y(
|
|
123
120
|
() => [l.indeterminate, o.value],
|
|
124
121
|
([a, d]) => {
|
|
@@ -126,7 +123,7 @@ import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-in
|
|
|
126
123
|
},
|
|
127
124
|
{ immediate: !0 }
|
|
128
125
|
);
|
|
129
|
-
const
|
|
126
|
+
const S = (a) => {
|
|
130
127
|
const d = a.target.checked;
|
|
131
128
|
c.value || (r.value = d), C("update:modelValue", d);
|
|
132
129
|
}, h = (a) => {
|
|
@@ -136,16 +133,16 @@ import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-in
|
|
|
136
133
|
}, V = () => {
|
|
137
134
|
u.value && (s.value = !0);
|
|
138
135
|
}, q = () => s.value = !1;
|
|
139
|
-
return
|
|
136
|
+
return N(() => {
|
|
140
137
|
t.value && (t.value.indeterminate = !!(l.indeterminate && o.value)), window.addEventListener("keydown", h), window.addEventListener("mousedown", k), l.isChecked !== void 0 && console.warn('[RDSCheckbox] La prop "isChecked" está deprecada. Usa v-model / modelValue en su lugar.');
|
|
141
|
-
}),
|
|
138
|
+
}), D(() => {
|
|
142
139
|
window.removeEventListener("keydown", h), window.removeEventListener("mousedown", k);
|
|
143
140
|
}), y(
|
|
144
141
|
() => l.isChecked,
|
|
145
142
|
(a) => {
|
|
146
143
|
!c.value && a !== void 0 && (r.value = !!a);
|
|
147
144
|
}
|
|
148
|
-
), (a, d) => (m(),
|
|
145
|
+
), (a, d) => (m(), E("div", {
|
|
149
146
|
class: n(["rds-e-checkbox__container", { "rds-e-checkbox__container--focused": s.value }])
|
|
150
147
|
}, [
|
|
151
148
|
f("input", {
|
|
@@ -165,7 +162,7 @@ import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-in
|
|
|
165
162
|
readonly: e.readonly,
|
|
166
163
|
name: e.name || void 0,
|
|
167
164
|
value: e.value,
|
|
168
|
-
onChange:
|
|
165
|
+
onChange: S,
|
|
169
166
|
onFocus: V,
|
|
170
167
|
onBlur: q
|
|
171
168
|
}, null, 42, $),
|
|
@@ -177,7 +174,7 @@ import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-in
|
|
|
177
174
|
"rds-e-checkbox__label--indeterminate": e.indeterminate && o.value
|
|
178
175
|
}])
|
|
179
176
|
}, [
|
|
180
|
-
|
|
177
|
+
T(a.$slots, "label-text", {}, () => [
|
|
181
178
|
f("span", {
|
|
182
179
|
class: n([
|
|
183
180
|
"rds-e-checkbox__label-box",
|
|
@@ -187,15 +184,15 @@ import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-in
|
|
|
187
184
|
}
|
|
188
185
|
])
|
|
189
186
|
}, [
|
|
190
|
-
|
|
187
|
+
p(U(e.label) + " ", 1),
|
|
191
188
|
e.icon && e.iconTooltip ? (m(), x(F, {
|
|
192
189
|
key: 0,
|
|
193
190
|
content: e.iconTooltip,
|
|
194
191
|
placement: "top",
|
|
195
192
|
"offset-space": 8
|
|
196
193
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
|
|
194
|
+
default: I(() => [
|
|
195
|
+
z(g, {
|
|
199
196
|
class: "rds-e-checkbox__label-box--icon",
|
|
200
197
|
name: e.icon,
|
|
201
198
|
size: "sm"
|
|
@@ -207,7 +204,7 @@ import './style/checkbox.css';const $ = ["id", "checked", "aria-label", "aria-in
|
|
|
207
204
|
class: "rds-e-checkbox__label-box--icon",
|
|
208
205
|
name: e.icon,
|
|
209
206
|
size: "sm"
|
|
210
|
-
}, null, 8, ["name"])) :
|
|
207
|
+
}, null, 8, ["name"])) : R("", !0)
|
|
211
208
|
], 2)
|
|
212
209
|
], !0)
|
|
213
210
|
], 10, j)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as k, ref as c, computed as r, watch as v, nextTick as i, createElementBlock as w, openBlock as h, normalizeClass as u, createElementVNode as t, withKeys as B, createBlock as C, createCommentVNode as
|
|
2
|
-
import {
|
|
3
|
-
import './style/collapsable.css';const V = ["id", "aria-expanded", "aria-controls", "disabled"], H = { class: "rds-e-collapsable__header-title" },
|
|
1
|
+
import { defineComponent as k, ref as c, computed as r, watch as v, nextTick as i, createElementBlock as w, openBlock as h, normalizeClass as u, createElementVNode as t, withKeys as B, createBlock as C, createCommentVNode as I, createVNode as $, toDisplayString as _, renderSlot as N, createTextVNode as S } from "vue";
|
|
2
|
+
import { I as y } from "./icon-svg-DxlNo61Q.js";
|
|
3
|
+
import './style/collapsable.css';const V = ["id", "aria-expanded", "aria-controls", "disabled"], H = { class: "rds-e-collapsable__header-title" }, E = { class: "rds-e-collapsable__header-title-text" }, K = ["id", "aria-labelledby"], z = /* @__PURE__ */ k({
|
|
4
4
|
__name: "collapsable",
|
|
5
5
|
props: {
|
|
6
6
|
title: {},
|
|
@@ -30,7 +30,7 @@ import './style/collapsable.css';const V = ["id", "aria-expanded", "aria-control
|
|
|
30
30
|
i(() => {
|
|
31
31
|
d();
|
|
32
32
|
});
|
|
33
|
-
}, { immediate: !0 }), (a,
|
|
33
|
+
}, { immediate: !0 }), (a, T) => (h(), w("div", {
|
|
34
34
|
class: u(["rds-e-collapsable", {
|
|
35
35
|
"rds-e-collapsable--open": e.value,
|
|
36
36
|
"rds-e-collapsable--disabled": l.disabled,
|
|
@@ -51,9 +51,9 @@ import './style/collapsable.css';const V = ["id", "aria-expanded", "aria-control
|
|
|
51
51
|
key: 0,
|
|
52
52
|
name: l.icon,
|
|
53
53
|
class: "rds-e-collapsable__header-icon"
|
|
54
|
-
}, null, 8, ["name"])) :
|
|
54
|
+
}, null, 8, ["name"])) : I("", !0),
|
|
55
55
|
t("span", H, [
|
|
56
|
-
t("span",
|
|
56
|
+
t("span", E, _(l.title), 1)
|
|
57
57
|
]),
|
|
58
58
|
$(y, {
|
|
59
59
|
class: u(["rds-e-collapsable__header-arrow", { "rds-e-collapsable__header-arrow--open": e.value }]),
|
|
@@ -73,14 +73,14 @@ import './style/collapsable.css';const V = ["id", "aria-expanded", "aria-control
|
|
|
73
73
|
ref: s,
|
|
74
74
|
class: "rds-e-collapsable__panel-content"
|
|
75
75
|
}, [
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
N(a.$slots, "default", {}, () => [
|
|
77
|
+
S(_(l.content), 1)
|
|
78
78
|
])
|
|
79
79
|
], 512)
|
|
80
|
-
], 10,
|
|
80
|
+
], 10, K)
|
|
81
81
|
], 2));
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
z as _
|
|
86
86
|
};
|