@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
@@ -29,6 +29,8 @@ import type { CSSResultGroup } from 'lit';
29
29
  * @aliases Gauge, Level, Capacity
30
30
  * @documentation https://fusion.dev/helix/components/meter
31
31
  *
32
+ * @slot label - A visible label, above a bar and under a ring or an arc. Its words name it in place of `label`.
33
+ *
32
34
  * @csspart indicator - The part of the track the value fills.
33
35
  * @csspart indicator-fair - The fill while the reading is in a band next to the good band. Set alongside `indicator`.
34
36
  * @csspart indicator-good - The fill while the reading is in the good band. Set alongside `indicator`.
@@ -40,6 +42,9 @@ import type { CSSResultGroup } from 'lit';
40
42
  * @csspart value - The reading as text, shown when `show-value` is set.
41
43
  *
42
44
  * @cssproperty --meter-color - The fill color. Overrides the band's tone.
45
+ * @cssproperty --meter-label-color - The color of a slotted label.
46
+ * @cssproperty --meter-label-gap - The space between a slotted label and the meter.
47
+ * @cssproperty --meter-label-size - The type size of a slotted label.
43
48
  * @cssproperty --meter-ring-size - The width and height of the drawing in `ring` and `arc`.
44
49
  * @cssproperty --meter-ring-width - The thickness of the stroke in `ring` and `arc`.
45
50
  * @cssproperty --meter-size - The thickness of the bar.
@@ -6,7 +6,7 @@ display: block;
6
6
  [part="nav"] {
7
7
  align-items: center;
8
8
 
9
- block-size: var(--helix-size-control-sm);
9
+ block-size: var(--navigation-block-size, var(--helix-size-control-sm));
10
10
  display: flex;
11
11
  gap: var(--navigation-gap, var(--helix-space-2xs));
12
12
 
@@ -19,7 +19,8 @@ position: relative;
19
19
  [part="indicator"] {
20
20
  background-color: var(--navigation-indicator-color, var(--helix-color-surface-sunken));
21
21
  block-size: var(--indicator-block-size, 0);
22
- border-radius: var(--helix-radii-sm);
22
+ border-radius: var(--navigation-indicator-radius, var(--helix-radii-sm));
23
+ box-shadow: var(--navigation-indicator-shadow, none);
23
24
  inline-size: var(--indicator-inline-size, 0);
24
25
  inset-block-start: 50%;
25
26
  inset-inline-start: 0;
@@ -14,8 +14,14 @@ import type { CSSResultGroup } from 'lit';
14
14
  * @aliases Nav, NavList, Tabs
15
15
  * @documentation https://fusion.dev/helix/components/navigation
16
16
  *
17
+ * @cssproperty --navigation-block-size - Height of the bar in a row. Each destination fills it.
17
18
  * @cssproperty --navigation-gap - Space between destinations.
18
19
  * @cssproperty --navigation-indicator-color - Fill of the marker on the current destination.
20
+ * @cssproperty --navigation-indicator-radius - Corner radius of the marker.
21
+ * @cssproperty --navigation-indicator-shadow - Shadow under the marker, for a marker that sits
22
+ * raised on the bar.
23
+ * @cssproperty --navigation-item-color - Text color of a destination that is not the current one. Read by the page's stylesheet, which styles the links you slot.
24
+ * @cssproperty --navigation-item-current-color - Text color of the current destination, the one marked `aria-current="page"`.
19
25
  */
20
26
  export declare class HelixNavigation extends HelixHeadlessNavigation {
21
27
  static styles: CSSResultGroup;
@@ -241,6 +241,11 @@ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
241
241
  outline-offset: var(--helix-size-focus-offset);
242
242
  }
243
243
 
244
+ [part="item"]:focus-visible {
245
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
246
+ outline-offset: calc(var(--helix-size-focus-offset) * -1);
247
+ }
248
+
244
249
  @media print {
245
250
  [part="dismiss"] {
246
251
  display: none;
@@ -71,6 +71,28 @@ transition: color var(--helix-duration-fast) var(--helix-easing-standard);
71
71
  color: var(--helix-color-foreground);
72
72
  }
73
73
 
74
+ [part="more"] {
75
+ background: none;
76
+ border: 0;
77
+ border-block-start: var(--helix-border-thin) solid var(--helix-color-border);
78
+ color: var(--helix-color-foreground-muted);
79
+ cursor: pointer;
80
+ font-family: var(--helix-font-sans);
81
+ font-size: var(--helix-text-sm);
82
+ inline-size: 100%;
83
+ padding-block: var(--helix-space-sm);
84
+ transition: color var(--helix-duration-fast) var(--helix-easing-standard);
85
+ }
86
+
87
+ [part="more"]:hover {
88
+ color: var(--helix-color-foreground);
89
+ }
90
+
91
+ [part="more"]:focus-visible {
92
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
93
+ outline-offset: calc(var(--helix-size-focus-offset) * -1);
94
+ }
95
+
74
96
  [part="mark-all"]:focus-visible {
75
97
  outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
76
98
  outline-offset: var(--helix-size-focus-offset);
@@ -91,7 +113,8 @@ max-block-size: none;
91
113
  overflow-y: visible;
92
114
  }
93
115
 
94
- [part="mark-all"] {
116
+ [part="mark-all"],
117
+ [part="more"] {
95
118
  display: none;
96
119
  }
97
120
  }`);
@@ -25,6 +25,7 @@ import '../notification/notification.js';
25
25
  * @csspart list - The list itself.
26
26
  * @csspart live - A copy of the empty and loading messages, in a live region that screen readers announce when they change. Visually hidden in the styled tier.
27
27
  * @csspart mark-all - The control that marks everything read.
28
+ * @csspart more - The button after the list that asks for more, while `load-more` is set and the feed is not loading.
28
29
  *
29
30
  * @cssproperty --notifications-max-block-size - How tall the feed may get before the list scrolls.
30
31
  * @cssproperty --notifications-media-column - Width of the media column that every item keeps when any item in the feed has media.
@@ -2,9 +2,9 @@ import { createSheet } from '@fusion.dev/helix-core';
2
2
  export const styles = createSheet(`[part="field"] {
3
3
  align-items: center;
4
4
  background-color: var(--number-input-background-color, var(--helix-color-well));
5
- block-size: var(--helix-size-control);
6
- border: var(--helix-border-thin) solid var(--helix-color-border);
7
- border-radius: var(--helix-radii-sm);
5
+ block-size: var(--number-input-size, var(--helix-size-control));
6
+ border: var(--helix-border-thin) solid var(--number-input-border-color, var(--helix-color-border));
7
+ border-radius: var(--number-input-radius, var(--helix-radii-sm));
8
8
  box-sizing: border-box;
9
9
  display: flex;
10
10
 
@@ -33,6 +33,9 @@ import type { CSSResultGroup } from 'lit';
33
33
  * @csspart increment - The button that steps the value up.
34
34
  *
35
35
  * @cssproperty --number-input-background-color - The fill behind the number.
36
+ * @cssproperty --number-input-border-color - Edge of the field at rest. Hover, focus and an error still draw their own.
37
+ * @cssproperty --number-input-radius - Corner radius of the field.
38
+ * @cssproperty --number-input-size - Height of the field.
36
39
  */
37
40
  export declare class HelixNumberInput extends HelixHeadlessNumberInput {
38
41
  static styles: CSSResultGroup;
@@ -42,7 +42,31 @@ line-height: var(--helix-leading-normal);
42
42
  padding-block: var(--helix-space-xs);
43
43
  }
44
44
 
45
- [part="header"] + [part="frame"] [part="tree"] {
45
+ [part="search-field"] {
46
+ appearance: none;
47
+ background-color: var(--object-inspector-background-color, var(--helix-color-background));
48
+ border: var(--helix-border-thin) solid
49
+ var(--object-inspector-border-color, var(--helix-color-border));
50
+ border-block-end: none;
51
+ border-start-end-radius: var(--object-inspector-radius, var(--helix-radii-lg));
52
+ border-start-start-radius: var(--object-inspector-radius, var(--helix-radii-lg));
53
+ box-sizing: border-box;
54
+ color: var(--helix-color-foreground);
55
+ font-family: var(--helix-font-sans);
56
+ font-size: var(--helix-text-sm);
57
+ inline-size: 100%;
58
+ margin: 0;
59
+ padding-block: var(--helix-space-xs);
60
+ padding-inline: var(--helix-space-md);
61
+ }
62
+
63
+ [part="search-field"]:focus-visible {
64
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
65
+ outline-offset: calc(var(--helix-size-focus-offset) * -1);
66
+ }
67
+
68
+ [part="header"] + [part="search-field"],
69
+ :is([part="header"], [part="search-field"]) ~ [part="frame"] [part="tree"] {
46
70
  border-start-end-radius: var(--helix-radii-none);
47
71
  border-start-start-radius: var(--helix-radii-none);
48
72
  }
@@ -90,6 +114,13 @@ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
90
114
  outline-offset: calc(var(--helix-size-focus-offset) * -1);
91
115
  }
92
116
 
117
+ [part~="row-match"] {
118
+ background-color: var(
119
+ --object-inspector-match-background-color,
120
+ var(--helix-color-accent-subtle)
121
+ );
122
+ }
123
+
93
124
  [part="toggle"] {
94
125
  block-size: 1em;
95
126
  color: var(--helix-color-foreground-muted);
@@ -102,6 +133,10 @@ vertical-align: -0.125em;
102
133
  color: var(--helix-color-syntax-name);
103
134
  }
104
135
 
136
+ [part~="row-match"] [part="key"] {
137
+ color: var(--helix-color-foreground);
138
+ }
139
+
105
140
  [part="string"] {
106
141
  color: var(--helix-color-syntax-string);
107
142
  }
@@ -9,7 +9,9 @@ import '../../copy-button/index.js';
9
9
  * The styled tier draws the tree in the Code Block frame. Keys and each type of
10
10
  * value take their colors from the syntax colors code blocks use. Each row is
11
11
  * one line, and a long string ends in an ellipsis, so every row has the same
12
- * height and a windowed tree does not measure rows one by one.
12
+ * height and a windowed tree does not measure rows one by one. A filter's
13
+ * matches take a tinted ground, and the filter field is a band of the same
14
+ * frame, under the label.
13
15
  *
14
16
  * @since 0.1.0
15
17
  * @status stable
@@ -21,6 +23,7 @@ import '../../copy-button/index.js';
21
23
  * @cssproperty --object-inspector-block-size - The height of the scrolling box when `windowed` is set.
22
24
  * @cssproperty --object-inspector-border-color - The color of the edge around the tree and its header.
23
25
  * @cssproperty --object-inspector-header-background-color - The background of the bar that holds the label.
26
+ * @cssproperty --object-inspector-match-background-color - The background of an entry a filter matched.
24
27
  * @cssproperty --object-inspector-radius - The corner radius of the tree.
25
28
  */
26
29
  export declare class HelixObjectInspector extends HelixHeadlessObjectInspector {
@@ -6,11 +6,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement } from '@fusion.dev/helix-core';
8
8
  import { HelixHeadlessObjectInspector } from '@fusion.dev/helix-headless/object-inspector';
9
+ import { styles as liveStyles } from '../../shared/live/live.css.js';
9
10
  import { styles } from './object-inspector-root.css.js';
10
11
  import '../../copy-button/index.js';
11
12
  let HelixObjectInspector = class HelixObjectInspector extends HelixHeadlessObjectInspector {
12
13
  static { this.tier = 'helix-'; }
13
- static { this.styles = styles; }
14
+ static { this.styles = [liveStyles, styles]; }
14
15
  };
15
16
  HelixObjectInspector = __decorate([
16
17
  customElement('helix-object-inspector')
@@ -1,2 +1,2 @@
1
1
  export * from './root/orb-root.js';
2
- export * from './shapes.js';
2
+ export { ORB_STATES, type OrbState } from './shapes.js';
package/dist/orb/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from './root/orb-root.js';
2
- export * from './shapes.js';
2
+ export { ORB_STATES } from './shapes.js';
@@ -36,6 +36,10 @@ import { type OrbState } from '../shapes.js';
36
36
  * drawing of your own, the headless `Loader` holds the same busy progress bar
37
37
  * and its name.
38
38
  *
39
+ * Each state is also a custom state, such as `:state(thinking)` or
40
+ * `:state(done)`, so a page can style what sits around an orb by what it shows,
41
+ * whether the state was written as an attribute or set from script.
42
+ *
39
43
  * @since 0.8.0
40
44
  * @status stable
41
45
  * @category feedback
@@ -43,13 +47,31 @@ import { type OrbState } from '../shapes.js';
43
47
  * @documentation https://fusion.dev/helix/components/orb
44
48
  *
45
49
  * @csspart canvas - The canvas the dots are drawn on.
50
+ * @csspart live - The live region that says the new state when `announce` is set. It is rendered from the first change of state and clipped out of view.
46
51
  *
47
52
  * @cssproperty --orb-color - The color of the nearest dots. Defaults to `currentColor`.
48
53
  * @cssproperty --orb-ground - The color the farthest dots fade toward. Defaults to the page's background.
49
54
  * @cssproperty --orb-size - The diameter. Overrides `size`.
55
+ *
56
+ * @cssstate connecting - The orb shows `connecting`.
57
+ * @cssstate done - The orb shows `done`.
58
+ * @cssstate fetching - The orb shows `fetching`.
59
+ * @cssstate listening - The orb shows `listening`.
60
+ * @cssstate thinking - The orb shows `thinking`, which is also what a state it does not draw shows.
61
+ * @cssstate waiting - The orb shows `waiting`.
62
+ * @cssstate working - The orb shows `working`.
50
63
  */
51
64
  export declare class HelixOrb extends HelixElement {
52
65
  static styles: CSSResultGroup;
66
+ /**
67
+ * Says each new state through a polite live region, such as "Working" and
68
+ * then "Done".
69
+ *
70
+ * Off by default, because the name and the busy state already change with
71
+ * the state, and an orb beside a stream of messages would otherwise talk
72
+ * over them. Set it on an orb that is the only sign of progress on the page.
73
+ */
74
+ announce: boolean;
53
75
  /**
54
76
  * The name read by screen readers. Defaults to the name of the state, such
55
77
  * as "Thinking".
@@ -82,18 +104,22 @@ export declare class HelixOrb extends HelixElement {
82
104
  * verb we have not made a shape for should cost a reader a less specific
83
105
  * indicator, not an empty box where the indicator was.
84
106
  *
85
- * Not reflected: no rule selects on it, because the state is drawn rather than
86
- * styled. A consumer writing the attribute can still select on their own
87
- * markup.
107
+ * Not reflected, because a state set from script would then write an
108
+ * attribute onto the host after a server sent it without one. Each state is
109
+ * a custom state instead, such as `:state(working)`.
88
110
  */
89
111
  state: OrbState;
90
112
  /**
91
113
  * The word for each state, for a page in another language.
92
114
  *
93
- * A state left out keeps its English word, and `label` wins over both. It is
94
- * a property with no attribute, keyed by state, such as `{ thinking: '…' }`.
115
+ * A state left out keeps its English word, and `label` wins over both.
116
+ * Keyed by state, such as `{ thinking: '…' }`. As an attribute it is that
117
+ * object as JSON, such as `state-labels='{"done":"Terminé"}'`, so server
118
+ * markup and plain HTML can carry the words too.
95
119
  */
96
120
  stateLabels: Partial<Record<OrbState, string>>;
121
+ /** The region `announce` speaks in. */
122
+ private readonly status;
97
123
  private canvas;
98
124
  private context;
99
125
  /**
@@ -4,9 +4,10 @@ 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, hostAria, PaintGateController, readColor, } from '@fusion.dev/helix-core';
7
+ import { customElement, drawStatus, HelixElement, hostAria, PaintGateController, readColor, StatusController, } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
+ import { styles as liveStyles } from '../../shared/live/live.css.js';
10
11
  import { blendStaged, evenSphere, fibonacci, meshFor, ORB_STATES, orbPoint, paramsFor, project, smoother, stateDistance, TRAIL, } from '../shapes.js';
11
12
  import { styles } from './orb-root.css.js';
12
13
  const MORPH_NEAR = 380;
@@ -22,13 +23,28 @@ const LABELS = {
22
23
  waiting: 'Waiting',
23
24
  working: 'Working',
24
25
  };
26
+ const labelsConverter = {
27
+ fromAttribute: (value) => {
28
+ try {
29
+ const parsed = JSON.parse(value ?? '');
30
+ return parsed && typeof parsed === 'object' && !Array.isArray(parsed)
31
+ ? parsed
32
+ : {};
33
+ }
34
+ catch {
35
+ return {};
36
+ }
37
+ },
38
+ };
25
39
  const GRAY = [128, 128, 128];
26
40
  let HelixOrb = class HelixOrb extends HelixElement {
27
41
  constructor() {
28
42
  super(...arguments);
43
+ this.announce = false;
29
44
  this.label = '';
30
45
  this.state = 'thinking';
31
46
  this.stateLabels = {};
47
+ this.status = new StatusController(this);
32
48
  this.context = null;
33
49
  this.gate = new PaintGateController(this, {
34
50
  canRun: () => !!this.context && !this.lost,
@@ -67,7 +83,7 @@ let HelixOrb = class HelixOrb extends HelixElement {
67
83
  this.gate.play();
68
84
  };
69
85
  }
70
- static { this.styles = styles; }
86
+ static { this.styles = [liveStyles, styles]; }
71
87
  willUpdate(changed) {
72
88
  super.willUpdate(changed);
73
89
  const state = ORB_STATES.includes(this.state)
@@ -78,12 +94,22 @@ let HelixOrb = class HelixOrb extends HelixElement {
78
94
  role: state === 'done' ? 'img' : 'progressbar',
79
95
  });
80
96
  this.internals.ariaBusy = state === 'done' ? 'false' : 'true';
97
+ this.toggleState('connecting', state === 'connecting');
98
+ this.toggleState('done', state === 'done');
99
+ this.toggleState('fetching', state === 'fetching');
100
+ this.toggleState('listening', state === 'listening');
101
+ this.toggleState('thinking', state === 'thinking');
102
+ this.toggleState('waiting', state === 'waiting');
103
+ this.toggleState('working', state === 'working');
81
104
  if (changed.has('state') && changed.get('state') !== undefined) {
82
105
  this.turn();
106
+ if (this.announce) {
107
+ this.status.say(this.label || this.stateLabels[state] || LABELS[state]);
108
+ }
83
109
  }
84
110
  }
85
111
  render() {
86
- return html `<canvas part="canvas" aria-hidden="true"></canvas>`;
112
+ return html `<canvas part="canvas" aria-hidden="true"></canvas>${drawStatus(this.status)}`;
87
113
  }
88
114
  firstUpdated(changed) {
89
115
  super.firstUpdated(changed);
@@ -236,6 +262,9 @@ let HelixOrb = class HelixOrb extends HelixElement {
236
262
  }
237
263
  }
238
264
  };
265
+ __decorate([
266
+ property({ type: Boolean })
267
+ ], HelixOrb.prototype, "announce", void 0);
239
268
  __decorate([
240
269
  property()
241
270
  ], HelixOrb.prototype, "label", void 0);
@@ -246,7 +275,7 @@ __decorate([
246
275
  property()
247
276
  ], HelixOrb.prototype, "state", void 0);
248
277
  __decorate([
249
- property({ attribute: false })
278
+ property({ attribute: 'state-labels', converter: labelsConverter })
250
279
  ], HelixOrb.prototype, "stateLabels", void 0);
251
280
  HelixOrb = __decorate([
252
281
  customElement('helix-orb')
@@ -123,6 +123,16 @@ var(--outline-indent, var(--helix-space-sm))
123
123
  );
124
124
  }
125
125
 
126
+ ::slotted([slot="heading"]) {
127
+ color: var(--helix-color-foreground);
128
+ font-size: var(--helix-text-xs);
129
+ font-weight: var(--helix-weight-semibold);
130
+ line-height: var(--helix-leading-normal);
131
+ margin-block: 0 var(--helix-space-xs);
132
+ margin-inline: 0;
133
+ padding-inline-start: calc(var(--outline-rail) + var(--helix-space-sm));
134
+ }
135
+
126
136
  @media print {
127
137
  :host {
128
138
  print-color-adjust: economy;
@@ -12,6 +12,13 @@ import type { CSSResultGroup } from 'lit';
12
12
  * `data-level` is at the top level. The outline does not read heading levels
13
13
  * from the document, because the headings are not always in the document.
14
14
  *
15
+ * Links in a nested `<ul>` take their indentation from your own stylesheet:
16
+ * the outline's styles reach the elements slotted into it and nothing inside
17
+ * them. Write the links flat with `data-level` for the indentation drawn here,
18
+ * and screen readers still hear them as nested lists.
19
+ *
20
+ * A heading slotted into `heading` is set above the links, lined up with them.
21
+ *
15
22
  * @since 0.1.0
16
23
  * @status stable
17
24
  * @category navigation
@@ -13,10 +13,11 @@ gap: var(--pin-input-gap, var(--helix-space-xs));
13
13
 
14
14
  [part="cell"] {
15
15
  all: unset;
16
- background-color: var(--helix-color-well);
17
- block-size: var(--helix-size-control);
18
- border: var(--helix-border-thin) solid var(--helix-color-border);
19
- border-radius: var(--helix-radii-sm);
16
+ background-color: var(--pin-input-cell-background-color, var(--helix-color-well));
17
+ block-size: var(--pin-input-cell-size, var(--helix-size-control));
18
+ border: var(--helix-border-thin) solid
19
+ var(--pin-input-cell-border-color, var(--helix-color-border));
20
+ border-radius: var(--pin-input-cell-radius, var(--helix-radii-sm));
20
21
  box-sizing: border-box;
21
22
  color: var(--helix-color-foreground);
22
23
  font-family: var(--helix-font-sans);
@@ -24,7 +25,7 @@ font-size: var(--helix-text-lg);
24
25
 
25
26
  font-variant-numeric: tabular-nums;
26
27
  font-weight: var(--helix-weight-medium);
27
- inline-size: var(--helix-size-control);
28
+ inline-size: var(--pin-input-cell-size, var(--helix-size-control));
28
29
  text-align: center;
29
30
  transition: border-color var(--helix-duration-fast) var(--helix-easing-standard);
30
31
  }
@@ -56,6 +57,12 @@ background-color: transparent;
56
57
  font-size: var(--helix-text-xl);
57
58
  }
58
59
 
60
+ [part="separator"] {
61
+ align-self: center;
62
+ color: var(--helix-color-foreground-muted);
63
+ font-size: var(--helix-text-lg);
64
+ }
65
+
59
66
  [part="cell"]::placeholder {
60
67
  color: var(--helix-color-foreground-subtle);
61
68
  }
@@ -21,7 +21,12 @@ import type { CSSResultGroup } from 'lit';
21
21
  *
22
22
  * @csspart cell - One box.
23
23
  * @csspart field - The row of boxes.
24
+ * @csspart separator - The text `format` draws between two boxes.
24
25
  *
26
+ * @cssproperty --pin-input-cell-background-color - Fill behind each box.
27
+ * @cssproperty --pin-input-cell-border-color - Edge of each box at rest. Hover, focus and an error still draw their own.
28
+ * @cssproperty --pin-input-cell-radius - Corner radius of each box.
29
+ * @cssproperty --pin-input-cell-size - Width and height of each box.
25
30
  * @cssproperty --pin-input-gap - The space between one box and the next.
26
31
  */
27
32
  export declare class HelixPinInput extends HelixHeadlessPinInput {
@@ -11,6 +11,9 @@ background-color: var(--helix-color-surface-overlay);
11
11
  border: var(--popover-border-width, var(--helix-border-floating)) solid
12
12
  var(--popover-border-color, var(--helix-color-border));
13
13
 
14
+ --_popover-edge: var(--popover-border-width, var(--helix-border-floating)) solid
15
+ var(--popover-border-color, var(--helix-color-border));
16
+
14
17
  border-radius: var(--helix-radii-sm);
15
18
  box-shadow: var(--popover-shadow, var(--helix-shadow-floating));
16
19
  box-sizing: border-box;
@@ -89,6 +92,39 @@ padding: var(--popover-padding, var(--helix-space-md));
89
92
  padding: var(--popover-padding, var(--helix-space-none));
90
93
  }
91
94
 
95
+ [part="popover"]:focus,
96
+ [part="popover"]:focus-visible {
97
+ outline: none;
98
+ }
99
+
100
+ [part~="arrow"] {
101
+ background-color: var(--helix-color-surface-overlay);
102
+ block-size: var(--popover-arrow-size, 0.5rem);
103
+ inline-size: var(--popover-arrow-size, 0.5rem);
104
+ position: absolute;
105
+ rotate: 45deg;
106
+ }
107
+
108
+ [part="popover"][data-placement^="bottom"] [part~="arrow"] {
109
+ border-left: var(--_popover-edge);
110
+ border-top: var(--_popover-edge);
111
+ }
112
+
113
+ [part="popover"][data-placement^="top"] [part~="arrow"] {
114
+ border-bottom: var(--_popover-edge);
115
+ border-right: var(--_popover-edge);
116
+ }
117
+
118
+ [part="popover"][data-placement^="right"] [part~="arrow"] {
119
+ border-bottom: var(--_popover-edge);
120
+ border-left: var(--_popover-edge);
121
+ }
122
+
123
+ [part="popover"][data-placement^="left"] [part~="arrow"] {
124
+ border-right: var(--_popover-edge);
125
+ border-top: var(--_popover-edge);
126
+ }
127
+
92
128
  @media print {
93
129
  :host {
94
130
  display: none;
@@ -18,6 +18,7 @@ import type { CSSResultGroup } from 'lit';
18
18
  * @aliases Popper, Flyout, Overlay
19
19
  * @documentation https://fusion.dev/helix/components/popover
20
20
  *
21
+ * @cssproperty --popover-arrow-size - Size of the point drawn with `arrow`. Tooltip's point is the same size.
21
22
  * @cssproperty --popover-border-color - Color of the panel's edge.
22
23
  * @cssproperty --popover-border-width - Width of the panel's edge. Defaults to
23
24
  * `--helix-border-floating`, which is `0`, so the panel stands out by its shadow unless
@@ -5,9 +5,29 @@ display: block;
5
5
 
6
6
  :host([show-value]) {
7
7
  align-items: center;
8
+ column-gap: var(--helix-space-sm);
8
9
  display: grid;
9
- gap: var(--helix-space-sm);
10
10
  grid-template-columns: 1fr auto;
11
+
12
+ row-gap: var(--progress-label-gap, var(--helix-space-2xs));
13
+ }
14
+
15
+ slot[name="label"]::slotted(*) {
16
+ color: var(--progress-label-color, var(--helix-color-foreground));
17
+ display: block;
18
+ font-size: var(--progress-label-size, var(--helix-text-sm));
19
+ grid-column: 1 / -1;
20
+ margin-block-end: var(--progress-label-gap, var(--helix-space-2xs));
21
+ }
22
+
23
+ :host([show-value]) slot[name="label"]::slotted(*) {
24
+ margin-block-end: 0;
25
+ }
26
+
27
+ :host([shape="ring"]) slot[name="label"]::slotted(*) {
28
+
29
+ grid-column: 1;
30
+ margin-block: 0;
11
31
  }
12
32
 
13
33
  [part="value"] {
@@ -98,6 +118,7 @@ translate: 0;
98
118
  :host([shape="ring"]) {
99
119
  display: inline-grid;
100
120
  place-items: center;
121
+ row-gap: var(--progress-label-gap, var(--helix-space-2xs));
101
122
  }
102
123
 
103
124
  :host([shape="ring"]) [part="track"] {
@@ -18,7 +18,12 @@ import type { CSSResultGroup } from 'lit';
18
18
  * @aliases Progress bar, Loading bar
19
19
  * @documentation https://fusion.dev/helix/components/progress
20
20
  *
21
+ * @slot label - A visible label, above a bar and under a ring. Its words name it in place of `label`.
22
+ *
21
23
  * @cssproperty --progress-color - Fill of the part that is done.
24
+ * @cssproperty --progress-label-color - Color of a slotted label.
25
+ * @cssproperty --progress-label-gap - Space between a slotted label and the bar.
26
+ * @cssproperty --progress-label-size - Type size of a slotted label.
22
27
  * @cssproperty --progress-ring-size - Diameter of the ring.
23
28
  * @cssproperty --progress-ring-width - Thickness of the ring's stroke.
24
29
  * @cssproperty --progress-size - Thickness of the bar.
@@ -8,7 +8,7 @@ font: inherit;
8
8
 
9
9
  color: var(--quote-color, var(--helix-color-foreground-muted));
10
10
  font: inherit;
11
- font-style: italic;
11
+ font-style: var(--quote-font-style, italic);
12
12
  }
13
13
 
14
14
  @media print {
@@ -14,6 +14,7 @@ import type { CSSResultGroup } from 'lit';
14
14
  * @documentation https://fusion.dev/helix/components/quote
15
15
  *
16
16
  * @cssproperty --quote-color - Color of the quoted text.
17
+ * @cssproperty --quote-font-style - The slant of the quoted text, `italic` by default. Set `normal` for a face whose italic is too loud, or `oblique` for one with no italic of its own.
17
18
  */
18
19
  export declare class HelixQuote extends HelixHeadlessQuote {
19
20
  static styles: CSSResultGroup;