@1337exp/taoui 5.28.0 → 5.30.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 +22 -0
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/dist/index.d.ts +20 -3
- package/dist/index.js +242 -98
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/skills/taoui/SKILL.md +8 -2
- package/skills/taoui/references/components.md +1297 -1295
- package/skills/taoui/references/patterns.md +163 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.30.0
|
|
4
|
+
|
|
5
|
+
Nothing to migrate. One thing may look different: controls inside a `TaoPopover` that hangs in a small, large or compact context now follow it (before they were always medium).
|
|
6
|
+
|
|
7
|
+
- **`TaoButton`: a slot that draws nothing is no text.** A button with an icon and `<template v-if="wide">View</template>` or an `<i v-if="dot" />` inside kept the content wrapper and its gap although nothing was drawn, so the icon sat off-centre and the button was not the icon-only square. The button now asks what the slot draws at render time (`src/slots.ts`, `slotHasContent`), not whether the slot exists.
|
|
8
|
+
- **The same trap in the other components, closed.** `$slots.x` is true for a slot that draws nothing: a wrapper component forwarding a slot it was not given, an inner `v-if` that is false. The wrapper of the slot stayed, with its padding, border or gap: an empty card body, an empty addon, a label gap beside a switch. Now `TaoAlert` (body), `TaoCard` (header, title, sub, body, footer, corner, media), `TaoDivider`, `TaoDonut`, `TaoDrawer` and `TaoModal` (footer), `TaoEmpty` (icon, text, action), `TaoFieldset` (legend), `TaoInput` (prefix, suffix), `TaoInputGroup` (before, after), `TaoListItem`, `TaoMarquee`, `TaoNav` (action, footer), `TaoProgress`, `TaoSegmentedOption`, `TaoSpoiler` (title), `TaoSwitch` (label) and `TaoTag` (prefix) ask what the slot draws (`slotHas`). Slots with props (`TaoTree`, `TaoTimeline`, `TaoTabs` label, `TaoCopy`) are left as they were: the check calls a slot without props.
|
|
9
|
+
- **`TaoButton` `shortcut`: not printed on an icon-only button.** The key is shown at the end of a button with text, but an icon-only button is a square of the control height, and the key piled over the icon and over its neighbours (an editor toolbar). Now the key goes to the native tooltip, `Bold (Ctrl+B)` (the `aria-label`, then the key), and stays in `aria-keyshortcuts`; a `title` of your own wins. A button with text is as before. Nobody has to move the key into a tooltip by hand any more.
|
|
10
|
+
- **`TaoSegmented` keeps the width of its options in a flex row.** Beside a field that takes the room (`TaoSelect` is 100% wide) it was squeezed until its last option was cut off ("Li" instead of "List"). It no longer shrinks; a `block` one still fills its container.
|
|
11
|
+
- **`TaoPopover`: the panel carries the size and the density of where it hangs from.** The skill and the rules say a floating panel does, but only the lists of `TaoSelect` and `TaoCombobox` did: the content of a popover is in `body`, where the context is not inherited, so a small control row inside it grew back to medium. The panel now gets `tao-size-*` and `tao-density-*` when it opens, as the select list does.
|
|
12
|
+
- **The skill gets `references/patterns.md`: what to use when, and why.** The accent budget (one filled accent button per region, quiet tools are `ghost` + `tone="neutral"`, status is `tone`), a section on choosing a size (what small / medium / large are for and what they cost, 26 / 36 / 44px, density on top of the size, phone = `tao-density-auto`, how to find where a small control came from), and a do and a don't for a toolbar, the footer of a form, controls side by side (one size from the container, never a size on some of them) and a destructive action. It is generated by `npm run skill` from the same data that draws the Guide page of the showcase (`#patterns`); `SKILL.md` points at it.
|
|
13
|
+
|
|
14
|
+
The showcase is now three books under one shell (Components, Demos, Guide), with the page menu as a bottom sheet and a sticky compact bar on a phone.
|
|
15
|
+
|
|
16
|
+
## 5.29.1
|
|
17
|
+
|
|
18
|
+
- **`TaoSlider` `editable`: the field is opaque.** Its background was the translucent input colour, so over the filled part of the bar the accent showed through it and the typed number was unreadable. The field now lies on the page background first.
|
|
19
|
+
|
|
20
|
+
## 5.29.0
|
|
21
|
+
|
|
22
|
+
Nothing to migrate; the defaults do not change (`editable` is off, a slider that does not pass it works as before).
|
|
23
|
+
|
|
24
|
+
- **`TaoSlider` / `TaoRangeSlider`: `editable`, the value can be typed.** The number over the bar (`show-value`) was only a label, and there was no way to say "exactly 37": the thumb had to be dragged to it. With `editable` a **right click** or a **double click** on the bar (a long press on a touch screen), or **Enter / F2** on a thumb (so the keyboard reaches it too), opens a field over the middle of the bar, where the value text stands. Enter or leaving the field sets the value, snapped to the step (or to the nearest mark with `discrete`) and kept in `min`…`max`, exactly like a value picked with the pointer; a comma works as the decimal point; Esc drops the edit; text that is not a decimal number changes nothing. On a range it edits the thumb nearest to the click (the focused one for the keyboard), and `minGap` still holds. `change` fires once, when the value is set. The field is named by `editLabel`, else by `ariaLabel`, else by the locale (`slider.editLabel`, "Value" / "Значение"); the thumbs advertise `aria-keyshortcuts="Enter F2"`. Off by default, so a slider that is not `editable` keeps its browser context menu.
|
|
3
25
|
## 5.28.0
|
|
4
26
|
|
|
5
27
|
Nothing to migrate; the defaults do not change.
|
package/README.md
CHANGED
|
@@ -216,7 +216,7 @@ the class how big.
|
|
|
216
216
|
|
|
217
217
|
### For AI assistants
|
|
218
218
|
|
|
219
|
-
The package ships a skill, `skills/taoui/SKILL.md` with `references/components.md`: the setup, the rules (roles not colours, contexts not props), every component and its props, and the mistakes people make. Point your assistant at it; for Claude Code, copy `node_modules/@1337exp/taoui/skills/taoui` into your project's `.claude/skills/`. The component reference is generated from the showcase prop tables (`npm run skill`), and a test keeps the skill naming every component.
|
|
219
|
+
The package ships a skill, `skills/taoui/SKILL.md` with `references/components.md` and `references/patterns.md`: the setup, the rules (roles not colours, contexts not props), every component and its props, what to use when (the accent budget, a toolbar, a form footer, controls side by side, a destructive action: a do and a don't each), and the mistakes people make. Point your assistant at it; for Claude Code, copy `node_modules/@1337exp/taoui/skills/taoui` into your project's `.claude/skills/`. The component reference is generated from the showcase prop tables (`npm run skill`), and a test keeps the skill naming every component.
|
|
220
220
|
|
|
221
221
|
## Icons
|
|
222
222
|
|
package/README.ru.md
CHANGED
|
@@ -217,7 +217,7 @@ Container живёт на другой оси — ширина: `width="wide" |
|
|
|
217
217
|
|
|
218
218
|
### Для ИИ-ассистентов
|
|
219
219
|
|
|
220
|
-
В пакете есть skill, `skills/taoui/SKILL.md` с `references/components.md`: подключение, правила (роли, а не цвета; контексты, а не пропсы), каждый компонент и его пропсы, типичные ошибки. Покажите его ассистенту; для Claude Code скопируйте `node_modules/@1337exp/taoui/skills/taoui` в `.claude/skills/` проекта. Справочник компонентов генерируется из таблиц пропсов шоукейса (`npm run skill`), а тест следит, чтобы skill называл каждый компонент.
|
|
220
|
+
В пакете есть skill, `skills/taoui/SKILL.md` с `references/components.md` и `references/patterns.md`: подключение, правила (роли, а не цвета; контексты, а не пропсы), каждый компонент и его пропсы, что брать когда (бюджет акцента, панель инструментов, подвал формы, контролы рядом, разрушающее действие: «так» и «не так» для каждого), типичные ошибки. Покажите его ассистенту; для Claude Code скопируйте `node_modules/@1337exp/taoui/skills/taoui` в `.claude/skills/` проекта. Справочник компонентов генерируется из таблиц пропсов шоукейса (`npm run skill`), а тест следит, чтобы skill называл каждый компонент.
|
|
221
221
|
|
|
222
222
|
## Иконки
|
|
223
223
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6303,9 +6303,11 @@ declare interface Props {
|
|
|
6303
6303
|
pressed?: boolean;
|
|
6304
6304
|
/**
|
|
6305
6305
|
* The key that does the same, shown at the end of the button (`N`, `Ctrl+K`) and given as `aria-keyshortcuts`.
|
|
6306
|
+
* On an icon-only button it is not printed (there is no room in the square): it goes to the tooltip, `Bold (Ctrl+B)`.
|
|
6306
6307
|
* It only shows the key: listening to it is the app's job.
|
|
6307
|
-
* Клавиша, которая делает то же, — в конце кнопки (`N`, `Ctrl+K`) и в `aria-keyshortcuts`.
|
|
6308
|
-
*
|
|
6308
|
+
* Клавиша, которая делает то же, — в конце кнопки (`N`, `Ctrl+K`) и в `aria-keyshortcuts`. На кнопке только с иконкой
|
|
6309
|
+
* не печатается (в квадрате нет места): уходит в подсказку, `Жирный (Ctrl+B)`. Только показывает клавишу: слушать
|
|
6310
|
+
* её — дело приложения.
|
|
6309
6311
|
*/
|
|
6310
6312
|
shortcut?: string;
|
|
6311
6313
|
}
|
|
@@ -7376,6 +7378,10 @@ export declare interface TaoLocale {
|
|
|
7376
7378
|
pauseLabel: string;
|
|
7377
7379
|
restartLabel: string;
|
|
7378
7380
|
};
|
|
7381
|
+
/** The field of an `editable` slider. / Поле слайдера с `editable`. */
|
|
7382
|
+
slider: {
|
|
7383
|
+
editLabel: string;
|
|
7384
|
+
};
|
|
7379
7385
|
toast: {
|
|
7380
7386
|
closeLabel: string;
|
|
7381
7387
|
};
|
|
@@ -7877,6 +7883,17 @@ declare interface TaoSliderBaseProps {
|
|
|
7877
7883
|
ariaLabel?: string;
|
|
7878
7884
|
/** Step for the mouse wheel (a single thumb only). 0 — off. / Шаг для колёсика мыши (только одна ручка). 0 — отключено. */
|
|
7879
7885
|
wheel?: number;
|
|
7886
|
+
/**
|
|
7887
|
+
* The value can be typed: a right click or a double click on the bar, or Enter / F2 on a thumb, opens a field over the bar
|
|
7888
|
+
* (for a range, for the nearest or the focused thumb). Enter or leaving the field sets the value, snapped to the step (or
|
|
7889
|
+
* to a mark with `discrete`) and kept in range; Esc drops the edit. Off by default.
|
|
7890
|
+
* Значение можно набрать: правый клик или двойной клик по полосе либо Enter / F2 на ручке открывают поле поверх полосы
|
|
7891
|
+
* (у диапазона для ближайшей или сфокусированной ручки). Enter или уход из поля ставит значение, прижатое к шагу (или к
|
|
7892
|
+
* метке при `discrete`) и в границах; Esc отменяет правку. По умолчанию выключено.
|
|
7893
|
+
*/
|
|
7894
|
+
editable?: boolean;
|
|
7895
|
+
/** Accessible name of the field of `editable` (the locale text by default). / Имя поля у `editable` для скринридеров (по умолчанию текст локали). */
|
|
7896
|
+
editLabel?: string;
|
|
7880
7897
|
}
|
|
7881
7898
|
|
|
7882
7899
|
/** Метка на шкале: значение, подпись (нет подписи: только черта). */
|
|
@@ -8187,10 +8204,10 @@ variant: TaoTextareaVariant;
|
|
|
8187
8204
|
modelValue: string;
|
|
8188
8205
|
align: "start" | "center" | "end";
|
|
8189
8206
|
autocomplete: string;
|
|
8207
|
+
spellcheck: boolean;
|
|
8190
8208
|
rows: number;
|
|
8191
8209
|
maxHeight: number | string;
|
|
8192
8210
|
maxlength: number;
|
|
8193
|
-
spellcheck: boolean;
|
|
8194
8211
|
minlength: number;
|
|
8195
8212
|
readonly: boolean;
|
|
8196
8213
|
noSpace: boolean;
|