@retailcrm/embed-ui-v1-components 0.9.7 → 0.9.9
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/assets/stylesheets/motion.less +1 -0
- package/assets/stylesheets/typography.less +9 -0
- package/dist/host.cjs +939 -304
- package/dist/host.css +320 -2
- package/dist/host.d.ts +76 -11
- package/dist/host.js +940 -305
- package/dist/remote.cjs +860 -0
- package/dist/remote.d.ts +564 -0
- package/dist/remote.js +861 -1
- package/package.json +1 -1
package/dist/host.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { createElementBlock, openBlock, createElementVNode, defineComponent, inject, ref, computed, mergeProps, useSlots, createBlock, resolveDynamicComponent, unref, withCtx, createCommentVNode, createVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, provide, Fragment, renderList, Text, Comment, h, reactive, watch, nextTick, onMounted, onActivated, onDeactivated, onBeforeUnmount, Teleport, getCurrentInstance, Transition, normalizeProps, guardReactiveProps, normalizeStyle, withDirectives, vShow, useAttrs, toHandlers, withModifiers, useId, shallowRef
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode, defineComponent, inject, ref, computed, mergeProps, useSlots, createBlock, resolveDynamicComponent, unref, withCtx, createCommentVNode, createVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, provide, Fragment, renderList, Text, Comment, h, reactive, watch, nextTick, onMounted, onActivated, onDeactivated, onBeforeUnmount, Teleport, getCurrentInstance, Transition, normalizeProps, guardReactiveProps, normalizeStyle, withDirectives, vShow, useAttrs, createSlots, toHandlers, withModifiers, useId, shallowRef } from "vue";
|
|
2
2
|
import { preview } from "@retailcrm/image-preview";
|
|
3
3
|
import isEqual from "lodash.isequal";
|
|
4
4
|
import { format, formatISO } from "date-fns";
|
|
5
5
|
import { PerfectScrollbar } from "vue3-perfect-scrollbar";
|
|
6
|
-
const _hoisted_1$
|
|
6
|
+
const _hoisted_1$q = {
|
|
7
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8
8
|
viewBox: "0 0 24 24"
|
|
9
9
|
};
|
|
10
|
-
function render$
|
|
11
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
10
|
+
function render$b(_ctx, _cache) {
|
|
11
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$q, [..._cache[0] || (_cache[0] = [
|
|
12
12
|
createElementVNode("path", {
|
|
13
13
|
fill: "currentColor",
|
|
14
14
|
"fill-rule": "evenodd",
|
|
@@ -17,34 +17,34 @@ function render$a(_ctx, _cache) {
|
|
|
17
17
|
}, null, -1)
|
|
18
18
|
])]);
|
|
19
19
|
}
|
|
20
|
-
const IconHelpOutlined = { render: render$
|
|
21
|
-
const _hoisted_1$
|
|
20
|
+
const IconHelpOutlined = { render: render$b };
|
|
21
|
+
const _hoisted_1$p = {
|
|
22
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23
23
|
viewBox: "0 0 18 8"
|
|
24
24
|
};
|
|
25
|
-
function render$
|
|
26
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
25
|
+
function render$a(_ctx, _cache) {
|
|
26
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$p, [..._cache[0] || (_cache[0] = [
|
|
27
27
|
createElementVNode("g", { fill: "currentColor" }, [
|
|
28
28
|
createElementVNode("path", { d: "M0 0v8h2.867q1.257-.011 1.935-.604.68-.594.68-1.748 0-.675-.33-1.143a1.54 1.54 0 0 0-.892-.62q.497-.21.775-.654.279-.45.279-1.039 0-1.077-.694-1.632Q3.926 0 2.584 0zm1.52 6.676v-2.16h1.393q1.048.016 1.048 1.116 0 .488-.303.77-.3.273-.836.274zm1.124-3.324H1.52V1.335h1.064q.628 0 .916.242.294.236.294.78 0 .972-1.15.995M7.503 6.352h2.665L10.679 8h1.616l-2.76-8H8.125L5.38 8h1.616zm2.254-1.336H7.913l.917-2.994zM12.362 8V0h2.27q.972 0 1.737.478.77.473 1.2 1.352.432.873.431 1.989v.368q0 1.115-.425 1.983a3.17 3.17 0 0 1-1.191 1.346A3.26 3.26 0 0 1 14.646 8zm1.52-6.665v5.34h.734q.891 0 1.363-.631.47-.632.481-1.808v-.423q0-1.22-.466-1.846-.466-.632-1.363-.632z" })
|
|
29
29
|
], -1)
|
|
30
30
|
])]);
|
|
31
31
|
}
|
|
32
|
-
const SpriteBAD = { render: render$
|
|
33
|
-
const _hoisted_1$
|
|
32
|
+
const SpriteBAD = { render: render$a };
|
|
33
|
+
const _hoisted_1$o = {
|
|
34
34
|
xmlns: "http://www.w3.org/2000/svg",
|
|
35
35
|
viewBox: "0 0 16 8"
|
|
36
36
|
};
|
|
37
|
-
function render$
|
|
38
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
37
|
+
function render$9(_ctx, _cache) {
|
|
38
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$o, [..._cache[0] || (_cache[0] = [
|
|
39
39
|
createElementVNode("g", { fill: "currentColor" }, [
|
|
40
40
|
createElementVNode("path", { d: "M3.373 6.016 5.058 0h1.704L4.175 8H2.577L0 0h1.7zM8.99 8H7.46V0H8.99zM11.84 8V5.181h1.343q1.322 0 2.067-.676.75-.681.75-1.857 0-.774-.342-1.379a2.3 2.3 0 0 0-.98-.94Q14.045 0 13.208 0H10.31v8zm1.368-4.154h-1.367v-2.51h1.403q.567.01.888.373t.322.95q0 .571-.322.88-.316.307-.924.307" })
|
|
41
41
|
], -1)
|
|
42
42
|
])]);
|
|
43
43
|
}
|
|
44
|
-
const SpriteVIP = { render: render$
|
|
44
|
+
const SpriteVIP = { render: render$9 };
|
|
45
45
|
const ImageWorkersKey = Symbol("$image.workers");
|
|
46
|
-
const _hoisted_1$
|
|
47
|
-
const _sfc_main$
|
|
46
|
+
const _hoisted_1$n = ["alt", "src"];
|
|
47
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
48
48
|
__name: "UiImage",
|
|
49
49
|
props: {
|
|
50
50
|
alt: {
|
|
@@ -80,7 +80,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
80
80
|
return openBlock(), createElementBlock("img", mergeProps({
|
|
81
81
|
alt: __props.alt,
|
|
82
82
|
src: url.value
|
|
83
|
-
}, _ctx.$attrs), null, 16, _hoisted_1$
|
|
83
|
+
}, _ctx.$attrs), null, 16, _hoisted_1$n);
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
});
|
|
@@ -100,12 +100,12 @@ const isURL = (href, loose = true) => {
|
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
const AvatarSizeKey = Symbol("UiAvatarSize");
|
|
103
|
-
var SIZE$
|
|
103
|
+
var SIZE$7 = /* @__PURE__ */ ((SIZE2) => {
|
|
104
104
|
SIZE2["XS"] = "xs";
|
|
105
105
|
SIZE2["SM"] = "sm";
|
|
106
106
|
SIZE2["LG"] = "lg";
|
|
107
107
|
return SIZE2;
|
|
108
|
-
})(SIZE$
|
|
108
|
+
})(SIZE$7 || {});
|
|
109
109
|
var STATUS = /* @__PURE__ */ ((STATUS2) => {
|
|
110
110
|
STATUS2["NONE"] = "";
|
|
111
111
|
STATUS2["BUSY"] = "busy";
|
|
@@ -114,27 +114,27 @@ var STATUS = /* @__PURE__ */ ((STATUS2) => {
|
|
|
114
114
|
STATUS2["FREE"] = "free";
|
|
115
115
|
return STATUS2;
|
|
116
116
|
})(STATUS || {});
|
|
117
|
-
const _hoisted_1$
|
|
117
|
+
const _hoisted_1$m = {
|
|
118
118
|
key: 1,
|
|
119
119
|
class: "ui-v1-avatar__unresolved"
|
|
120
120
|
};
|
|
121
|
-
const _hoisted_2$
|
|
121
|
+
const _hoisted_2$9 = {
|
|
122
122
|
key: 3,
|
|
123
123
|
class: "ui-v1-avatar__initials"
|
|
124
124
|
};
|
|
125
|
-
const _hoisted_3$
|
|
125
|
+
const _hoisted_3$8 = {
|
|
126
126
|
key: 4,
|
|
127
127
|
class: "ui-v1-avatar__labels"
|
|
128
128
|
};
|
|
129
|
-
const _hoisted_4$
|
|
129
|
+
const _hoisted_4$6 = {
|
|
130
130
|
key: 0,
|
|
131
131
|
class: "ui-v1-avatar__label ui-v1-avatar__label_vip"
|
|
132
132
|
};
|
|
133
|
-
const _hoisted_5$
|
|
133
|
+
const _hoisted_5$5 = {
|
|
134
134
|
key: 1,
|
|
135
135
|
class: "ui-v1-avatar__label ui-v1-avatar__label_bad"
|
|
136
136
|
};
|
|
137
|
-
const _sfc_main$
|
|
137
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
138
138
|
__name: "UiAvatar",
|
|
139
139
|
props: {
|
|
140
140
|
/** Путь к изображению */
|
|
@@ -173,8 +173,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
173
173
|
/** Размер изображения */
|
|
174
174
|
size: {
|
|
175
175
|
type: String,
|
|
176
|
-
validator: (size) => Object.values(SIZE$
|
|
177
|
-
default: SIZE$
|
|
176
|
+
validator: (size) => Object.values(SIZE$7).includes(size),
|
|
177
|
+
default: SIZE$7.SM
|
|
178
178
|
},
|
|
179
179
|
optimize: {
|
|
180
180
|
type: [Boolean, Object],
|
|
@@ -202,9 +202,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
202
202
|
const processing = typeof props.optimize === "object" ? props.optimize : {};
|
|
203
203
|
return {
|
|
204
204
|
resize: processing.resize ?? {
|
|
205
|
-
[SIZE$
|
|
206
|
-
[SIZE$
|
|
207
|
-
[SIZE$
|
|
205
|
+
[SIZE$7.XS]: "48x-",
|
|
206
|
+
[SIZE$7.SM]: "72x-",
|
|
207
|
+
[SIZE$7.LG]: "104x-"
|
|
208
208
|
}[size.value],
|
|
209
209
|
crop: processing.crop
|
|
210
210
|
};
|
|
@@ -221,7 +221,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
221
221
|
}
|
|
222
222
|
}, _ctx.$attrs), {
|
|
223
223
|
default: withCtx(() => [
|
|
224
|
-
__props.src ? (openBlock(), createBlock(_sfc_main$
|
|
224
|
+
__props.src ? (openBlock(), createBlock(_sfc_main$t, {
|
|
225
225
|
key: 0,
|
|
226
226
|
src: __props.src,
|
|
227
227
|
resize: optimization.value.resize,
|
|
@@ -230,7 +230,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
230
230
|
draggable: "false",
|
|
231
231
|
onLoad: _cache[0] || (_cache[0] = ($event) => loaded.value = true),
|
|
232
232
|
onError: _cache[1] || (_cache[1] = ($event) => loaded.value = false)
|
|
233
|
-
}, null, 8, ["src", "resize", "crop"])) : !__props.src && unresolved.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
233
|
+
}, null, 8, ["src", "resize", "crop"])) : !__props.src && unresolved.value ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
234
234
|
createVNode(unref(IconHelpOutlined))
|
|
235
235
|
])) : createCommentVNode("", true),
|
|
236
236
|
__props.status && !(__props.vip || __props.bad) ? (openBlock(), createElementBlock("span", {
|
|
@@ -241,16 +241,16 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
241
241
|
[`ui-v1-avatar__status_${__props.status}`]: __props.status
|
|
242
242
|
})
|
|
243
243
|
}, null, 2)) : createCommentVNode("", true),
|
|
244
|
-
!(unresolved.value || loaded.value) ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
244
|
+
!(unresolved.value || loaded.value) ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
|
|
245
245
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
246
246
|
createTextVNode(toDisplayString(initials.value), 1)
|
|
247
247
|
])
|
|
248
248
|
])) : createCommentVNode("", true),
|
|
249
|
-
__props.vip || __props.bad ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
250
|
-
__props.vip ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
249
|
+
__props.vip || __props.bad ? (openBlock(), createElementBlock("div", _hoisted_3$8, [
|
|
250
|
+
__props.vip ? (openBlock(), createElementBlock("span", _hoisted_4$6, [
|
|
251
251
|
createVNode(unref(SpriteVIP), { class: "ui-v1-avatar__vip" })
|
|
252
252
|
])) : createCommentVNode("", true),
|
|
253
|
-
__props.bad ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
253
|
+
__props.bad ? (openBlock(), createElementBlock("span", _hoisted_5$5, [
|
|
254
254
|
createVNode(unref(SpriteBAD), { class: "ui-v1-avatar__bad" })
|
|
255
255
|
])) : createCommentVNode("", true)
|
|
256
256
|
])) : createCommentVNode("", true)
|
|
@@ -260,7 +260,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
262
|
});
|
|
263
|
-
const _sfc_main$
|
|
263
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
264
264
|
__name: "UiAvatarList",
|
|
265
265
|
props: {
|
|
266
266
|
/** Список аватарок пользователей */
|
|
@@ -271,8 +271,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
271
271
|
/** Размер аватарок */
|
|
272
272
|
size: {
|
|
273
273
|
type: String,
|
|
274
|
-
validator: (size) => Object.values(SIZE$
|
|
275
|
-
default: SIZE$
|
|
274
|
+
validator: (size) => Object.values(SIZE$7).includes(size),
|
|
275
|
+
default: SIZE$7.SM
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
setup(__props) {
|
|
@@ -287,7 +287,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
287
287
|
key: index,
|
|
288
288
|
class: "ui-v1-avatar-list__item"
|
|
289
289
|
}, [
|
|
290
|
-
createVNode(_sfc_main$
|
|
290
|
+
createVNode(_sfc_main$s, {
|
|
291
291
|
src: avatar.src,
|
|
292
292
|
name: avatar.name
|
|
293
293
|
}, null, 8, ["src", "name"])
|
|
@@ -341,20 +341,20 @@ var APPEARANCE$2 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
|
341
341
|
APPEARANCE2["TERTIARY"] = "tertiary";
|
|
342
342
|
return APPEARANCE2;
|
|
343
343
|
})(APPEARANCE$2 || {});
|
|
344
|
-
var SIZE$
|
|
344
|
+
var SIZE$6 = /* @__PURE__ */ ((SIZE2) => {
|
|
345
345
|
SIZE2["LG"] = "lg";
|
|
346
346
|
SIZE2["MD"] = "md";
|
|
347
347
|
SIZE2["SM"] = "sm";
|
|
348
348
|
SIZE2["XS"] = "xs";
|
|
349
349
|
return SIZE2;
|
|
350
|
-
})(SIZE$
|
|
350
|
+
})(SIZE$6 || {});
|
|
351
351
|
var VARIANT = /* @__PURE__ */ ((VARIANT2) => {
|
|
352
352
|
VARIANT2["DEFAULT"] = "default";
|
|
353
353
|
VARIANT2["SUCCESS"] = "success";
|
|
354
354
|
VARIANT2["DANGER"] = "danger";
|
|
355
355
|
return VARIANT2;
|
|
356
356
|
})(VARIANT || {});
|
|
357
|
-
const _sfc_main$
|
|
357
|
+
const _sfc_main$q = defineComponent({
|
|
358
358
|
props: {
|
|
359
359
|
/** Устанавливает тип кнопки */
|
|
360
360
|
type: {
|
|
@@ -380,7 +380,7 @@ const _sfc_main$m = defineComponent({
|
|
|
380
380
|
/** Размер */
|
|
381
381
|
size: {
|
|
382
382
|
type: String,
|
|
383
|
-
default: SIZE$
|
|
383
|
+
default: SIZE$6.SM
|
|
384
384
|
},
|
|
385
385
|
/** Если кнопка активна */
|
|
386
386
|
active: {
|
|
@@ -440,12 +440,12 @@ const _sfc_main$m = defineComponent({
|
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
});
|
|
443
|
-
const _hoisted_1$
|
|
443
|
+
const _hoisted_1$l = {
|
|
444
444
|
xmlns: "http://www.w3.org/2000/svg",
|
|
445
445
|
viewBox: "0 0 24 24"
|
|
446
446
|
};
|
|
447
|
-
function render$
|
|
448
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
447
|
+
function render$8(_ctx, _cache) {
|
|
448
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$l, [..._cache[0] || (_cache[0] = [
|
|
449
449
|
createElementVNode("path", {
|
|
450
450
|
fill: "currentColor",
|
|
451
451
|
"fill-rule": "evenodd",
|
|
@@ -454,7 +454,7 @@ function render$7(_ctx, _cache) {
|
|
|
454
454
|
}, null, -1)
|
|
455
455
|
])]);
|
|
456
456
|
}
|
|
457
|
-
const IconDone = { render: render$
|
|
457
|
+
const IconDone = { render: render$8 };
|
|
458
458
|
const expect = (value) => ({
|
|
459
459
|
toBeOneOf(variants) {
|
|
460
460
|
return Object.values(variants).includes(value);
|
|
@@ -475,11 +475,11 @@ const without = (obj, exclude) => {
|
|
|
475
475
|
});
|
|
476
476
|
return newObj;
|
|
477
477
|
};
|
|
478
|
-
const _hoisted_1$
|
|
479
|
-
const _hoisted_2$
|
|
478
|
+
const _hoisted_1$k = ["id", "value", "name", "disabled", "checked"];
|
|
479
|
+
const _hoisted_2$8 = { class: "ui-v1-checkbox__checkmark" };
|
|
480
480
|
let counter$2 = 0;
|
|
481
481
|
const __default__$1 = {};
|
|
482
|
-
const _sfc_main$
|
|
482
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
483
483
|
...__default__$1,
|
|
484
484
|
__name: "UiCheckbox",
|
|
485
485
|
props: {
|
|
@@ -586,8 +586,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
586
586
|
type: "checkbox",
|
|
587
587
|
class: "ui-v1-checkbox__input",
|
|
588
588
|
onChange
|
|
589
|
-
}), null, 16, _hoisted_1$
|
|
590
|
-
createElementVNode("span", _hoisted_2$
|
|
589
|
+
}), null, 16, _hoisted_1$k),
|
|
590
|
+
createElementVNode("span", _hoisted_2$8, [
|
|
591
591
|
checked.value && !__props.indeterminate ? (openBlock(), createBlock(unref(IconDone), {
|
|
592
592
|
key: 0,
|
|
593
593
|
class: "ui-v1-checkbox__checkmark-icon"
|
|
@@ -597,13 +597,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
|
-
const _hoisted_1$
|
|
600
|
+
const _hoisted_1$j = {
|
|
601
601
|
xmlns: "http://www.w3.org/2000/svg",
|
|
602
602
|
fill: "none",
|
|
603
603
|
viewBox: "0 0 24 24"
|
|
604
604
|
};
|
|
605
|
-
function render$
|
|
606
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
605
|
+
function render$7(_ctx, _cache) {
|
|
606
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$j, [..._cache[0] || (_cache[0] = [
|
|
607
607
|
createElementVNode("path", {
|
|
608
608
|
fill: "currentColor",
|
|
609
609
|
"fill-rule": "evenodd",
|
|
@@ -612,20 +612,20 @@ function render$6(_ctx, _cache) {
|
|
|
612
612
|
}, null, -1)
|
|
613
613
|
])]);
|
|
614
614
|
}
|
|
615
|
-
const IconCheckmarkCircleOutlined = { render: render$
|
|
616
|
-
const _hoisted_1$
|
|
615
|
+
const IconCheckmarkCircleOutlined = { render: render$7 };
|
|
616
|
+
const _hoisted_1$i = {
|
|
617
617
|
xmlns: "http://www.w3.org/2000/svg",
|
|
618
618
|
viewBox: "0 0 24 24"
|
|
619
619
|
};
|
|
620
|
-
function render$
|
|
621
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
620
|
+
function render$6(_ctx, _cache) {
|
|
621
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$i, [..._cache[0] || (_cache[0] = [
|
|
622
622
|
createElementVNode("path", {
|
|
623
623
|
fill: "currentColor",
|
|
624
624
|
d: "M18 16V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M4 4h12v12H4zm16 14V6a2 2 0 0 1 2 2v10a4 4 0 0 1-4 4H8a2 2 0 0 1-2-2h12a2 2 0 0 0 2-2"
|
|
625
625
|
}, null, -1)
|
|
626
626
|
])]);
|
|
627
627
|
}
|
|
628
|
-
const IconCopy = { render: render$
|
|
628
|
+
const IconCopy = { render: render$6 };
|
|
629
629
|
const isArray = Array.isArray;
|
|
630
630
|
const normalize = (triggers) => {
|
|
631
631
|
const show = isArray(triggers) ? triggers : triggers.show ?? [];
|
|
@@ -2292,8 +2292,8 @@ if (typeof document !== "undefined" && typeof window !== "undefined") {
|
|
|
2292
2292
|
window.addEventListener("click", onGlobalEvent("click"), true);
|
|
2293
2293
|
}
|
|
2294
2294
|
}
|
|
2295
|
-
const _hoisted_1$
|
|
2296
|
-
const _sfc_main$
|
|
2295
|
+
const _hoisted_1$h = { class: "ui-v1-popper__content" };
|
|
2296
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
2297
2297
|
__name: "UiPopper",
|
|
2298
2298
|
props: {
|
|
2299
2299
|
/** Флаг для ручного переключения видимости */
|
|
@@ -2379,6 +2379,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2379
2379
|
}
|
|
2380
2380
|
},
|
|
2381
2381
|
emits: [
|
|
2382
|
+
/** Элемент добавлен на страницу */
|
|
2383
|
+
"attached",
|
|
2382
2384
|
/** Смена значения флага видимости плавающего элемента */
|
|
2383
2385
|
"update:visible",
|
|
2384
2386
|
/** Появление плавающего элемента */
|
|
@@ -2479,6 +2481,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2479
2481
|
}
|
|
2480
2482
|
state.hiding = false;
|
|
2481
2483
|
state.attached = true;
|
|
2484
|
+
emit("attached");
|
|
2482
2485
|
showingScheduler.schedule(doShow, immediately ? 0 : delay.value.show);
|
|
2483
2486
|
emit("show");
|
|
2484
2487
|
state.showing = true;
|
|
@@ -2578,6 +2581,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2578
2581
|
if (isAttached && !wasAttached) {
|
|
2579
2582
|
nextTick(async () => {
|
|
2580
2583
|
if (state.visible) {
|
|
2584
|
+
emit("attached");
|
|
2581
2585
|
autoAdjustOff();
|
|
2582
2586
|
await adjust();
|
|
2583
2587
|
autoAdjustOn();
|
|
@@ -2635,7 +2639,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2635
2639
|
ref: arrow2,
|
|
2636
2640
|
class: "ui-v1-popper__arrow"
|
|
2637
2641
|
}, null, 512)) : createCommentVNode("", true),
|
|
2638
|
-
createElementVNode("div", _hoisted_1$
|
|
2642
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
2639
2643
|
renderSlot(_ctx.$slots, "default")
|
|
2640
2644
|
])
|
|
2641
2645
|
], 16)
|
|
@@ -2643,7 +2647,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2643
2647
|
};
|
|
2644
2648
|
}
|
|
2645
2649
|
});
|
|
2646
|
-
const _sfc_main$
|
|
2650
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2647
2651
|
__name: "UiTooltip",
|
|
2648
2652
|
props: {
|
|
2649
2653
|
/** Флаг для ручного переключения видимости */
|
|
@@ -2754,7 +2758,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2754
2758
|
hide: () => popper.value?.hide()
|
|
2755
2759
|
});
|
|
2756
2760
|
return (_ctx, _cache) => {
|
|
2757
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2761
|
+
return openBlock(), createBlock(_sfc_main$o, mergeProps({
|
|
2758
2762
|
ref_key: "popper",
|
|
2759
2763
|
ref: popper,
|
|
2760
2764
|
visible: __props.visible,
|
|
@@ -2788,11 +2792,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2788
2792
|
};
|
|
2789
2793
|
}
|
|
2790
2794
|
});
|
|
2791
|
-
const _hoisted_1$
|
|
2792
|
-
const _hoisted_2$
|
|
2793
|
-
const _hoisted_3$
|
|
2794
|
-
const _hoisted_4$
|
|
2795
|
-
const _sfc_main$
|
|
2795
|
+
const _hoisted_1$g = { class: "ui-v1-copy-button__tooltip" };
|
|
2796
|
+
const _hoisted_2$7 = { class: "ui-v1-copy-button__icon" };
|
|
2797
|
+
const _hoisted_3$7 = { class: "ui-v1-copy-button__text" };
|
|
2798
|
+
const _hoisted_4$5 = ["value"];
|
|
2799
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
2796
2800
|
__name: "UiCopyButton",
|
|
2797
2801
|
props: {
|
|
2798
2802
|
/** Текст для копирования в буфер обмена */
|
|
@@ -2803,7 +2807,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2803
2807
|
/** Размер кнопки */
|
|
2804
2808
|
size: {
|
|
2805
2809
|
type: String,
|
|
2806
|
-
default: SIZE$
|
|
2810
|
+
default: SIZE$6.XS
|
|
2807
2811
|
},
|
|
2808
2812
|
/** Объект, содержащий параметры настройки Tooltip */
|
|
2809
2813
|
tooltipOptions: {
|
|
@@ -2864,7 +2868,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2864
2868
|
onClick: copy
|
|
2865
2869
|
}, [
|
|
2866
2870
|
renderSlot(_ctx.$slots, "trigger", {}, () => [
|
|
2867
|
-
createVNode(_sfc_main$
|
|
2871
|
+
createVNode(_sfc_main$q, {
|
|
2868
2872
|
size: __props.size,
|
|
2869
2873
|
appearance: "tertiary"
|
|
2870
2874
|
}, {
|
|
@@ -2874,7 +2878,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2874
2878
|
_: 1
|
|
2875
2879
|
}, 8, ["size"])
|
|
2876
2880
|
]),
|
|
2877
|
-
createVNode(_sfc_main$
|
|
2881
|
+
createVNode(_sfc_main$n, mergeProps({
|
|
2878
2882
|
visible: visible.value,
|
|
2879
2883
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
2880
2884
|
target: rootTarget.value,
|
|
@@ -2884,12 +2888,12 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2884
2888
|
...__props.tooltipOptions
|
|
2885
2889
|
}), {
|
|
2886
2890
|
default: withCtx(() => [
|
|
2887
|
-
createElementVNode("div", _hoisted_1$
|
|
2891
|
+
createElementVNode("div", _hoisted_1$g, [
|
|
2888
2892
|
copied.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2889
|
-
createElementVNode("div", _hoisted_2$
|
|
2893
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
2890
2894
|
createVNode(unref(IconCheckmarkCircleOutlined))
|
|
2891
2895
|
]),
|
|
2892
|
-
createElementVNode("div", _hoisted_3$
|
|
2896
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
2893
2897
|
renderSlot(_ctx.$slots, "hint-copied")
|
|
2894
2898
|
])
|
|
2895
2899
|
], 64)) : renderSlot(_ctx.$slots, "hint", { key: 1 })
|
|
@@ -2904,7 +2908,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2904
2908
|
value: __props.text,
|
|
2905
2909
|
class: "ui-v1-copy-button__area",
|
|
2906
2910
|
type: "text"
|
|
2907
|
-
}, null, 8, _hoisted_4$
|
|
2911
|
+
}, null, 8, _hoisted_4$5)) : createCommentVNode("", true)
|
|
2908
2912
|
], 544);
|
|
2909
2913
|
};
|
|
2910
2914
|
}
|
|
@@ -4539,7 +4543,7 @@ function detectLocale() {
|
|
|
4539
4543
|
}
|
|
4540
4544
|
return "en-GB";
|
|
4541
4545
|
}
|
|
4542
|
-
const _sfc_main$
|
|
4546
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
4543
4547
|
__name: "UiDate",
|
|
4544
4548
|
props: {
|
|
4545
4549
|
date: {
|
|
@@ -4571,7 +4575,7 @@ var ALIGN = /* @__PURE__ */ ((ALIGN2) => {
|
|
|
4571
4575
|
ALIGN2["RIGHT"] = "right";
|
|
4572
4576
|
return ALIGN2;
|
|
4573
4577
|
})(ALIGN || {});
|
|
4574
|
-
const _sfc_main$
|
|
4578
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
4575
4579
|
__name: "UiError",
|
|
4576
4580
|
props: {
|
|
4577
4581
|
/** Тест, разметка ошибки */
|
|
@@ -4610,19 +4614,19 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
4610
4614
|
};
|
|
4611
4615
|
}
|
|
4612
4616
|
});
|
|
4613
|
-
const _hoisted_1$
|
|
4617
|
+
const _hoisted_1$f = {
|
|
4614
4618
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4615
4619
|
viewBox: "0 0 24 24"
|
|
4616
4620
|
};
|
|
4617
|
-
function render$
|
|
4618
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4621
|
+
function render$5(_ctx, _cache) {
|
|
4622
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$f, [..._cache[0] || (_cache[0] = [
|
|
4619
4623
|
createElementVNode("path", {
|
|
4620
4624
|
fill: "currentColor",
|
|
4621
4625
|
d: "m6.844 17.854-.7-.703a.5.5 0 0 1 0-.704l8.48-8.456-6.212.007a.49.49 0 0 1-.496-.5l.007-.991a.5.5 0 0 1 .496-.5L16.994 6c.196 0 .385.078.524.218l.265.267c.137.142.215.33.217.528l-.007 8.633a.5.5 0 0 1-.496.5h-.992a.48.48 0 0 1-.49-.493l.007-6.255-8.48 8.456a.49.49 0 0 1-.698 0"
|
|
4622
4626
|
}, null, -1)
|
|
4623
4627
|
])]);
|
|
4624
4628
|
}
|
|
4625
|
-
const IconOpenInNew = { render: render$
|
|
4629
|
+
const IconOpenInNew = { render: render$5 };
|
|
4626
4630
|
var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
4627
4631
|
APPEARANCE2["BREADCRUMBS"] = "breadcrumbs";
|
|
4628
4632
|
APPEARANCE2["DEFAULT"] = "default";
|
|
@@ -4631,7 +4635,7 @@ var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
|
4631
4635
|
APPEARANCE2["TITLE"] = "title";
|
|
4632
4636
|
return APPEARANCE2;
|
|
4633
4637
|
})(APPEARANCE$1 || {});
|
|
4634
|
-
var SIZE$
|
|
4638
|
+
var SIZE$5 = /* @__PURE__ */ ((SIZE2) => {
|
|
4635
4639
|
SIZE2["ARTICLE"] = "article";
|
|
4636
4640
|
SIZE2["BODY"] = "body";
|
|
4637
4641
|
SIZE2["PARAGRAPH"] = "paragraph";
|
|
@@ -4640,17 +4644,17 @@ var SIZE$4 = /* @__PURE__ */ ((SIZE2) => {
|
|
|
4640
4644
|
SIZE2["TITLE01"] = "title-01";
|
|
4641
4645
|
SIZE2["TITLE02"] = "title-02";
|
|
4642
4646
|
return SIZE2;
|
|
4643
|
-
})(SIZE$
|
|
4644
|
-
const _hoisted_1$
|
|
4645
|
-
const _hoisted_2$
|
|
4647
|
+
})(SIZE$5 || {});
|
|
4648
|
+
const _hoisted_1$e = ["href", "target"];
|
|
4649
|
+
const _hoisted_2$6 = {
|
|
4646
4650
|
key: 0,
|
|
4647
4651
|
class: "ui-v1-link__inner"
|
|
4648
4652
|
};
|
|
4649
|
-
const _hoisted_3$
|
|
4653
|
+
const _hoisted_3$6 = {
|
|
4650
4654
|
key: 2,
|
|
4651
4655
|
class: "ui-v1-link__icon"
|
|
4652
4656
|
};
|
|
4653
|
-
const _sfc_main$
|
|
4657
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
4654
4658
|
__name: "UiLink",
|
|
4655
4659
|
props: {
|
|
4656
4660
|
/** Атрибут ссылки */
|
|
@@ -4676,8 +4680,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4676
4680
|
/** Размер текста */
|
|
4677
4681
|
size: {
|
|
4678
4682
|
type: String,
|
|
4679
|
-
validator: (size) => Object.values(SIZE$
|
|
4680
|
-
default: SIZE$
|
|
4683
|
+
validator: (size) => Object.values(SIZE$5).includes(size),
|
|
4684
|
+
default: SIZE$5.BODY
|
|
4681
4685
|
},
|
|
4682
4686
|
/** Инвертированный цвет ссылок для тёмного фона */
|
|
4683
4687
|
light: {
|
|
@@ -4719,19 +4723,19 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4719
4723
|
},
|
|
4720
4724
|
target: __props.external ? "_blank" : "_self"
|
|
4721
4725
|
}, _ctx.$attrs), [
|
|
4722
|
-
__props.dotted ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
4726
|
+
__props.dotted ? (openBlock(), createElementBlock("span", _hoisted_2$6, [
|
|
4723
4727
|
renderSlot(_ctx.$slots, "default")
|
|
4724
4728
|
])) : renderSlot(_ctx.$slots, "default", { key: 1 }),
|
|
4725
|
-
_ctx.$slots.icon || __props.external ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
4729
|
+
_ctx.$slots.icon || __props.external ? (openBlock(), createElementBlock("span", _hoisted_3$6, [
|
|
4726
4730
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
4727
4731
|
createVNode(unref(IconOpenInNew), { class: "ui-v1-link__icon-sprite" })
|
|
4728
4732
|
])
|
|
4729
4733
|
])) : createCommentVNode("", true)
|
|
4730
|
-
], 16, _hoisted_1$
|
|
4734
|
+
], 16, _hoisted_1$e);
|
|
4731
4735
|
};
|
|
4732
4736
|
}
|
|
4733
4737
|
});
|
|
4734
|
-
const _sfc_main$
|
|
4738
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
4735
4739
|
__name: "UiTransition",
|
|
4736
4740
|
props: {
|
|
4737
4741
|
/** Наименование анимации перехода */
|
|
@@ -4759,7 +4763,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4759
4763
|
};
|
|
4760
4764
|
}
|
|
4761
4765
|
});
|
|
4762
|
-
const _sfc_main$
|
|
4766
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
4763
4767
|
__name: "UiLoader",
|
|
4764
4768
|
props: {
|
|
4765
4769
|
/** Диаметр (размер) окружности индикатора */
|
|
@@ -4791,7 +4795,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4791
4795
|
},
|
|
4792
4796
|
setup(__props) {
|
|
4793
4797
|
return (_ctx, _cache) => {
|
|
4794
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.transition ? _sfc_main$
|
|
4798
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.transition ? _sfc_main$i : "div"), normalizeProps(guardReactiveProps(__props.transition ? {
|
|
4795
4799
|
appear: true,
|
|
4796
4800
|
class: "ui-v1-loader-wrapper",
|
|
4797
4801
|
name: __props.transition
|
|
@@ -4818,7 +4822,199 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4818
4822
|
};
|
|
4819
4823
|
}
|
|
4820
4824
|
});
|
|
4821
|
-
|
|
4825
|
+
var SIZE$4 = /* @__PURE__ */ ((SIZE2) => {
|
|
4826
|
+
SIZE2["XS"] = "xs";
|
|
4827
|
+
SIZE2["SM"] = "sm";
|
|
4828
|
+
SIZE2["MD"] = "md";
|
|
4829
|
+
SIZE2["LG"] = "lg";
|
|
4830
|
+
return SIZE2;
|
|
4831
|
+
})(SIZE$4 || {});
|
|
4832
|
+
const deltaTransition$1 = (el) => {
|
|
4833
|
+
const delta = el.scrollWidth - el.clientWidth;
|
|
4834
|
+
return delta !== 0 ? {
|
|
4835
|
+
"--delta-width": `-${delta}px`,
|
|
4836
|
+
animationDuration: `${delta * 15}ms`
|
|
4837
|
+
} : {};
|
|
4838
|
+
};
|
|
4839
|
+
const _hoisted_1$d = {
|
|
4840
|
+
key: 0,
|
|
4841
|
+
class: "ui-v1-menu-item__avatar"
|
|
4842
|
+
};
|
|
4843
|
+
const _hoisted_2$5 = {
|
|
4844
|
+
key: 1,
|
|
4845
|
+
class: "ui-v1-menu-item__icon ui-v1-menu-item__icon_leading"
|
|
4846
|
+
};
|
|
4847
|
+
const _hoisted_3$5 = { class: "ui-v1-menu-item__content" };
|
|
4848
|
+
const _hoisted_4$4 = { class: "ui-v1-menu-item__text" };
|
|
4849
|
+
const _hoisted_5$4 = {
|
|
4850
|
+
key: 0,
|
|
4851
|
+
class: "ui-v1-menu-item__description"
|
|
4852
|
+
};
|
|
4853
|
+
const _hoisted_6$2 = {
|
|
4854
|
+
key: 2,
|
|
4855
|
+
class: "ui-v1-menu-item__counter"
|
|
4856
|
+
};
|
|
4857
|
+
const _hoisted_7$1 = {
|
|
4858
|
+
key: 3,
|
|
4859
|
+
class: "ui-v1-menu-item__icon ui-v1-menu-item__icon_trailing"
|
|
4860
|
+
};
|
|
4861
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
4862
|
+
__name: "UiMenuItem",
|
|
4863
|
+
props: {
|
|
4864
|
+
/** Размер */
|
|
4865
|
+
size: {
|
|
4866
|
+
type: String,
|
|
4867
|
+
default: SIZE$4.MD
|
|
4868
|
+
},
|
|
4869
|
+
/** Описание */
|
|
4870
|
+
description: {
|
|
4871
|
+
type: String,
|
|
4872
|
+
default: null
|
|
4873
|
+
},
|
|
4874
|
+
/** Счетчик количества */
|
|
4875
|
+
counter: {
|
|
4876
|
+
type: null,
|
|
4877
|
+
validator: (counter2) => counter2 === null || ["string", "number"].includes(typeof counter2),
|
|
4878
|
+
default: null
|
|
4879
|
+
},
|
|
4880
|
+
/** Жирное начертание */
|
|
4881
|
+
accent: {
|
|
4882
|
+
type: Boolean,
|
|
4883
|
+
default: false
|
|
4884
|
+
},
|
|
4885
|
+
/** Состояние нажатия */
|
|
4886
|
+
active: {
|
|
4887
|
+
type: Boolean,
|
|
4888
|
+
default: false
|
|
4889
|
+
},
|
|
4890
|
+
/** Индикация опасного действия */
|
|
4891
|
+
danger: {
|
|
4892
|
+
type: Boolean,
|
|
4893
|
+
default: false
|
|
4894
|
+
},
|
|
4895
|
+
/** Анимация бегущей строки при наведении */
|
|
4896
|
+
ticker: {
|
|
4897
|
+
type: Boolean,
|
|
4898
|
+
default: false
|
|
4899
|
+
},
|
|
4900
|
+
/** Делает заголовок синим и убирает внутренние отступы на корневом элементе */
|
|
4901
|
+
simple: {
|
|
4902
|
+
type: Boolean,
|
|
4903
|
+
default: false
|
|
4904
|
+
},
|
|
4905
|
+
/** Заблокированный */
|
|
4906
|
+
disabled: {
|
|
4907
|
+
type: Boolean,
|
|
4908
|
+
default: false
|
|
4909
|
+
}
|
|
4910
|
+
},
|
|
4911
|
+
setup(__props) {
|
|
4912
|
+
const props = __props;
|
|
4913
|
+
const textRef = ref(null);
|
|
4914
|
+
const textStyle = ref({});
|
|
4915
|
+
const onHover = () => {
|
|
4916
|
+
if (props.ticker && textRef.value) {
|
|
4917
|
+
textStyle.value = deltaTransition$1(textRef.value);
|
|
4918
|
+
}
|
|
4919
|
+
};
|
|
4920
|
+
return (_ctx, _cache) => {
|
|
4921
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
4922
|
+
class: {
|
|
4923
|
+
"ui-v1-menu-item": true,
|
|
4924
|
+
[`ui-v1-menu-item_${__props.size}`]: true,
|
|
4925
|
+
"ui-v1-menu-item_accent": __props.accent,
|
|
4926
|
+
"ui-v1-menu-item_active": __props.active,
|
|
4927
|
+
"ui-v1-menu-item_danger": __props.danger,
|
|
4928
|
+
"ui-v1-menu-item_simple": __props.simple,
|
|
4929
|
+
"ui-v1-menu-item_disabled": __props.disabled
|
|
4930
|
+
}
|
|
4931
|
+
}, _ctx.$attrs), [
|
|
4932
|
+
createElementVNode("div", {
|
|
4933
|
+
class: normalizeClass({
|
|
4934
|
+
"ui-v1-menu-item__inner": true,
|
|
4935
|
+
"ui-v1-menu-item__inner_centered": _ctx.$slots["avatar"] && !_ctx.$slots["description"],
|
|
4936
|
+
"ui-v1-menu-item__inner_disabled": __props.disabled
|
|
4937
|
+
}),
|
|
4938
|
+
onMouseoverOnce: onHover
|
|
4939
|
+
}, [
|
|
4940
|
+
_ctx.$slots["avatar"] ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
4941
|
+
renderSlot(_ctx.$slots, "avatar")
|
|
4942
|
+
])) : _ctx.$slots["leading-icon"] ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
4943
|
+
renderSlot(_ctx.$slots, "leading-icon")
|
|
4944
|
+
])) : createCommentVNode("", true),
|
|
4945
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
4946
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
4947
|
+
__props.ticker ? (openBlock(), createElementBlock("div", {
|
|
4948
|
+
key: 0,
|
|
4949
|
+
ref_key: "textRef",
|
|
4950
|
+
ref: textRef,
|
|
4951
|
+
style: normalizeStyle(textStyle.value),
|
|
4952
|
+
class: "ui-v1-menu-item__ticker"
|
|
4953
|
+
}, [
|
|
4954
|
+
renderSlot(_ctx.$slots, "default")
|
|
4955
|
+
], 4)) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
4956
|
+
]),
|
|
4957
|
+
_ctx.$slots["description"] || __props.description ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
|
|
4958
|
+
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
4959
|
+
createTextVNode(toDisplayString(__props.description), 1)
|
|
4960
|
+
])
|
|
4961
|
+
])) : createCommentVNode("", true)
|
|
4962
|
+
]),
|
|
4963
|
+
__props.counter !== null ? (openBlock(), createElementBlock("div", _hoisted_6$2, toDisplayString(__props.counter), 1)) : createCommentVNode("", true),
|
|
4964
|
+
_ctx.$slots["trailing-icon"] ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
4965
|
+
renderSlot(_ctx.$slots, "trailing-icon")
|
|
4966
|
+
])) : createCommentVNode("", true)
|
|
4967
|
+
], 34)
|
|
4968
|
+
], 16);
|
|
4969
|
+
};
|
|
4970
|
+
}
|
|
4971
|
+
});
|
|
4972
|
+
const _export_sfc = (sfc, props) => {
|
|
4973
|
+
const target = sfc.__vccOpts || sfc;
|
|
4974
|
+
for (const [key, val] of props) {
|
|
4975
|
+
target[key] = val;
|
|
4976
|
+
}
|
|
4977
|
+
return target;
|
|
4978
|
+
};
|
|
4979
|
+
const _sfc_main$f = {};
|
|
4980
|
+
const _hoisted_1$c = { class: "ui-v1-menu-item-group" };
|
|
4981
|
+
const _hoisted_2$4 = { class: "ui-v1-menu-item-group__head" };
|
|
4982
|
+
const _hoisted_3$4 = {
|
|
4983
|
+
key: 0,
|
|
4984
|
+
class: "ui-v1-menu-item-group__head-option"
|
|
4985
|
+
};
|
|
4986
|
+
const _hoisted_4$3 = {
|
|
4987
|
+
key: 1,
|
|
4988
|
+
class: "ui-v1-menu-item-group__head-inner"
|
|
4989
|
+
};
|
|
4990
|
+
const _hoisted_5$3 = {
|
|
4991
|
+
key: 0,
|
|
4992
|
+
class: "ui-v1-menu-item-group__count"
|
|
4993
|
+
};
|
|
4994
|
+
function _sfc_render(_ctx, _cache) {
|
|
4995
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
4996
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
4997
|
+
_ctx.$slots.option ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
|
|
4998
|
+
renderSlot(_ctx.$slots, "option")
|
|
4999
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
5000
|
+
createElementVNode("div", {
|
|
5001
|
+
class: normalizeClass({
|
|
5002
|
+
"ui-v1-menu-item-group__title": true,
|
|
5003
|
+
"ui-v1-menu-item-group__title_upper": !_ctx.$slots.option
|
|
5004
|
+
})
|
|
5005
|
+
}, [
|
|
5006
|
+
renderSlot(_ctx.$slots, "label")
|
|
5007
|
+
], 2),
|
|
5008
|
+
_ctx.$slots.quantity ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
|
|
5009
|
+
renderSlot(_ctx.$slots, "quantity")
|
|
5010
|
+
])) : createCommentVNode("", true)
|
|
5011
|
+
]))
|
|
5012
|
+
]),
|
|
5013
|
+
renderSlot(_ctx.$slots, "default")
|
|
5014
|
+
]);
|
|
5015
|
+
}
|
|
5016
|
+
const UiMenuItemGroup = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render]]);
|
|
5017
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
4822
5018
|
__name: "UiScrollBox",
|
|
4823
5019
|
props: {
|
|
4824
5020
|
/** Наименование тэга-обёртки для нативного скролла */
|
|
@@ -4918,19 +5114,19 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
4918
5114
|
};
|
|
4919
5115
|
}
|
|
4920
5116
|
});
|
|
4921
|
-
const _hoisted_1$
|
|
5117
|
+
const _hoisted_1$b = {
|
|
4922
5118
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4923
5119
|
viewBox: "0 0 24 24"
|
|
4924
5120
|
};
|
|
4925
|
-
function render$
|
|
4926
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
5121
|
+
function render$4(_ctx, _cache) {
|
|
5122
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$b, [..._cache[0] || (_cache[0] = [
|
|
4927
5123
|
createElementVNode("path", {
|
|
4928
5124
|
fill: "currentColor",
|
|
4929
5125
|
d: "M7.113 6.176a.6.6 0 0 1 .848 0L12 10.214l4.038-4.038a.6.6 0 0 1 .849 0l.937.937a.6.6 0 0 1 0 .848L13.785 12l4.04 4.04a.6.6 0 0 1 0 .848l-.937.937a.6.6 0 0 1-.849 0L12 13.784l-4.038 4.04a.6.6 0 0 1-.849 0l-.937-.937a.6.6 0 0 1 0-.848l4.04-4.04-4.039-4.038a.6.6 0 0 1 0-.849z"
|
|
4930
5126
|
}, null, -1)
|
|
4931
5127
|
])]);
|
|
4932
5128
|
}
|
|
4933
|
-
const IconClear = { render: render$
|
|
5129
|
+
const IconClear = { render: render$4 };
|
|
4934
5130
|
const ModalInjectKey = Symbol("$embedModal");
|
|
4935
5131
|
const plugin$1 = {
|
|
4936
5132
|
install(app, options) {
|
|
@@ -5026,7 +5222,7 @@ var SIZE$3 = /* @__PURE__ */ ((SIZE2) => {
|
|
|
5026
5222
|
SIZE2["SM"] = "sm";
|
|
5027
5223
|
return SIZE2;
|
|
5028
5224
|
})(SIZE$3 || {});
|
|
5029
|
-
const _hoisted_1$
|
|
5225
|
+
const _hoisted_1$a = ["id", "aria-hidden"];
|
|
5030
5226
|
const _hoisted_2$3 = ["id"];
|
|
5031
5227
|
const _hoisted_3$3 = { class: "ui-v1-modal-sidebar__header" };
|
|
5032
5228
|
const _hoisted_4$2 = { class: "ui-v1-modal-sidebar__header-inner" };
|
|
@@ -5043,7 +5239,7 @@ const _hoisted_7 = {
|
|
|
5043
5239
|
key: 2,
|
|
5044
5240
|
class: "ui-v1-modal-sidebar__footer"
|
|
5045
5241
|
};
|
|
5046
|
-
const _sfc_main$
|
|
5242
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
5047
5243
|
...{
|
|
5048
5244
|
inheritAttrs: false
|
|
5049
5245
|
},
|
|
@@ -5263,7 +5459,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5263
5459
|
key: 0,
|
|
5264
5460
|
to: unref(globals)?.container || "body"
|
|
5265
5461
|
}, [
|
|
5266
|
-
createVNode(_sfc_main$
|
|
5462
|
+
createVNode(_sfc_main$i, {
|
|
5267
5463
|
name: "fade-2",
|
|
5268
5464
|
onBeforeEnter: _cache[5] || (_cache[5] = ($event) => visibilityOfOverlay.value = "showing"),
|
|
5269
5465
|
onAfterEnter: _cache[6] || (_cache[6] = ($event) => visibilityOfOverlay.value = "shown"),
|
|
@@ -5283,7 +5479,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5283
5479
|
}],
|
|
5284
5480
|
"aria-modal": "true"
|
|
5285
5481
|
}, _ctx.$attrs, { onClick: onBackdropClick }), [
|
|
5286
|
-
createVNode(_sfc_main$
|
|
5482
|
+
createVNode(_sfc_main$i, {
|
|
5287
5483
|
name: `slide-${__props.direction}`,
|
|
5288
5484
|
onBeforeEnter: _cache[1] || (_cache[1] = ($event) => visibilityOfSidebar.value = "showing"),
|
|
5289
5485
|
onAfterEnter: _cache[2] || (_cache[2] = ($event) => visibilityOfSidebar.value = "shown"),
|
|
@@ -5321,7 +5517,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5321
5517
|
"aria-hidden": "true",
|
|
5322
5518
|
width: "32"
|
|
5323
5519
|
}),
|
|
5324
|
-
createVNode(_sfc_main$
|
|
5520
|
+
createVNode(_sfc_main$n, {
|
|
5325
5521
|
target: closerTarget.value,
|
|
5326
5522
|
"offset-main-axis": 0
|
|
5327
5523
|
}, {
|
|
@@ -5336,7 +5532,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5336
5532
|
renderSlot(_ctx.$slots, "default", {
|
|
5337
5533
|
overlapped: state.overlapped
|
|
5338
5534
|
})
|
|
5339
|
-
])) : (openBlock(), createBlock(_sfc_main$
|
|
5535
|
+
])) : (openBlock(), createBlock(_sfc_main$e, {
|
|
5340
5536
|
key: 1,
|
|
5341
5537
|
native: __props.scrolling === unref(SCROLLING$1).NATIVE,
|
|
5342
5538
|
class: "ui-v1-modal-sidebar__body",
|
|
@@ -5359,7 +5555,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
5359
5555
|
]),
|
|
5360
5556
|
_: 3
|
|
5361
5557
|
}, 8, ["name"])
|
|
5362
|
-
], 16, _hoisted_1$
|
|
5558
|
+
], 16, _hoisted_1$a), [
|
|
5363
5559
|
[vShow, state.shown]
|
|
5364
5560
|
])
|
|
5365
5561
|
]),
|
|
@@ -5381,7 +5577,7 @@ var SCROLLING = /* @__PURE__ */ ((SCROLLING2) => {
|
|
|
5381
5577
|
SCROLLING2["NATIVE"] = "native";
|
|
5382
5578
|
return SCROLLING2;
|
|
5383
5579
|
})(SCROLLING || {});
|
|
5384
|
-
const _sfc_main$
|
|
5580
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
5385
5581
|
__name: "UiModalWindowSurface",
|
|
5386
5582
|
props: {
|
|
5387
5583
|
/** Атрибут id корневого элемента модального окна. Должен быть уникальным на странице */
|
|
@@ -5595,7 +5791,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5595
5791
|
const slots = useSlots();
|
|
5596
5792
|
const renderBody = () => {
|
|
5597
5793
|
const appearance = props.appearance;
|
|
5598
|
-
return h(_sfc_main$
|
|
5794
|
+
return h(_sfc_main$i, {
|
|
5599
5795
|
name: "zoom",
|
|
5600
5796
|
onBeforeEnter: () => visibilityOfBody.value = "showing",
|
|
5601
5797
|
onAfterEnter: () => visibilityOfBody.value = "shown",
|
|
@@ -5620,7 +5816,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5620
5816
|
};
|
|
5621
5817
|
const EmbedModalWindowSurface = () => !state.attached ? void 0 : h(Teleport, {
|
|
5622
5818
|
to: globals?.container ?? document.body
|
|
5623
|
-
}, h(_sfc_main$
|
|
5819
|
+
}, h(_sfc_main$i, {
|
|
5624
5820
|
name: "fade-2",
|
|
5625
5821
|
onBeforeEnter: () => visibilityOfOverlay.value = "showing",
|
|
5626
5822
|
onAfterEnter: () => visibilityOfOverlay.value = "shown",
|
|
@@ -5637,7 +5833,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5637
5833
|
"ui-v1-modal_overlapped": state.overlapped
|
|
5638
5834
|
}],
|
|
5639
5835
|
onClick: onOverlayClick
|
|
5640
|
-
}, h(_sfc_main$
|
|
5836
|
+
}, h(_sfc_main$e, {
|
|
5641
5837
|
class: {
|
|
5642
5838
|
"ui-v1-modal-window-container": true,
|
|
5643
5839
|
"ui-v1-modal-window-container_fullscreen": props.fullscreen,
|
|
@@ -5661,12 +5857,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
5661
5857
|
};
|
|
5662
5858
|
}
|
|
5663
5859
|
});
|
|
5664
|
-
const _hoisted_1$
|
|
5860
|
+
const _hoisted_1$9 = {
|
|
5665
5861
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5666
5862
|
viewBox: "0 0 24 24"
|
|
5667
5863
|
};
|
|
5668
|
-
function render$
|
|
5669
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
5864
|
+
function render$3(_ctx, _cache) {
|
|
5865
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [
|
|
5670
5866
|
createElementVNode("path", {
|
|
5671
5867
|
fill: "currentColor",
|
|
5672
5868
|
"fill-rule": "evenodd",
|
|
@@ -5675,8 +5871,8 @@ function render$2(_ctx, _cache) {
|
|
|
5675
5871
|
}, null, -1)
|
|
5676
5872
|
])]);
|
|
5677
5873
|
}
|
|
5678
|
-
const IconWarning = { render: render$
|
|
5679
|
-
const _hoisted_1$
|
|
5874
|
+
const IconWarning = { render: render$3 };
|
|
5875
|
+
const _hoisted_1$8 = {
|
|
5680
5876
|
key: 0,
|
|
5681
5877
|
class: "ui-v1-modal-window__icon"
|
|
5682
5878
|
};
|
|
@@ -5693,7 +5889,7 @@ const _hoisted_5$1 = {
|
|
|
5693
5889
|
key: 0,
|
|
5694
5890
|
class: "ui-v1-modal-window__footer-text"
|
|
5695
5891
|
};
|
|
5696
|
-
const _sfc_main$
|
|
5892
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
5697
5893
|
__name: "UiModalWindow",
|
|
5698
5894
|
props: {
|
|
5699
5895
|
/** Атрибут id корневого элемента модального окна. Должен быть уникальным на странице */
|
|
@@ -5807,7 +6003,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5807
6003
|
});
|
|
5808
6004
|
watch(() => props.opened, toggle);
|
|
5809
6005
|
return (_ctx, _cache) => {
|
|
5810
|
-
return openBlock(), createBlock(_sfc_main$
|
|
6006
|
+
return openBlock(), createBlock(_sfc_main$c, mergeProps({
|
|
5811
6007
|
id: __props.id,
|
|
5812
6008
|
opened: state.opened,
|
|
5813
6009
|
closable: __props.closable,
|
|
@@ -5835,7 +6031,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5835
6031
|
"ui-v1-modal-window__header_pinned": _ctx.$slots.title && state.scrolled && __props.appearance === unref(APPEARANCE).POPUP && !__props.responsive
|
|
5836
6032
|
})
|
|
5837
6033
|
}, [
|
|
5838
|
-
__props.appearance === unref(APPEARANCE).ALERT ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
6034
|
+
__props.appearance === unref(APPEARANCE).ALERT ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
5839
6035
|
renderSlot(_ctx.$slots, "icon", {
|
|
5840
6036
|
overlapped: state.overlapped
|
|
5841
6037
|
}, () => [
|
|
@@ -5864,7 +6060,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5864
6060
|
})
|
|
5865
6061
|
])) : createCommentVNode("", true)
|
|
5866
6062
|
], 2),
|
|
5867
|
-
__props.responsive ? (openBlock(), createBlock(_sfc_main$
|
|
6063
|
+
__props.responsive ? (openBlock(), createBlock(_sfc_main$e, {
|
|
5868
6064
|
key: 0,
|
|
5869
6065
|
class: "ui-v1-modal-window__content",
|
|
5870
6066
|
"show-on-mac": "",
|
|
@@ -5897,7 +6093,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
5897
6093
|
};
|
|
5898
6094
|
}
|
|
5899
6095
|
});
|
|
5900
|
-
const _sfc_main$
|
|
6096
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
5901
6097
|
__name: "UiPopperConnector",
|
|
5902
6098
|
setup(__props) {
|
|
5903
6099
|
const target = ref(null);
|
|
@@ -5908,7 +6104,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
5908
6104
|
};
|
|
5909
6105
|
}
|
|
5910
6106
|
});
|
|
5911
|
-
const _sfc_main$
|
|
6107
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
5912
6108
|
__name: "UiPopperTarget",
|
|
5913
6109
|
props: {
|
|
5914
6110
|
tag: {
|
|
@@ -5931,10 +6127,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
5931
6127
|
};
|
|
5932
6128
|
}
|
|
5933
6129
|
});
|
|
5934
|
-
const _hoisted_1$
|
|
6130
|
+
const _hoisted_1$7 = ["id", "name", "value", "checked", "disabled"];
|
|
5935
6131
|
let counter = 0;
|
|
5936
6132
|
const __default__ = {};
|
|
5937
|
-
const _sfc_main$
|
|
6133
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
5938
6134
|
...__default__,
|
|
5939
6135
|
__name: "UiRadio",
|
|
5940
6136
|
props: {
|
|
@@ -6007,79 +6203,221 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
6007
6203
|
type: "radio",
|
|
6008
6204
|
class: "ui-v1-radio__input",
|
|
6009
6205
|
onChange
|
|
6010
|
-
}), null, 16, _hoisted_1$
|
|
6206
|
+
}), null, 16, _hoisted_1$7),
|
|
6011
6207
|
_cache[0] || (_cache[0] = createElementVNode("span", { class: "ui-v1-radio__checkmark" }, null, -1))
|
|
6012
6208
|
], 16);
|
|
6013
6209
|
};
|
|
6014
6210
|
}
|
|
6015
6211
|
});
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
}
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6212
|
+
var PLACEMENT = /* @__PURE__ */ ((PLACEMENT2) => {
|
|
6213
|
+
PLACEMENT2["TOP"] = "top";
|
|
6214
|
+
PLACEMENT2["TOP_START"] = "top-start";
|
|
6215
|
+
PLACEMENT2["TOP_END"] = "top-end";
|
|
6216
|
+
PLACEMENT2["BOTTOM"] = "bottom";
|
|
6217
|
+
PLACEMENT2["BOTTOM_START"] = "bottom-start";
|
|
6218
|
+
PLACEMENT2["BOTTOM_END"] = "bottom-end";
|
|
6219
|
+
PLACEMENT2["LEFT"] = "left";
|
|
6220
|
+
PLACEMENT2["LEFT_START"] = "left-start";
|
|
6221
|
+
return PLACEMENT2;
|
|
6222
|
+
})(PLACEMENT || {});
|
|
6223
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
6224
|
+
__name: "UiSelectPopper",
|
|
6225
|
+
props: {
|
|
6226
|
+
/** Атрибут id корневого элемента выпадающего списка. Должен быть уникальным на странице */
|
|
6227
|
+
id: {
|
|
6228
|
+
type: String,
|
|
6229
|
+
default: void 0
|
|
6230
|
+
},
|
|
6231
|
+
/** Начальное состояние выпадающего списка - открыт/закрыт */
|
|
6232
|
+
opened: {
|
|
6233
|
+
type: Boolean,
|
|
6234
|
+
default: false
|
|
6235
|
+
},
|
|
6236
|
+
/** События целевого элемента, по которым производится переключение видимости */
|
|
6237
|
+
targetTriggers: {
|
|
6238
|
+
type: [Array, Object],
|
|
6239
|
+
default: () => ({
|
|
6240
|
+
show: ["click"]
|
|
6241
|
+
})
|
|
6242
|
+
},
|
|
6243
|
+
/** События плавающего элемента, по которым производится переключение видимости */
|
|
6244
|
+
popperTriggers: {
|
|
6245
|
+
type: [Array, Object],
|
|
6246
|
+
default: () => []
|
|
6247
|
+
},
|
|
6248
|
+
/**
|
|
6249
|
+
* Флаг, устанавливающий ширину выпадающего списка по ширине целевого элемента.
|
|
6250
|
+
* По-умолчанию отключает такое поведение
|
|
6251
|
+
*/
|
|
6252
|
+
popperFitTrigger: {
|
|
6253
|
+
type: Boolean,
|
|
6254
|
+
default: false
|
|
6255
|
+
},
|
|
6256
|
+
/**
|
|
6257
|
+
* Сторона цели, у которой появится плавающий элемент,
|
|
6258
|
+
* или подробный объект настройки положения и адаптации положения при нехватке места
|
|
6259
|
+
*/
|
|
6260
|
+
placement: {
|
|
6261
|
+
type: [String, Object],
|
|
6262
|
+
validator: (value) => isPlacementLiteral(value) || isPlacementOptions(value),
|
|
6263
|
+
default: PLACEMENT.BOTTOM
|
|
6264
|
+
},
|
|
6265
|
+
/** Стиль для плавающего элемента */
|
|
6266
|
+
popperClass: {
|
|
6267
|
+
type: String,
|
|
6268
|
+
default: null
|
|
6269
|
+
},
|
|
6270
|
+
/** Набор свойств плавающего элемента. See @/common/components/popper */
|
|
6271
|
+
popperOptions: {
|
|
6272
|
+
type: Object,
|
|
6273
|
+
default: () => ({})
|
|
6274
|
+
},
|
|
6275
|
+
/** Блокировка поля ввода */
|
|
6276
|
+
disabled: {
|
|
6277
|
+
type: Boolean,
|
|
6278
|
+
default: false
|
|
6279
|
+
},
|
|
6280
|
+
/** Устанавливает поле ввода в состояние доступное только для чтения */
|
|
6281
|
+
readonly: {
|
|
6282
|
+
type: Boolean,
|
|
6283
|
+
default: false
|
|
6284
|
+
},
|
|
6285
|
+
/** Наличие множественного выбора среди элементов выпадающего списка */
|
|
6286
|
+
multiple: {
|
|
6287
|
+
type: Boolean,
|
|
6288
|
+
default: false
|
|
6289
|
+
},
|
|
6290
|
+
/** Добавляет анимацию показала полной строки при переполнении */
|
|
6291
|
+
ticker: {
|
|
6292
|
+
type: Boolean,
|
|
6293
|
+
default: false
|
|
6294
|
+
}
|
|
6295
|
+
},
|
|
6296
|
+
emits: [
|
|
6297
|
+
/** Смена значения флага видимости плавающего элемента */
|
|
6298
|
+
"update:visible",
|
|
6299
|
+
/** Появление плавающего элемента */
|
|
6300
|
+
"show",
|
|
6301
|
+
/** Сокрытие плавающего элемента */
|
|
6302
|
+
"hide",
|
|
6303
|
+
/** Появление плавающего элемента после окончания перехода */
|
|
6304
|
+
"shown",
|
|
6305
|
+
/** Сокрытие плавающего элемента после окончания перехода */
|
|
6306
|
+
"hidden",
|
|
6307
|
+
/** Удаление с формы плавающего элемента */
|
|
6308
|
+
"dispose"
|
|
6309
|
+
],
|
|
6310
|
+
setup(__props, { expose: __expose }) {
|
|
6311
|
+
const props = __props;
|
|
6312
|
+
const target = useElementRef();
|
|
6313
|
+
const popper = ref(null);
|
|
6314
|
+
const scrollable = ref(null);
|
|
6315
|
+
const width = ref("auto");
|
|
6316
|
+
const visible = computed(() => props.opened);
|
|
6317
|
+
const autoScroll = async () => {
|
|
6318
|
+
const option = scrollable.value?.querySelector(".ui-v1-select-option_selected");
|
|
6319
|
+
if (scrollable.value && option) {
|
|
6320
|
+
scrollable.value.scrollTop = option.offsetTop;
|
|
6321
|
+
}
|
|
6322
|
+
};
|
|
6323
|
+
const updateWidth = () => width.value = `${target.value?.clientWidth}px`;
|
|
6324
|
+
const scrollableStyle = computed(() => {
|
|
6325
|
+
if (props.popperFitTrigger) {
|
|
6326
|
+
return { minWidth: width.value };
|
|
6327
|
+
}
|
|
6328
|
+
const style = { width: width.value };
|
|
6329
|
+
if (parseInt(width.value) > 500) {
|
|
6330
|
+
style.maxWidth = width.value;
|
|
6331
|
+
}
|
|
6332
|
+
return style;
|
|
6333
|
+
});
|
|
6334
|
+
__expose({
|
|
6335
|
+
adjust: () => popper.value?.adjust(),
|
|
6336
|
+
dispose: () => popper.value?.dispose(),
|
|
6337
|
+
show: () => popper.value?.show(),
|
|
6338
|
+
hide: () => popper.value?.hide()
|
|
6339
|
+
});
|
|
6340
|
+
watch(() => props.opened, () => updateWidth());
|
|
6341
|
+
onMounted(() => {
|
|
6342
|
+
});
|
|
6343
|
+
return (_ctx, _cache) => {
|
|
6344
|
+
return openBlock(), createBlock(_sfc_main$o, mergeProps({
|
|
6345
|
+
id: __props.id + "-popper",
|
|
6346
|
+
ref_key: "popper",
|
|
6347
|
+
ref: popper,
|
|
6348
|
+
visible: visible.value,
|
|
6349
|
+
"target-triggers": __props.targetTriggers,
|
|
6350
|
+
"popper-triggers": __props.popperTriggers,
|
|
6351
|
+
"popper-options": __props.popperOptions,
|
|
6352
|
+
"global-triggers": ["miss-click"],
|
|
6353
|
+
placement: __props.placement,
|
|
6354
|
+
"aria-hidden": !visible.value ? "true" : "false",
|
|
6355
|
+
"aria-multiselectable": __props.multiple ? "true" : "false",
|
|
6356
|
+
class: ["ui-v1-select__popper", __props.popperClass],
|
|
6357
|
+
disabled: __props.disabled || __props.readonly
|
|
6358
|
+
}, _ctx.$attrs, {
|
|
6359
|
+
role: "listbox",
|
|
6360
|
+
onAttached: autoScroll,
|
|
6361
|
+
onShow: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("show", $event)),
|
|
6362
|
+
onShown: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("shown", $event)),
|
|
6363
|
+
onHide: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("hide", $event)),
|
|
6364
|
+
onHidden: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("hidden", $event)),
|
|
6365
|
+
onDispose: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("dispose", $event))
|
|
6366
|
+
}), {
|
|
6367
|
+
default: withCtx(() => [
|
|
6368
|
+
createElementVNode("div", {
|
|
6369
|
+
ref_key: "scrollable",
|
|
6370
|
+
ref: scrollable,
|
|
6371
|
+
style: normalizeStyle(scrollableStyle.value),
|
|
6372
|
+
class: normalizeClass({
|
|
6373
|
+
"ui-v1-select__content": true,
|
|
6374
|
+
"ui-v1-select__content_long": __props.ticker
|
|
6375
|
+
})
|
|
6376
|
+
}, [
|
|
6377
|
+
createElementVNode("div", null, [
|
|
6378
|
+
renderSlot(_ctx.$slots, "default")
|
|
6379
|
+
])
|
|
6380
|
+
], 6)
|
|
6381
|
+
]),
|
|
6382
|
+
_: 3
|
|
6383
|
+
}, 16, ["id", "visible", "target-triggers", "popper-triggers", "popper-options", "placement", "aria-hidden", "aria-multiselectable", "class", "disabled"]);
|
|
6384
|
+
};
|
|
6385
|
+
}
|
|
6386
|
+
});
|
|
6387
|
+
const _hoisted_1$6 = {
|
|
6388
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6389
|
+
viewBox: "0 0 24 24"
|
|
6390
|
+
};
|
|
6391
|
+
function render$2(_ctx, _cache) {
|
|
6392
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [
|
|
6393
|
+
createElementVNode("path", {
|
|
6394
|
+
fill: "currentColor",
|
|
6395
|
+
d: "M8.138 11.06A.52.52 0 0 1 8 10.705c0-.133.05-.261.138-.355l.187-.2A.44.44 0 0 1 8.66 10h6.68a.44.44 0 0 1 .335.15l.187.2a.52.52 0 0 1 .138.355c0 .133-.05.26-.138.355l-3.536 3.788A.43.43 0 0 1 12 15a.43.43 0 0 1-.326-.152z"
|
|
6396
|
+
}, null, -1)
|
|
6397
|
+
])]);
|
|
6398
|
+
}
|
|
6399
|
+
const IconCaret = { render: render$2 };
|
|
6400
|
+
const pluralization_en_GB = (choice) => choice === 1 ? 0 : 1;
|
|
6401
|
+
const pluralization_es_ES = (choice) => choice === 1 ? 0 : 1;
|
|
6402
|
+
const pluralization_ru_RU = (choice, choicesLength) => {
|
|
6403
|
+
if (choicesLength === 2) {
|
|
6404
|
+
return choice === 1 ? 0 : 1;
|
|
6405
|
+
}
|
|
6406
|
+
const mod100 = choice % 100;
|
|
6407
|
+
return mod100 % 10 === 1 && mod100 !== 11 ? 0 : mod100 % 10 >= 2 && mod100 % 10 <= 4 && !(mod100 >= 10 && mod100 < 15) ? 1 : 2;
|
|
6408
|
+
};
|
|
6409
|
+
const get = (messages, path) => {
|
|
6410
|
+
let i = 0;
|
|
6411
|
+
let slice = messages[path[0]];
|
|
6412
|
+
while (i < path.length) {
|
|
6413
|
+
if (typeof slice === "string" && i + 1 === path.length) {
|
|
6414
|
+
return slice;
|
|
6415
|
+
}
|
|
6416
|
+
if (typeof slice !== "object") {
|
|
6417
|
+
return void 0;
|
|
6418
|
+
}
|
|
6419
|
+
slice = slice[path[++i]];
|
|
6420
|
+
}
|
|
6083
6421
|
return slice;
|
|
6084
6422
|
};
|
|
6085
6423
|
const replace = (message, values) => {
|
|
@@ -6196,6 +6534,379 @@ const define = (options = void 0, parent = void 0) => {
|
|
|
6196
6534
|
fallback
|
|
6197
6535
|
};
|
|
6198
6536
|
};
|
|
6537
|
+
const selected$2 = "Selected";
|
|
6538
|
+
const search$2 = { "placeholder": "", "noResult": "Nothing found" };
|
|
6539
|
+
const messages_en_GB$2 = {
|
|
6540
|
+
selected: selected$2,
|
|
6541
|
+
search: search$2
|
|
6542
|
+
};
|
|
6543
|
+
const selected$1 = "Seleccionado";
|
|
6544
|
+
const search$1 = { "placeholder": "", "noResult": "No se ha encontrado" };
|
|
6545
|
+
const messages_es_ES$2 = {
|
|
6546
|
+
selected: selected$1,
|
|
6547
|
+
search: search$1
|
|
6548
|
+
};
|
|
6549
|
+
const selected = "Выбрано";
|
|
6550
|
+
const search = { "placeholder": "", "noResult": "Ничего не найдено" };
|
|
6551
|
+
const messages_ru_RU$2 = {
|
|
6552
|
+
selected,
|
|
6553
|
+
search
|
|
6554
|
+
};
|
|
6555
|
+
const _i18n$2 = define({
|
|
6556
|
+
messages: {
|
|
6557
|
+
"en-GB": messages_en_GB$2,
|
|
6558
|
+
"es-ES": messages_es_ES$2,
|
|
6559
|
+
"ru-RU": messages_ru_RU$2
|
|
6560
|
+
}
|
|
6561
|
+
});
|
|
6562
|
+
var TYPE = /* @__PURE__ */ ((TYPE2) => {
|
|
6563
|
+
TYPE2["EMAIL"] = "email";
|
|
6564
|
+
TYPE2["PASSWORD"] = "password";
|
|
6565
|
+
TYPE2["PHONE"] = "tel";
|
|
6566
|
+
TYPE2["SEARCH"] = "search";
|
|
6567
|
+
TYPE2["TEXT"] = "text";
|
|
6568
|
+
TYPE2["URL"] = "url";
|
|
6569
|
+
return TYPE2;
|
|
6570
|
+
})(TYPE || {});
|
|
6571
|
+
var INPUTMODE = /* @__PURE__ */ ((INPUTMODE2) => {
|
|
6572
|
+
INPUTMODE2["DECIMAL"] = "decimal";
|
|
6573
|
+
INPUTMODE2["EMAIL"] = "email";
|
|
6574
|
+
INPUTMODE2["NONE"] = "none";
|
|
6575
|
+
INPUTMODE2["NUMERIC"] = "numeric";
|
|
6576
|
+
INPUTMODE2["SEARCH"] = "search";
|
|
6577
|
+
INPUTMODE2["TEL"] = "tel";
|
|
6578
|
+
INPUTMODE2["TEXT"] = "text";
|
|
6579
|
+
INPUTMODE2["URL"] = "url";
|
|
6580
|
+
return INPUTMODE2;
|
|
6581
|
+
})(INPUTMODE || {});
|
|
6582
|
+
var SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
|
|
6583
|
+
SIZE2["XS"] = "xs";
|
|
6584
|
+
SIZE2["SM"] = "sm";
|
|
6585
|
+
SIZE2["MD"] = "md";
|
|
6586
|
+
SIZE2["LG"] = "lg";
|
|
6587
|
+
SIZE2["XL"] = "xl";
|
|
6588
|
+
return SIZE2;
|
|
6589
|
+
})(SIZE$2 || {});
|
|
6590
|
+
const decimalsOf = (value) => {
|
|
6591
|
+
const [, fraction] = String(value).replace(",", ".").split(".");
|
|
6592
|
+
return fraction ? fraction.length : 0;
|
|
6593
|
+
};
|
|
6594
|
+
const isMaxDecimalsExceeded = (value, decimals) => {
|
|
6595
|
+
return decimals !== void 0 && decimalsOf(value) > decimals;
|
|
6596
|
+
};
|
|
6597
|
+
const sanitizeNumeric = (raw) => raw.replace(/\D+/g, "");
|
|
6598
|
+
const sanitizeDecimal = (raw, allowNegative, decimals) => {
|
|
6599
|
+
let s = raw.replace(/,/g, ".");
|
|
6600
|
+
s = s.replace(/-/g, "");
|
|
6601
|
+
if (allowNegative && raw.trim().startsWith("-")) {
|
|
6602
|
+
s = "-" + s;
|
|
6603
|
+
}
|
|
6604
|
+
s = s.replace(/[^0-9.-]/g, "");
|
|
6605
|
+
s = normalizeDot(s);
|
|
6606
|
+
if (s.indexOf("-") > 0) s = s.replace(/-/g, "");
|
|
6607
|
+
s = normalizeZero(s);
|
|
6608
|
+
s = normalizeDecimals(s, decimals);
|
|
6609
|
+
return s;
|
|
6610
|
+
};
|
|
6611
|
+
function normalizeZero(value) {
|
|
6612
|
+
const m = value.match(/^(-)?(\d+)(?:\.(\d*))?$/);
|
|
6613
|
+
if (m) {
|
|
6614
|
+
const sign = m[1] ?? "";
|
|
6615
|
+
let integer = m[2];
|
|
6616
|
+
const fraction = m[3] ?? "";
|
|
6617
|
+
integer = integer.replace(/^0+(?=\d)/, "");
|
|
6618
|
+
if (integer === "") integer = "0";
|
|
6619
|
+
return integer === "0" && fraction === "" && !/\.$/.test(value) ? `${sign}${integer}` : fraction !== "" || /\.$/.test(value) ? `${sign}${integer}.${fraction}` : `${sign}${integer}`;
|
|
6620
|
+
}
|
|
6621
|
+
return value;
|
|
6622
|
+
}
|
|
6623
|
+
function normalizeDot(value) {
|
|
6624
|
+
const dotAt = value.indexOf(".");
|
|
6625
|
+
if (dotAt !== -1) {
|
|
6626
|
+
return value.slice(0, dotAt + 1) + value.slice(dotAt + 1).replace(/\./g, "");
|
|
6627
|
+
}
|
|
6628
|
+
return value;
|
|
6629
|
+
}
|
|
6630
|
+
function normalizeDecimals(value, decimals) {
|
|
6631
|
+
if (decimals !== "*") {
|
|
6632
|
+
const m = value.match(/^(-)?(\d+)(?:\.(\d*))?$/);
|
|
6633
|
+
if (m) {
|
|
6634
|
+
const sign = m[1] ?? "";
|
|
6635
|
+
const integer = m[2];
|
|
6636
|
+
const fraction = (m[3] ?? "").slice(0, decimals);
|
|
6637
|
+
return fraction.length > 0 && decimals > 0 ? `${sign}${integer}.${fraction}` : `${sign}${integer}`;
|
|
6638
|
+
}
|
|
6639
|
+
}
|
|
6640
|
+
return value;
|
|
6641
|
+
}
|
|
6642
|
+
class VueI18n {
|
|
6643
|
+
_state;
|
|
6644
|
+
constructor(locale = void 0) {
|
|
6645
|
+
this._state = reactive({ locale });
|
|
6646
|
+
}
|
|
6647
|
+
get locale() {
|
|
6648
|
+
return this._state.locale;
|
|
6649
|
+
}
|
|
6650
|
+
set locale(locale) {
|
|
6651
|
+
this._state.locale = locale;
|
|
6652
|
+
}
|
|
6653
|
+
}
|
|
6654
|
+
const I18nInjectKey = Symbol("$embedI18n");
|
|
6655
|
+
const plugin = {
|
|
6656
|
+
install(app, options) {
|
|
6657
|
+
app.provide(I18nInjectKey, options instanceof VueI18n ? options : new VueI18n(options?.locale));
|
|
6658
|
+
}
|
|
6659
|
+
};
|
|
6660
|
+
const _hoisted_1$5 = ["aria-controls", "aria-expanded", "aria-invalid"];
|
|
6661
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
6662
|
+
__name: "UiSelectTrigger",
|
|
6663
|
+
props: {
|
|
6664
|
+
/** Атрибут id корневого элемента выпадающего списка. Должен быть уникальным на странице */
|
|
6665
|
+
id: {
|
|
6666
|
+
type: String,
|
|
6667
|
+
default: void 0
|
|
6668
|
+
},
|
|
6669
|
+
/** Атрибут value, содержащий выбранный элемент из выпадающего списка */
|
|
6670
|
+
value: {
|
|
6671
|
+
type: null,
|
|
6672
|
+
default: void 0
|
|
6673
|
+
},
|
|
6674
|
+
/** Текст фильтра для поиска */
|
|
6675
|
+
filter: {
|
|
6676
|
+
type: String,
|
|
6677
|
+
default: ""
|
|
6678
|
+
},
|
|
6679
|
+
/** Отображает иконку сброса введённого или выбранного значения в виде крестика */
|
|
6680
|
+
clearable: {
|
|
6681
|
+
type: Boolean,
|
|
6682
|
+
default: false
|
|
6683
|
+
},
|
|
6684
|
+
/** Фильтрация строк выпадающего списка на соответствие введённого выражения в input */
|
|
6685
|
+
filterable: {
|
|
6686
|
+
type: Boolean,
|
|
6687
|
+
default: false
|
|
6688
|
+
},
|
|
6689
|
+
/** Подсвечивает поле как содержащее некорректное значение */
|
|
6690
|
+
invalid: {
|
|
6691
|
+
type: Boolean,
|
|
6692
|
+
default: false
|
|
6693
|
+
},
|
|
6694
|
+
/** Наличие множественного выбора среди элементов выпадающего списка */
|
|
6695
|
+
multiple: {
|
|
6696
|
+
type: Boolean,
|
|
6697
|
+
default: false
|
|
6698
|
+
},
|
|
6699
|
+
/** Атрибут placeholder нативного поля ввода input */
|
|
6700
|
+
placeholder: {
|
|
6701
|
+
type: String,
|
|
6702
|
+
default: ""
|
|
6703
|
+
},
|
|
6704
|
+
/** Устанавливает поле ввода в состояние доступное только для чтения */
|
|
6705
|
+
readonly: {
|
|
6706
|
+
type: Boolean,
|
|
6707
|
+
default: false
|
|
6708
|
+
},
|
|
6709
|
+
/** Блокировка поля ввода */
|
|
6710
|
+
disabled: {
|
|
6711
|
+
type: Boolean,
|
|
6712
|
+
default: false
|
|
6713
|
+
},
|
|
6714
|
+
/** Устанавливает в качестве выводимого в input значения только содержимое placeholder */
|
|
6715
|
+
placeholderOnly: {
|
|
6716
|
+
type: Boolean,
|
|
6717
|
+
default: false
|
|
6718
|
+
},
|
|
6719
|
+
/** Размер поля ввода */
|
|
6720
|
+
textboxSize: {
|
|
6721
|
+
type: String,
|
|
6722
|
+
validator: (size) => Object.values(SIZE$2).includes(size),
|
|
6723
|
+
default: SIZE$2.SM
|
|
6724
|
+
},
|
|
6725
|
+
/** Состояние открытия выпадающего списка */
|
|
6726
|
+
expanded: {
|
|
6727
|
+
type: Boolean,
|
|
6728
|
+
default: false
|
|
6729
|
+
},
|
|
6730
|
+
/** Выбранные элементы из выпадающего списка. Должен содержать значение или массив значений, соответствующих атрибуту value опций из выпадающего списка */
|
|
6731
|
+
selection: {
|
|
6732
|
+
type: Array,
|
|
6733
|
+
default: () => []
|
|
6734
|
+
}
|
|
6735
|
+
},
|
|
6736
|
+
emits: [
|
|
6737
|
+
/** Ввод значения в поле ввода */
|
|
6738
|
+
"input",
|
|
6739
|
+
/** Установка фокуса на поле ввода */
|
|
6740
|
+
"focus",
|
|
6741
|
+
/** Потеря фокуса полем ввода */
|
|
6742
|
+
"blur",
|
|
6743
|
+
/** Сброс значения фильтра */
|
|
6744
|
+
"clear",
|
|
6745
|
+
/** Изменение значения */
|
|
6746
|
+
"update:value",
|
|
6747
|
+
/** Открытие выпадающего списка */
|
|
6748
|
+
"update:expanded"
|
|
6749
|
+
],
|
|
6750
|
+
setup(__props, { emit: __emit }) {
|
|
6751
|
+
const props = __props;
|
|
6752
|
+
const emit = __emit;
|
|
6753
|
+
const i18n = computed(() => _i18n$2.init(inject(I18nInjectKey, null)?.locale ?? _i18n$2.fallback));
|
|
6754
|
+
const input = ref(null);
|
|
6755
|
+
const inputReadonly = computed(() => props.readonly || !props.filterable);
|
|
6756
|
+
const trigger = ref(null);
|
|
6757
|
+
const touchstone = ref(null);
|
|
6758
|
+
const selectionLabels = computed(() => props.selection.map((o) => o.label).join(", "));
|
|
6759
|
+
const selectionText = computed(() => {
|
|
6760
|
+
if (props.placeholder && props.placeholderOnly) return props.placeholder;
|
|
6761
|
+
if (props.multiple) {
|
|
6762
|
+
const width = input.value?.clientWidth ?? 0;
|
|
6763
|
+
if (width > 0 && selectionWidth.value > width) {
|
|
6764
|
+
return `${i18n.value.t("selected")}: ${props.selection.length}`;
|
|
6765
|
+
}
|
|
6766
|
+
}
|
|
6767
|
+
return selectionLabels.value;
|
|
6768
|
+
});
|
|
6769
|
+
const selectionWidth = ref(0);
|
|
6770
|
+
const updateSelectionWidth = () => {
|
|
6771
|
+
if (touchstone.value && !props.placeholderOnly) {
|
|
6772
|
+
nextTick().then(() => {
|
|
6773
|
+
selectionWidth.value = touchstone.value?.clientWidth ?? 0;
|
|
6774
|
+
});
|
|
6775
|
+
}
|
|
6776
|
+
};
|
|
6777
|
+
const inputValue = computed(() => {
|
|
6778
|
+
if (!inputReadonly.value && props.expanded) {
|
|
6779
|
+
if (props.multiple && !props.filter) {
|
|
6780
|
+
return selectionText.value;
|
|
6781
|
+
}
|
|
6782
|
+
return props.filter;
|
|
6783
|
+
}
|
|
6784
|
+
return selectionText.value;
|
|
6785
|
+
});
|
|
6786
|
+
const open = () => {
|
|
6787
|
+
if (props.expanded) return;
|
|
6788
|
+
emit("update:expanded", true);
|
|
6789
|
+
};
|
|
6790
|
+
const close = () => {
|
|
6791
|
+
if (!props.expanded) return;
|
|
6792
|
+
emit("update:expanded", false);
|
|
6793
|
+
};
|
|
6794
|
+
const onClick = () => {
|
|
6795
|
+
if (props.disabled || props.readonly) return;
|
|
6796
|
+
return props.expanded ? close() : open();
|
|
6797
|
+
};
|
|
6798
|
+
const onInput = (event) => {
|
|
6799
|
+
const target = event.target;
|
|
6800
|
+
emit("input", target?.value ?? "");
|
|
6801
|
+
};
|
|
6802
|
+
const onFocus = (event) => emit("focus", event);
|
|
6803
|
+
const onBlur = (event) => emit("blur", event);
|
|
6804
|
+
const onClear = (event) => {
|
|
6805
|
+
const value = props.multiple ? [] : null;
|
|
6806
|
+
emit("update:value", value);
|
|
6807
|
+
emit("clear", event);
|
|
6808
|
+
};
|
|
6809
|
+
watch(() => props.value, () => {
|
|
6810
|
+
updateSelectionWidth();
|
|
6811
|
+
if (props.multiple && props.expanded) {
|
|
6812
|
+
nextTick(() => input.value?.focus());
|
|
6813
|
+
}
|
|
6814
|
+
});
|
|
6815
|
+
onMounted(async () => {
|
|
6816
|
+
input.value = trigger.value?.querySelector("input") ?? null;
|
|
6817
|
+
updateSelectionWidth();
|
|
6818
|
+
});
|
|
6819
|
+
return (_ctx, _cache) => {
|
|
6820
|
+
return openBlock(), createElementBlock("div", {
|
|
6821
|
+
ref_key: "trigger",
|
|
6822
|
+
ref: trigger,
|
|
6823
|
+
"aria-controls": __props.id + "-popper",
|
|
6824
|
+
"aria-expanded": __props.expanded ? "true" : "false",
|
|
6825
|
+
"aria-invalid": __props.invalid ? "true" : "false",
|
|
6826
|
+
role: "combobox",
|
|
6827
|
+
"aria-haspopup": "listbox",
|
|
6828
|
+
class: normalizeClass({
|
|
6829
|
+
"ui-v1-select": true,
|
|
6830
|
+
"ui-v1-select_active": __props.expanded,
|
|
6831
|
+
"ui-v1-select_disabled": __props.disabled,
|
|
6832
|
+
"ui-v1-select_filterable": __props.filterable
|
|
6833
|
+
}),
|
|
6834
|
+
onClick
|
|
6835
|
+
}, [
|
|
6836
|
+
__props.multiple && !_ctx.$slots.trigger ? (openBlock(), createElementBlock("div", {
|
|
6837
|
+
key: 0,
|
|
6838
|
+
ref_key: "touchstone",
|
|
6839
|
+
ref: touchstone,
|
|
6840
|
+
class: "ui-v1-select__touchstone"
|
|
6841
|
+
}, toDisplayString(selectionLabels.value), 513)) : createCommentVNode("", true),
|
|
6842
|
+
renderSlot(_ctx.$slots, "trigger", {}, () => [
|
|
6843
|
+
createVNode(unref(_sfc_main$4), {
|
|
6844
|
+
id: __props.id,
|
|
6845
|
+
value: inputValue.value,
|
|
6846
|
+
placeholder: !inputReadonly.value && __props.expanded ? i18n.value.t("search.placeholder") : __props.placeholder,
|
|
6847
|
+
active: __props.expanded,
|
|
6848
|
+
clearable: __props.clearable,
|
|
6849
|
+
invalid: __props.invalid,
|
|
6850
|
+
readonly: inputReadonly.value,
|
|
6851
|
+
size: __props.textboxSize,
|
|
6852
|
+
disabled: __props.disabled,
|
|
6853
|
+
class: "ui-v1-select__trigger",
|
|
6854
|
+
onInput,
|
|
6855
|
+
onFocus,
|
|
6856
|
+
onBlur,
|
|
6857
|
+
onClear
|
|
6858
|
+
}, createSlots({
|
|
6859
|
+
"trailing-icon": withCtx(() => [
|
|
6860
|
+
renderSlot(_ctx.$slots, "trailing-icon", {}, () => [
|
|
6861
|
+
createVNode(unref(IconCaret), {
|
|
6862
|
+
"aria-hidden": "true",
|
|
6863
|
+
class: "ui-v1-select__caret"
|
|
6864
|
+
})
|
|
6865
|
+
])
|
|
6866
|
+
]),
|
|
6867
|
+
_: 2
|
|
6868
|
+
}, [
|
|
6869
|
+
_ctx.$slots["leading-icon"] ? {
|
|
6870
|
+
name: "leading-icon",
|
|
6871
|
+
fn: withCtx(() => [
|
|
6872
|
+
renderSlot(_ctx.$slots, "leading-icon")
|
|
6873
|
+
]),
|
|
6874
|
+
key: "0"
|
|
6875
|
+
} : void 0
|
|
6876
|
+
]), 1032, ["id", "value", "placeholder", "active", "clearable", "invalid", "readonly", "size", "disabled"])
|
|
6877
|
+
])
|
|
6878
|
+
], 10, _hoisted_1$5);
|
|
6879
|
+
};
|
|
6880
|
+
}
|
|
6881
|
+
});
|
|
6882
|
+
const _hoisted_1$4 = {
|
|
6883
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6884
|
+
viewBox: "0 0 24 24"
|
|
6885
|
+
};
|
|
6886
|
+
function render$1(_ctx, _cache) {
|
|
6887
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [
|
|
6888
|
+
createElementVNode("path", {
|
|
6889
|
+
fill: "currentColor",
|
|
6890
|
+
d: "m14.675 4.6.544-1.257a.99.99 0 0 0-.04-.911.82.82 0 0 0-.739-.421L9.5 2a.81.81 0 0 0-.704.423.99.99 0 0 0-.047.88l.55 1.26c.155.358.201.762.13 1.15l-.623 3.441a2.8 2.8 0 0 1-.685 1.426l-.875.96a.96.96 0 0 0-.246.646l.025.555c.002.502.373.91.83.912l8.312.025c.458 0 .828-.407.828-.909l.005-.536a.96.96 0 0 0-.248-.646l-.878-.964a2.85 2.85 0 0 1-.691-1.43l-.636-3.443a2 2 0 0 1 .128-1.15M10.967 20.047a3 3 0 0 1-.196-1.079l-.007-3.771 2.424.057.007 3.758a3 3 0 0 1-.193 1.079l-.638 1.632a.415.415 0 0 1-.382.277.42.42 0 0 1-.383-.279z"
|
|
6891
|
+
}, null, -1)
|
|
6892
|
+
])]);
|
|
6893
|
+
}
|
|
6894
|
+
const IconPinned = { render: render$1 };
|
|
6895
|
+
var SIZE$1 = /* @__PURE__ */ ((SIZE2) => {
|
|
6896
|
+
SIZE2["LG"] = "lg";
|
|
6897
|
+
SIZE2["MD"] = "md";
|
|
6898
|
+
SIZE2["SM"] = "sm";
|
|
6899
|
+
SIZE2["XS"] = "xs";
|
|
6900
|
+
return SIZE2;
|
|
6901
|
+
})(SIZE$1 || {});
|
|
6902
|
+
function deltaTransition(el) {
|
|
6903
|
+
const delta = el.scrollWidth - el.clientWidth;
|
|
6904
|
+
const animationDuration = `${(el.scrollWidth / el.clientWidth * 2).toFixed(2)}s`;
|
|
6905
|
+
return delta !== 0 ? {
|
|
6906
|
+
"--delta-width": `-${delta}px`,
|
|
6907
|
+
animationDuration
|
|
6908
|
+
} : {};
|
|
6909
|
+
}
|
|
6199
6910
|
const messages_en_GB$1 = {
|
|
6200
6911
|
"delete": "Delete"
|
|
6201
6912
|
};
|
|
@@ -6224,7 +6935,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
6224
6935
|
/** Размер */
|
|
6225
6936
|
size: {
|
|
6226
6937
|
type: String,
|
|
6227
|
-
default: SIZE$
|
|
6938
|
+
default: SIZE$1.LG
|
|
6228
6939
|
},
|
|
6229
6940
|
/** Слева выводим иконку закреплённого тега */
|
|
6230
6941
|
pinned: {
|
|
@@ -6325,86 +7036,6 @@ function render(_ctx, _cache) {
|
|
|
6325
7036
|
])]);
|
|
6326
7037
|
}
|
|
6327
7038
|
const IconClearCircle = { render };
|
|
6328
|
-
var TYPE = /* @__PURE__ */ ((TYPE2) => {
|
|
6329
|
-
TYPE2["EMAIL"] = "email";
|
|
6330
|
-
TYPE2["PASSWORD"] = "password";
|
|
6331
|
-
TYPE2["PHONE"] = "tel";
|
|
6332
|
-
TYPE2["SEARCH"] = "search";
|
|
6333
|
-
TYPE2["TEXT"] = "text";
|
|
6334
|
-
TYPE2["URL"] = "url";
|
|
6335
|
-
return TYPE2;
|
|
6336
|
-
})(TYPE || {});
|
|
6337
|
-
var INPUTMODE = /* @__PURE__ */ ((INPUTMODE2) => {
|
|
6338
|
-
INPUTMODE2["DECIMAL"] = "decimal";
|
|
6339
|
-
INPUTMODE2["EMAIL"] = "email";
|
|
6340
|
-
INPUTMODE2["NONE"] = "none";
|
|
6341
|
-
INPUTMODE2["NUMERIC"] = "numeric";
|
|
6342
|
-
INPUTMODE2["SEARCH"] = "search";
|
|
6343
|
-
INPUTMODE2["TEL"] = "tel";
|
|
6344
|
-
INPUTMODE2["TEXT"] = "text";
|
|
6345
|
-
INPUTMODE2["URL"] = "url";
|
|
6346
|
-
return INPUTMODE2;
|
|
6347
|
-
})(INPUTMODE || {});
|
|
6348
|
-
var SIZE$1 = /* @__PURE__ */ ((SIZE2) => {
|
|
6349
|
-
SIZE2["XS"] = "xs";
|
|
6350
|
-
SIZE2["SM"] = "sm";
|
|
6351
|
-
SIZE2["MD"] = "md";
|
|
6352
|
-
SIZE2["LG"] = "lg";
|
|
6353
|
-
SIZE2["XL"] = "xl";
|
|
6354
|
-
return SIZE2;
|
|
6355
|
-
})(SIZE$1 || {});
|
|
6356
|
-
const decimalsOf = (value) => {
|
|
6357
|
-
const [, fraction] = String(value).replace(",", ".").split(".");
|
|
6358
|
-
return fraction ? fraction.length : 0;
|
|
6359
|
-
};
|
|
6360
|
-
const isMaxDecimalsExceeded = (value, decimals) => {
|
|
6361
|
-
return decimals !== void 0 && decimalsOf(value) > decimals;
|
|
6362
|
-
};
|
|
6363
|
-
const sanitizeNumeric = (raw) => raw.replace(/\D+/g, "");
|
|
6364
|
-
const sanitizeDecimal = (raw, allowNegative, decimals) => {
|
|
6365
|
-
let s = raw.replace(/,/g, ".");
|
|
6366
|
-
s = s.replace(/-/g, "");
|
|
6367
|
-
if (allowNegative && raw.trim().startsWith("-")) {
|
|
6368
|
-
s = "-" + s;
|
|
6369
|
-
}
|
|
6370
|
-
s = s.replace(/[^0-9.-]/g, "");
|
|
6371
|
-
s = normalizeDot(s);
|
|
6372
|
-
if (s.indexOf("-") > 0) s = s.replace(/-/g, "");
|
|
6373
|
-
s = normalizeZero(s);
|
|
6374
|
-
s = normalizeDecimals(s, decimals);
|
|
6375
|
-
return s;
|
|
6376
|
-
};
|
|
6377
|
-
function normalizeZero(value) {
|
|
6378
|
-
const m = value.match(/^(-)?(\d+)(?:\.(\d*))?$/);
|
|
6379
|
-
if (m) {
|
|
6380
|
-
const sign = m[1] ?? "";
|
|
6381
|
-
let integer = m[2];
|
|
6382
|
-
const fraction = m[3] ?? "";
|
|
6383
|
-
integer = integer.replace(/^0+(?=\d)/, "");
|
|
6384
|
-
if (integer === "") integer = "0";
|
|
6385
|
-
return integer === "0" && fraction === "" && !/\.$/.test(value) ? `${sign}${integer}` : fraction !== "" || /\.$/.test(value) ? `${sign}${integer}.${fraction}` : `${sign}${integer}`;
|
|
6386
|
-
}
|
|
6387
|
-
return value;
|
|
6388
|
-
}
|
|
6389
|
-
function normalizeDot(value) {
|
|
6390
|
-
const dotAt = value.indexOf(".");
|
|
6391
|
-
if (dotAt !== -1) {
|
|
6392
|
-
return value.slice(0, dotAt + 1) + value.slice(dotAt + 1).replace(/\./g, "");
|
|
6393
|
-
}
|
|
6394
|
-
return value;
|
|
6395
|
-
}
|
|
6396
|
-
function normalizeDecimals(value, decimals) {
|
|
6397
|
-
if (decimals !== "*") {
|
|
6398
|
-
const m = value.match(/^(-)?(\d+)(?:\.(\d*))?$/);
|
|
6399
|
-
if (m) {
|
|
6400
|
-
const sign = m[1] ?? "";
|
|
6401
|
-
const integer = m[2];
|
|
6402
|
-
const fraction = (m[3] ?? "").slice(0, decimals);
|
|
6403
|
-
return fraction.length > 0 && decimals > 0 ? `${sign}${integer}.${fraction}` : `${sign}${integer}`;
|
|
6404
|
-
}
|
|
6405
|
-
}
|
|
6406
|
-
return value;
|
|
6407
|
-
}
|
|
6408
7039
|
const clear$2 = "Clear";
|
|
6409
7040
|
const messages_en_GB = {
|
|
6410
7041
|
clear: clear$2
|
|
@@ -6502,7 +7133,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6502
7133
|
/** Размер поля ввода */
|
|
6503
7134
|
size: {
|
|
6504
7135
|
type: String,
|
|
6505
|
-
default: SIZE$
|
|
7136
|
+
default: SIZE$2.SM
|
|
6506
7137
|
},
|
|
6507
7138
|
/** Нативный атрибут input|textarea */
|
|
6508
7139
|
placeholder: {
|
|
@@ -6773,10 +7404,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6773
7404
|
"ui-v1-textbox_active": __props.active,
|
|
6774
7405
|
"ui-v1-textbox_invalid": __props.invalid,
|
|
6775
7406
|
"ui-v1-textbox_outlined": __props.outlined,
|
|
6776
|
-
"ui-v1-textbox_xs": __props.size === unref(SIZE$
|
|
6777
|
-
"ui-v1-textbox_md": __props.size === unref(SIZE$
|
|
6778
|
-
"ui-v1-textbox_lg": __props.size === unref(SIZE$
|
|
6779
|
-
"ui-v1-textbox_xl": __props.size === unref(SIZE$
|
|
7407
|
+
"ui-v1-textbox_xs": __props.size === unref(SIZE$2).XS,
|
|
7408
|
+
"ui-v1-textbox_md": __props.size === unref(SIZE$2).MD,
|
|
7409
|
+
"ui-v1-textbox_lg": __props.size === unref(SIZE$2).LG,
|
|
7410
|
+
"ui-v1-textbox_xl": __props.size === unref(SIZE$2).XL
|
|
6780
7411
|
}
|
|
6781
7412
|
}, _ctx.$attrs), [
|
|
6782
7413
|
__props.prefix || "prefix" in _ctx.$slots ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
@@ -6936,12 +7567,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6936
7567
|
const toolbarSize = useToolbarSize();
|
|
6937
7568
|
const size = computed(() => {
|
|
6938
7569
|
if (toolbarSize.value === SIZE.SM) {
|
|
6939
|
-
return SIZE$
|
|
7570
|
+
return SIZE$6.XS;
|
|
6940
7571
|
}
|
|
6941
|
-
return SIZE$
|
|
7572
|
+
return SIZE$6.SM;
|
|
6942
7573
|
});
|
|
6943
7574
|
return (_ctx, _cache) => {
|
|
6944
|
-
return openBlock(), createBlock(_sfc_main$
|
|
7575
|
+
return openBlock(), createBlock(_sfc_main$q, mergeProps({
|
|
6945
7576
|
ref_key: "root",
|
|
6946
7577
|
ref: root,
|
|
6947
7578
|
href: __props.href,
|
|
@@ -7014,7 +7645,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7014
7645
|
},
|
|
7015
7646
|
setup(__props) {
|
|
7016
7647
|
return (_ctx, _cache) => {
|
|
7017
|
-
return openBlock(), createBlock(_sfc_main$
|
|
7648
|
+
return openBlock(), createBlock(_sfc_main$j, mergeProps({
|
|
7018
7649
|
href: __props.href,
|
|
7019
7650
|
external: __props.external,
|
|
7020
7651
|
appearance: __props.appearance,
|
|
@@ -7187,7 +7818,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7187
7818
|
});
|
|
7188
7819
|
return (_ctx, _cache) => {
|
|
7189
7820
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
7190
|
-
!ready.value ? (openBlock(), createBlock(_sfc_main$
|
|
7821
|
+
!ready.value ? (openBlock(), createBlock(_sfc_main$h, { key: 0 })) : createCommentVNode("", true),
|
|
7191
7822
|
withDirectives((openBlock(), createElementBlock("iframe", {
|
|
7192
7823
|
ref_key: "iframe",
|
|
7193
7824
|
ref: iframe,
|
|
@@ -7204,31 +7835,35 @@ export {
|
|
|
7204
7835
|
plugin as I18nPlugin,
|
|
7205
7836
|
ImageWorkersKey,
|
|
7206
7837
|
plugin$1 as ModalPlugin,
|
|
7207
|
-
_sfc_main$
|
|
7208
|
-
_sfc_main$
|
|
7209
|
-
_sfc_main$
|
|
7210
|
-
_sfc_main$
|
|
7211
|
-
_sfc_main$
|
|
7212
|
-
_sfc_main$
|
|
7213
|
-
_sfc_main$
|
|
7214
|
-
_sfc_main$
|
|
7215
|
-
_sfc_main$
|
|
7216
|
-
_sfc_main$
|
|
7217
|
-
_sfc_main$
|
|
7218
|
-
|
|
7219
|
-
_sfc_main$
|
|
7220
|
-
_sfc_main$
|
|
7221
|
-
_sfc_main$
|
|
7222
|
-
_sfc_main$
|
|
7223
|
-
_sfc_main$
|
|
7224
|
-
_sfc_main$
|
|
7838
|
+
_sfc_main$s as UiAvatar,
|
|
7839
|
+
_sfc_main$r as UiAvatarList,
|
|
7840
|
+
_sfc_main$q as UiButton,
|
|
7841
|
+
_sfc_main$p as UiCheckbox,
|
|
7842
|
+
_sfc_main$m as UiCopyButton,
|
|
7843
|
+
_sfc_main$l as UiDate,
|
|
7844
|
+
_sfc_main$k as UiError,
|
|
7845
|
+
_sfc_main$t as UiImage,
|
|
7846
|
+
_sfc_main$j as UiLink,
|
|
7847
|
+
_sfc_main$h as UiLoader,
|
|
7848
|
+
_sfc_main$g as UiMenuItem,
|
|
7849
|
+
UiMenuItemGroup,
|
|
7850
|
+
_sfc_main$d as UiModalSidebar,
|
|
7851
|
+
_sfc_main$b as UiModalWindow,
|
|
7852
|
+
_sfc_main$c as UiModalWindowSurface,
|
|
7853
|
+
_sfc_main$o as UiPopper,
|
|
7854
|
+
_sfc_main$a as UiPopperConnector,
|
|
7855
|
+
_sfc_main$9 as UiPopperTarget,
|
|
7856
|
+
_sfc_main$8 as UiRadio,
|
|
7857
|
+
_sfc_main$e as UiScrollBox,
|
|
7858
|
+
_sfc_main$7 as UiSelectPopper,
|
|
7859
|
+
_sfc_main$6 as UiSelectTrigger,
|
|
7225
7860
|
_sfc_main$5 as UiTag,
|
|
7226
7861
|
_sfc_main$4 as UiTextbox,
|
|
7227
7862
|
_sfc_main$3 as UiToolbar,
|
|
7228
7863
|
_sfc_main$2 as UiToolbarButton,
|
|
7229
7864
|
_sfc_main$1 as UiToolbarLink,
|
|
7230
|
-
_sfc_main$
|
|
7231
|
-
_sfc_main$
|
|
7865
|
+
_sfc_main$n as UiTooltip,
|
|
7866
|
+
_sfc_main$i as UiTransition,
|
|
7232
7867
|
_sfc_main as UiYandexMap,
|
|
7233
7868
|
VueI18n
|
|
7234
7869
|
};
|