@fusion.dev/helix 0.139.0 → 0.141.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.
@@ -424,11 +424,11 @@ export declare class HelixAura extends HelixElement {
424
424
  /**
425
425
  * Resolves the ramp. Called when the palette moves, not when a frame draws.
426
426
  *
427
- * Light pages peak on a deep brand blue and dark ones on the foreground, and
428
- * the ground is what says which: mixing a saturated hue toward near-black
429
- * takes the chroma out of exactly the pixels carrying the most of it. Read
430
- * from the ground's own luminance rather than asked of the color mode, which
431
- * is a private token this tier may not reach for.
427
+ * Light pages peak on the pressed `primary-active` and dark ones on the
428
+ * foreground, and the ground is what says which: mixing a saturated hue
429
+ * toward near-black takes the chroma out of exactly the pixels carrying the
430
+ * most of it. Read from the ground's own luminance rather than asked of the
431
+ * color mode, which is a private token this tier may not reach for.
432
432
  */
433
433
  private readPalette;
434
434
  private link;
@@ -32,9 +32,9 @@ let HelixAura = class HelixAura extends HelixElement {
32
32
  this.paintOnce();
33
33
  });
34
34
  this.palette = {
35
- glow: [0.29, 0.61, 1],
35
+ glow: [0.88, 0.88, 0.88],
36
36
  ground: [0, 0, 0],
37
- haze: [0.02, 0.15, 0.34],
37
+ haze: [0.16, 0.16, 0.16],
38
38
  peak: [1, 1, 1],
39
39
  };
40
40
  this.canvas = null;
@@ -267,11 +267,11 @@ let HelixAura = class HelixAura extends HelixElement {
267
267
  const ground = this.tokens.read('--helix-color-background', [0, 0, 0]);
268
268
  const light = ground[0] * 0.2126 + ground[1] * 0.7152 + ground[2] * 0.0722 > 0.5;
269
269
  this.palette = {
270
- glow: this.tokens.read('--helix-color-primary', [0.29, 0.61, 1]),
270
+ glow: this.tokens.read('--helix-color-primary', [0.88, 0.88, 0.88]),
271
271
  ground,
272
- haze: this.tokens.read('--helix-color-primary-subtle', [0.02, 0.15, 0.34]),
272
+ haze: this.tokens.read('--helix-color-primary-subtle', [0.16, 0.16, 0.16]),
273
273
  peak: light
274
- ? this.tokens.read('--helix-color-primary-active', [0.1, 0.2, 0.55])
274
+ ? this.tokens.read('--helix-color-primary-active', [0.02, 0.02, 0.02])
275
275
  : this.tokens.read('--helix-color-foreground', [1, 1, 1]),
276
276
  };
277
277
  }
@@ -5,6 +5,8 @@ export const styles = createSheet(`:host {
5
5
  --_badge-text: var(--helix-text-xs);
6
6
  --_badge-inset: var(--helix-space-2xs);
7
7
  --_badge-dot: var(--helix-space-xs);
8
+
9
+ --_badge-on: var(--helix-color-foreground-on-primary);
8
10
  display: inline-flex;
9
11
  position: relative;
10
12
  vertical-align: middle;
@@ -18,7 +20,7 @@ block-size: var(--_badge-size);
18
20
  border-radius: var(--helix-radii-full);
19
21
 
20
22
  box-shadow: 0 0 0 var(--helix-border-thick) var(--badge-ring-color, var(--helix-color-background));
21
- color: var(--helix-color-foreground-on-accent);
23
+ color: var(--_badge-on);
22
24
  display: inline-flex;
23
25
  font-size: var(--_badge-text);
24
26
  font-weight: var(--helix-weight-semibold);
@@ -70,6 +72,17 @@ background-color: var(--badge-background-color, var(--helix-color-primary-surfac
70
72
  background-color: var(--badge-background-color, var(--helix-color-accent-surface));
71
73
  }
72
74
 
75
+ :host([tone="accent"]) {
76
+ --_badge-on: var(--helix-color-foreground-on-accent);
77
+ }
78
+
79
+ :host([tone="danger"]),
80
+ :host([tone="info"]),
81
+ :host([tone="success"]),
82
+ :host([tone="warning"]) {
83
+ --_badge-on: var(--helix-color-foreground-on-status);
84
+ }
85
+
73
86
  :host([tone="info"]) [part="indicator"] {
74
87
  background-color: var(--badge-background-color, var(--helix-color-info-surface));
75
88
  }
@@ -27,8 +27,8 @@ export declare class HelixBadge extends HelixHeadlessBadge {
27
27
  * different sets for no reason anybody decided: a tag could say `success` and
28
28
  * a badge could not, so a page marking a build green wrote one word on the
29
29
  * chip and had no word for the count beside it. Every fill these name already
30
- * exists and every one carries `foreground-on-accent`, so this costs a rule
31
- * apiece and no new color.
30
+ * exists with its family's label, so this costs a rule apiece and no new
31
+ * color.
32
32
  *
33
33
  * **`primary` is sayable as well as the default**, which is the reason
34
34
  * `Announcement` gives for its own neutral: a generated page should be able to
@@ -24,7 +24,7 @@ var(--helix-color-background)
24
24
  --_button-edge: var(--helix-color-primary);
25
25
  --_button-fill: var(--helix-color-primary-surface);
26
26
  --_button-fill-hover: var(--helix-color-primary-surface-hover);
27
- --_button-on-tone: var(--helix-color-foreground-on-accent);
27
+ --_button-on-tone: var(--helix-color-foreground-on-primary);
28
28
  --_button-tone: var(--helix-color-primary);
29
29
  --_button-tone-hover: var(--helix-color-primary-hover);
30
30
  }
@@ -41,7 +41,7 @@ var(--helix-color-background)
41
41
  --_button-edge: var(--helix-color-danger);
42
42
  --_button-fill: var(--helix-color-danger-surface);
43
43
  --_button-fill-hover: var(--helix-color-danger-surface-hover);
44
- --_button-on-tone: var(--helix-color-foreground-on-accent);
44
+ --_button-on-tone: var(--helix-color-foreground-on-status);
45
45
  --_button-tone: var(--helix-color-danger);
46
46
 
47
47
  --_button-tone-hover: color-mix(
@@ -28,6 +28,10 @@ inset-inline-start: 0;
28
28
  position: absolute;
29
29
  }
30
30
 
31
+ :host([tone="neutral"]) {
32
+ --_callout-color: var(--helix-color-foreground-muted);
33
+ }
34
+
31
35
  :host([tone="success"]) {
32
36
  --_callout-color: var(--helix-color-success);
33
37
  }
@@ -1,10 +1,12 @@
1
1
  import { HelixHeadlessCallout } from '@fusion.dev/helix-headless/callout';
2
2
  import type { CSSResultGroup } from 'lit';
3
3
  /**
4
- * @summary A passage set apart as information, a warning, or an error.
4
+ * @summary A passage set apart as a note, information, a warning, or an error.
5
5
  *
6
6
  * @description
7
- * The background is a tint of the tone's status color, mixed with `color-mix`.
7
+ * The background is a tint of the tone's color, mixed with `color-mix`. A
8
+ * `neutral` callout is drawn in the muted ink, for a note that reports no
9
+ * status, so it keeps to the palette whatever the brand.
8
10
  * A bar on the inline start edge also marks the tone, so it still shows in
9
11
  * grayscale and for people who do not distinguish the hues.
10
12
  *
@@ -44,14 +44,27 @@ touch-action: none;
44
44
  }
45
45
 
46
46
  [part="grid"]::after {
47
+
48
+ --_color-picker-mark-half: calc(var(--helix-size-icon-tight) / 2);
47
49
  block-size: var(--helix-size-icon-tight);
48
- border: var(--helix-border-thick) solid var(--helix-color-surface);
50
+ border: var(--helix-border-thick) solid var(--helix-color-foreground-media);
49
51
  border-radius: var(--helix-radii-full);
50
- box-shadow: var(--helix-shadow-sm);
52
+ box-shadow:
53
+ 0 0 0 var(--helix-border-thin)
54
+ color-mix(in oklab, var(--helix-color-surface-media) 60%, transparent),
55
+ var(--helix-shadow-sm);
51
56
  content: "";
52
57
  inline-size: var(--helix-size-icon-tight);
53
- inset-block-start: calc(100% - var(--color-picker-brightness, 100%));
54
- inset-inline-start: var(--color-picker-saturation, 100%);
58
+ inset-block-start: clamp(
59
+ var(--_color-picker-mark-half),
60
+ calc(100% - var(--color-picker-brightness, 100%)),
61
+ calc(100% - var(--_color-picker-mark-half))
62
+ );
63
+ inset-inline-start: clamp(
64
+ var(--_color-picker-mark-half),
65
+ var(--color-picker-saturation, 100%),
66
+ calc(100% - var(--_color-picker-mark-half))
67
+ );
55
68
  pointer-events: none;
56
69
  position: absolute;
57
70
  translate: -50% -50%;
@@ -25,7 +25,7 @@ var(--helix-color-background)
25
25
  --_icon-button-ink-hover: var(--helix-color-primary);
26
26
  --_icon-button-fill: var(--helix-color-primary-surface);
27
27
  --_icon-button-fill-hover: var(--helix-color-primary-surface-hover);
28
- --_icon-button-on-tone: var(--helix-color-foreground-on-accent);
28
+ --_icon-button-on-tone: var(--helix-color-foreground-on-primary);
29
29
  --_icon-button-tone: var(--helix-color-primary);
30
30
  --_icon-button-tone-hover: var(--helix-color-primary-hover);
31
31
  }
@@ -47,7 +47,7 @@ var(--helix-color-background)
47
47
  --_icon-button-ink-hover: var(--helix-color-danger);
48
48
  --_icon-button-fill: var(--helix-color-danger-surface);
49
49
  --_icon-button-fill-hover: var(--helix-color-danger-surface-hover);
50
- --_icon-button-on-tone: var(--helix-color-foreground-on-accent);
50
+ --_icon-button-on-tone: var(--helix-color-foreground-on-status);
51
51
  --_icon-button-tone: var(--helix-color-danger);
52
52
  --_icon-button-tone-hover: color-mix(
53
53
  in oklab,
@@ -3,7 +3,7 @@ export const styles = createSheet(`:host {
3
3
  --_map-marker-color: var(--map-marker-color, var(--helix-color-primary));
4
4
 
5
5
  --_map-marker-fill: var(--map-marker-color, var(--helix-color-primary-surface));
6
- --_map-marker-ink: var(--map-marker-ink, var(--helix-color-foreground-on-accent));
6
+ --_map-marker-ink: var(--map-marker-ink, var(--helix-color-foreground-on-primary));
7
7
 
8
8
  --_map-marker-edge: var(--helix-color-surface);
9
9
  --_map-marker-lift: 0px;
@@ -180,7 +180,7 @@ var(--map-marker-cluster-color, var(--helix-color-primary-surface)) 28%,
180
180
  transparent
181
181
  ),
182
182
  var(--_map-marker-shadow);
183
- color: var(--helix-color-foreground-on-accent);
183
+ color: var(--helix-color-foreground-on-primary);
184
184
  font-size: calc(var(--_map-marker-size) * 0.42);
185
185
  font-variant-numeric: tabular-nums;
186
186
  rotate: none;
@@ -301,14 +301,17 @@ outline-offset: var(--helix-size-focus-offset);
301
301
  :host([tone="accent"]) {
302
302
  --_map-marker-color: var(--helix-color-accent);
303
303
  --_map-marker-fill: var(--helix-color-accent-surface);
304
+ --_map-marker-ink: var(--map-marker-ink, var(--helix-color-foreground-on-accent));
304
305
  }
305
306
  :host([tone="danger"]) {
306
307
  --_map-marker-color: var(--helix-color-danger);
307
308
  --_map-marker-fill: var(--helix-color-danger-surface);
309
+ --_map-marker-ink: var(--map-marker-ink, var(--helix-color-foreground-on-status));
308
310
  }
309
311
  :host([tone="info"]) {
310
312
  --_map-marker-color: var(--helix-color-info);
311
313
  --_map-marker-fill: var(--helix-color-info-surface);
314
+ --_map-marker-ink: var(--map-marker-ink, var(--helix-color-foreground-on-status));
312
315
  }
313
316
 
314
317
  :host([tone="neutral"]) {
@@ -319,10 +322,12 @@ outline-offset: var(--helix-size-focus-offset);
319
322
  :host([tone="success"]) {
320
323
  --_map-marker-color: var(--helix-color-success);
321
324
  --_map-marker-fill: var(--helix-color-success-surface);
325
+ --_map-marker-ink: var(--map-marker-ink, var(--helix-color-foreground-on-status));
322
326
  }
323
327
  :host([tone="warning"]) {
324
328
  --_map-marker-color: var(--helix-color-warning);
325
329
  --_map-marker-fill: var(--helix-color-warning-surface);
330
+ --_map-marker-ink: var(--map-marker-ink, var(--helix-color-foreground-on-status));
326
331
  }
327
332
 
328
333
  :host(:state(passed)) {
@@ -8,7 +8,7 @@ display: block;
8
8
  inline-size: 0;
9
9
  inset-block-start: 0;
10
10
  left: 0;
11
- outline-color: var(--map-points-ink, var(--helix-color-foreground-on-accent));
11
+ outline-color: var(--map-points-ink, var(--helix-color-foreground-on-primary));
12
12
  pointer-events: none;
13
13
  position: absolute;
14
14
  }
@@ -58,14 +58,17 @@ opacity: 1;
58
58
 
59
59
  :host([tone="accent"]) {
60
60
  color: var(--helix-color-accent-surface);
61
+ outline-color: var(--map-points-ink, var(--helix-color-foreground-on-accent));
61
62
  }
62
63
 
63
64
  :host([tone="danger"]) {
64
65
  color: var(--helix-color-danger-surface);
66
+ outline-color: var(--map-points-ink, var(--helix-color-foreground-on-status));
65
67
  }
66
68
 
67
69
  :host([tone="info"]) {
68
70
  color: var(--helix-color-info-surface);
71
+ outline-color: var(--map-points-ink, var(--helix-color-foreground-on-status));
69
72
  }
70
73
 
71
74
  :host([tone="neutral"]) {
@@ -75,8 +78,10 @@ outline-color: var(--map-points-ink, var(--helix-color-surface));
75
78
 
76
79
  :host([tone="success"]) {
77
80
  color: var(--helix-color-success-surface);
81
+ outline-color: var(--map-points-ink, var(--helix-color-foreground-on-status));
78
82
  }
79
83
 
80
84
  :host([tone="warning"]) {
81
85
  color: var(--helix-color-warning-surface);
86
+ outline-color: var(--map-points-ink, var(--helix-color-foreground-on-status));
82
87
  }`);
@@ -155,7 +155,7 @@ font-weight: var(--helix-weight-semibold);
155
155
  [part="tilt"][aria-pressed="true"] {
156
156
  background-color: var(--helix-color-primary-surface);
157
157
  border-color: var(--helix-color-primary-surface);
158
- color: var(--helix-color-foreground-on-accent);
158
+ color: var(--helix-color-foreground-on-primary);
159
159
  }
160
160
 
161
161
  [part="tilt"][aria-pressed="true"]:hover {
@@ -20,7 +20,8 @@ inset: auto;
20
20
  margin: var(--helix-space-none);
21
21
 
22
22
  max-inline-size: calc(100vw - var(--helix-space-lg));
23
- padding: var(--popover-padding, var(--helix-space-md));
23
+
24
+ padding: var(--helix-space-none);
24
25
  inline-size: var(--popover-inline-size, max-content);
25
26
  }
26
27
 
@@ -28,10 +29,6 @@ inline-size: var(--popover-inline-size, max-content);
28
29
  display: none;
29
30
  }
30
31
 
31
- :host([separation="plain"]) [part="popover"] {
32
- padding: var(--popover-padding, var(--helix-space-none));
33
- }
34
-
35
32
  [part="popover"] {
36
33
  --_travel: calc(var(--helix-space-2xs) * -1);
37
34
 
@@ -85,6 +82,11 @@ transition: none;
85
82
  [part="content"] {
86
83
  max-block-size: var(--popover-max-block-size, var(--floating-available-block-size, none));
87
84
  overflow: auto;
85
+ padding: var(--popover-padding, var(--helix-space-md));
86
+ }
87
+
88
+ :host([separation="plain"]) [part="content"] {
89
+ padding: var(--popover-padding, var(--helix-space-none));
88
90
  }
89
91
 
90
92
  @media print {
@@ -115,7 +115,7 @@ block-size: var(--helix-size-control);
115
115
  border-radius: var(--helix-radii-full);
116
116
  box-shadow: var(--helix-shadow-md);
117
117
  box-sizing: border-box;
118
- color: var(--helix-color-foreground-on-accent);
118
+ color: var(--helix-color-foreground-on-primary);
119
119
  cursor: pointer;
120
120
  display: inline-flex;
121
121
  inline-size: var(--helix-size-control);
@@ -79,7 +79,7 @@ opacity: 0;
79
79
 
80
80
  :host(:state(checked)) [part="track"]::after {
81
81
 
82
- background-color: var(--switch-thumb-color, var(--helix-color-foreground-on-accent));
82
+ background-color: var(--switch-thumb-color, var(--helix-color-foreground-on-primary));
83
83
 
84
84
  translate: calc(var(--_switch-width) - var(--_switch-height)) -50%;
85
85
  }