@1337exp/taoui 1.13.1 → 2.1.0

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/index.cjs CHANGED
@@ -2,22 +2,36 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.TaoUI = {}, global.Vue));
3
3
  })(this, function(exports2, vue) {
4
4
  "use strict";
5
+ const sizes = ["small", "medium", "large"];
6
+ function sizeClass(size) {
7
+ return size ? `tao-size-${size}` : void 0;
8
+ }
9
+ function resolveSize(el, size) {
10
+ if (size) {
11
+ return size;
12
+ }
13
+ if (!el || typeof getComputedStyle === "undefined") {
14
+ return "medium";
15
+ }
16
+ const value = getComputedStyle(el).getPropertyValue("--tao-size").trim();
17
+ return sizes.includes(value) ? value : "medium";
18
+ }
5
19
  const _hoisted_1$P = ["type", "disabled"];
6
20
  const _hoisted_2$I = {
7
21
  key: 0,
8
22
  class: "tao-button__loader"
9
23
  };
10
- const _hoisted_3$B = {
24
+ const _hoisted_3$z = {
11
25
  key: 1,
12
26
  class: "tao-button__icon"
13
27
  };
14
- const _hoisted_4$v = { class: "tao-button__content" };
28
+ const _hoisted_4$u = { class: "tao-button__content" };
15
29
  const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
16
30
  ...{ name: "TaoButton" },
17
31
  __name: "TaoButton",
18
32
  props: {
19
33
  type: { default: "button" },
20
- size: { default: "medium" },
34
+ size: {},
21
35
  variant: { default: "primary" },
22
36
  tone: { default: "" },
23
37
  disabled: { type: Boolean, default: false },
@@ -37,7 +51,7 @@
37
51
  return (_ctx, _cache) => {
38
52
  return vue.openBlock(), vue.createElementBlock("button", {
39
53
  class: vue.normalizeClass(["tao-button", [
40
- `tao-button--${__props.size}`,
54
+ vue.unref(sizeClass)(__props.size),
41
55
  `tao-button--${__props.variant}`,
42
56
  {
43
57
  "tao-button--disabled": __props.disabled,
@@ -52,8 +66,8 @@
52
66
  onClick: handleClick
53
67
  }, [
54
68
  __props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$I)) : vue.createCommentVNode("", true),
55
- __props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$B, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
56
- vue.createElementVNode("span", _hoisted_4$v, [
69
+ __props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$z, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
70
+ vue.createElementVNode("span", _hoisted_4$u, [
57
71
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
58
72
  ])
59
73
  ], 10, _hoisted_1$P);
@@ -67,7 +81,19 @@
67
81
  }
68
82
  return target;
69
83
  };
70
- const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-8966c285"]]);
84
+ const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-eb25f649"]]);
85
+ function toCssLength(value) {
86
+ if (value === void 0 || value === null || value === "") {
87
+ return void 0;
88
+ }
89
+ return typeof value === "number" ? `${value}px` : value;
90
+ }
91
+ function toCssBox(value) {
92
+ return Array.isArray(value) ? value.map((part) => toCssLength(part) ?? "0").join(" ") : toCssLength(value);
93
+ }
94
+ function surfaceClass(surface) {
95
+ return surface && surface !== "flat" ? `tao-surface-${surface}` : void 0;
96
+ }
71
97
  const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
72
98
  ...{ name: "TaoBlock" },
73
99
  __name: "TaoBlock",
@@ -75,24 +101,16 @@
75
101
  padding: { default: 16 },
76
102
  radius: { default: 8 },
77
103
  shadow: { type: Boolean, default: true },
78
- hover: { type: Boolean, default: false }
104
+ hover: { type: Boolean, default: false },
105
+ surface: { default: "flat" }
79
106
  },
80
107
  setup(__props) {
81
108
  const props = __props;
82
- const paddingStyle = vue.computed(() => {
83
- if (Array.isArray(props.padding)) {
84
- return {
85
- padding: `${props.padding.map((p) => `${p}px`).join(" ")}`
86
- };
87
- }
88
- return { padding: `${props.padding}px` };
89
- });
90
- const radiusStyle = vue.computed(() => ({
91
- borderRadius: `${props.radius}px`
92
- }));
109
+ const paddingStyle = vue.computed(() => ({ padding: toCssBox(props.padding) }));
110
+ const radiusStyle = vue.computed(() => ({ borderRadius: toCssLength(props.radius) }));
93
111
  return (_ctx, _cache) => {
94
112
  return vue.openBlock(), vue.createElementBlock("div", {
95
- class: vue.normalizeClass(["tao-block", { "tao-block--shadow": __props.shadow, "tao-block--hover": __props.hover }]),
113
+ class: vue.normalizeClass(["tao-block", [vue.unref(surfaceClass)(__props.surface), { "tao-block--shadow": __props.shadow, "tao-block--hover": __props.hover }]]),
96
114
  style: vue.normalizeStyle([paddingStyle.value, radiusStyle.value])
97
115
  }, [
98
116
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
@@ -100,20 +118,57 @@
100
118
  };
101
119
  }
102
120
  });
103
- const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-722277c0"]]);
121
+ const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-3d9abbef"]]);
104
122
  const formFieldKey = Symbol("taoFormField");
105
- const _hoisted_1$O = { class: "tao-input-wrapper" };
106
- const _hoisted_2$H = ["for"];
107
- const _hoisted_3$A = {
123
+ function isDev() {
124
+ try {
125
+ return process.env.NODE_ENV !== "production";
126
+ } catch {
127
+ return false;
128
+ }
129
+ }
130
+ const warned = /* @__PURE__ */ new Set();
131
+ function deprecationWarning(component, what, instead) {
132
+ if (!isDev()) {
133
+ return;
134
+ }
135
+ const key = `${component}:${what}`;
136
+ if (warned.has(key)) {
137
+ return;
138
+ }
139
+ warned.add(key);
140
+ console.warn(`[TaoUI] ${component}: ${what} is deprecated — ${instead}. It will be removed in 3.0.`);
141
+ }
142
+ function warnDeprecated(component, replacements) {
143
+ var _a;
144
+ if (!isDev()) {
145
+ return;
146
+ }
147
+ const passed = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.vnode.props;
148
+ if (!passed) {
149
+ return;
150
+ }
151
+ const names = new Set(Object.keys(passed).map((name) => vue.camelize(name)));
152
+ for (const [name, instead] of Object.entries(replacements)) {
153
+ if (!names.has(name)) {
154
+ continue;
155
+ }
156
+ const isListener = /^on[A-Z]/.test(name);
157
+ const label = isListener ? `event "${name[2].toLowerCase()}${name.slice(3)}"` : `prop "${name}"`;
158
+ deprecationWarning(component, label, instead);
159
+ }
160
+ }
161
+ const _hoisted_1$O = ["for"];
162
+ const _hoisted_2$H = {
108
163
  key: 0,
109
164
  class: "tao-input__affix tao-input__affix--prefix"
110
165
  };
111
- const _hoisted_4$u = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
112
- const _hoisted_5$m = {
166
+ const _hoisted_3$y = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
167
+ const _hoisted_4$t = {
113
168
  key: 1,
114
169
  class: "tao-input__affix tao-input__affix--suffix"
115
170
  };
116
- const _hoisted_6$h = {
171
+ const _hoisted_5$m = {
117
172
  key: 1,
118
173
  class: "tao-input__error"
119
174
  };
@@ -125,6 +180,7 @@
125
180
  type: { default: "text" },
126
181
  placeholder: { default: "" },
127
182
  disabled: { type: Boolean, default: false },
183
+ size: {},
128
184
  error: { type: Boolean, default: false },
129
185
  errorMessage: { default: "" },
130
186
  label: { default: "" },
@@ -152,13 +208,19 @@
152
208
  focused.value = true;
153
209
  emit("focus", event);
154
210
  }
211
+ warnDeprecated("TaoInput", {
212
+ label: "use `label` of TaoFormField",
213
+ errorMessage: "use `error` of TaoFormField"
214
+ });
155
215
  return (_ctx, _cache) => {
156
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, [
216
+ return vue.openBlock(), vue.createElementBlock("div", {
217
+ class: vue.normalizeClass(["tao-input-wrapper", vue.unref(sizeClass)(__props.size)])
218
+ }, [
157
219
  __props.label && !vue.unref(field) ? (vue.openBlock(), vue.createElementBlock("label", {
158
220
  key: 0,
159
221
  class: "tao-input__label",
160
222
  for: controlId.value
161
- }, vue.toDisplayString(__props.label), 9, _hoisted_2$H)) : vue.createCommentVNode("", true),
223
+ }, vue.toDisplayString(__props.label), 9, _hoisted_1$O)) : vue.createCommentVNode("", true),
162
224
  vue.createElementVNode("div", {
163
225
  class: vue.normalizeClass(["tao-input-shell", {
164
226
  "tao-input-shell--focused": focused.value,
@@ -168,7 +230,7 @@
168
230
  "tao-input-shell--suffix": _ctx.$slots.suffix
169
231
  }])
170
232
  }, [
171
- _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$A, [
233
+ _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$H, [
172
234
  vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
173
235
  ])) : vue.createCommentVNode("", true),
174
236
  vue.createElementVNode("input", {
@@ -183,29 +245,32 @@
183
245
  onInput: handleInput,
184
246
  onBlur: handleBlur,
185
247
  onFocus: handleFocus
186
- }, null, 42, _hoisted_4$u),
187
- _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$m, [
248
+ }, null, 42, _hoisted_3$y),
249
+ _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$t, [
188
250
  vue.renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
189
251
  ])) : vue.createCommentVNode("", true)
190
252
  ], 2),
191
- __props.error && __props.errorMessage ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$h, vue.toDisplayString(__props.errorMessage), 1)) : vue.createCommentVNode("", true)
192
- ]);
253
+ __props.error && __props.errorMessage ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$m, vue.toDisplayString(__props.errorMessage), 1)) : vue.createCommentVNode("", true)
254
+ ], 2);
193
255
  };
194
256
  }
195
257
  });
196
- const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-e0d2a454"]]);
258
+ const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-aca887be"]]);
197
259
  const _hoisted_1$N = {
198
260
  key: 0,
199
261
  class: "tao-input-group__addon tao-input-group__addon--before"
200
262
  };
201
263
  const _hoisted_2$G = { class: "tao-input-group__field" };
202
- const _hoisted_3$z = {
264
+ const _hoisted_3$x = {
203
265
  key: 1,
204
266
  class: "tao-input-group__addon tao-input-group__addon--after"
205
267
  };
206
268
  const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
207
269
  ...{ name: "TaoInputGroup" },
208
270
  __name: "TaoInputGroup",
271
+ props: {
272
+ size: {}
273
+ },
209
274
  setup(__props) {
210
275
  const focused = vue.ref(false);
211
276
  function onFocusIn() {
@@ -220,7 +285,7 @@
220
285
  }
221
286
  return (_ctx, _cache) => {
222
287
  return vue.openBlock(), vue.createElementBlock("div", {
223
- class: vue.normalizeClass(["tao-input-group", { "tao-input-group--focused": focused.value }]),
288
+ class: vue.normalizeClass(["tao-input-group", [vue.unref(sizeClass)(__props.size), { "tao-input-group--focused": focused.value }]]),
224
289
  role: "group",
225
290
  onFocusin: onFocusIn,
226
291
  onFocusout: onFocusOut
@@ -231,21 +296,342 @@
231
296
  vue.createElementVNode("div", _hoisted_2$G, [
232
297
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
233
298
  ]),
234
- _ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
299
+ _ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$x, [
235
300
  vue.renderSlot(_ctx.$slots, "after", {}, void 0, true)
236
301
  ])) : vue.createCommentVNode("", true)
237
302
  ], 34);
238
303
  };
239
304
  }
240
305
  });
241
- const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-2c03e481"]]);
306
+ const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-55b2d297"]]);
307
+ const localeRu = {
308
+ code: "ru-RU",
309
+ alert: { closeLabel: "Закрыть" },
310
+ avatar: {
311
+ fallbackLabel: "Аватар",
312
+ notificationsLabel: "{count} уведомлений",
313
+ dotLabels: {
314
+ success: "в сети",
315
+ danger: "занят",
316
+ warning: "отошёл",
317
+ info: "статус",
318
+ neutral: "не в сети"
319
+ }
320
+ },
321
+ breadcrumb: { ariaLabel: "Хлебные крошки" },
322
+ carousel: {
323
+ ariaLabel: "Лента",
324
+ prevLabel: "Назад",
325
+ nextLabel: "Вперёд",
326
+ dotsLabel: "Слайды",
327
+ slideLabel: "Слайд {n} из {count}"
328
+ },
329
+ combobox: {
330
+ placeholder: "Начните вводить",
331
+ emptyText: "Ничего не найдено",
332
+ clearText: "Очистить",
333
+ createText: "Добавить «{text}»"
334
+ },
335
+ confirm: { ok: "ОК", cancel: "Отмена" },
336
+ copy: { copyLabel: "Копировать", successText: "Скопировано!" },
337
+ date: {
338
+ placeholder: "Дата",
339
+ todayText: "Сегодня",
340
+ clearText: "Очистить",
341
+ prevMonthLabel: "Предыдущий месяц",
342
+ nextMonthLabel: "Следующий месяц"
343
+ },
344
+ dateRange: {
345
+ placeholder: "Период",
346
+ todayText: "Сегодня",
347
+ clearText: "Очистить",
348
+ prevMonthLabel: "Предыдущий месяц",
349
+ nextMonthLabel: "Следующий месяц"
350
+ },
351
+ drawer: { closeLabel: "Закрыть" },
352
+ dropdownMenu: { menuLabel: "Меню" },
353
+ empty: { title: "Ничего нет" },
354
+ fileDrop: {
355
+ clearLabel: "Очистить файлы",
356
+ removeLabel: "Убрать «{name}»",
357
+ zoneText: "Перетащите файл сюда или нажмите, чтобы выбрать",
358
+ units: ["Б", "КБ", "МБ"],
359
+ decimalSeparator: ","
360
+ },
361
+ inputNumber: { incrementLabel: "Увеличить", decrementLabel: "Уменьшить" },
362
+ list: { emptyText: "Ничего нет" },
363
+ modal: { closeLabel: "Закрыть" },
364
+ pagination: {
365
+ ariaLabel: "Пагинация",
366
+ prevLabel: "Назад",
367
+ nextLabel: "Вперёд",
368
+ pageLabel: "Страница {page}",
369
+ jumpPrevLabel: "Назад на {n} страниц",
370
+ jumpNextLabel: "Вперёд на {n} страниц",
371
+ totalText: "{from}–{to} из {total}",
372
+ emptyTotalText: "0 из 0"
373
+ },
374
+ quantity: { decrementLabel: "Уменьшить", removeLabel: "Убрать", incrementLabel: "Увеличить" },
375
+ scrollTop: { ariaLabel: "Наверх" },
376
+ select: { placeholder: "Выберите", clearText: "Очистить" },
377
+ stages: {
378
+ ariaLabel: "Стадии",
379
+ statusLabels: { wait: "ожидание", work: "в работе", ok: "готово", bad: "ошибка" }
380
+ },
381
+ table: { emptyText: "Нет данных" },
382
+ tag: { closeLabel: "Убрать" },
383
+ toast: { closeLabel: "Закрыть уведомление" }
384
+ };
385
+ const confirmDefaults = {
386
+ ok: localeRu.confirm.ok,
387
+ cancel: localeRu.confirm.cancel,
388
+ surface: "glass"
389
+ };
390
+ const currentConfirm = vue.ref(null);
391
+ const queue = [];
392
+ function configureConfirmDefaults(partial) {
393
+ Object.assign(confirmDefaults, partial);
394
+ }
395
+ function pump() {
396
+ if (currentConfirm.value) {
397
+ return;
398
+ }
399
+ currentConfirm.value = queue.shift() ?? null;
400
+ }
401
+ function enqueueConfirm(record) {
402
+ queue.push(record);
403
+ pump();
404
+ }
405
+ function resolveConfirm(value) {
406
+ const item = currentConfirm.value;
407
+ if (!item) {
408
+ return;
409
+ }
410
+ currentConfirm.value = null;
411
+ item.resolve(value);
412
+ pump();
413
+ }
414
+ let viewportMounts$1 = 0;
415
+ function registerConfirmHost() {
416
+ viewportMounts$1 += 1;
417
+ }
418
+ function unregisterConfirmHost() {
419
+ viewportMounts$1 = Math.max(0, viewportMounts$1 - 1);
420
+ }
421
+ function hasConfirmHost() {
422
+ if (viewportMounts$1 > 0) {
423
+ return true;
424
+ }
425
+ if (typeof document === "undefined") {
426
+ return false;
427
+ }
428
+ return Boolean(document.querySelector("[data-tao-confirm-host]"));
429
+ }
430
+ const TOAST_POSITIONS = [
431
+ "topRight",
432
+ "topLeft",
433
+ "topCenter",
434
+ "bottomRight",
435
+ "bottomLeft",
436
+ "bottomCenter",
437
+ "center"
438
+ ];
439
+ const toastDefaults = {
440
+ position: "topCenter",
441
+ timeout: 3e3,
442
+ closable: true,
443
+ progress: true,
444
+ closeLabel: localeRu.toast.closeLabel,
445
+ surface: "glass"
446
+ };
447
+ const toasts = vue.ref([]);
448
+ const toastsByPosition = vue.computed(() => {
449
+ const grouped = {};
450
+ for (const position of TOAST_POSITIONS) {
451
+ grouped[position] = [];
452
+ }
453
+ for (const toast2 of toasts.value) {
454
+ grouped[toast2.position].push(toast2);
455
+ }
456
+ return grouped;
457
+ });
458
+ function configureToastDefaults(partial) {
459
+ Object.assign(toastDefaults, partial);
460
+ }
461
+ function addToast(record) {
462
+ if (record.displayMode === "once" && record.dedupeId) {
463
+ const exists = toasts.value.some((item) => item.dedupeId === record.dedupeId);
464
+ if (exists) {
465
+ return;
466
+ }
467
+ }
468
+ if (record.displayMode === "replace" && record.dedupeId) {
469
+ toasts.value = toasts.value.filter((item) => item.dedupeId !== record.dedupeId);
470
+ }
471
+ toasts.value = [...toasts.value, record];
472
+ }
473
+ function removeToast(id) {
474
+ var _a;
475
+ const item = toasts.value.find((toast2) => toast2.id === id);
476
+ if (!item) {
477
+ return;
478
+ }
479
+ toasts.value = toasts.value.filter((toast2) => toast2.id !== id);
480
+ (_a = item.onClosed) == null ? void 0 : _a.call(item);
481
+ }
482
+ function dismissToasts(id) {
483
+ if (id) {
484
+ removeToast(id);
485
+ return;
486
+ }
487
+ const items = toasts.value;
488
+ toasts.value = [];
489
+ items.forEach((item) => {
490
+ var _a;
491
+ return (_a = item.onClosed) == null ? void 0 : _a.call(item);
492
+ });
493
+ }
494
+ let viewportMounts = 0;
495
+ function registerToastViewport() {
496
+ viewportMounts += 1;
497
+ }
498
+ function unregisterToastViewport() {
499
+ viewportMounts = Math.max(0, viewportMounts - 1);
500
+ }
501
+ function hasToastViewport() {
502
+ if (viewportMounts > 0) {
503
+ return true;
504
+ }
505
+ if (typeof document === "undefined") {
506
+ return false;
507
+ }
508
+ return Boolean(document.querySelector("[data-tao-toast-viewport]"));
509
+ }
510
+ const localeEn = {
511
+ code: "en-US",
512
+ alert: { closeLabel: "Close" },
513
+ avatar: {
514
+ fallbackLabel: "Avatar",
515
+ notificationsLabel: "{count} notifications",
516
+ dotLabels: {
517
+ success: "online",
518
+ danger: "busy",
519
+ warning: "away",
520
+ info: "status",
521
+ neutral: "offline"
522
+ }
523
+ },
524
+ breadcrumb: { ariaLabel: "Breadcrumb" },
525
+ carousel: {
526
+ ariaLabel: "Carousel",
527
+ prevLabel: "Previous",
528
+ nextLabel: "Next",
529
+ dotsLabel: "Slides",
530
+ slideLabel: "Slide {n} of {count}"
531
+ },
532
+ combobox: {
533
+ placeholder: "Start typing",
534
+ emptyText: "Nothing found",
535
+ clearText: "Clear",
536
+ createText: "Add “{text}”"
537
+ },
538
+ confirm: { ok: "OK", cancel: "Cancel" },
539
+ copy: { copyLabel: "Copy", successText: "Copied!" },
540
+ date: {
541
+ placeholder: "Date",
542
+ todayText: "Today",
543
+ clearText: "Clear",
544
+ prevMonthLabel: "Previous month",
545
+ nextMonthLabel: "Next month"
546
+ },
547
+ dateRange: {
548
+ placeholder: "Period",
549
+ todayText: "Today",
550
+ clearText: "Clear",
551
+ prevMonthLabel: "Previous month",
552
+ nextMonthLabel: "Next month"
553
+ },
554
+ drawer: { closeLabel: "Close" },
555
+ dropdownMenu: { menuLabel: "Menu" },
556
+ empty: { title: "Nothing here" },
557
+ fileDrop: {
558
+ clearLabel: "Clear files",
559
+ removeLabel: "Remove “{name}”",
560
+ zoneText: "Drop a file here or click to choose",
561
+ units: ["B", "KB", "MB"],
562
+ decimalSeparator: "."
563
+ },
564
+ inputNumber: { incrementLabel: "Increase", decrementLabel: "Decrease" },
565
+ list: { emptyText: "Nothing here" },
566
+ modal: { closeLabel: "Close" },
567
+ pagination: {
568
+ ariaLabel: "Pagination",
569
+ prevLabel: "Previous",
570
+ nextLabel: "Next",
571
+ pageLabel: "Page {page}",
572
+ jumpPrevLabel: "Back {n} pages",
573
+ jumpNextLabel: "Forward {n} pages",
574
+ totalText: "{from}–{to} of {total}",
575
+ emptyTotalText: "0 of 0"
576
+ },
577
+ quantity: { decrementLabel: "Decrease", removeLabel: "Remove", incrementLabel: "Increase" },
578
+ scrollTop: { ariaLabel: "Back to top" },
579
+ select: { placeholder: "Select", clearText: "Clear" },
580
+ stages: {
581
+ ariaLabel: "Stages",
582
+ statusLabels: { wait: "pending", work: "in progress", ok: "done", bad: "failed" }
583
+ },
584
+ table: { emptyText: "No data" },
585
+ tag: { closeLabel: "Remove" },
586
+ toast: { closeLabel: "Close notification" }
587
+ };
588
+ const current = vue.shallowRef(localeRu);
589
+ function taoLocale() {
590
+ return current.value;
591
+ }
592
+ function isPlainObject(value) {
593
+ return typeof value === "object" && value !== null && !Array.isArray(value);
594
+ }
595
+ function merge(base, overrides) {
596
+ if (!isPlainObject(base) || !isPlainObject(overrides)) {
597
+ return overrides === void 0 ? base : overrides;
598
+ }
599
+ const out = { ...base };
600
+ for (const [key, value] of Object.entries(overrides)) {
601
+ if (value !== void 0) {
602
+ out[key] = merge(base[key], value);
603
+ }
604
+ }
605
+ return out;
606
+ }
607
+ function setTaoLocale(locale, base = localeRu) {
608
+ current.value = merge(base, locale);
609
+ configureToastDefaults({ closeLabel: current.value.toast.closeLabel });
610
+ configureConfirmDefaults({ ok: current.value.confirm.ok, cancel: current.value.confirm.cancel });
611
+ }
612
+ function useLocaleText(props, section) {
613
+ return vue.computed(() => {
614
+ const base = current.value[section];
615
+ const own = props;
616
+ const out = { ...base };
617
+ for (const key of Object.keys(base)) {
618
+ if (own[key] !== void 0) {
619
+ out[key] = own[key];
620
+ }
621
+ }
622
+ return out;
623
+ });
624
+ }
625
+ function formatText(template, values) {
626
+ return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
627
+ }
242
628
  const _hoisted_1$M = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
243
629
  const _hoisted_2$F = {
244
630
  key: 0,
245
631
  class: "tao-input-number__steppers"
246
632
  };
247
- const _hoisted_3$y = ["aria-label", "disabled"];
248
- const _hoisted_4$t = { "aria-hidden": "true" };
633
+ const _hoisted_3$w = ["aria-label", "disabled"];
634
+ const _hoisted_4$s = { "aria-hidden": "true" };
249
635
  const _hoisted_5$l = ["aria-label", "disabled"];
250
636
  const _hoisted_6$g = { "aria-hidden": "true" };
251
637
  const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
@@ -258,19 +644,22 @@
258
644
  step: { default: 1 },
259
645
  precision: {},
260
646
  disabled: { type: Boolean, default: false },
647
+ error: { type: Boolean, default: false },
648
+ size: {},
261
649
  placeholder: { default: "" },
262
650
  controls: { type: Boolean, default: true },
263
- incrementLabel: { default: "Увеличить" },
264
- decrementLabel: { default: "Уменьшить" }
651
+ incrementLabel: {},
652
+ decrementLabel: {}
265
653
  },
266
654
  emits: ["update:modelValue", "commit", "blur", "focus"],
267
655
  setup(__props, { emit: __emit }) {
268
656
  const props = __props;
657
+ const l10n = useLocaleText(props, "inputNumber");
269
658
  const emit = __emit;
270
659
  const field = vue.inject(formFieldKey, null);
271
660
  const localId = vue.useId();
272
661
  const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
273
- const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
662
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
274
663
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
275
664
  const focused = vue.ref(false);
276
665
  const draft = vue.ref(toDraft(props.modelValue));
@@ -382,7 +771,7 @@
382
771
  const atMax = vue.computed(() => props.max !== void 0 && (props.modelValue ?? 0) >= props.max);
383
772
  return (_ctx, _cache) => {
384
773
  return vue.openBlock(), vue.createElementBlock("div", {
385
- class: vue.normalizeClass(["tao-input-number", { "tao-input-number--invalid": invalid.value, "tao-input-number--controls": __props.controls }])
774
+ class: vue.normalizeClass(["tao-input-number", [vue.unref(sizeClass)(__props.size), { "tao-input-number--invalid": invalid.value, "tao-input-number--controls": __props.controls }]])
386
775
  }, [
387
776
  vue.createElementVNode("input", {
388
777
  id: controlId.value,
@@ -408,21 +797,21 @@
408
797
  vue.createElementVNode("button", {
409
798
  type: "button",
410
799
  class: "tao-input-number__step",
411
- "aria-label": __props.incrementLabel,
800
+ "aria-label": vue.unref(l10n).incrementLabel,
412
801
  tabindex: "-1",
413
802
  disabled: __props.disabled || atMax.value,
414
803
  onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
415
804
  }, [
416
- vue.createElementVNode("span", _hoisted_4$t, [
805
+ vue.createElementVNode("span", _hoisted_4$s, [
417
806
  vue.renderSlot(_ctx.$slots, "increment-icon", {}, () => [
418
807
  _cache[2] || (_cache[2] = vue.createTextVNode("+", -1))
419
808
  ], true)
420
809
  ])
421
- ], 8, _hoisted_3$y),
810
+ ], 8, _hoisted_3$w),
422
811
  vue.createElementVNode("button", {
423
812
  type: "button",
424
813
  class: "tao-input-number__step",
425
- "aria-label": __props.decrementLabel,
814
+ "aria-label": vue.unref(l10n).decrementLabel,
426
815
  tabindex: "-1",
427
816
  disabled: __props.disabled || atMin.value,
428
817
  onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
@@ -438,11 +827,11 @@
438
827
  };
439
828
  }
440
829
  });
441
- const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-4614f4ff"]]);
830
+ const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-52c1f25a"]]);
442
831
  const _hoisted_1$L = ["aria-label", "disabled"];
443
832
  const _hoisted_2$E = { "aria-hidden": "true" };
444
- const _hoisted_3$x = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
445
- const _hoisted_4$s = ["aria-label", "disabled"];
833
+ const _hoisted_3$v = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
834
+ const _hoisted_4$r = ["aria-label", "disabled"];
446
835
  const _hoisted_5$k = { "aria-hidden": "true" };
447
836
  const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
448
837
  ...{ name: "TaoQuantity" },
@@ -452,20 +841,23 @@
452
841
  min: { default: 1 },
453
842
  max: {},
454
843
  disabled: { type: Boolean, default: false },
844
+ error: { type: Boolean, default: false },
845
+ size: {},
455
846
  allowRemove: { type: Boolean, default: true },
456
847
  forceMaxLimit: { type: Boolean, default: true },
457
- decrementLabel: { default: "Уменьшить" },
458
- removeLabel: { default: "Убрать" },
459
- incrementLabel: { default: "Увеличить" }
848
+ decrementLabel: {},
849
+ removeLabel: {},
850
+ incrementLabel: {}
460
851
  },
461
852
  emits: ["update:modelValue", "change", "dec", "inc", "blur", "focus"],
462
853
  setup(__props, { emit: __emit }) {
463
854
  const props = __props;
855
+ const l10n = useLocaleText(props, "quantity");
464
856
  const emit = __emit;
465
857
  const field = vue.inject(formFieldKey, null);
466
858
  const localId = vue.useId();
467
859
  const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
468
- const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
860
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
469
861
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
470
862
  const focused = vue.ref(false);
471
863
  const draft = vue.ref(String(props.modelValue));
@@ -565,14 +957,17 @@
565
957
  const atMax = vue.computed(() => props.modelValue >= ceiling.value);
566
958
  const minusDisabled = vue.computed(() => props.disabled || !props.allowRemove && atMin.value);
567
959
  const plusDisabled = vue.computed(() => props.disabled || atMax.value);
568
- const minusLabel = vue.computed(() => atMin.value && props.allowRemove ? props.removeLabel : props.decrementLabel);
960
+ const minusLabel = vue.computed(() => atMin.value && props.allowRemove ? l10n.value.removeLabel : l10n.value.decrementLabel);
569
961
  return (_ctx, _cache) => {
570
962
  return vue.openBlock(), vue.createElementBlock("div", {
571
- class: vue.normalizeClass(["tao-quantity", {
572
- "tao-quantity--invalid": invalid.value,
573
- "tao-quantity--focused": focused.value,
574
- "tao-quantity--disabled": __props.disabled
575
- }])
963
+ class: vue.normalizeClass(["tao-quantity", [
964
+ vue.unref(sizeClass)(__props.size),
965
+ {
966
+ "tao-quantity--invalid": invalid.value,
967
+ "tao-quantity--focused": focused.value,
968
+ "tao-quantity--disabled": __props.disabled
969
+ }
970
+ ]])
576
971
  }, [
577
972
  vue.createElementVNode("button", {
578
973
  type: "button",
@@ -606,11 +1001,11 @@
606
1001
  onFocus,
607
1002
  onBlur,
608
1003
  onKeydown
609
- }, null, 40, _hoisted_3$x),
1004
+ }, null, 40, _hoisted_3$v),
610
1005
  vue.createElementVNode("button", {
611
1006
  type: "button",
612
1007
  class: "tao-quantity__btn tao-quantity__btn--inc",
613
- "aria-label": __props.incrementLabel,
1008
+ "aria-label": vue.unref(l10n).incrementLabel,
614
1009
  disabled: plusDisabled.value,
615
1010
  onClick: onInc
616
1011
  }, [
@@ -619,12 +1014,12 @@
619
1014
  _cache[1] || (_cache[1] = vue.createTextVNode("+", -1))
620
1015
  ], true)
621
1016
  ])
622
- ], 8, _hoisted_4$s)
1017
+ ], 8, _hoisted_4$r)
623
1018
  ], 2);
624
1019
  };
625
1020
  }
626
1021
  });
627
- const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-17b4aada"]]);
1022
+ const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-e27165e3"]]);
628
1023
  const _hoisted_1$K = {
629
1024
  key: 0,
630
1025
  class: "tao-card__cover"
@@ -633,11 +1028,11 @@
633
1028
  key: 0,
634
1029
  class: "tao-card__overlay"
635
1030
  };
636
- const _hoisted_3$w = {
1031
+ const _hoisted_3$u = {
637
1032
  key: 1,
638
1033
  class: "tao-card__overlay"
639
1034
  };
640
- const _hoisted_4$r = {
1035
+ const _hoisted_4$q = {
641
1036
  key: 0,
642
1037
  class: "tao-card__header-title"
643
1038
  };
@@ -658,7 +1053,7 @@
658
1053
  key: 3,
659
1054
  class: "tao-card__body"
660
1055
  };
661
- const _hoisted_10$5 = {
1056
+ const _hoisted_10$4 = {
662
1057
  key: 4,
663
1058
  class: "tao-card__footer"
664
1059
  };
@@ -673,7 +1068,8 @@
673
1068
  hover: { type: Boolean, default: false },
674
1069
  active: { type: Boolean, default: false },
675
1070
  overflow: { type: Boolean, default: false },
676
- flush: { type: Boolean, default: false }
1071
+ flush: { type: Boolean, default: false },
1072
+ surface: { default: "flat" }
677
1073
  },
678
1074
  setup(__props) {
679
1075
  const props = __props;
@@ -686,16 +1082,13 @@
686
1082
  if (props.flush) {
687
1083
  return { padding: "0" };
688
1084
  }
689
- if (Array.isArray(props.padding)) {
690
- return { padding: `${props.padding.map((p) => `${p}px`).join(" ")}` };
691
- }
692
- return { padding: `${props.padding}px` };
1085
+ return { padding: toCssBox(props.padding) };
693
1086
  });
694
- const radiusStyle = vue.computed(() => ({ borderRadius: `${props.radius}px` }));
1087
+ const radiusStyle = vue.computed(() => ({ borderRadius: toCssLength(props.radius) }));
695
1088
  const showPanelShadow = vue.computed(() => props.shadow && !props.shadowBottomOnly && !props.flush);
696
1089
  return (_ctx, _cache) => {
697
1090
  return vue.openBlock(), vue.createElementBlock("div", {
698
- class: vue.normalizeClass(["tao-card", {
1091
+ class: vue.normalizeClass(["tao-card", [vue.unref(surfaceClass)(__props.surface), {
699
1092
  "tao-card--shadow": showPanelShadow.value,
700
1093
  "tao-card--shadow-bottom": __props.shadowBottomOnly,
701
1094
  "tao-card--hover": __props.hover,
@@ -703,7 +1096,7 @@
703
1096
  "tao-card--overflow": __props.overflow,
704
1097
  "tao-card--flush": __props.flush,
705
1098
  "tao-card--cover-only": coverOnly.value
706
- }]),
1099
+ }]]),
707
1100
  style: vue.normalizeStyle(radiusStyle.value)
708
1101
  }, [
709
1102
  _ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [
@@ -711,7 +1104,7 @@
711
1104
  _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$D, [
712
1105
  vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
713
1106
  ])) : vue.createCommentVNode("", true)
714
- ])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$w, [
1107
+ ])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$u, [
715
1108
  vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
716
1109
  ])) : vue.createCommentVNode("", true),
717
1110
  hasContent.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -719,7 +1112,7 @@
719
1112
  class: "tao-card__content",
720
1113
  style: vue.normalizeStyle(paddingStyle.value)
721
1114
  }, [
722
- _ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_4$r, [
1115
+ _ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_4$q, [
723
1116
  vue.renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
724
1117
  ])) : vue.createCommentVNode("", true),
725
1118
  _ctx.$slots.header || _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -744,7 +1137,7 @@
744
1137
  _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$5, [
745
1138
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
746
1139
  ])) : vue.createCommentVNode("", true),
747
- _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$5, [
1140
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$4, [
748
1141
  vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
749
1142
  ])) : vue.createCommentVNode("", true)
750
1143
  ], 4)) : vue.createCommentVNode("", true)
@@ -752,7 +1145,7 @@
752
1145
  };
753
1146
  }
754
1147
  });
755
- const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-aceee56b"]]);
1148
+ const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-53c366d1"]]);
756
1149
  const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
757
1150
  function getFocusable(root) {
758
1151
  return [...root.querySelectorAll(FOCUSABLE)].filter(
@@ -811,8 +1204,8 @@
811
1204
  key: 0,
812
1205
  class: "tao-modal__header"
813
1206
  };
814
- const _hoisted_3$v = ["id"];
815
- const _hoisted_4$q = { key: 1 };
1207
+ const _hoisted_3$t = ["id"];
1208
+ const _hoisted_4$p = { key: 1 };
816
1209
  const _hoisted_5$i = ["aria-label"];
817
1210
  const _hoisted_6$e = { "aria-hidden": "true" };
818
1211
  const _hoisted_7$b = { class: "tao-modal__content" };
@@ -827,11 +1220,12 @@
827
1220
  modelValue: { type: Boolean },
828
1221
  title: { default: "" },
829
1222
  closable: { type: Boolean, default: true },
830
- closeLabel: { default: "Закрыть" }
1223
+ closeLabel: {}
831
1224
  },
832
1225
  emits: ["update:modelValue", "close"],
833
1226
  setup(__props, { emit: __emit }) {
834
1227
  const props = __props;
1228
+ const l10n = useLocaleText(props, "modal");
835
1229
  const emit = __emit;
836
1230
  const panelRef = vue.ref(null);
837
1231
  const titleId = vue.useId();
@@ -942,13 +1336,13 @@
942
1336
  key: 0,
943
1337
  id: vue.unref(titleId),
944
1338
  class: "tao-modal__title"
945
- }, vue.toDisplayString(__props.title), 9, _hoisted_3$v)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$q))
1339
+ }, vue.toDisplayString(__props.title), 9, _hoisted_3$t)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$p))
946
1340
  ], true),
947
1341
  __props.closable ? (vue.openBlock(), vue.createElementBlock("button", {
948
1342
  key: 0,
949
1343
  type: "button",
950
1344
  class: "tao-modal__close",
951
- "aria-label": __props.closeLabel,
1345
+ "aria-label": vue.unref(l10n).closeLabel,
952
1346
  onClick: close
953
1347
  }, [
954
1348
  vue.createElementVNode("span", _hoisted_6$e, [
@@ -973,24 +1367,29 @@
973
1367
  };
974
1368
  }
975
1369
  });
976
- const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-7a8f28aa"]]);
977
- const _hoisted_1$I = { class: "tao-tabs" };
978
- const _hoisted_2$B = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
979
- const _hoisted_3$u = ["id", "aria-labelledby"];
1370
+ const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-742274be"]]);
1371
+ function tabValue(tab) {
1372
+ return tab.value ?? tab.key;
1373
+ }
1374
+ const _hoisted_1$I = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
1375
+ const _hoisted_2$B = ["id", "aria-labelledby"];
980
1376
  const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
981
1377
  ...{ name: "TaoTabs" },
982
1378
  __name: "TaoTabs",
983
1379
  props: {
984
- tabs: {},
1380
+ items: { default: void 0 },
1381
+ tabs: { default: void 0 },
985
1382
  modelValue: {},
986
- justify: { default: "" }
1383
+ justify: { default: "" },
1384
+ size: {}
987
1385
  },
988
- emits: ["update:modelValue"],
1386
+ emits: ["update:modelValue", "change"],
989
1387
  setup(__props, { emit: __emit }) {
990
1388
  const props = __props;
991
1389
  const emit = __emit;
992
1390
  const uid = vue.useId();
993
- const enabledTabs = vue.computed(() => props.tabs.filter((tab) => !tab.disabled));
1391
+ const list = vue.computed(() => props.items ?? props.tabs ?? []);
1392
+ const enabledTabs = vue.computed(() => list.value.filter((tab) => !tab.disabled));
994
1393
  function tabId(key) {
995
1394
  return `${uid}-${key}`;
996
1395
  }
@@ -998,9 +1397,12 @@
998
1397
  return `${uid}-panel-${key}`;
999
1398
  }
1000
1399
  function selectTab(key, focus = false) {
1001
- const tab = props.tabs.find((item) => item.key === key);
1400
+ const tab = list.value.find((item) => tabValue(item) === key);
1002
1401
  if (tab && !tab.disabled) {
1003
1402
  emit("update:modelValue", key);
1403
+ if (key !== props.modelValue) {
1404
+ emit("change", key);
1405
+ }
1004
1406
  if (focus) {
1005
1407
  void vue.nextTick(() => {
1006
1408
  var _a;
@@ -1014,12 +1416,11 @@
1014
1416
  if (!enabled.length) {
1015
1417
  return;
1016
1418
  }
1017
- const current = enabled.findIndex((tab) => tab.key === props.modelValue);
1018
- const next = enabled[(current + delta + enabled.length) % enabled.length];
1019
- selectTab(next.key, true);
1419
+ const current2 = enabled.findIndex((tab) => tabValue(tab) === props.modelValue);
1420
+ const next = enabled[(current2 + delta + enabled.length) % enabled.length];
1421
+ selectTab(tabValue(next), true);
1020
1422
  }
1021
1423
  function onKeydown(event) {
1022
- var _a;
1023
1424
  if (event.key === "ArrowRight" || event.key === "ArrowDown") {
1024
1425
  event.preventDefault();
1025
1426
  move(1);
@@ -1032,43 +1433,52 @@
1032
1433
  }
1033
1434
  if (event.key === "Home") {
1034
1435
  event.preventDefault();
1035
- selectTab(((_a = enabledTabs.value[0]) == null ? void 0 : _a.key) ?? props.modelValue, true);
1436
+ const first = enabledTabs.value[0];
1437
+ selectTab(first ? tabValue(first) : props.modelValue, true);
1036
1438
  return;
1037
1439
  }
1038
1440
  if (event.key === "End") {
1039
1441
  event.preventDefault();
1040
1442
  const last = enabledTabs.value[enabledTabs.value.length - 1];
1041
- selectTab((last == null ? void 0 : last.key) ?? props.modelValue, true);
1443
+ selectTab(last ? tabValue(last) : props.modelValue, true);
1042
1444
  }
1043
1445
  }
1446
+ warnDeprecated("TaoTabs", {
1447
+ tabs: "use `items` (with `value` instead of `key`)"
1448
+ });
1449
+ if (list.value.some((tab) => tab.key !== void 0)) {
1450
+ deprecationWarning("TaoTabs", "item `key`", "use item `value`");
1451
+ }
1044
1452
  return (_ctx, _cache) => {
1045
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$I, [
1453
+ return vue.openBlock(), vue.createElementBlock("div", {
1454
+ class: vue.normalizeClass(["tao-tabs", vue.unref(sizeClass)(__props.size)])
1455
+ }, [
1046
1456
  vue.createElementVNode("div", {
1047
1457
  class: "tao-tabs__list",
1048
1458
  style: vue.normalizeStyle({ justifyContent: __props.justify || void 0 }),
1049
1459
  role: "tablist",
1050
1460
  onKeydown
1051
1461
  }, [
1052
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.tabs, (tab) => {
1462
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (tab) => {
1053
1463
  return vue.openBlock(), vue.createElementBlock("button", {
1054
- key: tab.key,
1464
+ key: vue.unref(tabValue)(tab),
1055
1465
  type: "button",
1056
1466
  class: "tao-tabs__tab",
1057
1467
  role: "tab",
1058
- id: tabId(tab.key),
1059
- "aria-selected": tab.key === __props.modelValue,
1060
- "aria-controls": panelId(tab.key),
1061
- tabindex: tab.key === __props.modelValue ? 0 : -1,
1468
+ id: tabId(vue.unref(tabValue)(tab)),
1469
+ "aria-selected": vue.unref(tabValue)(tab) === __props.modelValue,
1470
+ "aria-controls": panelId(vue.unref(tabValue)(tab)),
1471
+ tabindex: vue.unref(tabValue)(tab) === __props.modelValue ? 0 : -1,
1062
1472
  disabled: tab.disabled,
1063
- onClick: ($event) => selectTab(tab.key)
1473
+ onClick: ($event) => selectTab(vue.unref(tabValue)(tab))
1064
1474
  }, [
1065
1475
  _ctx.$slots.label ? vue.renderSlot(_ctx.$slots, "label", {
1066
1476
  text: tab.label,
1067
- value: tab.key
1477
+ value: vue.unref(tabValue)(tab)
1068
1478
  }, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1069
1479
  vue.createTextVNode(vue.toDisplayString(tab.label), 1)
1070
1480
  ], 64))
1071
- ], 8, _hoisted_2$B);
1481
+ ], 8, _hoisted_1$I);
1072
1482
  }), 128))
1073
1483
  ], 36),
1074
1484
  vue.createElementVNode("div", {
@@ -1078,12 +1488,12 @@
1078
1488
  "aria-labelledby": tabId(__props.modelValue)
1079
1489
  }, [
1080
1490
  vue.renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
1081
- ], 8, _hoisted_3$u)
1082
- ]);
1491
+ ], 8, _hoisted_2$B)
1492
+ ], 2);
1083
1493
  };
1084
1494
  }
1085
1495
  });
1086
- const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-ca9b4b8b"]]);
1496
+ const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-a9238d96"]]);
1087
1497
  function listenFocusLoss(onLoss) {
1088
1498
  function onVisibilityChange() {
1089
1499
  if (document.hidden) {
@@ -1465,11 +1875,11 @@
1465
1875
  const spoilerGroupKey = Symbol("taoSpoilerGroup");
1466
1876
  const _hoisted_1$G = { class: "tao-spoiler" };
1467
1877
  const _hoisted_2$A = ["aria-expanded", "aria-controls"];
1468
- const _hoisted_3$t = {
1878
+ const _hoisted_3$s = {
1469
1879
  key: 0,
1470
1880
  class: "tao-spoiler__title"
1471
1881
  };
1472
- const _hoisted_4$p = ["id"];
1882
+ const _hoisted_4$o = ["id"];
1473
1883
  const _hoisted_5$h = { class: "tao-spoiler__content-inner" };
1474
1884
  const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
1475
1885
  ...{ name: "TaoSpoiler" },
@@ -1480,7 +1890,7 @@
1480
1890
  modelValue: { type: Boolean, default: void 0 },
1481
1891
  name: { default: void 0 }
1482
1892
  },
1483
- emits: ["update:modelValue"],
1893
+ emits: ["update:modelValue", "change"],
1484
1894
  setup(__props, { emit: __emit }) {
1485
1895
  const props = __props;
1486
1896
  const emit = __emit;
@@ -1505,6 +1915,7 @@
1505
1915
  internal.value = next;
1506
1916
  }
1507
1917
  emit("update:modelValue", next);
1918
+ emit("change", next);
1508
1919
  }
1509
1920
  function onBeforeEnter(el) {
1510
1921
  el.style.height = "0";
@@ -1537,7 +1948,7 @@
1537
1948
  vue.createElementVNode("span", {
1538
1949
  class: vue.normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }])
1539
1950
  }, "▶", 2),
1540
- __props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$t, [
1951
+ __props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s, [
1541
1952
  vue.renderSlot(_ctx.$slots, "title", {}, () => [
1542
1953
  vue.createTextVNode(vue.toDisplayString(__props.title), 1)
1543
1954
  ], true)
@@ -1559,7 +1970,7 @@
1559
1970
  vue.createElementVNode("div", _hoisted_5$h, [
1560
1971
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1561
1972
  ])
1562
- ], 8, _hoisted_4$p)) : vue.createCommentVNode("", true)
1973
+ ], 8, _hoisted_4$o)) : vue.createCommentVNode("", true)
1563
1974
  ]),
1564
1975
  _: 3
1565
1976
  })
@@ -1567,7 +1978,7 @@
1567
1978
  };
1568
1979
  }
1569
1980
  });
1570
- const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-e1fe99f4"]]);
1981
+ const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-5a3147a2"]]);
1571
1982
  const _hoisted_1$F = { class: "tao-spoiler-group" };
1572
1983
  const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
1573
1984
  ...{ name: "TaoSpoilerGroup" },
@@ -1607,12 +2018,14 @@
1607
2018
  __name: "TaoCopy",
1608
2019
  props: {
1609
2020
  text: {},
1610
- successMessage: { default: "Скопировано!" },
1611
- copyLabel: { default: "Копировать" },
2021
+ successText: { default: void 0 },
2022
+ successMessage: { default: void 0 },
2023
+ copyLabel: {},
1612
2024
  tip: { type: Boolean, default: true }
1613
2025
  },
1614
2026
  setup(__props) {
1615
2027
  const props = __props;
2028
+ const l10n = useLocaleText(props, "copy");
1616
2029
  const copied = vue.ref(false);
1617
2030
  const triggerRef = vue.ref(null);
1618
2031
  const tipRef = vue.ref(null);
@@ -1697,6 +2110,10 @@
1697
2110
  visibleObserver == null ? void 0 : visibleObserver.disconnect();
1698
2111
  visibleObserver = null;
1699
2112
  });
2113
+ const doneText = vue.computed(() => props.successText ?? props.successMessage ?? taoLocale().copy.successText);
2114
+ warnDeprecated("TaoCopy", {
2115
+ successMessage: "use `successText`"
2116
+ });
1700
2117
  return (_ctx, _cache) => {
1701
2118
  return vue.openBlock(), vue.createElementBlock("span", {
1702
2119
  ref_key: "triggerRef",
@@ -1710,7 +2127,7 @@
1710
2127
  vue.createElementVNode("button", {
1711
2128
  type: "button",
1712
2129
  class: vue.normalizeClass(["tao-copy__button", { "tao-copy__button--copied": copied.value }]),
1713
- "aria-label": copied.value ? __props.successMessage : __props.copyLabel,
2130
+ "aria-label": copied.value ? doneText.value : vue.unref(l10n).copyLabel,
1714
2131
  onClick: copy
1715
2132
  }, [..._cache[0] || (_cache[0] = [
1716
2133
  vue.createElementVNode("svg", {
@@ -1740,38 +2157,44 @@
1740
2157
  ])], 10, _hoisted_1$E)
1741
2158
  ], true),
1742
2159
  (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
1743
- copied.value && __props.tip && __props.successMessage ? (vue.openBlock(), vue.createElementBlock("div", {
2160
+ copied.value && __props.tip && doneText.value ? (vue.openBlock(), vue.createElementBlock("div", {
1744
2161
  key: 0,
1745
2162
  ref_key: "tipRef",
1746
2163
  ref: tipRef,
1747
2164
  class: "tao-copy__tip",
1748
2165
  role: "status",
1749
2166
  style: vue.normalizeStyle(tipStyle.value)
1750
- }, vue.toDisplayString(__props.successMessage), 5)) : vue.createCommentVNode("", true)
2167
+ }, vue.toDisplayString(doneText.value), 5)) : vue.createCommentVNode("", true)
1751
2168
  ]))
1752
2169
  ], 2);
1753
2170
  };
1754
2171
  }
1755
2172
  });
1756
- const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-66582e9a"]]);
2173
+ const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-16581b4e"]]);
1757
2174
  const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
1758
2175
  ...{ name: "TaoContainer" },
1759
2176
  __name: "TaoContainer",
1760
2177
  props: {
1761
- size: { default: "wide" },
2178
+ width: {},
2179
+ size: {},
1762
2180
  free: { type: Boolean, default: false }
1763
2181
  },
1764
2182
  setup(__props) {
2183
+ const props = __props;
2184
+ const resolvedWidth = vue.computed(() => props.width ?? props.size ?? "wide");
2185
+ warnDeprecated("TaoContainer", {
2186
+ size: "use `width`"
2187
+ });
1765
2188
  return (_ctx, _cache) => {
1766
2189
  return vue.openBlock(), vue.createElementBlock("div", {
1767
- class: vue.normalizeClass(["tao-container", [`tao-container--${__props.size}`, { "tao-container--center": !__props.free }]])
2190
+ class: vue.normalizeClass(["tao-container", [`tao-container--${resolvedWidth.value}`, { "tao-container--center": !__props.free }]])
1768
2191
  }, [
1769
2192
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1770
2193
  ], 2);
1771
2194
  };
1772
2195
  }
1773
2196
  });
1774
- const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-ccecf8f5"]]);
2197
+ const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-ef005f57"]]);
1775
2198
  const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
1776
2199
  ...{ name: "TaoFlex" },
1777
2200
  __name: "TaoFlex",
@@ -1792,7 +2215,7 @@
1792
2215
  alignItems: __props.align,
1793
2216
  flexDirection: __props.direction,
1794
2217
  flexWrap: __props.wrap,
1795
- gap: __props.gap
2218
+ gap: vue.unref(toCssLength)(__props.gap)
1796
2219
  })
1797
2220
  }, {
1798
2221
  default: vue.withCtx(() => [
@@ -1809,13 +2232,18 @@
1809
2232
  props: {
1810
2233
  block: { type: Boolean, default: false },
1811
2234
  expand: { type: Boolean, default: false },
2235
+ direction: { default: void 0 },
1812
2236
  vertical: { type: Boolean, default: false }
1813
2237
  },
1814
2238
  setup(__props) {
1815
2239
  const props = __props;
2240
+ const isColumn = vue.computed(() => (props.direction ?? (props.vertical ? "column" : "row")) === "column");
2241
+ warnDeprecated("TaoSpace", {
2242
+ vertical: 'use direction="column"'
2243
+ });
1816
2244
  return (_ctx, _cache) => {
1817
2245
  return vue.openBlock(), vue.createElementBlock("div", {
1818
- class: vue.normalizeClass(["tao-space", { "tao-space--vertical": props.vertical }]),
2246
+ class: vue.normalizeClass(["tao-space", { "tao-space--vertical": isColumn.value }]),
1819
2247
  style: vue.normalizeStyle([props.block ? "display: flex; flex-wrap: initial;" : "", props.expand ? "width: 100%" : ""])
1820
2248
  }, [
1821
2249
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
@@ -1823,7 +2251,7 @@
1823
2251
  };
1824
2252
  }
1825
2253
  });
1826
- const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-993a9000"]]);
2254
+ const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-67c9d3a2"]]);
1827
2255
  const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
1828
2256
  ...{ name: "TaoGrid" },
1829
2257
  __name: "TaoGrid",
@@ -1836,9 +2264,9 @@
1836
2264
  const props = __props;
1837
2265
  const isFixed = vue.computed(() => props.cols > 0);
1838
2266
  const gridStyle = vue.computed(() => ({
1839
- "--tao-grid-min": props.min,
2267
+ "--tao-grid-min": toCssLength(props.min),
1840
2268
  "--tao-grid-cols": isFixed.value ? String(props.cols) : void 0,
1841
- "--tao-grid-gap": props.gap
2269
+ "--tao-grid-gap": toCssLength(props.gap)
1842
2270
  }));
1843
2271
  return (_ctx, _cache) => {
1844
2272
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -1850,7 +2278,7 @@
1850
2278
  };
1851
2279
  }
1852
2280
  });
1853
- const TaoGrid = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-cd1476cf"]]);
2281
+ const TaoGrid = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-5baa4944"]]);
1854
2282
  const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
1855
2283
  ...{ name: "TaoGridItem" },
1856
2284
  __name: "TaoGridItem",
@@ -1877,8 +2305,8 @@
1877
2305
  const TaoGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-ad288026"]]);
1878
2306
  const _hoisted_1$D = { class: "tao-split__pane tao-split__pane--start" };
1879
2307
  const _hoisted_2$z = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
1880
- const _hoisted_3$s = { class: "tao-split__pane tao-split__pane--end" };
1881
- const _hoisted_4$o = {
2308
+ const _hoisted_3$r = { class: "tao-split__pane tao-split__pane--end" };
2309
+ const _hoisted_4$n = {
1882
2310
  key: 0,
1883
2311
  class: "tao-split__shield"
1884
2312
  };
@@ -1895,7 +2323,7 @@
1895
2323
  resizable: { type: Boolean, default: true },
1896
2324
  step: {}
1897
2325
  },
1898
- emits: ["update:modelValue"],
2326
+ emits: ["update:modelValue", "change"],
1899
2327
  setup(__props, { emit: __emit }) {
1900
2328
  const props = __props;
1901
2329
  const emit = __emit;
@@ -1910,6 +2338,7 @@
1910
2338
  const ariaOrientation = vue.computed(() => isRow.value ? "vertical" : "horizontal");
1911
2339
  let dragPointer = -1;
1912
2340
  let dragStartPx = 0;
2341
+ let dragStartValue = 0;
1913
2342
  let dragStartCoord = 0;
1914
2343
  let savedBodyCursor = "";
1915
2344
  let savedHtmlCursor = "";
@@ -2019,6 +2448,9 @@
2019
2448
  dragPointer = -1;
2020
2449
  restoreDragCursor();
2021
2450
  applyLayout(true);
2451
+ if (!valuesEqual(size.value, dragStartValue)) {
2452
+ emit("change", size.value);
2453
+ }
2022
2454
  }
2023
2455
  function setStartFromDelta(delta) {
2024
2456
  const avail = measureAvailable();
@@ -2034,6 +2466,7 @@
2034
2466
  dragPointer = event.pointerId;
2035
2467
  isDragging.value = true;
2036
2468
  dragStartPx = startPx.value;
2469
+ dragStartValue = size.value;
2037
2470
  dragStartCoord = isRow.value ? event.clientX : event.clientY;
2038
2471
  applyDragCursor();
2039
2472
  event.preventDefault();
@@ -2081,6 +2514,13 @@
2081
2514
  const ariaValueNow = vue.computed(() => size.value);
2082
2515
  const ariaValueText = vue.computed(() => props.unit === "%" ? `${size.value}%` : `${Math.round(size.value)}px`);
2083
2516
  function onKeydown(event) {
2517
+ const before = size.value;
2518
+ moveByKey(event);
2519
+ if (!valuesEqual(before, size.value)) {
2520
+ emit("change", size.value);
2521
+ }
2522
+ }
2523
+ function moveByKey(event) {
2084
2524
  if (!props.resizable) {
2085
2525
  return;
2086
2526
  }
@@ -2191,15 +2631,15 @@
2191
2631
  onDragstart: _cache[0] || (_cache[0] = vue.withModifiers(() => {
2192
2632
  }, ["prevent"]))
2193
2633
  }, null, 40, _hoisted_2$z),
2194
- vue.createElementVNode("div", _hoisted_3$s, [
2634
+ vue.createElementVNode("div", _hoisted_3$r, [
2195
2635
  vue.renderSlot(_ctx.$slots, "end", {}, void 0, true)
2196
2636
  ]),
2197
- isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$o)) : vue.createCommentVNode("", true)
2637
+ isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$n)) : vue.createCommentVNode("", true)
2198
2638
  ], 6);
2199
2639
  };
2200
2640
  }
2201
2641
  });
2202
- const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-04a6292a"]]);
2642
+ const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-f34ab385"]]);
2203
2643
  const _hoisted_1$C = { class: "tao-icon" };
2204
2644
  const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
2205
2645
  ...{ name: "TaoIcon" },
@@ -2292,7 +2732,7 @@
2292
2732
  const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-49a9f1b2"]]);
2293
2733
  const _hoisted_1$B = { class: "tao-image" };
2294
2734
  const _hoisted_2$y = ["src", "alt", "loading"];
2295
- const _hoisted_3$r = { class: "tao-image__placeholder" };
2735
+ const _hoisted_3$q = { class: "tao-image__placeholder" };
2296
2736
  const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
2297
2737
  ...{ name: "TaoImage" },
2298
2738
  __name: "TaoImage",
@@ -2337,7 +2777,7 @@
2337
2777
  onError: handleError
2338
2778
  }, null, 42, _hoisted_2$y)) : vue.createCommentVNode("", true),
2339
2779
  !__props.src || hasError.value ? vue.renderSlot(_ctx.$slots, "default", {}, () => [
2340
- vue.createElementVNode("div", _hoisted_3$r, vue.toDisplayString(__props.placeholderText), 1)
2780
+ vue.createElementVNode("div", _hoisted_3$q, vue.toDisplayString(__props.placeholderText), 1)
2341
2781
  ], true, 1) : vue.createCommentVNode("", true)
2342
2782
  ]);
2343
2783
  };
@@ -2346,11 +2786,11 @@
2346
2786
  const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-61f47c52"]]);
2347
2787
  const _hoisted_1$A = ["for"];
2348
2788
  const _hoisted_2$x = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
2349
- const _hoisted_3$q = {
2789
+ const _hoisted_3$p = {
2350
2790
  key: 0,
2351
2791
  class: "tao-checkbox__label"
2352
2792
  };
2353
- const _hoisted_4$n = {
2793
+ const _hoisted_4$m = {
2354
2794
  key: 1,
2355
2795
  class: "tao-checkbox__label"
2356
2796
  };
@@ -2359,9 +2799,11 @@
2359
2799
  __name: "TaoCheckbox",
2360
2800
  props: {
2361
2801
  value: { type: Boolean, default: void 0 },
2802
+ checked: { type: Boolean, default: void 0 },
2362
2803
  modelValue: { type: Boolean, default: void 0 },
2363
2804
  label: { default: "" },
2364
2805
  disabled: { type: Boolean, default: false },
2806
+ size: {},
2365
2807
  error: { type: Boolean, default: false },
2366
2808
  indeterminate: { type: Boolean, default: false }
2367
2809
  },
@@ -2379,6 +2821,9 @@
2379
2821
  if (props.modelValue !== void 0) {
2380
2822
  return props.modelValue;
2381
2823
  }
2824
+ if (props.checked !== void 0) {
2825
+ return props.checked;
2826
+ }
2382
2827
  return Boolean(props.value);
2383
2828
  },
2384
2829
  set: (next) => {
@@ -2406,9 +2851,12 @@
2406
2851
  },
2407
2852
  { flush: "post" }
2408
2853
  );
2854
+ warnDeprecated("TaoCheckbox", {
2855
+ value: "use `checked` or v-model"
2856
+ });
2409
2857
  return (_ctx, _cache) => {
2410
2858
  return vue.openBlock(), vue.createElementBlock("label", {
2411
- class: vue.normalizeClass(["tao-checkbox", { "tao-checkbox--disabled": __props.disabled }]),
2859
+ class: vue.normalizeClass(["tao-checkbox", [vue.unref(sizeClass)(__props.size), { "tao-checkbox--disabled": __props.disabled }]]),
2412
2860
  for: controlId.value
2413
2861
  }, [
2414
2862
  vue.renderSlot(_ctx.$slots, "pre", { text: __props.label }, void 0, true),
@@ -2426,7 +2874,7 @@
2426
2874
  onChange: onInputChange
2427
2875
  }, null, 40, _hoisted_2$x),
2428
2876
  _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "tao-checkbox__box" }, null, -1)),
2429
- __props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$q, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$n, [
2877
+ __props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$p, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$m, [
2430
2878
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
2431
2879
  ])),
2432
2880
  vue.renderSlot(_ctx.$slots, "post", { text: __props.label }, void 0, true)
@@ -2434,33 +2882,40 @@
2434
2882
  };
2435
2883
  }
2436
2884
  });
2437
- const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-98f6bc87"]]);
2885
+ const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-13f6cd33"]]);
2438
2886
  const _hoisted_1$z = {
2439
2887
  key: 0,
2440
2888
  class: "tao-tag__prefix"
2441
2889
  };
2442
2890
  const _hoisted_2$w = { class: "tao-tag__text" };
2443
- const _hoisted_3$p = ["aria-label"];
2444
- const _hoisted_4$m = { "aria-hidden": "true" };
2891
+ const _hoisted_3$o = ["aria-label"];
2892
+ const _hoisted_4$l = { "aria-hidden": "true" };
2445
2893
  const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
2446
2894
  ...{ name: "TaoTag" },
2447
2895
  __name: "TaoTag",
2448
2896
  props: {
2449
- type: { default: "" },
2897
+ tone: { default: void 0 },
2898
+ type: { default: void 0 },
2450
2899
  color: {},
2451
2900
  background: {},
2452
2901
  borderColor: {},
2902
+ clickable: { type: Boolean, default: false },
2453
2903
  pointer: { type: Boolean, default: false },
2454
2904
  closable: { type: Boolean, default: false },
2455
- closeLabel: { default: "Убрать" },
2456
- flat: { type: Boolean, default: false }
2905
+ closeLabel: {},
2906
+ flat: { type: Boolean, default: false },
2907
+ size: {}
2457
2908
  },
2458
2909
  emits: ["close"],
2459
2910
  setup(__props, { emit: __emit }) {
2460
2911
  const props = __props;
2912
+ const l10n = useLocaleText(props, "tag");
2461
2913
  const emit = __emit;
2462
2914
  const slots = vue.useSlots();
2463
- const tone = vue.computed(() => props.type === "error" ? "danger" : props.type);
2915
+ const resolvedTone = vue.computed(() => {
2916
+ const value = props.tone ?? props.type ?? "";
2917
+ return value === "error" ? "danger" : value;
2918
+ });
2464
2919
  const style = vue.computed(() => ({
2465
2920
  color: props.color || "",
2466
2921
  background: props.background || "",
@@ -2469,12 +2924,17 @@
2469
2924
  function onClose(event) {
2470
2925
  emit("close", event);
2471
2926
  }
2927
+ warnDeprecated("TaoTag", {
2928
+ type: "use `tone`",
2929
+ pointer: "use `clickable`"
2930
+ });
2472
2931
  return (_ctx, _cache) => {
2473
2932
  return vue.openBlock(), vue.createElementBlock("span", {
2474
2933
  class: vue.normalizeClass(["tao-tag", [
2475
- tone.value ? `tao-tag--${tone.value}` : "",
2934
+ resolvedTone.value ? `tao-tag--${resolvedTone.value}` : "",
2935
+ vue.unref(sizeClass)(__props.size),
2476
2936
  {
2477
- "tao-tag--pointer": __props.pointer,
2937
+ "tao-tag--pointer": __props.clickable || __props.pointer,
2478
2938
  "tao-tag--closable": __props.closable,
2479
2939
  "tao-tag--prefix": Boolean(vue.unref(slots).prefix),
2480
2940
  "tao-tag--flat": __props.flat
@@ -2492,26 +2952,26 @@
2492
2952
  key: 1,
2493
2953
  type: "button",
2494
2954
  class: "tao-tag__close",
2495
- "aria-label": __props.closeLabel,
2955
+ "aria-label": vue.unref(l10n).closeLabel,
2496
2956
  onClick: vue.withModifiers(onClose, ["stop"])
2497
2957
  }, [
2498
- vue.createElementVNode("span", _hoisted_4$m, [
2958
+ vue.createElementVNode("span", _hoisted_4$l, [
2499
2959
  vue.renderSlot(_ctx.$slots, "close-icon", {}, () => [
2500
2960
  _cache[0] || (_cache[0] = vue.createTextVNode("✕", -1))
2501
2961
  ], true)
2502
2962
  ])
2503
- ], 8, _hoisted_3$p)) : vue.createCommentVNode("", true)
2963
+ ], 8, _hoisted_3$o)) : vue.createCommentVNode("", true)
2504
2964
  ], 6);
2505
2965
  };
2506
2966
  }
2507
2967
  });
2508
- const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-dd9c155b"]]);
2968
+ const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-ca0b1b42"]]);
2509
2969
  const _hoisted_1$y = ["role", "aria-hidden"];
2510
2970
  const _hoisted_2$v = {
2511
2971
  key: 1,
2512
2972
  class: "tao-divider__text"
2513
2973
  };
2514
- const _hoisted_3$o = {
2974
+ const _hoisted_3$n = {
2515
2975
  key: 2,
2516
2976
  class: "tao-divider__line tao-divider__line--end"
2517
2977
  };
@@ -2529,6 +2989,9 @@
2529
2989
  const slots = vue.useSlots();
2530
2990
  const gapSize = vue.computed(() => props.size === "big" ? "large" : props.size);
2531
2991
  const hasLabel = vue.computed(() => Boolean(props.text) || Boolean(slots.default));
2992
+ if (props.size === "big") {
2993
+ deprecationWarning("TaoDivider", 'size "big"', 'use size="large"');
2994
+ }
2532
2995
  return (_ctx, _cache) => {
2533
2996
  return vue.openBlock(), vue.createElementBlock("div", {
2534
2997
  class: vue.normalizeClass(["tao-divider", [
@@ -2551,12 +3014,12 @@
2551
3014
  vue.createTextVNode(vue.toDisplayString(__props.text), 1)
2552
3015
  ], true)
2553
3016
  ])) : vue.createCommentVNode("", true),
2554
- __props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$o)) : vue.createCommentVNode("", true)
3017
+ __props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$n)) : vue.createCommentVNode("", true)
2555
3018
  ], 10, _hoisted_1$y);
2556
3019
  };
2557
3020
  }
2558
3021
  });
2559
- const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-a83aee10"]]);
3022
+ const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-32544dcc"]]);
2560
3023
  const _hoisted_1$x = {
2561
3024
  key: 0,
2562
3025
  class: "tao-fieldset__legend"
@@ -2612,16 +3075,8 @@
2612
3075
  }
2613
3076
  });
2614
3077
  const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-c9434028"]]);
2615
- const _hoisted_1$w = {
2616
- key: 0,
2617
- class: "tao-textarea tao-textarea--dummy"
2618
- };
2619
- const _hoisted_2$t = {
2620
- key: 1,
2621
- class: "tao-textarea-wrap"
2622
- };
2623
- const _hoisted_3$n = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "rows", "value", "aria-invalid", "aria-describedby"];
2624
- const _hoisted_4$l = ["id"];
3078
+ const _hoisted_1$w = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "readonly", "rows", "value", "aria-invalid", "aria-describedby"];
3079
+ const _hoisted_2$t = ["id"];
2625
3080
  const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
2626
3081
  ...{ name: "TaoTextarea" },
2627
3082
  __name: "TaoTextarea",
@@ -2632,6 +3087,9 @@
2632
3087
  minlength: { default: 0 },
2633
3088
  maxlength: { default: void 0 },
2634
3089
  disabled: { type: Boolean, default: false },
3090
+ size: {},
3091
+ variant: {},
3092
+ readonly: { type: Boolean, default: false },
2635
3093
  noSpace: { type: Boolean, default: false },
2636
3094
  dummy: { type: Boolean, default: false },
2637
3095
  rows: { default: 3 },
@@ -2639,9 +3097,12 @@
2639
3097
  modelValue: { default: "" },
2640
3098
  noBorder: { type: Boolean, default: false },
2641
3099
  noBackground: { type: Boolean, default: false },
3100
+ autofocus: { type: Boolean, default: false },
2642
3101
  autoFocus: { type: Boolean, default: false },
2643
3102
  borderInverse: { type: Boolean, default: false },
3103
+ align: { default: void 0 },
2644
3104
  textCenter: { type: Boolean, default: false },
3105
+ blurOnEnter: { type: Boolean, default: false },
2645
3106
  submitOnEnter: { type: Boolean, default: false },
2646
3107
  error: { type: Boolean, default: false },
2647
3108
  id: {},
@@ -2656,6 +3117,26 @@
2656
3117
  const controlId = vue.computed(() => props.id || (field == null ? void 0 : field.id) || localId);
2657
3118
  const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
2658
3119
  const counterId = vue.computed(() => `${controlId.value}-count`);
3120
+ const resolvedVariant = vue.computed(() => {
3121
+ if (props.variant) {
3122
+ return props.variant;
3123
+ }
3124
+ if (props.noBorder) {
3125
+ return props.noBackground ? "plain" : "filled";
3126
+ }
3127
+ return "bar";
3128
+ });
3129
+ const alignClass = vue.computed(() => {
3130
+ const align = props.align ?? (props.textCenter ? "center" : "start");
3131
+ return align === "start" ? void 0 : `tao-textarea--align-${align}`;
3132
+ });
3133
+ const variantClasses = vue.computed(() => [
3134
+ `tao-textarea--${resolvedVariant.value}`,
3135
+ {
3136
+ "tao-textarea--inverse": props.borderInverse && resolvedVariant.value === "bar",
3137
+ "tao-textarea--no-background": !props.variant && props.noBackground && !props.noBorder
3138
+ }
3139
+ ]);
2659
3140
  const describedBy = vue.computed(() => {
2660
3141
  const ids = [field == null ? void 0 : field.describedBy.value, props.count ? counterId.value : void 0].filter(Boolean);
2661
3142
  return ids.length ? ids.join(" ") : void 0;
@@ -2673,7 +3154,15 @@
2673
3154
  const textareaRef = vue.ref(null);
2674
3155
  function onInput(e) {
2675
3156
  const target = e.target;
2676
- emit("update:modelValue", target.value);
3157
+ let value = target.value;
3158
+ if (props.noSpace && value.includes(" ")) {
3159
+ const caret = target.selectionStart ?? value.length;
3160
+ const nextCaret = value.slice(0, caret).replace(/ /g, "").length;
3161
+ value = value.replace(/ /g, "");
3162
+ target.value = value;
3163
+ target.setSelectionRange(nextCaret, nextCaret);
3164
+ }
3165
+ emit("update:modelValue", value);
2677
3166
  autoResize();
2678
3167
  }
2679
3168
  function onChange(e) {
@@ -2688,7 +3177,7 @@
2688
3177
  function onKeydown(event) {
2689
3178
  var _a;
2690
3179
  emit("keydown", event);
2691
- if (props.submitOnEnter && event.key === "Enter" && !event.shiftKey) {
3180
+ if ((props.blurOnEnter || props.submitOnEnter) && event.key === "Enter" && !event.shiftKey) {
2692
3181
  (_a = textareaRef.value) == null ? void 0 : _a.blur();
2693
3182
  event.preventDefault();
2694
3183
  return;
@@ -2713,31 +3202,47 @@
2713
3202
  );
2714
3203
  vue.onMounted(() => {
2715
3204
  var _a;
2716
- if (props.autoFocus) {
3205
+ if (props.autofocus || props.autoFocus) {
2717
3206
  (_a = textareaRef.value) == null ? void 0 : _a.focus();
2718
3207
  }
2719
3208
  vue.nextTick(autoResize);
2720
3209
  });
3210
+ warnDeprecated("TaoTextarea", {
3211
+ noBorder: 'use variant="filled"',
3212
+ noBackground: 'use variant="plain"',
3213
+ borderInverse: "use `variant` (the bar on the right goes away)",
3214
+ dummy: "use `readonly`",
3215
+ textCenter: 'use align="center"',
3216
+ autoFocus: "use `autofocus`",
3217
+ submitOnEnter: "use `blurOnEnter`"
3218
+ });
2721
3219
  return (_ctx, _cache) => {
2722
- return __props.dummy ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$w, vue.toDisplayString(__props.modelValue), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$t, [
3220
+ return __props.dummy ? (vue.openBlock(), vue.createElementBlock("span", {
3221
+ key: 0,
3222
+ class: vue.normalizeClass(["tao-textarea tao-textarea--dummy", [vue.unref(sizeClass)(__props.size), variantClasses.value, alignClass.value]])
3223
+ }, vue.toDisplayString(__props.modelValue), 3)) : (vue.openBlock(), vue.createElementBlock("div", {
3224
+ key: 1,
3225
+ class: vue.normalizeClass(["tao-textarea-wrap", vue.unref(sizeClass)(__props.size)])
3226
+ }, [
2723
3227
  vue.createElementVNode("textarea", {
2724
3228
  id: controlId.value,
2725
3229
  ref_key: "textareaRef",
2726
3230
  ref: textareaRef,
2727
- class: vue.normalizeClass(["tao-textarea", {
2728
- "tao-textarea--inverse": __props.borderInverse,
2729
- "tao-textarea--center": __props.textCenter,
2730
- "tao-textarea--no-border": __props.noBorder,
2731
- "tao-textarea--no-background": __props.noBackground,
2732
- "tao-textarea--no-resize": !__props.resize,
2733
- "tao-textarea--invalid": invalid.value
2734
- }]),
3231
+ class: vue.normalizeClass(["tao-textarea", [
3232
+ variantClasses.value,
3233
+ alignClass.value,
3234
+ {
3235
+ "tao-textarea--no-resize": !__props.resize,
3236
+ "tao-textarea--invalid": invalid.value
3237
+ }
3238
+ ]]),
2735
3239
  placeholder: __props.placeholder,
2736
3240
  spellcheck: __props.spellcheck,
2737
3241
  autocomplete: __props.autocomplete,
2738
3242
  minlength: __props.minlength,
2739
3243
  maxlength: __props.maxlength,
2740
3244
  disabled: __props.disabled,
3245
+ readonly: __props.readonly,
2741
3246
  rows: __props.rows,
2742
3247
  value: __props.modelValue,
2743
3248
  "aria-invalid": invalid.value || void 0,
@@ -2748,17 +3253,17 @@
2748
3253
  onFocus,
2749
3254
  onBlur,
2750
3255
  onKeydown
2751
- }, null, 42, _hoisted_3$n),
3256
+ }, null, 42, _hoisted_1$w),
2752
3257
  __props.count ? (vue.openBlock(), vue.createElementBlock("span", {
2753
3258
  key: 0,
2754
3259
  id: counterId.value,
2755
3260
  class: vue.normalizeClass(["tao-textarea__count", { "tao-textarea__count--limit": atLimit.value }])
2756
- }, vue.toDisplayString(countLabel.value), 11, _hoisted_4$l)) : vue.createCommentVNode("", true)
2757
- ]));
3261
+ }, vue.toDisplayString(countLabel.value), 11, _hoisted_2$t)) : vue.createCommentVNode("", true)
3262
+ ], 2));
2758
3263
  };
2759
3264
  }
2760
3265
  });
2761
- const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-3eb0e261"]]);
3266
+ const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-50628dd9"]]);
2762
3267
  const _hoisted_1$v = ["tabindex", "aria-label"];
2763
3268
  const _hoisted_2$s = { class: "tao-scroll-top__content" };
2764
3269
  const RIPPLE_DURATION = 750;
@@ -2771,12 +3276,14 @@
2771
3276
  bottom: { default: 24 },
2772
3277
  zIndex: { default: 1e3 },
2773
3278
  boundary: { default: 300 },
2774
- hasOutline: { type: Boolean, default: true },
3279
+ outline: { type: Boolean, default: void 0 },
3280
+ hasOutline: { type: Boolean, default: void 0 },
2775
3281
  tabindex: { default: 0 },
2776
- ariaLabel: { default: "Наверх" }
3282
+ ariaLabel: {}
2777
3283
  },
2778
3284
  setup(__props) {
2779
3285
  const props = __props;
3286
+ useLocaleText(props, "scrollTop");
2780
3287
  const fmtProp = (value, unit = "px") => typeof value === "number" ? value + unit : value;
2781
3288
  let prevPos = 0;
2782
3289
  let activeBack = false;
@@ -2851,6 +3358,10 @@
2851
3358
  vue.onBeforeUnmount(() => {
2852
3359
  window.removeEventListener("scroll", onScroll);
2853
3360
  });
3361
+ warnDeprecated("TaoScrollTop", {
3362
+ hasOutline: "use `outline`",
3363
+ tabindex: "pass `tabindex` as a plain attribute"
3364
+ });
2854
3365
  return (_ctx, _cache) => {
2855
3366
  return vue.openBlock(), vue.createBlock(vue.Transition, { name: "tao-scroll-top-fade" }, {
2856
3367
  default: vue.withCtx(() => [
@@ -2859,7 +3370,7 @@
2859
3370
  type: "button",
2860
3371
  style: vue.normalizeStyle(mainStyle),
2861
3372
  tabindex: props.tabindex,
2862
- class: vue.normalizeClass(["tao-scroll-top", { "tao-scroll-top--no-outline": !props.hasOutline }]),
3373
+ class: vue.normalizeClass(["tao-scroll-top", { "tao-scroll-top--no-outline": (props.outline ?? props.hasOutline) === false }]),
2863
3374
  "aria-label": props.ariaLabel,
2864
3375
  onClick: vue.withModifiers(onClick, ["prevent"])
2865
3376
  }, [
@@ -2887,7 +3398,7 @@
2887
3398
  };
2888
3399
  }
2889
3400
  });
2890
- const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-6db55fb5"]]);
3401
+ const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-9ec6a1a2"]]);
2891
3402
  const _hoisted_1$u = { class: "tao-progress" };
2892
3403
  const _hoisted_2$r = {
2893
3404
  key: 0,
@@ -2967,7 +3478,7 @@
2967
3478
  }
2968
3479
  });
2969
3480
  const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-1aae89cd"]]);
2970
- const _hoisted_1$t = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-disabled", "aria-describedby"];
3481
+ const _hoisted_1$t = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-disabled", "aria-invalid", "aria-describedby"];
2971
3482
  const _hoisted_2$q = ["placeholder"];
2972
3483
  const _hoisted_3$l = {
2973
3484
  key: 1,
@@ -2984,10 +3495,12 @@
2984
3495
  placeholder: { default: "" },
2985
3496
  modelValue: {},
2986
3497
  disabled: { type: Boolean, default: false },
2987
- size: { default: "medium" },
3498
+ error: { type: Boolean, default: false },
3499
+ variant: { default: "bar" },
3500
+ size: {},
2988
3501
  wheel: { default: 0 }
2989
3502
  },
2990
- emits: ["update:modelValue"],
3503
+ emits: ["update:modelValue", "change"],
2991
3504
  setup(__props, { emit: __emit }) {
2992
3505
  const props = __props;
2993
3506
  const emit = __emit;
@@ -2995,6 +3508,7 @@
2995
3508
  const localId = vue.useId();
2996
3509
  const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
2997
3510
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
3511
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
2998
3512
  function packModelValue(value) {
2999
3513
  return typeof props.modelValue === "string" ? `${value}` : value;
3000
3514
  }
@@ -3002,10 +3516,11 @@
3002
3516
  const raw = typeof props.modelValue === "string" ? parseFloat(props.modelValue) : props.modelValue;
3003
3517
  return Number.isFinite(raw) ? raw : props.min;
3004
3518
  }
3005
- const current = vue.computed(() => unpackModelValue());
3519
+ const current2 = vue.computed(() => unpackModelValue());
3006
3520
  const trackRef = vue.ref(null);
3007
3521
  const isDragging = vue.ref(false);
3008
3522
  let dragPointer = -1;
3523
+ let dragStartValue = 0;
3009
3524
  const shadowInputRef = vue.ref(null);
3010
3525
  const shadowModel = vue.ref("0");
3011
3526
  const showShadowModel = vue.ref(false);
@@ -3014,13 +3529,18 @@
3014
3529
  if (range <= 0) {
3015
3530
  return 0;
3016
3531
  }
3017
- return (current.value - props.min) / range * 100;
3532
+ return (current2.value - props.min) / range * 100;
3018
3533
  });
3019
3534
  function clampValue(v) {
3020
3535
  return Math.min(Math.max(v, props.min), props.max);
3021
3536
  }
3022
- function commit(value) {
3023
- emit("update:modelValue", packModelValue(clampValue(value)));
3537
+ function commit(value, final = false) {
3538
+ const next = clampValue(value);
3539
+ const changed = next !== current2.value;
3540
+ emit("update:modelValue", packModelValue(next));
3541
+ if (final && changed) {
3542
+ emit("change", packModelValue(next));
3543
+ }
3024
3544
  }
3025
3545
  function calculateValue(event) {
3026
3546
  if (!trackRef.value) {
@@ -3053,12 +3573,16 @@
3053
3573
  isDragging.value = false;
3054
3574
  releaseDragCapture();
3055
3575
  dragPointer = -1;
3576
+ if (current2.value !== dragStartValue) {
3577
+ emit("change", packModelValue(current2.value));
3578
+ }
3056
3579
  }
3057
3580
  function onPointerDown(event) {
3058
3581
  if (props.disabled || showShadowModel.value || event.button !== 0 || !trackRef.value) {
3059
3582
  return;
3060
3583
  }
3061
3584
  dragPointer = event.pointerId;
3585
+ dragStartValue = current2.value;
3062
3586
  isDragging.value = true;
3063
3587
  commit(calculateValue(event));
3064
3588
  event.preventDefault();
@@ -3099,17 +3623,17 @@
3099
3623
  };
3100
3624
  if (event.key in keys) {
3101
3625
  event.preventDefault();
3102
- commit(current.value + keys[event.key]);
3626
+ commit(current2.value + keys[event.key], true);
3103
3627
  return;
3104
3628
  }
3105
3629
  if (event.key === "Home") {
3106
3630
  event.preventDefault();
3107
- commit(props.min);
3631
+ commit(props.min, true);
3108
3632
  return;
3109
3633
  }
3110
3634
  if (event.key === "End") {
3111
3635
  event.preventDefault();
3112
- commit(props.max);
3636
+ commit(props.max, true);
3113
3637
  }
3114
3638
  }
3115
3639
  function onWheel(event) {
@@ -3118,13 +3642,13 @@
3118
3642
  }
3119
3643
  event.preventDefault();
3120
3644
  const delta = event.deltaY < 0 ? props.wheel : -props.wheel;
3121
- commit(current.value + delta);
3645
+ commit(current2.value + delta, true);
3122
3646
  }
3123
3647
  function onBlurShadowModel() {
3124
3648
  if (shadowModel.value) {
3125
- const newValue = packModelValue(clampValue(parseFloat(shadowModel.value) || 0));
3126
- shadowModel.value = `${newValue}`;
3127
- emit("update:modelValue", newValue);
3649
+ const next = clampValue(parseFloat(shadowModel.value) || 0);
3650
+ shadowModel.value = `${packModelValue(next)}`;
3651
+ commit(next, true);
3128
3652
  }
3129
3653
  showShadowModel.value = false;
3130
3654
  }
@@ -3159,15 +3683,17 @@
3159
3683
  ref_key: "trackRef",
3160
3684
  ref: trackRef,
3161
3685
  class: vue.normalizeClass(["tao-slider", [
3162
- `tao-slider--${__props.size}`,
3163
- { "tao-slider--show-value": __props.showValue, "tao-slider--disabled": __props.disabled }
3686
+ `tao-slider--${__props.variant}`,
3687
+ vue.unref(sizeClass)(__props.size),
3688
+ { "tao-slider--show-value": __props.showValue, "tao-slider--disabled": __props.disabled, "tao-slider--invalid": invalid.value }
3164
3689
  ]]),
3165
3690
  role: "slider",
3166
3691
  tabindex: __props.disabled ? -1 : 0,
3167
3692
  "aria-valuemin": __props.min,
3168
3693
  "aria-valuemax": __props.max,
3169
- "aria-valuenow": current.value,
3694
+ "aria-valuenow": current2.value,
3170
3695
  "aria-disabled": __props.disabled || void 0,
3696
+ "aria-invalid": invalid.value || void 0,
3171
3697
  "aria-describedby": describedBy.value,
3172
3698
  onContextmenu: vue.withModifiers(onContextMenu, ["prevent"]),
3173
3699
  onPointerdown: onPointerDown,
@@ -3211,37 +3737,37 @@
3211
3737
  };
3212
3738
  }
3213
3739
  });
3214
- const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-e2589857"]]);
3215
- const _hoisted_1$s = { class: "tao-file-drop" };
3216
- const _hoisted_2$p = { class: "tao-file-drop__row" };
3217
- const _hoisted_3$k = ["aria-label"];
3218
- const _hoisted_4$j = { "aria-hidden": "true" };
3219
- const _hoisted_5$f = ["accept", "multiple"];
3220
- const _hoisted_6$c = {
3740
+ const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-47d32e2a"]]);
3741
+ const _hoisted_1$s = { class: "tao-file-drop__row" };
3742
+ const _hoisted_2$p = ["aria-label"];
3743
+ const _hoisted_3$k = { "aria-hidden": "true" };
3744
+ const _hoisted_4$j = ["accept", "multiple"];
3745
+ const _hoisted_5$f = {
3221
3746
  key: 0,
3222
3747
  class: "tao-file-drop__list"
3223
3748
  };
3224
- const _hoisted_7$a = { class: "tao-file-drop__name" };
3225
- const _hoisted_8$9 = { class: "tao-file-drop__meta" };
3226
- const _hoisted_9$4 = ["aria-label", "onClick"];
3227
- const _hoisted_10$4 = { "aria-hidden": "true" };
3749
+ const _hoisted_6$c = { class: "tao-file-drop__name" };
3750
+ const _hoisted_7$a = { class: "tao-file-drop__meta" };
3751
+ const _hoisted_8$9 = ["aria-label", "onClick"];
3752
+ const _hoisted_9$4 = { "aria-hidden": "true" };
3228
3753
  const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
3229
3754
  ...{ name: "TaoFileDrop" },
3230
3755
  __name: "TaoFileDrop",
3231
3756
  props: {
3232
3757
  modelValue: { default: () => [] },
3233
- size: { default: "medium" },
3758
+ size: {},
3234
3759
  accept: { default: "*" },
3235
3760
  multiple: { type: Boolean, default: false },
3236
3761
  showClear: { type: Boolean, default: false },
3237
- clearLabel: { default: "Очистить файлы" },
3238
- removeLabel: { default: "Убрать «{name}»" },
3762
+ clearLabel: {},
3763
+ removeLabel: {},
3239
3764
  formatSize: {},
3240
3765
  list: { type: Boolean, default: true }
3241
3766
  },
3242
- emits: ["update:modelValue", "files", "clear-request"],
3767
+ emits: ["update:modelValue", "change", "files", "clear-request"],
3243
3768
  setup(__props, { emit: __emit }) {
3244
3769
  const props = __props;
3770
+ const l10n = useLocaleText(props, "fileDrop");
3245
3771
  const emit = __emit;
3246
3772
  const isDragging = vue.ref(false);
3247
3773
  const fileInput = vue.ref(null);
@@ -3272,6 +3798,7 @@
3272
3798
  }
3273
3799
  function commit(files) {
3274
3800
  emit("update:modelValue", files);
3801
+ emit("change", files);
3275
3802
  emit("files", files);
3276
3803
  }
3277
3804
  function handleDragOver(event) {
@@ -3330,17 +3857,18 @@
3330
3857
  resetInput();
3331
3858
  }
3332
3859
  function defaultFormatSize(bytes) {
3860
+ const { units, decimalSeparator } = taoLocale().fileDrop;
3333
3861
  if (bytes < 1024) {
3334
- return `${bytes} Б`;
3862
+ return `${bytes} ${units[0]}`;
3335
3863
  }
3336
3864
  const kb = bytes / 1024;
3337
3865
  if (kb < 1024) {
3338
3866
  const value2 = kb < 10 ? kb.toFixed(1) : String(Math.round(kb));
3339
- return `${value2.replace(".", ",")} КБ`;
3867
+ return `${value2.replace(".", decimalSeparator)} ${units[1]}`;
3340
3868
  }
3341
3869
  const mb = kb / 1024;
3342
3870
  const value = mb < 10 ? mb.toFixed(1) : String(Math.round(mb));
3343
- return `${value.replace(".", ",")} МБ`;
3871
+ return `${value.replace(".", decimalSeparator)} ${units[2]}`;
3344
3872
  }
3345
3873
  function sizeLabel(bytes) {
3346
3874
  return props.formatSize ? props.formatSize(bytes) : defaultFormatSize(bytes);
@@ -3355,30 +3883,35 @@
3355
3883
  });
3356
3884
  });
3357
3885
  vue.onBeforeUnmount(() => stopFocusLoss == null ? void 0 : stopFocusLoss());
3886
+ warnDeprecated("TaoFileDrop", {
3887
+ onFiles: 'listen to "change"'
3888
+ });
3358
3889
  return (_ctx, _cache) => {
3359
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
3360
- vue.createElementVNode("div", _hoisted_2$p, [
3890
+ return vue.openBlock(), vue.createElementBlock("div", {
3891
+ class: vue.normalizeClass(["tao-file-drop", vue.unref(sizeClass)(__props.size)])
3892
+ }, [
3893
+ vue.createElementVNode("div", _hoisted_1$s, [
3361
3894
  __props.showClear && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("button", {
3362
3895
  key: 0,
3363
3896
  type: "button",
3364
3897
  class: "tao-file-drop__clear",
3365
- "aria-label": __props.clearLabel,
3898
+ "aria-label": vue.unref(l10n).clearLabel,
3366
3899
  onClick: requestClear
3367
3900
  }, [
3368
- vue.createElementVNode("span", _hoisted_4$j, [
3901
+ vue.createElementVNode("span", _hoisted_3$k, [
3369
3902
  vue.renderSlot(_ctx.$slots, "clear-icon", {}, () => [
3370
3903
  _cache[1] || (_cache[1] = vue.createTextVNode("✕", -1))
3371
3904
  ], true)
3372
3905
  ])
3373
- ], 8, _hoisted_3$k)) : vue.createCommentVNode("", true),
3906
+ ], 8, _hoisted_2$p)) : vue.createCommentVNode("", true),
3374
3907
  vue.createElementVNode("label", {
3375
- class: vue.normalizeClass(["tao-file-drop__zone", [`tao-file-drop__zone--${__props.size}`, { "tao-file-drop__zone--dragging": isDragging.value }]]),
3908
+ class: vue.normalizeClass(["tao-file-drop__zone", { "tao-file-drop__zone--dragging": isDragging.value }]),
3376
3909
  onDragover: handleDragOver,
3377
3910
  onDragleave: handleDragLeave,
3378
3911
  onDrop: handleDrop
3379
3912
  }, [
3380
3913
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
3381
- _cache[2] || (_cache[2] = vue.createTextVNode("Перетащите файл сюда или нажмите, чтобы выбрать", -1))
3914
+ vue.createTextVNode(vue.toDisplayString(vue.unref(taoLocale)().fileDrop.zoneText), 1)
3382
3915
  ], true),
3383
3916
  vue.createElementVNode("input", {
3384
3917
  ref_key: "fileInput",
@@ -3390,37 +3923,37 @@
3390
3923
  onChange: handleFileSelect,
3391
3924
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
3392
3925
  }, ["stop"]))
3393
- }, null, 40, _hoisted_5$f)
3926
+ }, null, 40, _hoisted_4$j)
3394
3927
  ], 34)
3395
3928
  ]),
3396
- __props.list && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6$c, [
3929
+ __props.list && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_5$f, [
3397
3930
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.modelValue, (file, index) => {
3398
3931
  return vue.openBlock(), vue.createElementBlock("li", {
3399
3932
  key: fileKey(file, index),
3400
3933
  class: "tao-file-drop__file"
3401
3934
  }, [
3402
- vue.createElementVNode("span", _hoisted_7$a, vue.toDisplayString(file.name), 1),
3403
- vue.createElementVNode("span", _hoisted_8$9, vue.toDisplayString(sizeLabel(file.size)), 1),
3935
+ vue.createElementVNode("span", _hoisted_6$c, vue.toDisplayString(file.name), 1),
3936
+ vue.createElementVNode("span", _hoisted_7$a, vue.toDisplayString(sizeLabel(file.size)), 1),
3404
3937
  vue.createElementVNode("button", {
3405
3938
  type: "button",
3406
3939
  class: "tao-file-drop__remove",
3407
- "aria-label": __props.removeLabel.replace("{name}", file.name),
3940
+ "aria-label": vue.unref(l10n).removeLabel.replace("{name}", file.name),
3408
3941
  onClick: ($event) => removeAt(index)
3409
3942
  }, [
3410
- vue.createElementVNode("span", _hoisted_10$4, [
3943
+ vue.createElementVNode("span", _hoisted_9$4, [
3411
3944
  vue.renderSlot(_ctx.$slots, "remove-icon", {}, () => [
3412
- _cache[3] || (_cache[3] = vue.createTextVNode("✕", -1))
3945
+ _cache[2] || (_cache[2] = vue.createTextVNode("✕", -1))
3413
3946
  ], true)
3414
3947
  ])
3415
- ], 8, _hoisted_9$4)
3948
+ ], 8, _hoisted_8$9)
3416
3949
  ]);
3417
3950
  }), 128))
3418
3951
  ])) : vue.createCommentVNode("", true)
3419
- ]);
3952
+ ], 2);
3420
3953
  };
3421
3954
  }
3422
3955
  });
3423
- const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-010f3f8f"]]);
3956
+ const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-f8c58faa"]]);
3424
3957
  const _hoisted_1$r = ["aria-expanded", "aria-label"];
3425
3958
  const _hoisted_2$o = {
3426
3959
  key: 1,
@@ -3433,11 +3966,12 @@
3433
3966
  __name: "TaoDropdownMenu",
3434
3967
  props: {
3435
3968
  actions: { default: () => [] },
3436
- menuLabel: { default: "Меню" }
3969
+ menuLabel: {}
3437
3970
  },
3438
- emits: ["selected"],
3971
+ emits: ["select", "selected"],
3439
3972
  setup(__props, { emit: __emit }) {
3440
3973
  const props = __props;
3974
+ const l10n = useLocaleText(props, "dropdownMenu");
3441
3975
  const emit = __emit;
3442
3976
  const menuRef = vue.ref(null);
3443
3977
  const listRef = vue.ref(null);
@@ -3493,6 +4027,7 @@
3493
4027
  function emitAction(id) {
3494
4028
  var _a;
3495
4029
  isOpen.value = false;
4030
+ emit("select", id);
3496
4031
  emit("selected", id);
3497
4032
  (_a = triggerRef.value) == null ? void 0 : _a.focus();
3498
4033
  }
@@ -3549,6 +4084,9 @@
3549
4084
  window.removeEventListener("scroll", onWinScroll, true);
3550
4085
  window.removeEventListener("resize", updatePosition);
3551
4086
  });
4087
+ warnDeprecated("TaoDropdownMenu", {
4088
+ onSelected: 'listen to "select"'
4089
+ });
3552
4090
  return (_ctx, _cache) => {
3553
4091
  return vue.openBlock(), vue.createElementBlock("div", {
3554
4092
  ref_key: "menuRef",
@@ -3562,7 +4100,7 @@
3562
4100
  class: "tao-dropdown-menu__button",
3563
4101
  "aria-haspopup": "menu",
3564
4102
  "aria-expanded": isOpen.value,
3565
- "aria-label": _ctx.$slots.button ? void 0 : __props.menuLabel,
4103
+ "aria-label": _ctx.$slots.button ? void 0 : vue.unref(l10n).menuLabel,
3566
4104
  onClick: toggleMenu
3567
4105
  }, [
3568
4106
  _ctx.$slots.button ? vue.renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$o, [
@@ -3604,16 +4142,20 @@
3604
4142
  };
3605
4143
  }
3606
4144
  });
3607
- const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-a5b3f392"]]);
4145
+ const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-5db490aa"]]);
3608
4146
  const _hoisted_1$q = ["aria-invalid", "aria-describedby"];
3609
- const _hoisted_2$n = ["id", "value", "placeholder", "type", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
4147
+ const _hoisted_2$n = ["id", "value", "placeholder", "type", "disabled", "aria-invalid", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
3610
4148
  const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
3611
4149
  ...{ name: "TaoPinCode" },
3612
4150
  __name: "TaoPinCode",
3613
4151
  props: {
3614
4152
  length: {},
4153
+ masked: { type: Boolean, default: false },
3615
4154
  hidden: { type: Boolean, default: false },
3616
4155
  placeholder: { default: "" },
4156
+ disabled: { type: Boolean, default: false },
4157
+ error: { type: Boolean, default: false },
4158
+ size: {},
3617
4159
  modelValue: { default: "" },
3618
4160
  numbersOnly: { type: Boolean, default: false },
3619
4161
  clearOn: { default: "focus" }
@@ -3625,7 +4167,8 @@
3625
4167
  const field = vue.inject(formFieldKey, null);
3626
4168
  const localId = vue.useId();
3627
4169
  const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
3628
- const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
4170
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
4171
+ const isMasked = vue.computed(() => props.masked || props.hidden);
3629
4172
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
3630
4173
  const numbers = vue.ref([]);
3631
4174
  const inputRefs = vue.ref([]);
@@ -3787,9 +4330,12 @@
3787
4330
  },
3788
4331
  { immediate: true }
3789
4332
  );
4333
+ warnDeprecated("TaoPinCode", {
4334
+ hidden: "use `masked`"
4335
+ });
3790
4336
  return (_ctx, _cache) => {
3791
4337
  return vue.openBlock(), vue.createElementBlock("div", {
3792
- class: "tao-pin-code",
4338
+ class: vue.normalizeClass(["tao-pin-code", [vue.unref(sizeClass)(__props.size), { "tao-pin-code--disabled": __props.disabled }]]),
3793
4339
  role: "group",
3794
4340
  "aria-invalid": invalid.value || void 0,
3795
4341
  "aria-describedby": describedBy.value
@@ -3806,7 +4352,9 @@
3806
4352
  }]),
3807
4353
  value: num,
3808
4354
  placeholder: __props.placeholder,
3809
- type: __props.hidden ? "password" : "text",
4355
+ type: isMasked.value ? "password" : "text",
4356
+ disabled: __props.disabled,
4357
+ "aria-invalid": invalid.value || void 0,
3810
4358
  inputmode: __props.numbersOnly ? "numeric" : "text",
3811
4359
  pattern: __props.numbersOnly ? "[0-9]" : void 0,
3812
4360
  autocomplete: "one-time-code",
@@ -3818,16 +4366,17 @@
3818
4366
  onBlur
3819
4367
  }, null, 42, _hoisted_2$n);
3820
4368
  }), 128))
3821
- ], 8, _hoisted_1$q);
4369
+ ], 10, _hoisted_1$q);
3822
4370
  };
3823
4371
  }
3824
4372
  });
3825
- const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-171d87a1"]]);
4373
+ const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-6f0df8bd"]]);
3826
4374
  const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
3827
4375
  ...{ name: "TaoLink" },
3828
4376
  __name: "TaoLink",
3829
4377
  props: {
3830
4378
  to: { default: void 0 },
4379
+ newTab: { type: Boolean, default: false },
3831
4380
  asNewTab: { type: Boolean, default: false },
3832
4381
  private: { type: Boolean, default: false },
3833
4382
  exactPath: { type: Boolean, default: false }
@@ -3839,8 +4388,9 @@
3839
4388
  const linkKind = globals.NuxtLink ? "nuxt" : globals.RouterLink ? "router" : "a";
3840
4389
  const linkComponent = linkKind === "nuxt" ? globals.NuxtLink : linkKind === "router" ? globals.RouterLink : "a";
3841
4390
  const linkProps = vue.computed(() => {
3842
- const target = props.asNewTab ? "_blank" : void 0;
3843
- const rel = props.private && "noopener noreferrer" || props.asNewTab && "noopener" || void 0;
4391
+ const newTab = props.newTab || props.asNewTab;
4392
+ const target = newTab ? "_blank" : void 0;
4393
+ const rel = props.private && "noopener noreferrer" || newTab && "noopener" || void 0;
3844
4394
  if (linkKind === "a") {
3845
4395
  return {
3846
4396
  href: typeof props.to === "string" ? props.to : void 0,
@@ -3855,6 +4405,9 @@
3855
4405
  ...linkKind === "nuxt" ? { exactPath: props.exactPath } : {}
3856
4406
  };
3857
4407
  });
4408
+ warnDeprecated("TaoLink", {
4409
+ asNewTab: "use `newTab`"
4410
+ });
3858
4411
  return (_ctx, _cache) => {
3859
4412
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(linkComponent)), vue.mergeProps(linkProps.value, { draggable: "false" }), {
3860
4413
  default: vue.withCtx(() => [
@@ -3872,7 +4425,8 @@
3872
4425
  props: {
3873
4426
  label: {},
3874
4427
  hint: {},
3875
- error: {}
4428
+ error: {},
4429
+ size: {}
3876
4430
  },
3877
4431
  setup(__props) {
3878
4432
  const props = __props;
@@ -3908,7 +4462,7 @@
3908
4462
  }
3909
4463
  return (_ctx, _cache) => {
3910
4464
  return vue.openBlock(), vue.createElementBlock("div", {
3911
- class: vue.normalizeClass(["tao-form-field", { "tao-form-field--invalid": invalid.value }])
4465
+ class: vue.normalizeClass(["tao-form-field", [vue.unref(sizeClass)(__props.size), { "tao-form-field--invalid": invalid.value }]])
3912
4466
  }, [
3913
4467
  __props.label ? (vue.openBlock(), vue.createElementBlock("label", {
3914
4468
  key: 0,
@@ -3931,7 +4485,7 @@
3931
4485
  };
3932
4486
  }
3933
4487
  });
3934
- const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-3f8cf057"]]);
4488
+ const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-3cf90e3a"]]);
3935
4489
  const _hoisted_1$o = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
3936
4490
  const _hoisted_2$m = { class: "tao-select__value" };
3937
4491
  const _hoisted_3$i = ["aria-activedescendant"];
@@ -3942,16 +4496,17 @@
3942
4496
  props: {
3943
4497
  modelValue: { default: null },
3944
4498
  options: { default: () => [] },
3945
- placeholder: { default: "Выберите" },
4499
+ placeholder: {},
3946
4500
  disabled: { type: Boolean, default: false },
3947
4501
  error: { type: Boolean, default: false },
3948
- clearText: { default: "Очистить" },
4502
+ clearText: {},
3949
4503
  clearable: { type: Boolean, default: true },
3950
- size: { default: "medium" }
4504
+ size: {}
3951
4505
  },
3952
4506
  emits: ["update:modelValue", "change"],
3953
4507
  setup(__props, { emit: __emit }) {
3954
4508
  const props = __props;
4509
+ const l10n = useLocaleText(props, "select");
3955
4510
  const emit = __emit;
3956
4511
  const field = vue.inject(formFieldKey, null);
3957
4512
  const localId = vue.useId();
@@ -3965,6 +4520,7 @@
3965
4520
  const panelRef = vue.ref(null);
3966
4521
  const listRef = vue.ref(null);
3967
4522
  const listStyle = vue.ref({ top: "0px", left: "0px", width: "0px" });
4523
+ const panelSize = vue.ref("medium");
3968
4524
  const selected = vue.computed(() => props.options.find((option) => option.value === props.modelValue) ?? null);
3969
4525
  const enabledIndexes = vue.computed(
3970
4526
  () => props.options.map((option, index) => option.disabled ? -1 : index).filter((index) => index >= 0)
@@ -4121,6 +4677,7 @@
4121
4677
  }
4122
4678
  vue.watch(open, (isOpen) => {
4123
4679
  if (isOpen) {
4680
+ panelSize.value = resolveSize(triggerRef.value, props.size);
4124
4681
  document.addEventListener("pointerdown", onDocumentPointer);
4125
4682
  window.addEventListener("resize", onViewportChange);
4126
4683
  window.addEventListener("scroll", onViewportChange, true);
@@ -4138,7 +4695,7 @@
4138
4695
  return (_ctx, _cache) => {
4139
4696
  var _a;
4140
4697
  return vue.openBlock(), vue.createElementBlock("div", {
4141
- class: vue.normalizeClass(["tao-select", [`tao-select--${__props.size}`, { "tao-select--open": open.value, "tao-select--invalid": invalid.value }]])
4698
+ class: vue.normalizeClass(["tao-select", [vue.unref(sizeClass)(__props.size), { "tao-select--open": open.value, "tao-select--invalid": invalid.value }]])
4142
4699
  }, [
4143
4700
  vue.createElementVNode("button", {
4144
4701
  id: controlId.value,
@@ -4156,7 +4713,7 @@
4156
4713
  onClick: toggle,
4157
4714
  onKeydown: onTriggerKeydown
4158
4715
  }, [
4159
- vue.createElementVNode("span", _hoisted_2$m, vue.toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? __props.placeholder), 1),
4716
+ vue.createElementVNode("span", _hoisted_2$m, vue.toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? vue.unref(l10n).placeholder), 1),
4160
4717
  vue.createElementVNode("span", {
4161
4718
  class: vue.normalizeClass(["tao-select__chevron", { "tao-select__chevron--custom": _ctx.$slots.chevron }]),
4162
4719
  "aria-hidden": "true"
@@ -4169,7 +4726,7 @@
4169
4726
  key: 0,
4170
4727
  ref_key: "panelRef",
4171
4728
  ref: panelRef,
4172
- class: vue.normalizeClass(["tao-select__panel", `tao-select__panel--${__props.size}`]),
4729
+ class: vue.normalizeClass(["tao-select__panel", vue.unref(sizeClass)(panelSize.value)]),
4173
4730
  style: vue.normalizeStyle(listStyle.value)
4174
4731
  }, [
4175
4732
  vue.createElementVNode("ul", {
@@ -4211,7 +4768,7 @@
4211
4768
  onClick: clear
4212
4769
  }, [
4213
4770
  vue.renderSlot(_ctx.$slots, "clear", {}, () => [
4214
- vue.createTextVNode(vue.toDisplayString(__props.clearText), 1)
4771
+ vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).clearText), 1)
4215
4772
  ], true)
4216
4773
  ], 32)) : vue.createCommentVNode("", true)
4217
4774
  ], 6)) : vue.createCommentVNode("", true)
@@ -4220,7 +4777,7 @@
4220
4777
  };
4221
4778
  }
4222
4779
  });
4223
- const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-e067dbde"]]);
4780
+ const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-47d327a3"]]);
4224
4781
  const _hoisted_1$n = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
4225
4782
  const _hoisted_2$l = {
4226
4783
  key: 0,
@@ -4233,18 +4790,19 @@
4233
4790
  props: {
4234
4791
  modelValue: { default: null },
4235
4792
  options: { default: () => [] },
4236
- placeholder: { default: "Начните вводить" },
4793
+ placeholder: {},
4237
4794
  disabled: { type: Boolean, default: false },
4238
4795
  error: { type: Boolean, default: false },
4239
- emptyText: { default: "Ничего не найдено" },
4240
- clearText: { default: "Очистить" },
4796
+ emptyText: {},
4797
+ clearText: {},
4241
4798
  clearable: { type: Boolean, default: true },
4242
- size: { default: "medium" },
4799
+ size: {},
4243
4800
  allowCreate: { type: Boolean, default: false }
4244
4801
  },
4245
4802
  emits: ["update:modelValue", "change", "create"],
4246
4803
  setup(__props, { emit: __emit }) {
4247
4804
  const props = __props;
4805
+ const l10n = useLocaleText(props, "combobox");
4248
4806
  const emit = __emit;
4249
4807
  const field = vue.inject(formFieldKey, null);
4250
4808
  const localId = vue.useId();
@@ -4261,6 +4819,7 @@
4261
4819
  const fieldRef = vue.ref(null);
4262
4820
  const inputRef = vue.ref(null);
4263
4821
  const panelRef = vue.ref(null);
4822
+ const panelSize = vue.ref("medium");
4264
4823
  const listRef = vue.ref(null);
4265
4824
  const listStyle = vue.ref({ top: "0px", left: "0px", width: "0px" });
4266
4825
  const selected = vue.computed(() => {
@@ -4590,6 +5149,7 @@
4590
5149
  });
4591
5150
  vue.watch(open, (isOpen) => {
4592
5151
  if (isOpen) {
5152
+ panelSize.value = resolveSize(fieldRef.value, props.size);
4593
5153
  document.addEventListener("pointerdown", onDocumentPointer);
4594
5154
  window.addEventListener("resize", onViewportChange);
4595
5155
  window.addEventListener("scroll", onViewportChange, true);
@@ -4614,7 +5174,7 @@
4614
5174
  return (_ctx, _cache) => {
4615
5175
  return vue.openBlock(), vue.createElementBlock("div", {
4616
5176
  class: vue.normalizeClass(["tao-combobox", [
4617
- `tao-combobox--${__props.size}`,
5177
+ vue.unref(sizeClass)(__props.size),
4618
5178
  {
4619
5179
  "tao-combobox--open": open.value,
4620
5180
  "tao-combobox--invalid": invalid.value,
@@ -4644,7 +5204,7 @@
4644
5204
  "aria-invalid": invalid.value || void 0,
4645
5205
  "aria-describedby": describedBy.value,
4646
5206
  disabled: __props.disabled,
4647
- placeholder: __props.placeholder,
5207
+ placeholder: vue.unref(l10n).placeholder,
4648
5208
  value: query.value,
4649
5209
  onInput: _cache[0] || (_cache[0] = ($event) => {
4650
5210
  query.value = $event.target.value;
@@ -4666,7 +5226,7 @@
4666
5226
  key: 0,
4667
5227
  ref_key: "panelRef",
4668
5228
  ref: panelRef,
4669
- class: vue.normalizeClass(["tao-combobox__panel", `tao-combobox__panel--${__props.size}`]),
5229
+ class: vue.normalizeClass(["tao-combobox__panel", vue.unref(sizeClass)(panelSize.value)]),
4670
5230
  style: vue.normalizeStyle(listStyle.value)
4671
5231
  }, [
4672
5232
  vue.createElementVNode("ul", {
@@ -4678,7 +5238,7 @@
4678
5238
  }, [
4679
5239
  !rows.value.length ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$l, [
4680
5240
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
4681
- vue.createTextVNode(vue.toDisplayString(__props.emptyText), 1)
5241
+ vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).emptyText), 1)
4682
5242
  ], true)
4683
5243
  ])) : vue.createCommentVNode("", true),
4684
5244
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(rows.value, (row, index) => {
@@ -4702,7 +5262,7 @@
4702
5262
  row.kind === "create" ? vue.renderSlot(_ctx.$slots, "create", {
4703
5263
  text: row.text
4704
5264
  }, () => [
4705
- vue.createTextVNode("Добавить «" + vue.toDisplayString(row.text) + "»", 1)
5265
+ vue.createTextVNode(vue.toDisplayString(vue.unref(formatText)(vue.unref(taoLocale)().combobox.createText, { text: row.text })), 1)
4706
5266
  ], true, 0) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
4707
5267
  vue.createTextVNode(vue.toDisplayString(row.option.label), 1)
4708
5268
  ], 64))
@@ -4717,7 +5277,7 @@
4717
5277
  onClick: clear
4718
5278
  }, [
4719
5279
  vue.renderSlot(_ctx.$slots, "clear", {}, () => [
4720
- vue.createTextVNode(vue.toDisplayString(__props.clearText), 1)
5280
+ vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).clearText), 1)
4721
5281
  ], true)
4722
5282
  ], 32)) : vue.createCommentVNode("", true)
4723
5283
  ], 6)) : vue.createCommentVNode("", true)
@@ -4726,7 +5286,7 @@
4726
5286
  };
4727
5287
  }
4728
5288
  });
4729
- const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-1254c942"]]);
5289
+ const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-e75a5550"]]);
4730
5290
  const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
4731
5291
  function formatTaoDateIso(parts) {
4732
5292
  return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
@@ -4898,20 +5458,23 @@
4898
5458
  __name: "TaoDate",
4899
5459
  props: {
4900
5460
  modelValue: { default: null },
4901
- placeholder: { default: "Дата" },
5461
+ placeholder: {},
4902
5462
  disabled: { type: Boolean, default: false },
5463
+ size: {},
4903
5464
  error: { type: Boolean, default: false },
4904
5465
  min: { default: void 0 },
4905
5466
  max: { default: void 0 },
4906
- locale: { default: "ru-RU" },
4907
- todayText: { default: "Сегодня" },
4908
- clearText: { default: "Очистить" },
4909
- prevMonthLabel: { default: "Предыдущий месяц" },
4910
- nextMonthLabel: { default: "Следующий месяц" }
5467
+ locale: {},
5468
+ todayText: {},
5469
+ clearText: {},
5470
+ prevMonthLabel: {},
5471
+ nextMonthLabel: {}
4911
5472
  },
4912
5473
  emits: ["update:modelValue", "change"],
4913
5474
  setup(__props, { emit: __emit }) {
4914
5475
  const props = __props;
5476
+ const l10n = useLocaleText(props, "date");
5477
+ const dateLocale = vue.computed(() => props.locale ?? taoLocale().code);
4915
5478
  const emit = __emit;
4916
5479
  const field = vue.inject(formFieldKey, null);
4917
5480
  const localId = vue.useId();
@@ -4930,9 +5493,9 @@
4930
5493
  const parsed = parseTaoDate(props.modelValue);
4931
5494
  return parsed ? formatTaoDateIso(parsed) : null;
4932
5495
  });
4933
- const displayLabel = vue.computed(() => valueIso.value ? formatTaoDateLabel(valueIso.value, props.locale) : "");
4934
- const weekdays = vue.computed(() => taoWeekdayLabels(props.locale));
4935
- const monthLabel = vue.computed(() => formatTaoMonthLabel(viewYear.value, viewMonth.value, props.locale));
5496
+ const displayLabel = vue.computed(() => valueIso.value ? formatTaoDateLabel(valueIso.value, dateLocale.value) : "");
5497
+ const weekdays = vue.computed(() => taoWeekdayLabels(dateLocale.value));
5498
+ const monthLabel = vue.computed(() => formatTaoMonthLabel(viewYear.value, viewMonth.value, dateLocale.value));
4936
5499
  const cells = vue.computed(() => buildTaoDateGrid(viewYear.value, viewMonth.value));
4937
5500
  const todayIso = vue.computed(() => todayTaoDate());
4938
5501
  const todayEnabled = vue.computed(() => isTaoDateInRange(todayIso.value, props.min, props.max));
@@ -5104,7 +5667,7 @@
5104
5667
  });
5105
5668
  return (_ctx, _cache) => {
5106
5669
  return vue.openBlock(), vue.createElementBlock("div", {
5107
- class: vue.normalizeClass(["tao-date", { "tao-date--open": open.value, "tao-date--invalid": invalid.value }])
5670
+ class: vue.normalizeClass(["tao-date", [vue.unref(sizeClass)(__props.size), { "tao-date--open": open.value, "tao-date--invalid": invalid.value }]])
5108
5671
  }, [
5109
5672
  vue.createElementVNode("button", {
5110
5673
  id: controlId.value,
@@ -5122,7 +5685,7 @@
5122
5685
  onClick: toggle,
5123
5686
  onKeydown: onTriggerKeydown
5124
5687
  }, [
5125
- vue.createElementVNode("span", _hoisted_2$k, vue.toDisplayString(displayLabel.value || __props.placeholder), 1),
5688
+ vue.createElementVNode("span", _hoisted_2$k, vue.toDisplayString(displayLabel.value || vue.unref(l10n).placeholder), 1),
5126
5689
  vue.createElementVNode("span", _hoisted_3$g, [
5127
5690
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
5128
5691
  _cache[4] || (_cache[4] = vue.createElementVNode("svg", {
@@ -5169,7 +5732,7 @@
5169
5732
  vue.createElementVNode("button", {
5170
5733
  type: "button",
5171
5734
  class: "tao-date__nav",
5172
- "aria-label": __props.prevMonthLabel,
5735
+ "aria-label": vue.unref(l10n).prevMonthLabel,
5173
5736
  onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
5174
5737
  }, [
5175
5738
  vue.createElementVNode("span", _hoisted_7$9, [
@@ -5196,7 +5759,7 @@
5196
5759
  vue.createElementVNode("button", {
5197
5760
  type: "button",
5198
5761
  class: "tao-date__nav",
5199
- "aria-label": __props.nextMonthLabel,
5762
+ "aria-label": vue.unref(l10n).nextMonthLabel,
5200
5763
  onClick: _cache[1] || (_cache[1] = ($event) => goMonth(1))
5201
5764
  }, [
5202
5765
  vue.createElementVNode("span", _hoisted_10$3, [
@@ -5238,7 +5801,7 @@
5238
5801
  "tao-date__day--disabled": !vue.unref(isTaoDateInRange)(cell.iso, __props.min, __props.max)
5239
5802
  }]),
5240
5803
  role: "gridcell",
5241
- "aria-label": vue.unref(formatTaoDateLabel)(cell.iso, __props.locale),
5804
+ "aria-label": vue.unref(formatTaoDateLabel)(cell.iso, dateLocale.value),
5242
5805
  "aria-selected": cell.iso === valueIso.value,
5243
5806
  disabled: !vue.unref(isTaoDateInRange)(cell.iso, __props.min, __props.max),
5244
5807
  onMousedown: _cache[2] || (_cache[2] = vue.withModifiers(() => {
@@ -5255,7 +5818,7 @@
5255
5818
  onClick: _cache[3] || (_cache[3] = ($event) => selectDay(todayIso.value))
5256
5819
  }, [
5257
5820
  vue.renderSlot(_ctx.$slots, "today", {}, () => [
5258
- vue.createTextVNode(vue.toDisplayString(__props.todayText), 1)
5821
+ vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).todayText), 1)
5259
5822
  ], true)
5260
5823
  ], 8, _hoisted_15),
5261
5824
  valueIso.value ? (vue.openBlock(), vue.createElementBlock("button", {
@@ -5265,7 +5828,7 @@
5265
5828
  onClick: clear
5266
5829
  }, [
5267
5830
  vue.renderSlot(_ctx.$slots, "clear", {}, () => [
5268
- vue.createTextVNode(vue.toDisplayString(__props.clearText), 1)
5831
+ vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).clearText), 1)
5269
5832
  ], true)
5270
5833
  ])) : vue.createCommentVNode("", true)
5271
5834
  ])
@@ -5275,7 +5838,7 @@
5275
5838
  };
5276
5839
  }
5277
5840
  });
5278
- const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-64d8f6aa"]]);
5841
+ const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-97f71e11"]]);
5279
5842
  const _hoisted_1$l = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
5280
5843
  const _hoisted_2$j = { class: "tao-date-range__value" };
5281
5844
  const _hoisted_3$f = {
@@ -5301,20 +5864,23 @@
5301
5864
  __name: "TaoDateRange",
5302
5865
  props: {
5303
5866
  modelValue: { default: null },
5304
- placeholder: { default: "Период" },
5867
+ placeholder: {},
5305
5868
  disabled: { type: Boolean, default: false },
5869
+ size: {},
5306
5870
  error: { type: Boolean, default: false },
5307
5871
  min: { default: void 0 },
5308
5872
  max: { default: void 0 },
5309
- locale: { default: "ru-RU" },
5310
- todayText: { default: "Сегодня" },
5311
- clearText: { default: "Очистить" },
5312
- prevMonthLabel: { default: "Предыдущий месяц" },
5313
- nextMonthLabel: { default: "Следующий месяц" }
5873
+ locale: {},
5874
+ todayText: {},
5875
+ clearText: {},
5876
+ prevMonthLabel: {},
5877
+ nextMonthLabel: {}
5314
5878
  },
5315
5879
  emits: ["update:modelValue", "change"],
5316
5880
  setup(__props, { emit: __emit }) {
5317
5881
  const props = __props;
5882
+ const l10n = useLocaleText(props, "dateRange");
5883
+ const dateLocale = vue.computed(() => props.locale ?? taoLocale().code);
5318
5884
  const emit = __emit;
5319
5885
  const field = vue.inject(formFieldKey, null);
5320
5886
  const localId = vue.useId();
@@ -5339,10 +5905,10 @@
5339
5905
  return committed.value;
5340
5906
  });
5341
5907
  const displayLabel = vue.computed(
5342
- () => committed.value ? formatTaoDateRangeLabel(committed.value.start, committed.value.end, props.locale) : ""
5908
+ () => committed.value ? formatTaoDateRangeLabel(committed.value.start, committed.value.end, dateLocale.value) : ""
5343
5909
  );
5344
- const weekdays = vue.computed(() => taoWeekdayLabels(props.locale));
5345
- const monthLabel = vue.computed(() => formatTaoMonthLabel(viewYear.value, viewMonth.value, props.locale));
5910
+ const weekdays = vue.computed(() => taoWeekdayLabels(dateLocale.value));
5911
+ const monthLabel = vue.computed(() => formatTaoMonthLabel(viewYear.value, viewMonth.value, dateLocale.value));
5346
5912
  const cells = vue.computed(() => buildTaoDateGrid(viewYear.value, viewMonth.value));
5347
5913
  const todayIso = vue.computed(() => todayTaoDate());
5348
5914
  const todayEnabled = vue.computed(() => isTaoDateInRange(todayIso.value, props.min, props.max));
@@ -5561,7 +6127,7 @@
5561
6127
  });
5562
6128
  return (_ctx, _cache) => {
5563
6129
  return vue.openBlock(), vue.createElementBlock("div", {
5564
- class: vue.normalizeClass(["tao-date-range", { "tao-date-range--open": open.value, "tao-date-range--invalid": invalid.value }])
6130
+ class: vue.normalizeClass(["tao-date-range", [vue.unref(sizeClass)(__props.size), { "tao-date-range--open": open.value, "tao-date-range--invalid": invalid.value }]])
5565
6131
  }, [
5566
6132
  vue.createElementVNode("button", {
5567
6133
  id: controlId.value,
@@ -5579,7 +6145,7 @@
5579
6145
  onClick: toggle,
5580
6146
  onKeydown: onTriggerKeydown
5581
6147
  }, [
5582
- vue.createElementVNode("span", _hoisted_2$j, vue.toDisplayString(displayLabel.value || __props.placeholder), 1),
6148
+ vue.createElementVNode("span", _hoisted_2$j, vue.toDisplayString(displayLabel.value || vue.unref(l10n).placeholder), 1),
5583
6149
  vue.createElementVNode("span", _hoisted_3$f, [
5584
6150
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
5585
6151
  _cache[3] || (_cache[3] = vue.createElementVNode("svg", {
@@ -5626,7 +6192,7 @@
5626
6192
  vue.createElementVNode("button", {
5627
6193
  type: "button",
5628
6194
  class: "tao-date__nav",
5629
- "aria-label": __props.prevMonthLabel,
6195
+ "aria-label": vue.unref(l10n).prevMonthLabel,
5630
6196
  onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
5631
6197
  }, [
5632
6198
  vue.createElementVNode("span", _hoisted_7$8, [
@@ -5653,7 +6219,7 @@
5653
6219
  vue.createElementVNode("button", {
5654
6220
  type: "button",
5655
6221
  class: "tao-date__nav",
5656
- "aria-label": __props.nextMonthLabel,
6222
+ "aria-label": vue.unref(l10n).nextMonthLabel,
5657
6223
  onClick: _cache[1] || (_cache[1] = ($event) => goMonth(1))
5658
6224
  }, [
5659
6225
  vue.createElementVNode("span", _hoisted_10$2, [
@@ -5703,7 +6269,7 @@
5703
6269
  "tao-date__day--disabled": !vue.unref(isTaoDateInRange)(cell.iso, __props.min, __props.max)
5704
6270
  }]),
5705
6271
  role: "gridcell",
5706
- "aria-label": vue.unref(formatTaoDateLabel)(cell.iso, __props.locale),
6272
+ "aria-label": vue.unref(formatTaoDateLabel)(cell.iso, dateLocale.value),
5707
6273
  "aria-selected": daySelected(cell.iso),
5708
6274
  disabled: !vue.unref(isTaoDateInRange)(cell.iso, __props.min, __props.max),
5709
6275
  onMousedown: _cache[2] || (_cache[2] = vue.withModifiers(() => {
@@ -5721,7 +6287,7 @@
5721
6287
  onClick: selectToday
5722
6288
  }, [
5723
6289
  vue.renderSlot(_ctx.$slots, "today", {}, () => [
5724
- vue.createTextVNode(vue.toDisplayString(__props.todayText), 1)
6290
+ vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).todayText), 1)
5725
6291
  ], true)
5726
6292
  ], 8, _hoisted_14),
5727
6293
  committed.value ? (vue.openBlock(), vue.createElementBlock("button", {
@@ -5731,7 +6297,7 @@
5731
6297
  onClick: clear
5732
6298
  }, [
5733
6299
  vue.renderSlot(_ctx.$slots, "clear", {}, () => [
5734
- vue.createTextVNode(vue.toDisplayString(__props.clearText), 1)
6300
+ vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).clearText), 1)
5735
6301
  ], true)
5736
6302
  ])) : vue.createCommentVNode("", true)
5737
6303
  ])
@@ -5741,7 +6307,7 @@
5741
6307
  };
5742
6308
  }
5743
6309
  });
5744
- const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-70505320"]]);
6310
+ const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-da3794c7"]]);
5745
6311
  const _hoisted_1$k = ["for"];
5746
6312
  const _hoisted_2$i = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
5747
6313
  const _hoisted_3$e = {
@@ -5758,7 +6324,9 @@
5758
6324
  props: {
5759
6325
  modelValue: { type: Boolean, default: false },
5760
6326
  label: { default: "" },
5761
- disabled: { type: Boolean, default: false }
6327
+ disabled: { type: Boolean, default: false },
6328
+ error: { type: Boolean, default: false },
6329
+ size: {}
5762
6330
  },
5763
6331
  emits: ["update:modelValue", "change"],
5764
6332
  setup(__props, { emit: __emit }) {
@@ -5767,7 +6335,7 @@
5767
6335
  const field = vue.inject(formFieldKey, null);
5768
6336
  const localId = vue.useId();
5769
6337
  const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
5770
- const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
6338
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
5771
6339
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
5772
6340
  function toggle() {
5773
6341
  if (props.disabled) {
@@ -5779,7 +6347,7 @@
5779
6347
  }
5780
6348
  return (_ctx, _cache) => {
5781
6349
  return vue.openBlock(), vue.createElementBlock("label", {
5782
- class: vue.normalizeClass(["tao-switch", { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue, "tao-switch--invalid": invalid.value }]),
6350
+ class: vue.normalizeClass(["tao-switch", [vue.unref(sizeClass)(__props.size), { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue, "tao-switch--invalid": invalid.value }]]),
5783
6351
  for: controlId.value
5784
6352
  }, [
5785
6353
  vue.createElementVNode("input", {
@@ -5807,7 +6375,7 @@
5807
6375
  };
5808
6376
  }
5809
6377
  });
5810
- const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-bdc4c5d2"]]);
6378
+ const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-28965b34"]]);
5811
6379
  const radioGroupKey = Symbol("taoRadioGroup");
5812
6380
  const _hoisted_1$j = ["for"];
5813
6381
  const _hoisted_2$h = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
@@ -5827,7 +6395,9 @@
5827
6395
  modelValue: { type: [String, Number, Boolean] },
5828
6396
  name: {},
5829
6397
  label: { default: "" },
5830
- disabled: { type: Boolean, default: false }
6398
+ disabled: { type: Boolean, default: false },
6399
+ error: { type: Boolean, default: false },
6400
+ size: {}
5831
6401
  },
5832
6402
  emits: ["update:modelValue", "change"],
5833
6403
  setup(__props, { emit: __emit }) {
@@ -5837,13 +6407,13 @@
5837
6407
  const field = vue.inject(formFieldKey, null);
5838
6408
  const localId = vue.useId();
5839
6409
  const controlId = vue.computed(() => group ? localId : (field == null ? void 0 : field.id) ?? localId);
5840
- const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
6410
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
5841
6411
  const describedBy = vue.computed(() => group ? void 0 : field == null ? void 0 : field.describedBy.value);
5842
6412
  const isDisabled = vue.computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
5843
6413
  const inputName = vue.computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
5844
6414
  const isChecked = vue.computed(() => {
5845
- const current = group ? group.model.value : props.modelValue;
5846
- return current === props.value;
6415
+ const current2 = group ? group.model.value : props.modelValue;
6416
+ return current2 === props.value;
5847
6417
  });
5848
6418
  function onChange() {
5849
6419
  if (isDisabled.value) {
@@ -5858,7 +6428,7 @@
5858
6428
  }
5859
6429
  return (_ctx, _cache) => {
5860
6430
  return vue.openBlock(), vue.createElementBlock("label", {
5861
- class: vue.normalizeClass(["tao-radio", { "tao-radio--disabled": isDisabled.value, "tao-radio--invalid": invalid.value && !vue.unref(group) }]),
6431
+ class: vue.normalizeClass(["tao-radio", [vue.unref(sizeClass)(__props.size), { "tao-radio--disabled": isDisabled.value, "tao-radio--invalid": invalid.value && !vue.unref(group) }]]),
5862
6432
  for: controlId.value
5863
6433
  }, [
5864
6434
  vue.createElementVNode("input", {
@@ -5884,7 +6454,7 @@
5884
6454
  };
5885
6455
  }
5886
6456
  });
5887
- const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-dfcb7fe1"]]);
6457
+ const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-70ac1c11"]]);
5888
6458
  const _hoisted_1$i = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
5889
6459
  const _hoisted_2$g = {
5890
6460
  key: 0,
@@ -5898,7 +6468,9 @@
5898
6468
  name: {},
5899
6469
  legend: {},
5900
6470
  disabled: { type: Boolean, default: false },
5901
- direction: { default: "row" }
6471
+ error: { type: Boolean, default: false },
6472
+ direction: { default: "row" },
6473
+ size: {}
5902
6474
  },
5903
6475
  emits: ["update:modelValue", "change"],
5904
6476
  setup(__props, { emit: __emit }) {
@@ -5909,7 +6481,7 @@
5909
6481
  const groupName = vue.computed(() => props.name || autoName);
5910
6482
  const model = vue.computed(() => props.modelValue);
5911
6483
  const groupDisabled = vue.computed(() => props.disabled);
5912
- const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
6484
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
5913
6485
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
5914
6486
  const labelledBy = vue.computed(() => props.legend || !field ? void 0 : `${field.id}-label`);
5915
6487
  function setValue(value) {
@@ -5926,7 +6498,7 @@
5926
6498
  var _a;
5927
6499
  return vue.openBlock(), vue.createElementBlock("fieldset", {
5928
6500
  id: (_a = vue.unref(field)) == null ? void 0 : _a.id,
5929
- class: vue.normalizeClass(["tao-radio-group", [`tao-radio-group--${__props.direction}`, { "tao-radio-group--invalid": invalid.value }]]),
6501
+ class: vue.normalizeClass(["tao-radio-group", [`tao-radio-group--${__props.direction}`, vue.unref(sizeClass)(__props.size), { "tao-radio-group--invalid": invalid.value }]]),
5930
6502
  disabled: __props.disabled,
5931
6503
  "aria-describedby": describedBy.value,
5932
6504
  "aria-invalid": invalid.value || void 0,
@@ -5938,7 +6510,7 @@
5938
6510
  };
5939
6511
  }
5940
6512
  });
5941
- const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-bbef1c07"]]);
6513
+ const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-c76ef504"]]);
5942
6514
  const segmentedKey = Symbol("taoSegmented");
5943
6515
  const _hoisted_1$h = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
5944
6516
  const _hoisted_2$f = {
@@ -5953,7 +6525,8 @@
5953
6525
  name: {},
5954
6526
  legend: {},
5955
6527
  disabled: { type: Boolean, default: false },
5956
- size: { default: "medium" },
6528
+ error: { type: Boolean, default: false },
6529
+ size: {},
5957
6530
  block: { type: Boolean, default: false }
5958
6531
  },
5959
6532
  emits: ["update:modelValue", "change"],
@@ -5965,8 +6538,7 @@
5965
6538
  const groupName = vue.computed(() => props.name || autoName);
5966
6539
  const model = vue.computed(() => props.modelValue);
5967
6540
  const groupDisabled = vue.computed(() => props.disabled);
5968
- const groupSize = vue.computed(() => props.size);
5969
- const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
6541
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
5970
6542
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
5971
6543
  const trackRef = vue.ref(null);
5972
6544
  const thumbStyle = vue.ref({ opacity: "0" });
@@ -6006,7 +6578,6 @@
6006
6578
  name: groupName,
6007
6579
  model,
6008
6580
  disabled: groupDisabled,
6009
- size: groupSize,
6010
6581
  setValue
6011
6582
  });
6012
6583
  vue.onMounted(() => {
@@ -6043,7 +6614,7 @@
6043
6614
  var _a;
6044
6615
  return vue.openBlock(), vue.createElementBlock("fieldset", {
6045
6616
  class: vue.normalizeClass(["tao-segmented", [
6046
- `tao-segmented--${__props.size}`,
6617
+ vue.unref(sizeClass)(__props.size),
6047
6618
  {
6048
6619
  "tao-segmented--block": __props.block,
6049
6620
  "tao-segmented--disabled": __props.disabled,
@@ -6073,7 +6644,7 @@
6073
6644
  };
6074
6645
  }
6075
6646
  });
6076
- const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-5b5c6d71"]]);
6647
+ const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-7dc6820f"]]);
6077
6648
  const _hoisted_1$g = ["for"];
6078
6649
  const _hoisted_2$e = ["id", "name", "value", "checked", "disabled", "aria-label"];
6079
6650
  const _hoisted_3$c = { class: "tao-segmented-option__face" };
@@ -6116,10 +6687,9 @@
6116
6687
  const localId = vue.useId();
6117
6688
  const isDisabled = vue.computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
6118
6689
  const inputName = vue.computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
6119
- const size = vue.computed(() => (group == null ? void 0 : group.size.value) ?? "medium");
6120
6690
  const isChecked = vue.computed(() => {
6121
- const current = group ? group.model.value : props.modelValue;
6122
- return current === props.value;
6691
+ const current2 = group ? group.model.value : props.modelValue;
6692
+ return current2 === props.value;
6123
6693
  });
6124
6694
  const hasLabel = vue.computed(() => Boolean(props.label || slots.default));
6125
6695
  const isIconOnly = vue.computed(() => Boolean((props.icon || slots.icon) && !hasLabel.value));
@@ -6148,14 +6718,11 @@
6148
6718
  }
6149
6719
  return (_ctx, _cache) => {
6150
6720
  return vue.openBlock(), vue.createElementBlock("label", {
6151
- class: vue.normalizeClass(["tao-segmented-option", [
6152
- `tao-segmented-option--${size.value}`,
6153
- {
6154
- "tao-segmented-option--checked": isChecked.value,
6155
- "tao-segmented-option--disabled": props.disabled,
6156
- "tao-segmented-option--icon-only": isIconOnly.value
6157
- }
6158
- ]]),
6721
+ class: vue.normalizeClass(["tao-segmented-option", {
6722
+ "tao-segmented-option--checked": isChecked.value,
6723
+ "tao-segmented-option--disabled": props.disabled,
6724
+ "tao-segmented-option--icon-only": isIconOnly.value
6725
+ }]),
6159
6726
  for: vue.unref(localId)
6160
6727
  }, [
6161
6728
  vue.createElementVNode("input", {
@@ -6186,7 +6753,7 @@
6186
6753
  };
6187
6754
  }
6188
6755
  });
6189
- const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-a47bc5c9"]]);
6756
+ const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-fba7ca12"]]);
6190
6757
  const _hoisted_1$f = ["role", "aria-live"];
6191
6758
  const _hoisted_2$d = { class: "tao-alert__body" };
6192
6759
  const _hoisted_3$b = {
@@ -6203,21 +6770,31 @@
6203
6770
  ...{ name: "TaoAlert" },
6204
6771
  __name: "TaoAlert",
6205
6772
  props: {
6206
- type: { default: "info" },
6773
+ tone: { default: void 0 },
6774
+ type: { default: void 0 },
6207
6775
  title: { default: "" },
6208
6776
  closable: { type: Boolean, default: false },
6209
- closeLabel: { default: "Закрыть" }
6777
+ closeLabel: {}
6210
6778
  },
6211
6779
  emits: ["close"],
6212
6780
  setup(__props, { emit: __emit }) {
6213
6781
  const props = __props;
6782
+ const l10n = useLocaleText(props, "alert");
6214
6783
  const emit = __emit;
6215
- const tone = vue.computed(() => props.type === "danger" ? "error" : props.type);
6216
- const live = vue.computed(() => tone.value === "error" || tone.value === "warning" ? "assertive" : "polite");
6784
+ const resolvedTone = vue.computed(() => {
6785
+ const value = props.tone ?? props.type ?? "info";
6786
+ return value === "danger" ? "error" : value;
6787
+ });
6788
+ const live = vue.computed(
6789
+ () => resolvedTone.value === "error" || resolvedTone.value === "warning" ? "assertive" : "polite"
6790
+ );
6791
+ warnDeprecated("TaoAlert", {
6792
+ type: "use `tone`"
6793
+ });
6217
6794
  return (_ctx, _cache) => {
6218
6795
  return vue.openBlock(), vue.createElementBlock("div", {
6219
- class: vue.normalizeClass(["tao-alert", `tao-alert--${tone.value}`]),
6220
- role: tone.value === "error" ? "alert" : "status",
6796
+ class: vue.normalizeClass(["tao-alert", `tao-alert--${resolvedTone.value}`]),
6797
+ role: resolvedTone.value === "error" ? "alert" : "status",
6221
6798
  "aria-live": live.value
6222
6799
  }, [
6223
6800
  vue.createElementVNode("div", _hoisted_2$d, [
@@ -6230,7 +6807,7 @@
6230
6807
  key: 0,
6231
6808
  type: "button",
6232
6809
  class: "tao-alert__close",
6233
- "aria-label": __props.closeLabel,
6810
+ "aria-label": vue.unref(l10n).closeLabel,
6234
6811
  onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
6235
6812
  }, [
6236
6813
  vue.createElementVNode("span", _hoisted_6$8, [
@@ -6243,7 +6820,7 @@
6243
6820
  };
6244
6821
  }
6245
6822
  });
6246
- const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-1f1cb671"]]);
6823
+ const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-94376652"]]);
6247
6824
  const _hoisted_1$e = { key: 0 };
6248
6825
  const _hoisted_2$c = ["aria-sort"];
6249
6826
  const _hoisted_3$a = ["onClick"];
@@ -6264,8 +6841,9 @@
6264
6841
  rows: { default: () => [] },
6265
6842
  rowKey: { type: [String, Function], default: "id" },
6266
6843
  loading: { type: Boolean, default: false },
6267
- emptyText: { default: "Нет данных" },
6844
+ emptyText: {},
6268
6845
  striped: { type: [Boolean, String], default: false },
6846
+ size: {},
6269
6847
  compact: { type: Boolean, default: false },
6270
6848
  hover: { type: Boolean, default: true },
6271
6849
  head: { type: Boolean, default: true },
@@ -6276,9 +6854,10 @@
6276
6854
  sort: { default: null },
6277
6855
  caption: { default: "" }
6278
6856
  },
6279
- emits: ["update:sort", "sort", "row-click"],
6857
+ emits: ["update:sort", "change", "sort", "row-click"],
6280
6858
  setup(__props, { emit: __emit }) {
6281
6859
  const props = __props;
6860
+ const l10n = useLocaleText(props, "table");
6282
6861
  const emit = __emit;
6283
6862
  const colCount = vue.computed(() => Math.max(props.columns.length, 1));
6284
6863
  const isEmpty = vue.computed(() => !props.rows.length && !props.loading);
@@ -6320,9 +6899,10 @@
6320
6899
  if (!column.sortable) {
6321
6900
  return;
6322
6901
  }
6323
- const current = sortDir(column);
6324
- const next = current == null ? { key: column.key, dir: "asc" } : current === "asc" ? { key: column.key, dir: "desc" } : null;
6902
+ const current2 = sortDir(column);
6903
+ const next = current2 == null ? { key: column.key, dir: "asc" } : current2 === "asc" ? { key: column.key, dir: "desc" } : null;
6325
6904
  emit("update:sort", next);
6905
+ emit("change", next);
6326
6906
  emit("sort", next);
6327
6907
  }
6328
6908
  function onRowClick(row, index) {
@@ -6331,19 +6911,25 @@
6331
6911
  }
6332
6912
  emit("row-click", row, index);
6333
6913
  }
6914
+ warnDeprecated("TaoTable", {
6915
+ compact: 'use size="small"',
6916
+ onSort: 'listen to "change" (or v-model:sort)'
6917
+ });
6334
6918
  return (_ctx, _cache) => {
6335
6919
  return vue.openBlock(), vue.createElementBlock("div", {
6336
- class: vue.normalizeClass(["tao-table-wrap", {
6337
- "tao-table-wrap--sticky": __props.sticky,
6338
- "tao-table-wrap--loading": __props.loading
6339
- }]),
6340
- style: vue.normalizeStyle(__props.maxHeight ? { maxHeight: __props.maxHeight } : void 0)
6920
+ class: vue.normalizeClass(["tao-table-wrap", [
6921
+ vue.unref(sizeClass)(__props.size ?? (__props.compact ? "small" : void 0)),
6922
+ {
6923
+ "tao-table-wrap--sticky": __props.sticky,
6924
+ "tao-table-wrap--loading": __props.loading
6925
+ }
6926
+ ]]),
6927
+ style: vue.normalizeStyle(__props.maxHeight ? { maxHeight: vue.unref(toCssLength)(__props.maxHeight) } : void 0)
6341
6928
  }, [
6342
6929
  vue.createElementVNode("table", {
6343
6930
  class: vue.normalizeClass(["tao-table", {
6344
6931
  "tao-table--striped": stripeFrom.value === "odd",
6345
6932
  "tao-table--striped-even": stripeFrom.value === "even",
6346
- "tao-table--compact": __props.compact,
6347
6933
  "tao-table--hover": __props.hover,
6348
6934
  "tao-table--head": __props.head,
6349
6935
  "tao-table--lines": __props.lines,
@@ -6387,7 +6973,7 @@
6387
6973
  colspan: colCount.value
6388
6974
  }, [
6389
6975
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
6390
- vue.createTextVNode(vue.toDisplayString(__props.emptyText), 1)
6976
+ vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).emptyText), 1)
6391
6977
  ], true)
6392
6978
  ], 8, _hoisted_6$7)
6393
6979
  ])) : vue.createCommentVNode("", true),
@@ -6431,7 +7017,7 @@
6431
7017
  };
6432
7018
  }
6433
7019
  });
6434
- const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-6e3c280a"]]);
7020
+ const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-3b34cb39"]]);
6435
7021
  function buildPaginationItems(page, pageCount, siblingCount = 1) {
6436
7022
  if (pageCount <= 0) {
6437
7023
  return [];
@@ -6439,10 +7025,10 @@
6439
7025
  if (pageCount <= 7) {
6440
7026
  return Array.from({ length: pageCount }, (_, index) => ({ type: "page", page: index + 1 }));
6441
7027
  }
6442
- const current = Math.min(Math.max(page, 1), pageCount);
7028
+ const current2 = Math.min(Math.max(page, 1), pageCount);
6443
7029
  const siblings = Math.max(0, siblingCount);
6444
- const left = Math.max(2, current - siblings);
6445
- const right = Math.min(pageCount - 1, current + siblings);
7030
+ const left = Math.max(2, current2 - siblings);
7031
+ const right = Math.min(pageCount - 1, current2 + siblings);
6446
7032
  const items = [{ type: "page", page: 1 }];
6447
7033
  if (left > 2) {
6448
7034
  items.push({ type: "ellipsis", id: "left" });
@@ -6483,24 +7069,25 @@
6483
7069
  siblingCount: { default: 1 },
6484
7070
  disabled: { type: Boolean, default: false },
6485
7071
  showTotal: { type: Boolean, default: true },
6486
- size: { default: "medium" },
7072
+ size: {},
6487
7073
  jump: { default: 5 },
6488
- ariaLabel: { default: "Пагинация" },
6489
- prevLabel: { default: "Назад" },
6490
- nextLabel: { default: "Вперёд" },
6491
- pageLabel: { default: "Страница {page}" },
6492
- jumpPrevLabel: { default: "Назад на {n} страниц" },
6493
- jumpNextLabel: { default: "Вперёд на {n} страниц" }
7074
+ ariaLabel: {},
7075
+ prevLabel: {},
7076
+ nextLabel: {},
7077
+ pageLabel: {},
7078
+ jumpPrevLabel: {},
7079
+ jumpNextLabel: {}
6494
7080
  },
6495
7081
  emits: ["update:page", "change"],
6496
7082
  setup(__props, { emit: __emit }) {
6497
7083
  const props = __props;
7084
+ const l10n = useLocaleText(props, "pagination");
6498
7085
  const emit = __emit;
6499
7086
  const pageCount = vue.computed(() => Math.max(1, Math.ceil(Math.max(props.total, 0) / Math.max(props.pageSize, 1))));
6500
- const current = vue.computed(() => Math.min(Math.max(props.page, 1), pageCount.value));
6501
- const items = vue.computed(() => buildPaginationItems(current.value, pageCount.value, props.siblingCount));
6502
- const from = vue.computed(() => props.total === 0 ? 0 : (current.value - 1) * props.pageSize + 1);
6503
- const to = vue.computed(() => Math.min(current.value * props.pageSize, props.total));
7087
+ const current2 = vue.computed(() => Math.min(Math.max(props.page, 1), pageCount.value));
7088
+ const items = vue.computed(() => buildPaginationItems(current2.value, pageCount.value, props.siblingCount));
7089
+ const from = vue.computed(() => props.total === 0 ? 0 : (current2.value - 1) * props.pageSize + 1);
7090
+ const to = vue.computed(() => Math.min(current2.value * props.pageSize, props.total));
6504
7091
  vue.watch(
6505
7092
  () => [props.page, pageCount.value],
6506
7093
  ([page, count]) => {
@@ -6523,8 +7110,8 @@
6523
7110
  }
6524
7111
  return (_ctx, _cache) => {
6525
7112
  return vue.openBlock(), vue.createElementBlock("nav", {
6526
- class: vue.normalizeClass(["tao-pagination", `tao-pagination--${__props.size}`]),
6527
- "aria-label": __props.ariaLabel
7113
+ class: vue.normalizeClass(["tao-pagination", vue.unref(sizeClass)(__props.size)]),
7114
+ "aria-label": vue.unref(l10n).ariaLabel
6528
7115
  }, [
6529
7116
  __props.showTotal ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2$b, [
6530
7117
  vue.renderSlot(_ctx.$slots, "total", {
@@ -6533,9 +7120,9 @@
6533
7120
  total: __props.total
6534
7121
  }, () => [
6535
7122
  __props.total === 0 ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
6536
- vue.createTextVNode("0 из 0")
7123
+ vue.createTextVNode(vue.toDisplayString(vue.unref(taoLocale)().pagination.emptyTotalText), 1)
6537
7124
  ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
6538
- vue.createTextVNode(vue.toDisplayString(from.value) + "–" + vue.toDisplayString(to.value) + " из " + vue.toDisplayString(__props.total), 1)
7125
+ vue.createTextVNode(vue.toDisplayString(vue.unref(formatText)(vue.unref(taoLocale)().pagination.totalText, { from: from.value, to: to.value, total: __props.total })), 1)
6539
7126
  ], 64))
6540
7127
  ], true)
6541
7128
  ])) : vue.createCommentVNode("", true),
@@ -6543,9 +7130,9 @@
6543
7130
  vue.createElementVNode("button", {
6544
7131
  type: "button",
6545
7132
  class: "tao-pagination__btn",
6546
- "aria-label": __props.prevLabel,
6547
- disabled: __props.disabled || current.value <= 1,
6548
- onClick: _cache[0] || (_cache[0] = ($event) => goTo(current.value - 1))
7133
+ "aria-label": vue.unref(l10n).prevLabel,
7134
+ disabled: __props.disabled || current2.value <= 1,
7135
+ onClick: _cache[0] || (_cache[0] = ($event) => goTo(current2.value - 1))
6549
7136
  }, [
6550
7137
  vue.createElementVNode("span", _hoisted_5$9, [
6551
7138
  vue.renderSlot(_ctx.$slots, "prev-icon", {}, () => [
@@ -6561,15 +7148,15 @@
6561
7148
  key: 0,
6562
7149
  type: "button",
6563
7150
  class: "tao-pagination__btn tao-pagination__btn--jump",
6564
- "aria-label": item.id === "left" ? __props.jumpPrevLabel.replace("{n}", String(__props.jump)) : __props.jumpNextLabel.replace("{n}", String(__props.jump)),
7151
+ "aria-label": item.id === "left" ? vue.unref(l10n).jumpPrevLabel.replace("{n}", String(__props.jump)) : vue.unref(l10n).jumpNextLabel.replace("{n}", String(__props.jump)),
6565
7152
  disabled: __props.disabled,
6566
- onClick: ($event) => goTo(item.id === "left" ? current.value - __props.jump : current.value + __props.jump)
7153
+ onClick: ($event) => goTo(item.id === "left" ? current2.value - __props.jump : current2.value + __props.jump)
6567
7154
  }, " … ", 8, _hoisted_6$6)) : item.type === "ellipsis" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$5, "…")) : (vue.openBlock(), vue.createElementBlock("button", {
6568
7155
  key: 2,
6569
7156
  type: "button",
6570
- class: vue.normalizeClass(["tao-pagination__btn", { "tao-pagination__btn--current": item.page === current.value }]),
6571
- "aria-current": item.page === current.value ? "page" : void 0,
6572
- "aria-label": __props.pageLabel.replace("{page}", String(item.page)),
7157
+ class: vue.normalizeClass(["tao-pagination__btn", { "tao-pagination__btn--current": item.page === current2.value }]),
7158
+ "aria-current": item.page === current2.value ? "page" : void 0,
7159
+ "aria-label": vue.unref(l10n).pageLabel.replace("{page}", String(item.page)),
6573
7160
  disabled: __props.disabled,
6574
7161
  onClick: ($event) => goTo(item.page)
6575
7162
  }, vue.toDisplayString(item.page), 11, _hoisted_8$5))
@@ -6578,9 +7165,9 @@
6578
7165
  vue.createElementVNode("button", {
6579
7166
  type: "button",
6580
7167
  class: "tao-pagination__btn",
6581
- "aria-label": __props.nextLabel,
6582
- disabled: __props.disabled || current.value >= pageCount.value,
6583
- onClick: _cache[1] || (_cache[1] = ($event) => goTo(current.value + 1))
7168
+ "aria-label": vue.unref(l10n).nextLabel,
7169
+ disabled: __props.disabled || current2.value >= pageCount.value,
7170
+ onClick: _cache[1] || (_cache[1] = ($event) => goTo(current2.value + 1))
6584
7171
  }, [
6585
7172
  vue.createElementVNode("span", _hoisted_10$1, [
6586
7173
  vue.renderSlot(_ctx.$slots, "next-icon", {}, () => [
@@ -6593,7 +7180,7 @@
6593
7180
  };
6594
7181
  }
6595
7182
  });
6596
- const TaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-e4d7b7c4"]]);
7183
+ const TaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-7e381e8c"]]);
6597
7184
  const _hoisted_1$c = { class: "tao-empty" };
6598
7185
  const _hoisted_2$a = {
6599
7186
  key: 0,
@@ -6615,15 +7202,17 @@
6615
7202
  ...{ name: "TaoEmpty" },
6616
7203
  __name: "TaoEmpty",
6617
7204
  props: {
6618
- title: { default: "Ничего нет" }
7205
+ title: {}
6619
7206
  },
6620
7207
  setup(__props) {
7208
+ const props = __props;
7209
+ const l10n = useLocaleText(props, "empty");
6621
7210
  return (_ctx, _cache) => {
6622
7211
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
6623
7212
  _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$a, [
6624
7213
  vue.renderSlot(_ctx.$slots, "icon", {}, void 0, true)
6625
7214
  ])) : vue.createCommentVNode("", true),
6626
- __props.title ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$8, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
7215
+ vue.unref(l10n).title ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$8, vue.toDisplayString(vue.unref(l10n).title), 1)) : vue.createCommentVNode("", true),
6627
7216
  _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4$8, [
6628
7217
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
6629
7218
  ])) : vue.createCommentVNode("", true),
@@ -6634,8 +7223,7 @@
6634
7223
  };
6635
7224
  }
6636
7225
  });
6637
- const TaoEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-5dc90ee9"]]);
6638
- const taoListKey = Symbol("taoList");
7226
+ const TaoEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-7d3efeaf"]]);
6639
7227
  const _hoisted_1$b = ["aria-label"];
6640
7228
  const _hoisted_2$9 = {
6641
7229
  key: 0,
@@ -6645,7 +7233,7 @@
6645
7233
  ...{ name: "TaoList" },
6646
7234
  __name: "TaoList",
6647
7235
  props: {
6648
- size: { default: "medium" },
7236
+ size: {},
6649
7237
  bordered: { type: Boolean, default: true },
6650
7238
  divided: { type: Boolean, default: true },
6651
7239
  maxHeight: {},
@@ -6654,19 +7242,14 @@
6654
7242
  },
6655
7243
  setup(__props) {
6656
7244
  const props = __props;
6657
- const size = vue.computed(() => props.size);
6658
- vue.provide(taoListKey, { size });
6659
7245
  const listStyle = vue.computed(() => {
6660
- if (props.maxHeight === void 0 || props.maxHeight === "") {
6661
- return void 0;
6662
- }
6663
- const value = typeof props.maxHeight === "number" ? `${props.maxHeight}px` : props.maxHeight;
6664
- return { maxHeight: value };
7246
+ const value = toCssLength(props.maxHeight);
7247
+ return value ? { maxHeight: value } : void 0;
6665
7248
  });
6666
7249
  return (_ctx, _cache) => {
6667
7250
  return vue.openBlock(), vue.createElementBlock("ul", {
6668
7251
  class: vue.normalizeClass(["tao-list", [
6669
- `tao-list--${size.value}`,
7252
+ vue.unref(sizeClass)(__props.size),
6670
7253
  {
6671
7254
  "tao-list--bordered": __props.bordered,
6672
7255
  "tao-list--divided": __props.divided,
@@ -6680,14 +7263,14 @@
6680
7263
  }, [
6681
7264
  __props.empty ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$9, [
6682
7265
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
6683
- _cache[0] || (_cache[0] = vue.createTextVNode("Ничего нет", -1))
7266
+ vue.createTextVNode(vue.toDisplayString(vue.unref(taoLocale)().list.emptyText), 1)
6684
7267
  ], true)
6685
7268
  ])) : vue.renderSlot(_ctx.$slots, "default", {}, void 0, true, 1)
6686
7269
  ], 14, _hoisted_1$b);
6687
7270
  };
6688
7271
  }
6689
7272
  });
6690
- const TaoList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-4117224e"]]);
7273
+ const TaoList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-183f5d21"]]);
6691
7274
  const _hoisted_1$a = ["aria-current", "aria-disabled"];
6692
7275
  const _hoisted_2$8 = {
6693
7276
  key: 0,
@@ -6721,17 +7304,6 @@
6721
7304
  const props = __props;
6722
7305
  const emit = __emit;
6723
7306
  const slots = vue.useSlots();
6724
- const list = vue.inject(taoListKey, null);
6725
- const sizeClass = vue.computed(() => {
6726
- const size = props.size ?? (list == null ? void 0 : list.size.value) ?? "medium";
6727
- if (size === "small") {
6728
- return "s";
6729
- }
6730
- if (size === "large") {
6731
- return "l";
6732
- }
6733
- return "m";
6734
- });
6735
7307
  const hasAction = vue.computed(() => Boolean(slots.action));
6736
7308
  const hasPrefix = vue.computed(() => Boolean(slots.prefix));
6737
7309
  const hasSuffix = vue.computed(() => Boolean(slots.suffix));
@@ -6745,7 +7317,7 @@
6745
7317
  return (_ctx, _cache) => {
6746
7318
  return vue.openBlock(), vue.createElementBlock("li", {
6747
7319
  class: vue.normalizeClass(["tao-list-item", [
6748
- `tao-list-item--${sizeClass.value}`,
7320
+ vue.unref(sizeClass)(__props.size),
6749
7321
  {
6750
7322
  "tao-list-item--selected": __props.selected,
6751
7323
  "tao-list-item--disabled": __props.disabled,
@@ -6801,7 +7373,7 @@
6801
7373
  };
6802
7374
  }
6803
7375
  });
6804
- const TaoListItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-359fce03"]]);
7376
+ const TaoListItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-215a8394"]]);
6805
7377
  const _hoisted_1$9 = {
6806
7378
  class: "tao-skeleton-group",
6807
7379
  "aria-hidden": true
@@ -6854,11 +7426,12 @@
6854
7426
  title: { default: "" },
6855
7427
  side: { default: "right" },
6856
7428
  closable: { type: Boolean, default: true },
6857
- closeLabel: { default: "Закрыть" }
7429
+ closeLabel: {}
6858
7430
  },
6859
7431
  emits: ["update:modelValue", "close"],
6860
7432
  setup(__props, { emit: __emit }) {
6861
7433
  const props = __props;
7434
+ const l10n = useLocaleText(props, "drawer");
6862
7435
  const emit = __emit;
6863
7436
  const panelRef = vue.ref(null);
6864
7437
  const titleId = vue.useId();
@@ -6967,7 +7540,7 @@
6967
7540
  key: 2,
6968
7541
  type: "button",
6969
7542
  class: "tao-drawer__close",
6970
- "aria-label": __props.closeLabel,
7543
+ "aria-label": vue.unref(l10n).closeLabel,
6971
7544
  onClick: close
6972
7545
  }, [
6973
7546
  vue.createElementVNode("span", _hoisted_6$4, [
@@ -6992,7 +7565,7 @@
6992
7565
  };
6993
7566
  }
6994
7567
  });
6995
- const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-bfd8c34f"]]);
7568
+ const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-886b5507"]]);
6996
7569
  const _hoisted_1$7 = ["title"];
6997
7570
  const _hoisted_2$6 = { class: "tao-avatar__face" };
6998
7571
  const _hoisted_3$5 = ["src", "alt"];
@@ -7012,13 +7585,14 @@
7012
7585
  size: { default: "medium" },
7013
7586
  dot: { type: [Boolean, String], default: false },
7014
7587
  count: { default: void 0 },
7015
- fallbackLabel: { default: "Аватар" },
7016
- notificationsLabel: { default: "{count} уведомлений" },
7588
+ fallbackLabel: {},
7589
+ notificationsLabel: {},
7017
7590
  dotLabels: { default: () => ({}) }
7018
7591
  },
7019
7592
  setup(__props) {
7020
7593
  const props = __props;
7021
- const sizeClass = vue.computed(() => {
7594
+ const l10n = useLocaleText(props, "avatar");
7595
+ const sizeClass2 = vue.computed(() => {
7022
7596
  if (props.size === "small" || props.size === "s") {
7023
7597
  return "s";
7024
7598
  }
@@ -7059,21 +7633,14 @@
7059
7633
  }
7060
7634
  return String(props.count);
7061
7635
  });
7062
- const defaultDotLabel = {
7063
- success: "в сети",
7064
- danger: "занят",
7065
- warning: "отошёл",
7066
- info: "статус",
7067
- neutral: "не в сети"
7068
- };
7069
7636
  const label = vue.computed(() => {
7070
- const base = props.alt || props.name || props.fallbackLabel;
7637
+ const base = props.alt || props.name || l10n.value.fallbackLabel;
7071
7638
  const extra = [];
7072
7639
  if (dotTone.value) {
7073
- extra.push(props.dotLabels[dotTone.value] ?? defaultDotLabel[dotTone.value]);
7640
+ extra.push(props.dotLabels[dotTone.value] ?? taoLocale().avatar.dotLabels[dotTone.value]);
7074
7641
  }
7075
7642
  if (badge.value) {
7076
- extra.push(props.notificationsLabel.replace("{count}", badge.value));
7643
+ extra.push(l10n.value.notificationsLabel.replace("{count}", badge.value));
7077
7644
  }
7078
7645
  return extra.length ? `${base}, ${extra.join(", ")}` : base;
7079
7646
  });
@@ -7088,9 +7655,12 @@
7088
7655
  function onImgError() {
7089
7656
  imgFailed.value = true;
7090
7657
  }
7658
+ if (props.size === "s" || props.size === "m" || props.size === "l") {
7659
+ deprecationWarning("TaoAvatar", `size "${props.size}"`, "use small / medium / large");
7660
+ }
7091
7661
  return (_ctx, _cache) => {
7092
7662
  return vue.openBlock(), vue.createElementBlock("span", {
7093
- class: vue.normalizeClass(["tao-avatar", `tao-avatar--${sizeClass.value}`]),
7663
+ class: vue.normalizeClass(["tao-avatar", `tao-avatar--${sizeClass2.value}`]),
7094
7664
  title: label.value
7095
7665
  }, [
7096
7666
  vue.createElementVNode("span", _hoisted_2$6, [
@@ -7116,7 +7686,7 @@
7116
7686
  };
7117
7687
  }
7118
7688
  });
7119
- const TaoAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-186c4676"]]);
7689
+ const TaoAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-2257342d"]]);
7120
7690
  const _hoisted_1$6 = ["aria-label"];
7121
7691
  const _hoisted_2$5 = { class: "tao-breadcrumb__list" };
7122
7692
  const _hoisted_3$4 = {
@@ -7138,13 +7708,15 @@
7138
7708
  __name: "TaoBreadcrumb",
7139
7709
  props: {
7140
7710
  items: {},
7141
- ariaLabel: { default: "Хлебные крошки" }
7711
+ ariaLabel: {}
7142
7712
  },
7143
7713
  setup(__props) {
7714
+ const props = __props;
7715
+ const l10n = useLocaleText(props, "breadcrumb");
7144
7716
  return (_ctx, _cache) => {
7145
7717
  return vue.openBlock(), vue.createElementBlock("nav", {
7146
7718
  class: "tao-breadcrumb",
7147
- "aria-label": __props.ariaLabel
7719
+ "aria-label": vue.unref(l10n).ariaLabel
7148
7720
  }, [
7149
7721
  vue.createElementVNode("ol", _hoisted_2$5, [
7150
7722
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.items, (item, index) => {
@@ -7170,7 +7742,7 @@
7170
7742
  };
7171
7743
  }
7172
7744
  });
7173
- const TaoBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-e63d972c"]]);
7745
+ const TaoBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-b853fbd5"]]);
7174
7746
  const _hoisted_1$5 = ["aria-label"];
7175
7747
  const _hoisted_2$4 = {
7176
7748
  class: "tao-counter__row",
@@ -7253,6 +7825,24 @@
7253
7825
  }
7254
7826
  });
7255
7827
  const TaoCounter = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-9e11d2be"]]);
7828
+ const GLIDE_TIME = 325;
7829
+ const FLICK_SPEED = 0.3;
7830
+ function glideTarget(from, velocity, pitch, max) {
7831
+ if (pitch <= 0) {
7832
+ return from;
7833
+ }
7834
+ let slide = Math.round((from + velocity * GLIDE_TIME) / pitch);
7835
+ if (velocity > FLICK_SPEED) {
7836
+ slide = Math.max(slide, Math.floor(from / pitch) + 1);
7837
+ } else if (velocity < -FLICK_SPEED) {
7838
+ slide = Math.min(slide, Math.ceil(from / pitch) - 1);
7839
+ }
7840
+ return Math.min(Math.max(slide * pitch, 0), Math.max(max, 0));
7841
+ }
7842
+ function glideDuration(distance, velocity) {
7843
+ const sameDirection = Math.abs(velocity) > 0.05 && Math.sign(velocity) === Math.sign(distance);
7844
+ return sameDirection ? Math.min(Math.max(3 * Math.abs(distance) / Math.abs(velocity), 220), 900) : Math.min(200 + Math.abs(distance) * 1.2, 450);
7845
+ }
7256
7846
  const _hoisted_1$4 = { class: "tao-carousel__row" };
7257
7847
  const _hoisted_2$3 = ["aria-label", "disabled"];
7258
7848
  const _hoisted_3$3 = { "aria-hidden": "true" };
@@ -7272,20 +7862,22 @@
7272
7862
  autoplay: { default: 0 },
7273
7863
  loop: { type: Boolean, default: false },
7274
7864
  dots: { type: Boolean, default: false },
7275
- ariaLabel: { default: "Лента" },
7276
- prevLabel: { default: "Назад" },
7277
- nextLabel: { default: "Вперёд" },
7278
- dotsLabel: { default: "Слайды" },
7279
- slideLabel: { default: "Слайд {n} из {count}" }
7865
+ ariaLabel: {},
7866
+ prevLabel: {},
7867
+ nextLabel: {},
7868
+ dotsLabel: {},
7869
+ slideLabel: {}
7280
7870
  },
7281
7871
  emits: ["update:modelValue", "change"],
7282
7872
  setup(__props, { emit: __emit }) {
7283
7873
  const props = __props;
7874
+ const l10n = useLocaleText(props, "carousel");
7284
7875
  const emit = __emit;
7285
7876
  const track = vue.ref(null);
7286
7877
  const index = vue.ref(props.modelValue);
7287
7878
  const count = vue.ref(0);
7288
7879
  const dragging = vue.ref(false);
7880
+ const gliding = vue.ref(false);
7289
7881
  const hoverPaused = vue.ref(false);
7290
7882
  const focusPaused = vue.ref(false);
7291
7883
  let dragStartX = 0;
@@ -7293,6 +7885,9 @@
7293
7885
  let dragMoved = 0;
7294
7886
  let dragPointer = -1;
7295
7887
  let scrollFrame = 0;
7888
+ let glideFrame = 0;
7889
+ let settleTimer = 0;
7890
+ let samples = [];
7296
7891
  let focusFrame = 0;
7297
7892
  let autoplayTimer = 0;
7298
7893
  const step = vue.computed(() => Math.max(1, Math.round(props.perView)));
@@ -7325,7 +7920,7 @@
7325
7920
  if (width <= 0 || total <= 0) {
7326
7921
  return 0;
7327
7922
  }
7328
- const left = ((_a = track.value) == null ? void 0 : _a.scrollLeft) ?? 0;
7923
+ const left = scrollLeft ?? ((_a = track.value) == null ? void 0 : _a.scrollLeft) ?? 0;
7329
7924
  const last = Math.max(total - step.value, 0);
7330
7925
  return Math.min(Math.max(Math.round(left / (width + gap)), 0), last);
7331
7926
  }
@@ -7348,6 +7943,7 @@
7348
7943
  goTo(index.value + step.value);
7349
7944
  }
7350
7945
  function goTo(next, instant = false) {
7946
+ cancelGlide();
7351
7947
  const el = track.value;
7352
7948
  const { width, gap, total } = metrics();
7353
7949
  if (!el || width <= 0 || total <= 0) {
@@ -7378,7 +7974,7 @@
7378
7974
  autoplayTimer = 0;
7379
7975
  }
7380
7976
  function canAutoplay() {
7381
- return props.autoplay > 0 && count.value > step.value && !hoverPaused.value && !focusPaused.value && !dragging.value && typeof document !== "undefined" && !document.hidden && !prefersReducedMotion() && (props.loop || index.value < lastIndex.value);
7977
+ return props.autoplay > 0 && count.value > step.value && !hoverPaused.value && !focusPaused.value && !dragging.value && !gliding.value && typeof document !== "undefined" && !document.hidden && !prefersReducedMotion() && (props.loop || index.value < lastIndex.value);
7382
7978
  }
7383
7979
  function tickAutoplay() {
7384
7980
  if (!canAutoplay()) {
@@ -7430,20 +8026,103 @@
7430
8026
  });
7431
8027
  }
7432
8028
  function onScroll() {
7433
- if (dragging.value) {
8029
+ if (dragging.value || gliding.value) {
7434
8030
  return;
7435
8031
  }
7436
8032
  cancelAnimationFrame(scrollFrame);
7437
- scrollFrame = requestAnimationFrame(() => {
7438
- const next = nearestIndex();
7439
- const { width, gap } = metrics();
7440
- const el = track.value;
7441
- if (el && width > 0 && el.scrollLeft - next * (width + gap) > (width + gap) / 2) {
7442
- goTo(next, true);
8033
+ scrollFrame = requestAnimationFrame(() => setIndex(nearestIndex()));
8034
+ if (!supportsScrollEnd()) {
8035
+ window.clearTimeout(settleTimer);
8036
+ settleTimer = window.setTimeout(settle, 150);
8037
+ }
8038
+ }
8039
+ function supportsScrollEnd() {
8040
+ return typeof window !== "undefined" && "onscrollend" in window;
8041
+ }
8042
+ function settle() {
8043
+ window.clearTimeout(settleTimer);
8044
+ const el = track.value;
8045
+ if (!el || dragging.value || gliding.value || getComputedStyle(el).scrollSnapType !== "none") {
8046
+ return;
8047
+ }
8048
+ const max = el.scrollWidth - el.clientWidth;
8049
+ if (el.scrollLeft >= max - 1) {
8050
+ return;
8051
+ }
8052
+ const target = glideTarget$1(el.scrollLeft, 0);
8053
+ if (Math.abs(target - el.scrollLeft) >= 1) {
8054
+ glideTo(target, 0);
8055
+ }
8056
+ }
8057
+ function onUserScrollInput() {
8058
+ if (!dragging.value) {
8059
+ cancelGlide();
8060
+ }
8061
+ }
8062
+ function recordSample(x) {
8063
+ const t = performance.now();
8064
+ samples.push({ x, t });
8065
+ while (samples.length > 2 && t - samples[0].t > 100) {
8066
+ samples.shift();
8067
+ }
8068
+ }
8069
+ function releaseVelocity() {
8070
+ const first = samples[0];
8071
+ const last = samples[samples.length - 1];
8072
+ if (!first || !last || last.t === first.t || performance.now() - last.t > 80) {
8073
+ return 0;
8074
+ }
8075
+ return -(last.x - first.x) / (last.t - first.t);
8076
+ }
8077
+ function cancelGlide() {
8078
+ if (!glideFrame) {
8079
+ return;
8080
+ }
8081
+ cancelAnimationFrame(glideFrame);
8082
+ glideFrame = 0;
8083
+ gliding.value = false;
8084
+ }
8085
+ function glideTarget$1(from, velocity) {
8086
+ const el = track.value;
8087
+ const { width, gap } = metrics();
8088
+ if (!el || width <= 0) {
8089
+ return from;
8090
+ }
8091
+ return glideTarget(from, velocity, width + gap, el.scrollWidth - el.clientWidth);
8092
+ }
8093
+ function finishGlide() {
8094
+ glideFrame = 0;
8095
+ gliding.value = false;
8096
+ setIndex(nearestIndex());
8097
+ syncAutoplay();
8098
+ }
8099
+ function glideTo(target, velocity) {
8100
+ const el = track.value;
8101
+ if (!el) {
8102
+ return;
8103
+ }
8104
+ cancelGlide();
8105
+ const from = el.scrollLeft;
8106
+ const distance = target - from;
8107
+ setIndex(nearestIndex(target));
8108
+ if (Math.abs(distance) < 1 || prefersReducedMotion()) {
8109
+ el.scrollLeft = target;
8110
+ syncAutoplay();
8111
+ return;
8112
+ }
8113
+ const duration = glideDuration(distance, velocity);
8114
+ const start = performance.now();
8115
+ gliding.value = true;
8116
+ const frame = (now) => {
8117
+ const t = Math.min((now - start) / duration, 1);
8118
+ el.scrollLeft = from + distance * (1 - (1 - t) ** 3);
8119
+ if (t < 1) {
8120
+ glideFrame = requestAnimationFrame(frame);
7443
8121
  return;
7444
8122
  }
7445
- setIndex(next);
7446
- });
8123
+ finishGlide();
8124
+ };
8125
+ glideFrame = requestAnimationFrame(frame);
7447
8126
  }
7448
8127
  function releaseDragCapture() {
7449
8128
  const el = track.value;
@@ -7469,8 +8148,12 @@
7469
8148
  if (!keepClickGuard) {
7470
8149
  dragMoved = 0;
7471
8150
  }
7472
- if (track.value) {
7473
- goTo(nearestIndex(), true);
8151
+ const el = track.value;
8152
+ const velocity = releaseVelocity();
8153
+ samples = [];
8154
+ if (el) {
8155
+ glideTo(glideTarget$1(el.scrollLeft, velocity), velocity);
8156
+ return;
7474
8157
  }
7475
8158
  syncAutoplay();
7476
8159
  }
@@ -7478,10 +8161,13 @@
7478
8161
  if (event.pointerType !== "mouse" || event.button !== 0 || !track.value) {
7479
8162
  return;
7480
8163
  }
8164
+ cancelGlide();
7481
8165
  dragPointer = event.pointerId;
7482
8166
  dragStartX = event.clientX;
7483
8167
  dragStartScroll = track.value.scrollLeft;
7484
8168
  dragMoved = 0;
8169
+ samples = [];
8170
+ recordSample(event.clientX);
7485
8171
  dragging.value = true;
7486
8172
  try {
7487
8173
  track.value.setPointerCapture(event.pointerId);
@@ -7493,7 +8179,8 @@
7493
8179
  return;
7494
8180
  }
7495
8181
  const dx = event.clientX - dragStartX;
7496
- dragMoved = Math.abs(dx);
8182
+ dragMoved = Math.max(dragMoved, Math.abs(dx));
8183
+ recordSample(event.clientX);
7497
8184
  track.value.scrollLeft = dragStartScroll - dx;
7498
8185
  }
7499
8186
  function onPointerEnd(event) {
@@ -7547,7 +8234,7 @@
7547
8234
  }
7548
8235
  );
7549
8236
  vue.watch(
7550
- () => [props.autoplay, props.loop, count.value, dragging.value, index.value],
8237
+ () => [props.autoplay, props.loop, count.value, dragging.value, gliding.value, index.value],
7551
8238
  () => syncAutoplay()
7552
8239
  );
7553
8240
  vue.onMounted(() => {
@@ -7563,6 +8250,8 @@
7563
8250
  vue.onUpdated(refreshCount);
7564
8251
  vue.onBeforeUnmount(() => {
7565
8252
  endDrag();
8253
+ cancelGlide();
8254
+ window.clearTimeout(settleTimer);
7566
8255
  cancelAnimationFrame(scrollFrame);
7567
8256
  cancelAnimationFrame(focusFrame);
7568
8257
  stopAutoplay();
@@ -7588,7 +8277,7 @@
7588
8277
  key: 0,
7589
8278
  type: "button",
7590
8279
  class: "tao-carousel__nav",
7591
- "aria-label": __props.prevLabel,
8280
+ "aria-label": vue.unref(l10n).prevLabel,
7592
8281
  disabled: atStart.value,
7593
8282
  onClick: goPrev
7594
8283
  }, [
@@ -7616,11 +8305,14 @@
7616
8305
  vue.createElementVNode("div", {
7617
8306
  ref_key: "track",
7618
8307
  ref: track,
7619
- class: vue.normalizeClass(["tao-carousel__track", { "tao-carousel__track--dragging": dragging.value }]),
8308
+ class: vue.normalizeClass(["tao-carousel__track", { "tao-carousel__track--dragging": dragging.value, "tao-carousel__track--gliding": gliding.value }]),
7620
8309
  role: "region",
7621
- "aria-label": __props.ariaLabel,
8310
+ "aria-label": vue.unref(l10n).ariaLabel,
7622
8311
  tabindex: "0",
7623
8312
  onScroll,
8313
+ onScrollend: settle,
8314
+ onWheelPassive: onUserScrollInput,
8315
+ onTouchstartPassive: onUserScrollInput,
7624
8316
  onKeydown,
7625
8317
  onPointerdown: onPointerDown,
7626
8318
  onPointermove: onPointerMove,
@@ -7639,7 +8331,7 @@
7639
8331
  key: 0,
7640
8332
  type: "button",
7641
8333
  class: "tao-carousel__nav",
7642
- "aria-label": __props.nextLabel,
8334
+ "aria-label": vue.unref(l10n).nextLabel,
7643
8335
  disabled: atEnd.value,
7644
8336
  onClick: goNext
7645
8337
  }, [
@@ -7674,14 +8366,14 @@
7674
8366
  key: 0,
7675
8367
  class: "tao-carousel__dots",
7676
8368
  role: "group",
7677
- "aria-label": __props.dotsLabel
8369
+ "aria-label": vue.unref(l10n).dotsLabel
7678
8370
  }, [
7679
8371
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(snapCount.value, (n) => {
7680
8372
  return vue.openBlock(), vue.createElementBlock("button", {
7681
8373
  key: n,
7682
8374
  type: "button",
7683
8375
  class: vue.normalizeClass(["tao-carousel__dot", { "tao-carousel__dot--active": n - 1 === index.value }]),
7684
- "aria-label": __props.slideLabel.replace("{n}", String(n)).replace("{count}", String(snapCount.value)),
8376
+ "aria-label": vue.unref(l10n).slideLabel.replace("{n}", String(n)).replace("{count}", String(snapCount.value)),
7685
8377
  "aria-current": n - 1 === index.value ? "true" : void 0,
7686
8378
  onClick: ($event) => goTo(n - 1)
7687
8379
  }, [
@@ -7700,7 +8392,7 @@
7700
8392
  };
7701
8393
  }
7702
8394
  });
7703
- const TaoCarousel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-74bcb7ec"]]);
8395
+ const TaoCarousel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-d83a4f4e"]]);
7704
8396
  const _hoisted_1$3 = ["aria-label"];
7705
8397
  const _hoisted_2$2 = ["aria-label"];
7706
8398
  const _hoisted_3$2 = {
@@ -7741,18 +8433,14 @@
7741
8433
  __name: "TaoStages",
7742
8434
  props: {
7743
8435
  items: { default: () => [] },
7744
- vertical: { type: Boolean, default: true },
7745
- ariaLabel: { default: "Стадии" },
8436
+ direction: { default: void 0 },
8437
+ vertical: { type: Boolean, default: void 0 },
8438
+ ariaLabel: {},
7746
8439
  statusLabels: { default: () => ({}) }
7747
8440
  },
7748
8441
  setup(__props) {
7749
8442
  const props = __props;
7750
- const fallbackStatusText = {
7751
- wait: "ожидание",
7752
- work: "в работе",
7753
- ok: "готово",
7754
- bad: "ошибка"
7755
- };
8443
+ const l10n = useLocaleText(props, "stages");
7756
8444
  function statusOf(item) {
7757
8445
  if (item.status === "danger") {
7758
8446
  return "bad";
@@ -7761,12 +8449,16 @@
7761
8449
  }
7762
8450
  function itemLabel(item) {
7763
8451
  const status = statusOf(item);
7764
- return `${item.label ?? item.key}, ${props.statusLabels[status] ?? fallbackStatusText[status]}`;
8452
+ return `${item.label ?? item.key}, ${props.statusLabels[status] ?? taoLocale().stages.statusLabels[status]}`;
7765
8453
  }
8454
+ const isRow = vue.computed(() => (props.direction ?? (props.vertical === false ? "row" : "column")) === "row");
8455
+ warnDeprecated("TaoStages", {
8456
+ vertical: "use `direction`"
8457
+ });
7766
8458
  return (_ctx, _cache) => {
7767
8459
  return vue.openBlock(), vue.createElementBlock("ul", {
7768
- class: vue.normalizeClass(["tao-stages", { "tao-stages--horizontal": !props.vertical }]),
7769
- "aria-label": __props.ariaLabel
8460
+ class: vue.normalizeClass(["tao-stages", { "tao-stages--horizontal": isRow.value }]),
8461
+ "aria-label": vue.unref(l10n).ariaLabel
7770
8462
  }, [
7771
8463
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.items, (item, index) => {
7772
8464
  return vue.openBlock(), vue.createElementBlock("li", {
@@ -7835,86 +8527,7 @@
7835
8527
  };
7836
8528
  }
7837
8529
  });
7838
- const TaoStages = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-d284b19d"]]);
7839
- const TOAST_POSITIONS = [
7840
- "topRight",
7841
- "topLeft",
7842
- "topCenter",
7843
- "bottomRight",
7844
- "bottomLeft",
7845
- "bottomCenter",
7846
- "center"
7847
- ];
7848
- const toastDefaults = {
7849
- position: "topCenter",
7850
- timeout: 3e3,
7851
- closable: true,
7852
- progress: true,
7853
- closeLabel: "Закрыть уведомление"
7854
- };
7855
- const toasts = vue.ref([]);
7856
- const toastsByPosition = vue.computed(() => {
7857
- const grouped = {};
7858
- for (const position of TOAST_POSITIONS) {
7859
- grouped[position] = [];
7860
- }
7861
- for (const toast2 of toasts.value) {
7862
- grouped[toast2.position].push(toast2);
7863
- }
7864
- return grouped;
7865
- });
7866
- function configureToastDefaults(partial) {
7867
- Object.assign(toastDefaults, partial);
7868
- }
7869
- function addToast(record) {
7870
- if (record.displayMode === "once" && record.dedupeId) {
7871
- const exists = toasts.value.some((item) => item.dedupeId === record.dedupeId);
7872
- if (exists) {
7873
- return;
7874
- }
7875
- }
7876
- if (record.displayMode === "replace" && record.dedupeId) {
7877
- toasts.value = toasts.value.filter((item) => item.dedupeId !== record.dedupeId);
7878
- }
7879
- toasts.value = [...toasts.value, record];
7880
- }
7881
- function removeToast(id) {
7882
- var _a;
7883
- const item = toasts.value.find((toast2) => toast2.id === id);
7884
- if (!item) {
7885
- return;
7886
- }
7887
- toasts.value = toasts.value.filter((toast2) => toast2.id !== id);
7888
- (_a = item.onClosed) == null ? void 0 : _a.call(item);
7889
- }
7890
- function dismissToasts(id) {
7891
- if (id) {
7892
- removeToast(id);
7893
- return;
7894
- }
7895
- const items = toasts.value;
7896
- toasts.value = [];
7897
- items.forEach((item) => {
7898
- var _a;
7899
- return (_a = item.onClosed) == null ? void 0 : _a.call(item);
7900
- });
7901
- }
7902
- let viewportMounts$1 = 0;
7903
- function registerToastViewport() {
7904
- viewportMounts$1 += 1;
7905
- }
7906
- function unregisterToastViewport() {
7907
- viewportMounts$1 = Math.max(0, viewportMounts$1 - 1);
7908
- }
7909
- function hasToastViewport() {
7910
- if (viewportMounts$1 > 0) {
7911
- return true;
7912
- }
7913
- if (typeof document === "undefined") {
7914
- return false;
7915
- }
7916
- return Boolean(document.querySelector("[data-tao-toast-viewport]"));
7917
- }
8530
+ const TaoStages = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-45cc2ad5"]]);
7918
8531
  const _hoisted_1$2 = ["role"];
7919
8532
  const _hoisted_2$1 = {
7920
8533
  class: "tao-toast__icon",
@@ -8022,7 +8635,7 @@
8022
8635
  });
8023
8636
  return (_ctx, _cache) => {
8024
8637
  return vue.openBlock(), vue.createElementBlock("div", {
8025
- class: vue.normalizeClass(["tao-toast", [`tao-toast--${__props.toast.type}`, { "tao-toast--paused": paused.value }]]),
8638
+ class: vue.normalizeClass(["tao-toast", [`tao-toast--${__props.toast.type}`, vue.unref(surfaceClass)(__props.toast.surface), { "tao-toast--paused": paused.value }]]),
8026
8639
  role: __props.toast.type === "error" || __props.toast.type === "danger" || __props.toast.type === "warning" ? "alert" : "status",
8027
8640
  "aria-live": "polite",
8028
8641
  onMouseenter: pause,
@@ -8142,7 +8755,7 @@
8142
8755
  };
8143
8756
  }
8144
8757
  });
8145
- const TaoToastItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-63520638"]]);
8758
+ const TaoToastItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-e0b96c7f"]]);
8146
8759
  const _hoisted_1$1 = { class: "tao-toast-slot__inner" };
8147
8760
  const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
8148
8761
  ...{ name: "TaoToastViewport" },
@@ -8197,50 +8810,6 @@
8197
8810
  }
8198
8811
  });
8199
8812
  const TaoToastViewport = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-d07e8a95"]]);
8200
- const confirmDefaults = {
8201
- ok: "ОК",
8202
- cancel: "Отмена"
8203
- };
8204
- const currentConfirm = vue.ref(null);
8205
- const queue = [];
8206
- function configureConfirmDefaults(partial) {
8207
- Object.assign(confirmDefaults, partial);
8208
- }
8209
- function pump() {
8210
- if (currentConfirm.value) {
8211
- return;
8212
- }
8213
- currentConfirm.value = queue.shift() ?? null;
8214
- }
8215
- function enqueueConfirm(record) {
8216
- queue.push(record);
8217
- pump();
8218
- }
8219
- function resolveConfirm(value) {
8220
- const item = currentConfirm.value;
8221
- if (!item) {
8222
- return;
8223
- }
8224
- currentConfirm.value = null;
8225
- item.resolve(value);
8226
- pump();
8227
- }
8228
- let viewportMounts = 0;
8229
- function registerConfirmHost() {
8230
- viewportMounts += 1;
8231
- }
8232
- function unregisterConfirmHost() {
8233
- viewportMounts = Math.max(0, viewportMounts - 1);
8234
- }
8235
- function hasConfirmHost() {
8236
- if (viewportMounts > 0) {
8237
- return true;
8238
- }
8239
- if (typeof document === "undefined") {
8240
- return false;
8241
- }
8242
- return Boolean(document.querySelector("[data-tao-confirm-host]"));
8243
- }
8244
8813
  const _hoisted_1 = ["aria-labelledby", "aria-describedby"];
8245
8814
  const _hoisted_2 = {
8246
8815
  class: "tao-confirm__icon",
@@ -8352,7 +8921,7 @@
8352
8921
  default: vue.withCtx(() => [
8353
8922
  vue.unref(currentConfirm) ? (vue.openBlock(), vue.createElementBlock("div", {
8354
8923
  key: 0,
8355
- class: "tao-confirm",
8924
+ class: vue.normalizeClass(["tao-confirm", { "tao-confirm--glass": vue.unref(currentConfirm).surface === "glass" }]),
8356
8925
  "data-tao-confirm-host": "",
8357
8926
  onKeydown
8358
8927
  }, [
@@ -8363,7 +8932,7 @@
8363
8932
  vue.createElementVNode("div", {
8364
8933
  ref_key: "panelRef",
8365
8934
  ref: panelRef,
8366
- class: vue.normalizeClass(["tao-confirm__panel", { "tao-confirm__panel--danger": vue.unref(currentConfirm).danger }]),
8935
+ class: vue.normalizeClass(["tao-confirm__panel", [vue.unref(surfaceClass)(vue.unref(currentConfirm).surface), { "tao-confirm__panel--danger": vue.unref(currentConfirm).danger }]]),
8367
8936
  role: "alertdialog",
8368
8937
  "aria-modal": "true",
8369
8938
  "aria-labelledby": vue.unref(currentConfirm).title ? "tao-confirm-title" : void 0,
@@ -8438,7 +9007,7 @@
8438
9007
  }, 8, ["variant"])
8439
9008
  ])
8440
9009
  ], 10, _hoisted_1)
8441
- ], 32)) : vue.createCommentVNode("", true)
9010
+ ], 34)) : vue.createCommentVNode("", true)
8442
9011
  ]),
8443
9012
  _: 1
8444
9013
  })
@@ -8446,7 +9015,7 @@
8446
9015
  };
8447
9016
  }
8448
9017
  });
8449
- const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9afd73fb"]]);
9018
+ const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-03fe6839"]]);
8450
9019
  const TYPE_TIMEOUT = {
8451
9020
  success: 3e3,
8452
9021
  error: 5e3,
@@ -8491,6 +9060,7 @@
8491
9060
  position: draft.position,
8492
9061
  closable: draft.closable,
8493
9062
  progress: draft.progress,
9063
+ surface: draft.surface,
8494
9064
  displayMode: draft.displayMode,
8495
9065
  dedupeId,
8496
9066
  actions: draft.actions,
@@ -8507,6 +9077,7 @@
8507
9077
  position: toastDefaults.position,
8508
9078
  closable: toastDefaults.closable,
8509
9079
  progress: toastDefaults.progress,
9080
+ surface: toastDefaults.surface,
8510
9081
  actions: []
8511
9082
  };
8512
9083
  }
@@ -8603,6 +9174,10 @@
8603
9174
  draft.progress = value;
8604
9175
  return ctx;
8605
9176
  },
9177
+ surface(value) {
9178
+ draft.surface = value;
9179
+ return ctx;
9180
+ },
8606
9181
  id(value) {
8607
9182
  draft.dedupeId = value;
8608
9183
  return ctx;
@@ -8653,6 +9228,9 @@
8653
9228
  if ((options == null ? void 0 : options.progress) !== void 0) {
8654
9229
  builder.progress(options.progress);
8655
9230
  }
9231
+ if (options == null ? void 0 : options.surface) {
9232
+ builder.surface(options.surface);
9233
+ }
8656
9234
  if (options == null ? void 0 : options.id) {
8657
9235
  builder.id(options.id);
8658
9236
  }
@@ -8736,7 +9314,8 @@
8736
9314
  message: "",
8737
9315
  okLabel: confirmDefaults.ok,
8738
9316
  cancelLabel: confirmDefaults.cancel,
8739
- danger: false
9317
+ danger: false,
9318
+ surface: confirmDefaults.surface
8740
9319
  };
8741
9320
  }
8742
9321
  function createBuilder() {
@@ -8766,6 +9345,10 @@
8766
9345
  draft.danger = value;
8767
9346
  return ctx;
8768
9347
  },
9348
+ surface(value) {
9349
+ draft.surface = value;
9350
+ return ctx;
9351
+ },
8769
9352
  then(onFulfilled, onRejected) {
8770
9353
  return promise.then(onFulfilled, onRejected);
8771
9354
  }
@@ -8783,6 +9366,7 @@
8783
9366
  okLabel: draft.okLabel,
8784
9367
  cancelLabel: draft.cancelLabel,
8785
9368
  danger: draft.danger,
9369
+ surface: draft.surface,
8786
9370
  resolve: settle
8787
9371
  });
8788
9372
  }, 0);
@@ -8804,6 +9388,9 @@
8804
9388
  if (options.danger) {
8805
9389
  builder.danger(true);
8806
9390
  }
9391
+ if (options.surface) {
9392
+ builder.surface(options.surface);
9393
+ }
8807
9394
  return builder;
8808
9395
  }
8809
9396
  function confirmFn(title, options) {
@@ -8886,7 +9473,10 @@
8886
9473
  TaoConfirmHost
8887
9474
  ];
8888
9475
  const TaoUI = {
8889
- install(app) {
9476
+ install(app, options = {}) {
9477
+ if (options.locale) {
9478
+ setTaoLocale(options.locale);
9479
+ }
8890
9480
  components.forEach((component) => {
8891
9481
  app.component(component.name, component);
8892
9482
  });
@@ -8959,8 +9549,12 @@
8959
9549
  exports2.formatTaoDateIso = formatTaoDateIso;
8960
9550
  exports2.formatTaoDateLabel = formatTaoDateLabel;
8961
9551
  exports2.formatTaoDateRangeLabel = formatTaoDateRangeLabel;
9552
+ exports2.localeEn = localeEn;
9553
+ exports2.localeRu = localeRu;
8962
9554
  exports2.parseTaoDate = parseTaoDate;
8963
9555
  exports2.parseTaoDateRange = parseTaoDateRange;
9556
+ exports2.setTaoLocale = setTaoLocale;
9557
+ exports2.taoLocale = taoLocale;
8964
9558
  exports2.toast = toast;
8965
9559
  exports2.todayTaoDate = todayTaoDate;
8966
9560
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });