@fusion.dev/helix 0.142.1 → 0.144.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/custom-elements.json +29287 -1905
- package/dist/accordion/item/accordion-item.css.js +6 -1
- package/dist/accordion/item/accordion-item.d.ts +1 -0
- package/dist/announcement/root/announcement-root.d.ts +3 -3
- package/dist/app-header/root/app-header-root.d.ts +1 -3
- package/dist/aura/shader.d.ts +5 -1
- package/dist/aura/shader.js +88 -613
- package/dist/avatar/root/avatar-root.d.ts +3 -3
- package/dist/badge/root/badge-root.css.js +38 -2
- package/dist/badge/root/badge-root.d.ts +17 -0
- package/dist/badge/root/badge-root.js +3 -0
- package/dist/bar-chart/root/bar-chart-root.css.js +10 -0
- package/dist/blockquote/root/blockquote-root.css.js +9 -5
- package/dist/blockquote/root/blockquote-root.d.ts +5 -0
- package/dist/button/root/button-root.css.js +38 -1
- package/dist/button/root/button-root.d.ts +5 -0
- package/dist/button/root/button-root.js +2 -1
- package/dist/callout/root/callout-root.css.js +69 -11
- package/dist/callout/root/callout-root.d.ts +25 -2
- package/dist/callout/root/callout-root.js +4 -0
- package/dist/card/root/card-root.css.js +27 -1
- package/dist/card/root/card-root.d.ts +11 -0
- package/dist/carousel/root/carousel-root.js +2 -1
- package/dist/checkbox/root/checkbox-root.css.js +3 -3
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +2 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +2 -0
- package/dist/code-block/root/code-block-root.css.js +23 -0
- package/dist/code-block/root/code-block-root.d.ts +15 -0
- package/dist/code-block/root/code-block-root.js +8 -0
- package/dist/color-picker/root/color-picker-root.css.js +64 -0
- package/dist/color-picker/root/color-picker-root.d.ts +2 -1
- package/dist/color-picker/root/color-picker-root.js +0 -1
- package/dist/combobox/root/combobox-root.css.js +5 -4
- package/dist/copy-button/root/copy-button-root.css.js +5 -0
- package/dist/data-table/root/data-table-root.css.js +7 -0
- package/dist/date-input/root/date-input-root.css.js +19 -0
- package/dist/date-input/root/date-input-root.d.ts +8 -0
- package/dist/date-input/root/date-input-root.js +2 -0
- package/dist/date-picker/root/date-picker-root.css.js +83 -3
- package/dist/date-picker/root/date-picker-root.d.ts +1 -0
- package/dist/dialog/root/dialog-root.css.js +47 -0
- package/dist/divider/root/divider-root.css.js +8 -3
- package/dist/divider/root/divider-root.d.ts +17 -1
- package/dist/divider/root/divider-root.js +4 -0
- package/dist/donut-chart/root/donut-chart-root.css.js +10 -0
- package/dist/drawer/root/drawer-root.css.js +53 -5
- package/dist/element-events.generated.js +48 -14
- package/dist/empty/root/empty-root.css.js +9 -9
- package/dist/empty/root/empty-root.d.ts +9 -0
- package/dist/file-input/root/file-input-root.d.ts +0 -1
- package/dist/file-input/root/file-input-root.js +2 -1
- package/dist/filter-input/root/filter-input-root.d.ts +0 -1
- package/dist/filter-input/root/filter-input-root.js +2 -1
- package/dist/grid/root/grid-root.d.ts +15 -11
- package/dist/grid/root/grid-root.js +49 -15
- package/dist/heatmap/root/heatmap-root.css.js +33 -5
- package/dist/heatmap/root/heatmap-root.d.ts +4 -1
- package/dist/icon/index.d.ts +1 -0
- package/dist/icon/index.js +1 -0
- package/dist/icon/root/icon-root.d.ts +1 -1
- package/dist/icon/root/icon-root.js +1 -1
- package/dist/icon/root/index.d.ts +2 -0
- package/dist/icon/root/index.js +2 -0
- package/dist/icon-button/root/icon-button-root.css.js +80 -16
- package/dist/icon-button/root/icon-button-root.d.ts +8 -1
- package/dist/icon-button/root/icon-button-root.js +2 -1
- package/dist/image/root/image-root.css.js +1 -1
- package/dist/input/root/input-root.css.js +3 -3
- package/dist/input/root/input-root.d.ts +3 -1
- package/dist/input/root/input-root.js +0 -1
- package/dist/legend/root/legend-root.css.js +40 -13
- package/dist/legend/root/legend-root.d.ts +6 -0
- package/dist/legend/root/legend-root.js +1 -1
- package/dist/lightbox/root/lightbox-root.css.js +84 -0
- package/dist/lightbox/root/lightbox-root.d.ts +1 -0
- package/dist/line-chart/root/line-chart-root.css.js +10 -0
- package/dist/list/item/list-item.css.js +7 -1
- package/dist/loader/root/loader-root.css.js +10 -0
- package/dist/loader/root/loader-root.d.ts +10 -4
- package/dist/menu/item/menu-item.css.js +1 -1
- package/dist/menu/root/menu-root.d.ts +0 -3
- package/dist/meter/root/meter-root.css.js +27 -5
- package/dist/meter/root/meter-root.d.ts +5 -0
- package/dist/notifications/notification/notification.css.js +5 -0
- package/dist/number-input/root/number-input-root.css.js +3 -3
- package/dist/number-input/root/number-input-root.d.ts +6 -0
- package/dist/orb/root/orb-root.d.ts +11 -2
- package/dist/orb/root/orb-root.js +5 -1
- package/dist/pin-input/root/pin-input-root.css.js +12 -5
- package/dist/pin-input/root/pin-input-root.d.ts +5 -0
- package/dist/popover/root/popover-root.css.js +36 -0
- package/dist/popover/root/popover-root.d.ts +1 -0
- package/dist/progress/root/progress-root.css.js +22 -1
- package/dist/progress/root/progress-root.d.ts +5 -0
- package/dist/qr-code/root/qr-code-root.css.js +2 -1
- package/dist/qr-code/root/qr-code-root.d.ts +2 -2
- package/dist/quote/root/quote-root.css.js +1 -1
- package/dist/quote/root/quote-root.d.ts +1 -0
- package/dist/rating/root/rating-root.d.ts +3 -0
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/root/sandbox-root.d.ts +20 -1
- package/dist/sandbox/root/sandbox-root.js +27 -10
- package/dist/sandbox/source/sandbox-source.d.ts +6 -1
- package/dist/sandbox/source/sandbox-source.js +13 -3
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +3 -1
- package/dist/sandbox/terminal/sandbox-terminal.js +3 -1
- package/dist/shared/chart/tooltip.css.js +25 -2
- package/dist/shared/field/field-segments.css.d.ts +1 -0
- package/dist/shared/field/field-segments.css.js +40 -0
- package/dist/skeleton/root/skeleton-root.css.js +60 -5
- package/dist/skeleton/root/skeleton-root.d.ts +21 -2
- package/dist/skeleton/root/skeleton-root.js +3 -0
- package/dist/stat/root/stat-root.css.js +7 -7
- package/dist/stat/root/stat-root.d.ts +8 -0
- package/dist/switch/root/switch-root.css.js +13 -5
- package/dist/switch/root/switch-root.d.ts +25 -1
- package/dist/switch/root/switch-root.js +7 -0
- package/dist/table/column/table-column.css.js +5 -0
- package/dist/tabs/panel/tab-panel.css.js +1 -1
- package/dist/tabs/panel/tab-panel.d.ts +2 -0
- package/dist/tabs/root/tabs-root.css.js +13 -7
- package/dist/tabs/root/tabs-root.d.ts +5 -0
- package/dist/tabs/tab/tab.css.js +4 -4
- package/dist/tabs/tab/tab.d.ts +5 -0
- package/dist/tag/group/tag-group.css.d.ts +1 -0
- package/dist/tag/group/tag-group.css.js +6 -0
- package/dist/tag/group/tag-group.d.ts +25 -0
- package/dist/tag/group/tag-group.js +16 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +1 -0
- package/dist/tag/root/tag-root.css.js +50 -0
- package/dist/tag/root/tag-root.d.ts +6 -3
- package/dist/text/root/text-root.css.js +58 -1
- package/dist/text/root/text-root.d.ts +11 -2
- package/dist/text/root/text-root.js +19 -1
- package/dist/textarea/root/textarea-root.css.js +12 -4
- package/dist/textarea/root/textarea-root.d.ts +4 -0
- package/dist/time-input/root/time-input-root.css.js +19 -0
- package/dist/time-input/root/time-input-root.d.ts +8 -1
- package/dist/time-input/root/time-input-root.js +2 -1
- package/dist/toast/item/toast-item.css.js +16 -0
- package/dist/toast/root/toast-root.css.js +31 -7
- package/dist/toast/root/toast-root.d.ts +6 -9
- package/dist/toggle/group/toggle-group.css.js +16 -0
- package/dist/toggle/group/toggle-group.d.ts +3 -0
- package/dist/tour/root/tour-root.css.js +8 -0
- package/dist/tour/stop/tour-stop.css.js +37 -0
- package/dist/trend/root/trend-root.css.js +12 -5
- package/dist/trend/root/trend-root.d.ts +6 -2
- package/dist/trend/root/trend-root.js +0 -1
- package/dist/video/root/video-root.d.ts +0 -1
- package/dist/video/root/video-root.js +0 -1
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +0 -1
- package/dist/video-playlist/menu/video-playlist-menu.js +0 -1
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +9515 -2061
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +2302 -233
|
@@ -4,6 +4,7 @@ registerElementEvents({
|
|
|
4
4
|
'helix-announcement': ['helix-dismiss'],
|
|
5
5
|
'helix-app-header': ['helix-scrolled'],
|
|
6
6
|
'helix-avatar': ['error', 'load'],
|
|
7
|
+
'helix-callout': ['helix-dismiss'],
|
|
7
8
|
'helix-canvas': [
|
|
8
9
|
'helix-before-move',
|
|
9
10
|
'helix-before-reconnect',
|
|
@@ -19,9 +20,9 @@ registerElementEvents({
|
|
|
19
20
|
'helix-remove',
|
|
20
21
|
'helix-select',
|
|
21
22
|
],
|
|
22
|
-
'helix-carousel': ['helix-select'],
|
|
23
|
-
'helix-chat': ['helix-before-pin', 'helix-history', 'helix-send'],
|
|
24
|
-
'helix-chat-composer': ['helix-send'],
|
|
23
|
+
'helix-carousel': ['helix-activate', 'helix-select'],
|
|
24
|
+
'helix-chat': ['helix-before-pin', 'helix-history', 'helix-pin', 'helix-send'],
|
|
25
|
+
'helix-chat-composer': ['helix-send', 'input'],
|
|
25
26
|
'helix-chat-message': ['helix-send'],
|
|
26
27
|
'helix-checkbox': ['change', 'helix-before-toggle', 'input'],
|
|
27
28
|
'helix-checkbox-group': ['change', 'helix-before-change', 'input'],
|
|
@@ -51,14 +52,25 @@ registerElementEvents({
|
|
|
51
52
|
'input',
|
|
52
53
|
'toggle',
|
|
53
54
|
],
|
|
54
|
-
'helix-command': [
|
|
55
|
-
|
|
55
|
+
'helix-command': [
|
|
56
|
+
'helix-before-close',
|
|
57
|
+
'helix-before-open',
|
|
58
|
+
'helix-filter',
|
|
59
|
+
'helix-select',
|
|
60
|
+
'toggle',
|
|
61
|
+
],
|
|
62
|
+
'helix-copy-button': ['helix-copy', 'helix-copy-error'],
|
|
56
63
|
'helix-data-table': [
|
|
64
|
+
'helix-activate',
|
|
57
65
|
'helix-filter',
|
|
66
|
+
'helix-filtered',
|
|
58
67
|
'helix-navigate',
|
|
59
68
|
'helix-reorder',
|
|
69
|
+
'helix-reordered',
|
|
60
70
|
'helix-select',
|
|
71
|
+
'helix-selected',
|
|
61
72
|
'helix-sort',
|
|
73
|
+
'helix-sorted',
|
|
62
74
|
],
|
|
63
75
|
'helix-date-input': [
|
|
64
76
|
'change',
|
|
@@ -73,7 +85,7 @@ registerElementEvents({
|
|
|
73
85
|
'helix-drawer': ['close', 'helix-before-close', 'helix-before-open', 'toggle'],
|
|
74
86
|
'helix-drilldown': ['helix-select'],
|
|
75
87
|
'helix-drilldown-item': ['helix-select'],
|
|
76
|
-
'helix-file-input': ['change', 'helix-before-change', 'input'],
|
|
88
|
+
'helix-file-input': ['change', 'helix-before-change', 'helix-reject', 'input'],
|
|
77
89
|
'helix-filter-chip': ['helix-dismiss'],
|
|
78
90
|
'helix-filter-input': [
|
|
79
91
|
'change',
|
|
@@ -99,9 +111,11 @@ registerElementEvents({
|
|
|
99
111
|
'helix-graph-zoom',
|
|
100
112
|
],
|
|
101
113
|
'helix-heatmap': ['helix-resize'],
|
|
114
|
+
'helix-icon': ['error', 'load'],
|
|
102
115
|
'helix-image': ['error', 'load'],
|
|
103
|
-
'helix-input': ['change', 'helix-before-change', 'input'],
|
|
116
|
+
'helix-input': ['change', 'helix-before-change', 'helix-clear', 'input'],
|
|
104
117
|
'helix-kbd': ['helix-shortcut'],
|
|
118
|
+
'helix-legend': ['change', 'helix-before-change'],
|
|
105
119
|
'helix-lightbox': [
|
|
106
120
|
'close',
|
|
107
121
|
'helix-activate',
|
|
@@ -112,7 +126,10 @@ registerElementEvents({
|
|
|
112
126
|
],
|
|
113
127
|
'helix-listbox': ['change', 'helix-before-change', 'helix-filter', 'input'],
|
|
114
128
|
'helix-map': [
|
|
129
|
+
'change',
|
|
115
130
|
'helix-activate',
|
|
131
|
+
'helix-before-change',
|
|
132
|
+
'helix-before-toggle',
|
|
116
133
|
'helix-map-cluster',
|
|
117
134
|
'helix-map-pan',
|
|
118
135
|
'helix-map-part-change',
|
|
@@ -133,21 +150,22 @@ registerElementEvents({
|
|
|
133
150
|
'helix-map-terrain': ['helix-map-part-change'],
|
|
134
151
|
'helix-megamenu': ['helix-before-close', 'helix-before-open', 'toggle'],
|
|
135
152
|
'helix-menu': ['helix-before-close', 'helix-before-open', 'helix-select', 'toggle'],
|
|
136
|
-
'helix-menu-item': ['helix-select'],
|
|
153
|
+
'helix-menu-item': ['helix-before-toggle', 'helix-select'],
|
|
137
154
|
'helix-notification': ['helix-dismiss', 'helix-read'],
|
|
138
|
-
'helix-notification-group': ['helix-before-close', 'helix-before-open'],
|
|
155
|
+
'helix-notification-group': ['helix-before-close', 'helix-before-open', 'toggle'],
|
|
139
156
|
'helix-notifications': ['helix-dismiss', 'helix-read'],
|
|
140
157
|
'helix-number-input': ['change', 'helix-before-change', 'input'],
|
|
141
158
|
'helix-object-inspector': ['helix-copy'],
|
|
142
159
|
'helix-option': ['helix-select'],
|
|
143
160
|
'helix-outline': ['helix-activate'],
|
|
144
|
-
'helix-pagination': ['helix-navigate'],
|
|
145
|
-
'helix-pagination-size': ['helix-before-change'],
|
|
161
|
+
'helix-pagination': ['helix-activate', 'helix-navigate'],
|
|
162
|
+
'helix-pagination-size': ['change', 'helix-before-change', 'input'],
|
|
146
163
|
'helix-pin-input': ['change', 'helix-before-change', 'helix-complete', 'input'],
|
|
147
164
|
'helix-popover': ['helix-before-close', 'helix-before-open', 'toggle'],
|
|
165
|
+
'helix-qr-code': ['error'],
|
|
148
166
|
'helix-radio': ['helix-select'],
|
|
149
167
|
'helix-radio-group': ['change', 'helix-before-change', 'helix-select', 'input'],
|
|
150
|
-
'helix-rating': ['change', 'helix-before-change', 'input'],
|
|
168
|
+
'helix-rating': ['change', 'helix-before-change', 'helix-clear', 'input'],
|
|
151
169
|
'helix-sandbox': [
|
|
152
170
|
'helix-before-edit',
|
|
153
171
|
'helix-before-panel-resize',
|
|
@@ -163,20 +181,28 @@ registerElementEvents({
|
|
|
163
181
|
'helix-before-change',
|
|
164
182
|
'helix-before-close',
|
|
165
183
|
'helix-before-open',
|
|
184
|
+
'helix-filter',
|
|
166
185
|
'input',
|
|
167
186
|
'toggle',
|
|
168
187
|
],
|
|
169
188
|
'helix-slider': ['change', 'helix-before-change', 'input'],
|
|
170
189
|
'helix-speed-dial': ['helix-before-close', 'helix-before-open', 'helix-select', 'toggle'],
|
|
171
190
|
'helix-speed-dial-item': ['helix-select'],
|
|
172
|
-
'helix-splitter': [
|
|
191
|
+
'helix-splitter': [
|
|
192
|
+
'helix-before-collapse',
|
|
193
|
+
'helix-before-resize',
|
|
194
|
+
'helix-collapse',
|
|
195
|
+
'helix-resized',
|
|
196
|
+
],
|
|
173
197
|
'helix-step': ['helix-select'],
|
|
174
198
|
'helix-steps': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
175
199
|
'helix-switch': ['change', 'helix-before-toggle', 'input'],
|
|
176
200
|
'helix-tab': ['helix-select'],
|
|
201
|
+
'helix-table': ['helix-sort'],
|
|
177
202
|
'helix-table-column': ['helix-before-resize'],
|
|
178
203
|
'helix-tabs': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
179
204
|
'helix-tag': ['helix-dismiss'],
|
|
205
|
+
'helix-tag-group': ['change', 'helix-before-change', 'helix-dismiss'],
|
|
180
206
|
'helix-textarea': ['change', 'helix-before-change', 'input'],
|
|
181
207
|
'helix-time-input': [
|
|
182
208
|
'change',
|
|
@@ -192,7 +218,15 @@ registerElementEvents({
|
|
|
192
218
|
'helix-toggle': ['helix-select'],
|
|
193
219
|
'helix-toggle-group': ['change', 'helix-before-change', 'helix-select', 'input'],
|
|
194
220
|
'helix-tooltip': ['helix-before-close', 'helix-before-open', 'toggle'],
|
|
195
|
-
'helix-tour': [
|
|
221
|
+
'helix-tour': [
|
|
222
|
+
'helix-activate',
|
|
223
|
+
'helix-before-activate',
|
|
224
|
+
'helix-before-close',
|
|
225
|
+
'helix-before-open',
|
|
226
|
+
'helix-complete',
|
|
227
|
+
'helix-tour-ask',
|
|
228
|
+
'toggle',
|
|
229
|
+
],
|
|
196
230
|
'helix-tour-stop': ['helix-tour-ask'],
|
|
197
231
|
'helix-tree': ['helix-activate', 'helix-before-activate', 'helix-select'],
|
|
198
232
|
'helix-tree-item': ['helix-before-close', 'helix-before-open', 'helix-select', 'toggle'],
|
|
@@ -3,37 +3,37 @@ export const styles = createSheet(`:host {
|
|
|
3
3
|
align-items: center;
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
gap: var(--helix-space-sm);
|
|
6
|
+
gap: var(--empty-gap, var(--helix-space-sm));
|
|
7
7
|
padding: var(--empty-padding, var(--helix-space-2xl));
|
|
8
8
|
text-align: center;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
slot[name="icon"]::slotted(*) {
|
|
12
12
|
|
|
13
|
-
--icon-size: var(--helix-size-icon-lg);
|
|
13
|
+
--icon-size: var(--empty-icon-size, var(--helix-size-icon-lg));
|
|
14
14
|
|
|
15
|
-
color: var(--helix-color-foreground-subtle);
|
|
15
|
+
color: var(--empty-icon-color, var(--helix-color-foreground-subtle));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
slot[name="heading"]::slotted(*) {
|
|
19
|
-
color: var(--helix-color-foreground);
|
|
20
|
-
font-size: var(--helix-text-lg);
|
|
19
|
+
color: var(--empty-heading-color, var(--helix-color-foreground));
|
|
20
|
+
font-size: var(--empty-heading-size, var(--helix-text-lg));
|
|
21
21
|
font-weight: var(--helix-weight-semibold);
|
|
22
22
|
letter-spacing: var(--helix-tracking-tight);
|
|
23
23
|
margin: var(--helix-space-none);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
slot:not([name]) {
|
|
27
|
-
color: var(--helix-color-foreground-muted);
|
|
28
|
-
font-size: var(--helix-text-sm);
|
|
27
|
+
color: var(--empty-message-color, var(--helix-color-foreground-muted));
|
|
28
|
+
font-size: var(--empty-message-size, var(--helix-text-sm));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
slot:not([name])::slotted(*) {
|
|
32
32
|
margin: var(--helix-space-none);
|
|
33
|
-
max-inline-size: 46ch;
|
|
33
|
+
max-inline-size: var(--empty-message-measure, 46ch);
|
|
34
34
|
}
|
|
35
35
|
slot[name="actions"]::slotted(*) {
|
|
36
|
-
margin-block-start: var(--helix-space-sm);
|
|
36
|
+
margin-block-start: var(--empty-actions-gap, var(--helix-space-sm));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
@media print {
|
|
@@ -13,6 +13,15 @@ import type { CSSResultGroup } from 'lit';
|
|
|
13
13
|
* @aliases Placeholder, NoResults, Blank
|
|
14
14
|
* @documentation https://fusion.dev/helix/components/empty
|
|
15
15
|
*
|
|
16
|
+
* @cssproperty --empty-actions-gap - Space added above the actions.
|
|
17
|
+
* @cssproperty --empty-gap - Space between the icon, the heading, the message and the actions.
|
|
18
|
+
* @cssproperty --empty-heading-color - Color of the heading.
|
|
19
|
+
* @cssproperty --empty-heading-size - Size of the heading.
|
|
20
|
+
* @cssproperty --empty-icon-color - Color of the icon.
|
|
21
|
+
* @cssproperty --empty-icon-size - Size of the icon.
|
|
22
|
+
* @cssproperty --empty-message-color - Color of the message.
|
|
23
|
+
* @cssproperty --empty-message-measure - Widest the message runs before it wraps.
|
|
24
|
+
* @cssproperty --empty-message-size - Size of the message.
|
|
16
25
|
* @cssproperty --empty-padding - Space around the whole block.
|
|
17
26
|
*/
|
|
18
27
|
export declare class HelixEmpty extends HelixHeadlessEmpty {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HelixHeadlessFileInput } from '@fusion.dev/helix-headless/file-input';
|
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
|
3
|
-
import '../../icon/index.js';
|
|
4
3
|
import '../../tag/index.js';
|
|
5
4
|
/**
|
|
6
5
|
* @summary A field for choosing files from a picker or by dropping them on it.
|
|
@@ -6,16 +6,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessFileInput } from '@fusion.dev/helix-headless/file-input';
|
|
9
|
-
import '../../icon/index.js';
|
|
10
9
|
import '../../tag/index.js';
|
|
11
10
|
import { styles as fieldStyles } from '../../shared/field/field.css.js';
|
|
12
11
|
import { styles as fieldFrameStyles } from '../../shared/field/field-frame.css.js';
|
|
13
12
|
import { styles as fieldStackedStyles } from '../../shared/field/field-stacked.css.js';
|
|
14
13
|
import { styles as glyphStyles } from '../../shared/glyph/glyph.css.js';
|
|
14
|
+
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
15
15
|
import { styles } from './file-input-root.css.js';
|
|
16
16
|
let HelixFileInput = class HelixFileInput extends HelixHeadlessFileInput {
|
|
17
17
|
static { this.tier = 'helix-'; }
|
|
18
18
|
static { this.styles = [
|
|
19
|
+
liveStyles,
|
|
19
20
|
glyphStyles,
|
|
20
21
|
fieldStyles,
|
|
21
22
|
fieldFrameStyles,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HelixHeadlessFilterInput } from '@fusion.dev/helix-headless/filter-input';
|
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
|
3
|
-
import '../../icon/index.js';
|
|
4
3
|
import '../../option/index.js';
|
|
5
4
|
/**
|
|
6
5
|
* @summary A text field for filters, with the active filters shown in it as tokens.
|
|
@@ -6,7 +6,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessFilterInput } from '@fusion.dev/helix-headless/filter-input';
|
|
9
|
-
import '../../icon/index.js';
|
|
10
9
|
import '../../option/index.js';
|
|
11
10
|
import { styles as fieldStyles } from '../../shared/field/field.css.js';
|
|
12
11
|
import { styles as fieldFrameStyles } from '../../shared/field/field-frame.css.js';
|
|
@@ -14,10 +13,12 @@ import { styles as fieldStackedStyles } from '../../shared/field/field-stacked.c
|
|
|
14
13
|
import { styles as floatingEntranceStyles } from '../../shared/floating/entrance.css.js';
|
|
15
14
|
import { styles as floatingPanelStyles } from '../../shared/floating/panel.css.js';
|
|
16
15
|
import { styles as glyphStyles } from '../../shared/glyph/glyph.css.js';
|
|
16
|
+
import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
17
17
|
import { styles as tagRowStyles } from '../../shared/tags/tags.css.js';
|
|
18
18
|
import { styles } from './filter-input-root.css.js';
|
|
19
19
|
let HelixFilterInput = class HelixFilterInput extends HelixHeadlessFilterInput {
|
|
20
20
|
static { this.styles = [
|
|
21
|
+
liveStyles,
|
|
21
22
|
glyphStyles,
|
|
22
23
|
fieldStyles,
|
|
23
24
|
fieldFrameStyles,
|
|
@@ -42,6 +42,9 @@ export declare class HelixGrid extends HelixElement {
|
|
|
42
42
|
alignItems?: 'start' | 'center' | 'end' | 'stretch';
|
|
43
43
|
/**
|
|
44
44
|
* A fixed number of equal columns.
|
|
45
|
+
*
|
|
46
|
+
* Two to six are plain CSS. Any other count is written into the shadow
|
|
47
|
+
* root's rule, which the server renders too.
|
|
45
48
|
*/
|
|
46
49
|
columns?: number;
|
|
47
50
|
/**
|
|
@@ -51,12 +54,17 @@ export declare class HelixGrid extends HelixElement {
|
|
|
51
54
|
/**
|
|
52
55
|
* The minimum column width. The grid fits as many columns as the width allows.
|
|
53
56
|
*
|
|
57
|
+
* A length, such as `12rem`, or `calc()`, `clamp()`, `min()`, `max()` and
|
|
58
|
+
* `var()` over lengths. Anything else is refused with a warning, and the grid
|
|
59
|
+
* lays out by `columns`.
|
|
60
|
+
*
|
|
54
61
|
* Takes precedence over `columns`: a grid that both fixes a count and reflows
|
|
55
62
|
* is two intentions in one element.
|
|
56
63
|
*/
|
|
57
64
|
min: string;
|
|
58
65
|
/**
|
|
59
|
-
*
|
|
66
|
+
* The rule the shadow root's own `<style>` holds: the reset, and the track
|
|
67
|
+
* list `min` or an unlisted `columns` asks for.
|
|
60
68
|
*
|
|
61
69
|
* Into a `<style>` rather than onto `this.style`, and the difference is
|
|
62
70
|
* hydration. An inline style on the host is an attribute the element gives
|
|
@@ -64,10 +72,11 @@ export declare class HelixGrid extends HelixElement {
|
|
|
64
72
|
* it and hydration reports a mismatch it will not patch up. The shadow root
|
|
65
73
|
* is not part of the tree React hydrates, so a rule written there is free.
|
|
66
74
|
*
|
|
67
|
-
*
|
|
68
|
-
* `<style
|
|
69
|
-
*
|
|
70
|
-
*
|
|
75
|
+
* **Static text, so the server renders it.** Lit refuses an expression inside
|
|
76
|
+
* `<style>`, and a rule filled in after upgrade left a server-rendered `min`
|
|
77
|
+
* grid in one column until then. `unsafeStatic` joins the text into the
|
|
78
|
+
* template itself, so it is safe only because `min` passed `lengthOf` and a
|
|
79
|
+
* count is an integer.
|
|
71
80
|
*
|
|
72
81
|
* It sets a custom property rather than the track list itself. A shadow
|
|
73
82
|
* root's adopted stylesheets cascade *after* its own `<style>` elements, and
|
|
@@ -75,13 +84,8 @@ export declare class HelixGrid extends HelixElement {
|
|
|
75
84
|
* one in the stylesheet and every `min` grid came out a single column. The
|
|
76
85
|
* stylesheet only ever reads `--_grid-template`, so there is nothing to
|
|
77
86
|
* lose against.
|
|
78
|
-
*
|
|
79
|
-
* The consequence is that a server-rendered grid falls back to the
|
|
80
|
-
* stylesheet's single column until it upgrades. That is why `columns` is also
|
|
81
|
-
* expressed as plain CSS below: the fixed-count case, which can be enumerated,
|
|
82
|
-
* needs no JavaScript at all, and only `min` depends on this.
|
|
83
87
|
*/
|
|
84
|
-
private
|
|
88
|
+
private templateRule;
|
|
85
89
|
protected updated(changed: PropertyValues): void;
|
|
86
90
|
protected render(): TemplateResult;
|
|
87
91
|
static styles: CSSResultGroup;
|
|
@@ -4,36 +4,70 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, HelixElement } from '@fusion.dev/helix-core';
|
|
8
|
-
import { html } from 'lit';
|
|
7
|
+
import { customElement, HelixElement, reportRuntime } from '@fusion.dev/helix-core';
|
|
9
8
|
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { html, unsafeStatic } from 'lit/static-html.js';
|
|
10
10
|
import { styles } from './grid-root.css.js';
|
|
11
11
|
const UNINHERITED = '--grid-columns: initial; --_grid-template: initial;';
|
|
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
|
+
const TOKEN = /\s+|(?:calc|clamp|min|max)\(|var\(--[\w-]+|-?(?:\d+\.?\d*|\.\d+)[a-z%]*|[(),+*/-]/giy;
|
|
14
|
+
const lengthOf = (value) => {
|
|
15
|
+
const min = value?.trim() ?? '';
|
|
16
|
+
if (min === '' || min.includes('/*')) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
if (!min.includes('(')) {
|
|
20
|
+
return NUMBER.test(min) && /[a-z%]$/i.test(min) ? min : undefined;
|
|
21
|
+
}
|
|
22
|
+
let depth = 0;
|
|
23
|
+
TOKEN.lastIndex = 0;
|
|
24
|
+
while (TOKEN.lastIndex < min.length) {
|
|
25
|
+
const at = TOKEN.lastIndex;
|
|
26
|
+
const token = TOKEN.exec(min)?.[0];
|
|
27
|
+
if (token === undefined || TOKEN.lastIndex === at) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
if (/\d/.test(token) && /^-?[\d.]/.test(token) && !NUMBER.test(token)) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
depth += token.endsWith('(') || token.startsWith('var(') ? 1 : token === ')' ? -1 : 0;
|
|
34
|
+
if (depth < 0) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return depth === 0 ? min : undefined;
|
|
39
|
+
};
|
|
12
40
|
let HelixGrid = class HelixGrid extends HelixElement {
|
|
13
41
|
constructor() {
|
|
14
42
|
super(...arguments);
|
|
15
43
|
this.min = '';
|
|
16
44
|
}
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
return;
|
|
45
|
+
templateRule() {
|
|
46
|
+
const min = lengthOf(this.min);
|
|
47
|
+
if (min !== undefined) {
|
|
48
|
+
return `:host { ${UNINHERITED} --_grid-template: repeat(auto-fit, minmax(min(${min}, 100%), 1fr)); }`;
|
|
21
49
|
}
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
: `:host { ${UNINHERITED} }`;
|
|
50
|
+
const count = Number(this.columns);
|
|
51
|
+
if (Number.isInteger(count) && count > 6) {
|
|
52
|
+
return `:host { ${UNINHERITED} --_grid-template: repeat(${count}, minmax(0, 1fr)); }`;
|
|
53
|
+
}
|
|
54
|
+
return `:host { ${UNINHERITED} }`;
|
|
28
55
|
}
|
|
29
56
|
updated(changed) {
|
|
30
57
|
super.updated(changed);
|
|
31
|
-
|
|
32
|
-
|
|
58
|
+
const min = this.min?.trim() ?? '';
|
|
59
|
+
if (changed.has('min') && min !== '' && lengthOf(min) === undefined) {
|
|
60
|
+
reportRuntime({
|
|
61
|
+
kind: 'refused-length',
|
|
62
|
+
message: `<helix-grid min="${min}"> is not a length the grid can write, so it lays out by ` +
|
|
63
|
+
'`columns`. Write a length such as `12rem`, or `calc()`, `clamp()`, `min()`, `max()` ' +
|
|
64
|
+
'or `var()` over lengths.',
|
|
65
|
+
tag: this.localName,
|
|
66
|
+
});
|
|
33
67
|
}
|
|
34
68
|
}
|
|
35
69
|
render() {
|
|
36
|
-
return html `<style id="template"
|
|
70
|
+
return html `<style id="template">${unsafeStatic(this.templateRule())}</style>
|
|
37
71
|
<slot></slot>`;
|
|
38
72
|
}
|
|
39
73
|
static { this.styles = styles; }
|
|
@@ -49,7 +49,7 @@ justify-content: start;
|
|
|
49
49
|
position: relative;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
[part
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
package/dist/icon/index.d.ts
CHANGED
package/dist/icon/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
|
-
import { HelixHeadlessIcon } from '@fusion.dev/helix-headless/icon';
|
|
8
|
+
import { HelixHeadlessIcon } from '@fusion.dev/helix-headless/icon/root';
|
|
9
9
|
import { styles } from './icon-root.css.js';
|
|
10
10
|
let HelixIcon = class HelixIcon extends HelixHeadlessIcon {
|
|
11
11
|
static { this.styles = styles; }
|