@fusion.dev/helix 0.152.0 → 0.154.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 (33) hide show
  1. package/custom-elements.json +1563 -117
  2. package/dist/area-chart/root/area-chart-root.js +2 -1
  3. package/dist/badge/root/badge-root.css.js +1 -1
  4. package/dist/badge/root/badge-root.d.ts +1 -0
  5. package/dist/bar-chart/root/bar-chart-root.js +2 -1
  6. package/dist/blockquote/root/blockquote-root.css.js +2 -1
  7. package/dist/blockquote/root/blockquote-root.d.ts +27 -0
  8. package/dist/blockquote/root/blockquote-root.js +7 -0
  9. package/dist/card/root/card-root.css.js +3 -1
  10. package/dist/code/root/code-root.css.js +2 -2
  11. package/dist/code/root/code-root.d.ts +1 -0
  12. package/dist/code-block/root/code-block-root.css.js +4 -1
  13. package/dist/code-block/root/code-block-root.d.ts +1 -0
  14. package/dist/icon/root/icon-root.css.js +8 -1
  15. package/dist/icon/root/icon-root.d.ts +38 -1
  16. package/dist/icon/root/icon-root.js +17 -0
  17. package/dist/line-chart/root/line-chart-root.js +8 -1
  18. package/dist/orb/root/orb-root.d.ts +6 -0
  19. package/dist/progress/root/progress-root.css.js +12 -3
  20. package/dist/progress/root/progress-root.d.ts +4 -0
  21. package/dist/quote/root/quote-root.css.js +1 -1
  22. package/dist/scatter-chart/root/scatter-chart-root.js +2 -1
  23. package/dist/shared/chart/status.css.d.ts +1 -0
  24. package/dist/shared/chart/status.css.js +3 -0
  25. package/dist/skeleton/root/skeleton-root.css.js +11 -7
  26. package/dist/skeleton/root/skeleton-root.d.ts +18 -2
  27. package/dist/skeleton/root/skeleton-root.js +11 -0
  28. package/dist/stat/root/stat-root.css.js +1 -1
  29. package/lint.json +1 -1
  30. package/package.json +6 -6
  31. package/types/jsx.d.ts +1463 -45
  32. package/types/vue.d.ts +373 -14
  33. package/types/words.d.ts +19 -4
@@ -7,12 +7,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessAreaChart } from '@fusion.dev/helix-headless/area-chart';
9
9
  import { styles as seriesStyles } from '../../shared/chart/series.css.js';
10
+ import { styles as statusStyles } from '../../shared/chart/status.css.js';
10
11
  import { styles as tooltipStyles } from '../../shared/chart/tooltip.css.js';
11
12
  import { styles } from './area-chart-root.css.js';
12
13
  import '../../tooltip/index.js';
13
14
  let HelixAreaChart = class HelixAreaChart extends HelixHeadlessAreaChart {
14
15
  static { this.tier = 'helix-'; }
15
- static { this.styles = [seriesStyles, tooltipStyles, styles]; }
16
+ static { this.styles = [seriesStyles, statusStyles, tooltipStyles, styles]; }
16
17
  };
17
18
  HelixAreaChart = __decorate([
18
19
  customElement('helix-area-chart')
@@ -1,5 +1,5 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {--_badge-size: var(--helix-size-badge);--_badge-text: var(--helix-text-xs);--_badge-inset: var(--helix-space-2xs);--_badge-dot: var(--helix-space-xs);--_badge-on: var(--helix-color-foreground-on-primary);--_badge-fill: var(--helix-color-primary-surface);display: inline-flex;position: relative;vertical-align: middle;}[part="indicator"] {align-items: center;background-color: var(--badge-background-color, var(--_badge-fill));block-size: var(--_badge-size);border-radius: var(--badge-radius, var(--helix-radii-full));box-shadow: 0 0 0 var(--helix-border-thick) var(--badge-ring-color, var(--helix-color-background));color: var(--badge-color, var(--_badge-on));display: inline-flex;font-size: var(--_badge-text);font-weight: var(--badge-font-weight, var(--helix-weight-semibold));inset-block-start: var(--badge-offset, calc(var(--_badge-size) / 4));inset-inline-end: var(--badge-offset, calc(var(--_badge-size) / 4));justify-content: center;line-height: 1;min-inline-size: var(--_badge-size);padding-inline: var(--_badge-inset);pointer-events: none;position: absolute;translate: 50% -50%;white-space: nowrap;}[part="indicator"]:empty {block-size: var(--_badge-dot);min-inline-size: var(--_badge-dot);padding-inline: var(--helix-space-none);}[part="indicator"][data-single] {padding-inline: var(--helix-space-none);}[part="indicator"] {scale: 1;transition:
2
+ export const styles = createSheet(`:host {--_badge-size: var(--helix-size-badge);--_badge-text: var(--helix-text-xs);--_badge-inset: var(--helix-space-2xs);--_badge-dot: var(--helix-space-xs);--_badge-on: var(--helix-color-foreground-on-primary);--_badge-fill: var(--helix-color-primary-surface);display: inline-flex;position: relative;vertical-align: middle;}[part="indicator"] {align-items: center;background-color: var(--badge-background-color, var(--_badge-fill));block-size: var(--_badge-size);border-radius: var(--badge-radius, var(--helix-radii-full));box-shadow: 0 0 0 var(--helix-border-thick) var(--badge-ring-color, var(--helix-color-background));color: var(--badge-color, var(--_badge-on));display: inline-flex;font-size: var(--_badge-text);font-weight: var(--badge-font-weight, var(--helix-weight-semibold));inset-block-start: var(--badge-offset, calc(var(--_badge-size) / 4));inset-inline-end: var(--badge-offset, calc(var(--_badge-size) / 4));justify-content: center;line-height: 1;min-inline-size: var(--_badge-size);padding-inline: var(--_badge-inset);pointer-events: none;position: absolute;translate: 50% -50%;white-space: nowrap;}[part="indicator"][data-dot] {block-size: auto;min-block-size: var(--_badge-dot);min-inline-size: var(--_badge-dot);padding-inline: var(--helix-space-none);}[part="indicator"][data-dot] slot[name="icon"]::slotted(*) {margin: calc(var(--_badge-inset) / 2);}[part="indicator"] {gap: calc(var(--_badge-inset) / 2);}slot[name="icon"]::slotted(*) {--icon-size: var(--badge-icon-size, var(--_badge-text));flex: none;}[part="indicator"][data-single] {padding-inline: var(--helix-space-none);}[part="indicator"] {scale: 1;transition:
3
3
  opacity var(--helix-duration-fast) var(--helix-easing-standard),
4
4
  scale var(--helix-duration-normal) var(--helix-easing-emphasized);}[part="indicator"][data-blank] {opacity: 0;scale: 0;transition:
5
5
  opacity var(--helix-duration-fast) var(--helix-easing-standard),
@@ -25,6 +25,7 @@ import type { CSSResultGroup } from 'lit';
25
25
  * @cssproperty --badge-color - The color of the count, to pair with a fill set through `--badge-background-color`.
26
26
  * @cssproperty --badge-font-weight - The weight of the count.
27
27
  * @cssproperty --badge-gap - The space between the content and the count under `placement="inline"`.
28
+ * @cssproperty --badge-icon-size - The size of an icon in the `icon` slot. The count's own size by default.
28
29
  * @cssproperty --badge-offset - Pulls the mark in from the corner, along both axes.
29
30
  * @cssproperty --badge-radius - How far the indicator's corners are rounded.
30
31
  * @cssproperty --badge-ring-color - The color of the ring between the indicator and what is behind it.
@@ -8,6 +8,7 @@ import { customElement, seriesIndex, seriesNames } from '@fusion.dev/helix-core'
8
8
  import { HelixHeadlessBarChart } from '@fusion.dev/helix-headless/bar-chart';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { styles as seriesStyles } from '../../shared/chart/series.css.js';
11
+ import { styles as statusStyles } from '../../shared/chart/status.css.js';
11
12
  import { styles as tooltipStyles } from '../../shared/chart/tooltip.css.js';
12
13
  import { styles } from './bar-chart-root.css.js';
13
14
  import '../../tooltip/index.js';
@@ -36,7 +37,7 @@ let HelixBarChart = class HelixBarChart extends HelixHeadlessBarChart {
36
37
  mark(bar, 'material', glass.has(at) ? 'glass' : undefined);
37
38
  }
38
39
  }
39
- static { this.styles = [seriesStyles, tooltipStyles, styles]; }
40
+ static { this.styles = [seriesStyles, statusStyles, tooltipStyles, styles]; }
40
41
  };
41
42
  __decorate([
42
43
  property({ reflect: true })
@@ -1,2 +1,3 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {display: block;}[part="figure"] {margin: var(--helix-space-none);}[part="blockquote"] {display: block;margin: var(--helix-space-none);}:host([marks]) [part="blockquote"]::before {color: var(--blockquote-mark-color, var(--helix-color-foreground-subtle));content: open-quote / "";float: inline-start;font-family: var(--blockquote-font-family, var(--helix-font-display));font-size: var(--blockquote-mark-size, var(--helix-text-3xl));line-height: 1;margin-inline-end: var(--helix-space-xs);}:host([marks]) [part="blockquote"]::after {content: no-close-quote;}slot:not([name]) {color: var(--blockquote-color, var(--helix-color-foreground-muted));font-family: var(--blockquote-font-family, var(--helix-font-display));font-size: var(--blockquote-size, var(--helix-text-xl));font-weight: var(--blockquote-font-weight, var(--helix-weight-medium));letter-spacing: var(--blockquote-letter-spacing, var(--helix-tracking-tight));line-height: var(--blockquote-line-height, var(--helix-leading-tight));}slot:not([name])::slotted(*) {margin: var(--helix-space-none);}[part="attribution"] {color: var(--blockquote-attribution-color, var(--helix-color-foreground-muted));font-family: var(--blockquote-attribution-font-family, inherit);font-size: var(--blockquote-attribution-size, var(--helix-text-sm));font-weight: var(--blockquote-attribution-font-weight, inherit);margin-block-start: var(--blockquote-gap, var(--helix-space-sm));}[part="attribution"][data-empty] {display: none;}@media print {:host {print-color-adjust: economy;}}`);
2
+ export const styles = createSheet(`:host {display: block;}[part="figure"] {margin: var(--helix-space-none);}[part="blockquote"] {display: block;margin: var(--helix-space-none);}:host([marks]) [part="blockquote"]::before {color: var(--blockquote-mark-color, var(--helix-color-foreground-subtle));content: open-quote / "";float: inline-start;font-family: var(--blockquote-font-family, var(--helix-font-display));font-size: var(--blockquote-mark-size, var(--helix-text-3xl));line-height: 1;margin-inline-end: var(--helix-space-xs);}:host([marks]) [part="blockquote"]::after {content: no-close-quote;}:host([text-align="start"]) {text-align: start;}:host([text-align="center"]) {text-align: center;}:host([text-align="end"]) {text-align: end;}:host([text-wrap="balance"]) {text-wrap: balance;}:host([text-wrap="pretty"]) {text-wrap: pretty;}:host([marks][text-align="center"]) [part="blockquote"]::before,
3
+ :host([marks][text-align="end"]) [part="blockquote"]::before {display: block;float: none;line-height: 0.75;margin-inline-end: var(--helix-space-none);}slot:not([name]) {color: var(--blockquote-color, var(--helix-color-foreground-muted));font-family: var(--blockquote-font-family, var(--helix-font-display));font-size: var(--blockquote-size, var(--helix-text-xl));font-weight: var(--blockquote-font-weight, var(--helix-weight-medium));letter-spacing: var(--blockquote-letter-spacing, var(--helix-tracking-tight));line-height: var(--blockquote-line-height, var(--helix-leading-tight));}slot:not([name])::slotted(*) {margin: var(--helix-space-none);}[part="attribution"] {color: var(--blockquote-attribution-color, var(--helix-color-foreground-muted));font-family: var(--blockquote-attribution-font-family, inherit);font-size: var(--blockquote-attribution-size, var(--helix-text-sm));font-weight: var(--blockquote-attribution-font-weight, inherit);margin-block-start: var(--blockquote-gap, var(--helix-space-sm));}[part="attribution"][data-empty] {display: none;}@media print {:host {print-color-adjust: economy;}}`);
@@ -9,6 +9,11 @@ import type { CSSResultGroup } from 'lit';
9
9
  * set the passage apart. `marks` draws one large opening mark over the passage,
10
10
  * as a pull quote sets it, in the element's language.
11
11
  *
12
+ * `text-align` sets the passage and its attribution in the middle of the
13
+ * column or against its far edge, as a pull quote often stands. There, the
14
+ * mark `marks` draws stands over the passage rather than beside it.
15
+ * `text-wrap="balance"` evens out a short passage's lines.
16
+ *
12
17
  * @since 0.1.0
13
18
  * @status stable
14
19
  * @category typography
@@ -30,6 +35,28 @@ import type { CSSResultGroup } from 'lit';
30
35
  * @cssproperty --blockquote-size - The font size of the quoted passage.
31
36
  */
32
37
  export declare class HelixBlockquote extends HelixHeadlessBlockquote {
38
+ /**
39
+ * How the passage and its attribution align, set as `text-align`.
40
+ *
41
+ * `center` for a pull quote in the middle of a column and `end` for one
42
+ * against its far edge. Under either, the mark `marks` draws stands over
43
+ * the first line. Absent aligns as the prose around it does.
44
+ *
45
+ * Named for the CSS property it sets, as `Text.textAlign` is: `align` alone
46
+ * is a legacy HTML attribute the browser maps to `text-align` by itself,
47
+ * and it has no `start` or `end`.
48
+ */
49
+ textAlign?: 'start' | 'center' | 'end';
50
+ /**
51
+ * How the passage's lines break, set as `text-wrap`.
52
+ *
53
+ * `balance` evens out the length of every line, which suits a pull quote of
54
+ * a few lines in display type. `pretty` avoids a last line of one short
55
+ * word, for a longer passage. Absent, the lines break as the browser breaks
56
+ * them. The same name and values `Text` takes, but `nowrap`, a passage being
57
+ * more than one line.
58
+ */
59
+ textWrap?: 'balance' | 'pretty';
33
60
  static styles: CSSResultGroup;
34
61
  }
35
62
  declare global {
@@ -6,10 +6,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessBlockquote } from '@fusion.dev/helix-headless/blockquote';
9
+ import { property } from 'lit/decorators.js';
9
10
  import { styles } from './blockquote-root.css.js';
10
11
  let HelixBlockquote = class HelixBlockquote extends HelixHeadlessBlockquote {
11
12
  static { this.styles = styles; }
12
13
  };
14
+ __decorate([
15
+ property({ attribute: 'text-align', reflect: true })
16
+ ], HelixBlockquote.prototype, "textAlign", void 0);
17
+ __decorate([
18
+ property({ attribute: 'text-wrap', reflect: true })
19
+ ], HelixBlockquote.prototype, "textWrap", void 0);
13
20
  HelixBlockquote = __decorate([
14
21
  customElement('helix-blockquote')
15
22
  ], HelixBlockquote);
@@ -4,4 +4,6 @@ var(--card-border-color, var(--helix-color-border));border-radius: var(--card-ra
4
4
  border-color var(--helix-duration-fast) var(--helix-easing-standard),
5
5
  box-shadow var(--helix-duration-fast) var(--helix-easing-standard);}:host([separation="elevated"]) {--card-shadow: var(--helix-shadow-md);border-color: light-dark(transparent, var(--helix-color-border));}:host([separation="filled"]) {--card-shadow: none;border-color: transparent;}:host([separation="plain"]) {--card-shadow: none;background-color: transparent;border-color: transparent;}slot[name="media"]::slotted(*) {block-size: var(--card-media-block-size, auto);display: block;inline-size: calc(100% + var(--_card-inset) * 2);margin: calc(var(--_card-inset) * -1);margin-block-end: 0;object-fit: var(--card-media-fit, cover);}:host([media-placement="end"]) slot[name="media"]::slotted(*) {margin-block-end: calc(var(--_card-inset) * -1);margin-block-start: 0;order: 1;}slot[name="header"]::slotted(*) {color: var(--_heading-ink);}slot[name="footer"]::slotted(*) {justify-self: end;}[part="header-row"],
6
6
  [part="footer-row"] {align-items: center;display: flex;flex-wrap: wrap;gap: var(--card-gap, var(--helix-space-sm));min-inline-size: 0;}[part="header-row"] slot[name="header"]::slotted(*) {flex: 1 1 auto;min-inline-size: 0;}slot[name="header-actions"]::slotted(*),
7
- slot[name="footer-actions"]::slotted(*) {flex: none;justify-self: end;}[part="footer-row"] slot[name="footer-actions"]::slotted(*) {margin-inline-start: auto;}:host([orientation="horizontal"]) {padding-inline-start: calc(var(--_card-media) + var(--_card-inset));position: relative;}:host([orientation="horizontal"]) slot[name="media"]::slotted(*) {block-size: 100%;inline-size: var(--_card-media);inset-block: 0;inset-inline-start: 0;margin: var(--helix-space-none);position: absolute;}@media (prefers-reduced-motion: reduce) {:host {transition: none;}}:host([material="glass"]) {backdrop-filter: var(--card-backdrop, var(--helix-material-backdrop));background-color: var(--card-background-color, var(--helix-material-translucent));}:host([material="frosted"]) {backdrop-filter: var(--card-backdrop, blur(var(--helix-material-blur-lg)));background-color: var(--card-background-color, var(--helix-material-translucent-strong));}:host([material="transparent"]) {backdrop-filter: none;background-color: transparent;}@media print {:host {background-color: transparent;box-shadow: none;}}`);
7
+ slot[name="footer-actions"]::slotted(*) {flex: none;justify-self: end;}[part="footer-row"] slot[name="footer-actions"]::slotted(*) {margin-inline-start: auto;}:host(:not(:defined)) {column-gap: var(--helix-space-none);grid-template-columns: minmax(0, 1fr) auto;}:host(:not(:defined)) slot::slotted(*) {grid-column: 1 / -1;}:host(:not(:defined)) slot[name="header"]::slotted(*),
8
+ :host(:not(:defined)) slot[name="footer"]::slotted(*) {grid-column: 1;}:host(:not(:defined)) slot[name="header-actions"]::slotted(*),
9
+ :host(:not(:defined)) slot[name="footer-actions"]::slotted(*) {align-self: center;grid-column: 2;margin-inline-start: var(--card-gap, var(--helix-space-sm));}:host([orientation="horizontal"]) {padding-inline-start: calc(var(--_card-media) + var(--_card-inset));position: relative;}:host([orientation="horizontal"]) slot[name="media"]::slotted(*) {block-size: 100%;inline-size: var(--_card-media);inset-block: 0;inset-inline-start: 0;margin: var(--helix-space-none);position: absolute;}@media (prefers-reduced-motion: reduce) {:host {transition: none;}}:host([material="glass"]) {backdrop-filter: var(--card-backdrop, var(--helix-material-backdrop));background-color: var(--card-background-color, var(--helix-material-translucent));}:host([material="frosted"]) {backdrop-filter: var(--card-backdrop, blur(var(--helix-material-blur-lg)));background-color: var(--card-background-color, var(--helix-material-translucent-strong));}:host([material="transparent"]) {backdrop-filter: none;background-color: transparent;}@media print {:host {background-color: transparent;box-shadow: none;}}`);
@@ -2,7 +2,7 @@ import { createSheet } from '@fusion.dev/helix-core';
2
2
  export const styles = createSheet(`:host {display: inline;}[part="code"] {background-color: var(
3
3
  --code-background-color,
4
4
  color-mix(in oklab, var(--helix-color-foreground) 6%, transparent)
5
- );border-radius: var(--code-radius, var(--helix-radii-sm));color: var(
5
+ );border-radius: var(--code-radius, var(--helix-radii-sm));-webkit-box-decoration-break: clone;box-decoration-break: clone;color: var(
6
6
  --code-foreground-color,
7
7
  color-mix(in oklab, var(--helix-color-foreground) 30%, var(--helix-color-foreground-muted))
8
- );font-family: var(--code-font-family, var(--helix-font-mono));font-size: var(--code-size, calc(var(--helix-text-sm) / var(--helix-text-md) * 1em));padding-block: var(--helix-space-none);padding-inline: var(--code-padding, calc(var(--helix-space-2xs) * 0.5));}@media print {[part="code"] {background-color: transparent;}}`);
8
+ );font-family: var(--code-font-family, var(--helix-font-mono));font-size: var(--code-size, calc(var(--helix-text-sm) / var(--helix-text-md) * 1em));overflow-wrap: break-word;padding-block: var(--helix-space-none);padding-inline: var(--code-padding, calc(var(--helix-space-2xs) * 0.5));}@media print {[part="code"] {background-color: transparent;}}`);
@@ -11,6 +11,7 @@ import type { CSSResultGroup } from 'lit';
11
11
  * @since 0.1.0
12
12
  * @status stable
13
13
  * @category typography
14
+ * @aliases Inline code
14
15
  * @documentation https://fusion.dev/helix/components/code
15
16
  *
16
17
  * @cssproperty --code-background-color - Fill behind the fragment. Defaults to the
@@ -1,5 +1,8 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {--_code-block-size: var(--code-block-font-size, var(--helix-text-sm));--_code-block-leading: var(--code-block-line-height, var(--helix-leading-normal));--_code-block-face: var(--code-block-font-family, var(--helix-font-mono));--_code-block-copy-inset: calc(var(--helix-space-sm) + (1lh - var(--helix-size-control-sm)) / 2);--_code-block-gutter: calc(var(--helix-size-control-sm) + var(--_code-block-copy-inset) * 2);display: flex;flex-direction: column;}[part="frame"] {flex: 1;}:host(:not([diff])) [part="frame"] {font-size: var(--_code-block-size);line-height: var(--_code-block-leading);}[part="header"] {align-items: center;backdrop-filter: var(--code-block-backdrop, none);background-color: var(--code-block-header-background-color, var(--helix-color-surface-raised));border: var(--helix-border-thin) solid var(--code-block-border-color, var(--helix-color-border));border-end-end-radius: var(--helix-radii-none);border-end-start-radius: var(--helix-radii-none);border-start-end-radius: var(--code-block-radius, var(--helix-radii-lg));border-start-start-radius: var(--code-block-radius, var(--helix-radii-lg));display: flex;gap: var(--helix-space-sm);padding-block: var(--helix-space-xs);padding-inline: var(--helix-space-md);}[part="header"]:has(> [part="copy"]) {padding-block: var(--helix-space-2xs);padding-inline-end: var(--helix-space-2xs);}[part="label"] {color: var(--code-block-label-color, var(--helix-color-foreground-muted));font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);font-weight: var(--helix-weight-medium);min-inline-size: 0;overflow-wrap: anywhere;}[part="frame"] {position: relative;}[part="block"] {block-size: 100%;}[part="copy"] {--icon-button-size: var(--helix-size-control-sm);}[part="header"] > [part="copy"] {margin-inline-start: auto;}[part="frame"] > [part="copy"] {font-size: var(--_code-block-size);inset-block-start: var(--_code-block-copy-inset);inset-inline-end: var(--_code-block-copy-inset);line-height: var(--_code-block-leading);position: absolute;}[part="block"] {backdrop-filter: var(--code-block-backdrop, none);background-color: var(--code-block-background-color, var(--helix-color-background));border: var(--helix-border-thin) solid var(--code-block-border-color, var(--helix-color-border));border-radius: var(--code-block-radius, var(--helix-radii-lg));margin: var(--helix-space-none);overflow-x: auto;padding-block: var(--helix-space-sm);padding-inline: var(--helix-space-md);}:host(:not([diff], [no-copy])) [part="frame"]:not([part="header"] + *) > [part="block"] {padding-inline-end: var(--_code-block-gutter);}[part="header"] + [part="frame"] [part="block"] {border-block-start-width: var(--helix-space-none);border-start-end-radius: var(--helix-radii-none);border-start-start-radius: var(--helix-radii-none);}[part="code"] {color: var(--code-block-color, var(--helix-color-foreground));font-family: var(--_code-block-face);font-size: var(--_code-block-size);line-height: var(--_code-block-leading);}:host(:not([diff])) [part="code"] {display: block;max-block-size: var(--code-block-max-block-size, none);overflow-x: auto;}:host(:state(expanded)) [part="code"] {max-block-size: none;}[part="expand"] {all: unset;box-sizing: border-box;border-radius: var(--helix-radii-sm);color: var(--code-block-expand-color, var(--helix-color-foreground-muted));cursor: pointer;font-size: var(--helix-text-sm);padding: var(--helix-space-xs);}[part="expand"]:hover {color: var(--helix-color-foreground);}[part="expand"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}:host([wrap]:not([diff], [line-numbers])) [part="code"] {overflow-wrap: anywhere;white-space: pre-wrap;}:host([line-numbers]:not([diff])) [part="block"] {column-gap: var(--helix-space-md);display: grid;grid-template-columns: auto minmax(0, 1fr);}[part="gutter"] {color: var(--code-block-gutter-color, var(--helix-color-foreground-subtle));font-family: var(--_code-block-face);font-size: var(--_code-block-size);font-variant-numeric: tabular-nums;line-height: var(--_code-block-leading);text-align: end;user-select: none;}:host([diff]) {gap: var(--helix-space-md);}:host([diff]) [part="file"] {container-type: inline-size;display: flex;flex-direction: column;}:host([diff]) [part="block"],
2
+ export const styles = createSheet(`:host {--_code-block-size: var(--code-block-font-size, var(--helix-text-sm));--_code-block-leading: var(--code-block-line-height, var(--helix-leading-normal));--_code-block-face: var(--code-block-font-family, var(--helix-font-mono));--_code-block-copy-inset: calc(var(--helix-space-sm) + (1lh - var(--helix-size-control-sm)) / 2);--_code-block-gutter: calc(var(--helix-size-control-sm) + var(--_code-block-copy-inset) * 2);display: flex;flex-direction: column;}[part="frame"] {flex: 1;}:host(:not([diff])) [part="frame"] {font-size: var(--_code-block-size);line-height: var(--_code-block-leading);}[part="header"] {align-items: center;backdrop-filter: var(--code-block-backdrop, none);background-color: var(--code-block-header-background-color, var(--helix-color-surface-raised));border: var(--helix-border-thin) solid var(--code-block-border-color, var(--helix-color-border));border-end-end-radius: var(--helix-radii-none);border-end-start-radius: var(--helix-radii-none);border-start-end-radius: var(--code-block-radius, var(--helix-radii-lg));border-start-start-radius: var(--code-block-radius, var(--helix-radii-lg));display: flex;gap: var(--helix-space-sm);padding-block: var(--helix-space-xs);padding-inline: var(--helix-space-md);}[part="header"]:has(> [part="copy"]) {padding-block: var(--helix-space-2xs);padding-inline-end: var(--helix-space-2xs);}[part="label"] {color: var(--code-block-label-color, var(--helix-color-foreground-muted));font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);font-weight: var(--helix-weight-medium);min-inline-size: 0;overflow-wrap: anywhere;}[part="frame"] {position: relative;}[part="block"] {block-size: 100%;}[part="copy"] {--icon-button-size: var(--helix-size-control-sm);}[part="header"] > [part="copy"] {margin-inline-start: auto;}[part="frame"] > [part="copy"] {font-size: var(--_code-block-size);inset-block-start: var(--_code-block-copy-inset);inset-inline-end: var(--_code-block-copy-inset);line-height: var(--_code-block-leading);position: absolute;}[part="block"] {backdrop-filter: var(--code-block-backdrop, none);background-color: var(--code-block-background-color, var(--helix-color-background));border: var(--helix-border-thin) solid var(--code-block-border-color, var(--helix-color-border));border-radius: var(--code-block-radius, var(--helix-radii-lg));margin: var(--helix-space-none);overflow-x: auto;padding-block: var(--helix-space-sm);padding-inline: var(--helix-space-md);}:host(:not([diff], [no-copy])) [part="frame"]:not([part="header"] + *) > [part="block"] {padding-inline-end: var(--_code-block-gutter);}[part="header"] + [part="frame"] [part="block"] {border-block-start-width: var(--helix-space-none);border-start-end-radius: var(--helix-radii-none);border-start-start-radius: var(--helix-radii-none);}[part="code"] {color: var(--code-block-color, var(--helix-color-foreground));font-family: var(--_code-block-face);font-size: var(--_code-block-size);line-height: var(--_code-block-leading);}:host(:not([diff])) [part="code"] {display: block;max-block-size: var(--code-block-max-block-size, none);overflow-x: auto;}:host(:state(expanded)) [part="code"] {max-block-size: none;}[part="expand"] {all: unset;box-sizing: border-box;border-radius: var(--helix-radii-sm);color: var(--code-block-expand-color, var(--helix-color-foreground-muted));cursor: pointer;font-size: var(--helix-text-sm);padding: var(--helix-space-xs);}[part="expand"]:hover {color: var(--helix-color-foreground);}[part="expand"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="block"]:focus-visible,
3
+ [part="code"]:focus-visible,
4
+ [part="old"]:focus-visible,
5
+ [part="new"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1);}:host([wrap]:not([diff], [line-numbers])) [part="code"] {overflow-wrap: anywhere;white-space: pre-wrap;}:host([line-numbers]:not([diff])) [part="block"] {column-gap: var(--helix-space-md);display: grid;grid-template-columns: auto minmax(0, 1fr);}[part="gutter"] {color: var(--code-block-gutter-color, var(--helix-color-foreground-subtle));font-family: var(--_code-block-face);font-size: var(--_code-block-size);font-variant-numeric: tabular-nums;line-height: var(--_code-block-leading);text-align: end;user-select: none;}:host([diff]) {gap: var(--helix-space-md);}:host([diff]) [part="file"] {container-type: inline-size;display: flex;flex-direction: column;}:host([diff]) [part="block"],
3
6
  [part="old"],
4
7
  [part="new"] {backdrop-filter: var(--code-block-backdrop, none);background-color: var(--code-block-background-color, var(--helix-color-background));border: var(--helix-border-thin) solid var(--code-block-border-color, var(--helix-color-border));border-radius: var(--code-block-radius, var(--helix-radii-lg));margin: var(--helix-space-none);min-inline-size: 0;overflow-x: auto;padding-block: var(--helix-space-none) var(--helix-space-sm);padding-inline: var(--helix-space-none);}:host([diff]:not([no-copy]))
5
8
  [part="frame"]:not([part="header"] + *)
@@ -23,6 +23,7 @@ import '../../copy-button/index.js';
23
23
  * @since 0.1.0
24
24
  * @status stable
25
25
  * @category typography
26
+ * @aliases Code block, Snippet, Pre
26
27
  * @documentation https://fusion.dev/helix/components/code-block
27
28
  *
28
29
  * @cssproperty --code-block-added-color - The color a diff's added lines are tinted in and their `+` is drawn in. The success color by default.
@@ -1,2 +1,9 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {block-size: var(--icon-size, var(--helix-size-icon));display: inline-flex;flex: 0 0 auto;inline-size: var(--icon-size, var(--helix-size-icon));}[part="svg"] {block-size: 100%;inline-size: 100%;}@media print {:host {print-color-adjust: economy;}}`);
2
+ export const styles = createSheet(`:host {block-size: var(--icon-size, var(--helix-size-icon));display: inline-flex;flex: 0 0 auto;inline-size: var(--icon-size, var(--helix-size-icon));}[part="svg"] {block-size: 100%;inline-size: 100%;rotate: var(--icon-rotate, none);}:host([auto-width]) {inline-size: auto;}:host([auto-width]) [part="svg"] {inline-size: auto;}:host([rotate="90"]) [part="svg"] {rotate: 90deg;}:host([rotate="180"]) [part="svg"] {rotate: 180deg;}:host([rotate="270"]) [part="svg"] {rotate: 270deg;}:host([flip="x"]) [part="svg"] {transform: scale(-1, 1);}:host([flip="y"]) [part="svg"] {transform: scale(1, -1);}:host([flip="both"]) [part="svg"] {transform: scale(-1, -1);}:host([animation="spin"]) {animation: helix-icon-spin var(--icon-animation-duration, calc(var(--helix-duration-slow) * 3))
3
+ linear infinite;}:host([animation="pulse"]) {animation: helix-icon-pulse var(--icon-animation-duration, calc(var(--helix-duration-slow) * 6))
4
+ ease-in-out infinite;}:host([animation="beat"]) {animation: helix-icon-beat var(--icon-animation-duration, calc(var(--helix-duration-slow) * 3))
5
+ ease-in-out infinite;}@keyframes helix-icon-spin {to {rotate: 1turn;}}@keyframes helix-icon-pulse {50% {opacity: 0.4;}}@keyframes helix-icon-beat {0%,
6
+ 60%,
7
+ 100% {scale: 1;}30% {scale: 1.2;}}@media (prefers-reduced-motion: reduce) {:host([animation="spin"]),
8
+ :host([animation="pulse"]),
9
+ :host([animation="beat"]) {animation: none;}}@media print {:host {print-color-adjust: economy;}}`);
@@ -9,6 +9,13 @@ import type { CSSResultGroup } from 'lit';
9
9
  * Inside a button, `--icon-size` is set in `em`, so the icon scales with the
10
10
  * button.
11
11
  *
12
+ * **The glyph turns, flips and moves inside its own box**, so the line around
13
+ * it keeps its place: `rotate` turns it by a quarter, a half or three
14
+ * quarters, `--icon-rotate` by any angle, `flip` mirrors it across either
15
+ * axis, and `animation` spins, pulses or beats it, as Web Awesome's icon does.
16
+ * Reduced motion stills every animation. `auto-width` gives the box the
17
+ * glyph's own proportions, for a mark wider than it is tall.
18
+ *
12
19
  * @since 0.1.0
13
20
  * @status stable
14
21
  * @category media
@@ -17,9 +24,39 @@ import type { CSSResultGroup } from 'lit';
17
24
  *
18
25
  * @csspart svg - The rendered SVG.
19
26
  *
20
- * @cssproperty --icon-size - The width and height of the icon's box.
27
+ * @cssproperty --icon-animation-duration - How long one turn, pulse or beat of `animation` takes.
28
+ * @cssproperty --icon-rotate - An angle the glyph is turned by, such as `45deg`. `rotate` wins over it.
29
+ * @cssproperty --icon-size - The width and height of the icon's box. The height alone under `auto-width`.
21
30
  */
22
31
  export declare class HelixIcon extends HelixHeadlessIcon {
32
+ /**
33
+ * A motion that draws the eye or says work is going on: `spin` turns the
34
+ * glyph without end, `pulse` fades it in and out, and `beat` swells it.
35
+ *
36
+ * Absent is still. Reduced motion stills every one of them.
37
+ */
38
+ animation?: 'beat' | 'pulse' | 'spin';
39
+ /**
40
+ * Whether the box takes the glyph's own proportions, its height from
41
+ * `--icon-size` and its width from the glyph's box.
42
+ *
43
+ * Absent is a square, which lines icons up in a column.
44
+ */
45
+ autoWidth: boolean;
46
+ /**
47
+ * Mirrors the glyph across an axis: `x` left to right, `y` top to bottom,
48
+ * `both` across both.
49
+ *
50
+ * Absent draws it as it is. On a right-to-left page, `mirror` is the flip
51
+ * that follows the direction.
52
+ */
53
+ flip?: 'both' | 'x' | 'y';
54
+ /**
55
+ * Turns the glyph clockwise by 90, 180 or 270 degrees.
56
+ *
57
+ * Absent draws it upright. `--icon-rotate` turns it by any other angle.
58
+ */
59
+ rotate?: 90 | 180 | 270;
23
60
  static styles: CSSResultGroup;
24
61
  }
25
62
  declare global {
@@ -6,10 +6,27 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessIcon } from '@fusion.dev/helix-headless/icon/root';
9
+ import { property } from 'lit/decorators.js';
9
10
  import { styles } from './icon-root.css.js';
10
11
  let HelixIcon = class HelixIcon extends HelixHeadlessIcon {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.autoWidth = false;
15
+ }
11
16
  static { this.styles = styles; }
12
17
  };
18
+ __decorate([
19
+ property({ reflect: true })
20
+ ], HelixIcon.prototype, "animation", void 0);
21
+ __decorate([
22
+ property({ attribute: 'auto-width', reflect: true, type: Boolean })
23
+ ], HelixIcon.prototype, "autoWidth", void 0);
24
+ __decorate([
25
+ property({ reflect: true })
26
+ ], HelixIcon.prototype, "flip", void 0);
27
+ __decorate([
28
+ property({ reflect: true, type: Number })
29
+ ], HelixIcon.prototype, "rotate", void 0);
13
30
  HelixIcon = __decorate([
14
31
  customElement('helix-icon')
15
32
  ], HelixIcon);
@@ -8,13 +8,20 @@ import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessLineChart } from '@fusion.dev/helix-headless/line-chart';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { styles as seriesStyles } from '../../shared/chart/series.css.js';
11
+ import { styles as statusStyles } from '../../shared/chart/status.css.js';
11
12
  import { styles as terminusStyles } from '../../shared/chart/terminus.css.js';
12
13
  import { styles as tooltipStyles } from '../../shared/chart/tooltip.css.js';
13
14
  import { styles } from './line-chart-root.css.js';
14
15
  import '../../tooltip/index.js';
15
16
  let HelixLineChart = class HelixLineChart extends HelixHeadlessLineChart {
16
17
  static { this.tier = 'helix-'; }
17
- static { this.styles = [seriesStyles, tooltipStyles, terminusStyles, styles]; }
18
+ static { this.styles = [
19
+ seriesStyles,
20
+ statusStyles,
21
+ tooltipStyles,
22
+ terminusStyles,
23
+ styles,
24
+ ]; }
18
25
  };
19
26
  __decorate([
20
27
  property({ reflect: true })
@@ -81,6 +81,12 @@ export declare class HelixOrb extends HelixElement {
81
81
  * Off by default, because the name and the busy state already change with
82
82
  * the state, and an orb beside a stream of messages would otherwise talk
83
83
  * over them. Set it on an orb that is the only sign of progress on the page.
84
+ *
85
+ * **Without it, finishing is silent.** `done` turns the orb into an image
86
+ * named "Done" that is no longer busy, which a screen reader reports when it
87
+ * next reaches the orb and does not say as it happens. A page whose own
88
+ * result arrives in a live region, such as a chat reply, already says the
89
+ * work is done; one that shows nothing else sets `announce`.
84
90
  */
85
91
  announce: boolean;
86
92
  /**
@@ -1,12 +1,21 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {display: block;}:host([show-value]) {align-items: center;column-gap: var(--progress-value-gap, var(--helix-space-sm));display: grid;grid-template-columns: 1fr auto;row-gap: var(--progress-label-gap, var(--helix-space-2xs));}slot[name="label"]::slotted(*) {color: var(--progress-label-color, var(--helix-color-foreground));display: block;font-size: var(--progress-label-size, var(--helix-text-sm));grid-column: 1 / -1;margin-block-end: var(--progress-label-gap, var(--helix-space-2xs));}:host([show-value]) slot[name="label"]::slotted(*) {margin-block-end: 0;}:host([shape="ring"]) slot[name="label"]::slotted(*) {grid-column: 1;margin-block: 0;}[part="value"] {color: var(--progress-value-color, var(--helix-color-foreground-muted));font-family: var(--helix-font-sans);font-size: var(--progress-value-size, var(--helix-text-xs));font-variant-numeric: tabular-nums;min-inline-size: 3ch;text-align: end;}[part="live"] {block-size: 1px;clip-path: inset(50%);inline-size: 1px;margin: var(--helix-space-none);overflow: hidden;position: absolute;white-space: nowrap;}[part="track"] {background-color: var(--progress-track-color, var(--helix-color-surface-sunken));block-size: var(--progress-size, var(--helix-size-progress));border-radius: var(--progress-radius, var(--helix-radii-full));inline-size: 100%;overflow: hidden;}[part="indicator"] {background-color: var(--progress-color, var(--helix-color-primary));block-size: 100%;border-radius: inherit;inline-size: 100%;scale: var(--progress-fraction, 0) 1;transform-origin: left center;transition: scale var(--progress-transition-duration, var(--helix-duration-normal))
2
+ export const styles = createSheet(`:host {display: block;}:host([show-value]) {align-items: center;column-gap: var(--progress-value-gap, var(--helix-space-sm));display: grid;grid-template-columns: 1fr auto;row-gap: var(--progress-label-gap, var(--helix-space-2xs));}slot[name="label"]::slotted(*) {color: var(--progress-label-color, var(--helix-color-foreground));display: block;font-size: var(--progress-label-size, var(--helix-text-sm));grid-column: 1 / -1;margin-block-end: var(--progress-label-gap, var(--helix-space-2xs));}:host([show-value]) slot[name="label"]::slotted(*) {margin-block-end: 0;}:host([shape="ring"]) slot[name="label"]::slotted(*) {grid-column: 1;margin-block: 0;}[part="value"] {color: var(--progress-value-color, var(--helix-color-foreground-muted));font-family: var(--helix-font-sans);font-size: var(--progress-value-size, var(--helix-text-xs));font-variant-numeric: tabular-nums;min-inline-size: 3ch;text-align: end;}[part="live"] {block-size: 1px;clip-path: inset(50%);inline-size: 1px;margin: var(--helix-space-none);overflow: hidden;position: absolute;white-space: nowrap;}[part="track"] {background-color: var(--progress-track-color, var(--helix-color-surface-sunken));min-block-size: var(--progress-size, var(--helix-size-progress));border-radius: var(--progress-radius, var(--helix-radii-full));inline-size: 100%;overflow: hidden;}[part="indicator"] {background-color: var(--progress-color, var(--helix-color-primary));block-size: 100%;border-radius: inherit;inline-size: 100%;scale: var(--progress-fraction, 0) 1;transform-origin: left center;transition: scale var(--progress-transition-duration, var(--helix-duration-normal))
3
3
  var(--helix-easing-decelerate);}:host(:dir(rtl)) [part="indicator"] {transform-origin: right center;}:host([indeterminate]) {--_progress-cycle: calc(var(--helix-duration-slow) * 5);}:host([indeterminate]) [part="indicator"] {animation: helix-progress-indeterminate var(--_progress-cycle) linear infinite;transition: none;}:host([indeterminate]) [part="indicator"] {--_progress-way: 1;}:host([indeterminate]:dir(rtl)) [part="indicator"] {--_progress-way: -1;}@keyframes helix-progress-indeterminate {0% {scale: 0.18 1;translate: calc(-18% * var(--_progress-way, 1));}35% {scale: 0.5 1;translate: calc(12% * var(--_progress-way, 1));}65% {scale: 0.5 1;translate: calc(52% * var(--_progress-way, 1));}100% {scale: 0.18 1;translate: calc(100% * var(--_progress-way, 1));}}@media (prefers-reduced-motion: reduce) {:host([indeterminate]) [part="indicator"] {animation: none;background-image: repeating-linear-gradient(
4
4
  -45deg,
5
5
  var(--helix-color-background) 0 var(--helix-space-xs),
6
6
  transparent var(--helix-space-xs) calc(var(--helix-space-xs) * 2)
7
- );scale: 1 1;translate: 0;}}:host([shape="ring"]) {display: inline-grid;place-items: center;row-gap: var(--progress-label-gap, var(--helix-space-2xs));}:host([shape="ring"]) [part="track"] {--_ring-stroke: var(--progress-ring-width, var(--helix-size-progress));background-color: transparent;block-size: var(--progress-ring-size, 4rem);grid-area: 1 / 1;inline-size: var(--progress-ring-size, 4rem);rotate: -90deg;}:host([shape="ring"]) [part="groove"],
7
+ );scale: 1 1;translate: 0;}}[part="track"] {display: grid;}[part="track"] > * {grid-area: 1 / 1;}[part="content"] {--_progress-over: var(--progress-content-fill-color, var(--helix-color-foreground-on-primary));--_progress-under: var(--progress-content-color, var(--helix-color-foreground));--_progress-split: calc(var(--progress-fraction, 0) * 100%);-webkit-background-clip: text;background-clip: text;background-image: linear-gradient(
8
+ to right,
9
+ var(--_progress-over) var(--_progress-split),
10
+ var(--_progress-under) var(--_progress-split)
11
+ );color: transparent;font-family: var(--helix-font-sans);font-size: var(--progress-content-size, var(--helix-text-xs));font-variant-numeric: tabular-nums;line-height: var(--helix-leading-tight);padding-inline: var(--helix-space-xs);position: relative;white-space: nowrap;}:host(:dir(rtl)) [part="content"] {background-image: linear-gradient(
12
+ to left,
13
+ var(--_progress-over) var(--_progress-split),
14
+ var(--_progress-under) var(--_progress-split)
15
+ );}:host([indeterminate]) [part="content"],
16
+ :host([emphasis="subtle"]) [part="content"] {--_progress-over: var(--_progress-under);}:host([shape="ring"]) {display: inline-grid;place-items: center;row-gap: var(--progress-label-gap, var(--helix-space-2xs));}:host([shape="ring"]) [part="track"] {--_ring-stroke: var(--progress-ring-width, var(--helix-size-progress));background-color: transparent;block-size: var(--progress-ring-size, 4rem);grid-area: 1 / 1;inline-size: var(--progress-ring-size, 4rem);rotate: -90deg;}:host([shape="ring"]) [part="groove"],
8
17
  :host([shape="ring"]) [part="indicator"] {cx: 50%;cy: 50%;fill: none;r: calc(50% - var(--_ring-stroke) / 2);stroke-width: var(--_ring-stroke);}:host([shape="ring"]) [part="groove"] {stroke: var(--progress-track-color, var(--helix-color-surface-sunken));}:host([shape="ring"]) [part="indicator"] {scale: none;stroke: var(--progress-color, var(--helix-color-primary));stroke-dasharray: calc(var(--progress-fraction) * 100) 100;stroke-linecap: round;transition: stroke-dasharray var(--progress-transition-duration, var(--helix-duration-normal))
9
- var(--helix-easing-decelerate);}:host([shape="ring"][show-value]) {gap: var(--helix-space-none);grid-template-columns: auto;}:host([shape="ring"]) [part="value"] {grid-area: 1 / 1;min-inline-size: 0;text-align: center;}:host([shape="ring"][indeterminate]) [part="track"] {animation: helix-progress-ring var(--_progress-cycle) linear infinite;}:host([shape="ring"][indeterminate]) [part="indicator"] {animation: helix-progress-ring-sweep calc(var(--_progress-cycle) * 0.7) ease-in-out infinite;transition: none;}@keyframes helix-progress-ring {from {rotate: -90deg;}to {rotate: 270deg;}}@keyframes helix-progress-ring-sweep {0% {stroke-dasharray: 10 100;stroke-dashoffset: 0;}50% {stroke-dasharray: 70 100;stroke-dashoffset: -25;}100% {stroke-dasharray: 10 100;stroke-dashoffset: -100;}}@media (prefers-reduced-motion: reduce) {:host([shape="ring"]) [part="indicator"] {transition: none;}:host([shape="ring"][indeterminate]) [part="track"] {animation-duration: calc(var(--_progress-cycle) * 12);}:host([shape="ring"][indeterminate]) [part="indicator"] {animation: none;stroke-dasharray: 25 100;}}@media (forced-colors: active) {[part="track"] {outline: var(--helix-border-thin) solid CanvasText;}[part="indicator"] {background-color: Highlight;forced-color-adjust: none;}:host([shape="ring"]) [part="track"] {outline: none;}:host([shape="ring"]) [part="indicator"] {stroke: Highlight;}:host([shape="ring"]) [part="groove"] {stroke: CanvasText;}}@media print {:host {print-color-adjust: exact;}}:host([emphasis="subtle"]) [part="indicator"] {background-color: color-mix(
18
+ var(--helix-easing-decelerate);}:host([shape="ring"][show-value]) {gap: var(--helix-space-none);grid-template-columns: auto;}:host([shape="ring"]) [part="value"] {grid-area: 1 / 1;min-inline-size: 0;text-align: center;}:host([shape="ring"]) [part="content"] {background-image: none;color: var(--progress-content-color, var(--helix-color-foreground));grid-area: 1 / 1;padding-inline: var(--helix-space-none);text-align: center;}:host([shape="ring"][indeterminate]) [part="track"] {animation: helix-progress-ring var(--_progress-cycle) linear infinite;}:host([shape="ring"][indeterminate]) [part="indicator"] {animation: helix-progress-ring-sweep calc(var(--_progress-cycle) * 0.7) ease-in-out infinite;transition: none;}@keyframes helix-progress-ring {from {rotate: -90deg;}to {rotate: 270deg;}}@keyframes helix-progress-ring-sweep {0% {stroke-dasharray: 10 100;stroke-dashoffset: 0;}50% {stroke-dasharray: 70 100;stroke-dashoffset: -25;}100% {stroke-dasharray: 10 100;stroke-dashoffset: -100;}}@media (prefers-reduced-motion: reduce) {:host([shape="ring"]) [part="indicator"] {transition: none;}:host([shape="ring"][indeterminate]) [part="track"] {animation-duration: calc(var(--_progress-cycle) * 12);}:host([shape="ring"][indeterminate]) [part="indicator"] {animation: none;stroke-dasharray: 25 100;}}@media (forced-colors: active) {[part="track"] {outline: var(--helix-border-thin) solid CanvasText;}[part="indicator"] {background-color: Highlight;forced-color-adjust: none;}:host([shape="ring"]) [part="track"] {outline: none;}:host([shape="ring"]) [part="indicator"] {stroke: Highlight;}:host([shape="ring"]) [part="groove"] {stroke: CanvasText;}[part="content"] {--_progress-over: HighlightText;--_progress-under: CanvasText;forced-color-adjust: none;}:host([shape="ring"]) [part="content"] {color: CanvasText;}}@media print {:host {print-color-adjust: exact;}}:host([emphasis="subtle"]) [part="indicator"] {background-color: color-mix(
10
19
  in oklab,
11
20
  var(--progress-color, var(--helix-color-primary)) 30%,
12
21
  var(--progress-track-color, var(--helix-color-surface-sunken))
@@ -18,9 +18,13 @@ import type { CSSResultGroup } from 'lit';
18
18
  * @aliases Progress bar, Loading bar
19
19
  * @documentation https://fusion.dev/helix/components/progress
20
20
  *
21
+ * @slot - Words drawn on the bar, or in the middle of a ring, such as the reading. The bar grows to their height, and over the fill they take the fill's own ink.
21
22
  * @slot label - A visible label, above a bar and under a ring. Its words name it in place of `label`.
22
23
  *
23
24
  * @cssproperty --progress-color - Fill of the part that is done.
25
+ * @cssproperty --progress-content-color - The color of the words of the default slot where they are over the track, and in a ring.
26
+ * @cssproperty --progress-content-fill-color - The color of the words of the default slot where they are over the fill.
27
+ * @cssproperty --progress-content-size - The type size of the words of the default slot.
24
28
  * @cssproperty --progress-label-color - Color of a slotted label.
25
29
  * @cssproperty --progress-label-gap - Space between a slotted label and the bar.
26
30
  * @cssproperty --progress-label-size - Type size of a slotted label.
@@ -1,2 +1,2 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {display: inline;font: inherit;}[part="quote"] {color: var(--quote-color, var(--helix-color-foreground-muted));font: inherit;font-family: var(--quote-font-family, inherit);font-style: var(--quote-font-style, italic);font-weight: var(--quote-font-weight, inherit);}@media print {:host {print-color-adjust: economy;}}`);
2
+ export const styles = createSheet(`:host {display: inline;font: inherit;}[part="quote"] {color: var(--quote-color, var(--helix-color-foreground-muted));font: inherit;font-family: var(--quote-font-family, inherit);font-style: var(--quote-font-style, italic);font-weight: var(--quote-font-weight, inherit);}:host([no-marks]) [part="quote"]::before {content: no-open-quote;}:host([no-marks]) [part="quote"]::after {content: no-close-quote;}@media print {:host {print-color-adjust: economy;}}`);
@@ -7,12 +7,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessScatterChart } from '@fusion.dev/helix-headless/scatter-chart';
9
9
  import { styles as seriesStyles } from '../../shared/chart/series.css.js';
10
+ import { styles as statusStyles } from '../../shared/chart/status.css.js';
10
11
  import { styles as tooltipStyles } from '../../shared/chart/tooltip.css.js';
11
12
  import { styles } from './scatter-chart-root.css.js';
12
13
  import '../../tooltip/index.js';
13
14
  let HelixScatterChart = class HelixScatterChart extends HelixHeadlessScatterChart {
14
15
  static { this.tier = 'helix-'; }
15
- static { this.styles = [seriesStyles, tooltipStyles, styles]; }
16
+ static { this.styles = [seriesStyles, statusStyles, tooltipStyles, styles]; }
16
17
  };
17
18
  HelixScatterChart = __decorate([
18
19
  customElement('helix-scatter-chart')
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,3 @@
1
+ import { createSheet } from '@fusion.dev/helix-core';
2
+ export const styles = createSheet(`[part="empty"],
3
+ [part="loading"] {color: var(--helix-color-foreground-subtle);display: grid;font-family: var(--helix-font-sans);font-size: var(--helix-text-sm);inset: 0;margin: var(--helix-space-none);place-content: center;position: absolute;text-align: center;}`);
@@ -1,20 +1,24 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {display: block;inline-size: 100%;}:host(:not([shape])) {block-size: var(--skeleton-block-size, var(--helix-size-control));}:host([shape="text"]) {block-size: 1em;}:host([shape="circle"]) {aspect-ratio: 1 / 1;inline-size: var(--skeleton-size, var(--helix-size-control));}[part="skeleton"] {background-color: var(
2
+ export const styles = createSheet(`:host {display: block;inline-size: 100%;}:host(:not([shape])) {block-size: var(--skeleton-block-size, var(--helix-size-control));}:host([shape="text"]) {block-size: 1em;}:host([shape="text"][lines]:not([lines="1"]):not([lines="0"])) {block-size: auto;}:host([shape="circle"]) {aspect-ratio: 1 / 1;inline-size: var(--skeleton-size, var(--helix-size-control));}[part~="skeleton"] {background-color: var(
3
3
  --skeleton-color,
4
4
  color-mix(in oklab, var(--helix-color-foreground) 8%, transparent)
5
- );block-size: 100%;border-radius: var(--skeleton-radius, var(--helix-radii-sm));display: block;inline-size: 100%;overflow: hidden;position: relative;}[part="sheen"] {animation: helix-skeleton-sweep var(--skeleton-duration, calc(var(--helix-duration-slow) * 4))
5
+ );block-size: 100%;border-radius: var(--skeleton-radius, var(--helix-radii-sm));display: block;inline-size: 100%;overflow: hidden;position: relative;}[part="lines"] {display: flex;flex-direction: column;gap: calc((var(--helix-leading-normal) - 1) * 1em);}[part~="line"] {block-size: 1em;}[part~="line"]:last-child:not(:first-child) {inline-size: var(--skeleton-last-line-size, 60%);}[part="sheen"] {animation: helix-skeleton-sweep var(--skeleton-duration, calc(var(--helix-duration-slow) * 4))
6
6
  ease-in-out infinite;background-image: linear-gradient(
7
7
  90deg,
8
8
  transparent 0%,
9
9
  var(--skeleton-sheen-color, color-mix(in oklab, var(--helix-color-foreground) 8%, transparent))
10
10
  50%,
11
11
  transparent 100%
12
- );display: block;inline-size: 200%;inset-block: 0;inset-inline-start: 0;position: absolute;}:host([shape="text"]) [part="skeleton"] {border-radius: var(--helix-radii-full);}:host([shape="circle"]) [part="skeleton"] {border-radius: var(--helix-radii-full);}:host([effect="pulse"]) [part="sheen"],
13
- :host([effect="none"]) [part="sheen"] {animation: none;background-image: none;}:host([effect="pulse"]) [part="skeleton"] {animation: helix-skeleton-pulse var(--skeleton-duration, calc(var(--helix-duration-slow) * 4))
12
+ );display: block;inline-size: 200%;inset-block: 0;inset-inline-start: 0;position: absolute;}:host([shape="text"]) [part~="skeleton"] {border-radius: var(--helix-radii-full);}:host([shape="circle"]) [part="skeleton"] {border-radius: var(--helix-radii-full);}:host([effect="pulse"]) [part="sheen"],
13
+ :host([effect="none"]) [part="sheen"] {animation: none;background-image: none;}:host([effect="pulse"]) [part~="skeleton"] {animation: helix-skeleton-pulse var(--skeleton-duration, calc(var(--helix-duration-slow) * 4))
14
14
  ease-in-out infinite;}@keyframes helix-skeleton-pulse {50% {opacity: 0.4;}}:host(:state(wrapping)),
15
15
  :host(:not(:defined):not(:empty)) {block-size: auto;inline-size: fit-content;max-inline-size: 100%;position: relative;}:host(:state(wrapping)) [part="content"],
16
16
  :host(:not(:defined):not(:empty)) [part="content"] {display: block;}:host(:state(wrapping)) [part="skeleton"],
17
- :host(:not(:defined):not(:empty)) [part="skeleton"] {block-size: auto;inset: 0;position: absolute;}:host(:state(wrapping):not([loading])) [part="skeleton"],
18
- :host(:not(:defined):not(:empty):not([loading])) [part="skeleton"] {display: none;}:host([loading]:state(wrapping)) [part="content"],
17
+ :host(:not(:defined):not(:empty)) [part="skeleton"],
18
+ :host(:state(wrapping)) [part="lines"],
19
+ :host(:not(:defined):not(:empty)) [part="lines"] {block-size: auto;inset: 0;position: absolute;}:host(:state(wrapping):not([loading])) [part="skeleton"],
20
+ :host(:not(:defined):not(:empty):not([loading])) [part="skeleton"],
21
+ :host(:state(wrapping):not([loading])) [part="lines"],
22
+ :host(:not(:defined):not(:empty):not([loading])) [part="lines"] {display: none;}:host([loading]:state(wrapping)) [part="content"],
19
23
  :host([loading]:not(:defined):not(:empty)) [part="content"] {visibility: hidden;}@keyframes helix-skeleton-sweep {from {translate: -50% 0;}to {translate: 50% 0;}}@media (prefers-reduced-motion: reduce) {[part="sheen"],
20
- :host([effect="pulse"]) [part="skeleton"] {animation: none;}[part="sheen"] {background-image: none;}}@media print {:host {display: none;}}`);
24
+ :host([effect="pulse"]) [part~="skeleton"] {animation: none;}[part="sheen"] {background-image: none;}}@media print {:host {display: none;}}`);
@@ -1,5 +1,5 @@
1
1
  import { HelixHeadlessSkeleton } from '@fusion.dev/helix-headless/skeleton';
2
- import type { CSSResultGroup } from 'lit';
2
+ import { type CSSResultGroup, type TemplateResult } from 'lit';
3
3
  /**
4
4
  * @summary A placeholder shown in place of content that is still loading.
5
5
  *
@@ -11,6 +11,11 @@ import type { CSSResultGroup } from 'lit';
11
11
  * Around content with `loading`, the skeleton takes the content's box and
12
12
  * paints over it, and the content is hidden until `loading` is taken off.
13
13
  *
14
+ * **`lines` draws a paragraph.** With `shape="text"` and `lines="3"`, one
15
+ * element stands in for three lines of text: each line a `skeleton` part one
16
+ * `em` tall, spaced a body line height apart, and the last one shorter, as the end
17
+ * of a paragraph is.
18
+ *
14
19
  * @since 0.1.0
15
20
  * @status stable
16
21
  * @category feedback
@@ -18,12 +23,15 @@ import type { CSSResultGroup } from 'lit';
18
23
  * @documentation https://fusion.dev/helix/components/skeleton
19
24
  *
20
25
  * @csspart content - The box around the content, hidden while `loading`.
26
+ * @csspart line - Each line of a `lines` paragraph, which is also a `skeleton` part.
27
+ * @csspart lines - The column holding a `lines` paragraph, drawn only for `shape="text"` with two or more lines.
21
28
  * @csspart sheen - The highlight swept across the shape. Hidden for `effect="pulse"` and `effect="none"`.
22
- * @csspart skeleton - The placeholder shape.
29
+ * @csspart skeleton - The placeholder shape, or each line of a `lines` paragraph.
23
30
  *
24
31
  * @cssproperty --skeleton-block-size - The height of the block shape, which is the shape when `shape` is unset. Defaults to the control height.
25
32
  * @cssproperty --skeleton-color - The placeholder's fill.
26
33
  * @cssproperty --skeleton-duration - How long one sweep or one pulse takes.
34
+ * @cssproperty --skeleton-last-line-size - The width of the last line of a `lines` paragraph. Defaults to 60%.
27
35
  * @cssproperty --skeleton-radius - The corner of the block shape.
28
36
  * @cssproperty --skeleton-sheen-color - The highlight the sweep carries across the fill.
29
37
  * @cssproperty --skeleton-size - The diameter of the circle shape.
@@ -36,6 +44,13 @@ export declare class HelixSkeleton extends HelixHeadlessSkeleton {
36
44
  * Reduced motion stills both.
37
45
  */
38
46
  effect?: 'none' | 'pulse';
47
+ /**
48
+ * How many lines of text the placeholder stands for, with `shape="text"`.
49
+ *
50
+ * Absent, or 1, is one line. Reflected, because the stylesheet sizes a
51
+ * paragraph by it.
52
+ */
53
+ lines?: number;
39
54
  /**
40
55
  * The shape of the placeholder: `text`, `circle`, or a block when unset.
41
56
  *
@@ -45,6 +60,7 @@ export declare class HelixSkeleton extends HelixHeadlessSkeleton {
45
60
  */
46
61
  shape?: 'text' | 'circle';
47
62
  static styles: CSSResultGroup;
63
+ protected renderShape(): TemplateResult;
48
64
  }
49
65
  declare global {
50
66
  interface HTMLElementTagNameMap {
@@ -6,14 +6,25 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessSkeleton } from '@fusion.dev/helix-headless/skeleton';
9
+ import { html } from 'lit';
9
10
  import { property } from 'lit/decorators.js';
10
11
  import { styles } from './skeleton-root.css.js';
11
12
  let HelixSkeleton = class HelixSkeleton extends HelixHeadlessSkeleton {
12
13
  static { this.styles = styles; }
14
+ renderShape() {
15
+ const count = Math.floor(this.lines ?? 1);
16
+ if (this.shape !== 'text' || !(count > 1)) {
17
+ return super.renderShape();
18
+ }
19
+ return html `<span part="lines">${Array.from({ length: count }, () => html `<span part="skeleton line"><span part="sheen"></span></span>`)}</span>`;
20
+ }
13
21
  };
14
22
  __decorate([
15
23
  property({ reflect: true })
16
24
  ], HelixSkeleton.prototype, "effect", void 0);
25
+ __decorate([
26
+ property({ reflect: true, type: Number })
27
+ ], HelixSkeleton.prototype, "lines", void 0);
17
28
  __decorate([
18
29
  property({ reflect: true })
19
30
  ], HelixSkeleton.prototype, "shape", void 0);
@@ -1,4 +1,4 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {align-content: start;align-items: baseline;display: grid;gap: var(--stat-gap, var(--helix-space-2xs));grid-template-columns: auto 1fr;}slot[name="label"]::slotted(*) {color: var(--stat-label-color, var(--helix-color-foreground-muted));font-size: var(--stat-label-size, calc(var(--helix-text-xs) / var(--helix-text-md) * 1em));font-weight: var(--helix-weight-medium);grid-column: 1 / -1;letter-spacing: var(--helix-tracking-wide);}slot:not([name]) {color: var(--stat-value-color, var(--helix-color-foreground));font-family: var(--helix-font-display);font-size: var(--stat-value-size, calc(var(--helix-text-3xl) / var(--helix-text-md) * 1em));font-weight: var(--helix-weight-semibold);letter-spacing: var(--helix-tracking-tight);line-height: var(--helix-leading-tight);}slot[name="unit"]::slotted(*) {color: var(--stat-unit-color, var(--helix-color-foreground-muted));font-size: var(--stat-unit-size, calc(var(--helix-text-md) / var(--helix-text-md) * 1em));font-weight: var(--helix-weight-medium);}slot[name="trend"]::slotted(*) {grid-column: 1 / -1;}:host([direction="column-reverse"]) slot[name="label"]::slotted(*) {order: 1;}:host([direction="row"]),
2
+ export const styles = createSheet(`:host {align-content: start;align-items: baseline;display: grid;gap: var(--stat-gap, var(--helix-space-2xs));grid-template-columns: auto 1fr;}slot[name="label"]::slotted(*) {color: var(--stat-label-color, var(--helix-color-foreground-muted));font-size: var(--stat-label-size, calc(var(--helix-text-xs) / var(--helix-text-md) * 1em));font-weight: var(--helix-weight-medium);grid-column: 1 / -1;letter-spacing: var(--helix-tracking-wide);}[part="value"] {color: var(--stat-value-color, var(--helix-color-foreground));font-family: var(--helix-font-display);font-size: var(--stat-value-size, calc(var(--helix-text-3xl) / var(--helix-text-md) * 1em));font-weight: var(--helix-weight-semibold);letter-spacing: var(--helix-tracking-tight);line-height: var(--helix-leading-tight);}slot[name="unit"]::slotted(*) {color: var(--stat-unit-color, var(--helix-color-foreground-muted));font-size: var(--stat-unit-size, calc(var(--helix-text-md) / var(--helix-text-md) * 1em));font-weight: var(--helix-weight-medium);}slot[name="trend"]::slotted(*) {grid-column: 1 / -1;}:host([direction="column-reverse"]) slot[name="label"]::slotted(*) {order: 1;}:host([direction="row"]),
3
3
  :host([direction="row-reverse"]) {align-items: baseline;display: flex;gap: var(--stat-gap, var(--helix-space-xs));}:host([direction="row"]) slot[name="label"]::slotted(*),
4
4
  :host([direction="row-reverse"]) slot[name="label"]::slotted(*) {grid-column: auto;}:host([direction="row-reverse"]) slot[name="label"] {order: 1;}@media print {:host {print-color-adjust: economy;}}`);