@fusion.dev/helix 0.143.0 → 0.144.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 (105) hide show
  1. package/custom-elements.json +10028 -511
  2. package/dist/badge/root/badge-root.css.js +35 -0
  3. package/dist/badge/root/badge-root.d.ts +16 -0
  4. package/dist/badge/root/badge-root.js +3 -0
  5. package/dist/blockquote/root/blockquote-root.css.js +5 -5
  6. package/dist/blockquote/root/blockquote-root.d.ts +5 -0
  7. package/dist/button/root/button-root.css.js +38 -1
  8. package/dist/button/root/button-root.d.ts +5 -0
  9. package/dist/button/root/button-root.js +2 -1
  10. package/dist/callout/root/callout-root.css.js +69 -11
  11. package/dist/callout/root/callout-root.d.ts +25 -2
  12. package/dist/callout/root/callout-root.js +4 -0
  13. package/dist/card/root/card-root.css.js +26 -1
  14. package/dist/card/root/card-root.d.ts +11 -0
  15. package/dist/checkbox-group/root/checkbox-group-root.d.ts +2 -0
  16. package/dist/checkbox-group/root/checkbox-group-root.js +2 -0
  17. package/dist/code-block/root/code-block-root.css.js +23 -0
  18. package/dist/code-block/root/code-block-root.d.ts +15 -0
  19. package/dist/code-block/root/code-block-root.js +8 -0
  20. package/dist/color-picker/root/color-picker-root.css.js +64 -0
  21. package/dist/color-picker/root/color-picker-root.d.ts +2 -0
  22. package/dist/copy-button/root/copy-button-root.css.js +5 -0
  23. package/dist/date-input/root/date-input-root.css.js +19 -0
  24. package/dist/date-input/root/date-input-root.d.ts +8 -0
  25. package/dist/date-input/root/date-input-root.js +2 -0
  26. package/dist/date-picker/root/date-picker-root.css.js +68 -0
  27. package/dist/date-picker/root/date-picker-root.d.ts +1 -0
  28. package/dist/dialog/root/dialog-root.css.js +47 -0
  29. package/dist/divider/root/divider-root.css.js +8 -3
  30. package/dist/divider/root/divider-root.d.ts +17 -1
  31. package/dist/divider/root/divider-root.js +4 -0
  32. package/dist/drawer/root/drawer-root.css.js +28 -1
  33. package/dist/element-events.generated.js +8 -5
  34. package/dist/empty/root/empty-root.css.js +9 -9
  35. package/dist/empty/root/empty-root.d.ts +9 -0
  36. package/dist/file-input/root/file-input-root.js +2 -0
  37. package/dist/filter-input/root/filter-input-root.js +2 -0
  38. package/dist/heatmap/root/heatmap-root.css.js +33 -5
  39. package/dist/heatmap/root/heatmap-root.d.ts +4 -1
  40. package/dist/icon/index.d.ts +1 -0
  41. package/dist/icon/index.js +1 -0
  42. package/dist/icon/root/icon-root.d.ts +1 -1
  43. package/dist/icon/root/icon-root.js +1 -1
  44. package/dist/icon/root/index.d.ts +2 -0
  45. package/dist/icon/root/index.js +2 -0
  46. package/dist/icon-button/root/icon-button-root.css.js +37 -0
  47. package/dist/icon-button/root/icon-button-root.d.ts +4 -0
  48. package/dist/icon-button/root/icon-button-root.js +2 -1
  49. package/dist/input/root/input-root.css.js +3 -3
  50. package/dist/input/root/input-root.d.ts +3 -0
  51. package/dist/legend/root/legend-root.css.js +40 -13
  52. package/dist/legend/root/legend-root.d.ts +6 -0
  53. package/dist/legend/root/legend-root.js +1 -1
  54. package/dist/lightbox/root/lightbox-root.css.js +84 -0
  55. package/dist/lightbox/root/lightbox-root.d.ts +1 -0
  56. package/dist/loader/root/loader-root.css.js +10 -0
  57. package/dist/loader/root/loader-root.d.ts +3 -0
  58. package/dist/meter/root/meter-root.css.js +23 -1
  59. package/dist/meter/root/meter-root.d.ts +5 -0
  60. package/dist/notifications/notification/notification.css.js +5 -0
  61. package/dist/number-input/root/number-input-root.css.js +3 -3
  62. package/dist/number-input/root/number-input-root.d.ts +3 -0
  63. package/dist/pin-input/root/pin-input-root.css.js +12 -5
  64. package/dist/pin-input/root/pin-input-root.d.ts +5 -0
  65. package/dist/popover/root/popover-root.css.js +36 -0
  66. package/dist/popover/root/popover-root.d.ts +1 -0
  67. package/dist/progress/root/progress-root.css.js +22 -1
  68. package/dist/progress/root/progress-root.d.ts +5 -0
  69. package/dist/quote/root/quote-root.css.js +1 -1
  70. package/dist/quote/root/quote-root.d.ts +1 -0
  71. package/dist/shared/chart/tooltip.css.js +25 -2
  72. package/dist/shared/field/field-segments.css.d.ts +1 -0
  73. package/dist/shared/field/field-segments.css.js +40 -0
  74. package/dist/skeleton/root/skeleton-root.css.js +56 -5
  75. package/dist/skeleton/root/skeleton-root.d.ts +17 -1
  76. package/dist/skeleton/root/skeleton-root.js +3 -0
  77. package/dist/stat/root/stat-root.css.js +7 -7
  78. package/dist/stat/root/stat-root.d.ts +8 -0
  79. package/dist/switch/root/switch-root.css.js +13 -5
  80. package/dist/switch/root/switch-root.d.ts +25 -1
  81. package/dist/switch/root/switch-root.js +7 -0
  82. package/dist/tag/group/tag-group.css.d.ts +1 -0
  83. package/dist/tag/group/tag-group.css.js +6 -0
  84. package/dist/tag/group/tag-group.d.ts +25 -0
  85. package/dist/tag/group/tag-group.js +16 -0
  86. package/dist/tag/index.d.ts +1 -0
  87. package/dist/tag/index.js +1 -0
  88. package/dist/tag/root/tag-root.css.js +50 -0
  89. package/dist/tag/root/tag-root.d.ts +4 -0
  90. package/dist/textarea/root/textarea-root.css.js +12 -4
  91. package/dist/textarea/root/textarea-root.d.ts +4 -0
  92. package/dist/time-input/root/time-input-root.css.js +19 -0
  93. package/dist/time-input/root/time-input-root.d.ts +8 -0
  94. package/dist/time-input/root/time-input-root.js +2 -0
  95. package/dist/toast/item/toast-item.css.js +16 -0
  96. package/dist/toggle/group/toggle-group.css.js +16 -0
  97. package/dist/tour/root/tour-root.css.js +8 -0
  98. package/dist/tour/stop/tour-stop.css.js +32 -0
  99. package/dist/trend/root/trend-root.css.js +12 -5
  100. package/dist/trend/root/trend-root.d.ts +6 -1
  101. package/lint.json +1 -1
  102. package/package.json +6 -6
  103. package/types/jsx.d.ts +4556 -111
  104. package/types/svelte.d.ts +1 -0
  105. package/types/vue.d.ts +1307 -24
@@ -1 +1,2 @@
1
+ export { registerIconLibrary, registerIcons, resolveIcon, } from '@fusion.dev/helix-headless/icon';
1
2
  export * from './root/icon-root.js';
@@ -1,4 +1,4 @@
1
- import { HelixHeadlessIcon } from '@fusion.dev/helix-headless/icon';
1
+ import { HelixHeadlessIcon } from '@fusion.dev/helix-headless/icon/root';
2
2
  import type { CSSResultGroup } from 'lit';
3
3
  /**
4
4
  * @summary A named icon from the Helix set.
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
- import { HelixHeadlessIcon } from '@fusion.dev/helix-headless/icon';
8
+ import { HelixHeadlessIcon } from '@fusion.dev/helix-headless/icon/root';
9
9
  import { styles } from './icon-root.css.js';
10
10
  let HelixIcon = class HelixIcon extends HelixHeadlessIcon {
11
11
  static { this.styles = styles; }
@@ -0,0 +1,2 @@
1
+ export { type IconResolver, registerIconLibrary, registerIcons, resolveIcon, } from '@fusion.dev/helix-headless/icon/root';
2
+ export * from './icon-root.js';
@@ -0,0 +1,2 @@
1
+ export { registerIconLibrary, registerIcons, resolveIcon, } from '@fusion.dev/helix-headless/icon/root';
2
+ export * from './icon-root.js';
@@ -6,6 +6,8 @@ display: inline-flex;
6
6
 
7
7
  :host {
8
8
  --_icon-button-edge: var(--helix-color-border);
9
+
10
+ --_icon-button-turn: 0.8s;
9
11
  --_icon-button-ink: var(--helix-color-foreground-muted);
10
12
  --_icon-button-ink-hover: var(--helix-color-foreground);
11
13
 
@@ -177,6 +179,41 @@ cursor: not-allowed;
177
179
  opacity: 0.5;
178
180
  }
179
181
 
182
+ :host(:state(pending)) [part="button"] {
183
+ cursor: progress;
184
+ position: relative;
185
+ }
186
+
187
+ :host(:state(pending)) [part="button"] > * {
188
+ visibility: hidden;
189
+ }
190
+
191
+ :host(:state(pending)) [part="button"]::after {
192
+ animation: helix-icon-button-turn var(--_icon-button-turn) linear infinite;
193
+ block-size: var(--icon-button-spinner-size, 1.15em);
194
+ border: var(--helix-border-thick) solid color-mix(in oklab, currentColor 30%, transparent);
195
+ border-block-start-color: currentColor;
196
+ border-radius: var(--helix-radii-full);
197
+ box-sizing: border-box;
198
+ content: "";
199
+ inline-size: var(--icon-button-spinner-size, 1.15em);
200
+ inset: 0;
201
+ margin: auto;
202
+ position: absolute;
203
+ }
204
+
205
+ @keyframes helix-icon-button-turn {
206
+ to {
207
+ rotate: 1turn;
208
+ }
209
+ }
210
+
211
+ @media (prefers-reduced-motion: reduce) {
212
+ :host(:state(pending)) [part="button"]::after {
213
+ animation-duration: calc(var(--helix-duration-slow) * 12);
214
+ }
215
+ }
216
+
180
217
  @media print {
181
218
  :host {
182
219
  display: none;
@@ -22,6 +22,7 @@ declare const HelixIconButton_base: (new (...args: any[]) => import("../../share
22
22
  * @slot - The icon.
23
23
  *
24
24
  * @csspart button - The inner button.
25
+ * @csspart live - The live region that says `pending-label` when the button becomes pending under focus. It is clipped out of view and still read.
25
26
  *
26
27
  * @cssproperty --icon-button-background-color - Fill behind the button, in every state.
27
28
  * @cssproperty --icon-button-background-color-hover - Fill behind the button under the pointer. Without it, `--icon-button-background-color` also applies on hover.
@@ -29,6 +30,9 @@ declare const HelixIconButton_base: (new (...args: any[]) => import("../../share
29
30
  * @cssproperty --icon-button-radius - Corner radius of the control, which a group flattens through `--button-radius-start` and `--button-radius-end`.
30
31
  * @cssproperty --icon-button-shadow - Shadow of a raised icon button.
31
32
  * @cssproperty --icon-button-size - Edge length of the control.
33
+ * @cssproperty --icon-button-spinner-size - Size of the ring a pending button turns.
34
+ *
35
+ * @cssstate pending - The button is pending: `pending` is set. A ring turns over its hidden icon.
32
36
  */
33
37
  export declare class HelixIconButton extends HelixIconButton_base {
34
38
  /**
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessIconButton } from '@fusion.dev/helix-headless/icon-button';
9
9
  import { property } from 'lit/decorators.js';
10
+ import { styles as liveStyles } from '../../shared/live/live.css.js';
10
11
  import { MixinControlSurface } from '../../shared/mixin-control-surface/mixin-control-surface.js';
11
12
  import { styles } from './icon-button-root.css.js';
12
13
  let HelixIconButton = class HelixIconButton extends MixinControlSurface(HelixHeadlessIconButton) {
@@ -14,7 +15,7 @@ let HelixIconButton = class HelixIconButton extends MixinControlSurface(HelixHea
14
15
  super(...arguments);
15
16
  this.raised = false;
16
17
  }
17
- static { this.styles = styles; }
18
+ static { this.styles = [liveStyles, styles]; }
18
19
  };
19
20
  __decorate([
20
21
  property({ reflect: true, type: Boolean })
@@ -7,12 +7,12 @@ export const styles = createSheet(`:host {
7
7
  align-items: center;
8
8
  background-color: var(--input-background-color, var(--helix-color-well));
9
9
  block-size: var(--_input-size);
10
- border: var(--helix-border-thin) solid var(--helix-color-border);
11
- border-radius: var(--helix-radii-sm);
10
+ border: var(--helix-border-thin) solid var(--input-border-color, var(--helix-color-border));
11
+ border-radius: var(--input-radius, var(--helix-radii-sm));
12
12
  color: var(--helix-color-foreground-subtle);
13
13
  display: flex;
14
14
  gap: var(--helix-space-2xs);
15
- padding-inline: var(--helix-space-xs);
15
+ padding-inline: var(--input-padding-inline, var(--helix-space-xs));
16
16
  transition:
17
17
  border-color var(--helix-duration-fast) var(--helix-easing-standard),
18
18
  background-color var(--helix-duration-fast) var(--helix-easing-standard);
@@ -23,6 +23,9 @@ import type { CSSResultGroup } from 'lit';
23
23
  * @documentation https://fusion.dev/helix/components/input
24
24
  *
25
25
  * @cssproperty --input-background-color - Fill behind the text.
26
+ * @cssproperty --input-border-color - Edge of the field at rest. Hover, focus and an error still draw their own.
27
+ * @cssproperty --input-padding-inline - Space between the edge of the field and what is inside it.
28
+ * @cssproperty --input-radius - Corner radius of the field.
26
29
  * @cssproperty --input-size - Height of the field.
27
30
  */
28
31
  export declare class HelixInput extends HelixHeadlessInput {
@@ -14,12 +14,12 @@ margin: var(--helix-space-none);
14
14
  padding: var(--helix-space-none);
15
15
  }
16
16
 
17
- [part="entry"] {
17
+ [part~="entry"] {
18
18
  align-items: center;
19
19
  color: var(--helix-color-foreground-muted);
20
20
  display: flex;
21
21
  font-size: var(--helix-text-sm);
22
- gap: var(--helix-space-2xs);
22
+ gap: var(--legend-entry-gap, var(--helix-space-2xs));
23
23
  line-height: var(--helix-leading-tight);
24
24
  }
25
25
 
@@ -28,23 +28,23 @@ line-height: var(--helix-leading-tight);
28
28
  flex-direction: column;
29
29
  }
30
30
 
31
- :host([placement="end"]) [part="entry"] {
31
+ :host([placement="end"]) [part~="entry"] {
32
32
  flex-direction: row-reverse;
33
33
  text-align: end;
34
34
  }
35
35
 
36
- [part="entry"]::before {
36
+ [part~="entry"]::before {
37
37
  --_legend-shade: color-mix(in oklab, var(--chart-series) 60%, var(--helix-color-background));
38
38
 
39
39
  block-size: var(--legend-swatch-size, var(--helix-space-sm));
40
40
 
41
- border-radius: var(--helix-radii-sm);
41
+ border-radius: var(--legend-swatch-radius, var(--helix-radii-sm));
42
42
  content: "";
43
43
  flex: 0 0 auto;
44
44
  inline-size: var(--legend-swatch-size, var(--helix-space-sm));
45
45
  }
46
46
 
47
- [part="entry"]::before {
47
+ [part~="entry"]::before {
48
48
  background-color: color-mix(
49
49
  in oklab,
50
50
  var(--chart-series) calc(var(--_legend-area, 1) * var(--_legend-through, 1) * 100%),
@@ -52,8 +52,8 @@ transparent
52
52
  );
53
53
  }
54
54
 
55
- [part="entry"][data-emphasis="outlined"]::before,
56
- :host([emphasis="outlined"]) [part="entry"]:not([data-emphasis])::before {
55
+ [part~="entry"][data-emphasis="outlined"]::before,
56
+ :host([emphasis="outlined"]) [part~="entry"]:not([data-emphasis])::before {
57
57
  background-color: color-mix(
58
58
  in oklab,
59
59
  var(--_legend-shade) calc(var(--_legend-through, 1) * 100%),
@@ -63,22 +63,49 @@ border: var(--legend-swatch-stroke, var(--helix-border-thick)) solid
63
63
  color-mix(in oklab, var(--chart-series) calc(var(--_legend-through, 1) * 100%), transparent);
64
64
  }
65
65
 
66
- [part="entry"][data-emphasis="subtle"]::before,
67
- :host([emphasis="subtle"]) [part="entry"]:not([data-emphasis])::before {
66
+ [part~="entry"][data-emphasis="subtle"]::before,
67
+ :host([emphasis="subtle"]) [part~="entry"]:not([data-emphasis])::before {
68
68
  --_legend-area: 0.2;
69
69
  border: var(--legend-swatch-stroke, var(--helix-border-thick)) solid
70
70
  color-mix(in oklab, var(--chart-series) calc(var(--_legend-through, 1) * 100%), transparent);
71
71
  }
72
72
 
73
- [part="entry"][data-material="glass"]::before,
74
- :host([material="glass"]) [part="entry"]:not([data-material])::before {
73
+ [part~="entry"][data-material="glass"]::before,
74
+ :host([material="glass"]) [part~="entry"]:not([data-material])::before {
75
75
  --_legend-through: calc(0.62 * var(--helix-material-opacity));
76
76
  }
77
77
 
78
- :host([material="frosted"]) [part="entry"]:not([data-material])::before {
78
+ :host([material="frosted"]) [part~="entry"]:not([data-material])::before {
79
79
  --_legend-through: calc(0.88 * var(--helix-material-opacity));
80
80
  }
81
81
 
82
+ [part="toggle"] {
83
+ all: unset;
84
+ box-sizing: border-box;
85
+ border-radius: var(--helix-radii-sm);
86
+ cursor: pointer;
87
+ }
88
+
89
+ [part="toggle"]:focus-visible {
90
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
91
+ outline-offset: var(--helix-size-focus-offset);
92
+ }
93
+
94
+ @media (hover: hover) {
95
+ [part="toggle"]:hover {
96
+ color: var(--helix-color-foreground);
97
+ }
98
+ }
99
+
100
+ [part~="entry-hidden"] {
101
+ opacity: var(--legend-hidden-opacity, 0.56);
102
+ }
103
+
104
+ [part~="entry-hidden"]::before {
105
+ background-color: transparent;
106
+ border: var(--legend-swatch-stroke, var(--helix-border-thick)) solid var(--chart-series);
107
+ }
108
+
82
109
  @media print {
83
110
  :host {
84
111
  print-color-adjust: economy;
@@ -14,6 +14,9 @@ import type { CSSResultGroup, PropertyValues } from 'lit';
14
14
  * put a color in the headless tier. Charts and legends share the file, so both
15
15
  * use the same twenty-four color names.
16
16
  *
17
+ * Under `toggles`, each name is a button. A hidden series' entry fades and
18
+ * its swatch empties to an outline, so the color stays readable.
19
+ *
17
20
  * @since 0.1.0
18
21
  * @status stable
19
22
  * @category charts
@@ -22,7 +25,10 @@ import type { CSSResultGroup, PropertyValues } from 'lit';
22
25
  * @documentation https://fusion.dev/helix/components/legend
23
26
  *
24
27
  * @cssproperty --legend-direction - The direction the entries run: `row`, which wraps, or `column`.
28
+ * @cssproperty --legend-entry-gap - The space between a swatch and its name.
25
29
  * @cssproperty --legend-gap - The space between entries.
30
+ * @cssproperty --legend-hidden-opacity - How strongly a hidden series' entry is drawn, under `toggles`.
31
+ * @cssproperty --legend-swatch-radius - The corner of the color swatch.
26
32
  * @cssproperty --legend-swatch-size - The size of the color swatch.
27
33
  * @cssproperty --legend-swatch-stroke - The width of the edge an `outlined` or
28
34
  * `subtle` swatch is drawn with.
@@ -29,7 +29,7 @@ let HelixLegend = class HelixLegend extends HelixHeadlessLegend {
29
29
  const outlined = slots(this.outlined);
30
30
  const subtle = slots(this.subtle);
31
31
  const glass = slots(this.glass);
32
- const entries = [...this.renderRoot.querySelectorAll('[part="entry"]')];
32
+ const entries = [...this.renderRoot.querySelectorAll('[part~="entry"]')];
33
33
  for (const [at, entry] of entries.entries()) {
34
34
  mark(entry, 'emphasis', outlined.has(at) ? 'outlined' : subtle.has(at) ? 'subtle' : undefined);
35
35
  mark(entry, 'material', glass.has(at) ? 'glass' : undefined);
@@ -17,6 +17,8 @@ inline-size: 100vw;
17
17
  max-block-size: 100dvh;
18
18
  max-inline-size: 100vw;
19
19
  padding: var(--lightbox-padding, var(--helix-space-md));
20
+
21
+ touch-action: pan-y pinch-zoom;
20
22
  }
21
23
 
22
24
  [part="dialog"]:focus-visible {
@@ -64,6 +66,88 @@ transition: none;
64
66
  }
65
67
  }
66
68
 
69
+ [part="previous"],
70
+ [part="next"],
71
+ [part="dismiss"] {
72
+ all: unset;
73
+
74
+ box-sizing: border-box;
75
+ align-items: center;
76
+ background-color: var(--helix-color-surface-overlay);
77
+ block-size: var(--lightbox-control-size, var(--helix-size-control));
78
+ border-radius: var(--helix-radii-full);
79
+ box-shadow: var(--helix-shadow-md);
80
+ color: var(--lightbox-foreground, var(--helix-color-foreground));
81
+ cursor: pointer;
82
+ display: inline-flex;
83
+ inline-size: var(--lightbox-control-size, var(--helix-size-control));
84
+ justify-content: center;
85
+ position: absolute;
86
+ transition:
87
+ opacity var(--helix-duration-fast) var(--helix-easing-standard),
88
+ visibility var(--helix-duration-fast) var(--helix-easing-standard);
89
+ }
90
+
91
+ [part="previous"],
92
+ [part="next"] {
93
+ inset-block-start: 50%;
94
+ translate: 0 -50%;
95
+ }
96
+
97
+ [part="previous"] {
98
+ inset-inline-start: var(--lightbox-padding, var(--helix-space-md));
99
+ }
100
+
101
+ [part="next"] {
102
+ inset-inline-end: var(--lightbox-padding, var(--helix-space-md));
103
+ }
104
+
105
+ [part="dismiss"] {
106
+ inset-block-start: var(--lightbox-padding, var(--helix-space-md));
107
+ inset-inline-end: var(--lightbox-padding, var(--helix-space-md));
108
+ }
109
+
110
+ [part="previous"] svg,
111
+ [part="next"] svg,
112
+ [part="dismiss"] svg {
113
+ block-size: var(--helix-size-icon);
114
+ inline-size: var(--helix-size-icon);
115
+ }
116
+
117
+ [part="previous"]:hover,
118
+ [part="next"]:hover,
119
+ [part="dismiss"]:hover {
120
+ background-color: var(--helix-color-surface-sunken);
121
+ }
122
+
123
+ [part="previous"]:focus-visible,
124
+ [part="next"]:focus-visible,
125
+ [part="dismiss"]:focus-visible {
126
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
127
+ outline-offset: var(--helix-size-focus-offset);
128
+ }
129
+
130
+ [part="previous"][aria-disabled="true"],
131
+ [part="next"][aria-disabled="true"] {
132
+ cursor: default;
133
+ opacity: 0.4;
134
+ }
135
+
136
+ :host(:state(idle)) [part="previous"],
137
+ :host(:state(idle)) [part="next"],
138
+ :host(:state(idle)) [part="dismiss"] {
139
+ opacity: 0;
140
+ visibility: hidden;
141
+ }
142
+
143
+ @media (prefers-reduced-motion: reduce) {
144
+ [part="previous"],
145
+ [part="next"],
146
+ [part="dismiss"] {
147
+ transition: none;
148
+ }
149
+ }
150
+
67
151
  @media print {
68
152
  :host {
69
153
  display: none;
@@ -23,6 +23,7 @@ import type { CSSResultGroup } from 'lit';
23
23
  *
24
24
  * @event {HelixActivateEvent} helix-activate - Fired after the shown item changes, when the element already holds the new item.
25
25
  *
26
+ * @cssproperty --lightbox-control-size - Size of the previous, next and close controls drawn with `controls`.
26
27
  * @cssproperty --lightbox-foreground - Color of the controls and text drawn over the content.
27
28
  * @cssproperty --lightbox-gap - Space between the header or footer and the content.
28
29
  * @cssproperty --lightbox-padding - Inset from the edges of the screen.
@@ -155,6 +155,16 @@ opacity: 1;
155
155
  }
156
156
  }
157
157
 
158
+ [part="svg"][hidden] {
159
+ display: inline;
160
+ visibility: hidden;
161
+ }
162
+
163
+ [part="mark"][hidden] {
164
+ display: flex;
165
+ visibility: hidden;
166
+ }
167
+
158
168
  @media print {
159
169
  :host {
160
170
  display: none;
@@ -10,6 +10,9 @@ import type { CSSResultGroup } from 'lit';
10
10
  * `currentColor`, so it matches the text color around it, including inside a
11
11
  * primary button.
12
12
  *
13
+ * While `delay` runs, the loader keeps its size and draws nothing, so the line
14
+ * it sits in does not move when it appears.
15
+ *
13
16
  * @since 0.1.0
14
17
  * @status stable
15
18
  * @category feedback
@@ -5,9 +5,30 @@ display: block;
5
5
 
6
6
  :host([show-value]) {
7
7
  align-items: center;
8
+ column-gap: var(--helix-space-sm);
8
9
  display: grid;
9
- gap: var(--helix-space-sm);
10
10
  grid-template-columns: 1fr auto;
11
+
12
+ row-gap: var(--meter-label-gap, var(--helix-space-2xs));
13
+ }
14
+
15
+ slot[name="label"]::slotted(*) {
16
+ color: var(--meter-label-color, var(--helix-color-foreground));
17
+ display: block;
18
+ font-size: var(--meter-label-size, var(--helix-text-sm));
19
+ grid-column: 1 / -1;
20
+ margin-block-end: var(--meter-label-gap, var(--helix-space-2xs));
21
+ }
22
+
23
+ :host([show-value]) slot[name="label"]::slotted(*) {
24
+ margin-block-end: 0;
25
+ }
26
+
27
+ :host([shape="arc"]) slot[name="label"]::slotted(*),
28
+ :host([shape="ring"]) slot[name="label"]::slotted(*) {
29
+
30
+ grid-column: 1;
31
+ margin-block: 0;
11
32
  }
12
33
 
13
34
  [part="value"] {
@@ -88,6 +109,7 @@ z-index: var(--helix-layer-raised);
88
109
  :host([shape="ring"]) {
89
110
  display: inline-grid;
90
111
  place-items: center;
112
+ row-gap: var(--meter-label-gap, var(--helix-space-2xs));
91
113
  }
92
114
 
93
115
  :host([shape="arc"]) [part="track"],
@@ -29,6 +29,8 @@ import type { CSSResultGroup } from 'lit';
29
29
  * @aliases Gauge, Level, Capacity
30
30
  * @documentation https://fusion.dev/helix/components/meter
31
31
  *
32
+ * @slot label - A visible label, above a bar and under a ring or an arc. Its words name it in place of `label`.
33
+ *
32
34
  * @csspart indicator - The part of the track the value fills.
33
35
  * @csspart indicator-fair - The fill while the reading is in a band next to the good band. Set alongside `indicator`.
34
36
  * @csspart indicator-good - The fill while the reading is in the good band. Set alongside `indicator`.
@@ -40,6 +42,9 @@ import type { CSSResultGroup } from 'lit';
40
42
  * @csspart value - The reading as text, shown when `show-value` is set.
41
43
  *
42
44
  * @cssproperty --meter-color - The fill color. Overrides the band's tone.
45
+ * @cssproperty --meter-label-color - The color of a slotted label.
46
+ * @cssproperty --meter-label-gap - The space between a slotted label and the meter.
47
+ * @cssproperty --meter-label-size - The type size of a slotted label.
43
48
  * @cssproperty --meter-ring-size - The width and height of the drawing in `ring` and `arc`.
44
49
  * @cssproperty --meter-ring-width - The thickness of the stroke in `ring` and `arc`.
45
50
  * @cssproperty --meter-size - The thickness of the bar.
@@ -241,6 +241,11 @@ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
241
241
  outline-offset: var(--helix-size-focus-offset);
242
242
  }
243
243
 
244
+ [part="item"]:focus-visible {
245
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
246
+ outline-offset: calc(var(--helix-size-focus-offset) * -1);
247
+ }
248
+
244
249
  @media print {
245
250
  [part="dismiss"] {
246
251
  display: none;
@@ -2,9 +2,9 @@ import { createSheet } from '@fusion.dev/helix-core';
2
2
  export const styles = createSheet(`[part="field"] {
3
3
  align-items: center;
4
4
  background-color: var(--number-input-background-color, var(--helix-color-well));
5
- block-size: var(--helix-size-control);
6
- border: var(--helix-border-thin) solid var(--helix-color-border);
7
- border-radius: var(--helix-radii-sm);
5
+ block-size: var(--number-input-size, var(--helix-size-control));
6
+ border: var(--helix-border-thin) solid var(--number-input-border-color, var(--helix-color-border));
7
+ border-radius: var(--number-input-radius, var(--helix-radii-sm));
8
8
  box-sizing: border-box;
9
9
  display: flex;
10
10
 
@@ -33,6 +33,9 @@ import type { CSSResultGroup } from 'lit';
33
33
  * @csspart increment - The button that steps the value up.
34
34
  *
35
35
  * @cssproperty --number-input-background-color - The fill behind the number.
36
+ * @cssproperty --number-input-border-color - Edge of the field at rest. Hover, focus and an error still draw their own.
37
+ * @cssproperty --number-input-radius - Corner radius of the field.
38
+ * @cssproperty --number-input-size - Height of the field.
36
39
  */
37
40
  export declare class HelixNumberInput extends HelixHeadlessNumberInput {
38
41
  static styles: CSSResultGroup;
@@ -13,10 +13,11 @@ gap: var(--pin-input-gap, var(--helix-space-xs));
13
13
 
14
14
  [part="cell"] {
15
15
  all: unset;
16
- background-color: var(--helix-color-well);
17
- block-size: var(--helix-size-control);
18
- border: var(--helix-border-thin) solid var(--helix-color-border);
19
- border-radius: var(--helix-radii-sm);
16
+ background-color: var(--pin-input-cell-background-color, var(--helix-color-well));
17
+ block-size: var(--pin-input-cell-size, var(--helix-size-control));
18
+ border: var(--helix-border-thin) solid
19
+ var(--pin-input-cell-border-color, var(--helix-color-border));
20
+ border-radius: var(--pin-input-cell-radius, var(--helix-radii-sm));
20
21
  box-sizing: border-box;
21
22
  color: var(--helix-color-foreground);
22
23
  font-family: var(--helix-font-sans);
@@ -24,7 +25,7 @@ font-size: var(--helix-text-lg);
24
25
 
25
26
  font-variant-numeric: tabular-nums;
26
27
  font-weight: var(--helix-weight-medium);
27
- inline-size: var(--helix-size-control);
28
+ inline-size: var(--pin-input-cell-size, var(--helix-size-control));
28
29
  text-align: center;
29
30
  transition: border-color var(--helix-duration-fast) var(--helix-easing-standard);
30
31
  }
@@ -56,6 +57,12 @@ background-color: transparent;
56
57
  font-size: var(--helix-text-xl);
57
58
  }
58
59
 
60
+ [part="separator"] {
61
+ align-self: center;
62
+ color: var(--helix-color-foreground-muted);
63
+ font-size: var(--helix-text-lg);
64
+ }
65
+
59
66
  [part="cell"]::placeholder {
60
67
  color: var(--helix-color-foreground-subtle);
61
68
  }
@@ -21,7 +21,12 @@ import type { CSSResultGroup } from 'lit';
21
21
  *
22
22
  * @csspart cell - One box.
23
23
  * @csspart field - The row of boxes.
24
+ * @csspart separator - The text `format` draws between two boxes.
24
25
  *
26
+ * @cssproperty --pin-input-cell-background-color - Fill behind each box.
27
+ * @cssproperty --pin-input-cell-border-color - Edge of each box at rest. Hover, focus and an error still draw their own.
28
+ * @cssproperty --pin-input-cell-radius - Corner radius of each box.
29
+ * @cssproperty --pin-input-cell-size - Width and height of each box.
25
30
  * @cssproperty --pin-input-gap - The space between one box and the next.
26
31
  */
27
32
  export declare class HelixPinInput extends HelixHeadlessPinInput {
@@ -11,6 +11,9 @@ background-color: var(--helix-color-surface-overlay);
11
11
  border: var(--popover-border-width, var(--helix-border-floating)) solid
12
12
  var(--popover-border-color, var(--helix-color-border));
13
13
 
14
+ --_popover-edge: var(--popover-border-width, var(--helix-border-floating)) solid
15
+ var(--popover-border-color, var(--helix-color-border));
16
+
14
17
  border-radius: var(--helix-radii-sm);
15
18
  box-shadow: var(--popover-shadow, var(--helix-shadow-floating));
16
19
  box-sizing: border-box;
@@ -89,6 +92,39 @@ padding: var(--popover-padding, var(--helix-space-md));
89
92
  padding: var(--popover-padding, var(--helix-space-none));
90
93
  }
91
94
 
95
+ [part="popover"]:focus,
96
+ [part="popover"]:focus-visible {
97
+ outline: none;
98
+ }
99
+
100
+ [part~="arrow"] {
101
+ background-color: var(--helix-color-surface-overlay);
102
+ block-size: var(--popover-arrow-size, 0.5rem);
103
+ inline-size: var(--popover-arrow-size, 0.5rem);
104
+ position: absolute;
105
+ rotate: 45deg;
106
+ }
107
+
108
+ [part="popover"][data-placement^="bottom"] [part~="arrow"] {
109
+ border-left: var(--_popover-edge);
110
+ border-top: var(--_popover-edge);
111
+ }
112
+
113
+ [part="popover"][data-placement^="top"] [part~="arrow"] {
114
+ border-bottom: var(--_popover-edge);
115
+ border-right: var(--_popover-edge);
116
+ }
117
+
118
+ [part="popover"][data-placement^="right"] [part~="arrow"] {
119
+ border-bottom: var(--_popover-edge);
120
+ border-left: var(--_popover-edge);
121
+ }
122
+
123
+ [part="popover"][data-placement^="left"] [part~="arrow"] {
124
+ border-right: var(--_popover-edge);
125
+ border-top: var(--_popover-edge);
126
+ }
127
+
92
128
  @media print {
93
129
  :host {
94
130
  display: none;
@@ -18,6 +18,7 @@ import type { CSSResultGroup } from 'lit';
18
18
  * @aliases Popper, Flyout, Overlay
19
19
  * @documentation https://fusion.dev/helix/components/popover
20
20
  *
21
+ * @cssproperty --popover-arrow-size - Size of the point drawn with `arrow`. Tooltip's point is the same size.
21
22
  * @cssproperty --popover-border-color - Color of the panel's edge.
22
23
  * @cssproperty --popover-border-width - Width of the panel's edge. Defaults to
23
24
  * `--helix-border-floating`, which is `0`, so the panel stands out by its shadow unless
@@ -5,9 +5,29 @@ display: block;
5
5
 
6
6
  :host([show-value]) {
7
7
  align-items: center;
8
+ column-gap: var(--helix-space-sm);
8
9
  display: grid;
9
- gap: var(--helix-space-sm);
10
10
  grid-template-columns: 1fr auto;
11
+
12
+ row-gap: var(--progress-label-gap, var(--helix-space-2xs));
13
+ }
14
+
15
+ slot[name="label"]::slotted(*) {
16
+ color: var(--progress-label-color, var(--helix-color-foreground));
17
+ display: block;
18
+ font-size: var(--progress-label-size, var(--helix-text-sm));
19
+ grid-column: 1 / -1;
20
+ margin-block-end: var(--progress-label-gap, var(--helix-space-2xs));
21
+ }
22
+
23
+ :host([show-value]) slot[name="label"]::slotted(*) {
24
+ margin-block-end: 0;
25
+ }
26
+
27
+ :host([shape="ring"]) slot[name="label"]::slotted(*) {
28
+
29
+ grid-column: 1;
30
+ margin-block: 0;
11
31
  }
12
32
 
13
33
  [part="value"] {
@@ -98,6 +118,7 @@ translate: 0;
98
118
  :host([shape="ring"]) {
99
119
  display: inline-grid;
100
120
  place-items: center;
121
+ row-gap: var(--progress-label-gap, var(--helix-space-2xs));
101
122
  }
102
123
 
103
124
  :host([shape="ring"]) [part="track"] {