@1337exp/taoui 5.32.2 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1337exp/taoui",
3
- "version": "5.32.2",
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",
@@ -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`
@@ -821,9 +854,10 @@ Showcase section: `#carousel`
821
854
  |---|---|---|---|
822
855
  | `v-model` | `number` | 0 | The index of the current snap |
823
856
  | `perView` | `number` | 1 | How many slides are in the frame. 5 — a product strip |
824
- | `peek` | `number` | 0 | How many px of the next card are visible on the right |
857
+ | `peek` | `number` | 0 | How many px of the next card are visible on the right (with centered: on both sides) |
858
+ | `centered` | `boolean` | false | The current slide in the middle and the biggest, the ones beside it shrink, the outer ones fade and are cut by the edge. perView is how many whole slides are in the frame, a step and the arrows go by one slide, the arrows lie on the edges of the strip. Restyle with --tao-carousel-scale-step (0.09), --tao-carousel-fade (0.55) and --tao-carousel-ring (the ring around an arrow, the page background by default) |
825
859
  | `autoplay` | `number` | 0 | Time per slide in ms. 0 — off. The current indicator fills over this time and the slide changes when it is full (the clock is a CSS animation). Pauses on hover / keyboard focus / touch and drag / a hidden tab; off with prefers-reduced-motion |
826
- | `loop` | `boolean` | false | Loop round in a circle |
860
+ | `loop` | `boolean` | false | Loop round in a circle. With centered: a seamless cycle with no end, the empty places at the ends are taken by the slides from the other end, the slides are drawn 3 times (the extra copies are inert and aria-hidden, a slide needs no id or ref); whenever the strip stops in a copy it goes back to the real set unseen |
827
861
  | `indicator` | `'dots' \| 'bars' \| 'progress'` | — | Marks under the strip: dots (the current one stretches into a pill) / equal bars / one bar (the fill of the slide, the position without autoplay) |
828
862
  | `pausable` | `boolean` | true | With autoplay: a button that stops and resumes it (autoplay that moves for more than 5 seconds must be stoppable) |
829
863
  | `pauseLabel / playLabel` | `string` | 'Pause autoplay' / 'Start autoplay' | aria-label of the button |
@@ -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;