@juwel-development/design-system 3.4.0 → 3.6.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/README.md +28 -0
- package/dist/design-system.js +370 -193
- package/dist/index.css +1 -1
- package/dist/types/Display/Typography/Eyebrow/Eyebrow.d.ts +5 -2
- package/dist/types/Display/Typography/H1/H1.d.ts +5 -2
- package/dist/types/Display/Typography/H2/H2.d.ts +5 -2
- package/dist/types/Display/Typography/H3/H3.d.ts +5 -2
- package/dist/types/Display/Typography/H4/H4.d.ts +5 -2
- package/dist/types/Display/Typography/H5/H5.d.ts +5 -2
- package/dist/types/Display/Typography/H6/H6.d.ts +5 -2
- package/dist/types/Display/Typography/Note/Note.d.ts +5 -2
- package/dist/types/Display/Typography/P/P.d.ts +5 -2
- package/dist/types/Display/Typography/Prose/Prose.d.ts +6 -3
- package/dist/types/Layout/Dialog/Dialog.d.ts +104 -0
- package/dist/types/Layout/Dialog/DialogCompositionError.d.ts +3 -0
- package/dist/types/Layout/Dialog/DialogNamingError.d.ts +3 -0
- package/dist/types/Theme/Palette.d.ts +19 -2
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/Display/Typography/Eyebrow/Eyebrow.tsx +12 -2
- package/src/Display/Typography/H1/H1.tsx +12 -2
- package/src/Display/Typography/H2/H2.tsx +12 -2
- package/src/Display/Typography/H3/H3.tsx +12 -2
- package/src/Display/Typography/H4/H4.tsx +12 -2
- package/src/Display/Typography/H5/H5.tsx +12 -2
- package/src/Display/Typography/H6/H6.tsx +12 -2
- package/src/Display/Typography/Note/Note.tsx +12 -2
- package/src/Display/Typography/P/P.tsx +12 -2
- package/src/Display/Typography/Prose/Prose.tsx +13 -3
- package/src/Layout/Dialog/Dialog.tsx +478 -0
- package/src/Layout/Dialog/DialogCompositionError.ts +6 -0
- package/src/Layout/Dialog/DialogNamingError.ts +8 -0
- package/src/Theme/Palette.ts +27 -5
- package/src/Theme/renderTokens.ts +31 -3
- package/src/index.ts +1 -0
- package/src/tokens.css +23 -3
- package/src/tokens.dark.css +19 -0
- package/src/tokens.light.css +22 -3
package/README.md
CHANGED
|
@@ -74,6 +74,26 @@ on an ancestor re-points every token underneath it.
|
|
|
74
74
|
A product re-themes the whole system by supplying its own values for the same role
|
|
75
75
|
names, which is what lets one design system serve several brands.
|
|
76
76
|
|
|
77
|
+
### Typography status tones
|
|
78
|
+
|
|
79
|
+
Typography whose colour is selectable accepts the general `success`, `warning`, `error`, and
|
|
80
|
+
`info` status tones alongside `foreground` and `muted`. This includes `H1`–`H6`, `Eyebrow`, `P`,
|
|
81
|
+
`Note`, and `Prose.Body`; fixed-colour members such as `Prose.Lede` and `Prose.Tail` remain fixed.
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
<P color={'warning'}>Warning: patience is low and the offer gap is wide.</P>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
A status tone reinforces status that the content already communicates: never use colour as the
|
|
88
|
+
only cue. Selecting one changes only the semantic text colour and does not add an ARIA role, live
|
|
89
|
+
region, icon, or wording. The caller remains responsible for announcement behavior when a changing
|
|
90
|
+
status needs it.
|
|
91
|
+
|
|
92
|
+
All four palette roles must remain at least 4.5:1 against `surface` in every theme because they can
|
|
93
|
+
paint normal-size and small text. They remain general roles rather than typography-only tokens, so
|
|
94
|
+
constraints from other carriers also apply; `error`, for example, remains Meter's depletion
|
|
95
|
+
endpoint and must keep that complete path at least 3:1 against `meterTrack`.
|
|
96
|
+
|
|
77
97
|
### Single-theme builds
|
|
78
98
|
|
|
79
99
|
`styles.css` and `tokens.css` carry both colour sets, so a product that ships only one
|
|
@@ -102,6 +122,14 @@ npm run build:tokens
|
|
|
102
122
|
The generated files are committed, and a test pins each to the palette - editing the
|
|
103
123
|
palette without regenerating fails the suite rather than shipping stale colours.
|
|
104
124
|
|
|
125
|
+
#### Migrating a custom palette to the `scrim` role
|
|
126
|
+
|
|
127
|
+
Dialog added the required `scrim` role to `PaletteTokens`. A consumer that constructs its own
|
|
128
|
+
palette object of this type must add a `scrim` colour - an `rgb(r g b / a)` value whose alpha is
|
|
129
|
+
part of the role, `rgb(15 23 42 / 0.5)` being the shipped default. Spreading `light`/`dark` and
|
|
130
|
+
overriding stays valid unchanged, and a theme that only overrides the generated
|
|
131
|
+
`--color-*` custom properties in CSS inherits the new default without any change.
|
|
132
|
+
|
|
105
133
|
## Development
|
|
106
134
|
|
|
107
135
|
```bash
|