@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.
- package/README.md +31 -0
- package/dist/design-system.js +219 -128
- package/dist/index.css +1 -1
- package/dist/types/Arrangement/Cluster/Cluster.d.ts +50 -0
- package/dist/types/Arrangement/Stack/Stack.d.ts +51 -0
- package/dist/types/Display/Figure/Figure.d.ts +21 -4
- package/dist/types/Display/Rail/Rail.d.ts +6 -0
- package/dist/types/Display/Typography/H1/H1.d.ts +7 -1
- package/dist/types/Display/Typography/Note/Note.d.ts +35 -0
- package/dist/types/Interaction/Link/Link.d.ts +4 -4
- package/dist/types/Layout/Cover/Cover.d.ts +48 -0
- package/dist/types/Layout/Form/Form.d.ts +8 -4
- package/dist/types/Layout/Header/Header.d.ts +20 -1
- package/dist/types/Layout/Hero/Hero.d.ts +9 -7
- package/dist/types/Layout/Section/Section.d.ts +7 -0
- package/dist/types/Theme/Palette.d.ts +55 -6
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
- package/src/Arrangement/Cluster/Cluster.tsx +80 -0
- package/src/Arrangement/Stack/Stack.tsx +81 -0
- package/src/Display/Figure/Figure.tsx +48 -7
- package/src/Display/Rail/Rail.tsx +6 -0
- package/src/Display/Typography/H1/H1.tsx +17 -7
- package/src/Display/Typography/Note/Note.tsx +56 -0
- package/src/Interaction/Button/Button.tsx +4 -1
- package/src/Interaction/Input/Input.tsx +17 -6
- package/src/Interaction/Link/Link.tsx +9 -5
- package/src/Interaction/TextArea/TextArea.tsx +17 -6
- package/src/Layout/Cover/Cover.tsx +85 -0
- package/src/Layout/Form/Form.tsx +24 -8
- package/src/Layout/Header/Header.tsx +37 -4
- package/src/Layout/Hero/Hero.tsx +10 -6
- package/src/Layout/PageHead/PageHead.tsx +2 -0
- package/src/Layout/Section/Section.tsx +11 -0
- package/src/Theme/Palette.ts +63 -14
- package/src/Theme/renderTokens.ts +37 -7
- package/src/index.ts +4 -0
- package/src/tokens.css +29 -10
- package/src/tokens.dark.css +25 -6
- 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: #
|
|
21
|
-
--color-primary-hover: #
|
|
20
|
+
--color-primary: #7c3aed;
|
|
21
|
+
--color-primary-hover: #6d28d9;
|
|
22
22
|
--color-primary-foreground: #f8fafc;
|
|
23
|
-
--color-secondary: #
|
|
24
|
-
--color-secondary-hover: #
|
|
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: #
|
|
45
|
-
--color-primary-hover: #
|
|
46
|
-
--color-primary-foreground: #
|
|
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: #
|
|
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
|
|
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;
|
package/src/tokens.dark.css
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
--color-control-border: #94a3b8;
|
|
13
13
|
--color-rule: #5b6a80;
|
|
14
14
|
--color-backing: #1e293b;
|
|
15
|
-
--color-primary: #
|
|
16
|
-
--color-primary-hover: #
|
|
17
|
-
--color-primary-foreground: #
|
|
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: #
|
|
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
|
|
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;
|
package/src/tokens.light.css
CHANGED
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
--color-control-border: #64748b;
|
|
13
13
|
--color-rule: #808fa3;
|
|
14
14
|
--color-backing: #f1f5f9;
|
|
15
|
-
--color-primary: #
|
|
16
|
-
--color-primary-hover: #
|
|
15
|
+
--color-primary: #7c3aed;
|
|
16
|
+
--color-primary-hover: #6d28d9;
|
|
17
17
|
--color-primary-foreground: #f8fafc;
|
|
18
|
-
--color-secondary: #
|
|
19
|
-
--color-secondary-hover: #
|
|
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
|
|
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;
|