@1337exp/taoui 5.38.2 → 5.44.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 +56 -0
- package/README.md +3 -2
- package/README.ru.md +3 -2
- package/dist/index.d.ts +547 -432
- package/dist/index.js +221 -153
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +2 -1
- package/skills/taoui/references/components.md +1389 -1374
- package/skills/taoui/references/patterns.md +3 -2
- package/src/styles/contexts/tone.css +5 -3
- package/src/styles/tokens/primitives.css +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.44.0
|
|
4
|
+
|
|
5
|
+
The text of a tip is semi-bold now. To keep the regular weight: `:bold="false"` on the tooltip, or `:root { --tao-tooltip-weight: 400 }` for all of them.
|
|
6
|
+
|
|
7
|
+
- **The skill is up to date.** `skills/taoui/SKILL.md` names `TaoKbd`, the new `TaoTooltip` props (`shortcut`, `bold`, `animated`) and the rule that a hover is never the accent; `references/components.md` and `patterns.md` are regenerated.
|
|
8
|
+
- **`TaoTooltip` `bold`, on by default.** A hint is small (12 px) and short, and at the regular weight it is thin on its inverted background. The text is weight 600 now, the weight of the key cap next to it. `bold="false"` returns the regular weight; the token `--tao-tooltip-weight` sets the weight for every tooltip.
|
|
9
|
+
|
|
10
|
+
## 5.43.0
|
|
11
|
+
|
|
12
|
+
The tip now appears at once, without the fade. To keep the old fade: `animated` on the tooltip, or `:root { --tao-tooltip-motion: 1 }` for all of them.
|
|
13
|
+
|
|
14
|
+
- **`TaoTooltip` appears at once; `animated` brings the fade back.** A hint was fading in over 0.2 s, and on a toolbar, where the pointer goes from one button to the next, every hint began from nothing and the bar felt slow. The fade is off by default now. `animated` is a share of the base duration (`--tao-duration-base`): `0` off, `1` the base time, `2` twice as long, `0.5` half; `true` is `1`. Without the prop the token `--tao-tooltip-motion` (the same number) decides, so an app sets the time once for every tooltip.
|
|
15
|
+
- **The text of a tooltip sits in the middle.** The box was symmetric, but a line of text sits a little above the middle of its line box, so the hint looked raised; the text takes 0.06em more room on top and less below.
|
|
16
|
+
- **A key is the same height everywhere, and the letter is in the middle.** The key in a button, a tooltip and on its own had three heights, and the letter was nudged by a padding that fitted only one of them. `TaoKbd` is now one single line (`line-height: 1`, which puts a capital almost exactly in the middle) of an even height of whole pixels (`1.7em`, 22 px at the usual size); in a tooltip it is a little smaller and pulled into the line, and the text and the key stand on one baseline (`align-items: baseline`), in any font.
|
|
17
|
+
|
|
18
|
+
## 5.42.0
|
|
19
|
+
|
|
20
|
+
The look changes in a few places: what a pointer is over is no longer accent-coloured. To keep the old look, restore the accent in your own CSS for the selectors listed below.
|
|
21
|
+
|
|
22
|
+
- **The accent is not for hover.** A wash behind a neutral control was amber under the pointer (fixed in 5.41.0 for `tone="neutral"`), and the same slip was in a dozen other places: the highlighted row of `TaoMenu` (accent text) and of `TaoCommandList` (accent wash), the hover of a `TaoTabs` tab, a `TaoQuantity` button, a `TaoScrollTop` ghost / text button, a slider mark, the clear buttons of `TaoSelect` / `TaoCombobox` / `TaoColorInput`, the `TaoCopy` button, the eyedropper of `TaoColorPicker`, the border of a `TaoColorInput` and the ring of a hover `TaoCard`. Under the pointer they are now neutral: the wash is `--tao-color-hover`, the text goes up to `text-strong`, a border to `border-strong`. The accent stays where a thing is chosen or current (the selected tab, the checked box, the open colour input, the chosen card), for the focus ring and for a solid accent control (whose hover is `accent-hover`).
|
|
23
|
+
- **A rule in the guide, and a test that keeps it.** The accent budget got a rule: hover, the row under the arrows and a pressed toggle are neutral, a wash or a fill is never the accent. `tests/accent-budget.test.ts` reads the CSS of every component and fails when a rule for `:hover`, or for the highlighted row of a menu or a list, uses the accent roles (`accent`, `accent-subtle`, `accent-text`).
|
|
24
|
+
|
|
25
|
+
## 5.41.0
|
|
26
|
+
|
|
27
|
+
Nothing to migrate for the new component. Two looks change: a neutral control under the pointer is grey, not amber (see below), and a key in a button, a menu and a list is drawn by one component. To keep the old amber wash: `.tao-tone-neutral { --tao-tone-wash: var(--tao-color-accent-subtle-hover); }`.
|
|
28
|
+
|
|
29
|
+
- **New `TaoKbd`: one look for a key.** A key was drawn in four places, each with its own `<kbd>` and its own CSS (the button, the tooltip, the menu, the command list). Now it is one component: `variant="cap"` (default) is a key cap with a quiet fill of the text colour, `variant="plain"` is muted text with no cap for a column of keys. `TaoButton` (`shortcut`), `TaoTooltip` (`shortcut`), `TaoMenu` and `TaoCommandList` use it; the look of each stays as it was (a cap in the button and the tooltip, plain text in the menu and the list). The base style has zero specificity (`:where`), so the place that holds a key sets its own size.
|
|
30
|
+
- **A neutral control's wash is grey.** The neutral tone's hover wash (`--tao-tone-wash`) was the accent tint, so a `tone="neutral"` ghost button (a toolbar tool) turned amber under the pointer while the pressed state next to it was grey. The wash is now the text colour at 10%, the same family as the pressed state. The accent stays for what is chosen or primary.
|
|
31
|
+
|
|
32
|
+
## 5.40.0
|
|
33
|
+
|
|
34
|
+
The look changes, not the API: a tooltip is now the opposite of the theme. To keep the old look, set `--tao-tooltip-bg: var(--tao-color-surface-raised); --tao-tooltip-text: var(--tao-color-text-strong);` on `:root`.
|
|
35
|
+
|
|
36
|
+
- **`TaoTooltip`: the tip is the opposite of the theme.** It was the colour of the panels (`surface-raised`), so in a dark theme a grey tip hung over grey panels and melted into them; it looked like one more piece of the panel, not like a hint. Now it is dark on a light theme and light on a dark one (the background is `--tao-tooltip-bg`, by default the strong text colour; the text is `--tao-tooltip-text`, by default the page background), the arrow follows the background. A hint floats over the interface, is temporary and is not a control, and the opposite colour says so at once.
|
|
37
|
+
- **`TaoTooltip` `shortcut`.** The key that does the same, as a key cap after the text (`Text` and `T`, `Ctrl+K`), instead of putting it into the text in brackets. The cap takes the colour of the tip, so it fits any theme and any token of your own. The showcase shows it with the other examples.
|
|
38
|
+
|
|
39
|
+
## 5.39.2
|
|
40
|
+
|
|
41
|
+
Nothing to migrate: a bar without `max-width` measures as before.
|
|
42
|
+
|
|
43
|
+
- **`TaoToolbar` `overflow`: a bar that shrinks to its content no longer folds away group by group.** The bar took the room it had from its current width. A floating bar (`position: absolute`, `inline-flex`, `width: max-content`) is exactly as wide as what is left in it, so after a group went under «⋮» the bar was narrower, the narrower bar folded the next group, and so on down to the pinned one (and, if the bar moved while it shrank, the room could shrink with it). Now the room is taken from the bar's own `max-width` in px when it has one: give the bar `max-width` (a number of px, the room you can give it) and it folds only what does not fit that, and the answer does not depend on how wide it was a moment ago. A `max-width` that is a percentage or `calc()` is not a number of px and is ignored, so the width the bar has is used as before.
|
|
44
|
+
|
|
45
|
+
## 5.39.1
|
|
46
|
+
|
|
47
|
+
Nothing to migrate; the demo and the docs of `TaoMarquee`, no change in the component.
|
|
48
|
+
|
|
49
|
+
- **The ticker of the demo no longer twitches.** The quotes of the showcase were bare text: a price that got longer or shorter moved everything after it, and the strip twitched back and forth, and the quotes had no space between them. Every quote is a block of fixed width now (the symbol, the price and the change each in a column of `ch`, `tabular-nums`, prices with a fixed count of decimals) with a gap after it. The docs of `TaoMarquee` say it: the line is as wide as its content, so live parts should have a fixed width.
|
|
50
|
+
|
|
51
|
+
## 5.39.0
|
|
52
|
+
|
|
53
|
+
Nothing to migrate: `fill` and `reverse` are off by default, and a marquee without them runs as before. One fix: it now follows its content.
|
|
54
|
+
|
|
55
|
+
- **`TaoMarquee` follows its content.** It measured the line when the text or the gap changed and when its box was resized, but not when the content of the slot changed (a new price, a font that came late, an image): the line kept the old width, so a line that had grown stood still, or one that had shrunk ran with a hole. The hidden copy that measures the natural width is watched now (`ResizeObserver`), so nobody has to call `measure()`; it stays for the rare case.
|
|
56
|
+
- **`TaoMarquee` `fill`: a short line runs too.** A line that fits stood still; with `fill` it is repeated, with `gap` between the copies, until the copies cover the whole width (and one more, since the strip moves by one round), so there is never a hole in the strip. A ticker of quotes, a row of logos. A line wider than the box still has two copies as before; an empty one has nothing to repeat and stands; with «reduce motion» it stands still, as every marquee does. The extra copies are hidden from a screen reader and inert, like the second one always was.
|
|
57
|
+
- **`TaoMarquee` `reverse`: to the right.** The same round backwards (the pause at the start of a round goes with it).
|
|
58
|
+
|
|
3
59
|
## 5.38.2
|
|
4
60
|
|
|
5
61
|
Nothing to migrate; a fix to the look.
|
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
- **TaoCopy** — clipboard icon. After a click, a “Copied” tooltip; if the trigger is gone, the tooltip is too
|
|
62
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
|
-
- **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)
|
|
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), `fill` (a line that fits is repeated and runs too: a ticker of quotes) and `reverse`, the content is watched (a new price measures the line again), `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)
|
|
66
66
|
- **TaoInputGroup** — outer glue: `#before` | field | `#after` (protocol, unit, button)
|
|
67
67
|
- **TaoCommandList** — the field and the list of the palette with no window around them, for a page, a side panel or a `TaoPopover`: the same search, keys and rows, `@select` picks and closes nothing, `autofocus`, `focus()`, `reset()`
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
- **TaoSpoilerGroup** — accordion: `v-model` is the open panel key (`null` = all closed); spoilers take `name`. Without `v-model` the group keeps that key itself
|
|
74
74
|
- **TaoTabs** — tabbed sections
|
|
75
75
|
- **TaoNav** — navigation between the sections of an app: one list of items (`icon`, `href`, `badge`), three looks. `layout="auto"` picks by the width of TaoNav itself (container queries, no JS): a bottom bar below 600px (more than five items: «More» with a menu), a rail with icons below 840px, a side panel with labels from 840px. With the page in its slot it lays the page out: the bar sticks to the bottom (safe area kept), the side list to the top. `floating` lifts the bar into a detached pill with a shadow (the rail and the side panel stay). `indicator="line"` marks the current section with a short accent line instead of a tint. The `#action` slot is the screen's main action and moves with the navigation: round above the bar at the end side, at the top of the rail, extended with its text at the top of the side panel. `select(id, event)` lets a router take over a link. Widths: `--tao-nav-rail-width` (80px), `--tao-nav-drawer-width` (240px); `--tao-nav-action-radius` for the action in the side panel; `surface="glass"` lets the page show blurred through the bar; `#footer` for a small line under the items on the side; `badgeTone="neutral"` keeps the accent on the current item's counter only. The current item is bolder as well as accent-coloured (`--tao-nav-active-weight`). `.tao-nav` is the whole layout, `.tao-nav__panel` the navigation, `.tao-nav__content` the page
|
|
76
|
-
- **TaoTooltip** — hover hint. `placement`: `top` / `bottom` / `left` / `right`, each with `-start` / `-end`; flips at the viewport edge
|
|
76
|
+
- **TaoTooltip** — hover hint, the opposite of the theme (`--tao-tooltip-bg`, `--tao-tooltip-text`); `shortcut` adds the key as a key cap. `placement`: `top` / `bottom` / `left` / `right`, each with `-start` / `-end`; flips at the viewport edge
|
|
77
|
+
- **TaoKbd** — a key (`T`, `Ctrl+K`): one look for the key in a button, a tooltip, a menu and a command list. `cap` is a key cap, `plain` is muted text
|
|
77
78
|
- **TaoPopover** — click panel with any slot content, Esc and outside click; `placement` as Tooltip. Not a tooltip, not an action menu
|
|
78
79
|
|
|
79
80
|
### Layout
|
package/README.ru.md
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
- **TaoCopy** — иконка копирования в буфер. После клика сверху тултип «Скопировано»; если кнопку убрали — тултип тоже
|
|
62
62
|
- **TaoThemeToggle** — переключатель светлой / тёмной темы одной кнопкой-иконкой (солнце или луна); читает и переворачивает `data-tao-mode` у `<html>` либо работает от `v-model`; `system` добавляет третье состояние «как в системе» (монитор)
|
|
63
63
|
- **TaoTour** — тур по странице: страница затемняется, цель остаётся освещённой, карточка со стрелкой говорит, что это (шаг без цели — карточка посередине; `interactive` даёт нажать на цель). Только рисует: шаги ваши или из TaoUX `tour`
|
|
64
|
-
- **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`, `pauseOnHover`, `roundPause` (`false`: без паузы в начале круга), `decorative` (призрак для строки-фона: скрыта от скринридера, не остановка Tab, не реагирует на курсор и тап, не выделяется, без пауз между кругами)
|
|
64
|
+
- **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`, `pauseOnHover`, `roundPause` (`false`: без паузы в начале круга), `fill` (помещающаяся строка повторяется и тоже бежит: биржевая лента) и `reverse`, содержимое отслеживается (новая цена перемеряет строку), `decorative` (призрак для строки-фона: скрыта от скринридера, не остановка Tab, не реагирует на курсор и тап, не выделяется, без пауз между кругами)
|
|
65
65
|
- **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки); `variant` `outline` / `filled` / `plain` (без рамки: пункт списка в правке; его берут и `TaoInputNumber`, `TaoCombobox`, `TaoTextarea`)
|
|
66
66
|
- **TaoInputGroup** — склейка снаружи: `#before` | поле | `#after` (протокол, единица, кнопка)
|
|
67
67
|
- **TaoCommandList** — поле и список палитры без окна вокруг, для страницы, боковой панели или `TaoPopover`: тот же поиск, клавиши и строки, `@select` выбирает и ничего не закрывает, `autofocus`, `focus()`, `reset()`
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
- **TaoSpoilerGroup** — аккордеон: `v-model` — ключ открытой панели (`null` — все закрыты), у спойлера `name`. Без `v-model` группа помнит ключ сама
|
|
74
74
|
- **TaoTabs** — вкладки для переключения между секциями контента
|
|
75
75
|
- **TaoNav** — навигация между разделами приложения: один список пунктов (`icon`, `href`, `badge`), три вида. `layout="auto"` выбирает по ширине самого TaoNav (container queries, без JS): нижняя панель до 600px (больше пяти пунктов: «Ещё» с меню), рейка с иконками до 840px, боковая панель с подписями от 840px. Со страницей в слоте раскладывает её сам: панель прилипает к низу (с учётом безопасной зоны), боковой список к верху. `floating` отрывает нижнюю панель в отдельную «пилюлю» с тенью (рейка и боковая панель не меняются). `indicator="line"` отмечает текущий раздел короткой чертой акцента вместо подложки. Слот `#action` — главное действие экрана, оно идёт за навигацией: круглое над панелью у конечного края, наверху рейки, широкое с текстом наверху боковой панели. `select(id, event)` даёт роутеру перехватить ссылку. Ширины: `--tao-nav-rail-width` (80px), `--tao-nav-drawer-width` (240px); `--tao-nav-action-radius` — углы действия в боковой панели; `surface="glass"` — страница размыто просвечивает сквозь панель; `#footer` — мелкая строка под пунктами сбоку; `badgeTone="neutral"` — акцент только у счётчика текущего пункта. Текущий пункт ещё и жирнее (`--tao-nav-active-weight`). `.tao-nav` — вся раскладка, `.tao-nav__panel` — навигация, `.tao-nav__content` — страница
|
|
76
|
-
- **TaoTooltip** — всплывающая подсказка при
|
|
76
|
+
- **TaoTooltip** — всплывающая подсказка при наведении, обратная теме (`--tao-tooltip-bg`, `--tao-tooltip-text`); `shortcut` добавляет клавишу значком. `placement`: `top` / `bottom` / `left` / `right`, у каждого `-start` / `-end`; у края экрана переворачивается
|
|
77
|
+
- **TaoKbd** — клавиша (`T`, `Ctrl+K`): один вид клавиши в кнопке, подсказке, меню и списке команд. `cap` значок, `plain` приглушённый текст
|
|
77
78
|
- **TaoPopover** — панель по клику: слот с любым контентом, Esc и клик снаружи; `placement` как у Tooltip. Не тултип и не меню действий
|
|
78
79
|
|
|
79
80
|
### Layout
|