@1337exp/taoui 5.4.1 → 5.6.2

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,105 +1,105 @@
1
- {
2
- "name": "@1337exp/taoui",
3
- "version": "5.4.1",
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
- "keywords": [
6
- "vue",
7
- "vue3",
8
- "nuxt",
9
- "ui",
10
- "ui-library",
11
- "components",
12
- "component-library",
13
- "design-system",
14
- "design-tokens",
15
- "theming",
16
- "dark-mode",
17
- "typescript",
18
- "accessible",
19
- "a11y",
20
- "palette",
21
- "toolbar",
22
- "navigation",
23
- "sparkline",
24
- "color-picker",
25
- "slider",
26
- "toast"
27
- ],
28
- "homepage": "https://666.io",
29
- "bugs": {
30
- "url": "https://github.com/1337exp/taoui/issues"
31
- },
32
- "repository": {
33
- "type": "git",
34
- "url": "git+https://github.com/1337exp/taoui.git"
35
- },
36
- "author": "1337exp",
37
- "license": "MIT",
38
- "type": "module",
39
- "types": "./dist/index.d.ts",
40
- "exports": {
41
- ".": {
42
- "types": "./dist/index.d.ts",
43
- "default": "./dist/index.js"
44
- },
45
- "./styles.css": "./dist/styles.css",
46
- "./palettes.css": "./src/styles/palettes/index.css",
47
- "./styles/*": "./src/styles/*",
48
- "./package.json": "./package.json"
49
- },
50
- "sideEffects": [
51
- "**/*.css"
52
- ],
53
- "files": [
54
- "dist",
55
- "src/styles",
56
- "CHANGELOG.md",
57
- "MIGRATION-5.md",
58
- "skills"
59
- ],
60
- "browserslist": [
61
- "chrome >= 111",
62
- "edge >= 111",
63
- "safari >= 16.4",
64
- "firefox >= 128"
65
- ],
66
- "engines": {
67
- "node": ">=18"
68
- },
69
- "publishConfig": {
70
- "access": "public"
71
- },
72
- "scripts": {
73
- "build": "vite build",
74
- "dev": "vite build --watch",
75
- "type-check": "vue-tsc --noEmit",
76
- "test": "vitest run",
77
- "test:watch": "vitest",
78
- "showcase": "npm --prefix showcase run dev",
79
- "showcase:build": "npm --prefix showcase run build",
80
- "media": "node scripts/media.mjs",
81
- "smoke": "node scripts/consumer-smoke.mjs",
82
- "prepublishOnly": "npm run type-check && npm run test && npm run build && npm run lint:package",
83
- "lint:package": "publint && attw --pack . --profile esm-only --exclude-entrypoints styles.css palettes.css",
84
- "palettes": "node scripts/generate-palettes.mjs",
85
- "skill": "node scripts/generate-skill.mjs"
86
- },
87
- "peerDependencies": {
88
- "vue": "^3.4.0"
89
- },
90
- "devDependencies": {
91
- "@arethetypeswrong/cli": "^0.18.5",
92
- "@types/node": "^20.19.43",
93
- "@vitejs/plugin-vue": "^5.0.0",
94
- "@vue/test-utils": "^2.5.1",
95
- "happy-dom": "^15.11.7",
96
- "playwright-core": "^1.64.1",
97
- "publint": "^0.3.25",
98
- "typescript": "^5.3.0",
99
- "vite": "^5.0.0",
100
- "vite-plugin-dts": "^3.7.0",
101
- "vitest": "^2.1.9",
102
- "vue": "^3.4.0",
103
- "vue-tsc": "^2.0.0"
104
- }
105
- }
1
+ {
2
+ "name": "@1337exp/taoui",
3
+ "version": "5.6.2",
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
+ "keywords": [
6
+ "vue",
7
+ "vue3",
8
+ "nuxt",
9
+ "ui",
10
+ "ui-library",
11
+ "components",
12
+ "component-library",
13
+ "design-system",
14
+ "design-tokens",
15
+ "theming",
16
+ "dark-mode",
17
+ "typescript",
18
+ "accessible",
19
+ "a11y",
20
+ "palette",
21
+ "toolbar",
22
+ "navigation",
23
+ "sparkline",
24
+ "color-picker",
25
+ "slider",
26
+ "toast"
27
+ ],
28
+ "homepage": "https://666.io",
29
+ "bugs": {
30
+ "url": "https://github.com/1337exp/taoui/issues"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/1337exp/taoui.git"
35
+ },
36
+ "author": "1337exp",
37
+ "license": "MIT",
38
+ "type": "module",
39
+ "types": "./dist/index.d.ts",
40
+ "exports": {
41
+ ".": {
42
+ "types": "./dist/index.d.ts",
43
+ "default": "./dist/index.js"
44
+ },
45
+ "./styles.css": "./dist/styles.css",
46
+ "./palettes.css": "./src/styles/palettes/index.css",
47
+ "./styles/*": "./src/styles/*",
48
+ "./package.json": "./package.json"
49
+ },
50
+ "sideEffects": [
51
+ "**/*.css"
52
+ ],
53
+ "files": [
54
+ "dist",
55
+ "src/styles",
56
+ "CHANGELOG.md",
57
+ "MIGRATION-5.md",
58
+ "skills"
59
+ ],
60
+ "browserslist": [
61
+ "chrome >= 111",
62
+ "edge >= 111",
63
+ "safari >= 16.4",
64
+ "firefox >= 128"
65
+ ],
66
+ "engines": {
67
+ "node": ">=18"
68
+ },
69
+ "publishConfig": {
70
+ "access": "public"
71
+ },
72
+ "scripts": {
73
+ "build": "vite build",
74
+ "dev": "vite build --watch",
75
+ "type-check": "vue-tsc --noEmit",
76
+ "test": "vitest run",
77
+ "test:watch": "vitest",
78
+ "showcase": "npm --prefix showcase run dev",
79
+ "showcase:build": "npm --prefix showcase run build",
80
+ "media": "node scripts/media.mjs",
81
+ "smoke": "node scripts/consumer-smoke.mjs",
82
+ "prepublishOnly": "npm run type-check && npm run test && npm run build && npm run lint:package",
83
+ "lint:package": "publint && attw --pack . --profile esm-only --exclude-entrypoints styles.css palettes.css",
84
+ "palettes": "node scripts/generate-palettes.mjs",
85
+ "skill": "node scripts/generate-skill.mjs"
86
+ },
87
+ "peerDependencies": {
88
+ "vue": "^3.4.0"
89
+ },
90
+ "devDependencies": {
91
+ "@arethetypeswrong/cli": "^0.18.5",
92
+ "@types/node": "^20.19.43",
93
+ "@vitejs/plugin-vue": "^5.0.0",
94
+ "@vue/test-utils": "^2.5.1",
95
+ "happy-dom": "^15.11.7",
96
+ "playwright-core": "^1.64.1",
97
+ "publint": "^0.3.25",
98
+ "typescript": "^5.3.0",
99
+ "vite": "^5.0.0",
100
+ "vite-plugin-dts": "^3.7.0",
101
+ "vitest": "^2.1.9",
102
+ "vue": "^3.4.0",
103
+ "vue-tsc": "^2.0.0"
104
+ }
105
+ }
@@ -76,7 +76,7 @@ choose a text colour, WCAG 2 to promise a number.
76
76
 
77
77
  - Every field takes `size`, `disabled`, `error` (a red frame). The message, the label and the hint go through
78
78
  **`TaoFormField`** (`label`, `hint`, `error`), which also wires `id`, `aria-describedby` and `aria-invalid`.
79
- - `TaoInput`, `TaoTextarea`, `TaoInputNumber`, `TaoQuantity`, `TaoSelect`, `TaoCombobox`, `TaoDate` / `TaoDateRange`
79
+ - `TaoInput`, `TaoTextarea`, `TaoInputNumber`, `TaoQuantity`, `TaoSelect`, `TaoCombobox`, `TaoDate` (`editable` to type `5`, `5.3`, `05.03.26`) / `TaoDateRange`
80
80
  (`YYYY-MM-DD` strings), `TaoCalendar` (the inline month calendar, `mode="single" | "range"`), `TaoCheckbox`,
81
81
  `TaoChecklist` (one model for a group), `TaoRadioGroup` + `TaoRadio`, `TaoSwitch`, `TaoSegmented`, `TaoSlider` /
82
82
  `TaoRangeSlider`, `TaoPinCode` (`status="success | error"` after `complete`), `TaoColorInput` / `TaoColorPicker`,
@@ -84,7 +84,8 @@ choose a text colour, WCAG 2 to promise a number.
84
84
 
85
85
  ## Overlays and feedback
86
86
 
87
- - `TaoModal`, `TaoDrawer` (v-model; Escape closes the top layer only), `TaoPopover`, `TaoTooltip` (`placement`).
87
+ - `TaoModal` (`fullscreen`, `fullscreen="narrow"` for a page on a phone), `TaoDrawer` (`side="bottom"` is the phone's
88
+ bottom sheet) — v-model; Escape closes the top layer only. `TaoPopover`, `TaoTooltip` (`placement`).
88
89
  - Menus share one engine: `TaoDropdownMenu`, `TaoMenubar`, `TaoContextMenu`, `TaoMenu` (the panel for your own shell).
89
90
  Items are a data tree `TaoMenuItem[]`: `{ id, label, icon?, shortcut?, disabled?, items? }`,
90
91
  `{ type: 'checkbox' | 'radio', checked }`, `{ type: 'label' | 'separator' }`. `@select="id => …"`. `closeOnScroll`.
@@ -113,7 +114,7 @@ library and feed it `taoChartTheme()` / `watchTaoChartTheme(apply)`; do not buil
113
114
 
114
115
  ## Icons
115
116
 
116
- `<TaoIcon name="tao-check" />`: 29 built-in SVG icons under the `tao-` prefix (`taoIconNames`). Your own:
117
+ `<TaoIcon name="tao-check" />`: 40 built-in SVG icons under the `tao-` prefix (incl. `tao-settings`, `tao-edit`, `tao-trash`, `tao-bell`, `tao-tag`, `tao-repeat`, `tao-undo`, `tao-redo`) (`taoIconNames`). Your own:
117
118
  `registerTaoIcons({ rocket: { body: '<path d="…"/>' } })` on a 24 grid with `currentColor`; add `grid: true` for icons made
118
119
  only of straight lines through the middle (a plus), so they stay crisp when small. Any other name renders the class
119
120
  `icon-<name>` for an icon font you bring.
@@ -354,10 +354,13 @@ Showcase section: `#date`
354
354
  | `v-model` | `string \| null` | null | A single day YYYY-MM-DD, with no time and no time zone |
355
355
  | `min / max` | `string` | — | The bounds in the same format |
356
356
  | `placeholder` | `string` | 'Date' | The empty field |
357
- | `locale` | `string` | 'en-US' | The calendar captions |
357
+ | `locale` | `string` | the app locale | The calendar captions and the order of day and month; without it the language of setTaoLocale |
358
+ | `editable` | `boolean` | false | A text field you type the date into, the calendar on the button next to it or ↓. In the locale's order of day and month: 5 is the 5th of this month, 5.3 the 5th of March (3/5 in en-US), 05.03.26, 0503, ISO. Enter or leaving the field applies it; a text that is not a date or is outside min / max puts the value back; Esc drops the typing; an empty field is null |
359
+ | `parse / format` | `(text, { locale, reference }) => string \| null / (iso, locale) => string` | — | Your own reading of the typed text («tomorrow») and your own text in the field; reference is the current value or today |
358
360
  | `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
359
361
  | `disabled / error` | `boolean` | false | Disabled / a red border |
360
362
  | `todayText / clearText` | `string` | 'Today' / 'Clear' | The buttons at the bottom of the popup |
363
+ | `calendarLabel` | `string` | 'Choose a date' | aria-label of the calendar button of an editable field |
361
364
 
362
365
  **Slots, events, notes.** #icon, #prev-icon, #next-icon — the icons of the field and of the month arrows.
363
366
 
@@ -370,7 +373,7 @@ Showcase section: `#date`
370
373
  | `v-model` | `{ start, end } \| null` | null | A period YYYY-MM-DD. An incomplete choice is not written to the model |
371
374
  | `min / max` | `string` | — | The bounds |
372
375
  | `placeholder` | `string` | 'Period' | While null |
373
- | `locale` | `string` | 'en-US' | The calendar captions |
376
+ | `locale` | `string` | the app locale | The calendar captions; without it the language of setTaoLocale |
374
377
  | `size` | `'small' \| 'medium' \| 'large'` | inherited | Size, the same scale as TaoButton. Without it — the size of the ancestors (tao-size-* or size on FormField / InputGroup), otherwise medium |
375
378
  | `disabled / error` | `boolean` | false | Disabled / a red border |
376
379
 
@@ -861,6 +864,7 @@ Showcase section: `#modal`
861
864
  | `title` | `string` | '' | The title in the header |
862
865
  | `closable` | `boolean` | true | The cross, Esc, a click on the backdrop |
863
866
  | `closeLabel` | `string` | 'Close' | aria-label of the cross |
867
+ | `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 |
864
868
 
865
869
  **Slots, events, notes.** default — the body. #footer — buttons. #close-icon — the cross icon.
866
870
 
@@ -872,7 +876,7 @@ Showcase section: `#drawer`
872
876
  |---|---|---|---|
873
877
  | `v-model` | `boolean` | — | Open. Required |
874
878
  | `title` | `string` | '' | The title |
875
- | `side` | `'left' \| 'right'` | 'right' | Where it slides in from |
879
+ | `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 |
876
880
  | `closable` | `boolean` | true | Esc, the backdrop, the cross |
877
881
  | `closeLabel` | `string` | 'Close' | aria-label of the cross |
878
882
 
@@ -91,7 +91,7 @@
91
91
 
92
92
  /* ---------- Charts ----------
93
93
  The series colours, in order (TaoDonut, TaoSparkline, taoChartTheme). The first is the accent; the status roles
94
- follow, so a palette moves them away from its accent; violet and the last one are fixed (pink in the dark theme, teal in the light one: away from each accent). Red is left out on purpose: it reads
94
+ follow, so a palette moves them away from its accent; violet and the last one are fixed (pink in the dark theme, orange in the light one: away from each accent). Red is left out on purpose: it reads
95
95
  as «bad». A palette re-declares the ones built on roles.
96
96
  Цвета серий по порядку. Первый — акцент; дальше роли статусов, поэтому палитра отодвигает их от своего акцента;
97
97
  фиолетовый и последний постоянны. Красный нарочно не берём: он читается как «плохо». */
@@ -79,7 +79,7 @@
79
79
 
80
80
  /* ---------- Charts ----------
81
81
  The series colours, in order (TaoDonut, TaoSparkline, taoChartTheme). The first is the accent; the status roles
82
- follow, so a palette moves them away from its accent; violet and the last one are fixed (pink in the dark theme, teal in the light one: away from each accent). Red is left out on purpose: it reads
82
+ follow, so a palette moves them away from its accent; violet and the last one are fixed (pink in the dark theme, orange in the light one: away from each accent). Red is left out on purpose: it reads
83
83
  as «bad». A palette re-declares the ones built on roles.
84
84
  Цвета серий по порядку. Первый — акцент; дальше роли статусов, поэтому палитра отодвигает их от своего акцента;
85
85
  фиолетовый и последний постоянны. Красный нарочно не берём: он читается как «плохо». */
@@ -88,8 +88,9 @@
88
88
  --tao-color-chart-3: var(--tao-color-success);
89
89
  --tao-color-chart-4: var(--tao-violet-600);
90
90
  --tao-color-chart-5: var(--tao-color-warning);
91
- /* the light accent is pink already: the last series is teal / светлый акцент уже розовый: последняя серия бирюзовая */
92
- --tao-color-chart-6: var(--tao-teal-600);
91
+ /* the light accent is pink already: the last series is orange (teal sat on the dark success green)
92
+ светлый акцент уже розовый: последняя серия оранжевая (бирюзовая сливалась с тёмно-зелёным success) */
93
+ --tao-color-chart-6: var(--tao-tangerine-600);
93
94
 
94
95
  --tao-color-input-bg: var(--tao-gray-0);
95
96
  --tao-color-input-text: var(--tao-gray-950);
@@ -27,6 +27,7 @@
27
27
  /* the dark theme's warning: an orange clearly apart from the amber accent / warning тёмной темы: апельсиновый, отличный от янтарного акцента */
28
28
  --tao-tangerine-400: #ff8f3d;
29
29
  --tao-tangerine-500: #f07a2a;
30
+ --tao-tangerine-600: #d9620f;
30
31
 
31
32
  /* Rose: the light theme's brand colour (from the original 666.io palette) */
32
33
  --tao-pink-400: #dc4679;
@@ -35,11 +36,10 @@
35
36
  --tao-pink-700: #c70a55;
36
37
  --tao-pink-800: #a8083f;
37
38
 
38
- /* violet: only a chart series colour / фиолетовый: только цвет серии графика */
39
- --tao-violet-400: #a78bfa;
40
- --tao-violet-600: #7c4ddb;
41
- /* teal: the last series of the light theme, whose accent is pink / бирюзовый: последняя серия светлой темы с розовым акцентом */
42
- --tao-teal-600: #0e8a80;
39
+ /* violet: only a chart series colour, saturated enough to stand apart from the info blue
40
+ фиолетовый: только цвет серии графика, достаточно насыщенный, чтобы не сливаться с голубым info */
41
+ --tao-violet-400: #9d5cff;
42
+ --tao-violet-600: #b03ad1;
43
43
 
44
44
  --tao-red-400: #e35766;
45
45
  --tao-red-500: #dc3545;