@1337exp/taoui 5.21.0 → 5.23.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 +25 -0
- package/README.md +14 -5
- package/README.ru.md +14 -5
- package/dist/index.d.ts +187 -7
- package/dist/index.js +1419 -1232
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +3 -0
- package/skills/taoui/references/components.md +18 -3
- package/src/styles/contexts/frames.css +35 -0
- package/src/styles/index.css +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.23.0
|
|
4
|
+
|
|
5
|
+
Nothing to migrate; the defaults do not change.
|
|
6
|
+
|
|
7
|
+
- **`TaoPinCode` `bordered=false` has no frame in any state.** In 5.22.0 the plain cells still showed a frame for focus and result; now the focus, an error and a success are told by the fill and the digit only (an accent / danger / success tint), and the cells do not jump.
|
|
8
|
+
- **Showcase: a section "Layers & theming".** The real files of the kit (`primitives` → `semantic` → `themes` → `contexts` → `base`) in the order `src/styles/index.css` imports them, each with a note whether it is yours to touch (only the themes are), taken from the source by `?raw`, so the page cannot drift from the library. Below it an own theme by hand: an accent, a page and the corners make a `[data-tao-theme]` file, a preview wears it, and the ratios are rated with the promises of the palettes. `tests/showcase.layers.test.ts` keeps the order equal to `index.css` and the theme's roles real.
|
|
9
|
+
- **`TaoSlider` / `TaoRangeSlider` `zones`: the scale in colour.** `:zones="[{ to: 40, tone: 'info', dot: true }, { to: 70, tone: 'warning', dot: true }, { to: 100, tone: 'danger' }]"`. Each zone runs to its `to` (the first from `min`, the last to `max`), so there are no gaps and no overlaps. `tone` is a colour role of the theme, `color` any CSS colour (it wins; its contrast is yours to keep), `dot` puts a bead where the zone ends, `reveal` keeps the zone clear until the value gets there (the field looks plain and is painted as it fills; its dot shows once the fill has reached it). The bar shows the zones dimmed, the filled part in full colour, and the thumb wears the colour of the zone it stands in. Works with `vertical`, `flat`, `variant="thin"` and a range; marks and `discrete` are untouched. Colour is not a message: say the state in words too. The logic is `normalizeZones` / `zoneAt` / `zoneGradient` in `src/slider.ts`; the types `TaoSliderZone` and `TaoSliderZoneTone` are exported.
|
|
10
|
+
- **`TaoDrawer` (bottom sheet): a graze no longer closes it.** The sheet closed at 30% of its height, or on any flick faster than 0.5 px/ms that went 24 px: a finger that touched it by accident was enough. Now it closes when pulled half of its height, or flung hard (1.2 px/ms or more, a light swipe is not enough: 0.8 px/ms closed it before) after a path of at least 15% of the height; otherwise it comes back. `swipeThreshold` (0.05–1, default `0.5`) sets the share for your sheet. The backdrop already lets go as the sheet is pulled, so the finger sees what releasing now will do.
|
|
11
|
+
- **The mark of the project, and a settings bar in the showcase.** `showcase/public/logo/`: `logo-mark-dark.svg` (a white T for a dark background), `logo-mark-light.svg` (a dark T for a light one) and `favicon.svg` (a tile, with no road markings: at 16px they are only noise), drawn as paths from the design layout; the yellow is `--tao-orange-300`. The READMEs show it with `<picture>`, so GitHub picks the file by its own theme. The showcase wears it in its title (it follows the mode) and as a favicon. The options of the header moved into a one-line bar that sticks to the top while you scroll, made of the kit itself: language, palette and mode are inline (`TaoSegmented`, `TaoSelect`), the rare ones, density and frames, sit in a «View» popover (`TaoPopover`) whose button shows a dot while one of them is off the default. The brand, with the version tag of the build, shows in the bar once it has stuck, the section list sits below it, and on a phone it scrolls away with the page.
|
|
12
|
+
- **A third context: frames (`.tao-frames-soft`).** A light look for the whole app, or for one panel, with one class. `tao-frames-soft` on `<html>` or a container lets the decorative frames of `TaoAlert`, `TaoSpoiler`, `TaoTable`, `TaoList`, `TaoToolbar` and `TaoMenubar` go clear, and the panel is held by its fill: an alert gets a little more tint, a table sits on the raised fill. Nothing moves, the 1px border stays in the box, only unseen. `tao-frames-framed` puts the frames back inside a soft area. `TaoAlert`, `TaoSpoiler`, `TaoTable`, `TaoToolbar` and `TaoMenubar` get `bordered` (not set: follows the context; `true` / `false`: for this panel); `TaoList` keeps its own `bordered`. Not touched on purpose: the frame of a field, the focus ring, and the lines between rows: they say where a control is and what belongs together, and WCAG 1.4.11 asks 3:1 of them. The tokens are `--tao-frame-alpha`, `--tao-frame-tint` and `--tao-frame-fill` (`src/styles/contexts/frames.css`, a new file in the layer order). The showcase has a switch «Frames» in the header. Fields have `variant="filled"` already; its fill is gentle (about 1.1:1 with the page), so use it knowing that.
|
|
13
|
+
- **`TaoScrollTop`: the caption has an outline.** The hover caption (`label`, and the text mode) over a page of text kept only a soft halo, and the words under it still showed through. It now has a crisp outline in the page colour as well (`-webkit-text-stroke` with `paint-order: stroke fill`, so only the outer half of the stroke shows and the letters stay whole): the text under the caption is cut clear, in both themes, with no backing and no colour. Where `paint-order` is not supported for HTML text (before Chrome 123) the halo is all there is, as before; `@supports` keeps a stroke from eating the letters there.
|
|
14
|
+
- **`TaoStages`: the icons stand on the middle of the label, and the spinner turns about its own centre.** The icon box was a block span, so the svg sat on the text baseline and the box grew by the line gap under it (14 px became 17): every icon was 1.5 px above the middle of its label, and the `work` mark turned about the centre of that taller box and wobbled. The box is now exactly the svg. A test keeps the mark from becoming a block again.
|
|
15
|
+
- **`TaoCarousel`: the track keeps the browser's own cursor.** The `grab` / `grabbing` cursors are gone: system cursors differ much between browsers (Opera showed a big black arrow), and which cursor a carousel wants is the app's decision, set on `.tao-carousel__track`. The drag itself is unchanged. (`TaoSplit` keeps its resize cursors and `TaoColorPicker` its crosshair: there the cursor is part of the meaning.)
|
|
16
|
+
- **`TaoSlider` / `TaoRangeSlider` `bubble`: the value in a bubble at the thumb.** Off by default, so nothing that exists changes. `bubble`: it shows while the thumb is dragged, hovered or has the keyboard focus (a touch drag shows it above the finger); `bubble="always"`: it stays. The text is `format` of the value, or the `#bubble="{ value, zone }"` slot (an icon, a word). It wears the colour of the zone the thumb stands in (the accent without zones) with a label that reads on it: the `on-` role of the tone, black or white by contrast for a colour of your own, the browser picks for a colour the script cannot read. A screen reader already has `aria-valuetext`, so the bubble is `aria-hidden`. It sits above a horizontal bar and to the right of a vertical one: leave room for it.
|
|
17
|
+
- **`TaoLoader`: three looks, a voice, a colour role.** `variant`: `dots` (the four dots, still the default, same size and motion), `ring` (a turning arc) and `pulse` (ripples from a core). `tone` is a colour role of the theme (`color` stays and wins; `currentColor` takes the text around it), `size` is a number or `small` / `medium` / `large`, the sizes come from one number in CSS. It is a `role="status"` with a text for a screen reader (`label`, «Loading» / «Загрузка» from the locale), or `decorative` when the wait is said elsewhere. Under «reduce motion» nothing travels or turns: the picture breathes. `TaoButton loading` wears the same ring in its text colour and says `aria-busy` by itself. The showcase gets «Which wait to choose»: loader, skeleton or progress.
|
|
18
|
+
- **`TaoPinCode`: an error paints the digits red**, as a success always painted them green (`--tao-color-danger-text`).
|
|
19
|
+
|
|
20
|
+
## 5.22.0
|
|
21
|
+
|
|
22
|
+
Nothing to migrate; the defaults do not change.
|
|
23
|
+
|
|
24
|
+
- **`TaoPinCode` `bordered`.** `:bordered="false"` is a light style: the cells have a soft fill and no frame at rest. The frame is still in the box (the cells do not jump) and is only clear; focus, the active cell, an error and a result paint it, so a state is never left to a fill colour alone.
|
|
25
|
+
- **`TaoDrawer`: the pull of a sheet no longer selects the title.** While the sheet is in the hand the panel has `user-select: none`, and it is given back at the end.
|
|
26
|
+
- **`TaoDrawer`: a pointer that vanishes lets go.** The blur of the window, a tab that goes to the background, `pagehide` and a taken capture (`lostpointercapture`) end the pull as a cancel: the sheet settles back and does not close, and the next pull starts clean. The same guard `TaoCarousel` has had.
|
|
27
|
+
|
|
3
28
|
## 5.21.0
|
|
4
29
|
|
|
5
30
|
Nothing to migrate; the defaults do not change.
|
package/README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/1337exp/taoui/master/showcase/public/logo/logo-mark-dark.svg">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/1337exp/taoui/master/showcase/public/logo/logo-mark-light.svg" alt="Tao UI" width="96" height="94">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
1
8
|
<h1 align="center">Tao UI</h1>
|
|
2
9
|
|
|
3
10
|
<p align="center">
|
|
@@ -28,7 +35,7 @@
|
|
|
28
35
|
|
|
29
36
|
- **Tokens first.** Colours, radii, spacing and type come from CSS variables in three layers (primitives, semantic, theme). Re-theme the kit, or one panel of it, without touching a component. Size and density are contexts too: set them once on a panel and everything inside follows.
|
|
30
37
|
- **Palettes.** Seven ready palettes built from four colours each, or your own at run time (`applyTaoPalette`). The status colours step away from the accent by themselves, and the charts recolour with the theme.
|
|
31
|
-
- **Contrast you can trust.** The colour pairs of the themes and palettes are checked by tests against WCAG 2 (4.5:1 for text, 3:1 for a label on a fill); APCA picks whether a label is dark or white. The showcase section **Contrast & keyboard** measures the page you are on, lets you build a palette from four stops with `applyTaoPalette()`, and lists what the keys do.
|
|
38
|
+
- **Contrast you can trust.** The colour pairs of the themes and palettes are checked by tests against WCAG 2 (4.5:1 for text, 3:1 for a label on a fill); APCA picks whether a label is dark or white. The showcase section **Contrast & keyboard** measures the page you are on, lets you build a palette from four stops with `applyTaoPalette()`, and lists what the keys do. **Layers & theming** shows the real style files in the order the kit imports them and builds an own theme by hand.
|
|
32
39
|
- **Adapts without JS.** `TaoNav` turns from a bottom bar into a rail and a side panel, the bento grid reflows, the main action moves with the navigation — by the width of their own container (container queries), not of the window. Nothing jumps after hydration.
|
|
33
40
|
- **Keyboard and screen readers.** Menus, the menu bar, the toolbar, the tree and the navigation follow the WAI-ARIA patterns: one Tab stop and arrows inside (roving tabindex), `aria-pressed` toggles, `role="meter"`, focus traps in overlays.
|
|
34
41
|
- **Charts the honest way.** Small `TaoSparkline` / `TaoMeter` / `TaoDonut` / `TaoHeatmap` for cards and lines of text; for real charts `taoChartTheme()` hands the theme colours to Chart.js, ECharts or uPlot.
|
|
@@ -94,8 +101,8 @@
|
|
|
94
101
|
- **TaoInputNumber** — number with min/max/step and ± on the right. Empty value is `null`. `@commit` fires once when an edit is finished (blur, Enter, ±, arrow), unlike `v-model`, which updates on every keystroke
|
|
95
102
|
- **TaoQuantity** — cart quantity: `− | field | +`, integers, stock; minus at the minimum can remove the row
|
|
96
103
|
- **TaoTextarea** — autosizing multiline. `maxlength` caps input, `count` shows “entered / max”. `variant`: `bar` (default) / `outline` (frame like Input) / `filled` / `plain`; `readonly`; `align`; `blurOnEnter`
|
|
97
|
-
- **TaoPinCode** — N cells. By default a click clears the cell and everything to the right (`clear-on="focus"`); `clear-on="input"` replaces the digit only when typing. `format="#-##-##"` draws visual separators (not part of the value; a paste in that shape or as a clean code is split into cells). The last cell blurs and emits `complete`; `status="success | error"` (set after `complete`) glows or shakes the cells and says it to a screen reader
|
|
98
|
-
- **TaoSlider** / **TaoRangeSlider** — one thumb (`v-model` is a number) or two (`[from, to]`, `minGap`). Mouse, touch, arrows. `marks` (ticks, numbers, `{ value, label }`), `discrete` for stepped scales, `vertical`, `flat`, `format
|
|
104
|
+
- **TaoPinCode** — N cells. By default a click clears the cell and everything to the right (`clear-on="focus"`); `clear-on="input"` replaces the digit only when typing. `format="#-##-##"` draws visual separators (not part of the value; a paste in that shape or as a clean code is split into cells). The last cell blurs and emits `complete`; `status="success | error"` (set after `complete`) glows or shakes the cells and says it to a screen reader; `bordered="false"` is a light style with no frame
|
|
105
|
+
- **TaoSlider** / **TaoRangeSlider** — one thumb (`v-model` is a number) or two (`[from, to]`, `minGap`). Mouse, touch, arrows. `marks` (ticks, numbers, `{ value, label }`), `discrete` for stepped scales, `vertical`, `flat`, `format`, `bubble` (the value in a bubble at the thumb, off by default), `zones` (the scale in colour, a dot where a zone ends, `reveal` to paint it as it fills); `variant="thin"` is a thin track for seek / volume
|
|
99
106
|
- **TaoColorPicker** — saturation / brightness square, hue and opacity strips, swatches, eyedropper (where the browser has `EyeDropper`), HEX / RGB / HSL input modes. `v-model` is a hex string; `colorModel()` adapts your own colour storage
|
|
100
107
|
- **TaoColorInput** — a field with a swatch and the hex text; the picker opens in a popover
|
|
101
108
|
- **TaoFileDrop** — drop zone (drag & drop + click). File names listed under the zone, `v-model` is `File[]`. Clearing the whole batch is the parent’s job (`clear-request`); a file that does not fit `accept` comes back in `reject`
|
|
@@ -119,7 +126,7 @@
|
|
|
119
126
|
- **TaoAlert** — inline page/form banner (success / error / warning / info); `collapsible` folds the body under the title (find-in-page still finds it)
|
|
120
127
|
- **TaoProgress** — static bar (`progress` in %). Percent centered on top, or `showPercentage="right"`; `#left` / `#right` slots are captions, then the percent sits in parentheses on the right. `false` hides it. Width is `minWidth` / `maxWidth`, not the value domain
|
|
121
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
|
|
122
|
-
- **TaoLoader** —
|
|
129
|
+
- **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
|
|
123
130
|
- **TaoImage** — `<img>` wrapper: fade-in and placeholder. `lazy` turns on native `loading="lazy"`
|
|
124
131
|
- **TaoIcon** — SVG icons (40 built in, your own via `registerTaoIcons`) or an icon font (see Icons below)
|
|
125
132
|
|
|
@@ -162,6 +169,8 @@ Container lives on another axis — width: `width="wide" | "slim" | "ultra-slim"
|
|
|
162
169
|
<html class="tao-density-auto">
|
|
163
170
|
```
|
|
164
171
|
|
|
172
|
+
**Frames** are the third context, for the decorative frames of panels: `tao-frames-soft` on a container (or on `<html>`) lets the frames of `TaoAlert`, `TaoSpoiler`, `TaoTable`, `TaoList`, `TaoToolbar` and `TaoMenubar` go clear and holds the panel by its fill instead (an alert gets a little more tint); nothing moves, the 1px border stays in the box. `tao-frames-framed` puts them back inside a soft area, and `bordered` on a panel (`true` / `false`) overrides the context for that panel. The frame of a field, the focus ring and the lines between rows are not touched: they tell where a control is, and WCAG 1.4.11 asks 3:1 of them. Tokens `--tao-frame-alpha` / `--tao-frame-tint` / `--tao-frame-fill`.
|
|
173
|
+
|
|
165
174
|
|
|
166
175
|
Surfaces — what a panel is made of: `flat` fill (default), `grain` (static film grain), `glass` (translucent, blurs what is
|
|
167
176
|
behind). Use `surface` on TaoCard / TaoBlock or the class `tao-surface-grain` / `-glass` on any element — a game HUD, a
|
|
@@ -638,7 +647,7 @@ tokens/primitives.css → tokens/semantic.css → themes/*.css → contexts/*.cs
|
|
|
638
647
|
| `tokens/semantic.css` | Theme-independent roles: radii, shadows, type, motion | Rarely |
|
|
639
648
|
| `themes/dark.css` | The colour roles of the default (dark) theme: `--tao-color-accent`, `--tao-color-surface`, … | **Yes — this is the theming API** |
|
|
640
649
|
| `themes/light.css` | The same roles under `[data-tao-mode="light"]` (or the old `[data-tao-theme="light"]`) | Yes, as a sample |
|
|
641
|
-
| `contexts/size.css`, `tone.css`, `surface.css` | `.tao-size-*` and `.tao-density-*`, `.tao-tone-*`, `.tao-surface-*`: what a control reads to know its size, colour and
|
|
650
|
+
| `contexts/size.css`, `tone.css`, `surface.css`, `frames.css` | `.tao-size-*` and `.tao-density-*`, `.tao-tone-*`, `.tao-surface-*`, `.tao-frames-*`: what a control reads to know its size, colour, material and how loud its frames are | Rarely |
|
|
642
651
|
| `base.css` | Global reset (scrollbar, links, box-sizing) | Rarely |
|
|
643
652
|
|
|
644
653
|
Everything comes in through `@1337exp/taoui/styles.css` (dark and light both: light turns on with `data-tao-mode="light"`).
|
package/README.ru.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/1337exp/taoui/master/showcase/public/logo/logo-mark-dark.svg">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/1337exp/taoui/master/showcase/public/logo/logo-mark-light.svg" alt="Tao UI" width="96" height="94">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
1
8
|
<h1 align="center">Tao UI</h1>
|
|
2
9
|
|
|
3
10
|
<p align="center">
|
|
@@ -28,7 +35,7 @@
|
|
|
28
35
|
|
|
29
36
|
- **Сначала токены.** Цвета, радиусы, отступы и шрифты — CSS-переменные в три слоя (примитивы, семантика, тема). Перекрасить набор или одну панель можно, не трогая компоненты. Размер и плотность — тоже контексты: задайте их один раз на панели, и всё внутри последует.
|
|
30
37
|
- **Палитры.** Семь готовых палитр, каждая из четырёх цветов, или своя в рантайме (`applyTaoPalette`). Статусные цвета сами отходят от акцента, а графики перекрашиваются вместе с темой.
|
|
31
|
-
- **Контраст, которому можно верить.** Цветовые пары тем и палитр проверяются тестами по WCAG 2 (4.5:1 для текста, 3:1 для подписи на заливке); тёмной или белой быть подписи, решает APCA. Раздел витрины **Контраст и клавиатура** измеряет страницу, на которой вы стоите, собирает палитру из четырёх стопов через `applyTaoPalette()` и перечисляет, что делают клавиши.
|
|
38
|
+
- **Контраст, которому можно верить.** Цветовые пары тем и палитр проверяются тестами по WCAG 2 (4.5:1 для текста, 3:1 для подписи на заливке); тёмной или белой быть подписи, решает APCA. Раздел витрины **Контраст и клавиатура** измеряет страницу, на которой вы стоите, собирает палитру из четырёх стопов через `applyTaoPalette()` и перечисляет, что делают клавиши. **Слои и темизация** показывает настоящие файлы стилей в том порядке, в каком набор их подключает, и собирает свою тему руками.
|
|
32
39
|
- **Подстраивается без JS.** `TaoNav` превращается из нижней панели в рейку и боковую панель, bento-сетка перестраивается, главное действие переезжает вместе с навигацией — по ширине своего контейнера (container queries), а не окна. После гидратации ничего не прыгает.
|
|
33
40
|
- **Клавиатура и скринридеры.** Меню, полоса меню, панель инструментов, дерево и навигация сделаны по шаблонам WAI-ARIA: одна остановка Tab и стрелки внутри (roving tabindex), переключатели с `aria-pressed`, `role="meter"`, ловушки фокуса в оверлеях.
|
|
34
41
|
- **Графики по-честному.** Маленькие `TaoSparkline` / `TaoMeter` / `TaoDonut` / `TaoHeatmap` для карточек и строк текста; для настоящих графиков `taoChartTheme()` отдаёт цвета темы в Chart.js, ECharts или uPlot.
|
|
@@ -94,8 +101,8 @@
|
|
|
94
101
|
- **TaoInputNumber** — число с min/max/step и кнопками ± справа. Пустое значение — `null`. `@commit` срабатывает один раз, когда правка закончена (blur, Enter, ±, стрелка), в отличие от `v-model`, который обновляется на каждую клавишу
|
|
95
102
|
- **TaoQuantity** — количество в корзине: `− | поле | +`, целые штуки, сток, минус на минимуме может убрать строку
|
|
96
103
|
- **TaoTextarea** — многострочное поле с авто-высотой. `maxlength` ограничивает ввод, `count` показывает «введено / максимум». `variant`: `bar` (по умолчанию) / `outline` (рамка как у Input) / `filled` / `plain`; `readonly`; `align`; `blurOnEnter`
|
|
97
|
-
- **TaoPinCode** — пин-код из N полей. По умолчанию клик стирает ячейку и все справа (`clear-on="focus"`); `clear-on="input"` заменяет цифру только при вводе. `format="#-##-##"` рисует визуальные разделители (в значение не входят; вставка в таком виде или чистым кодом раскладывается по ячейкам). Последняя ячейка снимает фокус и эмитит `complete`; `status="success | error"` (после `complete`) подсвечивает или встряхивает ячейки и говорит об этом
|
|
98
|
-
- **TaoSlider** / **TaoRangeSlider** — один бегунок (`v-model` — число) или два (`[от, до]`, `minGap`). Мышь, тач, стрелки. `marks` (деления, числа, `{ value, label }`), `discrete` для ступенчатых шкал, `vertical`, `flat`, `format
|
|
104
|
+
- **TaoPinCode** — пин-код из N полей. По умолчанию клик стирает ячейку и все справа (`clear-on="focus"`); `clear-on="input"` заменяет цифру только при вводе. `format="#-##-##"` рисует визуальные разделители (в значение не входят; вставка в таком виде или чистым кодом раскладывается по ячейкам). Последняя ячейка снимает фокус и эмитит `complete`; `status="success | error"` (после `complete`) подсвечивает или встряхивает ячейки и говорит об этом скринридеру; `bordered="false"` — лёгкий стиль без рамки
|
|
105
|
+
- **TaoSlider** / **TaoRangeSlider** — один бегунок (`v-model` — число) или два (`[от, до]`, `minGap`). Мышь, тач, стрелки. `marks` (деления, числа, `{ value, label }`), `discrete` для ступенчатых шкал, `vertical`, `flat`, `format`, `bubble` (значение плашкой у ручки, по умолчанию выключена), `zones` (шкала цветом, точка там, где зона кончается, `reveal` — красить по мере заполнения); `variant="thin"` — тонкий трек для seek / громкости
|
|
99
106
|
- **TaoColorPicker** — квадрат насыщенности и яркости, полосы тона и прозрачности, образцы, пипетка (где есть `EyeDropper`), режимы ввода HEX / RGB / HSL. `v-model` — строка hex; `colorModel()` подключает ваше собственное хранилище цвета
|
|
100
107
|
- **TaoColorInput** — поле с образцом и hex-текстом; палитра открывается в поповере
|
|
101
108
|
- **TaoFileDrop** — зона загрузки (drag & drop + клик). Список имён под зоной, `v-model` — `File[]`. Очистку всей пачки решает родитель (`clear-request`); файл, не подошедший под `accept`, приходит в `reject`
|
|
@@ -119,7 +126,7 @@
|
|
|
119
126
|
- **TaoAlert** — инлайн-баннер страницы или ошибки формы (success / error / warning / info); `collapsible` сворачивает тело под заголовок (поиск по странице его всё равно находит)
|
|
120
127
|
- **TaoProgress** — статичная полоса (`progress` в %). Проценты сверху по центру или `showPercentage="right"` справа; слоты `#left` / `#right` — подписи, тогда процент справа в скобках. `false` прячет. Ширина — `minWidth` / `maxWidth`, не диапазон значения
|
|
121
128
|
- **TaoScrubber** — play / pause, слайдер по времени с метками событий, подпись «время / длина». Время сама не двигает: ведите `v-model` своими часами
|
|
122
|
-
- **TaoLoader** —
|
|
129
|
+
- **TaoLoader** — ожидание, конца которого не знаем: `variant` `dots` (по умолчанию) / `ring` / `pulse`, `tone`, `size` (число или small / medium / large), говорит «Загрузка» скринридеру (`label`), при «уменьшить движение» дышит; `TaoButton loading` носит то же кольцо
|
|
123
130
|
- **TaoImage** — обёртка над `<img>`: fade-in и плейсхолдер. `lazy` включает нативный `loading="lazy"`
|
|
124
131
|
- **TaoIcon** — SVG-иконки (40 встроенных, свои через `registerTaoIcons`) или icon-шрифт (см. раздел «Иконки» ниже)
|
|
125
132
|
|
|
@@ -162,6 +169,8 @@ Container живёт на другой оси — ширина: `width="wide" |
|
|
|
162
169
|
<html class="tao-density-auto">
|
|
163
170
|
```
|
|
164
171
|
|
|
172
|
+
**Рамки** — третий контекст, для декоративных рамок панелей: `tao-frames-soft` на контейнере (или на `<html>`) делает прозрачными рамки `TaoAlert`, `TaoSpoiler`, `TaoTable`, `TaoList`, `TaoToolbar` и `TaoMenubar`, и панель держит заливка (у алерта чуть гуще тон); ничего не двигается, рамка в 1px остаётся в боксе. `tao-frames-framed` возвращает их внутри мягкой области, а `bordered` на панели (`true` / `false`) переопределяет контекст для неё. Рамки полей, кольцо фокуса и линии между рядами не затрагиваются: они показывают, где контрол, и WCAG 1.4.11 требует от них 3:1. Токены `--tao-frame-alpha` / `--tao-frame-tint` / `--tao-frame-fill`.
|
|
173
|
+
|
|
165
174
|
|
|
166
175
|
Поверхности — из чего «сделана» панель: `flat` — заливка (по умолчанию), `grain` — статичное плёночное зерно, `glass` —
|
|
167
176
|
полупрозрачное стекло с размытием того, что позади. Проп `surface` у TaoCard / TaoBlock или класс `tao-surface-grain` /
|
|
@@ -639,7 +648,7 @@ tokens/primitives.css → tokens/semantic.css → themes/*.css → contexts/*.cs
|
|
|
639
648
|
| `tokens/semantic.css` | Роли, не зависящие от темы: скругления, тени, шрифт, движение | Редко |
|
|
640
649
|
| `themes/dark.css` | Цветовые роли темы по умолчанию (dark): `--tao-color-accent`, `--tao-color-surface`, ... | **Да — это и есть API темизации** |
|
|
641
650
|
| `themes/light.css` | Те же роли под `[data-tao-mode="light"]` (или старым `[data-tao-theme="light"]`) | Да, как образец |
|
|
642
|
-
| `contexts/size.css`, `tone.css`, `surface.css` | `.tao-size-*` и `.tao-density-*`, `.tao-tone-*`, `.tao-surface-*`: что контрол читает, чтобы знать размер,
|
|
651
|
+
| `contexts/size.css`, `tone.css`, `surface.css`, `frames.css` | `.tao-size-*` и `.tao-density-*`, `.tao-tone-*`, `.tao-surface-*`, `.tao-frames-*`: что контрол читает, чтобы знать размер, цвет, материал и насколько громки его рамки | Редко |
|
|
643
652
|
| `base.css` | Глобальный reset (скроллбар, ссылки, box-sizing) | Редко |
|
|
644
653
|
|
|
645
654
|
Всё подключается одним файлом `@1337exp/taoui/styles.css` (и dark, и light: light включается атрибутом `data-tao-mode="light"`).
|