@1337exp/taoui 5.23.2 → 5.24.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 +6 -0
- package/README.md +4 -3
- package/README.ru.md +4 -3
- package/dist/index.d.ts +543 -432
- package/dist/index.js +148 -42
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +2 -2
- package/skills/taoui/references/components.md +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1337exp/taoui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.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",
|
package/skills/taoui/SKILL.md
CHANGED
|
@@ -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`, `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" />`:
|
|
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,21 @@ 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
|
+
## TaoThemeToggle
|
|
121
|
+
|
|
122
|
+
Showcase section: `#theme-toggle`
|
|
123
|
+
|
|
124
|
+
| Prop | Type | Default | Notes |
|
|
125
|
+
|---|---|---|---|
|
|
126
|
+
| `v-model` | `'dark' \| 'light'` | page mode | The mode. Without it the button reads the mode of <html> (data-tao-mode) and follows it |
|
|
127
|
+
| `apply` | `boolean` | true | Write the mode to <html>. Turn it off to do it yourself from v-model (save the choice, change a class) |
|
|
128
|
+
| `size` | `'small' \| 'medium' \| 'large'` | from ancestors | Button size |
|
|
129
|
+
| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'text'` | 'ghost' | Button look |
|
|
130
|
+
| `toLightLabel` | `string` | 'Switch to the light theme' | aria-label while the theme is dark (what a click does) |
|
|
131
|
+
| `toDarkLabel` | `string` | 'Switch to the dark theme' | aria-label while the theme is light |
|
|
132
|
+
|
|
133
|
+
**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).
|
|
134
|
+
|
|
120
135
|
## TaoInput
|
|
121
136
|
|
|
122
137
|
Showcase section: `#input`
|