@retailcrm/embed-ui-v1-components 0.9.14 → 0.9.16
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/AGENTS.md +126 -0
- package/README.md +24 -0
- package/assets/sprites/map-and-places/navigate.svg +3 -0
- package/assets/stylesheets/palette.less +11 -6
- package/bin/embed-ui-v1-components.mjs +209 -0
- package/bin/postinstall.mjs +37 -0
- package/dist/host.cjs +2443 -657
- package/dist/host.css +920 -6
- package/dist/host.d.ts +2440 -6
- package/dist/host.js +2444 -658
- package/dist/remote.cjs +1009 -46
- package/dist/remote.d.ts +1240 -67
- package/dist/remote.js +1011 -48
- package/docs/AI.md +106 -0
- package/docs/COMPONENTS.md +99 -0
- package/docs/FORMAT.md +267 -0
- package/docs/PROFILES.md +66 -0
- package/docs/README.md +65 -0
- package/docs/STYLING.md +156 -0
- package/docs/profiles/UiAddButton.yml +57 -0
- package/docs/profiles/UiAlert.yml +48 -0
- package/docs/profiles/UiAvatar.yml +48 -0
- package/docs/profiles/UiAvatarList.yml +42 -0
- package/docs/profiles/UiButton.yml +229 -0
- package/docs/profiles/UiCalendar.yml +48 -0
- package/docs/profiles/UiCheckbox.yml +53 -0
- package/docs/profiles/UiCollapse.yml +40 -0
- package/docs/profiles/UiCollapseBox.yml +51 -0
- package/docs/profiles/UiCollapseGroup.yml +39 -0
- package/docs/profiles/UiCopyButton.yml +52 -0
- package/docs/profiles/UiDate.yml +38 -0
- package/docs/profiles/UiDatePicker.yml +59 -0
- package/docs/profiles/UiError.yml +32 -0
- package/docs/profiles/UiField.yml +233 -0
- package/docs/profiles/UiImage.yml +39 -0
- package/docs/profiles/UiInfobox.yml +45 -0
- package/docs/profiles/UiLink.yml +51 -0
- package/docs/profiles/UiLoader.yml +38 -0
- package/docs/profiles/UiMenuItem.yml +57 -0
- package/docs/profiles/UiMenuItemGroup.yml +50 -0
- package/docs/profiles/UiModalSidebar.yml +46 -0
- package/docs/profiles/UiModalWindow.yml +44 -0
- package/docs/profiles/UiModalWindowSurface.yml +41 -0
- package/docs/profiles/UiNumberStepper.yml +52 -0
- package/docs/profiles/UiPageHeader.yml +244 -0
- package/docs/profiles/UiPopper.yml +201 -0
- package/docs/profiles/UiPopperConnector.yml +115 -0
- package/docs/profiles/UiPopperTarget.yml +118 -0
- package/docs/profiles/UiRadio.yml +38 -0
- package/docs/profiles/UiRadioSwitch.yml +231 -0
- package/docs/profiles/UiRadioSwitchOption.yml +121 -0
- package/docs/profiles/UiScrollBox.yml +31 -0
- package/docs/profiles/UiSelect.yml +327 -0
- package/docs/profiles/UiSelectOption.yml +44 -0
- package/docs/profiles/UiSelectOptionGroup.yml +38 -0
- package/docs/profiles/UiSlider.yml +38 -0
- package/docs/profiles/UiSwitch.yml +37 -0
- package/docs/profiles/UiTab.yml +119 -0
- package/docs/profiles/UiTabGroup.yml +238 -0
- package/docs/profiles/UiTable.yml +152 -0
- package/docs/profiles/UiTableBodyCell.yml +47 -0
- package/docs/profiles/UiTableColumn.yml +50 -0
- package/docs/profiles/UiTableFooterButton.yml +44 -0
- package/docs/profiles/UiTableFooterSection.yml +38 -0
- package/docs/profiles/UiTableHeadCell.yml +44 -0
- package/docs/profiles/UiTableSorter.yml +45 -0
- package/docs/profiles/UiTag.yml +41 -0
- package/docs/profiles/UiTextbox.yml +392 -0
- package/docs/profiles/UiTimePicker.yml +46 -0
- package/docs/profiles/UiToggleButton.yml +211 -0
- package/docs/profiles/UiToggleGroup.yml +211 -0
- package/docs/profiles/UiToggleGroupOption.yml +116 -0
- package/docs/profiles/UiToolbarButton.yml +37 -0
- package/docs/profiles/UiToolbarLink.yml +32 -0
- package/docs/profiles/UiTooltip.yml +43 -0
- package/docs/profiles/UiTransition.yml +27 -0
- package/docs/profiles/UiYandexMap.yml +29 -0
- package/package.json +8 -3
package/dist/remote.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineRemoteComponent, defineRemoteMethod, nextTick, createRemoteRoot } from "@omnicajs/vue-remote/remote";
|
|
2
|
-
import { openBlock, createElementBlock, createElementVNode, defineComponent, mergeProps, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, unref, withCtx,
|
|
1
|
+
import { defineRemoteComponent, defineRemoteMethod, withKeys, withModifiers, nextTick, createRemoteRoot } from "@omnicajs/vue-remote/remote";
|
|
2
|
+
import { openBlock, createElementBlock, createElementVNode, defineComponent, mergeProps, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, unref, withCtx, useTemplateRef, ref, computed, watch, createBlock, inject, onBeforeMount, onBeforeUnmount, Fragment, provide, renderList, createSlots, isVNode, Comment, Text, getCurrentInstance, h, reactive, onMounted } from "vue";
|
|
3
3
|
import isEqual from "lodash.isequal";
|
|
4
4
|
import { preview } from "@retailcrm/image-preview";
|
|
5
5
|
import { ru, es, enGB } from "date-fns/locale";
|
|
@@ -122,13 +122,13 @@ const UiError = defineRemoteComponent(
|
|
|
122
122
|
UiErrorType,
|
|
123
123
|
["click", "focus", "blur"]
|
|
124
124
|
);
|
|
125
|
-
const _hoisted_1$
|
|
125
|
+
const _hoisted_1$7 = {
|
|
126
126
|
xmlns: "http://www.w3.org/2000/svg",
|
|
127
127
|
fill: "currentColor",
|
|
128
128
|
viewBox: "0 0 24 24"
|
|
129
129
|
};
|
|
130
130
|
function render$2(_ctx, _cache) {
|
|
131
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
131
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [
|
|
132
132
|
createElementVNode("path", {
|
|
133
133
|
"fill-rule": "evenodd",
|
|
134
134
|
d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10A10 10 0 0 0 12 2m1 15.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5zm.88-5.21a2.89 2.89 0 0 0 2-2.73V9A2.88 2.88 0 0 0 13 6.12h-2A2.88 2.88 0 0 0 8.12 9v.5a.5.5 0 0 0 .5.5h.76a.5.5 0 0 0 .5-.5V9c0-.619.501-1.12 1.12-1.12h2A1.12 1.12 0 0 1 14.16 9v.56a1.13 1.13 0 0 1-.76 1.07l-.95.31a1.88 1.88 0 0 0-1.29 1.78v.78a.5.5 0 0 0 .5.5h.76a.5.5 0 0 0 .5-.5v-.78c0-.053.032-.1.08-.12z",
|
|
@@ -145,23 +145,23 @@ const UiPopperTargetType = "UiPopperTarget";
|
|
|
145
145
|
const UiPopperTarget = defineRemoteComponent(UiPopperTargetType);
|
|
146
146
|
const UiTooltipType = "UiTooltip";
|
|
147
147
|
const UiTooltip = defineRemoteComponent(UiTooltipType);
|
|
148
|
-
const _hoisted_1$
|
|
149
|
-
const _hoisted_2$
|
|
150
|
-
const _hoisted_3$
|
|
148
|
+
const _hoisted_1$6 = { class: "ui-v1-field__headline" };
|
|
149
|
+
const _hoisted_2$3 = ["id", "for"];
|
|
150
|
+
const _hoisted_3$3 = {
|
|
151
151
|
key: 0,
|
|
152
152
|
class: "ui-v1-field__required-mark",
|
|
153
153
|
"aria-hidden": "true"
|
|
154
154
|
};
|
|
155
|
-
const _hoisted_4 = {
|
|
155
|
+
const _hoisted_4$1 = {
|
|
156
156
|
key: 1,
|
|
157
157
|
class: "ui-v1-field__hint"
|
|
158
158
|
};
|
|
159
|
-
const _hoisted_5 = {
|
|
159
|
+
const _hoisted_5$1 = {
|
|
160
160
|
key: 2,
|
|
161
161
|
class: "ui-v1-field__addon"
|
|
162
162
|
};
|
|
163
163
|
const _hoisted_6 = { class: "ui-v1-field__control" };
|
|
164
|
-
const _sfc_main$
|
|
164
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
165
165
|
...{
|
|
166
166
|
inheritAttrs: false
|
|
167
167
|
},
|
|
@@ -219,7 +219,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
219
219
|
"ui-v1-field_readonly": __props.readonly
|
|
220
220
|
}
|
|
221
221
|
}, _ctx.$attrs), [
|
|
222
|
-
createElementVNode("div", _hoisted_1$
|
|
222
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
223
223
|
__props.label || _ctx.$slots.label ? (openBlock(), createElementBlock("label", {
|
|
224
224
|
key: 0,
|
|
225
225
|
id: `${__props.id}-label`,
|
|
@@ -229,9 +229,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
229
229
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
230
230
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
231
231
|
]),
|
|
232
|
-
__props.required ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
233
|
-
], 8, _hoisted_2$
|
|
234
|
-
__props.hint || _ctx.$slots.hint ? (openBlock(), createElementBlock("span", _hoisted_4, [
|
|
232
|
+
__props.required ? (openBlock(), createElementBlock("span", _hoisted_3$3, " * ")) : createCommentVNode("", true)
|
|
233
|
+
], 8, _hoisted_2$3)) : createCommentVNode("", true),
|
|
234
|
+
__props.hint || _ctx.$slots.hint ? (openBlock(), createElementBlock("span", _hoisted_4$1, [
|
|
235
235
|
createVNode(unref(UiPopperConnector), null, {
|
|
236
236
|
default: withCtx(() => [
|
|
237
237
|
createVNode(unref(UiPopperTarget), {
|
|
@@ -269,7 +269,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
269
269
|
_: 3
|
|
270
270
|
})
|
|
271
271
|
])) : createCommentVNode("", true),
|
|
272
|
-
_ctx.$slots.addon ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
272
|
+
_ctx.$slots.addon ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
273
273
|
renderSlot(_ctx.$slots, "addon")
|
|
274
274
|
])) : createCommentVNode("", true)
|
|
275
275
|
]),
|
|
@@ -387,11 +387,565 @@ const UiNumberStepper = defineRemoteComponent(
|
|
|
387
387
|
"violation"
|
|
388
388
|
]
|
|
389
389
|
);
|
|
390
|
+
const events$1 = [
|
|
391
|
+
"blur",
|
|
392
|
+
"change",
|
|
393
|
+
"focus",
|
|
394
|
+
"keydown",
|
|
395
|
+
"update:value"
|
|
396
|
+
];
|
|
397
|
+
const UiPageHeaderTitleType = "UiPageHeaderTitle";
|
|
398
|
+
const UiPageHeaderTitle = defineRemoteComponent(UiPageHeaderTitleType, {
|
|
399
|
+
emits: events$1,
|
|
400
|
+
methods: {
|
|
401
|
+
focus: defineRemoteMethod(),
|
|
402
|
+
blur: defineRemoteMethod()
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
const _hoisted_1$5 = { class: "ui-v1-page-header__main" };
|
|
406
|
+
const _hoisted_2$2 = {
|
|
407
|
+
key: 0,
|
|
408
|
+
class: "ui-v1-page-header__addon"
|
|
409
|
+
};
|
|
410
|
+
const _hoisted_3$2 = {
|
|
411
|
+
key: 0,
|
|
412
|
+
class: "ui-v1-page-header__actions"
|
|
413
|
+
};
|
|
414
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
415
|
+
...{
|
|
416
|
+
inheritAttrs: false
|
|
417
|
+
},
|
|
418
|
+
__name: "UiPageHeader",
|
|
419
|
+
props: {
|
|
420
|
+
/** Уникальный идентификатор корневого элемента */
|
|
421
|
+
id: {
|
|
422
|
+
type: null,
|
|
423
|
+
default: void 0
|
|
424
|
+
},
|
|
425
|
+
/** Текст заголовка */
|
|
426
|
+
value: {
|
|
427
|
+
type: null,
|
|
428
|
+
default: ""
|
|
429
|
+
},
|
|
430
|
+
/** Плейсхолдер, отображаемый при отсутствии текста */
|
|
431
|
+
placeholder: {
|
|
432
|
+
type: String,
|
|
433
|
+
default: ""
|
|
434
|
+
},
|
|
435
|
+
/** Текст ошибки для tooltip при пустом невалидном заголовке */
|
|
436
|
+
error: {
|
|
437
|
+
type: String,
|
|
438
|
+
default: ""
|
|
439
|
+
},
|
|
440
|
+
/** Разрешает перейти в режим редактирования по клику */
|
|
441
|
+
editable: {
|
|
442
|
+
type: Boolean,
|
|
443
|
+
default: false
|
|
444
|
+
},
|
|
445
|
+
/** Автоматически переводит фокус во встроенный UiTextbox при входе в режим редактирования */
|
|
446
|
+
autofocus: {
|
|
447
|
+
type: Boolean,
|
|
448
|
+
default: false
|
|
449
|
+
},
|
|
450
|
+
/** Автоматически выделяет текст заголовка при фокусе на встроенном поле */
|
|
451
|
+
autoselect: {
|
|
452
|
+
type: Boolean,
|
|
453
|
+
default: true
|
|
454
|
+
},
|
|
455
|
+
/** Делает встроенное поле только для чтения */
|
|
456
|
+
readonly: {
|
|
457
|
+
type: Boolean,
|
|
458
|
+
default: false
|
|
459
|
+
},
|
|
460
|
+
/** Полностью отключает заголовок */
|
|
461
|
+
disabled: {
|
|
462
|
+
type: Boolean,
|
|
463
|
+
default: false
|
|
464
|
+
},
|
|
465
|
+
/** Помечает встроенное поле как невалидное */
|
|
466
|
+
invalid: {
|
|
467
|
+
type: Boolean,
|
|
468
|
+
default: false
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
emits: ["blur", "change", "focus", "keydown", "update:value"],
|
|
472
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
473
|
+
const props = __props;
|
|
474
|
+
const emit = __emit;
|
|
475
|
+
const header = useTemplateRef("header");
|
|
476
|
+
const valueState = ref(props.value === null ? "" : String(props.value));
|
|
477
|
+
const displayInvalid = computed(() => props.invalid && valueState.value === "");
|
|
478
|
+
watch(() => props.value, (nextValue) => {
|
|
479
|
+
valueState.value = nextValue === null ? "" : String(nextValue);
|
|
480
|
+
});
|
|
481
|
+
const onUpdateValue = (value) => {
|
|
482
|
+
valueState.value = String(value);
|
|
483
|
+
emit("update:value", value);
|
|
484
|
+
};
|
|
485
|
+
__expose({
|
|
486
|
+
focus: () => header.value?.focus(),
|
|
487
|
+
blur: () => header.value?.blur()
|
|
488
|
+
});
|
|
489
|
+
return (_ctx, _cache) => {
|
|
490
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
491
|
+
class: {
|
|
492
|
+
"ui-v1-page-header": true,
|
|
493
|
+
"ui-v1-page-header_disabled": __props.disabled,
|
|
494
|
+
"ui-v1-page-header_invalid": displayInvalid.value,
|
|
495
|
+
"ui-v1-page-header_readonly": __props.readonly
|
|
496
|
+
}
|
|
497
|
+
}, _ctx.$attrs), [
|
|
498
|
+
createElementVNode("div", _hoisted_1$5, [
|
|
499
|
+
createVNode(unref(UiPopperConnector), null, {
|
|
500
|
+
default: withCtx(() => [
|
|
501
|
+
createVNode(unref(UiPopperTarget), {
|
|
502
|
+
tag: "div",
|
|
503
|
+
class: "ui-v1-page-header__title"
|
|
504
|
+
}, {
|
|
505
|
+
default: withCtx(() => [
|
|
506
|
+
createVNode(unref(UiPageHeaderTitle), {
|
|
507
|
+
id: __props.id,
|
|
508
|
+
ref_key: "header",
|
|
509
|
+
ref: header,
|
|
510
|
+
value: valueState.value,
|
|
511
|
+
placeholder: __props.placeholder,
|
|
512
|
+
error: __props.error,
|
|
513
|
+
invalid: __props.invalid,
|
|
514
|
+
editable: __props.editable,
|
|
515
|
+
autofocus: __props.autofocus,
|
|
516
|
+
autoselect: __props.autoselect,
|
|
517
|
+
readonly: __props.readonly,
|
|
518
|
+
disabled: __props.disabled,
|
|
519
|
+
onBlur: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("blur", $event)),
|
|
520
|
+
onChange: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("change", $event)),
|
|
521
|
+
onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("focus", $event)),
|
|
522
|
+
onKeydown: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("keydown", $event)),
|
|
523
|
+
"onUpdate:value": onUpdateValue
|
|
524
|
+
}, null, 8, ["id", "value", "placeholder", "error", "invalid", "editable", "autofocus", "autoselect", "readonly", "disabled"])
|
|
525
|
+
]),
|
|
526
|
+
_: 1
|
|
527
|
+
}),
|
|
528
|
+
displayInvalid.value && __props.error ? (openBlock(), createBlock(unref(UiTooltip), {
|
|
529
|
+
key: 0,
|
|
530
|
+
"target-triggers": {
|
|
531
|
+
hide: [""]
|
|
532
|
+
},
|
|
533
|
+
"offset-main-axis": 8,
|
|
534
|
+
visible: "",
|
|
535
|
+
placement: "right"
|
|
536
|
+
}, {
|
|
537
|
+
default: withCtx(() => [
|
|
538
|
+
createTextVNode(toDisplayString(__props.error), 1)
|
|
539
|
+
]),
|
|
540
|
+
_: 1
|
|
541
|
+
})) : createCommentVNode("", true)
|
|
542
|
+
]),
|
|
543
|
+
_: 1
|
|
544
|
+
}),
|
|
545
|
+
_ctx.$slots.addon ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
546
|
+
renderSlot(_ctx.$slots, "addon")
|
|
547
|
+
])) : createCommentVNode("", true)
|
|
548
|
+
]),
|
|
549
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
550
|
+
renderSlot(_ctx.$slots, "actions")
|
|
551
|
+
])) : createCommentVNode("", true)
|
|
552
|
+
], 16);
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
});
|
|
390
556
|
const UiRadioType = "UiRadio";
|
|
391
557
|
const UiRadio = defineRemoteComponent(
|
|
392
558
|
UiRadioType,
|
|
393
559
|
["click", "focus", "blur"]
|
|
394
560
|
);
|
|
561
|
+
const _hoisted_1$4 = {
|
|
562
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
563
|
+
viewBox: "0 0 24 24"
|
|
564
|
+
};
|
|
565
|
+
function render$1(_ctx, _cache) {
|
|
566
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [
|
|
567
|
+
createElementVNode("path", {
|
|
568
|
+
fill: "currentColor",
|
|
569
|
+
"fill-rule": "evenodd",
|
|
570
|
+
d: "M2 12C2 6.477 6.477 2 12 2A10 10 0 1 1 2 12m8.73 3.35 5.62-5.62a.5.5 0 0 0 0-.69l-.53-.53a.5.5 0 0 0-.7 0l-4.74 4.74-1.5-1.49a.48.48 0 0 0-.7 0l-.53.53a.5.5 0 0 0 0 .71l2.38 2.35a.48.48 0 0 0 .7 0",
|
|
571
|
+
"clip-rule": "evenodd"
|
|
572
|
+
}, null, -1)
|
|
573
|
+
])]);
|
|
574
|
+
}
|
|
575
|
+
const IconCheckmarkCircle = { render: render$1 };
|
|
576
|
+
var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
577
|
+
APPEARANCE2["DEFAULT"] = "default";
|
|
578
|
+
APPEARANCE2["SECTION"] = "section";
|
|
579
|
+
return APPEARANCE2;
|
|
580
|
+
})(APPEARANCE$1 || {});
|
|
581
|
+
var SIZE$3 = /* @__PURE__ */ ((SIZE2) => {
|
|
582
|
+
SIZE2["SM"] = "sm";
|
|
583
|
+
SIZE2["MD"] = "md";
|
|
584
|
+
SIZE2["LG"] = "lg";
|
|
585
|
+
return SIZE2;
|
|
586
|
+
})(SIZE$3 || {});
|
|
587
|
+
const AppearanceKey = Symbol("UiRadioSwitchAppearance");
|
|
588
|
+
const SizeKey$1 = Symbol("UiRadioSwitchSize");
|
|
589
|
+
const RegistryKey$1 = Symbol("UiRadioSwitchRegistry");
|
|
590
|
+
const UpdateKey = Symbol("UiRadioSwitchUpdate");
|
|
591
|
+
const FocusableIdKey$1 = Symbol("UiRadioSwitchFocusableId");
|
|
592
|
+
const SetFocusableIdKey$1 = Symbol("UiRadioSwitchSetFocusableId");
|
|
593
|
+
const MoveFocusKey$1 = Symbol("UiRadioSwitchMoveFocus");
|
|
594
|
+
const useAppearance = () => inject(AppearanceKey, computed(() => APPEARANCE$1.DEFAULT));
|
|
595
|
+
const useSize$1 = () => inject(SizeKey$1, computed(() => SIZE$3.MD));
|
|
596
|
+
const useRegistry$1 = () => inject(RegistryKey$1, {
|
|
597
|
+
register: () => {
|
|
598
|
+
},
|
|
599
|
+
unregister: () => {
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
const useUpdate = () => inject(UpdateKey, () => {
|
|
603
|
+
});
|
|
604
|
+
const useFocusableId$1 = () => inject(FocusableIdKey$1, computed(() => null));
|
|
605
|
+
const useSetFocusableId$1 = () => inject(SetFocusableIdKey$1, () => {
|
|
606
|
+
});
|
|
607
|
+
const useMoveFocus$1 = () => inject(MoveFocusKey$1, () => {
|
|
608
|
+
});
|
|
609
|
+
const UiRadioSwitchRootType = "UiRadioSwitchRoot";
|
|
610
|
+
const UiRadioSwitchRoot = defineRemoteComponent(UiRadioSwitchRootType);
|
|
611
|
+
const UiRadioSwitchOptionShellType = "UiRadioSwitchOptionShell";
|
|
612
|
+
const UiRadioSwitchOptionShell = defineRemoteComponent(UiRadioSwitchOptionShellType, {
|
|
613
|
+
emits: [
|
|
614
|
+
"click",
|
|
615
|
+
"focus",
|
|
616
|
+
"blur",
|
|
617
|
+
"keydown"
|
|
618
|
+
],
|
|
619
|
+
methods: {
|
|
620
|
+
focus: defineRemoteMethod(),
|
|
621
|
+
blur: defineRemoteMethod()
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
const _hoisted_1$3 = { class: "ui-v1-radio-switch-option__head" };
|
|
625
|
+
const _hoisted_2$1 = {
|
|
626
|
+
key: 0,
|
|
627
|
+
class: "ui-v1-radio-switch-option__icon"
|
|
628
|
+
};
|
|
629
|
+
const _hoisted_3$1 = {
|
|
630
|
+
key: 1,
|
|
631
|
+
class: "ui-v1-radio-switch-option__label"
|
|
632
|
+
};
|
|
633
|
+
const _hoisted_4 = {
|
|
634
|
+
key: 0,
|
|
635
|
+
class: "ui-v1-radio-switch-option__description"
|
|
636
|
+
};
|
|
637
|
+
const _hoisted_5 = {
|
|
638
|
+
key: 1,
|
|
639
|
+
class: "ui-v1-radio-switch-option__done"
|
|
640
|
+
};
|
|
641
|
+
let counter$2 = 0;
|
|
642
|
+
const __default__$1 = {};
|
|
643
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
644
|
+
...__default__$1,
|
|
645
|
+
...{
|
|
646
|
+
inheritAttrs: false
|
|
647
|
+
},
|
|
648
|
+
__name: "UiRadioSwitchOption",
|
|
649
|
+
props: {
|
|
650
|
+
/** Идентификатор */
|
|
651
|
+
id: {
|
|
652
|
+
type: String,
|
|
653
|
+
default: () => "ui-v1-radio-switch-option-" + ++counter$2
|
|
654
|
+
},
|
|
655
|
+
/** Заголовок */
|
|
656
|
+
label: {
|
|
657
|
+
type: String,
|
|
658
|
+
default: ""
|
|
659
|
+
},
|
|
660
|
+
/** Значение опции */
|
|
661
|
+
value: {
|
|
662
|
+
type: null,
|
|
663
|
+
required: true
|
|
664
|
+
},
|
|
665
|
+
/** Используется только c appearance=section */
|
|
666
|
+
description: {
|
|
667
|
+
type: String,
|
|
668
|
+
default: ""
|
|
669
|
+
},
|
|
670
|
+
/** Индикатор, заблокирована опция или нет */
|
|
671
|
+
disabled: {
|
|
672
|
+
type: Boolean,
|
|
673
|
+
default: false
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
setup(__props) {
|
|
677
|
+
const props = __props;
|
|
678
|
+
const appearance = useAppearance();
|
|
679
|
+
const focusableId = useFocusableId$1();
|
|
680
|
+
const moveFocus = useMoveFocus$1();
|
|
681
|
+
const shell = useTemplateRef("shell");
|
|
682
|
+
const size = useSize$1();
|
|
683
|
+
const registry = useRegistry$1();
|
|
684
|
+
const setFocusableId = useSetFocusableId$1();
|
|
685
|
+
const update = useUpdate();
|
|
686
|
+
const checked = ref(false);
|
|
687
|
+
const tabIndex = computed(() => {
|
|
688
|
+
return !props.disabled && focusableId.value === props.id ? 0 : -1;
|
|
689
|
+
});
|
|
690
|
+
const onClick = () => {
|
|
691
|
+
if (!props.disabled) {
|
|
692
|
+
setFocusableId(props.id);
|
|
693
|
+
update(props.value);
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
const onFocus = () => {
|
|
697
|
+
if (!props.disabled) {
|
|
698
|
+
setFocusableId(props.id);
|
|
699
|
+
}
|
|
700
|
+
};
|
|
701
|
+
const onKeyDown = (event) => {
|
|
702
|
+
if (props.disabled) {
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
switch (event.key) {
|
|
706
|
+
case " ":
|
|
707
|
+
case "Enter":
|
|
708
|
+
setFocusableId(props.id);
|
|
709
|
+
update(props.value);
|
|
710
|
+
return;
|
|
711
|
+
case "ArrowDown":
|
|
712
|
+
case "ArrowRight":
|
|
713
|
+
void moveFocus(props.id, "next");
|
|
714
|
+
return;
|
|
715
|
+
case "ArrowUp":
|
|
716
|
+
case "ArrowLeft":
|
|
717
|
+
void moveFocus(props.id, "prev");
|
|
718
|
+
return;
|
|
719
|
+
case "Home":
|
|
720
|
+
void moveFocus(props.id, "first");
|
|
721
|
+
return;
|
|
722
|
+
case "End":
|
|
723
|
+
void moveFocus(props.id, "last");
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
onBeforeMount(() => {
|
|
728
|
+
registry.register(props.id, {
|
|
729
|
+
getValue: () => props.value,
|
|
730
|
+
checked,
|
|
731
|
+
disabled: () => props.disabled,
|
|
732
|
+
focus: () => shell.value?.focus()
|
|
733
|
+
});
|
|
734
|
+
});
|
|
735
|
+
onBeforeUnmount(() => {
|
|
736
|
+
registry.unregister(props.id);
|
|
737
|
+
});
|
|
738
|
+
return (_ctx, _cache) => {
|
|
739
|
+
return openBlock(), createBlock(unref(UiRadioSwitchOptionShell), mergeProps({
|
|
740
|
+
id: __props.id,
|
|
741
|
+
ref_key: "shell",
|
|
742
|
+
ref: shell,
|
|
743
|
+
appearance: unref(appearance),
|
|
744
|
+
size: unref(size),
|
|
745
|
+
checked: checked.value,
|
|
746
|
+
disabled: __props.disabled,
|
|
747
|
+
tabindex: tabIndex.value
|
|
748
|
+
}, _ctx.$attrs, {
|
|
749
|
+
onClick,
|
|
750
|
+
onFocus,
|
|
751
|
+
onKeydown: [
|
|
752
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["space"]),
|
|
753
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["enter"]),
|
|
754
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["left"]),
|
|
755
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["right"]),
|
|
756
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["up"]),
|
|
757
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["down"]),
|
|
758
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["home"]),
|
|
759
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["end"])
|
|
760
|
+
]
|
|
761
|
+
}), {
|
|
762
|
+
default: withCtx(() => [
|
|
763
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
764
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
765
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
|
|
766
|
+
renderSlot(_ctx.$slots, "icon")
|
|
767
|
+
])) : createCommentVNode("", true),
|
|
768
|
+
_ctx.$slots.label || __props.label ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
769
|
+
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
770
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
771
|
+
])
|
|
772
|
+
])) : createCommentVNode("", true)
|
|
773
|
+
]),
|
|
774
|
+
unref(appearance) === unref(APPEARANCE$1).SECTION ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
775
|
+
_ctx.$slots.description || __props.description ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
776
|
+
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
777
|
+
createTextVNode(toDisplayString(__props.description), 1)
|
|
778
|
+
])
|
|
779
|
+
])) : createCommentVNode("", true),
|
|
780
|
+
checked.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
781
|
+
renderSlot(_ctx.$slots, "checkmark", {}, () => [
|
|
782
|
+
createVNode(unref(IconCheckmarkCircle))
|
|
783
|
+
])
|
|
784
|
+
])) : createCommentVNode("", true)
|
|
785
|
+
], 64)) : createCommentVNode("", true)
|
|
786
|
+
])
|
|
787
|
+
]),
|
|
788
|
+
_: 3
|
|
789
|
+
}, 16, ["id", "appearance", "size", "checked", "disabled", "tabindex", "onKeydown"]);
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
794
|
+
...{
|
|
795
|
+
inheritAttrs: false
|
|
796
|
+
},
|
|
797
|
+
__name: "UiRadioSwitch",
|
|
798
|
+
props: {
|
|
799
|
+
/** Выбранное значение */
|
|
800
|
+
value: {
|
|
801
|
+
type: null,
|
|
802
|
+
default: null
|
|
803
|
+
},
|
|
804
|
+
/** Список опций */
|
|
805
|
+
options: {
|
|
806
|
+
type: Array,
|
|
807
|
+
default: () => []
|
|
808
|
+
},
|
|
809
|
+
/** Предикат равенства */
|
|
810
|
+
equalFn: {
|
|
811
|
+
type: Function,
|
|
812
|
+
default: (a, b) => a === b
|
|
813
|
+
},
|
|
814
|
+
/** Внешний вид */
|
|
815
|
+
appearance: {
|
|
816
|
+
type: String,
|
|
817
|
+
default: APPEARANCE$1.DEFAULT,
|
|
818
|
+
validator: (appearance) => Object.values(APPEARANCE$1).includes(appearance)
|
|
819
|
+
},
|
|
820
|
+
/** Размер */
|
|
821
|
+
size: {
|
|
822
|
+
type: String,
|
|
823
|
+
default: SIZE$3.MD,
|
|
824
|
+
validator: (size) => Object.values(SIZE$3).includes(size)
|
|
825
|
+
},
|
|
826
|
+
/** Растягивание контейнера в зависимости от контента */
|
|
827
|
+
rubber: {
|
|
828
|
+
type: Boolean,
|
|
829
|
+
default: false
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
emits: ["change", "update:value"],
|
|
833
|
+
setup(__props, { emit: __emit }) {
|
|
834
|
+
const props = __props;
|
|
835
|
+
const emit = __emit;
|
|
836
|
+
const registry = /* @__PURE__ */ new Map();
|
|
837
|
+
const focusableId = ref(null);
|
|
838
|
+
const getEnabledEntries = () => {
|
|
839
|
+
return Array.from(registry.entries()).filter(([, option]) => !option.disabled());
|
|
840
|
+
};
|
|
841
|
+
const syncFocusableId = (preferredId) => {
|
|
842
|
+
const enabledEntries = getEnabledEntries();
|
|
843
|
+
const enabledIds = new Set(enabledEntries.map(([id]) => id));
|
|
844
|
+
const selectedEntry = enabledEntries.find(([, option]) => option.checked.value);
|
|
845
|
+
if (preferredId && enabledIds.has(preferredId)) {
|
|
846
|
+
focusableId.value = preferredId;
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
if (focusableId.value && enabledIds.has(focusableId.value)) {
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
focusableId.value = selectedEntry?.[0] ?? enabledEntries[0]?.[0] ?? null;
|
|
853
|
+
};
|
|
854
|
+
provide(AppearanceKey, computed(() => props.appearance));
|
|
855
|
+
provide(FocusableIdKey$1, computed(() => focusableId.value));
|
|
856
|
+
provide(SizeKey$1, computed(() => props.size));
|
|
857
|
+
provide(SetFocusableIdKey$1, (id) => {
|
|
858
|
+
syncFocusableId(id);
|
|
859
|
+
});
|
|
860
|
+
provide(RegistryKey$1, {
|
|
861
|
+
register: (id, option) => {
|
|
862
|
+
if (registry.has(id)) {
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
option.checked.value = props.equalFn(option.getValue(), props.value);
|
|
866
|
+
registry.set(id, option);
|
|
867
|
+
syncFocusableId(option.checked.value ? id : focusableId.value);
|
|
868
|
+
},
|
|
869
|
+
unregister: (id) => {
|
|
870
|
+
registry.delete(id);
|
|
871
|
+
if (focusableId.value === id) {
|
|
872
|
+
syncFocusableId();
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
provide(UpdateKey, (newValue) => {
|
|
877
|
+
emit("change", newValue);
|
|
878
|
+
emit("update:value", newValue);
|
|
879
|
+
});
|
|
880
|
+
provide(MoveFocusKey$1, async (id, direction) => {
|
|
881
|
+
const enabledEntries = getEnabledEntries();
|
|
882
|
+
if (!enabledEntries.length) {
|
|
883
|
+
focusableId.value = null;
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
let targetEntry = enabledEntries[0];
|
|
887
|
+
if (direction === "first") {
|
|
888
|
+
targetEntry = enabledEntries[0];
|
|
889
|
+
} else if (direction === "last") {
|
|
890
|
+
targetEntry = enabledEntries.at(-1) ?? enabledEntries[0];
|
|
891
|
+
} else {
|
|
892
|
+
const currentIndex = enabledEntries.findIndex(([entryId]) => entryId === id);
|
|
893
|
+
const fallbackIndex = focusableId.value ? enabledEntries.findIndex(([entryId]) => entryId === focusableId.value) : -1;
|
|
894
|
+
const baseIndex = currentIndex === -1 ? Math.max(fallbackIndex, 0) : currentIndex;
|
|
895
|
+
const offset = direction === "next" ? 1 : -1;
|
|
896
|
+
const nextIndex = (baseIndex + offset + enabledEntries.length) % enabledEntries.length;
|
|
897
|
+
targetEntry = enabledEntries[nextIndex] ?? enabledEntries[0];
|
|
898
|
+
}
|
|
899
|
+
if (!targetEntry) {
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
const [targetId, target] = targetEntry;
|
|
903
|
+
focusableId.value = targetId;
|
|
904
|
+
emit("change", target.getValue());
|
|
905
|
+
emit("update:value", target.getValue());
|
|
906
|
+
await target.focus();
|
|
907
|
+
});
|
|
908
|
+
watch([() => props.value, () => props.equalFn], ([newValue]) => {
|
|
909
|
+
let selectedId = null;
|
|
910
|
+
Array.from(registry.values()).forEach((option) => {
|
|
911
|
+
option.checked.value = props.equalFn(option.getValue(), newValue);
|
|
912
|
+
});
|
|
913
|
+
selectedId = Array.from(registry.entries()).find(([, option]) => {
|
|
914
|
+
return option.checked.value && !option.disabled();
|
|
915
|
+
})?.[0] ?? null;
|
|
916
|
+
syncFocusableId(selectedId);
|
|
917
|
+
});
|
|
918
|
+
return (_ctx, _cache) => {
|
|
919
|
+
return openBlock(), createBlock(unref(UiRadioSwitchRoot), mergeProps({
|
|
920
|
+
appearance: __props.appearance,
|
|
921
|
+
size: __props.size,
|
|
922
|
+
rubber: __props.rubber
|
|
923
|
+
}, _ctx.$attrs), {
|
|
924
|
+
default: withCtx(() => [
|
|
925
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
926
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
927
|
+
return openBlock(), createBlock(_sfc_main$9, {
|
|
928
|
+
key: `${option.label}-${index}`,
|
|
929
|
+
label: option.label,
|
|
930
|
+
value: option.value,
|
|
931
|
+
disabled: option.disabled
|
|
932
|
+
}, createSlots({ _: 2 }, [
|
|
933
|
+
_ctx.$slots.icon ? {
|
|
934
|
+
name: "icon",
|
|
935
|
+
fn: withCtx(() => [
|
|
936
|
+
renderSlot(_ctx.$slots, "icon", { option })
|
|
937
|
+
]),
|
|
938
|
+
key: "0"
|
|
939
|
+
} : void 0
|
|
940
|
+
]), 1032, ["label", "value", "disabled"]);
|
|
941
|
+
}), 128))
|
|
942
|
+
])
|
|
943
|
+
]),
|
|
944
|
+
_: 3
|
|
945
|
+
}, 16, ["appearance", "size", "rubber"]);
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
});
|
|
395
949
|
const UiScrollBoxType = "UiScrollBox";
|
|
396
950
|
const UiScrollBox = defineRemoteComponent(
|
|
397
951
|
UiScrollBoxType,
|
|
@@ -413,6 +967,30 @@ const UiSwitch = defineRemoteComponent(
|
|
|
413
967
|
UiSwitchType,
|
|
414
968
|
["click", "focus", "blur"]
|
|
415
969
|
);
|
|
970
|
+
const UiTabGroupType = "UiTabGroup";
|
|
971
|
+
const UiTabType = "UiTab";
|
|
972
|
+
const UiTab = defineRemoteComponent(
|
|
973
|
+
UiTabType,
|
|
974
|
+
[],
|
|
975
|
+
[
|
|
976
|
+
"default",
|
|
977
|
+
"icon",
|
|
978
|
+
"label",
|
|
979
|
+
"counter",
|
|
980
|
+
"content"
|
|
981
|
+
]
|
|
982
|
+
);
|
|
983
|
+
const UiTabGroup = defineRemoteComponent(
|
|
984
|
+
UiTabGroupType,
|
|
985
|
+
[
|
|
986
|
+
"layout",
|
|
987
|
+
"change",
|
|
988
|
+
"update:activeId",
|
|
989
|
+
"update:focusableId",
|
|
990
|
+
"update:menuExpanded"
|
|
991
|
+
],
|
|
992
|
+
["default"]
|
|
993
|
+
);
|
|
416
994
|
var ALIGN = /* @__PURE__ */ ((ALIGN2) => {
|
|
417
995
|
ALIGN2["LEFT"] = "left";
|
|
418
996
|
ALIGN2["CENTER"] = "center";
|
|
@@ -435,7 +1013,7 @@ const byRowKey = (key) => {
|
|
|
435
1013
|
};
|
|
436
1014
|
const asRowClass = (value) => value;
|
|
437
1015
|
const asRowAttrs = (value) => value;
|
|
438
|
-
const _sfc_main$
|
|
1016
|
+
const _sfc_main$7 = defineComponent({
|
|
439
1017
|
name: "UiTableColumn",
|
|
440
1018
|
props: {
|
|
441
1019
|
label: {
|
|
@@ -515,7 +1093,7 @@ const isNamedComponent = (node, name) => {
|
|
|
515
1093
|
return "name" in node.type && node.type.name === name;
|
|
516
1094
|
};
|
|
517
1095
|
const isTableColumnVNode = (node) => {
|
|
518
|
-
return node.type === _sfc_main$
|
|
1096
|
+
return node.type === _sfc_main$7 || isNamedComponent(node, "UiTableColumn");
|
|
519
1097
|
};
|
|
520
1098
|
const isWhitespaceText = (value) => value.trim().length === 0;
|
|
521
1099
|
const normalizeNodes = (children) => {
|
|
@@ -720,7 +1298,7 @@ const withoutClass = (attrs) => {
|
|
|
720
1298
|
delete next.class;
|
|
721
1299
|
return next;
|
|
722
1300
|
};
|
|
723
|
-
const _sfc_main$
|
|
1301
|
+
const _sfc_main$6 = defineComponent({
|
|
724
1302
|
name: "UiTable",
|
|
725
1303
|
inheritAttrs: false,
|
|
726
1304
|
props: {
|
|
@@ -989,14 +1567,14 @@ const UiTag = defineRemoteComponent(
|
|
|
989
1567
|
UiTagType,
|
|
990
1568
|
["click", "focus", "blur", "remove"]
|
|
991
1569
|
);
|
|
992
|
-
var SIZE$
|
|
1570
|
+
var SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
|
|
993
1571
|
SIZE2["XS"] = "xs";
|
|
994
1572
|
SIZE2["SM"] = "sm";
|
|
995
1573
|
SIZE2["MD"] = "md";
|
|
996
1574
|
SIZE2["LG"] = "lg";
|
|
997
1575
|
SIZE2["XL"] = "xl";
|
|
998
1576
|
return SIZE2;
|
|
999
|
-
})(SIZE$
|
|
1577
|
+
})(SIZE$2 || {});
|
|
1000
1578
|
const events = [
|
|
1001
1579
|
"input",
|
|
1002
1580
|
"keydown",
|
|
@@ -1036,6 +1614,371 @@ const UiTimePicker = defineRemoteComponent(UiTimePickerType, {
|
|
|
1036
1614
|
focus: defineRemoteMethod()
|
|
1037
1615
|
}
|
|
1038
1616
|
});
|
|
1617
|
+
const UiToggleButtonType = "UiToggleButton";
|
|
1618
|
+
const UiToggleButton = defineRemoteComponent(
|
|
1619
|
+
UiToggleButtonType,
|
|
1620
|
+
{
|
|
1621
|
+
emits: [
|
|
1622
|
+
"click",
|
|
1623
|
+
"focus",
|
|
1624
|
+
"blur",
|
|
1625
|
+
"keydown"
|
|
1626
|
+
],
|
|
1627
|
+
methods: {
|
|
1628
|
+
focus: defineRemoteMethod(),
|
|
1629
|
+
blur: defineRemoteMethod(),
|
|
1630
|
+
click: defineRemoteMethod()
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
);
|
|
1634
|
+
var UiToggleButtonSize = /* @__PURE__ */ ((UiToggleButtonSize2) => {
|
|
1635
|
+
UiToggleButtonSize2["LG"] = "lg";
|
|
1636
|
+
UiToggleButtonSize2["MD"] = "md";
|
|
1637
|
+
UiToggleButtonSize2["SM"] = "sm";
|
|
1638
|
+
UiToggleButtonSize2["XS"] = "xs";
|
|
1639
|
+
return UiToggleButtonSize2;
|
|
1640
|
+
})(UiToggleButtonSize || {});
|
|
1641
|
+
const FocusableIdKey = Symbol("UiToggleGroupFocusableId");
|
|
1642
|
+
const MoveFocusKey = Symbol("UiToggleGroupMoveFocus");
|
|
1643
|
+
const RegistryKey = Symbol("UiToggleGroupRegistry");
|
|
1644
|
+
const SetFocusableIdKey = Symbol("UiToggleGroupSetFocusableId");
|
|
1645
|
+
const SizeKey = Symbol("UiToggleGroupSize");
|
|
1646
|
+
const DisabledKey = Symbol("UiToggleGroupDisabled");
|
|
1647
|
+
const ToggleKey$1 = Symbol("UiToggleGroupToggle");
|
|
1648
|
+
const useFocusableId = () => inject(FocusableIdKey, computed(() => null));
|
|
1649
|
+
const useMoveFocus = () => inject(MoveFocusKey, () => {
|
|
1650
|
+
});
|
|
1651
|
+
const useRegistry = () => inject(RegistryKey, {
|
|
1652
|
+
register: () => {
|
|
1653
|
+
},
|
|
1654
|
+
unregister: () => {
|
|
1655
|
+
}
|
|
1656
|
+
});
|
|
1657
|
+
const useSetFocusableId = () => inject(SetFocusableIdKey, () => {
|
|
1658
|
+
});
|
|
1659
|
+
const useSize = () => inject(SizeKey, computed(() => UiToggleButtonSize.SM));
|
|
1660
|
+
const useDisabled = () => inject(DisabledKey, computed(() => false));
|
|
1661
|
+
const useToggle = () => inject(ToggleKey$1, () => {
|
|
1662
|
+
});
|
|
1663
|
+
let counter$1 = 0;
|
|
1664
|
+
const __default__ = {};
|
|
1665
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1666
|
+
...__default__,
|
|
1667
|
+
...{
|
|
1668
|
+
inheritAttrs: false
|
|
1669
|
+
},
|
|
1670
|
+
__name: "UiToggleGroupOption",
|
|
1671
|
+
props: {
|
|
1672
|
+
id: {
|
|
1673
|
+
type: String,
|
|
1674
|
+
default: () => "ui-v1-toggle-group-option-" + ++counter$1
|
|
1675
|
+
},
|
|
1676
|
+
label: {
|
|
1677
|
+
type: String,
|
|
1678
|
+
default: ""
|
|
1679
|
+
},
|
|
1680
|
+
value: {
|
|
1681
|
+
type: null,
|
|
1682
|
+
required: true
|
|
1683
|
+
},
|
|
1684
|
+
disabled: {
|
|
1685
|
+
type: Boolean,
|
|
1686
|
+
default: false
|
|
1687
|
+
}
|
|
1688
|
+
},
|
|
1689
|
+
setup(__props) {
|
|
1690
|
+
const props = __props;
|
|
1691
|
+
const button = useTemplateRef("button");
|
|
1692
|
+
const groupDisabled = useDisabled();
|
|
1693
|
+
const focusableId = useFocusableId();
|
|
1694
|
+
const moveFocus = useMoveFocus();
|
|
1695
|
+
const registry = useRegistry();
|
|
1696
|
+
const setFocusableId = useSetFocusableId();
|
|
1697
|
+
const size = useSize();
|
|
1698
|
+
const toggle = useToggle();
|
|
1699
|
+
const focused = ref(false);
|
|
1700
|
+
const disabled = computed(() => groupDisabled.value || props.disabled);
|
|
1701
|
+
const pressed = ref(false);
|
|
1702
|
+
const tabIndex = computed(() => {
|
|
1703
|
+
return !disabled.value && focusableId.value === props.id ? 0 : -1;
|
|
1704
|
+
});
|
|
1705
|
+
const onClick = () => {
|
|
1706
|
+
if (disabled.value) {
|
|
1707
|
+
return;
|
|
1708
|
+
}
|
|
1709
|
+
setFocusableId(props.id);
|
|
1710
|
+
toggle(props.value);
|
|
1711
|
+
};
|
|
1712
|
+
const onFocus = () => {
|
|
1713
|
+
if (!disabled.value) {
|
|
1714
|
+
focused.value = true;
|
|
1715
|
+
setFocusableId(props.id);
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
const onBlur = () => {
|
|
1719
|
+
focused.value = false;
|
|
1720
|
+
};
|
|
1721
|
+
const onKeyDown = (event) => {
|
|
1722
|
+
if (disabled.value) {
|
|
1723
|
+
return;
|
|
1724
|
+
}
|
|
1725
|
+
switch (event.key) {
|
|
1726
|
+
case " ":
|
|
1727
|
+
case "Enter":
|
|
1728
|
+
setFocusableId(props.id);
|
|
1729
|
+
toggle(props.value);
|
|
1730
|
+
return;
|
|
1731
|
+
case "ArrowDown":
|
|
1732
|
+
case "ArrowRight":
|
|
1733
|
+
void moveFocus(props.id, "next");
|
|
1734
|
+
return;
|
|
1735
|
+
case "ArrowUp":
|
|
1736
|
+
case "ArrowLeft":
|
|
1737
|
+
void moveFocus(props.id, "prev");
|
|
1738
|
+
return;
|
|
1739
|
+
case "Home":
|
|
1740
|
+
void moveFocus(props.id, "first");
|
|
1741
|
+
return;
|
|
1742
|
+
case "End":
|
|
1743
|
+
void moveFocus(props.id, "last");
|
|
1744
|
+
return;
|
|
1745
|
+
}
|
|
1746
|
+
};
|
|
1747
|
+
onBeforeMount(() => {
|
|
1748
|
+
registry.register(props.id, {
|
|
1749
|
+
getValue: () => props.value,
|
|
1750
|
+
pressed,
|
|
1751
|
+
disabled: () => disabled.value,
|
|
1752
|
+
focus: () => button.value?.focus()
|
|
1753
|
+
});
|
|
1754
|
+
});
|
|
1755
|
+
onBeforeUnmount(() => {
|
|
1756
|
+
registry.unregister(props.id);
|
|
1757
|
+
});
|
|
1758
|
+
return (_ctx, _cache) => {
|
|
1759
|
+
return openBlock(), createBlock(unref(UiToggleButton), mergeProps({
|
|
1760
|
+
id: __props.id,
|
|
1761
|
+
ref_key: "button",
|
|
1762
|
+
ref: button,
|
|
1763
|
+
size: unref(size),
|
|
1764
|
+
pressed: pressed.value,
|
|
1765
|
+
disabled: disabled.value,
|
|
1766
|
+
focused: focused.value,
|
|
1767
|
+
grouped: true,
|
|
1768
|
+
tabindex: tabIndex.value,
|
|
1769
|
+
role: "checkbox",
|
|
1770
|
+
"aria-checked": `${pressed.value}`,
|
|
1771
|
+
"aria-disabled": `${disabled.value}`
|
|
1772
|
+
}, _ctx.$attrs, {
|
|
1773
|
+
onClick,
|
|
1774
|
+
onFocus,
|
|
1775
|
+
onBlur,
|
|
1776
|
+
onKeydown: [
|
|
1777
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["space"]),
|
|
1778
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["enter"]),
|
|
1779
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["left"]),
|
|
1780
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["right"]),
|
|
1781
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["up"]),
|
|
1782
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["down"]),
|
|
1783
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["home"]),
|
|
1784
|
+
withKeys(withModifiers(onKeyDown, ["prevent"]), ["end"])
|
|
1785
|
+
]
|
|
1786
|
+
}), {
|
|
1787
|
+
default: withCtx(() => [
|
|
1788
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1789
|
+
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 0 }) : createCommentVNode("", true),
|
|
1790
|
+
_ctx.$slots.label || __props.label ? renderSlot(_ctx.$slots, "label", { key: 1 }, () => [
|
|
1791
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
1792
|
+
]) : createCommentVNode("", true)
|
|
1793
|
+
])
|
|
1794
|
+
]),
|
|
1795
|
+
_: 3
|
|
1796
|
+
}, 16, ["id", "size", "pressed", "disabled", "focused", "tabindex", "aria-checked", "aria-disabled", "onKeydown"]);
|
|
1797
|
+
};
|
|
1798
|
+
}
|
|
1799
|
+
});
|
|
1800
|
+
const UiToggleGroupRootType = "UiToggleGroupRoot";
|
|
1801
|
+
const UiToggleGroupRoot = defineRemoteComponent(UiToggleGroupRootType);
|
|
1802
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1803
|
+
...{
|
|
1804
|
+
inheritAttrs: false
|
|
1805
|
+
},
|
|
1806
|
+
__name: "UiToggleGroup",
|
|
1807
|
+
props: {
|
|
1808
|
+
model: {
|
|
1809
|
+
type: Array,
|
|
1810
|
+
default: () => []
|
|
1811
|
+
},
|
|
1812
|
+
options: {
|
|
1813
|
+
type: Array,
|
|
1814
|
+
default: () => []
|
|
1815
|
+
},
|
|
1816
|
+
equalFn: {
|
|
1817
|
+
type: Function,
|
|
1818
|
+
default: (a, b) => a === b
|
|
1819
|
+
},
|
|
1820
|
+
size: {
|
|
1821
|
+
type: String,
|
|
1822
|
+
default: UiToggleButtonSize.SM,
|
|
1823
|
+
validator: (size) => {
|
|
1824
|
+
return Object.values(UiToggleButtonSize).includes(size);
|
|
1825
|
+
}
|
|
1826
|
+
},
|
|
1827
|
+
rubber: {
|
|
1828
|
+
type: Boolean,
|
|
1829
|
+
default: false
|
|
1830
|
+
},
|
|
1831
|
+
disabled: {
|
|
1832
|
+
type: Boolean,
|
|
1833
|
+
default: false
|
|
1834
|
+
},
|
|
1835
|
+
ariaLabel: {
|
|
1836
|
+
type: String,
|
|
1837
|
+
default: void 0
|
|
1838
|
+
},
|
|
1839
|
+
ariaLabelledby: {
|
|
1840
|
+
type: String,
|
|
1841
|
+
default: void 0
|
|
1842
|
+
},
|
|
1843
|
+
ariaDescribedby: {
|
|
1844
|
+
type: String,
|
|
1845
|
+
default: void 0
|
|
1846
|
+
},
|
|
1847
|
+
ariaOrientation: {
|
|
1848
|
+
type: String,
|
|
1849
|
+
default: "horizontal"
|
|
1850
|
+
}
|
|
1851
|
+
},
|
|
1852
|
+
emits: ["change", "update:model"],
|
|
1853
|
+
setup(__props, { emit: __emit }) {
|
|
1854
|
+
const props = __props;
|
|
1855
|
+
const emit = __emit;
|
|
1856
|
+
const registry = /* @__PURE__ */ new Map();
|
|
1857
|
+
const focusableId = ref(null);
|
|
1858
|
+
const isPressed = (value) => {
|
|
1859
|
+
return props.model.some((entry) => props.equalFn(entry, value));
|
|
1860
|
+
};
|
|
1861
|
+
const getEnabledEntries = () => {
|
|
1862
|
+
return Array.from(registry.entries()).filter(([, option]) => !option.disabled());
|
|
1863
|
+
};
|
|
1864
|
+
const syncFocusableId = (preferredId) => {
|
|
1865
|
+
const enabledEntries = getEnabledEntries();
|
|
1866
|
+
const enabledIds = new Set(enabledEntries.map(([id]) => id));
|
|
1867
|
+
const pressedEntry = enabledEntries.find(([, option]) => option.pressed.value);
|
|
1868
|
+
if (preferredId && enabledIds.has(preferredId)) {
|
|
1869
|
+
focusableId.value = preferredId;
|
|
1870
|
+
return;
|
|
1871
|
+
}
|
|
1872
|
+
if (focusableId.value && enabledIds.has(focusableId.value)) {
|
|
1873
|
+
return;
|
|
1874
|
+
}
|
|
1875
|
+
focusableId.value = pressedEntry?.[0] ?? enabledEntries[0]?.[0] ?? null;
|
|
1876
|
+
};
|
|
1877
|
+
const updatePressedStates = () => {
|
|
1878
|
+
Array.from(registry.values()).forEach((option) => {
|
|
1879
|
+
option.pressed.value = isPressed(option.getValue());
|
|
1880
|
+
});
|
|
1881
|
+
};
|
|
1882
|
+
provide(FocusableIdKey, computed(() => focusableId.value));
|
|
1883
|
+
provide(DisabledKey, computed(() => props.disabled));
|
|
1884
|
+
provide(SizeKey, computed(() => props.size));
|
|
1885
|
+
provide(SetFocusableIdKey, (id) => {
|
|
1886
|
+
syncFocusableId(id);
|
|
1887
|
+
});
|
|
1888
|
+
provide(RegistryKey, {
|
|
1889
|
+
register: (id, option) => {
|
|
1890
|
+
if (registry.has(id)) {
|
|
1891
|
+
return;
|
|
1892
|
+
}
|
|
1893
|
+
option.pressed.value = isPressed(option.getValue());
|
|
1894
|
+
registry.set(id, option);
|
|
1895
|
+
syncFocusableId(option.pressed.value ? id : focusableId.value);
|
|
1896
|
+
},
|
|
1897
|
+
unregister: (id) => {
|
|
1898
|
+
registry.delete(id);
|
|
1899
|
+
if (focusableId.value === id) {
|
|
1900
|
+
syncFocusableId();
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
});
|
|
1904
|
+
provide(ToggleKey$1, (value) => {
|
|
1905
|
+
if (props.disabled) {
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
const nextModel = isPressed(value) ? props.model.filter((entry) => !props.equalFn(entry, value)) : [...props.model, value];
|
|
1909
|
+
emit("change", nextModel);
|
|
1910
|
+
emit("update:model", nextModel);
|
|
1911
|
+
});
|
|
1912
|
+
provide(MoveFocusKey, async (id, direction) => {
|
|
1913
|
+
const enabledEntries = getEnabledEntries();
|
|
1914
|
+
if (!enabledEntries.length) {
|
|
1915
|
+
focusableId.value = null;
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
let targetEntry = enabledEntries[0];
|
|
1919
|
+
if (direction === "first") {
|
|
1920
|
+
targetEntry = enabledEntries[0];
|
|
1921
|
+
} else if (direction === "last") {
|
|
1922
|
+
targetEntry = enabledEntries.at(-1) ?? enabledEntries[0];
|
|
1923
|
+
} else {
|
|
1924
|
+
const currentIndex = enabledEntries.findIndex(([entryId]) => entryId === id);
|
|
1925
|
+
const fallbackIndex = focusableId.value ? enabledEntries.findIndex(([entryId]) => entryId === focusableId.value) : -1;
|
|
1926
|
+
const baseIndex = currentIndex === -1 ? Math.max(fallbackIndex, 0) : currentIndex;
|
|
1927
|
+
const offset = direction === "next" ? 1 : -1;
|
|
1928
|
+
const nextIndex = (baseIndex + offset + enabledEntries.length) % enabledEntries.length;
|
|
1929
|
+
targetEntry = enabledEntries[nextIndex] ?? enabledEntries[0];
|
|
1930
|
+
}
|
|
1931
|
+
if (!targetEntry) {
|
|
1932
|
+
return;
|
|
1933
|
+
}
|
|
1934
|
+
const [targetId, target] = targetEntry;
|
|
1935
|
+
focusableId.value = targetId;
|
|
1936
|
+
await target.focus();
|
|
1937
|
+
});
|
|
1938
|
+
watch([() => props.model, () => props.equalFn], () => {
|
|
1939
|
+
updatePressedStates();
|
|
1940
|
+
syncFocusableId();
|
|
1941
|
+
}, {
|
|
1942
|
+
deep: true
|
|
1943
|
+
});
|
|
1944
|
+
watch(() => props.disabled, () => {
|
|
1945
|
+
syncFocusableId();
|
|
1946
|
+
});
|
|
1947
|
+
return (_ctx, _cache) => {
|
|
1948
|
+
return openBlock(), createBlock(unref(UiToggleGroupRoot), mergeProps({
|
|
1949
|
+
size: __props.size,
|
|
1950
|
+
rubber: __props.rubber,
|
|
1951
|
+
disabled: __props.disabled,
|
|
1952
|
+
"aria-label": props.ariaLabel,
|
|
1953
|
+
"aria-labelledby": props.ariaLabelledby,
|
|
1954
|
+
"aria-describedby": props.ariaDescribedby,
|
|
1955
|
+
"aria-orientation": props.ariaOrientation
|
|
1956
|
+
}, _ctx.$attrs), {
|
|
1957
|
+
default: withCtx(() => [
|
|
1958
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1959
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
1960
|
+
return openBlock(), createBlock(_sfc_main$5, {
|
|
1961
|
+
key: `${option.label}-${index}`,
|
|
1962
|
+
label: option.label,
|
|
1963
|
+
value: option.value,
|
|
1964
|
+
disabled: option.disabled
|
|
1965
|
+
}, createSlots({ _: 2 }, [
|
|
1966
|
+
_ctx.$slots.icon ? {
|
|
1967
|
+
name: "icon",
|
|
1968
|
+
fn: withCtx(() => [
|
|
1969
|
+
renderSlot(_ctx.$slots, "icon", { option })
|
|
1970
|
+
]),
|
|
1971
|
+
key: "0"
|
|
1972
|
+
} : void 0
|
|
1973
|
+
]), 1032, ["label", "value", "disabled"]);
|
|
1974
|
+
}), 128))
|
|
1975
|
+
])
|
|
1976
|
+
]),
|
|
1977
|
+
_: 3
|
|
1978
|
+
}, 16, ["size", "rubber", "disabled", "aria-label", "aria-labelledby", "aria-describedby", "aria-orientation"]);
|
|
1979
|
+
};
|
|
1980
|
+
}
|
|
1981
|
+
});
|
|
1039
1982
|
const UiToolbarButtonType = "UiToolbarButton";
|
|
1040
1983
|
const UiToolbarButton = defineRemoteComponent(
|
|
1041
1984
|
UiToolbarButtonType,
|
|
@@ -1321,7 +2264,7 @@ const UiSelectOptionType = "UiSelectOption";
|
|
|
1321
2264
|
defineRemoteComponent(
|
|
1322
2265
|
UiSelectOptionType
|
|
1323
2266
|
);
|
|
1324
|
-
const _hoisted_1$
|
|
2267
|
+
const _hoisted_1$2 = {
|
|
1325
2268
|
key: 0,
|
|
1326
2269
|
class: "ui-v1-select__no-results-text"
|
|
1327
2270
|
};
|
|
@@ -1417,8 +2360,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1417
2360
|
/** Размер поля ввода */
|
|
1418
2361
|
textboxSize: {
|
|
1419
2362
|
type: String,
|
|
1420
|
-
validator: (size) => Object.values(SIZE$
|
|
1421
|
-
default: SIZE$
|
|
2363
|
+
validator: (size) => Object.values(SIZE$2).includes(size),
|
|
2364
|
+
default: SIZE$2.SM
|
|
1422
2365
|
},
|
|
1423
2366
|
/** Наличие множественного выбора среди элементов выпадающего списка */
|
|
1424
2367
|
multiple: {
|
|
@@ -1714,7 +2657,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1714
2657
|
onHide: close
|
|
1715
2658
|
}, {
|
|
1716
2659
|
default: withCtx(() => [
|
|
1717
|
-
__props.filterable && optionsRegistry.value.every((o) => !o.isMatched()) && noResult.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2660
|
+
__props.filterable && optionsRegistry.value.every((o) => !o.isMatched()) && noResult.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, toDisplayString(noResult.value), 1)) : createCommentVNode("", true),
|
|
1718
2661
|
renderSlot(_ctx.$slots, "default")
|
|
1719
2662
|
]),
|
|
1720
2663
|
_: 3
|
|
@@ -1725,21 +2668,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1725
2668
|
};
|
|
1726
2669
|
}
|
|
1727
2670
|
});
|
|
1728
|
-
const _hoisted_1$2 = {
|
|
1729
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1730
|
-
viewBox: "0 0 24 24"
|
|
1731
|
-
};
|
|
1732
|
-
function render$1(_ctx, _cache) {
|
|
1733
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
|
|
1734
|
-
createElementVNode("path", {
|
|
1735
|
-
fill: "currentColor",
|
|
1736
|
-
"fill-rule": "evenodd",
|
|
1737
|
-
d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16m1-9h2.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H13v2.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V13H8.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H11V8.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5z",
|
|
1738
|
-
"clip-rule": "evenodd"
|
|
1739
|
-
}, null, -1)
|
|
1740
|
-
])]);
|
|
1741
|
-
}
|
|
1742
|
-
const IconAddCircleOutlined = { render: render$1 };
|
|
1743
2671
|
const _hoisted_1$1 = {
|
|
1744
2672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1745
2673
|
viewBox: "0 0 24 24"
|
|
@@ -1749,19 +2677,19 @@ function render(_ctx, _cache) {
|
|
|
1749
2677
|
createElementVNode("path", {
|
|
1750
2678
|
fill: "currentColor",
|
|
1751
2679
|
"fill-rule": "evenodd",
|
|
1752
|
-
d: "
|
|
2680
|
+
d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16m1-9h2.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H13v2.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V13H8.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H11V8.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5z",
|
|
1753
2681
|
"clip-rule": "evenodd"
|
|
1754
2682
|
}, null, -1)
|
|
1755
2683
|
])]);
|
|
1756
2684
|
}
|
|
1757
|
-
const
|
|
1758
|
-
var SIZE = /* @__PURE__ */ ((SIZE2) => {
|
|
2685
|
+
const IconAddCircleOutlined = { render };
|
|
2686
|
+
var SIZE$1 = /* @__PURE__ */ ((SIZE2) => {
|
|
1759
2687
|
SIZE2["XS"] = "xs";
|
|
1760
2688
|
SIZE2["SM"] = "sm";
|
|
1761
2689
|
SIZE2["MD"] = "md";
|
|
1762
2690
|
SIZE2["LG"] = "lg";
|
|
1763
2691
|
return SIZE2;
|
|
1764
|
-
})(SIZE || {});
|
|
2692
|
+
})(SIZE$1 || {});
|
|
1765
2693
|
const _hoisted_1 = ["id", "aria-selected", "aria-current"];
|
|
1766
2694
|
const _hoisted_2 = ["innerHTML"];
|
|
1767
2695
|
const _hoisted_3 = ["innerHTML"];
|
|
@@ -1796,8 +2724,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1796
2724
|
/** Размер шрифта, иконок и внутренних отступов компонента */
|
|
1797
2725
|
size: {
|
|
1798
2726
|
type: String,
|
|
1799
|
-
validator: (size) => Object.values(SIZE).includes(size),
|
|
1800
|
-
default: SIZE.MD
|
|
2727
|
+
validator: (size) => Object.values(SIZE$1).includes(size),
|
|
2728
|
+
default: SIZE$1.MD
|
|
1801
2729
|
},
|
|
1802
2730
|
/** Счетчик количества */
|
|
1803
2731
|
counter: {
|
|
@@ -2098,13 +3026,19 @@ const createEndpointRoot = async (channel) => {
|
|
|
2098
3026
|
"UiModalWindow",
|
|
2099
3027
|
"UiModalWindowSurface",
|
|
2100
3028
|
"UiNumberStepper",
|
|
3029
|
+
"UiPageHeader",
|
|
3030
|
+
"UiPageHeaderTitle",
|
|
2101
3031
|
"UiPopper",
|
|
2102
3032
|
"UiPopperConnector",
|
|
2103
3033
|
"UiPopperTarget",
|
|
2104
3034
|
"UiRadio",
|
|
3035
|
+
"UiRadioSwitchOptionShell",
|
|
3036
|
+
"UiRadioSwitchRoot",
|
|
2105
3037
|
"UiScrollBox",
|
|
2106
3038
|
"UiSlider",
|
|
2107
3039
|
"UiSwitch",
|
|
3040
|
+
"UiTab",
|
|
3041
|
+
"UiTabGroup",
|
|
2108
3042
|
"UiSelectPopper",
|
|
2109
3043
|
"UiSelectTrigger",
|
|
2110
3044
|
"UiTableBodyCell",
|
|
@@ -2119,6 +3053,8 @@ const createEndpointRoot = async (channel) => {
|
|
|
2119
3053
|
"UiTag",
|
|
2120
3054
|
"UiTextbox",
|
|
2121
3055
|
"UiTimePicker",
|
|
3056
|
+
"UiToggleButton",
|
|
3057
|
+
"UiToggleGroupRoot",
|
|
2122
3058
|
"UiToolbarButton",
|
|
2123
3059
|
"UiToolbarLink",
|
|
2124
3060
|
"UiTooltip",
|
|
@@ -2142,6 +3078,17 @@ const usePreview = (workers = ref([])) => {
|
|
|
2142
3078
|
preview: (url, resize = void 0, crop = void 0) => preview(_workers.value, url, resize, crop)
|
|
2143
3079
|
};
|
|
2144
3080
|
};
|
|
3081
|
+
var SIZE = /* @__PURE__ */ ((SIZE2) => {
|
|
3082
|
+
SIZE2["SM"] = "sm";
|
|
3083
|
+
SIZE2["MD"] = "md";
|
|
3084
|
+
SIZE2["LG"] = "lg";
|
|
3085
|
+
return SIZE2;
|
|
3086
|
+
})(SIZE || {});
|
|
3087
|
+
var APPEARANCE = /* @__PURE__ */ ((APPEARANCE2) => {
|
|
3088
|
+
APPEARANCE2["TEXT"] = "text";
|
|
3089
|
+
APPEARANCE2["FILLED"] = "filled";
|
|
3090
|
+
return APPEARANCE2;
|
|
3091
|
+
})(APPEARANCE || {});
|
|
2145
3092
|
const formatDateLat = (date) => format(date, "dd/MM/yyyy", { locale: enGB });
|
|
2146
3093
|
const formatDateEs = (date) => format(date, "dd.MM.yyyy", { locale: es });
|
|
2147
3094
|
const formatDateRu = (date) => format(date, "dd.MM.yyyy", { locale: ru });
|
|
@@ -2182,6 +3129,10 @@ export {
|
|
|
2182
3129
|
ALIGN,
|
|
2183
3130
|
DIRECTION,
|
|
2184
3131
|
ImageWorkersKey,
|
|
3132
|
+
APPEARANCE$1 as RADIO_SWITCH_APPEARANCE,
|
|
3133
|
+
SIZE$3 as RADIO_SWITCH_SIZE,
|
|
3134
|
+
APPEARANCE as TAB_APPEARANCE,
|
|
3135
|
+
SIZE as TAB_SIZE,
|
|
2185
3136
|
UiAddButton,
|
|
2186
3137
|
UiAddButtonType,
|
|
2187
3138
|
UiAlert,
|
|
@@ -2210,7 +3161,7 @@ export {
|
|
|
2210
3161
|
UiDateType,
|
|
2211
3162
|
UiError,
|
|
2212
3163
|
UiErrorType,
|
|
2213
|
-
_sfc_main$
|
|
3164
|
+
_sfc_main$b as UiField,
|
|
2214
3165
|
UiInfobox,
|
|
2215
3166
|
UiInfoboxType,
|
|
2216
3167
|
UiLink,
|
|
@@ -2229,6 +3180,7 @@ export {
|
|
|
2229
3180
|
UiModalWindowType,
|
|
2230
3181
|
UiNumberStepper,
|
|
2231
3182
|
UiNumberStepperType,
|
|
3183
|
+
_sfc_main$a as UiPageHeader,
|
|
2232
3184
|
UiPopper,
|
|
2233
3185
|
UiPopperConnector,
|
|
2234
3186
|
UiPopperConnectorType,
|
|
@@ -2236,6 +3188,8 @@ export {
|
|
|
2236
3188
|
UiPopperTargetType,
|
|
2237
3189
|
UiPopperType,
|
|
2238
3190
|
UiRadio,
|
|
3191
|
+
_sfc_main$8 as UiRadioSwitch,
|
|
3192
|
+
_sfc_main$9 as UiRadioSwitchOption,
|
|
2239
3193
|
UiRadioType,
|
|
2240
3194
|
UiScrollBox,
|
|
2241
3195
|
UiScrollBoxType,
|
|
@@ -2246,9 +3200,13 @@ export {
|
|
|
2246
3200
|
UiSliderType,
|
|
2247
3201
|
UiSwitch,
|
|
2248
3202
|
UiSwitchType,
|
|
2249
|
-
|
|
3203
|
+
UiTab,
|
|
3204
|
+
UiTabGroup,
|
|
3205
|
+
UiTabGroupType,
|
|
3206
|
+
UiTabType,
|
|
3207
|
+
_sfc_main$6 as UiTable,
|
|
2250
3208
|
UiTableBodyCell,
|
|
2251
|
-
_sfc_main$
|
|
3209
|
+
_sfc_main$7 as UiTableColumn,
|
|
2252
3210
|
UiTableFooterButton,
|
|
2253
3211
|
UiTableFooterSection,
|
|
2254
3212
|
UiTableHeadCell,
|
|
@@ -2259,6 +3217,11 @@ export {
|
|
|
2259
3217
|
UiTextboxType,
|
|
2260
3218
|
UiTimePicker,
|
|
2261
3219
|
UiTimePickerType,
|
|
3220
|
+
UiToggleButton,
|
|
3221
|
+
UiToggleButtonSize,
|
|
3222
|
+
UiToggleButtonType,
|
|
3223
|
+
_sfc_main$4 as UiToggleGroup,
|
|
3224
|
+
_sfc_main$5 as UiToggleGroupOption,
|
|
2262
3225
|
UiToolbarButton,
|
|
2263
3226
|
UiToolbarButtonType,
|
|
2264
3227
|
UiToolbarLink,
|