@fusion.dev/helix 0.144.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.
- package/custom-elements.json +9978 -916
- package/dist/accordion/item/accordion-item.css.js +14 -3
- package/dist/accordion/item/accordion-item.d.ts +2 -0
- package/dist/aura/palette.d.ts +38 -0
- package/dist/aura/palette.js +22 -0
- package/dist/aura/root/aura-root.css.js +24 -3
- package/dist/aura/root/aura-root.d.ts +42 -7
- package/dist/aura/root/aura-root.js +31 -25
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +7 -7
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +5 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.css.js +1 -1
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +3 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +2 -0
- package/dist/button-group/root/button-group-root.d.ts +3 -0
- package/dist/canvas/root/canvas-root.css.js +1 -0
- package/dist/carousel/root/carousel-root.css.js +17 -1
- package/dist/data-table/root/data-table-root.css.js +63 -0
- package/dist/data-table/root/data-table-root.d.ts +1 -0
- package/dist/description-list/item/description-list-item.css.js +11 -0
- package/dist/drilldown/item/drilldown-item.css.js +2 -1
- package/dist/drilldown/root/drilldown-root.css.js +2 -1
- package/dist/element-events.generated.js +58 -9
- package/dist/flex/root/flex-root.css.js +134 -9
- package/dist/flex/root/flex-root.d.ts +51 -5
- package/dist/flex/root/flex-root.js +17 -1
- package/dist/grid/root/grid-root.css.js +114 -11
- package/dist/grid/root/grid-root.d.ts +37 -0
- package/dist/grid/root/grid-root.js +13 -1
- package/dist/list/item/list-item.css.js +21 -1
- package/dist/list/item/list-item.d.ts +3 -0
- package/dist/list/root/list-root.css.js +13 -1
- package/dist/menu/index.d.ts +1 -0
- package/dist/menu/index.js +1 -0
- package/dist/menu/item/menu-item.css.js +15 -1
- package/dist/menu/item/menu-item.d.ts +3 -0
- package/dist/menu/item/menu-item.js +2 -0
- package/dist/menu/section/menu-section.css.d.ts +1 -0
- package/dist/menu/section/menu-section.css.js +14 -0
- package/dist/menu/section/menu-section.d.ts +24 -0
- package/dist/menu/section/menu-section.js +16 -0
- package/dist/navigation/root/navigation-root.css.js +3 -2
- package/dist/navigation/root/navigation-root.d.ts +6 -0
- package/dist/notifications/root/notifications-root.css.js +24 -1
- package/dist/notifications/root/notifications-root.d.ts +1 -0
- package/dist/object-inspector/root/object-inspector-root.css.js +36 -1
- package/dist/object-inspector/root/object-inspector-root.d.ts +4 -1
- package/dist/object-inspector/root/object-inspector-root.js +2 -1
- package/dist/orb/index.d.ts +1 -1
- package/dist/orb/index.js +1 -1
- package/dist/orb/root/orb-root.d.ts +31 -5
- package/dist/orb/root/orb-root.js +33 -4
- package/dist/outline/root/outline-root.css.js +10 -0
- package/dist/outline/root/outline-root.d.ts +7 -0
- package/dist/sandbox/frame.d.ts +63 -0
- package/dist/sandbox/frame.js +132 -0
- package/dist/sandbox/index.d.ts +1 -0
- package/dist/sandbox/index.js +1 -0
- package/dist/sandbox/levels.d.ts +10 -0
- package/dist/sandbox/levels.js +5 -0
- package/dist/sandbox/root/sandbox-root.d.ts +3 -0
- package/dist/sandbox/root/sandbox-root.js +13 -3
- package/dist/sandbox/source/sandbox-source.d.ts +1 -0
- package/dist/sandbox/source/sandbox-source.js +7 -3
- package/dist/sandbox/terminal/sandbox-terminal.css.js +39 -0
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +42 -1
- package/dist/sandbox/terminal/sandbox-terminal.js +47 -3
- package/dist/scroll-area/root/scroll-area-root.css.js +83 -1
- package/dist/scroll-area/root/scroll-area-root.d.ts +6 -0
- package/dist/skip-link/root/skip-link-root.css.js +8 -8
- package/dist/skip-link/root/skip-link-root.d.ts +9 -0
- package/dist/speed-dial/item/speed-dial-item.css.js +11 -4
- package/dist/speed-dial/item/speed-dial-item.d.ts +4 -0
- package/dist/speed-dial/root/speed-dial-root.css.js +7 -3
- package/dist/speed-dial/root/speed-dial-root.d.ts +9 -0
- package/dist/speed-dial/root/speed-dial-root.js +4 -0
- package/dist/steps/step/step.js +2 -1
- package/dist/table/root/table-root.css.js +18 -0
- package/dist/table/root/table-root.d.ts +6 -0
- package/dist/table/root/table-root.js +2 -0
- package/dist/table/row/table-row.css.js +18 -0
- package/dist/table/row/table-row.d.ts +2 -0
- package/dist/table/row/table-row.js +2 -0
- package/dist/tabs/panel/tab-panel.css.js +5 -1
- package/dist/tabs/root/tabs-root.css.js +56 -1
- package/dist/tabs/tab/tab.css.js +5 -1
- package/dist/text/clamp.d.ts +8 -0
- package/dist/text/clamp.js +1 -0
- package/dist/text/root/text-root.css.js +85 -45
- package/dist/text/root/text-root.d.ts +48 -7
- package/dist/text/root/text-root.js +17 -11
- package/dist/timeline/group/timeline-group.css.d.ts +1 -0
- package/dist/timeline/group/timeline-group.css.js +32 -0
- package/dist/timeline/group/timeline-group.d.ts +25 -0
- package/dist/timeline/group/timeline-group.js +16 -0
- package/dist/timeline/index.d.ts +1 -0
- package/dist/timeline/index.js +1 -0
- package/dist/timeline/item/timeline-item.css.js +43 -16
- package/dist/timeline/root/timeline-root.css.js +56 -0
- package/dist/timeline/root/timeline-root.d.ts +26 -0
- package/dist/timeline/root/timeline-root.js +7 -0
- package/dist/toolbar/root/toolbar-root.css.js +3 -0
- package/dist/toolbar/root/toolbar-root.d.ts +3 -0
- package/dist/tree/item/tree-item.css.js +72 -0
- package/dist/tree/item/tree-item.d.ts +10 -0
- package/dist/video/root/video-root.css.js +6 -0
- package/dist/video/root/video-root.d.ts +3 -0
- package/dist/virtual-list/root/virtual-list-root.css.js +5 -0
- package/dist/virtual-list/root/virtual-list-root.d.ts +4 -3
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +4033 -671
- package/types/svelte.d.ts +2 -0
- package/types/vue.d.ts +1078 -202
|
@@ -3,6 +3,7 @@ registerElementEvents({
|
|
|
3
3
|
'helix-accordion-item': ['helix-before-close', 'helix-before-open', 'toggle'],
|
|
4
4
|
'helix-announcement': ['helix-dismiss'],
|
|
5
5
|
'helix-app-header': ['helix-scrolled'],
|
|
6
|
+
'helix-aura': ['helix-aura-fallback'],
|
|
6
7
|
'helix-avatar': ['error', 'load'],
|
|
7
8
|
'helix-callout': ['helix-dismiss'],
|
|
8
9
|
'helix-canvas': [
|
|
@@ -22,7 +23,7 @@ registerElementEvents({
|
|
|
22
23
|
],
|
|
23
24
|
'helix-carousel': ['helix-activate', 'helix-select'],
|
|
24
25
|
'helix-chat': ['helix-before-pin', 'helix-history', 'helix-pin', 'helix-send'],
|
|
25
|
-
'helix-chat-composer': ['helix-send', 'input'],
|
|
26
|
+
'helix-chat-composer': ['helix-send', 'helix-typing', 'input'],
|
|
26
27
|
'helix-chat-message': ['helix-send'],
|
|
27
28
|
'helix-checkbox': ['change', 'helix-before-toggle', 'input'],
|
|
28
29
|
'helix-checkbox-group': ['change', 'helix-before-change', 'input'],
|
|
@@ -62,8 +63,10 @@ registerElementEvents({
|
|
|
62
63
|
'helix-copy-button': ['helix-copy', 'helix-copy-error'],
|
|
63
64
|
'helix-data-table': [
|
|
64
65
|
'helix-activate',
|
|
66
|
+
'helix-expand',
|
|
65
67
|
'helix-filter',
|
|
66
68
|
'helix-filtered',
|
|
69
|
+
'helix-load-more',
|
|
67
70
|
'helix-navigate',
|
|
68
71
|
'helix-reorder',
|
|
69
72
|
'helix-reordered',
|
|
@@ -124,6 +127,8 @@ registerElementEvents({
|
|
|
124
127
|
'helix-before-open',
|
|
125
128
|
'toggle',
|
|
126
129
|
],
|
|
130
|
+
'helix-list': ['change', 'helix-action', 'helix-before-change'],
|
|
131
|
+
'helix-list-item': ['helix-action'],
|
|
127
132
|
'helix-listbox': ['change', 'helix-before-change', 'helix-filter', 'input'],
|
|
128
133
|
'helix-map': [
|
|
129
134
|
'change',
|
|
@@ -137,6 +142,7 @@ registerElementEvents({
|
|
|
137
142
|
'helix-map-rotate',
|
|
138
143
|
'helix-map-tilt',
|
|
139
144
|
'helix-map-zoom',
|
|
145
|
+
'helix-toggle',
|
|
140
146
|
],
|
|
141
147
|
'helix-map-area': ['helix-map-part-change'],
|
|
142
148
|
'helix-map-buildings': ['helix-map-part-change'],
|
|
@@ -153,9 +159,15 @@ registerElementEvents({
|
|
|
153
159
|
'helix-menu-item': ['helix-before-toggle', 'helix-select'],
|
|
154
160
|
'helix-notification': ['helix-dismiss', 'helix-read'],
|
|
155
161
|
'helix-notification-group': ['helix-before-close', 'helix-before-open', 'toggle'],
|
|
156
|
-
'helix-notifications': ['helix-dismiss', 'helix-read'],
|
|
162
|
+
'helix-notifications': ['helix-dismiss', 'helix-load-more', 'helix-read'],
|
|
157
163
|
'helix-number-input': ['change', 'helix-before-change', 'input'],
|
|
158
|
-
'helix-object-inspector': [
|
|
164
|
+
'helix-object-inspector': [
|
|
165
|
+
'helix-activate',
|
|
166
|
+
'helix-before-activate',
|
|
167
|
+
'helix-copy',
|
|
168
|
+
'helix-filter',
|
|
169
|
+
'helix-filtered',
|
|
170
|
+
],
|
|
159
171
|
'helix-option': ['helix-select'],
|
|
160
172
|
'helix-outline': ['helix-activate'],
|
|
161
173
|
'helix-pagination': ['helix-activate', 'helix-navigate'],
|
|
@@ -172,10 +184,14 @@ registerElementEvents({
|
|
|
172
184
|
'helix-before-split',
|
|
173
185
|
'helix-caret',
|
|
174
186
|
'helix-console',
|
|
187
|
+
'helix-edit',
|
|
188
|
+
'helix-panel-resize',
|
|
175
189
|
'helix-resize',
|
|
190
|
+
'helix-split',
|
|
176
191
|
],
|
|
177
192
|
'helix-sandbox-preview': ['helix-console', 'helix-resize'],
|
|
178
|
-
'helix-sandbox-source': ['helix-before-edit', 'helix-caret'],
|
|
193
|
+
'helix-sandbox-source': ['helix-before-edit', 'helix-caret', 'helix-edit'],
|
|
194
|
+
'helix-scroll-area': ['scroll', 'scrollend'],
|
|
179
195
|
'helix-select': [
|
|
180
196
|
'change',
|
|
181
197
|
'helix-before-change',
|
|
@@ -198,8 +214,8 @@ registerElementEvents({
|
|
|
198
214
|
'helix-steps': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
199
215
|
'helix-switch': ['change', 'helix-before-toggle', 'input'],
|
|
200
216
|
'helix-tab': ['helix-select'],
|
|
201
|
-
'helix-table': ['helix-sort'],
|
|
202
|
-
'helix-table-column': ['helix-before-resize'],
|
|
217
|
+
'helix-table': ['helix-select', 'helix-selected', 'helix-sort', 'helix-sorted'],
|
|
218
|
+
'helix-table-column': ['helix-before-resize', 'helix-resized'],
|
|
203
219
|
'helix-tabs': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
204
220
|
'helix-tag': ['helix-dismiss'],
|
|
205
221
|
'helix-tag-group': ['change', 'helix-before-change', 'helix-dismiss'],
|
|
@@ -229,9 +245,42 @@ registerElementEvents({
|
|
|
229
245
|
],
|
|
230
246
|
'helix-tour-stop': ['helix-tour-ask'],
|
|
231
247
|
'helix-tree': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
232
|
-
'helix-tree-item': [
|
|
233
|
-
|
|
234
|
-
|
|
248
|
+
'helix-tree-item': [
|
|
249
|
+
'helix-before-close',
|
|
250
|
+
'helix-before-open',
|
|
251
|
+
'helix-load',
|
|
252
|
+
'helix-select',
|
|
253
|
+
'toggle',
|
|
254
|
+
],
|
|
255
|
+
'helix-video': [
|
|
256
|
+
'abort',
|
|
257
|
+
'canplay',
|
|
258
|
+
'canplaythrough',
|
|
259
|
+
'durationchange',
|
|
260
|
+
'emptied',
|
|
261
|
+
'ended',
|
|
262
|
+
'error',
|
|
263
|
+
'helix-next',
|
|
264
|
+
'helix-previous',
|
|
265
|
+
'loadeddata',
|
|
266
|
+
'loadedmetadata',
|
|
267
|
+
'loadstart',
|
|
268
|
+
'pause',
|
|
269
|
+
'play',
|
|
270
|
+
'playing',
|
|
271
|
+
'progress',
|
|
272
|
+
'ratechange',
|
|
273
|
+
'resize',
|
|
274
|
+
'seeked',
|
|
275
|
+
'seeking',
|
|
276
|
+
'stalled',
|
|
277
|
+
'suspend',
|
|
278
|
+
'timeupdate',
|
|
279
|
+
'volumechange',
|
|
280
|
+
'waiting',
|
|
281
|
+
],
|
|
282
|
+
'helix-video-playlist': ['helix-activate', 'helix-before-activate', 'helix-end'],
|
|
235
283
|
'helix-video-playlist-item': ['helix-select'],
|
|
236
284
|
'helix-video-playlist-menu': ['helix-select'],
|
|
285
|
+
'helix-virtual-list': ['helix-load-more', 'helix-range-change'],
|
|
237
286
|
});
|
|
@@ -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(--
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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(--
|
|
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.
|