haus-tokens 4.2.0 → 5.1.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/README.md +26 -22
- package/dist/brand.css +2 -2
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/primitives.css +16 -14
- package/dist/semantics.css +27 -24
- package/dist/tokens.json +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,40 +16,41 @@ npm install haus-tokens
|
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
|
-
import 'haus-tokens/
|
|
20
|
-
import 'haus-tokens/semantics.css'
|
|
21
|
-
import 'haus-tokens/motion.css'
|
|
19
|
+
import 'haus-tokens/index.css'
|
|
22
20
|
```
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
`index.css` loads the layer order, then `primitives`, `brand`, `semantics` and
|
|
23
|
+
`motion`, in the order they have to load. They are exported individually too,
|
|
24
|
+
and replacing `brand.css` is the documented case, but leave one out and every
|
|
25
|
+
role that reads it drops silently. All of them are wrapped in `@layer haus.*`,
|
|
26
|
+
so your own styles win without a specificity fight.
|
|
27
27
|
|
|
28
|
-
## The
|
|
28
|
+
## The layers
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
primitives.css --aronia-500: oklch(52% 0.138 300)
|
|
31
|
+
primitives.css --haus-aronia-500: oklch(52% 0.138 300)
|
|
32
32
|
↓
|
|
33
|
-
|
|
33
|
+
brand.css --haus-brand-primary-default: var(--haus-aronia-500)
|
|
34
34
|
↓
|
|
35
|
-
|
|
35
|
+
semantics.css --haus-color-primary-default: var(--haus-brand-primary-default)
|
|
36
|
+
↓
|
|
37
|
+
your component background: var(--haus-color-primary-default)
|
|
36
38
|
```
|
|
37
39
|
|
|
38
|
-
A primitive is a raw value with no opinion;
|
|
39
|
-
decision. Components read the semantic layer for colour, type, spacing, radius,
|
|
40
|
+
A primitive is a raw value with no opinion; the brand says which primitive each
|
|
41
|
+
role takes; a semantic token carries the decision. Components read the semantic layer for colour, type, spacing, radius,
|
|
40
42
|
elevation and motion, and reaching past it is what makes a theme swap
|
|
41
43
|
impossible later.
|
|
42
44
|
|
|
43
|
-
Two kinds of primitive read are documented rather than hidden. Sizes:
|
|
45
|
+
Two kinds of primitive read are documented rather than hidden. Sizes: 28
|
|
44
46
|
declarations across the haus components take a size off the space ladder, on
|
|
45
47
|
`height`, `width`, `min-*`/`max-*` and `transform` offsets, because a size is a
|
|
46
48
|
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
|
|
48
|
-
alias because the primitive's own name already is
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
motion primitive, and a test in `haus-components` holds that line.
|
|
49
|
+
boxes, the toggle track and thumb, and a few min/max bounds. And 31 read a
|
|
50
|
+
primitive that has no semantic alias because the primitive's own name already is
|
|
51
|
+
the role: thirteen control heights and eighteen icon sizes. No component reads a
|
|
52
|
+
colour, radius, shadow, stacking or motion primitive, and a test in
|
|
53
|
+
`haus-components` holds that line.
|
|
53
54
|
|
|
54
55
|
That second number went 61 to 77 when the six overlay components landed, then
|
|
55
56
|
**77 to 41 at the 1.0 cut**, and the fall is the part worth reading. `Popover`
|
|
@@ -58,7 +59,9 @@ primitives had no role between them, and a product wanting the stacking order
|
|
|
58
59
|
had to read `primitives.css` for it, which is why drift and vault each settled
|
|
59
60
|
one for themselves. haus#27 put the ladders in `primitives.css` and the names in
|
|
60
61
|
`semantics.css`. **No component declaration changed**: the same reads resolve
|
|
61
|
-
one layer higher.
|
|
62
|
+
one layer higher. It fell again when typeface became a brand entry and the 32
|
|
63
|
+
`--haus-font-sans` reads became role reads, and rose with IconButton and the
|
|
64
|
+
themed Select. `tokens.test.ts` in `haus-components` carries the whole ledger.
|
|
62
65
|
|
|
63
66
|
## Typed constants
|
|
64
67
|
|
|
@@ -161,8 +164,9 @@ a scale while still appearing to be on it.
|
|
|
161
164
|
**Which files you pass as `upstream` decides the question.** Include `brand.css`
|
|
162
165
|
and you are asking *do I restate anything haus ships, its colour choices
|
|
163
166
|
included*. Leave it out and you are asking *do I restate anything structural*,
|
|
164
|
-
with your palette treated as your business. Against drift
|
|
165
|
-
and 89, and the 54 in the gap
|
|
167
|
+
with your palette treated as your business. Against drift, while it still
|
|
168
|
+
consumed haus, the two answers were 143 and 89, and the 54 in the gap were
|
|
169
|
+
exactly its brand.
|
|
166
170
|
|
|
167
171
|
Overriding a role is fine and several consumers should. Overriding it to our
|
|
168
172
|
value is the thing this reports.
|
package/dist/brand.css
CHANGED
|
@@ -191,11 +191,11 @@
|
|
|
191
191
|
were 180px, 260px and 340px hardcoded in Popover.module.css, read by
|
|
192
192
|
nothing that could theme them. A brand entry for the same reason, since a
|
|
193
193
|
panel width is a proportion of the product's layout, and four steps because
|
|
194
|
-
the
|
|
194
|
+
the Select popup a two-line option row needs is wider than a form panel. */
|
|
195
195
|
--haus-brand-popover-width-sm: var(--haus-panel-width-sm); /* 180px: a short action menu */
|
|
196
196
|
--haus-brand-popover-width-md: var(--haus-panel-width-md); /* 260px: the default */
|
|
197
197
|
--haus-brand-popover-width-lg: var(--haus-panel-width-lg); /* 340px: a panel holding a form */
|
|
198
|
-
--haus-brand-popover-width-xl: var(--haus-panel-width-xl); /* 420px:
|
|
198
|
+
--haus-brand-popover-width-xl: var(--haus-panel-width-xl); /* 420px: Select two-line rows */
|
|
199
199
|
|
|
200
200
|
/* ── Typeface ────────────────────────────────────────────────────────── */
|
|
201
201
|
/* haus#54. Until now `--haus-font-sans` and `--haus-font-mono` were
|
package/dist/index.cjs
CHANGED
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/brand.ts","../src/index.ts"],"names":[],"mappings":";;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AA,IACJ,KAAA,EAAO;AAAA;AAEX","file":"index.cjs","sourcesContent":["/* ─── haus / primitives ──────────────────────────────────────────────────────\n Raw values only. No component or semantic meaning.\n Nothing outside this file should define raw values.\n Components must never reference these directly. Use semantics.css.\n\n GENERATED FROM src/tokens.json. Do not edit.\n Regenerate with `npm run tokens`; `npm run tokens:check` fails CI if stale.\n ─────────────────────────────────────────────────────────────────────────── */\n\n/**\n * The entries every brand must supply, generated from brand.css.\n *\n * A brand file is CSS, so this cannot check it directly. What it does check is\n * the object form: build a brand in TypeScript, satisfy this type, and a missing\n * or misspelled role is a compile error rather than an unresolved var() that\n * drops a declaration with no warning at all.\n */\nexport interface BrandMapBase {\n '--haus-brand-surface-default': string\n '--haus-brand-surface-subtle': string\n '--haus-brand-surface-raised': string\n '--haus-brand-surface-overlay': string\n '--haus-brand-surface-sunken': string\n '--haus-brand-surface-inverse': string\n '--haus-brand-surface-disabled': string\n '--haus-brand-surface-inverse-hover': string\n '--haus-brand-ink-primary': string\n '--haus-brand-ink-secondary': string\n '--haus-brand-ink-tertiary': string\n '--haus-brand-ink-disabled': string\n '--haus-brand-ink-inverse': string\n '--haus-brand-ink-link': string\n '--haus-brand-ink-on-primary': string\n '--haus-brand-border-subtle': string\n '--haus-brand-border-default': string\n '--haus-brand-border-strong': string\n '--haus-brand-border-disabled': string\n '--haus-brand-border-inverse': string\n '--haus-brand-border-inverse-hover': string\n '--haus-brand-primary-default': string\n '--haus-brand-primary-hover': string\n '--haus-brand-primary-pressed': string\n '--haus-brand-primary-subtle': string\n '--haus-brand-primary-on-subtle': string\n '--haus-brand-primary-disabled': string\n '--haus-brand-backdrop': string\n}\n\n/**\n * The optional half: info, success, warning and error.\n *\n * A product whose statuses are not those four semantics omits this tier and\n * inherits haus's from :root, because custom properties inherit and a named\n * brand only overrides what it declares. Optional here, and all-or-nothing per\n * ramp in brand.test.ts, which types cannot express.\n */\nexport interface BrandMapFeedback {\n '--haus-brand-info-subtle': string\n '--haus-brand-info-border': string\n '--haus-brand-info-default': string\n '--haus-brand-info-on-subtle': string\n '--haus-brand-info-on-default': string\n '--haus-brand-info-emphasis': string\n '--haus-brand-success-subtle': string\n '--haus-brand-success-border': string\n '--haus-brand-success-default': string\n '--haus-brand-success-on-subtle': string\n '--haus-brand-success-on-default': string\n '--haus-brand-success-solid': string\n '--haus-brand-success-emphasis': string\n '--haus-brand-warning-subtle': string\n '--haus-brand-warning-border': string\n '--haus-brand-warning-default': string\n '--haus-brand-warning-on-subtle': string\n '--haus-brand-warning-on-default': string\n '--haus-brand-warning-solid': string\n '--haus-brand-warning-emphasis': string\n '--haus-brand-error-subtle': string\n '--haus-brand-error-border': string\n '--haus-brand-error-default': string\n '--haus-brand-error-on-subtle': string\n '--haus-brand-error-on-default': string\n '--haus-brand-error-emphasis': string\n}\n\n/**\n * The other optional half: what a product re-decides that is not a colour.\n *\n * Radius, elevation, modal width and typeface, taken from what drift and vault\n * actually changed. Not z-index, opacity, border-width or spacing: nobody\n * re-decides those, and the overrides that looked like it were the literal\n * values of haus's own primitives typed out. All-or-nothing per group, in\n * brand.test.ts.\n */\nexport interface BrandMapForm {\n '--haus-brand-radius-control': string\n '--haus-brand-radius-surface': string\n '--haus-brand-radius-overlay': string\n '--haus-brand-radius-marker': string\n '--haus-brand-elevation-raised': string\n '--haus-brand-elevation-floating': string\n '--haus-brand-elevation-overlay': string\n '--haus-brand-modal-width-sm': string\n '--haus-brand-modal-width-md': string\n '--haus-brand-modal-width-lg': string\n '--haus-brand-modal-width-xl': string\n '--haus-brand-popover-width-sm': string\n '--haus-brand-popover-width-md': string\n '--haus-brand-popover-width-lg': string\n '--haus-brand-popover-width-xl': string\n '--haus-brand-font-sans': string\n '--haus-brand-font-mono': string\n}\n\n/** A complete brand: the base tier, and as much of the optional tiers as applies. */\nexport type BrandMap = BrandMapBase & Partial<BrandMapFeedback> & Partial<BrandMapForm>\n\n/** The role names themselves, for anyone generating a brand rather than writing one. */\nexport const brandRoles = [\n '--haus-brand-surface-default',\n '--haus-brand-surface-subtle',\n '--haus-brand-surface-raised',\n '--haus-brand-surface-overlay',\n '--haus-brand-surface-sunken',\n '--haus-brand-surface-inverse',\n '--haus-brand-surface-disabled',\n '--haus-brand-surface-inverse-hover',\n '--haus-brand-ink-primary',\n '--haus-brand-ink-secondary',\n '--haus-brand-ink-tertiary',\n '--haus-brand-ink-disabled',\n '--haus-brand-ink-inverse',\n '--haus-brand-ink-link',\n '--haus-brand-ink-on-primary',\n '--haus-brand-border-subtle',\n '--haus-brand-border-default',\n '--haus-brand-border-strong',\n '--haus-brand-border-disabled',\n '--haus-brand-border-inverse',\n '--haus-brand-border-inverse-hover',\n '--haus-brand-primary-default',\n '--haus-brand-primary-hover',\n '--haus-brand-primary-pressed',\n '--haus-brand-primary-subtle',\n '--haus-brand-primary-on-subtle',\n '--haus-brand-primary-disabled',\n '--haus-brand-backdrop',\n '--haus-brand-info-subtle',\n '--haus-brand-info-border',\n '--haus-brand-info-default',\n '--haus-brand-info-on-subtle',\n '--haus-brand-info-on-default',\n '--haus-brand-info-emphasis',\n '--haus-brand-success-subtle',\n '--haus-brand-success-border',\n '--haus-brand-success-default',\n '--haus-brand-success-on-subtle',\n '--haus-brand-success-on-default',\n '--haus-brand-success-solid',\n '--haus-brand-success-emphasis',\n '--haus-brand-warning-subtle',\n '--haus-brand-warning-border',\n '--haus-brand-warning-default',\n '--haus-brand-warning-on-subtle',\n '--haus-brand-warning-on-default',\n '--haus-brand-warning-solid',\n '--haus-brand-warning-emphasis',\n '--haus-brand-error-subtle',\n '--haus-brand-error-border',\n '--haus-brand-error-default',\n '--haus-brand-error-on-subtle',\n '--haus-brand-error-on-default',\n '--haus-brand-error-emphasis',\n '--haus-brand-radius-control',\n '--haus-brand-radius-surface',\n '--haus-brand-radius-overlay',\n '--haus-brand-radius-marker',\n '--haus-brand-elevation-raised',\n '--haus-brand-elevation-floating',\n '--haus-brand-elevation-overlay',\n '--haus-brand-modal-width-sm',\n '--haus-brand-modal-width-md',\n '--haus-brand-modal-width-lg',\n '--haus-brand-modal-width-xl',\n '--haus-brand-popover-width-sm',\n '--haus-brand-popover-width-md',\n '--haus-brand-popover-width-lg',\n '--haus-brand-popover-width-xl',\n '--haus-brand-font-sans',\n '--haus-brand-font-mono',\n] as const\n\n/** The required half. A brand supplying fewer than these renders unstyled. */\nexport const brandRolesBase = [\n '--haus-brand-surface-default',\n '--haus-brand-surface-subtle',\n '--haus-brand-surface-raised',\n '--haus-brand-surface-overlay',\n '--haus-brand-surface-sunken',\n '--haus-brand-surface-inverse',\n '--haus-brand-surface-disabled',\n '--haus-brand-surface-inverse-hover',\n '--haus-brand-ink-primary',\n '--haus-brand-ink-secondary',\n '--haus-brand-ink-tertiary',\n '--haus-brand-ink-disabled',\n '--haus-brand-ink-inverse',\n '--haus-brand-ink-link',\n '--haus-brand-ink-on-primary',\n '--haus-brand-border-subtle',\n '--haus-brand-border-default',\n '--haus-brand-border-strong',\n '--haus-brand-border-disabled',\n '--haus-brand-border-inverse',\n '--haus-brand-border-inverse-hover',\n '--haus-brand-primary-default',\n '--haus-brand-primary-hover',\n '--haus-brand-primary-pressed',\n '--haus-brand-primary-subtle',\n '--haus-brand-primary-on-subtle',\n '--haus-brand-primary-disabled',\n '--haus-brand-backdrop',\n] as const\n\n/** The optional colour half, grouped by the ramp that has to be complete or absent. */\nexport const brandRolesFeedback = [\n '--haus-brand-info-subtle',\n '--haus-brand-info-border',\n '--haus-brand-info-default',\n '--haus-brand-info-on-subtle',\n '--haus-brand-info-on-default',\n '--haus-brand-info-emphasis',\n '--haus-brand-success-subtle',\n '--haus-brand-success-border',\n '--haus-brand-success-default',\n '--haus-brand-success-on-subtle',\n '--haus-brand-success-on-default',\n '--haus-brand-success-solid',\n '--haus-brand-success-emphasis',\n '--haus-brand-warning-subtle',\n '--haus-brand-warning-border',\n '--haus-brand-warning-default',\n '--haus-brand-warning-on-subtle',\n '--haus-brand-warning-on-default',\n '--haus-brand-warning-solid',\n '--haus-brand-warning-emphasis',\n '--haus-brand-error-subtle',\n '--haus-brand-error-border',\n '--haus-brand-error-default',\n '--haus-brand-error-on-subtle',\n '--haus-brand-error-on-default',\n '--haus-brand-error-emphasis',\n] as const\n\n/** The optional non-colour half: radius, elevation, modal width and typeface. */\nexport const brandRolesForm = [\n '--haus-brand-radius-control',\n '--haus-brand-radius-surface',\n '--haus-brand-radius-overlay',\n '--haus-brand-radius-marker',\n '--haus-brand-elevation-raised',\n '--haus-brand-elevation-floating',\n '--haus-brand-elevation-overlay',\n '--haus-brand-modal-width-sm',\n '--haus-brand-modal-width-md',\n '--haus-brand-modal-width-lg',\n '--haus-brand-modal-width-xl',\n '--haus-brand-popover-width-sm',\n '--haus-brand-popover-width-md',\n '--haus-brand-popover-width-lg',\n '--haus-brand-popover-width-xl',\n '--haus-brand-font-sans',\n '--haus-brand-font-mono',\n] as const\n","/* ─── haus / tokens ──────────────────────────────────────────────────────────\n Typed constants for the primitive layer.\n\n The CSS custom properties are the runtime form; this exists for the places\n they cannot reach: @media conditions, build config, style-in-JS. Semantic\n tokens are deliberately absent: their whole job is to be swappable at\n runtime, which freezing them into a constant would defeat.\n\n GENERATED FROM src/tokens.json. Do not edit.\n Regenerate with `npm run tokens`; `npm run tokens:check` fails CI if stale.\n ─────────────────────────────────────────────────────────────────────────── */\n\nexport const tokens = {\n color: {\n aronia: {\n \"100\": \"oklch(97% 0.012 300)\",\n \"200\": \"oklch(92% 0.028 300)\",\n \"300\": \"oklch(84% 0.058 300)\",\n \"400\": \"oklch(72% 0.100 300)\",\n \"500\": \"oklch(52% 0.138 300)\",\n \"600\": \"oklch(43% 0.125 300)\",\n \"700\": \"oklch(35% 0.105 300)\",\n \"800\": \"oklch(26% 0.080 300)\",\n \"850\": \"oklch(22% 0.066 300)\",\n \"900\": \"oklch(18% 0.052 300)\",\n \"950\": \"oklch(12% 0.032 300)\",\n },\n damson: {\n \"0\": \"oklch(100% 0 0)\",\n \"50\": \"oklch(99% 0.003 290)\",\n \"100\": \"oklch(97% 0.006 290)\",\n \"200\": \"oklch(93% 0.008 290)\",\n \"300\": \"oklch(86% 0.010 290)\",\n \"400\": \"oklch(74% 0.010 290)\",\n \"500\": \"oklch(60% 0.008 290)\",\n \"600\": \"oklch(48% 0.007 290)\",\n \"700\": \"oklch(37% 0.006 290)\",\n \"800\": \"oklch(27% 0.005 290)\",\n \"900\": \"oklch(18% 0.003 290)\",\n \"950\": \"oklch(11% 0.002 290)\",\n },\n elderberry: {\n \"100\": \"oklch(97% 0.020 265)\",\n \"200\": \"oklch(93% 0.040 265)\",\n \"500\": \"oklch(55% 0.200 265)\",\n \"700\": \"oklch(42% 0.160 265)\",\n \"900\": \"oklch(30% 0.120 265)\",\n },\n greengage: {\n \"100\": \"oklch(97% 0.030 148)\",\n \"200\": \"oklch(93% 0.055 148)\",\n \"500\": \"oklch(58% 0.185 148)\",\n \"700\": \"oklch(45% 0.150 148)\",\n \"900\": \"oklch(33% 0.110 148)\",\n },\n mango: {\n \"100\": \"oklch(97% 0.025 65)\",\n \"200\": \"oklch(93% 0.045 65)\",\n \"500\": \"oklch(60% 0.175 65)\",\n \"700\": \"oklch(47% 0.142 65)\",\n \"900\": \"oklch(38% 0.110 65)\",\n },\n cherry: {\n \"100\": \"oklch(97% 0.030 27)\",\n \"200\": \"oklch(93% 0.055 27)\",\n \"500\": \"oklch(58% 0.200 27)\",\n \"700\": \"oklch(44% 0.168 27)\",\n \"900\": \"oklch(33% 0.110 27)\",\n },\n },\n font: {\n // family removed with haus#54; it is a brand entry now, not a primitive.\n size: {\n \"11\": \"0.6875rem\",\n \"12\": \"0.75rem\",\n \"13\": \"0.8125rem\",\n \"14\": \"0.875rem\",\n \"16\": \"1rem\",\n \"20\": \"1.25rem\",\n \"24\": \"1.5rem\",\n \"28\": \"1.75rem\",\n \"30\": \"1.875rem\",\n },\n weight: {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n lineHeight: {\n tight: 1.15,\n tighter: 1.2,\n snug: 1.25,\n compact: 1.3,\n normal: 1.4,\n relaxed: 1.5,\n loose: 1.6,\n },\n tracking: {\n tightest: \"-0.03em\",\n tighter: \"-0.02em\",\n tight: \"-0.01em\",\n normal: \"0em\",\n wide: \"0.02em\",\n wider: \"0.04em\",\n widest: \"0.08em\",\n },\n },\n spacing: {\n \"1\": \"0.25rem\",\n \"2\": \"0.5rem\",\n \"3\": \"0.75rem\",\n \"4\": \"1rem\",\n \"5\": \"1.25rem\",\n \"6\": \"1.5rem\",\n \"7\": \"1.75rem\",\n \"8\": \"2rem\",\n \"10\": \"2.5rem\",\n \"12\": \"3rem\",\n \"16\": \"4rem\",\n \"20\": \"5rem\",\n },\n radius: {\n none: \"0\",\n sm: \"0.25rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n duration: {\n instant: \"50ms\",\n fast: \"100ms\",\n normal: \"200ms\",\n moderate: \"300ms\",\n slow: \"500ms\",\n reduced: \"0ms\",\n },\n easing: {\n enter: \"cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n exit: \"cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n move: \"cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n spring: \"cubic-bezier(0.34, 1.56, 0.64, 1.00)\",\n linear: \"linear\",\n },\n motion: {\n \"fade-in\": \"200ms cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n \"fade-out\": \"100ms cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n \"slide-in\": \"300ms cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n \"slide-out\": \"100ms cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n micro: \"100ms cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n interactive: \"200ms cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n },\n shadow: {\n none: \"none\",\n sm: \"0 1px 2px oklch(18% 0.003 290 / 0.06)\",\n md: \"0 4px 6px -1px oklch(18% 0.003 290 / 0.10), 0 2px 4px -2px oklch(18% 0.003 290 / 0.10)\",\n lg: \"0 10px 15px -3px oklch(18% 0.003 290 / 0.10), 0 4px 6px -4px oklch(18% 0.003 290 / 0.07)\",\n xl: \"0 20px 25px -5px oklch(18% 0.003 290 / 0.10), 0 8px 10px -6px oklch(18% 0.003 290 / 0.10)\",\n },\n controlHeight: {\n xs: \"1.5rem\",\n sm: \"1.75rem\",\n md: \"2.25rem\",\n lg: \"2.75rem\",\n },\n zIndex: {\n \"0\": 0,\n \"10\": 10,\n \"100\": 100,\n \"200\": 200,\n \"300\": 300,\n \"400\": 400,\n \"500\": 500,\n \"600\": 600,\n },\n borderWidth: {\n \"1\": \"1px\",\n \"2\": \"2px\",\n },\n opacity: {\n \"40\": 0.4,\n \"60\": 0.6,\n },\n iconSize: {\n xs: \"0.75rem\",\n sm: \"1rem\",\n md: \"1.25rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n },\n breakpoint: {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\",\n },\n} as const\n\nexport type Tokens = typeof tokens\n\n/* The brand map's type and role list, generated from brand.css. Re-exported here\n so a consumer has one entry point rather than two. */\nexport type { BrandMap, BrandMapBase, BrandMapFeedback, BrandMapForm } from './brand'\nexport { brandRoles, brandRolesBase, brandRolesFeedback, brandRolesForm } from './brand'\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/brand.ts","../src/index.ts"],"names":[],"mappings":";;;AAsHO,IAAM,UAAA,GAAa;AAAA,EACxB,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,+BAAA;AAAA,EACA,oCAAA;AAAA,EACA,0BAAA;AAAA,EACA,4BAAA;AAAA,EACA,2BAAA;AAAA,EACA,2BAAA;AAAA,EACA,0BAAA;AAAA,EACA,uBAAA;AAAA,EACA,6BAAA;AAAA,E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,EAAA,EAAI,wFAAA;AAAA,IACJ,EAAA,EAAI,0FAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AAAA,EACA,aAAA,EAAe;AAAA,IACb,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,GAAA,EAAK,CAAA;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO;AAAA,GACT;AAAA,EACA,WAAA,EAAa;AAAA,IACX,GAAA,EAAK,KAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,GAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,MAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AAAA,EACA,UAAA,EAAY;AAAA,IACV,EAAA,EAAI,OAAA;AAAA,IACJ,EAAA,EAAI,OAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,KAAA,EAAO;AAAA;AAEX","file":"index.cjs","sourcesContent":["/* ─── haus / primitives ──────────────────────────────────────────────────────\n Raw values only. No component or semantic meaning.\n Nothing outside this file should define raw values.\n Components must never reference these directly. Use semantics.css.\n\n GENERATED FROM src/tokens.json. Do not edit.\n Regenerate with `npm run tokens`; `npm run tokens:check` fails CI if stale.\n ─────────────────────────────────────────────────────────────────────────── */\n\n/**\n * The entries every brand must supply, generated from brand.css.\n *\n * A brand file is CSS, so this cannot check it directly. What it does check is\n * the object form: build a brand in TypeScript, satisfy this type, and a missing\n * or misspelled role is a compile error rather than an unresolved var() that\n * drops a declaration with no warning at all.\n */\nexport interface BrandMapBase {\n '--haus-brand-surface-default': string\n '--haus-brand-surface-subtle': string\n '--haus-brand-surface-raised': string\n '--haus-brand-surface-overlay': string\n '--haus-brand-surface-sunken': string\n '--haus-brand-surface-inverse': string\n '--haus-brand-surface-disabled': string\n '--haus-brand-surface-inverse-hover': string\n '--haus-brand-ink-primary': string\n '--haus-brand-ink-secondary': string\n '--haus-brand-ink-tertiary': string\n '--haus-brand-ink-disabled': string\n '--haus-brand-ink-inverse': string\n '--haus-brand-ink-link': string\n '--haus-brand-ink-on-primary': string\n '--haus-brand-border-subtle': string\n '--haus-brand-border-default': string\n '--haus-brand-border-strong': string\n '--haus-brand-border-disabled': string\n '--haus-brand-border-inverse': string\n '--haus-brand-border-inverse-hover': string\n '--haus-brand-primary-default': string\n '--haus-brand-primary-hover': string\n '--haus-brand-primary-pressed': string\n '--haus-brand-primary-subtle': string\n '--haus-brand-primary-on-subtle': string\n '--haus-brand-primary-disabled': string\n '--haus-brand-backdrop': string\n}\n\n/**\n * The optional half: info, success, warning and error.\n *\n * A product whose statuses are not those four semantics omits this tier and\n * inherits haus's from :root, because custom properties inherit and a named\n * brand only overrides what it declares. Optional here, and all-or-nothing per\n * ramp in brand.test.ts, which types cannot express.\n */\nexport interface BrandMapFeedback {\n '--haus-brand-info-subtle': string\n '--haus-brand-info-border': string\n '--haus-brand-info-default': string\n '--haus-brand-info-on-subtle': string\n '--haus-brand-info-on-default': string\n '--haus-brand-info-emphasis': string\n '--haus-brand-success-subtle': string\n '--haus-brand-success-border': string\n '--haus-brand-success-default': string\n '--haus-brand-success-on-subtle': string\n '--haus-brand-success-on-default': string\n '--haus-brand-success-solid': string\n '--haus-brand-success-emphasis': string\n '--haus-brand-warning-subtle': string\n '--haus-brand-warning-border': string\n '--haus-brand-warning-default': string\n '--haus-brand-warning-on-subtle': string\n '--haus-brand-warning-on-default': string\n '--haus-brand-warning-solid': string\n '--haus-brand-warning-emphasis': string\n '--haus-brand-error-subtle': string\n '--haus-brand-error-border': string\n '--haus-brand-error-default': string\n '--haus-brand-error-on-subtle': string\n '--haus-brand-error-on-default': string\n '--haus-brand-error-emphasis': string\n}\n\n/**\n * The other optional half: what a product re-decides that is not a colour.\n *\n * Radius, elevation, modal width and typeface, taken from what drift and vault\n * actually changed. Not z-index, opacity, border-width or spacing: nobody\n * re-decides those, and the overrides that looked like it were the literal\n * values of haus's own primitives typed out. All-or-nothing per group, in\n * brand.test.ts.\n */\nexport interface BrandMapForm {\n '--haus-brand-radius-control': string\n '--haus-brand-radius-surface': string\n '--haus-brand-radius-overlay': string\n '--haus-brand-radius-marker': string\n '--haus-brand-elevation-raised': string\n '--haus-brand-elevation-floating': string\n '--haus-brand-elevation-overlay': string\n '--haus-brand-modal-width-sm': string\n '--haus-brand-modal-width-md': string\n '--haus-brand-modal-width-lg': string\n '--haus-brand-modal-width-xl': string\n '--haus-brand-popover-width-sm': string\n '--haus-brand-popover-width-md': string\n '--haus-brand-popover-width-lg': string\n '--haus-brand-popover-width-xl': string\n '--haus-brand-font-sans': string\n '--haus-brand-font-mono': string\n}\n\n/** A complete brand: the base tier, and as much of the optional tiers as applies. */\nexport type BrandMap = BrandMapBase & Partial<BrandMapFeedback> & Partial<BrandMapForm>\n\n/** The role names themselves, for anyone generating a brand rather than writing one. */\nexport const brandRoles = [\n '--haus-brand-surface-default',\n '--haus-brand-surface-subtle',\n '--haus-brand-surface-raised',\n '--haus-brand-surface-overlay',\n '--haus-brand-surface-sunken',\n '--haus-brand-surface-inverse',\n '--haus-brand-surface-disabled',\n '--haus-brand-surface-inverse-hover',\n '--haus-brand-ink-primary',\n '--haus-brand-ink-secondary',\n '--haus-brand-ink-tertiary',\n '--haus-brand-ink-disabled',\n '--haus-brand-ink-inverse',\n '--haus-brand-ink-link',\n '--haus-brand-ink-on-primary',\n '--haus-brand-border-subtle',\n '--haus-brand-border-default',\n '--haus-brand-border-strong',\n '--haus-brand-border-disabled',\n '--haus-brand-border-inverse',\n '--haus-brand-border-inverse-hover',\n '--haus-brand-primary-default',\n '--haus-brand-primary-hover',\n '--haus-brand-primary-pressed',\n '--haus-brand-primary-subtle',\n '--haus-brand-primary-on-subtle',\n '--haus-brand-primary-disabled',\n '--haus-brand-backdrop',\n '--haus-brand-info-subtle',\n '--haus-brand-info-border',\n '--haus-brand-info-default',\n '--haus-brand-info-on-subtle',\n '--haus-brand-info-on-default',\n '--haus-brand-info-emphasis',\n '--haus-brand-success-subtle',\n '--haus-brand-success-border',\n '--haus-brand-success-default',\n '--haus-brand-success-on-subtle',\n '--haus-brand-success-on-default',\n '--haus-brand-success-solid',\n '--haus-brand-success-emphasis',\n '--haus-brand-warning-subtle',\n '--haus-brand-warning-border',\n '--haus-brand-warning-default',\n '--haus-brand-warning-on-subtle',\n '--haus-brand-warning-on-default',\n '--haus-brand-warning-solid',\n '--haus-brand-warning-emphasis',\n '--haus-brand-error-subtle',\n '--haus-brand-error-border',\n '--haus-brand-error-default',\n '--haus-brand-error-on-subtle',\n '--haus-brand-error-on-default',\n '--haus-brand-error-emphasis',\n '--haus-brand-radius-control',\n '--haus-brand-radius-surface',\n '--haus-brand-radius-overlay',\n '--haus-brand-radius-marker',\n '--haus-brand-elevation-raised',\n '--haus-brand-elevation-floating',\n '--haus-brand-elevation-overlay',\n '--haus-brand-modal-width-sm',\n '--haus-brand-modal-width-md',\n '--haus-brand-modal-width-lg',\n '--haus-brand-modal-width-xl',\n '--haus-brand-popover-width-sm',\n '--haus-brand-popover-width-md',\n '--haus-brand-popover-width-lg',\n '--haus-brand-popover-width-xl',\n '--haus-brand-font-sans',\n '--haus-brand-font-mono',\n] as const\n\n/** The required half. A brand supplying fewer than these renders unstyled. */\nexport const brandRolesBase = [\n '--haus-brand-surface-default',\n '--haus-brand-surface-subtle',\n '--haus-brand-surface-raised',\n '--haus-brand-surface-overlay',\n '--haus-brand-surface-sunken',\n '--haus-brand-surface-inverse',\n '--haus-brand-surface-disabled',\n '--haus-brand-surface-inverse-hover',\n '--haus-brand-ink-primary',\n '--haus-brand-ink-secondary',\n '--haus-brand-ink-tertiary',\n '--haus-brand-ink-disabled',\n '--haus-brand-ink-inverse',\n '--haus-brand-ink-link',\n '--haus-brand-ink-on-primary',\n '--haus-brand-border-subtle',\n '--haus-brand-border-default',\n '--haus-brand-border-strong',\n '--haus-brand-border-disabled',\n '--haus-brand-border-inverse',\n '--haus-brand-border-inverse-hover',\n '--haus-brand-primary-default',\n '--haus-brand-primary-hover',\n '--haus-brand-primary-pressed',\n '--haus-brand-primary-subtle',\n '--haus-brand-primary-on-subtle',\n '--haus-brand-primary-disabled',\n '--haus-brand-backdrop',\n] as const\n\n/** The optional colour half, grouped by the ramp that has to be complete or absent. */\nexport const brandRolesFeedback = [\n '--haus-brand-info-subtle',\n '--haus-brand-info-border',\n '--haus-brand-info-default',\n '--haus-brand-info-on-subtle',\n '--haus-brand-info-on-default',\n '--haus-brand-info-emphasis',\n '--haus-brand-success-subtle',\n '--haus-brand-success-border',\n '--haus-brand-success-default',\n '--haus-brand-success-on-subtle',\n '--haus-brand-success-on-default',\n '--haus-brand-success-solid',\n '--haus-brand-success-emphasis',\n '--haus-brand-warning-subtle',\n '--haus-brand-warning-border',\n '--haus-brand-warning-default',\n '--haus-brand-warning-on-subtle',\n '--haus-brand-warning-on-default',\n '--haus-brand-warning-solid',\n '--haus-brand-warning-emphasis',\n '--haus-brand-error-subtle',\n '--haus-brand-error-border',\n '--haus-brand-error-default',\n '--haus-brand-error-on-subtle',\n '--haus-brand-error-on-default',\n '--haus-brand-error-emphasis',\n] as const\n\n/** The optional non-colour half: radius, elevation, modal width and typeface. */\nexport const brandRolesForm = [\n '--haus-brand-radius-control',\n '--haus-brand-radius-surface',\n '--haus-brand-radius-overlay',\n '--haus-brand-radius-marker',\n '--haus-brand-elevation-raised',\n '--haus-brand-elevation-floating',\n '--haus-brand-elevation-overlay',\n '--haus-brand-modal-width-sm',\n '--haus-brand-modal-width-md',\n '--haus-brand-modal-width-lg',\n '--haus-brand-modal-width-xl',\n '--haus-brand-popover-width-sm',\n '--haus-brand-popover-width-md',\n '--haus-brand-popover-width-lg',\n '--haus-brand-popover-width-xl',\n '--haus-brand-font-sans',\n '--haus-brand-font-mono',\n] as const\n","/* ─── haus / tokens ──────────────────────────────────────────────────────────\n Typed constants for the primitive layer.\n\n The CSS custom properties are the runtime form; this exists for the places\n they cannot reach: @media conditions, build config, style-in-JS. Semantic\n tokens are deliberately absent: their whole job is to be swappable at\n runtime, which freezing them into a constant would defeat.\n\n GENERATED FROM src/tokens.json. Do not edit.\n Regenerate with `npm run tokens`; `npm run tokens:check` fails CI if stale.\n ─────────────────────────────────────────────────────────────────────────── */\n\nexport const tokens = {\n color: {\n aronia: {\n \"100\": \"oklch(97% 0.012 300)\",\n \"200\": \"oklch(92% 0.028 300)\",\n \"300\": \"oklch(84% 0.058 300)\",\n \"400\": \"oklch(72% 0.100 300)\",\n \"500\": \"oklch(52% 0.138 300)\",\n \"600\": \"oklch(43% 0.125 300)\",\n \"700\": \"oklch(35% 0.105 300)\",\n \"800\": \"oklch(26% 0.080 300)\",\n \"850\": \"oklch(22% 0.066 300)\",\n \"900\": \"oklch(18% 0.052 300)\",\n \"950\": \"oklch(12% 0.032 300)\",\n },\n damson: {\n \"0\": \"oklch(100% 0 0)\",\n \"50\": \"oklch(99% 0.003 290)\",\n \"100\": \"oklch(97% 0.006 290)\",\n \"200\": \"oklch(93% 0.008 290)\",\n \"300\": \"oklch(86% 0.010 290)\",\n \"400\": \"oklch(74% 0.010 290)\",\n \"500\": \"oklch(60% 0.008 290)\",\n \"600\": \"oklch(48% 0.007 290)\",\n \"700\": \"oklch(37% 0.006 290)\",\n \"800\": \"oklch(27% 0.005 290)\",\n \"900\": \"oklch(18% 0.003 290)\",\n \"950\": \"oklch(11% 0.002 290)\",\n },\n elderberry: {\n \"100\": \"oklch(97% 0.020 265)\",\n \"200\": \"oklch(93% 0.040 265)\",\n \"500\": \"oklch(55% 0.200 265)\",\n \"700\": \"oklch(42% 0.160 265)\",\n \"900\": \"oklch(30% 0.120 265)\",\n },\n greengage: {\n \"100\": \"oklch(97% 0.030 148)\",\n \"200\": \"oklch(93% 0.055 148)\",\n \"500\": \"oklch(58% 0.185 148)\",\n \"700\": \"oklch(45% 0.150 148)\",\n \"900\": \"oklch(33% 0.110 148)\",\n },\n mango: {\n \"100\": \"oklch(97% 0.025 65)\",\n \"200\": \"oklch(93% 0.045 65)\",\n \"500\": \"oklch(60% 0.175 65)\",\n \"700\": \"oklch(47% 0.142 65)\",\n \"900\": \"oklch(38% 0.110 65)\",\n },\n cherry: {\n \"100\": \"oklch(97% 0.030 27)\",\n \"200\": \"oklch(93% 0.055 27)\",\n \"500\": \"oklch(58% 0.200 27)\",\n \"700\": \"oklch(44% 0.168 27)\",\n \"900\": \"oklch(33% 0.110 27)\",\n },\n },\n font: {\n // family removed with haus#54; it is a brand entry now, not a primitive.\n size: {\n \"11\": \"0.6875rem\",\n \"12\": \"0.75rem\",\n \"13\": \"0.8125rem\",\n \"14\": \"0.875rem\",\n \"16\": \"1rem\",\n \"20\": \"1.25rem\",\n \"24\": \"1.5rem\",\n \"28\": \"1.75rem\",\n \"30\": \"1.875rem\",\n },\n weight: {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n lineHeight: {\n tight: 1.15,\n tighter: 1.2,\n snug: 1.25,\n compact: 1.3,\n normal: 1.4,\n relaxed: 1.5,\n loose: 1.6,\n },\n tracking: {\n tightest: \"-0.03em\",\n tighter: \"-0.02em\",\n tight: \"-0.01em\",\n normal: \"0em\",\n wide: \"0.02em\",\n wider: \"0.04em\",\n widest: \"0.08em\",\n },\n },\n spacing: {\n \"1\": \"0.25rem\",\n \"2\": \"0.5rem\",\n \"3\": \"0.75rem\",\n \"4\": \"1rem\",\n \"5\": \"1.25rem\",\n \"6\": \"1.5rem\",\n \"7\": \"1.75rem\",\n \"8\": \"2rem\",\n \"10\": \"2.5rem\",\n \"12\": \"3rem\",\n \"16\": \"4rem\",\n \"20\": \"5rem\",\n px: \"1px\",\n \"0-5\": \"0.125rem\",\n },\n radius: {\n none: \"0\",\n sm: \"0.25rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n duration: {\n instant: \"50ms\",\n fast: \"100ms\",\n normal: \"200ms\",\n moderate: \"300ms\",\n slow: \"500ms\",\n reduced: \"0ms\",\n },\n easing: {\n enter: \"cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n exit: \"cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n move: \"cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n spring: \"cubic-bezier(0.34, 1.56, 0.64, 1.00)\",\n linear: \"linear\",\n },\n motion: {\n \"fade-in\": \"200ms cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n \"fade-out\": \"100ms cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n \"slide-in\": \"300ms cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n \"slide-out\": \"100ms cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n micro: \"100ms cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n interactive: \"200ms cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n },\n shadow: {\n none: \"none\",\n sm: \"0 1px 2px oklch(18% 0.003 290 / 0.06)\",\n md: \"0 4px 6px -1px oklch(18% 0.003 290 / 0.10), 0 2px 4px -2px oklch(18% 0.003 290 / 0.10)\",\n lg: \"0 10px 15px -3px oklch(18% 0.003 290 / 0.10), 0 4px 6px -4px oklch(18% 0.003 290 / 0.07)\",\n xl: \"0 20px 25px -5px oklch(18% 0.003 290 / 0.10), 0 8px 10px -6px oklch(18% 0.003 290 / 0.10)\",\n },\n controlHeight: {\n xs: \"1.5rem\",\n sm: \"1.75rem\",\n md: \"2.25rem\",\n lg: \"2.75rem\",\n },\n zIndex: {\n \"0\": 0,\n \"10\": 10,\n \"100\": 100,\n \"200\": 200,\n \"300\": 300,\n \"400\": 400,\n \"500\": 500,\n \"600\": 600,\n },\n borderWidth: {\n \"1\": \"1px\",\n \"2\": \"2px\",\n },\n opacity: {\n \"40\": 0.4,\n \"60\": 0.6,\n },\n iconSize: {\n xs: \"0.75rem\",\n sm: \"1rem\",\n md: \"1.25rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n },\n breakpoint: {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\",\n },\n} as const\n\nexport type Tokens = typeof tokens\n\n/* The brand map's type and role list, generated from brand.css. Re-exported here\n so a consumer has one entry point rather than two. */\nexport type { BrandMap, BrandMapBase, BrandMapFeedback, BrandMapForm } from './brand'\nexport { brandRoles, brandRolesBase, brandRolesFeedback, brandRolesForm } from './brand'\n"]}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/brand.ts","../src/index.ts"],"names":[],"mappings":";AAsHO,IAAM,UAAA,GAAa;AAAA,EACxB,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,+BAAA;AAAA,EACA,oCAAA;AAAA,EACA,0BAAA;AAAA,EACA,4BAAA;AAAA,EACA,2BAAA;AAAA,EACA,2BAAA;AAAA,EACA,0BAAA;AAAA,EACA,uBAAA;AAAA,EACA,6BAAA;AAAA,EACA,4BAAA;AAAA,EACA,6BAAA;AAAA,EACA,4BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,mCAAA;AAAA,EACA,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AA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,GAAA,EAAK,CAAA;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO;AAAA,GACT;AAAA,EACA,WAAA,EAAa;AAAA,IACX,GAAA,EAAK,KAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,GAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,MAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AAAA,EACA,UAAA,EAAY;AAAA,IACV,EAAA,EAAI,OAAA;AAAA,IACJ,EAAA,EAAI,OAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,KAAA,EAAO;AAAA;AAEX","file":"index.js","sourcesContent":["/* ─── haus / primitives ──────────────────────────────────────────────────────\n Raw values only. No component or semantic meaning.\n Nothing outside this file should define raw values.\n Components must never reference these directly. Use semantics.css.\n\n GENERATED FROM src/tokens.json. Do not edit.\n Regenerate with `npm run tokens`; `npm run tokens:check` fails CI if stale.\n ─────────────────────────────────────────────────────────────────────────── */\n\n/**\n * The entries every brand must supply, generated from brand.css.\n *\n * A brand file is CSS, so this cannot check it directly. What it does check is\n * the object form: build a brand in TypeScript, satisfy this type, and a missing\n * or misspelled role is a compile error rather than an unresolved var() that\n * drops a declaration with no warning at all.\n */\nexport interface BrandMapBase {\n '--haus-brand-surface-default': string\n '--haus-brand-surface-subtle': string\n '--haus-brand-surface-raised': string\n '--haus-brand-surface-overlay': string\n '--haus-brand-surface-sunken': string\n '--haus-brand-surface-inverse': string\n '--haus-brand-surface-disabled': string\n '--haus-brand-surface-inverse-hover': string\n '--haus-brand-ink-primary': string\n '--haus-brand-ink-secondary': string\n '--haus-brand-ink-tertiary': string\n '--haus-brand-ink-disabled': string\n '--haus-brand-ink-inverse': string\n '--haus-brand-ink-link': string\n '--haus-brand-ink-on-primary': string\n '--haus-brand-border-subtle': string\n '--haus-brand-border-default': string\n '--haus-brand-border-strong': string\n '--haus-brand-border-disabled': string\n '--haus-brand-border-inverse': string\n '--haus-brand-border-inverse-hover': string\n '--haus-brand-primary-default': string\n '--haus-brand-primary-hover': string\n '--haus-brand-primary-pressed': string\n '--haus-brand-primary-subtle': string\n '--haus-brand-primary-on-subtle': string\n '--haus-brand-primary-disabled': string\n '--haus-brand-backdrop': string\n}\n\n/**\n * The optional half: info, success, warning and error.\n *\n * A product whose statuses are not those four semantics omits this tier and\n * inherits haus's from :root, because custom properties inherit and a named\n * brand only overrides what it declares. Optional here, and all-or-nothing per\n * ramp in brand.test.ts, which types cannot express.\n */\nexport interface BrandMapFeedback {\n '--haus-brand-info-subtle': string\n '--haus-brand-info-border': string\n '--haus-brand-info-default': string\n '--haus-brand-info-on-subtle': string\n '--haus-brand-info-on-default': string\n '--haus-brand-info-emphasis': string\n '--haus-brand-success-subtle': string\n '--haus-brand-success-border': string\n '--haus-brand-success-default': string\n '--haus-brand-success-on-subtle': string\n '--haus-brand-success-on-default': string\n '--haus-brand-success-solid': string\n '--haus-brand-success-emphasis': string\n '--haus-brand-warning-subtle': string\n '--haus-brand-warning-border': string\n '--haus-brand-warning-default': string\n '--haus-brand-warning-on-subtle': string\n '--haus-brand-warning-on-default': string\n '--haus-brand-warning-solid': string\n '--haus-brand-warning-emphasis': string\n '--haus-brand-error-subtle': string\n '--haus-brand-error-border': string\n '--haus-brand-error-default': string\n '--haus-brand-error-on-subtle': string\n '--haus-brand-error-on-default': string\n '--haus-brand-error-emphasis': string\n}\n\n/**\n * The other optional half: what a product re-decides that is not a colour.\n *\n * Radius, elevation, modal width and typeface, taken from what drift and vault\n * actually changed. Not z-index, opacity, border-width or spacing: nobody\n * re-decides those, and the overrides that looked like it were the literal\n * values of haus's own primitives typed out. All-or-nothing per group, in\n * brand.test.ts.\n */\nexport interface BrandMapForm {\n '--haus-brand-radius-control': string\n '--haus-brand-radius-surface': string\n '--haus-brand-radius-overlay': string\n '--haus-brand-radius-marker': string\n '--haus-brand-elevation-raised': string\n '--haus-brand-elevation-floating': string\n '--haus-brand-elevation-overlay': string\n '--haus-brand-modal-width-sm': string\n '--haus-brand-modal-width-md': string\n '--haus-brand-modal-width-lg': string\n '--haus-brand-modal-width-xl': string\n '--haus-brand-popover-width-sm': string\n '--haus-brand-popover-width-md': string\n '--haus-brand-popover-width-lg': string\n '--haus-brand-popover-width-xl': string\n '--haus-brand-font-sans': string\n '--haus-brand-font-mono': string\n}\n\n/** A complete brand: the base tier, and as much of the optional tiers as applies. */\nexport type BrandMap = BrandMapBase & Partial<BrandMapFeedback> & Partial<BrandMapForm>\n\n/** The role names themselves, for anyone generating a brand rather than writing one. */\nexport const brandRoles = [\n '--haus-brand-surface-default',\n '--haus-brand-surface-subtle',\n '--haus-brand-surface-raised',\n '--haus-brand-surface-overlay',\n '--haus-brand-surface-sunken',\n '--haus-brand-surface-inverse',\n '--haus-brand-surface-disabled',\n '--haus-brand-surface-inverse-hover',\n '--haus-brand-ink-primary',\n '--haus-brand-ink-secondary',\n '--haus-brand-ink-tertiary',\n '--haus-brand-ink-disabled',\n '--haus-brand-ink-inverse',\n '--haus-brand-ink-link',\n '--haus-brand-ink-on-primary',\n '--haus-brand-border-subtle',\n '--haus-brand-border-default',\n '--haus-brand-border-strong',\n '--haus-brand-border-disabled',\n '--haus-brand-border-inverse',\n '--haus-brand-border-inverse-hover',\n '--haus-brand-primary-default',\n '--haus-brand-primary-hover',\n '--haus-brand-primary-pressed',\n '--haus-brand-primary-subtle',\n '--haus-brand-primary-on-subtle',\n '--haus-brand-primary-disabled',\n '--haus-brand-backdrop',\n '--haus-brand-info-subtle',\n '--haus-brand-info-border',\n '--haus-brand-info-default',\n '--haus-brand-info-on-subtle',\n '--haus-brand-info-on-default',\n '--haus-brand-info-emphasis',\n '--haus-brand-success-subtle',\n '--haus-brand-success-border',\n '--haus-brand-success-default',\n '--haus-brand-success-on-subtle',\n '--haus-brand-success-on-default',\n '--haus-brand-success-solid',\n '--haus-brand-success-emphasis',\n '--haus-brand-warning-subtle',\n '--haus-brand-warning-border',\n '--haus-brand-warning-default',\n '--haus-brand-warning-on-subtle',\n '--haus-brand-warning-on-default',\n '--haus-brand-warning-solid',\n '--haus-brand-warning-emphasis',\n '--haus-brand-error-subtle',\n '--haus-brand-error-border',\n '--haus-brand-error-default',\n '--haus-brand-error-on-subtle',\n '--haus-brand-error-on-default',\n '--haus-brand-error-emphasis',\n '--haus-brand-radius-control',\n '--haus-brand-radius-surface',\n '--haus-brand-radius-overlay',\n '--haus-brand-radius-marker',\n '--haus-brand-elevation-raised',\n '--haus-brand-elevation-floating',\n '--haus-brand-elevation-overlay',\n '--haus-brand-modal-width-sm',\n '--haus-brand-modal-width-md',\n '--haus-brand-modal-width-lg',\n '--haus-brand-modal-width-xl',\n '--haus-brand-popover-width-sm',\n '--haus-brand-popover-width-md',\n '--haus-brand-popover-width-lg',\n '--haus-brand-popover-width-xl',\n '--haus-brand-font-sans',\n '--haus-brand-font-mono',\n] as const\n\n/** The required half. A brand supplying fewer than these renders unstyled. */\nexport const brandRolesBase = [\n '--haus-brand-surface-default',\n '--haus-brand-surface-subtle',\n '--haus-brand-surface-raised',\n '--haus-brand-surface-overlay',\n '--haus-brand-surface-sunken',\n '--haus-brand-surface-inverse',\n '--haus-brand-surface-disabled',\n '--haus-brand-surface-inverse-hover',\n '--haus-brand-ink-primary',\n '--haus-brand-ink-secondary',\n '--haus-brand-ink-tertiary',\n '--haus-brand-ink-disabled',\n '--haus-brand-ink-inverse',\n '--haus-brand-ink-link',\n '--haus-brand-ink-on-primary',\n '--haus-brand-border-subtle',\n '--haus-brand-border-default',\n '--haus-brand-border-strong',\n '--haus-brand-border-disabled',\n '--haus-brand-border-inverse',\n '--haus-brand-border-inverse-hover',\n '--haus-brand-primary-default',\n '--haus-brand-primary-hover',\n '--haus-brand-primary-pressed',\n '--haus-brand-primary-subtle',\n '--haus-brand-primary-on-subtle',\n '--haus-brand-primary-disabled',\n '--haus-brand-backdrop',\n] as const\n\n/** The optional colour half, grouped by the ramp that has to be complete or absent. */\nexport const brandRolesFeedback = [\n '--haus-brand-info-subtle',\n '--haus-brand-info-border',\n '--haus-brand-info-default',\n '--haus-brand-info-on-subtle',\n '--haus-brand-info-on-default',\n '--haus-brand-info-emphasis',\n '--haus-brand-success-subtle',\n '--haus-brand-success-border',\n '--haus-brand-success-default',\n '--haus-brand-success-on-subtle',\n '--haus-brand-success-on-default',\n '--haus-brand-success-solid',\n '--haus-brand-success-emphasis',\n '--haus-brand-warning-subtle',\n '--haus-brand-warning-border',\n '--haus-brand-warning-default',\n '--haus-brand-warning-on-subtle',\n '--haus-brand-warning-on-default',\n '--haus-brand-warning-solid',\n '--haus-brand-warning-emphasis',\n '--haus-brand-error-subtle',\n '--haus-brand-error-border',\n '--haus-brand-error-default',\n '--haus-brand-error-on-subtle',\n '--haus-brand-error-on-default',\n '--haus-brand-error-emphasis',\n] as const\n\n/** The optional non-colour half: radius, elevation, modal width and typeface. */\nexport const brandRolesForm = [\n '--haus-brand-radius-control',\n '--haus-brand-radius-surface',\n '--haus-brand-radius-overlay',\n '--haus-brand-radius-marker',\n '--haus-brand-elevation-raised',\n '--haus-brand-elevation-floating',\n '--haus-brand-elevation-overlay',\n '--haus-brand-modal-width-sm',\n '--haus-brand-modal-width-md',\n '--haus-brand-modal-width-lg',\n '--haus-brand-modal-width-xl',\n '--haus-brand-popover-width-sm',\n '--haus-brand-popover-width-md',\n '--haus-brand-popover-width-lg',\n '--haus-brand-popover-width-xl',\n '--haus-brand-font-sans',\n '--haus-brand-font-mono',\n] as const\n","/* ─── haus / tokens ──────────────────────────────────────────────────────────\n Typed constants for the primitive layer.\n\n The CSS custom properties are the runtime form; this exists for the places\n they cannot reach: @media conditions, build config, style-in-JS. Semantic\n tokens are deliberately absent: their whole job is to be swappable at\n runtime, which freezing them into a constant would defeat.\n\n GENERATED FROM src/tokens.json. Do not edit.\n Regenerate with `npm run tokens`; `npm run tokens:check` fails CI if stale.\n ─────────────────────────────────────────────────────────────────────────── */\n\nexport const tokens = {\n color: {\n aronia: {\n \"100\": \"oklch(97% 0.012 300)\",\n \"200\": \"oklch(92% 0.028 300)\",\n \"300\": \"oklch(84% 0.058 300)\",\n \"400\": \"oklch(72% 0.100 300)\",\n \"500\": \"oklch(52% 0.138 300)\",\n \"600\": \"oklch(43% 0.125 300)\",\n \"700\": \"oklch(35% 0.105 300)\",\n \"800\": \"oklch(26% 0.080 300)\",\n \"850\": \"oklch(22% 0.066 300)\",\n \"900\": \"oklch(18% 0.052 300)\",\n \"950\": \"oklch(12% 0.032 300)\",\n },\n damson: {\n \"0\": \"oklch(100% 0 0)\",\n \"50\": \"oklch(99% 0.003 290)\",\n \"100\": \"oklch(97% 0.006 290)\",\n \"200\": \"oklch(93% 0.008 290)\",\n \"300\": \"oklch(86% 0.010 290)\",\n \"400\": \"oklch(74% 0.010 290)\",\n \"500\": \"oklch(60% 0.008 290)\",\n \"600\": \"oklch(48% 0.007 290)\",\n \"700\": \"oklch(37% 0.006 290)\",\n \"800\": \"oklch(27% 0.005 290)\",\n \"900\": \"oklch(18% 0.003 290)\",\n \"950\": \"oklch(11% 0.002 290)\",\n },\n elderberry: {\n \"100\": \"oklch(97% 0.020 265)\",\n \"200\": \"oklch(93% 0.040 265)\",\n \"500\": \"oklch(55% 0.200 265)\",\n \"700\": \"oklch(42% 0.160 265)\",\n \"900\": \"oklch(30% 0.120 265)\",\n },\n greengage: {\n \"100\": \"oklch(97% 0.030 148)\",\n \"200\": \"oklch(93% 0.055 148)\",\n \"500\": \"oklch(58% 0.185 148)\",\n \"700\": \"oklch(45% 0.150 148)\",\n \"900\": \"oklch(33% 0.110 148)\",\n },\n mango: {\n \"100\": \"oklch(97% 0.025 65)\",\n \"200\": \"oklch(93% 0.045 65)\",\n \"500\": \"oklch(60% 0.175 65)\",\n \"700\": \"oklch(47% 0.142 65)\",\n \"900\": \"oklch(38% 0.110 65)\",\n },\n cherry: {\n \"100\": \"oklch(97% 0.030 27)\",\n \"200\": \"oklch(93% 0.055 27)\",\n \"500\": \"oklch(58% 0.200 27)\",\n \"700\": \"oklch(44% 0.168 27)\",\n \"900\": \"oklch(33% 0.110 27)\",\n },\n },\n font: {\n // family removed with haus#54; it is a brand entry now, not a primitive.\n size: {\n \"11\": \"0.6875rem\",\n \"12\": \"0.75rem\",\n \"13\": \"0.8125rem\",\n \"14\": \"0.875rem\",\n \"16\": \"1rem\",\n \"20\": \"1.25rem\",\n \"24\": \"1.5rem\",\n \"28\": \"1.75rem\",\n \"30\": \"1.875rem\",\n },\n weight: {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n lineHeight: {\n tight: 1.15,\n tighter: 1.2,\n snug: 1.25,\n compact: 1.3,\n normal: 1.4,\n relaxed: 1.5,\n loose: 1.6,\n },\n tracking: {\n tightest: \"-0.03em\",\n tighter: \"-0.02em\",\n tight: \"-0.01em\",\n normal: \"0em\",\n wide: \"0.02em\",\n wider: \"0.04em\",\n widest: \"0.08em\",\n },\n },\n spacing: {\n \"1\": \"0.25rem\",\n \"2\": \"0.5rem\",\n \"3\": \"0.75rem\",\n \"4\": \"1rem\",\n \"5\": \"1.25rem\",\n \"6\": \"1.5rem\",\n \"7\": \"1.75rem\",\n \"8\": \"2rem\",\n \"10\": \"2.5rem\",\n \"12\": \"3rem\",\n \"16\": \"4rem\",\n \"20\": \"5rem\",\n },\n radius: {\n none: \"0\",\n sm: \"0.25rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n duration: {\n instant: \"50ms\",\n fast: \"100ms\",\n normal: \"200ms\",\n moderate: \"300ms\",\n slow: \"500ms\",\n reduced: \"0ms\",\n },\n easing: {\n enter: \"cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n exit: \"cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n move: \"cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n spring: \"cubic-bezier(0.34, 1.56, 0.64, 1.00)\",\n linear: \"linear\",\n },\n motion: {\n \"fade-in\": \"200ms cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n \"fade-out\": \"100ms cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n \"slide-in\": \"300ms cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n \"slide-out\": \"100ms cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n micro: \"100ms cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n interactive: \"200ms cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n },\n shadow: {\n none: \"none\",\n sm: \"0 1px 2px oklch(18% 0.003 290 / 0.06)\",\n md: \"0 4px 6px -1px oklch(18% 0.003 290 / 0.10), 0 2px 4px -2px oklch(18% 0.003 290 / 0.10)\",\n lg: \"0 10px 15px -3px oklch(18% 0.003 290 / 0.10), 0 4px 6px -4px oklch(18% 0.003 290 / 0.07)\",\n xl: \"0 20px 25px -5px oklch(18% 0.003 290 / 0.10), 0 8px 10px -6px oklch(18% 0.003 290 / 0.10)\",\n },\n controlHeight: {\n xs: \"1.5rem\",\n sm: \"1.75rem\",\n md: \"2.25rem\",\n lg: \"2.75rem\",\n },\n zIndex: {\n \"0\": 0,\n \"10\": 10,\n \"100\": 100,\n \"200\": 200,\n \"300\": 300,\n \"400\": 400,\n \"500\": 500,\n \"600\": 600,\n },\n borderWidth: {\n \"1\": \"1px\",\n \"2\": \"2px\",\n },\n opacity: {\n \"40\": 0.4,\n \"60\": 0.6,\n },\n iconSize: {\n xs: \"0.75rem\",\n sm: \"1rem\",\n md: \"1.25rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n },\n breakpoint: {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\",\n },\n} as const\n\nexport type Tokens = typeof tokens\n\n/* The brand map's type and role list, generated from brand.css. Re-exported here\n so a consumer has one entry point rather than two. */\nexport type { BrandMap, BrandMapBase, BrandMapFeedback, BrandMapForm } from './brand'\nexport { brandRoles, brandRolesBase, brandRolesFeedback, brandRolesForm } from './brand'\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/brand.ts","../src/index.ts"],"names":[],"mappings":";AAsHO,IAAM,UAAA,GAAa;AAAA,EACxB,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,+BAAA;AAAA,EACA,oCAAA;AAAA,EACA,0BAAA;AAAA,EACA,4BAAA;AAAA,EACA,2BAAA;AAAA,EACA,2BAAA;AAAA,EACA,0BAAA;AAAA,EACA,uBAAA;AAAA,EACA,6BAAA;AAAA,EACA,4BAAA;AAAA,EACA,6BAAA;AAAA,EACA,4BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,mCAAA;AAAA,EACA,8BAAA;AAAA,EACA,4BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,gCAAA;AAAA,EACA,+BAAA;AAAA,EACA,uBAAA;AAAA,EACA,0BAAA;AAAA,EACA,0BAAA;AAAA,EACA,2BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,4BAAA;AAAA,EACA,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,gCAAA;AAAA,EACA,iCA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O,GAAA;AAAA,IACP,KAAA,EAAO,GAAA;AAAA,IACP,KAAA,EAAO;AAAA,GACT;AAAA,EACA,WAAA,EAAa;AAAA,IACX,GAAA,EAAK,KAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,GAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,MAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AAAA,EACA,UAAA,EAAY;AAAA,IACV,EAAA,EAAI,OAAA;AAAA,IACJ,EAAA,EAAI,OAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,EAAA,EAAI,QAAA;AAAA,IACJ,KAAA,EAAO;AAAA;AAEX","file":"index.js","sourcesContent":["/* ─── haus / primitives ──────────────────────────────────────────────────────\n Raw values only. No component or semantic meaning.\n Nothing outside this file should define raw values.\n Components must never reference these directly. Use semantics.css.\n\n GENERATED FROM src/tokens.json. Do not edit.\n Regenerate with `npm run tokens`; `npm run tokens:check` fails CI if stale.\n ─────────────────────────────────────────────────────────────────────────── */\n\n/**\n * The entries every brand must supply, generated from brand.css.\n *\n * A brand file is CSS, so this cannot check it directly. What it does check is\n * the object form: build a brand in TypeScript, satisfy this type, and a missing\n * or misspelled role is a compile error rather than an unresolved var() that\n * drops a declaration with no warning at all.\n */\nexport interface BrandMapBase {\n '--haus-brand-surface-default': string\n '--haus-brand-surface-subtle': string\n '--haus-brand-surface-raised': string\n '--haus-brand-surface-overlay': string\n '--haus-brand-surface-sunken': string\n '--haus-brand-surface-inverse': string\n '--haus-brand-surface-disabled': string\n '--haus-brand-surface-inverse-hover': string\n '--haus-brand-ink-primary': string\n '--haus-brand-ink-secondary': string\n '--haus-brand-ink-tertiary': string\n '--haus-brand-ink-disabled': string\n '--haus-brand-ink-inverse': string\n '--haus-brand-ink-link': string\n '--haus-brand-ink-on-primary': string\n '--haus-brand-border-subtle': string\n '--haus-brand-border-default': string\n '--haus-brand-border-strong': string\n '--haus-brand-border-disabled': string\n '--haus-brand-border-inverse': string\n '--haus-brand-border-inverse-hover': string\n '--haus-brand-primary-default': string\n '--haus-brand-primary-hover': string\n '--haus-brand-primary-pressed': string\n '--haus-brand-primary-subtle': string\n '--haus-brand-primary-on-subtle': string\n '--haus-brand-primary-disabled': string\n '--haus-brand-backdrop': string\n}\n\n/**\n * The optional half: info, success, warning and error.\n *\n * A product whose statuses are not those four semantics omits this tier and\n * inherits haus's from :root, because custom properties inherit and a named\n * brand only overrides what it declares. Optional here, and all-or-nothing per\n * ramp in brand.test.ts, which types cannot express.\n */\nexport interface BrandMapFeedback {\n '--haus-brand-info-subtle': string\n '--haus-brand-info-border': string\n '--haus-brand-info-default': string\n '--haus-brand-info-on-subtle': string\n '--haus-brand-info-on-default': string\n '--haus-brand-info-emphasis': string\n '--haus-brand-success-subtle': string\n '--haus-brand-success-border': string\n '--haus-brand-success-default': string\n '--haus-brand-success-on-subtle': string\n '--haus-brand-success-on-default': string\n '--haus-brand-success-solid': string\n '--haus-brand-success-emphasis': string\n '--haus-brand-warning-subtle': string\n '--haus-brand-warning-border': string\n '--haus-brand-warning-default': string\n '--haus-brand-warning-on-subtle': string\n '--haus-brand-warning-on-default': string\n '--haus-brand-warning-solid': string\n '--haus-brand-warning-emphasis': string\n '--haus-brand-error-subtle': string\n '--haus-brand-error-border': string\n '--haus-brand-error-default': string\n '--haus-brand-error-on-subtle': string\n '--haus-brand-error-on-default': string\n '--haus-brand-error-emphasis': string\n}\n\n/**\n * The other optional half: what a product re-decides that is not a colour.\n *\n * Radius, elevation, modal width and typeface, taken from what drift and vault\n * actually changed. Not z-index, opacity, border-width or spacing: nobody\n * re-decides those, and the overrides that looked like it were the literal\n * values of haus's own primitives typed out. All-or-nothing per group, in\n * brand.test.ts.\n */\nexport interface BrandMapForm {\n '--haus-brand-radius-control': string\n '--haus-brand-radius-surface': string\n '--haus-brand-radius-overlay': string\n '--haus-brand-radius-marker': string\n '--haus-brand-elevation-raised': string\n '--haus-brand-elevation-floating': string\n '--haus-brand-elevation-overlay': string\n '--haus-brand-modal-width-sm': string\n '--haus-brand-modal-width-md': string\n '--haus-brand-modal-width-lg': string\n '--haus-brand-modal-width-xl': string\n '--haus-brand-popover-width-sm': string\n '--haus-brand-popover-width-md': string\n '--haus-brand-popover-width-lg': string\n '--haus-brand-popover-width-xl': string\n '--haus-brand-font-sans': string\n '--haus-brand-font-mono': string\n}\n\n/** A complete brand: the base tier, and as much of the optional tiers as applies. */\nexport type BrandMap = BrandMapBase & Partial<BrandMapFeedback> & Partial<BrandMapForm>\n\n/** The role names themselves, for anyone generating a brand rather than writing one. */\nexport const brandRoles = [\n '--haus-brand-surface-default',\n '--haus-brand-surface-subtle',\n '--haus-brand-surface-raised',\n '--haus-brand-surface-overlay',\n '--haus-brand-surface-sunken',\n '--haus-brand-surface-inverse',\n '--haus-brand-surface-disabled',\n '--haus-brand-surface-inverse-hover',\n '--haus-brand-ink-primary',\n '--haus-brand-ink-secondary',\n '--haus-brand-ink-tertiary',\n '--haus-brand-ink-disabled',\n '--haus-brand-ink-inverse',\n '--haus-brand-ink-link',\n '--haus-brand-ink-on-primary',\n '--haus-brand-border-subtle',\n '--haus-brand-border-default',\n '--haus-brand-border-strong',\n '--haus-brand-border-disabled',\n '--haus-brand-border-inverse',\n '--haus-brand-border-inverse-hover',\n '--haus-brand-primary-default',\n '--haus-brand-primary-hover',\n '--haus-brand-primary-pressed',\n '--haus-brand-primary-subtle',\n '--haus-brand-primary-on-subtle',\n '--haus-brand-primary-disabled',\n '--haus-brand-backdrop',\n '--haus-brand-info-subtle',\n '--haus-brand-info-border',\n '--haus-brand-info-default',\n '--haus-brand-info-on-subtle',\n '--haus-brand-info-on-default',\n '--haus-brand-info-emphasis',\n '--haus-brand-success-subtle',\n '--haus-brand-success-border',\n '--haus-brand-success-default',\n '--haus-brand-success-on-subtle',\n '--haus-brand-success-on-default',\n '--haus-brand-success-solid',\n '--haus-brand-success-emphasis',\n '--haus-brand-warning-subtle',\n '--haus-brand-warning-border',\n '--haus-brand-warning-default',\n '--haus-brand-warning-on-subtle',\n '--haus-brand-warning-on-default',\n '--haus-brand-warning-solid',\n '--haus-brand-warning-emphasis',\n '--haus-brand-error-subtle',\n '--haus-brand-error-border',\n '--haus-brand-error-default',\n '--haus-brand-error-on-subtle',\n '--haus-brand-error-on-default',\n '--haus-brand-error-emphasis',\n '--haus-brand-radius-control',\n '--haus-brand-radius-surface',\n '--haus-brand-radius-overlay',\n '--haus-brand-radius-marker',\n '--haus-brand-elevation-raised',\n '--haus-brand-elevation-floating',\n '--haus-brand-elevation-overlay',\n '--haus-brand-modal-width-sm',\n '--haus-brand-modal-width-md',\n '--haus-brand-modal-width-lg',\n '--haus-brand-modal-width-xl',\n '--haus-brand-popover-width-sm',\n '--haus-brand-popover-width-md',\n '--haus-brand-popover-width-lg',\n '--haus-brand-popover-width-xl',\n '--haus-brand-font-sans',\n '--haus-brand-font-mono',\n] as const\n\n/** The required half. A brand supplying fewer than these renders unstyled. */\nexport const brandRolesBase = [\n '--haus-brand-surface-default',\n '--haus-brand-surface-subtle',\n '--haus-brand-surface-raised',\n '--haus-brand-surface-overlay',\n '--haus-brand-surface-sunken',\n '--haus-brand-surface-inverse',\n '--haus-brand-surface-disabled',\n '--haus-brand-surface-inverse-hover',\n '--haus-brand-ink-primary',\n '--haus-brand-ink-secondary',\n '--haus-brand-ink-tertiary',\n '--haus-brand-ink-disabled',\n '--haus-brand-ink-inverse',\n '--haus-brand-ink-link',\n '--haus-brand-ink-on-primary',\n '--haus-brand-border-subtle',\n '--haus-brand-border-default',\n '--haus-brand-border-strong',\n '--haus-brand-border-disabled',\n '--haus-brand-border-inverse',\n '--haus-brand-border-inverse-hover',\n '--haus-brand-primary-default',\n '--haus-brand-primary-hover',\n '--haus-brand-primary-pressed',\n '--haus-brand-primary-subtle',\n '--haus-brand-primary-on-subtle',\n '--haus-brand-primary-disabled',\n '--haus-brand-backdrop',\n] as const\n\n/** The optional colour half, grouped by the ramp that has to be complete or absent. */\nexport const brandRolesFeedback = [\n '--haus-brand-info-subtle',\n '--haus-brand-info-border',\n '--haus-brand-info-default',\n '--haus-brand-info-on-subtle',\n '--haus-brand-info-on-default',\n '--haus-brand-info-emphasis',\n '--haus-brand-success-subtle',\n '--haus-brand-success-border',\n '--haus-brand-success-default',\n '--haus-brand-success-on-subtle',\n '--haus-brand-success-on-default',\n '--haus-brand-success-solid',\n '--haus-brand-success-emphasis',\n '--haus-brand-warning-subtle',\n '--haus-brand-warning-border',\n '--haus-brand-warning-default',\n '--haus-brand-warning-on-subtle',\n '--haus-brand-warning-on-default',\n '--haus-brand-warning-solid',\n '--haus-brand-warning-emphasis',\n '--haus-brand-error-subtle',\n '--haus-brand-error-border',\n '--haus-brand-error-default',\n '--haus-brand-error-on-subtle',\n '--haus-brand-error-on-default',\n '--haus-brand-error-emphasis',\n] as const\n\n/** The optional non-colour half: radius, elevation, modal width and typeface. */\nexport const brandRolesForm = [\n '--haus-brand-radius-control',\n '--haus-brand-radius-surface',\n '--haus-brand-radius-overlay',\n '--haus-brand-radius-marker',\n '--haus-brand-elevation-raised',\n '--haus-brand-elevation-floating',\n '--haus-brand-elevation-overlay',\n '--haus-brand-modal-width-sm',\n '--haus-brand-modal-width-md',\n '--haus-brand-modal-width-lg',\n '--haus-brand-modal-width-xl',\n '--haus-brand-popover-width-sm',\n '--haus-brand-popover-width-md',\n '--haus-brand-popover-width-lg',\n '--haus-brand-popover-width-xl',\n '--haus-brand-font-sans',\n '--haus-brand-font-mono',\n] as const\n","/* ─── haus / tokens ──────────────────────────────────────────────────────────\n Typed constants for the primitive layer.\n\n The CSS custom properties are the runtime form; this exists for the places\n they cannot reach: @media conditions, build config, style-in-JS. Semantic\n tokens are deliberately absent: their whole job is to be swappable at\n runtime, which freezing them into a constant would defeat.\n\n GENERATED FROM src/tokens.json. Do not edit.\n Regenerate with `npm run tokens`; `npm run tokens:check` fails CI if stale.\n ─────────────────────────────────────────────────────────────────────────── */\n\nexport const tokens = {\n color: {\n aronia: {\n \"100\": \"oklch(97% 0.012 300)\",\n \"200\": \"oklch(92% 0.028 300)\",\n \"300\": \"oklch(84% 0.058 300)\",\n \"400\": \"oklch(72% 0.100 300)\",\n \"500\": \"oklch(52% 0.138 300)\",\n \"600\": \"oklch(43% 0.125 300)\",\n \"700\": \"oklch(35% 0.105 300)\",\n \"800\": \"oklch(26% 0.080 300)\",\n \"850\": \"oklch(22% 0.066 300)\",\n \"900\": \"oklch(18% 0.052 300)\",\n \"950\": \"oklch(12% 0.032 300)\",\n },\n damson: {\n \"0\": \"oklch(100% 0 0)\",\n \"50\": \"oklch(99% 0.003 290)\",\n \"100\": \"oklch(97% 0.006 290)\",\n \"200\": \"oklch(93% 0.008 290)\",\n \"300\": \"oklch(86% 0.010 290)\",\n \"400\": \"oklch(74% 0.010 290)\",\n \"500\": \"oklch(60% 0.008 290)\",\n \"600\": \"oklch(48% 0.007 290)\",\n \"700\": \"oklch(37% 0.006 290)\",\n \"800\": \"oklch(27% 0.005 290)\",\n \"900\": \"oklch(18% 0.003 290)\",\n \"950\": \"oklch(11% 0.002 290)\",\n },\n elderberry: {\n \"100\": \"oklch(97% 0.020 265)\",\n \"200\": \"oklch(93% 0.040 265)\",\n \"500\": \"oklch(55% 0.200 265)\",\n \"700\": \"oklch(42% 0.160 265)\",\n \"900\": \"oklch(30% 0.120 265)\",\n },\n greengage: {\n \"100\": \"oklch(97% 0.030 148)\",\n \"200\": \"oklch(93% 0.055 148)\",\n \"500\": \"oklch(58% 0.185 148)\",\n \"700\": \"oklch(45% 0.150 148)\",\n \"900\": \"oklch(33% 0.110 148)\",\n },\n mango: {\n \"100\": \"oklch(97% 0.025 65)\",\n \"200\": \"oklch(93% 0.045 65)\",\n \"500\": \"oklch(60% 0.175 65)\",\n \"700\": \"oklch(47% 0.142 65)\",\n \"900\": \"oklch(38% 0.110 65)\",\n },\n cherry: {\n \"100\": \"oklch(97% 0.030 27)\",\n \"200\": \"oklch(93% 0.055 27)\",\n \"500\": \"oklch(58% 0.200 27)\",\n \"700\": \"oklch(44% 0.168 27)\",\n \"900\": \"oklch(33% 0.110 27)\",\n },\n },\n font: {\n // family removed with haus#54; it is a brand entry now, not a primitive.\n size: {\n \"11\": \"0.6875rem\",\n \"12\": \"0.75rem\",\n \"13\": \"0.8125rem\",\n \"14\": \"0.875rem\",\n \"16\": \"1rem\",\n \"20\": \"1.25rem\",\n \"24\": \"1.5rem\",\n \"28\": \"1.75rem\",\n \"30\": \"1.875rem\",\n },\n weight: {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n lineHeight: {\n tight: 1.15,\n tighter: 1.2,\n snug: 1.25,\n compact: 1.3,\n normal: 1.4,\n relaxed: 1.5,\n loose: 1.6,\n },\n tracking: {\n tightest: \"-0.03em\",\n tighter: \"-0.02em\",\n tight: \"-0.01em\",\n normal: \"0em\",\n wide: \"0.02em\",\n wider: \"0.04em\",\n widest: \"0.08em\",\n },\n },\n spacing: {\n \"1\": \"0.25rem\",\n \"2\": \"0.5rem\",\n \"3\": \"0.75rem\",\n \"4\": \"1rem\",\n \"5\": \"1.25rem\",\n \"6\": \"1.5rem\",\n \"7\": \"1.75rem\",\n \"8\": \"2rem\",\n \"10\": \"2.5rem\",\n \"12\": \"3rem\",\n \"16\": \"4rem\",\n \"20\": \"5rem\",\n px: \"1px\",\n \"0-5\": \"0.125rem\",\n },\n radius: {\n none: \"0\",\n sm: \"0.25rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n duration: {\n instant: \"50ms\",\n fast: \"100ms\",\n normal: \"200ms\",\n moderate: \"300ms\",\n slow: \"500ms\",\n reduced: \"0ms\",\n },\n easing: {\n enter: \"cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n exit: \"cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n move: \"cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n spring: \"cubic-bezier(0.34, 1.56, 0.64, 1.00)\",\n linear: \"linear\",\n },\n motion: {\n \"fade-in\": \"200ms cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n \"fade-out\": \"100ms cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n \"slide-in\": \"300ms cubic-bezier(0.00, 0.00, 0.20, 1.00)\",\n \"slide-out\": \"100ms cubic-bezier(0.40, 0.00, 1.00, 1.00)\",\n micro: \"100ms cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n interactive: \"200ms cubic-bezier(0.40, 0.00, 0.20, 1.00)\",\n },\n shadow: {\n none: \"none\",\n sm: \"0 1px 2px oklch(18% 0.003 290 / 0.06)\",\n md: \"0 4px 6px -1px oklch(18% 0.003 290 / 0.10), 0 2px 4px -2px oklch(18% 0.003 290 / 0.10)\",\n lg: \"0 10px 15px -3px oklch(18% 0.003 290 / 0.10), 0 4px 6px -4px oklch(18% 0.003 290 / 0.07)\",\n xl: \"0 20px 25px -5px oklch(18% 0.003 290 / 0.10), 0 8px 10px -6px oklch(18% 0.003 290 / 0.10)\",\n },\n controlHeight: {\n xs: \"1.5rem\",\n sm: \"1.75rem\",\n md: \"2.25rem\",\n lg: \"2.75rem\",\n },\n zIndex: {\n \"0\": 0,\n \"10\": 10,\n \"100\": 100,\n \"200\": 200,\n \"300\": 300,\n \"400\": 400,\n \"500\": 500,\n \"600\": 600,\n },\n borderWidth: {\n \"1\": \"1px\",\n \"2\": \"2px\",\n },\n opacity: {\n \"40\": 0.4,\n \"60\": 0.6,\n },\n iconSize: {\n xs: \"0.75rem\",\n sm: \"1rem\",\n md: \"1.25rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n },\n breakpoint: {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\",\n },\n} as const\n\nexport type Tokens = typeof tokens\n\n/* The brand map's type and role list, generated from brand.css. Re-exported here\n so a consumer has one entry point rather than two. */\nexport type { BrandMap, BrandMapBase, BrandMapFeedback, BrandMapForm } from './brand'\nexport { brandRoles, brandRolesBase, brandRolesFeedback, brandRolesForm } from './brand'\n"]}
|
package/dist/primitives.css
CHANGED
|
@@ -100,18 +100,20 @@
|
|
|
100
100
|
--haus-tracking-widest: 0.08em; /* label-xs */
|
|
101
101
|
|
|
102
102
|
/* ── Spacing scale (4px base) ────────────────────────────────────────────── */
|
|
103
|
-
--haus-space-1:
|
|
104
|
-
--haus-space-2:
|
|
105
|
-
--haus-space-3:
|
|
106
|
-
--haus-space-4:
|
|
107
|
-
--haus-space-5:
|
|
108
|
-
--haus-space-6:
|
|
109
|
-
--haus-space-7:
|
|
110
|
-
--haus-space-8:
|
|
111
|
-
--haus-space-10:
|
|
112
|
-
--haus-space-12:
|
|
113
|
-
--haus-space-16:
|
|
114
|
-
--haus-space-20:
|
|
103
|
+
--haus-space-1: 0.25rem; /* 4px */
|
|
104
|
+
--haus-space-2: 0.5rem; /* 8px */
|
|
105
|
+
--haus-space-3: 0.75rem; /* 12px */
|
|
106
|
+
--haus-space-4: 1rem; /* 16px */
|
|
107
|
+
--haus-space-5: 1.25rem; /* 20px */
|
|
108
|
+
--haus-space-6: 1.5rem; /* 24px */
|
|
109
|
+
--haus-space-7: 1.75rem; /* 28px */
|
|
110
|
+
--haus-space-8: 2rem; /* 32px */
|
|
111
|
+
--haus-space-10: 2.5rem; /* 40px */
|
|
112
|
+
--haus-space-12: 3rem; /* 48px */
|
|
113
|
+
--haus-space-16: 4rem; /* 64px */
|
|
114
|
+
--haus-space-20: 5rem; /* 80px */
|
|
115
|
+
--haus-space-px: 1px; /* 1px. A hairline: optical padding inside a small control, where a 4px step is too much. */
|
|
116
|
+
--haus-space-0-5: 0.125rem; /* 2px. Half a step, for the same optical case. */
|
|
115
117
|
|
|
116
118
|
/* ── Radius ──────────────────────────────────────────────────────────────── */
|
|
117
119
|
--haus-radius-none: 0;
|
|
@@ -171,11 +173,11 @@
|
|
|
171
173
|
--haus-overlay-width-xl: 56rem; /* 896px, Modal xl. Wide dashboards and side-by-side previews. Added when a second consumer's four-step scale met haus's three: the fourth is haus's now rather than the consumer's. */
|
|
172
174
|
|
|
173
175
|
/* ── Panel widths ────────────────────────────────────────────────────────── */
|
|
174
|
-
/* The popover-scale sibling of overlay widths: Popover and the
|
|
176
|
+
/* The popover-scale sibling of overlay widths: Popover and the Select popup. A brand entry too, for the same reason, read through --haus-popover-width-*. */
|
|
175
177
|
--haus-panel-width-sm: 11.25rem; /* 180px, Popover sm. A short action menu. */
|
|
176
178
|
--haus-panel-width-md: 16.25rem; /* 260px, Popover md, the default. */
|
|
177
179
|
--haus-panel-width-lg: 21.25rem; /* 340px, Popover lg. A panel holding a form. */
|
|
178
|
-
--haus-panel-width-xl: 26.25rem; /* 420px, Popover xl. The two-line option rows a
|
|
180
|
+
--haus-panel-width-xl: 26.25rem; /* 420px, Popover xl. The two-line option rows a Select draws. */
|
|
179
181
|
|
|
180
182
|
/* ── Component geometry ──────────────────────────────────────────────────── */
|
|
181
183
|
/* On no ladder and not spacing. Literals inside components until haus#53 put width and height into the hardcoded-value rule. */
|
package/dist/semantics.css
CHANGED
|
@@ -6,28 +6,31 @@
|
|
|
6
6
|
radius, elevation and motion. Two kinds of primitive read remain in the
|
|
7
7
|
components, both deliberate:
|
|
8
8
|
|
|
9
|
-
·
|
|
9
|
+
· 28 declarations take a size off the space ladder, on height, width,
|
|
10
10
|
min/max and transform offsets: the avatar sizes and its status dot, the
|
|
11
11
|
checkbox and radio boxes, the toggle track and thumb and the thumb's
|
|
12
|
-
travel, the modal's max height, the toast and modal entry offsets, the
|
|
13
|
-
textarea's minimum height
|
|
12
|
+
travel, the modal's max height, the toast and modal entry offsets, and the
|
|
13
|
+
textarea's minimum height. A size is a
|
|
14
14
|
value, not a role, and calling a 16px checkbox --haus-space-inset-md
|
|
15
15
|
would say something untrue.
|
|
16
|
-
·
|
|
17
|
-
is the role:
|
|
18
|
-
--haus-icon-sm,
|
|
16
|
+
· 31 read a primitive that has no alias here because its own name already
|
|
17
|
+
is the role: thirteen control heights and eighteen icon sizes (six
|
|
18
|
+
--haus-icon-sm, seven --haus-icon-lg, five --haus-icon-xs). Button used to
|
|
19
19
|
read --haus-tracking-normal here too; haus#37 moved it onto
|
|
20
|
-
--haus-type-label-tracking, so tracking is a role everywhere and no
|
|
21
|
-
component reads the tracking ladder. haus#43 added the icon reads: the
|
|
20
|
+
--haus-type-label-md-tracking, so tracking is a role everywhere and no
|
|
21
|
+
component reads the tracking ladder. haus#43 added the first icon reads: the
|
|
22
22
|
chevron and the two close buttons bind their box and glyph to the icon
|
|
23
23
|
scale rather than a raw size.
|
|
24
24
|
|
|
25
25
|
This was 54 until haus#54, which took the 32 --haus-font-sans reads out of
|
|
26
26
|
this count: typeface became brandable, so the font role now lives in this
|
|
27
27
|
file (reading --haus-brand-font-sans) rather than being a primitive the
|
|
28
|
-
components reach for, and a role read is not a primitive read.
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
components reach for, and a role read is not a primitive read. haus#55's
|
|
29
|
+
Spinner took the icon reads from thirteen to seventeen; haus#58 and haus#61
|
|
30
|
+
added IconButton's and Select's control heights and boxes, to 31; and
|
|
31
|
+
decision 0025 retired the native select, whose four reads left with it, to
|
|
32
|
+
28; and IconButton's lg size, level with a default Button, took it to 31.
|
|
33
|
+
tokens.test.ts holds the ledger.
|
|
31
34
|
|
|
32
35
|
This was 71 before haus#27. Stacking, border width and opacity used to be
|
|
33
36
|
primitives wearing role names, so a product that wanted the stacking order
|
|
@@ -169,10 +172,10 @@
|
|
|
169
172
|
of. Caption is the role they were reaching for: 11px, regular, normal
|
|
170
173
|
tracking, the voice a control explains itself in. The colour is not part
|
|
171
174
|
of it, so a hint stays ink-secondary and an error message error. */
|
|
172
|
-
--haus-type-caption-size: var(--haus-text-11);
|
|
173
|
-
--haus-type-caption-weight: var(--haus-weight-regular);
|
|
174
|
-
--haus-type-caption-leading: var(--haus-leading-normal);
|
|
175
|
-
--haus-type-caption-tracking: var(--haus-tracking-normal);
|
|
175
|
+
--haus-type-label-caption-size: var(--haus-text-11);
|
|
176
|
+
--haus-type-label-caption-weight: var(--haus-weight-regular);
|
|
177
|
+
--haus-type-label-caption-leading: var(--haus-leading-normal);
|
|
178
|
+
--haus-type-label-caption-tracking: var(--haus-tracking-normal);
|
|
176
179
|
|
|
177
180
|
--haus-type-label-sm-size: var(--haus-text-12);
|
|
178
181
|
--haus-type-label-sm-weight: var(--haus-weight-medium);
|
|
@@ -214,15 +217,15 @@
|
|
|
214
217
|
The text above a form control is its own typographic role, and it sets
|
|
215
218
|
all four properties, so it is a role of the ordinary shape rather than
|
|
216
219
|
another exception. */
|
|
217
|
-
--haus-type-field-
|
|
218
|
-
--haus-type-field-
|
|
219
|
-
--haus-type-field-
|
|
220
|
-
--haus-type-field-
|
|
220
|
+
--haus-type-label-field-size: var(--haus-text-12);
|
|
221
|
+
--haus-type-label-field-weight: var(--haus-weight-semibold);
|
|
222
|
+
--haus-type-label-field-leading: var(--haus-leading-normal);
|
|
223
|
+
--haus-type-label-field-tracking: var(--haus-tracking-wide);
|
|
221
224
|
|
|
222
|
-
--haus-type-label-size: var(--haus-text-13);
|
|
223
|
-
--haus-type-label-weight: var(--haus-weight-medium);
|
|
224
|
-
--haus-type-label-leading: var(--haus-leading-normal);
|
|
225
|
-
--haus-type-label-tracking: var(--haus-tracking-normal);
|
|
225
|
+
--haus-type-label-md-size: var(--haus-text-13);
|
|
226
|
+
--haus-type-label-md-weight: var(--haus-weight-medium);
|
|
227
|
+
--haus-type-label-md-leading: var(--haus-leading-normal);
|
|
228
|
+
--haus-type-label-md-tracking: var(--haus-tracking-normal);
|
|
226
229
|
|
|
227
230
|
--haus-type-body-sm-size: var(--haus-text-13);
|
|
228
231
|
--haus-type-body-sm-weight: var(--haus-weight-regular);
|
|
@@ -376,7 +379,7 @@
|
|
|
376
379
|
--haus-modal-width-xl: var(--haus-brand-modal-width-xl);
|
|
377
380
|
|
|
378
381
|
/* Popover width, the popover-scale sibling of modal width. Read by Popover
|
|
379
|
-
and by the
|
|
382
|
+
and by the Select popup; themeable through the brand entry above. */
|
|
380
383
|
--haus-popover-width-sm: var(--haus-brand-popover-width-sm);
|
|
381
384
|
--haus-popover-width-md: var(--haus-brand-popover-width-md);
|
|
382
385
|
--haus-popover-width-lg: var(--haus-brand-popover-width-lg);
|
package/dist/tokens.json
CHANGED
|
@@ -365,6 +365,14 @@
|
|
|
365
365
|
"$value": "5rem",
|
|
366
366
|
"$description": "80px"
|
|
367
367
|
},
|
|
368
|
+
"px": {
|
|
369
|
+
"$value": "1px",
|
|
370
|
+
"$description": "1px. A hairline: optical padding inside a small control, where a 4px step is too much."
|
|
371
|
+
},
|
|
372
|
+
"0-5": {
|
|
373
|
+
"$value": "0.125rem",
|
|
374
|
+
"$description": "2px. Half a step, for the same optical case."
|
|
375
|
+
},
|
|
368
376
|
"$type": "dimension"
|
|
369
377
|
},
|
|
370
378
|
"semantic": {
|
|
@@ -914,7 +922,7 @@
|
|
|
914
922
|
},
|
|
915
923
|
"panelWidth": {
|
|
916
924
|
"$type": "dimension",
|
|
917
|
-
"$description": "How wide a small floating panel is allowed to get: Popover, and the themed popup a
|
|
925
|
+
"$description": "How wide a small floating panel is allowed to get: Popover, and the themed popup a Select opens. The popover-scale sibling of overlayWidth, kept separate because a popover holding a form is a different order of size from a modal, and read through --haus-popover-width-* in semantics.css the way overlayWidth is read through --haus-modal-width-*.",
|
|
918
926
|
"sm": {
|
|
919
927
|
"$value": "11.25rem",
|
|
920
928
|
"$description": "180px, Popover sm. A short action menu."
|
|
@@ -929,7 +937,7 @@
|
|
|
929
937
|
},
|
|
930
938
|
"xl": {
|
|
931
939
|
"$value": "26.25rem",
|
|
932
|
-
"$description": "420px, Popover xl. The two-line option rows a
|
|
940
|
+
"$description": "420px, Popover xl. The two-line option rows a Select draws."
|
|
933
941
|
}
|
|
934
942
|
},
|
|
935
943
|
"size": {
|
package/package.json
CHANGED