@profitliga/ui 2.0.4 → 2.0.6
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/v2/AlertDialog/AlertDialog.css +1 -1
- package/dist/components/v2/AlertDialog/AlertDialog.vue.js +2 -2
- package/dist/components/v2/AlertDialog/AlertDialog.vue2.js +52 -51
- package/dist/components/v2/BottomSheet/BottomSheet.css +1 -1
- package/dist/components/v2/BottomSheet/BottomSheet.vue.js +2 -2
- package/dist/components/v2/BottomSheet/BottomSheet.vue2.js +31 -29
- package/dist/components/v2/Button/Button.css +1 -1
- package/dist/components/v2/Button/Button.vue.js +2 -2
- package/dist/components/v2/Combobox/Combobox.css +1 -1
- package/dist/components/v2/Combobox/Combobox.types.d.ts +10 -2
- package/dist/components/v2/Combobox/Combobox.vue.js +1 -1
- package/dist/components/v2/Combobox/Combobox.vue2.js +118 -120
- package/dist/components/v2/Dialog/Dialog.css +1 -1
- package/dist/components/v2/Dialog/Dialog.vue.js +1 -1
- package/dist/components/v2/Dialog/Dialog.vue2.js +74 -72
- package/dist/components/v2/Drawer/Drawer.css +1 -1
- package/dist/components/v2/Drawer/Drawer.vue.js +1 -1
- package/dist/components/v2/Drawer/Drawer.vue2.js +44 -42
- package/dist/components/v2/Popover/Popover.css +1 -1
- package/dist/components/v2/Popover/Popover.types.d.ts +13 -0
- package/dist/components/v2/Popover/Popover.vue.d.ts +1 -0
- package/dist/components/v2/Popover/Popover.vue.js +2 -2
- package/dist/components/v2/Popover/Popover.vue2.js +34 -33
- package/dist/components/v2/Schedule/Schedule.css +1 -1
- package/dist/components/v2/Schedule/Schedule.vue.js +3 -3
- package/dist/components/v2/Schedule/Schedule.vue2.js +5 -4
- package/dist/components/v2/shared/useLayerZIndex.util.d.ts +10 -0
- package/dist/components/v2/shared/useLayerZIndex.util.js +25 -13
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Search as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useIsMobile as
|
|
8
|
-
import { useTestId as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as ze, useModel as _e, useId as Ue, useAttrs as Xe, computed as u, ref as E, useTemplateRef as I, shallowRef as Ke, watch as R, onMounted as je, nextTick as W, onBeforeUnmount as Qe, openBlock as r, createElementBlock as v, mergeProps as f, unref as s, createTextVNode as Y, toDisplayString as w, createCommentVNode as x, createVNode as M, withCtx as Z, createElementVNode as y, renderSlot as G, Fragment as we, renderList as Ce, createBlock as ee, resolveDynamicComponent as He, withModifiers as ae, mergeModels as Ie } from "vue";
|
|
2
|
+
import { Search as Je, CircleX as Ye, X as Ze, ChevronDown as ea } from "@lucide/vue";
|
|
3
|
+
import aa from "../Input/Input.vue.js";
|
|
4
|
+
import la from "../Popover/Popover.vue.js";
|
|
5
|
+
import ta from "../Radio/RadioMarker.vue.js";
|
|
6
|
+
import oa from "../Select/SelectCheckMarker.vue.js";
|
|
7
|
+
import { useIsMobile as ia } from "../shared/useIsMobile.util.js";
|
|
8
|
+
import { useTestId as sa } from "../shared/useTestId.util.js";
|
|
9
|
+
const ua = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "aria-label", "aria-describedby", "aria-activedescendant", "aria-required"], na = ["aria-hidden"], ra = ["src"], ca = { class: "combobox__chip-label" }, da = ["disabled", "tabindex", "aria-label", "onClick"], va = ["aria-hidden"], fa = ["aria-label"], ba = ["disabled"], ma = { class: "combobox-list" }, ha = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "combobox-list__search"
|
|
12
|
-
},
|
|
12
|
+
}, pa = ["aria-label", "aria-multiselectable"], xa = ["id", "aria-selected", "aria-disabled", "onClick", "onMouseenter"], ya = { class: "combobox-list__label" }, ga = 64, Ta = /* @__PURE__ */ ze({
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "Combobox",
|
|
15
|
-
props: /* @__PURE__ */
|
|
15
|
+
props: /* @__PURE__ */ Ie({
|
|
16
16
|
options: {},
|
|
17
17
|
multiple: { type: Boolean, default: !1 },
|
|
18
18
|
filter: { type: Boolean, default: !0 },
|
|
@@ -46,18 +46,18 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
46
46
|
search: { default: "" },
|
|
47
47
|
searchModifiers: {}
|
|
48
48
|
}),
|
|
49
|
-
emits: /* @__PURE__ */
|
|
50
|
-
setup(i, { emit:
|
|
51
|
-
const o = i, p =
|
|
49
|
+
emits: /* @__PURE__ */ Ie(["change", "select", "search", "clear"], ["update:modelValue", "update:search"]),
|
|
50
|
+
setup(i, { emit: Re }) {
|
|
51
|
+
const o = i, p = Re, S = _e(i, "modelValue"), n = _e(i, "search"), N = Ue(), le = `combobox-input-${N}`, te = `combobox-label-${N}`, C = `combobox-list-${N}`, oe = `combobox-message-${N}`, d = sa(() => o.testId), z = Xe(), Me = u(() => ({
|
|
52
52
|
class: z.class,
|
|
53
53
|
style: z.style
|
|
54
|
-
})),
|
|
54
|
+
})), Se = u(() => {
|
|
55
55
|
const { class: e, style: a, ...l } = z;
|
|
56
56
|
return l;
|
|
57
|
-
}), k =
|
|
57
|
+
}), k = ia(o.breakpointMobile), b = E(!1), ie = I("fieldRef"), V = I("contentRef"), se = I("chipsRef"), ue = I("counterRef"), L = I("inputRef"), ne = I("listRef"), _ = E(Number.MAX_SAFE_INTEGER), U = E(0), c = E(-1), m = u(() => {
|
|
58
58
|
const e = S.value;
|
|
59
59
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
60
|
-
}), X =
|
|
60
|
+
}), X = Ke(/* @__PURE__ */ new Map());
|
|
61
61
|
R(
|
|
62
62
|
[m, () => o.options],
|
|
63
63
|
() => {
|
|
@@ -81,53 +81,53 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
81
81
|
() => T.value.map((e) => e.label).join(", ")
|
|
82
82
|
), K = u(
|
|
83
83
|
() => o.multiple && T.value.length > 0
|
|
84
|
-
),
|
|
84
|
+
), Te = u(
|
|
85
85
|
() => !o.multiple && !o.disabled && m.value.length > 0
|
|
86
|
-
),
|
|
86
|
+
), $e = u(() => "Очистить поле"), D = u(
|
|
87
87
|
() => Math.max(0, T.value.length - _.value)
|
|
88
|
-
), $ = E(!1),
|
|
88
|
+
), $ = E(!1), Ae = u(() => b.value && $.value ? n.value : o.multiple ? "" : re.value), Be = u(() => K.value ? "" : o.placeholder), g = u(() => {
|
|
89
89
|
const e = n.value.trim().toLowerCase();
|
|
90
90
|
return !o.filter || !e ? o.options : o.options.filter(
|
|
91
91
|
(a) => a.label.toLowerCase().includes(e)
|
|
92
92
|
);
|
|
93
|
-
}),
|
|
93
|
+
}), Ee = u(
|
|
94
94
|
() => o.loading || g.value.length > 0
|
|
95
|
-
),
|
|
96
|
-
get: () => b.value && (!o.hideEmptyList || k.value ||
|
|
95
|
+
), ce = u(() => n.value.trim().length > 0), de = u(() => ce.value || o.options.length > 0), F = u({
|
|
96
|
+
get: () => b.value && (!o.hideEmptyList || k.value || Ee.value || ce.value),
|
|
97
97
|
set: (e) => {
|
|
98
98
|
b.value = e;
|
|
99
99
|
}
|
|
100
100
|
}), j = u(
|
|
101
101
|
() => o.invalid ? o.errorText ?? o.supportText : o.supportText
|
|
102
|
-
),
|
|
103
|
-
() =>
|
|
102
|
+
), Ne = u(() => o.width ?? U.value), ve = u(
|
|
103
|
+
() => F.value && c.value !== -1 ? `${C}-option-${c.value}` : void 0
|
|
104
104
|
), Ve = u(() => [
|
|
105
105
|
"combobox",
|
|
106
106
|
`combobox--${o.size}`,
|
|
107
107
|
{
|
|
108
108
|
/* Стрелка и рамка следуют за видимым списком, а не за намерением открыть. */
|
|
109
|
-
"combobox--open":
|
|
109
|
+
"combobox--open": F.value,
|
|
110
110
|
"combobox--invalid": o.invalid,
|
|
111
111
|
"combobox--disabled": o.disabled,
|
|
112
112
|
"combobox--multiple": o.multiple
|
|
113
113
|
}
|
|
114
114
|
]);
|
|
115
|
-
function
|
|
115
|
+
function A(e) {
|
|
116
116
|
return m.value.includes(e);
|
|
117
117
|
}
|
|
118
118
|
function Q(e) {
|
|
119
119
|
const a = g.value[e];
|
|
120
120
|
return !!a && !a?.disabled;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function fe() {
|
|
123
123
|
return g.value.findIndex((e, a) => Q(a));
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Le() {
|
|
126
126
|
for (let e = g.value.length - 1; e >= 0; e -= 1)
|
|
127
127
|
if (Q(e)) return e;
|
|
128
128
|
return -1;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function be(e, a) {
|
|
131
131
|
const l = g.value.length;
|
|
132
132
|
if (l === 0) return -1;
|
|
133
133
|
let t = e;
|
|
@@ -135,20 +135,20 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
135
135
|
if (t = (t + a + l) % l, Q(t)) return t;
|
|
136
136
|
return -1;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function q() {
|
|
139
139
|
k.value || L.value?.focus();
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function B() {
|
|
142
142
|
o.disabled || b.value || (b.value = !0);
|
|
143
143
|
}
|
|
144
144
|
function O() {
|
|
145
145
|
b.value = !1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
o.disabled || (S.value = void 0, p("change", void 0), p("clear"), $.value = !1, n.value && (n.value = "", p("search", "")),
|
|
147
|
+
function De() {
|
|
148
|
+
o.disabled || (S.value = void 0, p("change", void 0), p("clear"), $.value = !1, n.value && (n.value = "", p("search", "")), q());
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
e.stopPropagation(), !o.disabled && (
|
|
150
|
+
function Fe(e) {
|
|
151
|
+
e.stopPropagation(), !o.disabled && (B(), q());
|
|
152
152
|
}
|
|
153
153
|
function qe() {
|
|
154
154
|
if (!o.disabled) {
|
|
@@ -156,40 +156,40 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
156
156
|
O();
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
|
-
|
|
159
|
+
B(), q();
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function me(e) {
|
|
163
163
|
const a = e.target.value;
|
|
164
|
-
$.value = !0, n.value = a, p("search", a),
|
|
164
|
+
$.value = !0, n.value = a, p("search", a), B();
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Oe(e) {
|
|
167
167
|
k.value || e.preventDefault();
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Pe(e, a) {
|
|
170
170
|
a || (c.value = e);
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function he(e) {
|
|
173
173
|
switch (e.key) {
|
|
174
174
|
case "ArrowDown":
|
|
175
175
|
if (e.preventDefault(), !b.value) {
|
|
176
|
-
|
|
176
|
+
B();
|
|
177
177
|
break;
|
|
178
178
|
}
|
|
179
|
-
c.value =
|
|
179
|
+
c.value = be(c.value, 1);
|
|
180
180
|
break;
|
|
181
181
|
case "ArrowUp":
|
|
182
182
|
if (e.preventDefault(), !b.value) {
|
|
183
|
-
|
|
183
|
+
B();
|
|
184
184
|
break;
|
|
185
185
|
}
|
|
186
|
-
c.value = c.value === -1 ?
|
|
186
|
+
c.value = c.value === -1 ? Le() : be(c.value, -1);
|
|
187
187
|
break;
|
|
188
188
|
case "Enter": {
|
|
189
189
|
if (!b.value) break;
|
|
190
190
|
const a = g.value[c.value];
|
|
191
191
|
if (!a) break;
|
|
192
|
-
e.preventDefault(),
|
|
192
|
+
e.preventDefault(), pe(a);
|
|
193
193
|
break;
|
|
194
194
|
}
|
|
195
195
|
case "Escape":
|
|
@@ -206,29 +206,29 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
206
206
|
if (!o.multiple || n.value) break;
|
|
207
207
|
const a = m.value[m.value.length - 1];
|
|
208
208
|
if (a === void 0) break;
|
|
209
|
-
|
|
209
|
+
xe(a);
|
|
210
210
|
break;
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function pe(e) {
|
|
215
215
|
if (!(e.disabled || o.disabled)) {
|
|
216
216
|
if (o.multiple) {
|
|
217
|
-
const a =
|
|
218
|
-
S.value = a, p("change", a), n.value && (n.value = "", p("search", "")),
|
|
217
|
+
const a = A(e.value) ? m.value.filter((l) => l !== e.value) : [...m.value, e.value];
|
|
218
|
+
S.value = a, p("change", a), n.value && (n.value = "", p("search", "")), q();
|
|
219
219
|
} else
|
|
220
220
|
S.value = e.value, p("change", e.value), O(), k.value || L.value?.focus();
|
|
221
221
|
p("select", e);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function xe(e) {
|
|
225
225
|
if (o.disabled) return;
|
|
226
226
|
const a = m.value.filter((l) => l !== e);
|
|
227
227
|
S.value = a, p("change", a);
|
|
228
228
|
}
|
|
229
229
|
function H() {
|
|
230
230
|
if (!o.multiple) return;
|
|
231
|
-
const e =
|
|
231
|
+
const e = V.value, a = se.value;
|
|
232
232
|
if (!e || !a) return;
|
|
233
233
|
const l = Array.from(
|
|
234
234
|
a.querySelectorAll('[data-chip="item"]')
|
|
@@ -237,39 +237,39 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
237
237
|
_.value = Number.MAX_SAFE_INTEGER;
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
240
|
-
const t = Number.parseFloat(getComputedStyle(a).columnGap) || 0, h = Number.parseFloat(getComputedStyle(e).columnGap) || 0,
|
|
241
|
-
let
|
|
242
|
-
for (const
|
|
243
|
-
const
|
|
244
|
-
if (
|
|
245
|
-
|
|
240
|
+
const t = Number.parseFloat(getComputedStyle(a).columnGap) || 0, h = Number.parseFloat(getComputedStyle(e).columnGap) || 0, ye = D.value ? (ue.value?.offsetWidth ?? 0) + h : 0, We = e.clientWidth - ye - ga - h;
|
|
241
|
+
let ge = 0, J = 0;
|
|
242
|
+
for (const Ge of l) {
|
|
243
|
+
const ke = ge + (J ? t : 0) + Ge.offsetWidth;
|
|
244
|
+
if (ke > We) break;
|
|
245
|
+
ge = ke, J += 1;
|
|
246
246
|
}
|
|
247
247
|
_.value = Math.max(J, 1);
|
|
248
248
|
}
|
|
249
249
|
let P;
|
|
250
|
-
return
|
|
250
|
+
return je(() => {
|
|
251
251
|
const e = ie.value;
|
|
252
252
|
e && (U.value = e.getBoundingClientRect().width, W(H), P = new ResizeObserver((a) => {
|
|
253
253
|
for (const l of a)
|
|
254
254
|
l.target === e && (U.value = l.borderBoxSize?.[0]?.inlineSize ?? e.getBoundingClientRect().width);
|
|
255
255
|
H();
|
|
256
|
-
}), P.observe(e),
|
|
257
|
-
}),
|
|
256
|
+
}), P.observe(e), V.value && P.observe(V.value));
|
|
257
|
+
}), Qe(() => P?.disconnect()), R(
|
|
258
258
|
() => T.value.map((e) => e.value).join("|"),
|
|
259
259
|
() => {
|
|
260
260
|
_.value = Number.MAX_SAFE_INTEGER, W(H);
|
|
261
261
|
}
|
|
262
262
|
), R([g, n], () => {
|
|
263
|
-
c.value = n.value ?
|
|
263
|
+
c.value = n.value ? fe() : -1;
|
|
264
264
|
}), R(b, (e) => {
|
|
265
265
|
if (e) {
|
|
266
|
-
c.value = n.value ?
|
|
266
|
+
c.value = n.value ? fe() : -1, $.value = !1, !k.value && !o.multiple && re.value && W(() => L.value?.select());
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
269
|
c.value = -1, $.value = !1, n.value && (n.value = "", p("search", ""));
|
|
270
270
|
}), R(c, (e) => {
|
|
271
271
|
e !== -1 && W(() => {
|
|
272
|
-
|
|
272
|
+
ne.value?.querySelector(
|
|
273
273
|
`#${CSS.escape(`${C}-option-${e}`)}`
|
|
274
274
|
)?.scrollIntoView({ block: "nearest" });
|
|
275
275
|
});
|
|
@@ -278,7 +278,7 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
278
278
|
(e) => {
|
|
279
279
|
e && O();
|
|
280
280
|
}
|
|
281
|
-
), (e, a) => (r(), v("div", f({ class: Ve.value }, { ...
|
|
281
|
+
), (e, a) => (r(), v("div", f({ class: Ve.value }, { ...Me.value, ...s(d)("root") }), [
|
|
282
282
|
i.label ? (r(), v("label", f({
|
|
283
283
|
key: 0,
|
|
284
284
|
id: te,
|
|
@@ -292,10 +292,10 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
292
292
|
"aria-hidden": "true"
|
|
293
293
|
}, s(d)("required")), "*", 16)) : x("", !0)
|
|
294
294
|
], 16)) : x("", !0),
|
|
295
|
-
M(s(
|
|
296
|
-
open:
|
|
297
|
-
"onUpdate:open": a[1] || (a[1] = (l) =>
|
|
298
|
-
width:
|
|
295
|
+
M(s(la), {
|
|
296
|
+
open: F.value,
|
|
297
|
+
"onUpdate:open": a[1] || (a[1] = (l) => F.value = l),
|
|
298
|
+
width: Ne.value,
|
|
299
299
|
side: i.side,
|
|
300
300
|
"side-offset": i.sideOffset,
|
|
301
301
|
align: i.align,
|
|
@@ -312,10 +312,10 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
312
312
|
ref_key: "fieldRef",
|
|
313
313
|
ref: ie,
|
|
314
314
|
class: "combobox__field"
|
|
315
|
-
}, s(d)("field"), { onClick:
|
|
315
|
+
}, s(d)("field"), { onClick: Fe }), [
|
|
316
316
|
y("div", {
|
|
317
317
|
ref_key: "contentRef",
|
|
318
|
-
ref:
|
|
318
|
+
ref: V,
|
|
319
319
|
class: "combobox__content"
|
|
320
320
|
}, [
|
|
321
321
|
y("input", f({
|
|
@@ -328,30 +328,30 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
328
328
|
autocomplete: "off",
|
|
329
329
|
spellcheck: "false",
|
|
330
330
|
"aria-autocomplete": "list",
|
|
331
|
-
value:
|
|
332
|
-
placeholder:
|
|
331
|
+
value: Ae.value,
|
|
332
|
+
placeholder: Be.value,
|
|
333
333
|
disabled: i.disabled,
|
|
334
334
|
readonly: s(k),
|
|
335
335
|
"aria-labelledby": i.label ? te : void 0,
|
|
336
336
|
"aria-label": i.label ? void 0 : i.ariaLabel,
|
|
337
337
|
"aria-describedby": j.value ? oe : void 0,
|
|
338
|
-
"aria-activedescendant":
|
|
338
|
+
"aria-activedescendant": ve.value,
|
|
339
339
|
"aria-required": i.required || void 0
|
|
340
340
|
}, {
|
|
341
341
|
...l,
|
|
342
|
-
...
|
|
342
|
+
...Se.value,
|
|
343
343
|
...s(d)("input")
|
|
344
344
|
}, {
|
|
345
|
-
onInput:
|
|
346
|
-
onKeydown:
|
|
347
|
-
}), null, 16,
|
|
345
|
+
onInput: me,
|
|
346
|
+
onKeydown: he
|
|
347
|
+
}), null, 16, ua),
|
|
348
348
|
K.value ? (r(), v("span", {
|
|
349
349
|
key: 0,
|
|
350
350
|
ref_key: "chipsRef",
|
|
351
351
|
ref: se,
|
|
352
352
|
class: "combobox__chips"
|
|
353
353
|
}, [
|
|
354
|
-
(r(!0), v(
|
|
354
|
+
(r(!0), v(we, null, Ce(T.value, (t, h) => (r(), v("span", f({
|
|
355
355
|
key: t.value,
|
|
356
356
|
"data-chip": "item",
|
|
357
357
|
class: ["combobox__chip", {
|
|
@@ -368,12 +368,12 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
368
368
|
class: "combobox__chip-avatar",
|
|
369
369
|
src: t.avatar,
|
|
370
370
|
alt: ""
|
|
371
|
-
}, null, 8,
|
|
371
|
+
}, null, 8, ra)) : t.icon ? (r(), ee(He(t.icon), {
|
|
372
372
|
key: 1,
|
|
373
373
|
class: "combobox__chip-icon",
|
|
374
374
|
"aria-hidden": "true"
|
|
375
375
|
})) : x("", !0),
|
|
376
|
-
y("span",
|
|
376
|
+
y("span", ca, w(t.label), 1)
|
|
377
377
|
], !0),
|
|
378
378
|
y("button", f({
|
|
379
379
|
type: "button",
|
|
@@ -382,38 +382,38 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
382
382
|
tabindex: h >= _.value ? -1 : void 0,
|
|
383
383
|
"aria-label": `Убрать ${t.label}`
|
|
384
384
|
}, { ref_for: !0 }, s(d)("chip-remove", t.value), {
|
|
385
|
-
onClick: ae((
|
|
385
|
+
onClick: ae((ye) => xe(t.value), ["stop"])
|
|
386
386
|
}), [
|
|
387
|
-
M(s(
|
|
387
|
+
M(s(Ye), {
|
|
388
388
|
class: "combobox__chip-icon",
|
|
389
389
|
"aria-hidden": "true"
|
|
390
390
|
})
|
|
391
|
-
], 16,
|
|
391
|
+
], 16, da)
|
|
392
392
|
], 16, na))), 128))
|
|
393
393
|
], 512)) : x("", !0),
|
|
394
394
|
K.value ? (r(), v("span", f({
|
|
395
395
|
key: 1,
|
|
396
396
|
ref_key: "counterRef",
|
|
397
|
-
ref:
|
|
397
|
+
ref: ue,
|
|
398
398
|
class: ["combobox__chip combobox__chip--counter", {
|
|
399
399
|
"combobox__chip--measured": !D.value
|
|
400
400
|
}],
|
|
401
401
|
"aria-hidden": !D.value || void 0
|
|
402
|
-
}, s(d)("chip-counter")), " +" + w(D.value || 1), 17,
|
|
402
|
+
}, s(d)("chip-counter")), " +" + w(D.value || 1), 17, va)) : x("", !0)
|
|
403
403
|
], 512),
|
|
404
|
-
|
|
404
|
+
Te.value ? (r(), v("button", f({
|
|
405
405
|
key: 0,
|
|
406
406
|
type: "button",
|
|
407
407
|
class: "combobox__clear-button",
|
|
408
|
-
"aria-label":
|
|
408
|
+
"aria-label": $e.value
|
|
409
409
|
}, s(d)("clear"), {
|
|
410
|
-
onClick: ae(
|
|
410
|
+
onClick: ae(De, ["stop"])
|
|
411
411
|
}), [
|
|
412
|
-
M(s(
|
|
412
|
+
M(s(Ze), {
|
|
413
413
|
class: "combobox__clear",
|
|
414
414
|
"aria-hidden": "true"
|
|
415
415
|
})
|
|
416
|
-
], 16,
|
|
416
|
+
], 16, fa)) : x("", !0),
|
|
417
417
|
y("button", f({
|
|
418
418
|
type: "button",
|
|
419
419
|
class: "combobox__arrow-button",
|
|
@@ -423,39 +423,39 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
423
423
|
}, s(d)("arrow"), {
|
|
424
424
|
onClick: ae(qe, ["stop"])
|
|
425
425
|
}), [
|
|
426
|
-
M(s(
|
|
427
|
-
], 16,
|
|
426
|
+
M(s(ea), { class: "combobox__arrow" })
|
|
427
|
+
], 16, ba)
|
|
428
428
|
], 16)
|
|
429
429
|
]),
|
|
430
430
|
default: Z(() => [
|
|
431
|
-
y("div",
|
|
432
|
-
s(k) ? (r(), v("div",
|
|
433
|
-
M(s(
|
|
431
|
+
y("div", ma, [
|
|
432
|
+
s(k) ? (r(), v("div", ha, [
|
|
433
|
+
M(s(aa), f({
|
|
434
434
|
modelValue: n.value,
|
|
435
435
|
"onUpdate:modelValue": a[0] || (a[0] = (l) => n.value = l),
|
|
436
436
|
"native-type": "search",
|
|
437
437
|
placeholder: i.searchPlaceholder,
|
|
438
438
|
"aria-label": i.searchPlaceholder,
|
|
439
439
|
"aria-controls": C,
|
|
440
|
-
"aria-activedescendant":
|
|
440
|
+
"aria-activedescendant": ve.value,
|
|
441
441
|
"aria-autocomplete": "list",
|
|
442
442
|
autocomplete: "off",
|
|
443
443
|
spellcheck: "false"
|
|
444
444
|
}, s(d)("search"), {
|
|
445
|
-
onInput:
|
|
446
|
-
onKeydown:
|
|
445
|
+
onInput: me,
|
|
446
|
+
onKeydown: he
|
|
447
447
|
}), {
|
|
448
448
|
prefix: Z(() => [
|
|
449
|
-
M(s(
|
|
449
|
+
M(s(Je), { "aria-hidden": "true" })
|
|
450
450
|
]),
|
|
451
451
|
_: 1
|
|
452
452
|
}, 16, ["modelValue", "placeholder", "aria-label", "aria-activedescendant"])
|
|
453
453
|
])) : x("", !0),
|
|
454
454
|
y("div", {
|
|
455
455
|
ref_key: "listRef",
|
|
456
|
-
ref:
|
|
456
|
+
ref: ne,
|
|
457
457
|
class: "combobox-list__scroll",
|
|
458
|
-
onMousedown:
|
|
458
|
+
onMousedown: Oe
|
|
459
459
|
}, [
|
|
460
460
|
y("div", {
|
|
461
461
|
id: C,
|
|
@@ -472,7 +472,7 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
472
472
|
Y(w(i.loadingText), 1)
|
|
473
473
|
], !0)
|
|
474
474
|
], 16)) : x("", !0),
|
|
475
|
-
(r(!0), v(
|
|
475
|
+
(r(!0), v(we, null, Ce(g.value, (l, t) => (r(), v("div", f({
|
|
476
476
|
id: `${C}-option-${t}`,
|
|
477
477
|
key: l.value,
|
|
478
478
|
role: "option",
|
|
@@ -480,43 +480,41 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
480
480
|
"combobox-list__option--active": c.value === t,
|
|
481
481
|
"combobox-list__option--disabled": l.disabled
|
|
482
482
|
}],
|
|
483
|
-
"aria-selected":
|
|
483
|
+
"aria-selected": A(l.value),
|
|
484
484
|
"aria-disabled": l.disabled || void 0
|
|
485
485
|
}, { ref_for: !0 }, s(d)("option", l.value), {
|
|
486
|
-
onClick: (h) =>
|
|
487
|
-
onMouseenter: (h) =>
|
|
486
|
+
onClick: (h) => pe(l),
|
|
487
|
+
onMouseenter: (h) => Pe(t, l.disabled)
|
|
488
488
|
}), [
|
|
489
|
-
i.multiple ? (r(), ee(
|
|
489
|
+
i.multiple ? (r(), ee(oa, {
|
|
490
490
|
key: 0,
|
|
491
|
-
checked:
|
|
491
|
+
checked: A(l.value),
|
|
492
492
|
disabled: l.disabled,
|
|
493
493
|
state: c.value === t ? "hover" : "default"
|
|
494
|
-
}, null, 8, ["checked", "disabled", "state"])) : (r(), ee(s(
|
|
494
|
+
}, null, 8, ["checked", "disabled", "state"])) : (r(), ee(s(ta), {
|
|
495
495
|
key: 1,
|
|
496
|
-
checked:
|
|
496
|
+
checked: A(l.value),
|
|
497
497
|
disabled: l.disabled,
|
|
498
498
|
state: c.value === t ? "hover" : "default"
|
|
499
499
|
}, null, 8, ["checked", "disabled", "state"])),
|
|
500
500
|
G(e.$slots, "option", {
|
|
501
501
|
option: l,
|
|
502
|
-
selected:
|
|
502
|
+
selected: A(l.value),
|
|
503
503
|
active: c.value === t,
|
|
504
504
|
index: t
|
|
505
505
|
}, () => [
|
|
506
|
-
y("span",
|
|
506
|
+
y("span", ya, w(l.label), 1)
|
|
507
507
|
], !0)
|
|
508
|
-
], 16,
|
|
508
|
+
], 16, xa))), 128)),
|
|
509
509
|
!i.loading && !g.value.length ? (r(), v("p", f({
|
|
510
510
|
key: 1,
|
|
511
511
|
class: "combobox-list__status"
|
|
512
512
|
}, s(d)("empty")), [
|
|
513
|
-
G(e.$slots, "empty", {
|
|
514
|
-
|
|
515
|
-
}, () => [
|
|
516
|
-
Y(w(i.options.length ? i.notFoundText : i.emptyText), 1)
|
|
513
|
+
G(e.$slots, "empty", { notFound: de.value }, () => [
|
|
514
|
+
Y(w(de.value ? i.notFoundText : i.emptyText), 1)
|
|
517
515
|
], !0)
|
|
518
516
|
], 16)) : x("", !0)
|
|
519
|
-
], 8,
|
|
517
|
+
], 8, pa)
|
|
520
518
|
], 544)
|
|
521
519
|
])
|
|
522
520
|
]),
|
|
@@ -531,5 +529,5 @@ const sa = ["value", "placeholder", "disabled", "readonly", "aria-labelledby", "
|
|
|
531
529
|
}
|
|
532
530
|
});
|
|
533
531
|
export {
|
|
534
|
-
|
|
532
|
+
Ta as default
|
|
535
533
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.dialog-trigger[data-v-
|
|
1
|
+
.dialog-trigger[data-v-a32e6353]{display:contents}.dialog-layer[data-v-a32e6353]{position:relative}.dialog-content[data-v-a32e6353]{background-color:var(--theme-neutral-0);z-index:1002;border-radius:12px;max-width:90vw;padding:24px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 2px 5px #3a3a3a40}.dialog-content[data-state=open][data-v-a32e6353]{animation:fadeIn var(--animation-duration) ease-in-out}.dialog-content[data-state=closed][data-v-a32e6353]{animation:fadeOut var(--animation-duration) ease-in-out}.dialog-content__header[data-v-a32e6353]{justify-content:space-between;align-items:flex-start;gap:12px;width:100%;height:auto;margin-bottom:16px;display:flex}.dialog-content__header--divided[data-v-a32e6353]{margin-bottom:12px}.dialog-content__heading[data-v-a32e6353]{flex:1 1 0;align-items:center;gap:12px;min-width:0;display:flex}.dialog-content__icon[data-v-a32e6353]{flex-shrink:0;justify-content:center;align-items:center;display:flex}.dialog-content__divider[data-v-a32e6353]{background-color:var(--theme-secondary-250);flex:none;width:100%;height:1px;margin-bottom:12px}.dialog-content__close[data-v-a32e6353]{background:0 0;border:none;justify-content:center;align-items:center;width:20px;min-width:20px;height:20px;margin-left:auto;padding:0;display:flex}.dialog-content__close[data-v-a32e6353]:focus-visible{outline:2px solid var(--theme-primary-500);outline-offset:2px}.dialog-content__close svg[data-v-a32e6353]{width:20px;height:20px;color:var(--color-secondary-400);transition:color .3s ease-in-out}.dialog-content__close[data-v-a32e6353]:hover{cursor:pointer}.dialog-content__close:hover svg[data-v-a32e6353]{color:var(--color-secondary-500);transition:color .3s ease-in-out}.dialog-content__wrapper[data-v-a32e6353]{flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:12px;width:100%;height:auto;display:flex}.dialog-content__wrapper[data-v-a32e6353]:not(:last-child){margin-bottom:32px}.dialog-content__actions[data-v-a32e6353]{justify-content:flex-end;align-items:center;gap:8px;width:100%;height:auto;display:flex}@media (max-width:1010px){.dialog-content[data-v-a32e6353]{box-sizing:border-box;flex-direction:column;height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);display:flex}.dialog-content__header[data-v-a32e6353]{flex:none}.dialog-content__wrapper[data-v-a32e6353]{box-sizing:content-box;scrollbar-width:thin;scrollbar-color:var(--theme-neutral-icon-primary) var(--theme-neutral-surface-icon);flex:1 1 0;min-height:0;overflow-y:auto}.dialog-content__wrapper[data-v-a32e6353]::-webkit-scrollbar{width:8px;height:0}.dialog-content__wrapper[data-v-a32e6353]::-webkit-scrollbar-thumb{background-color:var(--theme-neutral-icon-primary);background-clip:padding-box;border:1px solid #0000;border-radius:999px}.dialog-content__wrapper[data-v-a32e6353]::-webkit-scrollbar-track{background:var(--theme-neutral-surface-icon);border-radius:4px}.dialog-content__wrapper[data-v-a32e6353]::-webkit-scrollbar-corner{background:0 0}.dialog-content__actions[data-v-a32e6353]{flex:none}}.dialog-content__title[data-v-a32e6353]{width:100%;font-weight:500}.dialog-content__title--with-icon[data-v-a32e6353]{font-weight:700}.dialog-mobile[data-v-a32e6353]{width:100%;padding:0 16px 16px;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px));flex-direction:column;gap:16px;display:flex}.dialog-mobile__header[data-v-a32e6353]{align-items:center;gap:12px;display:flex}.dialog-mobile__icon[data-v-a32e6353]{flex-shrink:0;justify-content:center;align-items:center;display:flex}.dialog-mobile__divider[data-v-a32e6353]{background-color:var(--theme-secondary-250);width:100%;height:1px;margin-top:-4px}.dialog-mobile__title[data-v-a32e6353]{color:var(--theme-neutral-text-title);font-size:1.125rem;font-weight:500;line-height:1.5}.dialog-mobile__content[data-v-a32e6353]{flex-direction:column;gap:12px;display:flex}.dialog-mobile__actions[data-v-a32e6353]{flex-direction:column-reverse;gap:8px;width:100%;display:flex}.dialog-mobile__actions[data-v-a32e6353] button{width:100%}
|
|
@@ -2,7 +2,7 @@ import './Dialog.css';
|
|
|
2
2
|
import o from "./Dialog.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a32e6353"]]);
|
|
6
6
|
export {
|
|
7
7
|
p as default
|
|
8
8
|
};
|