{"_id":"@dhcw/sr-tokens","_rev":"3-74dba1b89aa7658e3388fb5e0e56978f","name":"@dhcw/sr-tokens","dist-tags":{"next":"0.2.1-rc.0","latest":"0.4.0"},"versions":{"0.2.1-rc.0":{"name":"@dhcw/sr-tokens","version":"0.2.1-rc.0","license":"MIT","_id":"@dhcw/sr-tokens@0.2.1-rc.0","maintainers":[{"name":"david-nicol","email":"David.Nicol2@wales.nhs.uk"},{"name":"chuk_dhcw","email":"chukwunonso.nweke@wales.nhs.uk"}],"homepage":"https://dhcw-digital-health-and-care-wales.github.io/single-record-design-system/","bugs":{"url":"https://github.com/DHCW-Digital-Health-and-Care-Wales/single-record-design-system/issues"},"dist":{"shasum":"1a3e34d99a179cea4879f62472aecd65aa846c74","tarball":"https://registry.npmjs.org/@dhcw/sr-tokens/-/sr-tokens-0.2.1-rc.0.tgz","fileCount":11,"integrity":"sha512-scY0BCY+xxpNFBgHvA7UFcYUJf3JWOp64MluInyMtkLabuxnw+34j1dg3I8ZntAQ6hdDBlN5zgq172qCsdm4cw==","signatures":[{"sig":"MEUCIQC+qgWm1FzTEDkvQNMqvSQWBubH4cko0Ek6w0f5bunBKAIgE0bILTiSqwFiSqoybZUaE/zhY6GtF+sTMWMJVm/Gm/g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dhcw%2fsr-tokens@0.2.1-rc.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":162336},"type":"module","exports":{".":"./build/css/tokens.css","./dark":"./build/css/tokens-dark.css","./fonts":"./build/css/fonts.css","./build/*":"./build/*","./flat.json":"./build/json/tokens-flat.json","./typography":"./build/css/typography.css","./package.json":"./package.json"},"gitHead":"3bed9a2c8b8a1547491b58ada93f7276bf0d47f4","scripts":{"build":"node build.js","clean":"rm -rf build","prepublishOnly":"npm run build"},"_npmUser":{"name":"chuk_dhcw","email":"chukwunonso.nweke@wales.nhs.uk"},"repository":{"url":"git+https://github.com/DHCW-Digital-Health-and-Care-Wales/single-record-design-system.git","type":"git","directory":"packages/tokens"},"_npmVersion":"10.9.8","description":"DHCW Single Record Design System — design tokens. Outputs CSS custom properties, SCSS variables, and XAML ResourceDictionary from the canonical JSON token source.","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"style-dictionary":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sr-tokens_0.2.1-rc.0_1788434679531_0.8466121044490098","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@dhcw/sr-tokens","version":"0.3.0","license":"MIT","_id":"@dhcw/sr-tokens@0.3.0","maintainers":[{"name":"david-nicol","email":"David.Nicol2@wales.nhs.uk"},{"name":"chuk_dhcw","email":"chukwunonso.nweke@wales.nhs.uk"}],"homepage":"https://dhcw-digital-health-and-care-wales.github.io/single-record-design-system/","bugs":{"url":"https://github.com/DHCW-Digital-Health-and-Care-Wales/single-record-design-system/issues"},"dist":{"shasum":"993d5dab527b2df6991ecd9fa32712ec825e1d80","tarball":"https://registry.npmjs.org/@dhcw/sr-tokens/-/sr-tokens-0.3.0.tgz","fileCount":11,"integrity":"sha512-7nQS6LoCFnz8rnpx+QRf6u1LC94ZgApZY9kcDySLauuJukFrFtqFz5q8ur7Z4XqqzrtKTTmAuuvQwkropPIuwg==","signatures":[{"sig":"MEYCIQDCqYqP1UNHVoCLHycKT/1i8AKGJnezAjoCN7gSRS7mrQIhAI7ltBgCPnHuo4vRA8N1GBFepAjvDiLUJJeMfgPs50Sm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dhcw%2fsr-tokens@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":174041},"type":"module","exports":{".":"./build/css/tokens.css","./dark":"./build/css/tokens-dark.css","./fonts":"./build/css/fonts.css","./build/*":"./build/*","./flat.json":"./build/json/tokens-flat.json","./typography":"./build/css/typography.css","./package.json":"./package.json"},"gitHead":"c5cc1d3dd7b0058af49dc56abf98993e559d68d9","scripts":{"build":"node build.js","clean":"rm -rf build","prepublishOnly":"npm run build"},"_npmUser":{"name":"chuk_dhcw","email":"chukwunonso.nweke@wales.nhs.uk"},"repository":{"url":"git+https://github.com/DHCW-Digital-Health-and-Care-Wales/single-record-design-system.git","type":"git","directory":"packages/tokens"},"_npmVersion":"10.9.8","description":"DHCW Single Record Design System — design tokens. Outputs CSS custom properties, SCSS variables, and XAML ResourceDictionary from the canonical JSON token source.","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"style-dictionary":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sr-tokens_0.3.0_1788794088502_0.5468985733983069","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"_id":"@dhcw/sr-tokens@0.4.0","bugs":{"url":"https://github.com/DHCW-Digital-Health-and-Care-Wales/single-record-design-system/issues"},"dist":{"shasum":"dac611a462930d4f0f44b38fd8e11d1eae5008ad","tarball":"https://registry.npmjs.org/@dhcw/sr-tokens/-/sr-tokens-0.4.0.tgz","fileCount":11,"integrity":"sha512-r3o3oG0FvC7DdYrfw5F/BZM3loQOp07HwISzjIWN0wofHvQGe9Qfv5GQGUwUeAZkqsNZ8ILO6qRbzygxnLxNdw==","signatures":[{"sig":"MEQCIGyKfFYHFvVZpsYbZtGT91WKMSe4I3SVTdriXsFmLeioAiAVF6feMLvpsmh3Oz56dG36KiKt2qSbCKdRYS7GYL1oDg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHAvFCFgqAojjoZlJIr+RHtCDQzWTB9smaXcrmmXC1I0AiBg6mNtSSlwensYeyh8vfW4rfu876M2jl1sQbcR0F9e4Q=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dhcw%2fsr-tokens@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":181984},"name":"@dhcw/sr-tokens","type":"module","exports":{".":"./build/css/tokens.css","./dark":"./build/css/tokens-dark.css","./fonts":"./build/css/fonts.css","./build/*":"./build/*","./flat.json":"./build/json/tokens-flat.json","./typography":"./build/css/typography.css","./package.json":"./package.json"},"gitHead":"5d3b28af061a8a6cf6b9ba9452d39dc2b79248a5","license":"MIT","scripts":{"build":"node build.js","clean":"rm -rf build","prepublishOnly":"npm run build"},"version":"0.4.0","_npmUser":{"name":"chuk_dhcw","email":"chukwunonso.nweke@wales.nhs.uk"},"homepage":"https://dhcw-digital-health-and-care-wales.github.io/single-record-design-system/","repository":{"url":"git+https://github.com/DHCW-Digital-Health-and-Care-Wales/single-record-design-system.git","type":"git","directory":"packages/tokens"},"_npmVersion":"10.9.8","description":"DHCW Single Record Design System — design tokens. Outputs CSS custom properties, SCSS variables, and XAML ResourceDictionary from the canonical JSON token source.","directories":{},"maintainers":[{"name":"david-nicol","email":"David.Nicol2@wales.nhs.uk"},{"name":"chuk_dhcw","email":"chukwunonso.nweke@wales.nhs.uk"}],"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"style-dictionary":"^4.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sr-tokens_0.4.0_1790771243154_0.9605027510536244"}}},"time":{"created":"2026-09-03T11:24:37.669Z","modified":"2026-09-30T12:27:23.627Z","0.2.1-rc.0":"2026-09-03T11:24:39.653Z","0.3.0":"2026-09-07T15:14:48.639Z","0.4.0":"2026-09-30T12:27:23.285Z"},"bugs":{"url":"https://github.com/DHCW-Digital-Health-and-Care-Wales/single-record-design-system/issues"},"license":"MIT","homepage":"https://dhcw-digital-health-and-care-wales.github.io/single-record-design-system/","repository":{"url":"git+https://github.com/DHCW-Digital-Health-and-Care-Wales/single-record-design-system.git","type":"git","directory":"packages/tokens"},"description":"DHCW Single Record Design System — design tokens. Outputs CSS custom properties, SCSS variables, and XAML ResourceDictionary from the canonical JSON token source.","maintainers":[{"name":"david-nicol","email":"David.Nicol2@wales.nhs.uk"},{"name":"chuk_dhcw","email":"chukwunonso.nweke@wales.nhs.uk"}],"readme":"# @dhcw/sr-tokens\n\nDesign tokens for the DHCW Single Record Design System.\n\nTransforms the canonical JSON token source (`/foundations/tokens/`) into consumable formats for all supported frameworks.\n\n> **Note:** the generated `build/` directory **is committed** to the repo. The source of truth is still `/foundations/tokens/` — `build/` is the compiled output. It is tracked (rather than gitignored) so the outputs are visible without running a build, consumers using the workspace get the files immediately, and the Storybook/Pages deploy is reproducible. Re-run `npm run build:tokens` from the repo root after any change to the source tokens, then commit the regenerated `build/`.\n\n## Outputs\n\n| File | Format | Target |\n|---|---|---|\n| `build/css/tokens.css` | CSS custom properties (`:root`) | HTML/CSS, Blazor, React, .NET 4.8 legacy |\n| `build/css/tokens-dark.css` | CSS custom properties (`[data-theme=\"dark\"]`) | Dark mode — all web targets |\n| `build/css/typography.css` | Responsive `.sr-type-*` utility classes (mobile-first; desktop scale at ≥1024px) | HTML/CSS, Blazor, React — type scale (composites can't be single CSS vars). See DDR-011 |\n| `build/scss/_tokens.scss` | SCSS variables | Build-time consumption where Sass is used |\n| `build/scss/_tokens-dark.scss` | SCSS variables (dark) | Build-time dark mode |\n| `build/xaml/Tokens.xaml` | XAML ResourceDictionary | .NET MAUI |\n| `build/xaml/Tokens.Dark.xaml` | XAML ResourceDictionary (dark) | .NET MAUI dark mode |\n| `build/json/tokens-flat.json` | Flat key→value JSON | Tooling, CI, linting |\n\n## Usage\n\n### Build\n\n```bash\ncd packages/tokens\nnpm install\nnpm run build\n```\n\n### Consume in HTML / CSS / Blazor / .NET 4.8\n\nCopy or link `build/css/tokens.css` into your project:\n\n```html\n<link rel=\"stylesheet\" href=\"tokens.css\">\n```\n\nThen reference tokens as CSS custom properties:\n\n```css\n.button-primary {\n  background-color: var(--sr-color-interactive-primary);\n  color: var(--sr-color-text-inverse);\n}\n```\n\nFor dark mode, include `tokens-dark.css` and toggle `data-theme=\"dark\"` on the root element.\n\n### Consume in .NET MAUI\n\nAdd `build/xaml/Tokens.xaml` to your `ResourceDictionary`:\n\n```xml\n<Application.Resources>\n    <ResourceDictionary>\n        <ResourceDictionary.MergedDictionaries>\n            <ResourceDictionary Source=\"Tokens.xaml\" />\n        </ResourceDictionary.MergedDictionaries>\n    </ResourceDictionary>\n</Application.Resources>\n```\n\nThen reference tokens:\n\n```xml\n<Button BackgroundColor=\"{StaticResource SrColorInteractivePrimary}\"\n        TextColor=\"{StaticResource SrColorTextInverse}\" />\n```\n\n### Consume in SCSS\n\n```scss\n@use 'path/to/tokens' as sr;\n\n.button-primary {\n  background-color: sr.$sr-color-interactive-primary;\n}\n```\n\n## Token architecture\n\n```\nGlobal (Tier 1)          → Semantic (Tier 2)           → Component (Tier 3)\n/primitives/color.json      /semantic/color.json           (future — per-component)\n/primitives/spacing.json    /semantic/spacing.json\n/primitives/typography.json /semantic/typography.json\n```\n\nComponents reference semantic tokens only. Semantic tokens resolve to primitives. This allows theme switching (light/dark) by swapping the semantic layer.\n","readmeFilename":"README.md"}