energy-components 1.0.2

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 (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +94 -0
  3. package/dist/.empty +0 -0
  4. package/dist/components/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  5. package/dist/components/accordion.es.js +121 -0
  6. package/dist/components/accordionGroup.es.js +32 -0
  7. package/dist/components/actionButton.es.js +64 -0
  8. package/dist/components/breadcrumbs.es.js +90 -0
  9. package/dist/components/button.es.js +144 -0
  10. package/dist/components/checkbox.es.js +130 -0
  11. package/dist/components/divider.es.js +35 -0
  12. package/dist/components/dropdown.es.js +331 -0
  13. package/dist/components/floatingActionButton.es.js +97 -0
  14. package/dist/components/functions-DIHwdgF0.js +18 -0
  15. package/dist/components/icon-svg-Cpx09myr.js +10818 -0
  16. package/dist/components/iconList.es.js +49 -0
  17. package/dist/components/iconSvg.es.js +5 -0
  18. package/dist/components/index.es.js +81 -0
  19. package/dist/components/indicator.es.js +175 -0
  20. package/dist/components/link.es.js +147 -0
  21. package/dist/components/multiselect.es.js +1039 -0
  22. package/dist/components/pagination.es.js +138 -0
  23. package/dist/components/radioButton.es.js +111 -0
  24. package/dist/components/style/accordion.css +1 -0
  25. package/dist/components/style/accordionGroup.css +1 -0
  26. package/dist/components/style/actionButton.css +1 -0
  27. package/dist/components/style/breadcrumbs.css +1 -0
  28. package/dist/components/style/button.css +1 -0
  29. package/dist/components/style/checkbox.css +1 -0
  30. package/dist/components/style/divider.css +1 -0
  31. package/dist/components/style/dropdown.css +1 -0
  32. package/dist/components/style/floatingActionButton.css +1 -0
  33. package/dist/components/style/icon-svg.css +1 -0
  34. package/dist/components/style/iconList.css +1 -0
  35. package/dist/components/style/indicator.css +1 -0
  36. package/dist/components/style/link.css +1 -0
  37. package/dist/components/style/multiselect.css +1 -0
  38. package/dist/components/style/pagination.css +1 -0
  39. package/dist/components/style/radioButton.css +1 -0
  40. package/dist/components/style/switch.css +1 -0
  41. package/dist/components/style/tabBar.css +1 -0
  42. package/dist/components/style/tag.css +1 -0
  43. package/dist/components/style/textArea.css +1 -0
  44. package/dist/components/style/textField.css +1 -0
  45. package/dist/components/style/tooltip.css +1 -0
  46. package/dist/components/switch.es.js +96 -0
  47. package/dist/components/tabBar.es.js +181 -0
  48. package/dist/components/tag.es.js +91 -0
  49. package/dist/components/textArea.es.js +259 -0
  50. package/dist/components/textField.es.js +254 -0
  51. package/dist/components/tooltip.es.js +1082 -0
  52. package/dist/energy-components.es.js +15368 -0
  53. package/dist/energy-components.umd.js +1 -0
  54. package/dist/style.css +1 -0
  55. package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +100 -0
  56. package/dist/types/src/components/buttons/button/button.vue.d.ts +196 -0
  57. package/dist/types/src/components/buttons/constants/buttonDocs.d.ts +1 -0
  58. package/dist/types/src/components/buttons/constants/buttonPosition.d.ts +1 -0
  59. package/dist/types/src/components/buttons/constants/socialMedia.d.ts +1 -0
  60. package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +136 -0
  61. package/dist/types/src/components/content/accordion/accordion.vue.d.ts +122 -0
  62. package/dist/types/src/components/content/acordion-group/accordion-group.d.ts +6 -0
  63. package/dist/types/src/components/content/acordion-group/accordion-group.vue.d.ts +33 -0
  64. package/dist/types/src/components/content/divider/divider.vue.d.ts +35 -0
  65. package/dist/types/src/components/content/tag/tag.vue.d.ts +105 -0
  66. package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +100 -0
  67. package/dist/types/src/components/icon-svg/icon-list.d.ts +11 -0
  68. package/dist/types/src/components/icon-svg/icon-list.vue.d.ts +2 -0
  69. package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +68 -0
  70. package/dist/types/src/components/index.d.ts +20 -0
  71. package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +151 -0
  72. package/dist/types/src/components/input/dropdown/Multiselect/Multiselect.vue.d.ts +2 -0
  73. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +270 -0
  74. package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +114 -0
  75. package/dist/types/src/components/input/switch/switch.vue.d.ts +104 -0
  76. package/dist/types/src/components/input/text-area/text-area.vue.d.ts +281 -0
  77. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +271 -0
  78. package/dist/types/src/components/navigation/breadcrumbs/breadcrumbs.vue.d.ts +63 -0
  79. package/dist/types/src/components/navigation/link/link.types.d.ts +15 -0
  80. package/dist/types/src/components/navigation/link/link.vue.d.ts +175 -0
  81. package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +67 -0
  82. package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +132 -0
  83. package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +118 -0
  84. package/dist/types/src/helpers/functions.d.ts +3 -0
  85. package/dist/types/src/helpers/stories.helpers.d.ts +1 -0
  86. package/dist/types/src/helpers/validation.d.ts +1 -0
  87. package/dist/types/src/index.d.ts +8 -0
  88. package/dist/types/tsconfig.tsbuildinfo +1 -0
  89. package/package.json +156 -0
@@ -0,0 +1,130 @@
1
+ import { defineComponent as x, ref as d, watch as v, onMounted as y, onBeforeUnmount as w, openBlock as b, createElementBlock as g, normalizeClass as o, createElementVNode as n, renderSlot as S, createTextVNode as B, toDisplayString as C, createBlock as E, createCommentVNode as L } from "vue";
2
+ import { R as V } from "./icon-svg-Cpx09myr.js";
3
+ import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import './style/checkbox.css';const D = ["id", "checked", "aria-label", "required", "disabled"], N = ["for"], q = /* @__PURE__ */ x({
5
+ __name: "checkbox",
6
+ props: {
7
+ /**
8
+ * <span>Texto a mostrar en el label</span>
9
+ */
10
+ label: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ /**
15
+ * <span>Id del checkbox</span>
16
+ */
17
+ id: {
18
+ type: [String, Number],
19
+ default: ""
20
+ },
21
+ /**
22
+ * <span>Texto de accesibilidad</span>
23
+ */
24
+ accessibilityLabel: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ /**
29
+ * <span>Icono a mostrar</span>
30
+ */
31
+ icon: {
32
+ type: String,
33
+ default: ""
34
+ },
35
+ /**
36
+ * <span>Estado del checkbox</span>
37
+ */
38
+ isChecked: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ /**
43
+ * <span>Indica si el campo es requerido</span>
44
+ */
45
+ required: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ /**
50
+ * <span>Indica si el campo tiene error</span>
51
+ */
52
+ error: {
53
+ type: Boolean,
54
+ default: !1
55
+ },
56
+ /**
57
+ * <span>Indica si el campo está deshabilitado</span>
58
+ */
59
+ disabled: {
60
+ type: Boolean,
61
+ default: !1
62
+ }
63
+ },
64
+ emits: ["update:modelValue"],
65
+ setup(e, { emit: u }) {
66
+ const s = e, f = u, t = d(s.isChecked), l = d(!1), c = d(!1);
67
+ v(() => s.isChecked, (a) => {
68
+ t.value = a;
69
+ });
70
+ const h = () => {
71
+ c.value && (l.value = !0);
72
+ }, k = () => l.value = !1, m = (a) => {
73
+ t.value = a.target.checked, f("update:modelValue", a.target.checked);
74
+ }, r = (a) => {
75
+ a.key === "Tab" && (c.value = !0);
76
+ }, i = () => {
77
+ c.value = !1;
78
+ };
79
+ return y(() => {
80
+ window.addEventListener("keydown", r), window.addEventListener("mousedown", i);
81
+ }), w(() => {
82
+ window.removeEventListener("keydown", r), window.removeEventListener("mousedown", i);
83
+ }), (a, R) => (b(), g("div", {
84
+ class: o(["rds-checkbox__container", { "rds-checkbox__container--focused": l.value }])
85
+ }, [
86
+ n("input", {
87
+ id: e.id.toString(),
88
+ checked: e.isChecked,
89
+ "aria-label": e.accessibilityLabel,
90
+ type: "checkbox",
91
+ class: o(["rds-checkbox", { "rds-checkbox--error": e.error }]),
92
+ required: e.required,
93
+ disabled: e.disabled,
94
+ onChange: m,
95
+ onFocus: h,
96
+ onBlur: k
97
+ }, null, 42, D),
98
+ n("label", {
99
+ for: e.id.toString(),
100
+ class: o(["rds-checkbox__label", {
101
+ "rds-checkbox__label--disabled": e.disabled,
102
+ "rds-checkbox__label--checked": t.value
103
+ }])
104
+ }, [
105
+ S(a.$slots, "label-text", {}, () => [
106
+ n("span", {
107
+ class: o([
108
+ "rds-checkbox__label-box",
109
+ {
110
+ "rds-checkbox__label-box--disabled": e.disabled,
111
+ "rds-checkbox__label-box--error": e.error
112
+ }
113
+ ])
114
+ }, [
115
+ B(C(e.label) + " ", 1),
116
+ e.icon ? (b(), E(V, {
117
+ key: 0,
118
+ class: "rds-checkbox__label-box--icon",
119
+ name: e.icon,
120
+ size: "sm"
121
+ }, null, 8, ["name"])) : L("", !0)
122
+ ], 2)
123
+ ], !0)
124
+ ], 10, N)
125
+ ], 2));
126
+ }
127
+ }), K = /* @__PURE__ */ _(q, [["__scopeId", "data-v-ea21fb50"]]);
128
+ export {
129
+ K as default
130
+ };
@@ -0,0 +1,35 @@
1
+ import { defineComponent as s, computed as i, openBlock as d, createElementBlock as n, normalizeClass as t } from "vue";
2
+ import { _ as l } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ import './style/divider.css';const a = /* @__PURE__ */ s({
4
+ __name: "divider",
5
+ props: {
6
+ /**
7
+ * Si es true, el tipo será low, de lo contrario será high
8
+ */
9
+ low: {
10
+ type: Boolean,
11
+ default: !1
12
+ },
13
+ /**
14
+ * Si es true, el color será inverso
15
+ */
16
+ inverse: {
17
+ type: Boolean,
18
+ default: !1
19
+ }
20
+ },
21
+ setup(r) {
22
+ const e = r, o = i(() => ({
23
+ "rds-divider": !0,
24
+ "rds-divider--low": e.low && !e.inverse,
25
+ "rds-divider--inverse-low": e.low && e.inverse,
26
+ "rds-divider--inverse-high": !e.low && e.inverse
27
+ }));
28
+ return (v, c) => (d(), n("div", {
29
+ class: t(o.value)
30
+ }, null, 2));
31
+ }
32
+ }), _ = /* @__PURE__ */ l(a, [["__scopeId", "data-v-84048551"]]);
33
+ export {
34
+ _ as default
35
+ };
@@ -0,0 +1,331 @@
1
+ import { defineComponent as H, mergeModels as M, toRefs as J, useModel as K, ref as Q, computed as h, openBlock as i, createElementBlock as b, createVNode as V, mergeProps as W, unref as r, withModifiers as u, createSlots as q, withCtx as a, normalizeClass as X, renderSlot as d, createElementVNode as n, createBlock as E, createCommentVNode as B, Fragment as Y, toDisplayString as D, nextTick as I, pushScopeId as Z, popScopeId as ee } from "vue";
2
+ import le from "./multiselect.es.js";
3
+ import te from "./textField.es.js";
4
+ import { R as se } from "./icon-svg-Cpx09myr.js";
5
+ import oe from "./checkbox.es.js";
6
+ import re from "./radioButton.es.js";
7
+ import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ import './style/dropdown.css';const de = (t) => (Z("data-v-0ad95116"), t = t(), ee(), t), ne = { class: "rds-dropdown" }, ie = /* @__PURE__ */ de(() => /* @__PURE__ */ n("span", null, null, -1)), ue = { class: "rds-dropdown__option" }, ce = { class: "rds-dropdown__option-container" }, me = { class: "rds-dropdown__option--prepend" }, pe = { class: "rds-dropdown__option--content" }, fe = {
9
+ key: 0,
10
+ class: "rds-dropdown__option-detail"
11
+ }, ve = { key: 1 }, he = {
12
+ key: 0,
13
+ class: "rds-dropdown__option--append"
14
+ }, be = { class: "rds-dropdown__after-list" }, ye = { class: "rds-dropdown__after-list-container" }, ke = /* @__PURE__ */ H({
15
+ __name: "dropdown",
16
+ props: /* @__PURE__ */ M({
17
+ /**
18
+ * Id del dropdown
19
+ */
20
+ id: {
21
+ type: [String, Number],
22
+ required: !0,
23
+ validator: (t) => !t || String(t).trim() === "" ? (console.error("[RDSDropdown]: `id` prop is required."), !1) : !0
24
+ },
25
+ label: {
26
+ type: String,
27
+ required: !0,
28
+ default: "",
29
+ validator: (t) => !t || t.trim() === "" ? (console.error("[RDSDropdown]: `label` prop is required."), !1) : !0
30
+ },
31
+ /**
32
+ * Valores a mostrar en el dropdown
33
+ */
34
+ options: {
35
+ type: Array,
36
+ required: !0
37
+ },
38
+ /**
39
+ * Indica si el dropdown está deshabilitado
40
+ */
41
+ disabled: {
42
+ type: Boolean,
43
+ default: !1
44
+ },
45
+ /**
46
+ * Indica si se pueden seleccionar múltiples valores
47
+ */
48
+ multiple: {
49
+ type: Boolean,
50
+ default: !1
51
+ },
52
+ /**
53
+ * Indica si se cierra el dropdown al seleccionar un valor
54
+ */
55
+ closeOnSelect: {
56
+ type: Boolean,
57
+ default: !1
58
+ },
59
+ /**
60
+ * Indica si el listado de opcciones es pequeño
61
+ */
62
+ small: {
63
+ type: Boolean,
64
+ default: !1
65
+ },
66
+ /**
67
+ * Indica si se muestra un radio button en las opcciones
68
+ * <br>
69
+ * Solo valido para seleccion unica
70
+ */
71
+ showRadio: {
72
+ type: Boolean,
73
+ default: !1,
74
+ validator: (t, $) => t && $.multiple ? (console.error("showRadio solo es valido para seleccion unica"), !1) : !0
75
+ },
76
+ /**
77
+ * Indica si el campo de entrada contiene un error o no.
78
+ */
79
+ error: {
80
+ type: Boolean,
81
+ default: !1
82
+ },
83
+ /**
84
+ * Indica si se debe mostrar un mensaje de ayuda debajo del campo de entrada o no.
85
+ */
86
+ helper: {
87
+ type: Boolean,
88
+ default: !1
89
+ },
90
+ /**
91
+ * Indica la cantidad maxima de elementos seleccionados a mostrar en el imput.
92
+ */
93
+ limit: {
94
+ type: Number,
95
+ default: 4
96
+ },
97
+ /**
98
+ * Texto a mostrar cuando se alcanza el limite de elementos seleccionados.
99
+ */
100
+ limitText: {
101
+ type: Function,
102
+ default: (t) => `Más de ${t} elementos seleccionados.`
103
+ }
104
+ }, {
105
+ modelValue: {
106
+ required: !0
107
+ },
108
+ modelModifiers: {}
109
+ }),
110
+ emits: /* @__PURE__ */ M(["open", "close", "select", "change"], ["update:modelValue"]),
111
+ setup(t, { expose: $, emit: j }) {
112
+ const c = t, m = j, {
113
+ disabled: p,
114
+ options: y,
115
+ limit: S,
116
+ multiple: f
117
+ } = J(c), s = K(t, "modelValue"), v = Q(), N = h(() => y.value.every((e) => typeof e == "object" && (e == null ? void 0 : e.id) && (e == null ? void 0 : e.label))), T = h(() => !f.value || c.closeOnSelect), O = h({
118
+ get: () => s.value ? c.multiple ? Array.isArray(s.value) ? s.value.length > S.value ? c.limitText(S.value) : s.value.map((e) => typeof e == "string" ? e : e.label).join(", ") : "" : typeof s.value == "object" ? s.value.label : typeof s.value == "string" ? s.value : "" : "",
119
+ set: () => null
120
+ }), F = h(() => ({
121
+ "rds-dropdown-input": !0,
122
+ "rds-dropdown--disabled": p.value,
123
+ "rds-dropdown--small": c.small
124
+ })), C = h(() => {
125
+ const e = {};
126
+ return N.value && Object.assign(e, {
127
+ "track-by": "id",
128
+ label: "label"
129
+ }), e;
130
+ }), k = (e) => {
131
+ if (s.value === e) return !0;
132
+ if (Array.isArray(s.value)) {
133
+ if (typeof e == "string") return s.value.includes(e);
134
+ if (C.value.label)
135
+ return s.value.some((o) => o.id === e.id);
136
+ }
137
+ return !1;
138
+ }, L = (e) => {
139
+ m("open", e);
140
+ }, x = (e) => {
141
+ m("close", e);
142
+ }, U = (e) => {
143
+ I(() => {
144
+ m("select", e);
145
+ });
146
+ }, P = () => {
147
+ I(() => {
148
+ if (f.value) {
149
+ const e = y.value.filter(
150
+ (o) => k(o)
151
+ ) || [];
152
+ m("change", e);
153
+ } else {
154
+ const e = y.value.find(
155
+ (o) => k(o)
156
+ );
157
+ m("change", [e]);
158
+ }
159
+ });
160
+ }, A = (e) => {
161
+ v.value.select(e);
162
+ }, _ = () => {
163
+ v.value.activate();
164
+ }, z = () => {
165
+ v.value.deactivate();
166
+ }, G = () => {
167
+ v.value.toggle();
168
+ };
169
+ return $({
170
+ /**
171
+ * Abre el dropdown
172
+ */
173
+ activate: _,
174
+ /**
175
+ * Cierra el dropdown
176
+ */
177
+ deactivate: z
178
+ }), (e, o) => (i(), b("div", ne, [
179
+ V(le, W({
180
+ ref_key: "multiselect",
181
+ ref: v,
182
+ modelValue: s.value,
183
+ "onUpdate:modelValue": o[2] || (o[2] = (l) => s.value = l),
184
+ class: F.value,
185
+ options: r(y),
186
+ "close-on-select": T.value,
187
+ "show-labels": !1,
188
+ disabled: r(p),
189
+ multiple: r(f),
190
+ searchable: !1,
191
+ "open-direction": "bottom",
192
+ limit: r(S),
193
+ "limit-text": t.limitText
194
+ }, C.value, {
195
+ onOpen: L,
196
+ onClose: x,
197
+ onSelect: U,
198
+ "onUpdate:modelValue": P,
199
+ onFocus: o[3] || (o[3] = u(() => _(), ["prevent"])),
200
+ onBlur: u(() => null, ["prevent"])
201
+ }), q({
202
+ selection: a(({ isOpen: l }) => [
203
+ V(r(te), {
204
+ id: `multiselect-dropdown-${t.id}`,
205
+ modelValue: O.value,
206
+ "onUpdate:modelValue": o[1] || (o[1] = (w) => O.value = w),
207
+ class: "rds-dropdown__input",
208
+ disabled: r(p),
209
+ label: t.label,
210
+ error: t.error,
211
+ helper: t.helper,
212
+ readonly: "",
213
+ onClick: u((w) => l ? null : _(), ["prevent", "stop"])
214
+ }, q({
215
+ "right-icon": a(() => [
216
+ V(r(se), {
217
+ name: "arrow_down",
218
+ "aria-hidden": "true",
219
+ class: X(["rds-dropdown__input-caret", {
220
+ "rds-dropdown__input-caret--open": l
221
+ }]),
222
+ onClick: o[0] || (o[0] = u(() => {
223
+ }, ["self", "stop"])),
224
+ onMousedown: u(G, ["self", "prevent", "stop"])
225
+ }, null, 8, ["class"])
226
+ ]),
227
+ _: 2
228
+ }, [
229
+ e.$slots["helper-text"] ? {
230
+ name: "helper-text",
231
+ fn: a(() => [
232
+ d(e.$slots, "helper-text", {}, void 0, !0)
233
+ ]),
234
+ key: "0"
235
+ } : void 0
236
+ ]), 1032, ["id", "modelValue", "disabled", "label", "error", "helper", "onClick"])
237
+ ]),
238
+ placeholder: a(() => [
239
+ ie
240
+ ]),
241
+ option: a(({ option: l, search: w, index: R }) => [
242
+ n("div", ue, [
243
+ n("div", ce, [
244
+ n("div", me, [
245
+ r(f) ? (i(), E(r(oe), {
246
+ key: 0,
247
+ id: `${R}-${l.id}`,
248
+ small: t.small,
249
+ "is-checked": k(l),
250
+ disabled: r(p) || (l == null ? void 0 : l.$isDisabled) || !1,
251
+ onClick: u((g) => A(l), ["prevent", "stop"])
252
+ }, null, 8, ["id", "small", "is-checked", "disabled", "onClick"])) : !r(f) && t.showRadio ? (i(), E(r(re), {
253
+ key: 1,
254
+ id: `${R}-${l.id}`,
255
+ small: t.small,
256
+ "group-name": `group-${t.id}`,
257
+ checked: k(l),
258
+ disabled: r(p) || (l == null ? void 0 : l.$isDisabled) || !1,
259
+ option: l,
260
+ onClick: u((g) => A(l), ["prevent", "stop"])
261
+ }, null, 8, ["id", "small", "group-name", "checked", "disabled", "option", "onClick"])) : B("", !0)
262
+ ]),
263
+ n("div", pe, [
264
+ d(e.$slots, "singleLabel", { option: l }, () => {
265
+ var g;
266
+ return [
267
+ (g = C.value) != null && g.label ? (i(), b(Y, { key: 0 }, [
268
+ n("span", null, D(l.label), 1),
269
+ l != null && l.detail ? (i(), b("span", fe, D(l.detail), 1)) : B("", !0)
270
+ ], 64)) : (i(), b("span", ve, D(l), 1))
271
+ ];
272
+ }, !0)
273
+ ])
274
+ ]),
275
+ e.$slots.optionAppend ? (i(), b("div", he, [
276
+ d(e.$slots, "optionAppend", {
277
+ option: l,
278
+ search: w,
279
+ index: R
280
+ }, void 0, !0)
281
+ ])) : B("", !0)
282
+ ])
283
+ ]),
284
+ _: 2
285
+ }, [
286
+ e.$slots.limit ? {
287
+ name: "limit",
288
+ fn: a(() => [
289
+ d(e.$slots, "limit", {}, void 0, !0)
290
+ ]),
291
+ key: "0"
292
+ } : void 0,
293
+ e.$slots.maxElements ? {
294
+ name: "maxElements",
295
+ fn: a(() => [
296
+ d(e.$slots, "maxElements", {}, void 0, !0)
297
+ ]),
298
+ key: "1"
299
+ } : void 0,
300
+ e.$slots.noResult ? {
301
+ name: "noResult",
302
+ fn: a(({ search: l }) => [
303
+ d(e.$slots, "noResult", { search: l }, void 0, !0)
304
+ ]),
305
+ key: "2"
306
+ } : void 0,
307
+ e.$slots.noOptions ? {
308
+ name: "noOptions",
309
+ fn: a(() => [
310
+ d(e.$slots, "noOptions", {}, void 0, !0)
311
+ ]),
312
+ key: "3"
313
+ } : void 0,
314
+ e.$slots.afterList ? {
315
+ name: "afterList",
316
+ fn: a(() => [
317
+ n("div", be, [
318
+ n("div", ye, [
319
+ d(e.$slots, "afterList", {}, void 0, !0)
320
+ ])
321
+ ])
322
+ ]),
323
+ key: "4"
324
+ } : void 0
325
+ ]), 1040, ["modelValue", "class", "options", "close-on-select", "disabled", "multiple", "limit", "limit-text"])
326
+ ]));
327
+ }
328
+ }), Ve = /* @__PURE__ */ ae(ke, [["__scopeId", "data-v-0ad95116"]]);
329
+ export {
330
+ Ve as default
331
+ };
@@ -0,0 +1,97 @@
1
+ import { defineComponent as i, toRefs as p, computed as u, openBlock as f, createBlock as c, mergeProps as d } from "vue";
2
+ import m from "./button.es.js";
3
+ import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import './style/floatingActionButton.css';const v = /* @__PURE__ */ i({
5
+ __name: "floating-action-button",
6
+ props: {
7
+ /**
8
+ * <span>Icono a mostrar en el botón</span>
9
+ */
10
+ icon: {
11
+ type: String,
12
+ required: !0
13
+ },
14
+ /**
15
+ * Indica la posicion que ocupara el boton respecto del padre
16
+ * `['relative', 'absolute', 'fixed']`
17
+ */
18
+ position: {
19
+ type: String,
20
+ default: "relative",
21
+ required: !0,
22
+ validator: (t) => ["relative", "absolute", "fixed"].includes(t)
23
+ },
24
+ /**
25
+ * <span>Posicion del botón respecto del padre</span>
26
+ * `['top-left', 'top-right', 'bottom-left', 'bottom-right']` <br>
27
+ * solo es valido si la posicion es `absolute` o `fixed`
28
+ */
29
+ placement: {
30
+ type: String,
31
+ default: "bottom",
32
+ validator: (t) => [
33
+ "top-left",
34
+ "top-right",
35
+ "bottom-left",
36
+ "bottom-right"
37
+ ].includes(t)
38
+ },
39
+ /**
40
+ * <span>Indica si el botón es inverso</span>
41
+ */
42
+ inverse: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ /**
47
+ * <span>Indica si el botón es pequeño</span>
48
+ */
49
+ small: {
50
+ type: Boolean,
51
+ default: !1
52
+ },
53
+ /**
54
+ * <span>Indica si el botón es extra pequeño</span>
55
+ */
56
+ extraSmall: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
60
+ /**
61
+ * <span>Añade una clase por encima de opacidad <br>Los eventos funcionan</span>
62
+ */
63
+ disabled: {
64
+ type: Boolean,
65
+ default: !1
66
+ },
67
+ /**
68
+ * <span>Cambia el estado del botón a cargando</span>
69
+ */
70
+ loading: {
71
+ type: Boolean,
72
+ default: !1
73
+ }
74
+ },
75
+ setup(t) {
76
+ const a = t, {
77
+ position: l,
78
+ placement: r,
79
+ extraSmall: n
80
+ } = p(a), s = u(() => {
81
+ const e = "rds-btn--fab", o = [];
82
+ return n.value && o.push("rds-btn--extra-small"), o.push(`${e}-${l.value}`), o.push(`${e}-${r.value}`), o.join(" ");
83
+ });
84
+ return (e, o) => (f(), c(m, d({
85
+ class: ["rds-btn--fab", [
86
+ s.value
87
+ ]]
88
+ }, { ...e.$props, ...e.$attrs }, {
89
+ text: "",
90
+ "is-action": "",
91
+ variant: "primary"
92
+ }), null, 16, ["class"]));
93
+ }
94
+ }), _ = /* @__PURE__ */ b(v, [["__scopeId", "data-v-1cb63e33"]]);
95
+ export {
96
+ _ as default
97
+ };
@@ -0,0 +1,18 @@
1
+ function u(e, n) {
2
+ let i;
3
+ return (...t) => {
4
+ clearTimeout(i), i = setTimeout(() => e(...t), n);
5
+ };
6
+ }
7
+ function s(e, n) {
8
+ return e.length !== n.length ? !1 : e.every((i, t) => i === n[t]);
9
+ }
10
+ function f(e, n, i) {
11
+ const t = e.indexOf(n);
12
+ return i ? t === -1 && e.push(n) : t !== -1 && e.splice(t, 1), e;
13
+ }
14
+ export {
15
+ s as a,
16
+ u as d,
17
+ f as t
18
+ };