@fusion.dev/helix 0.143.0 → 0.145.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/custom-elements.json +19817 -1238
  2. package/dist/accordion/item/accordion-item.css.js +14 -3
  3. package/dist/accordion/item/accordion-item.d.ts +2 -0
  4. package/dist/aura/palette.d.ts +38 -0
  5. package/dist/aura/palette.js +22 -0
  6. package/dist/aura/root/aura-root.css.js +24 -3
  7. package/dist/aura/root/aura-root.d.ts +42 -7
  8. package/dist/aura/root/aura-root.js +31 -25
  9. package/dist/badge/root/badge-root.css.js +35 -0
  10. package/dist/badge/root/badge-root.d.ts +16 -0
  11. package/dist/badge/root/badge-root.js +3 -0
  12. package/dist/blockquote/root/blockquote-root.css.js +5 -5
  13. package/dist/blockquote/root/blockquote-root.d.ts +5 -0
  14. package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +7 -7
  15. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +5 -0
  16. package/dist/breadcrumbs/root/breadcrumbs-root.css.js +1 -1
  17. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +3 -0
  18. package/dist/breadcrumbs/root/breadcrumbs-root.js +2 -0
  19. package/dist/button/root/button-root.css.js +38 -1
  20. package/dist/button/root/button-root.d.ts +5 -0
  21. package/dist/button/root/button-root.js +2 -1
  22. package/dist/button-group/root/button-group-root.d.ts +3 -0
  23. package/dist/callout/root/callout-root.css.js +69 -11
  24. package/dist/callout/root/callout-root.d.ts +25 -2
  25. package/dist/callout/root/callout-root.js +4 -0
  26. package/dist/canvas/root/canvas-root.css.js +1 -0
  27. package/dist/card/root/card-root.css.js +26 -1
  28. package/dist/card/root/card-root.d.ts +11 -0
  29. package/dist/carousel/root/carousel-root.css.js +17 -1
  30. package/dist/checkbox-group/root/checkbox-group-root.d.ts +2 -0
  31. package/dist/checkbox-group/root/checkbox-group-root.js +2 -0
  32. package/dist/code-block/root/code-block-root.css.js +23 -0
  33. package/dist/code-block/root/code-block-root.d.ts +15 -0
  34. package/dist/code-block/root/code-block-root.js +8 -0
  35. package/dist/color-picker/root/color-picker-root.css.js +64 -0
  36. package/dist/color-picker/root/color-picker-root.d.ts +2 -0
  37. package/dist/copy-button/root/copy-button-root.css.js +5 -0
  38. package/dist/data-table/root/data-table-root.css.js +63 -0
  39. package/dist/data-table/root/data-table-root.d.ts +1 -0
  40. package/dist/date-input/root/date-input-root.css.js +19 -0
  41. package/dist/date-input/root/date-input-root.d.ts +8 -0
  42. package/dist/date-input/root/date-input-root.js +2 -0
  43. package/dist/date-picker/root/date-picker-root.css.js +68 -0
  44. package/dist/date-picker/root/date-picker-root.d.ts +1 -0
  45. package/dist/description-list/item/description-list-item.css.js +11 -0
  46. package/dist/dialog/root/dialog-root.css.js +47 -0
  47. package/dist/divider/root/divider-root.css.js +8 -3
  48. package/dist/divider/root/divider-root.d.ts +17 -1
  49. package/dist/divider/root/divider-root.js +4 -0
  50. package/dist/drawer/root/drawer-root.css.js +28 -1
  51. package/dist/drilldown/item/drilldown-item.css.js +2 -1
  52. package/dist/drilldown/root/drilldown-root.css.js +2 -1
  53. package/dist/element-events.generated.js +66 -14
  54. package/dist/empty/root/empty-root.css.js +9 -9
  55. package/dist/empty/root/empty-root.d.ts +9 -0
  56. package/dist/file-input/root/file-input-root.js +2 -0
  57. package/dist/filter-input/root/filter-input-root.js +2 -0
  58. package/dist/flex/root/flex-root.css.js +134 -9
  59. package/dist/flex/root/flex-root.d.ts +51 -5
  60. package/dist/flex/root/flex-root.js +17 -1
  61. package/dist/grid/root/grid-root.css.js +114 -11
  62. package/dist/grid/root/grid-root.d.ts +37 -0
  63. package/dist/grid/root/grid-root.js +13 -1
  64. package/dist/heatmap/root/heatmap-root.css.js +33 -5
  65. package/dist/heatmap/root/heatmap-root.d.ts +4 -1
  66. package/dist/icon/index.d.ts +1 -0
  67. package/dist/icon/index.js +1 -0
  68. package/dist/icon/root/icon-root.d.ts +1 -1
  69. package/dist/icon/root/icon-root.js +1 -1
  70. package/dist/icon/root/index.d.ts +2 -0
  71. package/dist/icon/root/index.js +2 -0
  72. package/dist/icon-button/root/icon-button-root.css.js +37 -0
  73. package/dist/icon-button/root/icon-button-root.d.ts +4 -0
  74. package/dist/icon-button/root/icon-button-root.js +2 -1
  75. package/dist/input/root/input-root.css.js +3 -3
  76. package/dist/input/root/input-root.d.ts +3 -0
  77. package/dist/legend/root/legend-root.css.js +40 -13
  78. package/dist/legend/root/legend-root.d.ts +6 -0
  79. package/dist/legend/root/legend-root.js +1 -1
  80. package/dist/lightbox/root/lightbox-root.css.js +84 -0
  81. package/dist/lightbox/root/lightbox-root.d.ts +1 -0
  82. package/dist/list/item/list-item.css.js +21 -1
  83. package/dist/list/item/list-item.d.ts +3 -0
  84. package/dist/list/root/list-root.css.js +13 -1
  85. package/dist/loader/root/loader-root.css.js +10 -0
  86. package/dist/loader/root/loader-root.d.ts +3 -0
  87. package/dist/menu/index.d.ts +1 -0
  88. package/dist/menu/index.js +1 -0
  89. package/dist/menu/item/menu-item.css.js +15 -1
  90. package/dist/menu/item/menu-item.d.ts +3 -0
  91. package/dist/menu/item/menu-item.js +2 -0
  92. package/dist/menu/section/menu-section.css.d.ts +1 -0
  93. package/dist/menu/section/menu-section.css.js +14 -0
  94. package/dist/menu/section/menu-section.d.ts +24 -0
  95. package/dist/menu/section/menu-section.js +16 -0
  96. package/dist/meter/root/meter-root.css.js +23 -1
  97. package/dist/meter/root/meter-root.d.ts +5 -0
  98. package/dist/navigation/root/navigation-root.css.js +3 -2
  99. package/dist/navigation/root/navigation-root.d.ts +6 -0
  100. package/dist/notifications/notification/notification.css.js +5 -0
  101. package/dist/notifications/root/notifications-root.css.js +24 -1
  102. package/dist/notifications/root/notifications-root.d.ts +1 -0
  103. package/dist/number-input/root/number-input-root.css.js +3 -3
  104. package/dist/number-input/root/number-input-root.d.ts +3 -0
  105. package/dist/object-inspector/root/object-inspector-root.css.js +36 -1
  106. package/dist/object-inspector/root/object-inspector-root.d.ts +4 -1
  107. package/dist/object-inspector/root/object-inspector-root.js +2 -1
  108. package/dist/orb/index.d.ts +1 -1
  109. package/dist/orb/index.js +1 -1
  110. package/dist/orb/root/orb-root.d.ts +31 -5
  111. package/dist/orb/root/orb-root.js +33 -4
  112. package/dist/outline/root/outline-root.css.js +10 -0
  113. package/dist/outline/root/outline-root.d.ts +7 -0
  114. package/dist/pin-input/root/pin-input-root.css.js +12 -5
  115. package/dist/pin-input/root/pin-input-root.d.ts +5 -0
  116. package/dist/popover/root/popover-root.css.js +36 -0
  117. package/dist/popover/root/popover-root.d.ts +1 -0
  118. package/dist/progress/root/progress-root.css.js +22 -1
  119. package/dist/progress/root/progress-root.d.ts +5 -0
  120. package/dist/quote/root/quote-root.css.js +1 -1
  121. package/dist/quote/root/quote-root.d.ts +1 -0
  122. package/dist/sandbox/frame.d.ts +63 -0
  123. package/dist/sandbox/frame.js +132 -0
  124. package/dist/sandbox/index.d.ts +1 -0
  125. package/dist/sandbox/index.js +1 -0
  126. package/dist/sandbox/levels.d.ts +10 -0
  127. package/dist/sandbox/levels.js +5 -0
  128. package/dist/sandbox/root/sandbox-root.d.ts +3 -0
  129. package/dist/sandbox/root/sandbox-root.js +13 -3
  130. package/dist/sandbox/source/sandbox-source.d.ts +1 -0
  131. package/dist/sandbox/source/sandbox-source.js +7 -3
  132. package/dist/sandbox/terminal/sandbox-terminal.css.js +39 -0
  133. package/dist/sandbox/terminal/sandbox-terminal.d.ts +42 -1
  134. package/dist/sandbox/terminal/sandbox-terminal.js +47 -3
  135. package/dist/scroll-area/root/scroll-area-root.css.js +83 -1
  136. package/dist/scroll-area/root/scroll-area-root.d.ts +6 -0
  137. package/dist/shared/chart/tooltip.css.js +25 -2
  138. package/dist/shared/field/field-segments.css.d.ts +1 -0
  139. package/dist/shared/field/field-segments.css.js +40 -0
  140. package/dist/skeleton/root/skeleton-root.css.js +56 -5
  141. package/dist/skeleton/root/skeleton-root.d.ts +17 -1
  142. package/dist/skeleton/root/skeleton-root.js +3 -0
  143. package/dist/skip-link/root/skip-link-root.css.js +8 -8
  144. package/dist/skip-link/root/skip-link-root.d.ts +9 -0
  145. package/dist/speed-dial/item/speed-dial-item.css.js +11 -4
  146. package/dist/speed-dial/item/speed-dial-item.d.ts +4 -0
  147. package/dist/speed-dial/root/speed-dial-root.css.js +7 -3
  148. package/dist/speed-dial/root/speed-dial-root.d.ts +9 -0
  149. package/dist/speed-dial/root/speed-dial-root.js +4 -0
  150. package/dist/stat/root/stat-root.css.js +7 -7
  151. package/dist/stat/root/stat-root.d.ts +8 -0
  152. package/dist/steps/step/step.js +2 -1
  153. package/dist/switch/root/switch-root.css.js +13 -5
  154. package/dist/switch/root/switch-root.d.ts +25 -1
  155. package/dist/switch/root/switch-root.js +7 -0
  156. package/dist/table/root/table-root.css.js +18 -0
  157. package/dist/table/root/table-root.d.ts +6 -0
  158. package/dist/table/root/table-root.js +2 -0
  159. package/dist/table/row/table-row.css.js +18 -0
  160. package/dist/table/row/table-row.d.ts +2 -0
  161. package/dist/table/row/table-row.js +2 -0
  162. package/dist/tabs/panel/tab-panel.css.js +5 -1
  163. package/dist/tabs/root/tabs-root.css.js +56 -1
  164. package/dist/tabs/tab/tab.css.js +5 -1
  165. package/dist/tag/group/tag-group.css.d.ts +1 -0
  166. package/dist/tag/group/tag-group.css.js +6 -0
  167. package/dist/tag/group/tag-group.d.ts +25 -0
  168. package/dist/tag/group/tag-group.js +16 -0
  169. package/dist/tag/index.d.ts +1 -0
  170. package/dist/tag/index.js +1 -0
  171. package/dist/tag/root/tag-root.css.js +50 -0
  172. package/dist/tag/root/tag-root.d.ts +4 -0
  173. package/dist/text/clamp.d.ts +8 -0
  174. package/dist/text/clamp.js +1 -0
  175. package/dist/text/root/text-root.css.js +85 -45
  176. package/dist/text/root/text-root.d.ts +48 -7
  177. package/dist/text/root/text-root.js +17 -11
  178. package/dist/textarea/root/textarea-root.css.js +12 -4
  179. package/dist/textarea/root/textarea-root.d.ts +4 -0
  180. package/dist/time-input/root/time-input-root.css.js +19 -0
  181. package/dist/time-input/root/time-input-root.d.ts +8 -0
  182. package/dist/time-input/root/time-input-root.js +2 -0
  183. package/dist/timeline/group/timeline-group.css.d.ts +1 -0
  184. package/dist/timeline/group/timeline-group.css.js +32 -0
  185. package/dist/timeline/group/timeline-group.d.ts +25 -0
  186. package/dist/timeline/group/timeline-group.js +16 -0
  187. package/dist/timeline/index.d.ts +1 -0
  188. package/dist/timeline/index.js +1 -0
  189. package/dist/timeline/item/timeline-item.css.js +43 -16
  190. package/dist/timeline/root/timeline-root.css.js +56 -0
  191. package/dist/timeline/root/timeline-root.d.ts +26 -0
  192. package/dist/timeline/root/timeline-root.js +7 -0
  193. package/dist/toast/item/toast-item.css.js +16 -0
  194. package/dist/toggle/group/toggle-group.css.js +16 -0
  195. package/dist/toolbar/root/toolbar-root.css.js +3 -0
  196. package/dist/toolbar/root/toolbar-root.d.ts +3 -0
  197. package/dist/tour/root/tour-root.css.js +8 -0
  198. package/dist/tour/stop/tour-stop.css.js +32 -0
  199. package/dist/tree/item/tree-item.css.js +72 -0
  200. package/dist/tree/item/tree-item.d.ts +10 -0
  201. package/dist/trend/root/trend-root.css.js +12 -5
  202. package/dist/trend/root/trend-root.d.ts +6 -1
  203. package/dist/video/root/video-root.css.js +6 -0
  204. package/dist/video/root/video-root.d.ts +3 -0
  205. package/dist/virtual-list/root/virtual-list-root.css.js +5 -0
  206. package/dist/virtual-list/root/virtual-list-root.d.ts +4 -3
  207. package/lint.json +1 -1
  208. package/package.json +6 -6
  209. package/types/jsx.d.ts +8620 -813
  210. package/types/svelte.d.ts +3 -0
  211. package/types/vue.d.ts +2372 -213
@@ -1,8 +1,14 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
2
  export const styles = createSheet(`:host {
3
+
4
+ --_flex-column-gap: var(--_flex-gap);
5
+ --_flex-gap: var(--helix-space-none);
6
+ --_flex-row-gap: var(--_flex-gap);
7
+
8
+ column-gap: var(--_flex-column-gap);
3
9
  display: flex;
4
10
  flex-direction: row;
5
- gap: var(--helix-space-none);
11
+ row-gap: var(--_flex-row-gap);
6
12
  }
7
13
 
8
14
  :host([inline]) {
@@ -13,34 +19,127 @@ display: inline-flex;
13
19
  flex-direction: column;
14
20
  }
15
21
 
22
+ :host([direction="row-reverse"]) {
23
+ flex-direction: row-reverse;
24
+ }
25
+
26
+ :host([direction="column-reverse"]) {
27
+ flex-direction: column-reverse;
28
+ }
29
+
30
+ :host([layout="cluster"]),
31
+ :host([layout="flank"]),
32
+ :host([layout="flank-end"]),
33
+ :host([layout="split"]) {
34
+ align-items: center;
35
+ flex-wrap: wrap;
36
+ }
37
+
38
+ :host([layout="split"]) {
39
+ justify-content: space-between;
40
+ }
41
+
42
+ :host([layout="flank"]) ::slotted(:first-child),
43
+ :host([layout="flank-end"]) ::slotted(:last-child) {
44
+ flex-basis: var(--flex-flank-size, auto);
45
+ flex-grow: 1;
46
+ }
47
+
48
+ :host([layout="flank"]) ::slotted(:last-child),
49
+ :host([layout="flank-end"]) ::slotted(:first-child) {
50
+ flex-basis: 0;
51
+ flex-grow: 999;
52
+ min-inline-size: var(--flex-flank-min, 50%);
53
+ }
54
+
16
55
  :host([wrap]) {
17
56
  flex-wrap: wrap;
18
57
  }
19
58
 
59
+ :host([wrap="reverse"]) {
60
+ flex-wrap: wrap-reverse;
61
+ }
62
+
20
63
  :host([gap="2xs"]) {
21
- gap: var(--helix-space-2xs);
64
+ --_flex-gap: var(--helix-space-2xs);
22
65
  }
23
66
  :host([gap="xs"]) {
24
- gap: var(--helix-space-xs);
67
+ --_flex-gap: var(--helix-space-xs);
25
68
  }
26
69
  :host([gap="sm"]) {
27
- gap: var(--helix-space-sm);
70
+ --_flex-gap: var(--helix-space-sm);
28
71
  }
29
72
  :host([gap="md"]) {
30
- gap: var(--helix-space-md);
73
+ --_flex-gap: var(--helix-space-md);
31
74
  }
32
75
  :host([gap="lg"]) {
33
- gap: var(--helix-space-lg);
76
+ --_flex-gap: var(--helix-space-lg);
34
77
  }
35
78
  :host([gap="xl"]) {
36
- gap: var(--helix-space-xl);
79
+ --_flex-gap: var(--helix-space-xl);
37
80
  }
38
81
  :host([gap="2xl"]) {
39
- gap: var(--helix-space-2xl);
82
+ --_flex-gap: var(--helix-space-2xl);
40
83
  }
41
84
 
42
85
  :host([gap="3xl"]) {
43
- gap: var(--helix-space-3xl);
86
+ --_flex-gap: var(--helix-space-3xl);
87
+ }
88
+
89
+ :host([row-gap="none"]) {
90
+ --_flex-row-gap: var(--helix-space-none);
91
+ }
92
+ :host([row-gap="2xs"]) {
93
+ --_flex-row-gap: var(--helix-space-2xs);
94
+ }
95
+ :host([row-gap="xs"]) {
96
+ --_flex-row-gap: var(--helix-space-xs);
97
+ }
98
+ :host([row-gap="sm"]) {
99
+ --_flex-row-gap: var(--helix-space-sm);
100
+ }
101
+ :host([row-gap="md"]) {
102
+ --_flex-row-gap: var(--helix-space-md);
103
+ }
104
+ :host([row-gap="lg"]) {
105
+ --_flex-row-gap: var(--helix-space-lg);
106
+ }
107
+ :host([row-gap="xl"]) {
108
+ --_flex-row-gap: var(--helix-space-xl);
109
+ }
110
+ :host([row-gap="2xl"]) {
111
+ --_flex-row-gap: var(--helix-space-2xl);
112
+ }
113
+ :host([row-gap="3xl"]) {
114
+ --_flex-row-gap: var(--helix-space-3xl);
115
+ }
116
+
117
+ :host([column-gap="none"]) {
118
+ --_flex-column-gap: var(--helix-space-none);
119
+ }
120
+ :host([column-gap="2xs"]) {
121
+ --_flex-column-gap: var(--helix-space-2xs);
122
+ }
123
+ :host([column-gap="xs"]) {
124
+ --_flex-column-gap: var(--helix-space-xs);
125
+ }
126
+ :host([column-gap="sm"]) {
127
+ --_flex-column-gap: var(--helix-space-sm);
128
+ }
129
+ :host([column-gap="md"]) {
130
+ --_flex-column-gap: var(--helix-space-md);
131
+ }
132
+ :host([column-gap="lg"]) {
133
+ --_flex-column-gap: var(--helix-space-lg);
134
+ }
135
+ :host([column-gap="xl"]) {
136
+ --_flex-column-gap: var(--helix-space-xl);
137
+ }
138
+ :host([column-gap="2xl"]) {
139
+ --_flex-column-gap: var(--helix-space-2xl);
140
+ }
141
+ :host([column-gap="3xl"]) {
142
+ --_flex-column-gap: var(--helix-space-3xl);
44
143
  }
45
144
 
46
145
  :host([align-items="start"]) {
@@ -56,6 +155,32 @@ align-items: flex-end;
56
155
  align-items: baseline;
57
156
  }
58
157
 
158
+ :host([align-content="start"]) {
159
+ align-content: flex-start;
160
+ }
161
+ :host([align-content="center"]) {
162
+ align-content: center;
163
+ }
164
+ :host([align-content="end"]) {
165
+ align-content: flex-end;
166
+ }
167
+ :host([align-content="between"]) {
168
+ align-content: space-between;
169
+ }
170
+ :host([align-content="around"]) {
171
+ align-content: space-around;
172
+ }
173
+ :host([align-content="stretch"]) {
174
+ align-content: stretch;
175
+ }
176
+
177
+ :host([align-items="stretch"]) {
178
+ align-items: stretch;
179
+ }
180
+
181
+ :host([justify-content="start"]) {
182
+ justify-content: flex-start;
183
+ }
59
184
  :host([justify-content="center"]) {
60
185
  justify-content: center;
61
186
  }
@@ -9,7 +9,19 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
9
9
  *
10
10
  * There is no separate Stack component. For a stack, set `direction="column"`.
11
11
  *
12
- * `gap` takes a space token name, so spacing stays on the scale.
12
+ * `gap` takes a space token name, so spacing stays on the scale. `row-gap`
13
+ * and `column-gap` set one axis each and win over `gap` on theirs.
14
+ *
15
+ * `layout` sets up one of three common patterns, and any attribute you also
16
+ * write wins over the pattern's own value:
17
+ *
18
+ * - `cluster`: items in a wrapping row, centered on one line, such as tags.
19
+ * - `split`: the first item at the start and the rest pushed to the end, such
20
+ * as a title and its actions. Wraps when there is no room.
21
+ * - `flank` and `flank-end`: a fixed item beside one that takes the rest, such
22
+ * as an icon and its text, or a field and its button. The item that takes
23
+ * the rest stays at least `--flex-flank-min` wide, and the pair stacks once
24
+ * it cannot.
13
25
  *
14
26
  * Flex is presentation only, so it has no headless tier.
15
27
  *
@@ -20,8 +32,19 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
20
32
  * @documentation https://fusion.dev/helix/components/flex
21
33
  *
22
34
  * @slot - The items to lay out.
35
+ *
36
+ * @cssproperty --flex-flank-min - The narrowest the growing item of a `flank` layout gets before the two stack, as a share of the row. Defaults to `50%`.
37
+ * @cssproperty --flex-flank-size - The width of the fixed item of a `flank` layout. Defaults to its own width.
23
38
  */
24
39
  export declare class HelixFlex extends HelixElement {
40
+ /**
41
+ * How the lines of a wrapping row share the space across it, set as
42
+ * `align-content`.
43
+ *
44
+ * Named for the CSS property it sets, the way `alignItems` is. It moves
45
+ * nothing in a row that does not wrap, which has one line.
46
+ */
47
+ alignContent?: 'start' | 'center' | 'end' | 'between' | 'around' | 'stretch';
25
48
  /**
26
49
  * How items align across the direction, set as `align-items`.
27
50
  *
@@ -42,9 +65,18 @@ export declare class HelixFlex extends HelixElement {
42
65
  */
43
66
  alignItems?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
44
67
  /**
45
- * Whether items run across or down.
68
+ * Space between the items of a row, named on the space scale. Wins over
69
+ * `gap` across the row.
70
+ */
71
+ columnGap?: 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
72
+ /**
73
+ * Whether items run across or down, and from which end.
74
+ *
75
+ * `row-reverse` and `column-reverse` change only where the items are drawn.
76
+ * Focus and a screen reader still follow the order of the markup, so use
77
+ * them for a visual order that reads the same either way.
46
78
  */
47
- direction?: 'row' | 'column';
79
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
48
80
  /**
49
81
  * Space between items, named on the space scale.
50
82
  */
@@ -62,9 +94,23 @@ export declare class HelixFlex extends HelixElement {
62
94
  */
63
95
  justifyContent?: 'start' | 'center' | 'end' | 'between' | 'around';
64
96
  /**
65
- * Whether items wrap onto more lines.
97
+ * A common layout pattern: `cluster`, `split`, `flank` or `flank-end`.
98
+ *
99
+ * Each sets the wrapping, alignment and spread it needs, and an attribute
100
+ * you write as well wins over it. `flank` holds the first item at its own
101
+ * width and gives the last one the rest, and `flank-end` does the reverse.
102
+ */
103
+ layout?: 'cluster' | 'flank' | 'flank-end' | 'split';
104
+ /**
105
+ * Space between the lines of a wrapping row, or between the items of a
106
+ * column, named on the space scale. Wins over `gap` down the column.
107
+ */
108
+ rowGap?: 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
109
+ /**
110
+ * Whether items wrap onto more lines. `wrap="reverse"` wraps them upward,
111
+ * each new line above the one before.
66
112
  */
67
- wrap: boolean;
113
+ wrap: boolean | 'reverse';
68
114
  protected render(): TemplateResult;
69
115
  static styles: CSSResultGroup;
70
116
  }
@@ -8,6 +8,10 @@ import { customElement, HelixElement } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { styles } from './flex-root.css.js';
11
+ const wrapConverter = {
12
+ fromAttribute: (value) => value === null ? false : value === 'reverse' ? 'reverse' : true,
13
+ toAttribute: (value) => value === 'reverse' ? 'reverse' : value ? '' : null,
14
+ };
11
15
  let HelixFlex = class HelixFlex extends HelixElement {
12
16
  constructor() {
13
17
  super(...arguments);
@@ -19,9 +23,15 @@ let HelixFlex = class HelixFlex extends HelixElement {
19
23
  }
20
24
  static { this.styles = styles; }
21
25
  };
26
+ __decorate([
27
+ property({ attribute: 'align-content', reflect: true })
28
+ ], HelixFlex.prototype, "alignContent", void 0);
22
29
  __decorate([
23
30
  property({ attribute: 'align-items', reflect: true })
24
31
  ], HelixFlex.prototype, "alignItems", void 0);
32
+ __decorate([
33
+ property({ attribute: 'column-gap', reflect: true })
34
+ ], HelixFlex.prototype, "columnGap", void 0);
25
35
  __decorate([
26
36
  property({ reflect: true })
27
37
  ], HelixFlex.prototype, "direction", void 0);
@@ -35,7 +45,13 @@ __decorate([
35
45
  property({ attribute: 'justify-content', reflect: true })
36
46
  ], HelixFlex.prototype, "justifyContent", void 0);
37
47
  __decorate([
38
- property({ reflect: true, type: Boolean })
48
+ property({ reflect: true })
49
+ ], HelixFlex.prototype, "layout", void 0);
50
+ __decorate([
51
+ property({ attribute: 'row-gap', reflect: true })
52
+ ], HelixFlex.prototype, "rowGap", void 0);
53
+ __decorate([
54
+ property({ converter: wrapConverter, reflect: true })
39
55
  ], HelixFlex.prototype, "wrap", void 0);
40
56
  HelixFlex = __decorate([
41
57
  customElement('helix-flex')
@@ -1,9 +1,17 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
2
  export const styles = createSheet(`:host {
3
- display: grid;
4
3
 
5
- gap: var(--helix-space-none);
4
+ --_grid-column-gap: var(--_grid-gap);
5
+
6
+ --_grid-gap: var(--helix-space-none);
7
+ --_grid-row-gap: var(--_grid-gap);
8
+
9
+ column-gap: var(--_grid-column-gap);
10
+ display: grid;
11
+ grid-template-areas: var(--grid-areas, none);
6
12
  grid-template-columns: var(--grid-columns, var(--_grid-template, minmax(0, 1fr)));
13
+ grid-template-rows: var(--grid-rows, none);
14
+ row-gap: var(--_grid-row-gap);
7
15
  }
8
16
 
9
17
  :host([columns="2"]) {
@@ -23,33 +31,89 @@ grid-template-columns: var(--grid-columns, var(--_grid-template, repeat(6, minma
23
31
  }
24
32
 
25
33
  :host([gap="none"]) {
26
- gap: var(--helix-space-none);
34
+ --_grid-gap: var(--helix-space-none);
27
35
  }
28
36
  :host([gap="2xs"]) {
29
- gap: var(--helix-space-2xs);
37
+ --_grid-gap: var(--helix-space-2xs);
30
38
  }
31
39
  :host([gap="xs"]) {
32
- gap: var(--helix-space-xs);
40
+ --_grid-gap: var(--helix-space-xs);
33
41
  }
34
42
  :host([gap="sm"]) {
35
- gap: var(--helix-space-sm);
43
+ --_grid-gap: var(--helix-space-sm);
36
44
  }
37
45
 
38
46
  :host([gap="md"]) {
39
- gap: var(--helix-space-md);
47
+ --_grid-gap: var(--helix-space-md);
40
48
  }
41
49
  :host([gap="lg"]) {
42
- gap: var(--helix-space-lg);
50
+ --_grid-gap: var(--helix-space-lg);
43
51
  }
44
52
  :host([gap="xl"]) {
45
- gap: var(--helix-space-xl);
53
+ --_grid-gap: var(--helix-space-xl);
46
54
  }
47
55
  :host([gap="2xl"]) {
48
- gap: var(--helix-space-2xl);
56
+ --_grid-gap: var(--helix-space-2xl);
49
57
  }
50
58
 
51
59
  :host([gap="3xl"]) {
52
- gap: var(--helix-space-3xl);
60
+ --_grid-gap: var(--helix-space-3xl);
61
+ }
62
+
63
+ :host([row-gap="none"]) {
64
+ --_grid-row-gap: var(--helix-space-none);
65
+ }
66
+ :host([row-gap="2xs"]) {
67
+ --_grid-row-gap: var(--helix-space-2xs);
68
+ }
69
+ :host([row-gap="xs"]) {
70
+ --_grid-row-gap: var(--helix-space-xs);
71
+ }
72
+ :host([row-gap="sm"]) {
73
+ --_grid-row-gap: var(--helix-space-sm);
74
+ }
75
+ :host([row-gap="md"]) {
76
+ --_grid-row-gap: var(--helix-space-md);
77
+ }
78
+ :host([row-gap="lg"]) {
79
+ --_grid-row-gap: var(--helix-space-lg);
80
+ }
81
+ :host([row-gap="xl"]) {
82
+ --_grid-row-gap: var(--helix-space-xl);
83
+ }
84
+ :host([row-gap="2xl"]) {
85
+ --_grid-row-gap: var(--helix-space-2xl);
86
+ }
87
+ :host([row-gap="3xl"]) {
88
+ --_grid-row-gap: var(--helix-space-3xl);
89
+ }
90
+
91
+ :host([column-gap="none"]) {
92
+ --_grid-column-gap: var(--helix-space-none);
93
+ }
94
+ :host([column-gap="2xs"]) {
95
+ --_grid-column-gap: var(--helix-space-2xs);
96
+ }
97
+ :host([column-gap="xs"]) {
98
+ --_grid-column-gap: var(--helix-space-xs);
99
+ }
100
+ :host([column-gap="sm"]) {
101
+ --_grid-column-gap: var(--helix-space-sm);
102
+ }
103
+ :host([column-gap="md"]) {
104
+ --_grid-column-gap: var(--helix-space-md);
105
+ }
106
+ :host([column-gap="lg"]) {
107
+ --_grid-column-gap: var(--helix-space-lg);
108
+ }
109
+ :host([column-gap="xl"]) {
110
+ --_grid-column-gap: var(--helix-space-xl);
111
+ }
112
+ :host([column-gap="2xl"]) {
113
+ --_grid-column-gap: var(--helix-space-2xl);
114
+ }
115
+ :host([column-gap="3xl"]) {
116
+ --_grid-column-gap: var(--helix-space-3xl);
53
117
  }
54
118
 
55
119
  :host([align-items="start"]) {
@@ -62,6 +126,45 @@ align-items: center;
62
126
  align-items: end;
63
127
  }
64
128
 
129
+ :host([justify-items="start"]) {
130
+ justify-items: start;
131
+ }
132
+ :host([justify-items="center"]) {
133
+ justify-items: center;
134
+ }
135
+ :host([justify-items="end"]) {
136
+ justify-items: end;
137
+ }
138
+
139
+ :host([auto-flow="column"]) {
140
+ grid-auto-flow: column;
141
+ }
142
+ :host([auto-flow="dense"]) {
143
+ grid-auto-flow: dense;
144
+ }
145
+ :host([auto-flow="column-dense"]) {
146
+ grid-auto-flow: column dense;
147
+ }
148
+
149
+ ::slotted([data-grid-span="full"]) {
150
+ grid-column: 1 / -1;
151
+ }
152
+ ::slotted([data-grid-span="2"]) {
153
+ grid-column: span 2;
154
+ }
155
+ ::slotted([data-grid-span="3"]) {
156
+ grid-column: span 3;
157
+ }
158
+ ::slotted([data-grid-span="4"]) {
159
+ grid-column: span 4;
160
+ }
161
+ ::slotted([data-grid-span="5"]) {
162
+ grid-column: span 5;
163
+ }
164
+ ::slotted([data-grid-span="6"]) {
165
+ grid-column: span 6;
166
+ }
167
+
65
168
  @media print {
66
169
  :host {
67
170
  print-color-adjust: economy;
@@ -13,6 +13,14 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
13
13
  * If you set both, `min` wins. The grid is presentation only, so there is no
14
14
  * headless tier.
15
15
  *
16
+ * `row-gap` and `column-gap` set one axis each and win over `gap` on theirs.
17
+ * `--grid-rows` and `--grid-areas` set the rows and named areas, and a child
18
+ * takes its place with `grid-area` in your own stylesheet.
19
+ *
20
+ * **A child can span columns with `data-grid-span`.** `data-grid-span="full"`
21
+ * runs from the first column to the last, such as a heading across a set of
22
+ * cards, and a number from `2` to `6` spans that many columns.
23
+ *
16
24
  * @since 0.1.0
17
25
  * @status stable
18
26
  * @category layout
@@ -21,7 +29,9 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
21
29
  *
22
30
  * @slot - The items to lay out.
23
31
  *
32
+ * @cssproperty --grid-areas - The named areas, as `grid-template-areas` takes them, such as `"rail main"`. A child takes its area with `grid-area`.
24
33
  * @cssproperty --grid-columns - An explicit track list. It overrides `min` and `columns`. Use it for tracks of unequal widths, which neither attribute can set.
34
+ * @cssproperty --grid-rows - An explicit row track list, such as `auto minmax(0, 1fr) auto`. Rows are sized by their content when it is unset.
25
35
  */
26
36
  export declare class HelixGrid extends HelixElement {
27
37
  /**
@@ -40,6 +50,21 @@ export declare class HelixGrid extends HelixElement {
40
50
  * wide its tracks are.
41
51
  */
42
52
  alignItems?: 'start' | 'center' | 'end' | 'stretch';
53
+ /**
54
+ * How cells fill the grid when no child places itself, set as
55
+ * `grid-auto-flow`.
56
+ *
57
+ * `column` fills each column before the next. `dense` and `column-dense`
58
+ * also move a later small cell back into an earlier gap. Moving them changes
59
+ * only where they are drawn, so focus and a screen reader still follow the
60
+ * markup.
61
+ */
62
+ autoFlow?: 'row' | 'column' | 'dense' | 'column-dense';
63
+ /**
64
+ * The space between columns, as a step on the space scale. Wins over `gap`
65
+ * across the row.
66
+ */
67
+ columnGap?: 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
43
68
  /**
44
69
  * A fixed number of equal columns.
45
70
  *
@@ -51,6 +76,13 @@ export declare class HelixGrid extends HelixElement {
51
76
  * The space between cells, as a step on the space scale.
52
77
  */
53
78
  gap?: 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
79
+ /**
80
+ * How each cell aligns within its column. Sets `justify-items`.
81
+ *
82
+ * Named for the CSS property it sets, the way `alignItems` is. Absent, every
83
+ * cell stretches to the width of its column.
84
+ */
85
+ justifyItems?: 'start' | 'center' | 'end' | 'stretch';
54
86
  /**
55
87
  * The minimum column width. The grid fits as many columns as the width allows.
56
88
  *
@@ -62,6 +94,11 @@ export declare class HelixGrid extends HelixElement {
62
94
  * is two intentions in one element.
63
95
  */
64
96
  min: string;
97
+ /**
98
+ * The space between rows, as a step on the space scale. Wins over `gap` down
99
+ * the column.
100
+ */
101
+ rowGap?: 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
65
102
  /**
66
103
  * The rule the shadow root's own `<style>` holds: the reset, and the track
67
104
  * list `min` or an unlisted `columns` asks for.
@@ -8,7 +8,7 @@ import { customElement, HelixElement, reportRuntime } from '@fusion.dev/helix-co
8
8
  import { property } from 'lit/decorators.js';
9
9
  import { html, unsafeStatic } from 'lit/static-html.js';
10
10
  import { styles } from './grid-root.css.js';
11
- const UNINHERITED = '--grid-columns: initial; --_grid-template: initial;';
11
+ const UNINHERITED = '--grid-areas: initial; --grid-columns: initial; --grid-rows: initial; --_grid-template: initial;';
12
12
  const NUMBER = /^-?(?:\d+\.?\d*|\.\d+)(?:px|r?em|r?ex|r?ch|r?lh|r?ic|r?cap|%|[sdl]?v(?:w|h|i|b|min|max)|cq(?:w|h|i|b|min|max)|cm|mm|in|pt|pc|q)?$/i;
13
13
  const TOKEN = /\s+|(?:calc|clamp|min|max)\(|var\(--[\w-]+|-?(?:\d+\.?\d*|\.\d+)[a-z%]*|[(),+*/-]/giy;
14
14
  const lengthOf = (value) => {
@@ -75,15 +75,27 @@ let HelixGrid = class HelixGrid extends HelixElement {
75
75
  __decorate([
76
76
  property({ attribute: 'align-items', reflect: true })
77
77
  ], HelixGrid.prototype, "alignItems", void 0);
78
+ __decorate([
79
+ property({ attribute: 'auto-flow', reflect: true })
80
+ ], HelixGrid.prototype, "autoFlow", void 0);
81
+ __decorate([
82
+ property({ attribute: 'column-gap', reflect: true })
83
+ ], HelixGrid.prototype, "columnGap", void 0);
78
84
  __decorate([
79
85
  property({ reflect: true, type: Number })
80
86
  ], HelixGrid.prototype, "columns", void 0);
81
87
  __decorate([
82
88
  property({ reflect: true })
83
89
  ], HelixGrid.prototype, "gap", void 0);
90
+ __decorate([
91
+ property({ attribute: 'justify-items', reflect: true })
92
+ ], HelixGrid.prototype, "justifyItems", void 0);
84
93
  __decorate([
85
94
  property()
86
95
  ], HelixGrid.prototype, "min", void 0);
96
+ __decorate([
97
+ property({ attribute: 'row-gap', reflect: true })
98
+ ], HelixGrid.prototype, "rowGap", void 0);
87
99
  HelixGrid = __decorate([
88
100
  customElement('helix-grid')
89
101
  ], HelixGrid);
@@ -49,7 +49,7 @@ justify-content: start;
49
49
  position: relative;
50
50
  }
51
51
 
52
- [part="cell"] {
52
+ [part~="cell"] {
53
53
  background-color: var(--heatmap-tone, var(--helix-color-surface-sunken));
54
54
  border-radius: var(--heatmap-cell-radius, calc(var(--helix-radii-sm) * 0.5));
55
55
  inline-size: var(--_heatmap-cell-width);
@@ -74,7 +74,7 @@ font-weight: var(--helix-weight-medium);
74
74
  opacity: 0.72;
75
75
  }
76
76
 
77
- [part="tooltip-cell"] {
77
+ [part~="tooltip-cell"] {
78
78
  align-items: baseline;
79
79
  display: flex;
80
80
  gap: var(--helix-space-sm);
@@ -91,16 +91,44 @@ font-weight: var(--helix-weight-medium);
91
91
  }
92
92
 
93
93
  @media (hover: hover) {
94
- [part="cell"]:hover {
94
+ [part~="cell"]:hover {
95
95
  outline: var(--helix-border-thin) solid var(--helix-color-foreground);
96
96
  outline-offset: var(--helix-border-thin);
97
97
  }
98
98
 
99
- [part="strip"]:not([data-spaced]) [part="cell"]:hover {
99
+ [part="strip"]:not([data-spaced]) [part~="cell"]:hover {
100
100
  outline-offset: calc(var(--helix-border-thin) * -1);
101
101
  }
102
102
  }
103
103
 
104
+ [part~="cell-active"] {
105
+ outline: var(--helix-border-thin) solid var(--helix-color-foreground);
106
+ outline-offset: var(--helix-border-thin);
107
+ }
108
+
109
+ [part="strip"]:not([data-spaced]) [part~="cell-active"] {
110
+ outline-offset: calc(var(--helix-border-thin) * -1);
111
+ }
112
+
113
+ [part="strip"]:focus-visible {
114
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
115
+ outline-offset: var(--helix-size-focus-offset);
116
+ }
117
+
118
+ [part~="tooltip-cell-current"] {
119
+ font-weight: var(--helix-weight-medium);
120
+ }
121
+
122
+ [part="live"] {
123
+ block-size: 1px;
124
+ clip-path: inset(50%);
125
+ inline-size: 1px;
126
+ margin: var(--helix-space-none);
127
+ overflow: hidden;
128
+ position: absolute;
129
+ white-space: nowrap;
130
+ }
131
+
104
132
  [part="footer"] {
105
133
  align-items: baseline;
106
134
  color: var(--helix-color-foreground-subtle);
@@ -133,7 +161,7 @@ text-align: center;
133
161
  }
134
162
 
135
163
  @media print {
136
- [part="cell"] {
164
+ [part~="cell"] {
137
165
  outline: var(--helix-border-thin) solid var(--helix-color-border);
138
166
  outline-offset: calc(var(--helix-border-thin) * -1);
139
167
  }
@@ -26,9 +26,11 @@ import '../../tooltip/index.js';
26
26
  * @slot summary - Below the strip, in the middle.
27
27
  *
28
28
  * @csspart cell - One reading.
29
+ * @csspart cell-active - The cell the pointer or the keys rest on, ringed as a hovered cell is. Set alongside `cell`.
29
30
  * @csspart footer - The three-slot row under the strip.
31
+ * @csspart live - The readout, a polite live region the sheet hides visually.
30
32
  * @csspart mark - The invisible point the tooltip is anchored to.
31
- * @csspart strip - The grid of cells.
33
+ * @csspart strip - The grid of cells, which takes focus to be read by key.
32
34
  * @csspart tooltip - The bubble, forwarded from `Tooltip`.
33
35
  * @csspart tooltip-anchor - The `Tooltip` element itself.
34
36
  * @csspart tooltip-arrow - The bubble's point, forwarded from `Tooltip`.
@@ -38,6 +40,7 @@ import '../../tooltip/index.js';
38
40
  * @csspart tooltip-arrow-top - The point while the bubble is above the reading, on its bottom edge. Set alongside `tooltip-arrow`.
39
41
  * @csspart tooltip-bottom - The bubble while it is below the reading. Set alongside `tooltip`.
40
42
  * @csspart tooltip-cell - One column's name and value inside the tooltip.
43
+ * @csspart tooltip-cell-current - The cell the series keys rest on, in the charts whose readings hold several series. A strip draws one, so it is never set here.
41
44
  * @csspart tooltip-label - The reading's own name inside the tooltip.
42
45
  * @csspart tooltip-left - The bubble while it is left of the reading. Set alongside `tooltip`.
43
46
  * @csspart tooltip-name - A column's name inside the tooltip.
@@ -1 +1,2 @@
1
+ export { type IconResolver, registerIconLibrary, registerIcons, resolveIcon, } from '@fusion.dev/helix-headless/icon';
1
2
  export * from './root/icon-root.js';
@@ -1 +1,2 @@
1
+ export { registerIconLibrary, registerIcons, resolveIcon, } from '@fusion.dev/helix-headless/icon';
1
2
  export * from './root/icon-root.js';