@iyulab/house-style 0.1.2 → 0.1.3

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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.3] - 2026-10-06
4
+
5
+ ### Fixed
6
+
7
+ - **A sidebar group holding the current page keeps a readable header.** `@iyulab/modern-app` derived that header's
8
+ text from the active background, which this theme makes light (`--hs-brand-soft`), so the text sank into the
9
+ panel (about 1.6:1 light, 1.1:1 dark). The theme now sets `--app-sidebar-group-active-fg` to `--hs-brand-ink`, the
10
+ color it already uses for text on that background (`@iyulab/modern-app` 0.39 reads it).
11
+ - **Patterns follow the type ladder.** `patterns.css` set font sizes in px (11, 12, 13, 28 — 19 places) and flex-table
12
+ cells and headers did too, so a consumer who rescaled `--u-text-*-size` saw components and body text change while
13
+ tables, pagers, definition lists and stats stayed put. They now read the steps — label, caption and overline, plus
14
+ two house steps derived from the ladder: `--hs-text-dense-size` (between body and label — the 13px of table cells,
15
+ definition lists, callouts) and `--hs-text-hero-size` (display + 6px — the 28px headline figure). Each read keeps
16
+ the current px as its fallback, so nothing changes at the house ladder. Button and field font sizes stay literal:
17
+ they are terms of the 28/32/40 control-height formula.
18
+
3
19
  ## [0.1.2] - 2026-10-06
4
20
 
5
21
  ### Fixed
package/README.md CHANGED
@@ -77,6 +77,11 @@ Everything else — warm-grey neutrals, the ink primary action, blue for links a
77
77
  tints, the 22/18/15/14/13/12/11 type ladder, 28/32/40 controls, 40px table rows — comes from the
78
78
  theme and can be overridden token by token.
79
79
 
80
+ The type ladder is the `--u-text-*-size` steps plus two house steps derived from them —
81
+ `--hs-text-dense-size` (between body and label: table cells, definition lists, callouts) and
82
+ `--hs-text-hero-size` (display + 6px: a headline figure). Every pattern reads a step, so rescaling the
83
+ ladder (a larger mode, a product system) carries the patterns along.
84
+
80
85
  ## The guide
81
86
 
82
87
  **Live**: https://iyulab.github.io/house-style/ — this is the guide. There is no
@@ -130,6 +135,15 @@ npm run check:start-here -w @iyulab/house-style
130
135
  packed in place of the registry's — run it before tagging a release. The deploy workflow runs
131
136
  both on every push to `main`.
132
137
 
138
+ The guide itself is checked too: after a build, every page (the landing page and each category)
139
+ must draw its section in a browser, with no page errors — a build can drop the section modules and
140
+ still succeed. The deploy workflow runs it before uploading the site:
141
+
142
+ ```bash
143
+ npm run build -w @iyulab/house-style
144
+ npm run check:guide -w @iyulab/house-style
145
+ ```
146
+
133
147
  ## License
134
148
 
135
149
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iyulab/house-style",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "The iyulab house theme: a CSS-only theme for @iyulab components — tokens, component recipes, line-of-business layout patterns and a Tailwind CSS v4 preset — plus the guide site that documents it.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,7 +25,9 @@
25
25
  "LICENSE"
26
26
  ],
27
27
  "sideEffects": [
28
- "**/*.css"
28
+ "**/*.css",
29
+ "./src/**",
30
+ "./src-app/**"
29
31
  ],
30
32
  "scripts": {
31
33
  "preversion": "node -e \"if(require('fs').existsSync('../../scripts/preversion-check.mjs'))require('child_process').execFileSync('node',['../../scripts/preversion-check.mjs'],{stdio:'inherit'})\"",
@@ -33,6 +35,7 @@
33
35
  "build": "npm run typecheck && vite build",
34
36
  "preview": "vite preview",
35
37
  "typecheck": "tsc --noEmit",
38
+ "check:guide": "node scripts/check-guide.mjs",
36
39
  "check:start-here": "node scripts/check-start-here.mjs",
37
40
  "check:start-here:local": "node scripts/check-start-here.mjs --local",
38
41
  "pretest": "node -e \"if(require('fs').existsSync('../../scripts/sibling-dist-check.js'))require('child_process').execFileSync('node',['../../scripts/sibling-dist-check.js'],{stdio:'inherit'})\"",
@@ -59,11 +62,11 @@
59
62
  },
60
63
  "devDependencies": {
61
64
  "@iyulab/components": "^2.0.0",
62
- "@iyulab/data-components": "^0.35.0",
63
- "@iyulab/enterprise": "^0.24.0",
64
- "@iyulab/modern-app": "^0.34.0",
65
- "@iyulab/router": "^0.19.0",
66
- "@iyulab/u-widgets": "^0.24.0",
65
+ "@iyulab/data-components": "^0.39.0",
66
+ "@iyulab/enterprise": "^0.25.0",
67
+ "@iyulab/modern-app": "^0.39.0",
68
+ "@iyulab/router": "^0.20.0",
69
+ "@iyulab/u-widgets": "^0.25.0",
67
70
  "@lit/react": "^1.0.8",
68
71
  "@types/node": "^26.1.1",
69
72
  "@types/react": "^19.2.14",
@@ -31,7 +31,10 @@
31
31
 
32
32
  /* ── Button — 28 / 32 / 40, medium weight ─────────────────────────────── *
33
33
  * Height follows the components' own formula (1.5em line + 2 × padding + 2px border), so
34
- * these are padding values, not fixed heights: text and icon-only buttons stay equal. */
34
+ * these are padding values, not fixed heights: text and icon-only buttons stay equal.
35
+ * The font sizes here are literal on purpose: they are terms of that height formula (the
36
+ * control ladder 28/32/40), not steps of the text ladder — tying them to `--u-text-*` would
37
+ * change control heights whenever the text ladder is rescaled. */
35
38
  u-button:not([size]),
36
39
  u-button[size='md'] {
37
40
  font-size: 13px;
@@ -90,10 +93,10 @@ u-drawer::part(body) {
90
93
  * no zebra (hover and selection carry the row), tabular figures. ──────── */
91
94
  flex-table {
92
95
  --ft-font-family: var(--u-font-base);
93
- --ft-font-size: 13px;
96
+ --ft-font-size: var(--hs-text-dense-size, 13px);
94
97
  --ft-row-height: var(--hs-row);
95
98
  --ft-cell-padding-inline: 12px;
96
- --ft-header-font-size: 12px;
99
+ --ft-header-font-size: var(--u-text-label-size, 12px);
97
100
  --ft-header-font-weight: 500;
98
101
  --ft-header-text-color: var(--u-txt-color-weak);
99
102
  --ft-header-bg: var(--u-bg-color-raised);
@@ -87,7 +87,7 @@
87
87
  border-bottom: 2px solid transparent;
88
88
  background: none;
89
89
  font: inherit;
90
- font-size: 13px;
90
+ font-size: var(--hs-text-dense-size, 13px);
91
91
  line-height: 20px;
92
92
  color: var(--u-txt-color-weak);
93
93
  text-decoration: none; /* a tab may be a link (`aria-current="page"`) */
@@ -114,7 +114,7 @@
114
114
  border-radius: var(--u-radius-pill, 9999px);
115
115
  background: var(--u-bg-color-raised);
116
116
  color: var(--u-txt-color-weak);
117
- font-size: 11px;
117
+ font-size: var(--u-text-overline-size, 11px);
118
118
  line-height: 16px;
119
119
  font-weight: 500;
120
120
  text-align: center;
@@ -182,17 +182,17 @@
182
182
  }
183
183
  .hs-stat__unit {
184
184
  margin-inline-start: 2px;
185
- font-size: 12px;
185
+ font-size: var(--u-text-caption-size, 12px);
186
186
  font-weight: 500;
187
187
  color: var(--u-txt-color-weak);
188
188
  }
189
189
  .hs-stat__sub {
190
- font-size: 12px;
190
+ font-size: var(--u-text-caption-size, 12px);
191
191
  line-height: 18px;
192
192
  color: var(--u-txt-color-weaker);
193
193
  }
194
194
  .hs-stat--hero .hs-stat__value {
195
- font-size: 28px;
195
+ font-size: var(--hs-text-hero-size, 28px);
196
196
  line-height: 34px;
197
197
  letter-spacing: -0.01em;
198
198
  }
@@ -232,7 +232,7 @@
232
232
  background: var(--u-primary-bg-color);
233
233
  }
234
234
  .hs-table-toolbar__title {
235
- font-size: 13px;
235
+ font-size: var(--hs-text-dense-size, 13px);
236
236
  font-weight: 600;
237
237
  }
238
238
  .hs-pager {
@@ -242,7 +242,7 @@
242
242
  gap: var(--u-space-sm, 8px);
243
243
  padding: var(--u-space-sm, 8px) var(--u-space-md, 12px);
244
244
  border-top: 1px solid var(--u-border-color);
245
- font-size: 12px;
245
+ font-size: var(--u-text-label-size, 12px);
246
246
  color: var(--u-txt-color-weak);
247
247
  font-variant-numeric: tabular-nums;
248
248
  }
@@ -251,7 +251,7 @@
251
251
  .hs-table {
252
252
  width: 100%;
253
253
  border-collapse: collapse;
254
- font-size: 13px;
254
+ font-size: var(--hs-text-dense-size, 13px);
255
255
  line-height: 20px;
256
256
  color: var(--u-txt-color);
257
257
  }
@@ -259,7 +259,7 @@
259
259
  padding: var(--u-space-sm, 8px) var(--u-space-md, 12px);
260
260
  text-align: start;
261
261
  white-space: nowrap;
262
- font-size: 12px;
262
+ font-size: var(--u-text-label-size, 12px);
263
263
  line-height: 16px;
264
264
  font-weight: 500;
265
265
  color: var(--u-txt-color-weak);
@@ -309,7 +309,7 @@ a.hs-id:hover,
309
309
  .hs-table .hs-group td {
310
310
  height: 32px;
311
311
  background: var(--u-bg-color-raised);
312
- font-size: 12px;
312
+ font-size: var(--u-text-label-size, 12px);
313
313
  font-weight: 600;
314
314
  color: var(--u-txt-color-weak);
315
315
  }
@@ -353,7 +353,7 @@ tr[aria-selected='true'] .hs-row-actions {
353
353
  font-weight: 600;
354
354
  }
355
355
  .hs-card__link {
356
- font-size: 12px;
356
+ font-size: var(--u-text-label-size, 12px);
357
357
  font-weight: 500;
358
358
  color: var(--u-link-txt-color);
359
359
  text-decoration: none;
@@ -375,7 +375,7 @@ a.hs-card:hover,
375
375
  grid-template-columns: max-content minmax(0, 1fr);
376
376
  gap: 6px var(--u-space-lg, 16px);
377
377
  margin: 0;
378
- font-size: 13px;
378
+ font-size: var(--hs-text-dense-size, 13px);
379
379
  line-height: 20px;
380
380
  }
381
381
  .hs-dl > dt { color: var(--u-txt-color-weak); }
@@ -412,7 +412,7 @@ a.hs-card:hover,
412
412
  padding: var(--u-space-md, 12px) var(--u-space-lg, 16px);
413
413
  border-radius: var(--u-radius-xl, 10px);
414
414
  background: var(--u-bg-color-raised);
415
- font-size: 13px;
415
+ font-size: var(--hs-text-dense-size, 13px);
416
416
  line-height: 20px;
417
417
  }
418
418
  .hs-callout__icon { color: var(--u-txt-color-weak); line-height: 20px; }
@@ -450,7 +450,7 @@ a.hs-card:hover,
450
450
  width: 100%;
451
451
  margin: 0 0 var(--u-space-md, 12px);
452
452
  padding: 0;
453
- font-size: 13px;
453
+ font-size: var(--hs-text-dense-size, 13px);
454
454
  font-weight: 600;
455
455
  color: var(--u-txt-color);
456
456
  }
@@ -475,12 +475,12 @@ a.hs-card:hover,
475
475
  color: var(--u-danger-color-strong);
476
476
  }
477
477
  .hs-field__help {
478
- font-size: 12px;
478
+ font-size: var(--u-text-caption-size, 12px);
479
479
  line-height: 18px;
480
480
  color: var(--u-txt-color-weaker);
481
481
  }
482
482
  .hs-field__error {
483
- font-size: 12px;
483
+ font-size: var(--u-text-caption-size, 12px);
484
484
  line-height: 18px;
485
485
  color: var(--u-danger-color-strong);
486
486
  }
@@ -517,7 +517,7 @@ a.hs-card:hover,
517
517
  background: var(--u-bg-color);
518
518
  }
519
519
  .hs-sheet-footer__summary {
520
- font-size: 12px;
520
+ font-size: var(--u-text-caption-size, 12px);
521
521
  color: var(--u-txt-color-weak);
522
522
  }
523
523
  .hs-sheet-footer__actions {
@@ -534,7 +534,7 @@ a.hs-card:hover,
534
534
  padding: 0 5px;
535
535
  border: 1px solid var(--u-border-color);
536
536
  border-radius: var(--u-radius-md, 4px);
537
- font-size: 11px;
537
+ font-size: var(--u-text-overline-size, 11px);
538
538
  line-height: 16px;
539
539
  font-weight: 500;
540
540
  color: var(--u-txt-color-weak);
@@ -548,7 +548,7 @@ a.hs-card:hover,
548
548
  height: 18px;
549
549
  padding: 0 6px;
550
550
  border-radius: var(--u-radius-pill, 9999px);
551
- font-size: 11px;
551
+ font-size: var(--u-text-overline-size, 11px);
552
552
  font-weight: 600;
553
553
  font-variant-numeric: tabular-nums;
554
554
  background: var(--u-bg-color-raised);
package/styles/tokens.css CHANGED
@@ -140,6 +140,7 @@
140
140
  --app-sidebar-width: 232px;
141
141
  --app-sidebar-active-bg: var(--hs-brand-soft);
142
142
  --app-sidebar-active-fg: var(--hs-brand-ink);
143
+ --app-sidebar-group-active-fg: var(--hs-brand-ink);
143
144
 
144
145
  /* Brand — the application's identity colour. The house default is neutral, so an
145
146
  unbranded app looks finished; an application sets these three and nothing else. */
@@ -304,6 +305,12 @@
304
305
  --hs-row-compact: 32px;
305
306
  --hs-page-padding: 24px;
306
307
 
308
+ /* House type steps beyond the shared ladder — derived from it, so a rescaled ladder (density, a product system)
309
+ carries them along. Dense = the step between body and label (13 at 14/12): table cells, definition lists,
310
+ callouts. Hero = a headline figure, display + 6 (28 at 22). */
311
+ --hs-text-dense-size: calc((var(--u-text-body-size) + var(--u-text-label-size)) / 2);
312
+ --hs-text-hero-size: calc(var(--u-text-display-size) + 6px);
313
+
307
314
  /* Field box (`@iyulab/components`) — 32px fields beside 32px buttons; 40px inside form sections */
308
315
  --u-field-padding-block: 4.5px;
309
316
  --u-field-padding-inline: 12px;