@1337exp/taoui 5.51.0 → 5.52.1

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.51.0",
3
+ "version": "5.52.1",
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",
@@ -123,10 +123,10 @@ choose a text colour, WCAG 2 to promise a number.
123
123
 
124
124
  ## Data and display
125
125
 
126
- `TaoTable` (columns, sort, row click), `TaoPagination` (`pageInput` for hundreds of pages), `TaoList` / `TaoListItem` (`roving`: one Tab stop, arrows between the rows),
126
+ `TaoTable` (columns, sort, row click, also from the keyboard; `stack` = cards under 600px, `minWidth` = sideways scroll; generic: the row type comes from `rows`, an interface or a `readonly` array will do), `TaoPagination` (`pageInput` for hundreds of pages), `TaoList` / `TaoListItem` (`roving`: one Tab stop, arrows between the rows),
127
127
  `TaoTree` (expand, select, tri-state `checkable`, lazy `load`, a row context `menu`, `hint` / `tone` on a node, rows moved by drag and Ctrl+X / Ctrl+V through `@move` + `moveTreeNodes`), `TaoStages`, `TaoTimeline` (`active` makes it a progress),
128
128
  `TaoTag`, `TaoAvatar`, `TaoImage`, `TaoCarousel`, `TaoCard` (`#media`, `#title`, `#sub`, `#footer`, `#corner`, `closable`,
129
- `stripe` + `stripeTone`), `TaoBlock`, `TaoTabs`, `TaoBreadcrumb`, `TaoLink`, `TaoStretchedLink` (a whole card or row as one link, the buttons inside still work: `tao-stretched` on the container, `tao-stretched-raise` on a control that must click by itself; never `filter` / `transform` on the link), `TaoSpoiler` / `TaoSpoilerGroup`, `TaoCounter`,
129
+ `stripe` + `stripeTone`), `TaoBlock`, `TaoTabs`, `TaoBreadcrumb`, `TaoLink` (underlined by default, `underline="hover"` or `"none"` for a link that is clear from its place), `TaoStretchedLink` (a whole card or row as one link, the buttons inside still work: `tao-stretched` on the container, `tao-stretched-raise` on a control that must click by itself; never `filter` / `transform` on the link), `TaoSpoiler` / `TaoSpoilerGroup`, `TaoCounter`,
130
130
  `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"`; `system` adds a third state, «follow the OS» (click: system → light → dark; `v-model` then holds `'system'` too, resolve it with `resolveTaoMode()`); `#icon="{ mode, choice, next }"` for your own glyph), `TaoLanguageSwitch` (the language of the interface: a globe that opens a list of `:languages="['ru', 'en']"`, each under its own name from `Intl.DisplayNames` (`taoLanguageName(code)`); `v-model` is the code; it writes `<html lang>` unless `:apply="false"`; `icon-only` for a phone; the texts, the storage and `setTaoLocale` are the app's; not flags, not `RU | EN` in a `TaoSegmented`), `TaoMarquee` (one line that runs round only when it does not fit), `TaoScrubber` (play / pause + time),
131
131
  `TaoScrollTop`, `TaoAnimatedBorder`, `TaoIcon`.
132
132
 
@@ -740,8 +740,8 @@ Showcase section: `#table`
740
740
 
741
741
  | Prop | Type | Default | Notes |
742
742
  |---|---|---|---|
743
- | `columns` | `TaoTableColumn[]` | — | Required. { key, label, sortable?, align?, width? } |
744
- | `rows` | `object[]` | [] | The data |
743
+ | `columns` | `TaoTableColumn<T>[]` | — | Required. { key, label, sortable?, align?, width?, minWidth?, nowrap?, value?(row) }. A list shared by tables of any rows: TaoTableColumn[] without T |
744
+ | `rows` | `T[]` | [] | The data. The table is generic: T comes from here (an interface, a class, a readonly array), and the row in the slots and in row-click is a T |
745
745
  | `v-model:sort` | `{ key, dir } \| null` | null | Sorting. dir: asc \| desc |
746
746
  | `loading` | `boolean` | false | The loading overlay |
747
747
  | `emptyText` | `string` | 'No data' | If rows is empty and not loading |
@@ -754,8 +754,11 @@ Showcase section: `#table`
754
754
  | `sticky` | `boolean` | false | A sticky header (needs maxHeight) |
755
755
  | `rowKey` | `string \| fn` | 'id' | The row key |
756
756
  | `maxHeight` | `number \| string` | — | Scroll. A number is px |
757
+ | `minWidth` | `number \| string` | — | The table is never narrower than this (a number is px): in a narrower place it scrolls sideways instead of squeezing the columns into thin stacks. Not under stack cards |
758
+ | `clickable` | `boolean` | false | The rows can be clicked: a pointer cursor and the row-click event. From the keyboard the table is one Tab stop: the arrows and Home / End walk the rows, Enter and Space do what a click does (a key inside a button or a field of the row stays with it). The focus of a row is a tint of the accent and a 2px bar at its start (not a ring: the rounded frame of the table would cut its corners) |
759
+ | `stack` | `boolean` | false | Under 600px (the width of the table itself, not of the window) a row turns into a card: each cell under its column label. A container query, no JavaScript. The header stays for a screen reader |
757
760
 
758
- **Slots, events, notes.** Cell: #cell-{key}="{ row, value }". Events: change — the sorting changed, row-click, if clickable.
761
+ **Slots, events, notes.** Cell: #cell-{key}="{ row, value }" (row is a T, value is unknown). Events: change — the sorting changed, row-click, if clickable.
759
762
 
760
763
  ## TaoPagination
761
764
 
@@ -1278,8 +1281,9 @@ Showcase section: `#link`
1278
1281
  | `newTab` | `boolean` | false | target=_blank + rel=noopener |
1279
1282
  | `private` | `boolean` | false | rel=noopener noreferrer |
1280
1283
  | `exactPath` | `boolean` | false | An exact path match for active (vue-router) |
1284
+ | `underline` | `'always' \| 'hover' \| 'none'` | 'always' | Underline. always: in a line of text a link does not rest on colour alone (in the light theme it is the text colour). hover: the line only under the pointer and the focus, for a link that is clear from its place (a menu, a card title). none: no line |
1281
1285
 
1282
- **Slots, events, notes.** default — the link text.
1286
+ **Slots, events, notes.** default — the link text. Class tao-link (and tao-link--hover / tao-link--none).
1283
1287
 
1284
1288
  ## TaoStretchedLink
1285
1289
 
@@ -1291,6 +1295,7 @@ Showcase section: `#stretched-link`
1291
1295
  | `newTab` | `boolean` | false | target=_blank + rel=noopener |
1292
1296
  | `private` | `boolean` | false | rel=noopener noreferrer |
1293
1297
  | `exactPath` | `boolean` | false | An exact path match for active (vue-router) |
1298
+ | `underline` | `'always' \| 'hover' \| 'none'` | 'none' | As in TaoLink; the card is the sign of a link here, so no line by default |
1294
1299
 
1295
1300
  **Slots, events, notes.** default — the link text. Classes: tao-stretched on the container (position: relative), tao-stretched-raise on the controls that must stay clickable by themselves; --tao-stretched-radius is the corner of the focus ring. Never give the link filter, transform, perspective, will-change: transform or contain (on :hover too): the cursor flickers.
1296
1301
 
@@ -85,6 +85,29 @@ a:where(:hover) {
85
85
  color: var(--tao-color-link-hover);
86
86
  }
87
87
 
88
+ /* `TaoLink`: underlined unless it says otherwise. In the light theme the link colour is the text colour (1.4:1), so in a line of
89
+ text the underline is the only sign of a link (WCAG 1.4.1). Not under `a:where(…)` on purpose: a class on the link (0,1,0) of
90
+ your own, written later, still wins. `hover` shows the line under the pointer and the focus, `none` never.
91
+ `TaoLink`: подчёркнут, пока не сказано иное. В светлой теме цвет ссылки равен цвету текста (1.4:1), и в строке текста
92
+ подчёркивание — единственный признак ссылки (WCAG 1.4.1). Класс ссылки (0,1,0), написанный позже, перебивает это правило.
93
+ `hover` рисует линию под курсором и фокусом, `none` не рисует. */
94
+ .tao-link {
95
+ text-decoration: underline;
96
+ text-decoration-thickness: 1px;
97
+ text-underline-offset: 0.18em;
98
+ }
99
+
100
+ .tao-link--hover,
101
+ .tao-link--none {
102
+ text-decoration: none;
103
+ }
104
+
105
+ .tao-link--hover:where(:hover, :focus-visible) {
106
+ text-decoration: underline;
107
+ text-decoration-thickness: 1px;
108
+ text-underline-offset: 0.18em;
109
+ }
110
+
88
111
  /* Number input spinners */
89
112
  input[type="number"]::-webkit-outer-spin-button,
90
113
  input[type="number"]::-webkit-inner-spin-button {