@milaboratories/uikit 2.3.29 → 2.4.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 (30) hide show
  1. package/.turbo/turbo-build.log +24 -24
  2. package/.turbo/turbo-test.log +133 -0
  3. package/.turbo/turbo-type-check.log +1 -1
  4. package/CHANGELOG.md +10 -0
  5. package/dist/components/DataTable/TableComponent.vue.js +1 -1
  6. package/dist/components/PlAccordion/ExpandTransition.vue.js +27 -0
  7. package/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -0
  8. package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
  9. package/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
  10. package/dist/components/PlDropdown/PlDropdown.vue.d.ts +6 -7
  11. package/dist/components/PlDropdown/PlDropdown.vue.d.ts.map +1 -1
  12. package/dist/components/PlDropdown/PlDropdown.vue.js +78 -75
  13. package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
  14. package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts.map +1 -1
  15. package/dist/components/PlDropdownLine/PlDropdownLine.vue.js +100 -96
  16. package/dist/components/PlDropdownLine/PlDropdownLine.vue.js.map +1 -1
  17. package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts +68 -123
  18. package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts.map +1 -1
  19. package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +23 -21
  20. package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
  21. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +1 -1
  22. package/dist/utils/DropdownOverlay/DropdownOverlay.vue.d.ts.map +1 -1
  23. package/dist/utils/DropdownOverlay/DropdownOverlay.vue.js +19 -17
  24. package/dist/utils/DropdownOverlay/DropdownOverlay.vue.js.map +1 -1
  25. package/package.json +3 -3
  26. package/src/components/PlDropdown/PlDropdown.vue +9 -13
  27. package/src/components/PlDropdown/pl-dropdown.scss +6 -11
  28. package/src/components/PlDropdownLine/PlDropdownLine.vue +10 -1
  29. package/src/components/PlDropdownRef/PlDropdownRef.vue +16 -14
  30. package/src/utils/DropdownOverlay/DropdownOverlay.vue +7 -1
@@ -1,17 +1,17 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`.pl-line-dropdown{display:flex;align-items:center;width:fit-content;padding:8px 0;box-sizing:border-box;position:relative;outline:none;max-width:256px}.pl-line-dropdown:focus-within:after{border-bottom:2px solid var(--border-color-focus)}.pl-line-dropdown__prefix,.pl-line-dropdown__input{text-transform:uppercase}.pl-line-dropdown:hover:after{border-bottom:2px solid var(--border-color-focus)}.pl-line-dropdown:after{content:"";position:absolute;bottom:0;border-bottom:2px solid var(--color-div-grey);width:100%}.pl-line-dropdown *{color:var(--txt-01);font-family:var(--font-family-base);font-size:13px;font-style:normal;font-weight:600;line-height:14px;letter-spacing:.52px}.pl-line-dropdown__input::placeholder{color:var(--txt-mask)}.pl-line-dropdown__icon{display:flex;align-items:center;min-width:16px;background-color:var(--control-mask-fill);mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.46967%206.53033L3.53033%205.46967L8%209.93934L12.4697%205.46967L13.5303%206.53033L8%2012.0607L2.46967%206.53033Z'%20fill='%23110529'/%3e%3c/svg%3e");-webkit-mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.46967%206.53033L3.53033%205.46967L8%209.93934L12.4697%205.46967L13.5303%206.53033L8%2012.0607L2.46967%206.53033Z'%20fill='%23110529'/%3e%3c/svg%3e");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:16px;-webkit-mask-size:16px;width:16px;height:16px}.pl-line-dropdown__icon-clear{mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_586_7851)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%2016C12.4183%2016%2016%2012.4183%2016%208C16%203.58172%2012.4183%200%208%200C3.58172%200%200%203.58172%200%208C0%2012.4183%203.58172%2016%208%2016ZM4.46967%205.53033L6.93934%208L4.46967%2010.4697L5.53033%2011.5303L8%209.06066L10.4697%2011.5303L11.5303%2010.4697L9.06066%208L11.5303%205.53033L10.4697%204.46967L8%206.93934L5.53033%204.46967L4.46967%205.53033Z'%20fill='%23CFD1DB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_586_7851'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");-webkit-mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_586_7851)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%2016C12.4183%2016%2016%2012.4183%2016%208C16%203.58172%2012.4183%200%208%200C3.58172%200%200%203.58172%200%208C0%2012.4183%203.58172%2016%208%2016ZM4.46967%205.53033L6.93934%208L4.46967%2010.4697L5.53033%2011.5303L8%209.06066L10.4697%2011.5303L11.5303%2010.4697L9.06066%208L11.5303%205.53033L10.4697%204.46967L8%206.93934L5.53033%204.46967L4.46967%205.53033Z'%20fill='%23CFD1DB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_586_7851'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:16px;-webkit-mask-size:16px;width:16px;height:16px;background-color:var(--color-ic-02)}.pl-line-dropdown.open .pl-line-dropdown__icon{mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%204.93933L13.5303%2010.4697L12.4697%2011.5303L8%207.06065L3.53033%2011.5303L2.46967%2010.4697L8%204.93933Z'%20fill='%23110529'/%3e%3c/svg%3e");-webkit-mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%204.93933L13.5303%2010.4697L12.4697%2011.5303L8%207.06065L3.53033%2011.5303L2.46967%2010.4697L8%204.93933Z'%20fill='%23110529'/%3e%3c/svg%3e");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:16px;-webkit-mask-size:16px;width:16px;height:16px}.pl-line-dropdown.open:after{border-bottom:2px solid var(--border-color-focus)}.pl-line-dropdown__icon-wrapper{padding:4px 2px 4px 0}.pl-line-dropdown.disabled *{color:var(--txt-mask);cursor:not-allowed}.pl-line-dropdown.disabled .pl-line-dropdown__icon{background-color:var(--color-div-grey)!important}.pl-line-dropdown.disabled:after{border-bottom:2px solid var(--color-div-grey)!important}.pl-line-dropdown.disabled:hover:after{border-bottom:2px solid var(--color-div-grey)!important}.pl-line-dropdown__no-item{padding:8px 12px}.pl-line-dropdown__no-item-title{color:var(--txt-03)!important;text-wrap:nowrap;text-overflow:ellipsis;overflow:hidden}.pl-line-dropdown__items{position:absolute;top:0;z-index:var(--z-dropdown-options);border-radius:6px;padding:12px 0;border:1px solid var(--color-div-grey);width:256px;box-sizing:border-box;max-height:320px;background-color:var(--bg-elevated-01);box-shadow:var(--shadow-m);--thumb-color: var(--ic-02);overflow-y:auto}.pl-line-dropdown__items::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.pl-line-dropdown__items::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-line-dropdown__items::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}.pl-line-dropdown__items-tabs{display:flex;position:absolute;top:0;z-index:var(--z-dropdown-options);background-color:var(--color-div-bw);overflow-x:scroll;max-width:400px;padding:6px 12px 12px;border:1px solid var(--color-div-grey);border-radius:6px;box-shadow:var(--shadow-m);--thumb-color: var(--ic-02);overflow-x:auto}.pl-line-dropdown__items-tabs::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.pl-line-dropdown__items-tabs::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-line-dropdown__items-tabs::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}`)),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { defineComponent as W, reactive as B, ref as g, computed as y, toRef as X, watch as h, nextTick as D, createElementBlock as d, openBlock as a, normalizeClass as Y, createElementVNode as p, createVNode as C, createBlock as Z, createCommentVNode as O, toDisplayString as ee, withDirectives as F, vShow as A, Teleport as te, normalizeStyle as H, Fragment as T, renderList as L, unref as k, renderSlot as M, withModifiers as b } from "vue";
2
+ import { defineComponent as W, reactive as B, ref as y, computed as O, toRef as X, watch as _, nextTick as D, createElementBlock as d, openBlock as r, normalizeClass as Y, createElementVNode as c, createVNode as C, createBlock as Z, createCommentVNode as k, toDisplayString as ee, withDirectives as F, vShow as A, Teleport as te, withModifiers as f, normalizeStyle as H, Fragment as T, renderList as L, unref as b, renderSlot as M } from "vue";
3
3
 
4
4
  import { deepEqual as S } from "../../helpers/objects.js";
5
5
  import { useClickOutside as oe } from "../../composition/useClickOutside.js";
6
6
  import { useFilteredList as ne } from "../../composition/useFilteredList.js";
7
7
  import ie from "./ResizableInput.vue.js";
8
8
  import { tap as le, tapIf as se } from "../../helpers/functions.js";
9
- import { scrollIntoView as ae } from "../../helpers/dom.js";
10
- import re from "../DropdownListItem.vue.js";
9
+ import { scrollIntoView as re } from "../../helpers/dom.js";
10
+ import ae from "../DropdownListItem.vue.js";
11
11
  import de from "../TabItem.vue.js";
12
- import { normalizeListOptions as ce } from "../../helpers/utils.js";
13
- import { useElementPosition as ue } from "../../composition/usePosition.js";
14
- const pe = { class: "pl-line-dropdown__prefix" }, fe = { class: "pl-line-dropdown__icon-wrapper" }, me = { class: "pl-line-dropdown__icon" }, ve = {
12
+ import { normalizeListOptions as ue } from "../../helpers/utils.js";
13
+ import { useElementPosition as pe } from "../../composition/usePosition.js";
14
+ const ce = { class: "pl-line-dropdown__prefix" }, fe = { class: "pl-line-dropdown__icon-wrapper" }, me = { class: "pl-line-dropdown__icon" }, ve = {
15
15
  key: 0,
16
16
  class: "pl-line-dropdown__no-item"
17
17
  }, he = {
@@ -31,39 +31,39 @@ const pe = { class: "pl-line-dropdown__prefix" }, fe = { class: "pl-line-dropdow
31
31
  },
32
32
  emits: ["update:modelValue"],
33
33
  setup(P, { emit: q }) {
34
- const I = q, i = P, o = B({
34
+ const I = q, i = P, n = B({
35
35
  isOpen: !1,
36
36
  activeOption: -1,
37
37
  optionsHeight: 0
38
- }), c = g(), f = g(), z = y(() => {
38
+ }), u = y(), m = y(), z = O(() => {
39
39
  const e = [];
40
- return o.isOpen && e.push("open"), i.disabled && e.push("disabled"), e.join(" ");
41
- }), s = g(""), r = ne(X(i, "options"), s), $ = y(() => !!(i.clearable && o.isOpen && i.modelValue && u.value)), u = y(() => {
40
+ return n.isOpen && e.push("open"), i.disabled && e.push("disabled"), e.join(" ");
41
+ }), s = y(""), a = ne(X(i, "options"), s), $ = O(() => !!(i.clearable && n.isOpen && i.modelValue && p.value)), p = O(() => {
42
42
  if (i.modelValue !== void 0) {
43
43
  const e = j();
44
44
  if (e !== -1)
45
- return ce(i.options)[e].label;
45
+ return ue(i.options)[e].label;
46
46
  }
47
47
  return "";
48
- }), _ = g(u.value);
49
- h(u, (e) => {
50
- _.value = e;
48
+ }), w = y(p.value);
49
+ _(p, (e) => {
50
+ w.value = e;
51
51
  });
52
- const N = y(() => o.isOpen && s.value && s.value.length >= u.value.length - 1 ? s.value : u.value || "...");
53
- oe(c, () => {
54
- i.mode === "list" && (o.isOpen = !1);
55
- }), h(
56
- () => _.value,
52
+ const N = O(() => n.isOpen && s.value && s.value.length >= p.value.length - 1 ? s.value : p.value || "...");
53
+ oe(u, () => {
54
+ i.mode === "list" && (n.isOpen = !1);
55
+ }), _(
56
+ () => w.value,
57
57
  (e) => {
58
- u.value !== e ? s.value = e : s.value = "";
58
+ p.value !== e ? s.value = e : s.value = "";
59
59
  }
60
- ), h(
61
- () => o.isOpen,
60
+ ), _(
61
+ () => n.isOpen,
62
62
  (e) => {
63
- var n;
64
- e && c.value && ((n = c.value.querySelector("input")) == null || n.focus(), D(() => E()));
63
+ var t;
64
+ e && u.value && ((t = u.value.querySelector("input")) == null || t.focus(), D(() => E()));
65
65
  }
66
- ), h(
66
+ ), _(
67
67
  () => i.modelValue,
68
68
  () => R(),
69
69
  { immediate: !0 }
@@ -72,8 +72,8 @@ const pe = { class: "pl-line-dropdown__prefix" }, fe = { class: "pl-line-dropdow
72
72
  return i.options.findIndex((e) => S(e.value, i.modelValue));
73
73
  }
74
74
  function R() {
75
- o.activeOption = le(
76
- r.value.findIndex((e) => S(e.value, i.modelValue)),
75
+ n.activeOption = le(
76
+ a.value.findIndex((e) => S(e.value, i.modelValue)),
77
77
  (e) => e < 0 ? 0 : e
78
78
  );
79
79
  }
@@ -81,147 +81,151 @@ const pe = { class: "pl-line-dropdown__prefix" }, fe = { class: "pl-line-dropdow
81
81
  s.value = "";
82
82
  }
83
83
  function K() {
84
- i.disabled ? o.isOpen = !1 : D(() => {
85
- o.isOpen = !o.isOpen;
84
+ i.disabled ? n.isOpen = !1 : D(() => {
85
+ n.isOpen = !n.isOpen;
86
86
  });
87
87
  }
88
88
  function G() {
89
- i.mode === "list" && (o.isOpen = !1);
89
+ i.mode === "list" && (n.isOpen = !1);
90
90
  }
91
- function m(e) {
91
+ function v(e) {
92
92
  e && (I("update:modelValue", e.value), G(), U());
93
93
  }
94
- function w(e) {
94
+ function g(e) {
95
95
  return S(e.value, i.modelValue);
96
96
  }
97
97
  const x = (e) => {
98
- var t, l;
99
- const n = e.relatedTarget;
100
- !((t = c.value) != null && t.contains(n)) && !((l = f.value) != null && l.contains(n)) && (s.value = "", o.isOpen = !1);
98
+ var o, l;
99
+ const t = e.relatedTarget;
100
+ !((o = u.value) != null && o.contains(t)) && !((l = m.value) != null && l.contains(t)) && (s.value = "", n.isOpen = !1);
101
101
  };
102
102
  function J(e) {
103
- const { activeOption: n } = o;
104
- if (!o.isOpen && e.code === "Enter") {
105
- o.isOpen = !0;
103
+ const { activeOption: t } = n;
104
+ if (!n.isOpen && e.code === "Enter") {
105
+ n.isOpen = !0;
106
106
  return;
107
107
  }
108
- const { length: t } = r.value;
109
- if (!t)
108
+ const { length: o } = a.value;
109
+ if (!o)
110
110
  return;
111
- ["ArrowDown", "ArrowUp", "Enter"].includes(e.code) && e.preventDefault(), e.code === "Enter" && m(r.value[n]);
111
+ ["ArrowDown", "ArrowUp", "Enter"].includes(e.code) && e.preventDefault(), e.code === "Enter" && v(a.value[t]);
112
112
  const l = e.code === "ArrowDown" ? 1 : e.code === "ArrowUp" ? -1 : 0;
113
- o.activeOption = Math.abs(n + l + t) % t, requestAnimationFrame(E);
113
+ n.activeOption = Math.abs(t + l + o) % o, requestAnimationFrame(E);
114
114
  }
115
115
  function E() {
116
- const e = f.value;
117
- e && se(e.querySelector(".hovered-item"), (n) => {
118
- i.mode === "list" ? ae(e, n) : n.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
116
+ const e = m.value;
117
+ e && se(e.querySelector(".hovered-item"), (t) => {
118
+ i.mode === "list" ? re(e, t) : t.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
119
119
  });
120
120
  }
121
121
  function Q() {
122
122
  I("update:modelValue", void 0);
123
123
  }
124
- const v = B({
124
+ const h = B({
125
125
  top: "0px",
126
126
  left: "0px"
127
127
  });
128
- return h(f, (e) => {
128
+ return _(m, (e) => {
129
129
  if (e) {
130
- const n = e.getBoundingClientRect();
131
- o.optionsHeight = n.height, window.dispatchEvent(new CustomEvent("adjust"));
130
+ const t = e.getBoundingClientRect();
131
+ n.optionsHeight = t.height, window.dispatchEvent(new CustomEvent("adjust"));
132
132
  }
133
- }), ue(c, (e) => {
134
- const t = e.top + e.height + 2;
135
- t + o.optionsHeight > e.clientHeight ? v.top = e.top - o.optionsHeight - 2 + "px" : v.top = t + "px", v.left = e.left + "px";
136
- }), (e, n) => (a(), d("div", {
133
+ }), pe(u, (e) => {
134
+ const o = e.top + e.height + 2;
135
+ o + n.optionsHeight > e.clientHeight ? h.top = e.top - n.optionsHeight - 2 + "px" : h.top = o + "px", h.left = e.left + "px";
136
+ }), (e, t) => (r(), d("div", {
137
137
  ref_key: "container",
138
- ref: c,
138
+ ref: u,
139
139
  tabindex: "0",
140
140
  class: Y([z.value, "pl-line-dropdown uc-pointer"]),
141
141
  onKeydown: J,
142
142
  onFocusout: x,
143
143
  onClick: K
144
144
  }, [
145
- p("div", pe, ee(i == null ? void 0 : i.prefix), 1),
145
+ c("div", ce, ee(i == null ? void 0 : i.prefix), 1),
146
146
  C(ie, {
147
- modelValue: _.value,
148
- "onUpdate:modelValue": n[0] || (n[0] = (t) => _.value = t),
147
+ modelValue: w.value,
148
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => w.value = o),
149
149
  placeholder: N.value,
150
150
  disabled: i.disabled,
151
151
  class: "pl-line-dropdown__input"
152
152
  }, null, 8, ["modelValue", "placeholder", "disabled"]),
153
- p("div", fe, [
154
- F(p("div", me, null, 512), [
153
+ c("div", fe, [
154
+ F(c("div", me, null, 512), [
155
155
  [A, !$.value]
156
156
  ]),
157
- F(p("div", {
157
+ F(c("div", {
158
158
  class: "pl-line-dropdown__icon-clear",
159
159
  onClick: Q
160
160
  }, null, 512), [
161
161
  [A, $.value]
162
162
  ])
163
163
  ]),
164
- o.isOpen ? (a(), Z(te, {
164
+ n.isOpen ? (r(), Z(te, {
165
165
  key: 0,
166
166
  to: "body"
167
167
  }, [
168
- i.mode === "list" ? (a(), d("div", {
168
+ i.mode === "list" ? (r(), d("div", {
169
169
  key: 0,
170
170
  ref_key: "list",
171
- ref: f,
172
- style: H(v),
171
+ ref: m,
172
+ style: H(h),
173
173
  tabindex: "-1",
174
174
  class: "pl-line-dropdown__items",
175
- onFocusout: x
175
+ onFocusout: x,
176
+ onClick: t[1] || (t[1] = f(() => {
177
+ }, ["stop"]))
176
178
  }, [
177
- (a(!0), d(T, null, L(k(r), (t, l) => M(e.$slots, "item", {
179
+ (r(!0), d(T, null, L(b(a), (o, l) => M(e.$slots, "item", {
178
180
  key: l,
179
- item: t,
181
+ item: o,
180
182
  textItem: "text",
181
- isSelected: w(t),
182
- isHovered: o.activeOption == l,
183
- onClick: b((V) => m(t), ["stop"])
183
+ isSelected: g(o),
184
+ isHovered: n.activeOption == l,
185
+ onClick: f((V) => v(o), ["stop"])
184
186
  }, () => [
185
- C(re, {
186
- option: t,
187
+ C(ae, {
188
+ option: o,
187
189
  "text-item": "text",
188
- "is-selected": w(t),
189
- "is-hovered": o.activeOption == l,
190
+ "is-selected": g(o),
191
+ "is-hovered": n.activeOption == l,
190
192
  size: "medium",
191
- onClick: b((V) => m(t), ["stop"])
193
+ onClick: f((V) => v(o), ["stop"])
192
194
  }, null, 8, ["option", "is-selected", "is-hovered", "onClick"])
193
195
  ])), 128)),
194
- k(r).length === 0 ? (a(), d("div", ve, n[1] || (n[1] = [
195
- p("div", { class: "pl-line-dropdown__no-item-title text-s" }, "Didn't find anything that matched", -1)
196
- ]))) : O("", !0)
197
- ], 36)) : i.mode === "tabs" ? (a(), d("div", {
196
+ b(a).length === 0 ? (r(), d("div", ve, t[3] || (t[3] = [
197
+ c("div", { class: "pl-line-dropdown__no-item-title text-s" }, "Didn't find anything that matched", -1)
198
+ ]))) : k("", !0)
199
+ ], 36)) : i.mode === "tabs" ? (r(), d("div", {
198
200
  key: 1,
199
201
  ref_key: "list",
200
- ref: f,
201
- style: H(v),
202
+ ref: m,
203
+ style: H(h),
202
204
  tabindex: "-1",
203
205
  class: "pl-line-dropdown__items-tabs",
204
- onFocusout: x
206
+ onFocusout: x,
207
+ onClick: t[2] || (t[2] = f(() => {
208
+ }, ["stop"]))
205
209
  }, [
206
- (a(!0), d(T, null, L(k(r), (t, l) => M(e.$slots, "item", {
210
+ (r(!0), d(T, null, L(b(a), (o, l) => M(e.$slots, "item", {
207
211
  key: l,
208
- item: t,
209
- isSelected: w(t),
210
- isHovered: o.activeOption == l,
211
- onClick: b((V) => m(t), ["stop"])
212
+ item: o,
213
+ isSelected: g(o),
214
+ isHovered: n.activeOption == l,
215
+ onClick: f((V) => v(o), ["stop"])
212
216
  }, () => [
213
217
  C(de, {
214
- option: t,
215
- "is-selected": w(t),
216
- "is-hovered": o.activeOption == l,
217
- onClick: b((V) => m(t), ["stop"])
218
+ option: o,
219
+ "is-selected": g(o),
220
+ "is-hovered": n.activeOption == l,
221
+ onClick: f((V) => v(o), ["stop"])
218
222
  }, null, 8, ["option", "is-selected", "is-hovered", "onClick"])
219
223
  ])), 128)),
220
- k(r).length === 0 ? (a(), d("div", he, n[2] || (n[2] = [
221
- p("div", { class: "pl-line-dropdown__no-item-title text-s" }, "Didn't find anything that matched", -1)
222
- ]))) : O("", !0)
223
- ], 36)) : O("", !0)
224
- ])) : O("", !0)
224
+ b(a).length === 0 ? (r(), d("div", he, t[4] || (t[4] = [
225
+ c("div", { class: "pl-line-dropdown__no-item-title text-s" }, "Didn't find anything that matched", -1)
226
+ ]))) : k("", !0)
227
+ ], 36)) : k("", !0)
228
+ ])) : k("", !0)
225
229
  ], 34));
226
230
  }
227
231
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PlDropdownLine.vue.js","sources":["../../../src/components/PlDropdownLine/PlDropdownLine.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport './pl-dropdown-line.scss';\nimport type { StyleValue } from 'vue';\nimport { computed, nextTick, reactive, ref, toRef, watch } from 'vue';\nimport { deepEqual } from '../../helpers/objects';\nimport { useClickOutside } from '../../composition/useClickOutside';\nimport { useFilteredList } from '../../composition/useFilteredList';\nimport ResizableInput from './ResizableInput.vue';\nimport { tapIf, tap } from '../../helpers/functions';\nimport { scrollIntoView } from '../../helpers/dom';\nimport DropdownListItem from '../DropdownListItem.vue';\nimport TabItem from '../TabItem.vue';\nimport type { ListOption } from '../../types';\nimport { normalizeListOptions } from '../../helpers/utils';\nimport { useElementPosition } from '../../composition/usePosition';\n\nconst emit = defineEmits(['update:modelValue']); // at the top always\n\nconst props = withDefaults(\n defineProps<{\n modelValue: unknown;\n disabled?: boolean;\n prefix?: string;\n options: ListOption[]; // @todo extend with size field\n placeholder?: string;\n mode?: 'list' | 'tabs';\n tabsContainerStyles?: StyleValue;\n clearable?: boolean;\n }>(),\n {\n mode: 'list',\n placeholder: 'Select..',\n prefix: '',\n tabsContainerStyles: undefined,\n clearable: false,\n },\n);\n\nconst data = reactive({\n isOpen: false,\n activeOption: -1,\n optionsHeight: 0,\n});\n\nconst container = ref<HTMLElement>();\n\nconst list = ref<HTMLElement>();\n\nconst classes = computed(() => {\n const classesResult = [];\n if (data.isOpen) {\n classesResult.push('open');\n }\n if (props.disabled) {\n classesResult.push('disabled');\n }\n return classesResult.join(' ');\n});\n\nconst searchPhrase = ref<string>('');\n\nconst options = useFilteredList(toRef(props, 'options'), searchPhrase);\n\nconst canShowClearBtn = computed<boolean>(() => !!(props.clearable && data.isOpen && props.modelValue && modelText.value));\n\nconst modelText = computed<string>(() => {\n if (props.modelValue !== undefined) {\n const index = getIndexForModelInItems();\n if (index !== -1) {\n const item = normalizeListOptions(props.options)[index];\n return item.label;\n }\n }\n return '';\n});\n\nconst inputModel = ref(modelText.value);\n\nwatch(modelText, (v) => {\n inputModel.value = v;\n});\n\nconst placeholderVal = computed(() => {\n if (data.isOpen) {\n if (searchPhrase.value && searchPhrase.value.length >= modelText.value.length - 1) {\n return searchPhrase.value;\n }\n }\n\n return modelText.value || '...';\n});\n\nuseClickOutside(container, () => {\n if (props.mode === 'list') {\n data.isOpen = false;\n }\n});\n\nwatch(\n () => inputModel.value,\n (val) => {\n if (modelText.value !== val) {\n searchPhrase.value = val;\n } else {\n searchPhrase.value = '';\n }\n },\n);\n\nwatch(\n () => data.isOpen,\n (value: boolean) => {\n if (value && container.value) {\n container.value.querySelector('input')?.focus();\n nextTick(() => scrollIntoActive());\n }\n },\n);\n\nwatch(\n () => props.modelValue,\n () => updateSelected(),\n { immediate: true },\n);\n\nfunction getIndexForModelInItems(): number | -1 {\n return props.options.findIndex((o: ListOption) => {\n return deepEqual(o.value, props.modelValue);\n });\n}\n\nfunction updateSelected() {\n data.activeOption = tap(\n options.value.findIndex((o: ListOption) => {\n return deepEqual(o.value, props.modelValue);\n }),\n (v) => (v < 0 ? 0 : v),\n );\n}\n\nfunction resetSearchPhrase() {\n searchPhrase.value = '';\n}\n\nfunction toggleList(): void {\n if (props.disabled) {\n data.isOpen = false;\n } else {\n nextTick(() => {\n data.isOpen = !data.isOpen;\n });\n }\n}\n\nfunction closePopupIfNeeded() {\n if (props.mode === 'list') {\n data.isOpen = false;\n }\n}\n\nfunction selectItem(item?: ListOption): void {\n if (item) {\n emit('update:modelValue', item.value);\n closePopupIfNeeded();\n resetSearchPhrase();\n }\n}\n\nfunction isItemSelected(item: ListOption): boolean {\n return deepEqual(item.value, props.modelValue);\n}\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!container.value?.contains(relatedTarget) && !list.value?.contains(relatedTarget)) {\n searchPhrase.value = '';\n data.isOpen = false;\n }\n};\n\nfunction handleKeydown(e: { code: string; preventDefault(): void }) {\n const { activeOption } = data;\n\n if (!data.isOpen && e.code === 'Enter') {\n data.isOpen = true;\n return;\n }\n\n const { length } = options.value;\n\n if (!length) {\n return;\n }\n\n if (['ArrowDown', 'ArrowUp', 'Enter'].includes(e.code)) {\n e.preventDefault();\n }\n\n if (e.code === 'Enter') {\n selectItem(options.value[activeOption]);\n }\n\n const d = e.code === 'ArrowDown' ? 1 : e.code === 'ArrowUp' ? -1 : 0;\n\n data.activeOption = Math.abs(activeOption + d + length) % length;\n\n requestAnimationFrame(scrollIntoActive);\n}\n\nfunction scrollIntoActive() {\n const $list = list.value;\n if (!$list) {\n return;\n }\n tapIf($list.querySelector('.hovered-item'), (el: Element) => {\n if (props.mode === 'list') {\n scrollIntoView($list, el as HTMLElement);\n } else {\n el.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' });\n }\n });\n}\n\nfunction clearModel() {\n emit('update:modelValue', undefined);\n}\n\nconst optionsStyle = reactive({\n top: '0px',\n left: '0px',\n});\n\nwatch(list, (el) => {\n if (el) {\n const rect = el.getBoundingClientRect();\n data.optionsHeight = rect.height;\n window.dispatchEvent(new CustomEvent('adjust'));\n }\n});\n\nuseElementPosition(container, (pos) => {\n const gap = 2;\n\n const downTopOffset = pos.top + pos.height + gap;\n\n if (downTopOffset + data.optionsHeight > pos.clientHeight) {\n optionsStyle.top = pos.top - data.optionsHeight - gap + 'px';\n } else {\n optionsStyle.top = downTopOffset + 'px';\n }\n\n optionsStyle.left = pos.left + 'px';\n});\n</script>\n\n<template>\n <div\n ref=\"container\"\n tabindex=\"0\"\n :class=\"classes\"\n class=\"pl-line-dropdown uc-pointer\"\n @keydown=\"handleKeydown\"\n @focusout=\"onFocusOut\"\n @click=\"toggleList\"\n >\n <div class=\"pl-line-dropdown__prefix\">{{ props?.prefix }}</div>\n\n <ResizableInput v-model=\"inputModel\" :placeholder=\"placeholderVal\" :disabled=\"props.disabled\" class=\"pl-line-dropdown__input\" />\n\n <div class=\"pl-line-dropdown__icon-wrapper\">\n <div v-show=\"!canShowClearBtn\" class=\"pl-line-dropdown__icon\" />\n <div v-show=\"canShowClearBtn\" class=\"pl-line-dropdown__icon-clear\" @click=\"clearModel\" />\n </div>\n <Teleport v-if=\"data.isOpen\" to=\"body\">\n <div v-if=\"props.mode === 'list'\" ref=\"list\" :style=\"optionsStyle\" tabindex=\"-1\" class=\"pl-line-dropdown__items\" @focusout=\"onFocusOut\">\n <template v-for=\"(item, index) in options\" :key=\"index\">\n <slot\n name=\"item\"\n :item=\"item\"\n :text-item=\"'text'\"\n :is-selected=\"isItemSelected(item)\"\n :is-hovered=\"data.activeOption == index\"\n @click.stop=\"selectItem(item)\"\n >\n <DropdownListItem\n :option=\"item\"\n :text-item=\"'text'\"\n :is-selected=\"isItemSelected(item)\"\n :is-hovered=\"data.activeOption == index\"\n size=\"medium\"\n @click.stop=\"selectItem(item)\"\n />\n </slot>\n </template>\n\n <div v-if=\"options.length === 0\" class=\"pl-line-dropdown__no-item\">\n <div class=\"pl-line-dropdown__no-item-title text-s\">Didn't find anything that matched</div>\n </div>\n </div>\n <div\n v-else-if=\"props.mode === 'tabs'\"\n ref=\"list\"\n :style=\"optionsStyle\"\n tabindex=\"-1\"\n class=\"pl-line-dropdown__items-tabs\"\n @focusout=\"onFocusOut\"\n >\n <template v-for=\"(item, index) in options\" :key=\"index\">\n <slot name=\"item\" :item=\"item\" :is-selected=\"isItemSelected(item)\" :is-hovered=\"data.activeOption == index\" @click.stop=\"selectItem(item)\">\n <TabItem :option=\"item\" :is-selected=\"isItemSelected(item)\" :is-hovered=\"data.activeOption == index\" @click.stop=\"selectItem(item)\" />\n </slot>\n </template>\n <div v-if=\"options.length === 0\" class=\"pl-line-dropdown__no-item\">\n <div class=\"pl-line-dropdown__no-item-title text-s\">Didn't find anything that matched</div>\n </div>\n </div>\n </Teleport>\n </div>\n</template>\n"],"names":["emit","__emit","props","__props","data","reactive","container","ref","list","classes","computed","classesResult","searchPhrase","options","useFilteredList","toRef","canShowClearBtn","modelText","index","getIndexForModelInItems","normalizeListOptions","inputModel","watch","v","placeholderVal","useClickOutside","val","value","_a","nextTick","scrollIntoActive","updateSelected","o","deepEqual","tap","resetSearchPhrase","toggleList","closePopupIfNeeded","selectItem","item","isItemSelected","onFocusOut","event","relatedTarget","_b","handleKeydown","activeOption","length","d","$list","tapIf","el","scrollIntoView","clearModel","optionsStyle","rect","useElementPosition","pos","downTopOffset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,UAAMA,IAAOC,GAEPC,IAAQC,GAoBRC,IAAOC,EAAS;AAAA,MACpB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,eAAe;AAAA,IAAA,CAChB,GAEKC,IAAYC,EAAiB,GAE7BC,IAAOD,EAAiB,GAExBE,IAAUC,EAAS,MAAM;AAC7B,YAAMC,IAAgB,CAAC;AACvB,aAAIP,EAAK,UACPO,EAAc,KAAK,MAAM,GAEvBT,EAAM,YACRS,EAAc,KAAK,UAAU,GAExBA,EAAc,KAAK,GAAG;AAAA,IAAA,CAC9B,GAEKC,IAAeL,EAAY,EAAE,GAE7BM,IAAUC,GAAgBC,EAAMb,GAAO,SAAS,GAAGU,CAAY,GAE/DI,IAAkBN,EAAkB,MAAM,CAAC,EAAER,EAAM,aAAaE,EAAK,UAAUF,EAAM,cAAce,EAAU,MAAM,GAEnHA,IAAYP,EAAiB,MAAM;AACnC,UAAAR,EAAM,eAAe,QAAW;AAClC,cAAMgB,IAAQC,EAAwB;AACtC,YAAID,MAAU;AAEZ,iBADaE,GAAqBlB,EAAM,OAAO,EAAEgB,CAAK,EAC1C;AAAA,MACd;AAEK,aAAA;AAAA,IAAA,CACR,GAEKG,IAAad,EAAIU,EAAU,KAAK;AAEhC,IAAAK,EAAAL,GAAW,CAACM,MAAM;AACtB,MAAAF,EAAW,QAAQE;AAAA,IAAA,CACpB;AAEK,UAAAC,IAAiBd,EAAS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AAW,QAAQ,UAAU;AAAA,MAC9E,CACD;AAAA,IAAA;AAGH,aAASE,IAAa;AACpB,MAAArD,EAAK,qBAAqB,MAAS;AAAA,IAAA;AAGrC,UAAMsD,IAAejD,EAAS;AAAA,MAC5B,KAAK;AAAA,MACL,MAAM;AAAA,IAAA,CACP;AAEK,WAAAiB,EAAAd,GAAM,CAAC2C,MAAO;AAClB,UAAIA,GAAI;AACA,cAAAI,IAAOJ,EAAG,sBAAsB;AACtC,QAAA/C,EAAK,gBAAgBmD,EAAK,QAC1B,OAAO,cAAc,IAAI,YAAY,QAAQ,CAAC;AAAA,MAAA;AAAA,IAChD,CACD,GAEkBC,GAAAlD,GAAW,CAACmD,MAAQ;AAGrC,YAAMC,IAAgBD,EAAI,MAAMA,EAAI,SAAS;AAE7C,MAAIC,IAAgBtD,EAAK,gBAAgBqD,EAAI,eAC3CH,EAAa,MAAMG,EAAI,MAAMrD,EAAK,gBAAgB,IAAM,OAExDkD,EAAa,MAAMI,IAAgB,MAGxBJ,EAAA,OAAOG,EAAI,OAAO;AAAA,IAAA,CAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlDropdownLine.vue.js","sources":["../../../src/components/PlDropdownLine/PlDropdownLine.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport './pl-dropdown-line.scss';\nimport type { StyleValue } from 'vue';\nimport { computed, nextTick, reactive, ref, toRef, watch } from 'vue';\nimport { deepEqual } from '../../helpers/objects';\nimport { useClickOutside } from '../../composition/useClickOutside';\nimport { useFilteredList } from '../../composition/useFilteredList';\nimport ResizableInput from './ResizableInput.vue';\nimport { tapIf, tap } from '../../helpers/functions';\nimport { scrollIntoView } from '../../helpers/dom';\nimport DropdownListItem from '../DropdownListItem.vue';\nimport TabItem from '../TabItem.vue';\nimport type { ListOption } from '../../types';\nimport { normalizeListOptions } from '../../helpers/utils';\nimport { useElementPosition } from '../../composition/usePosition';\n\nconst emit = defineEmits(['update:modelValue']); // at the top always\n\nconst props = withDefaults(\n defineProps<{\n modelValue: unknown;\n disabled?: boolean;\n prefix?: string;\n options: ListOption[]; // @todo extend with size field\n placeholder?: string;\n mode?: 'list' | 'tabs';\n tabsContainerStyles?: StyleValue;\n clearable?: boolean;\n }>(),\n {\n mode: 'list',\n placeholder: 'Select..',\n prefix: '',\n tabsContainerStyles: undefined,\n clearable: false,\n },\n);\n\nconst data = reactive({\n isOpen: false,\n activeOption: -1,\n optionsHeight: 0,\n});\n\nconst container = ref<HTMLElement>();\n\nconst list = ref<HTMLElement>();\n\nconst classes = computed(() => {\n const classesResult = [];\n if (data.isOpen) {\n classesResult.push('open');\n }\n if (props.disabled) {\n classesResult.push('disabled');\n }\n return classesResult.join(' ');\n});\n\nconst searchPhrase = ref<string>('');\n\nconst options = useFilteredList(toRef(props, 'options'), searchPhrase);\n\nconst canShowClearBtn = computed<boolean>(() => !!(props.clearable && data.isOpen && props.modelValue && modelText.value));\n\nconst modelText = computed<string>(() => {\n if (props.modelValue !== undefined) {\n const index = getIndexForModelInItems();\n if (index !== -1) {\n const item = normalizeListOptions(props.options)[index];\n return item.label;\n }\n }\n return '';\n});\n\nconst inputModel = ref(modelText.value);\n\nwatch(modelText, (v) => {\n inputModel.value = v;\n});\n\nconst placeholderVal = computed(() => {\n if (data.isOpen) {\n if (searchPhrase.value && searchPhrase.value.length >= modelText.value.length - 1) {\n return searchPhrase.value;\n }\n }\n\n return modelText.value || '...';\n});\n\nuseClickOutside(container, () => {\n if (props.mode === 'list') {\n data.isOpen = false;\n }\n});\n\nwatch(\n () => inputModel.value,\n (val) => {\n if (modelText.value !== val) {\n searchPhrase.value = val;\n } else {\n searchPhrase.value = '';\n }\n },\n);\n\nwatch(\n () => data.isOpen,\n (value: boolean) => {\n if (value && container.value) {\n container.value.querySelector('input')?.focus();\n nextTick(() => scrollIntoActive());\n }\n },\n);\n\nwatch(\n () => props.modelValue,\n () => updateSelected(),\n { immediate: true },\n);\n\nfunction getIndexForModelInItems(): number | -1 {\n return props.options.findIndex((o: ListOption) => {\n return deepEqual(o.value, props.modelValue);\n });\n}\n\nfunction updateSelected() {\n data.activeOption = tap(\n options.value.findIndex((o: ListOption) => {\n return deepEqual(o.value, props.modelValue);\n }),\n (v) => (v < 0 ? 0 : v),\n );\n}\n\nfunction resetSearchPhrase() {\n searchPhrase.value = '';\n}\n\nfunction toggleList(): void {\n if (props.disabled) {\n data.isOpen = false;\n } else {\n nextTick(() => {\n data.isOpen = !data.isOpen;\n });\n }\n}\n\nfunction closePopupIfNeeded() {\n if (props.mode === 'list') {\n data.isOpen = false;\n }\n}\n\nfunction selectItem(item?: ListOption): void {\n if (item) {\n emit('update:modelValue', item.value);\n closePopupIfNeeded();\n resetSearchPhrase();\n }\n}\n\nfunction isItemSelected(item: ListOption): boolean {\n return deepEqual(item.value, props.modelValue);\n}\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!container.value?.contains(relatedTarget) && !list.value?.contains(relatedTarget)) {\n searchPhrase.value = '';\n data.isOpen = false;\n }\n};\n\nfunction handleKeydown(e: { code: string; preventDefault(): void }) {\n const { activeOption } = data;\n\n if (!data.isOpen && e.code === 'Enter') {\n data.isOpen = true;\n return;\n }\n\n const { length } = options.value;\n\n if (!length) {\n return;\n }\n\n if (['ArrowDown', 'ArrowUp', 'Enter'].includes(e.code)) {\n e.preventDefault();\n }\n\n if (e.code === 'Enter') {\n selectItem(options.value[activeOption]);\n }\n\n const d = e.code === 'ArrowDown' ? 1 : e.code === 'ArrowUp' ? -1 : 0;\n\n data.activeOption = Math.abs(activeOption + d + length) % length;\n\n requestAnimationFrame(scrollIntoActive);\n}\n\nfunction scrollIntoActive() {\n const $list = list.value;\n if (!$list) {\n return;\n }\n tapIf($list.querySelector('.hovered-item'), (el: Element) => {\n if (props.mode === 'list') {\n scrollIntoView($list, el as HTMLElement);\n } else {\n el.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' });\n }\n });\n}\n\nfunction clearModel() {\n emit('update:modelValue', undefined);\n}\n\nconst optionsStyle = reactive({\n top: '0px',\n left: '0px',\n});\n\nwatch(list, (el) => {\n if (el) {\n const rect = el.getBoundingClientRect();\n data.optionsHeight = rect.height;\n window.dispatchEvent(new CustomEvent('adjust'));\n }\n});\n\nuseElementPosition(container, (pos) => {\n const gap = 2;\n\n const downTopOffset = pos.top + pos.height + gap;\n\n if (downTopOffset + data.optionsHeight > pos.clientHeight) {\n optionsStyle.top = pos.top - data.optionsHeight - gap + 'px';\n } else {\n optionsStyle.top = downTopOffset + 'px';\n }\n\n optionsStyle.left = pos.left + 'px';\n});\n</script>\n\n<template>\n <div\n ref=\"container\"\n tabindex=\"0\"\n :class=\"classes\"\n class=\"pl-line-dropdown uc-pointer\"\n @keydown=\"handleKeydown\"\n @focusout=\"onFocusOut\"\n @click=\"toggleList\"\n >\n <div class=\"pl-line-dropdown__prefix\">{{ props?.prefix }}</div>\n\n <ResizableInput v-model=\"inputModel\" :placeholder=\"placeholderVal\" :disabled=\"props.disabled\" class=\"pl-line-dropdown__input\" />\n\n <div class=\"pl-line-dropdown__icon-wrapper\">\n <div v-show=\"!canShowClearBtn\" class=\"pl-line-dropdown__icon\" />\n <div v-show=\"canShowClearBtn\" class=\"pl-line-dropdown__icon-clear\" @click=\"clearModel\" />\n </div>\n <Teleport v-if=\"data.isOpen\" to=\"body\">\n <div\n v-if=\"props.mode === 'list'\"\n ref=\"list\"\n :style=\"optionsStyle\"\n tabindex=\"-1\"\n class=\"pl-line-dropdown__items\"\n @focusout=\"onFocusOut\"\n @click.stop\n >\n <template v-for=\"(item, index) in options\" :key=\"index\">\n <slot\n name=\"item\"\n :item=\"item\"\n :text-item=\"'text'\"\n :is-selected=\"isItemSelected(item)\"\n :is-hovered=\"data.activeOption == index\"\n @click.stop=\"selectItem(item)\"\n >\n <DropdownListItem\n :option=\"item\"\n :text-item=\"'text'\"\n :is-selected=\"isItemSelected(item)\"\n :is-hovered=\"data.activeOption == index\"\n size=\"medium\"\n @click.stop=\"selectItem(item)\"\n />\n </slot>\n </template>\n\n <div v-if=\"options.length === 0\" class=\"pl-line-dropdown__no-item\">\n <div class=\"pl-line-dropdown__no-item-title text-s\">Didn't find anything that matched</div>\n </div>\n </div>\n <div\n v-else-if=\"props.mode === 'tabs'\"\n ref=\"list\"\n :style=\"optionsStyle\"\n tabindex=\"-1\"\n class=\"pl-line-dropdown__items-tabs\"\n @focusout=\"onFocusOut\"\n @click.stop\n >\n <template v-for=\"(item, index) in options\" :key=\"index\">\n <slot name=\"item\" :item=\"item\" :is-selected=\"isItemSelected(item)\" :is-hovered=\"data.activeOption == index\" @click.stop=\"selectItem(item)\">\n <TabItem :option=\"item\" :is-selected=\"isItemSelected(item)\" :is-hovered=\"data.activeOption == index\" @click.stop=\"selectItem(item)\" />\n </slot>\n </template>\n <div v-if=\"options.length === 0\" class=\"pl-line-dropdown__no-item\">\n <div class=\"pl-line-dropdown__no-item-title text-s\">Didn't find anything that matched</div>\n </div>\n </div>\n </Teleport>\n </div>\n</template>\n"],"names":["emit","__emit","props","__props","data","reactive","container","ref","list","classes","computed","classesResult","searchPhrase","options","useFilteredList","toRef","canShowClearBtn","modelText","index","getIndexForModelInItems","normalizeListOptions","inputModel","watch","v","placeholderVal","useClickOutside","val","value","_a","nextTick","scrollIntoActive","updateSelected","o","deepEqual","tap","resetSearchPhrase","toggleList","closePopupIfNeeded","selectItem","item","isItemSelected","onFocusOut","event","relatedTarget","_b","handleKeydown","activeOption","length","d","$list","tapIf","el","scrollIntoView","clearModel","optionsStyle","rect","useElementPosition","pos","downTopOffset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,UAAMA,IAAOC,GAEPC,IAAQC,GAoBRC,IAAOC,EAAS;AAAA,MACpB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,eAAe;AAAA,IAAA,C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,SAAS;AAE7C,MAAIC,IAAgBtD,EAAK,gBAAgBqD,EAAI,eAC3CH,EAAa,MAAMG,EAAI,MAAMrD,EAAK,gBAAgB,IAAM,OAExDkD,EAAa,MAAMI,IAAgB,MAGxBJ,EAAA,OAAOG,EAAI,OAAO;AAAA,IAAA,CAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,129 +1,74 @@
1
- import { ModelRef, RefOption } from '../../types';
1
+ import { ListOption, RefOption } from '../../types';
2
2
  /**
3
3
  * A component for selecting one value from a list of options
4
4
  */
5
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
6
- /**
7
- * The current selected ref of the dropdown.
8
- */
9
- modelValue: ModelRef | undefined;
10
- /**
11
- * The label text for the dropdown field (optional)
12
- */
13
- label?: string;
14
- /**
15
- * List of available ref options for the dropdown
16
- */
17
- options?: Readonly<RefOption[]>;
18
- /**
19
- * A helper text displayed below the dropdown when there are no errors (optional).
20
- */
21
- helper?: string;
22
- /**
23
- * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).
24
- */
25
- loadingOptionsHelper?: string;
26
- /**
27
- * Error message displayed below the dropdown (optional)
28
- */
29
- error?: unknown;
30
- /**
31
- * Placeholder text shown when no value is selected.
32
- */
33
- placeholder?: string;
34
- /**
35
- * Enables a button to clear the selected value (default: false)
36
- */
37
- clearable?: boolean;
38
- /**
39
- * If `true`, the dropdown component is marked as required.
40
- */
41
- required?: boolean;
42
- /**
43
- * If `true`, the dropdown component is disabled and cannot be interacted with.
44
- */
45
- disabled?: boolean;
46
- /**
47
- * Option list item size
48
- */
49
- optionSize?: "small" | "medium";
50
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
51
- "update:modelValue": (value: Readonly<{
52
- __isRef: true;
53
- blockId: string;
54
- name: string;
55
- requireEnrichments?: true | undefined;
56
- }> | undefined) => any;
57
- }, string, import('vue').PublicProps, Readonly<{
58
- /**
59
- * The current selected ref of the dropdown.
60
- */
61
- modelValue: ModelRef | undefined;
62
- /**
63
- * The label text for the dropdown field (optional)
64
- */
65
- label?: string;
66
- /**
67
- * List of available ref options for the dropdown
68
- */
69
- options?: Readonly<RefOption[]>;
70
- /**
71
- * A helper text displayed below the dropdown when there are no errors (optional).
72
- */
73
- helper?: string;
74
- /**
75
- * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).
76
- */
77
- loadingOptionsHelper?: string;
78
- /**
79
- * Error message displayed below the dropdown (optional)
80
- */
81
- error?: unknown;
82
- /**
83
- * Placeholder text shown when no value is selected.
84
- */
85
- placeholder?: string;
86
- /**
87
- * Enables a button to clear the selected value (default: false)
88
- */
89
- clearable?: boolean;
90
- /**
91
- * If `true`, the dropdown component is marked as required.
92
- */
93
- required?: boolean;
94
- /**
95
- * If `true`, the dropdown component is disabled and cannot be interacted with.
96
- */
97
- disabled?: boolean;
98
- /**
99
- * Option list item size
100
- */
101
- optionSize?: "small" | "medium";
102
- }> & Readonly<{
103
- "onUpdate:modelValue"?: ((value: Readonly<{
104
- __isRef: true;
105
- blockId: string;
106
- name: string;
107
- requireEnrichments?: true | undefined;
108
- }> | undefined) => any) | undefined;
109
- }>, {
110
- options: Readonly<RefOption[]>;
111
- label: string;
112
- error: undefined;
113
- required: boolean;
114
- disabled: boolean;
115
- helper: string;
116
- loadingOptionsHelper: string;
117
- placeholder: string;
118
- clearable: boolean;
119
- optionSize: "small" | "medium";
120
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
121
- tooltip?(_: {}): any;
122
- }>;
123
- export default _default;
124
- type __VLS_WithTemplateSlots<T, S> = T & {
125
- new (): {
126
- $slots: S;
5
+ declare const _default: <M = Readonly<{
6
+ __isRef: true;
7
+ blockId: string;
8
+ name: string;
9
+ requireEnrichments?: true | undefined;
10
+ }>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
11
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
12
+ readonly "onUpdate:modelValue"?: ((value: M | undefined) => any) | undefined;
13
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & {
14
+ /**
15
+ * The current selected ref of the dropdown.
16
+ */
17
+ modelValue: M | undefined;
18
+ /**
19
+ * The label text for the dropdown field (optional)
20
+ */
21
+ label?: string;
22
+ /**
23
+ * List of available ref options for the dropdown
24
+ */
25
+ options?: Readonly<RefOption[] | ListOption<M>[]>;
26
+ /**
27
+ * A helper text displayed below the dropdown when there are no errors (optional).
28
+ */
29
+ helper?: string;
30
+ /**
31
+ * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).
32
+ */
33
+ loadingOptionsHelper?: string;
34
+ /**
35
+ * Error message displayed below the dropdown (optional)
36
+ */
37
+ error?: unknown;
38
+ /**
39
+ * Placeholder text shown when no value is selected.
40
+ */
41
+ placeholder?: string;
42
+ /**
43
+ * Enables a button to clear the selected value (default: false)
44
+ */
45
+ clearable?: boolean;
46
+ /**
47
+ * If `true`, the dropdown component is marked as required.
48
+ */
49
+ required?: boolean;
50
+ /**
51
+ * If `true`, the dropdown component is disabled and cannot be interacted with.
52
+ */
53
+ disabled?: boolean;
54
+ /**
55
+ * Option list item size
56
+ */
57
+ optionSize?: "small" | "medium";
58
+ } & Partial<{}>> & import('vue').PublicProps;
59
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
60
+ attrs: any;
61
+ slots: {
62
+ tooltip?(_: {}): any;
127
63
  };
64
+ emit: (e: "update:modelValue", value: M | undefined) => void;
65
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
66
+ [key: string]: any;
67
+ }> & {
68
+ __ctx?: Awaited<typeof __VLS_setup>;
128
69
  };
70
+ export default _default;
71
+ type __VLS_PrettifyLocal<T> = {
72
+ [K in keyof T]: T[K];
73
+ } & {};
129
74
  //# sourceMappingURL=PlDropdownRef.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlDropdownRef.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlDropdownRef/PlDropdownRef.vue"],"names":[],"mappings":"AAgHA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKvD;;GAEG;;IAcC;;OAEG;gBACS,QAAQ,GAAG,SAAS;IAChC;;OAEG;YACK,MAAM;IACd;;OAEG;cACO,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC/B;;OAEG;aACM,MAAM;IACf;;OAEG;2BACoB,MAAM;IAC7B;;OAEG;YACK,OAAO;IACf;;OAEG;kBACW,MAAM;IACpB;;OAEG;gBACS,OAAO;IACnB;;OAEG;eACQ,OAAO;IAClB;;OAEG;eACQ,OAAO;IAClB;;OAEG;iBACU,OAAO,GAAG,QAAQ;;;;;;;;;IA3C/B;;OAEG;gBACS,QAAQ,GAAG,SAAS;IAChC;;OAEG;YACK,MAAM;IACd;;OAEG;cACO,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC/B;;OAEG;aACM,MAAM;IACf;;OAEG;2BACoB,MAAM;IAC7B;;OAEG;YACK,OAAO;IACf;;OAEG;kBACW,MAAM;IACpB;;OAEG;gBACS,OAAO;IACnB;;OAEG;eACQ,OAAO;IAClB;;OAEG;eACQ,OAAO;IAClB;;OAEG;iBACU,OAAO,GAAG,QAAQ;;;;;;;;;aAhCrB,QAAQ,CAAC,SAAS,EAAE,CAAC;WAJvB,MAAM;;cA4BH,OAAO;cAIP,OAAO;YAxBT,MAAM;0BAIQ,MAAM;iBAQf,MAAM;eAIR,OAAO;gBAYN,OAAO,GAAG,QAAQ;;qBAuFN,GA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