@1337exp/taoui 5.32.2 → 5.37.2

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,67 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.37.2
4
+
5
+ Nothing to migrate; two fixes.
6
+
7
+ - **A dialog no longer shifts the page sideways when it opens.** A lock of the page scroll (`TaoModal`, `TaoDrawer`, the modal `TaoCommandPalette`, the confirm window) sets `overflow: hidden` on the body, and a page with a classic scrollbar lost the bar and became wider by its width, so everything moved. The lock keeps the place of the bar now (`scrollbar-gutter: stable` on the root while it is locked, given back after) and only when the bar is there: on a short page, or with overlay scrollbars, nothing is reserved. A browser that does not know `scrollbar-gutter` (before Safari 18.2) shows the shift as before.
8
+ - **The wheel at the end of a scrolling panel stays in the panel.** As in 5.37.1 for `TaoCommandList`, now the same for the other panels that float over the page or sit in a dialog: the lists of `TaoSelect`, `TaoCombobox` and `TaoPresetInput`, `TaoMenu` (and the menus built on it), `TaoPopover`, the overflow menu of `TaoToolbar`, and the content of `TaoModal` and `TaoDrawer` get `overscroll-behavior: contain`. `TaoTable` and the `pre` of `.tao-prose`, which scroll sideways inside the page, get `overscroll-behavior-x: contain` only: the sideways swipe at the end no longer turns into the back gesture of the browser, and the vertical wheel still goes on to the page.
9
+
10
+ ## 5.37.1
11
+
12
+ Nothing to migrate; a fix.
13
+
14
+ - **`TaoCommandList` (and the palette): the wheel at the end of the list does not scroll the page.** When the list was scrolled to its last row, the next turn of the wheel went on to the page behind it (a list in a popover, a panel with `modal="false"`, a list laid in a page). The list has `overscroll-behavior: contain` now: it scrolls by itself and keeps the wheel. In the modal palette the page was locked already, so nothing changes there.
15
+
16
+ ## 5.37.0
17
+
18
+ Nothing to migrate: `modal` is `true` as before. One thing looks different: on a screen narrower than 600px the palette takes the whole screen now (`fullscreen="narrow"`); `:fullscreen="false"` keeps it a floating panel there too. (The palette is not on npm yet, so no app has seen the old look.)
19
+
20
+ - **`TaoCommandPalette` `modal`: a panel with no dimming.** `:modal="false"` makes it what the quick open of VS Code is: a panel at the top over a living page, with no dimming and no scroll lock, outlined with a hairline because nothing dims the page behind it. A press outside the panel closes it (there is no backdrop to press), Escape closes it as before, and the dialog says `aria-modal="false"`. The page can be read, scrolled and clicked while it is open.
21
+ - **`TaoCommandPalette` `fullscreen`: the whole screen on a phone.** As on `TaoModal`: `true` — always the whole screen, `'narrow'` (the default here) — only below 600px, `false` — never. The panel is the page then: square corners, the field at the top and the list under it taking what is left, the safe areas of the phone kept. The default is `'narrow'` and not `false` (the default of `TaoModal`) because a command list on a phone is a page in every app that has one.
22
+
23
+ ## 5.36.0
24
+
25
+ Nothing to migrate: `TaoCommandPalette` takes the same props, slots and events and looks the same; the new component is added beside it. (The look of the palette changed in 5.35.1 and 5.35.2, which are not on npm yet.)
26
+
27
+ - **`TaoCommandList`: the field and the list of the command palette with no window around them.** The palette is a dialog, and a dialog is only one of the places such a list lives: it can be a block of a page, a side panel, a popover under a button. `TaoCommandList` is exactly what is inside the palette (the search, the lit letters, the groups, the rows with an icon, a description and a shortcut, ↑ ↓ Home End Enter, the `combobox` and `listbox` roles for a screen reader, the `#item` and `#empty` slots) and nothing else. `@select` picks a command and closes nothing; `@escape` tells that Escape was pressed in the field; `autofocus` puts the focus in the field when the list appears; `focus()` and `reset()` are for the parent. The list takes the height its parent gives it and scrolls inside it; `class` and `style` go to the root. `TaoCommandPalette` is now this list in a dialog (the overlay, the page scroll lock, Escape, the focus return), made anew at every opening, so it still starts with an empty query and the focus in the field. The texts are the same (`commandPalette` in the locale), and the class names of the rows are `tao-command-list__*` now (they were `tao-command-palette__*`, which no app should have styled).
28
+
29
+ ## 5.35.2
30
+
31
+ Nothing to migrate; a fix to the look.
32
+
33
+ - **`TaoCommandPalette`: the description stands in the line of the label.** It was a second line under the label, so a command with a description was taller than its neighbours and the list lost its rhythm (and the arrows walked in unequal steps). Now the description follows the label in the same line (muted, the secondary size of a control) and gives way first: it is cut with an ellipsis and never pushes the label. Every row is one height. For a two-line row of your own use the `#item` slot.
34
+
35
+ ## 5.35.1
36
+
37
+ Nothing to migrate; the look of `TaoCommandPalette` is put in order.
38
+
39
+ - **`TaoCommandPalette`: the field and the rows are one scale, the groups read as groups, every row is on one rhythm.** The panel is teleported to `<body>` and set no text size of its own, so the rows took the 16px of the page while the field stayed at 14px: the field looked small beside big rows. The panel sets `--tao-control-font-size` now, the field is one step taller than a row (row height + `--tao-space-2`) and its text starts where the labels of the rows start. A caption of a group is small capitals with spacing (`--tao-font-size-xs`, 600, muted) with a hairline above every group but the first, so it no longer passes for a row. A row is one height (`--tao-control-height`), and a row with a description is the same row with a second line, not a different one. While any row has an icon the rows without one keep an empty column for it, so every label stands in one column. The row under the pointer or the arrows goes one step up the text ladder (`text-strong`), the corners are concentric with the panel, the description, the group name and the shortcut are on the secondary size of a control.
40
+
41
+ ## 5.35.0
42
+
43
+ Nothing to migrate: a new component.
44
+
45
+ - **`TaoCommandPalette`: a dialog that searches a list of commands.** The `Ctrl+K` of an editor, without the editor: `items` (`{ id, label, group?, shortcut?, icon?, description?, keywords?, disabled? }`) are searched and shown, the app runs the pick (`@select`) and opens the palette from a key of its own (the palette listens to no key, so it takes no shortcut from the app). Every word of the query must fit, in any order: the start of the label scores highest, then the start of a word in it (after a space, a dot, a dash, an underscore, a slash or a colon), then any place, then the letters in order with gaps (`sv` finds «Save», fewer gaps rank higher); the group, the description and `keywords` find a command too, with nothing to light; `е` and `ё` are one letter, case does not matter. The matched letters of the label are lit. With an empty query the list goes under captions of its groups, with a query each row names its group. A disabled command is shown and cannot be picked. Keys: ↑ ↓ walk the rows that can be picked (the ends join), Home End, Enter picks, Esc closes (through the layer stack: a menu opened from it closes first), Tab keeps the focus in the field, a key during text composition is not taken. A role map for a screen reader: a dialog with a `combobox` field (`aria-controls`, `aria-activedescendant`) and a `listbox` of `option`s. Slots `#item` (your own row: the item, whether it is active, the lit stretches) and `#empty`; `surface`, `limit`, `placeholder`, `emptyText`, `label` (texts also in the locale: `commandPalette`). The search is exported alone as `matchCommands(items, query, limit)` (with `mergeRanges`, `splitByRanges`) for any list you filter by typing. Made for the command registry of TaoUX (`taoux/commands`): its commands map to `items` one to one.
46
+
47
+ ## 5.34.1
48
+
49
+ Nothing to migrate; a fix.
50
+
51
+ - **`TaoCarousel` `centered` + `loop`: no flicker at the seam.** When the strip stopped on a copy (going from the last slide to the first, or back) it jumped to the real set in `scrollend`, and the scale and the fade of the slides (`--tao-carousel-d`) were rewritten only by the `scroll` event of that jump, which comes a frame later; that one frame drew the slides in their new places with the old look, a flash. The distances are written in the same frame as the jump now.
52
+
53
+ ## 5.34.0
54
+
55
+ Nothing to migrate for a plain `loop`. `centered` with `loop` changes: it was a rewind to the first slide, it is a cycle now.
56
+
57
+ - **`TaoCarousel` `centered` + `loop`: a cycle with no end.** At the ends of a centered strip there was an empty place; now the slides from the other end stand in it. Forward from the last slide is the first one, back from the first is the last, with no rewind, for the arrows, the keys, a swipe and a drag, the autoplay and the model; a dot goes to the nearest copy of its slide, so the shortest way. The slides are drawn three times (more when there are few of them, so the frame is never empty): the middle set is the real one, the others are `inert` and `aria-hidden` and marked `data-tao-carousel-copy`, and a slide should not hold an `id` or a `ref`. Whenever the strip stops in a copy it jumps by whole sets back to the real one, which looks the same. The dots, `v-model` and the `change` event count only the real slides. The copies are drawn after the mount (the server draws the slides once, so hydration has nothing to differ in). A plain `loop` is a rewind as before.
58
+
59
+ ## 5.33.0
60
+
61
+ Nothing to migrate: `centered` is off by default, and a carousel without it works as before.
62
+
63
+ - **`TaoCarousel` `centered`: the current slide in the middle.** The strip the shop and gallery pages use: the current slide stands in the middle and is the biggest, the ones beside it are smaller, the outer ones fade and are cut by the edge of the strip, the arrows hang over its edges. `perView` is how many whole slides are in the frame, `peek` is how much of the outer ones shows on each side, and a step (the arrows, the keys, the autoplay) is one slide, the dots count every slide. The strip is still a scroll-snap strip, so the swipe, the mouse drag, the wheel and `loop` work as in the other modes; the first and the last slide can stand in the middle (two spacers), and a change of the width keeps the current one there. The script writes only one number to each slide, `--tao-carousel-d` (its distance from the middle, 0 … 2 slides), and the CSS turns it into `scale` and `opacity`, so the look is restyled with `--tao-carousel-scale-step` (0.09), `--tao-carousel-fade` (0.55) and `--tao-carousel-ring` (the ring around an arrow, the page background by default). The width of a slide is measured by its layout width (the drawn one is scaled).
64
+
3
65
  ## 5.32.2
4
66
 
5
67
  Nothing to migrate; a fix.
package/README.md CHANGED
@@ -64,6 +64,8 @@
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)
66
66
  - **TaoInputGroup** — outer glue: `#before` | field | `#after` (protocol, unit, button)
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()`
68
+ - **TaoCommandPalette** — a dialog (`TaoCommandList` in a window; `modal="false"` is a panel over a living page, the whole screen on a phone) that searches a list of commands (`Ctrl+K`): `items` with `group`, `shortcut`, `keywords`, `disabled`; every word of the query must fit (start of the label, start of a word, any place, letters in order), the matched letters are lit; the arrows, Home, End, Enter, Esc, the focus stays in the field; `@select` runs the pick, the palette listens to no key itself. The search is exported as `matchCommands`
67
69
  - **TaoModal** — modal with animation and slots; `fullscreen` (or `fullscreen="narrow"`: a page on a phone, a dialog on a computer); `surface="grain"` / `"glass"`, class and attributes on the dialog panel; the content scrolls under a header and a footer that stay
68
70
  - **TaoDrawer** — side panel (filters, settings), or a bottom sheet with `side="bottom"`. Esc, backdrop click, focus trap — same as the modal; `surface`, class and attributes on the panel. The sheet is pulled down by its grip and header (`swipeToClose`); `show-close="false"` hides only the cross, `#header` is a header of your own
69
71
  - **TaoSpoiler** — disclosure. `v-model` and `aria-expanded`. Neighbours do not close each other
@@ -120,7 +122,7 @@
120
122
  - **TaoTimeline** — a vertical feed of events: order steps, releases, a log. `active` fills the line up to the current event (`aria-current="step"`), without it the feed is a log of the past; `tone` and `icon` per marker, `#marker` / `#title` / `#content` slots; `align="alternate"` puts events on both sides and folds into one below 480px of its own width
121
123
  - **TaoSkeleton** — loading placeholder (text / title / circle / rect)
122
124
  - **TaoCounter** — flipping digits (not an input)
123
- - **TaoCarousel** — strip: full slide with `autoplay`, card with `peek`, row with `per-view`. Arrows via `controls` or `#prev` / `#next`; marks under the strip via `indicator` (`dots`, `bars` or `progress`). With `autoplay` the current mark fills over the interval and the slide changes when it is full; hover, keyboard focus, touch, a hidden tab and the pause button stop it, `prefers-reduced-motion` turns it off
125
+ - **TaoCarousel** — strip: full slide with `autoplay`, card with `peek`, row with `per-view`, or `centered` (the current slide in the middle and the biggest, the neighbours smaller, the outer ones faded; with `loop` a seamless cycle with no end). Arrows via `controls` or `#prev` / `#next`; marks under the strip via `indicator` (`dots`, `bars` or `progress`). With `autoplay` the current mark fills over the interval and the slide changes when it is full; hover, keyboard focus, touch, a hidden tab and the pause button stop it, `prefers-reduced-motion` turns it off
124
126
  - **TaoAvatar** — photo or initials, sizes `small` / `medium` / `large`. Status `dot` and `count`
125
127
  - **TaoTag** — badge with tones. `#prefix` (avatar), `closable` dismisses the chip, `flat` drops the border
126
128
  - **TaoAlert** — inline page/form banner (success / error / warning / info); `collapsible` folds the body under the title (find-in-page still finds it)
@@ -617,6 +619,8 @@ The `cell-<key>` slot replaces a cell. `loading` shows an overlay; an empty list
617
619
  </article>
618
620
  </TaoCarousel>
619
621
  <TaoCarousel :peek="72" :controls="false" indicator="dots">…</TaoCarousel>
622
+ <TaoCarousel v-model="slide" centered :per-view="3" :peek="40" indicator="dots">…</TaoCarousel>
623
+ <TaoCarousel v-model="slide" centered loop :per-view="3" :peek="40" indicator="dots">…</TaoCarousel>
620
624
  <TaoCarousel v-model="slide" :per-view="5" :peek="28">
621
625
  <template #prev></template>
622
626
  <template #next="{ go, disabled }">
package/README.ru.md CHANGED
@@ -64,6 +64,8 @@
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`)
66
66
  - **TaoInputGroup** — склейка снаружи: `#before` | поле | `#after` (протокол, единица, кнопка)
67
+ - **TaoCommandList** — поле и список палитры без окна вокруг, для страницы, боковой панели или `TaoPopover`: тот же поиск, клавиши и строки, `@select` выбирает и ничего не закрывает, `autofocus`, `focus()`, `reset()`
68
+ - **TaoCommandPalette** — окно (`TaoCommandList` в диалоге; `modal="false"` — панель поверх живой страницы, на телефоне во весь экран), которое ищет по списку команд (`Ctrl+K`): `items` с `group`, `shortcut`, `keywords`, `disabled`; подойти должно каждое слово запроса (начало подписи, начало слова, любое место, буквы по порядку), найденные буквы подсвечены; стрелки, Home, End, Enter, Esc, фокус остаётся в поле; `@select` запускает выбранную, сама палитра клавиш не слушает. Поиск экспортируется как `matchCommands`
67
69
  - **TaoModal** — модальное окно с анимацией и слотами; `fullscreen` (или `fullscreen="narrow"`: страница на телефоне, окно на компьютере); `surface="grain"` / `"glass"`, класс и атрибуты — на панели окна; прокручивается содержимое под шапкой и подвалом, которые на месте
68
70
  - **TaoDrawer** — боковая панель (фильтры, настройки) или нижний лист с `side="bottom"`. Esc, клик по фону, ловушка фокуса — как у модалки; `surface`, класс и атрибуты — на панели. Лист тянут вниз за ручку и шапку (`swipeToClose`); `show-close="false"` прячет только крестик, `#header` — своя шапка
69
71
  - **TaoSpoiler** — раскрывающийся блок. `v-model` и `aria-expanded`. Несколько подряд сами друг друга не закрывают
@@ -120,7 +122,7 @@
120
122
  - **TaoTimeline** — вертикальная лента событий: шаги заказа, релизы, журнал. `active` заливает линию до текущего события (`aria-current="step"`), без него лента — журнал прошедшего; `tone` и `icon` у маркера, слоты `#marker` / `#title` / `#content`; `align="alternate"` раскладывает события по обе стороны и складывается в одну уже 480px своей ширины
121
123
  - **TaoSkeleton** — плейсхолдер загрузки (text / title / circle / rect)
122
124
  - **TaoCounter** — витрина числа с переворотом цифр (не инпут)
123
- - **TaoCarousel** — лента: целый слайд с `autoplay`, карточка с `peek`, полоса с `per-view`. Стрелки через `controls` или `#prev` / `#next`; метки под лентой — `indicator` (`dots`, `bars` или `progress`). С `autoplay` текущая метка заполняется за интервал, по заполнении слайд меняется; hover, фокус с клавиатуры, касание, скрытая вкладка и кнопка паузы останавливают, `prefers-reduced-motion` выключает
125
+ - **TaoCarousel** — лента: целый слайд с `autoplay`, карточка с `peek`, полоса с `per-view` или `centered` (текущий слайд по центру и крупнее всех, соседние меньше, дальние бледнее; с `loop` — бесшовный цикл без конца). Стрелки через `controls` или `#prev` / `#next`; метки под лентой — `indicator` (`dots`, `bars` или `progress`). С `autoplay` текущая метка заполняется за интервал, по заполнении слайд меняется; hover, фокус с клавиатуры, касание, скрытая вкладка и кнопка паузы останавливают, `prefers-reduced-motion` выключает
124
126
  - **TaoAvatar** — фото или инициалы, размеры `small` / `medium` / `large`. Точка `dot` и счётчик `count`
125
127
  - **TaoTag** — тег/бейдж со статусами. `#prefix` (аватар), `closable` убирает чип, `flat` — без рамки
126
128
  - **TaoAlert** — инлайн-баннер страницы или ошибки формы (success / error / warning / info); `collapsible` сворачивает тело под заголовок (поиск по странице его всё равно находит)
@@ -617,6 +619,8 @@ const columns = [
617
619
  </article>
618
620
  </TaoCarousel>
619
621
  <TaoCarousel :peek="72" :controls="false" indicator="dots">…</TaoCarousel>
622
+ <TaoCarousel v-model="slide" centered :per-view="3" :peek="40" indicator="dots">…</TaoCarousel>
623
+ <TaoCarousel v-model="slide" centered loop :per-view="3" :peek="40" indicator="dots">…</TaoCarousel>
620
624
  <TaoCarousel v-model="slide" :per-view="5" :peek="28">
621
625
  <template #prev></template>
622
626
  <template #next="{ go, disabled }">