@1337exp/taoui 5.44.0 → 5.49.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 +41 -0
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/dist/index.d.ts +84 -8
- package/dist/index.js +102 -51
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +1 -1
- package/skills/taoui/references/components.md +1392 -1389
- package/src/styles/base.css +5 -1
- package/src/styles/palettes/lagoon.css +3 -3
- package/src/styles/palettes/marple.css +3 -3
- package/src/styles/palettes/ocean-blue.css +3 -3
- package/src/styles/palettes/pinheiro.css +7 -7
- package/src/styles/palettes/sunset.css +3 -3
- package/src/styles/palettes/tokyo-night.css +3 -3
- package/src/styles/palettes/violet-dusk.css +7 -7
- package/src/styles/themes/light.css +11 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.49.0
|
|
4
|
+
|
|
5
|
+
Nothing to migrate: an `anchor` that is an element works as before.
|
|
6
|
+
|
|
7
|
+
- **`TaoMenu` opens at a point of the screen.** `anchor` is now an element or a virtual anchor `{ x, y, width?, height? }` in viewport coordinates (types `TaoAnchor`, `TaoVirtualAnchor`, helpers `isVirtualAnchor`, `anchorRect` in `floating.ts`): a menu at a drop point of a canvas or at the pointer needs no empty positioned element any more. With a point the default `placement` is `bottom-start` (the top-left corner 4px under the point, so the click that opened the menu does not hit the first item; with an element it stays `bottom-end`); the panel is `fixed`, flips and shifts at the viewport edges like an anchored one, stays at its screen point on scroll (`closeOnScroll` closes it, as with an element), moves when the point changes, and the point can be swapped for an element and back. With a point the menu gives the focus back, on close, to what had it before opening (not after a press elsewhere or a scroll). Escape, outside press, arrows, type-ahead and submenus are the same as before.
|
|
8
|
+
- **`TaoPopover` takes the same `anchor`** (a point or an element instead of the trigger); Escape gives the focus back to what had it before opening.
|
|
9
|
+
- **`useFloating`** accepts a ref, a getter or a value as the anchor and re-measures when the anchor changes.
|
|
10
|
+
- **`TaoContextMenu`** is built on it: the hidden `.tao-context-menu__anchor` span and its own focus bookkeeping are gone (a private detail, the behaviour is the same).
|
|
11
|
+
- **Recipe, a context menu of your own:** `@contextmenu.prevent="e => { point = { x: e.clientX, y: e.clientY }; open = true }"` and `<TaoMenu :items :open :anchor="point" @close="open = false" />` (the demo of `TaoMenubar / TaoContextMenu` shows it). Not tested in real browsers or on touch.
|
|
12
|
+
|
|
13
|
+
## 5.48.0
|
|
14
|
+
|
|
15
|
+
A link with a class keeps its own colour on hover (it used to turn rose). Three looks change: the text of a field in the light theme is softer, the rose of a link on hover is a shade deeper, the accent text of a palette is a shade darker where it stands on a tint. To give your own link the rose on hover as before: `.my-link:hover { color: var(--tao-color-link-hover); }`.
|
|
16
|
+
|
|
17
|
+
- **`a:hover` no longer beats a class.** `base.css` had `a:hover { color: link-hover }`, weight 0,1,1, and any class on a link weighs 0,1,0, so a menu link, a card that is a link or a link of your own turned rose on hover whatever its class said. Now it is `a:where(:hover)`, which weighs as `a` and no more: a bare link still turns rose, a link with a class keeps its colour. `TaoNav` and `TaoLink` are not affected.
|
|
18
|
+
- **Light theme: `--tao-color-input-text` is `text`.** It was `gray-950`, which is `text-strong`, so the value of a field, a number input and a select read brighter than the buttons beside it, against the text ladder («field values: `text`»). The dark theme already had the same colour.
|
|
19
|
+
- **Light theme: the rose of a link on hover is `accent-text-hover`.** It was `pink-400`, 3.7 to 4.0:1 on a page and on a grey panel; now it is above 4.5:1, as in the palettes.
|
|
20
|
+
- **Palettes: `accent-text` reads on the tints of the accent too.** A chosen item, a tag and a hovered row stand on `accent-subtle` (8 to 16 % of the accent over the surface), which is a little darker ground than the page, and a generated `accent-text` that was 4.6:1 on the page came out 4.0 to 4.4:1 there. The generator now asks 4.6:1 on the page, on a raised surface and on both tints; the seven palettes are regenerated (`npm run palettes`), and `tests/palette.test.ts` holds it for every palette and mode.
|
|
21
|
+
- **The bench of the Guide.** A select is a field (its value is regular weight, like an input), so the weight 500 is asked of the labels of controls only; the plain link, which turns rose by design, is judged by how it reads, not by the step. With these, the bench is clean on every palette and both modes on the page and on a panel; one known edge is left: a chosen segment in the dark theme on a sunken surface (1.0:1 to its track).
|
|
22
|
+
|
|
23
|
+
## 5.47.0
|
|
24
|
+
|
|
25
|
+
Nothing to migrate. One look changes in the light theme and in palettes: the text of a chosen item is a shade darker.
|
|
26
|
+
|
|
27
|
+
- **The text of a chosen item is `accent-text`, not `accent`.** `--tao-color-accent` is the colour of a fill (a button, a check, an underline: white sits on it); `--tao-color-accent-text` is the same hue made for being text, 4.5:1 on a page. In the light theme the plain accent as text on a panel is only 3.6 to 4.2:1, so a chosen segment, a chosen tab and an accent tag did not keep the promise of the contrast section. `TaoSegmentedOption` (chosen, and the count), `TaoTabs` (selected), `TaoDocTabs` (active), `TaoTag`, `TaoCombobox` / `TaoSelect` / `TaoPresetInput` (the selected option), `TaoListItem` (the selected title), `TaoCounter`, `TaoPinCode` (the value), `TaoCommandList` (the matched letters) and the initials of `TaoAvatar` now use it, as `TaoNav` and `TaoTree` already did. In the dark theme the two roles are one colour, so nothing changes there; icons, underlines, borders and fills stay `accent`. The bench of the Guide («Controls side by side») shows the rest: on a palette the generated `accent-text` is made for the page, so a chosen segment and a tag, which stand on a tint, reach 4.0 to 4.4:1 there.
|
|
28
|
+
|
|
29
|
+
## 5.46.0
|
|
30
|
+
|
|
31
|
+
Nothing to migrate. One look changes in the light theme: a field, a track or a code block sunk into a panel is seen now (it was the colour of the panel).
|
|
32
|
+
|
|
33
|
+
- **Light theme: `--tao-color-surface-sunken` is a tint, as in the dark one.** `--tao-color-surface-raised` and `--tao-color-surface-sunken` were both `gray-50` there, and a popover, a modal and a card are raised, so a `TaoSegmented` track, a `TaoInput` and the like sunk into one had the colour of the panel they stood on and were held by a hairline border alone. Now `sunken` is `gray-900` at 4.3 % over what is under it: on the white page it is the same `#f5f5f5` as before, on a raised panel it is darker. The dark theme already did so.
|
|
34
|
+
- **`TaoSegmented`: the hook `--tao-segmented-thumb`.** The thumb was `surface-raised`, the colour of the track on a page in the light theme. The light theme sets the hook to a soft white (60 % over the track; pure white shouted beside a grey track and a white page), so the thumb is seen on the track on the page, on a panel and in a popover; with no hook the thumb is `surface-raised` as before (the dark theme).
|
|
35
|
+
- **The Guide has a bench, «Controls side by side» (`#harmony`).** It stands the controls of the kit in a row on a surface of your choice (page, panel, sunken) in a size of your choice, measures them with the browser and judges the row: one step of the text ladder per role, one weight for the labels, one height for a size, a fill that is seen, a text that reads on what it stands on (4.5:1), and a hover that keeps the text readable and goes up the ladder. A hover is read without a pointer (`showcase/harmony/hover.js` copies the rules with `:hover` for a moment). It follows the theme and the palette. It shows what is left to decide: the text of a field and a select is `input-text` (`text-strong` in the light theme), not the `text` the ladder promises; a select is weight 400 where the others are 500; a chosen segment, a chosen tab and an accent tag draw their text in `accent`, not in `accent-text`, the role made for text, and reach only 3.6 to 4.2:1 on a panel; the global `a:hover` (a rose link) is 3.7:1 on a grey panel. The rules are in `showcase/harmony/measure.js` with a test, the controls in `showcase/harmony/controls.js`.
|
|
36
|
+
- **The sidebar of the showcase: a hover that reads.** The kit's `a:hover` (weight 0,1,1) beats a class on a link (0,1,0), so a menu link turned rose on the grey of its hover, 3:1. The links go to `text-strong` on hover, the current one is `accent-text` (4.5:1) and its hover `accent-text-hover`; the same `accent-text` for the current tab of the books and the current group. The bench measures this row, so it can not come back.
|
|
37
|
+
|
|
38
|
+
## 5.45.0
|
|
39
|
+
|
|
40
|
+
Nothing to migrate: the dots stand upright by default, as before.
|
|
41
|
+
|
|
42
|
+
- **`TaoDropdownMenu` `dots`: upright or lying three dots.** `dots="horizontal"` gives ⋯ (a row of a table or a list, the corner of a card), the default `vertical` gives ⋮ (a narrow column, a toolbar). It is only the default face of the button: your own `#icon` or `#button` slot wins and `dots` is ignored.
|
|
43
|
+
|
|
3
44
|
## 5.44.0
|
|
4
45
|
|
|
5
46
|
The text of a tip is semi-bold now. To keep the regular weight: `:bold="false"` on the tooltip, or `:root { --tao-tooltip-weight: 400 }` for all of them.
|
package/README.md
CHANGED
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
- **TaoLink** — `<NuxtLink>` in Nuxt, `<RouterLink>` with vue-router, otherwise a plain `<a>` — no extra setup
|
|
140
140
|
- **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.
|
|
141
141
|
- **TaoBreadcrumb** — crumbs: the last item is the current page
|
|
142
|
-
- **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); flips at the viewport edge; `size` makes the button a compact square, `:tabbable="false"` takes it out of the Tab order
|
|
142
|
+
- **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
143
|
- **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
|
|
144
144
|
- **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
|
|
145
145
|
- **TaoScrollTop** — floating “back to top”: `solid` / `ghost` / `text` looks, `side`, a mouse-hover `label`. Appears on reverse scroll after `boundary`
|
package/README.ru.md
CHANGED
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
- **TaoLink** — `<NuxtLink>` в Nuxt, `<RouterLink>` при vue-router, иначе обычный `<a>` — без дополнительной настройки
|
|
140
140
|
- **TaoStretchedLink** — `TaoLink`, который делает целую карточку или строку одной ссылкой, а кнопки внутри продолжают работать: `tao-stretched` на контейнере, `tao-stretched-raise` на элементе, который должен нажиматься сам. Клавиатура видит одну ссылку, кольцо фокуса идёт по контейнеру (`--tao-stretched-radius`). Не давайте ссылке `filter` / `transform`: слой сожмётся под курсором, и курсор начнёт мигать Текст под растянутым слоем нельзя выделить мышью (то, что должно выделяться, поднимите через `tao-stretched-raise`), а имя ссылке даёт только то, что в ней написано: для карточки направьте `aria-describedby` ссылки на описание.
|
|
141
141
|
- **TaoBreadcrumb** — крошки: последний пункт — текущая страница
|
|
142
|
-
- **TaoDropdownMenu** / **TaoMenu** — меню из простого дерева данных `items`: подменю, чекбоксы, радио, разделители, подписи групп, сочетания для показа, недоступные пункты. Стрелки, Home / End, быстрый поиск по букве, `→` / `←` для подменю, Esc закрывает верхний уровень первым. `TaoMenu` — сама панель для своих оболочек (полоса меню, контекстное меню); у края экрана переворачивается; `size` делает кнопку компактным квадратом, `:tabbable="false"` убирает её из порядка Tab
|
|
142
|
+
- **TaoDropdownMenu** / **TaoMenu** — меню из простого дерева данных `items`: подменю, чекбоксы, радио, разделители, подписи групп, сочетания для показа, недоступные пункты. Стрелки, Home / End, быстрый поиск по букве, `→` / `←` для подменю, Esc закрывает верхний уровень первым. `TaoMenu` — сама панель для своих оболочек (полоса меню, контекстное меню); её `anchor` — элемент или точка экрана `{ x, y }` (меню у указателя или в точке сброса, без элемента-якоря; `TaoPopover` принимает тот же `anchor`); у края экрана переворачивается; `size` делает кнопку компактным квадратом, `dots="horizontal"` кладёт три точки горизонтально (⋯), `:tabbable="false"` убирает её из порядка Tab
|
|
143
143
|
- **TaoMenubar** / **TaoContextMenu** — полоса меню редактора и меню по правой кнопке, на `TaoMenu`. Полоса — одна остановка Tab (`role="menubar"`): `←` / `→` ходят по ней, `↓` / Enter открывают, при открытом меню `←` / `→` и указатель переходят к соседнему; пункт без `items` — обычное действие. Контекстное меню открывается у указателя (или у элемента для клавиши Menu / Shift+F10) и оборачивает содержимое без своей коробки
|
|
144
144
|
- **TaoToolbar** / **TaoToolbarGroup** / **TaoToolbarSeparator** — панель инструментов (`role="toolbar"`): одна остановка Tab, `←` / `→` (или `↑` / `↓` при `orientation="vertical"`) ходят по элементам, Home / End; внутри `TaoSegmented` стрелки выбирают вариант и идут дальше с его края. Группы делит тонкая черта поперёк панели; `inset` кладёт под группу утопленную подложку. Переключатели — `TaoButton` с `v-model:pressed`. `overflow` держит панель в одной строке: группы, которые не влезли, уходят (последняя первой) под кнопку «⋮», она открывает их в панели (те же кнопки, а не копии); `TaoToolbarGroup` с `pinned` остаётся
|
|
145
145
|
- **TaoScrollTop** — плавающая кнопка «наверх»: виды `solid` / `ghost` / `text`, `side`, подпись `label` при наведении мыши. Появляется при обратном скролле после `boundary`
|
package/dist/index.d.ts
CHANGED
|
@@ -229,8 +229,16 @@ modelValue?: boolean;
|
|
|
229
229
|
/** Side and alignment against the trigger; flips when there is no room. / Сторона и выравнивание; при нехватке места переворачивается. */
|
|
230
230
|
placement?: TaoPlacement;
|
|
231
231
|
disabled?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* A virtual anchor: a point `{ x, y }` in viewport coordinates (optionally `width` / `height`) or an element to hang from
|
|
234
|
+
* instead of the trigger. A point stays at its screen point; the focus goes back to what had it before opening.
|
|
235
|
+
* Виртуальный якорь: точка `{ x, y }` в координатах окна (при желании `width` / `height`) или элемент вместо триггера.
|
|
236
|
+
* Точка стоит на своём месте экрана; фокус возвращается туда, где был до открытия.
|
|
237
|
+
*/
|
|
238
|
+
anchor?: TaoAnchor | null;
|
|
232
239
|
}>, {
|
|
233
240
|
modelValue: undefined;
|
|
241
|
+
anchor: null;
|
|
234
242
|
placement: string;
|
|
235
243
|
disabled: boolean;
|
|
236
244
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -241,14 +249,23 @@ modelValue?: boolean;
|
|
|
241
249
|
/** Side and alignment against the trigger; flips when there is no room. / Сторона и выравнивание; при нехватке места переворачивается. */
|
|
242
250
|
placement?: TaoPlacement;
|
|
243
251
|
disabled?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* A virtual anchor: a point `{ x, y }` in viewport coordinates (optionally `width` / `height`) or an element to hang from
|
|
254
|
+
* instead of the trigger. A point stays at its screen point; the focus goes back to what had it before opening.
|
|
255
|
+
* Виртуальный якорь: точка `{ x, y }` в координатах окна (при желании `width` / `height`) или элемент вместо триггера.
|
|
256
|
+
* Точка стоит на своём месте экрана; фокус возвращается туда, где был до открытия.
|
|
257
|
+
*/
|
|
258
|
+
anchor?: TaoAnchor | null;
|
|
244
259
|
}>, {
|
|
245
260
|
modelValue: undefined;
|
|
261
|
+
anchor: null;
|
|
246
262
|
placement: string;
|
|
247
263
|
disabled: boolean;
|
|
248
264
|
}>>> & Readonly<{
|
|
249
265
|
onChange?: ((value: boolean) => any) | undefined;
|
|
250
266
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
251
267
|
}>, {
|
|
268
|
+
anchor: TaoAnchor | null;
|
|
252
269
|
disabled: boolean;
|
|
253
270
|
modelValue: boolean;
|
|
254
271
|
placement: TaoPlacement;
|
|
@@ -1041,6 +1058,13 @@ closeOnScroll?: boolean;
|
|
|
1041
1058
|
*/
|
|
1042
1059
|
size?: TaoSize;
|
|
1043
1060
|
/**
|
|
1061
|
+
* The three dots of the button: `vertical` (⋮, a narrow column, a toolbar) or `horizontal` (⋯, a row of a table or a
|
|
1062
|
+
* list, the corner of a card). Ignored when the `#icon` or `#button` slot is given.
|
|
1063
|
+
* Три точки кнопки: `vertical` (⋮, узкая колонка, тулбар) или `horizontal` (⋯, строка таблицы или списка, угол
|
|
1064
|
+
* карточки). Игнорируется, если передан слот `#icon` или `#button`.
|
|
1065
|
+
*/
|
|
1066
|
+
dots?: "vertical" | "horizontal";
|
|
1067
|
+
/**
|
|
1044
1068
|
* The button is a Tab stop. Turn it off when the row has its own key for the menu (a menu key, Shift+F10): the
|
|
1045
1069
|
* button leaves the Tab order and still opens by a click.
|
|
1046
1070
|
* Кнопка — остановка Tab. Выключите, когда у строки своя клавиша для меню (клавиша меню, Shift+F10): кнопка
|
|
@@ -1052,6 +1076,7 @@ items: () => never[];
|
|
|
1052
1076
|
placement: string;
|
|
1053
1077
|
closeOnScroll: boolean;
|
|
1054
1078
|
size: undefined;
|
|
1079
|
+
dots: string;
|
|
1055
1080
|
tabbable: boolean;
|
|
1056
1081
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1057
1082
|
select: (id: string) => void;
|
|
@@ -1071,6 +1096,13 @@ closeOnScroll?: boolean;
|
|
|
1071
1096
|
*/
|
|
1072
1097
|
size?: TaoSize;
|
|
1073
1098
|
/**
|
|
1099
|
+
* The three dots of the button: `vertical` (⋮, a narrow column, a toolbar) or `horizontal` (⋯, a row of a table or a
|
|
1100
|
+
* list, the corner of a card). Ignored when the `#icon` or `#button` slot is given.
|
|
1101
|
+
* Три точки кнопки: `vertical` (⋮, узкая колонка, тулбар) или `horizontal` (⋯, строка таблицы или списка, угол
|
|
1102
|
+
* карточки). Игнорируется, если передан слот `#icon` или `#button`.
|
|
1103
|
+
*/
|
|
1104
|
+
dots?: "vertical" | "horizontal";
|
|
1105
|
+
/**
|
|
1074
1106
|
* The button is a Tab stop. Turn it off when the row has its own key for the menu (a menu key, Shift+F10): the
|
|
1075
1107
|
* button leaves the Tab order and still opens by a click.
|
|
1076
1108
|
* Кнопка — остановка Tab. Выключите, когда у строки своя клавиша для меню (клавиша меню, Shift+F10): кнопка
|
|
@@ -1082,12 +1114,14 @@ items: () => never[];
|
|
|
1082
1114
|
placement: string;
|
|
1083
1115
|
closeOnScroll: boolean;
|
|
1084
1116
|
size: undefined;
|
|
1117
|
+
dots: string;
|
|
1085
1118
|
tabbable: boolean;
|
|
1086
1119
|
}>>> & Readonly<{
|
|
1087
1120
|
onSelect?: ((id: string) => any) | undefined;
|
|
1088
1121
|
}>, {
|
|
1089
1122
|
size: TaoSize;
|
|
1090
1123
|
items: TaoMenuItem[];
|
|
1124
|
+
dots: "vertical" | "horizontal";
|
|
1091
1125
|
placement: TaoPlacement;
|
|
1092
1126
|
closeOnScroll: boolean;
|
|
1093
1127
|
tabbable: boolean;
|
|
@@ -1096,8 +1130,21 @@ tabbable: boolean;
|
|
|
1096
1130
|
declare const __VLS_component_38: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_36<__VLS_TypePropsToRuntimeProps_40<{
|
|
1097
1131
|
items: TaoMenuItem[];
|
|
1098
1132
|
open: boolean;
|
|
1099
|
-
/**
|
|
1100
|
-
|
|
1133
|
+
/**
|
|
1134
|
+
* What the panel hangs from: a button, the item a submenu opens from, or a point `{ x, y }` on the screen (viewport
|
|
1135
|
+
* coordinates, optionally `width` / `height`) for a menu at the pointer. A point follows nothing: the panel stays at that
|
|
1136
|
+
* screen point (it is `fixed`), flips and shifts at the edges, and the focus goes back to where it was before the menu
|
|
1137
|
+
* opened. Change the point and the menu moves; swap an element for a point and back.
|
|
1138
|
+
* К чему крепится панель: кнопка, пункт, из которого открыто подменю, или точка `{ x, y }` экрана (координаты окна, при
|
|
1139
|
+
* желании `width` / `height`) для меню у указателя. Точка ни за чем не следует: панель стоит в этой точке экрана
|
|
1140
|
+
* (`fixed`), у краёв переворачивается и сдвигается, а фокус при закрытии возвращается туда, где был до открытия.
|
|
1141
|
+
* Сменили точку — меню переехало; элемент можно менять на точку и обратно.
|
|
1142
|
+
*/
|
|
1143
|
+
anchor: TaoAnchor | null;
|
|
1144
|
+
/**
|
|
1145
|
+
* Default `bottom-end` for an element, `bottom-start` for a point (the top-left corner at the point, 4px under it).
|
|
1146
|
+
* По умолчанию `bottom-end` для элемента, `bottom-start` для точки (левый верхний угол у точки, на 4px ниже).
|
|
1147
|
+
*/
|
|
1101
1148
|
placement?: TaoPlacement;
|
|
1102
1149
|
/** Accessible name of the menu. / Имя меню для скринридера. */
|
|
1103
1150
|
label?: string;
|
|
@@ -1107,7 +1154,7 @@ label?: string;
|
|
|
1107
1154
|
*/
|
|
1108
1155
|
closeOnScroll?: boolean;
|
|
1109
1156
|
}>, {
|
|
1110
|
-
placement:
|
|
1157
|
+
placement: undefined;
|
|
1111
1158
|
label: undefined;
|
|
1112
1159
|
closeOnScroll: boolean;
|
|
1113
1160
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -1118,8 +1165,21 @@ edge: (direction: "prev" | "next") => void;
|
|
|
1118
1165
|
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_36<__VLS_TypePropsToRuntimeProps_40<{
|
|
1119
1166
|
items: TaoMenuItem[];
|
|
1120
1167
|
open: boolean;
|
|
1121
|
-
/**
|
|
1122
|
-
|
|
1168
|
+
/**
|
|
1169
|
+
* What the panel hangs from: a button, the item a submenu opens from, or a point `{ x, y }` on the screen (viewport
|
|
1170
|
+
* coordinates, optionally `width` / `height`) for a menu at the pointer. A point follows nothing: the panel stays at that
|
|
1171
|
+
* screen point (it is `fixed`), flips and shifts at the edges, and the focus goes back to where it was before the menu
|
|
1172
|
+
* opened. Change the point and the menu moves; swap an element for a point and back.
|
|
1173
|
+
* К чему крепится панель: кнопка, пункт, из которого открыто подменю, или точка `{ x, y }` экрана (координаты окна, при
|
|
1174
|
+
* желании `width` / `height`) для меню у указателя. Точка ни за чем не следует: панель стоит в этой точке экрана
|
|
1175
|
+
* (`fixed`), у краёв переворачивается и сдвигается, а фокус при закрытии возвращается туда, где был до открытия.
|
|
1176
|
+
* Сменили точку — меню переехало; элемент можно менять на точку и обратно.
|
|
1177
|
+
*/
|
|
1178
|
+
anchor: TaoAnchor | null;
|
|
1179
|
+
/**
|
|
1180
|
+
* Default `bottom-end` for an element, `bottom-start` for a point (the top-left corner at the point, 4px under it).
|
|
1181
|
+
* По умолчанию `bottom-end` для элемента, `bottom-start` для точки (левый верхний угол у точки, на 4px ниже).
|
|
1182
|
+
*/
|
|
1123
1183
|
placement?: TaoPlacement;
|
|
1124
1184
|
/** Accessible name of the menu. / Имя меню для скринридера. */
|
|
1125
1185
|
label?: string;
|
|
@@ -1129,7 +1189,7 @@ label?: string;
|
|
|
1129
1189
|
*/
|
|
1130
1190
|
closeOnScroll?: boolean;
|
|
1131
1191
|
}>, {
|
|
1132
|
-
placement:
|
|
1192
|
+
placement: undefined;
|
|
1133
1193
|
label: undefined;
|
|
1134
1194
|
closeOnScroll: boolean;
|
|
1135
1195
|
}>>> & Readonly<{
|
|
@@ -7136,6 +7196,9 @@ export declare const TAO_CHART_COLORS = 6;
|
|
|
7136
7196
|
|
|
7137
7197
|
export declare const TaoAlert: __VLS_WithTemplateSlots_66<typeof __VLS_component_66, ReturnType<typeof __VLS_template_66>>;
|
|
7138
7198
|
|
|
7199
|
+
/** What a panel hangs from: an element or a virtual anchor. / К чему крепится панель: элемент или виртуальный якорь. */
|
|
7200
|
+
export declare type TaoAnchor = HTMLElement | TaoVirtualAnchor;
|
|
7201
|
+
|
|
7139
7202
|
export declare const TaoAnimatedBorder: __VLS_WithTemplateSlots_31<typeof __VLS_component_31, ReturnType<typeof __VLS_template_31>>;
|
|
7140
7203
|
|
|
7141
7204
|
export declare const TaoAvatar: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_76<__VLS_TypePropsToRuntimeProps_82<{
|
|
@@ -8894,11 +8957,11 @@ error: boolean;
|
|
|
8894
8957
|
resize: boolean;
|
|
8895
8958
|
variant: TaoTextareaVariant;
|
|
8896
8959
|
modelValue: string;
|
|
8960
|
+
spellcheck: boolean;
|
|
8961
|
+
autofocus: boolean;
|
|
8897
8962
|
align: "start" | "center" | "end";
|
|
8898
8963
|
autocomplete: string;
|
|
8899
|
-
spellcheck: boolean;
|
|
8900
8964
|
rows: number;
|
|
8901
|
-
autofocus: boolean;
|
|
8902
8965
|
maxHeight: number | string;
|
|
8903
8966
|
maxlength: number;
|
|
8904
8967
|
minlength: number;
|
|
@@ -9137,6 +9200,19 @@ export declare interface TaoUIOptions {
|
|
|
9137
9200
|
locale?: TaoLocale | TaoLocaleOverrides;
|
|
9138
9201
|
}
|
|
9139
9202
|
|
|
9203
|
+
/**
|
|
9204
|
+
* A virtual anchor: a point (or a box) in viewport coordinates instead of an element, for a menu at the pointer.
|
|
9205
|
+
* `width` and `height` default to 0. It follows nothing: the panel is `fixed` and stays where the point is on the screen.
|
|
9206
|
+
* Виртуальный якорь: точка (или рамка) в координатах окна вместо элемента, для меню у указателя.
|
|
9207
|
+
* `width` и `height` по умолчанию 0. Ни за чем не следует: панель `fixed` и стоит в точке экрана.
|
|
9208
|
+
*/
|
|
9209
|
+
export declare interface TaoVirtualAnchor {
|
|
9210
|
+
x: number;
|
|
9211
|
+
y: number;
|
|
9212
|
+
width?: number;
|
|
9213
|
+
height?: number;
|
|
9214
|
+
}
|
|
9215
|
+
|
|
9140
9216
|
export declare const toast: TaoToastApi;
|
|
9141
9217
|
|
|
9142
9218
|
export declare function todayTaoDate(): string;
|