@juwel-development/design-system 3.1.0 → 3.3.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.
@@ -129,15 +129,15 @@ const TYPOGRAPHY = `@theme {
129
129
  --tracking-optical: -0.02em;
130
130
  }`;
131
131
 
132
- /* The reading measure is in ch, not rem, so the character count stays held when the body size moves
133
- under it; --measure-display is narrower because bigger type wants fewer characters per line, and
134
- --measure-wide slightly wider - the standfirst of a page head (PageHead #18) is an opening statement,
135
- not a reading column, so it runs a little past the reading measure by design. All three in ch and,
136
- having no Tailwind namespace, in :root beside radius, read as max-w-[var(--measure)]. */
132
+ /* The reading measures are in ch so the character count holds when the body size moves under them:
133
+ --measure-display narrower because bigger type wants fewer characters per line, --measure-wide a
134
+ little past the reading column for the page-head standfirst (PageHead #18). --measure-action is
135
+ the action column, in rem (docs/adr/0008, Amendments, #97); 20rem clears --control-min-width. */
137
136
  const MEASURE = `:root {
138
137
  --measure: 66ch;
139
138
  --measure-display: 36ch;
140
139
  --measure-wide: 72ch;
140
+ --measure-action: 20rem;
141
141
  }`;
142
142
 
143
143
  /* Three spacing roles, not a ladder: --space-stack is the sibling gap in a stack, --space-region the air
@@ -155,6 +155,13 @@ const SPACING = `:root {
155
155
  --space-band: 4em;
156
156
  }`;
157
157
 
158
+ /* Collection item padding is air inside each freely composed item (#103), distinct from a sibling
159
+ gap or a page band. One em above and below keeps it tied to inherited type without imposing a
160
+ type role on the content. A separate role lets a brand tune this air without moving other groups. */
161
+ const COLLECTION_SPACING = `:root {
162
+ --space-collection-item: 1em;
163
+ }`;
164
+
158
165
  /* The gutter is the horizontal inset holding content off the viewport edge (#9), and the one spacing role
159
166
  measured against the screen rather than the type: it answers to how much room there is, not how large
160
167
  the words are, so it is in rem/vw and never em. A clamp() lets it grow with the viewport with no
@@ -173,6 +180,14 @@ const FOLD = `:root {
173
180
  --fold-height: min(70vh, 40rem);
174
181
  }`;
175
182
 
183
+ /* The least height a whole screen takes (CONTEXT.md: Cover) - measured against the screen like the
184
+ fold, in :root beside it with no Tailwind namespace, read as min-h-[var(--cover-height)]. In svh so
185
+ a mobile browser's collapsing chrome never hides a foot pinned to the bottom edge. A floor and
186
+ never a ceiling, so overflowing content grows the frame; enforced per ADR 0004. */
187
+ const COVER = `:root {
188
+ --cover-height: 100svh;
189
+ }`;
190
+
176
191
  /* Four aspect roles in a @theme block like typography: --aspect-* is a Tailwind 4 namespace, so it
177
192
  generates the aspect-portrait utilities Figure reaches rather than a :root value. Named shapes, not
178
193
  a ladder - ADR 0003/0004 rejected a radius and spacing scale (see SPACING) because a scale lets a
@@ -196,6 +211,22 @@ const TICK = `:root {
196
211
  --tick-thickness: 1px;
197
212
  }`;
198
213
 
214
+ /* Tab label insets separate adjacent controls and give the label vertical breathing room.
215
+ These are two axis-specific jobs, not a selectable scale; stack/region/band describe other jobs.
216
+ Like those spacing roles, em tracks the label type. Non-negative values preserve the hit area. */
217
+ const TAB_INSETS = `:root {
218
+ --tab-inset-inline: 1em;
219
+ --tab-inset-block: 0.5em;
220
+ }`;
221
+
222
+ /* Not a colour: like the tick, the thickness lives in :root only, never @theme inline, so a brand
223
+ can re-point the marker's weight. Not an --underline-* token - those name an anchor's line
224
+ (docs/adr/0006); this names the persistent mark under the active tab, drawn in `foreground`,
225
+ no new role. Constraint: > 0 - the line is the one persistent selection cue, zero erases it. */
226
+ const TAB_MARKER = `:root {
227
+ --tab-marker-thickness: 2px;
228
+ }`;
229
+
199
230
  const toKebabCase = (name: string): string =>
200
231
  name.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`);
201
232
 
@@ -254,21 +285,34 @@ ${TYPOGRAPHY}
254
285
  after it and are not carried in @theme inline with the palette. */
255
286
  ${ASPECT}
256
287
 
257
- /* The reading measure has no Tailwind namespace, so it sits in :root beside radius. */
288
+ /* The measures have no Tailwind namespace, so they sit in :root beside radius. The reading measures
289
+ are in ch against the type; the action column is in rem against the root, since it bounds a stack
290
+ of controls rather than a reading line (docs/adr/0008, Amendments). */
258
291
  ${MEASURE}
259
292
 
260
293
  /* Spacing has no Tailwind namespace either - --spacing is a single base multiplier ADR 0004 forbids
261
294
  re-pointing - so the three roles sit in :root beside the measure. */
262
295
  ${SPACING}
263
296
 
297
+ /* Collection's vertical item padding, measured against inherited type. */
298
+ ${COLLECTION_SPACING}
299
+
264
300
  /* The gutter has no Tailwind namespace either, so it sits in :root beside the space roles. */
265
301
  ${GUTTER}
266
302
 
267
303
  /* The fold height has no Tailwind namespace either, so it sits in :root beside the gutter. */
268
304
  ${FOLD}
269
305
 
306
+ /* The cover height has no Tailwind namespace either, so it sits in :root beside the fold. */
307
+ ${COVER}
308
+
270
309
  /* The checklist tick's dimensions are not colours either, and sit in :root beside the underline block. */
271
310
  ${TICK}
311
+
312
+ /* The tab marker's thickness is not a colour either, and sits in :root beside the tick block. */
313
+ ${TAB_MARKER}
314
+
315
+ ${TAB_INSETS}
272
316
  `;
273
317
 
274
318
  /**
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ export { Cluster } from 'Arrangement/Cluster/Cluster';
4
4
  export { Stack } from 'Arrangement/Stack/Stack';
5
5
  export { Brandmark } from 'Display/Brandmark/Brandmark';
6
6
  export { Checklist } from 'Display/Checklist/Checklist';
7
+ export { Collection } from 'Display/Collection/Collection';
7
8
  export { DefinitionList } from 'Display/DefinitionList/DefinitionList';
8
9
  export { Figure } from 'Display/Figure/Figure';
9
10
  export { Rail } from 'Display/Rail/Rail';
@@ -21,7 +22,9 @@ export { Prose } from 'Display/Typography/Prose/Prose';
21
22
  export { Button } from 'Interaction/Button/Button';
22
23
  export { Input } from 'Interaction/Input/Input';
23
24
  export { Link } from 'Interaction/Link/Link';
25
+ export { Tabs } from 'Interaction/Tabs/Tabs';
24
26
  export { TextArea } from 'Interaction/TextArea/TextArea';
27
+ export { Cover } from 'Layout/Cover/Cover';
25
28
  export { Footer } from 'Layout/Footer/Footer';
26
29
  export type { FormState } from 'Layout/Form/Form';
27
30
  export { Form } from 'Layout/Form/Form';
@@ -29,5 +32,6 @@ export { Header } from 'Layout/Header/Header';
29
32
  export { Hero } from 'Layout/Hero/Hero';
30
33
  export { PageHead } from 'Layout/PageHead/PageHead';
31
34
  export { Section } from 'Layout/Section/Section';
35
+ export { Sidebar } from 'Layout/Sidebar/Sidebar';
32
36
  export type { PaletteTokens } from 'Theme/Palette';
33
37
  export { dark, light } from 'Theme/Palette';
package/src/tokens.css CHANGED
@@ -177,11 +177,14 @@
177
177
  --aspect-wide: 16 / 9;
178
178
  }
179
179
 
180
- /* 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). */
181
183
  :root {
182
184
  --measure: 66ch;
183
185
  --measure-display: 36ch;
184
186
  --measure-wide: 72ch;
187
+ --measure-action: 20rem;
185
188
  }
186
189
 
187
190
  /* Spacing has no Tailwind namespace either - --spacing is a single base multiplier ADR 0004 forbids
@@ -192,6 +195,11 @@
192
195
  --space-band: 4em;
193
196
  }
194
197
 
198
+ /* Collection's vertical item padding, measured against inherited type. */
199
+ :root {
200
+ --space-collection-item: 1em;
201
+ }
202
+
195
203
  /* The gutter has no Tailwind namespace either, so it sits in :root beside the space roles. */
196
204
  :root {
197
205
  --gutter: clamp(1.5rem, 5vw, 4rem);
@@ -202,8 +210,23 @@
202
210
  --fold-height: min(70vh, 40rem);
203
211
  }
204
212
 
213
+ /* The cover height has no Tailwind namespace either, so it sits in :root beside the fold. */
214
+ :root {
215
+ --cover-height: 100svh;
216
+ }
217
+
205
218
  /* The checklist tick's dimensions are not colours either, and sit in :root beside the underline block. */
206
219
  :root {
207
220
  --tick-length: 0.9rem;
208
221
  --tick-thickness: 1px;
209
222
  }
223
+
224
+ /* The tab marker's thickness is not a colour either, and sits in :root beside the tick block. */
225
+ :root {
226
+ --tab-marker-thickness: 2px;
227
+ }
228
+
229
+ :root {
230
+ --tab-inset-inline: 1em;
231
+ --tab-inset-block: 0.5em;
232
+ }
@@ -148,11 +148,14 @@
148
148
  --aspect-wide: 16 / 9;
149
149
  }
150
150
 
151
- /* 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). */
152
154
  :root {
153
155
  --measure: 66ch;
154
156
  --measure-display: 36ch;
155
157
  --measure-wide: 72ch;
158
+ --measure-action: 20rem;
156
159
  }
157
160
 
158
161
  /* Spacing has no Tailwind namespace either - --spacing is a single base multiplier ADR 0004 forbids
@@ -163,6 +166,11 @@
163
166
  --space-band: 4em;
164
167
  }
165
168
 
169
+ /* Collection's vertical item padding, measured against inherited type. */
170
+ :root {
171
+ --space-collection-item: 1em;
172
+ }
173
+
166
174
  /* The gutter has no Tailwind namespace either, so it sits in :root beside the space roles. */
167
175
  :root {
168
176
  --gutter: clamp(1.5rem, 5vw, 4rem);
@@ -173,8 +181,23 @@
173
181
  --fold-height: min(70vh, 40rem);
174
182
  }
175
183
 
184
+ /* The cover height has no Tailwind namespace either, so it sits in :root beside the fold. */
185
+ :root {
186
+ --cover-height: 100svh;
187
+ }
188
+
176
189
  /* The checklist tick's dimensions are not colours either, and sit in :root beside the underline block. */
177
190
  :root {
178
191
  --tick-length: 0.9rem;
179
192
  --tick-thickness: 1px;
180
193
  }
194
+
195
+ /* The tab marker's thickness is not a colour either, and sits in :root beside the tick block. */
196
+ :root {
197
+ --tab-marker-thickness: 2px;
198
+ }
199
+
200
+ :root {
201
+ --tab-inset-inline: 1em;
202
+ --tab-inset-block: 0.5em;
203
+ }
@@ -148,11 +148,14 @@
148
148
  --aspect-wide: 16 / 9;
149
149
  }
150
150
 
151
- /* 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). */
152
154
  :root {
153
155
  --measure: 66ch;
154
156
  --measure-display: 36ch;
155
157
  --measure-wide: 72ch;
158
+ --measure-action: 20rem;
156
159
  }
157
160
 
158
161
  /* Spacing has no Tailwind namespace either - --spacing is a single base multiplier ADR 0004 forbids
@@ -163,6 +166,11 @@
163
166
  --space-band: 4em;
164
167
  }
165
168
 
169
+ /* Collection's vertical item padding, measured against inherited type. */
170
+ :root {
171
+ --space-collection-item: 1em;
172
+ }
173
+
166
174
  /* The gutter has no Tailwind namespace either, so it sits in :root beside the space roles. */
167
175
  :root {
168
176
  --gutter: clamp(1.5rem, 5vw, 4rem);
@@ -173,8 +181,23 @@
173
181
  --fold-height: min(70vh, 40rem);
174
182
  }
175
183
 
184
+ /* The cover height has no Tailwind namespace either, so it sits in :root beside the fold. */
185
+ :root {
186
+ --cover-height: 100svh;
187
+ }
188
+
176
189
  /* The checklist tick's dimensions are not colours either, and sit in :root beside the underline block. */
177
190
  :root {
178
191
  --tick-length: 0.9rem;
179
192
  --tick-thickness: 1px;
180
193
  }
194
+
195
+ /* The tab marker's thickness is not a colour either, and sits in :root beside the tick block. */
196
+ :root {
197
+ --tab-marker-thickness: 2px;
198
+ }
199
+
200
+ :root {
201
+ --tab-inset-inline: 1em;
202
+ --tab-inset-block: 0.5em;
203
+ }