@retailcrm/embed-ui-v1-components 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/host.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { Text, Comment, defineComponent, ref, h, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, createElementVNode, mergeProps, createVNode, createCommentVNode, createBlock, Transition, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps, normalizeStyle, reactive, inject, computed, watch, onMounted, onActivated, onDeactivated, onBeforeUnmount, useAttrs, useSlots, Teleport, withDirectives, vShow, toHandlers, withModifiers, provide, createSlots } from "vue";
4
+ import { Text, Comment, defineComponent, ref, h, openBlock, createElementBlock, createElementVNode, computed, mergeProps, unref, createBlock, createCommentVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, createVNode, Transition, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps, normalizeStyle, reactive, inject, watch, onMounted, onActivated, onDeactivated, onBeforeUnmount, useAttrs, useSlots, Teleport, withDirectives, vShow, toHandlers, withModifiers, provide, createSlots } from "vue";
5
5
  const isURL = (href) => {
6
6
  try {
7
7
  new URL(href);
@@ -58,7 +58,7 @@ var VARIANT = /* @__PURE__ */ ((VARIANT2) => {
58
58
  VARIANT2["DANGER"] = "danger";
59
59
  return VARIANT2;
60
60
  })(VARIANT || {});
61
- const _sfc_main$d = defineComponent({
61
+ const _sfc_main$f = defineComponent({
62
62
  props: {
63
63
  /** Устанавливает тип кнопки */
64
64
  type: {
@@ -154,12 +154,178 @@ const _sfc_main$d = defineComponent({
154
154
  };
155
155
  }
156
156
  });
157
+ const _hoisted_1$a = {
158
+ xmlns: "http://www.w3.org/2000/svg",
159
+ viewBox: "0 0 24 24"
160
+ };
161
+ function render$4(_ctx, _cache) {
162
+ return openBlock(), createElementBlock("svg", _hoisted_1$a, _cache[0] || (_cache[0] = [
163
+ createElementVNode("path", {
164
+ fill: "currentColor",
165
+ "fill-rule": "evenodd",
166
+ d: "M19.793 6.965a.77.77 0 0 1-.022 1.075l-9.815 9.607a1.224 1.224 0 0 1-1.714.006l-4.01-3.878a.77.77 0 0 1-.028-1.074l.684-.736a.735.735 0 0 1 1.053-.028l3.15 3.046 8.96-8.771a.735.735 0 0 1 1.054.022z",
167
+ "clip-rule": "evenodd"
168
+ }, null, -1)
169
+ ]));
170
+ }
171
+ const IconDone = { render: render$4 };
172
+ const expect = (value) => ({
173
+ toBeOneOf(variants) {
174
+ return Object.values(variants).includes(value);
175
+ }
176
+ });
177
+ const pick = (attrs, criteria) => {
178
+ return Object.keys(attrs).filter(criteria).reduce((picked, key) => ({
179
+ ...picked,
180
+ [key]: attrs[key]
181
+ }), {});
182
+ };
183
+ const without = (obj, exclude) => {
184
+ const newObj = {};
185
+ Object.entries(obj).forEach(([key, value]) => {
186
+ if (!exclude.includes(key)) {
187
+ newObj[key] = value;
188
+ }
189
+ });
190
+ return newObj;
191
+ };
192
+ const _hoisted_1$9 = ["id", "value", "name", "disabled", "checked"];
193
+ const _hoisted_2$3 = { class: "ui-v1-checkbox__checkmark" };
194
+ let counter$2 = 0;
195
+ const __default__$1 = {};
196
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
197
+ ...__default__$1,
198
+ __name: "UiCheckbox",
199
+ props: {
200
+ id: {
201
+ type: null,
202
+ validator: (id) => id === void 0 || typeof id === "string" && id.length > 0 && /^[A-Za-z]/.test(id),
203
+ default: void 0
204
+ },
205
+ /** Атрибут name нативного поля ввода */
206
+ name: {
207
+ type: String,
208
+ default: () => "ui-v1-checkbox-" + ++counter$2
209
+ },
210
+ /** Значение модели используемое с директивой v-model */
211
+ model: {
212
+ type: null,
213
+ default: void 0
214
+ },
215
+ /** Значение, добавляемое или удаляемое из модели в зависимости от флага checked, если модель является массивом */
216
+ value: {
217
+ type: null,
218
+ default: void 0
219
+ },
220
+ /** Задает значение, если флаг checked равен true, а модель не является массивом */
221
+ valueOfTruthy: {
222
+ type: null,
223
+ default: true
224
+ },
225
+ /** Задает значение, если флаг checked равен false, а модель не является массивом */
226
+ valueOfFalsy: {
227
+ type: null,
228
+ default: false
229
+ },
230
+ /** Задает "состояние" неопределенности для бокса, чье состояние "включенности" зависит от множества других боксов */
231
+ indeterminate: {
232
+ type: Boolean,
233
+ default: false
234
+ },
235
+ /** Задает стили для бокса уменьшенного размера */
236
+ small: {
237
+ type: Boolean,
238
+ default: false
239
+ },
240
+ /** Заблокированный */
241
+ disabled: {
242
+ type: Boolean,
243
+ default: false
244
+ }
245
+ },
246
+ emits: [
247
+ /** Изменение значения модели */
248
+ "change",
249
+ /** Изменение значения модели. Для v-model */
250
+ "update:model"
251
+ ],
252
+ setup(__props, { expose: __expose, emit: __emit }) {
253
+ const isArray = Array.isArray;
254
+ const props = __props;
255
+ const emit = __emit;
256
+ const checkbox = ref(null);
257
+ const click = () => {
258
+ var _a;
259
+ return (_a = checkbox.value) == null ? void 0 : _a.click();
260
+ };
261
+ const focus = () => {
262
+ var _a;
263
+ return (_a = checkbox.value) == null ? void 0 : _a.focus();
264
+ };
265
+ const blur = () => {
266
+ var _a;
267
+ return (_a = checkbox.value) == null ? void 0 : _a.blur();
268
+ };
269
+ __expose({
270
+ click,
271
+ focus,
272
+ blur
273
+ });
274
+ const contains = (array, value) => array.some((v) => v === value);
275
+ const checked = computed(() => {
276
+ return isArray(props.model) ? contains(props.model, props.value) : props.model === props.valueOfTruthy;
277
+ });
278
+ const calculate = (checked2) => {
279
+ if (isArray(props.model)) {
280
+ return checked2 ? contains(props.model, props.value) ? props.model : [...props.model, props.value] : [...props.model].filter((v) => v !== props.value);
281
+ }
282
+ return checked2 ? props.valueOfTruthy : props.valueOfFalsy;
283
+ };
284
+ const onChange = (event) => {
285
+ const checkbox2 = event.target;
286
+ const value = calculate(checkbox2.checked);
287
+ emit("change", value);
288
+ emit("update:model", value);
289
+ };
290
+ return (_ctx, _cache) => {
291
+ return openBlock(), createElementBlock("span", mergeProps({
292
+ class: {
293
+ "ui-v1-checkbox": true,
294
+ "ui-v1-checkbox_small": __props.small,
295
+ "ui-v1-checkbox_checked": checked.value,
296
+ "ui-v1-checkbox_indeterminate": __props.indeterminate,
297
+ "ui-v1-checkbox_disabled": __props.disabled
298
+ }
299
+ }, unref(pick)(_ctx.$attrs, (key) => !key.startsWith("aria-") && !key.startsWith("on"))), [
300
+ createElementVNode("input", mergeProps({
301
+ id: __props.id,
302
+ ref_key: "checkbox",
303
+ ref: checkbox,
304
+ value: unref(isArray)(__props.model) ? __props.value : void 0,
305
+ name: __props.name,
306
+ disabled: __props.disabled,
307
+ checked: checked.value
308
+ }, unref(pick)(_ctx.$attrs, (key) => key.startsWith("aria-") || key.startsWith("on")), {
309
+ type: "checkbox",
310
+ class: "ui-v1-checkbox__input",
311
+ onChange
312
+ }), null, 16, _hoisted_1$9),
313
+ createElementVNode("span", _hoisted_2$3, [
314
+ checked.value && !__props.indeterminate ? (openBlock(), createBlock(unref(IconDone), {
315
+ key: 0,
316
+ class: "ui-v1-checkbox__checkmark-icon"
317
+ })) : createCommentVNode("", true)
318
+ ])
319
+ ], 16);
320
+ };
321
+ }
322
+ });
157
323
  var ALIGN = /* @__PURE__ */ ((ALIGN2) => {
158
324
  ALIGN2["LEFT"] = "left";
159
325
  ALIGN2["RIGHT"] = "right";
160
326
  return ALIGN2;
161
327
  })(ALIGN || {});
162
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
328
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
163
329
  __name: "UiError",
164
330
  props: {
165
331
  /** Тест, разметка ошибки */
@@ -198,12 +364,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
198
364
  };
199
365
  }
200
366
  });
201
- const _hoisted_1$7 = {
367
+ const _hoisted_1$8 = {
202
368
  xmlns: "http://www.w3.org/2000/svg",
203
369
  viewBox: "0 0 24 24"
204
370
  };
205
371
  function render$3(_ctx, _cache) {
206
- return openBlock(), createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [
372
+ return openBlock(), createElementBlock("svg", _hoisted_1$8, _cache[0] || (_cache[0] = [
207
373
  createElementVNode("path", {
208
374
  fill: "currentColor",
209
375
  d: "m6.844 17.854-.7-.703a.5.5 0 0 1 0-.704l8.48-8.456-6.212.007a.49.49 0 0 1-.496-.5l.007-.991a.5.5 0 0 1 .496-.5L16.994 6c.196 0 .385.078.524.218l.265.267c.137.142.215.33.217.528l-.007 8.633a.5.5 0 0 1-.496.5h-.992a.48.48 0 0 1-.49-.493l.007-6.255-8.48 8.456a.49.49 0 0 1-.698 0"
@@ -229,7 +395,7 @@ var SIZE$3 = /* @__PURE__ */ ((SIZE2) => {
229
395
  SIZE2["TITLE02"] = "title-02";
230
396
  return SIZE2;
231
397
  })(SIZE$3 || {});
232
- const _hoisted_1$6 = ["href", "target"];
398
+ const _hoisted_1$7 = ["href", "target"];
233
399
  const _hoisted_2$2 = {
234
400
  key: 0,
235
401
  class: "ui-v1-link__inner"
@@ -238,7 +404,7 @@ const _hoisted_3$2 = {
238
404
  key: 2,
239
405
  class: "ui-v1-link__icon"
240
406
  };
241
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
407
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
242
408
  __name: "UiLink",
243
409
  props: {
244
410
  /** Атрибут ссылки */
@@ -312,11 +478,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
312
478
  createVNode(unref(IconOpenInNew), { class: "ui-v1-link__icon-sprite" })
313
479
  ])
314
480
  ])) : createCommentVNode("", true)
315
- ], 16, _hoisted_1$6);
481
+ ], 16, _hoisted_1$7);
316
482
  };
317
483
  }
318
484
  });
319
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
485
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
320
486
  __name: "UiTransition",
321
487
  props: {
322
488
  /** Наименование анимации перехода */
@@ -344,7 +510,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
344
510
  };
345
511
  }
346
512
  });
347
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
513
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
348
514
  __name: "UiLoader",
349
515
  props: {
350
516
  /** Диаметр (размер) окружности индикатора */
@@ -376,7 +542,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
376
542
  },
377
543
  setup(__props) {
378
544
  return (_ctx, _cache) => {
379
- return openBlock(), createBlock(resolveDynamicComponent(__props.transition ? _sfc_main$a : "div"), normalizeProps(guardReactiveProps(__props.transition ? {
545
+ return openBlock(), createBlock(resolveDynamicComponent(__props.transition ? _sfc_main$b : "div"), normalizeProps(guardReactiveProps(__props.transition ? {
380
546
  appear: true,
381
547
  class: "ui-v1-loader-wrapper",
382
548
  name: __props.transition
@@ -1528,7 +1694,7 @@ var PerfectScrollbar$1 = {
1528
1694
  );
1529
1695
  }
1530
1696
  };
1531
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1697
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1532
1698
  __name: "UiScrollBox",
1533
1699
  props: {
1534
1700
  /** Наименование тэга-обёртки для нативного скролла */
@@ -1632,12 +1798,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1632
1798
  };
1633
1799
  }
1634
1800
  });
1635
- const _hoisted_1$5 = {
1801
+ const _hoisted_1$6 = {
1636
1802
  xmlns: "http://www.w3.org/2000/svg",
1637
1803
  viewBox: "0 0 24 24"
1638
1804
  };
1639
1805
  function render$2(_ctx, _cache) {
1640
- return openBlock(), createElementBlock("svg", _hoisted_1$5, _cache[0] || (_cache[0] = [
1806
+ return openBlock(), createElementBlock("svg", _hoisted_1$6, _cache[0] || (_cache[0] = [
1641
1807
  createElementVNode("path", {
1642
1808
  fill: "currentColor",
1643
1809
  d: "M7.113 6.176a.6.6 0 0 1 .848 0L12 10.214l4.038-4.038a.6.6 0 0 1 .849 0l.937.937a.6.6 0 0 1 0 .848L13.785 12l4.04 4.04a.6.6 0 0 1 0 .848l-.937.937a.6.6 0 0 1-.849 0L12 13.784l-4.038 4.04a.6.6 0 0 1-.849 0l-.937-.937a.6.6 0 0 1 0-.848l4.04-4.04-4.039-4.038a.6.6 0 0 1 0-.849z"
@@ -1716,8 +1882,8 @@ class LayerRegistry {
1716
1882
  }
1717
1883
  }
1718
1884
  const layers = new LayerRegistry();
1719
- let counter = 0;
1720
- const uid = (prefix) => `${prefix}-${++counter}`;
1885
+ let counter$1 = 0;
1886
+ const uid = (prefix) => `${prefix}-${++counter$1}`;
1721
1887
  var CLOSE_METHOD = /* @__PURE__ */ ((CLOSE_METHOD2) => {
1722
1888
  CLOSE_METHOD2["CLICK_CROSS"] = "Cross";
1723
1889
  CLOSE_METHOD2["CLICK_OUTSIDE"] = "Outside";
@@ -1740,7 +1906,7 @@ var SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
1740
1906
  SIZE2["SM"] = "sm";
1741
1907
  return SIZE2;
1742
1908
  })(SIZE$2 || {});
1743
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1909
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1744
1910
  __name: "UiModalSidebar",
1745
1911
  props: {
1746
1912
  /** Атрибут id корневого элемента. Должен быть уникальным на странице */
@@ -1970,7 +2136,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1970
2136
  }))
1971
2137
  ]);
1972
2138
  };
1973
- const renderBody = () => props.scrolling === SCROLLING$1.NONE ? h("div", { class: "ui-v1-modal-sidebar__body-fixed" }, renderSlot2("default")) : h(_sfc_main$8, {
2139
+ const renderBody = () => props.scrolling === SCROLLING$1.NONE ? h("div", { class: "ui-v1-modal-sidebar__body-fixed" }, renderSlot2("default")) : h(_sfc_main$9, {
1974
2140
  class: "ui-v1-modal-sidebar__body",
1975
2141
  native: props.scrolling === SCROLLING$1.NATIVE,
1976
2142
  showOnMac: true,
@@ -1983,7 +2149,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1983
2149
  const direction = props.direction;
1984
2150
  const size = props.size;
1985
2151
  const setVisibility = (visibility2) => () => visibilityOfSidebar.value = visibility2;
1986
- return h(_sfc_main$a, {
2152
+ return h(_sfc_main$b, {
1987
2153
  name: `slide-${direction}`,
1988
2154
  onBeforeEnter: setVisibility("showing"),
1989
2155
  onAfterEnter: setVisibility("shown"),
@@ -2011,7 +2177,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2011
2177
  const setVisibility = (visibility2) => () => visibilityOfOverlay.value = visibility2;
2012
2178
  return !state.attached ? void 0 : h(Teleport, {
2013
2179
  to: (globals == null ? void 0 : globals.container) ?? document.body
2014
- }, h(_sfc_main$a, {
2180
+ }, h(_sfc_main$b, {
2015
2181
  name: "fade-2",
2016
2182
  onBeforeEnter: setVisibility("showing"),
2017
2183
  onAfterEnter: setVisibility("shown"),
@@ -2043,20 +2209,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2043
2209
  };
2044
2210
  }
2045
2211
  });
2046
- const expect = (value) => ({
2047
- toBeOneOf(variants) {
2048
- return Object.values(variants).includes(value);
2049
- }
2050
- });
2051
- const without = (obj, exclude) => {
2052
- const newObj = {};
2053
- Object.entries(obj).forEach(([key, value]) => {
2054
- if (!exclude.includes(key)) {
2055
- newObj[key] = value;
2056
- }
2057
- });
2058
- return newObj;
2059
- };
2060
2212
  var APPEARANCE = /* @__PURE__ */ ((APPEARANCE2) => {
2061
2213
  APPEARANCE2["ALERT"] = "alert";
2062
2214
  APPEARANCE2["DIALOG"] = "dialog";
@@ -2069,7 +2221,7 @@ var SCROLLING = /* @__PURE__ */ ((SCROLLING2) => {
2069
2221
  SCROLLING2["NATIVE"] = "native";
2070
2222
  return SCROLLING2;
2071
2223
  })(SCROLLING || {});
2072
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2224
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2073
2225
  __name: "UiModalWindowSurface",
2074
2226
  props: {
2075
2227
  /** Атрибут id корневого элемента модального окна. Должен быть уникальным на странице */
@@ -2283,7 +2435,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2283
2435
  const slots = useSlots();
2284
2436
  const renderBody = () => {
2285
2437
  const appearance = props.appearance;
2286
- return h(_sfc_main$a, {
2438
+ return h(_sfc_main$b, {
2287
2439
  name: "zoom",
2288
2440
  onBeforeEnter: () => visibilityOfBody.value = "showing",
2289
2441
  onAfterEnter: () => visibilityOfBody.value = "shown",
@@ -2308,7 +2460,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2308
2460
  };
2309
2461
  const EmbedModalWindowSurface = () => !state.attached ? void 0 : h(Teleport, {
2310
2462
  to: (globals == null ? void 0 : globals.container) ?? document.body
2311
- }, h(_sfc_main$a, {
2463
+ }, h(_sfc_main$b, {
2312
2464
  name: "fade-2",
2313
2465
  onBeforeEnter: () => visibilityOfOverlay.value = "showing",
2314
2466
  onAfterEnter: () => visibilityOfOverlay.value = "shown",
@@ -2325,7 +2477,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2325
2477
  "ui-v1-modal_overlapped": state.overlapped
2326
2478
  }],
2327
2479
  onClick: onOverlayClick
2328
- }, h(_sfc_main$8, {
2480
+ }, h(_sfc_main$9, {
2329
2481
  class: {
2330
2482
  "ui-v1-modal-window-container": true,
2331
2483
  "ui-v1-modal-window-container_fullscreen": props.fullscreen,
@@ -2350,12 +2502,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2350
2502
  };
2351
2503
  }
2352
2504
  });
2353
- const _hoisted_1$4 = {
2505
+ const _hoisted_1$5 = {
2354
2506
  xmlns: "http://www.w3.org/2000/svg",
2355
2507
  viewBox: "0 0 24 24"
2356
2508
  };
2357
2509
  function render$1(_ctx, _cache) {
2358
- return openBlock(), createElementBlock("svg", _hoisted_1$4, _cache[0] || (_cache[0] = [
2510
+ return openBlock(), createElementBlock("svg", _hoisted_1$5, _cache[0] || (_cache[0] = [
2359
2511
  createElementVNode("path", {
2360
2512
  fill: "currentColor",
2361
2513
  "fill-rule": "evenodd",
@@ -2365,7 +2517,7 @@ function render$1(_ctx, _cache) {
2365
2517
  ]));
2366
2518
  }
2367
2519
  const IconWarning = { render: render$1 };
2368
- const _hoisted_1$3 = {
2520
+ const _hoisted_1$4 = {
2369
2521
  key: 0,
2370
2522
  class: "ui-v1-modal-window__icon"
2371
2523
  };
@@ -2382,7 +2534,7 @@ const _hoisted_5 = {
2382
2534
  key: 0,
2383
2535
  class: "ui-v1-modal-window__footer-text"
2384
2536
  };
2385
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2537
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2386
2538
  __name: "UiModalWindow",
2387
2539
  props: {
2388
2540
  /** Атрибут id корневого элемента модального окна. Должен быть уникальным на странице */
@@ -2496,7 +2648,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2496
2648
  });
2497
2649
  watch(() => props.opened, toggle);
2498
2650
  return (_ctx, _cache) => {
2499
- return openBlock(), createBlock(_sfc_main$6, mergeProps({
2651
+ return openBlock(), createBlock(_sfc_main$7, mergeProps({
2500
2652
  id: __props.id,
2501
2653
  opened: state.opened,
2502
2654
  closable: __props.closable,
@@ -2524,7 +2676,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2524
2676
  "ui-v1-modal-window__header_pinned": _ctx.$slots.title && state.scrolled && __props.appearance === unref(APPEARANCE).POPUP && !__props.responsive
2525
2677
  })
2526
2678
  }, [
2527
- __props.appearance === unref(APPEARANCE).ALERT ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
2679
+ __props.appearance === unref(APPEARANCE).ALERT ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
2528
2680
  renderSlot(_ctx.$slots, "icon", {
2529
2681
  overlapped: state.overlapped
2530
2682
  }, () => [
@@ -2553,7 +2705,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2553
2705
  })
2554
2706
  ])) : createCommentVNode("", true)
2555
2707
  ], 2),
2556
- __props.responsive ? (openBlock(), createBlock(_sfc_main$8, {
2708
+ __props.responsive ? (openBlock(), createBlock(_sfc_main$9, {
2557
2709
  key: 0,
2558
2710
  class: "ui-v1-modal-window__content",
2559
2711
  "show-on-mac": "",
@@ -2586,6 +2738,97 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2586
2738
  };
2587
2739
  }
2588
2740
  });
2741
+ const _hoisted_1$3 = ["id", "name", "value", "checked", "disabled"];
2742
+ let counter = 0;
2743
+ const __default__ = {};
2744
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2745
+ ...__default__,
2746
+ __name: "UiRadio",
2747
+ props: {
2748
+ id: {
2749
+ type: null,
2750
+ validator: (id) => id === void 0 || typeof id === "string" && id.length > 0 && /^[A-Za-z]/.test(id),
2751
+ default: void 0
2752
+ },
2753
+ /** Атрибут name нативного поля ввода */
2754
+ name: {
2755
+ type: String,
2756
+ default: () => "ui-v1-radio-" + ++counter
2757
+ },
2758
+ /** Значение модели используемое с директивой v-model */
2759
+ model: {
2760
+ type: null,
2761
+ default: void 0
2762
+ },
2763
+ /** Атрибут value нативного поля ввода */
2764
+ value: {
2765
+ type: null,
2766
+ required: true
2767
+ },
2768
+ /** Заблокированный */
2769
+ disabled: {
2770
+ type: Boolean,
2771
+ default: false
2772
+ }
2773
+ },
2774
+ emits: [
2775
+ /** Изменение значения модели */
2776
+ "change",
2777
+ /** Изменение значения модели. Для v-model */
2778
+ "update:model"
2779
+ ],
2780
+ setup(__props, { expose: __expose, emit: __emit }) {
2781
+ const props = __props;
2782
+ const emit = __emit;
2783
+ const radio = ref(null);
2784
+ const click = () => {
2785
+ var _a;
2786
+ return (_a = radio.value) == null ? void 0 : _a.click();
2787
+ };
2788
+ const focus = () => {
2789
+ var _a;
2790
+ return (_a = radio.value) == null ? void 0 : _a.focus();
2791
+ };
2792
+ const blur = () => {
2793
+ var _a;
2794
+ return (_a = radio.value) == null ? void 0 : _a.blur();
2795
+ };
2796
+ __expose({
2797
+ click,
2798
+ focus,
2799
+ blur
2800
+ });
2801
+ const checked = computed(() => props.value === props.model);
2802
+ const onChange = () => {
2803
+ emit("change", props.value);
2804
+ emit("update:model", props.value);
2805
+ };
2806
+ return (_ctx, _cache) => {
2807
+ return openBlock(), createElementBlock("span", mergeProps({
2808
+ class: {
2809
+ "ui-v1-radio": true,
2810
+ "ui-v1-radio_checked": checked.value,
2811
+ "ui-v1-radio_disabled": __props.disabled
2812
+ }
2813
+ }, unref(pick)(_ctx.$attrs, (key) => !key.startsWith("aria-") && !key.startsWith("on"))), [
2814
+ createElementVNode("input", mergeProps({
2815
+ id: __props.id,
2816
+ ref_key: "radio",
2817
+ ref: radio,
2818
+ name: __props.name,
2819
+ value: __props.value,
2820
+ checked: checked.value,
2821
+ disabled: __props.disabled
2822
+ }, unref(pick)(_ctx.$attrs, (key) => key.startsWith("aria-") || key.startsWith("on")), {
2823
+ type: "radio",
2824
+ class: "ui-v1-radio__input",
2825
+ onChange
2826
+ }), null, 16, _hoisted_1$3),
2827
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "ui-v1-radio__checkmark" }, null, -1))
2828
+ ], 16);
2829
+ };
2830
+ }
2831
+ });
2589
2832
  const _hoisted_1$2 = {
2590
2833
  xmlns: "http://www.w3.org/2000/svg",
2591
2834
  viewBox: "0 0 24 24"
@@ -2964,7 +3207,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2964
3207
  return SIZE$4.SM;
2965
3208
  });
2966
3209
  return (_ctx, _cache) => {
2967
- return openBlock(), createBlock(_sfc_main$d, mergeProps({
3210
+ return openBlock(), createBlock(_sfc_main$f, mergeProps({
2968
3211
  ref_key: "root",
2969
3212
  ref: root,
2970
3213
  href: __props.href,
@@ -3037,7 +3280,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3037
3280
  },
3038
3281
  setup(__props) {
3039
3282
  return (_ctx, _cache) => {
3040
- return openBlock(), createBlock(_sfc_main$b, mergeProps({
3283
+ return openBlock(), createBlock(_sfc_main$c, mergeProps({
3041
3284
  href: __props.href,
3042
3285
  external: __props.external,
3043
3286
  appearance: __props.appearance,
@@ -3220,7 +3463,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3220
3463
  });
3221
3464
  return (_ctx, _cache) => {
3222
3465
  return openBlock(), createElementBlock("div", _hoisted_1, [
3223
- !ready.value ? (openBlock(), createBlock(_sfc_main$9, { key: 0 })) : createCommentVNode("", true),
3466
+ !ready.value ? (openBlock(), createBlock(_sfc_main$a, { key: 0 })) : createCommentVNode("", true),
3224
3467
  withDirectives((openBlock(), createElementBlock("iframe", {
3225
3468
  ref_key: "iframe",
3226
3469
  ref: iframe,
@@ -3236,19 +3479,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3236
3479
  export {
3237
3480
  plugin as I18nPlugin,
3238
3481
  plugin$1 as ModalPlugin,
3239
- _sfc_main$d as UiButton,
3240
- _sfc_main$c as UiError,
3241
- _sfc_main$b as UiLink,
3242
- _sfc_main$9 as UiLoader,
3243
- _sfc_main$7 as UiModalSidebar,
3244
- _sfc_main$5 as UiModalWindow,
3245
- _sfc_main$6 as UiModalWindowSurface,
3246
- _sfc_main$8 as UiScrollBox,
3482
+ _sfc_main$f as UiButton,
3483
+ _sfc_main$e as UiCheckbox,
3484
+ _sfc_main$d as UiError,
3485
+ _sfc_main$c as UiLink,
3486
+ _sfc_main$a as UiLoader,
3487
+ _sfc_main$8 as UiModalSidebar,
3488
+ _sfc_main$6 as UiModalWindow,
3489
+ _sfc_main$7 as UiModalWindowSurface,
3490
+ _sfc_main$5 as UiRadio,
3491
+ _sfc_main$9 as UiScrollBox,
3247
3492
  _sfc_main$4 as UiTag,
3248
3493
  _sfc_main$3 as UiToolbar,
3249
3494
  _sfc_main$2 as UiToolbarButton,
3250
3495
  _sfc_main$1 as UiToolbarLink,
3251
- _sfc_main$a as UiTransition,
3496
+ _sfc_main$b as UiTransition,
3252
3497
  _sfc_main as UiYandexMap,
3253
3498
  VueI18n
3254
3499
  };
package/dist/remote.cjs CHANGED
@@ -47,6 +47,11 @@ const UiButton = defineRemoteComponent(
47
47
  UiButtonType,
48
48
  ["click", "focus", "blur"]
49
49
  );
50
+ const UiCheckboxType = "UiCheckbox";
51
+ const UiCheckbox = defineRemoteComponent(
52
+ UiCheckboxType,
53
+ ["click", "focus", "blur"]
54
+ );
50
55
  const UiErrorType = "UiError";
51
56
  const UiError = defineRemoteComponent(
52
57
  UiErrorType,
@@ -122,6 +127,11 @@ const UiModalWindowSurface = defineRemoteComponent(
122
127
  "update:overlapped"
123
128
  ]
124
129
  );
130
+ const UiRadioType = "UiRadio";
131
+ const UiRadio = defineRemoteComponent(
132
+ UiRadioType,
133
+ ["click", "focus", "blur"]
134
+ );
125
135
  const UiScrollBoxType = "UiScrollBox";
126
136
  const UiScrollBox = defineRemoteComponent(
127
137
  UiScrollBoxType,
@@ -160,6 +170,8 @@ const UiYandexMap = defineRemoteComponent(
160
170
  );
161
171
  exports.UiButton = UiButton;
162
172
  exports.UiButtonType = UiButtonType;
173
+ exports.UiCheckbox = UiCheckbox;
174
+ exports.UiCheckboxType = UiCheckboxType;
163
175
  exports.UiError = UiError;
164
176
  exports.UiErrorType = UiErrorType;
165
177
  exports.UiLink = UiLink;
@@ -172,6 +184,8 @@ exports.UiModalWindow = UiModalWindow;
172
184
  exports.UiModalWindowSurface = UiModalWindowSurface;
173
185
  exports.UiModalWindowSurfaceType = UiModalWindowSurfaceType;
174
186
  exports.UiModalWindowType = UiModalWindowType;
187
+ exports.UiRadio = UiRadio;
188
+ exports.UiRadioType = UiRadioType;
175
189
  exports.UiScrollBox = UiScrollBox;
176
190
  exports.UiScrollBoxType = UiScrollBoxType;
177
191
  exports.UiTag = UiTag;