@profitliga/ui 2.0.1 → 2.0.3
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 +63 -3
- package/dist/components/v2/Combobox/Combobox.vue.d.ts +24 -52
- package/dist/components/v2/Combobox/Combobox.vue.js +2 -2
- package/dist/components/v2/Combobox/Combobox.vue2.js +328 -257
- 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 +2 -2
- 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/Input/Input.css +1 -1
- package/dist/components/v2/Input/Input.vue.js +2 -2
- package/dist/components/v2/Input/Input.vue2.js +113 -107
- 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 +191 -162
- 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 Ce, useAttrs as Se, computed as u, ref as V, useTemplateRef as R, onMounted as $e, nextTick as N, onBeforeUnmount as xe, watch as w, openBlock as o, createElementBlock as c, mergeProps as f, unref as r, toDisplayString as v, createCommentVNode as C, createElementVNode as g, createVNode as B, withCtx as X, Fragment as ie, renderList as ne, createBlock as q, renderSlot as D, createTextVNode as U, resolveDynamicComponent as Ie, withModifiers as Ae, mergeModels as oe } from "vue";
|
|
2
|
+
import { CircleX as Me, 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"], qe = { class: "select__chip-label" }, Ue = ["disabled", "tabindex", "aria-label", "onClick"], je = ["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__ */ oe({
|
|
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__ */ oe(["change", "select"], ["update:modelValue"]),
|
|
42
|
+
setup(a, { emit: re }) {
|
|
43
|
+
const s = a, S = re, $ = we(a, "modelValue"), x = Ce(), j = `select-trigger-${x}`, H = `select-label-${x}`, y = `select-list-${x}`, K = `select-message-${x}`, d = Ne(() => s.testId), F = Se(), ce = u(() => ({
|
|
44
|
+
class: F.class,
|
|
45
|
+
style: F.style
|
|
46
|
+
})), ue = u(() => {
|
|
47
|
+
const { class: e, style: l, ...t } = F;
|
|
48
48
|
return t;
|
|
49
|
-
}), b =
|
|
50
|
-
const e =
|
|
49
|
+
}), b = V(!1), P = R("fieldRef"), I = R("listRef"), A = R("contentRef"), J = R("chipsRef"), Q = R("counterRef"), m = V(Number.MAX_SAFE_INTEGER), O = V(0), n = V(-1), k = u(() => {
|
|
50
|
+
const e = $.value;
|
|
51
51
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
52
|
-
}),
|
|
53
|
-
() => s.options.filter((e) =>
|
|
54
|
-
),
|
|
55
|
-
() =>
|
|
56
|
-
),
|
|
57
|
-
() => Math.max(0,
|
|
58
|
-
),
|
|
52
|
+
}), h = u(
|
|
53
|
+
() => s.options.filter((e) => k.value.includes(e.value))
|
|
54
|
+
), M = u(
|
|
55
|
+
() => h.value.map((e) => e.label).join(", ")
|
|
56
|
+
), E = u(
|
|
57
|
+
() => Math.max(0, h.value.length - m.value)
|
|
58
|
+
), de = u(() => M.value || s.placeholder), G = u(
|
|
59
59
|
() => s.invalid ? s.errorText ?? s.supportText : s.supportText
|
|
60
|
-
),
|
|
61
|
-
() =>
|
|
62
|
-
),
|
|
60
|
+
), fe = u(() => s.width ?? O.value), ve = u(
|
|
61
|
+
() => n.value === -1 ? void 0 : `${y}-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
|
|
73
|
-
return
|
|
72
|
+
function _(e) {
|
|
73
|
+
return k.value.includes(e);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function W(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) => W(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 (W(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, W(i)) return i;
|
|
93
93
|
return -1;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
95
|
+
function ee(e = 20) {
|
|
96
|
+
N(() => {
|
|
97
97
|
if (!b.value) return;
|
|
98
|
-
const l =
|
|
99
|
-
l && (l.focus(), document.activeElement === l) || e > 0 && requestAnimationFrame(() =>
|
|
98
|
+
const l = I.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 = _(e.value) ? k.value.filter((t) => t !== e.value) : [...k.value, e.value];
|
|
132
|
+
$.value = l, S("change", l);
|
|
133
133
|
} else
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
$.value = e.value, S("change", e.value), b.value = !1;
|
|
135
|
+
S("select", e);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function ge(e) {
|
|
139
139
|
if (s.disabled) return;
|
|
140
|
-
const l =
|
|
141
|
-
|
|
140
|
+
const l = k.value.filter((t) => t !== e);
|
|
141
|
+
$.value = l, S("change", l);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function z() {
|
|
144
144
|
if (!s.multiple) return;
|
|
145
|
-
const e = A.value, l =
|
|
145
|
+
const e = A.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,61 @@ 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 = E.value ? (Q.value?.offsetWidth ?? 0) + p : 0, ke = e.clientWidth - ye;
|
|
155
|
+
let ae = 0, L = 0;
|
|
156
|
+
for (const _e of t) {
|
|
157
|
+
const se = ae + (L ? i : 0) + _e.offsetWidth;
|
|
158
|
+
if (se > ke) break;
|
|
159
|
+
ae = se, L += 1;
|
|
160
160
|
}
|
|
161
|
-
m.value = Math.max(
|
|
161
|
+
m.value = Math.max(L, 1);
|
|
162
162
|
}
|
|
163
|
-
let
|
|
164
|
-
|
|
165
|
-
const e =
|
|
166
|
-
e && (
|
|
163
|
+
let T;
|
|
164
|
+
$e(() => {
|
|
165
|
+
const e = P.value;
|
|
166
|
+
e && (O.value = e.getBoundingClientRect().width, N(z), T = new ResizeObserver((l) => {
|
|
167
167
|
for (const t of l)
|
|
168
|
-
t.target === e && (
|
|
169
|
-
|
|
170
|
-
}),
|
|
171
|
-
}),
|
|
172
|
-
() =>
|
|
168
|
+
t.target === e && (O.value = t.borderBoxSize?.[0]?.inlineSize ?? e.getBoundingClientRect().width);
|
|
169
|
+
z();
|
|
170
|
+
}), T.observe(e), A.value && T.observe(A.value));
|
|
171
|
+
}), xe(() => T?.disconnect()), w(
|
|
172
|
+
() => h.value.map((e) => e.value).join("|"),
|
|
173
173
|
() => {
|
|
174
|
-
m.value = Number.MAX_SAFE_INTEGER, z
|
|
174
|
+
m.value = Number.MAX_SAFE_INTEGER, N(z);
|
|
175
175
|
}
|
|
176
176
|
);
|
|
177
|
-
let
|
|
178
|
-
return
|
|
179
|
-
e ? (
|
|
180
|
-
}),
|
|
181
|
-
e && b.value &&
|
|
182
|
-
}),
|
|
177
|
+
let le = null;
|
|
178
|
+
return w(b, (e) => {
|
|
179
|
+
e ? (le = document.activeElement, n.value = -1) : (n.value = -1, le?.focus());
|
|
180
|
+
}), w(I, (e) => {
|
|
181
|
+
e && b.value && ee();
|
|
182
|
+
}), w(n, (e) => {
|
|
183
|
+
e !== -1 && N(() => {
|
|
184
|
+
I.value?.querySelector(
|
|
185
|
+
`#${CSS.escape(`${y}-option-${e}`)}`
|
|
186
|
+
)?.scrollIntoView({ block: "nearest" });
|
|
187
|
+
});
|
|
188
|
+
}), w(
|
|
183
189
|
() => s.disabled,
|
|
184
190
|
(e) => {
|
|
185
191
|
e && (b.value = !1);
|
|
186
192
|
}
|
|
187
|
-
), (e, l) => (
|
|
188
|
-
a.label ? (
|
|
193
|
+
), (e, l) => (o(), c("div", f({ class: be.value }, { ...ce.value, ...r(d)("root") }), [
|
|
194
|
+
a.label ? (o(), c("label", f({
|
|
189
195
|
key: 0,
|
|
190
|
-
id:
|
|
196
|
+
id: H,
|
|
191
197
|
class: "select__label",
|
|
192
|
-
for:
|
|
193
|
-
}, r(d)("label")), v(a.label), 17)) :
|
|
194
|
-
|
|
198
|
+
for: j
|
|
199
|
+
}, r(d)("label")), v(a.label), 17)) : C("", !0),
|
|
200
|
+
g("div", f({
|
|
195
201
|
ref_key: "fieldRef",
|
|
196
|
-
ref:
|
|
202
|
+
ref: P,
|
|
197
203
|
class: "select__field"
|
|
198
204
|
}, r(d)("field")), [
|
|
199
|
-
|
|
205
|
+
B(r(Te), {
|
|
200
206
|
open: b.value,
|
|
201
207
|
"onUpdate:open": l[0] || (l[0] = (t) => b.value = t),
|
|
202
|
-
width:
|
|
208
|
+
width: fe.value,
|
|
203
209
|
side: a.side,
|
|
204
210
|
"side-offset": a.sideOffset,
|
|
205
211
|
align: a.align,
|
|
@@ -207,146 +213,169 @@ const De = ["disabled", "aria-labelledby", "aria-label", "aria-describedby"], Fe
|
|
|
207
213
|
arrow: !1,
|
|
208
214
|
"breakpoint-mobile": a.breakpointMobile,
|
|
209
215
|
"trigger-has-popup": "listbox",
|
|
210
|
-
"trigger-controls":
|
|
216
|
+
"trigger-controls": y,
|
|
211
217
|
"test-id": a.testId
|
|
212
218
|
}, {
|
|
213
|
-
trigger:
|
|
214
|
-
|
|
215
|
-
id:
|
|
219
|
+
trigger: X(({ props: t }) => [
|
|
220
|
+
g("button", f({
|
|
221
|
+
id: j,
|
|
216
222
|
type: "button",
|
|
217
223
|
class: "select__trigger",
|
|
218
224
|
disabled: a.disabled,
|
|
219
|
-
"aria-labelledby": a.label ?
|
|
225
|
+
"aria-labelledby": a.label ? H : void 0,
|
|
220
226
|
"aria-label": a.label ? void 0 : a.ariaLabel,
|
|
221
|
-
"aria-describedby":
|
|
227
|
+
"aria-describedby": G.value ? K : void 0
|
|
222
228
|
}, {
|
|
223
229
|
...t,
|
|
224
|
-
...
|
|
230
|
+
...ue.value,
|
|
225
231
|
...r(d)("trigger")
|
|
226
232
|
}), [
|
|
227
|
-
|
|
228
|
-
default:
|
|
229
|
-
|
|
233
|
+
B(Be, null, {
|
|
234
|
+
default: X(() => [
|
|
235
|
+
U(v(de.value), 1)
|
|
230
236
|
]),
|
|
231
237
|
_: 1
|
|
232
238
|
})
|
|
233
|
-
], 16,
|
|
239
|
+
], 16, Fe)
|
|
234
240
|
]),
|
|
235
|
-
default:
|
|
236
|
-
|
|
237
|
-
id:
|
|
241
|
+
default: X(() => [
|
|
242
|
+
g("div", {
|
|
243
|
+
id: y,
|
|
238
244
|
ref_key: "listRef",
|
|
239
|
-
ref:
|
|
245
|
+
ref: I,
|
|
240
246
|
role: "listbox",
|
|
241
247
|
tabindex: "0",
|
|
242
248
|
"aria-label": a.label ?? a.ariaLabel,
|
|
243
249
|
"aria-multiselectable": a.multiple || void 0,
|
|
244
|
-
"aria-activedescendant":
|
|
250
|
+
"aria-activedescendant": ve.value,
|
|
245
251
|
class: "select-list",
|
|
246
|
-
onKeydown:
|
|
252
|
+
onKeydown: pe
|
|
247
253
|
}, [
|
|
248
|
-
(
|
|
249
|
-
id: `${
|
|
254
|
+
(o(!0), c(ie, null, ne(a.options, (t, i) => (o(), c("div", f({
|
|
255
|
+
id: `${y}-option-${i}`,
|
|
250
256
|
key: t.value,
|
|
251
257
|
role: "option",
|
|
252
258
|
class: ["select-list__option", {
|
|
253
|
-
"select-list__option--active":
|
|
259
|
+
"select-list__option--active": n.value === i,
|
|
254
260
|
"select-list__option--disabled": t.disabled
|
|
255
261
|
}],
|
|
256
|
-
"aria-selected":
|
|
262
|
+
"aria-selected": _(t.value),
|
|
257
263
|
"aria-disabled": t.disabled || void 0
|
|
258
264
|
}, { ref_for: !0 }, r(d)("option", t.value), {
|
|
259
|
-
onClick: (
|
|
260
|
-
onMouseenter: (
|
|
265
|
+
onClick: (p) => te(t),
|
|
266
|
+
onMouseenter: (p) => he(i, t.disabled)
|
|
261
267
|
}), [
|
|
262
|
-
a.multiple ? (
|
|
268
|
+
a.multiple ? (o(), q(De, {
|
|
263
269
|
key: 0,
|
|
264
|
-
checked:
|
|
270
|
+
checked: _(t.value),
|
|
265
271
|
disabled: t.disabled,
|
|
266
|
-
state:
|
|
267
|
-
}, null, 8, ["checked", "disabled", "state"])) : (
|
|
272
|
+
state: n.value === i ? "hover" : "default"
|
|
273
|
+
}, null, 8, ["checked", "disabled", "state"])) : (o(), q(r(Ve), {
|
|
268
274
|
key: 1,
|
|
269
|
-
checked:
|
|
275
|
+
checked: _(t.value),
|
|
270
276
|
disabled: t.disabled,
|
|
271
|
-
state:
|
|
277
|
+
state: n.value === i ? "hover" : "default"
|
|
272
278
|
}, null, 8, ["checked", "disabled", "state"])),
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
279
|
+
D(e.$slots, "option", {
|
|
280
|
+
option: t,
|
|
281
|
+
selected: _(t.value),
|
|
282
|
+
active: n.value === i,
|
|
283
|
+
index: i
|
|
284
|
+
}, () => [
|
|
285
|
+
g("span", We, v(t.label), 1)
|
|
286
|
+
], !0)
|
|
287
|
+
], 16, Ge))), 128)),
|
|
288
|
+
a.options.length ? C("", !0) : (o(), c("p", ze, [
|
|
289
|
+
D(e.$slots, "empty", {}, () => [
|
|
290
|
+
U(v(Ke))
|
|
291
|
+
], !0)
|
|
292
|
+
]))
|
|
293
|
+
], 40, Oe)
|
|
277
294
|
]),
|
|
278
|
-
_:
|
|
295
|
+
_: 3
|
|
279
296
|
}, 8, ["open", "width", "side", "side-offset", "align", "align-offset", "breakpoint-mobile", "test-id"]),
|
|
280
|
-
|
|
297
|
+
g("div", {
|
|
281
298
|
ref_key: "contentRef",
|
|
282
299
|
ref: A,
|
|
283
300
|
class: "select__content"
|
|
284
301
|
}, [
|
|
285
|
-
a.multiple &&
|
|
302
|
+
a.multiple && h.value.length ? (o(), c("span", {
|
|
286
303
|
key: 0,
|
|
287
304
|
ref_key: "chipsRef",
|
|
288
|
-
ref:
|
|
305
|
+
ref: J,
|
|
289
306
|
class: "select__chips"
|
|
290
307
|
}, [
|
|
291
|
-
(
|
|
308
|
+
(o(!0), c(ie, null, ne(h.value, (t, i) => (o(), c("span", f({
|
|
292
309
|
key: t.value,
|
|
293
310
|
"data-chip": "item",
|
|
294
311
|
class: ["select__chip", {
|
|
295
|
-
"select__chip--measured":
|
|
312
|
+
"select__chip--measured": i >= m.value
|
|
296
313
|
}],
|
|
297
|
-
"aria-hidden":
|
|
314
|
+
"aria-hidden": i >= m.value || void 0
|
|
298
315
|
}, { ref_for: !0 }, r(d)("chip", t.value)), [
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
316
|
+
D(e.$slots, "chip", {
|
|
317
|
+
option: t,
|
|
318
|
+
index: i
|
|
319
|
+
}, () => [
|
|
320
|
+
t.avatar ? (o(), c("img", {
|
|
321
|
+
key: 0,
|
|
322
|
+
class: "select__chip-avatar",
|
|
323
|
+
src: t.avatar,
|
|
324
|
+
alt: ""
|
|
325
|
+
}, null, 8, Xe)) : t.icon ? (o(), q(Ie(t.icon), {
|
|
326
|
+
key: 1,
|
|
327
|
+
class: "select__chip-icon",
|
|
328
|
+
"aria-hidden": "true"
|
|
329
|
+
})) : C("", !0),
|
|
330
|
+
g("span", qe, v(t.label), 1)
|
|
331
|
+
], !0),
|
|
332
|
+
g("button", f({
|
|
311
333
|
type: "button",
|
|
312
334
|
class: "select__chip-remove",
|
|
313
335
|
disabled: a.disabled,
|
|
314
|
-
tabindex:
|
|
336
|
+
tabindex: i >= m.value ? -1 : void 0,
|
|
315
337
|
"aria-label": `Убрать ${t.label}`
|
|
316
338
|
}, { ref_for: !0 }, r(d)("chip-remove", t.value), {
|
|
317
|
-
onClick:
|
|
339
|
+
onClick: Ae((p) => ge(t.value), ["stop"])
|
|
318
340
|
}), [
|
|
319
|
-
|
|
341
|
+
B(r(Me), {
|
|
320
342
|
class: "select__chip-icon",
|
|
321
343
|
"aria-hidden": "true"
|
|
322
344
|
})
|
|
323
345
|
], 16, Ue)
|
|
324
|
-
], 16,
|
|
325
|
-
], 512)) :
|
|
326
|
-
a.multiple &&
|
|
346
|
+
], 16, Le))), 128))
|
|
347
|
+
], 512)) : C("", !0),
|
|
348
|
+
a.multiple && h.value.length ? (o(), c("span", f({
|
|
327
349
|
key: 1,
|
|
328
350
|
ref_key: "counterRef",
|
|
329
|
-
ref:
|
|
330
|
-
class: ["select__chip select__chip--counter", { "select__chip--measured": !
|
|
331
|
-
"aria-hidden": !
|
|
332
|
-
}, r(d)("chip-counter")), " +" + v(
|
|
351
|
+
ref: Q,
|
|
352
|
+
class: ["select__chip select__chip--counter", { "select__chip--measured": !E.value }],
|
|
353
|
+
"aria-hidden": !E.value || void 0
|
|
354
|
+
}, r(d)("chip-counter")), " +" + v(E.value || 1), 17, je)) : M.value ? (o(), c("span", f({
|
|
333
355
|
key: 2,
|
|
334
356
|
class: "select__value"
|
|
335
|
-
}, r(d)("value")),
|
|
357
|
+
}, r(d)("value")), [
|
|
358
|
+
D(e.$slots, "value", {
|
|
359
|
+
option: h.value[0],
|
|
360
|
+
displayValue: M.value
|
|
361
|
+
}, () => [
|
|
362
|
+
U(v(M.value), 1)
|
|
363
|
+
], !0)
|
|
364
|
+
], 16)) : (o(), c("span", He, v(a.placeholder), 1))
|
|
336
365
|
], 512),
|
|
337
|
-
|
|
366
|
+
B(r(Ee), {
|
|
338
367
|
class: "select__arrow",
|
|
339
368
|
"aria-hidden": "true"
|
|
340
369
|
})
|
|
341
370
|
], 16),
|
|
342
|
-
|
|
371
|
+
G.value ? (o(), c("p", f({
|
|
343
372
|
key: 1,
|
|
344
|
-
id:
|
|
373
|
+
id: K,
|
|
345
374
|
class: "select__message"
|
|
346
|
-
}, r(d)("message")), v(
|
|
375
|
+
}, r(d)("message")), v(G.value), 17)) : C("", !0)
|
|
347
376
|
], 16));
|
|
348
377
|
}
|
|
349
378
|
});
|
|
350
379
|
export {
|
|
351
|
-
|
|
380
|
+
lt as default
|
|
352
381
|
};
|
|
@@ -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;
|