energy-components 1.6.0-beta.1 → 1.7.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 (60) hide show
  1. package/dist/components/accordion.es.js +13 -13
  2. package/dist/components/button.es.js +21 -21
  3. package/dist/components/checkbox.es.js +7 -7
  4. package/dist/components/dropdown.es.js +278 -148
  5. package/dist/components/filterChip.es.js +4 -4
  6. package/dist/components/{icon-svg-pUb3-FXk.js → icon-svg-BmDOQ0kL.js} +42 -26
  7. package/dist/components/iconList.es.js +5 -5
  8. package/dist/components/iconSvg.es.js +1 -1
  9. package/dist/components/index.es.js +62 -59
  10. package/dist/components/infoBox.es.js +17 -17
  11. package/dist/components/link.es.js +15 -15
  12. package/dist/components/modal.es.js +69 -39
  13. package/dist/components/multiselect.es.js +230 -184
  14. package/dist/components/multiselectcontentwrapper.es.js +140 -0
  15. package/dist/components/pagination.es.js +129 -86
  16. package/dist/components/persistentToast.es.js +9 -9
  17. package/dist/components/quantitySelector.es.js +9 -9
  18. package/dist/components/radioButton.es.js +16 -16
  19. package/dist/components/selectionChip.es.js +5 -5
  20. package/dist/components/sidedrawer.es.js +53 -33
  21. package/dist/components/style/button.css +1 -1
  22. package/dist/components/style/datepicker.css +1 -1
  23. package/dist/components/style/dropdown.css +1 -1
  24. package/dist/components/style/icon-svg.css +1 -1
  25. package/dist/components/style/modal.css +1 -1
  26. package/dist/components/style/multiselect.css +1 -1
  27. package/dist/components/style/multiselectcontentwrapper.css +1 -0
  28. package/dist/components/style/pagination.css +1 -1
  29. package/dist/components/style/sidedrawer.css +1 -1
  30. package/dist/components/style/tabBar.css +1 -1
  31. package/dist/components/style/tablepaginatedcomponent.css +1 -1
  32. package/dist/components/style/tableslotedcomponent.css +1 -1
  33. package/dist/components/style/textField.css +1 -1
  34. package/dist/components/style/tooltip.css +1 -1
  35. package/dist/components/switch.es.js +10 -10
  36. package/dist/components/tabBar.es.js +15 -13
  37. package/dist/components/tablepaginatedcomponent.es.js +69 -65
  38. package/dist/components/tableslotedcomponent.es.js +155 -148
  39. package/dist/components/tag.es.js +5 -5
  40. package/dist/components/textArea.es.js +22 -22
  41. package/dist/components/textField.es.js +93 -84
  42. package/dist/components/tooltip.es.js +178 -174
  43. package/dist/energy-components.es.js +6678 -6128
  44. package/dist/energy-components.umd.js +1 -1
  45. package/dist/style.css +1 -1
  46. package/dist/types/src/components/buttons/button/button.vue.d.ts +2 -2
  47. package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +19 -0
  48. package/dist/types/src/components/index.d.ts +1 -0
  49. package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +86 -0
  50. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +582 -0
  51. package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +2 -2
  52. package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +1 -1
  53. package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +2 -2
  54. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +10 -3
  55. package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +30 -0
  56. package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +80 -31
  57. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +27 -1
  58. package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +1 -0
  59. package/dist/types/tsconfig.tsbuildinfo +1 -1
  60. package/package.json +5 -5
@@ -1,38 +1,39 @@
1
- import { openBlock as d, createElementBlock as p, normalizeClass as v, withKeys as f, withModifiers as r, renderSlot as u, createElementVNode as o, withDirectives as b, Fragment as L, renderList as $, toDisplayString as m, vShow as y, createCommentVNode as c, createVNode as B, Transition as k, withCtx as D, normalizeStyle as S, createTextVNode as V } from "vue";
2
- import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import './style/multiselect.css';function O(e) {
1
+ import k from "./multiselectcontentwrapper.es.js";
2
+ import { resolveComponent as E, openBlock as c, createElementBlock as g, normalizeClass as P, withKeys as a, withModifiers as o, renderSlot as u, createElementVNode as p, withDirectives as S, Fragment as A, renderList as v, toDisplayString as O, vShow as L, createCommentVNode as m, createVNode as b, Transition as T, withCtx as y, normalizeStyle as N, createTextVNode as C, createSlots as B, normalizeProps as $, guardReactiveProps as G, createBlock as F, Teleport as x } from "vue";
3
+ import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import './style/multiselect.css';function w(e) {
4
5
  return e === 0 ? !1 : Array.isArray(e) && e.length === 0 ? !0 : !e;
5
6
  }
6
7
  function M(e) {
7
8
  return (...t) => !e(...t);
8
9
  }
9
- function P(e, t) {
10
+ function R(e, t) {
10
11
  return e === void 0 && (e = "undefined"), e === null && (e = "null"), e === !1 && (e = "false"), e.toString().toLowerCase().indexOf(t.trim()) !== -1;
11
12
  }
12
- function T(e, t, i, l) {
13
- return t ? e.filter((a) => P(l(a, i), t)).sort((a, n) => l(a, i).length - l(n, i).length) : e;
13
+ function H(e, t, i, n) {
14
+ return t ? e.filter((r) => R(n(r, i), t)).sort((r, l) => n(r, i).length - n(l, i).length) : e;
14
15
  }
15
- function H(e) {
16
+ function z(e) {
16
17
  return e.filter((t) => !t.$isLabel);
17
18
  }
18
- function w(e, t) {
19
- return (i) => i.reduce((l, a) => a[e] && a[e].length ? (l.push({
20
- $groupLabel: a[t],
19
+ function V(e, t) {
20
+ return (i) => i.reduce((n, r) => r[e] && r[e].length ? (n.push({
21
+ $groupLabel: r[t],
21
22
  $isLabel: !0
22
- }), l.concat(a[e])) : l, []);
23
+ }), n.concat(r[e])) : n, []);
23
24
  }
24
- function G(e, t, i, l, a) {
25
- return (n) => n.map((s) => {
26
- if (!s[i])
25
+ function j(e, t, i, n, r) {
26
+ return (l) => l.map((d) => {
27
+ if (!d[i])
27
28
  return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."), [];
28
- const h = T(s[i], e, t, a);
29
- return h.length ? {
30
- [l]: s[l],
31
- [i]: h
29
+ const s = H(d[i], e, t, r);
30
+ return s.length ? {
31
+ [n]: d[n],
32
+ [i]: s
32
33
  } : [];
33
34
  });
34
35
  }
35
- const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
36
+ const D = (...e) => (t) => e.reduce((i, n) => n(i), t), q = {
36
37
  data() {
37
38
  return {
38
39
  search: "",
@@ -158,7 +159,7 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
158
159
  customLabel: {
159
160
  type: Function,
160
161
  default(e, t) {
161
- return O(e) ? "" : t ? e[t] : e;
162
+ return w(e) ? "" : t ? e[t] : e;
162
163
  }
163
164
  },
164
165
  /**
@@ -296,7 +297,7 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
296
297
  filteredOptions() {
297
298
  const e = this.search || "", t = e.toLowerCase().trim();
298
299
  let i = this.options.concat();
299
- return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : T(i, t, this.label, this.customLabel) : i = this.groupValues ? w(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(M(this.isSelected)) : i, this.taggable && t.length && !this.isExistingOption(t) && (this.tagPosition === "bottom" ? i.push({ isTag: !0, label: e }) : i.unshift({ isTag: !0, label: e })), i.slice(0, this.optionsLimit);
300
+ return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : H(i, t, this.label, this.customLabel) : i = this.groupValues ? V(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(M(this.isSelected)) : i, this.taggable && t.length && !this.isExistingOption(t) && (this.tagPosition === "bottom" ? i.push({ isTag: !0, label: e }) : i.unshift({ isTag: !0, label: e })), i.slice(0, this.optionsLimit);
300
301
  },
301
302
  valueKeys() {
302
303
  return this.trackBy ? this.internalValue.map((e) => e[this.trackBy]) : this.internalValue;
@@ -334,9 +335,9 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
334
335
  * @return {Array} returns a filtered and flat options list
335
336
  */
336
337
  filterAndFlat(e, t, i) {
337
- return E(
338
- G(t, i, this.groupValues, this.groupLabel, this.customLabel),
339
- w(this.groupValues, this.groupLabel)
338
+ return D(
339
+ j(t, i, this.groupValues, this.groupLabel, this.customLabel),
340
+ V(this.groupValues, this.groupLabel)
340
341
  )(e);
341
342
  },
342
343
  /**
@@ -345,9 +346,9 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
345
346
  * @return {Array} returns a flat options list without group labels
346
347
  */
347
348
  flatAndStrip(e) {
348
- return E(
349
- w(this.groupValues, this.groupLabel),
350
- H
349
+ return D(
350
+ V(this.groupValues, this.groupLabel),
351
+ z
351
352
  )(e);
352
353
  },
353
354
  /**
@@ -393,11 +394,11 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
393
394
  * @returns {Object||String}
394
395
  */
395
396
  getOptionLabel(e) {
396
- if (O(e)) return "";
397
+ if (w(e)) return "";
397
398
  if (e.isTag) return e.label;
398
399
  if (e.$isLabel) return e.$groupLabel;
399
400
  const t = this.customLabel(e, this.label);
400
- return O(t) ? "" : t;
401
+ return w(t) ? "" : t;
401
402
  },
402
403
  /**
403
404
  * Add the given option to the list of selected options
@@ -436,13 +437,13 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
436
437
  if (t) {
437
438
  if (this.wholeGroupSelected(t)) {
438
439
  this.$emit("remove", t[this.groupValues], this.id);
439
- const i = this.trackBy ? t[this.groupValues].map((a) => a[this.trackBy]) : t[this.groupValues], l = this.internalValue.filter(
440
- (a) => i.indexOf(this.trackBy ? a[this.trackBy] : a) === -1
440
+ const i = this.trackBy ? t[this.groupValues].map((r) => r[this.trackBy]) : t[this.groupValues], n = this.internalValue.filter(
441
+ (r) => i.indexOf(this.trackBy ? r[this.trackBy] : r) === -1
441
442
  );
442
- this.$emit("update:modelValue", l);
443
+ this.$emit("update:modelValue", n);
443
444
  } else {
444
445
  let i = t[this.groupValues].filter(
445
- (l) => !(this.isOptionDisabled(l) || this.isSelected(l))
446
+ (n) => !(this.isOptionDisabled(n) || this.isSelected(n))
446
447
  );
447
448
  this.max && i.splice(this.max - this.internalValue.length), this.$emit("select", i, this.id), this.$emit(
448
449
  "update:modelValue",
@@ -486,8 +487,8 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
486
487
  }
487
488
  const i = typeof e == "object" ? this.valueKeys.indexOf(e[this.trackBy]) : this.valueKeys.indexOf(e);
488
489
  if (this.multiple) {
489
- const l = this.internalValue.slice(0, i).concat(this.internalValue.slice(i + 1));
490
- this.$emit("update:modelValue", l);
490
+ const n = this.internalValue.slice(0, i).concat(this.internalValue.slice(i + 1));
491
+ this.$emit("update:modelValue", n);
491
492
  } else
492
493
  this.$emit("update:modelValue", null);
493
494
  this.$emit("remove", e, this.id), this.closeOnSelect && t && this.deactivate();
@@ -535,7 +536,7 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
535
536
  t > this.maxHeight || t > e || this.openDirection === "below" || this.openDirection === "bottom" ? (this.preferredOpenDirection = "below", this.optimizedHeight = Math.min(t - 40, this.maxHeight)) : (this.preferredOpenDirection = "above", this.optimizedHeight = Math.min(e - 40, this.maxHeight));
536
537
  }
537
538
  }
538
- }, K = {
539
+ }, W = {
539
540
  data() {
540
541
  return {
541
542
  pointer: 0,
@@ -589,7 +590,7 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
589
590
  "multiselect__option--disabled",
590
591
  { "multiselect__option--group": t.$isLabel }
591
592
  ];
592
- const i = this.options.find((l) => l[this.groupLabel] === t.$groupLabel);
593
+ const i = this.options.find((n) => n[this.groupLabel] === t.$groupLabel);
593
594
  return i && !this.wholeGroupDisabled(i) ? [
594
595
  "multiselect__option--group",
595
596
  { "multiselect__option--highlight": e === this.pointer && this.showPointer },
@@ -606,7 +607,11 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
606
607
  this.pointer > 0 ? (this.pointer--, this.$refs.list.scrollTop >= this.pointerPosition && (this.$refs.list.scrollTop = this.pointerPosition), this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerBackward()) : this.filteredOptions[this.pointer] && this.filteredOptions[0].$isLabel && !this.groupSelect && this.pointerForward(), this.pointerDirty = !0;
607
608
  },
608
609
  pointerReset() {
609
- this.closeOnSelect && (this.pointer = 0, this.$refs.list && (this.$refs.list.scrollTop = 0));
610
+ var e;
611
+ if (this.closeOnSelect && (this.pointer = 0, this.$refs.list)) {
612
+ const t = ((e = this.$refs.list.$refs) == null ? void 0 : e.wrapper) || this.$refs.list;
613
+ t.scrollTop && (t.scrollTop = 0);
614
+ }
610
615
  },
611
616
  pointerAdjust() {
612
617
  this.pointer >= this.filteredOptions.length - 1 && (this.pointer = this.filteredOptions.length ? this.filteredOptions.length - 1 : 0), this.filteredOptions.length > 0 && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerForward();
@@ -615,13 +620,30 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
615
620
  this.pointer = e, this.pointerDirty = !0;
616
621
  }
617
622
  }
618
- }, F = {
623
+ }, I = {
619
624
  name: "vue-multiselect",
620
- mixins: [C, K],
625
+ components: {
626
+ MultiselectContentWrapper: k
627
+ },
628
+ mixins: [q, W],
621
629
  compatConfig: {
622
630
  MODE: 3,
623
631
  ATTR_ENUMERATED_COERCION: !1
624
632
  },
633
+ inject: {
634
+ isFocusWithinDropdown: {
635
+ default: null
636
+ }
637
+ },
638
+ methods: {
639
+ onBlur(e) {
640
+ if (this.isFocusWithinDropdown && e.relatedTarget && this.isFocusWithinDropdown(e.relatedTarget)) {
641
+ e.preventDefault();
642
+ return;
643
+ }
644
+ this.deactivate();
645
+ }
646
+ },
625
647
  props: {
626
648
  /**
627
649
  * name attribute to match optional label element
@@ -632,6 +654,10 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
632
654
  type: String,
633
655
  default: ""
634
656
  },
657
+ appendToBody: {
658
+ type: Boolean,
659
+ default: !1
660
+ },
635
661
  /**
636
662
  * Presets the selected options value.
637
663
  * @type Object || Array || String || Integer
@@ -826,88 +852,108 @@ const E = (...e) => (t) => e.reduce((i, l) => l(i), t), C = {
826
852
  contentStyle() {
827
853
  return this.options.length ? { display: "inline-block" } : { display: "block" };
828
854
  },
855
+ dropdownStyle() {
856
+ return {
857
+ ...this.contentStyle,
858
+ maxHeight: `${this.maxHeight}px`,
859
+ overflow: "auto"
860
+ };
861
+ },
829
862
  isAbove() {
830
863
  return this.openDirection === "above" || this.openDirection === "top" ? !0 : this.openDirection === "below" || this.openDirection === "bottom" ? !1 : this.preferredOpenDirection === "above";
831
864
  },
832
865
  showSearchInput() {
833
866
  return this.searchable && (this.hasSingleSelectedSlot && (this.visibleSingleValue || this.visibleSingleValue === 0) ? this.isOpen : !0);
867
+ },
868
+ teleportedContentStyle() {
869
+ if (!this.$el) return {};
870
+ const e = this.$el.getBoundingClientRect(), t = {
871
+ position: "fixed",
872
+ width: `${e.width}px`,
873
+ zIndex: 9999,
874
+ maxHeight: `${this.maxHeight}px`,
875
+ overflow: "auto",
876
+ "-webkit-overflow-scrolling": "touch"
877
+ };
878
+ return this.isAbove ? (t.bottom = `${window.innerHeight - e.top}px`, t.left = `${e.left}px`) : (t.top = `${e.bottom}px`, t.left = `${e.left}px`), t;
834
879
  }
835
880
  }
836
- }, N = ["tabindex", "aria-owns"], R = {
881
+ }, U = ["tabindex", "aria-owns"], J = {
837
882
  ref: "tags",
838
883
  class: "multiselect__tags"
839
- }, z = { class: "multiselect__tags-wrap" }, q = ["textContent"], j = ["onKeypress", "onMousedown"], I = ["textContent"], U = { class: "multiselect__spinner" }, J = ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-controls"], Q = ["id", "aria-multiselectable"], W = { key: 0 }, X = { class: "multiselect__option" }, Y = ["aria-selected", "id", "role"], Z = ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"], x = ["data-select", "data-deselect", "onMouseenter", "onMousedown"], _ = { class: "multiselect__option" }, ee = { class: "multiselect__option" };
840
- function te(e, t, i, l, a, n) {
841
- return d(), p("div", {
884
+ }, Q = { class: "multiselect__tags-wrap" }, X = ["textContent"], Y = ["onKeypress", "onMousedown"], Z = ["textContent"], _ = { class: "multiselect__spinner" }, ee = ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-controls"];
885
+ function te(e, t, i, n, r, l) {
886
+ const d = E("MultiselectContentWrapper");
887
+ return c(), g("div", {
842
888
  tabindex: e.searchable ? -1 : i.tabindex,
843
- class: v([{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above": n.isAbove, "multiselect--has-options-group": n.hasOptionGroup }, "multiselect"]),
844
- onFocus: t[13] || (t[13] = (s) => e.activate()),
845
- onBlur: t[14] || (t[14] = (s) => e.searchable ? !1 : e.deactivate()),
889
+ class: P([{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above": l.isAbove, "multiselect--has-options-group": l.hasOptionGroup }, "multiselect"]),
890
+ onFocus: t[12] || (t[12] = (s) => e.activate()),
891
+ onBlur: t[13] || (t[13] = (...s) => l.onBlur && l.onBlur(...s)),
846
892
  onKeydown: [
847
- t[15] || (t[15] = f(r((s) => e.pointerForward(), ["self", "prevent"]), ["down"])),
848
- t[16] || (t[16] = f(r((s) => e.pointerBackward(), ["self", "prevent"]), ["up"]))
893
+ t[14] || (t[14] = a(o((s) => e.pointerForward(), ["self", "prevent"]), ["down"])),
894
+ t[15] || (t[15] = a(o((s) => e.pointerBackward(), ["self", "prevent"]), ["up"]))
849
895
  ],
850
- onKeypress: t[17] || (t[17] = f(r((s) => e.addPointerElement(s), ["stop", "self"]), ["enter", "tab"])),
851
- onKeyup: t[18] || (t[18] = f((s) => e.deactivate(), ["esc"])),
896
+ onKeypress: t[16] || (t[16] = a(o((s) => e.addPointerElement(s), ["stop", "self"]), ["enter", "tab"])),
897
+ onKeyup: t[17] || (t[17] = a((s) => e.deactivate(), ["esc"])),
852
898
  role: "combobox",
853
899
  "aria-owns": "listbox-" + e.id
854
900
  }, [
855
901
  u(e.$slots, "caret", { toggle: e.toggle }, () => [
856
- o("div", {
857
- onMousedown: t[0] || (t[0] = r((s) => e.toggle(), ["prevent", "stop"])),
902
+ p("div", {
903
+ onMousedown: t[0] || (t[0] = o((s) => e.toggle(), ["prevent", "stop"])),
858
904
  class: "multiselect__select"
859
905
  }, null, 32)
860
906
  ], !0),
861
907
  u(e.$slots, "clear", { search: e.search }, void 0, !0),
862
- o("div", R, [
908
+ p("div", J, [
863
909
  u(e.$slots, "selection", {
864
910
  search: e.search,
865
911
  remove: e.removeElement,
866
- values: n.visibleValues,
912
+ values: l.visibleValues,
867
913
  isOpen: e.isOpen
868
914
  }, () => [
869
- b(o("div", z, [
870
- (d(!0), p(L, null, $(n.visibleValues, (s, h) => u(e.$slots, "tag", {
915
+ S(p("div", Q, [
916
+ (c(!0), g(A, null, v(l.visibleValues, (s, h) => u(e.$slots, "tag", {
871
917
  option: s,
872
918
  search: e.search,
873
919
  remove: e.removeElement
874
920
  }, () => [
875
- (d(), p("span", {
921
+ (c(), g("span", {
876
922
  class: "multiselect__tag",
877
923
  key: h
878
924
  }, [
879
- o("span", {
880
- textContent: m(e.getOptionLabel(s))
881
- }, null, 8, q),
882
- o("i", {
925
+ p("span", {
926
+ textContent: O(e.getOptionLabel(s))
927
+ }, null, 8, X),
928
+ p("i", {
883
929
  tabindex: "1",
884
- onKeypress: f(r((g) => e.removeElement(s), ["prevent"]), ["enter"]),
885
- onMousedown: r((g) => e.removeElement(s), ["prevent"]),
930
+ onKeypress: a(o((f) => e.removeElement(s), ["prevent"]), ["enter"]),
931
+ onMousedown: o((f) => e.removeElement(s), ["prevent"]),
886
932
  class: "multiselect__tag-icon"
887
- }, null, 40, j)
933
+ }, null, 40, Y)
888
934
  ]))
889
935
  ], !0)), 256))
890
936
  ], 512), [
891
- [y, n.visibleValues.length > 0]
937
+ [L, l.visibleValues.length > 0]
892
938
  ]),
893
939
  e.internalValue && e.internalValue.length > i.limit ? u(e.$slots, "limit", { key: 0 }, () => [
894
- o("strong", {
940
+ p("strong", {
895
941
  class: "multiselect__strong",
896
- textContent: m(i.limitText(e.internalValue.length - i.limit))
897
- }, null, 8, I)
898
- ], !0) : c("", !0)
942
+ textContent: O(i.limitText(e.internalValue.length - i.limit))
943
+ }, null, 8, Z)
944
+ ], !0) : m("", !0)
899
945
  ], !0),
900
- B(k, { name: "multiselect__loading" }, {
901
- default: D(() => [
946
+ b(T, { name: "multiselect__loading" }, {
947
+ default: y(() => [
902
948
  u(e.$slots, "loading", {}, () => [
903
- b(o("div", U, null, 512), [
904
- [y, i.loading]
949
+ S(p("div", _, null, 512), [
950
+ [L, i.loading]
905
951
  ])
906
952
  ], !0)
907
953
  ]),
908
954
  _: 3
909
955
  }),
910
- e.searchable ? (d(), p("input", {
956
+ e.searchable ? (c(), g("input", {
911
957
  key: 0,
912
958
  ref: "search",
913
959
  name: i.name,
@@ -917,132 +963,132 @@ function te(e, t, i, l, a, n) {
917
963
  spellcheck: i.spellcheck,
918
964
  placeholder: e.placeholder,
919
965
  required: i.required,
920
- style: S({
921
- ...n.inputStyle
966
+ style: N({
967
+ ...l.inputStyle
922
968
  }),
923
969
  value: e.search,
924
970
  disabled: i.disabled,
925
971
  tabindex: i.tabindex,
926
972
  onInput: t[1] || (t[1] = (s) => e.updateSearch(s.target.value)),
927
- onFocus: t[2] || (t[2] = r((s) => e.activate(), ["prevent"])),
928
- onBlur: t[3] || (t[3] = r((s) => e.deactivate(), ["prevent"])),
929
- onKeyup: t[4] || (t[4] = f((s) => e.deactivate(), ["esc"])),
973
+ onFocus: t[2] || (t[2] = o((s) => e.activate(), ["prevent"])),
974
+ onBlur: t[3] || (t[3] = o((s) => e.deactivate(), ["prevent"])),
975
+ onKeyup: t[4] || (t[4] = a((s) => e.deactivate(), ["esc"])),
930
976
  onKeydown: [
931
- t[5] || (t[5] = f(r((s) => e.pointerForward(), ["prevent"]), ["down"])),
932
- t[6] || (t[6] = f(r((s) => e.pointerBackward(), ["prevent"]), ["up"])),
933
- t[8] || (t[8] = f(r((s) => e.removeLastElement(), ["stop"]), ["delete"]))
977
+ t[5] || (t[5] = a(o((s) => e.pointerForward(), ["prevent"]), ["down"])),
978
+ t[6] || (t[6] = a(o((s) => e.pointerBackward(), ["prevent"]), ["up"])),
979
+ t[8] || (t[8] = a(o((s) => e.removeLastElement(), ["stop"]), ["delete"]))
934
980
  ],
935
- onKeypress: t[7] || (t[7] = f(r((s) => e.addPointerElement(s), ["prevent", "stop", "self"]), ["enter"])),
981
+ onKeypress: t[7] || (t[7] = a(o((s) => e.addPointerElement(s), ["prevent", "stop", "self"]), ["enter"])),
936
982
  class: "multiselect__input",
937
983
  "aria-controls": "listbox-" + e.id
938
- }, null, 44, J)) : c("", !0),
939
- n.isSingleLabelVisible ? (d(), p("span", {
984
+ }, null, 44, ee)) : m("", !0),
985
+ l.isSingleLabelVisible ? (c(), g("span", {
940
986
  key: 1,
941
987
  class: "multiselect__single",
942
- onMousedown: t[9] || (t[9] = r((...s) => e.toggle && e.toggle(...s), ["prevent"]))
988
+ onMousedown: t[9] || (t[9] = o((...s) => e.toggle && e.toggle(...s), ["prevent"]))
943
989
  }, [
944
- u(e.$slots, "singleLabel", { option: n.singleValue }, () => [
945
- V(m(e.currentOptionLabel), 1)
990
+ u(e.$slots, "singleLabel", { option: l.singleValue }, () => [
991
+ C(O(e.currentOptionLabel), 1)
946
992
  ], !0)
947
- ], 32)) : c("", !0),
948
- c("", !0)
993
+ ], 32)) : m("", !0),
994
+ m("", !0)
949
995
  ], 512),
950
- B(k, { name: "multiselect" }, {
951
- default: D(() => [
952
- b(o("div", {
953
- class: v(["multiselect__content-wrapper", { "multiselect__content-wrapper--small": i.small }]),
954
- onFocus: t[11] || (t[11] = (...s) => e.activate && e.activate(...s)),
955
- tabindex: "-1",
956
- onMousedown: t[12] || (t[12] = r(() => {
957
- }, ["prevent"])),
958
- style: S({ maxHeight: e.optimizedHeight + "px" }),
959
- ref: "list"
960
- }, [
961
- o("ul", {
962
- class: "multiselect__content",
963
- style: S(n.contentStyle),
964
- role: "listbox",
965
- id: "listbox-" + e.id,
966
- "aria-multiselectable": e.multiple
967
- }, [
968
- u(e.$slots, "beforeList", {}, void 0, !0),
969
- e.multiple && e.max === e.internalValue.length ? (d(), p("li", W, [
970
- o("span", X, [
971
- u(e.$slots, "maxElements", {}, () => [
972
- V("Maximum of " + m(e.max) + " options selected. First remove a selected option to select another.", 1)
973
- ], !0)
974
- ])
975
- ])) : c("", !0),
976
- !e.max || e.internalValue.length < e.max ? (d(!0), p(L, { key: 1 }, $(e.filteredOptions, (s, h) => (d(), p("li", {
977
- class: "multiselect__element",
978
- key: h,
979
- "aria-selected": e.isSelected(s),
980
- id: e.id + "-" + h,
981
- role: s && (s.$isLabel || s.$isDisabled) ? null : "option"
982
- }, [
983
- s && (s.$isLabel || s.$isDisabled) ? c("", !0) : (d(), p("span", {
984
- key: 0,
985
- class: v([e.optionHighlight(h, s), "multiselect__option"]),
986
- onClick: r((g) => e.select(s), ["stop"]),
987
- onMouseenter: r((g) => e.pointerSet(h), ["self"]),
988
- "data-select": s && s.isTag ? e.tagPlaceholder : n.selectLabelText,
989
- "data-selected": n.selectedLabelText,
990
- "data-deselect": n.deselectLabelText
991
- }, [
992
- u(e.$slots, "option", {
993
- option: s,
994
- search: e.search,
995
- index: h
996
- }, () => [
997
- o("span", null, m(e.getOptionLabel(s)), 1)
998
- ], !0)
999
- ], 42, Z)),
1000
- s && (s.$isLabel || s.$isDisabled) ? (d(), p("span", {
1001
- key: 1,
1002
- "data-select": e.groupSelect && n.selectGroupLabelText,
1003
- "data-deselect": e.groupSelect && n.deselectGroupLabelText,
1004
- class: v([e.groupHighlight(h, s), "multiselect__option"]),
1005
- onMouseenter: r((g) => e.groupSelect && e.pointerSet(h), ["self"]),
1006
- onMousedown: r((g) => e.selectGroup(s), ["prevent"])
1007
- }, [
1008
- u(e.$slots, "option", {
1009
- option: s,
1010
- search: e.search,
1011
- index: h
1012
- }, () => [
1013
- o("span", null, m(e.getOptionLabel(s)), 1)
1014
- ], !0)
1015
- ], 42, x)) : c("", !0)
1016
- ], 8, Y))), 128)) : c("", !0),
1017
- b(o("li", null, [
1018
- o("span", _, [
1019
- u(e.$slots, "noResult", { search: e.search }, () => [
1020
- t[19] || (t[19] = V("No elements found. Consider changing the search query."))
1021
- ], !0)
1022
- ])
1023
- ], 512), [
1024
- [y, i.showNoResults && e.filteredOptions.length === 0 && e.search && !i.loading]
1025
- ]),
1026
- b(o("li", null, [
1027
- o("span", ee, [
1028
- u(e.$slots, "noOptions", {}, () => [
1029
- t[20] || (t[20] = V("List is empty."))
1030
- ], !0)
1031
- ])
1032
- ], 512), [
1033
- [y, i.showNoOptions && (e.options.length === 0 || n.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !i.loading]
1034
- ]),
1035
- u(e.$slots, "afterList", {}, void 0, !0)
1036
- ], 12, Q)
1037
- ], 38), [
1038
- [y, e.isOpen]
996
+ b(T, { name: "multiselect" }, {
997
+ default: y(() => [
998
+ S(b(d, {
999
+ teleported: !1,
1000
+ id: e.id,
1001
+ multiple: e.multiple,
1002
+ max: e.max,
1003
+ internalValue: e.internalValue,
1004
+ filteredOptions: e.filteredOptions,
1005
+ isSelected: e.isSelected,
1006
+ optionHighlight: e.optionHighlight,
1007
+ select: e.select,
1008
+ pointerSet: e.pointerSet,
1009
+ selectLabelText: l.selectLabelText,
1010
+ selectedLabelText: l.selectedLabelText,
1011
+ deselectLabelText: l.deselectLabelText,
1012
+ tagPlaceholder: e.tagPlaceholder,
1013
+ groupSelect: e.groupSelect,
1014
+ selectGroupLabelText: l.selectGroupLabelText,
1015
+ deselectGroupLabelText: l.deselectGroupLabelText,
1016
+ getOptionLabel: e.getOptionLabel,
1017
+ groupHighlight: e.groupHighlight,
1018
+ selectGroup: e.selectGroup,
1019
+ options: e.options,
1020
+ hasOptionGroup: l.hasOptionGroup,
1021
+ search: e.search,
1022
+ loading: i.loading,
1023
+ showNoResults: i.showNoResults,
1024
+ showNoOptions: i.showNoOptions,
1025
+ small: i.small,
1026
+ contentStyle: l.contentStyle,
1027
+ customStyle: l.dropdownStyle,
1028
+ ref: "list",
1029
+ onFocus: e.activate
1030
+ }, B({ _: 2 }, [
1031
+ v(e.$slots, (s, h) => ({
1032
+ name: h,
1033
+ fn: y((f) => [
1034
+ u(e.$slots, h, $(G(f)), void 0, !0)
1035
+ ])
1036
+ }))
1037
+ ]), 1032, ["id", "multiple", "max", "internalValue", "filteredOptions", "isSelected", "optionHighlight", "select", "pointerSet", "selectLabelText", "selectedLabelText", "deselectLabelText", "tagPlaceholder", "groupSelect", "selectGroupLabelText", "deselectGroupLabelText", "getOptionLabel", "groupHighlight", "selectGroup", "options", "hasOptionGroup", "search", "loading", "showNoResults", "showNoOptions", "small", "contentStyle", "customStyle", "onFocus"]), [
1038
+ [L, e.isOpen]
1039
1039
  ])
1040
1040
  ]),
1041
1041
  _: 3
1042
- })
1043
- ], 42, N);
1042
+ }),
1043
+ i.appendToBody && e.isOpen ? (c(), F(x, {
1044
+ key: 0,
1045
+ to: "body"
1046
+ }, [
1047
+ b(d, {
1048
+ teleported: !0,
1049
+ id: e.id,
1050
+ multiple: e.multiple,
1051
+ max: e.max,
1052
+ internalValue: e.internalValue,
1053
+ filteredOptions: e.filteredOptions,
1054
+ isSelected: e.isSelected,
1055
+ optionHighlight: e.optionHighlight,
1056
+ select: e.select,
1057
+ pointerSet: e.pointerSet,
1058
+ selectLabelText: l.selectLabelText,
1059
+ selectedLabelText: l.selectedLabelText,
1060
+ deselectLabelText: l.deselectLabelText,
1061
+ tagPlaceholder: e.tagPlaceholder,
1062
+ groupSelect: e.groupSelect,
1063
+ selectGroupLabelText: l.selectGroupLabelText,
1064
+ deselectGroupLabelText: l.deselectGroupLabelText,
1065
+ getOptionLabel: e.getOptionLabel,
1066
+ groupHighlight: e.groupHighlight,
1067
+ selectGroup: e.selectGroup,
1068
+ options: e.options,
1069
+ hasOptionGroup: l.hasOptionGroup,
1070
+ search: e.search,
1071
+ loading: i.loading,
1072
+ showNoResults: i.showNoResults,
1073
+ showNoOptions: i.showNoOptions,
1074
+ small: i.small,
1075
+ contentStyle: l.contentStyle,
1076
+ customStyle: l.teleportedContentStyle,
1077
+ onFocus: e.activate,
1078
+ onClick: t[11] || (t[11] = o(() => {
1079
+ }, ["stop"]))
1080
+ }, B({ _: 2 }, [
1081
+ v(e.$slots, (s, h) => ({
1082
+ name: h,
1083
+ fn: y((f) => [
1084
+ u(e.$slots, h, $(G(f)), void 0, !0)
1085
+ ])
1086
+ }))
1087
+ ]), 1032, ["id", "multiple", "max", "internalValue", "filteredOptions", "isSelected", "optionHighlight", "select", "pointerSet", "selectLabelText", "selectedLabelText", "deselectLabelText", "tagPlaceholder", "groupSelect", "selectGroupLabelText", "deselectGroupLabelText", "getOptionLabel", "groupHighlight", "selectGroup", "options", "hasOptionGroup", "search", "loading", "showNoResults", "showNoOptions", "small", "contentStyle", "customStyle", "onFocus"])
1088
+ ])) : m("", !0)
1089
+ ], 42, U);
1044
1090
  }
1045
- const le = /* @__PURE__ */ A(F, [["render", te], ["__scopeId", "data-v-a1db52fd"]]);
1091
+ const ne = /* @__PURE__ */ K(I, [["render", te], ["__scopeId", "data-v-c725aeeb"]]);
1046
1092
  export {
1047
- le as default
1093
+ ne as default
1048
1094
  };