@1337exp/taoui 5.31.0 → 5.32.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 +18 -0
- package/README.md +5 -4
- package/README.ru.md +5 -4
- package/dist/index.d.ts +231 -56
- package/dist/index.js +863 -489
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +6 -3
- package/skills/taoui/references/components.md +28 -4
- package/skills/taoui/references/patterns.md +210 -163
- package/src/styles/contexts/tone.css +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.32.1
|
|
4
|
+
|
|
5
|
+
Nothing to migrate; one look changes: the confirm dialog has no bar on its left edge.
|
|
6
|
+
|
|
7
|
+
- **`confirm()` has no accent bar on the left.** With a large `--tao-radius-panel` the curve of the corners cut the 3px bar into a broken line. As for `toast()`, the bar told nothing the icon and the tinted background do not: it is gone, and `.tao-confirm__accent` with it.
|
|
8
|
+
|
|
9
|
+
## 5.32.0
|
|
10
|
+
|
|
11
|
+
Nothing to migrate, but two looks change: `TaoThemeToggle` is neutral now (it was amber; `tone="accent"` brings the old colour back), and a quiet control with `tone="neutral"` is the body colour at rest (it was white).
|
|
12
|
+
|
|
13
|
+
- **The text ladder is a contract now, and `neutral` follows it.** The kit has five steps of text (`text-strong`, `text`, `text-subtle`, `text-muted`, `text-disabled`), and the Guide says what each is for: strong for headings, titles and the value that is the point; `text` for body copy and every control at rest; muted for hints and captions; hover goes one step up; the accent is for the main action, the selected and the focus. The tone `neutral` broke it: its text was `text-strong` at rest, so a `ghost` / `text` / `secondary` button with `tone="neutral"` was white against the grey `#bfbfbf` of the page text and of a plain `secondary` button. Now `--tao-tone-text` of `neutral` is `text` and `--tao-tone-text-hover` is `text-strong` (a neutral tag and a pressed neutral toggle read in the body colour too). `TaoScrollTop` `ghost` / `text` went from strong to `text` at rest for the same reason. The Guide has the ladder table and a do / don't (`#patterns`), `SKILL.md` and `patterns.md` carry it, and `tests/textContract.test.ts` fails when a component sets `text-strong` on a control at rest without being listed.
|
|
14
|
+
|
|
15
|
+
- **`TaoPresetInput`: a field with presets.** A compact input, a block of two arrows and a narrow pop-up, as the font size or the zoom of an editor. The input and the arrows are one piece (the same fill, the frame only while the field is edited); the pop-up is not a dropdown, it is centred under the input and the focus stays in the input. The arrows walk `options` in their order («up» is the next one, «down» the previous one) and hold at the ends, or go round with `loop`. The option with `default: true` is what an empty field means («Auto»): the pop-up shows it first, the arrows reach it after the last one. A whole number typed by hand is a value too (`custom`, between `min` and `max`; off: only the presets), and the arrows then go to the nearest preset. Keys: ↑ ↓ step, Home End go to the ends (while no text is being typed), Enter applies, Esc throws the text away; **Tab applies the text and goes on**: the pop-up is not a stop. The input is `role="combobox"` with `aria-controls` and `aria-activedescendant` (the picked option), the arrows are not tab stops and are named by the locale. `aria-label`, `name` and listeners reach the input, `class` and `style` the wrapper; the width of the input is `--tao-preset-input-width`. The logic (`presetLine`, `stepPreset`, `parsePreset`) is in `src/presetInput.ts` with its own tests. It began as a demo of the showcase built from `TaoInput` and a hand-made pop-up.
|
|
16
|
+
- **`TaoThemeToggle` `system`: the third state, a monitor.** With `system` the click goes system → light → dark → system, and the page follows the operating system (`prefers-color-scheme`) while «system» is picked, live. The icon is the state the toggle is in (a monitor, a sun, a moon), the `aria-label` says where the click leads (new `toSystemLabel`, the locale has it). `v-model` takes and gives `'system'` too; the page itself always gets `dark` or `light` in `data-tao-mode`, and `data-tao-mode-choice="system"` marks that it is the system's, so a remounted toggle shows the monitor again. The `#icon` slot gets `choice` and `next` is a choice now. Without `system` nothing changes. New: the `tao-monitor` icon (43 built in), `resolveTaoMode()`, `systemTaoMode()` and the `TaoModeChoice` type, for an app that applies the mode itself (`:apply="false"`).
|
|
17
|
+
- **`TaoCombobox` shows the whole list when it opens over a picked value.** The field holds the picked label, and the list was filtered by it, so a list of sizes opened on «Auto» showed only «Auto». Now the list is filtered only after the user types; opening, the arrows and the picked value show every option.
|
|
18
|
+
- **`TaoThemeToggle` is neutral by default, and has `tone`.** The toggle is a ghost button, and a ghost button without a tone is accent-coloured, so the theme switch was the one amber thing in a toolbar of quiet `ghost` + `neutral` tools, against the guide (the accent is for the one main action, the selected item and the focus). It is `neutral` now; `tone` goes to the button as for `TaoButton`, `tone="accent"` gives the old look.
|
|
19
|
+
- **`TaoThemeToggle` with the `#icon` slot: the glyph is centred.** The button kept the padding of a text button and the content sat on a text line, so the glyph stood 1.5px too high; the square is a square now.
|
|
20
|
+
|
|
3
21
|
## 5.31.0
|
|
4
22
|
|
|
5
23
|
Nothing to migrate: `overflow` is off by default, and a toolbar without it works as before.
|
package/README.md
CHANGED
|
@@ -59,7 +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
|
+
- **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`; `system` adds a third, «follow the system» state (a monitor)
|
|
63
63
|
- **TaoTour** — a guided tour: the page goes dim, the target stays lit, a card with an arrow says what it is (a step without a target is a card in the middle; `interactive` lets the user press the target). It only draws: the steps come from you or from TaoUX `tour`
|
|
64
64
|
- **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)
|
|
65
65
|
- **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)
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
- **TaoRadio** / **TaoRadioGroup** — classic radios: longer labels, can stack vertically
|
|
93
93
|
- **TaoSegmented** / **TaoSegmentedOption** — compact exclusive choice among 2–5 short options. Not tabs
|
|
94
94
|
- **TaoSelect** — dropdown with keyboard, same chrome as Input. `size` (`small` / `medium` / `large`, same scale as Button). Clear via “Clear” in the list or Delete; `clearable="false"` turns clearing off, `#clear` replaces the row content
|
|
95
|
+
- **TaoPresetInput** — a field with presets, as in an editor (font size, zoom): a compact input, a block of two arrows and a narrow pop-up. The arrows walk the `options` (`default: true` marks what an empty field means, «Auto»; `loop` joins the ends), a number typed by hand is a value too (`custom`); Tab applies and goes on
|
|
95
96
|
- **TaoCombobox** — Select with a field: type to filter, `allow-create` writes a custom value into `v-model`, `create` lets the parent append the list. Takes the same `size`, `clearable` and `#clear` as `TaoSelect`
|
|
96
97
|
- **TaoDate** — a single day: `YYYY-MM-DD`, no time, no timezone. Calendar popup like Select. `editable` makes it a field you type into: `5`, `5.3`, `05.03.26` in the locale's order of day and month (`parseTaoDateInput` is exported, `parse` / `format` take your own)
|
|
97
98
|
- **TaoDateRange** — a period: `v-model` is `{ start, end }` or `null`. First click is start, second is end (they swap if end is earlier). An incomplete pick is not written to the model
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
- **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
|
|
128
129
|
- **TaoLoader** — the wait whose end is unknown: `variant` `dots` (default) / `ring` / `pulse` / `diamonds`, `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
|
|
129
130
|
- **TaoImage** — `<img>` wrapper: fade-in and placeholder. `lazy` turns on native `loading="lazy"`
|
|
130
|
-
- **TaoIcon** — SVG icons (
|
|
131
|
+
- **TaoIcon** — SVG icons (43 built in, your own via `registerTaoIcons`) or an icon font (see Icons below)
|
|
131
132
|
|
|
132
133
|
### Navigation
|
|
133
134
|
|
|
@@ -220,9 +221,9 @@ The package ships a skill, `skills/taoui/SKILL.md` with `references/components.m
|
|
|
220
221
|
|
|
221
222
|
## Icons
|
|
222
223
|
|
|
223
|
-
The library ships **
|
|
224
|
+
The library ships **43 SVG icons** (check, close, plus, minus, chevrons, arrows, search, eye, more, grip, play, pause,
|
|
224
225
|
skip-back, copy, calendar, info, alert, circles, folder, file, alignment, and the app actions settings, edit, trash, bell, tag,
|
|
225
|
-
repeat, undo, redo, sun, moon). They draw on `currentColor`, so an icon takes the text colour and the
|
|
226
|
+
repeat, undo, redo, sun, moon, monitor). They draw on `currentColor`, so an icon takes the text colour and the
|
|
226
227
|
font size, and live under the reserved prefix `tao-`: `<TaoIcon name="tao-check" />`, the list is `taoIconNames`.
|
|
227
228
|
|
|
228
229
|
```vue
|
package/README.ru.md
CHANGED
|
@@ -59,7 +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
|
+
- **TaoThemeToggle** — переключатель светлой / тёмной темы одной кнопкой-иконкой (солнце или луна); читает и переворачивает `data-tao-mode` у `<html>` либо работает от `v-model`; `system` добавляет третье состояние «как в системе» (монитор)
|
|
63
63
|
- **TaoTour** — тур по странице: страница затемняется, цель остаётся освещённой, карточка со стрелкой говорит, что это (шаг без цели — карточка посередине; `interactive` даёт нажать на цель). Только рисует: шаги ваши или из TaoUX `tour`
|
|
64
64
|
- **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`, `pauseOnHover`, `roundPause` (`false`: без паузы в начале круга), `decorative` (призрак для строки-фона: скрыта от скринридера, не остановка Tab, не реагирует на курсор и тап, не выделяется, без пауз между кругами)
|
|
65
65
|
- **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки); `variant` `outline` / `filled` / `plain` (без рамки: пункт списка в правке; его берут и `TaoInputNumber`, `TaoCombobox`, `TaoTextarea`)
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
- **TaoRadio** / **TaoRadioGroup** — классические радиокнопки: длинные подписи, можно столбиком
|
|
93
93
|
- **TaoSegmented** / **TaoSegmentedOption** — компактный выбор из 2–5 коротких вариантов. Не вкладки
|
|
94
94
|
- **TaoSelect** — выпадающий список с клавиатурой, тот же визуал, что у Input. `size` (`small` / `medium` / `large`, та же шкала, что у Button). Сброс — «Очистить» в списке или Delete; `clearable="false"` отключает сброс, слот `#clear` заменяет содержимое строки
|
|
95
|
+
- **TaoPresetInput** — поле с заготовками, как в редакторе (размер шрифта, масштаб): компактное поле, блок из двух стрелок и узкое окно. Стрелки ходят по `options` (`default: true` — что значит пустое поле, «Авто»; `loop` замыкает концы), число, набранное руками, тоже значение (`custom`); Tab применяет и идёт дальше
|
|
95
96
|
- **TaoCombobox** — Select с полем: фильтр по вводу, `allow-create` пишет своё в `v-model`, `create` — чтобы родитель дополнил список. Те же `size`, `clearable` и `#clear`, что у `TaoSelect`
|
|
96
97
|
- **TaoDate** — один день: `YYYY-MM-DD`, без часов и пояса. Календарь как у Select. `editable` делает его полем для ввода: `5`, `5.3`, `05.03.26` в порядке дня и месяца языка (`parseTaoDateInput` экспортируется, `parse` / `format` принимают свои)
|
|
97
98
|
- **TaoDateRange** — период: `v-model` — `{ start, end }` или `null`. Первый клик — начало, второй — конец (если конец раньше — меняются местами). Неполный выбор в модель не пишется
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
- **TaoScrubber** — play / pause, слайдер по времени с метками событий, подпись «время / длина». Время сама не двигает: ведите `v-model` своими часами
|
|
128
129
|
- **TaoLoader** — ожидание, конца которого не знаем: `variant` `dots` (по умолчанию) / `ring` / `pulse` / `diamonds`, `tone`, `size` (число или small / medium / large), говорит «Загрузка» скринридеру (`label`), при «уменьшить движение» дышит; `TaoButton loading` носит то же кольцо
|
|
129
130
|
- **TaoImage** — обёртка над `<img>`: fade-in и плейсхолдер. `lazy` включает нативный `loading="lazy"`
|
|
130
|
-
- **TaoIcon** — SVG-иконки (
|
|
131
|
+
- **TaoIcon** — SVG-иконки (43 встроенных, свои через `registerTaoIcons`) или icon-шрифт (см. раздел «Иконки» ниже)
|
|
131
132
|
|
|
132
133
|
### Навигация и взаимодействие
|
|
133
134
|
|
|
@@ -221,9 +222,9 @@ Container живёт на другой оси — ширина: `width="wide" |
|
|
|
221
222
|
|
|
222
223
|
## Иконки
|
|
223
224
|
|
|
224
|
-
Библиотека поставляет **
|
|
225
|
+
Библиотека поставляет **43 SVG-иконки** (галочка, крестик, плюс, минус, шевроны, стрелки, поиск, глаз, «ещё», ручка,
|
|
225
226
|
play, pause, skip-back, копия, календарь, info, alert, кружки, папка, файл, выравнивание и действия приложения: настройки,
|
|
226
|
-
правка, корзина, колокольчик, тег, повтор, отменить, повторить, солнце,
|
|
227
|
+
правка, корзина, колокольчик, тег, повтор, отменить, повторить, солнце, луна, монитор). Они рисуются через `currentColor`: иконка берёт цвет и
|
|
227
228
|
размер текста. Имена с зарезервированной приставкой `tao-`: `<TaoIcon name="tao-check" />`, список — `taoIconNames`.
|
|
228
229
|
|
|
229
230
|
```vue
|