@fusion.dev/helix 0.145.0 → 0.146.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 (153) hide show
  1. package/custom-elements.json +7841 -3357
  2. package/dist/accordion/item/accordion-item.css.js +12 -8
  3. package/dist/accordion/item/accordion-item.d.ts +8 -0
  4. package/dist/aura/root/aura-root.css.js +3 -0
  5. package/dist/aura/root/aura-root.d.ts +21 -9
  6. package/dist/aura/root/aura-root.js +23 -12
  7. package/dist/badge/root/badge-root.css.js +86 -16
  8. package/dist/badge/root/badge-root.d.ts +18 -0
  9. package/dist/badge/root/badge-root.js +6 -0
  10. package/dist/blockquote/root/blockquote-root.css.js +2 -2
  11. package/dist/blockquote/root/blockquote-root.d.ts +2 -0
  12. package/dist/breadcrumbs/root/breadcrumbs-root.css.js +23 -0
  13. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +1 -0
  14. package/dist/button/root/button-root.css.js +4 -3
  15. package/dist/button/root/button-root.d.ts +2 -0
  16. package/dist/callout/root/callout-root.css.js +4 -3
  17. package/dist/callout/root/callout-root.d.ts +6 -2
  18. package/dist/card/root/card-root.d.ts +6 -0
  19. package/dist/chat/message/chat-message.css.js +0 -62
  20. package/dist/chat/message/chat-message.js +2 -1
  21. package/dist/chat/root/chat-root.css.js +7 -0
  22. package/dist/chat/root/chat-root.d.ts +2 -0
  23. package/dist/chat/root/chat-root.js +2 -1
  24. package/dist/chat/typing.css.d.ts +1 -0
  25. package/dist/chat/typing.css.js +62 -0
  26. package/dist/checkbox/root/checkbox-root.css.js +15 -0
  27. package/dist/checkbox/root/checkbox-root.d.ts +2 -1
  28. package/dist/code/root/code-root.css.js +2 -2
  29. package/dist/code/root/code-root.d.ts +2 -0
  30. package/dist/code-block/root/code-block-root.css.js +24 -0
  31. package/dist/code-block/root/code-block-root.d.ts +2 -1
  32. package/dist/color-input/root/color-input-root.css.js +10 -0
  33. package/dist/color-picker/root/color-picker-root.css.js +8 -0
  34. package/dist/color-picker/root/color-picker-root.d.ts +1 -0
  35. package/dist/copy-button/root/copy-button-root.css.js +15 -6
  36. package/dist/copy-button/root/copy-button-root.d.ts +7 -0
  37. package/dist/data-table/root/data-table-root.css.js +14 -7
  38. package/dist/data-table/root/data-table-root.d.ts +5 -0
  39. package/dist/date-input/root/date-input-root.css.js +10 -0
  40. package/dist/donut-chart/root/donut-chart-root.css.js +19 -0
  41. package/dist/donut-chart/root/donut-chart-root.d.ts +3 -0
  42. package/dist/drawer/root/drawer-root.css.js +47 -0
  43. package/dist/drawer/root/drawer-root.d.ts +5 -0
  44. package/dist/drilldown/item/drilldown-item.css.js +6 -6
  45. package/dist/drilldown/item/drilldown-item.d.ts +6 -0
  46. package/dist/drilldown/root/drilldown-root.css.js +25 -12
  47. package/dist/drilldown/root/drilldown-root.d.ts +10 -0
  48. package/dist/element-events.generated.js +15 -5
  49. package/dist/file-input/root/file-input-root.css.js +12 -11
  50. package/dist/file-input/root/file-input-root.d.ts +11 -0
  51. package/dist/filter-input/root/filter-input-root.css.js +6 -5
  52. package/dist/filter-input/root/filter-input-root.d.ts +5 -0
  53. package/dist/flex/root/flex-root.css.js +9 -0
  54. package/dist/flex/root/flex-root.d.ts +17 -6
  55. package/dist/graph/root/graph-root.css.js +11 -8
  56. package/dist/graph/root/graph-root.d.ts +8 -0
  57. package/dist/grid/root/grid-root.d.ts +4 -1
  58. package/dist/heatmap/root/heatmap-root.css.js +2 -1
  59. package/dist/icon-button/root/icon-button-root.css.js +68 -13
  60. package/dist/icon-button/root/icon-button-root.d.ts +4 -0
  61. package/dist/kbd/root/kbd-root.css.js +27 -0
  62. package/dist/kbd/root/kbd-root.d.ts +2 -0
  63. package/dist/lightbox/item/lightbox-item.css.js +4 -0
  64. package/dist/lightbox/root/lightbox-root.css.js +41 -0
  65. package/dist/line-chart/root/line-chart-root.css.js +16 -0
  66. package/dist/line-chart/root/line-chart-root.d.ts +2 -0
  67. package/dist/listbox/root/listbox-root.css.js +9 -0
  68. package/dist/listbox/root/listbox-root.d.ts +1 -0
  69. package/dist/loader/root/loader-root.css.js +3 -3
  70. package/dist/loader/root/loader-root.d.ts +2 -0
  71. package/dist/megamenu/root/megamenu-root.css.js +16 -13
  72. package/dist/megamenu/root/megamenu-root.d.ts +11 -0
  73. package/dist/menu/item/menu-item.css.js +25 -4
  74. package/dist/menu/item/menu-item.d.ts +1 -0
  75. package/dist/meter/root/meter-root.css.js +6 -3
  76. package/dist/meter/root/meter-root.d.ts +1 -0
  77. package/dist/navigation/root/navigation-root.d.ts +7 -0
  78. package/dist/notifications/root/notifications-root.css.js +6 -0
  79. package/dist/number-input/root/number-input-root.css.js +12 -9
  80. package/dist/number-input/root/number-input-root.d.ts +8 -0
  81. package/dist/object-inspector/root/object-inspector-root.css.js +2 -6
  82. package/dist/option/root/option-root.css.js +1 -1
  83. package/dist/orb/root/orb-root.d.ts +14 -6
  84. package/dist/orb/root/orb-root.js +16 -27
  85. package/dist/pin-input/root/pin-input-root.css.js +4 -4
  86. package/dist/pin-input/root/pin-input-root.d.ts +4 -0
  87. package/dist/progress/root/progress-root.css.js +4 -2
  88. package/dist/progress/root/progress-root.d.ts +1 -0
  89. package/dist/qr-code/root/qr-code-root.css.js +11 -0
  90. package/dist/quote/root/quote-root.css.js +3 -0
  91. package/dist/quote/root/quote-root.d.ts +2 -0
  92. package/dist/radio/root/radio-root.css.js +16 -0
  93. package/dist/radio/root/radio-root.d.ts +2 -1
  94. package/dist/sandbox/frame.d.ts +3 -2
  95. package/dist/sandbox/frame.js +19 -5
  96. package/dist/sandbox/index.d.ts +1 -0
  97. package/dist/sandbox/source/sandbox-source.css.js +70 -0
  98. package/dist/sandbox/source/sandbox-source.d.ts +34 -0
  99. package/dist/sandbox/source/sandbox-source.js +15 -0
  100. package/dist/sandbox/terminal/sandbox-terminal.d.ts +10 -2
  101. package/dist/sandbox/terminal/sandbox-terminal.js +18 -5
  102. package/dist/sandbox/tokens.d.ts +39 -0
  103. package/dist/sandbox/tokens.js +9 -0
  104. package/dist/scatter-chart/root/scatter-chart-root.css.js +9 -0
  105. package/dist/scatter-chart/root/scatter-chart-root.d.ts +2 -0
  106. package/dist/skeleton/root/skeleton-root.css.js +11 -11
  107. package/dist/skeleton/root/skeleton-root.d.ts +1 -0
  108. package/dist/skip-link/root/skip-link-root.css.js +12 -0
  109. package/dist/skip-link/root/skip-link-root.d.ts +3 -3
  110. package/dist/slider/root/slider-root.css.js +26 -0
  111. package/dist/sparkline/root/sparkline-root.css.js +49 -0
  112. package/dist/sparkline/root/sparkline-root.d.ts +6 -0
  113. package/dist/sparkline/root/sparkline-root.js +2 -1
  114. package/dist/speed-dial/item/speed-dial-item.css.js +7 -6
  115. package/dist/speed-dial/item/speed-dial-item.d.ts +3 -0
  116. package/dist/speed-dial/root/speed-dial-root.css.js +10 -5
  117. package/dist/speed-dial/root/speed-dial-root.d.ts +7 -1
  118. package/dist/speed-dial/root/speed-dial-root.js +0 -1
  119. package/dist/stat/root/stat-root.css.js +4 -0
  120. package/dist/steps/root/steps-root.css.js +28 -0
  121. package/dist/steps/root/steps-root.d.ts +5 -0
  122. package/dist/tabs/root/tabs-root.css.js +2 -2
  123. package/dist/tabs/root/tabs-root.d.ts +4 -0
  124. package/dist/tabs/tab/tab.css.js +16 -9
  125. package/dist/tabs/tab/tab.d.ts +7 -0
  126. package/dist/tag/group/tag-group.css.js +6 -0
  127. package/dist/text/clamp.d.ts +5 -2
  128. package/dist/text/clamp.js +3 -1
  129. package/dist/text/root/text-root.css.js +0 -6
  130. package/dist/text/root/text-root.d.ts +2 -1
  131. package/dist/textarea/root/textarea-root.css.js +27 -0
  132. package/dist/time-input/root/time-input-root.css.js +12 -0
  133. package/dist/time-picker/root/time-picker-root.css.js +1 -1
  134. package/dist/toast/item/toast-item.css.js +10 -0
  135. package/dist/toast/root/toast-root.d.ts +1 -0
  136. package/dist/toast/root/toast-root.js +1 -0
  137. package/dist/toggle/group/toggle-group.css.js +10 -7
  138. package/dist/toggle/group/toggle-group.d.ts +6 -1
  139. package/dist/toggle/root/toggle-root.d.ts +6 -0
  140. package/dist/toolbar/root/toolbar-root.css.js +1 -0
  141. package/dist/toolbar/root/toolbar-root.d.ts +2 -0
  142. package/dist/tooltip/root/tooltip-root.css.js +5 -5
  143. package/dist/tooltip/root/tooltip-root.d.ts +4 -0
  144. package/dist/tree/item/tree-item.css.js +19 -9
  145. package/dist/tree/item/tree-item.d.ts +9 -0
  146. package/dist/trend/root/trend-root.css.js +3 -5
  147. package/dist/trend/root/trend-root.d.ts +2 -2
  148. package/dist/virtual-list/root/virtual-list-root.css.js +14 -0
  149. package/dist/virtual-list/root/virtual-list-root.d.ts +7 -1
  150. package/lint.json +1 -1
  151. package/package.json +9 -9
  152. package/types/jsx.d.ts +4289 -631
  153. package/types/vue.d.ts +1296 -127
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { customElement, HelixBeforeEditEvent, HelixCaretEvent, HelixEditEvent, HelixElement, onUnlessFalse, restoreValue, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
+ import { drawnRuns } from '../tokens.js';
10
11
  import { styles } from './sandbox-source.css.js';
11
12
  const MODIFIERS = new Set(['Alt', 'AltGraph', 'Control', 'Meta', 'Shift']);
12
13
  let HelixSandboxSource = class HelixSandboxSource extends HelixElement {
@@ -65,6 +66,17 @@ let HelixSandboxSource = class HelixSandboxSource extends HelixElement {
65
66
  }
66
67
  }
67
68
  render() {
69
+ const field = this.renderField();
70
+ if (!this.highlight) {
71
+ return field;
72
+ }
73
+ const runs = drawnRuns(this.value, this.highlight(this.value, this.name));
74
+ return html `<div part="field">
75
+ <pre part="highlight" aria-hidden="true">${runs.map(({ kind, text }) => kind ? html `<span part="token" data-kind=${kind}>${text}</span>` : text)}${'\n'}</pre>
76
+ ${field}
77
+ </div>`;
78
+ }
79
+ renderField() {
68
80
  return html `<textarea
69
81
  part="source"
70
82
  aria-label=${this.fieldLabel}
@@ -84,6 +96,9 @@ let HelixSandboxSource = class HelixSandboxSource extends HelixElement {
84
96
  __decorate([
85
97
  property({ attribute: 'field-label' })
86
98
  ], HelixSandboxSource.prototype, "fieldLabel", void 0);
99
+ __decorate([
100
+ property({ attribute: false })
101
+ ], HelixSandboxSource.prototype, "highlight", void 0);
87
102
  __decorate([
88
103
  property({ attribute: 'keys-description' })
89
104
  ], HelixSandboxSource.prototype, "keysDescription", void 0);
@@ -27,6 +27,9 @@ import { type ConsoleLevel } from '../levels.js';
27
27
  * @aliases Console, Output
28
28
  * @documentation https://fusion.dev/helix/components/sandbox
29
29
  *
30
+ * @event {Event} change - Fired after the reader chose another level in the filter. `level` holds it.
31
+ * @event {HelixBeforeChangeEvent} helix-before-change - Fired before the level filter changes, with the level chosen, `log` for every level. Cancelable: cancel it to keep the current level.
32
+ *
30
33
  * @csspart clear - The button that empties the log, under `controls`.
31
34
  * @csspart controls - The row holding the clear button and the level filter, under `controls`.
32
35
  * @csspart count - How many times a repeated line was written.
@@ -74,7 +77,8 @@ export declare class HelixSandboxTerminal extends HelixElement {
74
77
  /**
75
78
  * What each choice of the level filter reads, for a page in another
76
79
  * language, keyed by level, such as `{ warn: '…' }`. A level left out keeps
77
- * its English words. As an attribute it is that object as JSON.
80
+ * its English words. As an attribute it is that object as JSON, and JSON
81
+ * that does not parse is no words.
78
82
  */
79
83
  levelWords: Partial<Record<ConsoleLevel, string>>;
80
84
  private entries;
@@ -98,7 +102,11 @@ export declare class HelixSandboxTerminal extends HelixElement {
98
102
  /** Empties the log. */
99
103
  clear(): void;
100
104
  protected updated(): void;
101
- /** Takes the level the reader chose in the filter. */
105
+ /**
106
+ * Takes the level the reader chose in the filter, unless a listener
107
+ * refused it, and then says so with the select's own `change`, which stops
108
+ * at the shadow root otherwise. A refusal puts the select back.
109
+ */
102
110
  private readonly handleLevel;
103
111
  /** The clear button and the level filter, under `controls`. */
104
112
  private renderControls;
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { customElement, HelixElement } from '@fusion.dev/helix-core';
7
+ import { customElement, HelixBeforeChangeEvent, HelixElement, requestChange, wordsConverter, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property, state } from 'lit/decorators.js';
10
10
  import { LEVELS, shows } from '../levels.js';
@@ -28,8 +28,21 @@ let HelixSandboxTerminal = class HelixSandboxTerminal extends HelixElement {
28
28
  this.entries = [];
29
29
  this.following = true;
30
30
  this.handleLevel = (event) => {
31
- const chosen = event.target.value;
32
- this.level = chosen === 'log' ? undefined : chosen;
31
+ const field = event.target;
32
+ const taken = requestChange({
33
+ apply: (next) => {
34
+ this.level = next === 'log' ? undefined : next;
35
+ },
36
+ event: (next) => new HelixBeforeChangeEvent({ value: next }),
37
+ host: this,
38
+ next: field.value,
39
+ });
40
+ if (taken) {
41
+ this.relayNativeEvent(event);
42
+ }
43
+ else {
44
+ field.value = this.level ?? 'log';
45
+ }
33
46
  };
34
47
  }
35
48
  get log() {
@@ -66,7 +79,7 @@ let HelixSandboxTerminal = class HelixSandboxTerminal extends HelixElement {
66
79
  return html `<div part="controls">
67
80
  <select part="filter" aria-label=${this.levelLabel} @change=${this.handleLevel}>
68
81
  ${LEVELS.map((one) => html `<option value=${one} ?selected=${(this.level ?? 'log') === one}>
69
- ${this.levelWords[one] ?? LEVEL_WORDS[one]}
82
+ ${this.levelWords?.[one] ?? LEVEL_WORDS[one]}
70
83
  </option>`)}
71
84
  </select>
72
85
  <button part="clear" type="button" @click=${() => this.clear()}>${this.clearLabel}</button>
@@ -111,7 +124,7 @@ __decorate([
111
124
  property({ attribute: 'level-label' })
112
125
  ], HelixSandboxTerminal.prototype, "levelLabel", void 0);
113
126
  __decorate([
114
- property({ attribute: 'level-words', type: Object })
127
+ property({ attribute: 'level-words', converter: wordsConverter })
115
128
  ], HelixSandboxTerminal.prototype, "levelWords", void 0);
116
129
  __decorate([
117
130
  state()
@@ -0,0 +1,39 @@
1
+ /** One run of source text, and the kind of token it is. */
2
+ export interface SandboxToken {
3
+ /**
4
+ * What the run is: `callable`, `comment`, `constant`, `invalid`, `keyword`,
5
+ * `name`, `string` or `tag`, which each have a color. Absent for text that is
6
+ * not a token, such as spaces and punctuation.
7
+ */
8
+ kind?: string | undefined;
9
+ /** The text of the run, exactly as the source has it. */
10
+ text: string;
11
+ }
12
+ /**
13
+ * Splits a pane's source into runs, for `SandboxSource.highlight`.
14
+ *
15
+ * Takes the source and the pane's `name`, such as `html` or `css`, so one
16
+ * function can serve every pane.
17
+ */
18
+ export type SandboxHighlight = (source: string, name: string) => readonly SandboxToken[];
19
+ /** A run as the pane draws it: its text, and its kind as an attribute holds it. */
20
+ export interface DrawnRun {
21
+ /** The kind, in lowercase letters, digits and hyphens, or `undefined` for plain text. */
22
+ kind: string | undefined;
23
+ /** The text of the run. */
24
+ text: string;
25
+ }
26
+ /**
27
+ * The runs a highlighter gave, made safe to draw over the field.
28
+ *
29
+ * **Drawn under the text the reader types, so the two must match exactly.** The
30
+ * runs are laid out behind a transparent field, and one character dropped or
31
+ * added moves every line after it away from the caret. So runs whose text does
32
+ * not add up to the source are not drawn as given: the source is drawn as one
33
+ * plain run instead, which loses the colors and keeps the caret honest.
34
+ *
35
+ * A kind is lowercased and anything but letters, digits and hyphens in it is
36
+ * a hyphen, so the stylesheet's eight kinds match however a highlighter
37
+ * spells them, and nothing else it writes reaches an attribute.
38
+ */
39
+ export declare const drawnRuns: (source: string, runs: readonly SandboxToken[]) => DrawnRun[];
@@ -0,0 +1,9 @@
1
+ export const drawnRuns = (source, runs) => {
2
+ if (runs.map((run) => run.text).join('') !== source) {
3
+ return [{ kind: undefined, text: source }];
4
+ }
5
+ return runs.map((run) => ({
6
+ kind: run.kind ? run.kind.toLowerCase().replace(/[^a-z0-9-]/g, '-') : undefined,
7
+ text: run.text,
8
+ }));
9
+ };
@@ -30,6 +30,15 @@ inline-size: 100%;
30
30
  overflow: visible;
31
31
  }
32
32
 
33
+ [part="trend"] {
34
+ fill: none;
35
+ stroke: var(--chart-series);
36
+ stroke-dasharray: var(--scatter-chart-trend-dash, 4 3);
37
+ stroke-linecap: round;
38
+ stroke-width: var(--scatter-chart-trend-width, 1.5px);
39
+ vector-effect: non-scaling-stroke;
40
+ }
41
+
33
42
  [part="gridline"] {
34
43
  stroke: var(--scatter-chart-gridline-color, var(--helix-color-border));
35
44
  stroke-width: var(--helix-border-thin);
@@ -38,6 +38,8 @@ import '../../tooltip/index.js';
38
38
  * @cssproperty --scatter-chart-point-opacity - Opacity of a point, so a cluster looks darker where it is denser.
39
39
  * @cssproperty --scatter-chart-point-ring-color - Color of the ring around each point. It matches the page, so change it when the chart sits on another surface.
40
40
  * @cssproperty --scatter-chart-point-size - Diameter of a point.
41
+ * @cssproperty --scatter-chart-trend-dash - The dash pattern of a line of best fit, under `trend`, as `stroke-dasharray` takes it. `none` draws it solid.
42
+ * @cssproperty --scatter-chart-trend-width - The thickness of a line of best fit, under `trend`.
41
43
  */
42
44
  export declare class HelixScatterChart extends HelixHeadlessScatterChart {
43
45
  /** The styled tier, so the tooltip this renders is the styled one. */
@@ -32,7 +32,7 @@ overflow: hidden;
32
32
  position: relative;
33
33
  }
34
34
 
35
- [part="skeleton"]::after {
35
+ [part="sheen"] {
36
36
  animation: helix-skeleton-sweep var(--skeleton-duration, calc(var(--helix-duration-slow) * 4))
37
37
  ease-in-out infinite;
38
38
  background-image: linear-gradient(
@@ -42,7 +42,7 @@ var(--skeleton-sheen-color, color-mix(in oklab, var(--helix-color-foreground) 8%
42
42
  50%,
43
43
  transparent 100%
44
44
  );
45
- content: "";
45
+ display: block;
46
46
  inline-size: 200%;
47
47
  inset-block: 0;
48
48
  inset-inline-start: 0;
@@ -58,8 +58,8 @@ border-radius: var(--helix-radii-full);
58
58
  border-radius: var(--helix-radii-full);
59
59
  }
60
60
 
61
- :host([effect="pulse"]) [part="skeleton"]::after,
62
- :host([effect="none"]) [part="skeleton"]::after {
61
+ :host([effect="pulse"]) [part="sheen"],
62
+ :host([effect="none"]) [part="sheen"] {
63
63
  animation: none;
64
64
  background-image: none;
65
65
  }
@@ -75,28 +75,28 @@ opacity: 0.4;
75
75
  }
76
76
  }
77
77
 
78
- :host(:not(:empty)) {
78
+ :host(:state(wrapping)) {
79
79
  block-size: auto;
80
80
  inline-size: fit-content;
81
81
  max-inline-size: 100%;
82
82
  position: relative;
83
83
  }
84
84
 
85
- :host(:not(:empty)) [part="content"] {
85
+ :host(:state(wrapping)) [part="content"] {
86
86
  display: block;
87
87
  }
88
88
 
89
- :host(:not(:empty)) [part="skeleton"] {
89
+ :host(:state(wrapping)) [part="skeleton"] {
90
90
  block-size: auto;
91
91
  inset: 0;
92
92
  position: absolute;
93
93
  }
94
94
 
95
- :host(:not(:empty):not([loading])) [part="skeleton"] {
95
+ :host(:state(wrapping):not([loading])) [part="skeleton"] {
96
96
  display: none;
97
97
  }
98
98
 
99
- :host([loading]:not(:empty)) [part="content"] {
99
+ :host([loading]:state(wrapping)) [part="content"] {
100
100
  visibility: hidden;
101
101
  }
102
102
 
@@ -111,12 +111,12 @@ translate: 50% 0;
111
111
  }
112
112
 
113
113
  @media (prefers-reduced-motion: reduce) {
114
- [part="skeleton"]::after,
114
+ [part="sheen"],
115
115
  :host([effect="pulse"]) [part="skeleton"] {
116
116
  animation: none;
117
117
  }
118
118
 
119
- [part="skeleton"]::after {
119
+ [part="sheen"] {
120
120
  background-image: none;
121
121
  }
122
122
  }
@@ -18,6 +18,7 @@ import type { CSSResultGroup } from 'lit';
18
18
  * @documentation https://fusion.dev/helix/components/skeleton
19
19
  *
20
20
  * @csspart content - The box around the content, hidden while `loading`.
21
+ * @csspart sheen - The highlight swept across the shape. Hidden for `effect="pulse"` and `effect="none"`.
21
22
  * @csspart skeleton - The placeholder shape.
22
23
  *
23
24
  * @cssproperty --skeleton-block-size - The height of the block shape, which is the shape when `shape` is unset. Defaults to the control height.
@@ -7,6 +7,18 @@ position: fixed;
7
7
  z-index: var(--helix-layer-overlay);
8
8
  }
9
9
 
10
+ :host(:not(:focus-within)) {
11
+ block-size: 1px;
12
+ border: var(--helix-space-none);
13
+ clip-path: inset(50%);
14
+ inline-size: 1px;
15
+ margin: var(--helix-space-none);
16
+ overflow: hidden;
17
+ padding: var(--helix-space-none);
18
+ position: absolute;
19
+ white-space: nowrap;
20
+ }
21
+
10
22
  [part="link"] {
11
23
  background-color: var(--skip-link-background-color, var(--helix-color-surface-inverse));
12
24
  border: var(--skip-link-border-width, var(--helix-border-floating)) solid
@@ -6,9 +6,9 @@ import type { CSSResultGroup } from 'lit';
6
6
  *
7
7
  * @description
8
8
  * Hidden until it receives keyboard focus, then shown in the corner of the
9
- * viewport. It is hidden with the base layer's visually hidden helper, so it
10
- * stays in the tab order and the accessibility tree. This stylesheet adds the
11
- * reveal.
9
+ * viewport. Its own stylesheet hides it with the visually hidden recipe the
10
+ * base layer uses, so it stays in the tab order and the accessibility tree,
11
+ * and is hidden with or without the base layer.
12
12
  *
13
13
  * It is fixed to the viewport, because the page may already be scrolled when
14
14
  * focus arrives, from a restored position or an anchor in the address.
@@ -79,6 +79,19 @@ var(--_slider-track-color) calc(var(--slider-fraction, 0) * 100%)
79
79
  );
80
80
  }
81
81
 
82
+ [part="control"][data-origin] {
83
+ --_slider-track-image: var(
84
+ --slider-track-image,
85
+ linear-gradient(
86
+ var(--_slider-along),
87
+ var(--_slider-track-color) calc(var(--slider-from, 0) * 100%),
88
+ var(--slider-fill-color, var(--helix-color-primary)) calc(var(--slider-from, 0) * 100%),
89
+ var(--slider-fill-color, var(--helix-color-primary)) calc(var(--slider-to, 0) * 100%),
90
+ var(--_slider-track-color) calc(var(--slider-to, 0) * 100%)
91
+ )
92
+ );
93
+ }
94
+
82
95
  [part="markers"] {
83
96
  align-self: center;
84
97
  block-size: var(--_slider-track);
@@ -337,6 +350,19 @@ margin-inline: 0;
337
350
  writing-mode: vertical-lr;
338
351
  }
339
352
 
353
+ :host([orientation="vertical"]) [part="control"][data-origin] {
354
+ --_slider-track-image: var(
355
+ --slider-track-image,
356
+ linear-gradient(
357
+ to top,
358
+ var(--_slider-track-color) calc(var(--slider-from, 0) * 100%),
359
+ var(--slider-fill-color, var(--helix-color-primary)) calc(var(--slider-from, 0) * 100%),
360
+ var(--slider-fill-color, var(--helix-color-primary)) calc(var(--slider-to, 0) * 100%),
361
+ var(--_slider-track-color) calc(var(--slider-to, 0) * 100%)
362
+ )
363
+ );
364
+ }
365
+
340
366
  :host([orientation="vertical"]) [part="marker"] {
341
367
  block-size: var(--helix-border-thick);
342
368
  inline-size: var(--_slider-track);
@@ -97,4 +97,53 @@ opacity: var(--sparkline-area-opacity, 0.35);
97
97
 
98
98
  :host([emphasis="solid"]) [part="area"] {
99
99
  opacity: 1;
100
+ }
101
+
102
+ [part="svg"]:focus-visible {
103
+ border-radius: var(--helix-radii-sm);
104
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
105
+ outline-offset: var(--helix-size-focus-offset);
106
+ }
107
+
108
+ [part="cursor"],
109
+ [part="high"],
110
+ [part="low"] {
111
+ background-color: var(--sparkline-mark-color, currentColor);
112
+ block-size: var(--sparkline-mark-size, 5px);
113
+ border-radius: var(--helix-radii-full);
114
+ inline-size: var(--sparkline-mark-size, 5px);
115
+ pointer-events: none;
116
+ position: absolute;
117
+ translate: -50% -50%;
118
+ }
119
+
120
+ [part="cursor"] {
121
+ box-shadow: 0 0 0 var(--helix-border-thick)
122
+ var(--sparkline-mark-ring-color, var(--helix-color-background));
123
+ }
124
+
125
+ [part="readout"] {
126
+ background-color: var(--sparkline-readout-background-color, var(--helix-color-surface-inverse));
127
+ border-radius: var(--helix-radii-sm);
128
+ color: var(--sparkline-readout-color, var(--helix-color-foreground-inverse));
129
+ font-family: var(--helix-font-sans);
130
+ font-size: var(--sparkline-readout-font-size, var(--helix-text-xs));
131
+ font-variant-numeric: tabular-nums;
132
+ line-height: 1.4;
133
+ padding: 0 var(--helix-space-2xs);
134
+ pointer-events: none;
135
+ position: absolute;
136
+ translate: -50% calc(-100% - var(--sparkline-mark-size, 5px));
137
+ white-space: nowrap;
138
+ z-index: 1;
139
+ }
140
+
141
+ :host(:dir(rtl)) [part="cursor"],
142
+ :host(:dir(rtl)) [part="high"],
143
+ :host(:dir(rtl)) [part="low"] {
144
+ translate: 50% -50%;
145
+ }
146
+
147
+ :host(:dir(rtl)) [part="readout"] {
148
+ translate: 50% calc(-100% - var(--sparkline-mark-size, 5px));
100
149
  }`);
@@ -30,6 +30,12 @@ import type { CSSResultGroup } from 'lit';
30
30
  * @cssproperty --sparkline-block-size - Height of the drawing.
31
31
  * @cssproperty --sparkline-color - Color of the line, the area fill, the columns, and the mark.
32
32
  * @cssproperty --sparkline-inline-size - Width of the drawing.
33
+ * @cssproperty --sparkline-mark-color - Color of the dot on the reading a pointer or a key rests on, and of the `marks` dots. Without it, the line's color.
34
+ * @cssproperty --sparkline-mark-ring-color - Color of the ring round the dot on the reading a pointer or a key rests on, which matches the page. Change it when the sparkline sits on another surface.
35
+ * @cssproperty --sparkline-mark-size - Size of the dot on the reading a pointer or a key rests on, and of the `marks` dots.
36
+ * @cssproperty --sparkline-readout-background-color - Ground of the reading written above the dot.
37
+ * @cssproperty --sparkline-readout-color - Color of the reading written above the dot.
38
+ * @cssproperty --sparkline-readout-font-size - Size of the reading written above the dot.
33
39
  * @cssproperty --sparkline-width - Thickness of the line, overriding `weight`.
34
40
  */
35
41
  export declare class HelixSparkline extends HelixHeadlessSparkline {
@@ -8,9 +8,10 @@ import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessSparkline } from '@fusion.dev/helix-headless/sparkline';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { styles as terminusStyles } from '../../shared/chart/terminus.css.js';
11
+ import { styles as liveStyles } from '../../shared/live/live.css.js';
11
12
  import { styles } from './sparkline-root.css.js';
12
13
  let HelixSparkline = class HelixSparkline extends HelixHeadlessSparkline {
13
- static { this.styles = [terminusStyles, styles]; }
14
+ static { this.styles = [liveStyles, terminusStyles, styles]; }
14
15
  };
15
16
  __decorate([
16
17
  property({ reflect: true })
@@ -18,7 +18,7 @@ padding: var(--helix-space-none);
18
18
 
19
19
  [part="item"]:disabled {
20
20
  cursor: not-allowed;
21
- opacity: 0.5;
21
+ opacity: var(--speed-dial-item-disabled-opacity, 0.5);
22
22
  }
23
23
 
24
24
  [part="icon"] {
@@ -33,16 +33,17 @@ color: var(--speed-dial-item-color, var(--helix-color-foreground));
33
33
  display: inline-flex;
34
34
  inline-size: var(--speed-dial-item-size, var(--helix-size-control-tight));
35
35
  justify-content: center;
36
+
37
+ pointer-events: auto;
36
38
  transition:
37
39
  background-color var(--helix-duration-fast) var(--helix-easing-standard),
38
40
  box-shadow var(--helix-duration-fast) var(--helix-easing-standard);
39
41
  }
40
42
 
41
43
  [part="item"]:not(:disabled):hover [part="icon"] {
42
- background-color: color-mix(
43
- in oklab,
44
- var(--helix-color-foreground) 6%,
45
- var(--helix-color-surface-overlay)
44
+ background-color: var(
45
+ --speed-dial-item-hover-background-color,
46
+ color-mix(in oklab, var(--helix-color-foreground) 6%, var(--helix-color-surface-overlay))
46
47
  );
47
48
  box-shadow: var(--helix-shadow-lg);
48
49
  }
@@ -62,7 +63,7 @@ border-radius: var(--helix-radii-sm);
62
63
  box-shadow: var(--helix-shadow-sm);
63
64
  color: var(--speed-dial-label-color, var(--helix-color-foreground));
64
65
  font-family: var(--helix-font-sans);
65
- font-size: var(--helix-text-sm);
66
+ font-size: var(--speed-dial-label-font-size, var(--helix-text-sm));
66
67
  font-weight: var(--helix-weight-medium);
67
68
  opacity: var(--_speed-dial-label-opacity, 1);
68
69
  padding: var(--helix-space-2xs) var(--helix-space-xs);
@@ -16,9 +16,12 @@ import type { CSSResultGroup } from 'lit';
16
16
  *
17
17
  * @cssproperty --speed-dial-item-background-color - Fill of the round icon.
18
18
  * @cssproperty --speed-dial-item-color - Color of the icon.
19
+ * @cssproperty --speed-dial-item-disabled-opacity - How faint a disabled action is drawn.
20
+ * @cssproperty --speed-dial-item-hover-background-color - Fill of the round icon under the pointer.
19
21
  * @cssproperty --speed-dial-item-size - Edge length of the icon.
20
22
  * @cssproperty --speed-dial-label-background-color - Fill of the chip holding the action's name.
21
23
  * @cssproperty --speed-dial-label-color - Color of the action's name.
24
+ * @cssproperty --speed-dial-label-font-size - Size of the action's name.
22
25
  */
23
26
  export declare class HelixSpeedDialItem extends HelixHeadlessSpeedDialItem {
24
27
  static styles: CSSResultGroup;
@@ -110,15 +110,15 @@ all: unset;
110
110
 
111
111
  align-items: center;
112
112
 
113
- background-color: var(--helix-color-primary-surface);
114
- block-size: var(--helix-size-control);
113
+ background-color: var(--speed-dial-background-color, var(--helix-color-primary-surface));
114
+ block-size: var(--speed-dial-size, var(--helix-size-control));
115
115
  border-radius: var(--helix-radii-full);
116
- box-shadow: var(--helix-shadow-md);
116
+ box-shadow: var(--speed-dial-shadow, var(--helix-shadow-md));
117
117
  box-sizing: border-box;
118
- color: var(--helix-color-foreground-on-primary);
118
+ color: var(--speed-dial-color, var(--helix-color-foreground-on-primary));
119
119
  cursor: pointer;
120
120
  display: inline-flex;
121
- inline-size: var(--helix-size-control);
121
+ inline-size: var(--speed-dial-size, var(--helix-size-control));
122
122
  justify-content: center;
123
123
  transition: box-shadow var(--helix-duration-fast) var(--helix-easing-standard);
124
124
  }
@@ -144,4 +144,9 @@ display: none;
144
144
 
145
145
  :host([labels="hover"]) {
146
146
  --_speed-dial-label-opacity: 0;
147
+ }
148
+
149
+ :host([labels="hover"]) [part="actions"],
150
+ :host([labels="hover"]) [part="actions"] ::slotted(*) {
151
+ pointer-events: none;
147
152
  }`);
@@ -1,6 +1,5 @@
1
1
  import { HelixHeadlessSpeedDial } from '@fusion.dev/helix-headless/speed-dial';
2
2
  import type { CSSResultGroup } from 'lit';
3
- import '../../icon/index.js';
4
3
  /**
5
4
  * @summary A floating button that opens a short list of the main actions on a screen.
6
5
  *
@@ -8,13 +7,20 @@ import '../../icon/index.js';
8
7
  * Presentation only: the column the actions fan into, and the end they align
9
8
  * to. The base class handles opening, closing, and keyboard movement.
10
9
  *
10
+ * It draws no `helix-icon` of its own, so it does not register one: import
11
+ * `@fusion.dev/helix/icon` where your trigger or your actions use it.
12
+ *
11
13
  * @since 0.1.0
12
14
  * @status stable
13
15
  * @category actions
14
16
  * @aliases FAB, Floating action button, Action button, Quick actions
15
17
  * @documentation https://fusion.dev/helix/components/speed-dial
16
18
  *
19
+ * @cssproperty --speed-dial-background-color - Fill of the trigger the dial draws when none is slotted.
20
+ * @cssproperty --speed-dial-color - Color of that trigger's icon.
17
21
  * @cssproperty --speed-dial-gap - Space between the actions.
22
+ * @cssproperty --speed-dial-shadow - Shadow under that trigger at rest.
23
+ * @cssproperty --speed-dial-size - Width and height of that trigger.
18
24
  * @cssproperty --speed-dial-stagger - The wait between one action arriving and the next.
19
25
  * @cssproperty --speed-dial-travel - How far each action moves as it arrives.
20
26
  */
@@ -9,7 +9,6 @@ import { HelixHeadlessSpeedDial } from '@fusion.dev/helix-headless/speed-dial';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { styles as glyphStyles } from '../../shared/glyph/glyph.css.js';
11
11
  import { styles } from './speed-dial-root.css.js';
12
- import '../../icon/index.js';
13
12
  let HelixSpeedDial = class HelixSpeedDial extends HelixHeadlessSpeedDial {
14
13
  static { this.styles = [glyphStyles, styles]; }
15
14
  };
@@ -32,6 +32,10 @@ font-size: var(--stat-unit-size, calc(var(--helix-text-md) / var(--helix-text-md
32
32
  font-weight: var(--helix-weight-medium);
33
33
  }
34
34
 
35
+ slot[name="trend"]::slotted(*) {
36
+ grid-column: 1 / -1;
37
+ }
38
+
35
39
  :host([direction="column-reverse"]) slot[name="label"]::slotted(*) {
36
40
  order: 1;
37
41
  }
@@ -42,9 +42,37 @@ var(--_steps-connector-inset)
42
42
  --_steps-trail-block-size: var(--helix-border-thin);
43
43
  counter-reset: helix-step;
44
44
  display: flex;
45
+
46
+ flex-wrap: wrap;
45
47
  gap: var(--steps-gap, var(--helix-space-md));
46
48
  }
47
49
 
50
+ [part="progress"] {
51
+ background-color: var(--steps-progress-track-color, var(--helix-color-border));
52
+ background-image: linear-gradient(
53
+ to right,
54
+ var(--steps-progress-color, var(--helix-color-success)) var(--steps-progress, 0%),
55
+ transparent 0
56
+ );
57
+ block-size: var(--steps-progress-thickness, var(--helix-border-thick));
58
+ border-radius: var(--helix-radii-full);
59
+ flex: 0 0 100%;
60
+ order: 1;
61
+ }
62
+
63
+ [part="progress"]:dir(rtl) {
64
+ background-image: linear-gradient(
65
+ to left,
66
+ var(--steps-progress-color, var(--helix-color-success)) var(--steps-progress, 0%),
67
+ transparent 0
68
+ );
69
+ }
70
+
71
+ :host([orientation="vertical"]) [part="progress"] {
72
+ flex: none;
73
+ inline-size: 100%;
74
+ }
75
+
48
76
  :host(:not([orientation="vertical"])) ::slotted(*) {
49
77
  flex: 1 1 0;
50
78
  min-inline-size: 0;
@@ -18,12 +18,17 @@ import type { CSSResultGroup } from 'lit';
18
18
  * @aliases Stepper, Wizard, Progress steps
19
19
  * @documentation https://fusion.dev/helix/components/steps
20
20
  *
21
+ * @csspart progress - How far through the sequence is, drawn as a bar under the steps once a stylesheet gives the part a `display`, such as `helix-steps::part(progress) { display: block }`.
22
+ *
21
23
  * @cssproperty --steps-complete-color - Color of the mark on a finished step.
22
24
  * @cssproperty --steps-connector-color - Color of the line that connects the steps.
23
25
  * @cssproperty --steps-connector-inset - Space on either side of a mark, before the connecting line.
24
26
  * @cssproperty --steps-current-color - Color of the mark on the current step.
25
27
  * @cssproperty --steps-gap - Space between one step and the next.
26
28
  * @cssproperty --steps-marker-size - Size of the mark, whether an icon or a digit.
29
+ * @cssproperty --steps-progress-color - Fill of the progress bar, once a page shows the `progress` part.
30
+ * @cssproperty --steps-progress-thickness - Height of the progress bar.
31
+ * @cssproperty --steps-progress-track-color - Color of the progress bar's track.
27
32
  */
28
33
  export declare class HelixSteps extends HelixHeadlessSteps {
29
34
  static styles: CSSResultGroup;
@@ -59,8 +59,8 @@ background-color: var(--_indicator-color, transparent);
59
59
  block-size: var(--_indicator-block, var(--helix-border-thick));
60
60
 
61
61
  border: var(--_indicator-border, 0) solid var(--_indicator-border-color, transparent);
62
- border-radius: var(--_indicator-radius, var(--helix-radii-none));
63
- box-shadow: var(--_indicator-shadow, none);
62
+ border-radius: var(--tabs-indicator-radius, var(--_indicator-radius, var(--helix-radii-none)));
63
+ box-shadow: var(--tabs-indicator-shadow, var(--_indicator-shadow, none));
64
64
  inline-size: var(--indicator-inline-size, 0);
65
65
  inset-block-start: 0;
66
66
  inset-inline-start: 0;