@1337exp/taoui 3.3.0 → 3.4.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 +19 -0
- package/README.md +6 -6
- package/README.ru.md +6 -6
- package/dist/index.cjs +105 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +39 -2
- package/dist/index.mjs +105 -65
- 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,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.1
|
|
4
|
+
|
|
5
|
+
- **Fix:** `TaoScrollTop` `variant="text"` could not be shown without a caption: `label=""` now hides it, leaving just the arrow button (the accessible name stays).
|
|
6
|
+
|
|
7
|
+
## 3.4.0
|
|
8
|
+
|
|
9
|
+
### TaoScrollTop
|
|
10
|
+
|
|
11
|
+
- **`variant`:** `solid` (default, as before), `ghost` (a light circle on a raised surface with a hairline border) and `text` (a bare uppercase caption with an arrow, always visible).
|
|
12
|
+
- **`label`:** a caption that appears beside the button on mouse hover (`@media (hover: hover) and (pointer: fine)`, so never on touch) and on keyboard focus. For `text` it is always shown and defaults to the locale text.
|
|
13
|
+
- **`side`** (`left` / `right`) picks the page edge, **`offset`** is the distance from it (`right` stays as its older name). **`labelSide`** puts the caption left or right of the button; by default it is the side opposite to `side`, so it opens towards the page, and an explicit value wins.
|
|
14
|
+
- **Fix:** the button had no accessible name unless `ariaLabel` was passed; it now falls back to `label`, then to the locale text.
|
|
15
|
+
- **Fix:** `size`, `bottom` and `zIndex` react to prop changes (they were read once at setup).
|
|
16
|
+
- The root is now a positioning wrapper around the button: fall-through attributes (`class`, `data-*`, …) still land on the button, but a `style` that moves the button should go to `bottom` / `offset` props instead.
|
|
17
|
+
|
|
18
|
+
## 3.3.2
|
|
19
|
+
|
|
20
|
+
- **Fix:** the focus trap of Modal, Drawer and `confirm()` no longer lets focus escape in Safari on macOS, where Tab skips buttons and links by default. After a Tab the trap checks that focus is still inside the dialog and pulls it back if not.
|
|
21
|
+
|
|
3
22
|
## 3.3.0
|
|
4
23
|
|
|
5
24
|
### Presentation
|
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
<a href="https://www.npmjs.com/package/@1337exp/taoui"><img src="https://img.shields.io/npm/v/@1337exp/taoui?color=cb3837&logo=npm" alt="npm"></a>
|
|
10
|
+
<a href="https://github.com/1337exp/taoui/actions/workflows/ci.yml"><img src="https://github.com/1337exp/taoui/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
11
|
+
<a href="https://github.com/1337exp/taoui/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@1337exp/taoui" alt="license"></a>
|
|
12
|
+
<img src="https://img.shields.io/badge/Vue-3-42b883?logo=vuedotjs&logoColor=white" alt="Vue 3">
|
|
13
|
+
<img src="https://img.shields.io/badge/types-included-3178c6?logo=typescript&logoColor=white" alt="TypeScript">
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
- **TaoLink** — `<NuxtLink>` in Nuxt, `<RouterLink>` with vue-router, otherwise a plain `<a>` — no extra setup
|
|
118
118
|
- **TaoBreadcrumb** — crumbs: the last item is the current page
|
|
119
119
|
- **TaoDropdownMenu** — dropdown that flips at the viewport edge
|
|
120
|
-
- **TaoScrollTop** — floating “back to top
|
|
120
|
+
- **TaoScrollTop** — floating “back to top”: `solid` / `ghost` / `text` looks, `side`, a mouse-hover `label`. Appears on reverse scroll after `boundary`
|
|
121
121
|
|
|
122
122
|
### Feedback
|
|
123
123
|
|
package/README.ru.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
<a href="https://www.npmjs.com/package/@1337exp/taoui"><img src="https://img.shields.io/npm/v/@1337exp/taoui?color=cb3837&logo=npm" alt="npm"></a>
|
|
10
|
+
<a href="https://github.com/1337exp/taoui/actions/workflows/ci.yml"><img src="https://github.com/1337exp/taoui/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
11
|
+
<a href="https://github.com/1337exp/taoui/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@1337exp/taoui" alt="license"></a>
|
|
12
|
+
<img src="https://img.shields.io/badge/Vue-3-42b883?logo=vuedotjs&logoColor=white" alt="Vue 3">
|
|
13
|
+
<img src="https://img.shields.io/badge/types-included-3178c6?logo=typescript&logoColor=white" alt="TypeScript">
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
- **TaoLink** — `<NuxtLink>` в Nuxt, `<RouterLink>` при vue-router, иначе обычный `<a>` — без дополнительной настройки
|
|
118
118
|
- **TaoBreadcrumb** — крошки: последний пункт — текущая страница
|
|
119
119
|
- **TaoDropdownMenu** — выпадающее меню с авто-позиционированием у края экрана
|
|
120
|
-
- **TaoScrollTop** — плавающая кнопка
|
|
120
|
+
- **TaoScrollTop** — плавающая кнопка «наверх»: виды `solid` / `ghost` / `text`, `side`, подпись `label` при наведении мыши. Появляется при обратном скролле после `boundary`
|
|
121
121
|
|
|
122
122
|
### Обратная связь
|
|
123
123
|
|
package/dist/index.cjs
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "tao-button__loader"
|
|
23
23
|
};
|
|
24
|
-
const _hoisted_3$
|
|
24
|
+
const _hoisted_3$E = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "tao-button__icon"
|
|
27
27
|
};
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
onClick: handleClick
|
|
67
67
|
}, [
|
|
68
68
|
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$L)) : vue.createCommentVNode("", true),
|
|
69
|
-
__props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
69
|
+
__props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$E, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
|
|
70
70
|
vue.createElementVNode("span", _hoisted_4$x, [
|
|
71
71
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
72
72
|
])
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "tao-input__affix tao-input__affix--prefix"
|
|
165
165
|
};
|
|
166
|
-
const _hoisted_3$
|
|
166
|
+
const _hoisted_3$D = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
|
|
167
167
|
const _hoisted_4$w = {
|
|
168
168
|
key: 1,
|
|
169
169
|
class: "tao-input__affix tao-input__affix--suffix"
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
onInput: handleInput,
|
|
246
246
|
onBlur: handleBlur,
|
|
247
247
|
onFocus: handleFocus
|
|
248
|
-
}, null, 42, _hoisted_3$
|
|
248
|
+
}, null, 42, _hoisted_3$D),
|
|
249
249
|
_ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$w, [
|
|
250
250
|
vue.renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
251
251
|
])) : vue.createCommentVNode("", true)
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
262
262
|
};
|
|
263
263
|
const _hoisted_2$J = { class: "tao-input-group__field" };
|
|
264
|
-
const _hoisted_3$
|
|
264
|
+
const _hoisted_3$C = {
|
|
265
265
|
key: 1,
|
|
266
266
|
class: "tao-input-group__addon tao-input-group__addon--after"
|
|
267
267
|
};
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
vue.createElementVNode("div", _hoisted_2$J, [
|
|
297
297
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
298
298
|
]),
|
|
299
|
-
_ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
299
|
+
_ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$C, [
|
|
300
300
|
vue.renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
301
301
|
])) : vue.createCommentVNode("", true)
|
|
302
302
|
], 34);
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
key: 0,
|
|
653
653
|
class: "tao-input-number__steppers"
|
|
654
654
|
};
|
|
655
|
-
const _hoisted_3$
|
|
655
|
+
const _hoisted_3$B = ["aria-label", "disabled"];
|
|
656
656
|
const _hoisted_4$v = { "aria-hidden": "true" };
|
|
657
657
|
const _hoisted_5$n = ["aria-label", "disabled"];
|
|
658
658
|
const _hoisted_6$i = { "aria-hidden": "true" };
|
|
@@ -832,7 +832,7 @@
|
|
|
832
832
|
_cache[2] || (_cache[2] = vue.createTextVNode("+", -1))
|
|
833
833
|
], true)
|
|
834
834
|
])
|
|
835
|
-
], 8, _hoisted_3$
|
|
835
|
+
], 8, _hoisted_3$B),
|
|
836
836
|
vue.createElementVNode("button", {
|
|
837
837
|
type: "button",
|
|
838
838
|
class: "tao-input-number__step",
|
|
@@ -855,7 +855,7 @@
|
|
|
855
855
|
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-3f4e6197"]]);
|
|
856
856
|
const _hoisted_1$O = ["aria-label", "disabled"];
|
|
857
857
|
const _hoisted_2$H = { "aria-hidden": "true" };
|
|
858
|
-
const _hoisted_3$
|
|
858
|
+
const _hoisted_3$A = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
859
859
|
const _hoisted_4$u = ["aria-label", "disabled"];
|
|
860
860
|
const _hoisted_5$m = { "aria-hidden": "true" };
|
|
861
861
|
const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -1026,7 +1026,7 @@
|
|
|
1026
1026
|
onFocus,
|
|
1027
1027
|
onBlur,
|
|
1028
1028
|
onKeydown
|
|
1029
|
-
}, null, 40, _hoisted_3$
|
|
1029
|
+
}, null, 40, _hoisted_3$A),
|
|
1030
1030
|
vue.createElementVNode("button", {
|
|
1031
1031
|
type: "button",
|
|
1032
1032
|
class: "tao-quantity__btn tao-quantity__btn--inc",
|
|
@@ -1053,7 +1053,7 @@
|
|
|
1053
1053
|
key: 0,
|
|
1054
1054
|
class: "tao-card__overlay"
|
|
1055
1055
|
};
|
|
1056
|
-
const _hoisted_3$
|
|
1056
|
+
const _hoisted_3$z = {
|
|
1057
1057
|
key: 1,
|
|
1058
1058
|
class: "tao-card__overlay"
|
|
1059
1059
|
};
|
|
@@ -1129,7 +1129,7 @@
|
|
|
1129
1129
|
_ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$G, [
|
|
1130
1130
|
vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1131
1131
|
])) : vue.createCommentVNode("", true)
|
|
1132
|
-
])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
1132
|
+
])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
|
|
1133
1133
|
vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1134
1134
|
])) : vue.createCommentVNode("", true),
|
|
1135
1135
|
hasContent.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -1197,7 +1197,15 @@
|
|
|
1197
1197
|
if (!event.shiftKey && document.activeElement === last) {
|
|
1198
1198
|
event.preventDefault();
|
|
1199
1199
|
first.focus();
|
|
1200
|
+
return;
|
|
1200
1201
|
}
|
|
1202
|
+
const backwards = event.shiftKey;
|
|
1203
|
+
setTimeout(() => {
|
|
1204
|
+
if (!root.isConnected || root.contains(document.activeElement)) {
|
|
1205
|
+
return;
|
|
1206
|
+
}
|
|
1207
|
+
(backwards ? last : first).focus();
|
|
1208
|
+
}, 0);
|
|
1201
1209
|
}
|
|
1202
1210
|
let locks = 0;
|
|
1203
1211
|
let previousOverflow = "";
|
|
@@ -1229,7 +1237,7 @@
|
|
|
1229
1237
|
key: 0,
|
|
1230
1238
|
class: "tao-modal__header"
|
|
1231
1239
|
};
|
|
1232
|
-
const _hoisted_3$
|
|
1240
|
+
const _hoisted_3$y = ["id"];
|
|
1233
1241
|
const _hoisted_4$s = { key: 1 };
|
|
1234
1242
|
const _hoisted_5$k = ["aria-label"];
|
|
1235
1243
|
const _hoisted_6$g = { "aria-hidden": "true" };
|
|
@@ -1361,7 +1369,7 @@
|
|
|
1361
1369
|
key: 0,
|
|
1362
1370
|
id: vue.unref(titleId),
|
|
1363
1371
|
class: "tao-modal__title"
|
|
1364
|
-
}, vue.toDisplayString(__props.title), 9, _hoisted_3$
|
|
1372
|
+
}, vue.toDisplayString(__props.title), 9, _hoisted_3$y)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$s))
|
|
1365
1373
|
], true),
|
|
1366
1374
|
__props.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
1367
1375
|
key: 0,
|
|
@@ -1614,7 +1622,7 @@
|
|
|
1614
1622
|
}
|
|
1615
1623
|
const _hoisted_1$K = ["aria-disabled"];
|
|
1616
1624
|
const _hoisted_2$D = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-label", "aria-orientation", "aria-disabled", "aria-invalid", "aria-describedby", "onKeydown"];
|
|
1617
|
-
const _hoisted_3$
|
|
1625
|
+
const _hoisted_3$x = {
|
|
1618
1626
|
key: 0,
|
|
1619
1627
|
class: "tao-slider__value"
|
|
1620
1628
|
};
|
|
@@ -1856,7 +1864,7 @@
|
|
|
1856
1864
|
onBlur: _cache[0] || (_cache[0] = ($event) => pointerFocus.value = false)
|
|
1857
1865
|
}, null, 46, _hoisted_2$D);
|
|
1858
1866
|
}), 128)),
|
|
1859
|
-
__props.showValue ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
1867
|
+
__props.showValue ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$x, [
|
|
1860
1868
|
vue.renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
|
|
1861
1869
|
vue.createTextVNode(vue.toDisplayString(barText.value), 1),
|
|
1862
1870
|
vue.renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
|
|
@@ -1953,7 +1961,7 @@
|
|
|
1953
1961
|
});
|
|
1954
1962
|
const _hoisted_1$J = { class: "tao-timeline__controls" };
|
|
1955
1963
|
const _hoisted_2$C = { class: "tao-timeline__track" };
|
|
1956
|
-
const _hoisted_3$
|
|
1964
|
+
const _hoisted_3$w = {
|
|
1957
1965
|
key: 0,
|
|
1958
1966
|
class: "tao-timeline__time"
|
|
1959
1967
|
};
|
|
@@ -2049,7 +2057,7 @@
|
|
|
2049
2057
|
} : void 0
|
|
2050
2058
|
]), 1032, ["model-value", "max", "step", "marks", "marks-side", "variant", "size", "disabled"])
|
|
2051
2059
|
]),
|
|
2052
|
-
__props.showTime ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
2060
|
+
__props.showTime ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$w, [
|
|
2053
2061
|
vue.renderSlot(_ctx.$slots, "time", {
|
|
2054
2062
|
time: __props.modelValue,
|
|
2055
2063
|
length: __props.length,
|
|
@@ -2429,7 +2437,7 @@
|
|
|
2429
2437
|
const spoilerGroupKey = Symbol("taoSpoilerGroup");
|
|
2430
2438
|
const _hoisted_1$H = { class: "tao-spoiler" };
|
|
2431
2439
|
const _hoisted_2$B = ["aria-expanded", "aria-controls"];
|
|
2432
|
-
const _hoisted_3$
|
|
2440
|
+
const _hoisted_3$v = {
|
|
2433
2441
|
key: 0,
|
|
2434
2442
|
class: "tao-spoiler__title"
|
|
2435
2443
|
};
|
|
@@ -2502,7 +2510,7 @@
|
|
|
2502
2510
|
vue.createElementVNode("span", {
|
|
2503
2511
|
class: vue.normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }])
|
|
2504
2512
|
}, "▶", 2),
|
|
2505
|
-
__props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
2513
|
+
__props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$v, [
|
|
2506
2514
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
2507
2515
|
vue.createTextVNode(vue.toDisplayString(__props.title), 1)
|
|
2508
2516
|
], true)
|
|
@@ -2859,7 +2867,7 @@
|
|
|
2859
2867
|
const TaoGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-ad288026"]]);
|
|
2860
2868
|
const _hoisted_1$E = { class: "tao-split__pane tao-split__pane--start" };
|
|
2861
2869
|
const _hoisted_2$A = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
|
|
2862
|
-
const _hoisted_3$
|
|
2870
|
+
const _hoisted_3$u = { class: "tao-split__pane tao-split__pane--end" };
|
|
2863
2871
|
const _hoisted_4$p = {
|
|
2864
2872
|
key: 0,
|
|
2865
2873
|
class: "tao-split__shield"
|
|
@@ -3185,7 +3193,7 @@
|
|
|
3185
3193
|
onDragstart: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
3186
3194
|
}, ["prevent"]))
|
|
3187
3195
|
}, null, 40, _hoisted_2$A),
|
|
3188
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3196
|
+
vue.createElementVNode("div", _hoisted_3$u, [
|
|
3189
3197
|
vue.renderSlot(_ctx.$slots, "end", {}, void 0, true)
|
|
3190
3198
|
]),
|
|
3191
3199
|
isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$p)) : vue.createCommentVNode("", true)
|
|
@@ -3286,7 +3294,7 @@
|
|
|
3286
3294
|
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-49a9f1b2"]]);
|
|
3287
3295
|
const _hoisted_1$C = { class: "tao-image" };
|
|
3288
3296
|
const _hoisted_2$z = ["src", "alt", "loading"];
|
|
3289
|
-
const _hoisted_3$
|
|
3297
|
+
const _hoisted_3$t = { class: "tao-image__placeholder" };
|
|
3290
3298
|
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
3291
3299
|
...{ name: "TaoImage" },
|
|
3292
3300
|
__name: "TaoImage",
|
|
@@ -3331,7 +3339,7 @@
|
|
|
3331
3339
|
onError: handleError
|
|
3332
3340
|
}, null, 42, _hoisted_2$z)) : vue.createCommentVNode("", true),
|
|
3333
3341
|
!__props.src || hasError.value ? vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
3334
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3342
|
+
vue.createElementVNode("div", _hoisted_3$t, vue.toDisplayString(__props.placeholderText), 1)
|
|
3335
3343
|
], true, 1) : vue.createCommentVNode("", true)
|
|
3336
3344
|
]);
|
|
3337
3345
|
};
|
|
@@ -3340,7 +3348,7 @@
|
|
|
3340
3348
|
const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-61f47c52"]]);
|
|
3341
3349
|
const _hoisted_1$B = ["for"];
|
|
3342
3350
|
const _hoisted_2$y = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
|
|
3343
|
-
const _hoisted_3$
|
|
3351
|
+
const _hoisted_3$s = {
|
|
3344
3352
|
key: 0,
|
|
3345
3353
|
class: "tao-checkbox__label"
|
|
3346
3354
|
};
|
|
@@ -3428,7 +3436,7 @@
|
|
|
3428
3436
|
onChange: onInputChange
|
|
3429
3437
|
}, null, 40, _hoisted_2$y),
|
|
3430
3438
|
_cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "tao-checkbox__box" }, null, -1)),
|
|
3431
|
-
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
3439
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$o, [
|
|
3432
3440
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3433
3441
|
])),
|
|
3434
3442
|
vue.renderSlot(_ctx.$slots, "post", { text: __props.label }, void 0, true)
|
|
@@ -3442,7 +3450,7 @@
|
|
|
3442
3450
|
class: "tao-tag__prefix"
|
|
3443
3451
|
};
|
|
3444
3452
|
const _hoisted_2$x = { class: "tao-tag__text" };
|
|
3445
|
-
const _hoisted_3$
|
|
3453
|
+
const _hoisted_3$r = ["aria-label"];
|
|
3446
3454
|
const _hoisted_4$n = { "aria-hidden": "true" };
|
|
3447
3455
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
3448
3456
|
...{ name: "TaoTag" },
|
|
@@ -3514,7 +3522,7 @@
|
|
|
3514
3522
|
_cache[0] || (_cache[0] = vue.createTextVNode("✕", -1))
|
|
3515
3523
|
], true)
|
|
3516
3524
|
])
|
|
3517
|
-
], 8, _hoisted_3$
|
|
3525
|
+
], 8, _hoisted_3$r)) : vue.createCommentVNode("", true)
|
|
3518
3526
|
], 6);
|
|
3519
3527
|
};
|
|
3520
3528
|
}
|
|
@@ -3525,7 +3533,7 @@
|
|
|
3525
3533
|
key: 1,
|
|
3526
3534
|
class: "tao-divider__text"
|
|
3527
3535
|
};
|
|
3528
|
-
const _hoisted_3$
|
|
3536
|
+
const _hoisted_3$q = {
|
|
3529
3537
|
key: 2,
|
|
3530
3538
|
class: "tao-divider__line tao-divider__line--end"
|
|
3531
3539
|
};
|
|
@@ -3568,7 +3576,7 @@
|
|
|
3568
3576
|
vue.createTextVNode(vue.toDisplayString(__props.text), 1)
|
|
3569
3577
|
], true)
|
|
3570
3578
|
])) : vue.createCommentVNode("", true),
|
|
3571
|
-
__props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
3579
|
+
__props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$q)) : vue.createCommentVNode("", true)
|
|
3572
3580
|
], 10, _hoisted_1$z);
|
|
3573
3581
|
};
|
|
3574
3582
|
}
|
|
@@ -3820,13 +3828,23 @@
|
|
|
3820
3828
|
const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-fb037862"]]);
|
|
3821
3829
|
const _hoisted_1$w = ["tabindex", "aria-label"];
|
|
3822
3830
|
const _hoisted_2$t = { class: "tao-scroll-top__content" };
|
|
3831
|
+
const _hoisted_3$p = {
|
|
3832
|
+
key: 1,
|
|
3833
|
+
class: "tao-scroll-top__text",
|
|
3834
|
+
"aria-hidden": "true"
|
|
3835
|
+
};
|
|
3823
3836
|
const RIPPLE_DURATION = 750;
|
|
3824
3837
|
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
3825
|
-
...{ name: "TaoScrollTop" },
|
|
3838
|
+
...{ name: "TaoScrollTop", inheritAttrs: false },
|
|
3826
3839
|
__name: "TaoScrollTop",
|
|
3827
3840
|
props: {
|
|
3841
|
+
variant: { default: "solid" },
|
|
3842
|
+
side: { default: "right" },
|
|
3843
|
+
offset: { default: void 0 },
|
|
3844
|
+
label: { default: void 0 },
|
|
3845
|
+
labelSide: { default: void 0 },
|
|
3828
3846
|
size: { default: 40 },
|
|
3829
|
-
right: { default:
|
|
3847
|
+
right: { default: void 0 },
|
|
3830
3848
|
bottom: { default: 24 },
|
|
3831
3849
|
zIndex: { default: 1e3 },
|
|
3832
3850
|
boundary: { default: 300 },
|
|
@@ -3837,17 +3855,23 @@
|
|
|
3837
3855
|
},
|
|
3838
3856
|
setup(__props) {
|
|
3839
3857
|
const props = __props;
|
|
3840
|
-
useLocaleText(props, "scrollTop");
|
|
3858
|
+
const l10n = useLocaleText(props, "scrollTop");
|
|
3841
3859
|
const fmtProp = (value, unit = "px") => typeof value === "number" ? value + unit : value;
|
|
3842
3860
|
let prevPos = 0;
|
|
3843
3861
|
let activeBack = false;
|
|
3844
|
-
const
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
right: fmtProp(props.right),
|
|
3862
|
+
const isText = vue.computed(() => props.variant === "text");
|
|
3863
|
+
const wrapStyle = vue.computed(() => ({
|
|
3864
|
+
[props.side]: fmtProp(props.offset ?? props.right ?? 24),
|
|
3848
3865
|
bottom: fmtProp(props.bottom),
|
|
3849
3866
|
zIndex: props.zIndex
|
|
3850
|
-
});
|
|
3867
|
+
}));
|
|
3868
|
+
const mainStyle = vue.computed(() => ({
|
|
3869
|
+
height: fmtProp(props.size),
|
|
3870
|
+
...isText.value ? {} : { width: fmtProp(props.size) }
|
|
3871
|
+
}));
|
|
3872
|
+
const captionSide = vue.computed(() => props.labelSide ?? (props.side === "right" ? "left" : "right"));
|
|
3873
|
+
const caption = vue.computed(() => props.label ?? (isText.value ? l10n.value.ariaLabel : void 0));
|
|
3874
|
+
const accessibleName = vue.computed(() => props.ariaLabel || props.label || l10n.value.ariaLabel);
|
|
3851
3875
|
const rippleStyle = vue.reactive({
|
|
3852
3876
|
top: fmtProp(-1 * props.size),
|
|
3853
3877
|
left: fmtProp(-1 * props.size),
|
|
@@ -3890,7 +3914,7 @@
|
|
|
3890
3914
|
isActive.value = tooFar && activeBack;
|
|
3891
3915
|
}
|
|
3892
3916
|
function onClick(e) {
|
|
3893
|
-
if (!isRippleActive.value) {
|
|
3917
|
+
if (!isText.value && !isRippleActive.value) {
|
|
3894
3918
|
const elTarget = e.currentTarget;
|
|
3895
3919
|
if (elTarget) {
|
|
3896
3920
|
const rect = elTarget.getBoundingClientRect();
|
|
@@ -3919,40 +3943,56 @@
|
|
|
3919
3943
|
return (_ctx, _cache) => {
|
|
3920
3944
|
return vue.openBlock(), vue.createBlock(vue.Transition, { name: "tao-scroll-top-fade" }, {
|
|
3921
3945
|
default: vue.withCtx(() => [
|
|
3922
|
-
isActive.value ? (vue.openBlock(), vue.createElementBlock("
|
|
3946
|
+
isActive.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3923
3947
|
key: 0,
|
|
3924
|
-
|
|
3925
|
-
style: vue.normalizeStyle(
|
|
3926
|
-
tabindex: props.tabindex,
|
|
3927
|
-
class: vue.normalizeClass(["tao-scroll-top", { "tao-scroll-top--no-outline": (props.outline ?? props.hasOutline) === false }]),
|
|
3928
|
-
"aria-label": props.ariaLabel,
|
|
3929
|
-
onClick: vue.withModifiers(onClick, ["prevent"])
|
|
3948
|
+
class: "tao-scroll-top-wrap",
|
|
3949
|
+
style: vue.normalizeStyle(wrapStyle.value)
|
|
3930
3950
|
}, [
|
|
3931
|
-
vue.createElementVNode("
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3951
|
+
vue.createElementVNode("button", vue.mergeProps(_ctx.$attrs, {
|
|
3952
|
+
type: "button",
|
|
3953
|
+
style: mainStyle.value,
|
|
3954
|
+
tabindex: props.tabindex,
|
|
3955
|
+
class: ["tao-scroll-top", [
|
|
3956
|
+
`tao-scroll-top--${props.variant}`,
|
|
3957
|
+
{ "tao-scroll-top--no-outline": (props.outline ?? props.hasOutline) === false },
|
|
3958
|
+
isText.value && `tao-scroll-top--caption-${captionSide.value}`
|
|
3959
|
+
]],
|
|
3960
|
+
"aria-label": accessibleName.value,
|
|
3961
|
+
onClick: vue.withModifiers(onClick, ["prevent"])
|
|
3962
|
+
}), [
|
|
3963
|
+
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
|
+
isText.value && caption.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$p, vue.toDisplayString(caption.value), 1)) : vue.createCommentVNode("", true),
|
|
3970
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
3971
|
+
_cache[0] || (_cache[0] = vue.createElementVNode("svg", {
|
|
3972
|
+
class: "tao-scroll-top__icon",
|
|
3973
|
+
viewBox: "0 0 24 24",
|
|
3974
|
+
width: "16",
|
|
3975
|
+
height: "16",
|
|
3976
|
+
fill: "currentColor"
|
|
3977
|
+
}, [
|
|
3978
|
+
vue.createElementVNode("path", { d: "M12 6l-7 7 1.4 1.4L12 8.8l5.6 5.6L19 13z" })
|
|
3979
|
+
], -1))
|
|
3980
|
+
], true)
|
|
3981
|
+
])
|
|
3982
|
+
], 16, _hoisted_1$w),
|
|
3983
|
+
!isText.value && caption.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
3984
|
+
key: 0,
|
|
3985
|
+
class: vue.normalizeClass(["tao-scroll-top__label", `tao-scroll-top__label--${captionSide.value}`]),
|
|
3986
|
+
"aria-hidden": "true"
|
|
3987
|
+
}, vue.toDisplayString(caption.value), 3)) : vue.createCommentVNode("", true)
|
|
3988
|
+
], 4)) : vue.createCommentVNode("", true)
|
|
3949
3989
|
]),
|
|
3950
3990
|
_: 3
|
|
3951
3991
|
});
|
|
3952
3992
|
};
|
|
3953
3993
|
}
|
|
3954
3994
|
});
|
|
3955
|
-
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
3995
|
+
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-89b8959a"]]);
|
|
3956
3996
|
const _hoisted_1$v = { class: "tao-progress" };
|
|
3957
3997
|
const _hoisted_2$s = {
|
|
3958
3998
|
key: 0,
|