@1337exp/taoui 5.6.2 → 5.8.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/CHANGELOG.md +33 -0
- package/README.md +12 -2
- package/README.ru.md +12 -2
- package/dist/index.d.ts +63 -3
- package/dist/index.js +164 -76
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/references/components.md +5 -0
- package/src/styles/contexts/tone.css +1 -1
- package/src/styles/date-popup.css +3 -3
- package/src/styles/themes/dark.css +10 -0
- package/src/styles/themes/light.css +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1337exp/taoui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.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",
|
|
@@ -607,6 +607,7 @@ Showcase section: `#pagination`
|
|
|
607
607
|
| `pageSize` | `number` | 10 | Records per page |
|
|
608
608
|
| `jump` | `number` | 5 | A click on “…” jumps this many pages. 0 — “…” is decorative |
|
|
609
609
|
| `pageInput` | `boolean \| number` | false | A field to type a page in: true — always, a number — from this many pages on. Enter or leaving the field goes there (clamped to the range), Esc drops it |
|
|
610
|
+
| `pageSizes` | `number[]` | — | The page sizes to choose from: «Per page» next to the total, v-model:page-size. On a change the page moves so the first row on screen stays on screen |
|
|
610
611
|
| `siblingCount` | `number` | 1 | How many numbers around the current one |
|
|
611
612
|
| `showTotal` | `boolean` | true | The “1–10 of N” caption |
|
|
612
613
|
| `size` | `'small' \| 'medium' \| 'large'` | inherited | Buttons 26 / 36 / 44, like TaoButton. Without it — the size of the ancestors |
|
|
@@ -1037,6 +1038,7 @@ Showcase section: `#tao-nav`
|
|
|
1037
1038
|
| `maxBarItems` | `number` | 5 | How many fit the bar. With more items maxBarItems − 1 stay, the rest go into «More» with a menu |
|
|
1038
1039
|
| `ariaLabel` | `string` | 'Navigation' | Accessible name of the navigation |
|
|
1039
1040
|
| `moreLabel` | `string` | 'More' | The label of «More» |
|
|
1041
|
+
| `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) |
|
|
1040
1042
|
| `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 |
|
|
1041
1043
|
|
|
1042
1044
|
**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 }). #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. Events: update:modelValue, select(id, event) — event.preventDefault() keeps a link from navigating, to route it yourself.
|
|
@@ -1108,6 +1110,9 @@ Showcase section: `#toast`
|
|
|
1108
1110
|
| `.short() / .timeout(ms)` | `() => builder` | | 1 s or your own time |
|
|
1109
1111
|
| `.byBottomRight() / …` | `() => builder` | | The corner: top/bottom + left/right/center |
|
|
1110
1112
|
| `.action(label, fn)` | `(string, fn) => builder` | | A button in the toast |
|
|
1113
|
+
| `.loading()` | `() => builder` | | Work in progress: a spinner, no timeout, aria-busy. Finish it with a toast of the same id and replace(): it takes its place |
|
|
1114
|
+
| `toast.promise(p, texts)` | `(Promise, { loading, success, error }) => Promise` | | Loading while the promise runs, then success or error in the same place; success / error can be functions of the result / the error |
|
|
1115
|
+
| `.id(x).replace()` | `() => builder` | | Replaces the toast with that id where it stands, and restarts its time |
|
|
1111
1116
|
| `toast.defaults` | `(partial) => toast` | | Position, timeout, closeLabel for the whole app |
|
|
1112
1117
|
|
|
1113
1118
|
## TaoAlert
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
Нейтральный: тихое действие рядом с главным. Сильный текст, цвет темы — только у подложки при наведении. */
|
|
70
70
|
.tao-tone-neutral {
|
|
71
71
|
--tao-tone: var(--tao-color-text-muted);
|
|
72
|
-
--tao-tone-hover: var(--tao-color-
|
|
72
|
+
--tao-tone-hover: var(--tao-color-neutral-hover);
|
|
73
73
|
/* white on the mid grey in both themes (5.7:1); the page colour was dark on dark in the dark theme (3.4:1)
|
|
74
74
|
белое на среднем сером в обеих темах; цвет страницы в тёмной теме давал тёмное на тёмном */
|
|
75
75
|
--tao-tone-on: var(--tao-color-on-neutral);
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.tao-date__nav:hover {
|
|
57
|
-
background: var(--tao-color-
|
|
57
|
+
background: var(--tao-color-hover);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.tao-date__nav:focus-visible {
|
|
@@ -134,11 +134,11 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.tao-date__day--cursor:not(.tao-date__day--selected):not(.tao-date__day--in-range) {
|
|
137
|
-
background: var(--tao-color-
|
|
137
|
+
background: var(--tao-color-hover);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.tao-date__day:hover:not(:disabled):not(.tao-date__day--selected):not(.tao-date__day--in-range) {
|
|
141
|
-
background: var(--tao-color-
|
|
141
|
+
background: var(--tao-color-hover);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.tao-date__day:disabled {
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
--tao-color-surface-raised: var(--tao-gray-800);
|
|
38
38
|
--tao-color-surface-sunken: color-mix(in srgb, var(--tao-gray-600) 20%, transparent);
|
|
39
39
|
--tao-color-surface-hover: var(--tao-gray-700);
|
|
40
|
+
/* the wash behind a row or a control under the pointer: see-through, so it shows on any fill, grain and glass
|
|
41
|
+
included (gray-700 on gray-800 was 1.09:1, nearly invisible); surface-hover stays the solid colour
|
|
42
|
+
подложка строки или контрола под указателем: полупрозрачная, поэтому видна на любой заливке, на зерне и стекле
|
|
43
|
+
тоже (gray-700 на gray-800 было 1.09:1, почти не видно); surface-hover остаётся сплошным цветом */
|
|
44
|
+
--tao-color-hover: color-mix(in srgb, var(--tao-color-text-strong) 8%, transparent);
|
|
40
45
|
|
|
41
46
|
/* ---------- Borders ---------- */
|
|
42
47
|
--tao-color-border: color-mix(in srgb, var(--tao-gray-600) 40%, transparent);
|
|
@@ -65,6 +70,11 @@
|
|
|
65
70
|
--tao-color-on-info: var(--tao-gray-950);
|
|
66
71
|
/* the neutral fill is the muted text grey: a white label on it / нейтральная заливка — серый muted, подпись белая */
|
|
67
72
|
--tao-color-on-neutral: var(--tao-gray-0);
|
|
73
|
+
/* under the pointer the neutral fill steps darker, as the other dark fills do: it went to the near-white text
|
|
74
|
+
colour and the white label was lost on it
|
|
75
|
+
под указателем нейтральная заливка темнеет, как остальные тёмные заливки: она становилась почти белым цветом
|
|
76
|
+
текста, и белая подпись на ней терялась */
|
|
77
|
+
--tao-color-neutral-hover: color-mix(in srgb, var(--tao-color-text-muted) 78%, var(--tao-color-bg));
|
|
68
78
|
/* light fills with a dark label, as the amber accent: bright enough to read as a button on a dark page
|
|
69
79
|
светлые заливки с тёмной подписью, как у янтарного акцента: достаточно яркие, чтобы читаться кнопкой на тёмной странице */
|
|
70
80
|
--tao-color-success: var(--tao-green-400);
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
--tao-color-surface-raised: var(--tao-gray-50);
|
|
34
34
|
--tao-color-surface-sunken: var(--tao-gray-50);
|
|
35
35
|
--tao-color-surface-hover: var(--tao-gray-100);
|
|
36
|
+
/* see dark.css / см. dark.css */
|
|
37
|
+
--tao-color-hover: color-mix(in srgb, var(--tao-color-text-strong) 9%, transparent);
|
|
36
38
|
|
|
37
39
|
--tao-color-border: var(--tao-gray-100);
|
|
38
40
|
--tao-color-border-strong: var(--tao-gray-200);
|
|
@@ -58,6 +60,9 @@
|
|
|
58
60
|
--tao-color-on-warning: #ffffff;
|
|
59
61
|
--tao-color-on-info: #ffffff;
|
|
60
62
|
--tao-color-on-neutral: #ffffff;
|
|
63
|
+
/* a light page: a step darker under the pointer, as the other light fills do (it was the near-black text, a jump)
|
|
64
|
+
светлая страница: под указателем на шаг темнее, как остальные светлые заливки (был почти чёрный текст, скачок) */
|
|
65
|
+
--tao-color-neutral-hover: color-mix(in srgb, var(--tao-color-text-muted) 78%, var(--tao-color-text-strong));
|
|
61
66
|
--tao-color-success: var(--tao-green-700);
|
|
62
67
|
--tao-color-success-hover: color-mix(in srgb, var(--tao-green-700) 85%, #000000);
|
|
63
68
|
--tao-color-success-subtle: color-mix(in srgb, var(--tao-color-success) 10%, transparent);
|