@shtabapp/ui-kit 1.30.0 → 1.32.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 (87) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{SChartHorizontalBar-CCn6L_Du.js → SChartHorizontalBar-DIn1sVoi.js} +1 -1
  3. package/dist/{SChartHorizontalBar-CLXp8bvq.cjs → SChartHorizontalBar-tfgmCHtk.cjs} +1 -1
  4. package/dist/{SChartLegend-CLTLJeRH.cjs → SChartLegend-BFwzIA4x.cjs} +1 -1
  5. package/dist/{SChartLegend-CcbzWNuw.js → SChartLegend-DW16AfUz.js} +1 -1
  6. package/dist/{SChartLine-BaOJ7lmv.js → SChartLine-G5CeC01A.js} +1 -1
  7. package/dist/{SChartLine-C_16iDsx.cjs → SChartLine-xql-HCwK.cjs} +1 -1
  8. package/dist/{SChartPie-qCJdztmc.js → SChartPie-_6ij1EVn.js} +18 -18
  9. package/dist/{SChartPie-BdKc6EbI.cjs → SChartPie-xu1fcWMy.cjs} +1 -1
  10. package/dist/SChartProgress-C08fiO6U.cjs +1 -0
  11. package/dist/SChartProgress-CofVafO6.js +207 -0
  12. package/dist/{SChartSkeletonHost-BnYGg6WN.js → SChartSkeletonHost-CnfMevXX.js} +86 -67
  13. package/dist/SChartSkeletonHost-YmLC5zOX.cjs +1 -0
  14. package/dist/{SChartStackedArea-ByOgW4Mi.cjs → SChartStackedArea-BUy47veO.cjs} +1 -1
  15. package/dist/{SChartStackedArea-B-E5tLfo.js → SChartStackedArea-RKK7aT7x.js} +20 -20
  16. package/dist/{SChartStackedBar-CbOLEjHH.cjs → SChartStackedBar-1HNyHP8J.cjs} +1 -1
  17. package/dist/{SChartStackedBar-DmtysTnY.js → SChartStackedBar-CJunMhyb.js} +23 -23
  18. package/dist/SSelect-CgL7ECfS.cjs +1 -0
  19. package/dist/{SSelect-MzZwivEY.js → SSelect-iBb45tet.js} +254 -220
  20. package/dist/{buildChartSeriesPoints-Cj8ooXn5.js → buildChartSeriesPoints-D-j16fMh.js} +1 -1
  21. package/dist/{buildChartSeriesPoints-DXgWMMZH.cjs → buildChartSeriesPoints-lASMQmBx.cjs} +1 -1
  22. package/dist/components/SChartProgress/SChartProgress.types.d.ts +15 -0
  23. package/dist/components/SChartProgress/SChartProgress.types.d.ts.map +1 -0
  24. package/dist/components/SChartProgress/SChartProgress.vue.d.ts +5 -0
  25. package/dist/components/SChartProgress/SChartProgress.vue.d.ts.map +1 -0
  26. package/dist/components/SChartProgress/index.d.ts +3 -0
  27. package/dist/components/SChartProgress/index.d.ts.map +1 -0
  28. package/dist/components/SChartProgress/utils/buildProgressChartConfig.d.ts +16 -0
  29. package/dist/components/SChartProgress/utils/buildProgressChartConfig.d.ts.map +1 -0
  30. package/dist/components/SChartProgress/utils/buildProgressChartData.d.ts +18 -0
  31. package/dist/components/SChartProgress/utils/buildProgressChartData.d.ts.map +1 -0
  32. package/dist/components/SChartProgress/utils/demoProgressSnapshots.d.ts +5 -0
  33. package/dist/components/SChartProgress/utils/demoProgressSnapshots.d.ts.map +1 -0
  34. package/dist/components/SChartProgress/utils/formatProgressChartDate.d.ts +2 -0
  35. package/dist/components/SChartProgress/utils/formatProgressChartDate.d.ts.map +1 -0
  36. package/dist/components/SChartProgress/utils/productionProgressSnapshots.d.ts +4 -0
  37. package/dist/components/SChartProgress/utils/productionProgressSnapshots.d.ts.map +1 -0
  38. package/dist/components/SChartProgress/utils/resolveProgressChartPointStyle.d.ts +10 -0
  39. package/dist/components/SChartProgress/utils/resolveProgressChartPointStyle.d.ts.map +1 -0
  40. package/dist/components/SChartProgress/utils/skeletonProgressSnapshots.d.ts +6 -0
  41. package/dist/components/SChartProgress/utils/skeletonProgressSnapshots.d.ts.map +1 -0
  42. package/dist/components/SDropdownMenu/SDropdownMenu.types.d.ts +12 -0
  43. package/dist/components/SDropdownMenu/SDropdownMenu.types.d.ts.map +1 -0
  44. package/dist/components/SDropdownMenu/SDropdownMenu.vue.d.ts +16 -0
  45. package/dist/components/SDropdownMenu/SDropdownMenu.vue.d.ts.map +1 -0
  46. package/dist/components/SDropdownMenu/index.d.ts +3 -0
  47. package/dist/components/SDropdownMenu/index.d.ts.map +1 -0
  48. package/dist/components/SSelect/SSelect.vue.d.ts.map +1 -1
  49. package/dist/entries/chart-horizontal-bar.cjs +1 -1
  50. package/dist/entries/chart-horizontal-bar.js +1 -1
  51. package/dist/entries/chart-line.cjs +1 -1
  52. package/dist/entries/chart-line.js +1 -1
  53. package/dist/entries/chart-pie.cjs +1 -1
  54. package/dist/entries/chart-pie.js +1 -1
  55. package/dist/entries/chart-progress.cjs +1 -0
  56. package/dist/entries/chart-progress.d.ts +3 -0
  57. package/dist/entries/chart-progress.d.ts.map +1 -0
  58. package/dist/entries/chart-progress.js +2 -0
  59. package/dist/entries/chart-stacked-area.cjs +1 -1
  60. package/dist/entries/chart-stacked-area.js +1 -1
  61. package/dist/entries/chart-stacked-bar.cjs +1 -1
  62. package/dist/entries/chart-stacked-bar.js +1 -1
  63. package/dist/entries/dropdown-menu.d.ts +3 -0
  64. package/dist/entries/dropdown-menu.d.ts.map +1 -0
  65. package/dist/entries/select.cjs +1 -1
  66. package/dist/entries/select.js +1 -1
  67. package/dist/entries/separator.d.ts +3 -0
  68. package/dist/entries/separator.d.ts.map +1 -0
  69. package/dist/index.cjs +1 -1
  70. package/dist/index.d.ts +4 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +14 -13
  73. package/dist/uikit-components.css +1 -1
  74. package/dist/utils/chart/chart.types.d.ts +4 -0
  75. package/dist/utils/chart/chart.types.d.ts.map +1 -1
  76. package/dist/utils/chart/chartJsAugmentation.d.ts +1 -0
  77. package/dist/utils/chart/chartJsAugmentation.d.ts.map +1 -1
  78. package/dist/utils/chart/core/chartCssVariables.d.ts +2 -0
  79. package/dist/utils/chart/core/chartCssVariables.d.ts.map +1 -1
  80. package/dist/utils/chart/core/chartSkeletonConfig.d.ts +2 -1
  81. package/dist/utils/chart/core/chartSkeletonConfig.d.ts.map +1 -1
  82. package/dist/utils/chart/core/registerChartJs.d.ts.map +1 -1
  83. package/dist/utils/chart/progress/createProgressChartTooltipPositioner.d.ts +4 -0
  84. package/dist/utils/chart/progress/createProgressChartTooltipPositioner.d.ts.map +1 -0
  85. package/package.json +18 -3
  86. package/dist/SChartSkeletonHost-CixHLD65.cjs +0 -1
  87. package/dist/SSelect-CTxBjl2J.cjs +0 -1
@@ -5,10 +5,43 @@ import { n as a, t as o } from "./SInput-iNlzBX5m.js";
5
5
  import { t as s } from "./SDropdown-Cv729__Y.js";
6
6
  import { i as c, n as l, r as u, t as d } from "./SList-C_S9ej45.js";
7
7
  import { t as f } from "./SListItem-BD7wvCNe.js";
8
- import { computed as p, createBlock as ee, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as _, createTextVNode as te, createVNode as v, defineComponent as y, guardReactiveProps as b, isRef as ne, mergeModels as x, mergeProps as re, nextTick as S, normalizeClass as C, normalizeProps as w, normalizeStyle as ie, openBlock as T, ref as E, renderSlot as D, toDisplayString as O, toValue as k, unref as A, useId as ae, useModel as oe, useSlots as se, useTemplateRef as ce, vModelText as le, watch as j, withCtx as M, withDirectives as ue, withModifiers as de } from "vue";
9
- import { SIcon as fe } from "@shtabapp/ui-kit-primitives";
10
- //#region src/components/SSelect/utils/buildSelectListItemProps.ts
11
- var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, itemIconLeft: i, listActiveKey: a, isOptionSelected: o }) => {
8
+ import { computed as p, createBlock as ee, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as _, createTextVNode as te, createVNode as v, defineComponent as y, guardReactiveProps as b, isRef as ne, mergeModels as x, mergeProps as re, nextTick as S, normalizeClass as C, normalizeProps as w, normalizeStyle as ie, openBlock as T, ref as E, renderSlot as D, toDisplayString as O, toValue as k, unref as A, useId as ae, useModel as oe, useSlots as se, useTemplateRef as j, vModelText as ce, watch as M, withCtx as N, withDirectives as le, withModifiers as ue } from "vue";
9
+ import { SIcon as de } from "@shtabapp/ui-kit-primitives";
10
+ //#region src/components/SDropdownMenu/SDropdownMenu.vue?vue&type=script&setup=true&lang.ts
11
+ var fe = {
12
+ key: 0,
13
+ class: "s-ui-dropdown-menu__header"
14
+ }, pe = {
15
+ key: 1,
16
+ class: "s-ui-dropdown-menu__footer"
17
+ }, me = /* @__PURE__ */ y({
18
+ __name: "SDropdownMenu",
19
+ props: {
20
+ width: {},
21
+ maxHeight: {},
22
+ accent: {
23
+ type: Boolean,
24
+ default: !1
25
+ }
26
+ },
27
+ setup(e) {
28
+ let t = se(), n = (e) => typeof e == "number" ? `${e}px` : e, r = p(() => ({
29
+ "s-ui-dropdown-menu--accent": e.accent,
30
+ "s-ui-dropdown-menu--bounded": !!e.maxHeight
31
+ })), i = p(() => ({ "s-ui-dropdown-menu__body--scrollable": !!e.maxHeight })), a = p(() => ({
32
+ "--s-ui-dropdown-menu-width": n(e.width),
33
+ "--s-ui-dropdown-menu-max-height": n(e.maxHeight)
34
+ }));
35
+ return (e, n) => (T(), h("div", {
36
+ class: C(["s-ui-dropdown-menu", r.value]),
37
+ style: ie(a.value)
38
+ }, [
39
+ A(t).header ? (T(), h("div", fe, [D(e.$slots, "header")])) : m("", !0),
40
+ g("div", { class: C(["s-ui-dropdown-menu__body", i.value]) }, [D(e.$slots, "default")], 2),
41
+ A(t).footer ? (T(), h("div", pe, [D(e.$slots, "footer")])) : m("", !0)
42
+ ], 6));
43
+ }
44
+ }), he = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, itemIconLeft: i, listActiveKey: a, isOptionSelected: o }) => {
12
45
  let s = e.item;
13
46
  return {
14
47
  rowKey: e.key,
@@ -21,55 +54,55 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
21
54
  revealRight: e.revealRight,
22
55
  tiny: !0
23
56
  };
24
- }, me = (e) => typeof e == "string" || typeof e == "number", N = (e, t) => {
57
+ }, P = (e) => typeof e == "string" || typeof e == "number", F = (e, t) => {
25
58
  let n = e[t];
26
- if (me(n)) return n;
27
- }, P = (e) => typeof e == "string" ? e : String(e), F = (e) => e == null ? !1 : typeof e == "string" ? e.length > 0 : !0, I = (e, t, n) => t.find((t) => P(N(t, n) ?? "") === e), L = (e) => typeof e == "object" && !!e, R = (e, t, n) => {
28
- let r = I(e, t, n);
29
- if (r) return N(r, n);
30
- }, z = /* @__PURE__ */ function(e) {
59
+ if (P(n)) return n;
60
+ }, I = (e) => typeof e == "string" ? e : String(e), L = (e) => e == null ? !1 : typeof e == "string" ? e.length > 0 : !0, R = (e, t, n) => t.find((t) => I(F(t, n) ?? "") === e), z = (e) => typeof e == "object" && !!e, B = (e, t, n) => {
61
+ let r = R(e, t, n);
62
+ if (r) return F(r, n);
63
+ }, V = /* @__PURE__ */ function(e) {
31
64
  return e.INPUT = "input", e.CONTENT = "content", e;
32
- }({}), B = (e, t, n) => {
65
+ }({}), ge = (e, t, n) => {
33
66
  if (!e) return !0;
34
- let r = e.toLocaleLowerCase(), i = c(t, n.itemTitle)?.toLocaleLowerCase() ?? "", a = P(N(t, n.itemValue) ?? "").toLocaleLowerCase();
67
+ let r = e.toLocaleLowerCase(), i = c(t, n.itemTitle)?.toLocaleLowerCase() ?? "", a = I(F(t, n.itemValue) ?? "").toLocaleLowerCase();
35
68
  return i.includes(r) || a.includes(r);
36
- }, V = (e, t, n, r) => {
37
- let i = r ?? ((e, t) => B(e, t, n));
69
+ }, H = (e, t, n, r) => {
70
+ let i = r ?? ((e, t) => ge(e, t, n));
38
71
  return t ? e.filter((e) => i(t, e)) : [...e];
39
- }, H = (e) => typeof e == "string" && F(e), U = (e) => typeof e == "number" && F(e), W = (e, t, n) => {
72
+ }, U = (e) => typeof e == "string" && L(e), W = (e) => typeof e == "number" && L(e), G = (e, t, n) => {
40
73
  if (t) {
41
- if (!L(e)) return;
42
- let t = N(e, n);
43
- return H(t) || U(t) ? t : void 0;
74
+ if (!z(e)) return;
75
+ let t = F(e, n);
76
+ return U(t) || W(t) ? t : void 0;
44
77
  }
45
78
  let r = typeof e == "string" || typeof e == "number" ? e : void 0;
46
- if (H(r) || U(r)) return r;
47
- }, G = (e, t, n) => e ? (Array.isArray(e) ? e : [e]).flatMap((e) => {
48
- let r = W(e, t, n);
49
- return F(r) ? [r] : [];
50
- }) : [], he = (e, t) => {
51
- if (H(t)) {
79
+ if (U(r) || W(r)) return r;
80
+ }, _e = (e, t, n) => e ? (Array.isArray(e) ? e : [e]).flatMap((e) => {
81
+ let r = G(e, t, n);
82
+ return L(r) ? [r] : [];
83
+ }) : [], ve = (e, t) => {
84
+ if (U(t)) {
52
85
  e.value = t;
53
86
  return;
54
87
  }
55
- if (U(t)) {
88
+ if (W(t)) {
56
89
  e.value = t;
57
90
  return;
58
91
  }
59
92
  e.value = void 0;
60
- }, K = (e, t, n) => t.flatMap((t) => {
61
- let r = P(t), i = e.find((e) => P(N(e, n) ?? "") === r);
93
+ }, ye = (e, t, n) => t.flatMap((t) => {
94
+ let r = I(t), i = e.find((e) => I(F(e, n) ?? "") === r);
62
95
  return i ? [i] : [];
63
- }), ge = ({ modelValue: e, options: t, itemFields: n, multiple: r, returnObject: a, searchable: o, filterOption: s, isDropdownOpen: l, searchQuery: u }) => {
64
- let d = p(() => k(r)), f = p(() => k(a)), ee = p(() => k(o) === z.INPUT), m = p(() => k(o) === z.CONTENT), h = p(() => !!k(o)), g = p(() => {
96
+ }), be = ({ modelValue: e, options: t, itemFields: n, multiple: r, returnObject: a, searchable: o, filterOption: s, isDropdownOpen: l, searchQuery: u }) => {
97
+ let d = p(() => k(r)), f = p(() => k(a)), ee = p(() => k(o) === V.INPUT), m = p(() => k(o) === V.CONTENT), h = p(() => !!k(o)), g = p(() => {
65
98
  let t = k(n);
66
- return G(e.value, f.value, t.itemValue);
99
+ return _e(e.value, f.value, t.itemValue);
67
100
  }), _ = p(() => {
68
101
  let e = k(t), r = k(n);
69
- return V(e, h.value ? u.value : "", r, k(s));
102
+ return H(e, h.value ? u.value : "", r, k(s));
70
103
  }), te = p(() => d.value ? i.MULTIPLE : i.SINGLE), v = (t, n, r) => {
71
104
  if (f.value) {
72
- e.value = K(n, t, r);
105
+ e.value = ye(n, t, r);
73
106
  return;
74
107
  }
75
108
  e.value = t;
@@ -79,44 +112,44 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
79
112
  return;
80
113
  }
81
114
  if (f.value) {
82
- e.value = I(t, n, r) ?? void 0;
115
+ e.value = R(t, n, r) ?? void 0;
83
116
  return;
84
117
  }
85
- he(e, R(t, n, r));
118
+ ve(e, B(t, n, r));
86
119
  }, b = p({
87
120
  get: () => {
88
- if (d.value) return g.value.map((e) => P(e));
121
+ if (d.value) return g.value.map((e) => I(e));
89
122
  let e = g.value[0];
90
- if (F(e)) return P(e);
123
+ if (L(e)) return I(e);
91
124
  },
92
125
  set: (e) => {
93
126
  let r = k(t), i = k(n);
94
127
  if (d.value) {
95
- v((Array.isArray(e) ? e : []).map((e) => R(e, r, i.itemValue)).filter((e) => F(e)), r, i.itemValue);
128
+ v((Array.isArray(e) ? e : []).map((e) => B(e, r, i.itemValue)).filter((e) => L(e)), r, i.itemValue);
96
129
  return;
97
130
  }
98
131
  y(typeof e == "string" ? e : void 0, r, i.itemValue);
99
132
  }
100
133
  }), ne = p(() => g.value.length > 0), x = (e, t, n) => {
101
- let r = P(t);
102
- return e.find((e) => P(N(e, n) ?? "") === r);
134
+ let r = I(t);
135
+ return e.find((e) => I(F(e, n) ?? "") === r);
103
136
  }, re = p(() => {
104
137
  let e = g.value[0];
105
- if (!F(e)) return "";
138
+ if (!L(e)) return "";
106
139
  let r = k(n), i = x(k(t), e, r.itemValue);
107
- return i ? c(i, r.itemTitle) ?? "" : P(e);
140
+ return i ? c(i, r.itemTitle) ?? "" : I(e);
108
141
  }), S = p(() => {
109
142
  let e = k(t), r = k(n);
110
143
  return g.value.map((t) => {
111
144
  let n = x(e, t, r.itemValue);
112
- return n ? c(n, r.itemTitle) ?? "" : P(t);
145
+ return n ? c(n, r.itemTitle) ?? "" : I(t);
113
146
  });
114
147
  }), C = p(() => S.value.join(", ")), w = p(() => d.value ? g.value.length === 0 : !re.value), ie = p(() => ee.value && (l.value || d.value)), T = () => {
115
148
  u.value = "";
116
149
  };
117
- return j(l, (e) => {
150
+ return M(l, (e) => {
118
151
  e || T();
119
- }), j(() => k(o), () => {
152
+ }), M(() => k(o), () => {
120
153
  T();
121
154
  }), {
122
155
  searchQuery: u,
@@ -139,23 +172,17 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
139
172
  e.value = void 0, T();
140
173
  },
141
174
  removeSelectedValue: (e) => {
142
- let r = P(e);
143
- v(g.value.filter((e) => P(e) !== r), k(t), k(n).itemValue);
175
+ let r = I(e);
176
+ v(g.value.filter((e) => I(e) !== r), k(t), k(n).itemValue);
144
177
  },
145
178
  resetSearchQuery: T,
146
- formatSelectListKey: P,
147
- resolveValueFromListKey: (e) => R(e, k(t), k(n).itemValue)
179
+ formatSelectListKey: I,
180
+ resolveValueFromListKey: (e) => B(e, k(t), k(n).itemValue)
148
181
  };
149
- }, _e = {
150
- key: 0,
151
- class: "s-ui-select__panel-search"
152
- }, ve = {
182
+ }, xe = {
153
183
  key: 1,
154
184
  class: "s-ui-select__empty s-ui-typography-body-14-regular"
155
- }, ye = {
156
- key: 1,
157
- class: "s-ui-select__panel-footer"
158
- }, be = [
185
+ }, Se = [
159
186
  "id",
160
187
  "aria-expanded",
161
188
  "aria-controls",
@@ -163,27 +190,27 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
163
190
  "aria-readonly",
164
191
  "aria-autocomplete",
165
192
  "tabindex"
166
- ], xe = {
193
+ ], Ce = {
167
194
  key: 0,
168
195
  class: "s-ui-select__value"
169
- }, Se = {
196
+ }, we = {
170
197
  key: 1,
171
198
  class: "s-ui-select__placeholder"
172
- }, Ce = {
199
+ }, Te = {
173
200
  key: 1,
174
201
  class: "s-ui-select__placeholder"
175
- }, we = {
202
+ }, Ee = {
176
203
  key: 2,
177
204
  class: "s-ui-select__value"
178
- }, Te = {
205
+ }, De = {
179
206
  key: 3,
180
207
  class: "s-ui-select__value-suffix"
181
- }, Ee = [
208
+ }, Oe = [
182
209
  "name",
183
210
  "placeholder",
184
211
  "disabled",
185
212
  "readonly"
186
- ], De = 20, Oe = 20, ke = /* @__PURE__ */ y({
213
+ ], ke = 20, Ae = 20, K = /* @__PURE__ */ y({
187
214
  inheritAttrs: !1,
188
215
  __name: "SSelect",
189
216
  props: /*@__PURE__*/ x({
@@ -256,225 +283,208 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
256
283
  "close"
257
284
  ], ["update:modelValue", "update:searchQuery"]),
258
285
  setup(i, { expose: a, emit: c }) {
259
- let l = oe(i, "modelValue"), u = oe(i, "searchQuery"), y = c, x = se(), k = ae(), me = ae(), N = ce("triggerInputRef"), P = E(""), I = ce("searchInputElementRef"), L = ce("panelSearchInputElementRef"), R = ce("listElementRef"), z = E(), B = E(!1), V = E(!1), H = p(() => i.itemId ?? i.itemValue), U = p(() => ({
286
+ let l = oe(i, "modelValue"), u = oe(i, "searchQuery"), y = c, x = se(), ie = ae(), k = ae(), fe = j("triggerInputRef"), pe = E(""), P = j("searchInputElementRef"), F = j("panelSearchInputElementRef"), I = j("listElementRef"), R = E(), z = E(!1), B = E(!1), V = p(() => i.itemId ?? i.itemValue), ge = p(() => ({
260
287
  itemValue: i.itemValue,
261
288
  itemTitle: i.itemTitle,
262
289
  itemSubtitle: i.itemSubtitle,
263
- itemId: H.value
264
- })), { selectedValues: W, filteredOptions: G, listSelectionMode: he, listSelectedModel: K, hasSelectedValues: ke, singleDisplayLabel: Ae, multipleDisplayLabels: je, multipleDisplayText: Me, showPlaceholder: q, showInputSearchField: J, isSearchableMode: Ne, isSearchableInputMode: Y, isSearchableContentMode: X, isMultipleMode: Z, clearSelection: Pe, removeSelectedValue: Fe, resolveValueFromListKey: Ie, formatSelectListKey: Le } = ge({
290
+ itemId: V.value
291
+ })), { selectedValues: H, filteredOptions: U, listSelectionMode: W, listSelectedModel: G, hasSelectedValues: _e, singleDisplayLabel: ve, multipleDisplayLabels: ye, multipleDisplayText: K, showPlaceholder: q, showInputSearchField: J, isSearchableMode: je, isSearchableInputMode: Y, isSearchableContentMode: X, isMultipleMode: Z, clearSelection: Me, removeSelectedValue: Ne, resolveValueFromListKey: Pe, formatSelectListKey: Fe } = be({
265
292
  modelValue: l,
266
293
  options: () => i.options,
267
- itemFields: () => U.value,
294
+ itemFields: () => ge.value,
268
295
  multiple: () => i.multiple,
269
296
  returnObject: () => i.returnObject,
270
297
  searchable: () => i.searchable,
271
298
  filterOption: () => i.filterOption,
272
- isDropdownOpen: B,
299
+ isDropdownOpen: z,
273
300
  searchQuery: u
274
- }), Re = p(() => !!x["value-suffix"]), ze = p(() => ({
301
+ }), Ie = p(() => !!x["value-suffix"]), Le = p(() => ({
275
302
  disabled: i.disabled,
276
- displayLabel: Ae.value
277
- })), Be = p(() => G.value.length > Oe), Ve = p(() => X.value || Be.value ? i.listHeight : "auto"), He = p(() => ({ "s-ui-select__panel--searchable-content": X.value })), Ue = p(() => {
278
- if (!(X.value || Be.value)) return i.listHeight;
279
- }), We = p(() => W.value.map((e) => Le(e))), Ge = (e) => We.value.includes(e), Ke = () => ({ tiny: !0 }), qe = (e) => pe({
303
+ displayLabel: ve.value
304
+ })), Re = p(() => U.value.length > Ae), ze = p(() => X.value || Re.value ? i.listHeight : "auto"), Be = p(() => {
305
+ if (!(X.value || Re.value)) return i.listHeight;
306
+ }), Ve = p(() => H.value.map((e) => Fe(e))), He = (e) => Ve.value.includes(e), Ue = () => ({ tiny: !0 }), We = (e) => he({
280
307
  listItemScope: e,
281
308
  itemTitle: i.itemTitle,
282
309
  itemSubtitle: i.itemSubtitle,
283
310
  itemDisabled: i.itemDisabled,
284
311
  itemIconLeft: i.itemIconLeft,
285
- listActiveKey: z.value,
286
- isOptionSelected: Ge(e.key)
287
- }), Je = (e) => {
288
- let t = Ie(e);
289
- if (F(t)) {
312
+ listActiveKey: R.value,
313
+ isOptionSelected: He(e.key)
314
+ }), Ge = (e) => {
315
+ let t = Pe(e);
316
+ if (L(t)) {
290
317
  if (Z.value) {
291
- Fe(t);
318
+ Ne(t);
292
319
  return;
293
320
  }
294
321
  l.value = void 0;
295
322
  }
296
- }, Ye = p(() => {
297
- if (X.value) return typeof i.listHeight == "number" ? { maxHeight: `${i.listHeight}px` } : { maxHeight: i.listHeight };
298
- }), Xe = p(() => i.id ?? k), Ze = p(() => me), Qe = p(() => N.value?.fieldElementRef ?? null), $e = p(() => ({
299
- labels: je.value,
300
- values: W.value,
301
- displayText: Me.value,
323
+ }, Ke = p(() => i.id ?? ie), qe = p(() => k), Je = p(() => fe.value?.fieldElementRef ?? null), Ye = p(() => ({
324
+ labels: ye.value,
325
+ values: H.value,
326
+ displayText: K.value,
302
327
  disabled: i.disabled || i.readonly,
303
- removeValue: Fe
304
- })), et = p(() => {
328
+ removeValue: Ne
329
+ })), Xe = p(() => {
305
330
  if (!i.disabled && (i.readonly && !Y.value || !Y.value)) return 0;
306
- }), tt = p(() => ({
331
+ }), Ze = p(() => ({
307
332
  "s-ui-select--disabled": i.disabled,
308
333
  "s-ui-select--readonly": i.readonly,
309
334
  "s-ui-select--multiple": Z.value,
310
- "s-ui-select--open": B.value
311
- })), nt = () => {
335
+ "s-ui-select--open": z.value
336
+ })), Qe = () => {
312
337
  if (X.value) {
313
- L.value?.focus();
338
+ F.value?.focus();
314
339
  return;
315
340
  }
316
- I.value?.focus();
317
- }, rt = async () => {
318
- await S(), L.value?.focus();
319
- }, it = async () => {
320
- await S(), await R.value?.focusNavigation();
341
+ P.value?.focus();
342
+ }, $e = async () => {
343
+ await S(), F.value?.focus();
344
+ }, et = async () => {
345
+ await S(), await I.value?.focusNavigation();
321
346
  }, Q = async () => {
322
- if (!(i.disabled || i.readonly) && !B.value) {
323
- if (B.value = !0, y("open"), X.value) {
324
- await rt();
347
+ if (!(i.disabled || i.readonly) && !z.value) {
348
+ if (z.value = !0, y("open"), X.value) {
349
+ await $e();
325
350
  return;
326
351
  }
327
352
  if (Y.value) {
328
- await S(), I.value?.focus();
353
+ await S(), P.value?.focus();
329
354
  return;
330
355
  }
331
- await it();
356
+ await et();
332
357
  }
333
- }, at = async () => {
334
- i.disabled || i.readonly || B.value || await Q();
358
+ }, tt = async () => {
359
+ i.disabled || i.readonly || z.value || await Q();
335
360
  };
336
- j(u, async (e) => {
337
- Y.value && (i.disabled || i.readonly || e && (B.value || await Q()));
361
+ M(u, async (e) => {
362
+ Y.value && (i.disabled || i.readonly || e && (z.value || await Q()));
338
363
  });
339
364
  let $ = () => {
340
- B.value && (B.value = !1, z.value = void 0, y("close"));
341
- }, ot = () => {
365
+ z.value && (z.value = !1, R.value = void 0, y("close"));
366
+ }, nt = () => {
342
367
  !i.closeOnSelect || Z.value || $();
343
368
  };
344
- j(l, (e, t) => {
345
- !i.closeOnSelect || Z.value || !B.value || !e || e === t || $();
369
+ M(l, (e, t) => {
370
+ !i.closeOnSelect || Z.value || !z.value || !e || e === t || $();
346
371
  });
347
- let st = (e) => {
348
- B.value && e.target instanceof Element && e.target.closest(".s-ui-list-item") && ot();
349
- }, ct = async (e) => {
350
- e.key !== "Enter" && e.key !== " " && e.key !== "Spacebar" || B.value && (await S(), ot());
351
- }, lt = async () => {
352
- if (B.value) {
372
+ let rt = (e) => {
373
+ z.value && e.target instanceof Element && e.target.closest(".s-ui-list-item") && nt();
374
+ }, it = async (e) => {
375
+ e.key !== "Enter" && e.key !== " " && e.key !== "Spacebar" || z.value && (await S(), nt());
376
+ }, at = async () => {
377
+ if (z.value) {
353
378
  $();
354
379
  return;
355
380
  }
356
381
  await Q();
357
- }, ut = async (e) => {
382
+ }, ot = async (e) => {
358
383
  if (!(i.disabled || i.readonly) && e.target instanceof HTMLElement) {
359
384
  if (e.target.closest(".s-ui-select__search-input")) {
360
- B.value || await Q();
385
+ z.value || await Q();
361
386
  return;
362
387
  }
363
- await lt();
388
+ await at();
364
389
  }
365
- }, dt = async (e) => e.key !== "ArrowDown" && e.key !== "ArrowUp" ? !1 : (e.preventDefault(), e.stopPropagation(), B.value || await Q(), await it(), await R.value?.handleKeyboardNavigation(e), !0), ft = (e) => {
366
- let t = Ie(e);
390
+ }, st = async (e) => e.key !== "ArrowDown" && e.key !== "ArrowUp" ? !1 : (e.preventDefault(), e.stopPropagation(), z.value || await Q(), await et(), await I.value?.handleKeyboardNavigation(e), !0), ct = (e) => {
391
+ let t = Pe(e);
367
392
  if (t) {
368
393
  if (Z.value) {
369
- W.value.some((t) => Le(t) === e) ? Fe(t) : K.value = [...W.value.map((e) => Le(e)), e];
394
+ H.value.some((t) => Fe(t) === e) ? Ne(t) : G.value = [...H.value.map((e) => Fe(e)), e];
370
395
  return;
371
396
  }
372
- K.value = e, ot();
397
+ G.value = e, nt();
373
398
  }
374
- }, pt = async (e) => {
375
- if (!(i.disabled || i.readonly) && !await dt(e)) {
399
+ }, lt = async (e) => {
400
+ if (!(i.disabled || i.readonly) && !await st(e)) {
376
401
  if (e.key === "Escape") {
377
402
  e.preventDefault(), $();
378
403
  return;
379
404
  }
380
405
  if (e.key === "Enter" || e.key === " ") {
381
- if (e.preventDefault(), B.value && z.value) {
382
- ft(z.value);
406
+ if (e.preventDefault(), z.value && R.value) {
407
+ ct(R.value);
383
408
  return;
384
409
  }
385
- await lt();
410
+ await at();
386
411
  }
387
412
  }
388
- }, mt = async (e) => {
413
+ }, ut = async (e) => {
389
414
  if (e.key === "Escape") {
390
415
  e.preventDefault(), $();
391
416
  return;
392
417
  }
393
- await dt(e);
394
- }, ht = mt, gt = (e) => {
395
- i.disabled || (V.value || y("focus", e), V.value = !0);
396
- }, _t = (e) => {
418
+ await st(e);
419
+ }, dt = ut, ft = (e) => {
420
+ i.disabled || (B.value || y("focus", e), B.value = !0);
421
+ }, pt = (e) => {
397
422
  if (!(e.currentTarget instanceof HTMLElement)) return;
398
423
  let t = e.relatedTarget;
399
- t instanceof Node && e.currentTarget.contains(t) || (V.value = !1, y("blur", e));
400
- }, vt = () => {
401
- Pe(), y("clear");
424
+ t instanceof Node && e.currentTarget.contains(t) || (B.value = !1, y("blur", e));
425
+ }, mt = () => {
426
+ Me(), y("clear");
402
427
  };
403
428
  return a({
404
429
  open: Q,
405
430
  close: $,
406
- toggle: lt,
407
- focusSearchInput: nt
408
- }), (a, c) => (T(), h("div", { class: C(["s-ui-select", tt.value]) }, [v(A(s), {
409
- modelValue: B.value,
410
- "onUpdate:modelValue": c[4] ||= (e) => B.value = e,
411
- reference: Qe.value,
431
+ toggle: at,
432
+ focusSearchInput: Qe
433
+ }), (a, c) => (T(), h("div", { class: C(["s-ui-select", Ze.value]) }, [v(A(s), {
434
+ modelValue: z.value,
435
+ "onUpdate:modelValue": c[4] ||= (e) => z.value = e,
436
+ reference: Je.value,
412
437
  disabled: i.disabled,
413
438
  "match-reference-width": !0,
414
439
  "fit-viewport": !0,
415
- "content-id": Ze.value,
440
+ "content-id": qe.value,
416
441
  "dismiss-on-click-outside": !0,
417
442
  "dismiss-on-escape": !0
418
443
  }, {
419
- content: M(() => [g("div", { class: C(["s-ui-select__panel", He.value]) }, [
420
- A(X) ? (T(), h("div", _e, [v(A(o), {
421
- ref_key: "panelSearchInputElementRef",
422
- ref: L,
423
- modelValue: u.value,
424
- "onUpdate:modelValue": c[0] ||= (e) => u.value = e,
425
- placeholder: i.searchPlaceholder,
426
- disabled: i.disabled,
427
- clearable: !1,
428
- "icon-left": "search",
429
- onClick: c[1] ||= de(() => {}, ["stop"]),
430
- onKeydown: A(ht)
431
- }, null, 8, [
432
- "modelValue",
433
- "placeholder",
434
- "disabled",
435
- "onKeydown"
436
- ])])) : m("", !0),
437
- g("div", {
438
- class: "s-ui-select__panel-body",
439
- style: ie(Ye.value),
440
- onClick: st,
441
- onKeydown: ct
442
- }, [A(G).length > 0 ? (T(), ee(A(d), {
444
+ content: N(() => [v(A(me), {
445
+ class: "s-ui-select__menu",
446
+ width: "100%"
447
+ }, _({
448
+ default: N(() => [g("div", {
449
+ class: "s-ui-select__menu-body",
450
+ onClick: rt,
451
+ onKeydown: it
452
+ }, [A(U).length > 0 ? (T(), ee(A(d), {
443
453
  key: 0,
444
454
  ref_key: "listElementRef",
445
- ref: R,
446
- modelValue: z.value,
447
- "onUpdate:modelValue": c[2] ||= (e) => z.value = e,
448
- selected: A(K),
449
- "onUpdate:selected": c[3] ||= (e) => ne(K) ? K.value = e : null,
450
- items: A(G),
451
- "item-key": H.value,
455
+ ref: I,
456
+ modelValue: R.value,
457
+ "onUpdate:modelValue": c[2] ||= (e) => R.value = e,
458
+ selected: A(G),
459
+ "onUpdate:selected": c[3] ||= (e) => ne(G) ? G.value = e : null,
460
+ items: A(U),
461
+ "item-key": V.value,
452
462
  "title-key": i.itemTitle,
453
463
  "subtitle-key": i.itemSubtitle,
454
464
  "icon-left-key": i.itemIconLeft,
455
465
  "disabled-key": i.itemDisabled,
456
- "selection-mode": A(he),
466
+ "selection-mode": A(W),
457
467
  mandatory: !i.multiple,
458
- height: Ve.value,
459
- "max-height": Ue.value,
460
- virtual: Be.value,
461
- "item-props": Ke
468
+ height: ze.value,
469
+ "max-height": Be.value,
470
+ virtual: Re.value,
471
+ "item-props": Ue
462
472
  }, _({ _: 2 }, [A(x).option ? {
463
473
  name: "item",
464
- fn: M((e) => [D(a.$slots, "option", w(b(e)))]),
474
+ fn: N((e) => [D(a.$slots, "option", w(b(e)))]),
465
475
  key: "0"
466
476
  } : i.closableOptions ? {
467
477
  name: "item",
468
- fn: M((i) => [v(A(f), w(b(qe(i))), _({ _: 2 }, [Ge(i.key) ? {
478
+ fn: N((i) => [v(A(f), w(b(We(i))), _({ _: 2 }, [He(i.key) ? {
469
479
  name: "right",
470
- fn: M((a) => [v(A(r), {
480
+ fn: N((a) => [v(A(r), {
471
481
  appearance: A(n).BARE,
472
482
  variant: A(t).NEUTRAL,
473
483
  size: A(e).SMALL,
474
484
  icon: "closeMini",
475
485
  disabled: a.disabled || a.readonly,
476
486
  tabindex: -1,
477
- onClick: de((e) => Je(i.key), ["stop"])
487
+ onClick: ue((e) => Ge(i.key), ["stop"])
478
488
  }, null, 8, [
479
489
  "appearance",
480
490
  "variant",
@@ -499,9 +509,33 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
499
509
  "height",
500
510
  "max-height",
501
511
  "virtual"
502
- ])) : (T(), h("div", ve, [D(a.$slots, "empty", {}, () => [c[8] ||= te("No options", -1)])]))], 36),
503
- A(x)["panel-footer"] ? (T(), h("div", ye, [D(a.$slots, "panel-footer")])) : m("", !0)
504
- ], 2)]),
512
+ ])) : (T(), h("div", xe, [D(a.$slots, "empty", {}, () => [c[8] ||= te("No options", -1)])]))], 32)]),
513
+ _: 2
514
+ }, [A(X) ? {
515
+ name: "header",
516
+ fn: N(() => [v(A(o), {
517
+ ref_key: "panelSearchInputElementRef",
518
+ ref: F,
519
+ modelValue: u.value,
520
+ "onUpdate:modelValue": c[0] ||= (e) => u.value = e,
521
+ placeholder: i.searchPlaceholder,
522
+ disabled: i.disabled,
523
+ clearable: !1,
524
+ "icon-left": "search",
525
+ onClick: c[1] ||= ue(() => {}, ["stop"]),
526
+ onKeydown: A(dt)
527
+ }, null, 8, [
528
+ "modelValue",
529
+ "placeholder",
530
+ "disabled",
531
+ "onKeydown"
532
+ ])]),
533
+ key: "0"
534
+ } : void 0, A(x)["panel-footer"] ? {
535
+ name: "footer",
536
+ fn: N(() => [D(a.$slots, "panel-footer")]),
537
+ key: "1"
538
+ } : void 0]), 1024)]),
505
539
  _: 3
506
540
  }, 8, [
507
541
  "modelValue",
@@ -510,9 +544,9 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
510
544
  "content-id"
511
545
  ]), v(A(o), {
512
546
  ref_key: "triggerInputRef",
513
- ref: N,
514
- modelValue: P.value,
515
- "onUpdate:modelValue": c[7] ||= (e) => P.value = e,
547
+ ref: fe,
548
+ modelValue: pe.value,
549
+ "onUpdate:modelValue": c[7] ||= (e) => pe.value = e,
516
550
  label: i.label,
517
551
  "label-props": i.labelProps,
518
552
  placeholder: i.placeholder,
@@ -522,40 +556,40 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
522
556
  disabled: i.disabled,
523
557
  readonly: i.readonly,
524
558
  clearable: i.clearable,
525
- "has-value": A(ke),
526
- focused: V.value || B.value,
559
+ "has-value": A(_e),
560
+ focused: B.value || z.value,
527
561
  "icon-left": i.iconLeft,
528
562
  customize: i.customize,
529
563
  name: i.name,
530
- id: Xe.value,
531
- onClear: vt,
532
- onFocus: gt,
533
- onBlur: _t
564
+ id: Ke.value,
565
+ onClear: mt,
566
+ onFocus: ft,
567
+ onBlur: pt
534
568
  }, _({
535
- control: M(() => [g("div", {
536
- id: Xe.value,
569
+ control: N(() => [g("div", {
570
+ id: Ke.value,
537
571
  class: C(["s-ui-select__control s-ui-typography-body-14-regular", {
538
572
  "s-ui-select__control--multiple": A(Z),
539
- "s-ui-select__control--empty": A(Z) && !A(ke) && !A(J),
540
- "s-ui-select__control--with-value-suffix": Re.value && !A(Z) && !A(J) && !A(q)
573
+ "s-ui-select__control--empty": A(Z) && !A(_e) && !A(J),
574
+ "s-ui-select__control--with-value-suffix": Ie.value && !A(Z) && !A(J) && !A(q)
541
575
  }]),
542
576
  role: "combobox",
543
- "aria-expanded": B.value,
544
- "aria-controls": Ze.value,
577
+ "aria-expanded": z.value,
578
+ "aria-controls": qe.value,
545
579
  "aria-haspopup": "listbox",
546
580
  "aria-disabled": i.disabled ? !0 : void 0,
547
581
  "aria-readonly": i.readonly ? !0 : void 0,
548
- "aria-autocomplete": A(Ne) ? "list" : void 0,
549
- tabindex: et.value,
550
- onClick: ut,
551
- onKeydown: pt
582
+ "aria-autocomplete": A(je) ? "list" : void 0,
583
+ tabindex: Xe.value,
584
+ onClick: ot,
585
+ onKeydown: lt
552
586
  }, [
553
- A(Z) ? D(a.$slots, "selection", w(re({ key: 0 }, $e.value)), () => [A(Me) ? (T(), h("span", xe, O(A(Me)), 1)) : A(q) && !A(J) ? (T(), h("span", Se, O(i.placeholder), 1)) : m("", !0)]) : A(q) && !A(J) ? (T(), h("span", Ce, O(i.placeholder), 1)) : A(J) ? m("", !0) : (T(), h("span", we, O(A(Ae)), 1)),
554
- Re.value && !A(Z) && !A(J) && !A(q) ? (T(), h("div", Te, [D(a.$slots, "value-suffix", w(b(ze.value)))])) : m("", !0),
555
- A(J) ? ue((T(), h("input", {
587
+ A(Z) ? D(a.$slots, "selection", w(re({ key: 0 }, Ye.value)), () => [A(K) ? (T(), h("span", Ce, O(A(K)), 1)) : A(q) && !A(J) ? (T(), h("span", we, O(i.placeholder), 1)) : m("", !0)]) : A(q) && !A(J) ? (T(), h("span", Te, O(i.placeholder), 1)) : A(J) ? m("", !0) : (T(), h("span", Ee, O(A(ve)), 1)),
588
+ Ie.value && !A(Z) && !A(J) && !A(q) ? (T(), h("div", De, [D(a.$slots, "value-suffix", w(b(Le.value)))])) : m("", !0),
589
+ A(J) ? le((T(), h("input", {
556
590
  key: 4,
557
591
  ref_key: "searchInputElementRef",
558
- ref: I,
592
+ ref: P,
559
593
  "onUpdate:modelValue": c[5] ||= (e) => u.value = e,
560
594
  class: "s-ui-select__search-input",
561
595
  type: "text",
@@ -564,36 +598,36 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
564
598
  disabled: i.disabled,
565
599
  readonly: i.readonly,
566
600
  autocomplete: "off",
567
- onClick: c[6] ||= de(() => {}, ["stop"]),
568
- onFocus: at,
569
- onKeydown: mt
570
- }, null, 40, Ee)), [[le, u.value]]) : m("", !0)
571
- ], 42, be)]),
572
- action: M(() => [v(A(fe), {
601
+ onClick: c[6] ||= ue(() => {}, ["stop"]),
602
+ onFocus: tt,
603
+ onKeydown: ut
604
+ }, null, 40, Oe)), [[ce, u.value]]) : m("", !0)
605
+ ], 42, Se)]),
606
+ action: N(() => [v(A(de), {
573
607
  name: "chevronMiniDown",
574
- size: De,
608
+ size: ke,
575
609
  class: "s-ui-select__chevron"
576
610
  })]),
577
611
  _: 2
578
612
  }, [
579
613
  A(x).label ? {
580
614
  name: "label",
581
- fn: M(() => [D(a.$slots, "label")]),
615
+ fn: N(() => [D(a.$slots, "label")]),
582
616
  key: "0"
583
617
  } : void 0,
584
618
  A(x).prefix ? {
585
619
  name: "prefix",
586
- fn: M((e) => [D(a.$slots, "prefix", w(b(e)))]),
620
+ fn: N((e) => [D(a.$slots, "prefix", w(b(e)))]),
587
621
  key: "1"
588
622
  } : void 0,
589
623
  A(x).prepend ? {
590
624
  name: "prepend",
591
- fn: M((e) => [D(a.$slots, "prepend", w(b(e)))]),
625
+ fn: N((e) => [D(a.$slots, "prepend", w(b(e)))]),
592
626
  key: "2"
593
627
  } : void 0,
594
628
  A(x).message ? {
595
629
  name: "message",
596
- fn: M(() => [D(a.$slots, "message")]),
630
+ fn: N(() => [D(a.$slots, "message")]),
597
631
  key: "3"
598
632
  } : void 0
599
633
  ]), 1032, [
@@ -617,4 +651,4 @@ var pe = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, it
617
651
  }
618
652
  });
619
653
  //#endregion
620
- export { z as n, ke as t };
654
+ export { V as n, me as r, K as t };