energy-components 1.20.0-beta.0 → 1.21.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/dist/components/accordion.es.js +60 -50
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/badge.es.js +93 -0
- package/dist/components/button.es.js +1 -1
- package/dist/components/checkbox.es.js +95 -55
- package/dist/components/collapsable.es.js +1 -1
- package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-C2ohjDhp.js → collapsable.scss_vue_type_style_index_0_src_true_lang-6HkNT8L9.js} +1 -1
- package/dist/components/datepicker.es.js +1 -1
- package/dist/components/directAccess.es.js +1 -1
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +1 -1
- package/dist/components/fileUploadItem.es.js +45 -34
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/filterTag.es.js +1 -1
- package/dist/components/{icon-svg-arye8CV8.js → icon-svg-C8XeOnqu.js} +805 -767
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +59 -56
- package/dist/components/infoBox.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/modal.es.js +93 -56
- package/dist/components/multiselect.es.js +77 -74
- package/dist/components/persistentToast.es.js +1 -1
- package/dist/components/popover.es.js +107 -74
- package/dist/components/popoverMenu.es.js +98 -75
- package/dist/components/progressBar.es.js +1 -1
- package/dist/components/quantitySelector.es.js +1 -1
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +1 -1
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/style/accordion.css +1 -1
- package/dist/components/style/badge.css +1 -0
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/fileUploadItem.css +1 -1
- package/dist/components/style/modal.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/popoverMenu.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +1 -1
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +1 -1
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +131 -120
- package/dist/components/tooltip.es.js +1 -1
- package/dist/energy-components.es.js +5538 -5243
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/accordion/accordion.vue.d.ts +14 -0
- package/dist/types/src/components/feedback/badge/badge.vue.d.ts +119 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +60 -0
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +17 -0
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +1 -1
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +2 -0
- package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +3 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as H, createElementBlock as g, openBlock as c, withKeys as a, normalizeClass as P, withModifiers as o, renderSlot as u, createElementVNode as p, createVNode as m, createBlock as A, createCommentVNode as b, withDirectives as v, Fragment as N, renderList as
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/multiselect.css';function
|
|
1
|
+
import k from "./multiselectcontentwrapper.es.js";
|
|
2
|
+
import { resolveComponent as H, createElementBlock as g, openBlock as c, withKeys as a, normalizeClass as P, withModifiers as o, renderSlot as u, createElementVNode as p, createVNode as m, createBlock as A, createCommentVNode as b, withDirectives as v, Fragment as N, renderList as L, toDisplayString as w, vShow as O, Transition as T, withCtx as y, normalizeStyle as C, createTextVNode as F, createSlots as B, normalizeProps as $, guardReactiveProps as D, Teleport as x } from "vue";
|
|
3
|
+
import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/multiselect.css';function S(e) {
|
|
5
5
|
return e === 0 ? !1 : Array.isArray(e) && e.length === 0 ? !0 : !e;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function K(e) {
|
|
8
8
|
return (...t) => !e(...t);
|
|
9
9
|
}
|
|
10
10
|
function M(e, t) {
|
|
11
11
|
return e === void 0 && (e = "undefined"), e === null && (e = "null"), e === !1 && (e = "false"), e.toString().toLowerCase().indexOf(t.trim()) !== -1;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return t ? e.filter((n) => M(r(n, i), t)).sort((n,
|
|
13
|
+
function E(e, t, i, r) {
|
|
14
|
+
return t ? e.filter((n) => M(r(n, i), t)).sort((n, s) => r(n, i).length - r(s, i).length) : e;
|
|
15
15
|
}
|
|
16
16
|
function z(e) {
|
|
17
17
|
return e.filter((t) => !t.$isLabel);
|
|
@@ -23,13 +23,13 @@ function V(e, t) {
|
|
|
23
23
|
}), r.concat(n[e])) : r, []);
|
|
24
24
|
}
|
|
25
25
|
function j(e, t, i, r, n) {
|
|
26
|
-
return (
|
|
26
|
+
return (s) => s.map((d) => {
|
|
27
27
|
if (!d[i])
|
|
28
28
|
return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."), [];
|
|
29
|
-
const
|
|
30
|
-
return
|
|
29
|
+
const l = E(d[i], e, t, n);
|
|
30
|
+
return l.length ? {
|
|
31
31
|
[r]: d[r],
|
|
32
|
-
[i]:
|
|
32
|
+
[i]: l
|
|
33
33
|
} : [];
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -40,7 +40,8 @@ const G = (...e) => (t) => e.reduce((i, r) => r(i), t), q = {
|
|
|
40
40
|
isOpen: !1,
|
|
41
41
|
preferredOpenDirection: "below",
|
|
42
42
|
optimizedHeight: this.maxHeight,
|
|
43
|
-
currentElRect: null
|
|
43
|
+
currentElRect: null,
|
|
44
|
+
scrollListener: null
|
|
44
45
|
};
|
|
45
46
|
},
|
|
46
47
|
props: {
|
|
@@ -160,7 +161,7 @@ const G = (...e) => (t) => e.reduce((i, r) => r(i), t), q = {
|
|
|
160
161
|
customLabel: {
|
|
161
162
|
type: Function,
|
|
162
163
|
default(e, t) {
|
|
163
|
-
return
|
|
164
|
+
return S(e) ? "" : t ? e[t] : e;
|
|
164
165
|
}
|
|
165
166
|
},
|
|
166
167
|
/**
|
|
@@ -298,7 +299,7 @@ const G = (...e) => (t) => e.reduce((i, r) => r(i), t), q = {
|
|
|
298
299
|
filteredOptions() {
|
|
299
300
|
const e = this.search || "", t = e.toLowerCase().trim();
|
|
300
301
|
let i = this.options.concat();
|
|
301
|
-
return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) :
|
|
302
|
+
return this.internalSearch ? i = this.groupValues ? this.filterAndFlat(i, t, this.label) : E(i, t, this.label, this.customLabel) : i = this.groupValues ? V(this.groupValues, this.groupLabel)(i) : i, i = this.hideSelected ? i.filter(K(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);
|
|
302
303
|
},
|
|
303
304
|
valueKeys() {
|
|
304
305
|
return this.trackBy ? this.internalValue.map((e) => e[this.trackBy]) : this.internalValue;
|
|
@@ -395,11 +396,11 @@ const G = (...e) => (t) => e.reduce((i, r) => r(i), t), q = {
|
|
|
395
396
|
* @returns {Object||String}
|
|
396
397
|
*/
|
|
397
398
|
getOptionLabel(e) {
|
|
398
|
-
if (
|
|
399
|
+
if (S(e)) return "";
|
|
399
400
|
if (e.isTag) return e.label;
|
|
400
401
|
if (e.$isLabel) return e.$groupLabel;
|
|
401
402
|
const t = this.customLabel(e, this.label);
|
|
402
|
-
return
|
|
403
|
+
return S(t) ? "" : t;
|
|
403
404
|
},
|
|
404
405
|
/**
|
|
405
406
|
* Add the given option to the list of selected options
|
|
@@ -504,18 +505,20 @@ const G = (...e) => (t) => e.reduce((i, r) => r(i), t), q = {
|
|
|
504
505
|
this.blockKeys.indexOf("Delete") === -1 && this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length && this.removeElement(this.internalValue[this.internalValue.length - 1], !1);
|
|
505
506
|
},
|
|
506
507
|
/**
|
|
507
|
-
* Opens the multiselect
|
|
508
|
+
* Opens the multiselect's dropdown.
|
|
508
509
|
* Sets this.isOpen to TRUE
|
|
509
510
|
*/
|
|
510
511
|
activate() {
|
|
511
|
-
this.isOpen || this.disabled || (this.adjustPosition(), this.groupValues && this.pointer === 0 && this.filteredOptions.length && (this.pointer = 1), this.isOpen = !0, this.
|
|
512
|
+
this.isOpen || this.disabled || (this.adjustPosition(), this.groupValues && this.pointer === 0 && this.filteredOptions.length && (this.pointer = 1), this.isOpen = !0, this.appendToBody && typeof window < "u" && (this.scrollListener = () => {
|
|
513
|
+
this.isOpen && this.$el && (this.currentElRect = this.$el.getBoundingClientRect());
|
|
514
|
+
}, window.addEventListener("scroll", this.scrollListener, !0), window.addEventListener("resize", this.scrollListener)), this.searchable ? (this.preserveSearch || (this.search = ""), this.preventAutofocus || this.$nextTick(() => this.$refs.search && this.$refs.search.focus())) : this.preventAutofocus || typeof this.$el < "u" && this.$el.focus(), this.$emit("open", this.id));
|
|
512
515
|
},
|
|
513
516
|
/**
|
|
514
|
-
* Closes the multiselect
|
|
517
|
+
* Closes the multiselect's dropdown.
|
|
515
518
|
* Sets this.isOpen to FALSE
|
|
516
519
|
*/
|
|
517
520
|
deactivate() {
|
|
518
|
-
this.isOpen && (this.isOpen = !1, this.searchable ? this.$refs.search !== null && typeof this.$refs.search < "u" && this.$refs.search.blur() : typeof this.$el < "u" && this.$el.blur(), this.preserveSearch || (this.search = ""), this.$emit("close", this.getValue(), this.id));
|
|
521
|
+
this.isOpen && (this.isOpen = !1, this.scrollListener && typeof window < "u" && (window.removeEventListener("scroll", this.scrollListener, !0), window.removeEventListener("resize", this.scrollListener), this.scrollListener = null), this.searchable ? this.$refs.search !== null && typeof this.$refs.search < "u" && this.$refs.search.blur() : typeof this.$el < "u" && this.$el.blur(), this.preserveSearch || (this.search = ""), this.$emit("close", this.getValue(), this.id));
|
|
519
522
|
},
|
|
520
523
|
/**
|
|
521
524
|
* Call this.activate() or this.deactivate()
|
|
@@ -631,7 +634,7 @@ const G = (...e) => (t) => e.reduce((i, r) => r(i), t), q = {
|
|
|
631
634
|
}, I = {
|
|
632
635
|
name: "vue-multiselect",
|
|
633
636
|
components: {
|
|
634
|
-
MultiselectContentWrapper:
|
|
637
|
+
MultiselectContentWrapper: k
|
|
635
638
|
},
|
|
636
639
|
mixins: [q, W],
|
|
637
640
|
compatConfig: {
|
|
@@ -895,25 +898,25 @@ const G = (...e) => (t) => e.reduce((i, r) => r(i), t), q = {
|
|
|
895
898
|
ref: "tags",
|
|
896
899
|
class: "multiselect__tags"
|
|
897
900
|
}, 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"];
|
|
898
|
-
function te(e, t, i, r, n,
|
|
901
|
+
function te(e, t, i, r, n, s) {
|
|
899
902
|
const d = H("MultiselectContentWrapper");
|
|
900
903
|
return c(), g("div", {
|
|
901
904
|
tabindex: e.searchable ? -1 : i.tabindex,
|
|
902
|
-
class: P([{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above":
|
|
903
|
-
onFocus: t[11] || (t[11] = (
|
|
904
|
-
onBlur: t[12] || (t[12] = (...
|
|
905
|
+
class: P([{ "multiselect--active": e.isOpen, "multiselect--disabled": i.disabled, "multiselect--above": s.isAbove, "multiselect--has-options-group": s.hasOptionGroup }, "multiselect"]),
|
|
906
|
+
onFocus: t[11] || (t[11] = (l) => e.activate()),
|
|
907
|
+
onBlur: t[12] || (t[12] = (...l) => s.onBlur && s.onBlur(...l)),
|
|
905
908
|
onKeydown: [
|
|
906
|
-
t[13] || (t[13] = a(o((
|
|
907
|
-
t[14] || (t[14] = a(o((
|
|
909
|
+
t[13] || (t[13] = a(o((l) => e.pointerForward(), ["self", "prevent"]), ["down"])),
|
|
910
|
+
t[14] || (t[14] = a(o((l) => e.pointerBackward(), ["self", "prevent"]), ["up"]))
|
|
908
911
|
],
|
|
909
|
-
onKeypress: t[15] || (t[15] = a(o((
|
|
910
|
-
onKeyup: t[16] || (t[16] = a((
|
|
912
|
+
onKeypress: t[15] || (t[15] = a(o((l) => e.addPointerElement(l), ["stop", "self"]), ["enter", "tab"])),
|
|
913
|
+
onKeyup: t[16] || (t[16] = a((l) => e.deactivate(), ["esc"])),
|
|
911
914
|
role: "combobox",
|
|
912
915
|
"aria-owns": "listbox-" + e.id
|
|
913
916
|
}, [
|
|
914
917
|
u(e.$slots, "caret", { toggle: e.toggle }, () => [
|
|
915
918
|
p("div", {
|
|
916
|
-
onMousedown: t[0] || (t[0] = o((
|
|
919
|
+
onMousedown: t[0] || (t[0] = o((l) => e.toggle(), ["prevent", "stop"])),
|
|
917
920
|
class: "multiselect__select"
|
|
918
921
|
}, null, 32)
|
|
919
922
|
], !0),
|
|
@@ -922,12 +925,12 @@ function te(e, t, i, r, n, l) {
|
|
|
922
925
|
u(e.$slots, "selection", {
|
|
923
926
|
search: e.search,
|
|
924
927
|
remove: e.removeElement,
|
|
925
|
-
values:
|
|
928
|
+
values: s.visibleValues,
|
|
926
929
|
isOpen: e.isOpen
|
|
927
930
|
}, () => [
|
|
928
931
|
v(p("div", Q, [
|
|
929
|
-
(c(!0), g(N, null,
|
|
930
|
-
option:
|
|
932
|
+
(c(!0), g(N, null, L(s.visibleValues, (l, h) => u(e.$slots, "tag", {
|
|
933
|
+
option: l,
|
|
931
934
|
search: e.search,
|
|
932
935
|
remove: e.removeElement
|
|
933
936
|
}, () => [
|
|
@@ -936,23 +939,23 @@ function te(e, t, i, r, n, l) {
|
|
|
936
939
|
key: h
|
|
937
940
|
}, [
|
|
938
941
|
p("span", {
|
|
939
|
-
textContent:
|
|
942
|
+
textContent: w(e.getOptionLabel(l))
|
|
940
943
|
}, null, 8, X),
|
|
941
944
|
p("i", {
|
|
942
945
|
tabindex: "1",
|
|
943
|
-
onKeypress: a(o((f) => e.removeElement(
|
|
944
|
-
onMousedown: o((f) => e.removeElement(
|
|
946
|
+
onKeypress: a(o((f) => e.removeElement(l), ["prevent"]), ["enter"]),
|
|
947
|
+
onMousedown: o((f) => e.removeElement(l), ["prevent"]),
|
|
945
948
|
class: "multiselect__tag-icon"
|
|
946
949
|
}, null, 40, Y)
|
|
947
950
|
]))
|
|
948
951
|
], !0)), 256))
|
|
949
952
|
], 512), [
|
|
950
|
-
[
|
|
953
|
+
[O, s.visibleValues.length > 0]
|
|
951
954
|
]),
|
|
952
955
|
e.internalValue && e.internalValue.length > i.limit ? u(e.$slots, "limit", { key: 0 }, () => [
|
|
953
956
|
p("strong", {
|
|
954
957
|
class: "multiselect__strong",
|
|
955
|
-
textContent:
|
|
958
|
+
textContent: w(i.limitText(e.internalValue.length - i.limit))
|
|
956
959
|
}, null, 8, Z)
|
|
957
960
|
], !0) : b("", !0)
|
|
958
961
|
], !0),
|
|
@@ -960,7 +963,7 @@ function te(e, t, i, r, n, l) {
|
|
|
960
963
|
default: y(() => [
|
|
961
964
|
u(e.$slots, "loading", {}, () => [
|
|
962
965
|
v(p("div", _, null, 512), [
|
|
963
|
-
[
|
|
966
|
+
[O, i.loading]
|
|
964
967
|
])
|
|
965
968
|
], !0)
|
|
966
969
|
]),
|
|
@@ -976,32 +979,32 @@ function te(e, t, i, r, n, l) {
|
|
|
976
979
|
spellcheck: i.spellcheck,
|
|
977
980
|
placeholder: e.placeholder,
|
|
978
981
|
required: i.required,
|
|
979
|
-
style:
|
|
980
|
-
...
|
|
982
|
+
style: C({
|
|
983
|
+
...s.inputStyle
|
|
981
984
|
}),
|
|
982
985
|
value: e.search,
|
|
983
986
|
disabled: i.disabled,
|
|
984
987
|
tabindex: i.tabindex,
|
|
985
|
-
onInput: t[1] || (t[1] = (
|
|
986
|
-
onFocus: t[2] || (t[2] = o((
|
|
987
|
-
onBlur: t[3] || (t[3] = o((
|
|
988
|
-
onKeyup: t[4] || (t[4] = a((
|
|
988
|
+
onInput: t[1] || (t[1] = (l) => e.updateSearch(l.target.value)),
|
|
989
|
+
onFocus: t[2] || (t[2] = o((l) => e.activate(), ["prevent"])),
|
|
990
|
+
onBlur: t[3] || (t[3] = o((l) => e.deactivate(), ["prevent"])),
|
|
991
|
+
onKeyup: t[4] || (t[4] = a((l) => e.deactivate(), ["esc"])),
|
|
989
992
|
onKeydown: [
|
|
990
|
-
t[5] || (t[5] = a(o((
|
|
991
|
-
t[6] || (t[6] = a(o((
|
|
992
|
-
t[8] || (t[8] = a(o((
|
|
993
|
+
t[5] || (t[5] = a(o((l) => e.pointerForward(), ["prevent"]), ["down"])),
|
|
994
|
+
t[6] || (t[6] = a(o((l) => e.pointerBackward(), ["prevent"]), ["up"])),
|
|
995
|
+
t[8] || (t[8] = a(o((l) => e.removeLastElement(), ["stop"]), ["delete"]))
|
|
993
996
|
],
|
|
994
|
-
onKeypress: t[7] || (t[7] = a(o((
|
|
997
|
+
onKeypress: t[7] || (t[7] = a(o((l) => e.addPointerElement(l), ["prevent", "stop", "self"]), ["enter"])),
|
|
995
998
|
class: "multiselect__input",
|
|
996
999
|
"aria-controls": "listbox-" + e.id
|
|
997
1000
|
}, null, 44, ee)) : b("", !0),
|
|
998
|
-
|
|
1001
|
+
s.isSingleLabelVisible ? (c(), g("span", {
|
|
999
1002
|
key: 1,
|
|
1000
1003
|
class: "multiselect__single",
|
|
1001
|
-
onMousedown: t[9] || (t[9] = o((...
|
|
1004
|
+
onMousedown: t[9] || (t[9] = o((...l) => e.toggle && e.toggle(...l), ["prevent"]))
|
|
1002
1005
|
}, [
|
|
1003
|
-
u(e.$slots, "singleLabel", { option:
|
|
1004
|
-
|
|
1006
|
+
u(e.$slots, "singleLabel", { option: s.singleValue }, () => [
|
|
1007
|
+
F(w(e.currentOptionLabel), 1)
|
|
1005
1008
|
], !0)
|
|
1006
1009
|
], 32)) : b("", !0)
|
|
1007
1010
|
], 512),
|
|
@@ -1018,41 +1021,41 @@ function te(e, t, i, r, n, l) {
|
|
|
1018
1021
|
optionHighlight: e.optionHighlight,
|
|
1019
1022
|
select: e.select,
|
|
1020
1023
|
pointerSet: e.pointerSet,
|
|
1021
|
-
selectLabelText:
|
|
1022
|
-
selectedLabelText:
|
|
1023
|
-
deselectLabelText:
|
|
1024
|
+
selectLabelText: s.selectLabelText,
|
|
1025
|
+
selectedLabelText: s.selectedLabelText,
|
|
1026
|
+
deselectLabelText: s.deselectLabelText,
|
|
1024
1027
|
tagPlaceholder: e.tagPlaceholder,
|
|
1025
1028
|
groupSelect: e.groupSelect,
|
|
1026
|
-
selectGroupLabelText:
|
|
1027
|
-
deselectGroupLabelText:
|
|
1029
|
+
selectGroupLabelText: s.selectGroupLabelText,
|
|
1030
|
+
deselectGroupLabelText: s.deselectGroupLabelText,
|
|
1028
1031
|
getOptionLabel: e.getOptionLabel,
|
|
1029
1032
|
groupHighlight: e.groupHighlight,
|
|
1030
1033
|
selectGroup: e.selectGroup,
|
|
1031
1034
|
options: e.options,
|
|
1032
|
-
hasOptionGroup:
|
|
1035
|
+
hasOptionGroup: s.hasOptionGroup,
|
|
1033
1036
|
search: e.search,
|
|
1034
1037
|
loading: i.loading,
|
|
1035
1038
|
showNoResults: i.showNoResults,
|
|
1036
1039
|
showNoOptions: i.showNoOptions,
|
|
1037
1040
|
small: i.small,
|
|
1038
|
-
contentStyle:
|
|
1039
|
-
customStyle:
|
|
1041
|
+
contentStyle: s.contentStyle,
|
|
1042
|
+
customStyle: s.dropdownStyle,
|
|
1040
1043
|
ref: "list",
|
|
1041
1044
|
onFocus: e.activate
|
|
1042
1045
|
}, B({ _: 2 }, [
|
|
1043
|
-
|
|
1046
|
+
L(e.$slots, (l, h) => ({
|
|
1044
1047
|
name: h,
|
|
1045
1048
|
fn: y((f) => [
|
|
1046
1049
|
u(e.$slots, h, $(D(f)), void 0, !0)
|
|
1047
1050
|
])
|
|
1048
1051
|
}))
|
|
1049
1052
|
]), 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"]), [
|
|
1050
|
-
[
|
|
1053
|
+
[O, e.isOpen && !i.appendToBody]
|
|
1051
1054
|
])
|
|
1052
1055
|
]),
|
|
1053
1056
|
_: 3
|
|
1054
1057
|
}),
|
|
1055
|
-
i.appendToBody && e.isOpen ? (c(), A(
|
|
1058
|
+
i.appendToBody && e.isOpen ? (c(), A(x, {
|
|
1056
1059
|
key: 0,
|
|
1057
1060
|
to: "body"
|
|
1058
1061
|
}, [
|
|
@@ -1067,30 +1070,30 @@ function te(e, t, i, r, n, l) {
|
|
|
1067
1070
|
optionHighlight: e.optionHighlight,
|
|
1068
1071
|
select: e.select,
|
|
1069
1072
|
pointerSet: e.pointerSet,
|
|
1070
|
-
selectLabelText:
|
|
1071
|
-
selectedLabelText:
|
|
1072
|
-
deselectLabelText:
|
|
1073
|
+
selectLabelText: s.selectLabelText,
|
|
1074
|
+
selectedLabelText: s.selectedLabelText,
|
|
1075
|
+
deselectLabelText: s.deselectLabelText,
|
|
1073
1076
|
tagPlaceholder: e.tagPlaceholder,
|
|
1074
1077
|
groupSelect: e.groupSelect,
|
|
1075
|
-
selectGroupLabelText:
|
|
1076
|
-
deselectGroupLabelText:
|
|
1078
|
+
selectGroupLabelText: s.selectGroupLabelText,
|
|
1079
|
+
deselectGroupLabelText: s.deselectGroupLabelText,
|
|
1077
1080
|
getOptionLabel: e.getOptionLabel,
|
|
1078
1081
|
groupHighlight: e.groupHighlight,
|
|
1079
1082
|
selectGroup: e.selectGroup,
|
|
1080
1083
|
options: e.options,
|
|
1081
|
-
hasOptionGroup:
|
|
1084
|
+
hasOptionGroup: s.hasOptionGroup,
|
|
1082
1085
|
search: e.search,
|
|
1083
1086
|
loading: i.loading,
|
|
1084
1087
|
showNoResults: i.showNoResults,
|
|
1085
1088
|
showNoOptions: i.showNoOptions,
|
|
1086
1089
|
small: i.small,
|
|
1087
|
-
contentStyle:
|
|
1088
|
-
customStyle:
|
|
1090
|
+
contentStyle: s.contentStyle,
|
|
1091
|
+
customStyle: s.teleportedContentStyle,
|
|
1089
1092
|
onFocus: e.activate,
|
|
1090
1093
|
onClick: t[10] || (t[10] = o(() => {
|
|
1091
1094
|
}, ["stop"]))
|
|
1092
1095
|
}, B({ _: 2 }, [
|
|
1093
|
-
|
|
1096
|
+
L(e.$slots, (l, h) => ({
|
|
1094
1097
|
name: h,
|
|
1095
1098
|
fn: y((f) => [
|
|
1096
1099
|
u(e.$slots, h, $(D(f)), void 0, !0)
|
|
@@ -1100,7 +1103,7 @@ function te(e, t, i, r, n, l) {
|
|
|
1100
1103
|
])) : b("", !0)
|
|
1101
1104
|
], 42, U);
|
|
1102
1105
|
}
|
|
1103
|
-
const re = /* @__PURE__ */
|
|
1106
|
+
const re = /* @__PURE__ */ R(I, [["render", te], ["__scopeId", "data-v-2093ab38"]]);
|
|
1104
1107
|
export {
|
|
1105
1108
|
re as default
|
|
1106
1109
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, toRefs as y, computed as g, createElementBlock as t, openBlock as s, normalizeClass as h, createElementVNode as r, createCommentVNode as o, createVNode as a, toDisplayString as c, renderSlot as d } from "vue";
|
|
2
|
-
import { R as l } from "./icon-svg-
|
|
2
|
+
import { R as l } from "./icon-svg-C8XeOnqu.js";
|
|
3
3
|
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/persistentToast.css';const S = ["id"], $ = { class: "alert" }, C = {
|
|
5
5
|
key: 0,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
import { o as
|
|
3
|
-
import { R as
|
|
4
|
-
import { _ as
|
|
5
|
-
import './style/popover.css';const
|
|
1
|
+
import { useSlots as V, computed as y, ref as _, watch as A, nextTick as L, onBeforeUnmount as U, createElementBlock as c, openBlock as a, createElementVNode as B, createBlock as H, renderSlot as h, Teleport as j, createCommentVNode as C, normalizeStyle as G, normalizeClass as R, unref as W, Fragment as q, renderList as J, toDisplayString as K } from "vue";
|
|
2
|
+
import { o as Q, f as X, s as Y, b as Z, u as ee, a as te } from "./floating-ui.vue-oA1DfKeS.js";
|
|
3
|
+
import { R as oe } from "./icon-svg-C8XeOnqu.js";
|
|
4
|
+
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import './style/popover.css';const le = { class: "rds-e-popover" }, se = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "rds-e-popover__list"
|
|
8
|
-
},
|
|
8
|
+
}, re = ["onClick"], ae = { class: "rds-e-popover__item-label" }, ie = {
|
|
9
9
|
__name: "popover",
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -64,6 +64,13 @@ import './style/popover.css';const Q = { class: "rds-e-popover" }, X = {
|
|
|
64
64
|
closeOnTriggerHidden: {
|
|
65
65
|
type: Boolean,
|
|
66
66
|
default: !1
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* <span>Si true, el popover se abre al hacer hover/focus sobre el trigger y se cierra al salir (desktop). Por defecto sólo click.</span>
|
|
70
|
+
*/
|
|
71
|
+
triggerOnHover: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !1
|
|
67
74
|
}
|
|
68
75
|
},
|
|
69
76
|
emits: [
|
|
@@ -80,106 +87,132 @@ import './style/popover.css';const Q = { class: "rds-e-popover" }, X = {
|
|
|
80
87
|
*/
|
|
81
88
|
"close"
|
|
82
89
|
],
|
|
83
|
-
setup(
|
|
84
|
-
const
|
|
90
|
+
setup(u, { expose: F, emit: P }) {
|
|
91
|
+
const t = u, p = P, x = V(), k = y(() => !!x.default), n = _(!1), i = _(null), l = _(null), D = y(() => {
|
|
85
92
|
const e = [
|
|
86
|
-
|
|
93
|
+
Q(t.offsetSpace)
|
|
87
94
|
];
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
fallbackPlacements:
|
|
95
|
+
return t.autoFlip && e.push(
|
|
96
|
+
X({
|
|
97
|
+
fallbackPlacements: t.fallbackPlacements.length ? t.fallbackPlacements : void 0
|
|
91
98
|
})
|
|
92
99
|
), e.push(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
apply({ availableWidth: S, elements:
|
|
96
|
-
const
|
|
97
|
-
Object.assign(
|
|
98
|
-
width: `${
|
|
100
|
+
Y({ padding: 8 }),
|
|
101
|
+
Z({
|
|
102
|
+
apply({ availableWidth: S, elements: s }) {
|
|
103
|
+
const f = Math.min(t.width, S - 32);
|
|
104
|
+
Object.assign(s.floating.style, {
|
|
105
|
+
width: `${f}px`
|
|
99
106
|
});
|
|
100
107
|
}
|
|
101
108
|
})
|
|
102
109
|
), e;
|
|
103
|
-
}), { floatingStyles:
|
|
104
|
-
l,
|
|
110
|
+
}), { floatingStyles: M, update: $ } = ee(
|
|
105
111
|
i,
|
|
112
|
+
l,
|
|
106
113
|
{
|
|
107
|
-
placement:
|
|
108
|
-
middleware:
|
|
109
|
-
whileElementsMounted:
|
|
114
|
+
placement: y(() => t.placement),
|
|
115
|
+
middleware: D,
|
|
116
|
+
whileElementsMounted: te
|
|
110
117
|
}
|
|
111
118
|
);
|
|
112
|
-
let
|
|
113
|
-
const
|
|
114
|
-
document.removeEventListener("click",
|
|
115
|
-
},
|
|
116
|
-
n.value && (n.value = !1,
|
|
119
|
+
let v, m, g, o = null;
|
|
120
|
+
const b = () => {
|
|
121
|
+
document.removeEventListener("click", v), document.removeEventListener("keydown", m), document.removeEventListener("scroll", g, !0);
|
|
122
|
+
}, r = () => {
|
|
123
|
+
n.value && (n.value = !1, p("close"), b());
|
|
117
124
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
e.key === "Escape" &&
|
|
122
|
-
},
|
|
123
|
-
if (!
|
|
124
|
-
const e =
|
|
125
|
-
(e.bottom < 0 || e.top > window.innerHeight) &&
|
|
125
|
+
v = (e) => {
|
|
126
|
+
l.value && !l.value.contains(e.target) && i.value && !i.value.contains(e.target) && r();
|
|
127
|
+
}, m = (e) => {
|
|
128
|
+
e.key === "Escape" && r();
|
|
129
|
+
}, g = () => {
|
|
130
|
+
if (!i.value) return;
|
|
131
|
+
const e = i.value.getBoundingClientRect();
|
|
132
|
+
(e.bottom < 0 || e.top > window.innerHeight) && r();
|
|
126
133
|
};
|
|
127
|
-
const
|
|
128
|
-
n.value ?
|
|
129
|
-
document.addEventListener("click",
|
|
134
|
+
const d = async () => {
|
|
135
|
+
n.value ? r() : (n.value = !0, p("open"), await L(), $(), setTimeout(() => {
|
|
136
|
+
document.addEventListener("click", v), document.addEventListener("keydown", m), t.closeOnTriggerHidden && document.addEventListener("scroll", g, !0);
|
|
130
137
|
}));
|
|
131
|
-
},
|
|
132
|
-
|
|
138
|
+
}, N = () => {
|
|
139
|
+
t.triggerOnHover && (o && (clearTimeout(o), o = null), n.value || d());
|
|
140
|
+
}, T = () => {
|
|
141
|
+
t.triggerOnHover && (o && (clearTimeout(o), o = null), o = setTimeout(() => {
|
|
142
|
+
l.value && l.value.matches(":hover, :focus-within") || r();
|
|
143
|
+
}, 120));
|
|
144
|
+
}, z = (e) => {
|
|
145
|
+
t.triggerOnHover ? (e.preventDefault(), e.stopPropagation(), n.value || d()) : d();
|
|
146
|
+
}, E = () => {
|
|
147
|
+
N();
|
|
148
|
+
}, w = () => {
|
|
149
|
+
T();
|
|
150
|
+
}, I = () => {
|
|
151
|
+
l.value && (l.value.addEventListener("mouseenter", () => {
|
|
152
|
+
o && (clearTimeout(o), o = null);
|
|
153
|
+
}), l.value.addEventListener("mouseleave", () => {
|
|
154
|
+
T();
|
|
155
|
+
}));
|
|
156
|
+
};
|
|
157
|
+
A(n, (e) => {
|
|
158
|
+
e && t.triggerOnHover && L(() => I());
|
|
159
|
+
});
|
|
160
|
+
const O = (e) => {
|
|
161
|
+
p("select", e), r();
|
|
133
162
|
};
|
|
134
|
-
return
|
|
135
|
-
toggle:
|
|
136
|
-
close:
|
|
163
|
+
return U(b), F({
|
|
164
|
+
toggle: d,
|
|
165
|
+
close: r,
|
|
137
166
|
isOpen: n
|
|
138
|
-
}), (e, S) => (
|
|
139
|
-
|
|
167
|
+
}), (e, S) => (a(), c("div", le, [
|
|
168
|
+
B("button", {
|
|
140
169
|
ref_key: "referenceRef",
|
|
141
|
-
ref:
|
|
170
|
+
ref: i,
|
|
142
171
|
class: "rds-e-popover__trigger-btn",
|
|
143
|
-
onClick:
|
|
172
|
+
onClick: z,
|
|
173
|
+
onMouseenter: E,
|
|
174
|
+
onMouseleave: w,
|
|
175
|
+
onFocus: E,
|
|
176
|
+
onBlur: w
|
|
144
177
|
}, [
|
|
145
|
-
|
|
146
|
-
],
|
|
147
|
-
(
|
|
148
|
-
to:
|
|
149
|
-
disabled: !
|
|
178
|
+
h(e.$slots, "trigger", {}, void 0, !0)
|
|
179
|
+
], 544),
|
|
180
|
+
(a(), H(j, {
|
|
181
|
+
to: u.teleportTo,
|
|
182
|
+
disabled: !u.teleportTo
|
|
150
183
|
}, [
|
|
151
|
-
n.value ? (
|
|
184
|
+
n.value ? (a(), c("div", {
|
|
152
185
|
key: 0,
|
|
153
186
|
ref_key: "floatingRef",
|
|
154
|
-
ref:
|
|
155
|
-
class:
|
|
156
|
-
style:
|
|
187
|
+
ref: l,
|
|
188
|
+
class: R(["rds-e-popover__content", { "rds-e-popover__content--no-styles": k.value }]),
|
|
189
|
+
style: G(W(M))
|
|
157
190
|
}, [
|
|
158
|
-
|
|
159
|
-
(
|
|
160
|
-
item:
|
|
161
|
-
index:
|
|
162
|
-
onSelect: () =>
|
|
191
|
+
k.value ? h(e.$slots, "default", { key: 0 }, void 0, !0) : (a(), c("ul", se, [
|
|
192
|
+
(a(!0), c(q, null, J(u.items, (s, f) => h(e.$slots, "item", {
|
|
193
|
+
item: s,
|
|
194
|
+
index: f,
|
|
195
|
+
onSelect: () => O(s)
|
|
163
196
|
}, () => [
|
|
164
|
-
(
|
|
165
|
-
key:
|
|
166
|
-
class:
|
|
167
|
-
onClick: (
|
|
197
|
+
(a(), c("li", {
|
|
198
|
+
key: f,
|
|
199
|
+
class: R(["rds-e-popover__item rds-body-02-bold", { "rds-e-popover__item--destructive": s.isDestructive }]),
|
|
200
|
+
onClick: (ce) => O(s)
|
|
168
201
|
}, [
|
|
169
|
-
|
|
202
|
+
s.icon ? (a(), H(oe, {
|
|
170
203
|
key: 0,
|
|
171
204
|
class: "rds-e-popover__item-icon",
|
|
172
|
-
name:
|
|
173
|
-
}, null, 8, ["name"])) :
|
|
174
|
-
|
|
175
|
-
], 10,
|
|
205
|
+
name: s.icon
|
|
206
|
+
}, null, 8, ["name"])) : C("", !0),
|
|
207
|
+
B("span", ae, K(s.label), 1)
|
|
208
|
+
], 10, re))
|
|
176
209
|
], !0)), 256))
|
|
177
210
|
]))
|
|
178
|
-
], 6)) :
|
|
211
|
+
], 6)) : C("", !0)
|
|
179
212
|
], 8, ["to", "disabled"]))
|
|
180
213
|
]));
|
|
181
214
|
}
|
|
182
|
-
},
|
|
215
|
+
}, ve = /* @__PURE__ */ ne(ie, [["__scopeId", "data-v-97579838"]]);
|
|
183
216
|
export {
|
|
184
|
-
|
|
217
|
+
ve as default
|
|
185
218
|
};
|