@1337exp/taoui 5.23.1 → 5.24.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.24.0
4
+
5
+ Nothing to migrate; the defaults do not change.
6
+
7
+ - **TaoThemeToggle: the light / dark switch as one icon button.** Until now the kit had no switch of its own, only text in the showcase. The icon is the theme a click leads to (a sun while the page is dark, a moon while it is light), the `aria-label` says the same in words (`toLightLabel` / `toDarkLabel`, in both locales). By default it reads `data-tao-mode` of `<html>`, flips it on a click and follows it when somebody else changes it; a palette keeps its name, the old `data-tao-theme="dark"` spelling follows the mode. For your own storage: `v-model` with `:apply="false"`. New icons `tao-sun` and `tao-moon`; `readTaoMode(el)` and `applyTaoMode(el, mode)` are exported. The `#icon` slot (`{ mode, next }`) puts your own glyph in the button, which stays a square with its label. The mode control of the showcase bar is this button now.
8
+
9
+ ## 5.23.2
10
+
11
+ Nothing to migrate; the defaults do not change.
12
+
13
+ - **TaoCopy: the arrow of the tip points at the button at the edge of the window.** When the tip was pushed in from the viewport edge, its arrow stayed in the middle of the tip and no longer pointed at the trigger. It now takes its place from where the trigger falls on the tip (kept off the rounded corners), and it moves to the top edge when the tip flips below the button.
14
+
3
15
  ## 5.23.1
4
16
 
5
17
  Nothing to migrate; the defaults do not change.
package/README.md CHANGED
@@ -59,6 +59,7 @@
59
59
  - **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)
60
60
  - **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
61
61
  - **TaoCopy** — clipboard icon. After a click, a “Copied” tooltip; if the trigger is gone, the tooltip is too
62
+ - **TaoThemeToggle** — the light / dark switch as one icon button (a sun or a moon); reads and flips `data-tao-mode` of `<html>`, or works from `v-model`
62
63
  - **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)
63
64
  - **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)
64
65
  - **TaoInputGroup** — outer glue: `#before` | field | `#after` (protocol, unit, button)
@@ -125,7 +126,7 @@
125
126
  - **TaoScrubber** — play / pause, a slider over time with event marks, a “time / length” label. Does not advance time by itself: drive `v-model` with your own clock
126
127
  - **TaoLoader** — the wait whose end is unknown: `variant` `dots` (default) / `ring` / `pulse`, `tone`, `size` (a number or small / medium / large), says "Loading" to a screen reader (`label`), breathes under reduced motion; `TaoButton loading` wears the same ring
127
128
  - **TaoImage** — `<img>` wrapper: fade-in and placeholder. `lazy` turns on native `loading="lazy"`
128
- - **TaoIcon** — SVG icons (40 built in, your own via `registerTaoIcons`) or an icon font (see Icons below)
129
+ - **TaoIcon** — SVG icons (42 built in, your own via `registerTaoIcons`) or an icon font (see Icons below)
129
130
 
130
131
  ### Navigation
131
132
 
@@ -217,9 +218,9 @@ The package ships a skill, `skills/taoui/SKILL.md` with `references/components.m
217
218
 
218
219
  ## Icons
219
220
 
220
- The library ships **40 SVG icons** (check, close, plus, minus, chevrons, arrows, search, eye, more, grip, play, pause,
221
+ The library ships **42 SVG icons** (check, close, plus, minus, chevrons, arrows, search, eye, more, grip, play, pause,
221
222
  skip-back, copy, calendar, info, alert, circles, folder, file, alignment, and the app actions settings, edit, trash, bell, tag,
222
- repeat, undo, redo). They draw on `currentColor`, so an icon takes the text colour and the
223
+ repeat, undo, redo, sun, moon). They draw on `currentColor`, so an icon takes the text colour and the
223
224
  font size, and live under the reserved prefix `tao-`: `<TaoIcon name="tao-check" />`, the list is `taoIconNames`.
224
225
 
225
226
  ```vue
package/README.ru.md CHANGED
@@ -59,6 +59,7 @@
59
59
  - **TaoButton** — кнопка. `variant`: `primary` / `secondary` / `ghost` / `text`; `tone` красит любой из них (по умолчанию акцент, neutral, success, danger, warning, info). `v-model:pressed` делает её переключателем (`aria-pressed`); `shortcut="N"` показывает клавишу в конце кнопки (`aria-keyshortcuts`; слушать её — дело приложения)
60
60
  - **TaoCard** — карточка со слотами media / header / title / footer и `#corner` (тег, кнопка меню). В `#media` — фото или `TaoCarousel`; `closable` добавляет крестик и событие `close`. `flush` — плитка без padding/тени на всю ячейку; `#overlay` — scrim на media; `stripe="top | left | bottom"` со `stripeTone` (тон или `gradient` палитры) рисует цветную полосу, которую обрезают углы
61
61
  - **TaoCopy** — иконка копирования в буфер. После клика сверху тултип «Скопировано»; если кнопку убрали — тултип тоже
62
+ - **TaoThemeToggle** — переключатель светлой / тёмной темы одной кнопкой-иконкой (солнце или луна); читает и переворачивает `data-tao-mode` у `<html>` либо работает от `v-model`
62
63
  - **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`, `pauseOnHover`, `roundPause` (`false`: без паузы в начале круга), `decorative` (призрак для строки-фона: скрыта от скринридера, не остановка Tab, не реагирует на курсор и тап, не выделяется, без пауз между кругами)
63
64
  - **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки); `variant` `outline` / `filled` / `plain` (без рамки: пункт списка в правке; его берут и `TaoInputNumber`, `TaoCombobox`, `TaoTextarea`)
64
65
  - **TaoInputGroup** — склейка снаружи: `#before` | поле | `#after` (протокол, единица, кнопка)
@@ -125,7 +126,7 @@
125
126
  - **TaoScrubber** — play / pause, слайдер по времени с метками событий, подпись «время / длина». Время сама не двигает: ведите `v-model` своими часами
126
127
  - **TaoLoader** — ожидание, конца которого не знаем: `variant` `dots` (по умолчанию) / `ring` / `pulse`, `tone`, `size` (число или small / medium / large), говорит «Загрузка» скринридеру (`label`), при «уменьшить движение» дышит; `TaoButton loading` носит то же кольцо
127
128
  - **TaoImage** — обёртка над `<img>`: fade-in и плейсхолдер. `lazy` включает нативный `loading="lazy"`
128
- - **TaoIcon** — SVG-иконки (40 встроенных, свои через `registerTaoIcons`) или icon-шрифт (см. раздел «Иконки» ниже)
129
+ - **TaoIcon** — SVG-иконки (42 встроенных, свои через `registerTaoIcons`) или icon-шрифт (см. раздел «Иконки» ниже)
129
130
 
130
131
  ### Навигация и взаимодействие
131
132
 
@@ -218,9 +219,9 @@ Container живёт на другой оси — ширина: `width="wide" |
218
219
 
219
220
  ## Иконки
220
221
 
221
- Библиотека поставляет **40 SVG-иконок** (галочка, крестик, плюс, минус, шевроны, стрелки, поиск, глаз, «ещё», ручка,
222
+ Библиотека поставляет **42 SVG-иконки** (галочка, крестик, плюс, минус, шевроны, стрелки, поиск, глаз, «ещё», ручка,
222
223
  play, pause, skip-back, копия, календарь, info, alert, кружки, папка, файл, выравнивание и действия приложения: настройки,
223
- правка, корзина, колокольчик, тег, повтор, отменить, повторить). Они рисуются через `currentColor`: иконка берёт цвет и
224
+ правка, корзина, колокольчик, тег, повтор, отменить, повторить, солнце, луна). Они рисуются через `currentColor`: иконка берёт цвет и
224
225
  размер текста. Имена с зарезервированной приставкой `tao-`: `<TaoIcon name="tao-check" />`, список — `taoIconNames`.
225
226
 
226
227
  ```vue