@1337exp/taoui 3.4.1 → 4.0.1
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 +17 -0
- package/README.md +11 -5
- package/README.ru.md +11 -5
- package/dist/index.cjs +165 -185
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +16 -7
- package/dist/index.mjs +166 -186
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
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 });
|
|
@@ -3829,11 +3834,10 @@
|
|
|
3829
3834
|
const _hoisted_1$w = ["tabindex", "aria-label"];
|
|
3830
3835
|
const _hoisted_2$t = { class: "tao-scroll-top__content" };
|
|
3831
3836
|
const _hoisted_3$p = {
|
|
3832
|
-
key:
|
|
3837
|
+
key: 0,
|
|
3833
3838
|
class: "tao-scroll-top__text",
|
|
3834
3839
|
"aria-hidden": "true"
|
|
3835
3840
|
};
|
|
3836
|
-
const RIPPLE_DURATION = 750;
|
|
3837
3841
|
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
3838
3842
|
...{ name: "TaoScrollTop", inheritAttrs: false },
|
|
3839
3843
|
__name: "TaoScrollTop",
|
|
@@ -3872,14 +3876,7 @@
|
|
|
3872
3876
|
const captionSide = vue.computed(() => props.labelSide ?? (props.side === "right" ? "left" : "right"));
|
|
3873
3877
|
const caption = vue.computed(() => props.label ?? (isText.value ? l10n.value.ariaLabel : void 0));
|
|
3874
3878
|
const accessibleName = vue.computed(() => props.ariaLabel || props.label || l10n.value.ariaLabel);
|
|
3875
|
-
const rippleStyle = vue.reactive({
|
|
3876
|
-
top: fmtProp(-1 * props.size),
|
|
3877
|
-
left: fmtProp(-1 * props.size),
|
|
3878
|
-
width: "200%",
|
|
3879
|
-
height: "200%"
|
|
3880
|
-
});
|
|
3881
3879
|
const isActive = vue.ref(false);
|
|
3882
|
-
const isRippleActive = vue.ref(false);
|
|
3883
3880
|
function getScrollValue() {
|
|
3884
3881
|
if (typeof window.pageYOffset !== "undefined") {
|
|
3885
3882
|
return window.pageYOffset;
|
|
@@ -3913,23 +3910,6 @@
|
|
|
3913
3910
|
prevPos = pY;
|
|
3914
3911
|
isActive.value = tooFar && activeBack;
|
|
3915
3912
|
}
|
|
3916
|
-
function onClick(e) {
|
|
3917
|
-
if (!isText.value && !isRippleActive.value) {
|
|
3918
|
-
const elTarget = e.currentTarget;
|
|
3919
|
-
if (elTarget) {
|
|
3920
|
-
const rect = elTarget.getBoundingClientRect();
|
|
3921
|
-
const top = e.clientY - rect.top;
|
|
3922
|
-
const left = e.clientX - rect.left;
|
|
3923
|
-
rippleStyle.top = fmtProp(top - props.size);
|
|
3924
|
-
rippleStyle.left = fmtProp(left - props.size);
|
|
3925
|
-
}
|
|
3926
|
-
isRippleActive.value = true;
|
|
3927
|
-
setTimeout(() => {
|
|
3928
|
-
isRippleActive.value = false;
|
|
3929
|
-
}, RIPPLE_DURATION);
|
|
3930
|
-
}
|
|
3931
|
-
goToTop();
|
|
3932
|
-
}
|
|
3933
3913
|
vue.onBeforeMount(() => {
|
|
3934
3914
|
window.addEventListener("scroll", onScroll);
|
|
3935
3915
|
});
|
|
@@ -3958,14 +3938,9 @@
|
|
|
3958
3938
|
isText.value && `tao-scroll-top--caption-${captionSide.value}`
|
|
3959
3939
|
]],
|
|
3960
3940
|
"aria-label": accessibleName.value,
|
|
3961
|
-
onClick: vue.withModifiers(
|
|
3941
|
+
onClick: vue.withModifiers(goToTop, ["prevent"])
|
|
3962
3942
|
}), [
|
|
3963
3943
|
vue.createElementVNode("span", _hoisted_2$t, [
|
|
3964
|
-
!isText.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
3965
|
-
key: 0,
|
|
3966
|
-
class: vue.normalizeClass([{ "tao-scroll-top__ripple--active": isRippleActive.value }, "tao-scroll-top__ripple"]),
|
|
3967
|
-
style: vue.normalizeStyle(rippleStyle)
|
|
3968
|
-
}, null, 6)) : vue.createCommentVNode("", true),
|
|
3969
3944
|
isText.value && caption.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$p, vue.toDisplayString(caption.value), 1)) : vue.createCommentVNode("", true),
|
|
3970
3945
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
3971
3946
|
_cache[0] || (_cache[0] = vue.createElementVNode("svg", {
|
|
@@ -3992,7 +3967,7 @@
|
|
|
3992
3967
|
};
|
|
3993
3968
|
}
|
|
3994
3969
|
});
|
|
3995
|
-
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
3970
|
+
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-7bcb0179"]]);
|
|
3996
3971
|
const _hoisted_1$v = { class: "tao-progress" };
|
|
3997
3972
|
const _hoisted_2$s = {
|
|
3998
3973
|
key: 0,
|
|
@@ -5349,7 +5324,8 @@
|
|
|
5349
5324
|
disabled: { type: Boolean, default: false },
|
|
5350
5325
|
error: { type: Boolean, default: false },
|
|
5351
5326
|
size: {},
|
|
5352
|
-
block: { type: Boolean, default: false }
|
|
5327
|
+
block: { type: Boolean, default: false },
|
|
5328
|
+
minWidth: {}
|
|
5353
5329
|
},
|
|
5354
5330
|
emits: ["update:modelValue", "change"],
|
|
5355
5331
|
setup(__props, { emit: __emit }) {
|
|
@@ -5362,6 +5338,9 @@
|
|
|
5362
5338
|
const groupDisabled = vue.computed(() => props.disabled);
|
|
5363
5339
|
const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
|
|
5364
5340
|
const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
|
|
5341
|
+
const minWidthStyle = vue.computed(
|
|
5342
|
+
() => props.minWidth === void 0 ? void 0 : { "--tao-segmented-option-min-width": typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth }
|
|
5343
|
+
);
|
|
5365
5344
|
const trackRef = vue.ref(null);
|
|
5366
5345
|
const thumbStyle = vue.ref({ opacity: "0" });
|
|
5367
5346
|
let resizeObserver = null;
|
|
@@ -5444,6 +5423,7 @@
|
|
|
5444
5423
|
}
|
|
5445
5424
|
]]),
|
|
5446
5425
|
disabled: __props.disabled,
|
|
5426
|
+
style: vue.normalizeStyle(minWidthStyle.value),
|
|
5447
5427
|
"aria-describedby": describedBy.value,
|
|
5448
5428
|
"aria-invalid": invalid.value || void 0,
|
|
5449
5429
|
"aria-labelledby": __props.legend ? void 0 : vue.unref(field) ? `${vue.unref(field).id}-label` : void 0,
|
|
@@ -5462,11 +5442,11 @@
|
|
|
5462
5442
|
}, null, 4),
|
|
5463
5443
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5464
5444
|
], 512)
|
|
5465
|
-
],
|
|
5445
|
+
], 14, _hoisted_1$p);
|
|
5466
5446
|
};
|
|
5467
5447
|
}
|
|
5468
5448
|
});
|
|
5469
|
-
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
5449
|
+
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-e4e082a4"]]);
|
|
5470
5450
|
const _hoisted_1$o = ["for"];
|
|
5471
5451
|
const _hoisted_2$m = ["id", "name", "value", "checked", "disabled", "aria-label"];
|
|
5472
5452
|
const _hoisted_3$j = { class: "tao-segmented-option__face" };
|
|
@@ -5575,7 +5555,7 @@
|
|
|
5575
5555
|
};
|
|
5576
5556
|
}
|
|
5577
5557
|
});
|
|
5578
|
-
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
5558
|
+
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-588d637d"]]);
|
|
5579
5559
|
const _hoisted_1$n = ["tabindex", "aria-label", "aria-valuetext", "aria-valuenow"];
|
|
5580
5560
|
const _hoisted_2$l = { class: "tao-color-picker__strips" };
|
|
5581
5561
|
const _hoisted_3$i = { class: "tao-color-picker__row" };
|
|
@@ -6565,7 +6545,7 @@
|
|
|
6565
6545
|
}
|
|
6566
6546
|
return true;
|
|
6567
6547
|
}
|
|
6568
|
-
function formatTaoDateLabel(iso, locale = "
|
|
6548
|
+
function formatTaoDateLabel(iso, locale = "en-US") {
|
|
6569
6549
|
const parts = parseTaoDate(iso);
|
|
6570
6550
|
if (!parts) {
|
|
6571
6551
|
return "";
|
|
@@ -6590,7 +6570,7 @@
|
|
|
6590
6570
|
}
|
|
6591
6571
|
return sortTaoDateRange(formatTaoDateIso(start), formatTaoDateIso(end));
|
|
6592
6572
|
}
|
|
6593
|
-
function formatTaoDateRangeLabel(start, end, locale = "
|
|
6573
|
+
function formatTaoDateRangeLabel(start, end, locale = "en-US") {
|
|
6594
6574
|
const fromParts = parseTaoDate(start);
|
|
6595
6575
|
const toParts = parseTaoDate(end);
|
|
6596
6576
|
if (!fromParts || !toParts) {
|
|
@@ -6606,7 +6586,7 @@
|
|
|
6606
6586
|
});
|
|
6607
6587
|
return `${from} — ${formatTaoDateLabel(end, locale)}`;
|
|
6608
6588
|
}
|
|
6609
|
-
function formatTaoMonthLabel(year, month, locale = "
|
|
6589
|
+
function formatTaoMonthLabel(year, month, locale = "en-US") {
|
|
6610
6590
|
const label = new Date(year, month - 1, 1).toLocaleDateString(locale, {
|
|
6611
6591
|
month: "long",
|
|
6612
6592
|
year: "numeric"
|
|
@@ -6620,7 +6600,7 @@
|
|
|
6620
6600
|
}
|
|
6621
6601
|
return (new Date(parts.y, parts.m - 1, parts.d).getDay() + 6) % 7;
|
|
6622
6602
|
}
|
|
6623
|
-
function taoWeekdayLabels(locale = "
|
|
6603
|
+
function taoWeekdayLabels(locale = "en-US") {
|
|
6624
6604
|
return Array.from({ length: 7 }, (_, index) => {
|
|
6625
6605
|
const label = new Date(2026, 0, 5 + index).toLocaleDateString(locale, { weekday: "short" });
|
|
6626
6606
|
return label.replace(/\.$/, "");
|