@1337exp/taoui 5.30.0 → 5.30.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.30.2
4
+
5
+ Nothing to migrate; the text of the skill only.
6
+
7
+ - **The skill's `patterns.md`: small is for dense rows and power-user tools only.** A toolbar, an editor panel, a filter or settings bar, a popover or a menu stay medium: an editor people use all day, above all a client one, otherwise grows small buttons that are hard to hit. The toolbar pattern says to leave the size medium.
8
+
9
+ ## 5.30.1
10
+
11
+ Nothing to migrate.
12
+
13
+ - **`TaoSegmented` keeps the width of its options in a flex row.** Beside a field that takes the room (`TaoSelect` is 100% wide) it was squeezed until its last option was cut off ("Li" instead of "List"). It no longer shrinks; a `block` one still fills its container.
14
+ - **The skill's `patterns.md`: every "Don't" example says what is wrong in it.**
15
+
3
16
  ## 5.30.0
4
17
 
5
18
  Nothing to migrate. One thing may look different: controls inside a `TaoPopover` that hangs in a small, large or compact context now follow it (before they were always medium).
@@ -7,7 +20,6 @@ Nothing to migrate. One thing may look different: controls inside a `TaoPopover`
7
20
  - **`TaoButton`: a slot that draws nothing is no text.** A button with an icon and `<template v-if="wide">View</template>` or an `<i v-if="dot" />` inside kept the content wrapper and its gap although nothing was drawn, so the icon sat off-centre and the button was not the icon-only square. The button now asks what the slot draws at render time (`src/slots.ts`, `slotHasContent`), not whether the slot exists.
8
21
  - **The same trap in the other components, closed.** `$slots.x` is true for a slot that draws nothing: a wrapper component forwarding a slot it was not given, an inner `v-if` that is false. The wrapper of the slot stayed, with its padding, border or gap: an empty card body, an empty addon, a label gap beside a switch. Now `TaoAlert` (body), `TaoCard` (header, title, sub, body, footer, corner, media), `TaoDivider`, `TaoDonut`, `TaoDrawer` and `TaoModal` (footer), `TaoEmpty` (icon, text, action), `TaoFieldset` (legend), `TaoInput` (prefix, suffix), `TaoInputGroup` (before, after), `TaoListItem`, `TaoMarquee`, `TaoNav` (action, footer), `TaoProgress`, `TaoSegmentedOption`, `TaoSpoiler` (title), `TaoSwitch` (label) and `TaoTag` (prefix) ask what the slot draws (`slotHas`). Slots with props (`TaoTree`, `TaoTimeline`, `TaoTabs` label, `TaoCopy`) are left as they were: the check calls a slot without props.
9
22
  - **`TaoButton` `shortcut`: not printed on an icon-only button.** The key is shown at the end of a button with text, but an icon-only button is a square of the control height, and the key piled over the icon and over its neighbours (an editor toolbar). Now the key goes to the native tooltip, `Bold (Ctrl+B)` (the `aria-label`, then the key), and stays in `aria-keyshortcuts`; a `title` of your own wins. A button with text is as before. Nobody has to move the key into a tooltip by hand any more.
10
- - **`TaoSegmented` keeps the width of its options in a flex row.** Beside a field that takes the room (`TaoSelect` is 100% wide) it was squeezed until its last option was cut off ("Li" instead of "List"). It no longer shrinks; a `block` one still fills its container.
11
23
  - **`TaoPopover`: the panel carries the size and the density of where it hangs from.** The skill and the rules say a floating panel does, but only the lists of `TaoSelect` and `TaoCombobox` did: the content of a popover is in `body`, where the context is not inherited, so a small control row inside it grew back to medium. The panel now gets `tao-size-*` and `tao-density-*` when it opens, as the select list does.
12
24
  - **The skill gets `references/patterns.md`: what to use when, and why.** The accent budget (one filled accent button per region, quiet tools are `ghost` + `tone="neutral"`, status is `tone`), a section on choosing a size (what small / medium / large are for and what they cost, 26 / 36 / 44px, density on top of the size, phone = `tao-density-auto`, how to find where a small control came from), and a do and a don't for a toolbar, the footer of a form, controls side by side (one size from the container, never a size on some of them) and a destructive action. It is generated by `npm run skill` from the same data that draws the Guide page of the showcase (`#patterns`); `SKILL.md` points at it.
13
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1337exp/taoui",
3
- "version": "5.30.0",
3
+ "version": "5.30.2",
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",
@@ -19,7 +19,7 @@ Medium is the default, and the right answer unless there is a reason. A size is
19
19
 
20
20
  | Size | Height | Text | Side padding | Use it for | What it costs |
21
21
  |---|---|---|---|---|---|
22
- | `small` | 26px | 12px | 12px | Tools that serve the content, not the task itself: a toolbar or an editor panel, a filter or settings bar, the actions in a table or list row, a utility panel (the bar of this showcase). Many controls close together, a mouse first. A popover or a menu with a few controls is not that: it stays medium, small ones stick together there. | A small hit area (26px: above the 24px WCAG 2.2 minimum, below the 44px a finger needs) and 12px text. Not for the main action of a screen, not where the only pointer is a finger. |
22
+ | `small` | 26px | 12px | 12px | Only where a lot sits close together and a mouse is the pointer: the actions in a row of a dense table or list, a power-user tool with dozens of controls. Not a toolbar or an editor panel, not a filter or settings bar, not a popover or a menu: an editor that people use all day, above all one for clients, stays medium, or it grows small buttons that are hard to hit. | A small hit area (26px: above the 24px WCAG 2.2 minimum, below the 44px a finger needs) and 12px text. Not for the main action of a screen, not where the only pointer is a finger. |
23
23
  | `medium` | 36px | 14px | 16px | Forms and the content of the page. The default: do not set `size` at all. | None; it is the scale everything else is drawn for. |
24
24
  | `large` | 44px | 16px | 24px | The one thing the screen is for: a sign-in or checkout button, a call to action on a landing page, a kiosk, a form people fill in on a phone, a reader who needs bigger targets. | Takes room and is loud: in a dense panel it pushes the rest out. |
25
25
 
@@ -44,7 +44,7 @@ Density is added on top of the size (the height and the padding, not the font),
44
44
 
45
45
  **When.** A bar of formatting or editing tools: text style toggles, undo and redo, a few actions.
46
46
 
47
- **Rule.** Every button is `variant="ghost" tone="neutral"`, an icon with an `aria-label`. A toggle is `v-model:pressed`. Group related tools with `TaoToolbarGroup` and split the groups with `TaoToolbarSeparator`.
47
+ **Rule.** Every button is `variant="ghost" tone="neutral"`, an icon with an `aria-label`. A toggle is `v-model:pressed`. Group related tools with `TaoToolbarGroup` and split the groups with `TaoToolbarSeparator`. Leave the size medium: a small toolbar is hard to hit (see "Choosing a size").
48
48
 
49
49
  **Do:**
50
50