haus-tokens 0.2.0 → 0.2.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/README.md CHANGED
@@ -44,7 +44,7 @@ Two kinds of primitive read are documented rather than hidden. Sizes: 31
44
44
  declarations across the haus components take a size off the space ladder, on
45
45
  `height`, `width`, `min-*`/`max-*` and `transform` offsets, because a size is a
46
46
  value rather than a role. They are the avatar sizes, the checkbox and radio
47
- boxes, the toggle track and thumb, and a few min/max bounds. And 56 read a primitive that has no semantic alias
47
+ boxes, the toggle track and thumb, and a few min/max bounds. And 61 read a primitive that has no semantic alias
48
48
  because the primitive's own name already is the role: `--font-sans`,
49
49
  `--weight-*`, `--border-width-*`, `--opacity-disabled`, `--icon-sm`,
50
50
  `--z-modal`. No component reads a colour, radius, shadow or motion primitive,
@@ -142,6 +142,12 @@
142
142
  --z-toast: 500; /* Toast notifications */
143
143
  --z-tooltip: 600; /* Tooltips, always on top */
144
144
 
145
+ /* ── Control heights ─────────────────────────────────────────────────────── */
146
+ /* A scale of its own: 36px and 44px are not steps on the 4px spacing ladder. */
147
+ --control-height-sm: 1.75rem; /* 28px, Button sm. Pointer-only density; below the 24px minimum for a target with no spacing exception. */
148
+ --control-height-md: 2.25rem; /* 36px, the default for Button, Input and Select */
149
+ --control-height-lg: 2.75rem; /* 44px, Button lg. The WCAG 2.5.8 AAA target size, and Apple's HIG minimum. */
150
+
145
151
  /* ── Border width ────────────────────────────────────────────────────────── */
146
152
  --border-width-default: 1px; /* Borders, dividers, inputs */
147
153
  --border-width-thick: 2px; /* Focus rings, active emphasis */
@@ -13,7 +13,7 @@
13
13
  entry offsets, the textarea's minimum height and the select chevron's
14
14
  offset. A size is a value, not a role, and calling a 16px checkbox
15
15
  --space-inset-md would say something untrue.
16
- · 56 read a primitive that has no alias here because its own name already
16
+ · 61 read a primitive that has no alias here because its own name already
17
17
  is the role: --font-sans, --weight-*, --border-width-*, --tracking-normal,
18
18
  --opacity-disabled, --icon-sm, --z-modal.
19
19
 
@@ -231,8 +231,11 @@
231
231
  and a few min/max bounds read the primitive ladder directly: they are
232
232
  values, and naming them as inset or gap would say something untrue about
233
233
  what they are. Thirty-one declarations do this deliberately.
234
- Button, Input and Select set min-height in raw pixels instead, which is
235
- neither, and is issue territory rather than a decision recorded here. */
234
+
235
+ Control heights are not on that ladder at all: 36px and 44px are not
236
+ steps of it. They are their own primitive scale, --control-height-sm,
237
+ -md and -lg, whose names are already the role, so they are read direct
238
+ like --border-width-default. */
236
239
 
237
240
 
238
241
  }
package/dist/tokens.json CHANGED
@@ -239,6 +239,22 @@
239
239
  "toast": { "$value": 500, "$description": "Toast notifications" },
240
240
  "tooltip": { "$value": 600, "$description": "Tooltips, always on top" }
241
241
  },
242
+ "controlHeight": {
243
+ "$type": "dimension",
244
+ "$description": "Minimum height of an interactive control. A scale of three, not a step off the spacing ladder: 36px and 44px are not on it.",
245
+ "sm": {
246
+ "$value": "1.75rem",
247
+ "$description": "28px, Button sm. Pointer-only density; below the 24px minimum for a target with no spacing exception."
248
+ },
249
+ "md": {
250
+ "$value": "2.25rem",
251
+ "$description": "36px, the default for Button, Input and Select"
252
+ },
253
+ "lg": {
254
+ "$value": "2.75rem",
255
+ "$description": "44px, Button lg. The WCAG 2.5.8 AAA target size, and Apple's HIG minimum."
256
+ }
257
+ },
242
258
  "borderWidth": {
243
259
  "$type": "dimension",
244
260
  "default": { "$value": "1px", "$description": "Borders, dividers, inputs" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haus-tokens",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "haus design tokens: OKLCH colour, type, spacing, radius, shadow and motion, as W3C-DTCG JSON, CSS custom properties, and typed JS constants.",
5
5
  "license": "MIT",
6
6
  "author": "hipuku",