@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.
Files changed (38) hide show
  1. package/README.md +28 -0
  2. package/dist/design-system.js +370 -193
  3. package/dist/index.css +1 -1
  4. package/dist/types/Display/Typography/Eyebrow/Eyebrow.d.ts +5 -2
  5. package/dist/types/Display/Typography/H1/H1.d.ts +5 -2
  6. package/dist/types/Display/Typography/H2/H2.d.ts +5 -2
  7. package/dist/types/Display/Typography/H3/H3.d.ts +5 -2
  8. package/dist/types/Display/Typography/H4/H4.d.ts +5 -2
  9. package/dist/types/Display/Typography/H5/H5.d.ts +5 -2
  10. package/dist/types/Display/Typography/H6/H6.d.ts +5 -2
  11. package/dist/types/Display/Typography/Note/Note.d.ts +5 -2
  12. package/dist/types/Display/Typography/P/P.d.ts +5 -2
  13. package/dist/types/Display/Typography/Prose/Prose.d.ts +6 -3
  14. package/dist/types/Layout/Dialog/Dialog.d.ts +104 -0
  15. package/dist/types/Layout/Dialog/DialogCompositionError.d.ts +3 -0
  16. package/dist/types/Layout/Dialog/DialogNamingError.d.ts +3 -0
  17. package/dist/types/Theme/Palette.d.ts +19 -2
  18. package/dist/types/index.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/src/Display/Typography/Eyebrow/Eyebrow.tsx +12 -2
  21. package/src/Display/Typography/H1/H1.tsx +12 -2
  22. package/src/Display/Typography/H2/H2.tsx +12 -2
  23. package/src/Display/Typography/H3/H3.tsx +12 -2
  24. package/src/Display/Typography/H4/H4.tsx +12 -2
  25. package/src/Display/Typography/H5/H5.tsx +12 -2
  26. package/src/Display/Typography/H6/H6.tsx +12 -2
  27. package/src/Display/Typography/Note/Note.tsx +12 -2
  28. package/src/Display/Typography/P/P.tsx +12 -2
  29. package/src/Display/Typography/Prose/Prose.tsx +13 -3
  30. package/src/Layout/Dialog/Dialog.tsx +478 -0
  31. package/src/Layout/Dialog/DialogCompositionError.ts +6 -0
  32. package/src/Layout/Dialog/DialogNamingError.ts +8 -0
  33. package/src/Theme/Palette.ts +27 -5
  34. package/src/Theme/renderTokens.ts +31 -3
  35. package/src/index.ts +1 -0
  36. package/src/tokens.css +23 -3
  37. package/src/tokens.dark.css +19 -0
  38. package/src/tokens.light.css +22 -3
package/src/tokens.css CHANGED
@@ -17,6 +17,7 @@
17
17
  --color-control-border: #64748b;
18
18
  --color-rule: #808fa3;
19
19
  --color-backing: #f1f5f9;
20
+ --color-scrim: rgb(15 23 42 / 0.5);
20
21
  --color-meter-fill: #0f172a;
21
22
  --color-meter-track: #e2e8f0;
22
23
  --color-primary: #7c3aed;
@@ -29,10 +30,10 @@
29
30
  --color-disabled-hover: #64748b;
30
31
  --color-focus-ring: var(--color-ring, #475569);
31
32
  --color-link: #2563eb;
32
- --color-success: #10b981;
33
- --color-warning: #f59e0b;
33
+ --color-success: #047857;
34
+ --color-warning: #b45309;
34
35
  --color-error: #d63384;
35
- --color-info: #06b6d4;
36
+ --color-info: #0e7490;
36
37
  }
37
38
 
38
39
  .dark {
@@ -43,6 +44,7 @@
43
44
  --color-control-border: #94a3b8;
44
45
  --color-rule: #5b6a80;
45
46
  --color-backing: #1e293b;
47
+ --color-scrim: rgb(15 23 42 / 0.5);
46
48
  --color-meter-fill: #f8fafc;
47
49
  --color-meter-track: #334155;
48
50
  --color-primary: #8b5cf6;
@@ -69,6 +71,7 @@
69
71
  --color-control-border: var(--color-control-border);
70
72
  --color-rule: var(--color-rule);
71
73
  --color-backing: var(--color-backing);
74
+ --color-scrim: var(--color-scrim);
72
75
  --color-meter-fill: var(--color-meter-fill);
73
76
  --color-meter-track: var(--color-meter-track);
74
77
  --color-primary: var(--color-primary);
@@ -109,6 +112,7 @@
109
112
  /* Radius is not a colour either: one token for the corner every control reads, beside the others. */
110
113
  :root {
111
114
  --radius-control: 0.5rem;
115
+ --radius-dialog: 0.375rem;
112
116
  }
113
117
 
114
118
  /* The control minimum width is not a colour either, and sits in :root beside radius. */
@@ -166,6 +170,12 @@
166
170
  is the line height SC 1.4.12 expects text to survive, so a user stylesheet applying it moves nothing. */
167
171
  --leading-label: 1.5;
168
172
 
173
+ /* The Dialog title role: the top heading of an independent transitory task, deliberately outside
174
+ the page heading ladder (docs/adr/0005). Ships subtitle's values while staying an independent
175
+ role, so a consumer re-points Dialog titles without moving every H3 (docs/adr/0004, Amendments). */
176
+ --text-dialog-title: clamp(1.5rem, 3vw, 2.25rem);
177
+ --leading-dialog-title: 1.2;
178
+
169
179
  /* Two quantities on one property that must not collapse: --tracking-label is a fixed letter-spaced
170
180
  style, --tracking-optical a correction that varies with size. The names say which is which, so the
171
181
  distinction survives without the ADR in hand. Scope: the title role and above - H1, H2 and the page
@@ -246,3 +256,13 @@
246
256
  :root {
247
257
  --meter-track-thickness: 0.5rem;
248
258
  }
259
+
260
+ /* The scrim's blur is not a colour either, and sits in :root beside the meter track. */
261
+ :root {
262
+ --scrim-blur: 0;
263
+ }
264
+
265
+ /* The floating elevation is not a colour either, and sits in :root at the end of the non-colour blocks. */
266
+ :root {
267
+ --elevation-floating: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
268
+ }
@@ -12,6 +12,7 @@
12
12
  --color-control-border: #94a3b8;
13
13
  --color-rule: #5b6a80;
14
14
  --color-backing: #1e293b;
15
+ --color-scrim: rgb(15 23 42 / 0.5);
15
16
  --color-meter-fill: #f8fafc;
16
17
  --color-meter-track: #334155;
17
18
  --color-primary: #8b5cf6;
@@ -38,6 +39,7 @@
38
39
  --color-control-border: var(--color-control-border);
39
40
  --color-rule: var(--color-rule);
40
41
  --color-backing: var(--color-backing);
42
+ --color-scrim: var(--color-scrim);
41
43
  --color-meter-fill: var(--color-meter-fill);
42
44
  --color-meter-track: var(--color-meter-track);
43
45
  --color-primary: var(--color-primary);
@@ -78,6 +80,7 @@
78
80
  /* Radius is not a colour either: one token for the corner every control reads, beside the others. */
79
81
  :root {
80
82
  --radius-control: 0.5rem;
83
+ --radius-dialog: 0.375rem;
81
84
  }
82
85
 
83
86
  /* The control minimum width is not a colour either, and sits in :root beside radius. */
@@ -135,6 +138,12 @@
135
138
  is the line height SC 1.4.12 expects text to survive, so a user stylesheet applying it moves nothing. */
136
139
  --leading-label: 1.5;
137
140
 
141
+ /* The Dialog title role: the top heading of an independent transitory task, deliberately outside
142
+ the page heading ladder (docs/adr/0005). Ships subtitle's values while staying an independent
143
+ role, so a consumer re-points Dialog titles without moving every H3 (docs/adr/0004, Amendments). */
144
+ --text-dialog-title: clamp(1.5rem, 3vw, 2.25rem);
145
+ --leading-dialog-title: 1.2;
146
+
138
147
  /* Two quantities on one property that must not collapse: --tracking-label is a fixed letter-spaced
139
148
  style, --tracking-optical a correction that varies with size. The names say which is which, so the
140
149
  distinction survives without the ADR in hand. Scope: the title role and above - H1, H2 and the page
@@ -215,3 +224,13 @@
215
224
  :root {
216
225
  --meter-track-thickness: 0.5rem;
217
226
  }
227
+
228
+ /* The scrim's blur is not a colour either, and sits in :root beside the meter track. */
229
+ :root {
230
+ --scrim-blur: 0;
231
+ }
232
+
233
+ /* The floating elevation is not a colour either, and sits in :root at the end of the non-colour blocks. */
234
+ :root {
235
+ --elevation-floating: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
236
+ }
@@ -12,6 +12,7 @@
12
12
  --color-control-border: #64748b;
13
13
  --color-rule: #808fa3;
14
14
  --color-backing: #f1f5f9;
15
+ --color-scrim: rgb(15 23 42 / 0.5);
15
16
  --color-meter-fill: #0f172a;
16
17
  --color-meter-track: #e2e8f0;
17
18
  --color-primary: #7c3aed;
@@ -24,10 +25,10 @@
24
25
  --color-disabled-hover: #64748b;
25
26
  --color-focus-ring: var(--color-ring, #475569);
26
27
  --color-link: #2563eb;
27
- --color-success: #10b981;
28
- --color-warning: #f59e0b;
28
+ --color-success: #047857;
29
+ --color-warning: #b45309;
29
30
  --color-error: #d63384;
30
- --color-info: #06b6d4;
31
+ --color-info: #0e7490;
31
32
  }
32
33
 
33
34
  @theme inline {
@@ -38,6 +39,7 @@
38
39
  --color-control-border: var(--color-control-border);
39
40
  --color-rule: var(--color-rule);
40
41
  --color-backing: var(--color-backing);
42
+ --color-scrim: var(--color-scrim);
41
43
  --color-meter-fill: var(--color-meter-fill);
42
44
  --color-meter-track: var(--color-meter-track);
43
45
  --color-primary: var(--color-primary);
@@ -78,6 +80,7 @@
78
80
  /* Radius is not a colour either: one token for the corner every control reads, beside the others. */
79
81
  :root {
80
82
  --radius-control: 0.5rem;
83
+ --radius-dialog: 0.375rem;
81
84
  }
82
85
 
83
86
  /* The control minimum width is not a colour either, and sits in :root beside radius. */
@@ -135,6 +138,12 @@
135
138
  is the line height SC 1.4.12 expects text to survive, so a user stylesheet applying it moves nothing. */
136
139
  --leading-label: 1.5;
137
140
 
141
+ /* The Dialog title role: the top heading of an independent transitory task, deliberately outside
142
+ the page heading ladder (docs/adr/0005). Ships subtitle's values while staying an independent
143
+ role, so a consumer re-points Dialog titles without moving every H3 (docs/adr/0004, Amendments). */
144
+ --text-dialog-title: clamp(1.5rem, 3vw, 2.25rem);
145
+ --leading-dialog-title: 1.2;
146
+
138
147
  /* Two quantities on one property that must not collapse: --tracking-label is a fixed letter-spaced
139
148
  style, --tracking-optical a correction that varies with size. The names say which is which, so the
140
149
  distinction survives without the ADR in hand. Scope: the title role and above - H1, H2 and the page
@@ -215,3 +224,13 @@
215
224
  :root {
216
225
  --meter-track-thickness: 0.5rem;
217
226
  }
227
+
228
+ /* The scrim's blur is not a colour either, and sits in :root beside the meter track. */
229
+ :root {
230
+ --scrim-blur: 0;
231
+ }
232
+
233
+ /* The floating elevation is not a colour either, and sits in :root at the end of the non-colour blocks. */
234
+ :root {
235
+ --elevation-floating: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
236
+ }