@1337exp/taoui 5.23.2 → 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.23.2",
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`, `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`
@@ -126,7 +126,7 @@ library and feed it `taoChartTheme()` / `watchTaoChartTheme(apply)`; do not buil
126
126
 
127
127
  ## Icons
128
128
 
129
- `<TaoIcon name="tao-check" />`: 40 built-in SVG icons under the `tao-` prefix (incl. `tao-settings`, `tao-edit`, `tao-trash`, `tao-bell`, `tao-tag`, `tao-repeat`, `tao-undo`, `tao-redo`) (`taoIconNames`). Your own:
129
+ `<TaoIcon name="tao-check" />`: 42 built-in SVG icons under the `tao-` prefix (incl. `tao-settings`, `tao-edit`, `tao-trash`, `tao-bell`, `tao-tag`, `tao-repeat`, `tao-undo`, `tao-redo`, `tao-sun`, `tao-moon`) (`taoIconNames`). Your own:
130
130
  `registerTaoIcons({ rocket: { body: '<path d="…"/>' } })` on a 24 grid with `currentColor`; add `grid: true` for icons made
131
131
  only of straight lines through the middle (a plus), so they stay crisp when small. Any other name renders the class
132
132
  `icon-<name>` for an icon font you bring.
@@ -117,6 +117,40 @@ 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
+
139
+ ## TaoThemeToggle
140
+
141
+ Showcase section: `#theme-toggle`
142
+
143
+ | Prop | Type | Default | Notes |
144
+ |---|---|---|---|
145
+ | `v-model` | `'dark' \| 'light'` | page mode | The mode. Without it the button reads the mode of <html> (data-tao-mode) and follows it |
146
+ | `apply` | `boolean` | true | Write the mode to <html>. Turn it off to do it yourself from v-model (save the choice, change a class) |
147
+ | `size` | `'small' \| 'medium' \| 'large'` | from ancestors | Button size |
148
+ | `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'text'` | 'ghost' | Button look |
149
+ | `toLightLabel` | `string` | 'Switch to the light theme' | aria-label while the theme is dark (what a click does) |
150
+ | `toDarkLabel` | `string` | 'Switch to the dark theme' | aria-label while the theme is light |
151
+
152
+ **Slots, events, notes.** icon: your own glyph, { mode, next } (the current mode and the one a click leads to); the button stays a square and keeps its label. update:modelValue and change: the new mode ("dark" \| "light"). The icon is the theme a click leads to (a sun while dark, a moon while light).
153
+
120
154
  ## TaoInput
121
155
 
122
156
  Showcase section: `#input`