@1337exp/taoui 1.13.0 → 2.0.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,61 +1,66 @@
1
- {
2
- "name": "@1337exp/taoui",
3
- "version": "1.13.0",
4
- "description": "Modern UI component library for Nuxt/Vue",
5
- "homepage": "https://666.io",
6
- "type": "module",
7
- "main": "./dist/index.cjs",
8
- "module": "./dist/index.mjs",
9
- "types": "./dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.mjs",
14
- "require": "./dist/index.cjs"
15
- },
16
- "./styles.css": "./dist/styles.css",
17
- "./styles/*": "./src/styles/*",
18
- "./package.json": "./package.json"
19
- },
20
- "files": [
21
- "dist",
22
- "src/styles"
23
- ],
24
- "scripts": {
25
- "build": "vite build",
26
- "dev": "vite build --watch",
27
- "type-check": "vue-tsc --noEmit",
28
- "prepublishOnly": "npm run type-check && npm run build"
29
- },
30
- "repository": {
31
- "type": "git",
32
- "url": "git://github.com/1337exp/taoui"
33
- },
34
- "keywords": [
35
- "vue",
36
- "nuxt",
37
- "ui",
38
- "components",
39
- "library",
40
- "design-tokens"
41
- ],
42
- "author": "",
43
- "license": "MIT",
44
- "peerDependencies": {
45
- "vue": "^3.4.0",
46
- "nuxt": "^3.0.0"
47
- },
48
- "peerDependenciesMeta": {
49
- "nuxt": {
50
- "optional": true
51
- }
52
- },
53
- "devDependencies": {
54
- "@vitejs/plugin-vue": "^5.0.0",
55
- "typescript": "^5.3.0",
56
- "vite": "^5.0.0",
57
- "vite-plugin-dts": "^3.7.0",
58
- "vue": "^3.4.0",
59
- "vue-tsc": "^2.0.0"
60
- }
61
- }
1
+ {
2
+ "name": "@1337exp/taoui",
3
+ "version": "2.0.0",
4
+ "description": "Modern UI component library for Nuxt/Vue",
5
+ "homepage": "https://666.io",
6
+ "type": "module",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.mjs",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.mjs",
14
+ "require": "./dist/index.cjs"
15
+ },
16
+ "./styles.css": "./dist/styles.css",
17
+ "./styles/*": "./src/styles/*",
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "src/styles"
23
+ ],
24
+ "scripts": {
25
+ "build": "vite build",
26
+ "dev": "vite build --watch",
27
+ "type-check": "vue-tsc --noEmit",
28
+ "test": "vitest run",
29
+ "test:watch": "vitest",
30
+ "prepublishOnly": "npm run type-check && npm run test && npm run build"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git://github.com/1337exp/taoui"
35
+ },
36
+ "keywords": [
37
+ "vue",
38
+ "nuxt",
39
+ "ui",
40
+ "components",
41
+ "library",
42
+ "design-tokens"
43
+ ],
44
+ "author": "",
45
+ "license": "MIT",
46
+ "peerDependencies": {
47
+ "vue": "^3.4.0",
48
+ "nuxt": "^3.0.0"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "nuxt": {
52
+ "optional": true
53
+ }
54
+ },
55
+ "devDependencies": {
56
+ "@vitejs/plugin-vue": "^5.0.0",
57
+ "@vue/test-utils": "^2.5.1",
58
+ "happy-dom": "^15.11.7",
59
+ "typescript": "^5.3.0",
60
+ "vite": "^5.0.0",
61
+ "vite-plugin-dts": "^3.7.0",
62
+ "vitest": "^2.1.9",
63
+ "vue": "^3.4.0",
64
+ "vue-tsc": "^2.0.0"
65
+ }
66
+ }
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * Tao UI — styles entry point
3
3
  *
4
- * Порядок важен: primitives -> semantic (default theme) -> optional themes -> base reset.
4
+ * Порядок важен: primitives -> semantic (default theme) -> optional themes -> size context -> base reset.
5
5
  */
6
6
  @import "./primitives.css";
7
7
  @import "./semantic.css";
8
8
  @import "./themes/light.css";
9
+ @import "./size.css";
9
10
  @import "./base.css";
@@ -41,14 +41,51 @@
41
41
  --tao-blue-500: #4c82f7;
42
42
  --tao-blue-600: #3b6de0;
43
43
 
44
- /* ---------- Control height / Высота контролов ----------
45
- One scale for every sized control: Button, Segmented, Select, Combobox (size small / medium / large).
46
- Единая шкала для всех контролов с размером. Fields without a size prop (Input, InputNumber, Date, DateRange,
47
- Quantity) are always medium, see --tao-field-height. / Поля без size всегда medium (--tao-field-height). */
44
+ /* ---------- Control size scale / Шкала размеров контролов ----------
45
+ One scale (small / medium / large) for every control with `size`. Components read the current values
46
+ from size.css (--tao-control-height etc.), never these directly.
47
+ Единая шкала для всех контролов с `size`. Компоненты читают текущие значения из size.css, не эти. */
48
48
  --tao-control-height-small: 26px;
49
49
  --tao-control-height-medium: 36px;
50
50
  --tao-control-height-large: 44px;
51
- --tao-field-height: var(--tao-control-height-medium);
51
+
52
+ --tao-control-padding-x-small: var(--tao-space-2);
53
+ --tao-control-padding-x-medium: var(--tao-space-3);
54
+ --tao-control-padding-x-large: var(--tao-space-4);
55
+
56
+ --tao-control-padding-y-small: var(--tao-space-1);
57
+ --tao-control-padding-y-medium: var(--tao-space-2);
58
+ --tao-control-padding-y-large: var(--tao-space-3);
59
+
60
+ --tao-control-font-size-small: var(--tao-font-size-xs);
61
+ --tao-control-font-size-medium: var(--tao-font-size-md);
62
+ --tao-control-font-size-large: var(--tao-font-size-lg);
63
+
64
+ /* Secondary text inside controls: affixes, segmented labels, service rows / Вторичный текст в контролах */
65
+ --tao-control-font-size-secondary-small: var(--tao-font-size-xs);
66
+ --tao-control-font-size-secondary-medium: var(--tao-font-size-sm);
67
+ --tao-control-font-size-secondary-large: var(--tao-font-size-md);
68
+
69
+ --tao-button-padding-x-small: var(--tao-space-3);
70
+ --tao-button-padding-x-medium: var(--tao-space-4);
71
+ --tao-button-padding-x-large: var(--tao-space-6);
72
+
73
+ /* Choice indicators: Checkbox box, Radio circle; Switch track is 2px taller.
74
+ Индикаторы выбора: квадрат Checkbox, круг Radio; дорожка Switch на 2px выше. */
75
+ --tao-indicator-size-small: 14px;
76
+ --tao-indicator-size-medium: 18px;
77
+ --tao-indicator-size-large: 22px;
78
+
79
+ /* Tag / Тег */
80
+ --tao-tag-height-small: 18px;
81
+ --tao-tag-height-medium: 20px;
82
+ --tao-tag-height-large: 24px;
83
+ --tao-tag-padding-x-small: 6px;
84
+ --tao-tag-padding-x-medium: var(--tao-space-2);
85
+ --tao-tag-padding-x-large: 10px;
86
+ --tao-tag-font-size-small: var(--tao-font-size-xs);
87
+ --tao-tag-font-size-medium: var(--tao-font-size-xs);
88
+ --tao-tag-font-size-large: var(--tao-font-size-sm);
52
89
 
53
90
  /* ---------- Spacing scale (4px base) ---------- */
54
91
  --tao-space-1: 4px;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Tao UI — Size context / Контекст размера
3
+ *
4
+ * Controls never read the per-size primitives directly — only the "current" tokens below.
5
+ * :root is medium; `.tao-size-small` / `-medium` / `-large` on any element switches its whole subtree.
6
+ * A control with an explicit `size` prop adds the same class to itself; without the prop it inherits.
7
+ *
8
+ * Контролы читают только «текущие» токены ниже, не примитивы по размерам.
9
+ * :root — medium; класс `.tao-size-*` на любом элементе переключает всё поддерево.
10
+ * Контрол с явным `size` вешает этот же класс на себя, без prop — наследует.
11
+ */
12
+ :root,
13
+ .tao-size-medium {
14
+ --tao-size: medium;
15
+ --tao-control-height: var(--tao-control-height-medium);
16
+ --tao-control-padding-x: var(--tao-control-padding-x-medium);
17
+ --tao-control-padding-y: var(--tao-control-padding-y-medium);
18
+ --tao-control-font-size: var(--tao-control-font-size-medium);
19
+ --tao-control-font-size-secondary: var(--tao-control-font-size-secondary-medium);
20
+ --tao-button-padding-x: var(--tao-button-padding-x-medium);
21
+ --tao-indicator-size: var(--tao-indicator-size-medium);
22
+ --tao-tag-height: var(--tao-tag-height-medium);
23
+ --tao-tag-padding-x: var(--tao-tag-padding-x-medium);
24
+ --tao-tag-font-size: var(--tao-tag-font-size-medium);
25
+ /* Deprecated alias, follows the current size. / Устаревший алиас, следует текущему размеру. */
26
+ --tao-field-height: var(--tao-control-height);
27
+ }
28
+
29
+ .tao-size-small {
30
+ --tao-size: small;
31
+ --tao-control-height: var(--tao-control-height-small);
32
+ --tao-control-padding-x: var(--tao-control-padding-x-small);
33
+ --tao-control-padding-y: var(--tao-control-padding-y-small);
34
+ --tao-control-font-size: var(--tao-control-font-size-small);
35
+ --tao-control-font-size-secondary: var(--tao-control-font-size-secondary-small);
36
+ --tao-button-padding-x: var(--tao-button-padding-x-small);
37
+ --tao-indicator-size: var(--tao-indicator-size-small);
38
+ --tao-tag-height: var(--tao-tag-height-small);
39
+ --tao-tag-padding-x: var(--tao-tag-padding-x-small);
40
+ --tao-tag-font-size: var(--tao-tag-font-size-small);
41
+ --tao-field-height: var(--tao-control-height);
42
+ }
43
+
44
+ .tao-size-large {
45
+ --tao-size: large;
46
+ --tao-control-height: var(--tao-control-height-large);
47
+ --tao-control-padding-x: var(--tao-control-padding-x-large);
48
+ --tao-control-padding-y: var(--tao-control-padding-y-large);
49
+ --tao-control-font-size: var(--tao-control-font-size-large);
50
+ --tao-control-font-size-secondary: var(--tao-control-font-size-secondary-large);
51
+ --tao-button-padding-x: var(--tao-button-padding-x-large);
52
+ --tao-indicator-size: var(--tao-indicator-size-large);
53
+ --tao-tag-height: var(--tao-tag-height-large);
54
+ --tao-tag-padding-x: var(--tao-tag-padding-x-large);
55
+ --tao-tag-font-size: var(--tao-tag-font-size-large);
56
+ --tao-field-height: var(--tao-control-height);
57
+ }