@1337exp/taoui 5.13.0 → 5.15.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.13.0",
3
+ "version": "5.15.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",
@@ -73,7 +73,8 @@ choose a text colour, WCAG 2 to promise a number.
73
73
  it). `select(id, event)` + `event.preventDefault()` to route with a router. Widths `--tao-nav-rail-width` /
74
74
  `--tao-nav-drawer-width`; the action button may take `shortcut="N"` (shown in the side panel, hidden when round). `surface="glass"` for a
75
75
  translucent bar over the page (as on TaoCard; it turns solid where blur is off). `#footer`: a small line under the
76
- items (version, About) in the rail and the side panel.
76
+ items (version, About) in the rail and the side panel. `badgeTone="neutral"`: grey counters, the accent on the
77
+ current item. `.tao-nav` is the whole layout (navigation + page); style the menu with `surface`, not on the root.
77
78
 
78
79
  ## Forms
79
80
 
@@ -108,7 +109,7 @@ choose a text colour, WCAG 2 to promise a number.
108
109
 
109
110
  ## Data and display
110
111
 
111
- `TaoTable` (columns, sort, row click), `TaoPagination` (`pageInput` for hundreds of pages), `TaoList` / `TaoListItem`,
112
+ `TaoTable` (columns, sort, row click), `TaoPagination` (`pageInput` for hundreds of pages), `TaoList` / `TaoListItem` (`roving`: one Tab stop, arrows between the rows),
112
113
  `TaoTree` (expand, select, tri-state `checkable`, lazy `load`), `TaoStages`, `TaoTimeline` (`active` makes it a progress),
113
114
  `TaoTag`, `TaoAvatar`, `TaoImage`, `TaoCarousel`, `TaoCard` (`#media`, `#title`, `#sub`, `#footer`, `#corner`, `closable`,
114
115
  `stripe` + `stripeTone`), `TaoBlock`, `TaoTabs`, `TaoBreadcrumb`, `TaoLink`, `TaoSpoiler` / `TaoSpoilerGroup`, `TaoCounter`,
@@ -680,6 +680,7 @@ Showcase section: `#list`
680
680
  | `maxHeight` | `number \| string` | — | Scroll. A number is pixels |
681
681
  | `empty` | `boolean` | false | Show #empty instead of rows |
682
682
  | `ariaLabel` | `string` | '' | The list name |
683
+ | `roving` | `boolean` | false | One Tab stop for the whole list: the arrows move between the rows, Home / End to the ends, disabled rows are skipped; Tab comes back to the row it left (the selected one the first time). The stop of a row is its button (clickable) or the row itself |
683
684
 
684
685
  **Slots, events, notes.** default — TaoListItem. #empty — if empty.
685
686
 
@@ -892,6 +893,7 @@ Showcase section: `#modal`
892
893
  | `closable` | `boolean` | true | The cross, Esc, a click on the backdrop |
893
894
  | `closeLabel` | `string` | 'Close' | aria-label of the cross |
894
895
  | `fullscreen` | `boolean \| 'narrow'` | false | true — the whole screen: square corners, the header and the footer stay while the content scrolls, the safe areas kept. narrow — only on a screen narrower than 600px: a dialog on a computer, a page on a phone |
896
+ | `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the panel is made of, as on TaoCard. class, style and the other attributes go to the panel; the content scrolls, the header and #footer stay. --tao-modal-bg is the panel colour for a bar of your own that sticks inside |
895
897
 
896
898
  **Slots, events, notes.** default — the body. #footer — buttons. #close-icon — the cross icon.
897
899
 
@@ -906,6 +908,7 @@ Showcase section: `#drawer`
906
908
  | `side` | `'left' \| 'right' \| 'bottom'` | 'right' | Where it slides in from. bottom is a sheet: as wide as the screen up to 640px, as tall as its content up to 90% of the screen, rounded top, a grip, above the safe area |
907
909
  | `closable` | `boolean` | true | Esc, the backdrop, the cross |
908
910
  | `closeLabel` | `string` | 'Close' | aria-label of the cross |
911
+ | `surface` | `'flat' \| 'grain' \| 'glass'` | 'flat' | What the panel is made of, as on TaoCard. class, style and the other attributes go to the panel; --tao-drawer-bg is its colour |
909
912
 
910
913
  **Slots, events, notes.** default — the body. #footer — buttons. #close-icon — the cross icon.
911
914
 
@@ -955,6 +958,8 @@ Showcase section: `#dropdown`
955
958
  | `placement` | `TaoPlacement` | 'bottom-end' | Where the list opens. Flips at the screen edge |
956
959
  | `menuLabel` | `string` | 'Menu' | aria-label of the button and of the menu |
957
960
  | `closeOnScroll` | `boolean` | false | Close when the page scrolls. Off: the menu follows its button |
961
+ | `size` | `'small' \| 'medium' \| 'large'` | — | The button becomes a square of that control height: a compact kebab for a list row. Without it — the padding round the icon |
962
+ | `tabbable` | `boolean` | true | The button is a Tab stop. Off: it leaves the Tab order (the row has its own menu key) and still opens by a click |
958
963
 
959
964
  **Slots, events, notes.** #icon — the trigger icon, #button — the whole button content, #item="{ item, id, label, icon }" — your own item face. The select event — the item id. shortcut is a ready string to show: the menu neither parses nor listens to it.
960
965
 
@@ -1066,9 +1071,10 @@ Showcase section: `#tao-nav`
1066
1071
  | `moreLabel` | `string` | 'More' | The label of «More» |
1067
1072
  | `indicator` | `'pill' \| 'line'` | 'pill' | How the current section is marked: a tint behind the item, or the accent colour and a short line (under the item in the bar, along its start edge on the side; auto moves it) |
1068
1073
  | `floating` | `boolean` | false | In the bar look, a detached pill above the page: inset from the edges and above the safe area, round, with a shadow; the active item is a pill too. The rail and the side panel do not change. The main action of the screen goes beside it as your own round button, not into the bar |
1074
+ | `badgeTone` | `'accent' \| 'neutral'` | 'accent' | The counters: accent on every item, or neutral — grey, the accent on the current item only. A dot (badge: true) stays the accent |
1069
1075
  | `surface` | `'flat' \| 'glass' \| 'grain'` | 'flat' | What the panel is made of, as on TaoCard: glass lets the page show blurred through the bar as it scrolls under it (solid where blur is not supported or less transparency is asked) |
1070
1076
 
1071
- **Slots, events, notes.** default — the page: TaoNav lays it out next to the navigation (the bar sticks to the bottom, on the side the list sticks to the top; env(safe-area-inset-bottom) is kept). Without the slot it is a standalone panel with a border. #label — your own item label ({ item, active }). #footer — a small line under the items in the rail and the side panel (the version, «About», a link); the bar does not show it. #action — the main action of the screen: a TaoButton with icon and its text in <span class="tao-nav__action-label">; the bar puts it round above itself at the end side (above the pill with floating), the rail round at the top, the side panel extended with the text at the top; in the round looks the text is hidden but stays the name of the button (a shortcut on it too). The side panel gives the button its own corners; --tao-nav-action-radius: var(--tao-radius-full) makes it a pill. --tao-nav-rail-width (80px) and --tao-nav-drawer-width (240px) set the widths. Events: update:modelValue, select(id, event) — event.preventDefault() keeps a link from navigating, to route it yourself.
1077
+ **Slots, events, notes.** default — the page: TaoNav lays it out next to the navigation (the bar sticks to the bottom, on the side the list sticks to the top; env(safe-area-inset-bottom) is kept). Without the slot it is a standalone panel with a border. #label — your own item label ({ item, active }). Structure: .tao-nav is the whole layout (the navigation and the page), .tao-nav__panel the navigation, .tao-nav__content the page; a style for the menu goes on the panel (or use surface), not on the root. #footer — a small line under the items in the rail and the side panel (the version, «About», a link); the bar does not show it. #action — the main action of the screen: a TaoButton with icon and its text in <span class="tao-nav__action-label">; the bar puts it round above itself at the end side (above the pill with floating), the rail round at the top, the side panel extended with the text at the top; in the round looks the text is hidden but stays the name of the button (a shortcut on it too). The side panel gives the button its own corners; --tao-nav-action-radius: var(--tao-radius-full) makes it a pill. --tao-nav-rail-width (80px) and --tao-nav-drawer-width (240px) set the widths. Events: update:modelValue, select(id, event) — event.preventDefault() keeps a link from navigating, to route it yourself.
1072
1078
 
1073
1079
  ## TaoTabs
1074
1080
 
@@ -3,10 +3,11 @@
3
3
  *
4
4
  * How a panel is "made": flat fill (default), grain (film grain), glass (blurred translucent).
5
5
  * Put `.tao-surface-grain` / `-glass` on any element — a game HUD, a landing section, a sidebar —
6
- * or pass `surface` to TaoCard / TaoBlock. Theme tokens below tune the look once for the whole app.
6
+ * or pass `surface` to TaoCard / TaoBlock / TaoModal / TaoDrawer / TaoNav. Theme tokens below tune the look once for
7
+ * the whole app.
7
8
  *
8
9
  * Из чего «сделана» панель: плоская заливка (по умолчанию), grain (плёночное зерно), glass (размытое
9
- * полупрозрачное стекло). Класс `.tao-surface-*` — на любой элемент, или проп `surface` у TaoCard / TaoBlock.
10
+ * полупрозрачное стекло). Класс `.tao-surface-*` — на любой элемент, или проп `surface` у TaoCard / TaoBlock / TaoModal / TaoDrawer / TaoNav.
10
11
  * Токены ниже настраивают вид один раз на всё приложение.
11
12
  */
12
13
 
@@ -159,6 +160,14 @@
159
160
  }
160
161
  }
161
162
 
163
+ /* More contrast asked: the grain goes, the fill stays solid and the text reads on a clean ground.
164
+ Просят больше контраста: зерно уходит, заливка остаётся сплошной, и текст читается на чистом фоне. */
165
+ @media (prefers-contrast: more) {
166
+ .tao-surface-grain {
167
+ --tao-surface-image: none;
168
+ }
169
+ }
170
+
162
171
  @media (prefers-reduced-transparency: reduce) {
163
172
  :root,
164
173
  [data-tao-theme],