@juwel-development/design-system 3.0.0 → 3.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.
Files changed (40) hide show
  1. package/README.md +31 -0
  2. package/dist/design-system.js +219 -128
  3. package/dist/index.css +1 -1
  4. package/dist/types/Arrangement/Cluster/Cluster.d.ts +50 -0
  5. package/dist/types/Arrangement/Stack/Stack.d.ts +51 -0
  6. package/dist/types/Display/Figure/Figure.d.ts +21 -4
  7. package/dist/types/Display/Rail/Rail.d.ts +6 -0
  8. package/dist/types/Display/Typography/H1/H1.d.ts +7 -1
  9. package/dist/types/Display/Typography/Note/Note.d.ts +35 -0
  10. package/dist/types/Interaction/Link/Link.d.ts +4 -4
  11. package/dist/types/Layout/Cover/Cover.d.ts +48 -0
  12. package/dist/types/Layout/Form/Form.d.ts +8 -4
  13. package/dist/types/Layout/Header/Header.d.ts +20 -1
  14. package/dist/types/Layout/Hero/Hero.d.ts +9 -7
  15. package/dist/types/Layout/Section/Section.d.ts +7 -0
  16. package/dist/types/Theme/Palette.d.ts +55 -6
  17. package/dist/types/index.d.ts +4 -0
  18. package/package.json +1 -1
  19. package/src/Arrangement/Cluster/Cluster.tsx +80 -0
  20. package/src/Arrangement/Stack/Stack.tsx +81 -0
  21. package/src/Display/Figure/Figure.tsx +48 -7
  22. package/src/Display/Rail/Rail.tsx +6 -0
  23. package/src/Display/Typography/H1/H1.tsx +17 -7
  24. package/src/Display/Typography/Note/Note.tsx +56 -0
  25. package/src/Interaction/Button/Button.tsx +4 -1
  26. package/src/Interaction/Input/Input.tsx +17 -6
  27. package/src/Interaction/Link/Link.tsx +9 -5
  28. package/src/Interaction/TextArea/TextArea.tsx +17 -6
  29. package/src/Layout/Cover/Cover.tsx +85 -0
  30. package/src/Layout/Form/Form.tsx +24 -8
  31. package/src/Layout/Header/Header.tsx +37 -4
  32. package/src/Layout/Hero/Hero.tsx +10 -6
  33. package/src/Layout/PageHead/PageHead.tsx +2 -0
  34. package/src/Layout/Section/Section.tsx +11 -0
  35. package/src/Theme/Palette.ts +63 -14
  36. package/src/Theme/renderTokens.ts +37 -7
  37. package/src/index.ts +4 -0
  38. package/src/tokens.css +29 -10
  39. package/src/tokens.dark.css +25 -6
  40. package/src/tokens.light.css +25 -6
package/src/tokens.css CHANGED
@@ -17,11 +17,11 @@
17
17
  --color-control-border: #64748b;
18
18
  --color-rule: #808fa3;
19
19
  --color-backing: #f1f5f9;
20
- --color-primary: #8b5cf6;
21
- --color-primary-hover: #7c3aed;
20
+ --color-primary: #7c3aed;
21
+ --color-primary-hover: #6d28d9;
22
22
  --color-primary-foreground: #f8fafc;
23
- --color-secondary: #0ea5e9;
24
- --color-secondary-hover: #0284c7;
23
+ --color-secondary: #0369a1;
24
+ --color-secondary-hover: #075985;
25
25
  --color-secondary-foreground: #f8fafc;
26
26
  --color-disabled: #94a3b8;
27
27
  --color-disabled-hover: #64748b;
@@ -41,12 +41,12 @@
41
41
  --color-control-border: #94a3b8;
42
42
  --color-rule: #5b6a80;
43
43
  --color-backing: #1e293b;
44
- --color-primary: #7c3aed;
45
- --color-primary-hover: #8b5cf6;
46
- --color-primary-foreground: #f8fafc;
44
+ --color-primary: #8b5cf6;
45
+ --color-primary-hover: #a78bfa;
46
+ --color-primary-foreground: #020617;
47
47
  --color-secondary: #0284c7;
48
48
  --color-secondary-hover: #0ea5e9;
49
- --color-secondary-foreground: #f8fafc;
49
+ --color-secondary-foreground: #020617;
50
50
  --color-disabled: #475569;
51
51
  --color-disabled-hover: #334155;
52
52
  --color-focus-ring: var(--color-ring, #cbd5e1);
@@ -110,6 +110,11 @@
110
110
  --control-min-width: 10.5rem;
111
111
  }
112
112
 
113
+ /* The standing slot's minimum width is not a colour either, and sits in :root beside the control one. */
114
+ :root {
115
+ --standing-min-width: 7.5rem;
116
+ }
117
+
113
118
  /* The library's underline dimensions are not colours either, and sit in :root beside radius. They are
114
119
  not prose's alone: every Link treatment that draws a line draws it from these (docs/adr/0006). */
115
120
  :root {
@@ -144,11 +149,17 @@
144
149
  subtitle was rejected in ADR 0004 - it welds the lede's size to H3's and its leading to a head's. */
145
150
  --text-lede: 1.25rem; /* 20px */
146
151
  --leading-lede: 1.4;
147
- --text-body: 1.0625rem; /* 17px */
152
+ --text-body: 1.0625rem; /* 17px, floored at 16px: below it iOS Safari zooms the viewport when a control set at this role takes focus (#92) */
148
153
  --leading-body: 1.6;
149
154
  --text-small: 0.9375rem; /* 15px floor: below it tabular figures stop comparing column to column */
150
155
  --text-label: 0.8125rem; /* 13px floor: below it the tracking reads as damage, not a device */
151
156
 
157
+ /* The label role's leading, declared standalone and deliberately not paired into text-label's
158
+ utility: pairing would move every existing label site's line box at once, silently. A component
159
+ whose own height is measured against its labels reads leading-label explicitly (Header #81). 1.5
160
+ is the line height SC 1.4.12 expects text to survive, so a user stylesheet applying it moves nothing. */
161
+ --leading-label: 1.5;
162
+
152
163
  /* Two quantities on one property that must not collapse: --tracking-label is a fixed letter-spaced
153
164
  style, --tracking-optical a correction that varies with size. The names say which is which, so the
154
165
  distinction survives without the ADR in hand. Scope: the title role and above - H1, H2 and the page
@@ -166,11 +177,14 @@
166
177
  --aspect-wide: 16 / 9;
167
178
  }
168
179
 
169
- /* The reading measure has no Tailwind namespace, so it sits in :root beside radius. */
180
+ /* The measures have no Tailwind namespace, so they sit in :root beside radius. The reading measures
181
+ are in ch against the type; the action column is in rem against the root, since it bounds a stack
182
+ of controls rather than a reading line (docs/adr/0008, Amendments). */
170
183
  :root {
171
184
  --measure: 66ch;
172
185
  --measure-display: 36ch;
173
186
  --measure-wide: 72ch;
187
+ --measure-action: 20rem;
174
188
  }
175
189
 
176
190
  /* Spacing has no Tailwind namespace either - --spacing is a single base multiplier ADR 0004 forbids
@@ -191,6 +205,11 @@
191
205
  --fold-height: min(70vh, 40rem);
192
206
  }
193
207
 
208
+ /* The cover height has no Tailwind namespace either, so it sits in :root beside the fold. */
209
+ :root {
210
+ --cover-height: 100svh;
211
+ }
212
+
194
213
  /* The checklist tick's dimensions are not colours either, and sit in :root beside the underline block. */
195
214
  :root {
196
215
  --tick-length: 0.9rem;
@@ -12,12 +12,12 @@
12
12
  --color-control-border: #94a3b8;
13
13
  --color-rule: #5b6a80;
14
14
  --color-backing: #1e293b;
15
- --color-primary: #7c3aed;
16
- --color-primary-hover: #8b5cf6;
17
- --color-primary-foreground: #f8fafc;
15
+ --color-primary: #8b5cf6;
16
+ --color-primary-hover: #a78bfa;
17
+ --color-primary-foreground: #020617;
18
18
  --color-secondary: #0284c7;
19
19
  --color-secondary-hover: #0ea5e9;
20
- --color-secondary-foreground: #f8fafc;
20
+ --color-secondary-foreground: #020617;
21
21
  --color-disabled: #475569;
22
22
  --color-disabled-hover: #334155;
23
23
  --color-focus-ring: var(--color-ring, #cbd5e1);
@@ -81,6 +81,11 @@
81
81
  --control-min-width: 10.5rem;
82
82
  }
83
83
 
84
+ /* The standing slot's minimum width is not a colour either, and sits in :root beside the control one. */
85
+ :root {
86
+ --standing-min-width: 7.5rem;
87
+ }
88
+
84
89
  /* The library's underline dimensions are not colours either, and sit in :root beside radius. They are
85
90
  not prose's alone: every Link treatment that draws a line draws it from these (docs/adr/0006). */
86
91
  :root {
@@ -115,11 +120,17 @@
115
120
  subtitle was rejected in ADR 0004 - it welds the lede's size to H3's and its leading to a head's. */
116
121
  --text-lede: 1.25rem; /* 20px */
117
122
  --leading-lede: 1.4;
118
- --text-body: 1.0625rem; /* 17px */
123
+ --text-body: 1.0625rem; /* 17px, floored at 16px: below it iOS Safari zooms the viewport when a control set at this role takes focus (#92) */
119
124
  --leading-body: 1.6;
120
125
  --text-small: 0.9375rem; /* 15px floor: below it tabular figures stop comparing column to column */
121
126
  --text-label: 0.8125rem; /* 13px floor: below it the tracking reads as damage, not a device */
122
127
 
128
+ /* The label role's leading, declared standalone and deliberately not paired into text-label's
129
+ utility: pairing would move every existing label site's line box at once, silently. A component
130
+ whose own height is measured against its labels reads leading-label explicitly (Header #81). 1.5
131
+ is the line height SC 1.4.12 expects text to survive, so a user stylesheet applying it moves nothing. */
132
+ --leading-label: 1.5;
133
+
123
134
  /* Two quantities on one property that must not collapse: --tracking-label is a fixed letter-spaced
124
135
  style, --tracking-optical a correction that varies with size. The names say which is which, so the
125
136
  distinction survives without the ADR in hand. Scope: the title role and above - H1, H2 and the page
@@ -137,11 +148,14 @@
137
148
  --aspect-wide: 16 / 9;
138
149
  }
139
150
 
140
- /* The reading measure has no Tailwind namespace, so it sits in :root beside radius. */
151
+ /* The measures have no Tailwind namespace, so they sit in :root beside radius. The reading measures
152
+ are in ch against the type; the action column is in rem against the root, since it bounds a stack
153
+ of controls rather than a reading line (docs/adr/0008, Amendments). */
141
154
  :root {
142
155
  --measure: 66ch;
143
156
  --measure-display: 36ch;
144
157
  --measure-wide: 72ch;
158
+ --measure-action: 20rem;
145
159
  }
146
160
 
147
161
  /* Spacing has no Tailwind namespace either - --spacing is a single base multiplier ADR 0004 forbids
@@ -162,6 +176,11 @@
162
176
  --fold-height: min(70vh, 40rem);
163
177
  }
164
178
 
179
+ /* The cover height has no Tailwind namespace either, so it sits in :root beside the fold. */
180
+ :root {
181
+ --cover-height: 100svh;
182
+ }
183
+
165
184
  /* The checklist tick's dimensions are not colours either, and sit in :root beside the underline block. */
166
185
  :root {
167
186
  --tick-length: 0.9rem;
@@ -12,11 +12,11 @@
12
12
  --color-control-border: #64748b;
13
13
  --color-rule: #808fa3;
14
14
  --color-backing: #f1f5f9;
15
- --color-primary: #8b5cf6;
16
- --color-primary-hover: #7c3aed;
15
+ --color-primary: #7c3aed;
16
+ --color-primary-hover: #6d28d9;
17
17
  --color-primary-foreground: #f8fafc;
18
- --color-secondary: #0ea5e9;
19
- --color-secondary-hover: #0284c7;
18
+ --color-secondary: #0369a1;
19
+ --color-secondary-hover: #075985;
20
20
  --color-secondary-foreground: #f8fafc;
21
21
  --color-disabled: #94a3b8;
22
22
  --color-disabled-hover: #64748b;
@@ -81,6 +81,11 @@
81
81
  --control-min-width: 10.5rem;
82
82
  }
83
83
 
84
+ /* The standing slot's minimum width is not a colour either, and sits in :root beside the control one. */
85
+ :root {
86
+ --standing-min-width: 7.5rem;
87
+ }
88
+
84
89
  /* The library's underline dimensions are not colours either, and sit in :root beside radius. They are
85
90
  not prose's alone: every Link treatment that draws a line draws it from these (docs/adr/0006). */
86
91
  :root {
@@ -115,11 +120,17 @@
115
120
  subtitle was rejected in ADR 0004 - it welds the lede's size to H3's and its leading to a head's. */
116
121
  --text-lede: 1.25rem; /* 20px */
117
122
  --leading-lede: 1.4;
118
- --text-body: 1.0625rem; /* 17px */
123
+ --text-body: 1.0625rem; /* 17px, floored at 16px: below it iOS Safari zooms the viewport when a control set at this role takes focus (#92) */
119
124
  --leading-body: 1.6;
120
125
  --text-small: 0.9375rem; /* 15px floor: below it tabular figures stop comparing column to column */
121
126
  --text-label: 0.8125rem; /* 13px floor: below it the tracking reads as damage, not a device */
122
127
 
128
+ /* The label role's leading, declared standalone and deliberately not paired into text-label's
129
+ utility: pairing would move every existing label site's line box at once, silently. A component
130
+ whose own height is measured against its labels reads leading-label explicitly (Header #81). 1.5
131
+ is the line height SC 1.4.12 expects text to survive, so a user stylesheet applying it moves nothing. */
132
+ --leading-label: 1.5;
133
+
123
134
  /* Two quantities on one property that must not collapse: --tracking-label is a fixed letter-spaced
124
135
  style, --tracking-optical a correction that varies with size. The names say which is which, so the
125
136
  distinction survives without the ADR in hand. Scope: the title role and above - H1, H2 and the page
@@ -137,11 +148,14 @@
137
148
  --aspect-wide: 16 / 9;
138
149
  }
139
150
 
140
- /* The reading measure has no Tailwind namespace, so it sits in :root beside radius. */
151
+ /* The measures have no Tailwind namespace, so they sit in :root beside radius. The reading measures
152
+ are in ch against the type; the action column is in rem against the root, since it bounds a stack
153
+ of controls rather than a reading line (docs/adr/0008, Amendments). */
141
154
  :root {
142
155
  --measure: 66ch;
143
156
  --measure-display: 36ch;
144
157
  --measure-wide: 72ch;
158
+ --measure-action: 20rem;
145
159
  }
146
160
 
147
161
  /* Spacing has no Tailwind namespace either - --spacing is a single base multiplier ADR 0004 forbids
@@ -162,6 +176,11 @@
162
176
  --fold-height: min(70vh, 40rem);
163
177
  }
164
178
 
179
+ /* The cover height has no Tailwind namespace either, so it sits in :root beside the fold. */
180
+ :root {
181
+ --cover-height: 100svh;
182
+ }
183
+
165
184
  /* The checklist tick's dimensions are not colours either, and sit in :root beside the underline block. */
166
185
  :root {
167
186
  --tick-length: 0.9rem;