@n1kname/components 0.37.0 → 0.38.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.37.0",
3
+ "version": "0.38.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -23,7 +23,7 @@ interface Item {
23
23
  }
24
24
 
25
25
  interface Props {
26
- groups: { label: string; items: Item[] }[];
26
+ groups: { label?: string; items: Item[] }[];
27
27
  /** The site's name, its link home and, if it has one, its mark. */
28
28
  brand: { label: string; href: string; logo?: string };
29
29
  /** Names the navigation for a screen reader. */
package/src/SideNav.astro CHANGED
@@ -21,7 +21,8 @@ interface Item {
21
21
  }
22
22
 
23
23
  interface Group {
24
- label: string;
24
+ /** Leave it out for a group of its own at the top, such as an overview page. */
25
+ label?: string;
25
26
  items: Item[];
26
27
  }
27
28
 
@@ -46,10 +47,12 @@ const icon = (name?: IconName) =>
46
47
  {
47
48
  groups.map((g, i) => (
48
49
  <div class="group">
49
- <p class="group-label" id={`${id}-g${i}`}>
50
- <span>{g.label}</span>
51
- </p>
52
- <ul aria-labelledby={`${id}-g${i}`}>
50
+ {g.label && (
51
+ <p class="group-label" id={`${id}-g${i}`}>
52
+ <span>{g.label}</span>
53
+ </p>
54
+ )}
55
+ <ul aria-labelledby={g.label ? `${id}-g${i}` : undefined}>
53
56
  {g.items.map((item) => (
54
57
  <li>
55
58
  <a href={item.href} aria-current={item.current ? 'page' : undefined}>
@@ -412,6 +412,13 @@ const extras = await Promise.all(
412
412
  background: var(--rail-faint);
413
413
  }
414
414
 
415
+ /* The step into now waits in a faint accent rather than faint teal, so it reads orange before
416
+ the fill reaches it as well as after. */
417
+ [data-fill][data-order='newest-first'].filling li[data-state='current']:not(:last-child)::before,
418
+ [data-fill][data-order='oldest-first'].filling li:has(+ li[data-state='current'])::before {
419
+ background: color-mix(in oklab, var(--c-accent) 28%, transparent);
420
+ }
421
+
415
422
  /* Drawn in full (no script, reduced motion): the step into now is still the accent. */
416
423
  [data-fill][data-order='newest-first']:not(.filling) li[data-state='current']:not(:last-child)::before,
417
424
  [data-fill][data-order='oldest-first']:not(.filling) li:has(+ li[data-state='current'])::before {
package/src/icons.ts CHANGED
@@ -105,6 +105,15 @@ export const ICONS = {
105
105
  '<path d="M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z"/><path d="m2.5 21.5 1.4-1.4"/><path d="m20.1 3.9 1.4-1.4"/><path d="M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z"/><path d="m9.6 14.4 4.8-4.8"/>',
106
106
  scale:
107
107
  '<path d="M12 3v18"/><path d="m19 8 3 8a5 5 0 0 1-6 0zV7"/><path d="M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1"/><path d="m5 8 3 8a5 5 0 0 1-6 0zV7"/><path d="M7 21h10"/>',
108
+ // Pages about a home: what it cost, its rooms, the weather outside, the air inside.
109
+ 'receipt-euro':
110
+ '<path d="M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z"/><path d="M8 12h5"/><path d="M16 9.5a4 4 0 1 0 0 5.2"/>',
111
+ house:
112
+ '<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>',
113
+ 'cloud-sun':
114
+ '<path d="M12 2v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="M20 12h2"/><path d="m19.07 4.93-1.41 1.41"/><path d="M15.947 12.65a4 4 0 0 0-5.925-4.128"/><path d="M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z"/>',
115
+ wind:
116
+ '<path d="M12.8 19.6A2 2 0 1 0 14 16H2"/><path d="M17.5 8a2.5 2.5 0 1 1 2 4H2"/><path d="M9.8 4.4A2 2 0 1 1 11 8H2"/>',
108
117
  menu:
109
118
  '<path d="M4 5h16"/><path d="M4 12h16"/><path d="M4 19h16"/>',
110
119
  'chevron-left':