@1337exp/taoui 5.9.0 → 5.11.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 +20 -0
- package/README.md +3 -3
- package/README.ru.md +3 -3
- package/dist/index.d.ts +72 -1
- package/dist/index.js +27 -13
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +5 -2
- package/skills/taoui/references/components.md +6 -1
- package/src/styles/tokens/semantic.css +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.11.0
|
|
4
|
+
|
|
5
|
+
Nothing to migrate.
|
|
6
|
+
|
|
7
|
+
- **`TaoButton` `shortcut`:** `shortcut="N"` shows the key at the end of the button, in a small chip of the button's own text colour, so it fits any variant and tone; in a wide button it goes to the far edge. It is given as `aria-keyshortcuts` and the chip itself is not read twice. It only shows the key: listening to it is the app's job.
|
|
8
|
+
- **`TaoNav` labels fit the rail.** An item with the icon over its label (the rail, the bar) kept 12px on each side, so the rail left 47px for a label and «Settings» or «Calendar» in Russian were cut. Now it keeps 4px, and the label has about 63px. The side panel is unchanged.
|
|
9
|
+
- **`TaoNav` widths are public:** `--tao-nav-rail-width` (80px), `--tao-nav-drawer-width` (240px) and `--tao-nav-action-radius`, set on `:root` or any wrapper, for an app whose labels are longer still.
|
|
10
|
+
- **`TaoNav` action in the side panel:** the button keeps its own corners, like the items under it, instead of a pill (`--tao-nav-action-radius: var(--tao-radius-full)` brings the pill back), and stands off the top edge. A `shortcut` on it shows in the side panel and hides with the label when the button is round.
|
|
11
|
+
- **`TaoNav` side panel, lighter.** Its rows were 48px, the finger size of the bar, with 4px around the panel. With a mouse they are now a little taller than a control (40px at the medium size, and they follow the size and the density), and the panel keeps 12px from its edges, so the action and the items stand off them like a list in a card. On a touch screen (`pointer: coarse`) the rows stay 48px. The bar and the rail do not change.
|
|
12
|
+
- **`TaoNav` `surface`:** `flat` (the default), `glass` or `grain`, as on TaoCard. `glass` lets the page show blurred through the bar while it scrolls under it, the floating pill included; where blur is not supported or less transparency is asked, the panel is solid.
|
|
13
|
+
- Showcase: buttons with a shortcut; the TaoNav action shows `N` and switches the surface, with something bright under the bar.
|
|
14
|
+
|
|
15
|
+
## 5.10.0
|
|
16
|
+
|
|
17
|
+
Nothing to migrate.
|
|
18
|
+
|
|
19
|
+
- **`variant` on the text fields:** `TaoInput`, `TaoInputNumber` and `TaoCombobox` take `outline` (the frame, the default), `filled` (a fill only) and `plain` (no frame, no fill, no inset), the names `TaoTextarea` already uses. On a plain `TaoInputNumber` the ± buttons lose their lines too. A `plain` field reads as text, for an item of a list being edited: the caret shows the focus, and an error is a red line under the text, so the text does not move. The height is the same in all three. `filled` takes a fill of the text colour, so it shows on a page, a card or glass alike.
|
|
20
|
+
- A test now fails for any field whose control takes the field id (`:id="controlId"`) but does not split its attributes with `useControlAttrs`, so a new field cannot put its `aria-label` on the wrapper again.
|
|
21
|
+
- Showcase: the variants in the TaoInput section.
|
|
22
|
+
|
|
3
23
|
## 5.9.0
|
|
4
24
|
|
|
5
25
|
A new component; nothing to migrate.
|
package/README.md
CHANGED
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
### Basics
|
|
53
53
|
|
|
54
54
|
- **TaoBlock** — container with padding and radius
|
|
55
|
-
- **TaoButton** — `variant`: `primary` / `secondary` / `ghost` / `text`; `tone` colours any of them (accent by default, neutral, success, danger, warning, info). `v-model:pressed` makes it a toggle (`aria-pressed`)
|
|
55
|
+
- **TaoButton** — `variant`: `primary` / `secondary` / `ghost` / `text`; `tone` colours any of them (accent by default, neutral, success, danger, warning, info). `v-model:pressed` makes it a toggle (`aria-pressed`); `shortcut="N"` shows the key at the end of the button (`aria-keyshortcuts`; listening to it is the app's job)
|
|
56
56
|
- **TaoCard** — card with media / header / title / footer slots and a `#corner` (a tag, a menu button). `#media` can be a photo or `TaoCarousel`; `closable` adds a cross and the `close` event. `flush` is a tile (no padding/shadow, fills the cell); `#overlay` is a scrim on the media; `stripe="top | left | bottom"` with `stripeTone` (a tone or the palette `gradient`) draws a coloured stripe the corners clip
|
|
57
57
|
- **TaoCopy** — clipboard icon. After a click, a “Copied” tooltip; if the trigger is gone, the tooltip is too
|
|
58
58
|
- **TaoMarquee** — one line that never wraps: when it does not fit it runs round with fading edges and a pause at the start of every round, when it fits it stands still. Stops on hover, on focus and on a tap (WCAG 2.2.2); wraps with «reduce motion»; a screen reader reads it once. `text` or inline content in the slot, `speed`, `gap`, `fade` (the left fade takes that much room left of the text: give the parent the padding), `paused`
|
|
59
|
-
- **TaoInput** — text field with v-model, validation, and `#prefix` / `#suffix` slots (icon or text inside the frame)
|
|
59
|
+
- **TaoInput** — text field with v-model, validation, and `#prefix` / `#suffix` slots (icon or text inside the frame); `variant` `outline` / `filled` / `plain` (no frame: an item of a list being edited; `TaoInputNumber`, `TaoCombobox` and `TaoTextarea` take it too)
|
|
60
60
|
- **TaoInputGroup** — outer glue: `#before` | field | `#after` (protocol, unit, button)
|
|
61
61
|
- **TaoModal** — modal with animation and slots; `fullscreen` (or `fullscreen="narrow"`: a page on a phone, a dialog on a computer)
|
|
62
62
|
- **TaoDrawer** — side panel (filters, settings), or a bottom sheet with `side="bottom"`. Esc, backdrop click, focus trap — same as the modal
|
|
63
63
|
- **TaoSpoiler** — disclosure. `v-model` and `aria-expanded`. Neighbours do not close each other
|
|
64
64
|
- **TaoSpoilerGroup** — accordion: `v-model` is the open panel key (`null` = all closed); spoilers take `name`. Without `v-model` the group keeps that key itself
|
|
65
65
|
- **TaoTabs** — tabbed sections
|
|
66
|
-
- **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
|
|
66
|
+
- **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
|
|
67
67
|
- **TaoTooltip** — hover hint. `placement`: `top` / `bottom` / `left` / `right`, each with `-start` / `-end`; flips at the viewport edge
|
|
68
68
|
- **TaoPopover** — click panel with any slot content, Esc and outside click; `placement` as Tooltip. Not a tooltip, not an action menu
|
|
69
69
|
|
package/README.ru.md
CHANGED
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
### Базовые
|
|
53
53
|
|
|
54
54
|
- **TaoBlock** — базовый контейнер с настраиваемыми отступами и скруглением
|
|
55
|
-
- **TaoButton** — кнопка. `variant`: `primary` / `secondary` / `ghost` / `text`; `tone` красит любой из них (по умолчанию акцент, neutral, success, danger, warning, info). `v-model:pressed` делает её переключателем (`aria-pressed`)
|
|
55
|
+
- **TaoButton** — кнопка. `variant`: `primary` / `secondary` / `ghost` / `text`; `tone` красит любой из них (по умолчанию акцент, neutral, success, danger, warning, info). `v-model:pressed` делает её переключателем (`aria-pressed`); `shortcut="N"` показывает клавишу в конце кнопки (`aria-keyshortcuts`; слушать её — дело приложения)
|
|
56
56
|
- **TaoCard** — карточка со слотами media / header / title / footer и `#corner` (тег, кнопка меню). В `#media` — фото или `TaoCarousel`; `closable` добавляет крестик и событие `close`. `flush` — плитка без padding/тени на всю ячейку; `#overlay` — scrim на media; `stripe="top | left | bottom"` со `stripeTone` (тон или `gradient` палитры) рисует цветную полосу, которую обрезают углы
|
|
57
57
|
- **TaoCopy** — иконка копирования в буфер. После клика сверху тултип «Скопировано»; если кнопку убрали — тултип тоже
|
|
58
58
|
- **TaoMarquee** — одна строка без переносов: не помещается — бежит по кругу с гаснущими краями и паузой в начале каждого круга, помещается — стоит. Останавливается при наведении, фокусе и тапе (WCAG 2.2.2); при «уменьшить движение» переносится; скринридер читает один раз. `text` или строчное содержимое в слоте, `speed`, `gap`, `fade` (левое затухание занимает столько места слева от текста: дайте родителю такой padding), `paused`
|
|
59
|
-
- **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки)
|
|
59
|
+
- **TaoInput** — поле ввода с поддержкой v-model, валидации и слотов `#prefix` / `#suffix` (иконка или текст внутри рамки); `variant` `outline` / `filled` / `plain` (без рамки: пункт списка в правке; его берут и `TaoInputNumber`, `TaoCombobox`, `TaoTextarea`)
|
|
60
60
|
- **TaoInputGroup** — склейка снаружи: `#before` | поле | `#after` (протокол, единица, кнопка)
|
|
61
61
|
- **TaoModal** — модальное окно с анимацией и слотами; `fullscreen` (или `fullscreen="narrow"`: страница на телефоне, окно на компьютере)
|
|
62
62
|
- **TaoDrawer** — боковая панель (фильтры, настройки) или нижний лист с `side="bottom"`. Esc, клик по фону, ловушка фокуса — как у модалки
|
|
63
63
|
- **TaoSpoiler** — раскрывающийся блок. `v-model` и `aria-expanded`. Несколько подряд сами друг друга не закрывают
|
|
64
64
|
- **TaoSpoilerGroup** — аккордеон: `v-model` — ключ открытой панели (`null` — все закрыты), у спойлера `name`. Без `v-model` группа помнит ключ сама
|
|
65
65
|
- **TaoTabs** — вкладки для переключения между секциями контента
|
|
66
|
-
- **TaoNav** — навигация между разделами приложения: один список пунктов (`icon`, `href`, `badge`), три вида. `layout="auto"` выбирает по ширине самого TaoNav (container queries, без JS): нижняя панель до 600px (больше пяти пунктов: «Ещё» с меню), рейка с иконками до 840px, боковая панель с подписями от 840px. Со страницей в слоте раскладывает её сам: панель прилипает к низу (с учётом безопасной зоны), боковой список к верху. `floating` отрывает нижнюю панель в отдельную «пилюлю» с тенью (рейка и боковая панель не меняются). `indicator="line"` отмечает текущий раздел короткой чертой акцента вместо подложки. Слот `#action` — главное действие экрана, оно идёт за навигацией: круглое над панелью у конечного края, наверху рейки, широкое с текстом наверху боковой панели. `select(id, event)` даёт роутеру перехватить
|
|
66
|
+
- **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"` — страница размыто просвечивает сквозь панель
|
|
67
67
|
- **TaoTooltip** — всплывающая подсказка при наведении. `placement`: `top` / `bottom` / `left` / `right`, у каждого `-start` / `-end`; у края экрана переворачивается
|
|
68
68
|
- **TaoPopover** — панель по клику: слот с любым контентом, Esc и клик снаружи; `placement` как у Tooltip. Не тултип и не меню действий
|
|
69
69
|
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ icon: string;
|
|
|
20
20
|
iconEnd: string;
|
|
21
21
|
minWidth: undefined;
|
|
22
22
|
pressed: undefined;
|
|
23
|
+
shortcut: undefined;
|
|
23
24
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
24
25
|
click: (event: MouseEvent) => void;
|
|
25
26
|
"update:pressed": (value: boolean) => void;
|
|
@@ -34,6 +35,7 @@ icon: string;
|
|
|
34
35
|
iconEnd: string;
|
|
35
36
|
minWidth: undefined;
|
|
36
37
|
pressed: undefined;
|
|
38
|
+
shortcut: undefined;
|
|
37
39
|
}>>> & Readonly<{
|
|
38
40
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
39
41
|
"onUpdate:pressed"?: ((value: boolean) => any) | undefined;
|
|
@@ -48,6 +50,7 @@ block: boolean;
|
|
|
48
50
|
iconEnd: string;
|
|
49
51
|
minWidth: number | string;
|
|
50
52
|
pressed: boolean;
|
|
53
|
+
shortcut: string;
|
|
51
54
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
52
55
|
|
|
53
56
|
declare const __VLS_component_10: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_9<__VLS_TypePropsToRuntimeProps_10<{
|
|
@@ -701,12 +704,12 @@ label: string;
|
|
|
701
704
|
variant: "solid" | "ghost" | "text";
|
|
702
705
|
bottom: string | number;
|
|
703
706
|
right: string | number;
|
|
707
|
+
outline: boolean;
|
|
704
708
|
side: "left" | "right";
|
|
705
709
|
offset: string | number;
|
|
706
710
|
labelSide: "left" | "right";
|
|
707
711
|
zIndex: number;
|
|
708
712
|
boundary: number;
|
|
709
|
-
outline: boolean;
|
|
710
713
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
711
714
|
|
|
712
715
|
declare const __VLS_component_3: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_3>, {
|
|
@@ -715,6 +718,7 @@ type: string;
|
|
|
715
718
|
placeholder: string;
|
|
716
719
|
disabled: boolean;
|
|
717
720
|
error: boolean;
|
|
721
|
+
variant: string;
|
|
718
722
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
719
723
|
blur: (...args: any[]) => void;
|
|
720
724
|
focus: (...args: any[]) => void;
|
|
@@ -725,6 +729,7 @@ type: string;
|
|
|
725
729
|
placeholder: string;
|
|
726
730
|
disabled: boolean;
|
|
727
731
|
error: boolean;
|
|
732
|
+
variant: string;
|
|
728
733
|
}>>> & Readonly<{
|
|
729
734
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
730
735
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -734,6 +739,7 @@ type: "text" | "password" | "email" | "number" | "tel";
|
|
|
734
739
|
disabled: boolean;
|
|
735
740
|
placeholder: string;
|
|
736
741
|
error: boolean;
|
|
742
|
+
variant: "outline" | "filled" | "plain";
|
|
737
743
|
modelValue: string | number;
|
|
738
744
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
739
745
|
|
|
@@ -1183,6 +1189,13 @@ floating?: boolean;
|
|
|
1183
1189
|
* в виде панели, вдоль его начального края в рейке и боковой панели).
|
|
1184
1190
|
*/
|
|
1185
1191
|
indicator?: "pill" | "line";
|
|
1192
|
+
/**
|
|
1193
|
+
* What the panel is made of, as on TaoCard: `glass` lets the page show blurred through the bar while it scrolls
|
|
1194
|
+
* under it (solid where blur is not supported or less transparency is asked), `grain` a film grain.
|
|
1195
|
+
* Из чего сделана панель, как у TaoCard: `glass` — страница размыто просвечивает сквозь панель, когда уходит под
|
|
1196
|
+
* неё (сплошная, где размытия нет или просят меньше прозрачности), `grain` — плёночное зерно.
|
|
1197
|
+
*/
|
|
1198
|
+
surface?: TaoSurface;
|
|
1186
1199
|
}>, {
|
|
1187
1200
|
modelValue: undefined;
|
|
1188
1201
|
layout: string;
|
|
@@ -1191,6 +1204,7 @@ ariaLabel: undefined;
|
|
|
1191
1204
|
moreLabel: undefined;
|
|
1192
1205
|
floating: boolean;
|
|
1193
1206
|
indicator: string;
|
|
1207
|
+
surface: string;
|
|
1194
1208
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1195
1209
|
select: (id: string, event: Event) => void;
|
|
1196
1210
|
"update:modelValue": (id: string) => void;
|
|
@@ -1219,6 +1233,13 @@ floating?: boolean;
|
|
|
1219
1233
|
* в виде панели, вдоль его начального края в рейке и боковой панели).
|
|
1220
1234
|
*/
|
|
1221
1235
|
indicator?: "pill" | "line";
|
|
1236
|
+
/**
|
|
1237
|
+
* What the panel is made of, as on TaoCard: `glass` lets the page show blurred through the bar while it scrolls
|
|
1238
|
+
* under it (solid where blur is not supported or less transparency is asked), `grain` a film grain.
|
|
1239
|
+
* Из чего сделана панель, как у TaoCard: `glass` — страница размыто просвечивает сквозь панель, когда уходит под
|
|
1240
|
+
* неё (сплошная, где размытия нет или просят меньше прозрачности), `grain` — плёночное зерно.
|
|
1241
|
+
*/
|
|
1242
|
+
surface?: TaoSurface;
|
|
1222
1243
|
}>, {
|
|
1223
1244
|
modelValue: undefined;
|
|
1224
1245
|
layout: string;
|
|
@@ -1227,10 +1248,12 @@ ariaLabel: undefined;
|
|
|
1227
1248
|
moreLabel: undefined;
|
|
1228
1249
|
floating: boolean;
|
|
1229
1250
|
indicator: string;
|
|
1251
|
+
surface: string;
|
|
1230
1252
|
}>>> & Readonly<{
|
|
1231
1253
|
onSelect?: ((id: string, event: Event) => any) | undefined;
|
|
1232
1254
|
"onUpdate:modelValue"?: ((id: string) => any) | undefined;
|
|
1233
1255
|
}>, {
|
|
1256
|
+
surface: TaoSurface;
|
|
1234
1257
|
ariaLabel: string;
|
|
1235
1258
|
modelValue: string;
|
|
1236
1259
|
indicator: "pill" | "line";
|
|
@@ -1644,6 +1667,13 @@ error?: boolean;
|
|
|
1644
1667
|
/** Control size, same scale as TaoButton; without it — the size of ancestors. / Размер, шкала как у TaoButton; без него — размер предков. */
|
|
1645
1668
|
size?: TaoSize;
|
|
1646
1669
|
placeholder?: string;
|
|
1670
|
+
/**
|
|
1671
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill, as on TaoInput: a field that reads as
|
|
1672
|
+
* text, its error a red line under the text.
|
|
1673
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки, как у TaoInput: поле читается как
|
|
1674
|
+
* текст, его ошибка — красная черта под текстом.
|
|
1675
|
+
*/
|
|
1676
|
+
variant?: "outline" | "filled" | "plain";
|
|
1647
1677
|
controls?: boolean;
|
|
1648
1678
|
incrementLabel?: string;
|
|
1649
1679
|
decrementLabel?: string;
|
|
@@ -1654,6 +1684,7 @@ disabled: boolean;
|
|
|
1654
1684
|
error: boolean;
|
|
1655
1685
|
placeholder: string;
|
|
1656
1686
|
controls: boolean;
|
|
1687
|
+
variant: string;
|
|
1657
1688
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1658
1689
|
blur: (event: FocusEvent) => void;
|
|
1659
1690
|
focus: (event: FocusEvent) => void;
|
|
@@ -1671,6 +1702,13 @@ error?: boolean;
|
|
|
1671
1702
|
/** Control size, same scale as TaoButton; without it — the size of ancestors. / Размер, шкала как у TaoButton; без него — размер предков. */
|
|
1672
1703
|
size?: TaoSize;
|
|
1673
1704
|
placeholder?: string;
|
|
1705
|
+
/**
|
|
1706
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill, as on TaoInput: a field that reads as
|
|
1707
|
+
* text, its error a red line under the text.
|
|
1708
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки, как у TaoInput: поле читается как
|
|
1709
|
+
* текст, его ошибка — красная черта под текстом.
|
|
1710
|
+
*/
|
|
1711
|
+
variant?: "outline" | "filled" | "plain";
|
|
1674
1712
|
controls?: boolean;
|
|
1675
1713
|
incrementLabel?: string;
|
|
1676
1714
|
decrementLabel?: string;
|
|
@@ -1681,6 +1719,7 @@ disabled: boolean;
|
|
|
1681
1719
|
error: boolean;
|
|
1682
1720
|
placeholder: string;
|
|
1683
1721
|
controls: boolean;
|
|
1722
|
+
variant: string;
|
|
1684
1723
|
}>>> & Readonly<{
|
|
1685
1724
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
1686
1725
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
@@ -1690,6 +1729,7 @@ onCommit?: ((value: number | null) => any) | undefined;
|
|
|
1690
1729
|
disabled: boolean;
|
|
1691
1730
|
placeholder: string;
|
|
1692
1731
|
error: boolean;
|
|
1732
|
+
variant: "outline" | "filled" | "plain";
|
|
1693
1733
|
step: number;
|
|
1694
1734
|
modelValue: number | null;
|
|
1695
1735
|
controls: boolean;
|
|
@@ -1708,6 +1748,13 @@ clearText?: string;
|
|
|
1708
1748
|
clearable?: boolean;
|
|
1709
1749
|
/** Control size, same scale as TaoButton and TaoSelect; without it — the size of ancestors. / Размер контрола, шкала как у TaoButton и TaoSelect; без него — размер предков. */
|
|
1710
1750
|
size?: TaoSize;
|
|
1751
|
+
/**
|
|
1752
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill, as on TaoInput: a field that reads as
|
|
1753
|
+
* text, its error a red line under the text.
|
|
1754
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки, как у TaoInput: поле читается как
|
|
1755
|
+
* текст, его ошибка — красная черта под текстом.
|
|
1756
|
+
*/
|
|
1757
|
+
variant?: "outline" | "filled" | "plain";
|
|
1711
1758
|
/** Можно оставить то, чего нет в списке. */
|
|
1712
1759
|
allowCreate?: boolean;
|
|
1713
1760
|
}>, {
|
|
@@ -1717,6 +1764,7 @@ disabled: boolean;
|
|
|
1717
1764
|
error: boolean;
|
|
1718
1765
|
clearable: boolean;
|
|
1719
1766
|
allowCreate: boolean;
|
|
1767
|
+
variant: string;
|
|
1720
1768
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1721
1769
|
change: (value: string | number | null) => void;
|
|
1722
1770
|
"update:modelValue": (value: string | number | null) => void;
|
|
@@ -1734,6 +1782,13 @@ clearText?: string;
|
|
|
1734
1782
|
clearable?: boolean;
|
|
1735
1783
|
/** Control size, same scale as TaoButton and TaoSelect; without it — the size of ancestors. / Размер контрола, шкала как у TaoButton и TaoSelect; без него — размер предков. */
|
|
1736
1784
|
size?: TaoSize;
|
|
1785
|
+
/**
|
|
1786
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill, as on TaoInput: a field that reads as
|
|
1787
|
+
* text, its error a red line under the text.
|
|
1788
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки, как у TaoInput: поле читается как
|
|
1789
|
+
* текст, его ошибка — красная черта под текстом.
|
|
1790
|
+
*/
|
|
1791
|
+
variant?: "outline" | "filled" | "plain";
|
|
1737
1792
|
/** Можно оставить то, чего нет в списке. */
|
|
1738
1793
|
allowCreate?: boolean;
|
|
1739
1794
|
}>, {
|
|
@@ -1743,6 +1798,7 @@ disabled: boolean;
|
|
|
1743
1798
|
error: boolean;
|
|
1744
1799
|
clearable: boolean;
|
|
1745
1800
|
allowCreate: boolean;
|
|
1801
|
+
variant: string;
|
|
1746
1802
|
}>>> & Readonly<{
|
|
1747
1803
|
onChange?: ((value: string | number | null) => any) | undefined;
|
|
1748
1804
|
"onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
@@ -1750,6 +1806,7 @@ onCreate?: ((value: string) => any) | undefined;
|
|
|
1750
1806
|
}>, {
|
|
1751
1807
|
disabled: boolean;
|
|
1752
1808
|
error: boolean;
|
|
1809
|
+
variant: "outline" | "filled" | "plain";
|
|
1753
1810
|
modelValue: string | number | null;
|
|
1754
1811
|
options: TaoSelectOption[];
|
|
1755
1812
|
clearable: boolean;
|
|
@@ -5663,6 +5720,13 @@ declare interface Props {
|
|
|
5663
5720
|
* своё состояние; без него — обычная кнопка.
|
|
5664
5721
|
*/
|
|
5665
5722
|
pressed?: boolean;
|
|
5723
|
+
/**
|
|
5724
|
+
* The key that does the same, shown at the end of the button (`N`, `Ctrl+K`) and given as `aria-keyshortcuts`.
|
|
5725
|
+
* It only shows the key: listening to it is the app's job.
|
|
5726
|
+
* Клавиша, которая делает то же, — в конце кнопки (`N`, `Ctrl+K`) и в `aria-keyshortcuts`. Только показывает
|
|
5727
|
+
* клавишу: слушать её — дело приложения.
|
|
5728
|
+
*/
|
|
5729
|
+
shortcut?: string;
|
|
5666
5730
|
}
|
|
5667
5731
|
|
|
5668
5732
|
declare interface Props_10 {
|
|
@@ -5801,6 +5865,13 @@ declare interface Props_3 {
|
|
|
5801
5865
|
size?: TaoSize;
|
|
5802
5866
|
/** Red frame. The message goes to TaoFormField `error`. / Красная рамка. Текст ошибки — в `error` у TaoFormField. */
|
|
5803
5867
|
error?: boolean;
|
|
5868
|
+
/**
|
|
5869
|
+
* `outline` — a frame, `filled` — a fill only, `plain` — no frame, no fill: a field that reads as text (an item of a
|
|
5870
|
+
* list being edited), its error a red line under the text.
|
|
5871
|
+
* `outline` — рамка, `filled` — только заливка, `plain` — без рамки и заливки: поле, которое читается как текст
|
|
5872
|
+
* (пункт списка в правке), его ошибка — красная черта под текстом.
|
|
5873
|
+
*/
|
|
5874
|
+
variant?: 'outline' | 'filled' | 'plain';
|
|
5804
5875
|
id?: string;
|
|
5805
5876
|
}
|
|
5806
5877
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowReactive, defineComponent, useCssVars, computed, openBlock, createElementBlock, renderSlot, normalizeClass, normalizeStyle, useSlots, useAttrs, unref, createCommentVNode, createBlock, inject, useId, ref, mergeProps, createElementVNode, provide, shallowRef, watch, createVNode, toValue, onBeforeUnmount, Teleport, Transition, withCtx,
|
|
1
|
+
import { shallowReactive, defineComponent, useCssVars, computed, openBlock, createElementBlock, renderSlot, normalizeClass, normalizeStyle, useSlots, useAttrs, unref, createCommentVNode, createBlock, toDisplayString, inject, useId, ref, mergeProps, createElementVNode, provide, shallowRef, watch, createVNode, toValue, onBeforeUnmount, Teleport, Transition, withCtx, nextTick, Fragment, renderList, createTextVNode, onMounted, createSlots, normalizeProps, guardReactiveProps, resolveDynamicComponent, withModifiers, onBeforeMount, resolveComponent, toRef, withDirectives, vShow, getCurrentInstance, reactive, withKeys, vModelText, TransitionGroup, onUpdated, createApp } from "vue";
|
|
2
2
|
function isDev() {
|
|
3
3
|
try {
|
|
4
4
|
return process.env.NODE_ENV !== "production";
|
|
@@ -151,7 +151,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
151
151
|
return target;
|
|
152
152
|
};
|
|
153
153
|
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["__scopeId", "data-v-ef842331"]]);
|
|
154
|
-
const _hoisted_1$15 = ["type", "aria-pressed", "disabled"];
|
|
154
|
+
const _hoisted_1$15 = ["type", "aria-pressed", "aria-keyshortcuts", "disabled"];
|
|
155
155
|
const _hoisted_2$X = {
|
|
156
156
|
key: 0,
|
|
157
157
|
class: "tao-button__loader"
|
|
@@ -160,6 +160,11 @@ const _hoisted_3$P = {
|
|
|
160
160
|
key: 2,
|
|
161
161
|
class: "tao-button__content"
|
|
162
162
|
};
|
|
163
|
+
const _hoisted_4$F = {
|
|
164
|
+
key: 4,
|
|
165
|
+
class: "tao-button__shortcut",
|
|
166
|
+
"aria-hidden": "true"
|
|
167
|
+
};
|
|
163
168
|
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
164
169
|
...{ name: "TaoButton" },
|
|
165
170
|
__name: "TaoButton",
|
|
@@ -174,7 +179,8 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
174
179
|
icon: { default: "" },
|
|
175
180
|
iconEnd: { default: "" },
|
|
176
181
|
minWidth: { default: void 0 },
|
|
177
|
-
pressed: { type: Boolean, default: void 0 }
|
|
182
|
+
pressed: { type: Boolean, default: void 0 },
|
|
183
|
+
shortcut: { default: void 0 }
|
|
178
184
|
},
|
|
179
185
|
emits: ["click", "update:pressed"],
|
|
180
186
|
setup(__props, { emit: __emit }) {
|
|
@@ -215,6 +221,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
215
221
|
style: normalizeStyle(minWidthStyle.value),
|
|
216
222
|
type: __props.type,
|
|
217
223
|
"aria-pressed": __props.pressed === void 0 ? void 0 : __props.pressed,
|
|
224
|
+
"aria-keyshortcuts": __props.shortcut || void 0,
|
|
218
225
|
disabled: __props.disabled || __props.loading,
|
|
219
226
|
onClick: handleClick
|
|
220
227
|
}, [
|
|
@@ -231,12 +238,13 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
231
238
|
key: 3,
|
|
232
239
|
class: "tao-button__icon",
|
|
233
240
|
name: __props.iconEnd
|
|
234
|
-
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
241
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
242
|
+
__props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_4$F, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)
|
|
235
243
|
], 14, _hoisted_1$15);
|
|
236
244
|
};
|
|
237
245
|
}
|
|
238
246
|
});
|
|
239
|
-
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-
|
|
247
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-4b8def1b"]]);
|
|
240
248
|
function toCssLength(value) {
|
|
241
249
|
if (value === void 0 || value === null || value === "") {
|
|
242
250
|
return void 0;
|
|
@@ -329,6 +337,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
329
337
|
disabled: { type: Boolean, default: false },
|
|
330
338
|
size: {},
|
|
331
339
|
error: { type: Boolean, default: false },
|
|
340
|
+
variant: { default: "outline" },
|
|
332
341
|
id: {}
|
|
333
342
|
},
|
|
334
343
|
emits: ["update:modelValue", "blur", "focus"],
|
|
@@ -356,6 +365,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
356
365
|
}), [
|
|
357
366
|
createElementVNode("div", {
|
|
358
367
|
class: normalizeClass(["tao-input-shell", {
|
|
368
|
+
[`tao-input-shell--${__props.variant}`]: __props.variant !== "outline",
|
|
359
369
|
"tao-input-shell--focused": focused.value,
|
|
360
370
|
"tao-input-shell--invalid": unref(invalid),
|
|
361
371
|
"tao-input-shell--disabled": __props.disabled,
|
|
@@ -387,7 +397,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
387
397
|
};
|
|
388
398
|
}
|
|
389
399
|
});
|
|
390
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-
|
|
400
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-5b617319"]]);
|
|
391
401
|
const _hoisted_1$13 = {
|
|
392
402
|
key: 0,
|
|
393
403
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
@@ -840,6 +850,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
840
850
|
error: { type: Boolean, default: false },
|
|
841
851
|
size: {},
|
|
842
852
|
placeholder: { default: "" },
|
|
853
|
+
variant: { default: "outline" },
|
|
843
854
|
controls: { type: Boolean, default: true },
|
|
844
855
|
incrementLabel: {},
|
|
845
856
|
decrementLabel: {}
|
|
@@ -964,7 +975,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
964
975
|
const atMax = computed(() => props.max !== void 0 && (props.modelValue ?? 0) >= props.max);
|
|
965
976
|
return (_ctx, _cache) => {
|
|
966
977
|
return openBlock(), createElementBlock("div", mergeProps(unref(rootAttrs)(), {
|
|
967
|
-
class: ["tao-input-number", [unref(sizeClass)(__props.size), { "tao-input-number--invalid": unref(invalid), "tao-input-number--controls": __props.controls }]]
|
|
978
|
+
class: ["tao-input-number", [unref(sizeClass)(__props.size), { [`tao-input-number--${__props.variant}`]: __props.variant !== "outline", "tao-input-number--invalid": unref(invalid), "tao-input-number--controls": __props.controls }]]
|
|
968
979
|
}), [
|
|
969
980
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
970
981
|
id: unref(controlId),
|
|
@@ -1020,7 +1031,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1020
1031
|
};
|
|
1021
1032
|
}
|
|
1022
1033
|
});
|
|
1023
|
-
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-
|
|
1034
|
+
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-dc5bb759"]]);
|
|
1024
1035
|
const _hoisted_1$11 = ["aria-label", "disabled"];
|
|
1025
1036
|
const _hoisted_2$T = { "aria-hidden": "true" };
|
|
1026
1037
|
const _hoisted_3$L = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
@@ -5910,7 +5921,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
5910
5921
|
ariaLabel: { default: void 0 },
|
|
5911
5922
|
moreLabel: { default: void 0 },
|
|
5912
5923
|
floating: { type: Boolean, default: false },
|
|
5913
|
-
indicator: { default: "pill" }
|
|
5924
|
+
indicator: { default: "pill" },
|
|
5925
|
+
surface: { default: "flat" }
|
|
5914
5926
|
},
|
|
5915
5927
|
emits: ["update:modelValue", "select"],
|
|
5916
5928
|
setup(__props, { emit: __emit }) {
|
|
@@ -5961,7 +5973,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
5961
5973
|
}, [
|
|
5962
5974
|
createElementVNode("div", _hoisted_1$y, [
|
|
5963
5975
|
createElementVNode("nav", {
|
|
5964
|
-
class: "tao-nav__panel",
|
|
5976
|
+
class: normalizeClass(["tao-nav__panel", unref(surfaceClass)(__props.surface)]),
|
|
5965
5977
|
"aria-label": unref(l10n).ariaLabel
|
|
5966
5978
|
}, [
|
|
5967
5979
|
createElementVNode("div", _hoisted_3$r, [
|
|
@@ -6029,7 +6041,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
6029
6041
|
])) : createCommentVNode("", true)
|
|
6030
6042
|
])
|
|
6031
6043
|
])
|
|
6032
|
-
],
|
|
6044
|
+
], 10, _hoisted_2$v),
|
|
6033
6045
|
!standalone.value ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
|
|
6034
6046
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
6035
6047
|
])) : createCommentVNode("", true)
|
|
@@ -6048,7 +6060,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
6048
6060
|
};
|
|
6049
6061
|
}
|
|
6050
6062
|
});
|
|
6051
|
-
const TaoNav = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-
|
|
6063
|
+
const TaoNav = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-21852ef0"]]);
|
|
6052
6064
|
function visibleRows(nodes, expanded, children) {
|
|
6053
6065
|
const rows = [];
|
|
6054
6066
|
const walk = (list, level, parentId) => {
|
|
@@ -8172,6 +8184,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8172
8184
|
clearText: {},
|
|
8173
8185
|
clearable: { type: Boolean, default: true },
|
|
8174
8186
|
size: {},
|
|
8187
|
+
variant: { default: "outline" },
|
|
8175
8188
|
allowCreate: { type: Boolean, default: false }
|
|
8176
8189
|
},
|
|
8177
8190
|
emits: ["update:modelValue", "change", "create"],
|
|
@@ -8489,6 +8502,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8489
8502
|
class: ["tao-combobox", [
|
|
8490
8503
|
unref(sizeClass)(__props.size),
|
|
8491
8504
|
{
|
|
8505
|
+
[`tao-combobox--${__props.variant}`]: __props.variant !== "outline",
|
|
8492
8506
|
"tao-combobox--open": open.value,
|
|
8493
8507
|
"tao-combobox--invalid": unref(invalid),
|
|
8494
8508
|
"tao-combobox--disabled": __props.disabled
|
|
@@ -8599,7 +8613,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8599
8613
|
};
|
|
8600
8614
|
}
|
|
8601
8615
|
});
|
|
8602
|
-
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-
|
|
8616
|
+
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-0961b3a0"]]);
|
|
8603
8617
|
const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
8604
8618
|
function formatTaoDateIso(parts) {
|
|
8605
8619
|
return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
|