@profitliga/ui 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BottomSheet/BottomSheet.css +1 -1
- package/dist/components/BottomSheet/BottomSheet.vue.js +1 -1
- package/dist/components/BottomSheet/BottomSheet.vue2.js +56 -56
- package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
- package/dist/components/Drawer/Drawer.vue.js +4 -4
- package/dist/components/RangeCalendar/RangeCalendar.css +1 -1
- package/dist/components/RangeCalendar/RangeCalendar.vue.js +2 -2
- package/dist/components/RangeCalendar/RangeCalendar.vue2.js +42 -42
- package/dist/components/v2/Checkbox/Checkbox.css +1 -1
- package/dist/components/v2/Checkbox/Checkbox.vue.js +2 -2
- package/dist/components/v2/Checkbox/Checkbox.vue2.js +26 -26
- package/dist/components/v2/Combobox/Combobox.css +1 -1
- package/dist/components/v2/Combobox/Combobox.types.d.ts +49 -3
- package/dist/components/v2/Combobox/Combobox.vue.d.ts +23 -52
- package/dist/components/v2/Combobox/Combobox.vue.js +2 -2
- package/dist/components/v2/Combobox/Combobox.vue2.js +219 -193
- package/dist/components/v2/DatePicker/DatePicker.vue.d.ts +2 -2
- package/dist/components/v2/Divider/Divider.css +1 -1
- package/dist/components/v2/Divider/Divider.vue.js +1 -1
- package/dist/components/v2/Divider/Divider.vue2.js +10 -10
- package/dist/components/v2/DropdownMenu/DropdownMenu.vue.d.ts +2 -2
- package/dist/components/v2/File/FilePreviewDialog.vue.d.ts +1 -1
- package/dist/components/v2/FileUpload/FileUpload.vue.d.ts +1 -1
- package/dist/components/v2/FileUpload/FileUploadInline.vue.d.ts +1 -1
- package/dist/components/v2/InputNumber/InputNumber.css +1 -1
- package/dist/components/v2/InputNumber/InputNumber.vue.js +2 -2
- package/dist/components/v2/InputNumber/InputNumber.vue2.js +2 -2
- package/dist/components/v2/InputSelect/InputSelect.vue.d.ts +1 -1
- package/dist/components/v2/Popover/Popover.vue.d.ts +1 -1
- package/dist/components/v2/Select/Select.css +1 -1
- package/dist/components/v2/Select/Select.types.d.ts +50 -3
- package/dist/components/v2/Select/Select.vue.d.ts +20 -40
- package/dist/components/v2/Select/Select.vue.js +1 -1
- package/dist/components/v2/Select/Select.vue2.js +187 -164
- package/dist/components/v2/Tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/v2/Tooltip/TooltipContent.vue.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CircleX as
|
|
1
|
+
import { defineComponent as Re, useModel as we, useId as xe, useAttrs as Ce, computed as u, ref as E, useTemplateRef as _, onMounted as Ae, nextTick as L, onBeforeUnmount as Ie, watch as T, openBlock as r, createElementBlock as o, mergeProps as f, unref as c, toDisplayString as v, createCommentVNode as R, createElementVNode as g, createVNode as V, withCtx as X, Fragment as ie, renderList as ne, createBlock as U, renderSlot as N, createTextVNode as j, resolveDynamicComponent as Me, withModifiers as Se, mergeModels as re } from "vue";
|
|
2
|
+
import { CircleX as $e, ChevronDown as Ee } from "@lucide/vue";
|
|
3
3
|
import Te from "../Popover/Popover.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import Ve from "../Radio/RadioMarker.vue.js";
|
|
5
5
|
import { useTestId as Ne } from "../shared/useTestId.util.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
6
|
+
import Be from "../shared/VisuallyHidden.vue.js";
|
|
7
|
+
import De from "./SelectCheckMarker.vue.js";
|
|
8
|
+
const Fe = ["disabled", "aria-labelledby", "aria-label", "aria-describedby"], Oe = ["aria-label", "aria-multiselectable", "aria-activedescendant"], Ge = ["id", "aria-selected", "aria-disabled", "onClick", "onMouseenter"], We = { class: "select-list__label" }, ze = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "select-list__empty"
|
|
11
|
-
},
|
|
11
|
+
}, Le = ["aria-hidden"], Xe = ["src"], Ue = { class: "select__chip-label" }, je = ["disabled", "tabindex", "aria-label", "onClick"], qe = ["aria-hidden"], He = {
|
|
12
12
|
key: 3,
|
|
13
13
|
class: "select__placeholder"
|
|
14
|
-
},
|
|
14
|
+
}, Ke = "Нет вариантов", lt = /* @__PURE__ */ Re({
|
|
15
15
|
inheritAttrs: !1,
|
|
16
16
|
__name: "Select",
|
|
17
|
-
props: /* @__PURE__ */
|
|
17
|
+
props: /* @__PURE__ */ re({
|
|
18
18
|
options: {},
|
|
19
19
|
multiple: { type: Boolean, default: !1 },
|
|
20
20
|
label: { default: void 0 },
|
|
@@ -38,28 +38,28 @@ const De = ["disabled", "aria-labelledby", "aria-label", "aria-describedby"], Fe
|
|
|
38
38
|
},
|
|
39
39
|
modelModifiers: {}
|
|
40
40
|
}),
|
|
41
|
-
emits: /* @__PURE__ */
|
|
42
|
-
setup(a, { emit:
|
|
43
|
-
const s = a,
|
|
44
|
-
class:
|
|
45
|
-
style:
|
|
46
|
-
})),
|
|
47
|
-
const { class: e, style: l, ...t } =
|
|
41
|
+
emits: /* @__PURE__ */ re(["change", "select"], ["update:modelValue"]),
|
|
42
|
+
setup(a, { emit: ce }) {
|
|
43
|
+
const s = a, w = ce, x = we(a, "modelValue"), C = xe(), q = `select-trigger-${C}`, H = `select-label-${C}`, A = `select-list-${C}`, K = `select-message-${C}`, d = Ne(() => s.testId), B = Ce(), oe = u(() => ({
|
|
44
|
+
class: B.class,
|
|
45
|
+
style: B.style
|
|
46
|
+
})), ue = u(() => {
|
|
47
|
+
const { class: e, style: l, ...t } = B;
|
|
48
48
|
return t;
|
|
49
|
-
}), b =
|
|
50
|
-
const e =
|
|
49
|
+
}), b = E(!1), P = _("fieldRef"), D = _("listRef"), I = _("contentRef"), J = _("chipsRef"), Q = _("counterRef"), m = E(Number.MAX_SAFE_INTEGER), F = E(0), n = E(-1), y = u(() => {
|
|
50
|
+
const e = x.value;
|
|
51
51
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
52
|
-
}),
|
|
52
|
+
}), h = u(
|
|
53
53
|
() => s.options.filter((e) => y.value.includes(e.value))
|
|
54
|
-
),
|
|
55
|
-
() =>
|
|
56
|
-
),
|
|
57
|
-
() => Math.max(0,
|
|
58
|
-
),
|
|
54
|
+
), M = u(
|
|
55
|
+
() => h.value.map((e) => e.label).join(", ")
|
|
56
|
+
), S = u(
|
|
57
|
+
() => Math.max(0, h.value.length - m.value)
|
|
58
|
+
), de = u(() => M.value || s.placeholder), O = u(
|
|
59
59
|
() => s.invalid ? s.errorText ?? s.supportText : s.supportText
|
|
60
|
-
),
|
|
61
|
-
() =>
|
|
62
|
-
),
|
|
60
|
+
), fe = u(() => s.width ?? F.value), ve = u(
|
|
61
|
+
() => n.value === -1 ? void 0 : `${A}-option-${n.value}`
|
|
62
|
+
), be = u(() => [
|
|
63
63
|
"select",
|
|
64
64
|
`select--${s.size}`,
|
|
65
65
|
{
|
|
@@ -69,80 +69,80 @@ const De = ["disabled", "aria-labelledby", "aria-label", "aria-describedby"], Fe
|
|
|
69
69
|
"select--multiple": s.multiple
|
|
70
70
|
}
|
|
71
71
|
]);
|
|
72
|
-
function
|
|
72
|
+
function k(e) {
|
|
73
73
|
return y.value.includes(e);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function G(e) {
|
|
76
76
|
const l = s.options[e];
|
|
77
77
|
return !!l && !l?.disabled;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return s.options.findIndex((e, l) =>
|
|
79
|
+
function me() {
|
|
80
|
+
return s.options.findIndex((e, l) => G(l));
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Y() {
|
|
83
83
|
for (let e = s.options.length - 1; e >= 0; e -= 1)
|
|
84
|
-
if (
|
|
84
|
+
if (G(e)) return e;
|
|
85
85
|
return -1;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Z(e, l) {
|
|
88
88
|
const t = s.options.length;
|
|
89
89
|
if (t === 0) return -1;
|
|
90
|
-
let
|
|
91
|
-
for (let
|
|
92
|
-
if (
|
|
90
|
+
let i = e;
|
|
91
|
+
for (let p = 0; p < t; p += 1)
|
|
92
|
+
if (i = (i + l + t) % t, G(i)) return i;
|
|
93
93
|
return -1;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
95
|
+
function ee(e = 20) {
|
|
96
|
+
L(() => {
|
|
97
97
|
if (!b.value) return;
|
|
98
|
-
const l =
|
|
99
|
-
l && (l.focus(), document.activeElement === l) || e > 0 && requestAnimationFrame(() =>
|
|
98
|
+
const l = D.value;
|
|
99
|
+
l && (l.focus(), document.activeElement === l) || e > 0 && requestAnimationFrame(() => ee(e - 1));
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
l || (
|
|
102
|
+
function he(e, l) {
|
|
103
|
+
l || (n.value = e);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function pe(e) {
|
|
106
106
|
switch (e.key) {
|
|
107
107
|
case "ArrowDown":
|
|
108
|
-
e.preventDefault(),
|
|
108
|
+
e.preventDefault(), n.value = Z(n.value, 1);
|
|
109
109
|
break;
|
|
110
110
|
case "ArrowUp":
|
|
111
|
-
e.preventDefault(),
|
|
111
|
+
e.preventDefault(), n.value = n.value === -1 ? Y() : Z(n.value, -1);
|
|
112
112
|
break;
|
|
113
113
|
case "Home":
|
|
114
|
-
e.preventDefault(),
|
|
114
|
+
e.preventDefault(), n.value = me();
|
|
115
115
|
break;
|
|
116
116
|
case "End":
|
|
117
|
-
e.preventDefault(),
|
|
117
|
+
e.preventDefault(), n.value = Y();
|
|
118
118
|
break;
|
|
119
119
|
case "Enter":
|
|
120
120
|
case " ": {
|
|
121
|
-
const l = s.options[
|
|
121
|
+
const l = s.options[n.value];
|
|
122
122
|
if (!l) break;
|
|
123
|
-
e.preventDefault(),
|
|
123
|
+
e.preventDefault(), te(l);
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function te(e) {
|
|
129
129
|
if (!(e.disabled || s.disabled)) {
|
|
130
130
|
if (s.multiple) {
|
|
131
|
-
const l =
|
|
132
|
-
|
|
131
|
+
const l = k(e.value) ? y.value.filter((t) => t !== e.value) : [...y.value, e.value];
|
|
132
|
+
x.value = l, w("change", l);
|
|
133
133
|
} else
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
x.value = e.value, w("change", e.value), b.value = !1;
|
|
135
|
+
w("select", e);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function ge(e) {
|
|
139
139
|
if (s.disabled) return;
|
|
140
140
|
const l = y.value.filter((t) => t !== e);
|
|
141
|
-
|
|
141
|
+
x.value = l, w("change", l);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function W() {
|
|
144
144
|
if (!s.multiple) return;
|
|
145
|
-
const e =
|
|
145
|
+
const e = I.value, l = J.value;
|
|
146
146
|
if (!e || !l) return;
|
|
147
147
|
const t = Array.from(
|
|
148
148
|
l.querySelectorAll('[data-chip="item"]')
|
|
@@ -151,55 +151,55 @@ const De = ["disabled", "aria-labelledby", "aria-label", "aria-describedby"], Fe
|
|
|
151
151
|
m.value = Number.MAX_SAFE_INTEGER;
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
const
|
|
155
|
-
let
|
|
156
|
-
for (const
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
159
|
-
|
|
154
|
+
const i = Number.parseFloat(getComputedStyle(l).columnGap) || 0, p = Number.parseFloat(getComputedStyle(e).columnGap) || 0, ye = S.value ? (Q.value?.offsetWidth ?? 0) + p : 0, ke = e.clientWidth - ye;
|
|
155
|
+
let ae = 0, z = 0;
|
|
156
|
+
for (const _e of t) {
|
|
157
|
+
const se = ae + (z ? i : 0) + _e.offsetWidth;
|
|
158
|
+
if (se > ke) break;
|
|
159
|
+
ae = se, z += 1;
|
|
160
160
|
}
|
|
161
|
-
m.value = Math.max(
|
|
161
|
+
m.value = Math.max(z, 1);
|
|
162
162
|
}
|
|
163
|
-
let
|
|
164
|
-
|
|
165
|
-
const e =
|
|
166
|
-
e && (
|
|
163
|
+
let $;
|
|
164
|
+
Ae(() => {
|
|
165
|
+
const e = P.value;
|
|
166
|
+
e && (F.value = e.getBoundingClientRect().width, L(W), $ = new ResizeObserver((l) => {
|
|
167
167
|
for (const t of l)
|
|
168
|
-
t.target === e && (
|
|
169
|
-
|
|
170
|
-
}),
|
|
171
|
-
}),
|
|
172
|
-
() =>
|
|
168
|
+
t.target === e && (F.value = t.borderBoxSize?.[0]?.inlineSize ?? e.getBoundingClientRect().width);
|
|
169
|
+
W();
|
|
170
|
+
}), $.observe(e), I.value && $.observe(I.value));
|
|
171
|
+
}), Ie(() => $?.disconnect()), T(
|
|
172
|
+
() => h.value.map((e) => e.value).join("|"),
|
|
173
173
|
() => {
|
|
174
|
-
m.value = Number.MAX_SAFE_INTEGER,
|
|
174
|
+
m.value = Number.MAX_SAFE_INTEGER, L(W);
|
|
175
175
|
}
|
|
176
176
|
);
|
|
177
|
-
let
|
|
177
|
+
let le = null;
|
|
178
178
|
return T(b, (e) => {
|
|
179
|
-
e ? (
|
|
180
|
-
}), T(
|
|
181
|
-
e && b.value &&
|
|
179
|
+
e ? (le = document.activeElement, n.value = -1) : (n.value = -1, le?.focus());
|
|
180
|
+
}), T(D, (e) => {
|
|
181
|
+
e && b.value && ee();
|
|
182
182
|
}), T(
|
|
183
183
|
() => s.disabled,
|
|
184
184
|
(e) => {
|
|
185
185
|
e && (b.value = !1);
|
|
186
186
|
}
|
|
187
|
-
), (e, l) => (
|
|
188
|
-
a.label ? (
|
|
187
|
+
), (e, l) => (r(), o("div", f({ class: be.value }, { ...oe.value, ...c(d)("root") }), [
|
|
188
|
+
a.label ? (r(), o("label", f({
|
|
189
189
|
key: 0,
|
|
190
|
-
id:
|
|
190
|
+
id: H,
|
|
191
191
|
class: "select__label",
|
|
192
|
-
for:
|
|
193
|
-
},
|
|
194
|
-
|
|
192
|
+
for: q
|
|
193
|
+
}, c(d)("label")), v(a.label), 17)) : R("", !0),
|
|
194
|
+
g("div", f({
|
|
195
195
|
ref_key: "fieldRef",
|
|
196
|
-
ref:
|
|
196
|
+
ref: P,
|
|
197
197
|
class: "select__field"
|
|
198
|
-
},
|
|
199
|
-
|
|
198
|
+
}, c(d)("field")), [
|
|
199
|
+
V(c(Te), {
|
|
200
200
|
open: b.value,
|
|
201
201
|
"onUpdate:open": l[0] || (l[0] = (t) => b.value = t),
|
|
202
|
-
width:
|
|
202
|
+
width: fe.value,
|
|
203
203
|
side: a.side,
|
|
204
204
|
"side-offset": a.sideOffset,
|
|
205
205
|
align: a.align,
|
|
@@ -207,146 +207,169 @@ const De = ["disabled", "aria-labelledby", "aria-label", "aria-describedby"], Fe
|
|
|
207
207
|
arrow: !1,
|
|
208
208
|
"breakpoint-mobile": a.breakpointMobile,
|
|
209
209
|
"trigger-has-popup": "listbox",
|
|
210
|
-
"trigger-controls":
|
|
210
|
+
"trigger-controls": A,
|
|
211
211
|
"test-id": a.testId
|
|
212
212
|
}, {
|
|
213
|
-
trigger:
|
|
214
|
-
|
|
215
|
-
id:
|
|
213
|
+
trigger: X(({ props: t }) => [
|
|
214
|
+
g("button", f({
|
|
215
|
+
id: q,
|
|
216
216
|
type: "button",
|
|
217
217
|
class: "select__trigger",
|
|
218
218
|
disabled: a.disabled,
|
|
219
|
-
"aria-labelledby": a.label ?
|
|
219
|
+
"aria-labelledby": a.label ? H : void 0,
|
|
220
220
|
"aria-label": a.label ? void 0 : a.ariaLabel,
|
|
221
|
-
"aria-describedby":
|
|
221
|
+
"aria-describedby": O.value ? K : void 0
|
|
222
222
|
}, {
|
|
223
223
|
...t,
|
|
224
|
-
...
|
|
225
|
-
...
|
|
224
|
+
...ue.value,
|
|
225
|
+
...c(d)("trigger")
|
|
226
226
|
}), [
|
|
227
|
-
|
|
228
|
-
default:
|
|
229
|
-
|
|
227
|
+
V(Be, null, {
|
|
228
|
+
default: X(() => [
|
|
229
|
+
j(v(de.value), 1)
|
|
230
230
|
]),
|
|
231
231
|
_: 1
|
|
232
232
|
})
|
|
233
|
-
], 16,
|
|
233
|
+
], 16, Fe)
|
|
234
234
|
]),
|
|
235
|
-
default:
|
|
236
|
-
|
|
237
|
-
id:
|
|
235
|
+
default: X(() => [
|
|
236
|
+
g("div", {
|
|
237
|
+
id: A,
|
|
238
238
|
ref_key: "listRef",
|
|
239
|
-
ref:
|
|
239
|
+
ref: D,
|
|
240
240
|
role: "listbox",
|
|
241
241
|
tabindex: "0",
|
|
242
242
|
"aria-label": a.label ?? a.ariaLabel,
|
|
243
243
|
"aria-multiselectable": a.multiple || void 0,
|
|
244
|
-
"aria-activedescendant":
|
|
244
|
+
"aria-activedescendant": ve.value,
|
|
245
245
|
class: "select-list",
|
|
246
|
-
onKeydown:
|
|
246
|
+
onKeydown: pe
|
|
247
247
|
}, [
|
|
248
|
-
(
|
|
249
|
-
id: `${
|
|
248
|
+
(r(!0), o(ie, null, ne(a.options, (t, i) => (r(), o("div", f({
|
|
249
|
+
id: `${A}-option-${i}`,
|
|
250
250
|
key: t.value,
|
|
251
251
|
role: "option",
|
|
252
252
|
class: ["select-list__option", {
|
|
253
|
-
"select-list__option--active":
|
|
253
|
+
"select-list__option--active": n.value === i,
|
|
254
254
|
"select-list__option--disabled": t.disabled
|
|
255
255
|
}],
|
|
256
|
-
"aria-selected":
|
|
256
|
+
"aria-selected": k(t.value),
|
|
257
257
|
"aria-disabled": t.disabled || void 0
|
|
258
|
-
}, { ref_for: !0 },
|
|
259
|
-
onClick: (
|
|
260
|
-
onMouseenter: (
|
|
258
|
+
}, { ref_for: !0 }, c(d)("option", t.value), {
|
|
259
|
+
onClick: (p) => te(t),
|
|
260
|
+
onMouseenter: (p) => he(i, t.disabled)
|
|
261
261
|
}), [
|
|
262
|
-
a.multiple ? (
|
|
262
|
+
a.multiple ? (r(), U(De, {
|
|
263
263
|
key: 0,
|
|
264
|
-
checked:
|
|
264
|
+
checked: k(t.value),
|
|
265
265
|
disabled: t.disabled,
|
|
266
|
-
state:
|
|
267
|
-
}, null, 8, ["checked", "disabled", "state"])) : (
|
|
266
|
+
state: n.value === i ? "hover" : "default"
|
|
267
|
+
}, null, 8, ["checked", "disabled", "state"])) : (r(), U(c(Ve), {
|
|
268
268
|
key: 1,
|
|
269
|
-
checked:
|
|
269
|
+
checked: k(t.value),
|
|
270
270
|
disabled: t.disabled,
|
|
271
|
-
state:
|
|
271
|
+
state: n.value === i ? "hover" : "default"
|
|
272
272
|
}, null, 8, ["checked", "disabled", "state"])),
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
N(e.$slots, "option", {
|
|
274
|
+
option: t,
|
|
275
|
+
selected: k(t.value),
|
|
276
|
+
active: n.value === i,
|
|
277
|
+
index: i
|
|
278
|
+
}, () => [
|
|
279
|
+
g("span", We, v(t.label), 1)
|
|
280
|
+
], !0)
|
|
281
|
+
], 16, Ge))), 128)),
|
|
282
|
+
a.options.length ? R("", !0) : (r(), o("p", ze, [
|
|
283
|
+
N(e.$slots, "empty", {}, () => [
|
|
284
|
+
j(v(Ke))
|
|
285
|
+
], !0)
|
|
286
|
+
]))
|
|
287
|
+
], 40, Oe)
|
|
277
288
|
]),
|
|
278
|
-
_:
|
|
289
|
+
_: 3
|
|
279
290
|
}, 8, ["open", "width", "side", "side-offset", "align", "align-offset", "breakpoint-mobile", "test-id"]),
|
|
280
|
-
|
|
291
|
+
g("div", {
|
|
281
292
|
ref_key: "contentRef",
|
|
282
|
-
ref:
|
|
293
|
+
ref: I,
|
|
283
294
|
class: "select__content"
|
|
284
295
|
}, [
|
|
285
|
-
a.multiple &&
|
|
296
|
+
a.multiple && h.value.length ? (r(), o("span", {
|
|
286
297
|
key: 0,
|
|
287
298
|
ref_key: "chipsRef",
|
|
288
|
-
ref:
|
|
299
|
+
ref: J,
|
|
289
300
|
class: "select__chips"
|
|
290
301
|
}, [
|
|
291
|
-
(
|
|
302
|
+
(r(!0), o(ie, null, ne(h.value, (t, i) => (r(), o("span", f({
|
|
292
303
|
key: t.value,
|
|
293
304
|
"data-chip": "item",
|
|
294
305
|
class: ["select__chip", {
|
|
295
|
-
"select__chip--measured":
|
|
306
|
+
"select__chip--measured": i >= m.value
|
|
296
307
|
}],
|
|
297
|
-
"aria-hidden":
|
|
298
|
-
}, { ref_for: !0 },
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
"aria-hidden": i >= m.value || void 0
|
|
309
|
+
}, { ref_for: !0 }, c(d)("chip", t.value)), [
|
|
310
|
+
N(e.$slots, "chip", {
|
|
311
|
+
option: t,
|
|
312
|
+
index: i
|
|
313
|
+
}, () => [
|
|
314
|
+
t.avatar ? (r(), o("img", {
|
|
315
|
+
key: 0,
|
|
316
|
+
class: "select__chip-avatar",
|
|
317
|
+
src: t.avatar,
|
|
318
|
+
alt: ""
|
|
319
|
+
}, null, 8, Xe)) : t.icon ? (r(), U(Me(t.icon), {
|
|
320
|
+
key: 1,
|
|
321
|
+
class: "select__chip-icon",
|
|
322
|
+
"aria-hidden": "true"
|
|
323
|
+
})) : R("", !0),
|
|
324
|
+
g("span", Ue, v(t.label), 1)
|
|
325
|
+
], !0),
|
|
326
|
+
g("button", f({
|
|
311
327
|
type: "button",
|
|
312
328
|
class: "select__chip-remove",
|
|
313
329
|
disabled: a.disabled,
|
|
314
|
-
tabindex:
|
|
330
|
+
tabindex: i >= m.value ? -1 : void 0,
|
|
315
331
|
"aria-label": `Убрать ${t.label}`
|
|
316
|
-
}, { ref_for: !0 },
|
|
317
|
-
onClick:
|
|
332
|
+
}, { ref_for: !0 }, c(d)("chip-remove", t.value), {
|
|
333
|
+
onClick: Se((p) => ge(t.value), ["stop"])
|
|
318
334
|
}), [
|
|
319
|
-
|
|
335
|
+
V(c($e), {
|
|
320
336
|
class: "select__chip-icon",
|
|
321
337
|
"aria-hidden": "true"
|
|
322
338
|
})
|
|
323
|
-
], 16,
|
|
324
|
-
], 16,
|
|
325
|
-
], 512)) :
|
|
326
|
-
a.multiple &&
|
|
339
|
+
], 16, je)
|
|
340
|
+
], 16, Le))), 128))
|
|
341
|
+
], 512)) : R("", !0),
|
|
342
|
+
a.multiple && h.value.length ? (r(), o("span", f({
|
|
327
343
|
key: 1,
|
|
328
344
|
ref_key: "counterRef",
|
|
329
|
-
ref:
|
|
330
|
-
class: ["select__chip select__chip--counter", { "select__chip--measured": !
|
|
331
|
-
"aria-hidden": !
|
|
332
|
-
},
|
|
345
|
+
ref: Q,
|
|
346
|
+
class: ["select__chip select__chip--counter", { "select__chip--measured": !S.value }],
|
|
347
|
+
"aria-hidden": !S.value || void 0
|
|
348
|
+
}, c(d)("chip-counter")), " +" + v(S.value || 1), 17, qe)) : M.value ? (r(), o("span", f({
|
|
333
349
|
key: 2,
|
|
334
350
|
class: "select__value"
|
|
335
|
-
},
|
|
351
|
+
}, c(d)("value")), [
|
|
352
|
+
N(e.$slots, "value", {
|
|
353
|
+
option: h.value[0],
|
|
354
|
+
displayValue: M.value
|
|
355
|
+
}, () => [
|
|
356
|
+
j(v(M.value), 1)
|
|
357
|
+
], !0)
|
|
358
|
+
], 16)) : (r(), o("span", He, v(a.placeholder), 1))
|
|
336
359
|
], 512),
|
|
337
|
-
|
|
360
|
+
V(c(Ee), {
|
|
338
361
|
class: "select__arrow",
|
|
339
362
|
"aria-hidden": "true"
|
|
340
363
|
})
|
|
341
364
|
], 16),
|
|
342
|
-
|
|
365
|
+
O.value ? (r(), o("p", f({
|
|
343
366
|
key: 1,
|
|
344
|
-
id:
|
|
367
|
+
id: K,
|
|
345
368
|
class: "select__message"
|
|
346
|
-
},
|
|
369
|
+
}, c(d)("message")), v(O.value), 17)) : R("", !0)
|
|
347
370
|
], 16));
|
|
348
371
|
}
|
|
349
372
|
});
|
|
350
373
|
export {
|
|
351
|
-
|
|
374
|
+
lt as default
|
|
352
375
|
};
|
|
@@ -25,11 +25,11 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
|
|
|
25
25
|
disabled: boolean;
|
|
26
26
|
text: string;
|
|
27
27
|
zIndex: number | "auto";
|
|
28
|
-
breakpointMobile: TBreakpoints;
|
|
29
28
|
side: TooltipSide;
|
|
30
29
|
sideOffset: number;
|
|
31
30
|
align: TooltipAlign;
|
|
32
31
|
alignOffset: number;
|
|
32
|
+
breakpointMobile: TBreakpoints;
|
|
33
33
|
arrow: boolean;
|
|
34
34
|
testId: string;
|
|
35
35
|
maxWidth: number | string;
|
|
@@ -24,11 +24,11 @@ declare const __VLS_component: DefineComponent<TooltipContentProps, {}, {}, {},
|
|
|
24
24
|
}>, {
|
|
25
25
|
text: string;
|
|
26
26
|
zIndex: number | "auto";
|
|
27
|
-
breakpointMobile: TBreakpoints;
|
|
28
27
|
side: TooltipSide;
|
|
29
28
|
sideOffset: number;
|
|
30
29
|
align: TooltipAlign;
|
|
31
30
|
alignOffset: number;
|
|
31
|
+
breakpointMobile: TBreakpoints;
|
|
32
32
|
arrow: boolean;
|
|
33
33
|
testId: string;
|
|
34
34
|
maxWidth: number | string;
|