@1337exp/taoui 3.4.1 → 4.0.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/CHANGELOG.md +13 -0
- package/README.md +11 -5
- package/README.ru.md +11 -5
- package/dist/index.cjs +162 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +16 -7
- package/dist/index.mjs +163 -153
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking: English is the default language
|
|
6
|
+
|
|
7
|
+
- **Built-in texts are English by default** (they were Russian): placeholders, “Clear”, aria labels, `toast` / `confirm()` defaults, calendar captions. The date helpers (`formatTaoDateLabel` and friends) default to `en-US` instead of `ru-RU`, and `TaoDate` / `TaoDateRange` follow the active locale as before.
|
|
8
|
+
- **To stay on Russian**, pass the locale once: `app.use(TaoUI, { locale: localeRu })`, or `setTaoLocale(localeRu)` without the plugin. `localeRu` and `localeEn` are both still exported, nothing else changed in the locale API.
|
|
9
|
+
- `setTaoLocale(overrides)` now merges on top of English (it merged on top of Russian). Pass `setTaoLocale(overrides, localeRu)` to keep the old base.
|
|
10
|
+
|
|
11
|
+
### Minimum width
|
|
12
|
+
|
|
13
|
+
- **`TaoButton` `minWidth`** (number = px, or any CSS length) and the **`--tao-button-min-width`** variable; default `0`, so nothing changes until you set it. Set the variable on one button, on a container or on `:root`.
|
|
14
|
+
- **`TaoSegmented` `minWidth`** and **`--tao-segmented-option-min-width`**: the minimum width of every option, including in `block` mode.
|
|
15
|
+
|
|
3
16
|
## 3.4.1
|
|
4
17
|
|
|
5
18
|
- **Fix:** `TaoScrollTop` `variant="text"` could not be shown without a caption: `label=""` now hides it, leaving just the arrow button (the accessible name stays).
|
package/README.md
CHANGED
|
@@ -222,12 +222,12 @@ app.mount('#app')
|
|
|
222
222
|
|
|
223
223
|
### Language
|
|
224
224
|
|
|
225
|
-
Built-in texts (placeholders, “Clear”, aria labels, dates) are
|
|
225
|
+
Built-in texts (placeholders, “Clear”, aria labels, dates) are English by default. Russian ships with the library:
|
|
226
226
|
|
|
227
227
|
```javascript
|
|
228
|
-
import TaoUI, {
|
|
228
|
+
import TaoUI, { localeRu } from '@1337exp/taoui'
|
|
229
229
|
|
|
230
|
-
app.use(TaoUI, { locale:
|
|
230
|
+
app.use(TaoUI, { locale: localeRu })
|
|
231
231
|
```
|
|
232
232
|
|
|
233
233
|
Change single texts — the rest stays from the default:
|
|
@@ -236,7 +236,7 @@ Change single texts — the rest stays from the default:
|
|
|
236
236
|
app.use(TaoUI, { locale: { select: { placeholder: 'Pick one' } } })
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
Another language: copy `localeEn
|
|
239
|
+
Another language: copy `localeEn` (or `localeRu`), translate, pass it the same way (type `TaoLocale`). Keys repeat prop names —
|
|
240
240
|
`locale.select.placeholder` is the default of TaoSelect `placeholder`, and a prop passed by hand always wins.
|
|
241
241
|
|
|
242
242
|
Switch the language at any moment — from your settings, a language picker, a route. Components already on the page
|
|
@@ -246,12 +246,18 @@ update at once, without a reload and without losing what users typed:
|
|
|
246
246
|
import { setTaoLocale, localeEn, localeRu } from '@1337exp/taoui'
|
|
247
247
|
|
|
248
248
|
function onLanguageChange(lang) {
|
|
249
|
-
setTaoLocale(lang === '
|
|
249
|
+
setTaoLocale(lang === 'ru' ? localeRu : localeEn)
|
|
250
250
|
}
|
|
251
251
|
```
|
|
252
252
|
|
|
253
253
|
Without the plugin (individual components) `setTaoLocale()` is the only call you need.
|
|
254
254
|
|
|
255
|
+
### Upgrading from 3.x
|
|
256
|
+
|
|
257
|
+
4.0 changes one default: the built-in texts are now English (they were Russian). To stay on Russian, pass the locale
|
|
258
|
+
once — `app.use(TaoUI, { locale: localeRu })`, or `setTaoLocale(localeRu)` without the plugin. The date helpers and
|
|
259
|
+
the date components follow the locale and default to `en-US` as well.
|
|
260
|
+
|
|
255
261
|
### Upgrading from 1.x
|
|
256
262
|
|
|
257
263
|
See [CHANGELOG.md](CHANGELOG.md): what broke, and a table of old names → new ones. Old names still work in 2.x and
|
package/README.ru.md
CHANGED
|
@@ -224,12 +224,12 @@ app.mount('#app')
|
|
|
224
224
|
|
|
225
225
|
### Язык
|
|
226
226
|
|
|
227
|
-
Встроенные тексты (плейсхолдеры, «Очистить», aria-подписи, даты) по умолчанию
|
|
227
|
+
Встроенные тексты (плейсхолдеры, «Очистить», aria-подписи, даты) по умолчанию английские. Русский идёт в комплекте:
|
|
228
228
|
|
|
229
229
|
```javascript
|
|
230
|
-
import TaoUI, {
|
|
230
|
+
import TaoUI, { localeRu } from '@1337exp/taoui'
|
|
231
231
|
|
|
232
|
-
app.use(TaoUI, { locale:
|
|
232
|
+
app.use(TaoUI, { locale: localeRu })
|
|
233
233
|
```
|
|
234
234
|
|
|
235
235
|
Поменять отдельные тексты — остальное останется от локали по умолчанию:
|
|
@@ -238,7 +238,7 @@ app.use(TaoUI, { locale: localeEn })
|
|
|
238
238
|
app.use(TaoUI, { locale: { select: { placeholder: 'Выберите город' } } })
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
Другой язык: скопируйте `localeEn
|
|
241
|
+
Другой язык: скопируйте `localeEn` (или `localeRu`), переведите и передайте так же (тип `TaoLocale`). Ключи повторяют имена пропсов —
|
|
242
242
|
`locale.select.placeholder` — значение по умолчанию для `placeholder` у TaoSelect, а переданный руками проп всегда главнее.
|
|
243
243
|
|
|
244
244
|
Язык можно переключать в любой момент — из настроек, переключателя языка, по маршруту. Уже показанные компоненты
|
|
@@ -248,12 +248,18 @@ app.use(TaoUI, { locale: { select: { placeholder: 'Выберите город'
|
|
|
248
248
|
import { setTaoLocale, localeEn, localeRu } from '@1337exp/taoui'
|
|
249
249
|
|
|
250
250
|
function onLanguageChange(lang) {
|
|
251
|
-
setTaoLocale(lang === '
|
|
251
|
+
setTaoLocale(lang === 'ru' ? localeRu : localeEn)
|
|
252
252
|
}
|
|
253
253
|
```
|
|
254
254
|
|
|
255
255
|
Без плагина (отдельные компоненты) достаточно одного вызова `setTaoLocale()`.
|
|
256
256
|
|
|
257
|
+
### Переход с 3.x
|
|
258
|
+
|
|
259
|
+
В 4.0 поменялся один умолчательный параметр: встроенные тексты теперь английские (раньше были русские). Чтобы остаться
|
|
260
|
+
на русском, передайте локаль один раз: `app.use(TaoUI, { locale: localeRu })`, а без плагина — `setTaoLocale(localeRu)`.
|
|
261
|
+
Хелперы дат и компоненты дат следуют локали и по умолчанию тоже `en-US`.
|
|
262
|
+
|
|
257
263
|
### Переход с 1.x
|
|
258
264
|
|
|
259
265
|
Смотрите [CHANGELOG.md](CHANGELOG.md): что сломалось и таблица «старое имя → новое». В 2.x старые имена ещё работают
|
package/dist/index.cjs
CHANGED
|
@@ -37,11 +37,15 @@
|
|
|
37
37
|
disabled: { type: Boolean, default: false },
|
|
38
38
|
loading: { type: Boolean, default: false },
|
|
39
39
|
block: { type: Boolean, default: false },
|
|
40
|
-
icon: { default: "" }
|
|
40
|
+
icon: { default: "" },
|
|
41
|
+
minWidth: { default: void 0 }
|
|
41
42
|
},
|
|
42
43
|
emits: ["click"],
|
|
43
44
|
setup(__props, { emit: __emit }) {
|
|
44
45
|
const props = __props;
|
|
46
|
+
const minWidthStyle = vue.computed(
|
|
47
|
+
() => props.minWidth === void 0 ? void 0 : { "--tao-button-min-width": typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth }
|
|
48
|
+
);
|
|
45
49
|
const emit = __emit;
|
|
46
50
|
function handleClick(event) {
|
|
47
51
|
if (!props.disabled && !props.loading) {
|
|
@@ -61,6 +65,7 @@
|
|
|
61
65
|
[`tao-button--tone-${__props.tone}`]: !!__props.tone
|
|
62
66
|
}
|
|
63
67
|
]]),
|
|
68
|
+
style: vue.normalizeStyle(minWidthStyle.value),
|
|
64
69
|
type: __props.type,
|
|
65
70
|
disabled: __props.disabled || __props.loading,
|
|
66
71
|
onClick: handleClick
|
|
@@ -70,7 +75,7 @@
|
|
|
70
75
|
vue.createElementVNode("span", _hoisted_4$x, [
|
|
71
76
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
72
77
|
])
|
|
73
|
-
],
|
|
78
|
+
], 14, _hoisted_1$S);
|
|
74
79
|
};
|
|
75
80
|
}
|
|
76
81
|
});
|
|
@@ -81,7 +86,7 @@
|
|
|
81
86
|
}
|
|
82
87
|
return target;
|
|
83
88
|
};
|
|
84
|
-
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-
|
|
89
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-2b4000a6"]]);
|
|
85
90
|
function toCssLength(value) {
|
|
86
91
|
if (value === void 0 || value === null || value === "") {
|
|
87
92
|
return void 0;
|
|
@@ -304,98 +309,98 @@
|
|
|
304
309
|
}
|
|
305
310
|
});
|
|
306
311
|
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-55b2d297"]]);
|
|
307
|
-
const
|
|
308
|
-
code: "
|
|
309
|
-
alert: { closeLabel: "
|
|
312
|
+
const localeEn = {
|
|
313
|
+
code: "en-US",
|
|
314
|
+
alert: { closeLabel: "Close" },
|
|
310
315
|
avatar: {
|
|
311
|
-
fallbackLabel: "
|
|
312
|
-
notificationsLabel: "{count}
|
|
316
|
+
fallbackLabel: "Avatar",
|
|
317
|
+
notificationsLabel: "{count} notifications",
|
|
313
318
|
dotLabels: {
|
|
314
|
-
success: "
|
|
315
|
-
danger: "
|
|
316
|
-
warning: "
|
|
317
|
-
info: "
|
|
318
|
-
neutral: "
|
|
319
|
+
success: "online",
|
|
320
|
+
danger: "busy",
|
|
321
|
+
warning: "away",
|
|
322
|
+
info: "status",
|
|
323
|
+
neutral: "offline"
|
|
319
324
|
}
|
|
320
325
|
},
|
|
321
|
-
breadcrumb: { ariaLabel: "
|
|
326
|
+
breadcrumb: { ariaLabel: "Breadcrumb" },
|
|
322
327
|
carousel: {
|
|
323
|
-
ariaLabel: "
|
|
324
|
-
prevLabel: "
|
|
325
|
-
nextLabel: "
|
|
326
|
-
dotsLabel: "
|
|
327
|
-
slideLabel: "
|
|
328
|
+
ariaLabel: "Carousel",
|
|
329
|
+
prevLabel: "Previous",
|
|
330
|
+
nextLabel: "Next",
|
|
331
|
+
dotsLabel: "Slides",
|
|
332
|
+
slideLabel: "Slide {n} of {count}"
|
|
328
333
|
},
|
|
329
334
|
combobox: {
|
|
330
|
-
placeholder: "
|
|
331
|
-
emptyText: "
|
|
332
|
-
clearText: "
|
|
333
|
-
createText: "
|
|
335
|
+
placeholder: "Start typing",
|
|
336
|
+
emptyText: "Nothing found",
|
|
337
|
+
clearText: "Clear",
|
|
338
|
+
createText: "Add “{text}”"
|
|
334
339
|
},
|
|
335
|
-
confirm: { ok: "
|
|
336
|
-
copy: { copyLabel: "
|
|
340
|
+
confirm: { ok: "OK", cancel: "Cancel" },
|
|
341
|
+
copy: { copyLabel: "Copy", successText: "Copied!" },
|
|
337
342
|
date: {
|
|
338
|
-
placeholder: "
|
|
339
|
-
todayText: "
|
|
340
|
-
clearText: "
|
|
341
|
-
prevMonthLabel: "
|
|
342
|
-
nextMonthLabel: "
|
|
343
|
+
placeholder: "Date",
|
|
344
|
+
todayText: "Today",
|
|
345
|
+
clearText: "Clear",
|
|
346
|
+
prevMonthLabel: "Previous month",
|
|
347
|
+
nextMonthLabel: "Next month"
|
|
343
348
|
},
|
|
344
349
|
dateRange: {
|
|
345
|
-
placeholder: "
|
|
346
|
-
todayText: "
|
|
347
|
-
clearText: "
|
|
348
|
-
prevMonthLabel: "
|
|
349
|
-
nextMonthLabel: "
|
|
350
|
+
placeholder: "Period",
|
|
351
|
+
todayText: "Today",
|
|
352
|
+
clearText: "Clear",
|
|
353
|
+
prevMonthLabel: "Previous month",
|
|
354
|
+
nextMonthLabel: "Next month"
|
|
350
355
|
},
|
|
351
|
-
drawer: { closeLabel: "
|
|
352
|
-
dropdownMenu: { menuLabel: "
|
|
353
|
-
empty: { title: "
|
|
356
|
+
drawer: { closeLabel: "Close" },
|
|
357
|
+
dropdownMenu: { menuLabel: "Menu" },
|
|
358
|
+
empty: { title: "Nothing here" },
|
|
354
359
|
fileDrop: {
|
|
355
|
-
clearLabel: "
|
|
356
|
-
removeLabel: "
|
|
357
|
-
zoneText: "
|
|
358
|
-
units: ["
|
|
359
|
-
decimalSeparator: "
|
|
360
|
+
clearLabel: "Clear files",
|
|
361
|
+
removeLabel: "Remove “{name}”",
|
|
362
|
+
zoneText: "Drop a file here or click to choose",
|
|
363
|
+
units: ["B", "KB", "MB"],
|
|
364
|
+
decimalSeparator: "."
|
|
360
365
|
},
|
|
361
|
-
inputNumber: { incrementLabel: "
|
|
362
|
-
list: { emptyText: "
|
|
363
|
-
modal: { closeLabel: "
|
|
366
|
+
inputNumber: { incrementLabel: "Increase", decrementLabel: "Decrease" },
|
|
367
|
+
list: { emptyText: "Nothing here" },
|
|
368
|
+
modal: { closeLabel: "Close" },
|
|
364
369
|
pagination: {
|
|
365
|
-
ariaLabel: "
|
|
366
|
-
prevLabel: "
|
|
367
|
-
nextLabel: "
|
|
368
|
-
pageLabel: "
|
|
369
|
-
jumpPrevLabel: "
|
|
370
|
-
jumpNextLabel: "
|
|
371
|
-
totalText: "{from}–{to}
|
|
372
|
-
emptyTotalText: "0
|
|
370
|
+
ariaLabel: "Pagination",
|
|
371
|
+
prevLabel: "Previous",
|
|
372
|
+
nextLabel: "Next",
|
|
373
|
+
pageLabel: "Page {page}",
|
|
374
|
+
jumpPrevLabel: "Back {n} pages",
|
|
375
|
+
jumpNextLabel: "Forward {n} pages",
|
|
376
|
+
totalText: "{from}–{to} of {total}",
|
|
377
|
+
emptyTotalText: "0 of 0"
|
|
373
378
|
},
|
|
374
|
-
quantity: { decrementLabel: "
|
|
375
|
-
scrollTop: { ariaLabel: "
|
|
376
|
-
select: { placeholder: "
|
|
379
|
+
quantity: { decrementLabel: "Decrease", removeLabel: "Remove", incrementLabel: "Increase" },
|
|
380
|
+
scrollTop: { ariaLabel: "Back to top" },
|
|
381
|
+
select: { placeholder: "Select", clearText: "Clear" },
|
|
377
382
|
stages: {
|
|
378
|
-
ariaLabel: "
|
|
379
|
-
statusLabels: { wait: "
|
|
383
|
+
ariaLabel: "Stages",
|
|
384
|
+
statusLabels: { wait: "pending", work: "in progress", ok: "done", bad: "failed" }
|
|
380
385
|
},
|
|
381
|
-
table: { emptyText: "
|
|
382
|
-
tag: { closeLabel: "
|
|
386
|
+
table: { emptyText: "No data" },
|
|
387
|
+
tag: { closeLabel: "Remove" },
|
|
383
388
|
colorPicker: {
|
|
384
|
-
areaLabel: "
|
|
385
|
-
hueLabel: "
|
|
386
|
-
alphaLabel: "
|
|
387
|
-
hexLabel: "
|
|
388
|
-
modeLabel: "
|
|
389
|
-
swatchesLabel: "
|
|
390
|
-
eyedropperLabel: "
|
|
391
|
-
chooseLabel: "
|
|
389
|
+
areaLabel: "Saturation and brightness",
|
|
390
|
+
hueLabel: "Hue",
|
|
391
|
+
alphaLabel: "Opacity",
|
|
392
|
+
hexLabel: "Color in hex",
|
|
393
|
+
modeLabel: "Input mode",
|
|
394
|
+
swatchesLabel: "Swatches",
|
|
395
|
+
eyedropperLabel: "Eyedropper",
|
|
396
|
+
chooseLabel: "Choose color"
|
|
392
397
|
},
|
|
393
|
-
timeline: { playLabel: "
|
|
394
|
-
toast: { closeLabel: "
|
|
398
|
+
timeline: { playLabel: "Play", pauseLabel: "Pause", restartLabel: "Restart" },
|
|
399
|
+
toast: { closeLabel: "Close notification" }
|
|
395
400
|
};
|
|
396
401
|
const confirmDefaults = {
|
|
397
|
-
ok:
|
|
398
|
-
cancel:
|
|
402
|
+
ok: localeEn.confirm.ok,
|
|
403
|
+
cancel: localeEn.confirm.cancel,
|
|
399
404
|
surface: "glass"
|
|
400
405
|
};
|
|
401
406
|
const currentConfirm = vue.ref(null);
|
|
@@ -452,7 +457,7 @@
|
|
|
452
457
|
timeout: 3e3,
|
|
453
458
|
closable: true,
|
|
454
459
|
progress: true,
|
|
455
|
-
closeLabel:
|
|
460
|
+
closeLabel: localeEn.toast.closeLabel,
|
|
456
461
|
surface: "glass"
|
|
457
462
|
};
|
|
458
463
|
const toasts = vue.ref([]);
|
|
@@ -518,96 +523,96 @@
|
|
|
518
523
|
}
|
|
519
524
|
return Boolean(document.querySelector("[data-tao-toast-viewport]"));
|
|
520
525
|
}
|
|
521
|
-
const
|
|
522
|
-
code: "
|
|
523
|
-
alert: { closeLabel: "
|
|
526
|
+
const localeRu = {
|
|
527
|
+
code: "ru-RU",
|
|
528
|
+
alert: { closeLabel: "Закрыть" },
|
|
524
529
|
avatar: {
|
|
525
|
-
fallbackLabel: "
|
|
526
|
-
notificationsLabel: "{count}
|
|
530
|
+
fallbackLabel: "Аватар",
|
|
531
|
+
notificationsLabel: "{count} уведомлений",
|
|
527
532
|
dotLabels: {
|
|
528
|
-
success: "
|
|
529
|
-
danger: "
|
|
530
|
-
warning: "
|
|
531
|
-
info: "
|
|
532
|
-
neutral: "
|
|
533
|
+
success: "в сети",
|
|
534
|
+
danger: "занят",
|
|
535
|
+
warning: "отошёл",
|
|
536
|
+
info: "статус",
|
|
537
|
+
neutral: "не в сети"
|
|
533
538
|
}
|
|
534
539
|
},
|
|
535
|
-
breadcrumb: { ariaLabel: "
|
|
540
|
+
breadcrumb: { ariaLabel: "Хлебные крошки" },
|
|
536
541
|
carousel: {
|
|
537
|
-
ariaLabel: "
|
|
538
|
-
prevLabel: "
|
|
539
|
-
nextLabel: "
|
|
540
|
-
dotsLabel: "
|
|
541
|
-
slideLabel: "
|
|
542
|
+
ariaLabel: "Лента",
|
|
543
|
+
prevLabel: "Назад",
|
|
544
|
+
nextLabel: "Вперёд",
|
|
545
|
+
dotsLabel: "Слайды",
|
|
546
|
+
slideLabel: "Слайд {n} из {count}"
|
|
542
547
|
},
|
|
543
548
|
combobox: {
|
|
544
|
-
placeholder: "
|
|
545
|
-
emptyText: "
|
|
546
|
-
clearText: "
|
|
547
|
-
createText: "
|
|
549
|
+
placeholder: "Начните вводить",
|
|
550
|
+
emptyText: "Ничего не найдено",
|
|
551
|
+
clearText: "Очистить",
|
|
552
|
+
createText: "Добавить «{text}»"
|
|
548
553
|
},
|
|
549
|
-
confirm: { ok: "
|
|
550
|
-
copy: { copyLabel: "
|
|
554
|
+
confirm: { ok: "ОК", cancel: "Отмена" },
|
|
555
|
+
copy: { copyLabel: "Копировать", successText: "Скопировано!" },
|
|
551
556
|
date: {
|
|
552
|
-
placeholder: "
|
|
553
|
-
todayText: "
|
|
554
|
-
clearText: "
|
|
555
|
-
prevMonthLabel: "
|
|
556
|
-
nextMonthLabel: "
|
|
557
|
+
placeholder: "Дата",
|
|
558
|
+
todayText: "Сегодня",
|
|
559
|
+
clearText: "Очистить",
|
|
560
|
+
prevMonthLabel: "Предыдущий месяц",
|
|
561
|
+
nextMonthLabel: "Следующий месяц"
|
|
557
562
|
},
|
|
558
563
|
dateRange: {
|
|
559
|
-
placeholder: "
|
|
560
|
-
todayText: "
|
|
561
|
-
clearText: "
|
|
562
|
-
prevMonthLabel: "
|
|
563
|
-
nextMonthLabel: "
|
|
564
|
+
placeholder: "Период",
|
|
565
|
+
todayText: "Сегодня",
|
|
566
|
+
clearText: "Очистить",
|
|
567
|
+
prevMonthLabel: "Предыдущий месяц",
|
|
568
|
+
nextMonthLabel: "Следующий месяц"
|
|
564
569
|
},
|
|
565
|
-
drawer: { closeLabel: "
|
|
566
|
-
dropdownMenu: { menuLabel: "
|
|
567
|
-
empty: { title: "
|
|
570
|
+
drawer: { closeLabel: "Закрыть" },
|
|
571
|
+
dropdownMenu: { menuLabel: "Меню" },
|
|
572
|
+
empty: { title: "Ничего нет" },
|
|
568
573
|
fileDrop: {
|
|
569
|
-
clearLabel: "
|
|
570
|
-
removeLabel: "
|
|
571
|
-
zoneText: "
|
|
572
|
-
units: ["
|
|
573
|
-
decimalSeparator: "
|
|
574
|
+
clearLabel: "Очистить файлы",
|
|
575
|
+
removeLabel: "Убрать «{name}»",
|
|
576
|
+
zoneText: "Перетащите файл сюда или нажмите, чтобы выбрать",
|
|
577
|
+
units: ["Б", "КБ", "МБ"],
|
|
578
|
+
decimalSeparator: ","
|
|
574
579
|
},
|
|
575
|
-
inputNumber: { incrementLabel: "
|
|
576
|
-
list: { emptyText: "
|
|
577
|
-
modal: { closeLabel: "
|
|
580
|
+
inputNumber: { incrementLabel: "Увеличить", decrementLabel: "Уменьшить" },
|
|
581
|
+
list: { emptyText: "Ничего нет" },
|
|
582
|
+
modal: { closeLabel: "Закрыть" },
|
|
578
583
|
pagination: {
|
|
579
|
-
ariaLabel: "
|
|
580
|
-
prevLabel: "
|
|
581
|
-
nextLabel: "
|
|
582
|
-
pageLabel: "
|
|
583
|
-
jumpPrevLabel: "
|
|
584
|
-
jumpNextLabel: "
|
|
585
|
-
totalText: "{from}–{to}
|
|
586
|
-
emptyTotalText: "0
|
|
584
|
+
ariaLabel: "Пагинация",
|
|
585
|
+
prevLabel: "Назад",
|
|
586
|
+
nextLabel: "Вперёд",
|
|
587
|
+
pageLabel: "Страница {page}",
|
|
588
|
+
jumpPrevLabel: "Назад на {n} страниц",
|
|
589
|
+
jumpNextLabel: "Вперёд на {n} страниц",
|
|
590
|
+
totalText: "{from}–{to} из {total}",
|
|
591
|
+
emptyTotalText: "0 из 0"
|
|
587
592
|
},
|
|
588
|
-
quantity: { decrementLabel: "
|
|
589
|
-
scrollTop: { ariaLabel: "
|
|
590
|
-
select: { placeholder: "
|
|
593
|
+
quantity: { decrementLabel: "Уменьшить", removeLabel: "Убрать", incrementLabel: "Увеличить" },
|
|
594
|
+
scrollTop: { ariaLabel: "Наверх" },
|
|
595
|
+
select: { placeholder: "Выберите", clearText: "Очистить" },
|
|
591
596
|
stages: {
|
|
592
|
-
ariaLabel: "
|
|
593
|
-
statusLabels: { wait: "
|
|
597
|
+
ariaLabel: "Стадии",
|
|
598
|
+
statusLabels: { wait: "ожидание", work: "в работе", ok: "готово", bad: "ошибка" }
|
|
594
599
|
},
|
|
595
|
-
table: { emptyText: "
|
|
596
|
-
tag: { closeLabel: "
|
|
600
|
+
table: { emptyText: "Нет данных" },
|
|
601
|
+
tag: { closeLabel: "Убрать" },
|
|
597
602
|
colorPicker: {
|
|
598
|
-
areaLabel: "
|
|
599
|
-
hueLabel: "
|
|
600
|
-
alphaLabel: "
|
|
601
|
-
hexLabel: "
|
|
602
|
-
modeLabel: "
|
|
603
|
-
swatchesLabel: "
|
|
604
|
-
eyedropperLabel: "
|
|
605
|
-
chooseLabel: "
|
|
603
|
+
areaLabel: "Насыщенность и яркость",
|
|
604
|
+
hueLabel: "Оттенок",
|
|
605
|
+
alphaLabel: "Прозрачность",
|
|
606
|
+
hexLabel: "Цвет в hex",
|
|
607
|
+
modeLabel: "Способ ввода",
|
|
608
|
+
swatchesLabel: "Образцы",
|
|
609
|
+
eyedropperLabel: "Пипетка",
|
|
610
|
+
chooseLabel: "Выбрать цвет"
|
|
606
611
|
},
|
|
607
|
-
timeline: { playLabel: "
|
|
608
|
-
toast: { closeLabel: "
|
|
612
|
+
timeline: { playLabel: "Играть", pauseLabel: "Пауза", restartLabel: "В начало" },
|
|
613
|
+
toast: { closeLabel: "Закрыть уведомление" }
|
|
609
614
|
};
|
|
610
|
-
const current = vue.shallowRef(
|
|
615
|
+
const current = vue.shallowRef(localeEn);
|
|
611
616
|
function taoLocale() {
|
|
612
617
|
return current.value;
|
|
613
618
|
}
|
|
@@ -626,7 +631,7 @@
|
|
|
626
631
|
}
|
|
627
632
|
return out;
|
|
628
633
|
}
|
|
629
|
-
function setTaoLocale(locale, base =
|
|
634
|
+
function setTaoLocale(locale, base = localeEn) {
|
|
630
635
|
current.value = merge(base, locale);
|
|
631
636
|
configureToastDefaults({ closeLabel: current.value.toast.closeLabel });
|
|
632
637
|
configureConfirmDefaults({ ok: current.value.confirm.ok, cancel: current.value.confirm.cancel });
|
|
@@ -5349,7 +5354,8 @@
|
|
|
5349
5354
|
disabled: { type: Boolean, default: false },
|
|
5350
5355
|
error: { type: Boolean, default: false },
|
|
5351
5356
|
size: {},
|
|
5352
|
-
block: { type: Boolean, default: false }
|
|
5357
|
+
block: { type: Boolean, default: false },
|
|
5358
|
+
minWidth: {}
|
|
5353
5359
|
},
|
|
5354
5360
|
emits: ["update:modelValue", "change"],
|
|
5355
5361
|
setup(__props, { emit: __emit }) {
|
|
@@ -5362,6 +5368,9 @@
|
|
|
5362
5368
|
const groupDisabled = vue.computed(() => props.disabled);
|
|
5363
5369
|
const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
|
|
5364
5370
|
const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
|
|
5371
|
+
const minWidthStyle = vue.computed(
|
|
5372
|
+
() => props.minWidth === void 0 ? void 0 : { "--tao-segmented-option-min-width": typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth }
|
|
5373
|
+
);
|
|
5365
5374
|
const trackRef = vue.ref(null);
|
|
5366
5375
|
const thumbStyle = vue.ref({ opacity: "0" });
|
|
5367
5376
|
let resizeObserver = null;
|
|
@@ -5444,6 +5453,7 @@
|
|
|
5444
5453
|
}
|
|
5445
5454
|
]]),
|
|
5446
5455
|
disabled: __props.disabled,
|
|
5456
|
+
style: vue.normalizeStyle(minWidthStyle.value),
|
|
5447
5457
|
"aria-describedby": describedBy.value,
|
|
5448
5458
|
"aria-invalid": invalid.value || void 0,
|
|
5449
5459
|
"aria-labelledby": __props.legend ? void 0 : vue.unref(field) ? `${vue.unref(field).id}-label` : void 0,
|
|
@@ -5462,11 +5472,11 @@
|
|
|
5462
5472
|
}, null, 4),
|
|
5463
5473
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5464
5474
|
], 512)
|
|
5465
|
-
],
|
|
5475
|
+
], 14, _hoisted_1$p);
|
|
5466
5476
|
};
|
|
5467
5477
|
}
|
|
5468
5478
|
});
|
|
5469
|
-
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
5479
|
+
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-e4e082a4"]]);
|
|
5470
5480
|
const _hoisted_1$o = ["for"];
|
|
5471
5481
|
const _hoisted_2$m = ["id", "name", "value", "checked", "disabled", "aria-label"];
|
|
5472
5482
|
const _hoisted_3$j = { class: "tao-segmented-option__face" };
|
|
@@ -5575,7 +5585,7 @@
|
|
|
5575
5585
|
};
|
|
5576
5586
|
}
|
|
5577
5587
|
});
|
|
5578
|
-
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
5588
|
+
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-588d637d"]]);
|
|
5579
5589
|
const _hoisted_1$n = ["tabindex", "aria-label", "aria-valuetext", "aria-valuenow"];
|
|
5580
5590
|
const _hoisted_2$l = { class: "tao-color-picker__strips" };
|
|
5581
5591
|
const _hoisted_3$i = { class: "tao-color-picker__row" };
|
|
@@ -6565,7 +6575,7 @@
|
|
|
6565
6575
|
}
|
|
6566
6576
|
return true;
|
|
6567
6577
|
}
|
|
6568
|
-
function formatTaoDateLabel(iso, locale = "
|
|
6578
|
+
function formatTaoDateLabel(iso, locale = "en-US") {
|
|
6569
6579
|
const parts = parseTaoDate(iso);
|
|
6570
6580
|
if (!parts) {
|
|
6571
6581
|
return "";
|
|
@@ -6590,7 +6600,7 @@
|
|
|
6590
6600
|
}
|
|
6591
6601
|
return sortTaoDateRange(formatTaoDateIso(start), formatTaoDateIso(end));
|
|
6592
6602
|
}
|
|
6593
|
-
function formatTaoDateRangeLabel(start, end, locale = "
|
|
6603
|
+
function formatTaoDateRangeLabel(start, end, locale = "en-US") {
|
|
6594
6604
|
const fromParts = parseTaoDate(start);
|
|
6595
6605
|
const toParts = parseTaoDate(end);
|
|
6596
6606
|
if (!fromParts || !toParts) {
|
|
@@ -6606,7 +6616,7 @@
|
|
|
6606
6616
|
});
|
|
6607
6617
|
return `${from} — ${formatTaoDateLabel(end, locale)}`;
|
|
6608
6618
|
}
|
|
6609
|
-
function formatTaoMonthLabel(year, month, locale = "
|
|
6619
|
+
function formatTaoMonthLabel(year, month, locale = "en-US") {
|
|
6610
6620
|
const label = new Date(year, month - 1, 1).toLocaleDateString(locale, {
|
|
6611
6621
|
month: "long",
|
|
6612
6622
|
year: "numeric"
|
|
@@ -6620,7 +6630,7 @@
|
|
|
6620
6630
|
}
|
|
6621
6631
|
return (new Date(parts.y, parts.m - 1, parts.d).getDay() + 6) % 7;
|
|
6622
6632
|
}
|
|
6623
|
-
function taoWeekdayLabels(locale = "
|
|
6633
|
+
function taoWeekdayLabels(locale = "en-US") {
|
|
6624
6634
|
return Array.from({ length: 7 }, (_, index) => {
|
|
6625
6635
|
const label = new Date(2026, 0, 5 + index).toLocaleDateString(locale, { weekday: "short" });
|
|
6626
6636
|
return label.replace(/\.$/, "");
|