@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
@@ -4,9 +4,9 @@ import type { CSSResultGroup } from 'lit';
4
4
  * @summary A person or entity, shown as an image or as their initials.
5
5
  *
6
6
  * @description
7
- * The font size of the initials is set in `em` against the avatar's own
8
- * dimension, so the initials scale with every size, including a size you set
9
- * through `--avatar-size`.
7
+ * The font size of the initials is a share of the avatar's own size, so the
8
+ * initials scale with every size, including a size you set through
9
+ * `--avatar-size`.
10
10
  *
11
11
  * @since 0.1.0
12
12
  * @status stable
@@ -20,7 +20,8 @@ block-size: var(--_badge-size);
20
20
  border-radius: var(--helix-radii-full);
21
21
 
22
22
  box-shadow: 0 0 0 var(--helix-border-thick) var(--badge-ring-color, var(--helix-color-background));
23
- color: var(--_badge-on);
23
+
24
+ color: var(--badge-color, var(--_badge-on));
24
25
  display: inline-flex;
25
26
  font-size: var(--_badge-text);
26
27
  font-weight: var(--helix-weight-semibold);
@@ -101,7 +102,42 @@ background-color: var(--badge-background-color, var(--helix-color-danger-surface
101
102
 
102
103
  :host([tone="neutral"]) [part="indicator"] {
103
104
  background-color: var(--badge-background-color, var(--helix-color-surface-raised));
104
- color: var(--helix-color-foreground);
105
+ color: var(--badge-color, var(--helix-color-foreground));
106
+ }
107
+
108
+ :host([placement="top-start"]) [part="indicator"],
109
+ :host([placement="bottom-start"]) [part="indicator"] {
110
+ inset-inline-end: auto;
111
+ inset-inline-start: var(--badge-offset, calc(var(--_badge-size) / 4));
112
+ }
113
+
114
+ :host([placement="bottom-end"]) [part="indicator"],
115
+ :host([placement="bottom-start"]) [part="indicator"] {
116
+ inset-block-end: var(--badge-offset, calc(var(--_badge-size) / 4));
117
+ inset-block-start: auto;
118
+ }
119
+
120
+ :host([placement="top-start"]) [part="indicator"] {
121
+ translate: -50% -50%;
122
+ }
123
+
124
+ :host([placement="bottom-end"]) [part="indicator"] {
125
+ translate: 50% 50%;
126
+ }
127
+
128
+ :host([placement="bottom-start"]) [part="indicator"] {
129
+ translate: -50% 50%;
130
+ }
131
+
132
+ :host([placement="inline"]) {
133
+ align-items: center;
134
+ gap: var(--badge-gap, var(--helix-space-2xs));
135
+ }
136
+
137
+ :host([placement="inline"]) [part="indicator"] {
138
+ box-shadow: none;
139
+ position: static;
140
+ translate: none;
105
141
  }
106
142
 
107
143
  @media print {
@@ -8,6 +8,12 @@ import type { CSSResultGroup } from 'lit';
8
8
  * where it overlaps the element it is pinned to, such as a dark badge on a dark
9
9
  * icon.
10
10
  *
11
+ * `placement` pins it to another corner, or puts it in the line with
12
+ * `inline`. **Inside a control, `inline` puts the count in the control's
13
+ * name**: `<button>Inbox <helix-badge placement="inline" value="8"
14
+ * label="8 unread"></helix-badge></button>` is the button "Inbox 8 unread",
15
+ * kept current by the badge with no label of yours to update.
16
+ *
11
17
  * @since 0.1.0
12
18
  * @status stable
13
19
  * @category markers
@@ -15,10 +21,21 @@ import type { CSSResultGroup } from 'lit';
15
21
  * @documentation https://fusion.dev/helix/components/badge
16
22
  *
17
23
  * @cssproperty --badge-background-color - The fill of the indicator.
24
+ * @cssproperty --badge-color - The color of the count, to pair with a fill set through `--badge-background-color`.
25
+ * @cssproperty --badge-gap - The space between the content and the count under `placement="inline"`.
18
26
  * @cssproperty --badge-offset - Pulls the mark in from the corner, along both axes.
19
27
  * @cssproperty --badge-ring-color - The color of the ring between the indicator and what is behind it.
20
28
  */
21
29
  export declare class HelixBadge extends HelixHeadlessBadge {
30
+ /**
31
+ * Where the mark sits: a corner, `top-start`, `bottom-end` or `bottom-start`,
32
+ * or `inline`, in the line after the content.
33
+ *
34
+ * Absent is the top end, the corner a count is looked for in. `inline` is
35
+ * for a badge inside a control, where its count is read as part of the
36
+ * control's name.
37
+ */
38
+ placement?: 'bottom-end' | 'bottom-start' | 'inline' | 'top-start';
22
39
  /**
23
40
  * What the mark means. The stylesheet picks the fill from it.
24
41
  *
@@ -11,6 +11,9 @@ import { styles } from './badge-root.css.js';
11
11
  let HelixBadge = class HelixBadge extends HelixHeadlessBadge {
12
12
  static { this.styles = styles; }
13
13
  };
14
+ __decorate([
15
+ property({ reflect: true })
16
+ ], HelixBadge.prototype, "placement", void 0);
14
17
  __decorate([
15
18
  property({ reflect: true })
16
19
  ], HelixBadge.prototype, "tone", void 0);
@@ -289,4 +289,14 @@ stop-opacity: calc(0.35 * var(--helix-material-opacity));
289
289
  :host {
290
290
  print-color-adjust: exact;
291
291
  }
292
+ }
293
+
294
+ [part="summary"] {
295
+ block-size: 1px;
296
+ clip-path: inset(50%);
297
+ inline-size: 1px;
298
+ margin: var(--helix-space-none);
299
+ overflow: hidden;
300
+ position: absolute;
301
+ white-space: nowrap;
292
302
  }`);
@@ -3,6 +3,10 @@ export const styles = createSheet(`:host {
3
3
  display: block;
4
4
  }
5
5
 
6
+ [part="figure"] {
7
+ margin: var(--helix-space-none);
8
+ }
9
+
6
10
  [part="blockquote"] {
7
11
  display: block;
8
12
  margin: var(--helix-space-none);
@@ -10,8 +14,8 @@ margin: var(--helix-space-none);
10
14
 
11
15
  slot:not([name]) {
12
16
 
13
- color: var(--helix-color-foreground-muted);
14
- font-family: var(--helix-font-display);
17
+ color: var(--blockquote-color, var(--helix-color-foreground-muted));
18
+ font-family: var(--blockquote-font-family, var(--helix-font-display));
15
19
  font-size: var(--blockquote-size, var(--helix-text-xl));
16
20
  font-weight: var(--helix-weight-medium);
17
21
  letter-spacing: var(--helix-tracking-tight);
@@ -23,10 +27,10 @@ margin: var(--helix-space-none);
23
27
  }
24
28
 
25
29
  [part="attribution"] {
26
- color: var(--helix-color-foreground-muted);
27
- font-size: var(--helix-text-sm);
30
+ color: var(--blockquote-attribution-color, var(--helix-color-foreground-muted));
31
+ font-size: var(--blockquote-attribution-size, var(--helix-text-sm));
28
32
 
29
- margin-block-start: var(--helix-space-sm);
33
+ margin-block-start: var(--blockquote-gap, var(--helix-space-sm));
30
34
  }
31
35
 
32
36
  [part="attribution"][data-empty] {
@@ -14,6 +14,11 @@ import type { CSSResultGroup } from 'lit';
14
14
  * @aliases Pullquote, Citation, Excerpt
15
15
  * @documentation https://fusion.dev/helix/components/blockquote
16
16
  *
17
+ * @cssproperty --blockquote-attribution-color - The color of the attribution.
18
+ * @cssproperty --blockquote-attribution-size - The font size of the attribution.
19
+ * @cssproperty --blockquote-color - The color of the quoted passage.
20
+ * @cssproperty --blockquote-font-family - The typeface of the quoted passage, the display face by default.
21
+ * @cssproperty --blockquote-gap - The space between the passage and its attribution.
17
22
  * @cssproperty --blockquote-size - The font size of the quoted passage.
18
23
  */
19
24
  export declare class HelixBlockquote extends HelixHeadlessBlockquote {
@@ -14,6 +14,8 @@ max-inline-size: 100%;
14
14
  --_button-on-tone: var(--helix-color-background);
15
15
  --_button-tone: var(--helix-color-foreground);
16
16
 
17
+ --_button-turn: 0.8s;
18
+
17
19
  --_button-tone-hover: color-mix(
18
20
  in oklab,
19
21
  var(--helix-color-foreground) 86%,
@@ -61,7 +63,7 @@ color-mix(in oklab, var(--_button-tone) 6%, transparent)
61
63
  );
62
64
 
63
65
  block-size: var(--button-size, var(--helix-size-control));
64
- border: var(--helix-border-thin) solid var(--_button-edge);
66
+ border: var(--helix-border-thin) solid var(--button-border-color, var(--_button-edge));
65
67
  box-sizing: border-box;
66
68
  color: var(--button-foreground-color, var(--_button-tone));
67
69
  cursor: pointer;
@@ -183,6 +185,41 @@ text-box: trim-both cap alphabetic;
183
185
  --icon-size: 1.15em;
184
186
  }
185
187
 
188
+ :host(:state(pending)) [part="button"] {
189
+ cursor: progress;
190
+ position: relative;
191
+ }
192
+
193
+ :host(:state(pending)) [part="button"] > slot {
194
+ visibility: hidden;
195
+ }
196
+
197
+ :host(:state(pending)) [part="button"]::after {
198
+ animation: helix-button-turn var(--_button-turn) linear infinite;
199
+ block-size: var(--button-spinner-size, 1.15em);
200
+ border: var(--helix-border-thick) solid color-mix(in oklab, currentColor 30%, transparent);
201
+ border-block-start-color: currentColor;
202
+ border-radius: var(--helix-radii-full);
203
+ box-sizing: border-box;
204
+ content: "";
205
+ inline-size: var(--button-spinner-size, 1.15em);
206
+ inset: 0;
207
+ margin: auto;
208
+ position: absolute;
209
+ }
210
+
211
+ @keyframes helix-button-turn {
212
+ to {
213
+ rotate: 1turn;
214
+ }
215
+ }
216
+
217
+ @media (prefers-reduced-motion: reduce) {
218
+ :host(:state(pending)) [part="button"]::after {
219
+ animation-duration: calc(var(--helix-duration-slow) * 12);
220
+ }
221
+ }
222
+
186
223
  @media print {
187
224
  :host {
188
225
  display: none;
@@ -26,9 +26,11 @@ declare const HelixButton_base: (new (...args: any[]) => import("../../shared/mi
26
26
  * @slot start - Content before the label, usually an icon.
27
27
  *
28
28
  * @csspart button - The inner control.
29
+ * @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.
29
30
  *
30
31
  * @cssproperty --button-background-color - Fill behind the button, in every state.
31
32
  * @cssproperty --button-background-color-hover - Fill behind the button under the pointer. Without it, `--button-background-color` also applies on hover.
33
+ * @cssproperty --button-border-color - Edge color of an outlined button. The other emphases draw no edge.
32
34
  * @cssproperty --button-foreground-color - Label and icon color.
33
35
  * @cssproperty --button-gap - Space between the label and the content on either side of it.
34
36
  * @cssproperty --button-inline-size - Minimum width. It inherits, so you can set it once on a section for every button inside it.
@@ -41,6 +43,9 @@ declare const HelixButton_base: (new (...args: any[]) => import("../../shared/mi
41
43
  * @cssproperty --button-radius-start-end - The top trailing corner, for a group stacking down.
42
44
  * @cssproperty --button-radius-start-start - The top leading corner, for a group stacking down.
43
45
  * @cssproperty --button-size - Height of the control, for a row height outside the density steps.
46
+ * @cssproperty --button-spinner-size - Size of the ring a pending button turns. Defaults to the size of its icons.
47
+ *
48
+ * @cssstate pending - The button is pending: `pending` is set. A ring turns over its hidden words.
44
49
  */
45
50
  export declare class HelixButton extends HelixButton_base {
46
51
  /**
@@ -7,10 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessButton } from '@fusion.dev/helix-headless/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 './button-root.css.js';
12
13
  let HelixButton = class HelixButton extends MixinControlSurface(HelixHeadlessButton) {
13
- static { this.styles = styles; }
14
+ static { this.styles = [liveStyles, styles]; }
14
15
  };
15
16
  __decorate([
16
17
  property({ reflect: true })
@@ -1,8 +1,12 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
2
  export const styles = createSheet(`:host {
3
- --_callout-color: var(--helix-color-info);
3
+ --_callout-tone: var(--helix-color-info);
4
4
 
5
- font-size: var(--helix-text-sm);
5
+ --_callout-color: var(--callout-accent-color, var(--_callout-tone));
6
+ --_callout-bar: var(--callout-bar-thickness, var(--helix-border-thick));
7
+ --_callout-inset: var(--callout-padding, var(--helix-space-md));
8
+
9
+ font-size: var(--callout-font-size, var(--helix-text-sm));
6
10
  background-color: var(
7
11
  --callout-background-color,
8
12
  color-mix(in oklab, var(--_callout-color) 10%, transparent)
@@ -13,35 +17,45 @@ position: relative;
13
17
  border-radius: var(--callout-radius, var(--helix-radii-sm));
14
18
  color: var(--helix-color-foreground);
15
19
  display: flex;
16
- gap: var(--helix-space-sm);
20
+ gap: var(--callout-gap, var(--helix-space-sm));
17
21
 
18
- padding: var(--helix-space-md);
19
- padding-inline-start: calc(var(--helix-space-md) + var(--helix-border-thick));
22
+ padding: var(--_callout-inset);
23
+ padding-inline-start: calc(var(--_callout-inset) + var(--_callout-bar));
20
24
  }
21
25
 
22
26
  :host::before {
23
27
  background-color: var(--_callout-color);
24
28
  content: "";
25
- inline-size: var(--helix-border-thick);
29
+ inline-size: var(--_callout-bar);
26
30
  inset-block: 0;
27
31
  inset-inline-start: 0;
28
32
  position: absolute;
29
33
  }
30
34
 
31
35
  :host([tone="neutral"]) {
32
- --_callout-color: var(--helix-color-foreground-muted);
36
+ --_callout-tone: var(--helix-color-foreground-muted);
33
37
  }
34
38
 
35
39
  :host([tone="success"]) {
36
- --_callout-color: var(--helix-color-success);
40
+ --_callout-tone: var(--helix-color-success);
37
41
  }
38
42
 
39
43
  :host([tone="warning"]) {
40
- --_callout-color: var(--helix-color-warning);
44
+ --_callout-tone: var(--helix-color-warning);
41
45
  }
42
46
 
43
47
  :host([tone="danger"]) {
44
- --_callout-color: var(--helix-color-danger);
48
+ --_callout-tone: var(--helix-color-danger);
49
+ }
50
+
51
+ :host([separation="outlined"]) {
52
+ background-color: var(--callout-background-color, transparent);
53
+ box-shadow: inset 0 0 0 var(--helix-border-thin)
54
+ color-mix(in oklab, var(--_callout-color) 45%, var(--helix-color-background));
55
+ }
56
+
57
+ :host([separation="plain"]) {
58
+ background-color: var(--callout-background-color, transparent);
45
59
  }
46
60
 
47
61
  [part="icon"] {
@@ -67,11 +81,55 @@ line-height: var(--helix-leading-normal);
67
81
  min-inline-size: 0;
68
82
  }
69
83
 
84
+ [part="dismiss"] {
85
+ all: unset;
86
+
87
+ box-sizing: border-box;
88
+ block-size: calc(var(--helix-size-icon) + var(--helix-space-2xs) * 2);
89
+ border-radius: var(--helix-radii-sm);
90
+ color: var(--helix-color-foreground-muted);
91
+ cursor: pointer;
92
+ display: inline-flex;
93
+ flex: 0 0 auto;
94
+ inline-size: calc(var(--helix-size-icon) + var(--helix-space-2xs) * 2);
95
+ margin-block: calc(var(--helix-space-2xs) * -1);
96
+ margin-inline: auto calc(var(--helix-space-2xs) * -1);
97
+ place-content: center;
98
+ place-items: center;
99
+ transition:
100
+ background-color var(--helix-duration-fast) var(--helix-easing-standard),
101
+ color var(--helix-duration-fast) var(--helix-easing-standard);
102
+ }
103
+
104
+ [part="dismiss"]:hover {
105
+ background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);
106
+ color: var(--helix-color-foreground);
107
+ }
108
+
109
+ [part="dismiss"]:focus-visible {
110
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
111
+ outline-offset: var(--helix-size-focus-offset);
112
+ }
113
+
114
+ [part="dismiss"] svg,
115
+ slot[name="dismiss-icon"]::slotted(*) {
116
+ --icon-size: var(--helix-size-icon);
117
+
118
+ block-size: var(--helix-size-icon);
119
+ inline-size: var(--helix-size-icon);
120
+ }
121
+
122
+ @media (prefers-reduced-motion: reduce) {
123
+ [part="dismiss"] {
124
+ transition: none;
125
+ }
126
+ }
127
+
70
128
  slot[name="heading"]::slotted(*) {
71
129
  color: var(--helix-color-foreground);
72
130
 
73
131
  display: block;
74
- font-size: var(--helix-text-sm);
132
+ font-size: var(--callout-font-size, var(--helix-text-sm));
75
133
  font-weight: var(--helix-weight-semibold);
76
134
  margin: var(--helix-space-none);
77
135
  }
@@ -10,8 +10,9 @@ import type { CSSResultGroup } from 'lit';
10
10
  * A bar on the inline start edge also marks the tone, so it still shows in
11
11
  * grayscale and for people who do not distinguish the hues.
12
12
  *
13
- * This tier has no treatment property. `tone` is set on the headless tier and
14
- * carries the meaning, and this tier draws it.
13
+ * `tone` is set on the headless tier and carries the meaning, and this tier
14
+ * draws it. `separation` is where the box ends: absent is the tint with the
15
+ * bar, `outlined` an edge with no fill, and `plain` the bar and the mark alone.
15
16
  *
16
17
  * @since 0.1.0
17
18
  * @status stable
@@ -20,15 +21,37 @@ import type { CSSResultGroup } from 'lit';
20
21
  * @documentation https://fusion.dev/helix/components/callout
21
22
  *
22
23
  * @slot - The callout's content.
24
+ * @slot dismiss-icon - Replaces the cross inside the dismiss button.
25
+ * @slot heading - A heading above the content.
23
26
  * @slot icon - Replaces the icon chosen by `tone`.
24
27
  *
25
28
  * @csspart content - The content region.
29
+ * @csspart dismiss - The button that dismisses the callout, shown when `dismissible` is set.
30
+ * @csspart dismiss-mark - The cross on the dismiss button, shown when the `dismiss-icon` slot is empty.
26
31
  * @csspart icon - The icon region.
27
32
  *
33
+ * @cssproperty --callout-accent-color - The color of the bar, the mark and the tint, in place of the tone's.
28
34
  * @cssproperty --callout-background-color - The fill behind the callout.
35
+ * @cssproperty --callout-bar-thickness - The thickness of the bar on the inline start edge.
36
+ * @cssproperty --callout-font-size - The size of the callout's text.
37
+ * @cssproperty --callout-gap - The space between the mark and the content.
38
+ * @cssproperty --callout-padding - The inset around the content, to which the bar's width is added at the start.
29
39
  * @cssproperty --callout-radius - The corner radius of the callout.
30
40
  */
31
41
  export declare class HelixCallout extends HelixHeadlessCallout {
42
+ /**
43
+ * Where the callout's box ends, whatever its tone.
44
+ *
45
+ * Absent, or `filled`, is the tint with the bar, the resting look.
46
+ * `outlined` draws the tone at the edge with no fill, and `plain` keeps only
47
+ * the bar and the mark, for an aside in running prose. The bar stays in
48
+ * every one, being what says the tone where the hue is not seen.
49
+ *
50
+ * Web Awesome calls this `appearance`. It is `separation` here, as on
51
+ * `Announcement` and `Card`, since a box's edge and its meaning are two
52
+ * choices.
53
+ */
54
+ separation?: 'filled' | 'outlined' | 'plain';
32
55
  static styles: CSSResultGroup;
33
56
  }
34
57
  declare global {
@@ -6,10 +6,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessCallout } from '@fusion.dev/helix-headless/callout';
9
+ import { property } from 'lit/decorators.js';
9
10
  import { styles } from './callout-root.css.js';
10
11
  let HelixCallout = class HelixCallout extends HelixHeadlessCallout {
11
12
  static { this.styles = styles; }
12
13
  };
14
+ __decorate([
15
+ property({ reflect: true })
16
+ ], HelixCallout.prototype, "separation", void 0);
13
17
  HelixCallout = __decorate([
14
18
  customElement('helix-callout')
15
19
  ], HelixCallout);
@@ -17,7 +17,7 @@ color: var(--helix-color-foreground-muted);
17
17
 
18
18
  align-content: var(--card-align, start);
19
19
  display: grid;
20
- gap: var(--helix-space-sm);
20
+ gap: var(--card-gap, var(--helix-space-sm));
21
21
  grid-template-columns: minmax(0, 1fr);
22
22
  line-height: var(--helix-leading-normal);
23
23
 
@@ -39,6 +39,7 @@ border-color: transparent;
39
39
  }
40
40
 
41
41
  :host([separation="plain"]) {
42
+ --card-shadow: none;
42
43
  background-color: transparent;
43
44
  border-color: transparent;
44
45
  }
@@ -67,6 +68,31 @@ slot[name="footer"]::slotted(*) {
67
68
  justify-self: end;
68
69
  }
69
70
 
71
+ [part="header-row"],
72
+ [part="footer-row"] {
73
+ align-items: center;
74
+ display: flex;
75
+
76
+ flex-wrap: wrap;
77
+ gap: var(--card-gap, var(--helix-space-sm));
78
+ min-inline-size: 0;
79
+ }
80
+
81
+ [part="header-row"] slot[name="header"]::slotted(*) {
82
+ flex: 1 1 auto;
83
+ min-inline-size: 0;
84
+ }
85
+
86
+ slot[name="header-actions"]::slotted(*),
87
+ slot[name="footer-actions"]::slotted(*) {
88
+ flex: none;
89
+ justify-self: end;
90
+ }
91
+
92
+ [part="footer-row"] slot[name="footer-actions"]::slotted(*) {
93
+ margin-inline-start: auto;
94
+ }
95
+
70
96
  :host([orientation="horizontal"]) {
71
97
  padding-inline-start: calc(var(--_card-media) + var(--_card-inset));
72
98
  position: relative;
@@ -10,6 +10,11 @@ import type { CSSResultGroup } from 'lit';
10
10
  * slotted content directly: a header is the element you slotted, so there is no
11
11
  * part to target.
12
12
  *
13
+ * `header-actions` and `footer-actions` put controls at the end of the header's
14
+ * and the footer's line; the footer then moves to the start of its line. Put a
15
+ * header of more than one element in one wrapper, since the header and its
16
+ * actions share a line.
17
+ *
13
18
  * `media` runs edge to edge and clips to the card's corners, so an image needs
14
19
  * no inset. Set `orientation="horizontal"` to put the media beside the header,
15
20
  * content, and footer. Set `media-placement="end"` to put it below the content,
@@ -23,9 +28,14 @@ import type { CSSResultGroup } from 'lit';
23
28
  *
24
29
  * @slot - The card's main content.
25
30
  * @slot footer - Actions that conclude the card.
31
+ * @slot footer-actions - Controls at the end of the footer's line, with the footer at its start.
26
32
  * @slot header - Title and any actions for the whole card.
33
+ * @slot header-actions - Controls for the whole card at the end of the header's line, such as a menu.
27
34
  * @slot media - Image, video, or chart that runs edge to edge, outside the inset.
28
35
  *
36
+ * @csspart footer-row - The line holding `footer` and `footer-actions`, drawn only while `footer-actions` holds something.
37
+ * @csspart header-row - The line holding `header` and `header-actions`, drawn only while `header-actions` holds something.
38
+ *
29
39
  * @cssproperty --card-align - How the regions pack when the card is stretched
30
40
  * taller than its content. `start` by default, so the slack is at the bottom;
31
41
  * `space-between` puts a footer on the floor.
@@ -36,6 +46,7 @@ import type { CSSResultGroup } from 'lit';
36
46
  * @cssproperty --card-border-width - Width of the surface's edge. Follows
37
47
  * `--helix-border-surface`, which is a hairline unless your theme sets another width.
38
48
  * The edge is what sets the surface apart.
49
+ * @cssproperty --card-gap - Space between the regions, and between a header or footer and its actions.
39
50
  * @cssproperty --card-media-block-size - Height of the media region. Defaults to
40
51
  * `auto`, which follows an image's own proportions. A chart has no height of its own,
41
52
  * so set one here for a chart.
@@ -7,9 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessCarousel } from '@fusion.dev/helix-headless/carousel';
9
9
  import { property } from 'lit/decorators.js';
10
+ import { styles as liveStyles } from '../../shared/live/live.css.js';
10
11
  import { styles } from './carousel-root.css.js';
11
12
  let HelixCarousel = class HelixCarousel extends HelixHeadlessCarousel {
12
- static { this.styles = styles; }
13
+ static { this.styles = [liveStyles, styles]; }
13
14
  };
14
15
  __decorate([
15
16
  property({ attribute: 'controls-align', reflect: true })
@@ -54,7 +54,7 @@ border-color: var(--checkbox-border-color, var(--helix-color-foreground-muted));
54
54
  }
55
55
 
56
56
  :host(:state(checked)) [part="control"],
57
- :host([indeterminate]) [part="control"] {
57
+ :host(:state(indeterminate)) [part="control"] {
58
58
  border-color: var(
59
59
  --checkbox-border-color,
60
60
  var(--checkbox-checked-color, var(--helix-color-foreground))
@@ -78,7 +78,7 @@ transition: scale var(--helix-duration-fast) var(--helix-easing-emphasized);
78
78
  }
79
79
 
80
80
  :host(:state(checked)) [part~="mark"],
81
- :host([indeterminate]) [part~="mark"] {
81
+ :host(:state(indeterminate)) [part~="mark"] {
82
82
  scale: 1;
83
83
  }
84
84
 
@@ -97,7 +97,7 @@ border-color: var(--helix-color-danger);
97
97
  }
98
98
 
99
99
  :host(:state(invalid):state(checked)) [part="control"],
100
- :host(:state(invalid)[indeterminate]) [part="control"] {
100
+ :host(:state(invalid):state(indeterminate)) [part="control"] {
101
101
  border-color: var(--helix-color-danger);
102
102
  }
103
103
 
@@ -1,5 +1,6 @@
1
1
  import { HelixHeadlessCheckboxGroup } from '@fusion.dev/helix-headless/checkbox-group';
2
2
  import type { CSSResultGroup } from 'lit';
3
+ import '../../checkbox/index.js';
3
4
  /**
4
5
  * @summary A group of related checkboxes under one label, with one value for the set.
5
6
  *
@@ -16,6 +17,7 @@ import type { CSSResultGroup } from 'lit';
16
17
  * @cssproperty --checkbox-group-gap - The space between the checkboxes.
17
18
  */
18
19
  export declare class HelixCheckboxGroup extends HelixHeadlessCheckboxGroup {
20
+ static tier: string;
19
21
  /**
20
22
  * The direction the checkboxes run. Set `horizontal` for a row. Unset is a
21
23
  * column.
@@ -10,7 +10,9 @@ import { property } from 'lit/decorators.js';
10
10
  import { styles as fieldStyles } from '../../shared/field/field.css.js';
11
11
  import { styles as fieldStackedStyles } from '../../shared/field/field-stacked.css.js';
12
12
  import { styles } from './checkbox-group-root.css.js';
13
+ import '../../checkbox/index.js';
13
14
  let HelixCheckboxGroup = class HelixCheckboxGroup extends HelixHeadlessCheckboxGroup {
15
+ static { this.tier = 'helix-'; }
14
16
  static { this.styles = [fieldStyles, fieldStackedStyles, styles]; }
15
17
  };
16
18
  __decorate([
@@ -101,9 +101,32 @@ line-height: var(--helix-leading-normal);
101
101
 
102
102
  :host(:not([diff])) [part="code"] {
103
103
  display: block;
104
+
105
+ max-block-size: var(--code-block-max-block-size, none);
104
106
  overflow-x: auto;
105
107
  }
106
108
 
109
+ :host([wrap]:not([diff], [line-numbers])) [part="code"] {
110
+ overflow-wrap: anywhere;
111
+ white-space: pre-wrap;
112
+ }
113
+
114
+ :host([line-numbers]:not([diff])) [part="block"] {
115
+ column-gap: var(--helix-space-md);
116
+ display: grid;
117
+ grid-template-columns: auto minmax(0, 1fr);
118
+ }
119
+
120
+ [part="gutter"] {
121
+ color: var(--code-block-gutter-color, var(--helix-color-foreground-subtle));
122
+ font-family: var(--helix-font-mono);
123
+ font-size: var(--helix-text-sm);
124
+ font-variant-numeric: tabular-nums;
125
+ line-height: var(--helix-leading-normal);
126
+ text-align: end;
127
+ user-select: none;
128
+ }
129
+
107
130
  :host([diff]) {
108
131
  gap: var(--helix-space-md);
109
132
  }