@1337exp/taoui 5.8.3 → 5.10.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@1337exp/taoui",
3
- "version": "5.8.3",
3
+ "version": "5.10.0",
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",
@@ -82,7 +82,9 @@ choose a text colour, WCAG 2 to promise a number.
82
82
  `TaoRangeSlider`, `TaoPinCode` (`status="success | error"` after `complete`), `TaoColorInput` / `TaoColorPicker`,
83
83
  `TaoFileDrop`. A form is a plain `<form>`; there is no TaoForm.
84
84
  - Attributes given to a field (`aria-label`, `name`, `autocomplete`, `inputmode`, `data-*`, listeners) reach its control
85
- (the input, the trigger button, the checkbox); `class` and `style` stay on its wrapper.
85
+ (the input, the trigger button, the checkbox); `class` and `style` stay on its wrapper. A field that reads as text
86
+ (an item of a list being edited): `<TaoInput variant="plain">` (`TaoInputNumber`, `TaoCombobox` and `TaoTextarea` take the same `variant`). On `TaoColorInput` the
87
+ `aria-label` is followed by the colour («Background: #ff8800»); `TaoColorPicker` is a group it names.
86
88
 
87
89
  ## Overlays and feedback
88
90
 
@@ -111,7 +113,8 @@ choose a text colour, WCAG 2 to promise a number.
111
113
  `TaoScrollTop`, `TaoAnimatedBorder`, `TaoIcon`.
112
114
 
113
115
  Small charts only: `TaoSparkline` (a trend), `TaoMeter` (a value in a range, `low` / `high` / `optimum`), `TaoDonut`
114
- (`segments` or `value` of `max`). Series colours `--tao-color-chart-1…6`. For a real chart (axes, tooltips) use a chart
116
+ (`segments` or `value` of `max`), `TaoHeatmap` (`values` by `rows` × `cols`, threshold `steps` with a legend, a grid the
117
+ arrows move through). Series colours `--tao-color-chart-1…6`. For a real chart (axes, tooltips) use a chart
115
118
  library and feed it `taoChartTheme()` / `watchTaoChartTheme(apply)`; do not build axes by hand.
116
119
 
117
120
  ## Icons
@@ -126,6 +126,7 @@ Showcase section: `#input`
126
126
  | `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 |
127
127
  | `disabled` | `boolean` | false | Disabled |
128
128
  | `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
129
+ | `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | A frame / a fill only / nothing: plain reads as text (an item of a list being edited): no inset, the caret shows the focus, an error is a red line under the text. The height does not change |
129
130
  | `id` | `string` | auto | The input id; otherwise taken from FormField or useId |
130
131
 
131
132
  **Slots, events, notes.** #prefix and #suffix — inside the frame, left/right (an icon, text).
@@ -155,6 +156,7 @@ Showcase section: `#input-number`
155
156
  | `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 |
156
157
  | `disabled` | `boolean` | false | Disabled |
157
158
  | `error` | `boolean` | false | A red border. The error text is error on TaoFormField |
159
+ | `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | As on TaoInput: a frame / a fill only / nothing (the field reads as text, an error is a red line under the text) |
158
160
  | `placeholder` | `string` | '' | The hint when null |
159
161
 
160
162
  ## TaoQuantity
@@ -332,6 +334,7 @@ Showcase section: `#combobox`
332
334
  | `clearable` | `boolean` | true | Clear row in the list. Turn off when null is not valid. |
333
335
  | `clearText` | `string` | 'Clear' | Label of the clear row; slot #clear replaces it. |
334
336
  | `disabled / error` | `boolean` | false | Disabled / a red border |
337
+ | `variant` | `'outline' \| 'filled' \| 'plain'` | 'outline' | As on TaoInput: a frame / a fill only / nothing (the field reads as text, an error is a red line under the text) |
335
338
 
336
339
  **Slots, events, notes.** create — an event when a new value is typed: the parent extends options itself.
337
340
 
@@ -574,6 +577,27 @@ Showcase section: `#charts`
574
577
 
575
578
  **Slots, events, notes.** default — the middle of the ring (a number, a word). taoChartTheme(el?) returns the theme colours as rgb() for a chart library: colors (6 series), text, textMuted, grid, axis, background, tooltip, tooltipText, danger / success / warning, fontFamily; watchTaoChartTheme(apply, el?) calls it now and on every theme, mode or palette change, and returns stop().
576
579
 
580
+ ## TaoHeatmap
581
+
582
+ Showcase section: `#charts`
583
+
584
+ | Prop | Type | Default | Notes |
585
+ |---|---|---|---|
586
+ | `values` | `(number \| null)[][]` | — | One array per row, one value per column; null is no data |
587
+ | `rows / cols` | `string[]` | — | The names of the rows («Mon») and the columns («12 am») |
588
+ | `steps` | `number[]` | by the data | The thresholds, ascending: a cell takes the colour of the highest one it reaches, below the first it is empty. By default round numbers at 10–80% of the largest value |
589
+ | `tone` | `TaoToneName` | 'accent' | The colour of the levels: from faint to the full tone |
590
+ | `label` | `string` | — | The accessible name of the grid |
591
+ | `legend` | `boolean` | true | The thresholds with their colours («500+») under the map |
592
+ | `hatch` | `number` | 1 | How many of the lowest levels are striped, so they read apart from empty cells without colour too |
593
+ | `labelEvery` | `number` | 1 | Show every n-th column name; all of them are still read |
594
+ | `colLabels` | `'top' \| 'bottom'` | 'bottom' | Where the column names stand |
595
+ | `cellHeight` | `number` | — | The cell height, px; square cells by default |
596
+ | `gap` | `number` | 3 | The gap between cells, px |
597
+ | `format` | `(value) => string` | by the locale | How a number is written in the tip, the cells and the legend |
598
+
599
+ **Slots, events, notes.** tip { row, col, value, text } — the tip over a cell. role="grid": one cell is in the tab order, the arrows, Home / End (Ctrl for the corners) and PageUp / PageDown move it; a screen reader reads the row, the column and the number. The map fits the width of its container.
600
+
577
601
  ## TaoTable
578
602
 
579
603
  Showcase section: `#table`