@1337exp/taoui 5.26.0 → 5.27.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 +19 -0
- package/README.md +6 -0
- package/README.ru.md +6 -0
- package/dist/index.d.ts +107 -22
- package/dist/index.js +212 -98
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +4 -0
- package/skills/taoui/references/components.md +2 -0
- package/src/styles/base.css +26 -8
- package/src/styles/tokens/primitives.css +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1337exp/taoui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.27.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",
|
package/skills/taoui/SKILL.md
CHANGED
|
@@ -136,6 +136,10 @@ only of straight lines through the middle (a plus), so they stay crisp when smal
|
|
|
136
136
|
`app.use(TaoUI, { locale: localeRu })`; `setTaoLocale(localeEn)` switches at run time without a reload; a prop passed by
|
|
137
137
|
hand (`placeholder`, `closeLabel`…) always wins. For SSR per request, `provideTaoLocale`.
|
|
138
138
|
|
|
139
|
+
Scrollbars: thin (5px) by default; `--tao-scrollbar-size` / `-thumb` / `-track` / `-width` (Firefox) change them on the page or on a block, the class `tao-native-scrollbars` (on `<html>` or a block) gives the browser's own back.
|
|
140
|
+
|
|
141
|
+
Which language to start with: `detectTaoLanguage(['en', 'ru'], { fallback?, requested? })` returns one of your languages by `navigator.languages` (`parseAcceptLanguage(header)` for a server); it only answers, `setTaoLocale` sets. A locale text may be plural forms `{ one, few, many, other }` (`formatTaoText(text, { count }, code)` does it for your own texts); a plain string stays the same for every number.
|
|
142
|
+
|
|
139
143
|
## Mistakes to avoid
|
|
140
144
|
|
|
141
145
|
- Writing hex colours or `rgba()` in app CSS instead of roles; inventing token names (check `styles.css`).
|
|
@@ -539,6 +539,8 @@ Showcase section: `#color`
|
|
|
539
539
|
|---|---|---|---|
|
|
540
540
|
| `v-model` | `string` | — | The colour as a hex string. Required |
|
|
541
541
|
| `alpha / swatches / modes / v-model:mode / eyedropper / size` | `` | | As in TaoColorPicker |
|
|
542
|
+
| `clearable` | `boolean` | false | The colour can be taken away again: a Clear button under the palette and Delete / Backspace on the field; gives "" (the field then says Not set) |
|
|
543
|
+
| `placeholder` | `string` | 'Not set' | What the field says while the value is empty (""): an optional colour that is not set; the swatch is crossed out |
|
|
542
544
|
| `placement` | `TaoPlacement` | 'bottom-start' | Side and alignment: top / bottom / left / right and -start / -end. Flips at the screen edge |
|
|
543
545
|
| `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
|
|
544
546
|
| `disabled` | `boolean` | false | Disabled |
|
package/src/styles/base.css
CHANGED
|
@@ -37,21 +37,39 @@ html {
|
|
|
37
37
|
background-color: var(--tao-color-selection);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
/* Scrollbar
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
/* Scrollbar: thin, the accent for the thumb. Four hooks set on the page, a block or a component, nothing else to override:
|
|
41
|
+
--tao-scrollbar-size (px, 5px), --tao-scrollbar-thumb (the accent), --tao-scrollbar-track (transparent),
|
|
42
|
+
--tao-scrollbar-width (Firefox, which has no pixels: thin | auto | none). The class tao-native-scrollbars on <html>, or on any
|
|
43
|
+
block, gives the browser's own scrollbars back for everything inside it. The colours are read where the scroll is, so a block
|
|
44
|
+
with another theme gets its own accent.
|
|
45
|
+
Полоса прокрутки: тонкая, бегунок акцентный. Четыре крючка на странице, блоке или компоненте, больше ничего переопределять
|
|
46
|
+
не нужно: --tao-scrollbar-size (px, 5px), --tao-scrollbar-thumb (акцент), --tao-scrollbar-track (прозрачная),
|
|
47
|
+
--tao-scrollbar-width (Firefox, у него нет пикселей: thin | auto | none). Класс tao-native-scrollbars на <html> или на любом блоке
|
|
48
|
+
возвращает родные полосы всему внутри. Цвета читаются там, где прокрутка, поэтому блок с другой темой получает свой акцент. */
|
|
49
|
+
:not(.tao-native-scrollbars, .tao-native-scrollbars *)::-webkit-scrollbar {
|
|
50
|
+
width: var(--tao-scrollbar-size, 5px);
|
|
51
|
+
height: var(--tao-scrollbar-size, 5px);
|
|
44
52
|
}
|
|
45
53
|
|
|
46
|
-
::-webkit-scrollbar-track {
|
|
47
|
-
background: transparent;
|
|
54
|
+
:not(.tao-native-scrollbars, .tao-native-scrollbars *)::-webkit-scrollbar-track {
|
|
55
|
+
background: var(--tao-scrollbar-track, transparent);
|
|
48
56
|
}
|
|
49
57
|
|
|
50
|
-
::-webkit-scrollbar-thumb {
|
|
51
|
-
background: var(--tao-color-accent);
|
|
58
|
+
:not(.tao-native-scrollbars, .tao-native-scrollbars *)::-webkit-scrollbar-thumb {
|
|
59
|
+
background: var(--tao-scrollbar-thumb, var(--tao-color-accent));
|
|
52
60
|
border-radius: var(--tao-radius-full);
|
|
53
61
|
}
|
|
54
62
|
|
|
63
|
+
/* Firefox has no ::-webkit-scrollbar: the standard properties, and only there (Chrome 121+ understands them too and would then
|
|
64
|
+
ignore the rules above). / У Firefox нет ::-webkit-scrollbar: стандартные свойства и только там (Chrome 121+ их тоже понимает
|
|
65
|
+
и тогда игнорировал бы правила выше). */
|
|
66
|
+
@supports not selector(::-webkit-scrollbar) {
|
|
67
|
+
:not(.tao-native-scrollbars, .tao-native-scrollbars *) {
|
|
68
|
+
scrollbar-width: var(--tao-scrollbar-width, thin);
|
|
69
|
+
scrollbar-color: var(--tao-scrollbar-thumb, var(--tao-color-accent)) var(--tao-scrollbar-track, transparent);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
55
73
|
/* Links */
|
|
56
74
|
a {
|
|
57
75
|
color: var(--tao-color-link);
|
|
@@ -154,6 +154,16 @@
|
|
|
154
154
|
Список цветов радужной рамки: единственный градиент, который не цвет темы. */
|
|
155
155
|
--tao-gradient-rainbow: #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82;
|
|
156
156
|
|
|
157
|
+
/* ---------- Scrollbars / Полосы прокрутки ----------
|
|
158
|
+
The thin scrollbar of base.css. The size and the Firefox width are set here; the colours are hooks that are not set (they are
|
|
159
|
+
read with a fallback where the scroll is, so a block with another theme gets its own accent):
|
|
160
|
+
--tao-scrollbar-thumb: <colour>; the thumb, the accent by default
|
|
161
|
+
--tao-scrollbar-track: <colour>; the track, transparent by default
|
|
162
|
+
Тонкая полоса из base.css. Размер и ширина для Firefox заданы здесь; цвета — крючки, которые не заданы (читаются с запасным
|
|
163
|
+
значением там, где прокрутка, поэтому блок с другой темой получает свой акцент). */
|
|
164
|
+
--tao-scrollbar-size: 5px;
|
|
165
|
+
--tao-scrollbar-width: thin; /* Firefox has no pixels: thin | auto | none */
|
|
166
|
+
|
|
157
167
|
/* ---------- Layers / Слои ----------
|
|
158
168
|
One scale for everything that floats; components never write a literal z-index above content.
|
|
159
169
|
Одна шкала для всего, что плавает; компоненты не пишут литералы z-index выше контента. */
|