@n1kname/components 0.66.2 → 0.67.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n1kname/components",
3
- "version": "0.66.2",
3
+ "version": "0.67.0",
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;
@@ -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>