@1337exp/taoui 5.34.1 → 5.37.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/README.md +2 -0
- package/README.ru.md +2 -0
- package/dist/index.d.ts +445 -222
- package/dist/index.js +1041 -618
- 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 +33 -0
- package/src/styles/typography.css +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1337exp/taoui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.37.2",
|
|
4
4
|
"description": "Design-token driven Vue 3 / Nuxt component library: palettes with tested contrast, accessible menus and toolbars, navigation that adapts without JS, small charts, built-in locales.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
package/skills/taoui/SKILL.md
CHANGED
|
@@ -100,7 +100,7 @@ choose a text colour, WCAG 2 to promise a number.
|
|
|
100
100
|
|
|
101
101
|
## Overlays and feedback
|
|
102
102
|
|
|
103
|
-
- `TaoModal` (`fullscreen`, `fullscreen="narrow"` for a page on a phone), `TaoDrawer` (`side="bottom"` is the phone's
|
|
103
|
+
- `TaoCommandList` (the field and the list of the palette with no window, for a page, a panel or a `TaoPopover`; `@select` closes nothing), `TaoCommandPalette` (a dialog, `modal="false"` for a panel with no dimming, the whole screen on a phone by default, that searches `items` `{ id, label, group?, shortcut?, keywords?, disabled? }`, `Ctrl+K` style: you open it from your own key with `v-model`, `@select` runs the pick; the search alone is `matchCommands`), `TaoModal` (`fullscreen`, `fullscreen="narrow"` for a page on a phone), `TaoDrawer` (`side="bottom"` is the phone's
|
|
104
104
|
bottom sheet) — v-model; Escape closes the top layer only. `TaoPopover`, `TaoTooltip` (`placement`).
|
|
105
105
|
- Menus share one engine: `TaoDropdownMenu`, `TaoMenubar`, `TaoContextMenu`, `TaoMenu` (the panel for your own shell).
|
|
106
106
|
Items are a data tree `TaoMenuItem[]`: `{ id, label, icon?, shortcut?, disabled?, items? }`,
|
|
@@ -379,6 +379,39 @@ Showcase section: `#combobox`
|
|
|
379
379
|
|
|
380
380
|
**Slots, events, notes.** create — an event when a new value is typed: the parent extends options itself.
|
|
381
381
|
|
|
382
|
+
## TaoCommandList
|
|
383
|
+
|
|
384
|
+
Showcase section: `#command-palette`
|
|
385
|
+
|
|
386
|
+
| Prop | Type | Default | Notes |
|
|
387
|
+
|---|---|---|---|
|
|
388
|
+
| `items` | `{ id, label, group?, shortcut?, icon?, description?, keywords?, disabled? }[]` | [] | The commands. The list only searches and shows them; running one is @select |
|
|
389
|
+
| `placeholder` | `string` | 'Type a command…' | The hint in the empty field |
|
|
390
|
+
| `emptyText` | `string` | 'No commands found' | The text when nothing fits |
|
|
391
|
+
| `label` | `string` | 'Commands' | The name of the field and the list for a screen reader |
|
|
392
|
+
| `limit` | `number` | 50 | The most rows shown |
|
|
393
|
+
| `autofocus` | `boolean` | false | Put the focus in the field when the list appears |
|
|
394
|
+
|
|
395
|
+
**Slots, events, notes.** #item="{ item, active, ranges }" — your own row (ranges are the stretches of the label the query found). #empty — nothing found. select(item) — a command was picked (Enter or a click), the list closes nothing; escape — Escape was pressed in the field. Methods: focus(), reset() (clears the query). The field and the list with no window: lay it in a page, a panel or a TaoPopover, its parent gives it a height (the list scrolls itself); class and style go to the root. TaoCommandPalette is this inside a dialog. The search and the keys are the palette's (below).
|
|
396
|
+
|
|
397
|
+
## TaoCommandPalette
|
|
398
|
+
|
|
399
|
+
Showcase section: `#command-palette`
|
|
400
|
+
|
|
401
|
+
| Prop | Type | Default | Notes |
|
|
402
|
+
|---|---|---|---|
|
|
403
|
+
| `v-model` | `boolean` | false | Open or closed. The palette listens to no key itself: open it from yours |
|
|
404
|
+
| `items` | `{ id, label, group?, shortcut?, icon?, description?, keywords?, disabled? }[]` | [] | The commands. The palette only searches and shows them; running one is @select. group gives captions while the query is empty; shortcut is the text of the shortcut; keywords are words that find it though they are not shown; disabled is shown but cannot be picked |
|
|
405
|
+
| `placeholder` | `string` | 'Type a command…' | The hint in the empty field |
|
|
406
|
+
| `emptyText` | `string` | 'No commands found' | The text when nothing fits |
|
|
407
|
+
| `label` | `string` | 'Commands' | The name of the dialog and the list for a screen reader |
|
|
408
|
+
| `limit` | `number` | 50 | The most rows shown |
|
|
409
|
+
| `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the panel is made of, as on TaoModal |
|
|
410
|
+
| `modal` | `boolean` | true | true — a modal dialog: the page is dimmed and locked, a press on the dimmed part closes it. false — a panel over a living page, as in VS Code: no dimming, no scroll lock, a press outside the panel closes it |
|
|
411
|
+
| `fullscreen` | `boolean \| 'narrow'` | 'narrow' | As on TaoModal: true — the whole screen, 'narrow' — the whole screen only below 600px (a phone), false — never |
|
|
412
|
+
|
|
413
|
+
**Slots, events, notes.** #item="{ item, active, ranges }" — your own row (ranges are the stretches of the label the query found). #empty — nothing found. select(item) — a command was picked (Enter or a click), the palette closes after it; update:modelValue and close — closing. class, style and the other attributes go to the dialog panel. Every word of the query must fit: the start of the label scores higher, then the start of a word, then any place, then the letters in order; the group, the description and keywords find a command too. Keys: ↑ ↓ (a disabled row is skipped, the ends join), Home End, Enter, Esc; the focus never leaves the field. The search is exported as matchCommands(items, query, limit).
|
|
414
|
+
|
|
382
415
|
## TaoPresetInput
|
|
383
416
|
|
|
384
417
|
Showcase section: `#preset-input`
|
|
@@ -157,6 +157,8 @@
|
|
|
157
157
|
.tao-prose :where(pre) {
|
|
158
158
|
padding: var(--tao-space-3) var(--tao-space-4);
|
|
159
159
|
overflow-x: auto;
|
|
160
|
+
/* sideways at the end does not turn into the back gesture of the browser / боковая прокрутка в конце не превращается в жест «назад» */
|
|
161
|
+
overscroll-behavior-x: contain;
|
|
160
162
|
border-radius: var(--tao-radius-panel);
|
|
161
163
|
background: var(--tao-color-surface-sunken);
|
|
162
164
|
line-height: 1.5;
|