@1337exp/taoui 5.24.0 → 5.25.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1337exp/taoui",
3
- "version": "5.24.0",
3
+ "version": "5.25.0",
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",
@@ -116,7 +116,7 @@ choose a text colour, WCAG 2 to promise a number.
116
116
  `TaoTree` (expand, select, tri-state `checkable`, lazy `load`), `TaoStages`, `TaoTimeline` (`active` makes it a progress),
117
117
  `TaoTag`, `TaoAvatar`, `TaoImage`, `TaoCarousel`, `TaoCard` (`#media`, `#title`, `#sub`, `#footer`, `#corner`, `closable`,
118
118
  `stripe` + `stripeTone`), `TaoBlock`, `TaoTabs`, `TaoBreadcrumb`, `TaoLink`, `TaoSpoiler` / `TaoSpoilerGroup`, `TaoCounter`,
119
- `TaoCopy`, `TaoThemeToggle` (the light / dark switch as an icon button: flips `data-tao-mode` of `<html>`, or `v-model` with `:apply="false"`; `#icon="{ mode, next }"` for your own glyph), `TaoMarquee` (one line that runs round only when it does not fit), `TaoScrubber` (play / pause + time),
119
+ `TaoCopy`, `TaoTour` (a guided tour: `:step` / `:index` / `:count`, events `next` / `prev` / `skip`; it only draws, the state is yours or TaoUX `useTour`; a step is `{ id, target?, title?, text?, placement? }`), `TaoThemeToggle` (the light / dark switch as an icon button: flips `data-tao-mode` of `<html>`, or `v-model` with `:apply="false"`; `#icon="{ mode, next }"` for your own glyph), `TaoMarquee` (one line that runs round only when it does not fit), `TaoScrubber` (play / pause + time),
120
120
  `TaoScrollTop`, `TaoAnimatedBorder`, `TaoIcon`.
121
121
 
122
122
  Small charts only: `TaoSparkline` (a trend), `TaoMeter` (a value in a range, `low` / `high` / `optimum`), `TaoDonut`
@@ -117,6 +117,25 @@ Showcase section: `#copy`
117
117
  | `copyLabel` | `string` | 'Copy' | aria-label of the button |
118
118
  | `tip` | `boolean` | true | Show a tooltip above the button after copying |
119
119
 
120
+ ## TaoTour
121
+
122
+ Showcase section: `#tour`
123
+
124
+ | Prop | Type | Default | Notes |
125
+ |---|---|---|---|
126
+ | `step` | `TaoTourStep \| null` | null | The step on screen; null closes the tour. A step: { id, target?, title?, text?, placement? }. target is a CSS selector, an element or a function that finds it; without it (or when nothing is found) the step is a card in the middle |
127
+ | `index` | `number` | 0 | The place of the step in the tour, from 0 (for the dots and "Step 2 of 5"). With TaoUX it is position, which does not count the steps that are jumped over |
128
+ | `count` | `number` | 0 | How many steps there are; at 1 or less there are no dots and no counter. With TaoUX it is total |
129
+ | `first` | `boolean` | index === 0 | No Back button |
130
+ | `last` | `boolean` | index === count - 1 | The button says Done instead of Next, and there is no Skip |
131
+ | `placement` | `TaoPlacement` | 'bottom' | Where the card stands against the target when the step does not say. It flips when it does not fit |
132
+ | `padding` | `number` | 6 | Space between the target and the edge of the lit window, px |
133
+ | `interactive` | `boolean` | false | The target can be pressed (a "press here" step); the rest of the page stays shut |
134
+ | `nextLabel / prevLabel / skipLabel / doneLabel` | `string` | from the locale | Button texts |
135
+ | `progressLabel` | `string` | 'Step {n} of {count}' | The progress text |
136
+
137
+ **Slots, events, notes.** default { step, index, count }: your own card content (instead of the title and the text). Events: next, prev, skip (the buttons, the arrows, Esc). TaoTour only draws: you keep the state, or use useTour from TaoUX (@1337exp/taoux/tour), which jumps over steps with no target and remembers that the tour was seen. The step scrolls its target into view by itself.
138
+
120
139
  ## TaoThemeToggle
121
140
 
122
141
  Showcase section: `#theme-toggle`