@n1kname/components 0.49.0 → 0.50.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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/Timeline.astro +16 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n1kname/components",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -8,7 +8,8 @@
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 soft disc of the accent.
11
+ * icon, shown in a disc: soft for what's done, the accent with a halo for now. With `fill` the discs
12
+ * are the same, in teal for the history behind and the accent for now.
12
13
  *
13
14
  * Once, as each entry comes into view, its marker settles in, its text rises and its line draws on
14
15
  * to the next. Nothing moves under reduced motion, and without script everything is simply there.
@@ -77,7 +78,7 @@ const extras = await Promise.all(
77
78
  entries.map((e, i) => (
78
79
  <li data-state={state(i)} aria-current={state(i) === 'current' ? 'step' : undefined} data-to={i < entries.length - 1 ? (dashed(i) ? 'next' : 'done') : undefined}>
79
80
  <span class="marker" aria-hidden="true">
80
- {e.icon && <Icon name={e.icon} size={fill ? 18 : 16} stroke={fill ? 1.75 : undefined} />}
81
+ {e.icon && <Icon name={e.icon} size={16} />}
81
82
  </span>
82
83
  <div class="content">
83
84
  <p class="period">{e.period}</p>
@@ -392,9 +393,11 @@ const extras = await Promise.all(
392
393
  position: relative;
393
394
  }
394
395
 
396
+ /* With icons, the same discs as without the fill. */
395
397
  [data-fill][data-icons] {
396
- --m: 26px;
397
- --mt: -2px;
398
+ --m: 32px;
399
+ --mt: 0px;
400
+ --col: 32px;
398
401
  }
399
402
 
400
403
  [data-fill] li {
@@ -462,31 +465,26 @@ const extras = await Promise.all(
462
465
  background: var(--c-accent);
463
466
  }
464
467
 
465
- /* With icons: the icon itself on the rail, in a gap of the page colour. Now is larger, in a soft
466
- disc of the accent. */
468
+ /* With icons: each icon in a disc, as on a timeline without the fill. The discs are opaque, so
469
+ the rail seems to pass behind them. A disc the fill has passed is a soft teal; one it has yet
470
+ to reach is fainter; now is the accent itself, with its halo. */
467
471
  [data-fill][data-icons] .marker,
468
472
  [data-fill][data-icons] [data-state] .marker {
469
- background: var(--c-bg);
473
+ background: color-mix(in oklab, var(--rail) 26%, var(--c-bg));
470
474
  box-shadow: none;
471
475
  color: var(--rail);
472
476
  }
473
477
 
474
478
  [data-fill][data-icons].filling li:not(.reached) .marker {
475
- background: var(--c-bg);
476
- color: color-mix(in oklab, var(--c-chart-2) 50%, var(--c-bg));
479
+ background: color-mix(in oklab, var(--rail) 14%, var(--c-bg));
480
+ color: color-mix(in oklab, var(--c-chart-2) 55%, var(--c-bg));
477
481
  }
478
482
 
479
483
  [data-fill][data-icons] [data-state='current'] .marker,
480
484
  [data-fill][data-icons].filling [data-state='current']:not(.reached) .marker {
481
- width: calc(var(--m) + 6px);
482
- height: calc(var(--m) + 6px);
483
- margin-top: calc(var(--mt) - 3px);
484
- background: var(--c-surface-tint);
485
- color: var(--c-text-accent);
486
- }
487
-
488
- [data-fill][data-icons] .content {
489
- padding-top: 0;
485
+ background: var(--c-accent);
486
+ color: var(--c-on-accent);
487
+ box-shadow: 0 0 0 4px color-mix(in oklab, var(--c-accent) 28%, var(--c-bg));
490
488
  }
491
489
 
492
490
  @media (max-width: 560px) {