@nswds/ui 9.1.2 → 9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nswds/ui",
3
- "version": "9.1.2",
3
+ "version": "9.1.3",
4
4
  "description": "UI components for NSW Government digital products, providing reusable design elements and patterns for consistent user interfaces.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/digitalnsw/nswds-ui#readme",
@@ -44,7 +44,10 @@
44
44
  @import '@nswds/tokens/css/motion/global.css';
45
45
  /* Raw typography VALUES on :root (--font-size-*, --font-weight-*, --line-height-*),
46
46
  so the type-scale bridge below resolves even though Tailwind tree-shakes the
47
- unreferenced @theme keys. */
47
+ unreferenced @theme keys. It also ships --font-family-sans / --font-family-mono,
48
+ which are CONSUMER-FACING: the README's "Fonts" section has two-build apps map
49
+ their own --font-sans/--font-mono onto them. Dropping this import breaks those
50
+ apps' fonts silently — the consumer fixture (check-font-stack.mjs) guards it. */
48
51
  @import '@nswds/tokens/css/typography/global.css';
49
52
 
50
53
  /* `dark:` utility variant. Two things it must line up with:
@@ -95,8 +98,14 @@
95
98
  --color-background: var(--background);
96
99
  /* Radius scale comes from @nswds/tokens v4 via preset.css:
97
100
  --radius-none/sm(4px)/md(8px)/lg(16px)/pill. No longer hand-derived here. */
98
- --font-sans: var(--font-sans);
99
- --font-mono: var(--font-mono);
101
+ /* Font families likewise come from preset.css (--font-sans: 'Public Sans', …,
102
+ --font-mono: 'JetBrains Mono', …). Never redeclare them here as
103
+ `var(--font-sans)`: a later @theme key overrides preset's, and a custom
104
+ property referencing itself is guaranteed-invalid, so both stacks computed
105
+ empty: text fell through to preflight's system-font fallback and
106
+ `font-mono` utilities rendered sans. Guarded by verify-dist.mjs (no
107
+ self-referencing custom property in dist/styles.css, and the NSW stacks
108
+ must win) and by the font assertions in badge.tests.stories.tsx's CssCheck. */
100
109
  }
101
110
 
102
111
  /* Motion: route Tailwind's default transition timing through the v4 motion tokens.