energy-components 1.10.0-beta.0 → 1.10.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.
Files changed (47) hide show
  1. package/dist/components/accordion.es.js +1 -1
  2. package/dist/components/avatar.es.js +1 -1
  3. package/dist/components/breadcrumbs.es.js +2 -3
  4. package/dist/components/button.es.js +1 -1
  5. package/dist/components/checkbox.es.js +1 -1
  6. package/dist/components/directAccess.es.js +1 -1
  7. package/dist/components/dragAndDrop.es.js +1 -1
  8. package/dist/components/dropdown.es.js +19 -18
  9. package/dist/components/fileUploadItem.es.js +1 -1
  10. package/dist/components/filterChip.es.js +1 -1
  11. package/dist/components/{icon-svg-YXBqzlJN.js → icon-svg-DuzOdbk1.js} +4360 -2853
  12. package/dist/components/iconList.es.js +1 -1
  13. package/dist/components/iconSvg.es.js +1 -1
  14. package/dist/components/index.es.js +1 -1
  15. package/dist/components/infoBox.es.js +1 -1
  16. package/dist/components/link.es.js +1 -1
  17. package/dist/components/modal.es.js +1 -1
  18. package/dist/components/multiselectcontentwrapper.es.js +25 -22
  19. package/dist/components/persistentToast.es.js +1 -1
  20. package/dist/components/progressBar.es.js +1 -1
  21. package/dist/components/quantitySelector.es.js +1 -1
  22. package/dist/components/radioButton.es.js +1 -1
  23. package/dist/components/selectionChip.es.js +1 -1
  24. package/dist/components/sidedrawer.es.js +1 -1
  25. package/dist/components/style/dropdown.css +1 -1
  26. package/dist/components/style/multiselect.css +1 -1
  27. package/dist/components/style/multiselectcontentwrapper.css +1 -1
  28. package/dist/components/style/tag.css +1 -1
  29. package/dist/components/style/textField.css +1 -1
  30. package/dist/components/switch.es.js +1 -1
  31. package/dist/components/tabBar.es.js +1 -1
  32. package/dist/components/tableslotedcomponent.es.js +1 -1
  33. package/dist/components/tag.es.js +15 -15
  34. package/dist/components/textArea.es.js +1 -1
  35. package/dist/components/textField.es.js +64 -53
  36. package/dist/components/tooltip.es.js +293 -295
  37. package/dist/energy-components.es.js +6988 -5469
  38. package/dist/energy-components.umd.js +2 -2
  39. package/dist/style.css +1 -1
  40. package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
  41. package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +9 -2
  42. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +4 -4
  43. package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +1 -1
  44. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +17 -0
  45. package/dist/types/src/setupTests.d.ts +1 -0
  46. package/dist/types/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +4 -2
@@ -1,13 +1,24 @@
1
- import { defineComponent as ee, toRefs as te, ref as w, computed as d, watch as le, createElementBlock as k, openBlock as p, normalizeClass as S, createElementVNode as m, renderSlot as N, createCommentVNode as y, createBlock as I, mergeProps as $, toHandlers as ne, unref as o, toDisplayString as C, withModifiers as ae } from "vue";
2
- import { g as oe } from "./getInstance-GhoEcxLF.js";
3
- import { R, s as re } from "./icon-svg-YXBqzlJN.js";
4
- import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import './style/textField.css';const ie = { class: "rds-e-textfield__container" }, ue = { class: "rds-e-textfield__input-container" }, de = ["id", "type", "maxlength", "minlength", "disabled", "value", "autocomplete", "readonly"], ce = ["for"], fe = {
1
+ import { defineComponent as te, toRefs as le, ref as w, computed as d, watch as ae, createElementBlock as k, openBlock as p, normalizeClass as S, createElementVNode as m, createCommentVNode as y, renderSlot as N, createBlock as I, mergeProps as $, toHandlers as ne, unref as o, toDisplayString as C, withModifiers as oe } from "vue";
2
+ import { g as re } from "./getInstance-GhoEcxLF.js";
3
+ import { R, s as se } from "./icon-svg-DuzOdbk1.js";
4
+ import { _ as ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import './style/textField.css';const ue = { class: "rds-e-textfield__container" }, de = { class: "rds-e-textfield__input-container" }, ce = ["id", "type", "maxlength", "minlength", "disabled", "value", "autocomplete", "readonly"], fe = ["for"], pe = {
6
6
  key: 0,
7
7
  class: "rds-e-textfield__icon rds-e-textfield__icon--right"
8
- }, pe = { class: "rds-e-textfield__helper" }, me = /* @__PURE__ */ ee({
8
+ }, me = {
9
+ key: 0,
10
+ class: "rds-e-textfield__helper"
11
+ }, ve = /* @__PURE__ */ te({
9
12
  __name: "text-field",
10
13
  props: {
14
+ /**
15
+ * Hace que el campo ocupe todo el ancho disponible del contenedor padre (elimina min-width).
16
+ * ⚠️ Solo recomendado para contenedores muy pequeños.
17
+ */
18
+ fullWidth: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
11
22
  /**
12
23
  * Etiqueta que se muestra sobre el campo de entrada. y Placeholder
13
24
  */
@@ -137,7 +148,7 @@ import './style/textField.css';const ie = { class: "rds-e-textfield__container"
137
148
  },
138
149
  emits: ["update:modelValue", "keydown", "keyup", "keypress", "change"],
139
150
  setup(t, { expose: r, emit: s }) {
140
- const n = t, i = s, {
151
+ const a = t, i = s, {
141
152
  type: v,
142
153
  label: D,
143
154
  disabled: h,
@@ -148,13 +159,14 @@ import './style/textField.css';const ie = { class: "rds-e-textfield__container"
148
159
  rightIcon: q,
149
160
  helper: K,
150
161
  error: x,
151
- helperText: z,
152
- clearable: A,
162
+ helperText: W,
163
+ clearable: z,
153
164
  password: g,
154
- autocomplete: H
155
- } = te(n), c = w(null), f = w(!0), b = w(!1), M = oe(), V = d(() => n.id || `text-field-${M}`), U = d(() => g.value ? f.value ? "text" : "password" : v.value), G = d(() => {
165
+ autocomplete: A,
166
+ fullWidth: H
167
+ } = le(a), c = w(null), f = w(!0), b = w(!1), M = re(), V = d(() => a.id || `text-field-${M}`), U = d(() => g.value ? f.value ? "text" : "password" : v.value), G = d(() => {
156
168
  if (g.value || v.value === "password")
157
- return H.value;
169
+ return A.value;
158
170
  }), J = (e) => {
159
171
  const l = e.target;
160
172
  let _ = l.value;
@@ -162,31 +174,31 @@ import './style/textField.css';const ie = { class: "rds-e-textfield__container"
162
174
  if (l.value.trim() === "")
163
175
  _ = null;
164
176
  else {
165
- const B = Number.parseFloat(l.value);
166
- _ = Number.isNaN(B) ? l.value : B;
177
+ const T = Number.parseFloat(l.value);
178
+ _ = Number.isNaN(T) ? l.value : T;
167
179
  }
168
180
  else l.value === "" && u.value === null && (_ = null);
169
181
  i("update:modelValue", _);
170
- }, E = () => {
182
+ }, B = () => {
171
183
  b.value = !1;
172
- }, L = () => {
184
+ }, E = () => {
173
185
  b.value = !0;
174
186
  }, O = (e) => {
175
187
  i("keydown", e);
176
188
  }, Q = (e) => {
177
189
  i("keyup", e);
178
- }, W = (e) => {
179
- i("keypress", e);
180
190
  }, X = (e) => {
191
+ i("keypress", e);
192
+ }, Y = (e) => {
181
193
  i("change", e);
182
- }, Y = d(() => {
194
+ }, Z = d(() => {
183
195
  if (x.value) return !0;
184
196
  const e = u.value === null || u.value === void 0 ? "" : String(u.value);
185
197
  return e.length > 0 && (e.length < P.value || v.value !== "number" && e.length > F.value);
186
- }), Z = d(() => {
198
+ }), ee = d(() => {
187
199
  const e = [];
188
- return u.value !== null && String(u.value).length > 0 && e.push("rds-e-textfield--filled"), Y.value && e.push("rds-e-textfield--error"), h.value && e.push("rds-e-textfield--disabled"), e.join(" ");
189
- }), a = d(() => {
200
+ return u.value !== null && String(u.value).length > 0 && e.push("rds-e-textfield--filled"), Z.value && e.push("rds-e-textfield--error"), h.value && e.push("rds-e-textfield--disabled"), H.value && e.push("rds-e-textfield--full-width"), e.join(" ");
201
+ }), n = d(() => {
190
202
  const e = {
191
203
  name: j.value,
192
204
  class: "",
@@ -216,7 +228,7 @@ import './style/textField.css';const ie = { class: "rds-e-textfield__container"
216
228
  click: () => f.value = !f.value
217
229
  }
218
230
  }
219
- } : A.value ? {
231
+ } : z.value ? {
220
232
  left: {
221
233
  ...e
222
234
  },
@@ -230,82 +242,81 @@ import './style/textField.css';const ie = { class: "rds-e-textfield__container"
230
242
  }
231
243
  } : l;
232
244
  });
233
- le(
245
+ ae(
234
246
  g,
235
247
  (e) => f.value = !e,
236
248
  { immediate: !0 }
237
249
  );
238
- const T = (e) => {
239
- const l = re.includes(e);
250
+ const L = (e) => {
251
+ const l = se.includes(e);
240
252
  return l || console.warn(`[RDSTextfield]: El icono "${e}" no es un icono válido.`), l;
241
253
  };
242
254
  return r({
243
255
  focus: () => {
244
- c.value && (c.value.focus(), L());
256
+ c.value && (c.value.focus(), E());
245
257
  },
246
258
  blur: () => {
247
- c.value && (c.value.blur(), E());
259
+ c.value && (c.value.blur(), B());
248
260
  }
249
261
  }), (e, l) => (p(), k("div", {
250
- class: S(["rds-e-textfield", Z.value])
262
+ class: S(["rds-e-textfield", ee.value])
251
263
  }, [
252
- m("div", ie, [
264
+ m("div", ue, [
253
265
  N(e.$slots, "left-icon", {}, () => [
254
- a.value.left.name && T(a.value.left.name) ? (p(), I(R, $({
266
+ n.value.left.name && L(n.value.left.name) ? (p(), I(R, $({
255
267
  key: 0,
256
268
  class: ["rds-e-textfield__icon rds-e-textfield__icon--left", { "rds-e-textfield__icon--hidden": b.value }],
257
269
  "aria-hidden": "true"
258
- }, a.value.left, ne(a.value.left.events)), null, 16, ["class"])) : y("", !0)
270
+ }, n.value.left, ne(n.value.left.events)), null, 16, ["class"])) : y("", !0)
259
271
  ], !0),
260
- m("div", ue, [
272
+ m("div", de, [
261
273
  m("input", {
262
274
  id: V.value,
263
275
  ref_key: "input",
264
276
  ref: c,
265
277
  type: U.value,
266
278
  class: "rds-e-textfield__input",
267
- maxlength: n.type === "number" ? void 0 : n.maxLength,
268
- minlength: n.type === "number" ? void 0 : n.minLength,
279
+ maxlength: a.type === "number" ? void 0 : a.maxLength,
280
+ minlength: a.type === "number" ? void 0 : a.minLength,
269
281
  disabled: o(h),
270
- value: n.modelValue === null ? "" : n.modelValue,
282
+ value: a.modelValue === null ? "" : a.modelValue,
271
283
  autocomplete: G.value,
272
284
  readonly: t.readonly,
273
285
  onInput: J,
274
- onBlur: E,
275
- onFocus: L,
286
+ onBlur: B,
287
+ onFocus: E,
276
288
  onKeydown: O,
277
289
  onKeyup: Q,
278
- onKeypress: W,
279
- onChange: X
280
- }, null, 40, de),
290
+ onKeypress: X,
291
+ onChange: Y
292
+ }, null, 40, ce),
281
293
  m("label", {
282
294
  for: V.value,
283
295
  class: S(["rds-e-textfield__label", o(h) ? "rds-e-textfield__label--disabled" : ""])
284
- }, C(o(D)), 11, ce)
296
+ }, C(o(D)), 11, fe)
285
297
  ]),
286
- a.value.right.name || e.$slots["right-icon"] ? (p(), k("span", fe, [
298
+ n.value.right.name || e.$slots["right-icon"] ? (p(), k("span", pe, [
287
299
  N(e.$slots, "right-icon", {}, () => [
288
- a.value.right.name && T(a.value.right.name) ? (p(), I(R, $({
300
+ n.value.right.name && L(n.value.right.name) ? (p(), I(R, $({
289
301
  key: 0,
290
302
  "aria-hidden": "true",
291
303
  class: "rds-e-textfield__icon rds-e-textfield__icon--right"
292
- }, a.value.right, {
293
- onClick: ae(a.value.right.events.click, ["stop"])
304
+ }, n.value.right, {
305
+ onClick: oe(n.value.right.events.click, ["stop"])
294
306
  }), null, 16, ["onClick"])) : y("", !0)
295
307
  ], !0)
296
308
  ])) : y("", !0)
297
309
  ]),
298
- m("div", pe, [
310
+ (o(K) || o(x)) && !o(h) ? (p(), k("div", me, [
299
311
  N(e.$slots, "helper-text", {}, () => [
300
- (o(K) || o(x)) && !o(h) ? (p(), k("span", {
301
- key: 0,
312
+ m("span", {
302
313
  class: S(o(x) ? "rds-e-textfield__helper--error" : "")
303
- }, C(o(z)), 3)) : y("", !0)
314
+ }, C(o(W)), 3)
304
315
  ], !0)
305
- ])
316
+ ])) : y("", !0)
306
317
  ], 2));
307
318
  }
308
- }), ye = /* @__PURE__ */ se(me, [["__scopeId", "data-v-a6ab314d"]]);
319
+ }), xe = /* @__PURE__ */ ie(ve, [["__scopeId", "data-v-3d4a237a"]]);
309
320
  export {
310
- ye as default
321
+ xe as default
311
322
  };