@fusion.dev/helix 0.144.0 → 0.146.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 (213) hide show
  1. package/custom-elements.json +17914 -4368
  2. package/dist/accordion/item/accordion-item.css.js +25 -10
  3. package/dist/accordion/item/accordion-item.d.ts +10 -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 +27 -3
  7. package/dist/aura/root/aura-root.d.ts +61 -14
  8. package/dist/aura/root/aura-root.js +40 -23
  9. package/dist/badge/root/badge-root.css.js +86 -16
  10. package/dist/badge/root/badge-root.d.ts +18 -0
  11. package/dist/badge/root/badge-root.js +6 -0
  12. package/dist/blockquote/root/blockquote-root.css.js +2 -2
  13. package/dist/blockquote/root/blockquote-root.d.ts +2 -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 +24 -1
  17. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +4 -0
  18. package/dist/breadcrumbs/root/breadcrumbs-root.js +2 -0
  19. package/dist/button/root/button-root.css.js +4 -3
  20. package/dist/button/root/button-root.d.ts +2 -0
  21. package/dist/button-group/root/button-group-root.d.ts +3 -0
  22. package/dist/callout/root/callout-root.css.js +4 -3
  23. package/dist/callout/root/callout-root.d.ts +6 -2
  24. package/dist/canvas/root/canvas-root.css.js +1 -0
  25. package/dist/card/root/card-root.d.ts +6 -0
  26. package/dist/carousel/root/carousel-root.css.js +17 -1
  27. package/dist/chat/message/chat-message.css.js +0 -62
  28. package/dist/chat/message/chat-message.js +2 -1
  29. package/dist/chat/root/chat-root.css.js +7 -0
  30. package/dist/chat/root/chat-root.d.ts +2 -0
  31. package/dist/chat/root/chat-root.js +2 -1
  32. package/dist/chat/typing.css.d.ts +1 -0
  33. package/dist/chat/typing.css.js +62 -0
  34. package/dist/checkbox/root/checkbox-root.css.js +15 -0
  35. package/dist/checkbox/root/checkbox-root.d.ts +2 -1
  36. package/dist/code/root/code-root.css.js +2 -2
  37. package/dist/code/root/code-root.d.ts +2 -0
  38. package/dist/code-block/root/code-block-root.css.js +24 -0
  39. package/dist/code-block/root/code-block-root.d.ts +2 -1
  40. package/dist/color-input/root/color-input-root.css.js +10 -0
  41. package/dist/color-picker/root/color-picker-root.css.js +8 -0
  42. package/dist/color-picker/root/color-picker-root.d.ts +1 -0
  43. package/dist/copy-button/root/copy-button-root.css.js +15 -6
  44. package/dist/copy-button/root/copy-button-root.d.ts +7 -0
  45. package/dist/data-table/root/data-table-root.css.js +70 -0
  46. package/dist/data-table/root/data-table-root.d.ts +6 -0
  47. package/dist/date-input/root/date-input-root.css.js +10 -0
  48. package/dist/description-list/item/description-list-item.css.js +11 -0
  49. package/dist/donut-chart/root/donut-chart-root.css.js +19 -0
  50. package/dist/donut-chart/root/donut-chart-root.d.ts +3 -0
  51. package/dist/drawer/root/drawer-root.css.js +47 -0
  52. package/dist/drawer/root/drawer-root.d.ts +5 -0
  53. package/dist/drilldown/item/drilldown-item.css.js +8 -7
  54. package/dist/drilldown/item/drilldown-item.d.ts +6 -0
  55. package/dist/drilldown/root/drilldown-root.css.js +27 -13
  56. package/dist/drilldown/root/drilldown-root.d.ts +10 -0
  57. package/dist/element-events.generated.js +72 -13
  58. package/dist/file-input/root/file-input-root.css.js +12 -11
  59. package/dist/file-input/root/file-input-root.d.ts +11 -0
  60. package/dist/filter-input/root/filter-input-root.css.js +6 -5
  61. package/dist/filter-input/root/filter-input-root.d.ts +5 -0
  62. package/dist/flex/root/flex-root.css.js +143 -9
  63. package/dist/flex/root/flex-root.d.ts +62 -5
  64. package/dist/flex/root/flex-root.js +17 -1
  65. package/dist/graph/root/graph-root.css.js +11 -8
  66. package/dist/graph/root/graph-root.d.ts +8 -0
  67. package/dist/grid/root/grid-root.css.js +114 -11
  68. package/dist/grid/root/grid-root.d.ts +40 -0
  69. package/dist/grid/root/grid-root.js +13 -1
  70. package/dist/heatmap/root/heatmap-root.css.js +2 -1
  71. package/dist/icon-button/root/icon-button-root.css.js +68 -13
  72. package/dist/icon-button/root/icon-button-root.d.ts +4 -0
  73. package/dist/kbd/root/kbd-root.css.js +27 -0
  74. package/dist/kbd/root/kbd-root.d.ts +2 -0
  75. package/dist/lightbox/item/lightbox-item.css.js +4 -0
  76. package/dist/lightbox/root/lightbox-root.css.js +41 -0
  77. package/dist/line-chart/root/line-chart-root.css.js +16 -0
  78. package/dist/line-chart/root/line-chart-root.d.ts +2 -0
  79. package/dist/list/item/list-item.css.js +21 -1
  80. package/dist/list/item/list-item.d.ts +3 -0
  81. package/dist/list/root/list-root.css.js +13 -1
  82. package/dist/listbox/root/listbox-root.css.js +9 -0
  83. package/dist/listbox/root/listbox-root.d.ts +1 -0
  84. package/dist/loader/root/loader-root.css.js +3 -3
  85. package/dist/loader/root/loader-root.d.ts +2 -0
  86. package/dist/megamenu/root/megamenu-root.css.js +16 -13
  87. package/dist/megamenu/root/megamenu-root.d.ts +11 -0
  88. package/dist/menu/index.d.ts +1 -0
  89. package/dist/menu/index.js +1 -0
  90. package/dist/menu/item/menu-item.css.js +39 -4
  91. package/dist/menu/item/menu-item.d.ts +4 -0
  92. package/dist/menu/item/menu-item.js +2 -0
  93. package/dist/menu/section/menu-section.css.d.ts +1 -0
  94. package/dist/menu/section/menu-section.css.js +14 -0
  95. package/dist/menu/section/menu-section.d.ts +24 -0
  96. package/dist/menu/section/menu-section.js +16 -0
  97. package/dist/meter/root/meter-root.css.js +6 -3
  98. package/dist/meter/root/meter-root.d.ts +1 -0
  99. package/dist/navigation/root/navigation-root.css.js +3 -2
  100. package/dist/navigation/root/navigation-root.d.ts +13 -0
  101. package/dist/notifications/root/notifications-root.css.js +30 -1
  102. package/dist/notifications/root/notifications-root.d.ts +1 -0
  103. package/dist/number-input/root/number-input-root.css.js +12 -9
  104. package/dist/number-input/root/number-input-root.d.ts +8 -0
  105. package/dist/object-inspector/root/object-inspector-root.css.js +38 -7
  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/option/root/option-root.css.js +1 -1
  109. package/dist/orb/index.d.ts +1 -1
  110. package/dist/orb/index.js +1 -1
  111. package/dist/orb/root/orb-root.d.ts +40 -6
  112. package/dist/orb/root/orb-root.js +29 -11
  113. package/dist/outline/root/outline-root.css.js +10 -0
  114. package/dist/outline/root/outline-root.d.ts +7 -0
  115. package/dist/pin-input/root/pin-input-root.css.js +4 -4
  116. package/dist/pin-input/root/pin-input-root.d.ts +4 -0
  117. package/dist/progress/root/progress-root.css.js +4 -2
  118. package/dist/progress/root/progress-root.d.ts +1 -0
  119. package/dist/qr-code/root/qr-code-root.css.js +11 -0
  120. package/dist/quote/root/quote-root.css.js +3 -0
  121. package/dist/quote/root/quote-root.d.ts +2 -0
  122. package/dist/radio/root/radio-root.css.js +16 -0
  123. package/dist/radio/root/radio-root.d.ts +2 -1
  124. package/dist/sandbox/frame.d.ts +64 -0
  125. package/dist/sandbox/frame.js +146 -0
  126. package/dist/sandbox/index.d.ts +2 -0
  127. package/dist/sandbox/index.js +1 -0
  128. package/dist/sandbox/levels.d.ts +10 -0
  129. package/dist/sandbox/levels.js +5 -0
  130. package/dist/sandbox/root/sandbox-root.d.ts +3 -0
  131. package/dist/sandbox/root/sandbox-root.js +13 -3
  132. package/dist/sandbox/source/sandbox-source.css.js +70 -0
  133. package/dist/sandbox/source/sandbox-source.d.ts +35 -0
  134. package/dist/sandbox/source/sandbox-source.js +22 -3
  135. package/dist/sandbox/terminal/sandbox-terminal.css.js +39 -0
  136. package/dist/sandbox/terminal/sandbox-terminal.d.ts +50 -1
  137. package/dist/sandbox/terminal/sandbox-terminal.js +61 -4
  138. package/dist/sandbox/tokens.d.ts +39 -0
  139. package/dist/sandbox/tokens.js +9 -0
  140. package/dist/scatter-chart/root/scatter-chart-root.css.js +9 -0
  141. package/dist/scatter-chart/root/scatter-chart-root.d.ts +2 -0
  142. package/dist/scroll-area/root/scroll-area-root.css.js +83 -1
  143. package/dist/scroll-area/root/scroll-area-root.d.ts +6 -0
  144. package/dist/skeleton/root/skeleton-root.css.js +11 -11
  145. package/dist/skeleton/root/skeleton-root.d.ts +1 -0
  146. package/dist/skip-link/root/skip-link-root.css.js +20 -8
  147. package/dist/skip-link/root/skip-link-root.d.ts +12 -3
  148. package/dist/slider/root/slider-root.css.js +26 -0
  149. package/dist/sparkline/root/sparkline-root.css.js +49 -0
  150. package/dist/sparkline/root/sparkline-root.d.ts +6 -0
  151. package/dist/sparkline/root/sparkline-root.js +2 -1
  152. package/dist/speed-dial/item/speed-dial-item.css.js +18 -10
  153. package/dist/speed-dial/item/speed-dial-item.d.ts +7 -0
  154. package/dist/speed-dial/root/speed-dial-root.css.js +17 -8
  155. package/dist/speed-dial/root/speed-dial-root.d.ts +16 -1
  156. package/dist/speed-dial/root/speed-dial-root.js +4 -1
  157. package/dist/stat/root/stat-root.css.js +4 -0
  158. package/dist/steps/root/steps-root.css.js +28 -0
  159. package/dist/steps/root/steps-root.d.ts +5 -0
  160. package/dist/steps/step/step.js +2 -1
  161. package/dist/table/root/table-root.css.js +18 -0
  162. package/dist/table/root/table-root.d.ts +6 -0
  163. package/dist/table/root/table-root.js +2 -0
  164. package/dist/table/row/table-row.css.js +18 -0
  165. package/dist/table/row/table-row.d.ts +2 -0
  166. package/dist/table/row/table-row.js +2 -0
  167. package/dist/tabs/panel/tab-panel.css.js +5 -1
  168. package/dist/tabs/root/tabs-root.css.js +58 -3
  169. package/dist/tabs/root/tabs-root.d.ts +4 -0
  170. package/dist/tabs/tab/tab.css.js +21 -10
  171. package/dist/tabs/tab/tab.d.ts +7 -0
  172. package/dist/tag/group/tag-group.css.js +6 -0
  173. package/dist/text/clamp.d.ts +11 -0
  174. package/dist/text/clamp.js +3 -0
  175. package/dist/text/root/text-root.css.js +79 -45
  176. package/dist/text/root/text-root.d.ts +49 -7
  177. package/dist/text/root/text-root.js +17 -11
  178. package/dist/textarea/root/textarea-root.css.js +27 -0
  179. package/dist/time-input/root/time-input-root.css.js +12 -0
  180. package/dist/time-picker/root/time-picker-root.css.js +1 -1
  181. package/dist/timeline/group/timeline-group.css.d.ts +1 -0
  182. package/dist/timeline/group/timeline-group.css.js +32 -0
  183. package/dist/timeline/group/timeline-group.d.ts +25 -0
  184. package/dist/timeline/group/timeline-group.js +16 -0
  185. package/dist/timeline/index.d.ts +1 -0
  186. package/dist/timeline/index.js +1 -0
  187. package/dist/timeline/item/timeline-item.css.js +43 -16
  188. package/dist/timeline/root/timeline-root.css.js +56 -0
  189. package/dist/timeline/root/timeline-root.d.ts +26 -0
  190. package/dist/timeline/root/timeline-root.js +7 -0
  191. package/dist/toast/item/toast-item.css.js +10 -0
  192. package/dist/toast/root/toast-root.d.ts +1 -0
  193. package/dist/toast/root/toast-root.js +1 -0
  194. package/dist/toggle/group/toggle-group.css.js +10 -7
  195. package/dist/toggle/group/toggle-group.d.ts +6 -1
  196. package/dist/toggle/root/toggle-root.d.ts +6 -0
  197. package/dist/toolbar/root/toolbar-root.css.js +4 -0
  198. package/dist/toolbar/root/toolbar-root.d.ts +5 -0
  199. package/dist/tooltip/root/tooltip-root.css.js +5 -5
  200. package/dist/tooltip/root/tooltip-root.d.ts +4 -0
  201. package/dist/tree/item/tree-item.css.js +89 -7
  202. package/dist/tree/item/tree-item.d.ts +19 -0
  203. package/dist/trend/root/trend-root.css.js +3 -5
  204. package/dist/trend/root/trend-root.d.ts +2 -2
  205. package/dist/video/root/video-root.css.js +6 -0
  206. package/dist/video/root/video-root.d.ts +3 -0
  207. package/dist/virtual-list/root/virtual-list-root.css.js +19 -0
  208. package/dist/virtual-list/root/virtual-list-root.d.ts +10 -3
  209. package/lint.json +1 -1
  210. package/package.json +9 -9
  211. package/types/jsx.d.ts +8253 -1233
  212. package/types/svelte.d.ts +2 -0
  213. package/types/vue.d.ts +2357 -312
@@ -3,8 +3,8 @@ export const styles = createSheet(`[part="field"] {
3
3
  align-items: center;
4
4
  position: relative;
5
5
  background-color: var(--file-input-background-color, var(--helix-color-well));
6
- border: var(--helix-border-thin) dashed var(--helix-color-border);
7
- border-radius: var(--helix-radii-sm);
6
+ border: var(--helix-border-thin) dashed var(--file-input-border-color, var(--helix-color-border));
7
+ border-radius: var(--file-input-radius, var(--helix-radii-sm));
8
8
  display: flex;
9
9
  gap: var(--helix-space-xs);
10
10
  justify-content: center;
@@ -26,8 +26,8 @@ outline: none;
26
26
  }
27
27
 
28
28
  [part="field"][data-dropping] {
29
- background-color: var(--helix-color-primary-subtle);
30
- border-color: var(--helix-color-primary);
29
+ background-color: var(--file-input-drop-background-color, var(--helix-color-primary-subtle));
30
+ border-color: var(--file-input-drop-border-color, var(--helix-color-primary));
31
31
  border-style: solid;
32
32
  }
33
33
 
@@ -56,14 +56,15 @@ padding: var(--helix-space-none);
56
56
 
57
57
  [part="file"] {
58
58
  align-items: center;
59
- background-color: var(--helix-color-surface);
60
- border: var(--helix-border-thin) solid var(--helix-color-border);
61
- border-radius: var(--helix-radii-sm);
59
+ background-color: var(--file-input-file-background-color, var(--helix-color-surface));
60
+ border: var(--helix-border-thin) solid
61
+ var(--file-input-file-border-color, var(--helix-color-border));
62
+ border-radius: var(--file-input-file-radius, var(--helix-radii-sm));
62
63
  display: flex;
63
64
  gap: var(--helix-space-sm);
64
65
  opacity: 1;
65
- padding-block: var(--helix-space-xs);
66
- padding-inline: var(--helix-space-sm);
66
+ padding-block: var(--file-input-file-padding-block, var(--helix-space-xs));
67
+ padding-inline: var(--file-input-file-padding-inline, var(--helix-space-sm));
67
68
  scale: 1 1;
68
69
  transform-origin: top;
69
70
  transition:
@@ -120,7 +121,7 @@ all: unset;
120
121
  align-items: center;
121
122
  border-radius: var(--helix-radii-sm);
122
123
  box-sizing: border-box;
123
- color: var(--helix-color-foreground-muted);
124
+ color: var(--file-input-remove-color, var(--helix-color-foreground-muted));
124
125
  cursor: pointer;
125
126
  display: flex;
126
127
  flex: none;
@@ -131,7 +132,7 @@ transition: color var(--helix-duration-fast) var(--helix-easing-standard);
131
132
  }
132
133
 
133
134
  [part="remove"]:hover {
134
- color: var(--helix-color-danger);
135
+ color: var(--file-input-remove-color-hover, var(--helix-color-danger));
135
136
  }
136
137
 
137
138
  [part="remove"]:focus-visible {
@@ -22,7 +22,18 @@ import '../../tag/index.js';
22
22
  * @documentation https://fusion.dev/helix/components/file-input
23
23
  *
24
24
  * @cssproperty --file-input-background-color - Fill behind the field.
25
+ * @cssproperty --file-input-border-color - The field's dashed edge at rest.
26
+ * @cssproperty --file-input-drop-background-color - Fill behind the field while files are dragged over it.
27
+ * @cssproperty --file-input-drop-border-color - The field's edge while files are dragged over it.
28
+ * @cssproperty --file-input-file-background-color - Fill behind each chosen file.
29
+ * @cssproperty --file-input-file-border-color - The edge of each chosen file.
30
+ * @cssproperty --file-input-file-padding-block - Padding above and below each chosen file.
31
+ * @cssproperty --file-input-file-padding-inline - Padding at each side of each chosen file.
32
+ * @cssproperty --file-input-file-radius - Corner radius of each chosen file.
25
33
  * @cssproperty --file-input-padding - Padding inside the field.
34
+ * @cssproperty --file-input-radius - Corner radius of the field.
35
+ * @cssproperty --file-input-remove-color - The remove button's icon at rest.
36
+ * @cssproperty --file-input-remove-color-hover - The remove button's icon under the pointer.
26
37
  */
27
38
  export declare class HelixFileInput extends HelixHeadlessFileInput {
28
39
  static tier: string;
@@ -6,8 +6,9 @@ export const styles = createSheet(`:host {
6
6
  [part="field"] {
7
7
  align-items: center;
8
8
  background-color: var(--filter-input-background-color, var(--helix-color-well));
9
- border: var(--helix-border-thin) solid var(--helix-color-border);
10
- border-radius: var(--helix-radii-sm);
9
+ border: var(--helix-border-thin) solid
10
+ var(--filter-input-field-border-color, var(--helix-color-border));
11
+ border-radius: var(--filter-input-radius, var(--helix-radii-sm));
11
12
  color: var(--helix-color-foreground-subtle);
12
13
  display: flex;
13
14
  flex-wrap: wrap;
@@ -15,7 +16,7 @@ gap: var(--helix-space-2xs);
15
16
  min-block-size: var(--_filter-input-size);
16
17
 
17
18
  padding-block: var(--helix-space-2xs);
18
- padding-inline: var(--helix-space-xs);
19
+ padding-inline: var(--filter-input-padding-inline, var(--helix-space-xs));
19
20
  transition:
20
21
  border-color var(--helix-duration-fast) var(--helix-easing-standard),
21
22
  background-color var(--helix-duration-fast) var(--helix-easing-standard);
@@ -66,7 +67,7 @@ align-items: center;
66
67
  align-self: center;
67
68
  border-radius: var(--helix-radii-sm);
68
69
  box-sizing: border-box;
69
- color: var(--helix-color-foreground-subtle);
70
+ color: var(--filter-input-clear-color, var(--helix-color-foreground-subtle));
70
71
  cursor: pointer;
71
72
  display: flex;
72
73
  flex: 0 0 auto;
@@ -78,7 +79,7 @@ transition: color var(--helix-duration-fast) var(--helix-easing-standard);
78
79
 
79
80
  [part="clear"]:hover {
80
81
  background-color: color-mix(in oklab, currentcolor 12%, transparent);
81
- color: var(--helix-color-foreground);
82
+ color: var(--filter-input-clear-color-hover, var(--helix-color-foreground));
82
83
  }
83
84
 
84
85
  [part="clear"]:focus-visible {
@@ -32,9 +32,14 @@ import '../../option/index.js';
32
32
  * @cssproperty --filter-input-background-color - The fill behind the field.
33
33
  * @cssproperty --filter-input-border-color - The color of the suggestion panel's border.
34
34
  * @cssproperty --filter-input-border-width - The width of the suggestion panel's border. It follows `--helix-border-floating`.
35
+ * @cssproperty --filter-input-clear-color - The clear button's icon at rest.
36
+ * @cssproperty --filter-input-clear-color-hover - The clear button's icon under the pointer.
35
37
  * @cssproperty --filter-input-control-size - The smallest width the text keeps as tokens fill the line. Below it, the text wraps to its own line.
38
+ * @cssproperty --filter-input-field-border-color - The field's edge at rest. Hover, focus, and an error still draw their own.
36
39
  * @cssproperty --filter-input-lead-border-color - The color of the line between the leading box and the text.
40
+ * @cssproperty --filter-input-padding-inline - Space at each side of the field, inside its edge.
37
41
  * @cssproperty --filter-input-panel-size - The width of the suggestion panel. It matches the field by default.
42
+ * @cssproperty --filter-input-radius - Corner radius of the field.
38
43
  * @cssproperty --filter-input-shadow - The shadow under the panel. It follows
39
44
  * `--helix-shadow-floating`. The panel can sit over any content, so it has a
40
45
  * shadow by default.
@@ -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,136 @@ 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
+
55
+ :host([layout="switch"]) {
56
+ flex-wrap: wrap;
57
+ }
58
+
59
+ :host([layout="switch"]) ::slotted(*) {
60
+ flex-basis: calc((var(--flex-switch-at, 30rem) - 100%) * 999);
61
+ flex-grow: 1;
62
+ }
63
+
16
64
  :host([wrap]) {
17
65
  flex-wrap: wrap;
18
66
  }
19
67
 
68
+ :host([wrap="reverse"]) {
69
+ flex-wrap: wrap-reverse;
70
+ }
71
+
20
72
  :host([gap="2xs"]) {
21
- gap: var(--helix-space-2xs);
73
+ --_flex-gap: var(--helix-space-2xs);
22
74
  }
23
75
  :host([gap="xs"]) {
24
- gap: var(--helix-space-xs);
76
+ --_flex-gap: var(--helix-space-xs);
25
77
  }
26
78
  :host([gap="sm"]) {
27
- gap: var(--helix-space-sm);
79
+ --_flex-gap: var(--helix-space-sm);
28
80
  }
29
81
  :host([gap="md"]) {
30
- gap: var(--helix-space-md);
82
+ --_flex-gap: var(--helix-space-md);
31
83
  }
32
84
  :host([gap="lg"]) {
33
- gap: var(--helix-space-lg);
85
+ --_flex-gap: var(--helix-space-lg);
34
86
  }
35
87
  :host([gap="xl"]) {
36
- gap: var(--helix-space-xl);
88
+ --_flex-gap: var(--helix-space-xl);
37
89
  }
38
90
  :host([gap="2xl"]) {
39
- gap: var(--helix-space-2xl);
91
+ --_flex-gap: var(--helix-space-2xl);
40
92
  }
41
93
 
42
94
  :host([gap="3xl"]) {
43
- gap: var(--helix-space-3xl);
95
+ --_flex-gap: var(--helix-space-3xl);
96
+ }
97
+
98
+ :host([row-gap="none"]) {
99
+ --_flex-row-gap: var(--helix-space-none);
100
+ }
101
+ :host([row-gap="2xs"]) {
102
+ --_flex-row-gap: var(--helix-space-2xs);
103
+ }
104
+ :host([row-gap="xs"]) {
105
+ --_flex-row-gap: var(--helix-space-xs);
106
+ }
107
+ :host([row-gap="sm"]) {
108
+ --_flex-row-gap: var(--helix-space-sm);
109
+ }
110
+ :host([row-gap="md"]) {
111
+ --_flex-row-gap: var(--helix-space-md);
112
+ }
113
+ :host([row-gap="lg"]) {
114
+ --_flex-row-gap: var(--helix-space-lg);
115
+ }
116
+ :host([row-gap="xl"]) {
117
+ --_flex-row-gap: var(--helix-space-xl);
118
+ }
119
+ :host([row-gap="2xl"]) {
120
+ --_flex-row-gap: var(--helix-space-2xl);
121
+ }
122
+ :host([row-gap="3xl"]) {
123
+ --_flex-row-gap: var(--helix-space-3xl);
124
+ }
125
+
126
+ :host([column-gap="none"]) {
127
+ --_flex-column-gap: var(--helix-space-none);
128
+ }
129
+ :host([column-gap="2xs"]) {
130
+ --_flex-column-gap: var(--helix-space-2xs);
131
+ }
132
+ :host([column-gap="xs"]) {
133
+ --_flex-column-gap: var(--helix-space-xs);
134
+ }
135
+ :host([column-gap="sm"]) {
136
+ --_flex-column-gap: var(--helix-space-sm);
137
+ }
138
+ :host([column-gap="md"]) {
139
+ --_flex-column-gap: var(--helix-space-md);
140
+ }
141
+ :host([column-gap="lg"]) {
142
+ --_flex-column-gap: var(--helix-space-lg);
143
+ }
144
+ :host([column-gap="xl"]) {
145
+ --_flex-column-gap: var(--helix-space-xl);
146
+ }
147
+ :host([column-gap="2xl"]) {
148
+ --_flex-column-gap: var(--helix-space-2xl);
149
+ }
150
+ :host([column-gap="3xl"]) {
151
+ --_flex-column-gap: var(--helix-space-3xl);
44
152
  }
45
153
 
46
154
  :host([align-items="start"]) {
@@ -56,6 +164,32 @@ align-items: flex-end;
56
164
  align-items: baseline;
57
165
  }
58
166
 
167
+ :host([align-content="start"]) {
168
+ align-content: flex-start;
169
+ }
170
+ :host([align-content="center"]) {
171
+ align-content: center;
172
+ }
173
+ :host([align-content="end"]) {
174
+ align-content: flex-end;
175
+ }
176
+ :host([align-content="between"]) {
177
+ align-content: space-between;
178
+ }
179
+ :host([align-content="around"]) {
180
+ align-content: space-around;
181
+ }
182
+ :host([align-content="stretch"]) {
183
+ align-content: stretch;
184
+ }
185
+
186
+ :host([align-items="stretch"]) {
187
+ align-items: stretch;
188
+ }
189
+
190
+ :host([justify-content="start"]) {
191
+ justify-content: flex-start;
192
+ }
59
193
  :host([justify-content="center"]) {
60
194
  justify-content: center;
61
195
  }
@@ -9,7 +9,25 @@ 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, the last at the end, and any between
20
+ * them spaced evenly, such as a title and its actions. Put several actions
21
+ * in a flex of their own so they stay together at the end. Wraps when there
22
+ * is no room.
23
+ * - `flank` and `flank-end`: a fixed item beside one that takes the rest, such
24
+ * as an icon and its text, or a field and its button. The item that takes
25
+ * the rest stays at least `--flex-flank-min` wide, and the pair stacks once
26
+ * it cannot.
27
+ * - `switch`: the items share a row while the flex is at least
28
+ * `--flex-switch-at` wide, and each takes a line of its own below that, such
29
+ * as cards that stack on a narrow screen. It answers the width the flex is
30
+ * given, wherever it sits, with no breakpoint to maintain.
13
31
  *
14
32
  * Flex is presentation only, so it has no headless tier.
15
33
  *
@@ -20,8 +38,20 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
20
38
  * @documentation https://fusion.dev/helix/components/flex
21
39
  *
22
40
  * @slot - The items to lay out.
41
+ *
42
+ * @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%`.
43
+ * @cssproperty --flex-flank-size - The width of the fixed item of a `flank` layout. Defaults to its own width.
44
+ * @cssproperty --flex-switch-at - The narrowest a `switch` layout keeps its items in one row, below which each takes a line. Defaults to `30rem`.
23
45
  */
24
46
  export declare class HelixFlex extends HelixElement {
47
+ /**
48
+ * How the lines of a wrapping row share the space across it, set as
49
+ * `align-content`.
50
+ *
51
+ * Named for the CSS property it sets, the way `alignItems` is. It moves
52
+ * nothing in a row that does not wrap, which has one line.
53
+ */
54
+ alignContent?: 'start' | 'center' | 'end' | 'between' | 'around' | 'stretch';
25
55
  /**
26
56
  * How items align across the direction, set as `align-items`.
27
57
  *
@@ -42,9 +72,18 @@ export declare class HelixFlex extends HelixElement {
42
72
  */
43
73
  alignItems?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
44
74
  /**
45
- * Whether items run across or down.
75
+ * Space between the items of a row, named on the space scale. Wins over
76
+ * `gap` across the row.
77
+ */
78
+ columnGap?: 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
79
+ /**
80
+ * Whether items run across or down, and from which end.
81
+ *
82
+ * `row-reverse` and `column-reverse` change only where the items are drawn.
83
+ * Focus and a screen reader still follow the order of the markup, so use
84
+ * them for a visual order that reads the same either way.
46
85
  */
47
- direction?: 'row' | 'column';
86
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
48
87
  /**
49
88
  * Space between items, named on the space scale.
50
89
  */
@@ -62,9 +101,27 @@ export declare class HelixFlex extends HelixElement {
62
101
  */
63
102
  justifyContent?: 'start' | 'center' | 'end' | 'between' | 'around';
64
103
  /**
65
- * Whether items wrap onto more lines.
104
+ * A common layout pattern: `cluster`, `split`, `flank`, `flank-end` or
105
+ * `switch`.
106
+ *
107
+ * Each sets the wrapping, alignment and spread it needs, and an attribute
108
+ * you write as well wins over it. `split` spreads the items as
109
+ * `justify-content: space-between` does, so a third item sits midway.
110
+ * `flank` holds the first item at its own width and gives the last one the
111
+ * rest, and `flank-end` does the reverse. `switch` puts the items in one
112
+ * row, or one to a line once the flex is narrower than `--flex-switch-at`.
113
+ */
114
+ layout?: 'cluster' | 'flank' | 'flank-end' | 'split' | 'switch';
115
+ /**
116
+ * Space between the lines of a wrapping row, or between the items of a
117
+ * column, named on the space scale. Wins over `gap` down the column.
118
+ */
119
+ rowGap?: 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
120
+ /**
121
+ * Whether items wrap onto more lines. `wrap="reverse"` wraps them upward,
122
+ * each new line above the one before.
66
123
  */
67
- wrap: boolean;
124
+ wrap: boolean | 'reverse';
68
125
  protected render(): TemplateResult;
69
126
  static styles: CSSResultGroup;
70
127
  }
@@ -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')
@@ -40,9 +40,9 @@ inline-size: 100%;
40
40
  }
41
41
 
42
42
  [part="panel"] {
43
- background-color: var(--helix-color-surface);
43
+ background-color: var(--graph-panel-background-color, var(--helix-color-surface));
44
44
  border-inline-start: var(--helix-border-thin) solid var(--helix-color-border);
45
- color: var(--helix-color-foreground);
45
+ color: var(--graph-panel-color, var(--helix-color-foreground));
46
46
  display: grid;
47
47
 
48
48
  grid-template-columns: minmax(0, 1fr);
@@ -377,19 +377,22 @@ align-items: center;
377
377
  box-sizing: border-box;
378
378
  cursor: pointer;
379
379
  display: flex;
380
- font-size: var(--helix-text-sm);
380
+ font-size: var(--graph-note-text, var(--helix-text-sm));
381
381
  gap: var(--helix-space-sm);
382
382
  min-block-size: var(--helix-size-control-tight);
383
383
  padding-block: var(--helix-space-2xs);
384
- padding-inline: var(--helix-space-xs);
384
+ padding-inline: var(--graph-note-padding-inline, var(--helix-space-xs));
385
385
  user-select: none;
386
386
  }
387
387
 
388
388
  [part~="note"]:hover,
389
389
  [part="list"]:focus-visible [part~="note-cursor"] {
390
- --_graph-wash: light-dark(
390
+ --_graph-wash: var(
391
+ --graph-note-hover-color,
392
+ light-dark(
391
393
  color-mix(in oklab, var(--helix-color-foreground) 8%, transparent),
392
394
  color-mix(in oklab, var(--helix-color-foreground) 12%, transparent)
395
+ )
393
396
  );
394
397
 
395
398
  background-image: linear-gradient(var(--_graph-wash), var(--_graph-wash));
@@ -405,7 +408,7 @@ white-space: nowrap;
405
408
  }
406
409
 
407
410
  [part="note-relation"] {
408
- color: var(--helix-color-foreground-muted);
411
+ color: var(--graph-note-relation-color, var(--helix-color-foreground-muted));
409
412
  flex: 1 1 0;
410
413
  font-size: var(--helix-text-xs);
411
414
  min-inline-size: 0;
@@ -416,11 +419,11 @@ white-space: nowrap;
416
419
  }
417
420
 
418
421
  [part~="note-selected"] {
419
- background-color: var(--helix-color-surface-sunken);
422
+ background-color: var(--graph-note-selected-background-color, var(--helix-color-surface-sunken));
420
423
  }
421
424
 
422
425
  [part~="note-selected"] [part="note-name"] {
423
- font-weight: var(--helix-weight-semibold);
426
+ font-weight: var(--graph-note-selected-weight, var(--helix-weight-semibold));
424
427
  }
425
428
 
426
429
  [part="header"],
@@ -20,6 +20,14 @@ import type { CSSResultGroup } from 'lit';
20
20
  * @cssproperty --graph-background-color - The color behind the drawing while it loads.
21
21
  * @cssproperty --graph-block-size - The frame's height, as a length.
22
22
  * @cssproperty --graph-border-color - The frame's border color.
23
+ * @cssproperty --graph-note-hover-color - The wash over a note in the list while the pointer is over it, and over the note the keyboard is on.
24
+ * @cssproperty --graph-note-padding-inline - The space at either end of a note in the list.
25
+ * @cssproperty --graph-note-relation-color - The color of how a note stands to the selected one, such as "Linked from Alpha".
26
+ * @cssproperty --graph-note-selected-background-color - The fill behind the selected note, which leads the list.
27
+ * @cssproperty --graph-note-selected-weight - The weight of the selected note's name.
28
+ * @cssproperty --graph-note-text - The size of a note's name in the list.
29
+ * @cssproperty --graph-panel-background-color - The fill behind the search and the list.
30
+ * @cssproperty --graph-panel-color - The text color of the search and the list.
23
31
  * @cssproperty --graph-panel-size - The list's width beside the drawing, or over it when opened with `no-panel`.
24
32
  * @cssproperty --viewport-control-background-color - The background of the zoom and fullscreen buttons. Map and Canvas use the same property.
25
33
  */