energy-components 1.11.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/checkbox.es.js +67 -45
- package/dist/components/datepicker.es.js +2276 -2251
- package/dist/components/dropdown.es.js +148 -141
- package/dist/components/filterTag.es.js +70 -0
- package/dist/components/index.es.js +94 -91
- package/dist/components/modal.es.js +29 -27
- 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/dropdown.css +1 -1
- package/dist/components/style/filterTag.css +1 -0
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/tabBar.es.js +103 -98
- package/dist/components/textArea.es.js +96 -86
- package/dist/components/textField.es.js +118 -110
- package/dist/components/tooltip.es.js +50 -50
- package/dist/energy-components.es.js +14684 -14541
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +2 -2
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +2 -2
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +15 -0
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +4 -2
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +13 -13
- package/dist/types/src/components/input/filter-tag/filter-tag.vue.d.ts +53 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +1 -1
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +2 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as g, ref as n, watch as f, onMounted as S, onBeforeUnmount as B, createElementBlock as C, openBlock as r, normalizeClass as c, createElementVNode as s, renderSlot as V, createTextVNode as D, createBlock as m, createCommentVNode as E, toDisplayString as L, withCtx as N, createVNode as R } from "vue";
|
|
2
|
+
import { R as k } from "./icon-svg-DuzOdbk1.js";
|
|
3
|
+
import T from "./tooltip.es.js";
|
|
4
|
+
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/checkbox.css';const p = ["id", "checked", "aria-label", "required", "disabled"], z = ["for"], F = /* @__PURE__ */ g({
|
|
5
6
|
__name: "checkbox",
|
|
6
7
|
props: {
|
|
7
8
|
/**
|
|
@@ -32,6 +33,13 @@ import './style/checkbox.css';const N = ["id", "checked", "aria-label", "require
|
|
|
32
33
|
type: String,
|
|
33
34
|
default: ""
|
|
34
35
|
},
|
|
36
|
+
/**
|
|
37
|
+
* <span>Texto del tooltip para el icono. Si se proporciona, el icono mostrará un tooltip.</span>
|
|
38
|
+
*/
|
|
39
|
+
iconTooltip: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
35
43
|
/**
|
|
36
44
|
* <span>Estado del checkbox</span>
|
|
37
45
|
*/
|
|
@@ -69,58 +77,58 @@ import './style/checkbox.css';const N = ["id", "checked", "aria-label", "require
|
|
|
69
77
|
}
|
|
70
78
|
},
|
|
71
79
|
emits: ["update:modelValue"],
|
|
72
|
-
setup(e, { emit:
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}),
|
|
77
|
-
() =>
|
|
78
|
-
(
|
|
79
|
-
|
|
80
|
+
setup(e, { emit: h }) {
|
|
81
|
+
const l = e, x = h, a = n(l.isChecked), i = n(!1), d = n(!1), o = n(null);
|
|
82
|
+
f(() => l.isChecked, (t) => {
|
|
83
|
+
a.value = t;
|
|
84
|
+
}), f(
|
|
85
|
+
() => l.indeterminate,
|
|
86
|
+
(t) => {
|
|
87
|
+
o.value && (o.value.indeterminate = !!(t && a.value));
|
|
80
88
|
},
|
|
81
89
|
{ immediate: !0 }
|
|
82
90
|
);
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
+
const v = () => {
|
|
92
|
+
d.value && (i.value = !0);
|
|
93
|
+
}, y = () => i.value = !1, w = (t) => {
|
|
94
|
+
a.value = t.target.checked, x("update:modelValue", t.target.checked);
|
|
95
|
+
}, u = (t) => {
|
|
96
|
+
t.key === "Tab" && (d.value = !0);
|
|
97
|
+
}, b = () => {
|
|
98
|
+
d.value = !1;
|
|
91
99
|
};
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
}),
|
|
95
|
-
window.removeEventListener("keydown",
|
|
96
|
-
}), (
|
|
97
|
-
class:
|
|
100
|
+
return S(() => {
|
|
101
|
+
o.value && (o.value.indeterminate = !!(l.indeterminate && a.value)), window.addEventListener("keydown", u), window.addEventListener("mousedown", b);
|
|
102
|
+
}), B(() => {
|
|
103
|
+
window.removeEventListener("keydown", u), window.removeEventListener("mousedown", b);
|
|
104
|
+
}), (t, I) => (r(), C("div", {
|
|
105
|
+
class: c(["rds-e-checkbox__container", { "rds-e-checkbox__container--focused": i.value }])
|
|
98
106
|
}, [
|
|
99
|
-
|
|
107
|
+
s("input", {
|
|
100
108
|
id: e.id.toString(),
|
|
101
109
|
ref_key: "inputRef",
|
|
102
|
-
ref:
|
|
110
|
+
ref: o,
|
|
103
111
|
checked: e.isChecked,
|
|
104
112
|
"aria-label": e.accessibilityLabel,
|
|
105
113
|
type: "checkbox",
|
|
106
|
-
class:
|
|
114
|
+
class: c(["rds-e-checkbox", { "rds-e-checkbox--error": e.error }]),
|
|
107
115
|
required: e.required,
|
|
108
116
|
disabled: e.disabled,
|
|
109
|
-
onChange:
|
|
110
|
-
onFocus:
|
|
111
|
-
onBlur:
|
|
112
|
-
}, null, 42,
|
|
113
|
-
|
|
117
|
+
onChange: w,
|
|
118
|
+
onFocus: v,
|
|
119
|
+
onBlur: y
|
|
120
|
+
}, null, 42, p),
|
|
121
|
+
s("label", {
|
|
114
122
|
for: e.id.toString(),
|
|
115
|
-
class:
|
|
123
|
+
class: c(["rds-e-checkbox__label", {
|
|
116
124
|
"rds-e-checkbox__label--disabled": e.disabled,
|
|
117
|
-
"rds-e-checkbox__label--checked":
|
|
118
|
-
"rds-e-checkbox__label--indeterminate": e.indeterminate &&
|
|
125
|
+
"rds-e-checkbox__label--checked": a.value,
|
|
126
|
+
"rds-e-checkbox__label--indeterminate": e.indeterminate && a.value
|
|
119
127
|
}])
|
|
120
128
|
}, [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
class:
|
|
129
|
+
V(t.$slots, "label-text", {}, () => [
|
|
130
|
+
s("span", {
|
|
131
|
+
class: c([
|
|
124
132
|
"rds-e-checkbox__label-box",
|
|
125
133
|
{
|
|
126
134
|
"rds-e-checkbox__label-box--disabled": e.disabled,
|
|
@@ -128,19 +136,33 @@ import './style/checkbox.css';const N = ["id", "checked", "aria-label", "require
|
|
|
128
136
|
}
|
|
129
137
|
])
|
|
130
138
|
}, [
|
|
131
|
-
|
|
132
|
-
e.icon ? (
|
|
139
|
+
D(L(e.label) + " ", 1),
|
|
140
|
+
e.icon && e.iconTooltip ? (r(), m(T, {
|
|
133
141
|
key: 0,
|
|
142
|
+
content: e.iconTooltip,
|
|
143
|
+
placement: "top",
|
|
144
|
+
"offset-space": 8
|
|
145
|
+
}, {
|
|
146
|
+
default: N(() => [
|
|
147
|
+
R(k, {
|
|
148
|
+
class: "rds-e-checkbox__label-box--icon",
|
|
149
|
+
name: e.icon,
|
|
150
|
+
size: "sm"
|
|
151
|
+
}, null, 8, ["name"])
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["content"])) : e.icon ? (r(), m(k, {
|
|
155
|
+
key: 1,
|
|
134
156
|
class: "rds-e-checkbox__label-box--icon",
|
|
135
157
|
name: e.icon,
|
|
136
158
|
size: "sm"
|
|
137
159
|
}, null, 8, ["name"])) : E("", !0)
|
|
138
160
|
], 2)
|
|
139
161
|
], !0)
|
|
140
|
-
], 10,
|
|
162
|
+
], 10, z)
|
|
141
163
|
], 2));
|
|
142
164
|
}
|
|
143
|
-
}),
|
|
165
|
+
}), $ = /* @__PURE__ */ q(F, [["__scopeId", "data-v-472a518b"]]);
|
|
144
166
|
export {
|
|
145
|
-
|
|
167
|
+
$ as default
|
|
146
168
|
};
|