@helvetia-design/context 0.1.0-snapshot.332-ce68326 → 0.2.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/dist/CONTEXT.md +1 -3
- package/dist/MANIFEST.json +56 -19
- package/dist/apps/storybook/CONTEXT.md +3 -2
- package/dist/apps/toky/CONTEXT.md +1 -1
- package/dist/docs/ARCHITECTURE.md +25 -90
- package/dist/docs/STYLE_GUIDE.md +1 -0
- package/dist/docs/agents/component-audit.md +6 -13
- package/dist/docs/agents/domain.md +1 -1
- package/dist/docs/agents/ds-team.md +379 -0
- package/dist/docs/agents/issue-tracker.md +6 -2
- package/dist/docs/agents/triage-labels.md +5 -3
- package/dist/docs/agents/workflows/a-new-component.md +169 -0
- package/dist/docs/agents/workflows/b-bug-fix.md +78 -0
- package/dist/docs/agents/workflows/c-feature.md +73 -0
- package/dist/docs/agents/workflows/d-component-into-figma.md +129 -0
- package/dist/docs/agents/workflows/e-deprecation.md +75 -0
- package/dist/docs/agents/workflows/g-recreate.md +50 -0
- package/dist/docs/agents/workflows/h-pr-review.md +40 -0
- package/dist/docs/agents/workflows/i-pr-rescue.md +33 -0
- package/dist/docs/agents/workflows/j-ci-triage.md +42 -0
- package/dist/docs/agents/workflows/k-audit-sweep.md +33 -0
- package/dist/docs/agents/workflows/l-spec.md +37 -0
- package/dist/packages/angular/CONTEXT.md +4 -2
- package/dist/packages/core/CONTEXT.md +37 -498
- package/dist/packages/playwright/CONTEXT.md +32 -1
- package/dist/packages/skills/CONTEXT.md +1 -1
- package/dist/packages/tokens/CONTEXT.md +4 -2
- package/dist/skills/ds-a11y-audit/SKILL.md +92 -0
- package/dist/skills/ds-a11y-plan/SKILL.md +123 -0
- package/dist/skills/ds-a11y-test/SKILL.md +93 -0
- package/dist/skills/ds-a11y-verify/SKILL.md +72 -0
- package/dist/skills/{ds-token-check/SKILL.md → ds-audit-tokens/REFERENCE.md} +6 -6
- package/dist/skills/ds-audit-tokens/SKILL.md +82 -0
- package/dist/skills/ds-changeset/SKILL.md +23 -15
- package/dist/skills/ds-ci-report/SKILL.md +16 -0
- package/dist/skills/ds-ci-report/fetch.sh +36 -0
- package/dist/skills/ds-code-to-figma/CONVENTIONS.md +8 -0
- package/dist/skills/ds-code-to-figma/PHASE-1-ANALYZE.md +2 -1
- package/dist/skills/ds-code-to-figma/PHASE-3-BUILD.md +11 -11
- package/dist/skills/ds-code-to-figma/SKILL.md +5 -6
- package/dist/skills/ds-design-guidelines/SKILL.md +84 -0
- package/dist/skills/ds-document-component/REFERENCE.md +569 -0
- package/dist/skills/ds-document-component/SKILL.md +8 -565
- package/dist/skills/ds-document-guidelines/SKILL.md +86 -0
- package/dist/skills/ds-figma-anatomy/SKILL.md +66 -0
- package/dist/skills/ds-figma-component-set/SKILL.md +89 -0
- package/dist/skills/ds-figma-copy-me/SKILL.md +61 -0
- package/dist/skills/ds-figma-mapping/SKILL.md +111 -0
- package/dist/skills/ds-figma-measurements/SKILL.md +76 -0
- package/dist/skills/ds-figma-review/SKILL.md +81 -0
- package/dist/skills/ds-framework-wrappers/SKILL.md +92 -0
- package/dist/skills/{ds-create-component → ds-implement-component}/REFERENCE.md +16 -89
- package/dist/skills/ds-implement-component/SKILL.md +235 -0
- package/dist/skills/ds-issue-reply/SKILL.md +60 -0
- package/dist/skills/ds-issue-triage/SKILL.md +42 -0
- package/dist/skills/ds-issue-write/SKILL.md +56 -0
- package/dist/skills/ds-lint-component/SKILL.md +4 -8
- package/dist/skills/ds-lint-component/implementation.js +1 -89
- package/dist/skills/ds-manage-brand/SKILL.md +80 -0
- package/dist/skills/ds-manage-stories/SKILL.md +66 -0
- package/dist/skills/ds-manage-tokens/SKILL.md +99 -0
- package/dist/skills/ds-modify-component/SKILL.md +110 -0
- package/dist/skills/ds-plan-component/SKILL.md +265 -0
- package/dist/skills/ds-plan-figma-component/SKILL.md +135 -0
- package/dist/skills/ds-pr-body/SKILL.md +58 -0
- package/dist/skills/ds-repair-component/SKILL.md +68 -0
- package/dist/skills/ds-scout-component/SKILL.md +179 -0
- package/dist/skills/ds-scout-component/scripts/scout.mjs +596 -0
- package/dist/skills/ds-scout-component/scripts/snap.mjs +186 -0
- package/dist/skills/ds-sync-figma-tokens/SKILL.md +83 -0
- package/dist/skills/ds-test-component/README.md +14 -60
- package/dist/skills/ds-test-component/REFERENCE.md +7 -1
- package/dist/skills/ds-test-component/SKILL.md +131 -283
- package/dist/skills/ds-test-component/examples.md +230 -0
- package/dist/skills/ds-test-component/implementation.js +117 -188
- package/dist/skills/ds-validate-component/SKILL.md +105 -0
- package/dist/skills/ds-validate-documentation/SKILL.md +72 -0
- package/dist/skills/ds-validate-tokens/SKILL.md +77 -0
- package/dist/skills/ds-visual-review/SKILL.md +49 -0
- package/dist/skills/ds-visual-review/review.py +92 -0
- package/package.json +3 -2
- package/sbom.cdx.json +78417 -0
- package/dist/docs/agents/component-category-migration-plan.md +0 -98
- package/dist/skills/ds-code-to-figma/TODO.md +0 -59
- package/dist/skills/ds-code-to-figma/references/figma-responsive-tokens/Desktop.tokens.json +0 -456
- package/dist/skills/ds-code-to-figma/references/figma-responsive-tokens/Mobile.tokens.json +0 -456
- package/dist/skills/ds-code-to-figma/references/figma-responsive-tokens/Tablet.tokens.json +0 -456
- package/dist/skills/ds-code-to-figma/references/figma-tokens/Base.tokens.json +0 -26049
- package/dist/skills/ds-code-to-figma/references/figma-tokens/OrangeVacations.tokens.json +0 -26049
- package/dist/skills/ds-create-component/README.md +0 -190
- package/dist/skills/ds-create-component/SKILL.md +0 -227
- package/dist/skills/ds-create-component/implementation.js +0 -408
- package/dist/skills/ds-create-component/index.js +0 -293
- package/dist/skills/ds-plan/README.md +0 -270
- package/dist/skills/ds-plan/SKILL.md +0 -153
- package/dist/skills/ds-test-component/generators.js +0 -288
- /package/dist/skills/{ds-token-check → ds-audit-tokens}/naming-rules.js +0 -0
- /package/dist/skills/{ds-token-check → ds-audit-tokens}/scan.js +0 -0
package/dist/CONTEXT.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# CONTEXT — Helvetia Design System Repository
|
|
2
2
|
|
|
3
3
|
This document captures the domain language, architectural patterns, and key concepts that govern the entire design system monorepo.
|
|
4
|
-
bump.
|
|
5
4
|
|
|
6
5
|
## Overview
|
|
7
6
|
|
|
@@ -28,12 +27,11 @@ Every decision in this system adheres to these principles (from ARCHITECTURE.md)
|
|
|
28
27
|
|
|
29
28
|
### Release Process
|
|
30
29
|
|
|
31
|
-
- Changes are merged into `
|
|
30
|
+
- Changes are merged into `main` branch
|
|
32
31
|
- **Changesets** (`.changeset/*.md` files) document changes as `patch` | `minor` | `major`
|
|
33
32
|
- All `@helvetia-design/*` packages are a fixed version group (`.changeset/config.json`) and release together under one version with one changelog — so every changeset's frontmatter always targets `@helvetia-design/core`, never another package. The **scope** (e.g. `core`, `styles`, or a component name like `pagination`) only becomes the bold label on the changelog line; it never changes which package is bumped. Created via `scripts/create-changeset.mjs` (driven non-interactively by the `ds-changeset` skill).
|
|
34
33
|
- **Changeset Release PR** aggregates all changesets and bumps version
|
|
35
34
|
- **npm publish** happens automatically when Release PR is merged
|
|
36
|
-
- **LTS support** — `main` branch is a parallel long-term support release line
|
|
37
35
|
|
|
38
36
|
### CI/CD Workflow
|
|
39
37
|
|
package/dist/MANIFEST.json
CHANGED
|
@@ -54,11 +54,22 @@
|
|
|
54
54
|
"docs/adr/0038-inverted-is-not-a-color.md",
|
|
55
55
|
"docs/adr/0039-ssr-tests-compare-against-visual-baselines.md",
|
|
56
56
|
"docs/agents/component-audit.md",
|
|
57
|
-
"docs/agents/component-category-migration-plan.md",
|
|
58
57
|
"docs/agents/definition-of-ready.md",
|
|
59
58
|
"docs/agents/domain.md",
|
|
59
|
+
"docs/agents/ds-team.md",
|
|
60
60
|
"docs/agents/issue-tracker.md",
|
|
61
61
|
"docs/agents/triage-labels.md",
|
|
62
|
+
"docs/agents/workflows/a-new-component.md",
|
|
63
|
+
"docs/agents/workflows/b-bug-fix.md",
|
|
64
|
+
"docs/agents/workflows/c-feature.md",
|
|
65
|
+
"docs/agents/workflows/d-component-into-figma.md",
|
|
66
|
+
"docs/agents/workflows/e-deprecation.md",
|
|
67
|
+
"docs/agents/workflows/g-recreate.md",
|
|
68
|
+
"docs/agents/workflows/h-pr-review.md",
|
|
69
|
+
"docs/agents/workflows/i-pr-rescue.md",
|
|
70
|
+
"docs/agents/workflows/j-ci-triage.md",
|
|
71
|
+
"docs/agents/workflows/k-audit-sweep.md",
|
|
72
|
+
"docs/agents/workflows/l-spec.md",
|
|
62
73
|
"packages/ag-grid/CONTEXT.md",
|
|
63
74
|
"packages/angular/CONTEXT.md",
|
|
64
75
|
"packages/assets/CONTEXT.md",
|
|
@@ -70,7 +81,17 @@
|
|
|
70
81
|
"packages/tokens/CONTEXT.md",
|
|
71
82
|
"skills/_shared/component-categories.js",
|
|
72
83
|
"skills/_shared/ds-context.js",
|
|
84
|
+
"skills/ds-a11y-audit/SKILL.md",
|
|
85
|
+
"skills/ds-a11y-plan/SKILL.md",
|
|
86
|
+
"skills/ds-a11y-test/SKILL.md",
|
|
87
|
+
"skills/ds-a11y-verify/SKILL.md",
|
|
88
|
+
"skills/ds-audit-tokens/REFERENCE.md",
|
|
89
|
+
"skills/ds-audit-tokens/SKILL.md",
|
|
90
|
+
"skills/ds-audit-tokens/naming-rules.js",
|
|
91
|
+
"skills/ds-audit-tokens/scan.js",
|
|
73
92
|
"skills/ds-changeset/SKILL.md",
|
|
93
|
+
"skills/ds-ci-report/SKILL.md",
|
|
94
|
+
"skills/ds-ci-report/fetch.sh",
|
|
74
95
|
"skills/ds-code-to-figma/CONVENTIONS.md",
|
|
75
96
|
"skills/ds-code-to-figma/DECISIONS.md",
|
|
76
97
|
"skills/ds-code-to-figma/PHASE-1-ANALYZE.md",
|
|
@@ -82,7 +103,6 @@
|
|
|
82
103
|
"skills/ds-code-to-figma/PHASE-7-DOCUMENT-ANATOMY.md",
|
|
83
104
|
"skills/ds-code-to-figma/PHASE-8-DOCUMENT-MEASUREMENTS.md",
|
|
84
105
|
"skills/ds-code-to-figma/SKILL.md",
|
|
85
|
-
"skills/ds-code-to-figma/TODO.md",
|
|
86
106
|
"skills/ds-code-to-figma/conventions/build-mechanics.md",
|
|
87
107
|
"skills/ds-code-to-figma/conventions/component-set-rendering.md",
|
|
88
108
|
"skills/ds-code-to-figma/conventions/content-selection-and-mitigations.md",
|
|
@@ -92,33 +112,50 @@
|
|
|
92
112
|
"skills/ds-code-to-figma/conventions/page-structure.md",
|
|
93
113
|
"skills/ds-code-to-figma/conventions/tokens-and-props.md",
|
|
94
114
|
"skills/ds-code-to-figma/examples/mapping-file-format.md",
|
|
95
|
-
"skills/ds-
|
|
96
|
-
"skills/ds-
|
|
97
|
-
"skills/ds-code-to-figma/references/figma-responsive-tokens/Tablet.tokens.json",
|
|
98
|
-
"skills/ds-code-to-figma/references/figma-tokens/Base.tokens.json",
|
|
99
|
-
"skills/ds-code-to-figma/references/figma-tokens/OrangeVacations.tokens.json",
|
|
100
|
-
"skills/ds-create-component/README.md",
|
|
101
|
-
"skills/ds-create-component/REFERENCE.md",
|
|
102
|
-
"skills/ds-create-component/SKILL.md",
|
|
103
|
-
"skills/ds-create-component/implementation.js",
|
|
104
|
-
"skills/ds-create-component/index.js",
|
|
115
|
+
"skills/ds-design-guidelines/SKILL.md",
|
|
116
|
+
"skills/ds-document-component/REFERENCE.md",
|
|
105
117
|
"skills/ds-document-component/SKILL.md",
|
|
118
|
+
"skills/ds-document-guidelines/SKILL.md",
|
|
119
|
+
"skills/ds-figma-anatomy/SKILL.md",
|
|
120
|
+
"skills/ds-figma-component-set/SKILL.md",
|
|
121
|
+
"skills/ds-figma-copy-me/SKILL.md",
|
|
122
|
+
"skills/ds-figma-mapping/SKILL.md",
|
|
123
|
+
"skills/ds-figma-measurements/SKILL.md",
|
|
124
|
+
"skills/ds-figma-review/SKILL.md",
|
|
125
|
+
"skills/ds-framework-wrappers/SKILL.md",
|
|
126
|
+
"skills/ds-implement-component/REFERENCE.md",
|
|
127
|
+
"skills/ds-implement-component/SKILL.md",
|
|
128
|
+
"skills/ds-issue-reply/SKILL.md",
|
|
129
|
+
"skills/ds-issue-triage/SKILL.md",
|
|
130
|
+
"skills/ds-issue-write/SKILL.md",
|
|
106
131
|
"skills/ds-lint-component/README.md",
|
|
107
132
|
"skills/ds-lint-component/REFERENCE.md",
|
|
108
133
|
"skills/ds-lint-component/SKILL.md",
|
|
109
134
|
"skills/ds-lint-component/implementation.js",
|
|
110
135
|
"skills/ds-lint-component/index.js",
|
|
111
|
-
"skills/ds-
|
|
112
|
-
"skills/ds-
|
|
136
|
+
"skills/ds-manage-brand/SKILL.md",
|
|
137
|
+
"skills/ds-manage-stories/SKILL.md",
|
|
138
|
+
"skills/ds-manage-tokens/SKILL.md",
|
|
139
|
+
"skills/ds-modify-component/SKILL.md",
|
|
140
|
+
"skills/ds-plan-component/SKILL.md",
|
|
141
|
+
"skills/ds-plan-figma-component/SKILL.md",
|
|
142
|
+
"skills/ds-pr-body/SKILL.md",
|
|
143
|
+
"skills/ds-repair-component/SKILL.md",
|
|
144
|
+
"skills/ds-scout-component/SKILL.md",
|
|
145
|
+
"skills/ds-scout-component/scripts/scout.mjs",
|
|
146
|
+
"skills/ds-scout-component/scripts/snap.mjs",
|
|
147
|
+
"skills/ds-sync-figma-tokens/SKILL.md",
|
|
113
148
|
"skills/ds-test-component/README.md",
|
|
114
149
|
"skills/ds-test-component/REFERENCE.md",
|
|
115
150
|
"skills/ds-test-component/SKILL.md",
|
|
116
|
-
"skills/ds-test-component/
|
|
151
|
+
"skills/ds-test-component/examples.md",
|
|
117
152
|
"skills/ds-test-component/implementation.js",
|
|
118
153
|
"skills/ds-test-component/index.js",
|
|
119
|
-
"skills/ds-
|
|
120
|
-
"skills/ds-
|
|
121
|
-
"skills/ds-
|
|
122
|
-
"skills/ds-
|
|
154
|
+
"skills/ds-update-screenshots/SKILL.md",
|
|
155
|
+
"skills/ds-validate-component/SKILL.md",
|
|
156
|
+
"skills/ds-validate-documentation/SKILL.md",
|
|
157
|
+
"skills/ds-validate-tokens/SKILL.md",
|
|
158
|
+
"skills/ds-visual-review/SKILL.md",
|
|
159
|
+
"skills/ds-visual-review/review.py"
|
|
123
160
|
]
|
|
124
161
|
}
|
|
@@ -122,8 +122,9 @@ dynamic title` error, so the category can't be derived at runtime from the file'
|
|
|
122
122
|
Instead, the literal string is kept in sync with the folder by convention: when moving a
|
|
123
123
|
component to a different category, update its `title`/`<Meta title>` strings (and any
|
|
124
124
|
`storyId`/`pageTitle` cross-references in `.doc-config.ts` files, `.storybook/story-paths.json`,
|
|
125
|
-
and `LinkCard`/`GridCard` navigation targets in other MDX files) to match.
|
|
126
|
-
scaffolds new components with the correct category folder from the
|
|
125
|
+
and `LinkCard`/`GridCard` navigation targets in other MDX files) to match.
|
|
126
|
+
`ds-implement-component` scaffolds new components with the correct category folder from the
|
|
127
|
+
start.
|
|
127
128
|
|
|
128
129
|
## Notable Patterns
|
|
129
130
|
|
|
@@ -42,5 +42,5 @@ _Avoid_: preview (bare — this app has no other "preview" concept yet, but qual
|
|
|
42
42
|
|
|
43
43
|
Requires `packages/core`'s dev-server running locally alongside Toky's own (`pnpm --filter core start`, then `pnpm --filter toky dev`) — the Preview tab shows "No preview server answers at <previewUrl>" if it isn't reachable within a few seconds. The URL is the Toky config's `previewUrl` (`localhost:4000` for core). `NEXT_PUBLIC_DS_PREVIEW_URL` (see `.env.example`) overrides it. Serving a deployed/Vercel-hosted preview instead of the dev-server is a later phase, not yet built.
|
|
44
44
|
|
|
45
|
-
**Sign-in**: GitHub OAuth via Auth.js, gated on membership in the Toky config's team (`helvetia-design/toky` for core, see [ADR-0005](docs/adr/0005-team-from-toky-config.md)) — see [ADR-0003](docs/adr/0003-github-oauth-sign-in-bot-pat-writes.md) (sign-in/gating mechanism) and [ADR-0004](docs/adr/0004-team-scoped-access.md) (narrowed from org membership to team membership). The signed-in user's identity is read server-side from the session for PR attribution; writes always go through the shared bot PAT (`TOKY_GITHUB_TOKEN`), never the signed-in user's own OAuth token. `proxy.ts` (Next.js's current name for what used to be `middleware.ts`) is the single enforcement point for every UI and API route, including blocking Toky outright on any non-production Vercel deployment.
|
|
45
|
+
**Sign-in**: GitHub OAuth via Auth.js, gated on membership in the Toky config's team (`helvetia-design/toky` for core, see [ADR-0005](docs/adr/0005-team-from-toky-config.md)) — see [ADR-0003](docs/adr/0003-github-oauth-sign-in-bot-pat-writes.md) (sign-in/gating mechanism) and [ADR-0004](docs/adr/0004-team-scoped-access.md) (narrowed from org membership to team membership). The signed-in user's identity is read server-side from the session for PR attribution; writes always go through the shared bot PAT (`TOKY_GITHUB_TOKEN`), never the signed-in user's own OAuth token. `proxy.ts` (Next.js's current name for what used to be `middleware.ts`) is the single enforcement point for every UI and API route, including blocking Toky outright on any non-production Vercel deployment. Locally, `TOKY_DISABLE_AUTH=true` skips sign-in; submitting then credits the owner of `TOKY_GITHUB_TOKEN` (`GET /user`). The flag has no effect when `VERCEL` is set.
|
|
46
46
|
_Avoid_: middleware.ts (the file is named `proxy.ts` — Next 16 renamed the convention; "middleware" is still fine as the general term for what it does)
|
|
@@ -101,20 +101,9 @@ Use `pnpm <script>` or `turbo run <task>` to invoke tasks. Turborepo caches task
|
|
|
101
101
|
|
|
102
102
|
## Component File Structure
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
button/
|
|
108
|
-
button.tsx # Stencil component (props, events, render)
|
|
109
|
-
button.interfaces.ts # TypeScript types and enums
|
|
110
|
-
button.host.scss # Shadow DOM styles (scoped to :host)
|
|
111
|
-
button.style.scss # Shared CSS (web component + global)
|
|
112
|
-
test/
|
|
113
|
-
button.spec.ts # Unit tests (Vitest)
|
|
114
|
-
button.component.play.ts # Interaction tests (Playwright)
|
|
115
|
-
button.visual.play.ts # Visual regression tests
|
|
116
|
-
button.a11y.play.ts # Accessibility tests
|
|
117
|
-
```
|
|
104
|
+
See [packages/core/CONTEXT.md](../packages/core/CONTEXT.md) for the category taxonomy
|
|
105
|
+
(`components/<category>/<name>/`) and [packages/playwright/CONTEXT.md](../packages/playwright/CONTEXT.md)
|
|
106
|
+
for the full test file set.
|
|
118
107
|
|
|
119
108
|
## Component Class Organization
|
|
120
109
|
|
|
@@ -133,16 +122,9 @@ export class Button implements ComponentInterface, Loggable {
|
|
|
133
122
|
}
|
|
134
123
|
```
|
|
135
124
|
|
|
136
|
-
Methods must be organized by section with dividers
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
2. LIFECYCLE
|
|
140
|
-
3. PROPERTY VALIDATION
|
|
141
|
-
4. PUBLIC LISTENERS
|
|
142
|
-
5. PUBLIC METHODS
|
|
143
|
-
6. EVENT HANDLERS
|
|
144
|
-
7. PRIVATE METHODS
|
|
145
|
-
8. RENDER
|
|
125
|
+
Methods must be organized by section with dividers — see
|
|
126
|
+
[STYLE_GUIDE.md](STYLE_GUIDE.md#section-dividers) for the order and what each section
|
|
127
|
+
contains. `ds-lint-component` enforces it.
|
|
146
128
|
|
|
147
129
|
### Naming Conventions
|
|
148
130
|
|
|
@@ -246,41 +228,9 @@ The same naming pattern applies to private (`--_`) and modifier (`--mod-`) varia
|
|
|
246
228
|
|
|
247
229
|
## Design Token Naming
|
|
248
230
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
Raw color scales with numbered intensity levels (1–5+). Used as base values for other layers:
|
|
254
|
-
|
|
255
|
-
- Pattern: `--ds-global-[category]-[name]-[number]`
|
|
256
|
-
- Examples:
|
|
257
|
-
- `--ds-global-color-primary-1` through `--ds-global-color-primary-5` (lightest to darkest)
|
|
258
|
-
- `--ds-global-color-danger-1` through `--ds-global-color-danger-4`
|
|
259
|
-
- `--ds-global-color-grey-1` through `--ds-global-color-grey-5`
|
|
260
|
-
|
|
261
|
-
Global tokens are rarely used directly by components. Use Alias or Component tokens instead.
|
|
262
|
-
|
|
263
|
-
### Alias Layer
|
|
264
|
-
|
|
265
|
-
Semantic abstractions for consumers (colors, spacing, typography, etc.). Primary layer for component/app use:
|
|
266
|
-
|
|
267
|
-
- Pattern: `--ds-alias-[category]-[subcategory]-[name]`
|
|
268
|
-
- Examples:
|
|
269
|
-
- `--ds-alias-background-color-sky` (semantic name, resolves to global value)
|
|
270
|
-
- `--ds-alias-background-color-info`
|
|
271
|
-
- `--ds-alias-space-lg` → `1.5rem`
|
|
272
|
-
- `--ds-alias-text-size-base` → `1rem`
|
|
273
|
-
- `--ds-alias-radius-base` → `0.25rem`
|
|
274
|
-
|
|
275
|
-
### Component Layer
|
|
276
|
-
|
|
277
|
-
Per-component token overrides for specific design decisions. Used when styling a particular DS component:
|
|
278
|
-
|
|
279
|
-
- Pattern: `--ds-[component]-[property]-[modifier]-[state]`
|
|
280
|
-
- Examples:
|
|
281
|
-
- `--ds-button-color-primary-base-text` (button primary variant text color)
|
|
282
|
-
- `--ds-button-label-font-family` (button label typography)
|
|
283
|
-
- `--ds-modal-header-border-color` (modal header styling)
|
|
231
|
+
See [packages/tokens/CONTEXT.md](../packages/tokens/CONTEXT.md) for the token architecture —
|
|
232
|
+
four layers (Global → Alias → Device → Component), naming patterns per layer, and the naming
|
|
233
|
+
anatomy for Component-layer tokens.
|
|
284
234
|
|
|
285
235
|
## Hybrid Component Model
|
|
286
236
|
|
|
@@ -419,19 +369,11 @@ Use this checklist when creating a component from scratch:
|
|
|
419
369
|
|
|
420
370
|
## Changesets & Release Process
|
|
421
371
|
|
|
422
|
-
All changes affecting end users must be documented in a changeset
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
pnpm changeset
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
This creates a `.md` file in `.changeset/` describing the changes. Choose version bump:
|
|
372
|
+
All changes affecting end users must be documented in a changeset. Use the `ds-changeset`
|
|
373
|
+
skill to create one — it drives the repo's `scripts/create-changeset.mjs` CLI non-interactively
|
|
374
|
+
and leaves the result unstaged for review.
|
|
429
375
|
|
|
430
|
-
-
|
|
431
|
-
- **`minor`** — new features, new components
|
|
432
|
-
- **`major`** — breaking changes (prop renames, removed elements, behavior changes)
|
|
433
|
-
|
|
434
|
-
**Why changesets matter:** When PRs are merged into `next`, the `prepare-release.yml` workflow scans all changesets and opens a "Changeset Release PR" that aggregates all changes into a single version bump. This PR is reviewed by the core team, then merged to trigger the actual npm publication via `release.yml`.
|
|
376
|
+
**Why changesets matter:** When PRs are merged into `main`, the `prepare-release.yml` workflow scans all changesets and opens a "Changeset Release PR" that aggregates all changes into a single version bump. This PR is reviewed by the core team, then merged to trigger the actual npm publication via `release.yml`.
|
|
435
377
|
|
|
436
378
|
See [Changesets documentation](https://github.com/changesets/changesets) for format and best practices.
|
|
437
379
|
|
|
@@ -455,7 +397,7 @@ Post this comment in the PR to trigger `snapshot.yml`. The resulting version fol
|
|
|
455
397
|
### Release Flow
|
|
456
398
|
|
|
457
399
|
```
|
|
458
|
-
1. Changes merged to
|
|
400
|
+
1. Changes merged to main
|
|
459
401
|
↓
|
|
460
402
|
2. prepare-release.yml reads all .changeset/*.md files
|
|
461
403
|
↓
|
|
@@ -463,18 +405,16 @@ Post this comment in the PR to trigger `snapshot.yml`. The resulting version fol
|
|
|
463
405
|
↓
|
|
464
406
|
4. Core team reviews and approves Release PR
|
|
465
407
|
↓
|
|
466
|
-
5. Release PR merged to
|
|
408
|
+
5. Release PR merged to main
|
|
467
409
|
↓
|
|
468
410
|
6. release.yml publishes all packages to npm with GitHub provenance
|
|
469
411
|
↓
|
|
470
412
|
7. Docs automatically redeploy to helvetia-design.vercel.app
|
|
471
413
|
```
|
|
472
414
|
|
|
473
|
-
For LTS (`main` branch), follow the same process with `lts-prepare-release.yml` and `lts-release.yml`.
|
|
474
|
-
|
|
475
415
|
### Branch and PR Workflow
|
|
476
416
|
|
|
477
|
-
- Open PRs against the `
|
|
417
|
+
- Open PRs against the `main` branch
|
|
478
418
|
- Feature branches should use prefixes: `feat/`, `fix/`, `chore/`, `docs/`
|
|
479
419
|
- All checks must pass before merge
|
|
480
420
|
- Include a changeset unless your PR is documentation-only or infrastructure
|
|
@@ -563,7 +503,6 @@ This gives consumers 2+ release cycles to migrate before the feature is removed.
|
|
|
563
503
|
|
|
564
504
|
- **Latest major version**: Receives patches and minor updates
|
|
565
505
|
- **Older major versions**: No longer receive updates (see [SECURITY.md](../SECURITY.md#supported-versions))
|
|
566
|
-
- **LTS branch** (`main`): Parallel releases with same versioning scheme
|
|
567
506
|
- **Prerelease versions**: Snapshot versions (e.g., `1.2.3-snapshot.456.abc1234`) for testing before merge
|
|
568
507
|
|
|
569
508
|
## CI/CD Workflows
|
|
@@ -572,12 +511,10 @@ All workflows live in `.github/workflows/`. Here is what runs automatically:
|
|
|
572
511
|
|
|
573
512
|
| Workflow | Trigger | Purpose |
|
|
574
513
|
| ------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
575
|
-
| `continuous.yml` | Every push to `
|
|
576
|
-
| `prepare-release.yml` | Every push to `
|
|
514
|
+
| `continuous.yml` | Every push to `main` + all PRs | Lint, test, and build. Cancels superseded runs. |
|
|
515
|
+
| `prepare-release.yml` | Every push to `main` | Opens or updates a **Changeset Release PR** via the changesets bot. |
|
|
577
516
|
| `release.yml` | Changeset Release PR merged (or manual dispatch) | Publishes all packages to npm with provenance. |
|
|
578
|
-
| `
|
|
579
|
-
| `lts-release.yml` | LTS Release PR merged | Publishes LTS packages to npm. |
|
|
580
|
-
| `security.yml` | Push to `next` + all PRs + weekly schedule | CodeQL static analysis. Results appear in the GitHub Security tab. Required for EU Cyber Resilience Act obligations. |
|
|
517
|
+
| `security.yml` | Push to `main` + all PRs + weekly schedule | CodeQL static analysis. Results appear in the GitHub Security tab. Required for EU Cyber Resilience Act obligations. |
|
|
581
518
|
| `screenshots.yml` | PR comment `/update-screenshots` | Regenerates visual regression snapshots for the PR branch and commits them. |
|
|
582
519
|
| `snapshot.yml` | PR comment `/snapshot` | Publishes a snapshot npm version from the PR branch for manual testing. |
|
|
583
520
|
| `create-issue-branch.yml` | Issue comment | Auto-creates a branch from an issue using the `robvanderleek/create-issue-branch` action. |
|
|
@@ -598,19 +535,17 @@ The design system documentation site is automatically deployed to **Vercel** whe
|
|
|
598
535
|
|
|
599
536
|
### Deployment Domains
|
|
600
537
|
|
|
601
|
-
| Domain
|
|
602
|
-
|
|
|
603
|
-
| [helvetia-design.vercel.app](https://helvetia-design.vercel.app)
|
|
604
|
-
|
|
|
605
|
-
| `design-system-*.vercel.app` | Every PR | Each pull request gets a unique preview URL (linked in Vercel's PR comment) |
|
|
538
|
+
| Domain | Branch | Purpose |
|
|
539
|
+
| ---------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------- |
|
|
540
|
+
| [helvetia-design.vercel.app](https://helvetia-design.vercel.app) | `main` (latest release) | Production domain serving the latest published version |
|
|
541
|
+
| `design-system-*.vercel.app` | Every PR | Each pull request gets a unique preview URL (linked in Vercel's PR comment) |
|
|
606
542
|
|
|
607
543
|
### How It Works
|
|
608
544
|
|
|
609
545
|
Vercel watches the repository for changes and automatically rebuilds and deploys when:
|
|
610
546
|
|
|
611
|
-
- Changes are pushed to `
|
|
612
|
-
-
|
|
613
|
-
- A pull request is opened or updated → builds a lts at a unique Vercel URL and comments with the link
|
|
547
|
+
- Changes are pushed to `main` → rebuilds production docs at `helvetia-design.vercel.app`
|
|
548
|
+
- A pull request is opened or updated → builds a preview at a unique Vercel URL and comments with the link
|
|
614
549
|
|
|
615
550
|
This allows reviewers to see documentation changes live before merging.
|
|
616
551
|
|
package/dist/docs/STYLE_GUIDE.md
CHANGED
|
@@ -334,6 +334,7 @@ export class Checkbox implements DsComponentInterface {
|
|
|
334
334
|
- Call `this.internals.setFormValue(value)` whenever the value changes so the form sees the current value.
|
|
335
335
|
- Pass `null` to unset the field (e.g. unchecked checkbox).
|
|
336
336
|
- `formAssociated: true` also enables the native form-reset lifecycle (`formResetCallback`).
|
|
337
|
+
- Reflect `disabled` (`@Prop({ reflect: true })`), implement `formDisabledCallback(disabled)` into a private `fieldsetDisabled` state, and use an `isDisabled` getter everywhere instead of `disabled`. Only the reflected attribute or a disabled `<fieldset>` keeps the browser from submitting the value.
|
|
337
338
|
- Stencil reads any present boolean attribute on a form-associated component as `true`, so `required="false"` would stay required. Give such boolean props an `@AttrDeserialize('<prop>')` method named `deserialize<Prop>` that returns `deserializeBooleanAttribute(value)` from `@utils`.
|
|
338
339
|
|
|
339
340
|
### Section Dividers
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Component Audit Plan
|
|
2
2
|
|
|
3
|
-
This file is the reusable checklist for auditing a rewritten `ds-*` component in `packages/core/src/components/<name>` (on `
|
|
3
|
+
This file is the reusable checklist for auditing a rewritten `ds-*` component in `packages/core/src/components/<name>` (on `main`) against its legacy `bal-*` equivalent on `origin/main` of the Baloise Design System repo — the LTS, currently-published Baloise Design System.
|
|
4
4
|
|
|
5
|
-
Use this as the source when
|
|
5
|
+
Use this as the source when 🗺️ `issue-manager` (`ds-issue-write`) drafts a per-component audit issue (see [Creating the Issue](#creating-the-issue) below). Issues are created one component at a time, on request — not bulk-generated.
|
|
6
6
|
|
|
7
7
|
## Background
|
|
8
8
|
|
|
9
|
-
- `origin/main` = LTS = the published Baloise DS, components prefixed `bal-*` (e.g. `bal-accordion`).
|
|
10
|
-
- `
|
|
9
|
+
- `origin/main` of the Baloise Design System repo = LTS = the published Baloise DS, components prefixed `bal-*` (e.g. `bal-accordion`).
|
|
10
|
+
- `main` (this repo's default branch) = the rewrite, components prefixed `ds-*`, living in `packages/core/src/components/<name>`.
|
|
11
11
|
- The mapping between old and new components is **not 1:1**. Some old components were merged, renamed, or dropped (e.g. `bal-dropdown`, `bal-field`, `bal-option`, `bal-option-list`, `bal-popover`, `bal-tooltip`, `bal-snackbar`, `bal-sheet`, `bal-stage`, `bal-notices`, `bal-nav`, `bal-input-group`, `bal-input-stepper` have no obvious single `ds-*` counterpart). There is no pre-built mapping table — each issue's assignee identifies the closest LTS equivalent(s) themselves and notes the mapping inline.
|
|
12
12
|
- All checks below are performed by a **human**. An AI agent may pre-fill research (e.g. diffing docs against props) but does not perform the visual check, monkey testing, or token scan itself.
|
|
13
13
|
|
|
@@ -54,17 +54,10 @@ Fixed exploratory checklist, applied per component (skip items that don't apply
|
|
|
54
54
|
|
|
55
55
|
## Creating the Issue
|
|
56
56
|
|
|
57
|
-
When asked to create the audit issue for a specific component:
|
|
57
|
+
When asked to create the audit issue for a specific component, dispatch 🗺️ `issue-manager` · `ds-issue-write` with this spec; it drafts, the human approves, it posts:
|
|
58
58
|
|
|
59
59
|
1. Use the `🧪 test` issue template (`.github/ISSUE_TEMPLATE/test_report.yml`).
|
|
60
60
|
2. Title: `:test_tube: test(<name>): audit docs, use-case parity, visuals, and tokens`
|
|
61
61
|
3. Summary: one line naming the component and referencing this file.
|
|
62
62
|
4. Acceptance Criteria: the five checklist sections above, expanded into their individual checkboxes.
|
|
63
|
-
5. Labels: `🧪 test` (template default) +
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
gh issue create \
|
|
67
|
-
--title ":test_tube: test(<name>): audit docs, use-case parity, visuals, and tokens" \
|
|
68
|
-
--label "🧪 test,ready-for-human" \
|
|
69
|
-
--body-file <path-to-filled-checklist>.md
|
|
70
|
-
```
|
|
63
|
+
5. Labels: `🧪 test` (template default) + `🧑 ready-for-human` (overrides `ds-issue-write`'s default `🔍 needs-triage`).
|
|
@@ -76,6 +76,6 @@ See [CONTEXT-MAP.md](../../CONTEXT-MAP.md) for the full list of contexts and whi
|
|
|
76
76
|
## Maintaining Domain Docs
|
|
77
77
|
|
|
78
78
|
- **Keep them current** — Update `CONTEXT.md` when architectural decisions change
|
|
79
|
-
- **Collaborate with agents** — Use the `
|
|
79
|
+
- **Collaborate with agents** — Use the `mattpocock-skills:grilling` skill to refine terminology and decisions as the codebase evolves
|
|
80
80
|
- **Link related concepts** — Use `[[context-name]]` to reference other contexts in the monorepo
|
|
81
81
|
- **Example-driven** — Include short, concrete examples of correct patterns and terminology
|