@1337exp/taoui 5.21.0 → 5.22.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 +9 -0
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.js +40 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/references/components.md +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.22.0
|
|
4
|
+
|
|
5
|
+
Nothing to migrate; the defaults do not change.
|
|
6
|
+
|
|
7
|
+
- **`TaoPinCode` `bordered`.** `:bordered="false"` is a light style: the cells have a soft fill and no frame at all (the border stays in the box, so the cells do not jump). A state is told by the fill and the digit instead: a tint of the accent on the focus, of danger on an error, of success on a result.
|
|
8
|
+
- **`TaoPinCode`: an error paints the digits red**, as a success always painted them green (`--tao-color-danger-text`).
|
|
9
|
+
- **`TaoDrawer`: the pull of a sheet no longer selects the title.** While the sheet is in the hand the panel has `user-select: none`, and it is given back at the end.
|
|
10
|
+
- **`TaoDrawer`: a pointer that vanishes lets go.** The blur of the window, a tab that goes to the background, `pagehide` and a taken capture (`lostpointercapture`) end the pull as a cancel: the sheet settles back and does not close, and the next pull starts clean. The same guard `TaoCarousel` has had.
|
|
11
|
+
|
|
3
12
|
## 5.21.0
|
|
4
13
|
|
|
5
14
|
Nothing to migrate; the defaults do not change.
|
package/README.md
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
- **TaoInputNumber** — number with min/max/step and ± on the right. Empty value is `null`. `@commit` fires once when an edit is finished (blur, Enter, ±, arrow), unlike `v-model`, which updates on every keystroke
|
|
95
95
|
- **TaoQuantity** — cart quantity: `− | field | +`, integers, stock; minus at the minimum can remove the row
|
|
96
96
|
- **TaoTextarea** — autosizing multiline. `maxlength` caps input, `count` shows “entered / max”. `variant`: `bar` (default) / `outline` (frame like Input) / `filled` / `plain`; `readonly`; `align`; `blurOnEnter`
|
|
97
|
-
- **TaoPinCode** — N cells. By default a click clears the cell and everything to the right (`clear-on="focus"`); `clear-on="input"` replaces the digit only when typing. `format="#-##-##"` draws visual separators (not part of the value; a paste in that shape or as a clean code is split into cells). The last cell blurs and emits `complete`; `status="success | error"` (set after `complete`) glows or shakes the cells and says it to a screen reader
|
|
97
|
+
- **TaoPinCode** — N cells. By default a click clears the cell and everything to the right (`clear-on="focus"`); `clear-on="input"` replaces the digit only when typing. `format="#-##-##"` draws visual separators (not part of the value; a paste in that shape or as a clean code is split into cells). The last cell blurs and emits `complete`; `status="success | error"` (set after `complete`) glows or shakes the cells and says it to a screen reader; `bordered="false"` is a light style with no frame
|
|
98
98
|
- **TaoSlider** / **TaoRangeSlider** — one thumb (`v-model` is a number) or two (`[from, to]`, `minGap`). Mouse, touch, arrows. `marks` (ticks, numbers, `{ value, label }`), `discrete` for stepped scales, `vertical`, `flat`, `format`; `variant="thin"` is a thin track for seek / volume
|
|
99
99
|
- **TaoColorPicker** — saturation / brightness square, hue and opacity strips, swatches, eyedropper (where the browser has `EyeDropper`), HEX / RGB / HSL input modes. `v-model` is a hex string; `colorModel()` adapts your own colour storage
|
|
100
100
|
- **TaoColorInput** — a field with a swatch and the hex text; the picker opens in a popover
|
package/README.ru.md
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
- **TaoInputNumber** — число с min/max/step и кнопками ± справа. Пустое значение — `null`. `@commit` срабатывает один раз, когда правка закончена (blur, Enter, ±, стрелка), в отличие от `v-model`, который обновляется на каждую клавишу
|
|
95
95
|
- **TaoQuantity** — количество в корзине: `− | поле | +`, целые штуки, сток, минус на минимуме может убрать строку
|
|
96
96
|
- **TaoTextarea** — многострочное поле с авто-высотой. `maxlength` ограничивает ввод, `count` показывает «введено / максимум». `variant`: `bar` (по умолчанию) / `outline` (рамка как у Input) / `filled` / `plain`; `readonly`; `align`; `blurOnEnter`
|
|
97
|
-
- **TaoPinCode** — пин-код из N полей. По умолчанию клик стирает ячейку и все справа (`clear-on="focus"`); `clear-on="input"` заменяет цифру только при вводе. `format="#-##-##"` рисует визуальные разделители (в значение не входят; вставка в таком виде или чистым кодом раскладывается по ячейкам). Последняя ячейка снимает фокус и эмитит `complete`; `status="success | error"` (после `complete`) подсвечивает или встряхивает ячейки и говорит об этом
|
|
97
|
+
- **TaoPinCode** — пин-код из N полей. По умолчанию клик стирает ячейку и все справа (`clear-on="focus"`); `clear-on="input"` заменяет цифру только при вводе. `format="#-##-##"` рисует визуальные разделители (в значение не входят; вставка в таком виде или чистым кодом раскладывается по ячейкам). Последняя ячейка снимает фокус и эмитит `complete`; `status="success | error"` (после `complete`) подсвечивает или встряхивает ячейки и говорит об этом скринридеру; `bordered="false"` — лёгкий стиль без рамки
|
|
98
98
|
- **TaoSlider** / **TaoRangeSlider** — один бегунок (`v-model` — число) или два (`[от, до]`, `minGap`). Мышь, тач, стрелки. `marks` (деления, числа, `{ value, label }`), `discrete` для ступенчатых шкал, `vertical`, `flat`, `format`; `variant="thin"` — тонкий трек для seek / громкости
|
|
99
99
|
- **TaoColorPicker** — квадрат насыщенности и яркости, полосы тона и прозрачности, образцы, пипетка (где есть `EyeDropper`), режимы ввода HEX / RGB / HSL. `v-model` — строка hex; `colorModel()` подключает ваше собственное хранилище цвета
|
|
100
100
|
- **TaoColorInput** — поле с образцом и hex-текстом; палитра открывается в поповере
|
package/dist/index.d.ts
CHANGED
|
@@ -7130,6 +7130,13 @@ placeholder?: string;
|
|
|
7130
7130
|
disabled?: boolean;
|
|
7131
7131
|
/** Red frame. The message goes to TaoFormField `error`. / Красная рамка. Текст ошибки — в `error` у TaoFormField. */
|
|
7132
7132
|
error?: boolean;
|
|
7133
|
+
/**
|
|
7134
|
+
* The frame of the cells. `false` is the light style: a soft fill and no frame at all; the focus, an error and a result
|
|
7135
|
+
* are told by a tint of the fill and, for the last two, by the colour of the digit.
|
|
7136
|
+
* Рамка ячеек. `false` — лёгкий стиль: мягкая заливка и никакой рамки; фокус, ошибку и результат говорят оттенок
|
|
7137
|
+
* заливки и, у последних двух, цвет цифры.
|
|
7138
|
+
*/
|
|
7139
|
+
bordered?: boolean;
|
|
7133
7140
|
/** Cell size; without it — the size of ancestors. / Размер ячеек; без него — размер предков. */
|
|
7134
7141
|
size?: TaoSize;
|
|
7135
7142
|
modelValue?: string;
|
|
@@ -7151,6 +7158,7 @@ masked: boolean;
|
|
|
7151
7158
|
placeholder: string;
|
|
7152
7159
|
disabled: boolean;
|
|
7153
7160
|
error: boolean;
|
|
7161
|
+
bordered: boolean;
|
|
7154
7162
|
modelValue: string;
|
|
7155
7163
|
numbersOnly: boolean;
|
|
7156
7164
|
clearOn: string;
|
|
@@ -7182,6 +7190,13 @@ placeholder?: string;
|
|
|
7182
7190
|
disabled?: boolean;
|
|
7183
7191
|
/** Red frame. The message goes to TaoFormField `error`. / Красная рамка. Текст ошибки — в `error` у TaoFormField. */
|
|
7184
7192
|
error?: boolean;
|
|
7193
|
+
/**
|
|
7194
|
+
* The frame of the cells. `false` is the light style: a soft fill and no frame at all; the focus, an error and a result
|
|
7195
|
+
* are told by a tint of the fill and, for the last two, by the colour of the digit.
|
|
7196
|
+
* Рамка ячеек. `false` — лёгкий стиль: мягкая заливка и никакой рамки; фокус, ошибку и результат говорят оттенок
|
|
7197
|
+
* заливки и, у последних двух, цвет цифры.
|
|
7198
|
+
*/
|
|
7199
|
+
bordered?: boolean;
|
|
7185
7200
|
/** Cell size; without it — the size of ancestors. / Размер ячеек; без него — размер предков. */
|
|
7186
7201
|
size?: TaoSize;
|
|
7187
7202
|
modelValue?: string;
|
|
@@ -7203,6 +7218,7 @@ masked: boolean;
|
|
|
7203
7218
|
placeholder: string;
|
|
7204
7219
|
disabled: boolean;
|
|
7205
7220
|
error: boolean;
|
|
7221
|
+
bordered: boolean;
|
|
7206
7222
|
modelValue: string;
|
|
7207
7223
|
numbersOnly: boolean;
|
|
7208
7224
|
clearOn: string;
|
|
@@ -7222,6 +7238,7 @@ placeholder: string;
|
|
|
7222
7238
|
error: boolean;
|
|
7223
7239
|
modelValue: string;
|
|
7224
7240
|
successText: string;
|
|
7241
|
+
bordered: boolean;
|
|
7225
7242
|
masked: boolean;
|
|
7226
7243
|
numbersOnly: boolean;
|
|
7227
7244
|
clearOn: "focus" | "input";
|
package/dist/index.js
CHANGED
|
@@ -6866,6 +6866,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
6866
6866
|
placeholder: { default: "" },
|
|
6867
6867
|
disabled: { type: Boolean, default: false },
|
|
6868
6868
|
error: { type: Boolean, default: false },
|
|
6869
|
+
bordered: { type: Boolean, default: true },
|
|
6869
6870
|
size: {},
|
|
6870
6871
|
modelValue: { default: "" },
|
|
6871
6872
|
numbersOnly: { type: Boolean, default: false },
|
|
@@ -7072,6 +7073,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
7072
7073
|
unref(sizeClass)(__props.size),
|
|
7073
7074
|
{
|
|
7074
7075
|
"tao-pin-code--disabled": __props.disabled,
|
|
7076
|
+
"tao-pin-code--plain": !__props.bordered,
|
|
7075
7077
|
"tao-pin-code--success": __props.status === "success",
|
|
7076
7078
|
"tao-pin-code--shake": playing.value === "error",
|
|
7077
7079
|
"tao-pin-code--glow": playing.value === "success"
|
|
@@ -7117,7 +7119,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
7117
7119
|
};
|
|
7118
7120
|
}
|
|
7119
7121
|
});
|
|
7120
|
-
const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-
|
|
7122
|
+
const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-bb653baa"]]);
|
|
7121
7123
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
7122
7124
|
...{ name: "TaoLink" },
|
|
7123
7125
|
__name: "TaoLink",
|
|
@@ -10775,6 +10777,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10775
10777
|
}
|
|
10776
10778
|
drag = { pointerId: event.pointerId, startY: event.clientY, moved: false, offset: 0, samples: [{ t: event.timeStamp, y: event.clientY }] };
|
|
10777
10779
|
capture(event.pointerId, true);
|
|
10780
|
+
if (panelRef.value) {
|
|
10781
|
+
panelRef.value.style.userSelect = "none";
|
|
10782
|
+
}
|
|
10778
10783
|
}
|
|
10779
10784
|
function onPointerMove(event) {
|
|
10780
10785
|
if (!drag || event.pointerId !== drag.pointerId) {
|
|
@@ -10793,17 +10798,35 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10793
10798
|
setSheet(drag.offset, false);
|
|
10794
10799
|
}
|
|
10795
10800
|
async function onPointerEnd(event) {
|
|
10801
|
+
if (drag && event.pointerId === drag.pointerId) {
|
|
10802
|
+
await endDrag(event.type === "pointerup", event.pointerId);
|
|
10803
|
+
}
|
|
10804
|
+
}
|
|
10805
|
+
function abortDrag() {
|
|
10806
|
+
if (drag) {
|
|
10807
|
+
void endDrag(false, drag.pointerId);
|
|
10808
|
+
}
|
|
10809
|
+
}
|
|
10810
|
+
function onHidden() {
|
|
10811
|
+
if (document.hidden) {
|
|
10812
|
+
abortDrag();
|
|
10813
|
+
}
|
|
10814
|
+
}
|
|
10815
|
+
async function endDrag(released, pointerId) {
|
|
10796
10816
|
const current2 = drag;
|
|
10797
|
-
if (!current2
|
|
10817
|
+
if (!current2) {
|
|
10798
10818
|
return;
|
|
10799
10819
|
}
|
|
10800
10820
|
drag = null;
|
|
10801
|
-
capture(
|
|
10821
|
+
capture(pointerId, false);
|
|
10822
|
+
if (panelRef.value) {
|
|
10823
|
+
panelRef.value.style.userSelect = "";
|
|
10824
|
+
}
|
|
10802
10825
|
if (!current2.moved) {
|
|
10803
10826
|
return;
|
|
10804
10827
|
}
|
|
10805
10828
|
const height = panelRef.value?.offsetHeight ?? 0;
|
|
10806
|
-
if (
|
|
10829
|
+
if (released && shouldDismissSheet(current2.offset, height, releaseVelocity(current2.samples))) {
|
|
10807
10830
|
setSheet(height, true);
|
|
10808
10831
|
close();
|
|
10809
10832
|
await nextTick();
|
|
@@ -10828,6 +10851,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10828
10851
|
trapTab(event, panelRef.value);
|
|
10829
10852
|
}
|
|
10830
10853
|
}
|
|
10854
|
+
onMounted(() => {
|
|
10855
|
+
window.addEventListener("blur", abortDrag);
|
|
10856
|
+
window.addEventListener("pagehide", abortDrag);
|
|
10857
|
+
document.addEventListener("visibilitychange", onHidden);
|
|
10858
|
+
});
|
|
10859
|
+
onBeforeUnmount(() => {
|
|
10860
|
+
window.removeEventListener("blur", abortDrag);
|
|
10861
|
+
window.removeEventListener("pagehide", abortDrag);
|
|
10862
|
+
document.removeEventListener("visibilitychange", onHidden);
|
|
10863
|
+
});
|
|
10831
10864
|
useLayer(() => props.modelValue, { lockScroll: true, restoreFocus: true, onEscape: close });
|
|
10832
10865
|
watch(
|
|
10833
10866
|
() => props.modelValue,
|
|
@@ -10866,7 +10899,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10866
10899
|
onPointerdown: onPointerDown,
|
|
10867
10900
|
onPointermove: onPointerMove,
|
|
10868
10901
|
onPointerup: onPointerEnd,
|
|
10869
|
-
onPointercancel: onPointerEnd
|
|
10902
|
+
onPointercancel: onPointerEnd,
|
|
10903
|
+
onLostpointercapture: abortDrag
|
|
10870
10904
|
}), [
|
|
10871
10905
|
__props.side === "bottom" ? (openBlock(), createElementBlock("span", _hoisted_2$7)) : createCommentVNode("", true),
|
|
10872
10906
|
_ctx.$slots.header || __props.title || showCloseButton.value ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
@@ -10906,7 +10940,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10906
10940
|
};
|
|
10907
10941
|
}
|
|
10908
10942
|
});
|
|
10909
|
-
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
10943
|
+
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-a108b5eb"]]);
|
|
10910
10944
|
const _hoisted_1$7 = ["title"];
|
|
10911
10945
|
const _hoisted_2$6 = { class: "tao-avatar__face" };
|
|
10912
10946
|
const _hoisted_3$5 = ["src", "alt"];
|