@1337exp/taoui 5.50.0 → 5.51.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 +26 -0
- package/README.md +5 -5
- package/README.ru.md +5 -5
- package/dist/index.d.ts +234 -4
- package/dist/index.js +942 -126
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/skills/taoui/SKILL.md +10 -5
- package/skills/taoui/references/components.md +14 -6
- package/skills/taoui/references/patterns.md +273 -273
- package/skills/taoui/references/starters.md +435 -0
- package/src/styles/base.css +4 -4
- package/src/styles/tokens/primitives.css +8 -5
- package/src/styles/tokens/semantic.css +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.51.0
|
|
4
|
+
|
|
5
|
+
Nothing to migrate: `menu`, `hint`, `tone` and `@move` are new and do nothing until set; Enter on a folder now also opens or closes it. One look changes by default: the selected row of a tree without the focus is grey (`--tao-color-hover`) instead of the accent; to keep the accent always, `.my-tree:not(:focus-within) .tao-tree__row--selected { background: var(--tao-color-accent-subtle); color: var(--tao-color-accent-text); }`. The corners are softer and the scrollbars a pixel thicker (below); the old look is `:root { --tao-radius-sm: 4px; --tao-radius-md: 8px; --tao-radius-lg: 12px; --tao-radius-control: 4px; --tao-radius-panel: 8px; --tao-scrollbar-size: 5px; }`.
|
|
6
|
+
|
|
7
|
+
- **The Guide has Starters: whole screens to begin a project from.** A starter is one Vue file people copy as is, live on the page in a frame of the width you pick (phone, tablet, wide), with the decisions it makes and why, and the whole file under it; `npm run skill` writes them into `skills/taoui/references/starters.md`, so an AI assistant starts a new app from the same shape. A starter uses the public API only (a test holds it: no `:deep(.tao-…)`, no private `--_…`). The first one is **the app shell with a side menu**, as in Axis and NextUp: `TaoNav fill` with the side panel, the rail and the bar from one list, one main action, quiet counters, the language and the theme at the bottom of the panel (in a thin header on a phone, by a container query on `tao-nav`, no JavaScript), settings as a section of the menu. The second is **a list and the open item**, as the notes of NextUp: side by side when there is room and one at a time when there is not (the list, then the item with Back and Escape), decided by a container query on an outer box, so it follows the room it is given inside the shell, not the window; each pane scrolls by itself, a `TaoList roving` list, the focus moves to the item heading and back to its row in the single pane, quiet icon actions with the one that destroys in `tone="danger"`. The showcase chrome (its accent `h2`, its paragraphs) no longer reaches into a block marked `showcase-free`, so a starter looks as it will in your app. Each starter is its own entry of the Guide menu, in the group «Starters» (`#starter-app-shell`, `#starter-list-detail`).
|
|
8
|
+
- **`TaoNav` `fill`: the shell of an app.** TaoNav takes the height of its parent (`html, body, #app { height: 100% }`), the page scrolls inside `.tao-nav__content` or its own panes instead of the document, and the side column runs the full height, so the `#footer` stands at the bottom of the panel. With nothing scrolling as a document, no page scrollbar comes and goes between a short section and a long one, and nothing shifts sideways. Axis needed six `:deep(.tao-nav__…)` rules for this; it can drop them.
|
|
9
|
+
- **Several children of the `TaoNav` `#action` stand one under the other** (the action, then a project chip), with a small gap; one child looks as before. **`--tao-nav-compact`** is public: 1 on the bar and the rail, 0 on the side panel, set on the navigation only (the page beside it and everything outside a TaoNav read 0), for your own pieces in `#action`, `#footer` and `#label`, a chip that keeps only its icon on the rail. Axis and fin-view read the private `--_compact` for that.
|
|
10
|
+
- **`TaoLanguageSwitch` in a TaoNav shows its name where there is room:** on the side panel «🌐 English», on the rail only the globe, by `--tao-nav-compact`, without `icon-only` and without JavaScript (in `auto` only CSS knows the look). The name is folded by width, not removed, so the button is still «Language: English». Axis did this with `:deep` rules on the switch.
|
|
11
|
+
- **`TaoDropdownMenu` `block`: a trigger that is a whole chip of yours.** The button fills the width and the height of its place and draws nothing of its own (no padding, no background, the corners of its parent), and what is in `#button` stretches inside it, so the chip is the button and the hover and the focus ring go round it (the ring inside, so a clipping box such as the action of TaoNav does not cut it). Under the `#action` of TaoNav a block menu keeps its own inside and the height of a control, so the rail squares it like the button above. Axis and fin-view styled `.tao-dropdown-menu__button` from outside for their project and portfolio chips; they can drop it. The app shell starter has the chip now: the folder, the project, a chevron, a menu of the projects with the current one checked and «New project»; a round icon on the rail by `--tao-nav-compact`, in the header on a phone.
|
|
12
|
+
- **A plain `TaoList` (`bordered=false`) keeps air between a tinted row and the line.** Its rows are rounded and take a tint on hover and selection, and the line was their own bottom border, so the tint ran into it. The line now stands in an 8px gap between the rows, shorter than the row by the text inset on both sides, as the thread list of hub has it. A bordered list is as before.
|
|
13
|
+
- **Softer corners by default: 6 / 10 / 14 / 18px.** NextUp, Axis and fin-view each set the same five values over the kit, so they are the kit's now: `--tao-radius-sm` 6px (was 4), `-md` 10px (was 8), `-lg` 14px (was 12), the new `-xl` 18px; `--tao-radius-control` takes `md` (10px, was `sm` 4px) and `--tao-radius-panel` takes `xl` (18px, was `md` 8px). An app that set these values can drop them.
|
|
14
|
+
- **Scrollbars are 6px thick by default** (`--tao-scrollbar-size`, was 5px): a pixel easier to catch with the mouse, still thin.
|
|
15
|
+
|
|
16
|
+
- **`TaoTree` has a context menu of its own.** `menu` is a list of `TaoMenuItem`, or `(node, selected) => items` built for the row it opens on; the pick comes as `menu-select(id, node, selected)`. It opens on the right click anywhere on the row (not only over the label, as a `TaoContextMenu` in the `#label` slot did), on the Menu key and on Shift+F10, under the row from the start of its label; the focus goes back to the row when it closes, and a second right click moves it. The selection follows the file managers and IDEs: a right click outside the selection selects that row first (as `update:selected`, without `select`, so an app that opens a file on `select` does not open it), a right click inside a multiple selection keeps it and the menu acts on all of it (`selected` is those ids). An empty list leaves the browser's own menu. For a menu of your own the new `menu(node, event)` event comes on every request; `event.preventDefault()` in it keeps both ours and the browser's away. While the menu is open the selection keeps its accent, and a row that is not in the selection (`selection="none"`, a disabled row) is marked. Pure helper `menuSelection(mode, selected, node)` in `tree.ts`, types `TaoTreeMenu`, `TaoTreeTone`.
|
|
17
|
+
- **A node takes `hint` and `tone`.** `hint` is a quiet note after the label («library root», «3 files», «changed»); it gives way first when the row is narrow and is part of the row's name for a screen reader, after a hidden comma («App.vue, changed»). `tone` (`muted`, `accent`, `info`, `success`, `warning`, `danger`) colours the label: an excluded folder, a new or a broken file. On a filled row (hover, selection, the open menu) the plain text roles fell under 4.5:1 (dark `danger-text` 4.1, `text-muted` 4.3), so such a row takes the `*-text-hover` roles and a quiet colour a third of the way to the text: measured in the showcase, the worst pair is 4.9:1 in the light theme and 5.5:1 in the dark one. A colour is not the only sign of a state: say it in `hint` too.
|
|
18
|
+
- **The selection of a tree without the focus is grey**, as in an IDE: the accent tells which tree the keys go to. The showcase demo shows all of it (right click, Shift+F10, hints and tones, click outside the tree).
|
|
19
|
+
- **The rows of `TaoTree` can be moved**, by the pointer and by the keyboard, once the app listens to `@move`. The tree changes nothing: it hands `{ ids, parentId, index, targetId, position, copy }` to the app, which moves its data (the new helper `moveTreeNodes(nodes, move)` does it for a plain `TaoTreeNode[]`; a copy needs new ids, so it is the app's). `index` is the place among the children of `parentId` once the moved nodes are taken out, ready for a `splice`. `@move` is a prop as well as an event, so the tree waits for the promise it returns: the rows stay dimmed and `aria-busy` and cannot be moved again, and a rejected promise comes as `move-error` with the data untouched. Lazy children of a folder the move touched are loaded again.
|
|
20
|
+
- **The pointer:** a row lifts after 5px (a shaky click is still a click, and the click after a drop is not a pick); the middle of a folder puts the rows inside at the end, its top and bottom quarters before and after it, a leaf splits in halves, below an open folder is its first child, and below the last row of a folder the pointer going left takes the rows out of it, one level per indent. The place is a line from the level the rows will stand at, a folder is framed; a closed folder under the pointer opens after 650ms (a lazy one loads), the list scrolls at the edge of its scroll box, a ghost with the name (or «3 items») follows the pointer, Ctrl or Alt makes it a copy («+»), Escape and a lost window focus cancel. A selected row takes the whole selection, the topmost only (a child goes with its parent). Not by touch yet: on a phone a drag would fight the scroll, so it is keyboard and menu there.
|
|
21
|
+
- **The keyboard:** Ctrl+X or Ctrl+C on the rows, Ctrl+V on a folder (to its end) or on a row (after it), Escape forgets; each step is said in a live region («README.md moved to src.»), a place they cannot go is said and not done.
|
|
22
|
+
- **Where they may go:** never onto themselves or into their own descendants, never into a disabled folder, and no mark where nothing would change; `canDrop(move)` refuses more (a «no» cursor, no mark), `movable` picks the rows that can be moved. The pure part (`dropTarget`, `topmostIds`, `isTreeContainer`) is in `tree.ts` with its tests; texts `tree.countLabel`, `rootLabel`, `cutText`, `copyText`, `movedText`, `copiedText`, `canceledText`, `refusedText` (`en`, `ru`; optional in a locale of your own, like `menuLabel`, which is optional now too). The showcase demo moves for real, with a wait as a server would take («Slow server») and `node_modules` refused.
|
|
23
|
+
- **`sort`: a tree that keeps its own order.** `none` (the default) shows the data's order and a drag can put a row between others; `name` puts folders first and sorts by name as people read it (`Intl.Collator` of the locale, numbers as numbers: «file 2» before «file 10»; helper `compareTreeNodes(locale)`), a function is your own compare. The tree sorts what it shows, `nodes` is left as it is. With a sort a drag only changes the folder: onto a folder it puts the rows in it, onto any other row into that row's folder, with no line between rows (a place among siblings would be undone by the sort), and the top level is framed as a whole tree; a drop into the folder the rows are already in is no move. Ctrl+V follows the same rule. The default stays `none`: Axis and the WorldEditor of game-chronos keep an order of their own on purpose, and a sort switched on for them would shuffle it.
|
|
24
|
+
- **The selection is a tint, not an accent of the text.** A selected row keeps the colour of its text and icon (it was `accent-text`): the accent of a label is left to what the app marks on purpose with `tone`, or a walk through the tree shines as much as a mark. The tint is `accent-subtle` while the tree has the focus and grey without it, as before. The showcase demo no longer paints an open folder with the accent either.
|
|
25
|
+
- **A saved view of a tree comes back whole.** `expanded`, `selected` and `checked` are lists of ids, so an app can store them (TaoUX `createSavedStorage`) and give them back after a reload. A lazy folder in a restored `expanded` used to show open and empty: its children were loaded only on a click. Now every open lazy folder that is on screen loads by itself, and its own open children show up and load in turn, so a saved chain (`node_modules / vue / dist`) opens level by level; the `expanded` given is not rewritten. A folder whose load fails is closed again with `load-error`, once, not in a loop.
|
|
26
|
+
- **A double click acts, a single click selects.** A double click on a folder opens or closes it, on a node without children it emits the new `open(node)` (a file into an editor). Enter does the same after it selects, as the ARIA tree pattern asks (Enter on a branch used to only select it). The two clicks of a double click do not undo a multiple selection, a double click on the chevron, the box or the actions is not one on the row, and with `selection="none"` (where a click already toggles a folder) only a leaf is opened.
|
|
27
|
+
- **A menu with `closeOnScroll` closes only for a scroll that moves what it is for** (`TaoMenu`, and so `TaoContextMenu` and the menu of `TaoTree`): the page, or a container that holds the anchor; for a point, the element under it when the menu opens. Any scroll on the page used to close it: on the showcase an autoplaying carousel scrolled its track every few seconds and closed every open context menu, which looked like «the menu closes when the pointer leaves it». A scroll inside the menu still does not count.
|
|
28
|
+
|
|
3
29
|
## 5.50.0
|
|
4
30
|
|
|
5
31
|
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).
|
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
- **TaoSpoiler** — disclosure. `v-model` and `aria-expanded`. Neighbours do not close each other
|
|
74
74
|
- **TaoSpoilerGroup** — accordion: `v-model` is the open panel key (`null` = all closed); spoilers take `name`. Without `v-model` the group keeps that key itself
|
|
75
75
|
- **TaoTabs** — tabbed sections
|
|
76
|
-
- **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
|
+
- **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). `fill` makes it the shell of an app: it takes its parent's height, the page scrolls inside it instead of the document and the footer stands at the bottom of the side panel (a ready shell: the Guide, «Starters»); several children of `#action` stack, and `--tao-nav-compact` (1 on the bar and the rail, 0 on the side) is there for your own pieces in the slots. `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
|
|
77
77
|
- **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
|
|
78
78
|
- **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
|
|
79
79
|
- **TaoPopover** — click panel with any slot content, Esc and outside click; `placement` as Tooltip. Not a tooltip, not an action menu
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
- **TaoPagination** — pages with ellipsis. Clicking “…” jumps `jump` pages (5 by default). `pageSizes` adds a «Per page» choice (`v-model:page-size`); the first row on screen stays on screen
|
|
121
121
|
- **TaoEmpty** — empty list, no results, no access
|
|
122
122
|
- **TaoList** / **TaoListItem** — list row: icon, title, caption, hover action. Not Select, not a table; `roving` makes it one Tab stop with the arrows between the rows
|
|
123
|
-
- **TaoTree** — files or objects as a tree: `v-model:expanded`, selection `none | single | multiple` (`v-model:selected`), checkboxes with mixed parents (`checkable`, `v-model:checked`), lazy children (`hasChildren` + `load`). ARIA tree: one tab stop, arrows, `→` / `←` in and out, Home / End, `*`, type-ahead. Slots `#icon`, `#label`, `#actions`; rows on the control tokens (size and density)
|
|
123
|
+
- **TaoTree** — files or objects as a tree: `v-model:expanded`, selection `none | single | multiple` (`v-model:selected`), checkboxes with mixed parents (`checkable`, `v-model:checked`), lazy children (`hasChildren` + `load`), a double click (or Enter) opens a folder or emits `open` for a file, a context menu of the row (`menu`, right click, Menu key, Shift+F10), a `hint` after the name and a `tone` of the label; the selection is grey while the tree has no focus. Rows move by dragging and by Ctrl+X / Ctrl+V (`@move`, which may return a promise; `canDrop`, `movable`; the helper `moveTreeNodes`): the tree asks, the app moves its data. `sort="name"` shows folders first by name, and then a drag only changes the folder. ARIA tree: one tab stop, arrows, `→` / `←` in and out, Home / End, `*`, type-ahead. Slots `#icon`, `#label`, `#actions`; rows on the control tokens (size and density)
|
|
124
124
|
- **TaoStages** — stage list: `wait` / `work` / `ok` / `bad`. Not a linear stepper
|
|
125
125
|
- **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
|
|
126
126
|
- **TaoSkeleton** — loading placeholder (text / title / circle / rect)
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
- **TaoLink** — `<NuxtLink>` in Nuxt, `<RouterLink>` with vue-router, otherwise a plain `<a>` — no extra setup
|
|
141
141
|
- **TaoStretchedLink** — a `TaoLink` that makes a whole card or row one link while the buttons inside it still work: `tao-stretched` on the container, `tao-stretched-raise` on a control that must stay clickable by itself. The keyboard sees one link and its focus ring goes round the container (`--tao-stretched-radius`). Never put `filter` / `transform` on the link: the layer would shrink under the pointer and the cursor would flicker The text under the stretched layer cannot be selected with the mouse (lift what must be selectable with `tao-stretched-raise`), and the link is named only by what is written in it: for a card, point `aria-describedby` of the link at the description.
|
|
142
142
|
- **TaoBreadcrumb** — crumbs: the last item is the current page
|
|
143
|
-
- **TaoDropdownMenu** / **TaoMenu** — a menu from a plain data tree `items`: submenus, checkboxes, radios, separators, group labels, shortcuts to show, disabled items. Arrows, Home / End, type-ahead, `→` / `←` for submenus, Esc closes the top level first. `TaoMenu` is the panel itself, for your own shells (a menu bar, a context menu); its `anchor` is an element or a point `{ x, y }` of the screen (a menu at the pointer or at a drop point, no anchor element; `TaoPopover` takes the same `anchor`); flips at the viewport edge; `size` makes the button a compact square, `dots="horizontal"` lays the three dots down (⋯), `:tabbable="false"` takes it out of the Tab order
|
|
143
|
+
- **TaoDropdownMenu** / **TaoMenu** — a menu from a plain data tree `items`: submenus, checkboxes, radios, separators, group labels, shortcuts to show, disabled items. Arrows, Home / End, type-ahead, `→` / `←` for submenus, Esc closes the top level first. `TaoMenu` is the panel itself, for your own shells (a menu bar, a context menu); its `anchor` is an element or a point `{ x, y }` of the screen (a menu at the pointer or at a drop point, no anchor element; `TaoPopover` takes the same `anchor`); flips at the viewport edge; `size` makes the button a compact square, `dots="horizontal"` lays the three dots down (⋯), `:tabbable="false"` takes it out of the Tab order `block` makes the button of `TaoDropdownMenu` fill its place and draw nothing of its own, for a trigger that is a whole chip of yours in `#button` (the project under the main action of TaoNav).
|
|
144
144
|
- **TaoMenubar** / **TaoContextMenu** — the menu bar of an editor and the menu on the right click, on `TaoMenu`. The bar is one tab stop (`role="menubar"`): `←` / `→` walk it, `↓` / Enter open, with a menu open `←` / `→` and the pointer move to the neighbour menu; an entry without `items` is a plain action. The context menu opens at the pointer (or at the element for the Menu key / Shift+F10) and wraps its content without a box of its own
|
|
145
145
|
- **TaoToolbar** / **TaoToolbarGroup** / **TaoToolbarSeparator** — a bar of tools (`role="toolbar"`): one tab stop, `←` / `→` (or `↑` / `↓` when `orientation="vertical"`) walk the items, Home / End; inside a `TaoSegmented` the arrows pick the option and go on from its edge. Groups are split by a thin line across the bar; `inset` puts a sunken pill behind a group. Toggles are `TaoButton` with `v-model:pressed`. `overflow` keeps the bar in one row: the groups that do not fit go, the last one first, under a «⋮» button that opens them in a panel (the same buttons, not copies); a `TaoToolbarGroup` with `pinned` stays
|
|
146
146
|
- **TaoScrollTop** — floating “back to top”: `solid` / `ghost` / `text` looks, `side`, a mouse-hover `label`. Appears on reverse scroll after `boundary`
|
|
@@ -338,7 +338,7 @@ function onLanguageChange(lang) {
|
|
|
338
338
|
|
|
339
339
|
Without the plugin (individual components) `setTaoLocale()` is the only call you need.
|
|
340
340
|
|
|
341
|
-
Scrollbars are thin (
|
|
341
|
+
Scrollbars are thin (6px) with the accent thumb. To change them, set `--tao-scrollbar-size`, `--tao-scrollbar-thumb`, `--tao-scrollbar-track` (and `--tao-scrollbar-width` for Firefox) on the page or on a block; the class `tao-native-scrollbars` on `<html>` or on a block gives the browser's own back. A panel with sliders is in the showcase, under «Layers and theming».
|
|
342
342
|
|
|
343
343
|
Which language to start with: `detectTaoLanguage(['en', 'ru'])` answers with the one of your languages that the browser prefers (`ru-RU` fits `ru`), for example `saved ?? detectTaoLanguage(['en', 'ru'])`; on a server pass the wishes of the request: `{ requested: parseAcceptLanguage(header) }`.
|
|
344
344
|
|
|
@@ -712,7 +712,7 @@ document.documentElement.setAttribute('data-tao-theme', 'light')
|
|
|
712
712
|
- `--tao-color-text*` — text (default / strong / subtle / muted / disabled)
|
|
713
713
|
- `--tao-color-danger*`, `--tao-color-success*`, `--tao-color-warning*`, `--tao-color-info*` — status colors
|
|
714
714
|
- `--tao-color-input-*` — fields, because input bg/text often differs from surface/text
|
|
715
|
-
- `--tao-radius-control`, `--tao-radius-panel` — radii (small controls vs large panels)
|
|
715
|
+
- `--tao-radius-control`, `--tao-radius-panel` — radii (small controls vs large panels; 10px and 18px, from the scale `--tao-radius-sm` / `-md` / `-lg` / `-xl` = 6 / 10 / 14 / 18px)
|
|
716
716
|
- `--tao-shadow-panel`, `--tao-shadow-overlay` — shadows
|
|
717
717
|
- `--tao-font-size-*` — type scale in `primitives.css`: `xs`–`xl` controls, `2xl`–`4xl` titles / prose
|
|
718
718
|
- `--tao-control-height-*` (26 / 36 / 44px), `--tao-control-padding-x-*`, `--tao-control-padding-y-*`, `--tao-control-font-size-*`, `--tao-control-font-size-secondary-*`, `--tao-button-padding-x-*`, `--tao-indicator-size-*`, `--tao-tag-height-*` / `-padding-x-*` / `-font-size-*` — the size scale in `primitives.css`. Components read the current values from `contexts/size.css`: `--tao-control-height`, `--tao-control-padding-x` / `-y`, `--tao-control-font-size`, `--tao-control-font-size-secondary`, `--tao-button-padding-x`, `--tao-indicator-size`, `--tao-tag-height` / `-padding-x` / `-font-size`. Use them in your own controls to match the size around them.
|
package/README.ru.md
CHANGED
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
- **TaoSpoiler** — раскрывающийся блок. `v-model` и `aria-expanded`. Несколько подряд сами друг друга не закрывают
|
|
74
74
|
- **TaoSpoilerGroup** — аккордеон: `v-model` — ключ открытой панели (`null` — все закрыты), у спойлера `name`. Без `v-model` группа помнит ключ сама
|
|
75
75
|
- **TaoTabs** — вкладки для переключения между секциями контента
|
|
76
|
-
- **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
|
+
- **TaoNav** — навигация между разделами приложения: один список пунктов (`icon`, `href`, `badge`), три вида. `layout="auto"` выбирает по ширине самого TaoNav (container queries, без JS): нижняя панель до 600px (больше пяти пунктов: «Ещё» с меню), рейка с иконками до 840px, боковая панель с подписями от 840px. Со страницей в слоте раскладывает её сам: панель прилипает к низу (с учётом безопасной зоны), боковой список к верху. `floating` отрывает нижнюю панель в отдельную «пилюлю» с тенью (рейка и боковая панель не меняются). `fill` делает его оболочкой приложения: он берёт высоту родителя, страница прокручивается внутри, а не документом, подвал стоит внизу боковой панели (готовая оболочка: Guide, «Каркасы»); несколько детей `#action` встают друг под другом, а `--tao-nav-compact` (1 в нижней панели и рейке, 0 сбоку) — для своих вещей в слотах. `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` — страница
|
|
77
77
|
- **TaoTooltip** — всплывающая подсказка при наведении, обратная теме (`--tao-tooltip-bg`, `--tao-tooltip-text`); `shortcut` добавляет клавишу значком. `placement`: `top` / `bottom` / `left` / `right`, у каждого `-start` / `-end`; у края экрана переворачивается
|
|
78
78
|
- **TaoKbd** — клавиша (`T`, `Ctrl+K`): один вид клавиши в кнопке, подсказке, меню и списке команд. `cap` значок, `plain` приглушённый текст
|
|
79
79
|
- **TaoPopover** — панель по клику: слот с любым контентом, Esc и клик снаружи; `placement` как у Tooltip. Не тултип и не меню действий
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
- **TaoPagination** — страницы с многоточием. Клик по «…» прыгает на `jump` страниц (5 по умолчанию). `pageSizes` добавляет выбор «На странице» (`v-model:page-size`); первая видимая строка остаётся на экране
|
|
121
121
|
- **TaoEmpty** — пустой список, нет результатов, нет прав
|
|
122
122
|
- **TaoList** / **TaoListItem** — строка списка: иконка, заголовок, подпись, действие по ховеру. Не Select и не таблица; `roving` — одна остановка Tab, стрелки ходят по строкам
|
|
123
|
-
- **TaoTree** — файлы или объекты деревом: `v-model:expanded`, выбор `none | single | multiple` (`v-model:selected`), чекбоксы с промежуточным состоянием родителя (`checkable`, `v-model:checked`), ленивая подгрузка (`hasChildren` + `load`)
|
|
123
|
+
- **TaoTree** — файлы или объекты деревом: `v-model:expanded`, выбор `none | single | multiple` (`v-model:selected`), чекбоксы с промежуточным состоянием родителя (`checkable`, `v-model:checked`), ленивая подгрузка (`hasChildren` + `load`), двойной клик (или Enter) раскрывает папку или шлёт `open` для файла, контекстное меню строки (`menu`, правый клик, клавиша Menu, Shift+F10), подсказка `hint` после имени и тон подписи `tone`; без фокуса выбор серый. Строки переносятся перетаскиванием и Ctrl+X / Ctrl+V (`@move`, может вернуть обещание; `canDrop`, `movable`; помощник `moveTreeNodes`): дерево просит, данные переносит приложение. `sort="name"` показывает папки первыми и по имени, тогда перенос меняет только папку. ARIA tree: одна остановка Tab, стрелки, `→` / `←` внутрь и наружу, Home / End, `*`, поиск по буквам. Слоты `#icon`, `#label`, `#actions`; строки на токенах контролов (размер и плотность)
|
|
124
124
|
- **TaoStages** — список стадий: `wait` / `work` / `ok` / `bad`. Не линейный степпер
|
|
125
125
|
- **TaoTimeline** — вертикальная лента событий: шаги заказа, релизы, журнал. `active` заливает линию до текущего события (`aria-current="step"`), без него лента — журнал прошедшего; `tone` и `icon` у маркера, слоты `#marker` / `#title` / `#content`; `align="alternate"` раскладывает события по обе стороны и складывается в одну уже 480px своей ширины
|
|
126
126
|
- **TaoSkeleton** — плейсхолдер загрузки (text / title / circle / rect)
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
- **TaoLink** — `<NuxtLink>` в Nuxt, `<RouterLink>` при vue-router, иначе обычный `<a>` — без дополнительной настройки
|
|
141
141
|
- **TaoStretchedLink** — `TaoLink`, который делает целую карточку или строку одной ссылкой, а кнопки внутри продолжают работать: `tao-stretched` на контейнере, `tao-stretched-raise` на элементе, который должен нажиматься сам. Клавиатура видит одну ссылку, кольцо фокуса идёт по контейнеру (`--tao-stretched-radius`). Не давайте ссылке `filter` / `transform`: слой сожмётся под курсором, и курсор начнёт мигать Текст под растянутым слоем нельзя выделить мышью (то, что должно выделяться, поднимите через `tao-stretched-raise`), а имя ссылке даёт только то, что в ней написано: для карточки направьте `aria-describedby` ссылки на описание.
|
|
142
142
|
- **TaoBreadcrumb** — крошки: последний пункт — текущая страница
|
|
143
|
-
- **TaoDropdownMenu** / **TaoMenu** — меню из простого дерева данных `items`: подменю, чекбоксы, радио, разделители, подписи групп, сочетания для показа, недоступные пункты. Стрелки, Home / End, быстрый поиск по букве, `→` / `←` для подменю, Esc закрывает верхний уровень первым. `TaoMenu` — сама панель для своих оболочек (полоса меню, контекстное меню); её `anchor` — элемент или точка экрана `{ x, y }` (меню у указателя или в точке сброса, без элемента-якоря; `TaoPopover` принимает тот же `anchor`); у края экрана переворачивается; `size` делает кнопку компактным квадратом, `dots="horizontal"` кладёт три точки горизонтально (⋯), `:tabbable="false"` убирает её из порядка Tab
|
|
143
|
+
- **TaoDropdownMenu** / **TaoMenu** — меню из простого дерева данных `items`: подменю, чекбоксы, радио, разделители, подписи групп, сочетания для показа, недоступные пункты. Стрелки, Home / End, быстрый поиск по букве, `→` / `←` для подменю, Esc закрывает верхний уровень первым. `TaoMenu` — сама панель для своих оболочек (полоса меню, контекстное меню); её `anchor` — элемент или точка экрана `{ x, y }` (меню у указателя или в точке сброса, без элемента-якоря; `TaoPopover` принимает тот же `anchor`); у края экрана переворачивается; `size` делает кнопку компактным квадратом, `dots="horizontal"` кладёт три точки горизонтально (⋯), `:tabbable="false"` убирает её из порядка Tab `block` растягивает кнопку `TaoDropdownMenu` на её место и снимает с неё всё своё, для кнопки, которая целиком ваша «фишка» в `#button` (проект под главным действием TaoNav).
|
|
144
144
|
- **TaoMenubar** / **TaoContextMenu** — полоса меню редактора и меню по правой кнопке, на `TaoMenu`. Полоса — одна остановка Tab (`role="menubar"`): `←` / `→` ходят по ней, `↓` / Enter открывают, при открытом меню `←` / `→` и указатель переходят к соседнему; пункт без `items` — обычное действие. Контекстное меню открывается у указателя (или у элемента для клавиши Menu / Shift+F10) и оборачивает содержимое без своей коробки
|
|
145
145
|
- **TaoToolbar** / **TaoToolbarGroup** / **TaoToolbarSeparator** — панель инструментов (`role="toolbar"`): одна остановка Tab, `←` / `→` (или `↑` / `↓` при `orientation="vertical"`) ходят по элементам, Home / End; внутри `TaoSegmented` стрелки выбирают вариант и идут дальше с его края. Группы делит тонкая черта поперёк панели; `inset` кладёт под группу утопленную подложку. Переключатели — `TaoButton` с `v-model:pressed`. `overflow` держит панель в одной строке: группы, которые не влезли, уходят (последняя первой) под кнопку «⋮», она открывает их в панели (те же кнопки, а не копии); `TaoToolbarGroup` с `pinned` остаётся
|
|
146
146
|
- **TaoScrollTop** — плавающая кнопка «наверх»: виды `solid` / `ghost` / `text`, `side`, подпись `label` при наведении мыши. Появляется при обратном скролле после `boundary`
|
|
@@ -338,7 +338,7 @@ function onLanguageChange(lang) {
|
|
|
338
338
|
|
|
339
339
|
Без плагина (отдельные компоненты) достаточно одного вызова `setTaoLocale()`.
|
|
340
340
|
|
|
341
|
-
Полосы прокрутки тонкие (
|
|
341
|
+
Полосы прокрутки тонкие (6px) с акцентным бегунком. Чтобы изменить, задайте `--tao-scrollbar-size`, `--tao-scrollbar-thumb`, `--tao-scrollbar-track` (и `--tao-scrollbar-width` для Firefox) на странице или на блоке; класс `tao-native-scrollbars` на `<html>` или на блоке возвращает родные. Панель с ползунками есть в шоукейсе, в разделе «Слои и темизация».
|
|
342
342
|
|
|
343
343
|
С какого языка начать: `detectTaoLanguage(['en', 'ru'])` отвечает тем из ваших языков, который предпочитает браузер (`ru-RU` подходит к `ru`), например `saved ?? detectTaoLanguage(['en', 'ru'])`; на сервере передайте пожелания запроса: `{ requested: parseAcceptLanguage(header) }`.
|
|
344
344
|
|
|
@@ -714,7 +714,7 @@ document.documentElement.setAttribute('data-tao-theme', 'light')
|
|
|
714
714
|
- `--tao-color-text*` — текст (обычный / усиленный / subtle / приглушённый / disabled)
|
|
715
715
|
- `--tao-color-danger*`, `--tao-color-success*`, `--tao-color-warning*`, `--tao-color-info*` — статусные цвета
|
|
716
716
|
- `--tao-color-input-*` — поля ввода отдельно, т.к. фон/текст полей часто не совпадают с surface/text
|
|
717
|
-
- `--tao-radius-control`, `--tao-radius-panel` — скругления (мелкие контролы vs крупные
|
|
717
|
+
- `--tao-radius-control`, `--tao-radius-panel` — скругления (мелкие контролы vs крупные панели; 10px и 18px, из шкалы `--tao-radius-sm` / `-md` / `-lg` / `-xl` = 6 / 10 / 14 / 18px)
|
|
718
718
|
- `--tao-shadow-panel`, `--tao-shadow-overlay` — тени
|
|
719
719
|
- `--tao-font-size-*` — шкала кегля в `primitives.css`: `xs`–`xl` контролы, `2xl`–`4xl` заголовки / проза
|
|
720
720
|
- `--tao-control-height-*` (26 / 36 / 44px), `--tao-control-padding-x-*`, `--tao-control-padding-y-*`, `--tao-control-font-size-*`, `--tao-control-font-size-secondary-*`, `--tao-button-padding-x-*`, `--tao-indicator-size-*`, `--tao-tag-height-*` / `-padding-x-*` / `-font-size-*` — шкала размеров в `primitives.css`. Компоненты читают текущие значения из `contexts/size.css`: `--tao-control-height`, `--tao-control-padding-x` / `-y`, `--tao-control-font-size`, `--tao-control-font-size-secondary`, `--tao-button-padding-x`, `--tao-indicator-size`, `--tao-tag-height` / `-padding-x` / `-font-size`. Используйте их в своих контролах, чтобы попасть в размер окружения.
|
package/dist/index.d.ts
CHANGED
|
@@ -1071,6 +1071,16 @@ dots?: "vertical" | "horizontal";
|
|
|
1071
1071
|
* уходит из порядка Tab и по-прежнему открывается нажатием.
|
|
1072
1072
|
*/
|
|
1073
1073
|
tabbable?: boolean;
|
|
1074
|
+
/**
|
|
1075
|
+
* The button fills the width (and the height) of its place and draws nothing of its own: no padding, no
|
|
1076
|
+
* background, the corners of its parent. For a trigger that is a whole chip of your own in `#button` (the
|
|
1077
|
+
* project of an app under the main action of TaoNav, an account in a header): the chip is the button, the hover
|
|
1078
|
+
* and the focus ring go round it.
|
|
1079
|
+
* Кнопка занимает ширину (и высоту) своего места и не рисует ничего своего: без отступа, без фона, с углами
|
|
1080
|
+
* родителя. Для кнопки, которая целиком ваша «фишка» в `#button` (проект приложения под главным действием TaoNav,
|
|
1081
|
+
* аккаунт в шапке): фишка и есть кнопка, наведение и рамка фокуса обходят её.
|
|
1082
|
+
*/
|
|
1083
|
+
block?: boolean;
|
|
1074
1084
|
}>, {
|
|
1075
1085
|
items: () => never[];
|
|
1076
1086
|
placement: string;
|
|
@@ -1078,6 +1088,7 @@ closeOnScroll: boolean;
|
|
|
1078
1088
|
size: undefined;
|
|
1079
1089
|
dots: string;
|
|
1080
1090
|
tabbable: boolean;
|
|
1091
|
+
block: boolean;
|
|
1081
1092
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1082
1093
|
select: (id: string) => void;
|
|
1083
1094
|
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_36<__VLS_TypePropsToRuntimeProps_40<{
|
|
@@ -1109,6 +1120,16 @@ dots?: "vertical" | "horizontal";
|
|
|
1109
1120
|
* уходит из порядка Tab и по-прежнему открывается нажатием.
|
|
1110
1121
|
*/
|
|
1111
1122
|
tabbable?: boolean;
|
|
1123
|
+
/**
|
|
1124
|
+
* The button fills the width (and the height) of its place and draws nothing of its own: no padding, no
|
|
1125
|
+
* background, the corners of its parent. For a trigger that is a whole chip of your own in `#button` (the
|
|
1126
|
+
* project of an app under the main action of TaoNav, an account in a header): the chip is the button, the hover
|
|
1127
|
+
* and the focus ring go round it.
|
|
1128
|
+
* Кнопка занимает ширину (и высоту) своего места и не рисует ничего своего: без отступа, без фона, с углами
|
|
1129
|
+
* родителя. Для кнопки, которая целиком ваша «фишка» в `#button` (проект приложения под главным действием TaoNav,
|
|
1130
|
+
* аккаунт в шапке): фишка и есть кнопка, наведение и рамка фокуса обходят её.
|
|
1131
|
+
*/
|
|
1132
|
+
block?: boolean;
|
|
1112
1133
|
}>, {
|
|
1113
1134
|
items: () => never[];
|
|
1114
1135
|
placement: string;
|
|
@@ -1116,12 +1137,14 @@ closeOnScroll: boolean;
|
|
|
1116
1137
|
size: undefined;
|
|
1117
1138
|
dots: string;
|
|
1118
1139
|
tabbable: boolean;
|
|
1140
|
+
block: boolean;
|
|
1119
1141
|
}>>> & Readonly<{
|
|
1120
1142
|
onSelect?: ((id: string) => any) | undefined;
|
|
1121
1143
|
}>, {
|
|
1122
1144
|
size: TaoSize;
|
|
1123
1145
|
items: TaoMenuItem[];
|
|
1124
1146
|
dots: "vertical" | "horizontal";
|
|
1147
|
+
block: boolean;
|
|
1125
1148
|
placement: TaoPlacement;
|
|
1126
1149
|
closeOnScroll: boolean;
|
|
1127
1150
|
tabbable: boolean;
|
|
@@ -1149,8 +1172,12 @@ placement?: TaoPlacement;
|
|
|
1149
1172
|
/** Accessible name of the menu. / Имя меню для скринридера. */
|
|
1150
1173
|
label?: string;
|
|
1151
1174
|
/**
|
|
1152
|
-
* Close when the page
|
|
1153
|
-
*
|
|
1175
|
+
* Close when the page, or a scroll container that holds the anchor, scrolls: the place the menu is for moves away.
|
|
1176
|
+
* A scroll elsewhere (an autoplaying carousel, a live log) and inside the menu does not count. For a point the holder
|
|
1177
|
+
* is the element under it when the menu opens. A root menu only.
|
|
1178
|
+
* Закрывать при прокрутке страницы или контейнера, в котором лежит якорь: место, для которого меню, уезжает.
|
|
1179
|
+
* Прокрутка в другом месте (карусель с автопрокруткой, живой лог) и внутри меню не считается. Для точки держатель —
|
|
1180
|
+
* элемент под ней в момент открытия. Только корневое меню.
|
|
1154
1181
|
*/
|
|
1155
1182
|
closeOnScroll?: boolean;
|
|
1156
1183
|
}>, {
|
|
@@ -1184,8 +1211,12 @@ placement?: TaoPlacement;
|
|
|
1184
1211
|
/** Accessible name of the menu. / Имя меню для скринридера. */
|
|
1185
1212
|
label?: string;
|
|
1186
1213
|
/**
|
|
1187
|
-
* Close when the page
|
|
1188
|
-
*
|
|
1214
|
+
* Close when the page, or a scroll container that holds the anchor, scrolls: the place the menu is for moves away.
|
|
1215
|
+
* A scroll elsewhere (an autoplaying carousel, a live log) and inside the menu does not count. For a point the holder
|
|
1216
|
+
* is the element under it when the menu opens. A root menu only.
|
|
1217
|
+
* Закрывать при прокрутке страницы или контейнера, в котором лежит якорь: место, для которого меню, уезжает.
|
|
1218
|
+
* Прокрутка в другом месте (карусель с автопрокруткой, живой лог) и внутри меню не считается. Для точки держатель —
|
|
1219
|
+
* элемент под ней в момент открытия. Только корневое меню.
|
|
1189
1220
|
*/
|
|
1190
1221
|
closeOnScroll?: boolean;
|
|
1191
1222
|
}>, {
|
|
@@ -1515,6 +1546,15 @@ moreLabel?: string;
|
|
|
1515
1546
|
*/
|
|
1516
1547
|
floating?: boolean;
|
|
1517
1548
|
/**
|
|
1549
|
+
* The shell of an app that fills its box (give the parent a height: `html, body, #app { height: 100% }`): TaoNav
|
|
1550
|
+
* takes all of it, the page scrolls inside its own panes instead of the document, and the footer stands at the
|
|
1551
|
+
* bottom of the side panel. Nothing scrolls as a document, so no page scrollbar comes and goes and nothing shifts.
|
|
1552
|
+
* Оболочка приложения на всю высоту своего блока (дайте родителю высоту: `html, body, #app { height: 100% }`):
|
|
1553
|
+
* TaoNav занимает её целиком, страница прокручивается внутри своих панелей, а не документом, подвал стоит внизу
|
|
1554
|
+
* боковой панели. Документ не прокручивается, поэтому полоса страницы не появляется и не исчезает, ничего не сдвигается.
|
|
1555
|
+
*/
|
|
1556
|
+
fill?: boolean;
|
|
1557
|
+
/**
|
|
1518
1558
|
* How the current section is marked: `pill` — a tint behind the item; `line` — the accent colour and a short line
|
|
1519
1559
|
* (under the item in the bar look, along its start edge in the rail and the side panel).
|
|
1520
1560
|
* Как отмечен текущий раздел: `pill` — подложка под пунктом; `line` — цвет акцента и короткая черта (под пунктом
|
|
@@ -1543,6 +1583,7 @@ maxBarItems: number;
|
|
|
1543
1583
|
ariaLabel: undefined;
|
|
1544
1584
|
moreLabel: undefined;
|
|
1545
1585
|
floating: boolean;
|
|
1586
|
+
fill: boolean;
|
|
1546
1587
|
indicator: string;
|
|
1547
1588
|
surface: string;
|
|
1548
1589
|
badgeTone: string;
|
|
@@ -1568,6 +1609,15 @@ moreLabel?: string;
|
|
|
1568
1609
|
*/
|
|
1569
1610
|
floating?: boolean;
|
|
1570
1611
|
/**
|
|
1612
|
+
* The shell of an app that fills its box (give the parent a height: `html, body, #app { height: 100% }`): TaoNav
|
|
1613
|
+
* takes all of it, the page scrolls inside its own panes instead of the document, and the footer stands at the
|
|
1614
|
+
* bottom of the side panel. Nothing scrolls as a document, so no page scrollbar comes and goes and nothing shifts.
|
|
1615
|
+
* Оболочка приложения на всю высоту своего блока (дайте родителю высоту: `html, body, #app { height: 100% }`):
|
|
1616
|
+
* TaoNav занимает её целиком, страница прокручивается внутри своих панелей, а не документом, подвал стоит внизу
|
|
1617
|
+
* боковой панели. Документ не прокручивается, поэтому полоса страницы не появляется и не исчезает, ничего не сдвигается.
|
|
1618
|
+
*/
|
|
1619
|
+
fill?: boolean;
|
|
1620
|
+
/**
|
|
1571
1621
|
* How the current section is marked: `pill` — a tint behind the item; `line` — the accent colour and a short line
|
|
1572
1622
|
* (under the item in the bar look, along its start edge in the rail and the side panel).
|
|
1573
1623
|
* Как отмечен текущий раздел: `pill` — подложка под пунктом; `line` — цвет акцента и короткая черта (под пунктом
|
|
@@ -1596,6 +1646,7 @@ maxBarItems: number;
|
|
|
1596
1646
|
ariaLabel: undefined;
|
|
1597
1647
|
moreLabel: undefined;
|
|
1598
1648
|
floating: boolean;
|
|
1649
|
+
fill: boolean;
|
|
1599
1650
|
indicator: string;
|
|
1600
1651
|
surface: string;
|
|
1601
1652
|
badgeTone: string;
|
|
@@ -1603,6 +1654,7 @@ badgeTone: string;
|
|
|
1603
1654
|
onSelect?: ((id: string, event: Event) => any) | undefined;
|
|
1604
1655
|
"onUpdate:modelValue"?: ((id: string) => any) | undefined;
|
|
1605
1656
|
}>, {
|
|
1657
|
+
fill: boolean;
|
|
1606
1658
|
surface: TaoSurface;
|
|
1607
1659
|
ariaLabel: string;
|
|
1608
1660
|
modelValue: string;
|
|
@@ -1629,9 +1681,43 @@ checked?: string[];
|
|
|
1629
1681
|
load?: (node: TaoTreeNode) => Promise<TaoTreeNode[]>;
|
|
1630
1682
|
/** Without it the size of ancestors. / Без него — размер предков. */
|
|
1631
1683
|
size?: TaoSize;
|
|
1684
|
+
/**
|
|
1685
|
+
* The context menu of a row (right click, the Menu key, Shift+F10): a list, or `(node, selected) => items`.
|
|
1686
|
+
* A right click outside the selection selects that row first; the pick comes as `menu-select`.
|
|
1687
|
+
* Контекстное меню строки (правый клик, клавиша Menu, Shift+F10): список или `(node, selected) => items`.
|
|
1688
|
+
* Правый клик вне выбора сначала выбирает строку; выбранный пункт приходит в `menu-select`.
|
|
1689
|
+
*/
|
|
1690
|
+
menu?: TaoTreeMenu;
|
|
1691
|
+
/**
|
|
1692
|
+
* `@move`: the rows can be dragged to another place, and cut / copied and pasted with Ctrl+X / Ctrl+C / Ctrl+V. The
|
|
1693
|
+
* tree changes nothing: make the move in your data (`moveTreeNodes`); return a promise and the rows wait for it,
|
|
1694
|
+
* a rejected one comes as `move-error`. A prop, not only an event, so the tree can wait for what it returns.
|
|
1695
|
+
* `@move`: строки можно перетащить в другое место, а также вырезать / скопировать и вставить (Ctrl+X / Ctrl+C /
|
|
1696
|
+
* Ctrl+V). Дерево ничего не меняет: перенос делаете вы в своих данных (`moveTreeNodes`); верните обещание, и
|
|
1697
|
+
* строки его подождут, отклонённое придёт в `move-error`. Проп, а не только событие: дерево ждёт его ответ.
|
|
1698
|
+
*/
|
|
1699
|
+
onMove?: (move: TaoTreeMove) => unknown;
|
|
1700
|
+
/**
|
|
1701
|
+
* The order of the rows: `none` the data's (a drag can put a row between others), `name` folders first and by
|
|
1702
|
+
* name, or your compare. With a sort a drag only changes the folder: onto a folder puts the rows in it, onto
|
|
1703
|
+
* any other row into that row's folder. The tree sorts what it shows; `nodes` stays as it is.
|
|
1704
|
+
* Порядок строк: `none` — как в данных (перенос ставит строку между другими), `name` — папки первыми и по имени,
|
|
1705
|
+
* или своё сравнение. С сортировкой перенос меняет только папку: на папку — в неё, на другую строку — в её
|
|
1706
|
+
* папку. Дерево сортирует то, что показывает; `nodes` не меняется.
|
|
1707
|
+
*/
|
|
1708
|
+
sort?: TaoTreeSort;
|
|
1709
|
+
/** Which rows can be moved (with `@move`); all but disabled ones by default. / Какие строки можно переносить. */
|
|
1710
|
+
movable?: boolean | ((node: TaoTreeNode) => boolean);
|
|
1711
|
+
/**
|
|
1712
|
+
* May the rows go there: false shows a «no» cursor and no mark (a file into a file is already refused).
|
|
1713
|
+
* Можно ли туда: false — курсор «нельзя» и нет метки (файл в файл и так не принимается).
|
|
1714
|
+
*/
|
|
1715
|
+
canDrop?: (move: TaoTreeMove) => boolean;
|
|
1632
1716
|
/** Accessible name of the tree. / Имя дерева для скринридера. */
|
|
1633
1717
|
ariaLabel?: string;
|
|
1634
1718
|
loadingLabel?: string;
|
|
1719
|
+
/** Accessible name of the context menu. / Имя контекстного меню для скринридера. */
|
|
1720
|
+
menuLabel?: string;
|
|
1635
1721
|
}>, {
|
|
1636
1722
|
expanded: undefined;
|
|
1637
1723
|
selection: string;
|
|
@@ -1640,14 +1726,24 @@ checkable: boolean;
|
|
|
1640
1726
|
checked: undefined;
|
|
1641
1727
|
load: undefined;
|
|
1642
1728
|
size: undefined;
|
|
1729
|
+
menu: undefined;
|
|
1730
|
+
onMove: undefined;
|
|
1731
|
+
sort: string;
|
|
1732
|
+
movable: boolean;
|
|
1733
|
+
canDrop: undefined;
|
|
1643
1734
|
ariaLabel: undefined;
|
|
1644
1735
|
loadingLabel: undefined;
|
|
1736
|
+
menuLabel: undefined;
|
|
1645
1737
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1738
|
+
menu: (node: TaoTreeNode, event: MouseEvent | KeyboardEvent) => void;
|
|
1646
1739
|
select: (node: TaoTreeNode) => void;
|
|
1740
|
+
open: (node: TaoTreeNode) => void;
|
|
1647
1741
|
"update:expanded": (ids: string[]) => void;
|
|
1648
1742
|
"update:selected": (value: string | string[] | null) => void;
|
|
1649
1743
|
"update:checked": (ids: string[]) => void;
|
|
1650
1744
|
"load-error": (node: TaoTreeNode, error: unknown) => void;
|
|
1745
|
+
"menu-select": (id: string, node: TaoTreeNode, selected: string[]) => void;
|
|
1746
|
+
"move-error": (move: TaoTreeMove, error: unknown) => void;
|
|
1651
1747
|
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_46<__VLS_TypePropsToRuntimeProps_50<{
|
|
1652
1748
|
nodes: TaoTreeNode[];
|
|
1653
1749
|
/** Ids of the expanded nodes (`v-model:expanded`); without it the tree keeps them itself. / id раскрытых узлов. */
|
|
@@ -1663,9 +1759,43 @@ checked?: string[];
|
|
|
1663
1759
|
load?: (node: TaoTreeNode) => Promise<TaoTreeNode[]>;
|
|
1664
1760
|
/** Without it the size of ancestors. / Без него — размер предков. */
|
|
1665
1761
|
size?: TaoSize;
|
|
1762
|
+
/**
|
|
1763
|
+
* The context menu of a row (right click, the Menu key, Shift+F10): a list, or `(node, selected) => items`.
|
|
1764
|
+
* A right click outside the selection selects that row first; the pick comes as `menu-select`.
|
|
1765
|
+
* Контекстное меню строки (правый клик, клавиша Menu, Shift+F10): список или `(node, selected) => items`.
|
|
1766
|
+
* Правый клик вне выбора сначала выбирает строку; выбранный пункт приходит в `menu-select`.
|
|
1767
|
+
*/
|
|
1768
|
+
menu?: TaoTreeMenu;
|
|
1769
|
+
/**
|
|
1770
|
+
* `@move`: the rows can be dragged to another place, and cut / copied and pasted with Ctrl+X / Ctrl+C / Ctrl+V. The
|
|
1771
|
+
* tree changes nothing: make the move in your data (`moveTreeNodes`); return a promise and the rows wait for it,
|
|
1772
|
+
* a rejected one comes as `move-error`. A prop, not only an event, so the tree can wait for what it returns.
|
|
1773
|
+
* `@move`: строки можно перетащить в другое место, а также вырезать / скопировать и вставить (Ctrl+X / Ctrl+C /
|
|
1774
|
+
* Ctrl+V). Дерево ничего не меняет: перенос делаете вы в своих данных (`moveTreeNodes`); верните обещание, и
|
|
1775
|
+
* строки его подождут, отклонённое придёт в `move-error`. Проп, а не только событие: дерево ждёт его ответ.
|
|
1776
|
+
*/
|
|
1777
|
+
onMove?: (move: TaoTreeMove) => unknown;
|
|
1778
|
+
/**
|
|
1779
|
+
* The order of the rows: `none` the data's (a drag can put a row between others), `name` folders first and by
|
|
1780
|
+
* name, or your compare. With a sort a drag only changes the folder: onto a folder puts the rows in it, onto
|
|
1781
|
+
* any other row into that row's folder. The tree sorts what it shows; `nodes` stays as it is.
|
|
1782
|
+
* Порядок строк: `none` — как в данных (перенос ставит строку между другими), `name` — папки первыми и по имени,
|
|
1783
|
+
* или своё сравнение. С сортировкой перенос меняет только папку: на папку — в неё, на другую строку — в её
|
|
1784
|
+
* папку. Дерево сортирует то, что показывает; `nodes` не меняется.
|
|
1785
|
+
*/
|
|
1786
|
+
sort?: TaoTreeSort;
|
|
1787
|
+
/** Which rows can be moved (with `@move`); all but disabled ones by default. / Какие строки можно переносить. */
|
|
1788
|
+
movable?: boolean | ((node: TaoTreeNode) => boolean);
|
|
1789
|
+
/**
|
|
1790
|
+
* May the rows go there: false shows a «no» cursor and no mark (a file into a file is already refused).
|
|
1791
|
+
* Можно ли туда: false — курсор «нельзя» и нет метки (файл в файл и так не принимается).
|
|
1792
|
+
*/
|
|
1793
|
+
canDrop?: (move: TaoTreeMove) => boolean;
|
|
1666
1794
|
/** Accessible name of the tree. / Имя дерева для скринридера. */
|
|
1667
1795
|
ariaLabel?: string;
|
|
1668
1796
|
loadingLabel?: string;
|
|
1797
|
+
/** Accessible name of the context menu. / Имя контекстного меню для скринридера. */
|
|
1798
|
+
menuLabel?: string;
|
|
1669
1799
|
}>, {
|
|
1670
1800
|
expanded: undefined;
|
|
1671
1801
|
selection: string;
|
|
@@ -1674,23 +1804,39 @@ checkable: boolean;
|
|
|
1674
1804
|
checked: undefined;
|
|
1675
1805
|
load: undefined;
|
|
1676
1806
|
size: undefined;
|
|
1807
|
+
menu: undefined;
|
|
1808
|
+
onMove: undefined;
|
|
1809
|
+
sort: string;
|
|
1810
|
+
movable: boolean;
|
|
1811
|
+
canDrop: undefined;
|
|
1677
1812
|
ariaLabel: undefined;
|
|
1678
1813
|
loadingLabel: undefined;
|
|
1814
|
+
menuLabel: undefined;
|
|
1679
1815
|
}>>> & Readonly<{
|
|
1816
|
+
onMenu?: ((node: TaoTreeNode, event: MouseEvent | KeyboardEvent) => any) | undefined;
|
|
1680
1817
|
onSelect?: ((node: TaoTreeNode) => any) | undefined;
|
|
1818
|
+
onOpen?: ((node: TaoTreeNode) => any) | undefined;
|
|
1681
1819
|
"onUpdate:expanded"?: ((ids: string[]) => any) | undefined;
|
|
1682
1820
|
"onUpdate:selected"?: ((value: string | string[] | null) => any) | undefined;
|
|
1683
1821
|
"onUpdate:checked"?: ((ids: string[]) => any) | undefined;
|
|
1684
1822
|
"onLoad-error"?: ((node: TaoTreeNode, error: unknown) => any) | undefined;
|
|
1823
|
+
"onMenu-select"?: ((id: string, node: TaoTreeNode, selected: string[]) => any) | undefined;
|
|
1824
|
+
"onMove-error"?: ((move: TaoTreeMove, error: unknown) => any) | undefined;
|
|
1685
1825
|
}>, {
|
|
1826
|
+
sort: TaoTreeSort;
|
|
1686
1827
|
size: TaoSize;
|
|
1828
|
+
menu: TaoTreeMenu;
|
|
1687
1829
|
load: (node: TaoTreeNode) => Promise<TaoTreeNode[]>;
|
|
1688
1830
|
ariaLabel: string;
|
|
1689
1831
|
checked: string[];
|
|
1690
1832
|
selected: string | string[] | null;
|
|
1833
|
+
menuLabel: string;
|
|
1691
1834
|
expanded: string[];
|
|
1692
1835
|
selection: TaoTreeSelection;
|
|
1693
1836
|
checkable: boolean;
|
|
1837
|
+
onMove: (move: TaoTreeMove) => unknown;
|
|
1838
|
+
movable: boolean | ((node: TaoTreeNode) => boolean);
|
|
1839
|
+
canDrop: (move: TaoTreeMove) => boolean;
|
|
1694
1840
|
loadingLabel: string;
|
|
1695
1841
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1696
1842
|
|
|
@@ -6615,6 +6761,9 @@ export declare interface ColorModelOptions {
|
|
|
6615
6761
|
precision?: number;
|
|
6616
6762
|
}
|
|
6617
6763
|
|
|
6764
|
+
/** Folders first, then the labels by `Intl.Collator` with numbers as numbers. / Папки первыми, затем подписи. */
|
|
6765
|
+
export declare function compareTreeNodes(locale?: string): (a: TaoTreeNode, b: TaoTreeNode) => number;
|
|
6766
|
+
|
|
6618
6767
|
declare const confirm_2: TaoConfirmApi;
|
|
6619
6768
|
export { confirm_2 as confirm }
|
|
6620
6769
|
|
|
@@ -6745,6 +6894,16 @@ export declare function mergeRanges(ranges: readonly [number, number][]): [numbe
|
|
|
6745
6894
|
*/
|
|
6746
6895
|
export declare function moveTarget(from: number, over: number, after: boolean, count: number): number | null;
|
|
6747
6896
|
|
|
6897
|
+
/**
|
|
6898
|
+
* The tree with a move made, for an app that keeps its data as `TaoTreeNode[]`: a new array, the nodes it passes
|
|
6899
|
+
* through copied, the others kept. A copy (`move.copy`) needs new ids, so it is the app's to make; this helper moves.
|
|
6900
|
+
* Children loaded by `load` are not in `nodes`: such an app moves them in its own store.
|
|
6901
|
+
* Дерево с выполненным переносом, для приложения, которое хранит данные как `TaoTreeNode[]`: новый массив, узлы по пути
|
|
6902
|
+
* скопированы, остальные те же. Копии (`move.copy`) нужны новые id, их делает приложение; помощник переносит.
|
|
6903
|
+
* Дети, подгруженные через `load`, не лежат в `nodes`: такое приложение переносит их в своём хранилище.
|
|
6904
|
+
*/
|
|
6905
|
+
export declare function moveTreeNodes(nodes: readonly TaoTreeNode[], move: Pick<TaoTreeMove, 'ids' | 'parentId' | 'index'>): TaoTreeNode[];
|
|
6906
|
+
|
|
6748
6907
|
declare interface NodeSlot {
|
|
6749
6908
|
node: TaoTreeNode;
|
|
6750
6909
|
level: number;
|
|
@@ -8001,6 +8160,20 @@ export declare interface TaoLocale {
|
|
|
8001
8160
|
tree: {
|
|
8002
8161
|
ariaLabel: string;
|
|
8003
8162
|
loadingLabel: string;
|
|
8163
|
+
/** The context menu (5.51.0; optional for locales written before, English then). / Контекстное меню. */
|
|
8164
|
+
menuLabel?: string;
|
|
8165
|
+
/**
|
|
8166
|
+
* Moving rows (5.51.0, optional): `{item}` is the name of a row or `countLabel`, `{target}` the folder or `rootLabel`.
|
|
8167
|
+
* Перенос строк (5.51.0, необязательно): `{item}` — имя строки или `countLabel`, `{target}` — папка или `rootLabel`.
|
|
8168
|
+
*/
|
|
8169
|
+
countLabel?: TaoText;
|
|
8170
|
+
rootLabel?: string;
|
|
8171
|
+
cutText?: string;
|
|
8172
|
+
copyText?: string;
|
|
8173
|
+
movedText?: string;
|
|
8174
|
+
copiedText?: string;
|
|
8175
|
+
canceledText?: string;
|
|
8176
|
+
refusedText?: string;
|
|
8004
8177
|
};
|
|
8005
8178
|
/** `counterText`: `{checked}`, `{total}`. */
|
|
8006
8179
|
checklist: {
|
|
@@ -9273,6 +9446,38 @@ export declare const TaoTree: __VLS_WithTemplateSlots_45<typeof __VLS_component_
|
|
|
9273
9446
|
/** The state of a checkbox: `mixed` is a parent with only some of its leaves checked. / Состояние чекбокса. */
|
|
9274
9447
|
export declare type TaoTreeCheckState = 'checked' | 'unchecked' | 'mixed';
|
|
9275
9448
|
|
|
9449
|
+
/** How a drop meets the row it is aimed at. / Как перенос встаёт относительно строки. */
|
|
9450
|
+
export declare type TaoTreeDropPosition = 'before' | 'after' | 'inside';
|
|
9451
|
+
|
|
9452
|
+
/**
|
|
9453
|
+
* The context menu of a row: a list for every row, or a function of the node and the ids the menu acts on (the selection
|
|
9454
|
+
* after the right click, see `menuSelection`). An empty list leaves the browser's own menu.
|
|
9455
|
+
* Контекстное меню строки: один список для всех строк или функция от узла и id, на которые действует меню (выбор после
|
|
9456
|
+
* правого клика, см. `menuSelection`). Пустой список оставляет меню браузера.
|
|
9457
|
+
*/
|
|
9458
|
+
export declare type TaoTreeMenu = TaoMenuItem[] | ((node: TaoTreeNode, selected: string[]) => TaoMenuItem[]);
|
|
9459
|
+
|
|
9460
|
+
/**
|
|
9461
|
+
* A move the tree asks the app to make (`@move`). The tree never changes `nodes`: the app moves the data (or sends it to a
|
|
9462
|
+
* server), and the tree shows the result. `index` is the place among the children of `parentId` once the moved nodes
|
|
9463
|
+
* are taken out of it, so `moveTreeNodes` (or a `splice`) can use it as it is.
|
|
9464
|
+
* Перенос, который дерево просит сделать приложение (`@move`). Дерево не меняет `nodes`: данные переносит приложение (или
|
|
9465
|
+
* отправляет на сервер), а дерево показывает результат. `index` — место среди детей `parentId`, когда переносимые узлы
|
|
9466
|
+
* из них уже вынуты, поэтому `moveTreeNodes` (или `splice`) берёт его как есть.
|
|
9467
|
+
*/
|
|
9468
|
+
export declare interface TaoTreeMove {
|
|
9469
|
+
/** The moved nodes, the topmost only (a child goes with its parent), in the order of the rows. / Переносимые узлы. */
|
|
9470
|
+
ids: string[];
|
|
9471
|
+
/** The new parent; null for the top level. / Новый родитель; null — верхний уровень. */
|
|
9472
|
+
parentId: string | null;
|
|
9473
|
+
index: number;
|
|
9474
|
+
/** The row the drop was aimed at, and how. / Строка, на которую целились, и как. */
|
|
9475
|
+
targetId: string;
|
|
9476
|
+
position: TaoTreeDropPosition;
|
|
9477
|
+
/** Ctrl or Alt was held (or Ctrl+C was used): the app puts copies with new ids. / Копия, а не перенос. */
|
|
9478
|
+
copy: boolean;
|
|
9479
|
+
}
|
|
9480
|
+
|
|
9276
9481
|
/**
|
|
9277
9482
|
* One node of TaoTree: a file, a folder, an object. A plain data tree; the tree never changes it.
|
|
9278
9483
|
* Один узел TaoTree: файл, папка, объект. Простое дерево данных; TaoTree его не меняет.
|
|
@@ -9289,11 +9494,36 @@ export declare interface TaoTreeNode {
|
|
|
9289
9494
|
*/
|
|
9290
9495
|
hasChildren?: boolean;
|
|
9291
9496
|
disabled?: boolean;
|
|
9497
|
+
/**
|
|
9498
|
+
* A quiet note after the label: «library root», «3 files», a branch name. It is part of the row's accessible name.
|
|
9499
|
+
* Тихая подпись после имени: «library root», «3 файла», имя ветки. Входит в доступное имя строки.
|
|
9500
|
+
*/
|
|
9501
|
+
hint?: string;
|
|
9502
|
+
/**
|
|
9503
|
+
* The colour of the label: `muted` for an excluded or ignored node, the others for a state (added, changed, broken).
|
|
9504
|
+
* Not the only sign of a state for a screen reader: say it in `hint` or the label too.
|
|
9505
|
+
* Цвет подписи: `muted` для исключённого или игнорируемого узла, остальные для состояния (добавлен, изменён, сломан).
|
|
9506
|
+
* Для скринридера это не единственный признак: скажите о состоянии и в `hint` или подписи.
|
|
9507
|
+
*/
|
|
9508
|
+
tone?: TaoTreeTone;
|
|
9292
9509
|
}
|
|
9293
9510
|
|
|
9294
9511
|
/** `none` — nothing to select, `single` — one node, `multiple` — a set. / Режим выбора. */
|
|
9295
9512
|
export declare type TaoTreeSelection = 'none' | 'single' | 'multiple';
|
|
9296
9513
|
|
|
9514
|
+
/**
|
|
9515
|
+
* The order of the rows: `none` keeps the order of the data (and rows can be dragged between each other), `name` puts
|
|
9516
|
+
* folders first and sorts by name as people read it («file 2» before «file 10»), a function is your own compare. With a
|
|
9517
|
+
* sort the order is the tree's, so a drag only changes the folder, never the place among siblings.
|
|
9518
|
+
* Порядок строк: `none` держит порядок данных (и строки можно ставить между другими), `name` ставит папки первыми и
|
|
9519
|
+
* сортирует по имени так, как читают люди («файл 2» раньше «файл 10»), функция — своё сравнение. С сортировкой порядок
|
|
9520
|
+
* задаёт дерево, поэтому перенос меняет только папку, а не место среди соседей.
|
|
9521
|
+
*/
|
|
9522
|
+
export declare type TaoTreeSort = 'none' | 'name' | ((a: TaoTreeNode, b: TaoTreeNode) => number);
|
|
9523
|
+
|
|
9524
|
+
/** The colour of a row's label. / Цвет подписи строки. */
|
|
9525
|
+
export declare type TaoTreeTone = 'muted' | 'accent' | 'info' | 'success' | 'warning' | 'danger';
|
|
9526
|
+
|
|
9297
9527
|
declare const TaoUI: Plugin_2<[TaoUIOptions?]>;
|
|
9298
9528
|
export { TaoUI }
|
|
9299
9529
|
export default TaoUI;
|