@shtabapp/ui-kit 1.34.0 → 1.36.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 (101) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{SAvatar-C2gekygl.cjs → SAvatar-D5SreJLe.cjs} +1 -1
  3. package/dist/{SAvatar-DAfDAqrP.js → SAvatar-q1HSZPqy.js} +1 -1
  4. package/dist/{SAvatarGroup-HvIlI5y0.js → SAvatarGroup-By-5Ub6i.js} +1 -1
  5. package/dist/{SAvatarGroup-76j-sHCe.cjs → SAvatarGroup-CdVjv8sb.cjs} +1 -1
  6. package/dist/SColorPalette-CqfVzhda.cjs +1 -0
  7. package/dist/SColorPalette-D2WCADDX.js +146 -0
  8. package/dist/SColorPicker-BcRHiLjI.cjs +1 -0
  9. package/dist/{SColorPicker-Cs0QmYWm.js → SColorPicker-BnfGvKy4.js} +215 -208
  10. package/dist/SInput-C07kFnj_.cjs +1 -0
  11. package/dist/{SInput-iNlzBX5m.js → SInput-CkanJfLx.js} +45 -44
  12. package/dist/{SList-C_S9ej45.js → SList-B40rJ-PZ.js} +1 -1
  13. package/dist/{SList-CU2Sy9Md.cjs → SList-Txr46zQ5.cjs} +1 -1
  14. package/dist/SListItem-BKP5Wk1F.cjs +1 -0
  15. package/dist/{SListItem-BD7wvCNe.js → SListItem-DKrpL2SS.js} +56 -56
  16. package/dist/SPhotoEdit-VW9-n1yU.cjs +1 -0
  17. package/dist/SPhotoEdit-bXKHcP3x.js +123 -0
  18. package/dist/SSelect-BPYtkzaw.cjs +1 -0
  19. package/dist/{SSelect-AcH04gtk.js → SSelect-XSZjYLBA.js} +221 -219
  20. package/dist/STab-BbzowB-Y.cjs +1 -0
  21. package/dist/STab-DY1TGadw.js +218 -0
  22. package/dist/{STabs-Ce7tHq8T.js → STabs-CTM8Nji_.js} +1 -1
  23. package/dist/{STabs-C6QQnCZd.cjs → STabs-DeHqnjNJ.cjs} +1 -1
  24. package/dist/{STag-COwzellL.js → STag-CluIVRKi.js} +42 -39
  25. package/dist/STag-D1mmp1kd.cjs +1 -0
  26. package/dist/{STagGroup-CKxDA9Y0.cjs → STagGroup-BMIwBk-O.cjs} +1 -1
  27. package/dist/{STagGroup-Cbe0AENj.js → STagGroup-wSpc3guU.js} +1 -1
  28. package/dist/{colorValue-DXJiNKGE.js → colorValue-CSh0chxp.js} +1 -1
  29. package/dist/{colorValue-DClAEDHr.cjs → colorValue-Dda7fKd3.cjs} +1 -1
  30. package/dist/components/SAvatar/utils/getAvatarInitialsTextColor.d.ts +1 -1
  31. package/dist/components/SAvatar/utils/getAvatarInitialsTextColor.d.ts.map +1 -1
  32. package/dist/components/SColorPalette/SColorPalette.vue.d.ts.map +1 -1
  33. package/dist/components/SColorPicker/SColorPicker.vue.d.ts.map +1 -1
  34. package/dist/components/SColorPicker/parts/SColorArea.vue.d.ts.map +1 -1
  35. package/dist/components/SColorPicker/parts/SColorValues.vue.d.ts.map +1 -1
  36. package/dist/components/SInput/SInput.vue.d.ts.map +1 -1
  37. package/dist/components/SListItem/SListItem.vue.d.ts.map +1 -1
  38. package/dist/components/SPhotoEdit/SPhotoEdit.types.d.ts +27 -0
  39. package/dist/components/SPhotoEdit/SPhotoEdit.types.d.ts.map +1 -0
  40. package/dist/components/SPhotoEdit/SPhotoEdit.vue.d.ts +18 -0
  41. package/dist/components/SPhotoEdit/SPhotoEdit.vue.d.ts.map +1 -0
  42. package/dist/components/SPhotoEdit/index.d.ts +4 -0
  43. package/dist/components/SPhotoEdit/index.d.ts.map +1 -0
  44. package/dist/components/SSelect/SSelect.types.d.ts +13 -1
  45. package/dist/components/SSelect/SSelect.types.d.ts.map +1 -1
  46. package/dist/components/SSelect/SSelect.vue.d.ts.map +1 -1
  47. package/dist/components/SSelect/index.d.ts +1 -1
  48. package/dist/components/SSelect/index.d.ts.map +1 -1
  49. package/dist/components/STab/STab.vue.d.ts.map +1 -1
  50. package/dist/components/STag/STag.vue.d.ts.map +1 -1
  51. package/dist/contrastSurfaceTextColor-BDlLSSXC.js +33 -0
  52. package/dist/contrastSurfaceTextColor-BRjRzXyZ.cjs +1 -0
  53. package/dist/entries/avatar-group.cjs +1 -1
  54. package/dist/entries/avatar-group.js +1 -1
  55. package/dist/entries/avatar.cjs +1 -1
  56. package/dist/entries/avatar.js +1 -1
  57. package/dist/entries/color-palette.cjs +1 -1
  58. package/dist/entries/color-palette.js +2 -2
  59. package/dist/entries/color-picker.cjs +1 -1
  60. package/dist/entries/color-picker.js +3 -3
  61. package/dist/entries/input.cjs +1 -1
  62. package/dist/entries/input.js +1 -1
  63. package/dist/entries/list-item.cjs +1 -1
  64. package/dist/entries/list-item.js +1 -1
  65. package/dist/entries/list.cjs +1 -1
  66. package/dist/entries/list.js +1 -1
  67. package/dist/entries/photo-edit.cjs +1 -0
  68. package/dist/entries/photo-edit.d.ts +4 -0
  69. package/dist/entries/photo-edit.d.ts.map +1 -0
  70. package/dist/entries/photo-edit.js +2 -0
  71. package/dist/entries/select.cjs +1 -1
  72. package/dist/entries/select.d.ts +1 -1
  73. package/dist/entries/select.d.ts.map +1 -1
  74. package/dist/entries/select.js +1 -1
  75. package/dist/entries/tab.cjs +1 -1
  76. package/dist/entries/tab.js +1 -1
  77. package/dist/entries/tabs.cjs +1 -1
  78. package/dist/entries/tabs.js +2 -2
  79. package/dist/entries/tag-group.cjs +1 -1
  80. package/dist/entries/tag-group.js +2 -2
  81. package/dist/entries/tag.cjs +1 -1
  82. package/dist/entries/tag.js +1 -1
  83. package/dist/index.cjs +1 -1
  84. package/dist/index.d.ts +5 -1
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +23 -21
  87. package/dist/uikit-components.css +1 -1
  88. package/dist/utils/color/contrastSurfaceTextColor.d.ts +1 -1
  89. package/dist/utils/color/contrastSurfaceTextColor.d.ts.map +1 -1
  90. package/package.json +11 -3
  91. package/dist/SColorPalette-B9WrqgRz.js +0 -146
  92. package/dist/SColorPalette-CYGnmIWP.cjs +0 -1
  93. package/dist/SColorPicker-D7QwVS2t.cjs +0 -1
  94. package/dist/SInput-DYS84eMS.cjs +0 -1
  95. package/dist/SListItem-BDkldLVt.cjs +0 -1
  96. package/dist/SSelect-CT3AMH-u.cjs +0 -1
  97. package/dist/STab-C8RXx0lW.cjs +0 -1
  98. package/dist/STab-DXGKWtFI.js +0 -218
  99. package/dist/STag-HgFvU1Iy.cjs +0 -1
  100. package/dist/contrastSurfaceTextColor-Dl641cZ_.js +0 -33
  101. package/dist/contrastSurfaceTextColor-Ybh-FZof.cjs +0 -1
@@ -2,11 +2,11 @@ import { n as e, r as t, t as n } from "./SButton.types-CpdHQtyx.js";
2
2
  import { t as r } from "./SButton-DnU_XZ1C.js";
3
3
  import { n as i } from "./useSelectionGroup-cKj38lEN.js";
4
4
  import { t as a } from "./SDropdown-CTQ5Qlez.js";
5
- import { n as o, t as s } from "./SInput-iNlzBX5m.js";
6
- import { i as c, n as l, r as u, t as d } from "./SList-C_S9ej45.js";
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 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";
5
+ import { n as o, t as s } from "./SInput-CkanJfLx.js";
6
+ import { i as c, n as l, r as u, t as d } from "./SList-B40rJ-PZ.js";
7
+ import { t as f } from "./SListItem-DKrpL2SS.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 T, openBlock as E, ref as D, renderSlot as O, toDisplayString as k, toValue as A, unref as j, useId as ie, useModel as ae, useSlots as oe, useTemplateRef as M, vModelText as se, watch as N, withCtx as P, withDirectives as ce, withModifiers as le } from "vue";
9
+ import { SIcon as ue, useUiKitI18n as de } from "@shtabapp/ui-kit-primitives";
10
10
  //#region src/components/SDropdownMenu/SDropdownMenu.vue?vue&type=script&setup=true&lang.ts
11
11
  var fe = {
12
12
  key: 0,
@@ -25,20 +25,20 @@ var fe = {
25
25
  }
26
26
  },
27
27
  setup(e) {
28
- let t = se(), n = (e) => typeof e == "number" ? `${e}px` : e, r = p(() => ({
28
+ let t = oe(), n = (e) => typeof e == "number" ? `${e}px` : e, r = p(() => ({
29
29
  "s-ui-dropdown-menu--accent": e.accent,
30
30
  "s-ui-dropdown-menu--bounded": !!e.maxHeight
31
31
  })), i = p(() => ({ "s-ui-dropdown-menu__body--scrollable": !!e.maxHeight })), a = p(() => ({
32
32
  "--s-ui-dropdown-menu-width": n(e.width),
33
33
  "--s-ui-dropdown-menu-max-height": n(e.maxHeight)
34
34
  }));
35
- return (e, n) => (T(), h("div", {
35
+ return (e, n) => (E(), h("div", {
36
36
  class: C(["s-ui-dropdown-menu", r.value]),
37
- style: ie(a.value)
37
+ style: T(a.value)
38
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)
39
+ j(t).header ? (E(), h("div", fe, [O(e.$slots, "header")])) : m("", !0),
40
+ g("div", { class: C(["s-ui-dropdown-menu__body", i.value]) }, [O(e.$slots, "default")], 2),
41
+ j(t).footer ? (E(), h("div", pe, [O(e.$slots, "footer")])) : m("", !0)
42
42
  ], 6));
43
43
  }
44
44
  }), he = ({ listItemScope: e, itemTitle: t, itemSubtitle: n, itemDisabled: r, itemIconLeft: i, listActiveKey: a, isOptionSelected: o }) => {
@@ -54,55 +54,55 @@ var fe = {
54
54
  revealRight: e.revealRight,
55
55
  tiny: !0
56
56
  };
57
- }, P = (e) => typeof e == "string" || typeof e == "number", F = (e, t) => {
57
+ }, ge = (e) => typeof e == "string" || typeof e == "number", F = (e, t) => {
58
58
  let n = e[t];
59
- if (P(n)) return n;
59
+ if (ge(n)) return n;
60
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
61
  let r = R(e, t, n);
62
62
  if (r) return F(r, n);
63
63
  }, V = /* @__PURE__ */ function(e) {
64
64
  return e.INPUT = "input", e.CONTENT = "content", e;
65
- }({}), ge = (e, t, n) => {
65
+ }({}), _e = (e, t, n) => {
66
66
  if (!e) return !0;
67
67
  let r = e.toLocaleLowerCase(), i = c(t, n.itemTitle)?.toLocaleLowerCase() ?? "", a = I(F(t, n.itemValue) ?? "").toLocaleLowerCase();
68
68
  return i.includes(r) || a.includes(r);
69
- }, H = (e, t, n, r) => {
70
- let i = r ?? ((e, t) => ge(e, t, n));
69
+ }, ve = (e, t, n, r) => {
70
+ let i = r ?? ((e, t) => _e(e, t, n));
71
71
  return t ? e.filter((e) => i(t, e)) : [...e];
72
- }, U = (e) => typeof e == "string" && L(e), W = (e) => typeof e == "number" && L(e), G = (e, t, n) => {
72
+ }, H = (e) => typeof e == "string" && L(e), U = (e) => typeof e == "number" && L(e), ye = (e, t, n) => {
73
73
  if (t) {
74
74
  if (!z(e)) return;
75
75
  let t = F(e, n);
76
- return U(t) || W(t) ? t : void 0;
76
+ return H(t) || U(t) ? t : void 0;
77
77
  }
78
78
  let r = typeof e == "string" || typeof e == "number" ? e : void 0;
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);
79
+ if (H(r) || U(r)) return r;
80
+ }, W = (e, t, n) => e ? (Array.isArray(e) ? e : [e]).flatMap((e) => {
81
+ let r = ye(e, t, n);
82
82
  return L(r) ? [r] : [];
83
- }) : [], ve = (e, t) => {
84
- if (U(t)) {
83
+ }) : [], be = (e, t) => {
84
+ if (H(t)) {
85
85
  e.value = t;
86
86
  return;
87
87
  }
88
- if (W(t)) {
88
+ if (U(t)) {
89
89
  e.value = t;
90
90
  return;
91
91
  }
92
92
  e.value = void 0;
93
- }, ye = (e, t, n) => t.flatMap((t) => {
93
+ }, xe = (e, t, n) => t.flatMap((t) => {
94
94
  let r = I(t), i = e.find((e) => I(F(e, n) ?? "") === r);
95
95
  return i ? [i] : [];
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(() => {
98
- let t = k(n);
99
- return _e(e.value, f.value, t.itemValue);
96
+ }), Se = ({ modelValue: e, options: t, itemFields: n, multiple: r, returnObject: a, searchable: o, filterOption: s, isDropdownOpen: l, searchQuery: u }) => {
97
+ let d = p(() => A(r)), f = p(() => A(a)), ee = p(() => A(o) === V.INPUT), m = p(() => A(o) === V.CONTENT), h = p(() => !!A(o)), g = p(() => {
98
+ let t = A(n);
99
+ return W(e.value, f.value, t.itemValue);
100
100
  }), _ = p(() => {
101
- let e = k(t), r = k(n);
102
- return H(e, h.value ? u.value : "", r, k(s));
101
+ let e = A(t), r = A(n);
102
+ return ve(e, h.value ? u.value : "", r, A(s));
103
103
  }), te = p(() => d.value ? i.MULTIPLE : i.SINGLE), v = (t, n, r) => {
104
104
  if (f.value) {
105
- e.value = ye(n, t, r);
105
+ e.value = xe(n, t, r);
106
106
  return;
107
107
  }
108
108
  e.value = t;
@@ -115,7 +115,7 @@ var fe = {
115
115
  e.value = R(t, n, r) ?? void 0;
116
116
  return;
117
117
  }
118
- ve(e, B(t, n, r));
118
+ be(e, B(t, n, r));
119
119
  }, b = p({
120
120
  get: () => {
121
121
  if (d.value) return g.value.map((e) => I(e));
@@ -123,7 +123,7 @@ var fe = {
123
123
  if (L(e)) return I(e);
124
124
  },
125
125
  set: (e) => {
126
- let r = k(t), i = k(n);
126
+ let r = A(t), i = A(n);
127
127
  if (d.value) {
128
128
  v((Array.isArray(e) ? e : []).map((e) => B(e, r, i.itemValue)).filter((e) => L(e)), r, i.itemValue);
129
129
  return;
@@ -136,21 +136,21 @@ var fe = {
136
136
  }, re = p(() => {
137
137
  let e = g.value[0];
138
138
  if (!L(e)) return "";
139
- let r = k(n), i = x(k(t), e, r.itemValue);
139
+ let r = A(n), i = x(A(t), e, r.itemValue);
140
140
  return i ? c(i, r.itemTitle) ?? "" : I(e);
141
141
  }), S = p(() => {
142
- let e = k(t), r = k(n);
142
+ let e = A(t), r = A(n);
143
143
  return g.value.map((t) => {
144
144
  let n = x(e, t, r.itemValue);
145
145
  return n ? c(n, r.itemTitle) ?? "" : I(t);
146
146
  });
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 = () => {
147
+ }), C = p(() => S.value.join(", ")), w = p(() => d.value ? g.value.length === 0 : !re.value), T = p(() => ee.value && (l.value || d.value)), E = () => {
148
148
  u.value = "";
149
149
  };
150
- return M(l, (e) => {
151
- e || T();
152
- }), M(() => k(o), () => {
153
- T();
150
+ return N(l, (e) => {
151
+ e || E();
152
+ }), N(() => A(o), () => {
153
+ E();
154
154
  }), {
155
155
  searchQuery: u,
156
156
  selectedValues: g,
@@ -162,27 +162,27 @@ var fe = {
162
162
  multipleDisplayLabels: S,
163
163
  multipleDisplayText: C,
164
164
  showPlaceholder: w,
165
- showInputSearchField: ie,
165
+ showInputSearchField: T,
166
166
  isSearchableMode: h,
167
167
  isSearchableInputMode: ee,
168
168
  isSearchableContentMode: m,
169
169
  isMultipleMode: d,
170
170
  isReturnObjectMode: f,
171
171
  clearSelection: () => {
172
- e.value = void 0, T();
172
+ e.value = void 0, E();
173
173
  },
174
174
  removeSelectedValue: (e) => {
175
175
  let r = I(e);
176
- v(g.value.filter((e) => I(e) !== r), k(t), k(n).itemValue);
176
+ v(g.value.filter((e) => I(e) !== r), A(t), A(n).itemValue);
177
177
  },
178
- resetSearchQuery: T,
178
+ resetSearchQuery: E,
179
179
  formatSelectListKey: I,
180
- resolveValueFromListKey: (e) => B(e, k(t), k(n).itemValue)
180
+ resolveValueFromListKey: (e) => B(e, A(t), A(n).itemValue)
181
181
  };
182
- }, xe = {
182
+ }, Ce = {
183
183
  key: 1,
184
184
  class: "s-ui-select__empty s-ui-typography-body-14-regular"
185
- }, Se = [
185
+ }, we = [
186
186
  "id",
187
187
  "aria-expanded",
188
188
  "aria-controls",
@@ -190,27 +190,27 @@ var fe = {
190
190
  "aria-readonly",
191
191
  "aria-autocomplete",
192
192
  "tabindex"
193
- ], Ce = {
193
+ ], Te = {
194
194
  key: 0,
195
195
  class: "s-ui-select__value"
196
- }, we = {
196
+ }, Ee = {
197
197
  key: 1,
198
198
  class: "s-ui-select__placeholder"
199
- }, Te = {
199
+ }, De = {
200
200
  key: 1,
201
201
  class: "s-ui-select__placeholder"
202
- }, Ee = {
202
+ }, Oe = {
203
203
  key: 2,
204
204
  class: "s-ui-select__value"
205
- }, De = {
205
+ }, ke = {
206
206
  key: 3,
207
207
  class: "s-ui-select__value-suffix"
208
- }, Oe = [
208
+ }, Ae = [
209
209
  "name",
210
210
  "placeholder",
211
211
  "disabled",
212
212
  "readonly"
213
- ], ke = 20, Ae = 20, K = /* @__PURE__ */ y({
213
+ ], je = 20, Me = 20, Ne = /* @__PURE__ */ y({
214
214
  inheritAttrs: !1,
215
215
  __name: "SSelect",
216
216
  props: /*@__PURE__*/ x({
@@ -287,212 +287,214 @@ var fe = {
287
287
  "close"
288
288
  ], ["update:modelValue", "update:searchQuery"]),
289
289
  setup(i, { expose: o, emit: c }) {
290
- 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(() => ({
290
+ let l = ae(i, "modelValue"), u = ae(i, "searchQuery"), y = c, { t: x } = de(), T = oe(), A = ie(), fe = ie(), pe = M("triggerInputRef"), ge = D(""), F = M("searchInputElementRef"), I = M("panelSearchInputElementRef"), R = M("listElementRef"), z = D(), B = D(!1), V = D(!1), _e = p(() => i.itemId ?? i.itemValue), ve = p(() => ({
291
291
  itemValue: i.itemValue,
292
292
  itemTitle: i.itemTitle,
293
293
  itemSubtitle: i.itemSubtitle,
294
- itemId: V.value
295
- })), { 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({
294
+ itemId: _e.value
295
+ })), { selectedValues: H, filteredOptions: U, listSelectionMode: ye, listSelectedModel: W, hasSelectedValues: be, singleDisplayLabel: xe, multipleDisplayLabels: Ne, multipleDisplayText: Pe, showPlaceholder: G, showInputSearchField: K, isSearchableMode: Fe, isSearchableInputMode: q, isSearchableContentMode: J, isMultipleMode: Y, clearSelection: Ie, removeSelectedValue: Le, resolveValueFromListKey: Re, formatSelectListKey: ze } = Se({
296
296
  modelValue: l,
297
297
  options: () => i.options,
298
- itemFields: () => ge.value,
298
+ itemFields: () => ve.value,
299
299
  multiple: () => i.multiple,
300
300
  returnObject: () => i.returnObject,
301
301
  searchable: () => i.searchable,
302
302
  filterOption: () => i.filterOption,
303
- isDropdownOpen: z,
303
+ isDropdownOpen: B,
304
304
  searchQuery: u
305
- }), Ie = p(() => !!x["value-suffix"]), Le = p(() => ({
305
+ }), Be = p(() => !!T["value-suffix"]), Ve = p(() => ({
306
306
  disabled: i.disabled,
307
- displayLabel: ve.value
308
- })), Re = p(() => U.value.length > Ae), ze = p(() => X.value || Re.value ? i.listHeight : "auto"), Be = p(() => {
309
- if (!(X.value || Re.value)) return i.listHeight;
310
- }), Ve = p(() => H.value.map((e) => Fe(e))), He = (e) => Ve.value.includes(e), Ue = () => ({ tiny: !0 }), We = (e) => he({
307
+ displayLabel: xe.value
308
+ })), He = p(() => U.value.length > Me), Ue = p(() => J.value || He.value ? i.listHeight : "auto"), We = p(() => {
309
+ if (!(J.value || He.value)) return i.listHeight;
310
+ }), Ge = p(() => H.value.map((e) => ze(e))), Ke = (e) => Ge.value.includes(e), qe = () => ({ tiny: !0 }), Je = (e) => he({
311
311
  listItemScope: e,
312
312
  itemTitle: i.itemTitle,
313
313
  itemSubtitle: i.itemSubtitle,
314
314
  itemDisabled: i.itemDisabled,
315
315
  itemIconLeft: i.itemIconLeft,
316
- listActiveKey: R.value,
317
- isOptionSelected: He(e.key)
318
- }), Ge = (e) => {
319
- let t = Pe(e);
316
+ listActiveKey: z.value,
317
+ isOptionSelected: Ke(e.key)
318
+ }), Ye = (e) => {
319
+ let t = Re(e);
320
320
  if (L(t)) {
321
- if (Z.value) {
322
- Ne(t);
321
+ if (Y.value) {
322
+ Le(t);
323
323
  return;
324
324
  }
325
325
  l.value = void 0;
326
326
  }
327
- }, Ke = p(() => i.id ?? ie), qe = p(() => k), Je = p(() => fe.value?.fieldElementRef ?? null), Ye = p(() => ({
328
- labels: ye.value,
327
+ }, Xe = p(() => i.id ?? A), Ze = p(() => fe), Qe = p(() => pe.value?.fieldElementRef ?? null), $e = p(() => ({
328
+ labels: Ne.value,
329
329
  values: H.value,
330
- displayText: K.value,
330
+ displayText: Pe.value,
331
331
  disabled: i.disabled || i.readonly,
332
- removeValue: Ne
333
- })), Xe = p(() => {
334
- if (!i.disabled && (i.readonly && !Y.value || !Y.value)) return 0;
335
- }), Ze = p(() => ({
332
+ removeValue: Le
333
+ })), et = p(() => {
334
+ if (!i.disabled && (i.readonly && !q.value || !q.value)) return 0;
335
+ }), tt = p(() => ({
336
336
  "s-ui-select--disabled": i.disabled,
337
337
  "s-ui-select--readonly": i.readonly,
338
- "s-ui-select--multiple": Z.value,
339
- "s-ui-select--open": z.value
340
- })), Qe = () => {
341
- if (X.value) {
342
- F.value?.focus();
338
+ "s-ui-select--multiple": Y.value,
339
+ "s-ui-select--open": B.value
340
+ })), nt = () => {
341
+ if (J.value) {
342
+ I.value?.focus();
343
343
  return;
344
344
  }
345
- P.value?.focus();
346
- }, $e = async () => {
347
- await S(), F.value?.focus();
348
- }, et = async () => {
349
- await S(), await I.value?.focusNavigation();
350
- }, Q = async () => {
351
- if (!(i.disabled || i.readonly) && !z.value) {
352
- if (z.value = !0, y("open"), X.value) {
353
- await $e();
345
+ F.value?.focus();
346
+ }, rt = async () => {
347
+ await S(), I.value?.focus();
348
+ }, it = async () => {
349
+ await S(), await R.value?.focusNavigation();
350
+ }, X = async () => {
351
+ if (!(i.disabled || i.readonly) && !B.value) {
352
+ if (B.value = !0, y("open"), J.value) {
353
+ await rt();
354
354
  return;
355
355
  }
356
- if (Y.value) {
357
- await S(), P.value?.focus();
356
+ if (q.value) {
357
+ await S(), F.value?.focus();
358
358
  return;
359
359
  }
360
- await et();
360
+ await it();
361
361
  }
362
- }, tt = async () => {
363
- i.disabled || i.readonly || z.value || await Q();
362
+ }, at = async () => {
363
+ i.disabled || i.readonly || B.value || await X();
364
364
  };
365
- M(u, async (e) => {
366
- Y.value && (i.disabled || i.readonly || e && (z.value || await Q()));
365
+ N(u, async (e) => {
366
+ q.value && (i.disabled || i.readonly || e && (B.value || await X()));
367
367
  });
368
- let $ = () => {
369
- z.value && (z.value = !1, R.value = void 0, y("close"));
370
- }, nt = () => {
371
- !i.closeOnSelect || Z.value || $();
368
+ let Z = () => {
369
+ B.value && (B.value = !1, z.value = void 0, y("close"));
370
+ }, Q = () => {
371
+ !i.closeOnSelect || Y.value || Z();
372
372
  };
373
- M(l, (e, t) => {
374
- !i.closeOnSelect || Z.value || !z.value || !e || e === t || $();
373
+ N(l, (e, t) => {
374
+ !i.closeOnSelect || Y.value || !B.value || !e || e === t || Z();
375
375
  });
376
- let rt = (e) => {
377
- z.value && e.target instanceof Element && e.target.closest(".s-ui-list-item") && nt();
378
- }, it = async (e) => {
379
- e.key !== "Enter" && e.key !== " " && e.key !== "Spacebar" || z.value && (await S(), nt());
380
- }, at = async () => {
381
- if (z.value) {
382
- $();
376
+ let ot = (e) => {
377
+ B.value && e.target instanceof Element && e.target.closest(".s-ui-list-item") && Q();
378
+ }, st = async (e) => {
379
+ e.key !== "Enter" && e.key !== " " && e.key !== "Spacebar" || B.value && (await S(), Q());
380
+ }, $ = async () => {
381
+ if (B.value) {
382
+ Z();
383
383
  return;
384
384
  }
385
- await Q();
386
- }, ot = async (e) => {
385
+ await X();
386
+ }, ct = async (e) => {
387
387
  if (!(i.disabled || i.readonly) && e.target instanceof HTMLElement) {
388
388
  if (e.target.closest(".s-ui-select__search-input")) {
389
- z.value || await Q();
389
+ B.value || await X();
390
390
  return;
391
391
  }
392
- await at();
392
+ await $();
393
393
  }
394
- }, 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) => {
395
- let t = Pe(e);
394
+ }, lt = async (e) => e.key !== "ArrowDown" && e.key !== "ArrowUp" ? !1 : (e.preventDefault(), e.stopPropagation(), B.value || await X(), await it(), await R.value?.handleKeyboardNavigation(e), !0), ut = (e) => {
395
+ let t = Re(e);
396
396
  if (t) {
397
- if (Z.value) {
398
- H.value.some((t) => Fe(t) === e) ? Ne(t) : G.value = [...H.value.map((e) => Fe(e)), e];
397
+ if (Y.value) {
398
+ H.value.some((t) => ze(t) === e) ? Le(t) : W.value = [...H.value.map((e) => ze(e)), e];
399
399
  return;
400
400
  }
401
- G.value = e, nt();
401
+ W.value = e, Q();
402
402
  }
403
- }, lt = async (e) => {
404
- if (!(i.disabled || i.readonly) && !await st(e)) {
403
+ }, dt = async (e) => {
404
+ if (!(i.disabled || i.readonly) && !await lt(e)) {
405
405
  if (e.key === "Escape") {
406
- e.preventDefault(), $();
406
+ e.preventDefault(), Z();
407
407
  return;
408
408
  }
409
409
  if (e.key === "Enter" || e.key === " ") {
410
- if (e.preventDefault(), z.value && R.value) {
411
- ct(R.value);
410
+ if (e.preventDefault(), B.value && z.value) {
411
+ ut(z.value);
412
412
  return;
413
413
  }
414
- await at();
414
+ await $();
415
415
  }
416
416
  }
417
- }, ut = async (e) => {
417
+ }, ft = async (e) => {
418
418
  if (e.key === "Escape") {
419
- e.preventDefault(), $();
419
+ e.preventDefault(), Z();
420
420
  return;
421
421
  }
422
- await st(e);
423
- }, dt = ut, ft = (e) => {
424
- i.disabled || (B.value || y("focus", e), B.value = !0);
425
- }, pt = (e) => {
422
+ await lt(e);
423
+ }, pt = ft, mt = (e) => {
424
+ i.disabled || (V.value || y("focus", e), V.value = !0);
425
+ }, ht = (e) => {
426
426
  if (!(e.currentTarget instanceof HTMLElement)) return;
427
427
  let t = e.relatedTarget;
428
- t instanceof Node && e.currentTarget.contains(t) || (B.value = !1, y("blur", e));
429
- }, mt = () => {
430
- Me(), y("clear");
428
+ t instanceof Node && e.currentTarget.contains(t) || (V.value = !1, y("blur", e));
429
+ }, gt = () => {
430
+ Ie(), y("clear");
431
431
  };
432
432
  return o({
433
- open: Q,
434
- close: $,
435
- toggle: at,
436
- focusSearchInput: Qe
437
- }), (o, c) => (T(), h("div", { class: C(["s-ui-select", Ze.value]) }, [v(A(a), {
438
- modelValue: z.value,
439
- "onUpdate:modelValue": c[4] ||= (e) => z.value = e,
440
- reference: Je.value,
433
+ open: X,
434
+ close: Z,
435
+ toggle: $,
436
+ focusSearchInput: nt
437
+ }), (o, c) => (E(), h("div", { class: C(["s-ui-select", tt.value]) }, [v(j(a), {
438
+ modelValue: B.value,
439
+ "onUpdate:modelValue": c[4] ||= (e) => B.value = e,
440
+ reference: Qe.value,
441
441
  disabled: i.disabled,
442
442
  "match-reference-width": !0,
443
443
  "fit-viewport": i.fitViewport,
444
- "content-id": qe.value,
444
+ "content-id": Ze.value,
445
445
  "dismiss-on-click-outside": !0,
446
446
  "dismiss-on-escape": !0
447
447
  }, {
448
- content: N(() => [v(A(me), {
448
+ content: P(() => [v(j(me), {
449
449
  class: "s-ui-select__menu",
450
450
  width: "100%"
451
451
  }, _({
452
- default: N(() => [g("div", {
452
+ default: P(() => [g("div", {
453
453
  class: "s-ui-select__menu-body",
454
- onClick: rt,
455
- onKeydown: it
456
- }, [A(U).length > 0 ? (T(), ee(A(d), {
454
+ onClick: ot,
455
+ onKeydown: st
456
+ }, [j(U).length > 0 ? (E(), ee(j(d), {
457
457
  key: 0,
458
458
  ref_key: "listElementRef",
459
- ref: I,
460
- modelValue: R.value,
461
- "onUpdate:modelValue": c[2] ||= (e) => R.value = e,
462
- selected: A(G),
463
- "onUpdate:selected": c[3] ||= (e) => ne(G) ? G.value = e : null,
464
- items: A(U),
465
- "item-key": V.value,
459
+ ref: R,
460
+ modelValue: z.value,
461
+ "onUpdate:modelValue": c[2] ||= (e) => z.value = e,
462
+ selected: j(W),
463
+ "onUpdate:selected": c[3] ||= (e) => ne(W) ? W.value = e : null,
464
+ items: j(U),
465
+ "item-key": _e.value,
466
466
  "title-key": i.itemTitle,
467
467
  "subtitle-key": i.itemSubtitle,
468
468
  "icon-left-key": i.itemIconLeft,
469
469
  "disabled-key": i.itemDisabled,
470
- "selection-mode": A(W),
470
+ "selection-mode": j(ye),
471
471
  mandatory: !i.multiple,
472
- height: ze.value,
473
- "max-height": Be.value,
474
- virtual: Re.value,
475
- "item-props": Ue
476
- }, _({ _: 2 }, [A(x).option ? {
472
+ height: Ue.value,
473
+ "max-height": We.value,
474
+ virtual: He.value,
475
+ "item-props": qe
476
+ }, _({ _: 2 }, [j(T).option ? {
477
477
  name: "item",
478
- fn: N((e) => [D(o.$slots, "option", w(b(e)))]),
478
+ fn: P((e) => [O(o.$slots, "option", w(b(e)))]),
479
479
  key: "0"
480
480
  } : i.closableOptions ? {
481
481
  name: "item",
482
- fn: N((i) => [v(A(f), w(b(We(i))), _({ _: 2 }, [He(i.key) ? {
482
+ fn: P((i) => [v(j(f), w(b(Je(i))), _({ _: 2 }, [Ke(i.key) ? {
483
483
  name: "right",
484
- fn: N((a) => [v(A(r), {
485
- appearance: A(n).BARE,
486
- variant: A(t).NEUTRAL,
487
- size: A(e).SMALL,
484
+ fn: P((a) => [v(j(r), {
485
+ appearance: j(n).BARE,
486
+ variant: j(t).NEUTRAL,
487
+ size: j(e).SMALL,
488
488
  icon: "closeMini",
489
+ "aria-label": j(x)("select.removeOption"),
489
490
  disabled: a.disabled || a.readonly,
490
491
  tabindex: -1,
491
- onClick: ue((e) => Ge(i.key), ["stop"])
492
+ onClick: le((e) => Ye(i.key), ["stop"])
492
493
  }, null, 8, [
493
494
  "appearance",
494
495
  "variant",
495
496
  "size",
497
+ "aria-label",
496
498
  "disabled",
497
499
  "onClick"
498
500
  ])]),
@@ -513,21 +515,21 @@ var fe = {
513
515
  "height",
514
516
  "max-height",
515
517
  "virtual"
516
- ])) : (T(), h("div", xe, [D(o.$slots, "empty", {}, () => [c[8] ||= te("No options", -1)])]))], 32)]),
518
+ ])) : (E(), h("div", Ce, [O(o.$slots, "empty", {}, () => [te(k(j(x)("select.noOptions")), 1)])]))], 32)]),
517
519
  _: 2
518
- }, [A(X) ? {
520
+ }, [j(J) ? {
519
521
  name: "header",
520
- fn: N(() => [v(A(s), {
522
+ fn: P(() => [v(j(s), {
521
523
  ref_key: "panelSearchInputElementRef",
522
- ref: F,
524
+ ref: I,
523
525
  modelValue: u.value,
524
526
  "onUpdate:modelValue": c[0] ||= (e) => u.value = e,
525
527
  placeholder: i.searchPlaceholder,
526
528
  disabled: i.disabled,
527
529
  clearable: !1,
528
530
  "icon-left": "search",
529
- onClick: c[1] ||= ue(() => {}, ["stop"]),
530
- onKeydown: A(dt)
531
+ onClick: c[1] ||= le(() => {}, ["stop"]),
532
+ onKeydown: j(pt)
531
533
  }, null, 8, [
532
534
  "modelValue",
533
535
  "placeholder",
@@ -535,9 +537,9 @@ var fe = {
535
537
  "onKeydown"
536
538
  ])]),
537
539
  key: "0"
538
- } : void 0, A(x)["panel-footer"] ? {
540
+ } : void 0, j(T)["panel-footer"] ? {
539
541
  name: "footer",
540
- fn: N(() => [D(o.$slots, "panel-footer")]),
542
+ fn: P(() => [O(o.$slots, "panel-footer")]),
541
543
  key: "1"
542
544
  } : void 0]), 1024)]),
543
545
  _: 3
@@ -547,11 +549,11 @@ var fe = {
547
549
  "disabled",
548
550
  "fit-viewport",
549
551
  "content-id"
550
- ]), v(A(s), {
552
+ ]), v(j(s), {
551
553
  ref_key: "triggerInputRef",
552
- ref: fe,
553
- modelValue: pe.value,
554
- "onUpdate:modelValue": c[7] ||= (e) => pe.value = e,
554
+ ref: pe,
555
+ modelValue: ge.value,
556
+ "onUpdate:modelValue": c[7] ||= (e) => ge.value = e,
555
557
  label: i.label,
556
558
  "label-props": i.labelProps,
557
559
  placeholder: i.placeholder,
@@ -561,40 +563,40 @@ var fe = {
561
563
  disabled: i.disabled,
562
564
  readonly: i.readonly,
563
565
  clearable: i.clearable,
564
- "has-value": A(_e),
565
- focused: B.value || z.value,
566
+ "has-value": j(be),
567
+ focused: V.value || B.value,
566
568
  "icon-left": i.iconLeft,
567
569
  customize: i.customize,
568
570
  name: i.name,
569
- id: Ke.value,
570
- onClear: mt,
571
- onFocus: ft,
572
- onBlur: pt
571
+ id: Xe.value,
572
+ onClear: gt,
573
+ onFocus: mt,
574
+ onBlur: ht
573
575
  }, _({
574
- control: N(() => [g("div", {
575
- id: Ke.value,
576
+ control: P(() => [g("div", {
577
+ id: Xe.value,
576
578
  class: C(["s-ui-select__control s-ui-typography-body-14-regular", {
577
- "s-ui-select__control--multiple": A(Z),
578
- "s-ui-select__control--empty": A(Z) && !A(_e) && !A(J),
579
- "s-ui-select__control--with-value-suffix": Ie.value && !A(Z) && !A(J) && !A(q)
579
+ "s-ui-select__control--multiple": j(Y),
580
+ "s-ui-select__control--empty": j(Y) && !j(be) && !j(K),
581
+ "s-ui-select__control--with-value-suffix": Be.value && !j(Y) && !j(K) && !j(G)
580
582
  }]),
581
583
  role: "combobox",
582
- "aria-expanded": z.value,
583
- "aria-controls": qe.value,
584
+ "aria-expanded": B.value,
585
+ "aria-controls": Ze.value,
584
586
  "aria-haspopup": "listbox",
585
587
  "aria-disabled": i.disabled ? !0 : void 0,
586
588
  "aria-readonly": i.readonly ? !0 : void 0,
587
- "aria-autocomplete": A(je) ? "list" : void 0,
588
- tabindex: Xe.value,
589
- onClick: ot,
590
- onKeydown: lt
589
+ "aria-autocomplete": j(Fe) ? "list" : void 0,
590
+ tabindex: et.value,
591
+ onClick: ct,
592
+ onKeydown: dt
591
593
  }, [
592
- A(Z) ? D(o.$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)),
593
- Ie.value && !A(Z) && !A(J) && !A(q) ? (T(), h("div", De, [D(o.$slots, "value-suffix", w(b(Le.value)))])) : m("", !0),
594
- A(J) ? le((T(), h("input", {
594
+ j(Y) ? O(o.$slots, "selection", w(re({ key: 0 }, $e.value)), () => [j(Pe) ? (E(), h("span", Te, k(j(Pe)), 1)) : j(G) && !j(K) ? (E(), h("span", Ee, k(i.placeholder), 1)) : m("", !0)]) : j(G) && !j(K) ? (E(), h("span", De, k(i.placeholder), 1)) : j(K) ? m("", !0) : (E(), h("span", Oe, k(j(xe)), 1)),
595
+ Be.value && !j(Y) && !j(K) && !j(G) ? (E(), h("div", ke, [O(o.$slots, "value-suffix", w(b(Ve.value)))])) : m("", !0),
596
+ j(K) ? ce((E(), h("input", {
595
597
  key: 4,
596
598
  ref_key: "searchInputElementRef",
597
- ref: P,
599
+ ref: F,
598
600
  "onUpdate:modelValue": c[5] ||= (e) => u.value = e,
599
601
  class: "s-ui-select__search-input",
600
602
  type: "text",
@@ -603,36 +605,36 @@ var fe = {
603
605
  disabled: i.disabled,
604
606
  readonly: i.readonly,
605
607
  autocomplete: "off",
606
- onClick: c[6] ||= ue(() => {}, ["stop"]),
607
- onFocus: tt,
608
- onKeydown: ut
609
- }, null, 40, Oe)), [[ce, u.value]]) : m("", !0)
610
- ], 42, Se)]),
611
- action: N(() => [v(A(de), {
608
+ onClick: c[6] ||= le(() => {}, ["stop"]),
609
+ onFocus: at,
610
+ onKeydown: ft
611
+ }, null, 40, Ae)), [[se, u.value]]) : m("", !0)
612
+ ], 42, we)]),
613
+ action: P(() => [v(j(ue), {
612
614
  name: "chevronMiniDown",
613
- size: ke,
615
+ size: je,
614
616
  class: "s-ui-select__chevron"
615
617
  })]),
616
618
  _: 2
617
619
  }, [
618
- A(x).label ? {
620
+ j(T).label ? {
619
621
  name: "label",
620
- fn: N(() => [D(o.$slots, "label")]),
622
+ fn: P(() => [O(o.$slots, "label")]),
621
623
  key: "0"
622
624
  } : void 0,
623
- A(x).prefix ? {
625
+ j(T).prefix ? {
624
626
  name: "prefix",
625
- fn: N((e) => [D(o.$slots, "prefix", w(b(e)))]),
627
+ fn: P((e) => [O(o.$slots, "prefix", w(b(e)))]),
626
628
  key: "1"
627
629
  } : void 0,
628
- A(x).prepend ? {
630
+ j(T).prepend ? {
629
631
  name: "prepend",
630
- fn: N((e) => [D(o.$slots, "prepend", w(b(e)))]),
632
+ fn: P((e) => [O(o.$slots, "prepend", w(b(e)))]),
631
633
  key: "2"
632
634
  } : void 0,
633
- A(x).message ? {
635
+ j(T).message ? {
634
636
  name: "message",
635
- fn: N(() => [D(o.$slots, "message")]),
637
+ fn: P(() => [O(o.$slots, "message")]),
636
638
  key: "3"
637
639
  } : void 0
638
640
  ]), 1032, [
@@ -656,4 +658,4 @@ var fe = {
656
658
  }
657
659
  });
658
660
  //#endregion
659
- export { V as n, me as r, K as t };
661
+ export { V as n, me as r, Ne as t };