@iyulab/house-style 0.1.3 → 0.1.5

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,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.5] - 2026-10-09
4
+
5
+ ### Fixed
6
+
7
+ - **The `@iyulab/modern-app` peer range now starts where the theme takes effect: `>=0.39.0`** (was `>=0.34.0`). The
8
+ theme sets `--app-sidebar-group-active-fg` so a sidebar group header that holds the current page stays readable on
9
+ the theme's light active surface; modern-app reads that property from 0.39.0. With 0.34–0.38 the range allowed it,
10
+ and the header text was derived from the surface instead — about 1.6:1 contrast in light mode.
11
+
12
+ ## [0.1.4] - 2026-10-07
13
+
14
+ ### Fixed
15
+
16
+ - **The control ladder follows the control density** (`--u-density`). Button font sizes were literal (md 13px, lg
17
+ 14px) and so were the field and button paddings, so a host that raised the density grew only some steps: with
18
+ `@iyulab/components` 2.13 (sm follows the density) a small button became larger than a default one (13.7 > 13px),
19
+ and buttons stopped lining up with fields. Font sizes are now steps of the density and paddings are em. At the
20
+ default 14px nothing changes — 12 / 13 / 14px and 28 / 32 / 40px; at 16px all three steps grow in order and
21
+ buttons and fields stay level.
22
+
3
23
  ## [0.1.3] - 2026-10-06
4
24
 
5
25
  ### Fixed
package/README.md CHANGED
@@ -100,9 +100,14 @@ The live page is organized into sections:
100
100
  ## The reference app
101
101
 
102
102
  The guide has a second half: a small but working line-of-business app, assembled only from
103
- these libraries, at **https://iyulab.github.io/house-style/app/** (sign in with `demo` / `demo`
104
- — the backend is mocked in the browser, there are no real accounts). It is reachable from the
105
- guide's sidebar under "Open the reference app".
103
+ these libraries, at **https://iyulab.github.io/house-style/app/** (sign in with `demo` / `demo`,
104
+ or `viewer` / `viewer` for a read-only account — the backend is mocked in the browser, there are
105
+ no real accounts). It is reachable from the guide's sidebar under "Open the reference app".
106
+
107
+ The two accounts show permissions end to end: one permission decides both whether a link or
108
+ action is shown and whether its route lets the user in. The read-only account sees no create or
109
+ cancel actions, and opening the new-order screen by its address shows the blocked state
110
+ (`<u-empty-state variant="no-access">`) inside the shell.
106
111
 
107
112
  Where the guide shows each pattern on its own, the app shows them load-bearing: a sidebar shell,
108
113
  a list screen with filtering, selection and bulk actions, a master-detail order screen with an
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iyulab/house-style",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
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": {
@@ -36,11 +36,20 @@
36
36
  "preview": "vite preview",
37
37
  "typecheck": "tsc --noEmit",
38
38
  "check:guide": "node scripts/check-guide.mjs",
39
+ "check:a11y": "node scripts/check-a11y.mjs",
40
+ "check:ladder": "node scripts/check-ladder.mjs",
39
41
  "check:start-here": "node scripts/check-start-here.mjs",
40
42
  "check:start-here:local": "node scripts/check-start-here.mjs --local",
41
43
  "pretest": "node -e \"if(require('fs').existsSync('../../scripts/sibling-dist-check.js'))require('child_process').execFileSync('node',['../../scripts/sibling-dist-check.js'],{stdio:'inherit'})\"",
42
44
  "test": "node --test \"tests/*.test.mjs\""
43
45
  },
46
+ "iyulab": {
47
+ "upstreamChecks": {
48
+ "@iyulab/components": [
49
+ "check:ladder"
50
+ ]
51
+ }
52
+ },
44
53
  "engines": {
45
54
  "node": ">=20"
46
55
  },
@@ -50,7 +59,7 @@
50
59
  "peerDependencies": {
51
60
  "@iyulab/components": "^2.0.0",
52
61
  "@iyulab/flex-table": ">=0.41.0",
53
- "@iyulab/modern-app": ">=0.34.0"
62
+ "@iyulab/modern-app": ">=0.39.0"
54
63
  },
55
64
  "peerDependenciesMeta": {
56
65
  "@iyulab/flex-table": {
@@ -61,16 +70,18 @@
61
70
  }
62
71
  },
63
72
  "devDependencies": {
64
- "@iyulab/components": "^2.0.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",
73
+ "@iyulab/components": "^2.19.0",
74
+ "@iyulab/data-components": "^0.47.0",
75
+ "@iyulab/enterprise": "^0.29.0",
76
+ "@iyulab/flex-table": "^0.64.0",
77
+ "@iyulab/modern-app": "^0.49.0",
78
+ "@iyulab/router": "^0.21.0",
79
+ "@iyulab/u-widgets": "^0.29.0",
70
80
  "@lit/react": "^1.0.8",
71
81
  "@types/node": "^26.1.1",
72
- "@types/react": "^19.2.14",
73
- "@types/react-dom": "^19.2.3",
82
+ "@types/react": "^19.3.0",
83
+ "@types/react-dom": "^19.3.0",
84
+ "axe-core": "^4.14.0",
74
85
  "echarts": "^6.1.0",
75
86
  "lit": "^3.3.2",
76
87
  "msw": "^3.0.0",
@@ -32,23 +32,27 @@
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
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
+ * The font sizes are terms of that height formula (the control ladder 28/32/40), not steps of
36
+ * the text ladder — tying them to `--u-text-*` would change control heights whenever the text
37
+ * ladder is rescaled. They are steps of the control density instead (`--u-density`, the
38
+ * components' size axis): at the default 14px they are 12 / 13 / 14 and the heights 28/32/40;
39
+ * a host that raises the density (a field or touch mode) grows all three together and in order.
40
+ * Padding is in em for the same reason — the n/13, n/12, n/14 factors give the px values at the
41
+ * default density exactly. (sm takes the components' own size: density × 6/7.) */
38
42
  u-button:not([size]),
39
43
  u-button[size='md'] {
40
- font-size: 13px;
41
- --btn-padding-block: 5.25px; /* 19.5 + 10.5 + 2 = 32 */
42
- --btn-padding-inline: 12px;
44
+ font-size: calc(var(--u-density, 14px) * 13 / 14);
45
+ --btn-padding-block: calc(5.25em / 13); /* 13px: 19.5 + 10.5 + 2 = 32 */
46
+ --btn-padding-inline: calc(12em / 13);
43
47
  }
44
48
  u-button[size='sm'] {
45
- --btn-padding-block: 4px; /* 12px → 18 + 8 + 2 = 28 */
46
- --btn-padding-inline: 8px;
49
+ --btn-padding-block: calc(4em / 12); /* 12px: 18 + 8 + 2 = 28 */
50
+ --btn-padding-inline: calc(8em / 12);
47
51
  }
48
52
  u-button[size='lg'] {
49
- font-size: 14px;
50
- --btn-padding-block: 8.5px; /* 21 + 17 + 2 = 40 */
51
- --btn-padding-inline: 16px;
53
+ font-size: var(--u-density, 14px);
54
+ --btn-padding-block: calc(8.5em / 14); /* 14px: 21 + 17 + 2 = 40 */
55
+ --btn-padding-inline: calc(16em / 14);
52
56
  }
53
57
  u-button[appearance='link'] {
54
58
  --btn-padding-inline: 0;
@@ -58,11 +62,11 @@ u-button[appearance='link'] {
58
62
  * (Components 2.0 renders fields at 14px by default, so a field no longer grows with the
59
63
  * surrounding text; the house sets the box padding per size.) ── */
60
64
  :is(u-input, u-select, u-textarea, u-date-picker, u-date-range-picker)[size='sm'] {
61
- --u-field-padding-block: 4px; /* 12px → 18 + 8 + 2 = 28 */
65
+ --u-field-padding-block: calc(4em / 12); /* 12px: 18 + 8 + 2 = 28 */
62
66
  }
63
67
  :is(u-input, u-select, u-textarea, u-date-picker, u-date-range-picker)[size='lg'] {
64
- font-size: 14px;
65
- --u-field-padding-block: 8.5px; /* 21 + 17 + 2 = 40 */
68
+ font-size: var(--u-density, 14px); /* with the density, like md — the step is the padding */
69
+ --u-field-padding-block: calc(8.5em / 14); /* 14px: 21 + 17 + 2 = 40 */
66
70
  }
67
71
 
68
72
  /* ── Tag — 22px labels (12px text · 1px block padding · hairline) to sit inside 40px rows.
@@ -486,7 +486,7 @@ a.hs-card:hover,
486
486
  }
487
487
  /* Form fields are 40px (the side-sheet and edit-form size); toolbars keep 32px. */
488
488
  .hs-field {
489
- --u-field-padding-block: 8.5px;
489
+ --u-field-padding-block: calc(8.5em / 14); /* 14px: 21 + 17 + 2 = 40 — and with the density */
490
490
  }
491
491
  .hs-field :is(u-input, u-select, u-textarea, u-date-picker, u-date-range-picker) {
492
492
  width: 100%;
package/styles/tokens.css CHANGED
@@ -311,9 +311,10 @@
311
311
  --hs-text-dense-size: calc((var(--u-text-body-size) + var(--u-text-label-size)) / 2);
312
312
  --hs-text-hero-size: calc(var(--u-text-display-size) + 6px);
313
313
 
314
- /* Field box (`@iyulab/components`) — 32px fields beside 32px buttons; 40px inside form sections */
315
- --u-field-padding-block: 4.5px;
316
- --u-field-padding-inline: 12px;
314
+ /* Field box (`@iyulab/components`) — 32px fields beside 32px buttons; 40px inside form sections. In em, so the box
315
+ follows the control density with the buttons (resolved at the field: 4.5px / 12px at the default 14px). */
316
+ --u-field-padding-block: calc(4.5em / 14);
317
+ --u-field-padding-inline: calc(12em / 14);
317
318
  --u-field-radius: 6px;
318
319
 
319
320
  /* Shell (`@iyulab/modern-app`) — 32px navigation rows, 16px icons, a flat current item */