@fusion.dev/helix 0.142.1 → 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 (160) hide show
  1. package/README.md +9 -5
  2. package/custom-elements.json +29287 -1905
  3. package/dist/accordion/item/accordion-item.css.js +6 -1
  4. package/dist/accordion/item/accordion-item.d.ts +1 -0
  5. package/dist/announcement/root/announcement-root.d.ts +3 -3
  6. package/dist/app-header/root/app-header-root.d.ts +1 -3
  7. package/dist/aura/shader.d.ts +5 -1
  8. package/dist/aura/shader.js +88 -613
  9. package/dist/avatar/root/avatar-root.d.ts +3 -3
  10. package/dist/badge/root/badge-root.css.js +38 -2
  11. package/dist/badge/root/badge-root.d.ts +17 -0
  12. package/dist/badge/root/badge-root.js +3 -0
  13. package/dist/bar-chart/root/bar-chart-root.css.js +10 -0
  14. package/dist/blockquote/root/blockquote-root.css.js +9 -5
  15. package/dist/blockquote/root/blockquote-root.d.ts +5 -0
  16. package/dist/button/root/button-root.css.js +38 -1
  17. package/dist/button/root/button-root.d.ts +5 -0
  18. package/dist/button/root/button-root.js +2 -1
  19. package/dist/callout/root/callout-root.css.js +69 -11
  20. package/dist/callout/root/callout-root.d.ts +25 -2
  21. package/dist/callout/root/callout-root.js +4 -0
  22. package/dist/card/root/card-root.css.js +27 -1
  23. package/dist/card/root/card-root.d.ts +11 -0
  24. package/dist/carousel/root/carousel-root.js +2 -1
  25. package/dist/checkbox/root/checkbox-root.css.js +3 -3
  26. package/dist/checkbox-group/root/checkbox-group-root.d.ts +2 -0
  27. package/dist/checkbox-group/root/checkbox-group-root.js +2 -0
  28. package/dist/code-block/root/code-block-root.css.js +23 -0
  29. package/dist/code-block/root/code-block-root.d.ts +15 -0
  30. package/dist/code-block/root/code-block-root.js +8 -0
  31. package/dist/color-picker/root/color-picker-root.css.js +64 -0
  32. package/dist/color-picker/root/color-picker-root.d.ts +2 -1
  33. package/dist/color-picker/root/color-picker-root.js +0 -1
  34. package/dist/combobox/root/combobox-root.css.js +5 -4
  35. package/dist/copy-button/root/copy-button-root.css.js +5 -0
  36. package/dist/data-table/root/data-table-root.css.js +7 -0
  37. package/dist/date-input/root/date-input-root.css.js +19 -0
  38. package/dist/date-input/root/date-input-root.d.ts +8 -0
  39. package/dist/date-input/root/date-input-root.js +2 -0
  40. package/dist/date-picker/root/date-picker-root.css.js +83 -3
  41. package/dist/date-picker/root/date-picker-root.d.ts +1 -0
  42. package/dist/dialog/root/dialog-root.css.js +47 -0
  43. package/dist/divider/root/divider-root.css.js +8 -3
  44. package/dist/divider/root/divider-root.d.ts +17 -1
  45. package/dist/divider/root/divider-root.js +4 -0
  46. package/dist/donut-chart/root/donut-chart-root.css.js +10 -0
  47. package/dist/drawer/root/drawer-root.css.js +53 -5
  48. package/dist/element-events.generated.js +48 -14
  49. package/dist/empty/root/empty-root.css.js +9 -9
  50. package/dist/empty/root/empty-root.d.ts +9 -0
  51. package/dist/file-input/root/file-input-root.d.ts +0 -1
  52. package/dist/file-input/root/file-input-root.js +2 -1
  53. package/dist/filter-input/root/filter-input-root.d.ts +0 -1
  54. package/dist/filter-input/root/filter-input-root.js +2 -1
  55. package/dist/grid/root/grid-root.d.ts +15 -11
  56. package/dist/grid/root/grid-root.js +49 -15
  57. package/dist/heatmap/root/heatmap-root.css.js +33 -5
  58. package/dist/heatmap/root/heatmap-root.d.ts +4 -1
  59. package/dist/icon/index.d.ts +1 -0
  60. package/dist/icon/index.js +1 -0
  61. package/dist/icon/root/icon-root.d.ts +1 -1
  62. package/dist/icon/root/icon-root.js +1 -1
  63. package/dist/icon/root/index.d.ts +2 -0
  64. package/dist/icon/root/index.js +2 -0
  65. package/dist/icon-button/root/icon-button-root.css.js +80 -16
  66. package/dist/icon-button/root/icon-button-root.d.ts +8 -1
  67. package/dist/icon-button/root/icon-button-root.js +2 -1
  68. package/dist/image/root/image-root.css.js +1 -1
  69. package/dist/input/root/input-root.css.js +3 -3
  70. package/dist/input/root/input-root.d.ts +3 -1
  71. package/dist/input/root/input-root.js +0 -1
  72. package/dist/legend/root/legend-root.css.js +40 -13
  73. package/dist/legend/root/legend-root.d.ts +6 -0
  74. package/dist/legend/root/legend-root.js +1 -1
  75. package/dist/lightbox/root/lightbox-root.css.js +84 -0
  76. package/dist/lightbox/root/lightbox-root.d.ts +1 -0
  77. package/dist/line-chart/root/line-chart-root.css.js +10 -0
  78. package/dist/list/item/list-item.css.js +7 -1
  79. package/dist/loader/root/loader-root.css.js +10 -0
  80. package/dist/loader/root/loader-root.d.ts +10 -4
  81. package/dist/menu/item/menu-item.css.js +1 -1
  82. package/dist/menu/root/menu-root.d.ts +0 -3
  83. package/dist/meter/root/meter-root.css.js +27 -5
  84. package/dist/meter/root/meter-root.d.ts +5 -0
  85. package/dist/notifications/notification/notification.css.js +5 -0
  86. package/dist/number-input/root/number-input-root.css.js +3 -3
  87. package/dist/number-input/root/number-input-root.d.ts +6 -0
  88. package/dist/orb/root/orb-root.d.ts +11 -2
  89. package/dist/orb/root/orb-root.js +5 -1
  90. package/dist/pin-input/root/pin-input-root.css.js +12 -5
  91. package/dist/pin-input/root/pin-input-root.d.ts +5 -0
  92. package/dist/popover/root/popover-root.css.js +36 -0
  93. package/dist/popover/root/popover-root.d.ts +1 -0
  94. package/dist/progress/root/progress-root.css.js +22 -1
  95. package/dist/progress/root/progress-root.d.ts +5 -0
  96. package/dist/qr-code/root/qr-code-root.css.js +2 -1
  97. package/dist/qr-code/root/qr-code-root.d.ts +2 -2
  98. package/dist/quote/root/quote-root.css.js +1 -1
  99. package/dist/quote/root/quote-root.d.ts +1 -0
  100. package/dist/rating/root/rating-root.d.ts +3 -0
  101. package/dist/sandbox/index.d.ts +2 -2
  102. package/dist/sandbox/root/sandbox-root.d.ts +20 -1
  103. package/dist/sandbox/root/sandbox-root.js +27 -10
  104. package/dist/sandbox/source/sandbox-source.d.ts +6 -1
  105. package/dist/sandbox/source/sandbox-source.js +13 -3
  106. package/dist/sandbox/terminal/sandbox-terminal.d.ts +3 -1
  107. package/dist/sandbox/terminal/sandbox-terminal.js +3 -1
  108. package/dist/shared/chart/tooltip.css.js +25 -2
  109. package/dist/shared/field/field-segments.css.d.ts +1 -0
  110. package/dist/shared/field/field-segments.css.js +40 -0
  111. package/dist/skeleton/root/skeleton-root.css.js +60 -5
  112. package/dist/skeleton/root/skeleton-root.d.ts +21 -2
  113. package/dist/skeleton/root/skeleton-root.js +3 -0
  114. package/dist/stat/root/stat-root.css.js +7 -7
  115. package/dist/stat/root/stat-root.d.ts +8 -0
  116. package/dist/switch/root/switch-root.css.js +13 -5
  117. package/dist/switch/root/switch-root.d.ts +25 -1
  118. package/dist/switch/root/switch-root.js +7 -0
  119. package/dist/table/column/table-column.css.js +5 -0
  120. package/dist/tabs/panel/tab-panel.css.js +1 -1
  121. package/dist/tabs/panel/tab-panel.d.ts +2 -0
  122. package/dist/tabs/root/tabs-root.css.js +13 -7
  123. package/dist/tabs/root/tabs-root.d.ts +5 -0
  124. package/dist/tabs/tab/tab.css.js +4 -4
  125. package/dist/tabs/tab/tab.d.ts +5 -0
  126. package/dist/tag/group/tag-group.css.d.ts +1 -0
  127. package/dist/tag/group/tag-group.css.js +6 -0
  128. package/dist/tag/group/tag-group.d.ts +25 -0
  129. package/dist/tag/group/tag-group.js +16 -0
  130. package/dist/tag/index.d.ts +1 -0
  131. package/dist/tag/index.js +1 -0
  132. package/dist/tag/root/tag-root.css.js +50 -0
  133. package/dist/tag/root/tag-root.d.ts +6 -3
  134. package/dist/text/root/text-root.css.js +58 -1
  135. package/dist/text/root/text-root.d.ts +11 -2
  136. package/dist/text/root/text-root.js +19 -1
  137. package/dist/textarea/root/textarea-root.css.js +12 -4
  138. package/dist/textarea/root/textarea-root.d.ts +4 -0
  139. package/dist/time-input/root/time-input-root.css.js +19 -0
  140. package/dist/time-input/root/time-input-root.d.ts +8 -1
  141. package/dist/time-input/root/time-input-root.js +2 -1
  142. package/dist/toast/item/toast-item.css.js +16 -0
  143. package/dist/toast/root/toast-root.css.js +31 -7
  144. package/dist/toast/root/toast-root.d.ts +6 -9
  145. package/dist/toggle/group/toggle-group.css.js +16 -0
  146. package/dist/toggle/group/toggle-group.d.ts +3 -0
  147. package/dist/tour/root/tour-root.css.js +8 -0
  148. package/dist/tour/stop/tour-stop.css.js +37 -0
  149. package/dist/trend/root/trend-root.css.js +12 -5
  150. package/dist/trend/root/trend-root.d.ts +6 -2
  151. package/dist/trend/root/trend-root.js +0 -1
  152. package/dist/video/root/video-root.d.ts +0 -1
  153. package/dist/video/root/video-root.js +0 -1
  154. package/dist/video-playlist/menu/video-playlist-menu.d.ts +0 -1
  155. package/dist/video-playlist/menu/video-playlist-menu.js +0 -1
  156. package/lint.json +1 -1
  157. package/package.json +6 -6
  158. package/types/jsx.d.ts +9515 -2061
  159. package/types/svelte.d.ts +1 -0
  160. package/types/vue.d.ts +2302 -233
@@ -14,13 +14,17 @@ import type { CSSResultGroup } from 'lit';
14
14
  * @documentation https://fusion.dev/helix/components/tag
15
15
  *
16
16
  * @slot - The tag's label.
17
+ * @slot dismiss-icon - Replaces the glyph on the remove button.
17
18
  *
18
19
  * @event {HelixDismissEvent} helix-dismiss - The remove button was pressed. The tag does not remove itself, so remove it in response. Cancelable.
19
20
  *
21
+ * @csspart cell - The grid cell in a `Tag.Group`, which takes focus and draws the ring round the whole tag.
20
22
  * @csspart dismiss - The remove button, when `dismissible`.
23
+ * @csspart link - The link around the label, under `href`.
21
24
  *
22
25
  * @cssproperty --tag-background-color - The fill behind the tag.
23
26
  * @cssproperty --tag-border-color - The color of the tag's edge.
27
+ * @cssproperty --tag-disabled-opacity - How strongly a `disabled` tag is drawn.
24
28
  * @cssproperty --tag-foreground-color - The label color.
25
29
  * @cssproperty --tag-radius - The corner radius of the tag.
26
30
  */
@@ -47,9 +51,8 @@ export declare class HelixTag extends HelixHeadlessTag {
47
51
  * already calls them. `helix component`'s `axes` holds the vocabulary.
48
52
  *
49
53
  * **Not all seven are statuses, and `accent` is the one worth saying out
50
- * loud**: it is the second emphasis, a rotation off the brand seed rather than
51
- * a color of its own, so it stays in relation when somebody rethemes.
52
- * `primary` is the seed itself. The four that are statuses are the four
54
+ * loud**: it is the second emphasis, the second color a theme names, and the
55
+ * brand itself until one is named. `primary` is the brand. The four that are statuses are the four
53
56
  * `HelixStatusTone` names, and those are the ones that would carry a glyph
54
57
  * somewhere that draws one.
55
58
  *
@@ -49,7 +49,8 @@ letter-spacing: var(--helix-tracking-normal);
49
49
  line-height: var(--helix-leading-heading);
50
50
  }
51
51
 
52
- :host([variant="body"]) {
52
+ :host([variant="body"]),
53
+ :host(:not([variant])[as="p"]) {
53
54
  font-family: var(--helix-font-sans);
54
55
  font-size: var(--helix-text-md);
55
56
  font-weight: var(--helix-weight-regular);
@@ -111,6 +112,62 @@ line-height: var(--helix-leading-normal);
111
112
  color: var(--_heading-ink, currentColor);
112
113
  }
113
114
 
115
+ :host([emphasis="muted"]) {
116
+ color: var(--helix-color-foreground-muted);
117
+ }
118
+
119
+ :host([emphasis="subtle"]) {
120
+ color: var(--helix-color-foreground-subtle);
121
+ }
122
+
123
+ :host([tone="accent"]) {
124
+ color: var(--helix-color-accent);
125
+ }
126
+
127
+ :host([tone="danger"]) {
128
+ color: var(--helix-color-danger);
129
+ }
130
+
131
+ :host([tone="info"]) {
132
+ color: var(--helix-color-info);
133
+ }
134
+
135
+ :host([tone="primary"]) {
136
+ color: var(--helix-color-primary);
137
+ }
138
+
139
+ :host([tone="success"]) {
140
+ color: var(--helix-color-success);
141
+ }
142
+
143
+ :host([tone="warning"]) {
144
+ color: var(--helix-color-warning);
145
+ }
146
+
147
+ :host([tone="accent"]:is([emphasis="muted"], [emphasis="subtle"])) {
148
+ color: var(--helix-color-accent-muted);
149
+ }
150
+
151
+ :host([tone="danger"]:is([emphasis="muted"], [emphasis="subtle"])) {
152
+ color: var(--helix-color-danger-muted);
153
+ }
154
+
155
+ :host([tone="info"]:is([emphasis="muted"], [emphasis="subtle"])) {
156
+ color: var(--helix-color-info-muted);
157
+ }
158
+
159
+ :host([tone="primary"]:is([emphasis="muted"], [emphasis="subtle"])) {
160
+ color: var(--helix-color-primary-muted);
161
+ }
162
+
163
+ :host([tone="success"]:is([emphasis="muted"], [emphasis="subtle"])) {
164
+ color: var(--helix-color-success-muted);
165
+ }
166
+
167
+ :host([tone="warning"]:is([emphasis="muted"], [emphasis="subtle"])) {
168
+ color: var(--helix-color-warning-muted);
169
+ }
170
+
114
171
  [part="text"] {
115
172
  color: inherit;
116
173
  font: inherit;
@@ -1,5 +1,5 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
- import type { CSSResultGroup } from 'lit';
2
+ import type { CSSResultGroup, PropertyValues } from 'lit';
3
3
  /**
4
4
  * @summary Text, with its HTML element and its type style set separately.
5
5
  *
@@ -40,6 +40,11 @@ export declare class HelixText extends HelixElement {
40
40
  * The HTML element to render.
41
41
  *
42
42
  * Decides the outline and the semantics.
43
+ *
44
+ * **`label` gives the label ramp and labels no control.** The element is in
45
+ * this one's shadow root, which neither `for` nor a wrapped control can
46
+ * reach, so a page that writes either is warned. Name a Helix field with its
47
+ * own `label`, and a native control with `<label data-text="label">`.
43
48
  */
44
49
  as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong' | 'em' | 'code' | 'label';
45
50
  /**
@@ -74,9 +79,13 @@ export declare class HelixText extends HelixElement {
74
79
  /**
75
80
  * The type style, which sets the size, weight, leading, and tracking.
76
81
  *
77
- * Defaults to the one that matches `as`.
82
+ * Defaults to the one that matches `as`: `body` for `p`, `body-strong` for
83
+ * `strong`, `h5` and `h6`. A `span` or an `em` keeps the type around it.
78
84
  */
79
85
  variant?: 'display' | 'heading' | 'subheading' | 'title' | 'body' | 'body-strong' | 'caption' | 'label' | 'code';
86
+ protected updated(changed: PropertyValues): void;
87
+ /** Whether the page wrote this as the label of a control, which it cannot be. */
88
+ private labelsNothing;
80
89
  protected render(): unknown;
81
90
  static styles: CSSResultGroup;
82
91
  }
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { customElement, HelixElement } from '@fusion.dev/helix-core';
7
+ import { customElement, HelixElement, reportRuntime } from '@fusion.dev/helix-core';
8
8
  import { property } from 'lit/decorators.js';
9
9
  import { literal, html as staticHtml } from 'lit/static-html.js';
10
10
  import { styles } from './text-root.css.js';
@@ -23,6 +23,24 @@ const TAGS = {
23
23
  strong: literal `strong`,
24
24
  };
25
25
  let HelixText = class HelixText extends HelixElement {
26
+ updated(changed) {
27
+ super.updated(changed);
28
+ if (changed.has('as') && this.as === 'label' && this.labelsNothing()) {
29
+ reportRuntime({
30
+ kind: 'unreachable-label',
31
+ message: '<helix-text as="label"> names no control: its label is in a shadow root, which ' +
32
+ '`for` and a wrapped control cannot reach. Give a Helix field its own `label`, or ' +
33
+ 'write `<label data-text="label">` for a native control.',
34
+ tag: this.localName,
35
+ });
36
+ }
37
+ }
38
+ labelsNothing() {
39
+ const fields = [...this.querySelectorAll('*')].some((element) => element.constructor.formAssociated === true);
40
+ return (fields ||
41
+ this.hasAttribute('for') ||
42
+ this.querySelector('input, select, textarea, button, meter, output, progress') !== null);
43
+ }
26
44
  render() {
27
45
  const tag = (this.as && Object.hasOwn(TAGS, this.as) ? TAGS[this.as] : undefined) ?? literal `span`;
28
46
  return staticHtml `<${tag} part="text"><slot></slot></${tag}>`;
@@ -1,10 +1,11 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
2
  export const styles = createSheet(`[part="field"] {
3
3
  background-color: var(--textarea-background-color, var(--helix-color-well));
4
- border: var(--helix-border-thin) solid var(--helix-color-border);
5
- border-radius: var(--helix-radii-sm);
4
+ border: var(--helix-border-thin) solid var(--textarea-border-color, var(--helix-color-border));
5
+ border-radius: var(--textarea-radius, var(--helix-radii-sm));
6
6
  display: flex;
7
- padding: var(--helix-space-xs);
7
+ gap: var(--helix-space-2xs);
8
+ padding: var(--textarea-padding, var(--helix-space-xs));
8
9
  transition:
9
10
  border-color var(--helix-duration-fast) var(--helix-easing-standard),
10
11
  background-color var(--helix-duration-fast) var(--helix-easing-standard);
@@ -14,7 +15,14 @@ background-color var(--helix-duration-fast) var(--helix-easing-standard);
14
15
  line-height: var(--helix-leading-normal);
15
16
  overflow-wrap: break-word;
16
17
 
17
- resize: vertical;
18
+ resize: var(--textarea-resize, vertical);
19
+ }
20
+
21
+ slot[name="start"]::slotted(*),
22
+ slot[name="end"]::slotted(*) {
23
+ align-self: flex-start;
24
+ color: var(--helix-color-foreground-subtle);
25
+ flex: 0 0 auto;
18
26
  }
19
27
 
20
28
  :host([auto-grow]) [part="control"] {
@@ -15,6 +15,10 @@ import type { CSSResultGroup } from 'lit';
15
15
  * @documentation https://fusion.dev/helix/components/textarea
16
16
  *
17
17
  * @cssproperty --textarea-background-color - Fill behind the text.
18
+ * @cssproperty --textarea-border-color - Edge of the field at rest. Hover, focus and an error still draw their own.
19
+ * @cssproperty --textarea-padding - Space between the edge of the field and the text.
20
+ * @cssproperty --textarea-radius - Corner radius of the field.
21
+ * @cssproperty --textarea-resize - Which way a reader can drag the field: `vertical` by default, `none`, `both` or `horizontal`. A field under `auto-grow` has nothing to drag.
18
22
  */
19
23
  export declare class HelixTextarea extends HelixHeadlessTextarea {
20
24
  static styles: CSSResultGroup;
@@ -90,6 +90,25 @@ flex-basis: 0;
90
90
  min-inline-size: var(--helix-size-icon-loose);
91
91
  }
92
92
 
93
+ [part="segments"] {
94
+ --_segment-focus-background-color: var(
95
+ --time-input-segment-focus-background-color,
96
+ var(--helix-color-primary)
97
+ );
98
+ --_segment-focus-color: var(
99
+ --time-input-segment-focus-color,
100
+ var(--helix-color-foreground-on-primary)
101
+ );
102
+ --_segment-literal-color: var(
103
+ --time-input-segment-literal-color,
104
+ var(--helix-color-foreground-muted)
105
+ );
106
+ --_segment-placeholder-color: var(
107
+ --time-input-segment-placeholder-color,
108
+ var(--helix-color-foreground-subtle)
109
+ );
110
+ }
111
+
93
112
  @media print {
94
113
  :host {
95
114
  print-color-adjust: exact;
@@ -1,6 +1,5 @@
1
1
  import { HelixHeadlessTimeInput } from '@fusion.dev/helix-headless/time-input';
2
2
  import type { CSSResultGroup } from 'lit';
3
- import '../../icon/index.js';
4
3
  import '../../tag/index.js';
5
4
  import '../../time-picker/index.js';
6
5
  /**
@@ -26,6 +25,14 @@ import '../../time-picker/index.js';
26
25
  * @cssproperty --time-input-border-width - Width of the panel's edge. Defaults to
27
26
  * `--helix-border-floating`, which is `0`, so the panel stands out by its shadow unless
28
27
  * your theme sets a width.
28
+ * @cssproperty --time-input-segment-focus-background-color - The fill behind the
29
+ * segment with focus, in `segmented`. It follows `--helix-color-primary`.
30
+ * @cssproperty --time-input-segment-focus-color - The text of the segment with
31
+ * focus, in `segmented`.
32
+ * @cssproperty --time-input-segment-literal-color - The text the locale writes
33
+ * between two segments, in `segmented`.
34
+ * @cssproperty --time-input-segment-placeholder-color - The dashes of a segment
35
+ * with nothing in it, in `segmented`. It matches the text field's placeholder.
29
36
  * @cssproperty --time-input-shadow - Shadow under the panel. Defaults to
30
37
  * `--helix-shadow-floating`, because the panel can sit over any content.
31
38
  */
@@ -6,11 +6,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessTimeInput } from '@fusion.dev/helix-headless/time-input';
9
- import '../../icon/index.js';
10
9
  import '../../tag/index.js';
11
10
  import '../../time-picker/index.js';
12
11
  import { styles as fieldStyles } from '../../shared/field/field.css.js';
13
12
  import { styles as fieldFrameStyles } from '../../shared/field/field-frame.css.js';
13
+ import { styles as fieldSegmentsStyles } from '../../shared/field/field-segments.css.js';
14
14
  import { styles as fieldStackedStyles } from '../../shared/field/field-stacked.css.js';
15
15
  import { styles as floatingEntranceStyles } from '../../shared/floating/entrance.css.js';
16
16
  import { styles as floatingPanelStyles } from '../../shared/floating/panel.css.js';
@@ -22,6 +22,7 @@ let HelixTimeInput = class HelixTimeInput extends HelixHeadlessTimeInput {
22
22
  fieldStyles,
23
23
  fieldFrameStyles,
24
24
  fieldStackedStyles,
25
+ fieldSegmentsStyles,
25
26
  tagRowStyles,
26
27
  floatingPanelStyles,
27
28
  floatingEntranceStyles,
@@ -150,6 +150,22 @@ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
150
150
  outline-offset: var(--helix-size-focus-offset);
151
151
  }
152
152
 
153
+ [part="item"],
154
+ [part="item"] > * {
155
+ touch-action: pan-y;
156
+ }
157
+
158
+ [part="content"] > slot {
159
+ display: block;
160
+ touch-action: pan-y;
161
+ }
162
+
163
+ [part="item"][data-swiping] {
164
+ transition: none;
165
+ translate: var(--toast-swipe-x, 0) 0;
166
+ user-select: none;
167
+ }
168
+
153
169
  [part="timer"] {
154
170
  animation: helix-toast-drain var(--toast-duration, 0ms) linear forwards;
155
171
  background-color: var(--_toast-severity, var(--helix-color-foreground-muted));
@@ -1,24 +1,42 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
2
  export const styles = createSheet(`:host {
3
3
  --_toast-inset: var(--toast-inset, var(--helix-space-lg));
4
-
5
- inset-inline: var(--_toast-inset);
6
- pointer-events: none;
7
- position: fixed;
8
-
9
- z-index: var(--helix-layer-toast);
4
+ display: contents;
10
5
  }
11
6
 
12
7
  :host(:not([placement])) {
13
8
  --_toast-enter: var(--helix-space-lg);
14
- inset-block-end: var(--_toast-inset);
15
9
  }
16
10
 
17
11
  [part="region"] {
18
12
 
19
13
  --_toast-gap: var(--toast-gap, var(--helix-space-xs));
14
+ background: none;
15
+ block-size: auto;
16
+ border: none;
17
+ color: inherit;
20
18
  display: flex;
21
19
  flex-direction: column;
20
+ inline-size: auto;
21
+ inset: auto;
22
+ inset-inline: var(--_toast-inset);
23
+ margin: var(--helix-space-none);
24
+ max-block-size: none;
25
+ max-inline-size: none;
26
+ overflow: visible;
27
+ padding: var(--helix-space-none);
28
+ pointer-events: none;
29
+ position: fixed;
30
+
31
+ z-index: var(--helix-layer-toast);
32
+ }
33
+
34
+ :host(:not([placement])) [part="region"] {
35
+ inset-block-end: var(--_toast-inset);
36
+ }
37
+
38
+ [part="region"]:not(:popover-open) {
39
+ display: none;
22
40
  }
23
41
 
24
42
  ::slotted(*) {
@@ -27,11 +45,17 @@ pointer-events: auto;
27
45
 
28
46
  :host([placement^="bottom"]) {
29
47
  --_toast-enter: var(--helix-space-lg);
48
+ }
49
+
50
+ :host([placement^="bottom"]) [part="region"] {
30
51
  inset-block-end: var(--_toast-inset);
31
52
  }
32
53
 
33
54
  :host([placement^="top"]) {
34
55
  --_toast-enter: calc(var(--helix-space-lg) * -1);
56
+ }
57
+
58
+ :host([placement^="top"]) [part="region"] {
35
59
  inset-block-start: var(--_toast-inset);
36
60
  }
37
61
 
@@ -4,16 +4,13 @@ import type { CSSResultGroup } from 'lit';
4
4
  * @summary The region that holds toast messages, and the only element that announces them.
5
5
  *
6
6
  * @description
7
- * Fixed to the window. The region spans a whole edge, so it ignores the pointer
8
- * and only the messages receive clicks. Content beside a message stays
9
- * clickable.
7
+ * Fixed to the window, in the top layer. The region spans a whole edge, so it
8
+ * ignores the pointer and only the messages receive clicks. Content beside a
9
+ * message stays clickable.
10
10
  *
11
- * **Place the region at the root of your application.** `position: fixed`
12
- * positions against the viewport only while no ancestor has `transform`,
13
- * `filter`, `perspective`, or `contain`. Any of these makes that ancestor the
14
- * containing block, and an ancestor with `overflow: hidden` still clips the
15
- * region. The other floating surfaces in Helix use the top layer for the same
16
- * reason.
11
+ * Because the stack is in the top layer, an ancestor with `transform`,
12
+ * `filter`, `contain`, or `overflow: hidden` does not move or clip it, and a
13
+ * message that arrives while a modal dialog is open shows above the dialog.
17
14
  *
18
15
  * @since 0.1.0
19
16
  * @status stable
@@ -111,4 +111,20 @@ gap: var(--helix-space-sm);
111
111
 
112
112
  [part="row"] [part="track"] {
113
113
  flex: 1 1 auto;
114
+ }
115
+
116
+ :host([selection-mode="multiple"]) ::slotted(helix-toggle:state(pressed)) {
117
+ background-color: var(--toggle-group-indicator-color, var(--_indicator-surface));
118
+ border-radius: var(--_toggle-radius, var(--helix-radii-sm));
119
+ box-shadow: var(--helix-shadow-sm);
120
+ }
121
+
122
+ :host([orientation="vertical"]) [part="track"] {
123
+ align-items: stretch;
124
+ flex-direction: column;
125
+ flex-wrap: nowrap;
126
+ }
127
+
128
+ :host([orientation="vertical"]) ::slotted(helix-toggle) {
129
+ flex: 0 0 auto;
114
130
  }`);
@@ -19,6 +19,9 @@ import type { CSSResultGroup } from 'lit';
19
19
  *
20
20
  * @slot - The group's items.
21
21
  * @slot end - Content after the track, on the same line, such as a count or a reset.
22
+ * @slot feedback - The message that says what is wrong, for content richer than a string. It shows while there is a message.
23
+ * @slot hint - Help under the control, for content richer than the `hint` text.
24
+ * @slot label - The label, for content richer than the `label` text.
22
25
  * @slot start - Content before the track, on the same line, such as an icon or a caption.
23
26
  *
24
27
  * @csspart indicator - The moving marker behind the selected item.
@@ -17,6 +17,14 @@ inline-size var(--helix-duration-normal) var(--helix-easing-standard);
17
17
  z-index: var(--helix-layer-overlay);
18
18
  }
19
19
 
20
+ [part="backdrop"] {
21
+ background-color: var(--tour-scrim-color, var(--helix-color-overlay));
22
+ inset: 0;
23
+ pointer-events: none;
24
+ position: fixed;
25
+ z-index: var(--helix-layer-overlay);
26
+ }
27
+
20
28
  @media print {
21
29
  :host {
22
30
  display: none;
@@ -22,10 +22,43 @@ padding: var(--tour-padding, var(--helix-space-md));
22
22
  position: fixed;
23
23
  }
24
24
 
25
+ [part="bubble"]:focus,
26
+ [part="bubble"]:focus-visible {
27
+ outline: none;
28
+ }
29
+
25
30
  :host [part="bubble"][hidden] {
26
31
  display: none;
27
32
  }
28
33
 
34
+ :host([type="dialog"]) [part="bubble"] {
35
+ margin: auto;
36
+ }
37
+
38
+ :host([type="floating"]) [part="bubble"] {
39
+ inset: auto;
40
+ inset-block-end: var(--helix-space-lg);
41
+ inset-inline-end: var(--helix-space-lg);
42
+ }
43
+
44
+ ::slotted([slot="heading"]) {
45
+ font-size: var(--helix-text-md);
46
+ font-weight: var(--helix-weight-semibold);
47
+ margin: var(--helix-space-none);
48
+ }
49
+
50
+ ::slotted([slot="description"]) {
51
+ color: var(--helix-color-foreground-muted);
52
+ font-size: var(--helix-text-sm);
53
+ margin: var(--helix-space-none);
54
+ }
55
+
56
+ [part="progress"] {
57
+ color: var(--helix-color-foreground-muted);
58
+ font-size: var(--helix-text-sm);
59
+ font-variant-numeric: tabular-nums;
60
+ }
61
+
29
62
  [part="content"] {
30
63
  display: flex;
31
64
  flex-direction: column;
@@ -70,4 +103,8 @@ border-left: var(--helix-border-thin) solid var(--helix-color-border);
70
103
  [part="bubble"][data-placement^="left"] [part~="arrow"] {
71
104
  border-right: var(--helix-border-thin) solid var(--helix-color-border);
72
105
  border-top: var(--helix-border-thin) solid var(--helix-color-border);
106
+ }
107
+
108
+ :host([type]) [part~="arrow"] {
109
+ display: none;
73
110
  }`);
@@ -4,13 +4,13 @@ align-items: center;
4
4
  display: inline-flex;
5
5
  font-size: var(--helix-text-sm);
6
6
  font-weight: var(--helix-weight-medium);
7
- gap: var(--helix-space-2xs);
7
+ gap: var(--trend-gap, var(--helix-space-2xs));
8
8
  line-height: var(--helix-leading-tight);
9
9
  }
10
10
 
11
11
  :host {
12
12
 
13
- --_trend-color: var(--helix-color-foreground-muted);
13
+ --_trend-color: var(--trend-neutral-color, var(--helix-color-foreground-muted));
14
14
  color: var(--trend-color, var(--_trend-color));
15
15
  }
16
16
 
@@ -18,14 +18,21 @@ color: var(--trend-color, var(--_trend-color));
18
18
  --icon-size: var(--trend-icon-size, 1em);
19
19
  }
20
20
 
21
+ slot[name="icon"]::slotted(*) {
22
+ --icon-size: var(--trend-icon-size, 1em);
23
+
24
+ block-size: var(--trend-icon-size, 1em);
25
+ inline-size: var(--trend-icon-size, 1em);
26
+ }
27
+
21
28
  :host([direction="up"][good="up"]),
22
29
  :host([direction="down"][good="down"]) {
23
- --_trend-color: var(--helix-color-success);
30
+ --_trend-color: var(--trend-better-color, var(--helix-color-success));
24
31
  }
25
32
 
26
33
  :host([direction="up"][good="down"]),
27
34
  :host([direction="down"][good="up"]) {
28
- --_trend-color: var(--helix-color-danger);
35
+ --_trend-color: var(--trend-worse-color, var(--helix-color-danger));
29
36
  }
30
37
 
31
38
  [part="direction"] {
@@ -38,7 +45,7 @@ white-space: nowrap;
38
45
  }
39
46
 
40
47
  slot[name="label"] {
41
- color: var(--helix-color-foreground-muted);
48
+ color: var(--trend-label-color, var(--helix-color-foreground-muted));
42
49
  font-weight: var(--helix-weight-regular);
43
50
  }
44
51
 
@@ -1,6 +1,5 @@
1
1
  import { HelixHeadlessTrend } from '@fusion.dev/helix-headless/trend';
2
2
  import type { CSSResultGroup } from 'lit';
3
- import '../../icon/index.js';
4
3
  /**
5
4
  * @summary An indicator that shows which way a measurement moved, and whether the change is good.
6
5
  *
@@ -25,8 +24,13 @@ import '../../icon/index.js';
25
24
  * @aliases Delta, Change, Movement
26
25
  * @documentation https://fusion.dev/helix/components/trend
27
26
  *
27
+ * @cssproperty --trend-better-color - Color of a move that `good` says is an improvement.
28
28
  * @cssproperty --trend-color - Color of the arrow. Setting it overrides the color that `good` sets.
29
- * @cssproperty --trend-icon-size - Size of the arrow.
29
+ * @cssproperty --trend-gap - Space between the arrow, the metric and the label.
30
+ * @cssproperty --trend-icon-size - Size of the arrow, or of a glyph in the `icon` slot.
31
+ * @cssproperty --trend-label-color - Color of the label.
32
+ * @cssproperty --trend-neutral-color - Color of a trend that `good` does not judge, or one that did not move.
33
+ * @cssproperty --trend-worse-color - Color of a move that `good` says is a setback.
30
34
  */
31
35
  export declare class HelixTrend extends HelixHeadlessTrend {
32
36
  static styles: CSSResultGroup;
@@ -6,7 +6,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessTrend } from '@fusion.dev/helix-headless/trend';
9
- import '../../icon/index.js';
10
9
  import { styles as glyphStyles } from '../../shared/glyph/glyph.css.js';
11
10
  import { styles } from './trend-root.css.js';
12
11
  let HelixTrend = class HelixTrend extends HelixHeadlessTrend {
@@ -1,6 +1,5 @@
1
1
  import { HelixHeadlessVideo } from '@fusion.dev/helix-headless/video';
2
2
  import type { CSSResultGroup } from 'lit';
3
- import '../../icon/index.js';
4
3
  import '../../menu/index.js';
5
4
  /**
6
5
  * @summary A video player with controls drawn by Helix.
@@ -7,7 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessVideo } from '@fusion.dev/helix-headless/video';
9
9
  import { property } from 'lit/decorators.js';
10
- import '../../icon/index.js';
11
10
  import '../../menu/index.js';
12
11
  import { styles as glyphStyles } from '../../shared/glyph/glyph.css.js';
13
12
  import { styles as liveStyles } from '../../shared/live/live.css.js';
@@ -1,6 +1,5 @@
1
1
  import { HelixHeadlessVideoPlaylistMenu } from '@fusion.dev/helix-headless/video-playlist';
2
2
  import type { CSSResultGroup } from 'lit';
3
- import '../../icon/index.js';
4
3
  import '../../menu/index.js';
5
4
  /**
6
5
  * @summary The playlist's entries, as a menu inside the player's control bar.
@@ -8,7 +8,6 @@ import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessVideoPlaylistMenu } from '@fusion.dev/helix-headless/video-playlist';
9
9
  import { styles as glyphStyles } from '../../shared/glyph/glyph.css.js';
10
10
  import { styles } from './video-playlist-menu.css.js';
11
- import '../../icon/index.js';
12
11
  import '../../menu/index.js';
13
12
  let HelixVideoPlaylistMenu = class HelixVideoPlaylistMenu extends HelixHeadlessVideoPlaylistMenu {
14
13
  static { this.tier = 'helix-'; }