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