@fusion.dev/helix 0.143.0 → 0.145.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 (211) hide show
  1. package/custom-elements.json +19817 -1238
  2. package/dist/accordion/item/accordion-item.css.js +14 -3
  3. package/dist/accordion/item/accordion-item.d.ts +2 -0
  4. package/dist/aura/palette.d.ts +38 -0
  5. package/dist/aura/palette.js +22 -0
  6. package/dist/aura/root/aura-root.css.js +24 -3
  7. package/dist/aura/root/aura-root.d.ts +42 -7
  8. package/dist/aura/root/aura-root.js +31 -25
  9. package/dist/badge/root/badge-root.css.js +35 -0
  10. package/dist/badge/root/badge-root.d.ts +16 -0
  11. package/dist/badge/root/badge-root.js +3 -0
  12. package/dist/blockquote/root/blockquote-root.css.js +5 -5
  13. package/dist/blockquote/root/blockquote-root.d.ts +5 -0
  14. package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +7 -7
  15. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +5 -0
  16. package/dist/breadcrumbs/root/breadcrumbs-root.css.js +1 -1
  17. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +3 -0
  18. package/dist/breadcrumbs/root/breadcrumbs-root.js +2 -0
  19. package/dist/button/root/button-root.css.js +38 -1
  20. package/dist/button/root/button-root.d.ts +5 -0
  21. package/dist/button/root/button-root.js +2 -1
  22. package/dist/button-group/root/button-group-root.d.ts +3 -0
  23. package/dist/callout/root/callout-root.css.js +69 -11
  24. package/dist/callout/root/callout-root.d.ts +25 -2
  25. package/dist/callout/root/callout-root.js +4 -0
  26. package/dist/canvas/root/canvas-root.css.js +1 -0
  27. package/dist/card/root/card-root.css.js +26 -1
  28. package/dist/card/root/card-root.d.ts +11 -0
  29. package/dist/carousel/root/carousel-root.css.js +17 -1
  30. package/dist/checkbox-group/root/checkbox-group-root.d.ts +2 -0
  31. package/dist/checkbox-group/root/checkbox-group-root.js +2 -0
  32. package/dist/code-block/root/code-block-root.css.js +23 -0
  33. package/dist/code-block/root/code-block-root.d.ts +15 -0
  34. package/dist/code-block/root/code-block-root.js +8 -0
  35. package/dist/color-picker/root/color-picker-root.css.js +64 -0
  36. package/dist/color-picker/root/color-picker-root.d.ts +2 -0
  37. package/dist/copy-button/root/copy-button-root.css.js +5 -0
  38. package/dist/data-table/root/data-table-root.css.js +63 -0
  39. package/dist/data-table/root/data-table-root.d.ts +1 -0
  40. package/dist/date-input/root/date-input-root.css.js +19 -0
  41. package/dist/date-input/root/date-input-root.d.ts +8 -0
  42. package/dist/date-input/root/date-input-root.js +2 -0
  43. package/dist/date-picker/root/date-picker-root.css.js +68 -0
  44. package/dist/date-picker/root/date-picker-root.d.ts +1 -0
  45. package/dist/description-list/item/description-list-item.css.js +11 -0
  46. package/dist/dialog/root/dialog-root.css.js +47 -0
  47. package/dist/divider/root/divider-root.css.js +8 -3
  48. package/dist/divider/root/divider-root.d.ts +17 -1
  49. package/dist/divider/root/divider-root.js +4 -0
  50. package/dist/drawer/root/drawer-root.css.js +28 -1
  51. package/dist/drilldown/item/drilldown-item.css.js +2 -1
  52. package/dist/drilldown/root/drilldown-root.css.js +2 -1
  53. package/dist/element-events.generated.js +66 -14
  54. package/dist/empty/root/empty-root.css.js +9 -9
  55. package/dist/empty/root/empty-root.d.ts +9 -0
  56. package/dist/file-input/root/file-input-root.js +2 -0
  57. package/dist/filter-input/root/filter-input-root.js +2 -0
  58. package/dist/flex/root/flex-root.css.js +134 -9
  59. package/dist/flex/root/flex-root.d.ts +51 -5
  60. package/dist/flex/root/flex-root.js +17 -1
  61. package/dist/grid/root/grid-root.css.js +114 -11
  62. package/dist/grid/root/grid-root.d.ts +37 -0
  63. package/dist/grid/root/grid-root.js +13 -1
  64. package/dist/heatmap/root/heatmap-root.css.js +33 -5
  65. package/dist/heatmap/root/heatmap-root.d.ts +4 -1
  66. package/dist/icon/index.d.ts +1 -0
  67. package/dist/icon/index.js +1 -0
  68. package/dist/icon/root/icon-root.d.ts +1 -1
  69. package/dist/icon/root/icon-root.js +1 -1
  70. package/dist/icon/root/index.d.ts +2 -0
  71. package/dist/icon/root/index.js +2 -0
  72. package/dist/icon-button/root/icon-button-root.css.js +37 -0
  73. package/dist/icon-button/root/icon-button-root.d.ts +4 -0
  74. package/dist/icon-button/root/icon-button-root.js +2 -1
  75. package/dist/input/root/input-root.css.js +3 -3
  76. package/dist/input/root/input-root.d.ts +3 -0
  77. package/dist/legend/root/legend-root.css.js +40 -13
  78. package/dist/legend/root/legend-root.d.ts +6 -0
  79. package/dist/legend/root/legend-root.js +1 -1
  80. package/dist/lightbox/root/lightbox-root.css.js +84 -0
  81. package/dist/lightbox/root/lightbox-root.d.ts +1 -0
  82. package/dist/list/item/list-item.css.js +21 -1
  83. package/dist/list/item/list-item.d.ts +3 -0
  84. package/dist/list/root/list-root.css.js +13 -1
  85. package/dist/loader/root/loader-root.css.js +10 -0
  86. package/dist/loader/root/loader-root.d.ts +3 -0
  87. package/dist/menu/index.d.ts +1 -0
  88. package/dist/menu/index.js +1 -0
  89. package/dist/menu/item/menu-item.css.js +15 -1
  90. package/dist/menu/item/menu-item.d.ts +3 -0
  91. package/dist/menu/item/menu-item.js +2 -0
  92. package/dist/menu/section/menu-section.css.d.ts +1 -0
  93. package/dist/menu/section/menu-section.css.js +14 -0
  94. package/dist/menu/section/menu-section.d.ts +24 -0
  95. package/dist/menu/section/menu-section.js +16 -0
  96. package/dist/meter/root/meter-root.css.js +23 -1
  97. package/dist/meter/root/meter-root.d.ts +5 -0
  98. package/dist/navigation/root/navigation-root.css.js +3 -2
  99. package/dist/navigation/root/navigation-root.d.ts +6 -0
  100. package/dist/notifications/notification/notification.css.js +5 -0
  101. package/dist/notifications/root/notifications-root.css.js +24 -1
  102. package/dist/notifications/root/notifications-root.d.ts +1 -0
  103. package/dist/number-input/root/number-input-root.css.js +3 -3
  104. package/dist/number-input/root/number-input-root.d.ts +3 -0
  105. package/dist/object-inspector/root/object-inspector-root.css.js +36 -1
  106. package/dist/object-inspector/root/object-inspector-root.d.ts +4 -1
  107. package/dist/object-inspector/root/object-inspector-root.js +2 -1
  108. package/dist/orb/index.d.ts +1 -1
  109. package/dist/orb/index.js +1 -1
  110. package/dist/orb/root/orb-root.d.ts +31 -5
  111. package/dist/orb/root/orb-root.js +33 -4
  112. package/dist/outline/root/outline-root.css.js +10 -0
  113. package/dist/outline/root/outline-root.d.ts +7 -0
  114. package/dist/pin-input/root/pin-input-root.css.js +12 -5
  115. package/dist/pin-input/root/pin-input-root.d.ts +5 -0
  116. package/dist/popover/root/popover-root.css.js +36 -0
  117. package/dist/popover/root/popover-root.d.ts +1 -0
  118. package/dist/progress/root/progress-root.css.js +22 -1
  119. package/dist/progress/root/progress-root.d.ts +5 -0
  120. package/dist/quote/root/quote-root.css.js +1 -1
  121. package/dist/quote/root/quote-root.d.ts +1 -0
  122. package/dist/sandbox/frame.d.ts +63 -0
  123. package/dist/sandbox/frame.js +132 -0
  124. package/dist/sandbox/index.d.ts +1 -0
  125. package/dist/sandbox/index.js +1 -0
  126. package/dist/sandbox/levels.d.ts +10 -0
  127. package/dist/sandbox/levels.js +5 -0
  128. package/dist/sandbox/root/sandbox-root.d.ts +3 -0
  129. package/dist/sandbox/root/sandbox-root.js +13 -3
  130. package/dist/sandbox/source/sandbox-source.d.ts +1 -0
  131. package/dist/sandbox/source/sandbox-source.js +7 -3
  132. package/dist/sandbox/terminal/sandbox-terminal.css.js +39 -0
  133. package/dist/sandbox/terminal/sandbox-terminal.d.ts +42 -1
  134. package/dist/sandbox/terminal/sandbox-terminal.js +47 -3
  135. package/dist/scroll-area/root/scroll-area-root.css.js +83 -1
  136. package/dist/scroll-area/root/scroll-area-root.d.ts +6 -0
  137. package/dist/shared/chart/tooltip.css.js +25 -2
  138. package/dist/shared/field/field-segments.css.d.ts +1 -0
  139. package/dist/shared/field/field-segments.css.js +40 -0
  140. package/dist/skeleton/root/skeleton-root.css.js +56 -5
  141. package/dist/skeleton/root/skeleton-root.d.ts +17 -1
  142. package/dist/skeleton/root/skeleton-root.js +3 -0
  143. package/dist/skip-link/root/skip-link-root.css.js +8 -8
  144. package/dist/skip-link/root/skip-link-root.d.ts +9 -0
  145. package/dist/speed-dial/item/speed-dial-item.css.js +11 -4
  146. package/dist/speed-dial/item/speed-dial-item.d.ts +4 -0
  147. package/dist/speed-dial/root/speed-dial-root.css.js +7 -3
  148. package/dist/speed-dial/root/speed-dial-root.d.ts +9 -0
  149. package/dist/speed-dial/root/speed-dial-root.js +4 -0
  150. package/dist/stat/root/stat-root.css.js +7 -7
  151. package/dist/stat/root/stat-root.d.ts +8 -0
  152. package/dist/steps/step/step.js +2 -1
  153. package/dist/switch/root/switch-root.css.js +13 -5
  154. package/dist/switch/root/switch-root.d.ts +25 -1
  155. package/dist/switch/root/switch-root.js +7 -0
  156. package/dist/table/root/table-root.css.js +18 -0
  157. package/dist/table/root/table-root.d.ts +6 -0
  158. package/dist/table/root/table-root.js +2 -0
  159. package/dist/table/row/table-row.css.js +18 -0
  160. package/dist/table/row/table-row.d.ts +2 -0
  161. package/dist/table/row/table-row.js +2 -0
  162. package/dist/tabs/panel/tab-panel.css.js +5 -1
  163. package/dist/tabs/root/tabs-root.css.js +56 -1
  164. package/dist/tabs/tab/tab.css.js +5 -1
  165. package/dist/tag/group/tag-group.css.d.ts +1 -0
  166. package/dist/tag/group/tag-group.css.js +6 -0
  167. package/dist/tag/group/tag-group.d.ts +25 -0
  168. package/dist/tag/group/tag-group.js +16 -0
  169. package/dist/tag/index.d.ts +1 -0
  170. package/dist/tag/index.js +1 -0
  171. package/dist/tag/root/tag-root.css.js +50 -0
  172. package/dist/tag/root/tag-root.d.ts +4 -0
  173. package/dist/text/clamp.d.ts +8 -0
  174. package/dist/text/clamp.js +1 -0
  175. package/dist/text/root/text-root.css.js +85 -45
  176. package/dist/text/root/text-root.d.ts +48 -7
  177. package/dist/text/root/text-root.js +17 -11
  178. package/dist/textarea/root/textarea-root.css.js +12 -4
  179. package/dist/textarea/root/textarea-root.d.ts +4 -0
  180. package/dist/time-input/root/time-input-root.css.js +19 -0
  181. package/dist/time-input/root/time-input-root.d.ts +8 -0
  182. package/dist/time-input/root/time-input-root.js +2 -0
  183. package/dist/timeline/group/timeline-group.css.d.ts +1 -0
  184. package/dist/timeline/group/timeline-group.css.js +32 -0
  185. package/dist/timeline/group/timeline-group.d.ts +25 -0
  186. package/dist/timeline/group/timeline-group.js +16 -0
  187. package/dist/timeline/index.d.ts +1 -0
  188. package/dist/timeline/index.js +1 -0
  189. package/dist/timeline/item/timeline-item.css.js +43 -16
  190. package/dist/timeline/root/timeline-root.css.js +56 -0
  191. package/dist/timeline/root/timeline-root.d.ts +26 -0
  192. package/dist/timeline/root/timeline-root.js +7 -0
  193. package/dist/toast/item/toast-item.css.js +16 -0
  194. package/dist/toggle/group/toggle-group.css.js +16 -0
  195. package/dist/toolbar/root/toolbar-root.css.js +3 -0
  196. package/dist/toolbar/root/toolbar-root.d.ts +3 -0
  197. package/dist/tour/root/tour-root.css.js +8 -0
  198. package/dist/tour/stop/tour-stop.css.js +32 -0
  199. package/dist/tree/item/tree-item.css.js +72 -0
  200. package/dist/tree/item/tree-item.d.ts +10 -0
  201. package/dist/trend/root/trend-root.css.js +12 -5
  202. package/dist/trend/root/trend-root.d.ts +6 -1
  203. package/dist/video/root/video-root.css.js +6 -0
  204. package/dist/video/root/video-root.d.ts +3 -0
  205. package/dist/virtual-list/root/virtual-list-root.css.js +5 -0
  206. package/dist/virtual-list/root/virtual-list-root.d.ts +4 -3
  207. package/lint.json +1 -1
  208. package/package.json +6 -6
  209. package/types/jsx.d.ts +8620 -813
  210. package/types/svelte.d.ts +3 -0
  211. package/types/vue.d.ts +2372 -213
@@ -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.
@@ -3,7 +3,7 @@ export const styles = createSheet(`:host {
3
3
  display: block;
4
4
  }
5
5
 
6
- [part="row"] {
6
+ [part~="row"] {
7
7
  align-items: center;
8
8
  display: grid;
9
9
 
@@ -72,4 +72,24 @@ grid-row: 1 / span 2;
72
72
  grid-template-columns: subgrid;
73
73
  grid-template-rows: subgrid;
74
74
  text-decoration: none;
75
+ }
76
+
77
+ [part~="row-current"] {
78
+ background-color: var(--list-item-current-background-color, var(--helix-color-well));
79
+ border-radius: var(--helix-radii-sm);
80
+ }
81
+
82
+ [part~="row"]:focus-visible {
83
+ border-radius: var(--helix-radii-sm);
84
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
85
+ outline-offset: calc(var(--helix-size-focus-offset) * -1);
86
+ }
87
+
88
+ :host(:state(selected)) [part~="row"] {
89
+ background-color: var(--list-item-selected-background-color, var(--helix-color-primary-subtle));
90
+ border-radius: var(--helix-radii-sm);
91
+ }
92
+
93
+ :host([disabled]) {
94
+ opacity: var(--list-item-disabled-opacity, 0.5);
75
95
  }`);
@@ -14,9 +14,12 @@ import { type CSSResultGroup, type TemplateResult } from 'lit';
14
14
  *
15
15
  * @csspart rail - The cell that holds the number in a railed list.
16
16
  *
17
+ * @cssproperty --list-item-current-background-color - The fill behind a row that is `current`.
18
+ * @cssproperty --list-item-disabled-opacity - The opacity of a `disabled` row.
17
19
  * @cssproperty --list-item-padding - The padding inside the row.
18
20
  * @cssproperty --list-item-rail-content - What the rail cell shows. The list sets it.
19
21
  * @cssproperty --list-item-rail-display - Whether the row has a rail. The list sets it.
22
+ * @cssproperty --list-item-selected-background-color - The fill behind a selected row, in a list that selects.
20
23
  * @cssproperty --list-item-term-weight - The font weight of a term in a description list.
21
24
  */
22
25
  export declare class HelixListItem extends HelixHeadlessListItem {
@@ -47,6 +47,14 @@ list-style-type: upper-roman;
47
47
  list-style-type: disc;
48
48
  }
49
49
 
50
+ :host([kind="ordered"]) ::slotted(*) {
51
+ counter-increment: list-item var(--list-step, 1);
52
+ }
53
+
54
+ :host([kind="ordered"]) ::slotted(:first-child) {
55
+ counter-set: list-item var(--list-first);
56
+ }
57
+
50
58
  :host([marker="rail"]) {
51
59
  counter-reset: list-rail;
52
60
 
@@ -57,7 +65,11 @@ padding-inline-start: var(--helix-space-none);
57
65
  --list-item-rail-content: counter(list-rail, var(--list-rail-style, decimal-leading-zero));
58
66
 
59
67
  --list-item-rail-display: block;
60
- counter-increment: list-rail;
68
+ counter-increment: list-rail var(--list-step, 1);
69
+ }
70
+
71
+ :host([marker="rail"]) ::slotted(:first-child) {
72
+ counter-set: list-rail var(--list-first);
61
73
  }
62
74
 
63
75
  :host([kind="ordered"][marker="rail"]) ::slotted(*),
@@ -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
@@ -1,2 +1,3 @@
1
1
  export * from './item/menu-item.js';
2
2
  export * from './root/menu-root.js';
3
+ export * from './section/menu-section.js';
@@ -1,2 +1,3 @@
1
1
  export * from './item/menu-item.js';
2
2
  export * from './root/menu-root.js';
3
+ export * from './section/menu-section.js';
@@ -20,6 +20,7 @@ font-weight: var(--helix-weight-medium);
20
20
  grid-template-columns:
21
21
  var(--menu-item-start, 0px)
22
22
  minmax(0, 1fr)
23
+ auto
23
24
  var(--menu-item-end, 0px);
24
25
 
25
26
  min-block-size: var(--helix-size-control);
@@ -72,8 +73,21 @@ grid-column: 2;
72
73
  min-inline-size: 0;
73
74
  }
74
75
 
75
- [part="mark"] {
76
+ [part="end"] {
77
+ align-items: center;
78
+ color: var(--menu-item-detail-color, var(--helix-color-foreground-subtle));
79
+ display: flex;
80
+ gap: var(--helix-space-2xs);
76
81
  grid-column: 3;
82
+ padding-inline-start: var(--helix-space-sm);
83
+ }
84
+
85
+ [part="end"][data-empty] {
86
+ display: none;
87
+ }
88
+
89
+ [part="mark"] {
90
+ grid-column: 4;
77
91
  }
78
92
 
79
93
  [part="start"][data-empty] {
@@ -1,5 +1,6 @@
1
1
  import { HelixHeadlessMenuItem } from '@fusion.dev/helix-headless/menu';
2
2
  import type { CSSResultGroup } from 'lit';
3
+ import '../../kbd/index.js';
3
4
  /**
4
5
  * @summary One row in a menu: a command, a choice, or a way into a submenu.
5
6
  *
@@ -16,11 +17,13 @@ import type { CSSResultGroup } from 'lit';
16
17
  * @aliases Menu option, Menu row
17
18
  * @documentation https://fusion.dev/helix/components/menu
18
19
  *
20
+ * @cssproperty --menu-item-detail-color - Color of the shortcut and the words in the `end` slot.
19
21
  * @cssproperty --menu-item-end - Width of the trailing column, including the gap before it, which holds a check mark or a submenu caret.
20
22
  * @cssproperty --menu-item-hover-color - Fill under the pointer.
21
23
  * @cssproperty --menu-item-start - Width of the leading column, including the gap after it, for a row with more than a mark. The menu sets it for each page, and `0` removes the column.
22
24
  */
23
25
  export declare class HelixMenuItem extends HelixHeadlessMenuItem {
26
+ static tier: string;
24
27
  static styles: CSSResultGroup;
25
28
  }
26
29
  declare global {
@@ -6,8 +6,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessMenuItem } from '@fusion.dev/helix-headless/menu';
9
+ import '../../kbd/index.js';
9
10
  import { styles } from './menu-item.css.js';
10
11
  let HelixMenuItem = class HelixMenuItem extends HelixHeadlessMenuItem {
12
+ static { this.tier = 'helix-'; }
11
13
  static { this.styles = styles; }
12
14
  };
13
15
  HelixMenuItem = __decorate([
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,14 @@
1
+ import { createSheet } from '@fusion.dev/helix-core';
2
+ export const styles = createSheet(`:host {
3
+ display: block;
4
+ }
5
+
6
+ [part="heading"] {
7
+ color: var(--menu-section-heading-color, var(--helix-color-foreground-subtle));
8
+ font-size: var(--helix-text-xs);
9
+ font-weight: var(--helix-weight-medium);
10
+ line-height: var(--helix-leading-normal);
11
+ padding-block: var(--helix-space-xs) var(--helix-space-2xs);
12
+ padding-inline: var(--helix-space-sm);
13
+ user-select: none;
14
+ }`);
@@ -0,0 +1,24 @@
1
+ import { HelixHeadlessMenuSection } from '@fusion.dev/helix-headless/menu';
2
+ import type { CSSResultGroup } from 'lit';
3
+ /**
4
+ * @summary A group of rows in a menu, under a heading.
5
+ *
6
+ * @description
7
+ * The heading is set in the menu's small type, quieter than the rows, with the
8
+ * rows' own inset, so it reads as the name of what follows.
9
+ *
10
+ * @since 0.1.0
11
+ * @status stable
12
+ * @aliases Menu group, Menu heading
13
+ * @documentation https://fusion.dev/helix/components/menu
14
+ *
15
+ * @cssproperty --menu-section-heading-color - Color of the heading.
16
+ */
17
+ export declare class HelixMenuSection extends HelixHeadlessMenuSection {
18
+ static styles: CSSResultGroup;
19
+ }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ 'helix-menu-section': HelixMenuSection;
23
+ }
24
+ }
@@ -0,0 +1,16 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { customElement } from '@fusion.dev/helix-core';
8
+ import { HelixHeadlessMenuSection } from '@fusion.dev/helix-headless/menu';
9
+ import { styles } from './menu-section.css.js';
10
+ let HelixMenuSection = class HelixMenuSection extends HelixHeadlessMenuSection {
11
+ static { this.styles = styles; }
12
+ };
13
+ HelixMenuSection = __decorate([
14
+ customElement('helix-menu-section')
15
+ ], HelixMenuSection);
16
+ export { HelixMenuSection };
@@ -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"],