Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
273 commits
Select commit Hold shift + click to select a range
3b0f847
chore: adjust vars for atoms
hirsch88 Mar 2, 2026
3e466e8
chore: clean up
hirsch88 Mar 5, 2026
65d1671
chore: clean up
hirsch88 Mar 5, 2026
b568483
chore: clean up
hirsch88 Mar 5, 2026
49d684a
chore: clean up
hirsch88 Mar 5, 2026
4aba10d
chore: clean up
hirsch88 Mar 5, 2026
411dd58
chore: clean up
hirsch88 Mar 5, 2026
bc00f76
chore: clean up
hirsch88 Mar 5, 2026
f304eb2
chore: clean up
hirsch88 Mar 5, 2026
2adc4c0
chore: clean up
hirsch88 Mar 5, 2026
fb629f3
chore: clean up
hirsch88 Mar 5, 2026
cffe671
chore: clean up
hirsch88 Mar 5, 2026
2bc25e4
chore: clean up
hirsch88 Mar 5, 2026
ce34642
chore: clean up
hirsch88 Mar 5, 2026
a9e7d69
chore: clean up
hirsch88 Mar 5, 2026
3a3b406
chore: clean up
hirsch88 Mar 5, 2026
e0c1f4d
chore: clean up
hirsch88 Mar 5, 2026
7a88ba2
chore: clean up
hirsch88 Mar 5, 2026
b81eef0
chore: update visuals
hirsch88 Mar 5, 2026
de69edf
chore: update visuals
hirsch88 Mar 5, 2026
6224692
chore: update visuals
hirsch88 Mar 5, 2026
31ec4fc
update snapshots
hirsch88 Mar 5, 2026
200d2e9
chore: add missing visual test
hirsch88 Mar 5, 2026
1afff3b
update snapshots
hirsch88 Mar 5, 2026
33bb682
chore: update docs
hirsch88 Mar 6, 2026
809fbc8
Merge branch 'next/👻-shadow' of github.com:baloise/design-system into…
hirsch88 Mar 6, 2026
0853003
update snapshots
hirsch88 Mar 6, 2026
0c5c6a7
chore: migrate link
hirsch88 Mar 6, 2026
c5c56be
update snapshots
hirsch88 Mar 6, 2026
e66725b
chore: migrate stack
hirsch88 Mar 6, 2026
29f75c5
update snapshots
hirsch88 Mar 6, 2026
b2f8a6f
chore: migrate divider
hirsch88 Mar 6, 2026
68e2c67
update snapshots
hirsch88 Mar 6, 2026
b46b598
chore: migrate badge
hirsch88 Mar 6, 2026
4c640d1
update snapshots
hirsch88 Mar 6, 2026
7affb66
chore: migrate tag
hirsch88 Mar 6, 2026
fceda81
update snapshots
hirsch88 Mar 6, 2026
c65d16b
chore: migrate button
hirsch88 Mar 9, 2026
92e0bbe
update snapshots
hirsch88 Mar 9, 2026
61d1e10
chore: migrate notification
hirsch88 Mar 9, 2026
da27b29
update snapshots
hirsch88 Mar 9, 2026
1bb46c7
chore: migrate toast and snackbar
hirsch88 Mar 12, 2026
bbf66d7
update snapshots
hirsch88 Mar 12, 2026
66e7ff3
chore: migrate ul,ol,dl
hirsch88 Mar 13, 2026
e90a5a7
update snapshots
hirsch88 Mar 13, 2026
29624f8
chore: migrate button group
hirsch88 Mar 13, 2026
b4e704e
chore: migrate card to website use-cases
hirsch88 Mar 24, 2026
ac32f9b
update snapshots
hirsch88 Mar 24, 2026
d3402e6
chore: migrate card
hirsch88 Mar 25, 2026
63d52a6
update snapshots
hirsch88 Mar 25, 2026
144d7d6
chore: migrate accordion
hirsch88 Mar 25, 2026
dc1d870
chore: migrate list
hirsch88 Mar 27, 2026
d611bf6
chore: migrate list
hirsch88 Apr 2, 2026
bb32a82
update snapshots
hirsch88 Apr 2, 2026
beb6824
docs: add design tokens skill spec
hirsch88 Apr 2, 2026
9a7348f
docs: add naming guide and figma integration notes to token skill spec
hirsch88 Apr 2, 2026
26e2e14
docs: add design-tokens skill implementation plan
hirsch88 Apr 2, 2026
72989a3
chore: add claude context
hirsch88 Apr 2, 2026
7303879
Merge branch 'next/👻-shadow' of github.com:baloise/design-system into…
hirsch88 Apr 2, 2026
7edd782
chore: migrate list
hirsch88 Apr 7, 2026
040e493
update snapshots
hirsch88 Apr 7, 2026
210bd76
chore: migrate list
hirsch88 Apr 7, 2026
dcb6c9c
update snapshots
hirsch88 Apr 7, 2026
14f871c
chore: add po for the components
hirsch88 Apr 7, 2026
1748ca2
update snapshots
hirsch88 Apr 7, 2026
b8abecc
chore: fix ci build
hirsch88 Apr 7, 2026
768ecf9
chore: fix ci build
hirsch88 Apr 7, 2026
5ded960
update snapshots
hirsch88 Apr 7, 2026
26bb0f2
chore: fix ci build
hirsch88 Apr 7, 2026
2ea3896
update snapshots
hirsch88 Apr 7, 2026
fc3ad9d
chore: fix ci build
hirsch88 Apr 7, 2026
36f4a27
update snapshots
hirsch88 Apr 7, 2026
49786a1
chore: remove false test
hirsch88 Apr 7, 2026
6aa6797
docs: add spec for removing bal- prefix from component files and name…
hirsch88 Apr 8, 2026
d904962
docs: add implementation plan for removing bal- prefix from component…
hirsch88 Apr 8, 2026
65997f4
refactor: rename bal- prefixed folders and files to drop bal- prefix
hirsch88 Apr 8, 2026
6944ea7
refactor: rename missed bal-doc-app and fix rename script outer loop
hirsch88 Apr 8, 2026
0632293
refactor: update all content references to remove bal- prefix
hirsch88 Apr 8, 2026
74c85da
refactor: fix content update script to handle ./bal- paths and all @u…
hirsch88 Apr 8, 2026
1c17276
refactor: fix @Listen event strings and FormInput interface property …
hirsch88 Apr 8, 2026
450c2ee
refactor: merge BalProps/BalEvents into DS namespace and strip Bal pr…
hirsch88 Apr 8, 2026
6e7356b
refactor: replace BalProps.*/BalEvents.* with DS.* in component sourc…
hirsch88 Apr 8, 2026
b63d3a6
refactor: replace BalProps/BalEvents namespace declarations with DS i…
hirsch88 Apr 8, 2026
26d7676
refactor: fix remaining bal- prefix references found during build ver…
hirsch88 Apr 8, 2026
af8af70
chore: reset visuals
hirsch88 Apr 8, 2026
084bf49
chore: rename internal bal to ds
hirsch88 Apr 8, 2026
d506ae0
chore: ignore .worktrees directory
hirsch88 Apr 8, 2026
8144b1e
refactor: rename Stencil tag declarations from bal- to ds-
hirsch88 Apr 8, 2026
6aad4ea
refactor: rename bal- element tags in TSX render trees to ds-
hirsch88 Apr 8, 2026
3847482
refactor: rename HTMLBal* element types to HTMLDs*
hirsch88 Apr 8, 2026
ea504fe
refactor: rename bal- strings in createElement/querySelector/closest …
hirsch88 Apr 8, 2026
9a29715
refactor: rename tag list entries from bal- to ds-
hirsch88 Apr 8, 2026
6cb88b5
refactor: rename bal- element selectors in SCSS to ds-
hirsch88 Apr 8, 2026
fe78c13
refactor: rename bal- element tags in test HTML fixtures to ds-
hirsch88 Apr 8, 2026
e7966d3
refactor: rename bal- locator strings in Playwright play and spec files
hirsch88 Apr 8, 2026
51bdfc9
refactor: fix remaining bal- references in HTML style/script blocks
hirsch88 Apr 8, 2026
a1bb421
refactor: rename bal- locators in Playwright PO package and mount helper
hirsch88 Apr 8, 2026
65fd6e3
refactor: rename bal- element references in Storybook stories
hirsch88 Apr 8, 2026
80f47d5
refactor: rename bal- element references in Storybook MDX and code-sa…
hirsch88 Apr 8, 2026
01c8980
refactor: update changeset executor to strip ds- prefix instead of bal-
hirsch88 Apr 8, 2026
1cdd84c
refactor: fix remaining bal- references found during final verification
hirsch88 Apr 9, 2026
49b1c49
chore: update plans
hirsch88 Apr 9, 2026
3b2c610
Merge branch 'feature/rename-bal-to-ds' into next/👻-shadow
hirsch88 Apr 9, 2026
57b469e
docs: update playwright PO skill plan/spec for ds- prefix and unprefi…
hirsch88 Apr 9, 2026
5e0ad58
chore: clean up
hirsch88 Apr 9, 2026
76d19a0
chore: format files
hirsch88 Apr 9, 2026
01e0d85
update snapshots
hirsch88 Apr 9, 2026
2eed5be
chore: clean up
hirsch88 Apr 9, 2026
3b9dd03
Merge branch 'next/👻-shadow' of github.com:baloise/design-system into…
hirsch88 Apr 9, 2026
4742845
chore: add logger to all components
hirsch88 Apr 9, 2026
6b92260
fix: correct onKeydown type to KeyboardEvent in InputMaskFormatterInt…
hirsch88 Apr 15, 2026
e2eedd0
feat: implement VehicleRegistrationNumber mask formatter
hirsch88 Apr 15, 2026
15bc5ca
refactor: inline vehicle registration number format logic into mask c…
hirsch88 Apr 15, 2026
f0d0881
feat: wire mask formatter into ds-input onKeydown and render
hirsch88 Apr 15, 2026
62082b7
fix: remove unused getMaskAllowedKeys and correct value type in render
hirsch88 Apr 15, 2026
b496ff9
feat: add OfferNumber, ContractNumber, BasicContractNumber mask forma…
hirsch88 Apr 15, 2026
ece9b57
feat: add ClaimNumber mask formatter
hirsch88 Apr 15, 2026
511362a
feat: add BeEnterpriseNumber and BeIBAN mask formatters
hirsch88 Apr 15, 2026
3403a37
refactor: register all mask formatters, delete input-util.ts
hirsch88 Apr 15, 2026
2213015
chore: migrate input
hirsch88 Apr 16, 2026
38ce6d8
docs: add textarea migration design spec
hirsch88 Apr 16, 2026
45c6cab
docs: add textarea migration implementation plan
hirsch88 Apr 16, 2026
cb20825
chore: scaffold textarea directory for ds migration
hirsch88 Apr 16, 2026
5b4ee65
feat: add ds-textarea interfaces (DS namespace)
hirsch88 Apr 16, 2026
5b0a6a4
feat: migrate bal-textarea to ds-textarea with shadow DOM and FormCon…
hirsch88 Apr 16, 2026
834128b
feat: add textarea SCSS files (mixin, host, style)
hirsch88 Apr 16, 2026
52f63a3
chore: remove old bal-textarea component
hirsch88 Apr 16, 2026
5e3f7b7
feat: add DsTextarea page object
hirsch88 Apr 16, 2026
eb45f28
test: add ds-textarea component interaction tests
hirsch88 Apr 16, 2026
9f8b27c
test: add ds-textarea accessibility tests
hirsch88 Apr 16, 2026
3d72bca
feat: add ds-textarea visual HTML fixtures and visual regression tests
hirsch88 Apr 16, 2026
b903101
feat: add ds-textarea Storybook stories
hirsch88 Apr 16, 2026
aedc921
feat: add ds-textarea Storybook MDX documentation
hirsch88 Apr 16, 2026
9a7a6a3
docs: add number-input migration design spec
hirsch88 Apr 16, 2026
1b4c7b9
docs: fix number-input spec (event types, SCSS placeholders)
hirsch88 Apr 16, 2026
b65d52c
docs: add number-input migration implementation plan
hirsch88 Apr 16, 2026
61892f0
chore: scaffold number-input directory for ds migration
hirsch88 Apr 16, 2026
b5550b7
feat: add ds-number-input interfaces (DS namespace)
hirsch88 Apr 16, 2026
a686222
feat: add number-input utils (renamed from bal-number-input)
hirsch88 Apr 16, 2026
e833934
feat: migrate bal-number-input to ds-number-input with shadow DOM and…
hirsch88 Apr 16, 2026
d801f45
feat: add number-input.host.scss and number-input.style.scss
hirsch88 Apr 16, 2026
e4aad4d
chore: remove old bal-number-input, verify ds-number-input build
hirsch88 Apr 16, 2026
85506f3
feat: add DsNumberInput page object
hirsch88 Apr 16, 2026
e1c9a3c
test: add ds-number-input component interaction tests
hirsch88 Apr 16, 2026
da59a21
test: add ds-number-input accessibility tests
hirsch88 Apr 16, 2026
ce92193
feat: add number-input visual and style HTML fixtures
hirsch88 Apr 16, 2026
1990a3a
test: add ds-number-input visual regression tests
hirsch88 Apr 16, 2026
2a015be
feat: add ds-number-input Storybook stories
hirsch88 Apr 16, 2026
9f4f6cb
feat: add ds-number-input Storybook MDX documentation
hirsch88 Apr 16, 2026
4041444
chore: migrate number-input
hirsch88 Apr 16, 2026
f59c8ed
chore: rewrite checkbox, radio
hirsch88 Apr 21, 2026
503f89c
chore: add docs and test for radio, checkbox and toggle
hirsch88 Apr 21, 2026
1c13172
chore: add more ai docs
hirsch88 Apr 21, 2026
51b5061
chore: lint components
hirsch88 Apr 22, 2026
772ab26
chore: migrate segment
hirsch88 Apr 23, 2026
76c61c5
chore: migrate segment
hirsch88 Apr 27, 2026
37104a4
chore: add a11y docs
hirsch88 Apr 27, 2026
52a6c12
chore: fix a11y in docs
hirsch88 Apr 27, 2026
114486d
chore: rename expanded to wide
hirsch88 Apr 27, 2026
9e59815
chore: migrate progress bar
hirsch88 Apr 27, 2026
c201ffc
chore: migrate utils and pagination
hirsch88 Apr 28, 2026
5a0c109
chore: adjust import to use aliases
hirsch88 Apr 28, 2026
5d800e3
chore: add prop validation
hirsch88 Apr 28, 2026
7ffe315
hirsch88 Apr 29, 2026
b6f5172
chore: migrate interfaces
hirsch88 Apr 29, 2026
ee5e509
chore: migrate enum validators
hirsch88 Apr 30, 2026
293cee2
chore: improve docs
hirsch88 Apr 30, 2026
fe82569
chore: improve docs
hirsch88 May 3, 2026
8242ab8
chore: update docs
hirsch88 May 3, 2026
16c93c0
chore: format
hirsch88 May 3, 2026
022b0d3
chore: update docs
hirsch88 May 3, 2026
9a18c8c
chore: update docs
hirsch88 May 4, 2026
c5418d2
chore: update docs
hirsch88 May 4, 2026
ae2b224
chore: update docs
hirsch88 May 5, 2026
6ce17e4
chore: add links
hirsch88 May 5, 2026
75dc8e6
chore: fix some smaller ux issues
hirsch88 May 5, 2026
b3f1f23
chore: fix spelling mistakes
hirsch88 May 5, 2026
0ccef7b
chore: ci fixe
hirsch88 May 5, 2026
cce97c2
chore: fix tests
hirsch88 May 6, 2026
0b61c74
chore: docs improvments
hirsch88 May 6, 2026
2a87971
chore: fix visuals
hirsch88 May 6, 2026
f90c6a9
update snapshots
hirsch88 May 6, 2026
d4d5cf0
chore: lint validators
hirsch88 May 6, 2026
2fb2c57
update snapshots
hirsch88 May 6, 2026
5c65eb8
feat(tokens): rename primitive tier to global in transformer
hirsch88 May 6, 2026
ee1b51d
feat(tokens): update core components to use global primitive token names
hirsch88 May 6, 2026
c4e900f
feat(tokens): update styles package to use global primitive token names
hirsch88 May 6, 2026
5d04121
docs: update primitive token name references to global prefix
hirsch88 May 6, 2026
5e002ba
chore: improve tokens
hirsch88 May 7, 2026
37fd2c3
Merge branch 'next/👻-shadow' of github.com:baloise/design-system into…
hirsch88 May 7, 2026
0c89df1
update snapshots
hirsch88 May 7, 2026
fde1025
docs: add ESLint v8→v10 flat config migration design spec
hirsch88 May 7, 2026
e13096d
Merge branch 'next/👻-shadow' of github.com:baloise/design-system into…
hirsch88 May 7, 2026
ff019df
chore(deps): upgrade eslint 10, typescript-eslint v8, add jiti
hirsch88 May 7, 2026
dcafb29
feat(eslint-plugin): update to flat config format with meta field
hirsch88 May 7, 2026
8bce70c
feat(eslint): add flat config base (replaces .eslintrc.base.json)
hirsch88 May 7, 2026
3c5c926
feat(eslint): add root flat config (replaces .eslintrc.json)
hirsch88 May 7, 2026
c346968
feat(eslint): add flat configs for output-target-angular, output-targ…
hirsch88 May 7, 2026
5beb7f7
feat(eslint): add flat config for libs/nx
hirsch88 May 7, 2026
1d3eb3f
feat(eslint): add flat configs for playwright, docs, and core
hirsch88 May 7, 2026
9bbf80b
chore(eslint): remove legacy .eslintrc.json files
hirsch88 May 7, 2026
62fe6c9
fix(eslint): resolve lint errors after flat config migration
hirsch88 May 7, 2026
8167646
chore: fix npm dep audits
hirsch88 May 7, 2026
a44c5e8
chore: fix build
hirsch88 May 7, 2026
052656f
chore: update scss generation
hirsch88 May 7, 2026
f091950
chore: add multi brand
hirsch88 May 8, 2026
86f9da3
chore(css): add sass devDependency for SCSS compilation
hirsch88 May 8, 2026
78b54b1
chore(css): migrate DS mixins into packages/css
hirsch88 May 8, 2026
835aa9a
chore(css): migrate normalize and structure SCSS
hirsch88 May 8, 2026
ad76b0e
chore(css): migrate core styles (grid, container, form, table, picture)
hirsch88 May 8, 2026
1723f78
chore(core): move core styles to CSS-only components in packages/core
hirsch88 May 8, 2026
a7a2caa
chore: add uno-css
hirsch88 May 8, 2026
ceb73eb
chore: prepare turborepo
hirsch88 May 8, 2026
031d44e
chore: fix lint, test, docs and play
hirsch88 May 10, 2026
5bfa025
chore: update deps
hirsch88 May 11, 2026
218d993
chore: update docs
hirsch88 May 12, 2026
a7e9252
chore: fix spell and format files
hirsch88 May 12, 2026
46eae4e
chore: fix ci
hirsch88 May 12, 2026
3acab3f
chore: update ci to turbo
hirsch88 May 12, 2026
68ffc15
chore: update ci to turbo
hirsch88 May 12, 2026
81920bf
chore: update ci to turbo
hirsch88 May 12, 2026
115ff74
chore: update ci to turbo
hirsch88 May 12, 2026
9ad22b2
chore: ci
hirsch88 May 12, 2026
9585d35
chore: update ci
hirsch88 May 13, 2026
200868e
chore: update ci
hirsch88 May 13, 2026
e346927
chore: fix ci build
hirsch88 May 13, 2026
c2862cc
chore: update ci
hirsch88 May 13, 2026
fb19b00
chore: update ci
hirsch88 May 13, 2026
ac0fd8e
chore: update ci
hirsch88 May 13, 2026
63efef7
chore: update ci
hirsch88 May 13, 2026
374911d
chore: update ci
hirsch88 May 13, 2026
1d63cd2
chore: update ci
hirsch88 May 13, 2026
23ee6b2
chore: update ci 2
hirsch88 May 13, 2026
d9c3863
docs: add security audit design spec for CRA compliance
hirsch88 May 13, 2026
e9da3ef
docs: add security audit implementation plan
hirsch88 May 13, 2026
229d790
chore: update ci 3
hirsch88 May 13, 2026
c3368b0
chore: update ci 4
hirsch88 May 13, 2026
ca097de
chore: update ci 5
hirsch88 May 13, 2026
60c057b
chore: update ci 6
hirsch88 May 13, 2026
286c394
chore: update ci 7
hirsch88 May 13, 2026
77c91d8
update snapshots
hirsch88 May 13, 2026
f3e8747
chore: update ci 8
hirsch88 May 13, 2026
553fc3f
update snapshots
hirsch88 May 13, 2026
82f0dfd
chore: update ci 9
hirsch88 May 13, 2026
199a799
chore: update ci 10
hirsch88 May 13, 2026
7c68785
chore: update ci 11
hirsch88 May 13, 2026
ec8bdd9
chore: update ci 12
hirsch88 May 13, 2026
d94382c
chore: update ci 13
hirsch88 May 13, 2026
628d2a5
chore: update ci 14
hirsch88 May 13, 2026
a27908d
chore: finish first update
hirsch88 May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--container-architecture linux/amd64
-P ubuntu-latest=catthehacker/ubuntu:act-24.04
-P ubuntu-24.04=catthehacker/ubuntu:act-24.04
-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
--cache-server-path /tmp/act-cache
--secret-file .secrets
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"changelog": ["./my-changelog-config.js", { "repo": "baloise/design-system" }],
"commit": false,
"fixed": [["@baloise/ds-*"]],
"ignore ": [["@baloise/ds-output-target-*", "@baloise/ds-nx", "e2e", "docs"]],
"ignore ": [["@baloise/ds-output-target-*", "docs"]],
"linked": [],
"access": "public",
"baseBranch": "release/v20",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/fine-numbers-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/ds-core': major
---

**css**: introducing new css package with uno-css
6 changes: 3 additions & 3 deletions .changeset/popular-dolls-sing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
'@baloise/ds-core': major
---

**angular**: The design system now provides an Angular provider instead of the BaloiseDesignSystemModule.
**angular**: The design system now provides an Angular provider instead of the DesignSystemModule.

This change simplifies maintenance, ensures the Angular library stays up to date, and removes support for deprecated or optional Angular parts.

The new provider is fully compatible with both Angular module-based applications and the latest Angular solutions.

**How to migrate**

1. In the app-module.ts replace the `BaloiseDesignSystemModule.forRoot(<config>)` with the provide function `provideBaloiseDesignSystem(<config>)`. `<config>` is the same type as before.
1. In the app-module.ts replace the `BaloiseDesignSystemModule.forRoot(<config>)` with the provide function `provideDesignSystem(<config>)`. `<config>` is the same type as before.

```ts
@NgModule({
declarations: [App],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [BrowserModule, AppRoutingModule, SharedModule],
providers: [provideBrowserGlobalErrorListeners(), provideBaloiseDesignSystem()],
providers: [provideBrowserGlobalErrorListeners(), provideDesignSystem()],
bootstrap: [App],
})
export class AppModule {}
Expand Down
2 changes: 0 additions & 2 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"initialVersions": {
"docs": "15.2.49",
"e2e": "15.2.49",
"@baloise/ds-nx": "19.8.3",
"@baloise/output-target-angular": "0.0.0",
"@baloise/output-target-web": "0.0.0",
"@baloise/ds-angular": "19.8.3",
Expand All @@ -19,7 +18,6 @@
"@baloise/ds-maps": "19.8.3",
"@baloise/ds-playwright": "19.8.3",
"@baloise/ds-react": "19.8.3",
"@baloise/ds-styles": "19.8.3",
"@baloise/ds-table": "19.8.3",
"@baloise/ds-testing": "19.8.3",
"@baloise/ds-tokens": "19.8.3"
Expand Down
251 changes: 251 additions & 0 deletions .claude/skills/add-component-a11y-docs/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
---
name: add-component-a11y-docs
description: Use when adding or updating the Accessibility section in a Baloise DS component's MDX doc page — reads the component's .tsx, .style.html, and .a11y.play.ts to generate a two-part section covering HTML/CSS-only requirements and web component internals; also audits and fixes the style.html for WCAG 2.2 AA compliance
---

# Add Component A11y Docs

Generates and inserts an `## Accessibility` section into the component's MDX file, placed **after `## Integration`** and **before `<Footer />`**. The section has two subsections: what developers must do in HTML/CSS-only mode, and what the web component handles automatically.

## Process

```dot
digraph a11y {
"Identify component name" [shape=box];
"Read .tsx file" [shape=box];
"style.html exists?" [shape=diamond];
"Read .style.html" [shape=box];
"Audit style.html for WCAG AA" [shape=box];
"Gaps found?" [shape=diamond];
"Propose + apply HTML fixes" [shape=box];
"Read .a11y.play.ts" [shape=box];
"Analyse accessibility coverage" [shape=box];
"Draft two-part section" [shape=box];
"Present draft for approval" [shape=box];
"Patch MDX file" [shape=box];

"Identify component name" -> "Read .tsx file";
"Read .tsx file" -> "style.html exists?";
"style.html exists?" -> "Read .style.html" [label="yes"];
"style.html exists?" -> "Read .a11y.play.ts" [label="no"];
"Read .style.html" -> "Audit style.html for WCAG AA";
"Audit style.html for WCAG AA" -> "Gaps found?";
"Gaps found?" -> "Propose + apply HTML fixes" [label="yes"];
"Gaps found?" -> "Read .a11y.play.ts" [label="no"];
"Propose + apply HTML fixes" -> "Read .a11y.play.ts";
"Read .a11y.play.ts" -> "Analyse accessibility coverage";
"Analyse accessibility coverage" -> "Draft two-part section";
"Draft two-part section" -> "Present draft for approval";
"Present draft for approval" -> "Patch MDX file";
}
```

## Step 1 — Identify component

Derive `<component>` from the file the user references or the current working context. Resolve:

- Component TSX: `packages/core/src/components/<component>/<component>.tsx`
- Style HTML: `packages/core/src/components/<component>/test/<component>.style.html` (may not exist)
- A11y tests: `packages/core/src/components/<component>/test/<component>.a11y.play.ts`
- MDX doc: `docs/src/components/<component>/<component>.mdx`

## Step 2 — Read source files

Read all files that exist. Extract:

**From `.tsx`:**

- Every `aria-*` attribute set in `render()` — note which are static vs. dynamic
- Every `role` attribute set on host or inner elements
- Props that are propagated to child elements (e.g. `disabled` → all inputs)
- Keyboard interaction managed by the component (arrow key navigation, Enter/Space handling)
- Form association (`@AttachInternals`, `internals.setFormValue`)
- Any state-driven ARIA (e.g. `aria-expanded`, `aria-selected`, `aria-checked`)

**From `.style.html`:**

- Semantic HTML elements used (`<fieldset>`, `<legend>`, `<input>`, `<button>`, etc.)
- ARIA attributes present in the HTML examples
- Attributes that are absent in style.html but should be set for full accessibility (gaps)
- How disabled / invalid / required states are expressed

**From `.a11y.play.ts`:**

- Which test scenarios are covered (states/variants that are axe-tested)

## Step 3 — Audit and fix style.html for WCAG 2.2 AA

After reading `.style.html`, check every HTML snippet in the file against WCAG 2.2 AA success criteria. Focus on the following failure patterns:

| Check | What to look for |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Missing label** | `<input>`, `<select>`, `<textarea>`, `<button>` without an associated `<label>`, `aria-label`, or `aria-labelledby` |
| **Missing group label** | `<fieldset>` without a `<legend>`, or a group of related controls without `role="group"` + `aria-labelledby` |
| **Missing role** | Interactive or landmark elements that rely solely on visual styling without a semantic role |
| **Missing `aria-required`** | Required fields without `required` or `aria-required="true"` |
| **Missing `aria-invalid`** | Invalid-state examples without `aria-invalid="true"` |
| **Missing `aria-disabled`** | Disabled-state examples that only use a CSS class without the `disabled` attribute or `aria-disabled="true"` |
| **Missing `aria-describedby`** | Error messages or descriptions not linked to their control |
| **Missing `alt` / `aria-label` on icons** | `<svg>` or `<img>` used as meaningful content without text alternative; decorative ones missing `aria-hidden="true"` |
| **Non-descriptive link/button text** | "Click here", "More", etc. without `aria-label` to provide context |
| **Missing `lang`** | Top-level `<html>` in standalone HTML files without a `lang` attribute |

**For each gap found:**

1. Describe the issue and the WCAG success criterion it violates (e.g. _1.3.1 Info and Relationships_, _4.1.2 Name, Role, Value_).
2. Show the before/after diff inline as a code block.
3. Apply the fix directly to the file using the edit tool — do not ask permission for individual attribute additions.
4. If a fix requires more than adding an attribute (e.g. restructuring markup), show the proposed change to the user first and wait for approval before editing.

After all fixes are applied, summarize the changes made:

```
Fixed N accessibility issues in <component>.style.html:
- Added aria-label to icon-only buttons in the "Icon only" section
- Added aria-required="true" to required input in the "Required" section
- ...
```

If no gaps are found, state that briefly and continue to Step 4.

## Step 4 — Analyse coverage

Classify every accessibility feature into one of three buckets:

| Bucket | Meaning |
| ------------------- | ------------------------------------------------------------------------- |
| **WC — internal** | The web component sets it automatically; consumer does nothing |
| **HTML — required** | Developer must apply it manually in HTML/CSS-only mode |
| **HTML — gap** | Missing from the style.html examples but still needed for WCAG compliance |

Gaps must be called out explicitly in the HTML section as things the developer **must add** even though the style.html example does not show them.

## Step 5 — Draft the section

Use this exact template. Adapt headings and bullet content to the component:

```mdx
## Accessibility

### HTML / CSS only

Use semantic HTML so assistive technologies understand the component's structure and state without JavaScript.

<Markdown>
{`
| Requirement | How to implement |
| --------------- | ------------------------------------------------------------------------------------------ |
| Group label | Wrap options in \`<fieldset>\` and provide a \`<legend>\` as the group label |
| Radio semantics | Use \`<input type="radio">\` for each option, each wrapped in a \`<label>\` |
| Disabled state | Add the \`disabled\` attribute to each \`<input>\` and \`class="is-disabled"\` to the container |
| Invalid state | Add \`aria-invalid="true"\` to each \`<input>\` and \`class="is-danger"\` to the container |
| Required state | Add \`required\` to at least one \`<input>\` in the group |
| Icon-only items | Add \`aria-label\` and \`title\` to the wrapping \`<label>\` when no visible text is present |
`}
</Markdown>

> Keyboard navigation between options (arrow keys) is a native browser behavior for radio inputs grouped under the same `name` — no extra scripting needed.

### Web component

The `ds-<component>` element manages the following automatically:

- **Group role** — renders a `fieldset`/`role="group"` container so screen readers announce the group label
- **`aria-checked`** — kept in sync with the selected value on each option label
- **`aria-invalid`** — applied to labels and inputs when the `invalid` prop is set
- **`aria-disabled`** — applied to labels when the `disabled` prop is set; `disabled` is also forwarded to every `<input>`
- **`aria-label` / `title`** — set on icon-only labels when `icon-only` is active so the option remains accessible without visible text
- **Keyboard navigation** — arrow keys cycle through options; handled natively by the `<input type="radio">` elements rendered in the shadow DOM
- **Form association** — uses `ElementInternals` to participate in native `<form>` submit and reset without any extra markup

### References

- [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset) — MDN
- [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend) — MDN
- [`<input type="radio">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio) — MDN
- [`<label>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label) — MDN
- [`aria-checked`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked) — MDN
- [`aria-disabled`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled) — MDN
- [`aria-invalid`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid) — MDN
- [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) — MDN
- [`ElementInternals`](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals) — MDN
```

Adapt the tables and bullet lists to match what the component actually does. Remove rows/links that do not apply; add rows/links for features present in this component but not in the template.

**Rules for the two-part content:**

1. The HTML table must list every attribute/element a consumer needs to add manually. Do not omit anything that axe-core or WCAG 2.2 AA would flag.
2. Highlight gaps — requirements missing from style.html — with a `> **Note:**` blockquote so developers know to add them.
3. The WC bullet list must cover every `aria-*` / `role` attribute the component sets, plus keyboard handling and form participation if present.
4. Keep prose minimal — prefer the table and bullet list over paragraphs.
5. Do not duplicate information that already lives in the Component API section (props, events).
6. **Markdown tables must be wrapped in `<Markdown>{``}</Markdown>`** — raw MDX cannot render markdown tables directly. Escape backticks inside the template literal as `\``. The `Markdown`component is already imported via`import { Canvas, Markdown, Meta } from '@storybook/addon-docs/blocks'` at the top of every MDX file; verify it is present before writing. Use American spelling (e.g. "behavior", not "behaviour") to avoid cSpell warnings.
7. **Always add a `### References` subsection** after the Web component section listing MDN links for every HTML element, ARIA attribute, and Web API mentioned in the section. Use these canonical MDN URL patterns:
- HTML elements: `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/<element>` (e.g. `/Element/fieldset`, `/Element/input/radio`)
- ARIA attributes: `https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/<attribute>`
- Web APIs: `https://developer.mozilla.org/en-US/docs/Web/API/<Interface>`
Format each entry as: `- [\`<name>\`](<url>) — MDN`

## Step 6 — Present for approval

Show the full draft section to the user and ask for confirmation before writing.

```
Here is the proposed ## Accessibility section for ds-<component>:

---
<draft section here>
---

Shall I add this to docs/src/components/<component>/<component>.mdx?
```

## Step 7 — Patch the MDX file

After approval, insert the section into the MDX file. Find the pattern:

```mdx
## Integration

import integration from '../../snippets/integration.md?raw'

<Markdown>{integration}</Markdown>

<Footer />
```

And replace it with:

```mdx
## Integration

import integration from '../../snippets/integration.md?raw'

<Markdown>{integration}</Markdown>

## Accessibility

### HTML / CSS only

<the generated HTML section>

### Web component

<the generated WC section>

### References

<MDN links for every HTML element, ARIA attribute, and Web API mentioned above>

<Footer />
```

Use the Edit tool with `old_string` / `new_string` — never rewrite the whole file.

## What NOT to include

- Do not reproduce the Component API table — that is already in `api.md`.
- Do not list colour contrast ratios — those belong to the design token docs.
- Do not include code examples showing the full component markup — the story tabs already show that.
- Do not mention framework-specific integration (Angular, React) — that is covered by the integration snippet.
68 changes: 68 additions & 0 deletions .claude/skills/add-component-logger/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: add-component-logger
description: Use when adding a logger to a Stencil component in the Baloise Design System — wires up the Loggable interface, Logger decorator, and LogInstance field
---

# Add Component Logger

## Overview

Every Stencil component in the design system should implement the `Loggable` interface and wire up the `@Logger` decorator. This enables debug output via `window.DesignSystem.config.logger` without touching component code.

## Checklist

Work through these four steps in order on the target component file:

**1. Import**

Add `Loggable`, `Logger`, and `LogInstance` to the existing `../../utils/log` import (or add the import if missing):

```ts
import { Loggable, Logger, LogInstance } from '../../utils/log'
```

**2. Implements**

Add `Loggable` to the class `implements` list:

```ts
export class MyComponent implements ComponentInterface, Loggable {
```

**3. Field**

Add `log!: LogInstance` at the top of the class body, before any `@State` or `@Prop` declarations:

```ts
log!: LogInstance
```

**4. Decorator + method**

Add the `@Logger` block immediately after the field. Use the tag value from `@Component({ tag: '...' })` as the argument:

```ts
@Logger('ds-my-component')
createLogger(log: LogInstance) {
this.log = log
}
```

## Result

```ts
import { Component, ComponentInterface, h, Host } from '@stencil/core'
import { Loggable, Logger, LogInstance } from '../../utils/log'

@Component({ tag: 'ds-my-component', styleUrl: 'my-component.host.scss' })
export class MyComponent implements ComponentInterface, Loggable {
log!: LogInstance

@Logger('ds-my-component')
createLogger(log: LogInstance) {
this.log = log
}

// ... rest of component
}
```
Loading
Loading