@1337exp/taoui 5.14.0 → 5.16.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.14.0",
3
+ "version": "5.16.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
 
@@ -893,6 +893,7 @@ Showcase section: `#modal`
893
893
  | `closable` | `boolean` | true | The cross, Esc, a click on the backdrop |
894
894
  | `closeLabel` | `string` | 'Close' | aria-label of the cross |
895
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 |
896
897
 
897
898
  **Slots, events, notes.** default — the body. #footer — buttons. #close-icon — the cross icon.
898
899
 
@@ -907,6 +908,7 @@ Showcase section: `#drawer`
907
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 |
908
909
  | `closable` | `boolean` | true | Esc, the backdrop, the cross |
909
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 |
910
912
 
911
913
  **Slots, events, notes.** default — the body. #footer — buttons. #close-icon — the cross icon.
912
914
 
@@ -956,6 +958,8 @@ Showcase section: `#dropdown`
956
958
  | `placement` | `TaoPlacement` | 'bottom-end' | Where the list opens. Flips at the screen edge |
957
959
  | `menuLabel` | `string` | 'Menu' | aria-label of the button and of the menu |
958
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 |
959
963
 
960
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.
961
965
 
@@ -1067,9 +1071,10 @@ Showcase section: `#tao-nav`
1067
1071
  | `moreLabel` | `string` | 'More' | The label of «More» |
1068
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) |
1069
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 |
1070
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) |
1071
1076
 
1072
- **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.
1073
1078
 
1074
1079
  ## TaoTabs
1075
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],