@n1kname/components 0.66.2 → 0.67.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n1kname/components",
3
- "version": "0.66.2",
3
+ "version": "0.67.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -10,6 +10,10 @@ interface Item {
10
10
  icon: IconName;
11
11
  dimension: string;
12
12
  outcome: string;
13
+ /** The chip's colour, for rows that carry a status: `cool` (teal) for done, `accent` (the
14
+ * default) for in progress, `quiet` (grey) for not started. Rows without a status keep the
15
+ * accent. */
16
+ tone?: 'accent' | 'cool' | 'quiet';
13
17
  }
14
18
 
15
19
  interface Props {
@@ -32,7 +36,7 @@ const { items, closing, headings = ['Dimension', 'The outcome'] } = Astro.props;
32
36
  items.map((item) => (
33
37
  <div class="row">
34
38
  <dt class="t-sub">
35
- <span class="chip">
39
+ <span class="chip" data-tone={item.tone ?? 'accent'}>
36
40
  <Icon name={item.icon} size={17} />
37
41
  </span>
38
42
  {item.dimension}
@@ -97,6 +101,18 @@ const { items, closing, headings = ['Dimension', 'The outcome'] } = Astro.props;
97
101
  color: var(--c-text-accent);
98
102
  }
99
103
 
104
+ /* A status, readable at a glance down the column: done in the teal of the cool tags, not
105
+ started in grey. */
106
+ .chip[data-tone='cool'] {
107
+ background: var(--c-tag-cool-bg);
108
+ color: var(--c-tag-cool-text);
109
+ }
110
+
111
+ .chip[data-tone='quiet'] {
112
+ background: var(--c-surface-sunken);
113
+ color: var(--c-text-secondary);
114
+ }
115
+
100
116
  dd {
101
117
  margin: 0;
102
118
  max-width: none;
@@ -5,7 +5,7 @@
5
5
  * such as the four on a story map.
6
6
  *
7
7
  * Deliberately not cards: open columns with a hairline between them, so a page that already has
8
- * boxes doesn't get more. The quote hangs on a rule in the person's tone. A list, each person a
8
+ * boxes doesn't get more. The quote sits on a soft tint of the person's tone. A list, each person a
9
9
  * heading, their notes and their quote, read in order. Up to four columns; below 640px wide two,
10
10
  * below 420px one, with a rule above each person instead.
11
11
  *
@@ -202,7 +202,8 @@ const tones: Tone[] = ['accent', 'cool'];
202
202
  margin-bottom: 2px;
203
203
  font-size: var(--text-caption);
204
204
  font-weight: 600;
205
- color: var(--c-text-secondary);
205
+ /* Tinted from the surface it sits on, not a flat grey. */
206
+ color: var(--mark);
206
207
  }
207
208
 
208
209
  dd {
@@ -213,11 +214,13 @@ const tones: Tone[] = ['accent', 'cool'];
213
214
  text-wrap: pretty;
214
215
  }
215
216
 
216
- /* The person's voice: hung on a rule in their tone, at the foot of the column. */
217
+ /* The person's voice, at the foot of the column: a 10% tint of their tone, as the Notice. Not
218
+ * a rule down one side, which reads as a coloured bar on a box. */
217
219
  blockquote {
218
220
  margin: auto 0 0;
219
- padding: var(--sp-1) 0 var(--sp-1) var(--sp-3);
220
- border-left: 2px solid var(--mark);
221
+ padding: var(--sp-3) var(--sp-4);
222
+ border-radius: var(--radius-md);
223
+ background: color-mix(in oklab, var(--mark) 10%, var(--c-surface));
221
224
  }
222
225
 
223
226
  blockquote p {
@@ -308,7 +311,7 @@ const tones: Tone[] = ['accent', 'cool'];
308
311
  }
309
312
 
310
313
  blockquote {
311
- border-left-color: CanvasText;
314
+ border: 1px solid CanvasText;
312
315
  }
313
316
  }
314
317
  </style>
@@ -8,7 +8,7 @@
8
8
  * with a halo); any after it are still to come (hollow markers on a dashed line). By default the
9
9
  * last entry is now. `order="newest-first"` turns that round for a history read from today back,
10
10
  * such as a career: the first entry is now and the ones below it are done. An entry can carry an
11
- * icon, shown in a disc: soft for what's done, the accent with a halo for now. With `fill` the discs
11
+ * icon, shown in a disc: light teal for what's done, the accent with a halo for now. With `fill` the discs
12
12
  * are the same, in teal for the history behind and the accent for now.
13
13
  *
14
14
  * Once, as each entry comes into view, its marker settles in, its text rises and its line draws on
@@ -237,9 +237,15 @@ const extras = await Promise.all(
237
237
  box-shadow: inset 0 0 0 2px var(--c-border-strong);
238
238
  }
239
239
 
240
- /* With icons: a soft disc of the accent for what's done, the accent itself for now. */
240
+ /* With icons: the light teal of the cool tags for what's done, on a teal line, and the accent
241
+ itself for now, so the orange marks only where things stand (as with fill). */
242
+ .timeline[data-icons] {
243
+ --rail-done: color-mix(in oklab, var(--c-tag-cool-text) 45%, var(--c-border));
244
+ }
245
+
241
246
  [data-icons] [data-state='done'] .marker {
242
- background: color-mix(in oklab, var(--c-accent) 16%, var(--c-surface));
247
+ background: var(--c-tag-cool-bg);
248
+ color: var(--c-tag-cool-text);
243
249
  }
244
250
 
245
251
  [data-icons] [data-state='current'] .marker {
package/src/Tracks.astro CHANGED
@@ -47,7 +47,10 @@ interface Props {
47
47
  const { title, steps, tracks, stepTones, caption, class: className } = Astro.props;
48
48
  const n = steps.length;
49
49
  const toneOf = (k: number): Tone => stepTones?.[k] ?? (k === n - 1 ? 'accent' : 'quiet');
50
- const trackTones: Tone[] = ['accent', 'cool'];
50
+ // A track's disc is teal unless the track says otherwise: the row names a kind of thing, and
51
+ // alternating orange and teal by position read as meaning where there was none. The orange stays
52
+ // for the step that matters.
53
+ const trackTones: Tone[] = ['cool'];
51
54
  ---
52
55
 
53
56
  <figure class:list={['tracks', className]} data-tracks>