@1337exp/taoui 5.16.1 → 5.19.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 +56 -1
- package/MIGRATION-5.md +1 -1
- package/README.md +5 -4
- package/README.ru.md +5 -4
- package/dist/index.d.ts +45 -0
- package/dist/index.js +183 -59
- 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 -3
- package/src/styles/base.css +87 -81
- package/src/styles/index.css +1 -1
- package/src/styles/themes/light.css +7 -6
- package/src/styles/tokens/semantic.css +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1337exp/taoui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.19.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",
|
|
@@ -530,7 +530,7 @@ Showcase section: `#filedrop`
|
|
|
530
530
|
| `list` | `boolean` | true | Names under the zone. Removing a file goes straight to v-model |
|
|
531
531
|
| `showClear` | `boolean` | false | The “clear all” button. It does not clear by itself — it fires clear-request |
|
|
532
532
|
|
|
533
|
-
**Slots, events, notes.** default — the zone text. The change event — files were added or removed. clear-request: the parent decides whether to reset at once or after confirm().
|
|
533
|
+
**Slots, events, notes.** default — the zone text. The change event — files were added or removed. reject — the files that did not pass accept (File[]): they are not in v-model, tell the user why. clear-request: the parent decides whether to reset at once or after confirm().
|
|
534
534
|
|
|
535
535
|
## TaoSparkline
|
|
536
536
|
|
|
@@ -906,11 +906,13 @@ Showcase section: `#drawer`
|
|
|
906
906
|
| `v-model` | `boolean` | — | Open. Required |
|
|
907
907
|
| `title` | `string` | '' | The title |
|
|
908
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 |
|
|
909
|
-
| `closable` | `boolean` | true | Esc, the backdrop, the cross |
|
|
909
|
+
| `closable` | `boolean` | true | The user can close it: Esc, the backdrop, the cross, the pull-down of a sheet. false — only the parent closes it |
|
|
910
|
+
| `showClose` | `boolean` | true | The cross in the header. false hides only the cross: Esc, the backdrop and the pull-down still close it |
|
|
911
|
+
| `swipeToClose` | `boolean` | true | side="bottom" only: the sheet is pulled down by its grip and header; it closes when pulled a third of its height or flung, and comes back otherwise. It does not start from a button or a field in the header, so the content still scrolls. Needs closable |
|
|
910
912
|
| `closeLabel` | `string` | 'Close' | aria-label of the cross |
|
|
911
913
|
| `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 |
|
|
912
914
|
|
|
913
|
-
**Slots, events, notes.** default — the body. #footer — buttons. #close-icon — the cross icon.
|
|
915
|
+
**Slots, events, notes.** default — the body. #footer — buttons or an input line pinned to the bottom. #close-icon — the cross icon. #header="{ close }" — the whole header instead of the title and the cross (a title with a counter, a filter, a cross of your own); name it for a screen reader with aria-label on the panel.
|
|
914
916
|
|
|
915
917
|
## confirm()
|
|
916
918
|
|
package/src/styles/base.css
CHANGED
|
@@ -1,81 +1,87 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tao UI — Global base styles
|
|
3
|
-
*
|
|
4
|
-
* Минимальный reset + глобальные штрихи (скроллбар, ссылки, инпуты).
|
|
5
|
-
* Не содержит хардкод-цветов — всё через семантические токены,
|
|
6
|
-
* поэтому переключение темы работает и здесь.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
*,
|
|
10
|
-
*::before,
|
|
11
|
-
*::after {
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
html,
|
|
16
|
-
body {
|
|
17
|
-
padding: 0;
|
|
18
|
-
margin: 0;
|
|
19
|
-
font-family: var(--tao-font-family);
|
|
20
|
-
background: var(--tao-color-bg);
|
|
21
|
-
color: var(--tao-color-text);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
::-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
a
|
|
57
|
-
color: var(--tao-color-link
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
input[type="number"]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Tao UI — Global base styles
|
|
3
|
+
*
|
|
4
|
+
* Минимальный reset + глобальные штрихи (скроллбар, ссылки, инпуты).
|
|
5
|
+
* Не содержит хардкод-цветов — всё через семантические токены,
|
|
6
|
+
* поэтому переключение темы работает и здесь.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
*,
|
|
10
|
+
*::before,
|
|
11
|
+
*::after {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
html,
|
|
16
|
+
body {
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
font-family: var(--tao-font-family);
|
|
20
|
+
background: var(--tao-color-bg);
|
|
21
|
+
color: var(--tao-color-text);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* inherited: one declaration covers every element; set `--tao-tap-highlight` for another colour
|
|
25
|
+
наследуется: одной строки хватает на все элементы; другой цвет — через `--tao-tap-highlight` */
|
|
26
|
+
html {
|
|
27
|
+
-webkit-tap-highlight-color: var(--tao-tap-highlight);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
::selection {
|
|
31
|
+
color: var(--tao-color-selection-text);
|
|
32
|
+
background-color: var(--tao-color-selection);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
::-moz-selection {
|
|
36
|
+
color: var(--tao-color-selection-text);
|
|
37
|
+
background-color: var(--tao-color-selection);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Scrollbar */
|
|
41
|
+
::-webkit-scrollbar {
|
|
42
|
+
max-width: 5px;
|
|
43
|
+
max-height: 5px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
::-webkit-scrollbar-track {
|
|
47
|
+
background: transparent;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
::-webkit-scrollbar-thumb {
|
|
51
|
+
background: var(--tao-color-accent);
|
|
52
|
+
border-radius: var(--tao-radius-full);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Links */
|
|
56
|
+
a {
|
|
57
|
+
color: var(--tao-color-link);
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
transition: color var(--tao-duration-base) var(--tao-ease-base);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
a:hover {
|
|
63
|
+
color: var(--tao-color-link-hover);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Number input spinners */
|
|
67
|
+
input[type="number"]::-webkit-outer-spin-button,
|
|
68
|
+
input[type="number"]::-webkit-inner-spin-button {
|
|
69
|
+
-webkit-appearance: none;
|
|
70
|
+
margin: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
input[type="number"] {
|
|
74
|
+
-moz-appearance: textfield !important;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.tao-sr-only {
|
|
78
|
+
position: absolute;
|
|
79
|
+
width: 1px;
|
|
80
|
+
height: 1px;
|
|
81
|
+
padding: 0;
|
|
82
|
+
margin: -1px;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
clip: rect(0, 0, 0, 0);
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
border: 0;
|
|
87
|
+
}
|
package/src/styles/index.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Tao UI — styles entry point
|
|
3
3
|
*
|
|
4
4
|
* Layers, in order: primitives -> semantic tokens -> themes (dark is the default, light is opt-in with
|
|
5
|
-
* data-tao-
|
|
5
|
+
* data-tao-mode="light") -> contexts (size and density, tone, surface) -> typography (opt-in classes) -> base reset.
|
|
6
6
|
* Порядок слоёв: примитивы -> семантические токены -> темы (dark по умолчанию, light включается атрибутом) ->
|
|
7
7
|
* контексты (размер и плотность, тон, поверхность) -> типографика (классы по выбору) -> базовый сброс.
|
|
8
8
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ТОЛЬКО цветовые роли из dark.css, ничего в компонентах
|
|
6
6
|
* менять не нужно.
|
|
7
7
|
*
|
|
8
|
-
* Подключение: <html data-tao-
|
|
8
|
+
* Подключение: <html data-tao-mode="light"> (или data-tao-theme="light": старая запись того же режима)
|
|
9
9
|
*/
|
|
10
10
|
[data-tao-theme="light"],
|
|
11
11
|
[data-tao-mode="light"] {
|
|
@@ -98,13 +98,14 @@
|
|
|
98
98
|
светлый акцент уже розовый: последняя серия оранжевая (бирюзовая сливалась с тёмно-зелёным success) */
|
|
99
99
|
--tao-color-chart-6: var(--tao-tangerine-600);
|
|
100
100
|
|
|
101
|
-
/*
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
--tao-color-input-bg: color-mix(in srgb, var(--tao-gray-0) 65%, transparent);
|
|
101
|
+
/* the same role as in the dark theme: a field is the sunken surface, like the segmented track next to it (it was pure white, so a field stood out from its neighbours)
|
|
102
|
+
та же роль, что в тёмной теме: поле — «утопленная» поверхность, как дорожка сегментов рядом (раньше было чисто белым, и поле выбивалось из соседей) */
|
|
103
|
+
--tao-color-input-bg: var(--tao-color-surface-sunken);
|
|
105
104
|
--tao-color-input-text: var(--tao-gray-950);
|
|
106
105
|
--tao-color-input-placeholder: var(--tao-gray-300);
|
|
107
|
-
|
|
106
|
+
/* a translucent tone, as in the dark theme: gray-50 is the field itself now, and a disabled field has to differ
|
|
107
|
+
полупрозрачный тон, как в тёмной теме: gray-50 теперь сам фон поля, а выключенное должно отличаться */
|
|
108
|
+
--tao-color-input-disabled-bg: color-mix(in srgb, var(--tao-gray-400) 12%, transparent);
|
|
108
109
|
--tao-color-input-disabled-text: var(--tao-gray-300);
|
|
109
110
|
|
|
110
111
|
--tao-color-overlay: rgba(0, 0, 0, 0.4);
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
--tao-shadow-panel: var(--tao-shadow-md);
|
|
17
17
|
--tao-shadow-overlay: var(--tao-shadow-xl);
|
|
18
18
|
|
|
19
|
+
/* The flash a phone browser paints over a tapped link or button. Off by default: the system's own blue flash is not
|
|
20
|
+
ours to leave to chance (it differs by shell and fights the theme); the kit gives a tap its own feedback. A colour here
|
|
21
|
+
brings a flash of your own back.
|
|
22
|
+
Вспышка, которую браузер телефона рисует поверх нажатой ссылки или кнопки. По умолчанию выключена: системная синяя
|
|
23
|
+
вспышка зависит от оболочки и спорит с темой; отклик на нажатие даёт кит. Цвет здесь возвращает свою вспышку. */
|
|
24
|
+
--tao-tap-highlight: transparent;
|
|
25
|
+
|
|
19
26
|
/* ---------- Typography / motion passthrough ---------- */
|
|
20
27
|
--tao-font-family: var(--tao-font-family-base);
|
|
21
28
|
/* Colours, shadow, opacity and transform only: `all` would also animate size, padding and the glass backdrop.
|