@1337exp/taoui 5.20.0 → 5.21.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 +14 -0
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/dist/index.d.ts +58 -0
- package/dist/index.js +13 -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 +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.21.0
|
|
4
|
+
|
|
5
|
+
Nothing to migrate; the defaults do not change.
|
|
6
|
+
|
|
7
|
+
- **`TaoMarquee` `decorative`: a line that is only a picture.** For a marquee used as a design feature, in the background. A ghost: `aria-hidden` and `inert` (not a tab stop, nothing to select, no reaction to a cursor or a tap), `pointer-events: none`, and it runs round without a pause, like a looped GIF. Under «reduce motion» it stands still and is clipped, it does not wrap. Use it only for text nobody needs to read: the stop that WCAG 2.2.2 asks of moving content does not apply to pure decoration, and a screen reader will not see it.
|
|
8
|
+
- **`TaoMarquee` `roundPause`.** The rest at the start of every round can be turned off for any line (`:round-pause="false"`): the round is one line plus the gap and the loop has no seam. Not set, it follows `decorative` (no rest) and an ordinary line keeps its rest.
|
|
9
|
+
|
|
10
|
+
## 5.20.1
|
|
11
|
+
|
|
12
|
+
Nothing to migrate; the defaults do not change.
|
|
13
|
+
|
|
14
|
+
- **`TaoMarquee`: `pauseOnHover="false"` is a background line now.** The prop was there, but a line used as a design feature still stopped for a tap and could be selected while it ran. With `pauseOnHover` off a cursor or a finger passing by does not stop it, and the running text has `user-select: none`. Focus still stops it and a running line stays a tab stop, so the keyboard keeps its way to stop moving content (WCAG 2.2.2). The showcase has a background line.
|
|
15
|
+
- Showcase: the numbers promised by the palettes sit under the palette lab, with the other colour blocks of the section.
|
|
16
|
+
|
|
3
17
|
## 5.20.0
|
|
4
18
|
|
|
5
19
|
Nothing to migrate; the library does not change.
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
- **TaoButton** — `variant`: `primary` / `secondary` / `ghost` / `text`; `tone` colours any of them (accent by default, neutral, success, danger, warning, info). `v-model:pressed` makes it a toggle (`aria-pressed`); `shortcut="N"` shows the key at the end of the button (`aria-keyshortcuts`; listening to it is the app's job)
|
|
56
56
|
- **TaoCard** — card with media / header / title / footer slots and a `#corner` (a tag, a menu button). `#media` can be a photo or `TaoCarousel`; `closable` adds a cross and the `close` event. `flush` is a tile (no padding/shadow, fills the cell); `#overlay` is a scrim on the media; `stripe="top | left | bottom"` with `stripeTone` (a tone or the palette `gradient`) draws a coloured stripe the corners clip
|
|
57
57
|
- **TaoCopy** — clipboard icon. After a click, a “Copied” tooltip; if the trigger is gone, the tooltip is too
|
|
58
|
-
- **TaoMarquee** — one line that never wraps: when it does not fit it runs round with fading edges and a pause at the start of every round, when it fits it stands still. Stops on hover, on focus and on a tap (WCAG 2.2.2); wraps with «reduce motion»; a screen reader reads it once. `text` or inline content in the slot, `speed`, `gap`, `fade` (the left fade takes that much room left of the text: give the parent the padding), `paused`
|
|
58
|
+
- **TaoMarquee** — one line that never wraps: when it does not fit it runs round with fading edges and a pause at the start of every round, when it fits it stands still. Stops on hover, on focus and on a tap (WCAG 2.2.2); wraps with «reduce motion»; a screen reader reads it once. `text` or inline content in the slot, `speed`, `gap`, `fade` (the left fade takes that much room left of the text: give the parent the padding), `paused`, `pauseOnHover`, `roundPause` (`false`: no rest at the start of a round), `decorative` (a ghost for a background line: hidden from a screen reader, no tab stop, no reaction to a cursor or a tap, no selection, no pause between rounds)
|
|
59
59
|
- **TaoInput** — text field with v-model, validation, and `#prefix` / `#suffix` slots (icon or text inside the frame); `variant` `outline` / `filled` / `plain` (no frame: an item of a list being edited; `TaoInputNumber`, `TaoCombobox` and `TaoTextarea` take it too)
|
|
60
60
|
- **TaoInputGroup** — outer glue: `#before` | field | `#after` (protocol, unit, button)
|
|
61
61
|
- **TaoModal** — modal with animation and slots; `fullscreen` (or `fullscreen="narrow"`: a page on a phone, a dialog on a computer); `surface="grain"` / `"glass"`, class and attributes on the dialog panel; the content scrolls under a header and a footer that stay
|
package/README.ru.md
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
- **TaoButton** — кнопка. `variant`: `primary` / `secondary` / `ghost` / `text`; `tone` красит любой из них (по умолчанию акцент, neutral, success, danger, warning, info). `v-model:pressed` делает её переключателем (`aria-pressed`); `shortcut="N"` показывает клавишу в конце кнопки (`aria-keyshortcuts`; слушать её — дело приложения)
|
|
56
56
|
- **TaoCard** — карточка со слотами media / header / title / footer и `#corner` (тег, кнопка меню). В `#media` — фото или `TaoCarousel`; `closable` добавляет крестик и событие `close`. `flush` — плитка без padding/тени на всю ячейку; `#overlay` — scrim на media; `stripe="top | left | bottom"` со `stripeTone` (тон или `gradient` палитры) рисует цветную полосу, которую обрезают углы
|
|
57
57
|
- **TaoCopy** — иконка копирования в буфер. После клика сверху тултип «Скопировано»; если кнопку убрали — тултип тоже
|
|
58
|
-
- **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`
|
|
58
|
+
- **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`, `pauseOnHover`, `roundPause` (`false`: без паузы в начале круга), `decorative` (призрак для строки-фона: скрыта от скринридера, не остановка Tab, не реагирует на курсор и тап, не выделяется, без пауз между кругами)
|
|
59
59
|
- **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки); `variant` `outline` / `filled` / `plain` (без рамки: пункт списка в правке; его берут и `TaoInputNumber`, `TaoCombobox`, `TaoTextarea`)
|
|
60
60
|
- **TaoInputGroup** — склейка снаружи: `#before` | поле | `#after` (протокол, единица, кнопка)
|
|
61
61
|
- **TaoModal** — модальное окно с анимацией и слотами; `fullscreen` (или `fullscreen="narrow"`: страница на телефоне, окно на компьютере); `surface="grain"` / `"glass"`, класс и атрибуты — на панели окна; прокручивается содержимое под шапкой и подвалом, которые на месте
|
package/dist/index.d.ts
CHANGED
|
@@ -1520,7 +1520,33 @@ gap?: number;
|
|
|
1520
1520
|
* родителю нужно столько места слева (его padding), иначе бегущий текст покажется за его краем. 0 — без затухания.
|
|
1521
1521
|
*/
|
|
1522
1522
|
fade?: number;
|
|
1523
|
+
/**
|
|
1524
|
+
* Stops under the pointer, and a tap stops and starts it. Turn it off when the line is a background (a design
|
|
1525
|
+
* feature): a cursor or a finger passing by does not stop it, and its text cannot be selected (a line that runs
|
|
1526
|
+
* away from a selection is no text to copy). Focus still stops it, and it is still a tab stop while it runs.
|
|
1527
|
+
* Останавливается под курсором, а тап останавливает и запускает. Выключите, когда строка — фон (приём дизайна):
|
|
1528
|
+
* мимо идущий курсор или палец её не останавливает, а текст не выделяется (убегающую строку не скопировать).
|
|
1529
|
+
* Фокус всё равно останавливает, и пока строка бежит, она остаётся остановкой Tab.
|
|
1530
|
+
*/
|
|
1523
1531
|
pauseOnHover?: boolean;
|
|
1532
|
+
/**
|
|
1533
|
+
* A pause at the start of every round, to read the beginning. Off, the line runs round without a stop, like a
|
|
1534
|
+
* looped picture. Without it set, a decorative line has no pause and an ordinary one has.
|
|
1535
|
+
* Пауза в начале каждого круга, чтобы прочитать начало. Выключенная — строка бежит по кругу без остановок, как
|
|
1536
|
+
* зацикленная картинка. Если не задана: у декоративной строки паузы нет, у обычной есть.
|
|
1537
|
+
*/
|
|
1538
|
+
roundPause?: boolean;
|
|
1539
|
+
/**
|
|
1540
|
+
* A line that is only decoration (a background, a design feature) and carries no meaning: a ghost. Hidden from a
|
|
1541
|
+
* screen reader, not a tab stop, nothing under a cursor or a finger reacts, the text cannot be selected, and it
|
|
1542
|
+
* runs round without a pause. Only for text nobody needs to read: the stop that WCAG 2.2.2 asks of moving content
|
|
1543
|
+
* does not apply to pure decoration. With «reduce motion» it stands still and is clipped, it does not wrap.
|
|
1544
|
+
* Строка-декор (фон, приём дизайна) без смысла: призрак. Скрыта от скринридера, не остановка Tab, курсор и палец
|
|
1545
|
+
* для неё пустое место, текст не выделяется, бежит по кругу без пауз. Только для текста, который никому не нужно
|
|
1546
|
+
* читать: остановка, которую WCAG 2.2.2 требует от движения, чистому декору не нужна. При «уменьшить движение» стоит
|
|
1547
|
+
* и обрезана, не переносится.
|
|
1548
|
+
*/
|
|
1549
|
+
decorative?: boolean;
|
|
1524
1550
|
/** Stopped by the app. / Остановлена приложением. */
|
|
1525
1551
|
paused?: boolean;
|
|
1526
1552
|
}>, {
|
|
@@ -1529,6 +1555,8 @@ speed: number;
|
|
|
1529
1555
|
gap: number;
|
|
1530
1556
|
fade: number;
|
|
1531
1557
|
pauseOnHover: boolean;
|
|
1558
|
+
roundPause: undefined;
|
|
1559
|
+
decorative: boolean;
|
|
1532
1560
|
paused: boolean;
|
|
1533
1561
|
}>>, {
|
|
1534
1562
|
/** Measures again (after the content changed in a way the marquee cannot see). / Перемерить. */
|
|
@@ -1548,7 +1576,33 @@ gap?: number;
|
|
|
1548
1576
|
* родителю нужно столько места слева (его padding), иначе бегущий текст покажется за его краем. 0 — без затухания.
|
|
1549
1577
|
*/
|
|
1550
1578
|
fade?: number;
|
|
1579
|
+
/**
|
|
1580
|
+
* Stops under the pointer, and a tap stops and starts it. Turn it off when the line is a background (a design
|
|
1581
|
+
* feature): a cursor or a finger passing by does not stop it, and its text cannot be selected (a line that runs
|
|
1582
|
+
* away from a selection is no text to copy). Focus still stops it, and it is still a tab stop while it runs.
|
|
1583
|
+
* Останавливается под курсором, а тап останавливает и запускает. Выключите, когда строка — фон (приём дизайна):
|
|
1584
|
+
* мимо идущий курсор или палец её не останавливает, а текст не выделяется (убегающую строку не скопировать).
|
|
1585
|
+
* Фокус всё равно останавливает, и пока строка бежит, она остаётся остановкой Tab.
|
|
1586
|
+
*/
|
|
1551
1587
|
pauseOnHover?: boolean;
|
|
1588
|
+
/**
|
|
1589
|
+
* A pause at the start of every round, to read the beginning. Off, the line runs round without a stop, like a
|
|
1590
|
+
* looped picture. Without it set, a decorative line has no pause and an ordinary one has.
|
|
1591
|
+
* Пауза в начале каждого круга, чтобы прочитать начало. Выключенная — строка бежит по кругу без остановок, как
|
|
1592
|
+
* зацикленная картинка. Если не задана: у декоративной строки паузы нет, у обычной есть.
|
|
1593
|
+
*/
|
|
1594
|
+
roundPause?: boolean;
|
|
1595
|
+
/**
|
|
1596
|
+
* A line that is only decoration (a background, a design feature) and carries no meaning: a ghost. Hidden from a
|
|
1597
|
+
* screen reader, not a tab stop, nothing under a cursor or a finger reacts, the text cannot be selected, and it
|
|
1598
|
+
* runs round without a pause. Only for text nobody needs to read: the stop that WCAG 2.2.2 asks of moving content
|
|
1599
|
+
* does not apply to pure decoration. With «reduce motion» it stands still and is clipped, it does not wrap.
|
|
1600
|
+
* Строка-декор (фон, приём дизайна) без смысла: призрак. Скрыта от скринридера, не остановка Tab, курсор и палец
|
|
1601
|
+
* для неё пустое место, текст не выделяется, бежит по кругу без пауз. Только для текста, который никому не нужно
|
|
1602
|
+
* читать: остановка, которую WCAG 2.2.2 требует от движения, чистому декору не нужна. При «уменьшить движение» стоит
|
|
1603
|
+
* и обрезана, не переносится.
|
|
1604
|
+
*/
|
|
1605
|
+
decorative?: boolean;
|
|
1552
1606
|
/** Stopped by the app. / Остановлена приложением. */
|
|
1553
1607
|
paused?: boolean;
|
|
1554
1608
|
}>, {
|
|
@@ -1557,6 +1611,8 @@ speed: number;
|
|
|
1557
1611
|
gap: number;
|
|
1558
1612
|
fade: number;
|
|
1559
1613
|
pauseOnHover: boolean;
|
|
1614
|
+
roundPause: undefined;
|
|
1615
|
+
decorative: boolean;
|
|
1560
1616
|
paused: boolean;
|
|
1561
1617
|
}>>> & Readonly<{}>, {
|
|
1562
1618
|
text: string;
|
|
@@ -1565,6 +1621,8 @@ gap: number;
|
|
|
1565
1621
|
paused: boolean;
|
|
1566
1622
|
fade: number;
|
|
1567
1623
|
pauseOnHover: boolean;
|
|
1624
|
+
roundPause: boolean;
|
|
1625
|
+
decorative: boolean;
|
|
1568
1626
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1569
1627
|
|
|
1570
1628
|
declare const __VLS_component_46: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_46<__VLS_TypePropsToRuntimeProps_50<{
|
package/dist/index.js
CHANGED
|
@@ -6668,7 +6668,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
6668
6668
|
}
|
|
6669
6669
|
});
|
|
6670
6670
|
const TaoTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-48847c47"]]);
|
|
6671
|
-
const _hoisted_1$u = ["tabindex"];
|
|
6671
|
+
const _hoisted_1$u = ["tabindex", "aria-hidden", "inert"];
|
|
6672
6672
|
const _hoisted_2$r = { class: "tao-marquee__item" };
|
|
6673
6673
|
const _hoisted_3$n = {
|
|
6674
6674
|
key: 0,
|
|
@@ -6685,6 +6685,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
6685
6685
|
gap: { default: 48 },
|
|
6686
6686
|
fade: { default: 22 },
|
|
6687
6687
|
pauseOnHover: { type: Boolean, default: true },
|
|
6688
|
+
roundPause: { type: Boolean, default: void 0 },
|
|
6689
|
+
decorative: { type: Boolean, default: false },
|
|
6688
6690
|
paused: { type: Boolean, default: false }
|
|
6689
6691
|
},
|
|
6690
6692
|
setup(__props, { expose: __expose }) {
|
|
@@ -6700,7 +6702,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
6700
6702
|
let motionQuery = null;
|
|
6701
6703
|
const overflowing = computed(() => itemWidth.value > boxWidth.value + 1);
|
|
6702
6704
|
const running = computed(() => overflowing.value && !reduce.value);
|
|
6703
|
-
const wrapping = computed(() => overflowing.value && reduce.value);
|
|
6705
|
+
const wrapping = computed(() => overflowing.value && reduce.value && !props.decorative);
|
|
6706
|
+
const restAtStart = computed(() => props.roundPause ?? !props.decorative);
|
|
6704
6707
|
const stopped = computed(() => props.paused || tapped.value);
|
|
6705
6708
|
const trackStyle = computed(() => {
|
|
6706
6709
|
const shift = itemWidth.value + props.gap;
|
|
@@ -6722,7 +6725,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
6722
6725
|
reduce.value = Boolean(motionQuery?.matches);
|
|
6723
6726
|
}
|
|
6724
6727
|
function onPointerUp(event) {
|
|
6725
|
-
if (running.value && event.pointerType !== "mouse") {
|
|
6728
|
+
if (!props.decorative && props.pauseOnHover && running.value && event.pointerType !== "mouse") {
|
|
6726
6729
|
tapped.value = !tapped.value;
|
|
6727
6730
|
}
|
|
6728
6731
|
}
|
|
@@ -6761,10 +6764,14 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
6761
6764
|
"tao-marquee--run": running.value,
|
|
6762
6765
|
"tao-marquee--wrap": wrapping.value,
|
|
6763
6766
|
"tao-marquee--stopped": stopped.value,
|
|
6764
|
-
"tao-marquee--hover-pause": __props.pauseOnHover
|
|
6767
|
+
"tao-marquee--hover-pause": __props.pauseOnHover && !__props.decorative,
|
|
6768
|
+
"tao-marquee--seamless": !restAtStart.value,
|
|
6769
|
+
"tao-marquee--ghost": __props.decorative
|
|
6765
6770
|
}]),
|
|
6766
6771
|
style: normalizeStyle({ "--_fade": `${__props.fade}px` }),
|
|
6767
|
-
tabindex: running.value ? 0 : void 0,
|
|
6772
|
+
tabindex: running.value && !__props.decorative ? 0 : void 0,
|
|
6773
|
+
"aria-hidden": __props.decorative ? "true" : void 0,
|
|
6774
|
+
inert: __props.decorative || void 0,
|
|
6768
6775
|
onPointerup: onPointerUp
|
|
6769
6776
|
}, [
|
|
6770
6777
|
createElementVNode("span", {
|
|
@@ -6797,7 +6804,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
6797
6804
|
};
|
|
6798
6805
|
}
|
|
6799
6806
|
});
|
|
6800
|
-
const TaoMarquee = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-
|
|
6807
|
+
const TaoMarquee = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-300f470a"]]);
|
|
6801
6808
|
const PIN_CELL = "#";
|
|
6802
6809
|
function parsePinFormat(format) {
|
|
6803
6810
|
const mask = [...format];
|