@1337exp/taoui 5.49.2 → 5.50.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.50.0
4
+
5
+ Nothing to migrate: a component and an icon are added, and two looks are put right (the keys in a menu and a command list, the highlight of a command list row).
6
+
7
+ - **The keys of a menu and a command list are on the line of their label again.** `TaoKbd` `plain` kept the height of the key cap (`1.7em`, about 24px): on a text line it did nothing, but in a flex row (a menu row, a command list row) the key is a block, so its text sat at the top of that box, a few pixels above the label. `plain` now has `height: auto`, and a test holds that every box property of the cap is reset on it. This reached `TaoMenu` (and so `TaoContextMenu`, `TaoDropdownMenu`, `TaoMenubar`) and `TaoCommandList` (`TaoCommandPalette`).
8
+ - **The highlighted row of a command list has the corners of a menu row.** The list was inset by 8px and the row corners are the panel radius minus the inset, which is 0 with the default 8px radius: a bar that did not touch the edges and had square corners. The inset is the 4px of `TaoMenu` now (one `--_inset` for the list padding, the row corners and the start of the field text), so the corners are 4px and the text of the field still stands over the labels of the rows.
9
+
10
+ - **New `TaoLanguageSwitch`:** the language of the interface as a globe that opens a list of the languages, each under its own name (`Русский`, `English`, `Deutsch`), the current one checked. `languages` is codes or `{ code, label }`, `v-model` is the code; the names come from the engine (`Intl.DisplayNames`, the helper `taoLanguageName(code)` is exported), so there is no table to keep. It shows the name of the current language beside the globe, `icon-only` leaves the globe (a phone); the accessible name of the button is «Language: English» either way (the visible word is inside it, and the label is a locale text: `languageSwitch.label`, `en` / `ru` built in). It writes `<html lang>` on mount and on a change (`:apply="false"` to do it yourself). What it does not do, on purpose: it knows none of your texts and stores nothing; the messages of the app, the storage and `setTaoLocale(localeRu)` for the built-in texts stay yours (`@change` is the place). Built on `TaoDropdownMenu`, so the list, the keys and the focus return are the menu's. Every name carries its own `lang`, so a screen reader reads «Deutsch» in German.
11
+ - **Menu items take `lang`.** `TaoMenuItem` (`item`, `checkbox`, `radio`, `label`) has an optional `lang`: the language of the label when it is not the page's, written as `lang` on the row (`TaoMenu`, `TaoDropdownMenu`, `TaoContextMenu`). Without it nothing changes.
12
+ - **Icon `tao-globe`**, beside `tao-sun`, `tao-moon` and `tao-monitor` for the theme: the sign of the switch above (44 built-in icons now).
13
+ - **The Guide: «Switching the language».** The do (the switch beside the theme toggle) and the don't (`EN | RU | DE | FR | JA` in a `TaoSegmented`), the rule and the reason: the name of a language in itself, no flags (a flag is a country, and the W3C Internationalization guidance says not to use them for language links), no codes, and a list that only grows is a menu from the start. The header of the showcase has the switch now instead of the segmented `RU | EN`.
14
+
3
15
  ## 5.49.2
4
16
 
5
17
  Nothing to migrate. A segmented control whose captions fit looks and measures as before; one that did not fit used to lose its last words, and now wraps them.
package/README.md CHANGED
@@ -60,6 +60,7 @@
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
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
+ - **TaoLanguageSwitch** — the language of the interface: a globe (`tao-globe`) that opens a list of the languages, each under its own name (`Русский`, `English`, from `Intl.DisplayNames`); `v-model` is the code, it writes `<html lang>`, `icon-only` for a phone; the texts and the storage stay yours
63
64
  - **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
65
  - **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
66
  - **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)
@@ -132,7 +133,7 @@
132
133
  - **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
133
134
  - **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
134
135
  - **TaoImage** — `<img>` wrapper: fade-in and placeholder. `lazy` turns on native `loading="lazy"`
135
- - **TaoIcon** — SVG icons (43 built in, your own via `registerTaoIcons`) or an icon font (see Icons below)
136
+ - **TaoIcon** — SVG icons (44 built in, your own via `registerTaoIcons`) or an icon font (see Icons below)
136
137
 
137
138
  ### Navigation
138
139
 
package/README.ru.md CHANGED
@@ -60,6 +60,7 @@
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
62
  - **TaoThemeToggle** — переключатель светлой / тёмной темы одной кнопкой-иконкой (солнце или луна); читает и переворачивает `data-tao-mode` у `<html>` либо работает от `v-model`; `system` добавляет третье состояние «как в системе» (монитор)
63
+ - **TaoLanguageSwitch** — язык интерфейса: глобус (`tao-globe`), который открывает список языков, каждый под своим названием (`Русский`, `English`, из `Intl.DisplayNames`); `v-model` — код, пишет `<html lang>`, `icon-only` для телефона; тексты и хранилище остаются вашими
63
64
  - **TaoTour** — тур по странице: страница затемняется, цель остаётся освещённой, карточка со стрелкой говорит, что это (шаг без цели — карточка посередине; `interactive` даёт нажать на цель). Только рисует: шаги ваши или из TaoUX `tour`
64
65
  - **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`, `pauseOnHover`, `roundPause` (`false`: без паузы в начале круга), `fill` (помещающаяся строка повторяется и тоже бежит: биржевая лента) и `reverse`, содержимое отслеживается (новая цена перемеряет строку), `decorative` (призрак для строки-фона: скрыта от скринридера, не остановка Tab, не реагирует на курсор и тап, не выделяется, без пауз между кругами)
65
66
  - **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки); `variant` `outline` / `filled` / `plain` (без рамки: пункт списка в правке; его берут и `TaoInputNumber`, `TaoCombobox`, `TaoTextarea`)
@@ -132,7 +133,7 @@
132
133
  - **TaoScrubber** — play / pause, слайдер по времени с метками событий, подпись «время / длина». Время сама не двигает: ведите `v-model` своими часами
133
134
  - **TaoLoader** — ожидание, конца которого не знаем: `variant` `dots` (по умолчанию) / `ring` / `pulse` / `diamonds`, `tone`, `size` (число или small / medium / large), говорит «Загрузка» скринридеру (`label`), при «уменьшить движение» дышит; `TaoButton loading` носит то же кольцо
134
135
  - **TaoImage** — обёртка над `<img>`: fade-in и плейсхолдер. `lazy` включает нативный `loading="lazy"`
135
- - **TaoIcon** — SVG-иконки (43 встроенных, свои через `registerTaoIcons`) или icon-шрифт (см. раздел «Иконки» ниже)
136
+ - **TaoIcon** — SVG-иконки (44 встроенных, свои через `registerTaoIcons`) или icon-шрифт (см. раздел «Иконки» ниже)
136
137
 
137
138
  ### Навигация и взаимодействие
138
139