@1337exp/taoui 5.39.1 → 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 +42 -0
- package/README.md +2 -1
- package/README.ru.md +2 -1
- package/dist/index.d.ts +523 -432
- package/dist/index.js +136 -78
- 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 -1376
- 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,47 @@
|
|
|
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
|
+
|
|
3
45
|
## 5.39.1
|
|
4
46
|
|
|
5
47
|
Nothing to migrate; the demo and the docs of `TaoMarquee`, no change in the component.
|
package/README.md
CHANGED
|
@@ -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
|
@@ -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
|