@fusion.dev/helix 0.146.0 → 0.148.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 +10225 -1400
- package/dist/accordion/item/accordion-item.css.js +4 -96
- package/dist/accordion/root/accordion-root.css.js +2 -28
- package/dist/announcement/root/announcement-root.css.js +10 -154
- package/dist/announcement/root/announcement-root.d.ts +3 -0
- package/dist/app-header/root/app-header-root.css.js +2 -118
- package/dist/area-chart/root/area-chart-root.css.js +4 -94
- package/dist/area-chart/root/area-chart-root.d.ts +1 -0
- package/dist/aura/root/aura-root.css.js +2 -57
- package/dist/avatar/group/avatar-group.css.js +5 -36
- package/dist/avatar/group/avatar-group.d.ts +3 -0
- package/dist/avatar/root/avatar-root.css.js +1 -53
- package/dist/avatar/root/avatar-root.d.ts +2 -0
- package/dist/badge/root/badge-root.css.js +12 -207
- package/dist/badge/root/badge-root.d.ts +2 -0
- package/dist/bar-chart/root/bar-chart-root.css.js +8 -292
- package/dist/blockquote/root/blockquote-root.css.js +1 -43
- package/dist/blockquote/root/blockquote-root.d.ts +8 -2
- package/dist/breadcrumbs/breadcrumb/breadcrumb.css.js +13 -98
- package/dist/breadcrumbs/root/breadcrumbs-root.css.js +5 -42
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +17 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.js +4 -0
- package/dist/button/root/button-root.css.js +16 -197
- package/dist/button/root/button-root.d.ts +1 -0
- package/dist/button-group/root/button-group-root.css.js +11 -52
- package/dist/button-group/root/button-group-root.d.ts +29 -7
- package/dist/button-group/root/button-group-root.js +19 -0
- package/dist/callout/root/callout-root.css.js +5 -138
- package/dist/callout/root/callout-root.d.ts +4 -2
- package/dist/canvas/node/canvas-node.css.js +10 -367
- package/dist/canvas/node/canvas-node.d.ts +5 -0
- package/dist/canvas/root/canvas-root.css.js +11 -270
- package/dist/canvas/root/canvas-root.d.ts +6 -0
- package/dist/card/root/card-root.css.js +5 -134
- package/dist/card/root/card-root.d.ts +4 -0
- package/dist/carousel/root/carousel-root.css.js +20 -386
- package/dist/chat/composer/chat-composer.css.js +4 -105
- package/dist/chat/message/chat-message.css.js +5 -239
- package/dist/chat/message/chat-message.d.ts +5 -0
- package/dist/chat/root/chat-root.css.js +5 -162
- package/dist/chat/typing.css.js +9 -46
- package/dist/checkbox/root/checkbox-root.css.js +12 -177
- package/dist/checkbox-group/root/checkbox-group-root.css.js +1 -27
- package/dist/code/root/code-root.css.js +3 -25
- package/dist/code-block/root/code-block-root.css.js +22 -279
- package/dist/code-block/root/code-block-root.d.ts +7 -0
- package/dist/color-input/root/color-input-root.css.js +5 -114
- package/dist/color-picker/root/color-picker-root.css.js +39 -337
- package/dist/color-picker/root/color-picker-root.d.ts +2 -0
- package/dist/combobox/root/combobox-root.css.js +8 -147
- package/dist/combobox/root/combobox-root.js +2 -0
- package/dist/command/root/command-root.css.js +3 -74
- package/dist/copy-button/root/copy-button-root.css.js +3 -43
- package/dist/data-table/root/data-table-root.css.js +21 -245
- package/dist/data-table/root/data-table-root.d.ts +7 -0
- package/dist/date-input/root/date-input-root.css.js +8 -103
- package/dist/date-picker/root/date-picker-root.css.js +16 -278
- package/dist/date-picker/root/date-picker-root.d.ts +1 -0
- package/dist/description-list/item/description-list-item.css.js +1 -41
- package/dist/description-list/item/description-list-item.d.ts +8 -0
- package/dist/description-list/root/description-list-root.css.js +2 -34
- package/dist/description-list/root/description-list-root.d.ts +13 -0
- package/dist/description-list/root/description-list-root.js +7 -0
- package/dist/dialog/root/dialog-root.css.js +7 -221
- package/dist/dialog/root/dialog-root.d.ts +3 -0
- package/dist/divider/root/divider-root.css.js +5 -81
- package/dist/divider/root/divider-root.d.ts +3 -0
- package/dist/donut-chart/root/donut-chart-root.css.js +7 -193
- package/dist/drawer/root/drawer-root.css.js +11 -237
- package/dist/drilldown/item/drilldown-item.css.js +4 -51
- package/dist/drilldown/item/drilldown-item.d.ts +1 -0
- package/dist/drilldown/root/drilldown-root.css.js +6 -120
- package/dist/element-events.generated.js +5 -1
- package/dist/empty/root/empty-root.css.js +2 -42
- package/dist/file-input/root/file-input-root.css.js +7 -173
- package/dist/file-input/root/file-input-root.d.ts +4 -0
- package/dist/filter-input/chip/filter-chip.css.js +2 -84
- package/dist/filter-input/field/filter-field.css.js +1 -3
- package/dist/filter-input/menu/filter-menu.css.js +1 -3
- package/dist/filter-input/operator/filter-operator.css.js +1 -3
- package/dist/filter-input/root/filter-input-root.css.js +6 -113
- package/dist/flex/root/flex-root.css.js +4 -207
- package/dist/flex/root/flex-root.d.ts +2 -2
- package/dist/format-date/root/format-date-root.css.js +1 -13
- package/dist/format-date/root/format-date-root.d.ts +0 -1
- package/dist/format-date/root/format-date-root.js +0 -1
- package/dist/graph/root/graph-root.css.js +9 -444
- package/dist/grid/root/grid-root.css.js +1 -171
- package/dist/heatmap/root/heatmap-root.css.js +8 -156
- package/dist/heatmap/root/heatmap-root.d.ts +2 -0
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/root/icon-root.css.js +1 -18
- package/dist/icon/root/index.d.ts +1 -1
- package/dist/icon-button/root/icon-button-root.css.js +25 -203
- package/dist/icon-button/root/icon-button-root.d.ts +1 -0
- package/dist/image/root/image-root.css.js +7 -65
- package/dist/image/root/image-root.d.ts +3 -0
- package/dist/input/root/input-root.css.js +6 -79
- package/dist/kbd/root/kbd-root.css.js +2 -71
- package/dist/kbd/root/kbd-root.d.ts +7 -0
- package/dist/legend/root/legend-root.css.js +9 -106
- package/dist/legend/root/legend-root.d.ts +2 -0
- package/dist/lightbox/item/lightbox-item.css.js +1 -37
- package/dist/lightbox/root/lightbox-root.css.js +38 -183
- package/dist/line-chart/root/line-chart-root.css.js +4 -170
- package/dist/line-chart/root/line-chart-root.d.ts +1 -0
- package/dist/list/item/list-item.css.js +2 -94
- package/dist/list/root/list-root.css.js +4 -88
- package/dist/listbox/root/listbox-root.css.js +7 -111
- package/dist/listbox/root/listbox-root.d.ts +2 -0
- package/dist/listbox/root/listbox-root.js +1 -0
- package/dist/loader/root/loader-root.css.js +5 -171
- package/dist/map/area/map-area.css.js +1 -23
- package/dist/map/buildings/map-buildings.css.js +1 -26
- package/dist/map/contours/map-contours.css.js +2 -5
- package/dist/map/landcover/map-landcover.css.js +1 -4
- package/dist/map/marker/map-marker.css.js +14 -327
- package/dist/map/points/map-points.css.js +1 -86
- package/dist/map/position/map-position.css.js +8 -227
- package/dist/map/raster/map-raster.css.js +1 -3
- package/dist/map/root/map-root.css.js +14 -352
- package/dist/map/root/map-root.d.ts +10 -0
- package/dist/map/route/map-route.css.js +1 -24
- package/dist/map/terrain/map-terrain.css.js +3 -7
- package/dist/megamenu/root/megamenu-root.css.js +11 -162
- package/dist/megamenu/root/megamenu-root.d.ts +8 -0
- package/dist/menu/item/menu-item.css.js +7 -130
- package/dist/menu/root/menu-root.css.js +1 -110
- package/dist/menu/section/menu-section.css.js +1 -13
- package/dist/meter/root/meter-root.css.js +17 -207
- package/dist/meter/root/meter-root.d.ts +3 -0
- package/dist/navigation/root/navigation-root.css.js +2 -54
- package/dist/notifications/group/notification-group.css.js +1 -61
- package/dist/notifications/notification/notification.css.js +17 -264
- package/dist/notifications/root/notifications-root.css.js +7 -125
- package/dist/notifications/root/notifications-root.d.ts +7 -2
- package/dist/number-input/root/number-input-root.css.js +10 -103
- package/dist/object-inspector/root/object-inspector-root.css.js +11 -162
- package/dist/option/group/option-group.css.js +1 -22
- package/dist/option/index.d.ts +1 -0
- package/dist/option/index.js +1 -0
- package/dist/option/root/option-root.css.js +3 -85
- package/dist/option/separator/option-separator.css.d.ts +1 -0
- package/dist/option/separator/option-separator.css.js +3 -0
- package/dist/option/separator/option-separator.d.ts +26 -0
- package/dist/option/separator/option-separator.js +16 -0
- package/dist/orb/root/orb-root.css.js +1 -41
- package/dist/outline/root/outline-root.css.js +24 -122
- package/dist/outline/root/outline-root.d.ts +17 -4
- package/dist/pagination/root/pagination-root.css.js +9 -105
- package/dist/pagination/root/pagination-root.d.ts +14 -0
- package/dist/pagination/size/pagination-size.css.js +1 -22
- package/dist/pagination/size/pagination-size.d.ts +3 -0
- package/dist/pagination/summary/pagination-summary.css.js +1 -7
- package/dist/pagination/summary/pagination-summary.d.ts +3 -0
- package/dist/pin-input/root/pin-input-root.css.js +2 -73
- package/dist/pin-input/root/pin-input-root.d.ts +9 -3
- package/dist/popover/root/popover-root.css.js +6 -127
- package/dist/progress/root/progress-root.css.js +7 -230
- package/dist/progress/root/progress-root.d.ts +4 -0
- package/dist/qr-code/root/qr-code-root.css.js +1 -68
- package/dist/qr-code/root/qr-code-root.d.ts +3 -0
- package/dist/quote/root/quote-root.css.js +1 -20
- package/dist/radio/group/radio-group.css.js +1 -21
- package/dist/radio/root/radio-root.css.js +5 -208
- package/dist/rating/root/rating-root.css.js +4 -117
- package/dist/sandbox/frame.d.ts +2 -1
- package/dist/sandbox/frame.js +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/preview/sandbox-preview.css.js +1 -12
- package/dist/sandbox/preview/sandbox-preview.d.ts +27 -3
- package/dist/sandbox/preview/sandbox-preview.js +17 -11
- package/dist/sandbox/root/sandbox-root.css.js +3 -70
- package/dist/sandbox/root/sandbox-root.d.ts +16 -4
- package/dist/sandbox/root/sandbox-root.js +29 -50
- package/dist/sandbox/source/sandbox-source.css.js +3 -95
- package/dist/sandbox/source/sandbox-source.d.ts +31 -25
- package/dist/sandbox/source/sandbox-source.js +12 -5
- package/dist/sandbox/status-bar/sandbox-status-bar.css.js +1 -21
- package/dist/sandbox/terminal/sandbox-terminal.css.js +5 -106
- package/dist/sandbox/terminal/sandbox-terminal.d.ts +4 -0
- package/dist/sandbox/terminal/sandbox-terminal.js +2 -1
- package/dist/sandbox/tokens.d.ts +2 -2
- package/dist/sandbox/toolbar/sandbox-toolbar.css.js +1 -36
- package/dist/scatter-chart/root/scatter-chart-root.css.js +11 -146
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +1 -0
- package/dist/scroll-area/root/scroll-area-root.css.js +14 -181
- package/dist/select/root/select-root.css.js +7 -124
- package/dist/select/root/select-root.js +2 -0
- package/dist/shared/chart/series.css.js +1 -36
- package/dist/shared/chart/terminus.css.js +1 -47
- package/dist/shared/chart/tooltip.css.js +1 -68
- package/dist/shared/collection/state.css.js +1 -9
- package/dist/shared/field/field-frame.css.js +3 -33
- package/dist/shared/field/field-inline.css.js +1 -4
- package/dist/shared/field/field-segments.css.js +1 -39
- package/dist/shared/field/field-stacked.css.js +1 -5
- package/dist/shared/field/field.css.js +3 -57
- package/dist/shared/floating/entrance.css.js +3 -34
- package/dist/shared/floating/panel.css.js +2 -17
- package/dist/shared/glyph/glyph.css.js +1 -5
- package/dist/shared/live/live.css.js +1 -8
- package/dist/shared/tags/tags.css.js +1 -39
- package/dist/shared/viewport/viewport.css.js +8 -135
- package/dist/skeleton/root/skeleton-root.css.js +12 -120
- package/dist/skip-link/root/skip-link-root.css.js +2 -47
- package/dist/slider/root/slider-root.css.js +19 -330
- package/dist/slider/root/slider-root.d.ts +2 -0
- package/dist/sparkline/root/sparkline-root.css.js +8 -143
- package/dist/sparkline/root/sparkline-root.d.ts +2 -0
- package/dist/speed-dial/group/speed-dial-group.css.d.ts +1 -0
- package/dist/speed-dial/group/speed-dial-group.css.js +2 -0
- package/dist/speed-dial/group/speed-dial-group.d.ts +27 -0
- package/dist/speed-dial/group/speed-dial-group.js +16 -0
- package/dist/speed-dial/index.d.ts +1 -0
- package/dist/speed-dial/index.js +1 -0
- package/dist/speed-dial/item/speed-dial-item.css.js +4 -73
- package/dist/speed-dial/item/speed-dial-item.d.ts +1 -0
- package/dist/speed-dial/root/speed-dial-root.css.js +3 -149
- package/dist/splitter/root/splitter-root.css.js +19 -176
- package/dist/splitter/root/splitter-root.d.ts +4 -0
- package/dist/stat/group/stat-group.css.js +1 -36
- package/dist/stat/root/stat-root.css.js +3 -62
- package/dist/steps/root/steps-root.css.js +7 -92
- package/dist/steps/step/step.css.js +5 -156
- package/dist/switch/root/switch-root.css.js +2 -110
- package/dist/table/cell/table-cell.css.js +1 -33
- package/dist/table/column/table-column.css.js +7 -105
- package/dist/table/root/table-root.css.js +1 -43
- package/dist/table/row/table-row.css.js +6 -18
- package/dist/table/row/table-row.d.ts +2 -0
- package/dist/tabs/panel/tab-panel.css.js +2 -17
- package/dist/tabs/root/tabs-root.css.js +6 -177
- package/dist/tabs/tab/tab.css.js +6 -54
- package/dist/tag/group/tag-group.css.js +1 -11
- package/dist/tag/root/tag-root.css.js +1 -166
- package/dist/tag/root/tag-root.d.ts +2 -0
- package/dist/text/root/text-root.css.js +11 -200
- package/dist/textarea/root/textarea-root.css.js +3 -71
- package/dist/time-input/root/time-input-root.css.js +7 -118
- package/dist/time-picker/root/time-picker-root.css.js +15 -134
- package/dist/time-picker/root/time-picker-root.d.ts +7 -0
- package/dist/timeline/group/timeline-group.css.js +1 -31
- package/dist/timeline/item/timeline-item.css.js +3 -134
- package/dist/timeline/root/timeline-root.css.js +1 -66
- package/dist/toast/item/toast-item.css.js +11 -250
- package/dist/toast/item/toast-item.d.ts +10 -0
- package/dist/toast/root/toast-root.css.js +1 -85
- package/dist/toast/root/toast-root.js +2 -1
- package/dist/toggle/group/toggle-group.css.js +7 -126
- package/dist/toggle/root/toggle-root.css.js +1 -23
- package/dist/toolbar/root/toolbar-root.css.js +1 -36
- package/dist/toolbar/root/toolbar-root.d.ts +11 -0
- package/dist/toolbar/root/toolbar-root.js +4 -0
- package/dist/tooltip/root/tooltip-root.css.js +5 -101
- package/dist/tooltip/root/tooltip-root.d.ts +2 -0
- package/dist/tour/root/tour-root.css.js +2 -28
- package/dist/tour/stop/tour-stop.css.js +2 -109
- package/dist/tree/item/tree-item.css.js +12 -238
- package/dist/tree/root/tree-root.css.js +1 -40
- package/dist/trend/root/trend-root.css.js +5 -53
- package/dist/video/root/video-root.css.js +16 -398
- package/dist/video-playlist/item/video-playlist-item.css.js +12 -86
- package/dist/video-playlist/item/video-playlist-item.d.ts +12 -0
- package/dist/video-playlist/menu/video-playlist-menu.css.js +1 -41
- package/dist/video-playlist/root/video-playlist-root.css.js +1 -19
- package/dist/video-playlist/root/video-playlist-root.d.ts +2 -0
- package/dist/virtual-list/root/virtual-list-root.css.js +3 -40
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +4595 -777
- package/types/svelte.d.ts +2 -0
- package/types/vue.d.ts +1312 -210
|
@@ -1,362 +1,24 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
[part="region"] {
|
|
7
|
-
background-color: var(--map-background-color, var(--helix-color-surface-sunken));
|
|
8
|
-
block-size: var(--map-block-size, 24rem);
|
|
9
|
-
border: var(--helix-border-thin) solid var(--map-border-color, var(--helix-color-border));
|
|
10
|
-
border-radius: var(--helix-radii-sm);
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
display: grid;
|
|
13
|
-
grid-template-rows: auto 1fr auto auto;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
position: relative;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([fill]) [part="region"] {
|
|
19
|
-
block-size: auto;
|
|
20
|
-
border: none;
|
|
21
|
-
border-radius: 0;
|
|
22
|
-
container-type: size;
|
|
23
|
-
inset: 0;
|
|
24
|
-
position: absolute;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
[part="viewport"] {
|
|
28
|
-
isolation: isolate;
|
|
29
|
-
min-block-size: 0;
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
position: relative;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
[part="layers"] {
|
|
35
|
-
block-size: 1px;
|
|
36
|
-
clip-path: inset(50%);
|
|
37
|
-
inline-size: 1px;
|
|
38
|
-
margin: var(--helix-space-none);
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
padding: var(--helix-space-none);
|
|
41
|
-
position: absolute;
|
|
42
|
-
white-space: nowrap;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[part="viewport"] ::slotted(:not(helix-map-marker, helix-map-points, helix-map-position)) {
|
|
46
|
-
block-size: 100%;
|
|
47
|
-
inline-size: 100%;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
:host(:state(idle)) ::slotted([slot="header"]),
|
|
51
|
-
:host(:state(idle)) ::slotted([slot="footer"]) {
|
|
52
|
-
opacity: 0;
|
|
53
|
-
transition: opacity var(--helix-duration-fast) var(--helix-easing-standard);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
::slotted([slot="attribution"]) {
|
|
57
|
-
|
|
58
|
-
border-block-start: var(--helix-border-thin) solid var(--helix-color-border);
|
|
59
|
-
color: var(--helix-color-foreground-subtle);
|
|
60
|
-
|
|
61
|
-
display: block;
|
|
62
|
-
font-size: var(--helix-text-xs);
|
|
63
|
-
padding: var(--helix-space-2xs) var(--helix-space-xs);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host([credit-placement]) [part="attribution"] {
|
|
67
|
-
inset-block-end: var(--helix-space-2xs);
|
|
68
|
-
max-inline-size: calc(100% - var(--helix-space-2xs) * 2);
|
|
69
|
-
position: absolute;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
:host([credit-placement="bottom-end"]) [part="attribution"] {
|
|
73
|
-
inset-inline-end: var(--helix-space-2xs);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host([credit-placement="bottom-start"]) [part="attribution"] {
|
|
77
|
-
inset-inline-start: var(--helix-space-2xs);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
:host([credit-placement]) ::slotted([slot="attribution"]) {
|
|
81
|
-
backdrop-filter: var(--helix-material-backdrop);
|
|
82
|
-
background-color: var(--helix-material-translucent);
|
|
83
|
-
border-block-start: none;
|
|
84
|
-
border-radius: var(--helix-radii-sm);
|
|
85
|
-
color: var(--helix-color-foreground-muted);
|
|
86
|
-
overflow: hidden;
|
|
87
|
-
padding: var(--helix-space-none) var(--helix-space-xs);
|
|
88
|
-
text-overflow: ellipsis;
|
|
89
|
-
white-space: nowrap;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
:host([credit-placement])
|
|
2
|
+
export const styles = createSheet(`:host {display: contents;}[part="region"] {background-color: var(--map-background-color, var(--helix-color-surface-sunken));block-size: var(--map-block-size, 24rem);border: var(--helix-border-thin) solid var(--map-border-color, var(--helix-color-border));border-radius: var(--map-radius, var(--helix-radii-sm));box-sizing: border-box;display: grid;grid-template-rows: auto 1fr auto auto;overflow: hidden;position: relative;}:host([fill]) [part="region"] {block-size: auto;border: none;border-radius: 0;container-type: size;inset: 0;position: absolute;}[part="viewport"] {isolation: isolate;min-block-size: 0;overflow: hidden;position: relative;}[part="layers"] {block-size: 1px;clip-path: inset(50%);inline-size: 1px;margin: var(--helix-space-none);overflow: hidden;padding: var(--helix-space-none);position: absolute;white-space: nowrap;}[part="viewport"] ::slotted(:not(helix-map-marker, helix-map-points, helix-map-position)) {block-size: 100%;inline-size: 100%;}:host(:state(idle)) ::slotted([slot="header"]),
|
|
3
|
+
:host(:state(idle)) ::slotted([slot="footer"]) {opacity: 0;transition: opacity var(--helix-duration-fast) var(--helix-easing-standard);}::slotted([slot="attribution"]) {border-block-start: var(--helix-border-thin) solid
|
|
4
|
+
var(--map-attribution-border-color, var(--helix-color-border));color: var(--map-attribution-color, var(--helix-color-foreground-subtle));display: block;font-size: var(--map-attribution-font-size, var(--helix-text-xs));padding: var(--helix-space-2xs) var(--helix-space-xs);}:host([credit-placement]) [part="attribution"] {inset-block-end: var(--helix-space-2xs);max-inline-size: calc(100% - var(--helix-space-2xs) * 2);position: absolute;}:host([credit-placement="bottom-end"]) [part="attribution"] {inset-inline-end: var(--helix-space-2xs);}:host([credit-placement="bottom-start"]) [part="attribution"] {inset-inline-start: var(--helix-space-2xs);}:host([credit-placement]) ::slotted([slot="attribution"]) {backdrop-filter: var(--helix-material-backdrop);background-color: var(--helix-material-translucent);border-block-start: none;border-radius: var(--helix-radii-sm);color: var(--map-attribution-color, var(--helix-color-foreground-muted));overflow: hidden;padding: var(--helix-space-none) var(--helix-space-xs);text-overflow: ellipsis;white-space: nowrap;}:host([credit-placement])
|
|
93
5
|
[part="attribution"]:is(:hover, :focus-within)
|
|
94
|
-
::slotted([slot="attribution"]) {
|
|
95
|
-
white-space: normal;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
:host([material="glass"]) [part="controls"] button {
|
|
99
|
-
backdrop-filter: var(--helix-material-backdrop);
|
|
100
|
-
background-color: var(--viewport-control-background-color, var(--helix-material-translucent));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
:host([material="frosted"]) [part="controls"] button {
|
|
104
|
-
backdrop-filter: blur(var(--helix-material-blur-lg));
|
|
105
|
-
background-color: var(
|
|
6
|
+
::slotted([slot="attribution"]) {white-space: normal;}:host([material="glass"]) [part="controls"] button {backdrop-filter: var(--helix-material-backdrop);background-color: var(--viewport-control-background-color, var(--helix-material-translucent));}:host([material="frosted"]) [part="controls"] button {backdrop-filter: blur(var(--helix-material-blur-lg));background-color: var(
|
|
106
7
|
--viewport-control-background-color,
|
|
107
8
|
var(--helix-material-translucent-strong)
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
:host([material="transparent"]) [part="controls"] button {
|
|
112
|
-
backdrop-filter: none;
|
|
113
|
-
background-color: var(--viewport-control-background-color, transparent);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:host([material]) [part="controls"] button:hover {
|
|
117
|
-
background-color: color-mix(
|
|
9
|
+
);}:host([material="transparent"]) [part="controls"] button {backdrop-filter: none;background-color: var(--viewport-control-background-color, transparent);}:host([material]) [part="controls"] button:hover {background-color: color-mix(
|
|
118
10
|
in oklab,
|
|
119
11
|
var(--helix-color-foreground) 10%,
|
|
120
12
|
var(--helix-color-surface-overlay)
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
@media print {
|
|
125
|
-
[part="controls"] {
|
|
126
|
-
display: none;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
[part="controls"] {
|
|
131
|
-
align-items: center;
|
|
132
|
-
display: flex;
|
|
133
|
-
flex-direction: column;
|
|
134
|
-
|
|
135
|
-
grid-column: 1 / -1;
|
|
136
|
-
grid-row: 2 / 3;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
[part="controls"] [part="zoom-in"] {
|
|
140
|
-
border-end-end-radius: 0;
|
|
141
|
-
border-end-start-radius: 0;
|
|
142
|
-
}
|
|
143
|
-
[part="controls"] [part="zoom-out"] {
|
|
144
|
-
border-block-start: 0;
|
|
145
|
-
border-start-end-radius: 0;
|
|
146
|
-
border-start-start-radius: 0;
|
|
147
|
-
margin-block-start: calc(-1 * var(--helix-space-2xs));
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
[part="tilt"] {
|
|
151
|
-
font-size: var(--helix-text-xs);
|
|
152
|
-
font-weight: var(--helix-weight-semibold);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
[part="tilt"][aria-pressed="true"] {
|
|
156
|
-
background-color: var(--helix-color-primary-surface);
|
|
157
|
-
border-color: var(--helix-color-primary-surface);
|
|
158
|
-
color: var(--helix-color-foreground-on-primary);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
[part="tilt"][aria-pressed="true"]:hover {
|
|
162
|
-
background-color: var(--helix-color-primary-surface-hover);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
[part="compass"] {
|
|
166
|
-
border-radius: var(--helix-radii-sm);
|
|
167
|
-
display: grid;
|
|
168
|
-
grid-template-areas:
|
|
13
|
+
);}@media print {[part="controls"] {display: none;}}[part="controls"] {align-items: center;display: flex;flex-direction: column;grid-column: 1 / -1;grid-row: 2 / 3;}[part="controls"] [part="zoom-in"] {border-end-end-radius: 0;border-end-start-radius: 0;}[part="controls"] [part="zoom-out"] {border-block-start: 0;border-start-end-radius: 0;border-start-start-radius: 0;margin-block-start: calc(-1 * var(--helix-space-2xs));}[part="controls"] [part="face-north"] ::slotted(*) {--icon-size: var(--helix-size-icon-md);block-size: var(--helix-size-icon-md);inline-size: var(--helix-size-icon-md);}[part="tilt"] {font-size: var(--helix-text-xs);font-weight: var(--helix-weight-semibold);}[part="tilt"][aria-pressed="true"] {background-color: var(--map-chosen-color, var(--helix-color-primary-surface));border-color: var(--map-chosen-color, var(--helix-color-primary-surface));color: var(--helix-color-foreground-on-primary);}[part="tilt"][aria-pressed="true"]:hover {background-color: var(--helix-color-primary-surface-hover);}[part="compass"] {border-radius: var(--helix-radii-sm);display: grid;grid-template-areas:
|
|
169
14
|
"rotl up rotr"
|
|
170
15
|
"start north end"
|
|
171
|
-
". down .";
|
|
172
|
-
place-items: center;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
[part="rotate-left"] {
|
|
176
|
-
grid-area: rotl;
|
|
177
|
-
}
|
|
178
|
-
[part="rotate-right"] {
|
|
179
|
-
grid-area: rotr;
|
|
180
|
-
}
|
|
181
|
-
[part="face-north"] {
|
|
182
|
-
grid-area: north;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
[part="compass"] > :not([part="face-north"]) {
|
|
186
|
-
background-color: transparent;
|
|
187
|
-
block-size: calc(var(--helix-size-control-sm) * 0.75);
|
|
188
|
-
border-color: transparent;
|
|
189
|
-
box-shadow: none;
|
|
190
|
-
font-size: var(--helix-text-xs);
|
|
191
|
-
inline-size: calc(var(--helix-size-control-sm) * 0.75);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
[part="compass"]:has(> :not([part="face-north"])) {
|
|
195
|
-
background-color: var(--viewport-control-background-color, var(--helix-color-surface-overlay));
|
|
196
|
-
box-shadow:
|
|
16
|
+
". down .";place-items: center;}[part="rotate-left"] {grid-area: rotl;}[part="rotate-right"] {grid-area: rotr;}[part="face-north"] {grid-area: north;}[part="compass"] > :not([part="face-north"]) {background-color: transparent;block-size: calc(var(--helix-size-control-sm) * 0.75);border-color: transparent;box-shadow: none;font-size: var(--helix-text-xs);inline-size: calc(var(--helix-size-control-sm) * 0.75);}[part="compass"]:has(> :not([part="face-north"])) {background-color: var(--viewport-control-background-color, var(--helix-color-surface-overlay));box-shadow:
|
|
197
17
|
var(--helix-shadow-floating),
|
|
198
|
-
0 0 0 var(--helix-border-floating) var(--helix-color-border);
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
[part="
|
|
202
|
-
block-size: var(--helix-size-
|
|
203
|
-
inline-size: var(--helix-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
[part="needle"] [data-end="north"] {
|
|
207
|
-
fill: var(--helix-color-danger);
|
|
208
|
-
}
|
|
209
|
-
[part="needle"] [data-end="south"] {
|
|
210
|
-
fill: var(--helix-color-foreground-muted);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
[part="layers-menu"] {
|
|
214
|
-
background-color: var(--viewport-control-background-color, var(--helix-color-surface-overlay));
|
|
215
|
-
border: var(--helix-border-floating) solid var(--helix-color-border);
|
|
216
|
-
border-radius: var(--helix-radii-sm);
|
|
217
|
-
box-shadow: var(--helix-shadow-floating);
|
|
218
|
-
color: var(--helix-color-foreground);
|
|
219
|
-
display: grid;
|
|
220
|
-
gap: var(--helix-space-sm);
|
|
221
|
-
inline-size: min(calc(var(--helix-size-control-lg) * 6), 70vw);
|
|
222
|
-
inset-block-start: 0;
|
|
223
|
-
inset-inline-end: calc(100% + var(--helix-space-2xs));
|
|
224
|
-
|
|
225
|
-
max-block-size: calc(var(--map-block-size, 24rem) - var(--helix-space-sm) * 2);
|
|
226
|
-
overflow-y: auto;
|
|
227
|
-
padding: var(--helix-space-sm);
|
|
228
|
-
position: absolute;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
:host([fill]) [part="layers-menu"] {
|
|
232
|
-
max-block-size: calc(100cqb - var(--helix-space-sm) * 2);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
[part="layers-menu"][hidden] {
|
|
236
|
-
display: none;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
:host([controls-placement^="bottom"]) [part="layers-menu"] {
|
|
240
|
-
inset-block: auto 0;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
:host([controls-placement$="start"]) [part="layers-menu"] {
|
|
244
|
-
inset-inline: calc(100% + var(--helix-space-2xs)) auto;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
[part="map-types"] {
|
|
248
|
-
display: grid;
|
|
249
|
-
gap: var(--helix-space-xs);
|
|
250
|
-
grid-template-columns: repeat(3, 1fr);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
[part="map-type"] {
|
|
254
|
-
color: var(--helix-color-foreground-muted);
|
|
255
|
-
cursor: pointer;
|
|
256
|
-
display: grid;
|
|
257
|
-
font-family: var(--helix-font-sans);
|
|
258
|
-
font-size: var(--helix-text-xs);
|
|
259
|
-
gap: var(--helix-space-2xs);
|
|
260
|
-
justify-items: center;
|
|
261
|
-
position: relative;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
[part="map-type"] input {
|
|
265
|
-
block-size: 1px;
|
|
266
|
-
inline-size: 1px;
|
|
267
|
-
margin: 0;
|
|
268
|
-
opacity: 0;
|
|
269
|
-
pointer-events: none;
|
|
270
|
-
position: absolute;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
[part="map-type-preview"] {
|
|
274
|
-
aspect-ratio: 4 / 3;
|
|
275
|
-
background-color: var(--helix-color-surface-sunken);
|
|
276
|
-
border: var(--helix-border-thick) solid transparent;
|
|
277
|
-
border-radius: var(--helix-radii-sm);
|
|
278
|
-
box-sizing: border-box;
|
|
279
|
-
display: block;
|
|
280
|
-
inline-size: 100%;
|
|
281
|
-
object-fit: cover;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
[part="map-type"]:hover,
|
|
285
|
-
[part="map-type"]:has(input:checked) {
|
|
286
|
-
color: var(--helix-color-foreground);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
[part="map-type"]:has(input:checked) [part="map-type-preview"] {
|
|
290
|
-
border-color: var(--helix-color-primary-surface);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
[part="map-type"]:has(input:focus-visible) [part="map-type-preview"] {
|
|
294
|
-
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
295
|
-
outline-offset: var(--helix-size-focus-offset);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
[part="layer-choices"] {
|
|
299
|
-
display: grid;
|
|
300
|
-
gap: var(--helix-space-xs);
|
|
301
|
-
grid-template-columns: repeat(3, 1fr);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
[part="layers-menu"] [part="layer-choice"] {
|
|
305
|
-
align-content: start;
|
|
306
|
-
background-color: transparent;
|
|
307
|
-
block-size: auto;
|
|
308
|
-
border: 0;
|
|
309
|
-
box-shadow: none;
|
|
310
|
-
color: var(--helix-color-foreground-muted);
|
|
311
|
-
display: grid;
|
|
312
|
-
font-size: var(--helix-text-xs);
|
|
313
|
-
gap: var(--helix-space-2xs);
|
|
314
|
-
inline-size: auto;
|
|
315
|
-
justify-items: center;
|
|
316
|
-
padding: 0;
|
|
317
|
-
text-align: center;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
[part="layers-menu"] [part="layer-choice"]:hover,
|
|
321
|
-
[part="layers-menu"] [part="layer-choice"][aria-pressed="true"] {
|
|
322
|
-
background-color: transparent;
|
|
323
|
-
color: var(--helix-color-foreground);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
[part="layers-menu"] [part="layer-choice"]:focus-visible {
|
|
327
|
-
outline: none;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
[part="layer-icon"] {
|
|
331
|
-
aspect-ratio: 4 / 3;
|
|
332
|
-
background-color: var(--helix-color-surface-sunken);
|
|
333
|
-
border: var(--helix-border-thick) solid transparent;
|
|
334
|
-
border-radius: var(--helix-radii-sm);
|
|
335
|
-
box-sizing: border-box;
|
|
336
|
-
display: block;
|
|
337
|
-
inline-size: 100%;
|
|
338
|
-
padding: var(--helix-space-sm);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
[part="layer-choice"][aria-pressed="true"] [part="layer-icon"] {
|
|
342
|
-
border-color: var(--helix-color-primary-surface);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
[part="layer-choice"]:focus-visible [part="layer-icon"] {
|
|
346
|
-
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
347
|
-
outline-offset: var(--helix-size-focus-offset);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
@media (forced-colors: active) {
|
|
351
|
-
[part="tilt"][aria-pressed="true"] {
|
|
352
|
-
background-color: Highlight;
|
|
353
|
-
color: HighlightText;
|
|
354
|
-
forced-color-adjust: none;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
[part="map-type"]:has(input:checked),
|
|
358
|
-
[part="layers-menu"] [part="layer-choice"][aria-pressed="true"] {
|
|
359
|
-
outline: var(--helix-border-thick) solid Highlight;
|
|
360
|
-
outline-offset: var(--helix-space-2xs);
|
|
361
|
-
}
|
|
362
|
-
}`);
|
|
18
|
+
0 0 0 var(--helix-border-floating) var(--helix-color-border);}[part="needle"] {block-size: var(--helix-size-icon-md);inline-size: var(--helix-size-icon-md);transform: rotate(var(--map-needle-turn, 0deg));}[part="needle"] [data-end="north"] {fill: var(--map-needle-north-color, var(--helix-color-danger));}[part="needle"] [data-end="south"] {fill: var(--map-needle-south-color, var(--helix-color-foreground-muted));}[part="layers-menu"] {background-color: var(--viewport-control-background-color, var(--helix-color-surface-overlay));border: var(--helix-border-floating) solid var(--helix-color-border);border-radius: var(--helix-radii-sm);box-shadow: var(--helix-shadow-floating);color: var(--helix-color-foreground);display: grid;gap: var(--map-layers-menu-gap, var(--helix-space-sm));inline-size: var(
|
|
19
|
+
--map-layers-menu-inline-size,
|
|
20
|
+
min(calc(var(--helix-size-control-lg) * 6), 70vw)
|
|
21
|
+
);inset-block-start: 0;inset-inline-end: calc(100% + var(--helix-space-2xs));max-block-size: calc(var(--map-block-size, 24rem) - var(--helix-space-sm) * 2);overflow-y: auto;padding: var(--map-layers-menu-padding, var(--helix-space-sm));position: absolute;}:host([fill]) [part="layers-menu"] {max-block-size: calc(100cqb - var(--helix-space-sm) * 2);}[part="layers-menu"][hidden] {display: none;}:host([controls-placement^="bottom"]) [part="layers-menu"] {inset-block: auto 0;}:host([controls-placement$="start"]) [part="layers-menu"] {inset-inline: calc(100% + var(--helix-space-2xs)) auto;}[part="map-types"] {display: grid;gap: var(--helix-space-xs);grid-template-columns: repeat(3, 1fr);}[part="map-type"] {color: var(--helix-color-foreground-muted);cursor: pointer;display: grid;font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);gap: var(--helix-space-2xs);justify-items: center;position: relative;}[part="map-type"] input {block-size: 1px;inline-size: 1px;margin: 0;opacity: 0;pointer-events: none;position: absolute;}[part="map-type-preview"] {aspect-ratio: 4 / 3;background-color: var(--helix-color-surface-sunken);border: var(--helix-border-thick) solid transparent;border-radius: var(--helix-radii-sm);box-sizing: border-box;display: block;inline-size: 100%;object-fit: cover;}[part="map-type"]:hover,
|
|
22
|
+
[part="map-type"]:has(input:checked) {color: var(--helix-color-foreground);}[part="map-type"]:has(input:checked) [part="map-type-preview"] {border-color: var(--map-chosen-color, var(--helix-color-primary-surface));}[part="map-type"]:has(input:focus-visible) [part="map-type-preview"] {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="layer-choices"] {display: grid;gap: var(--helix-space-xs);grid-template-columns: repeat(3, 1fr);}[part="layers-menu"] [part="layer-choice"] {align-content: start;background-color: transparent;block-size: auto;border: 0;box-shadow: none;color: var(--helix-color-foreground-muted);display: grid;font-size: var(--helix-text-xs);gap: var(--helix-space-2xs);inline-size: auto;justify-items: center;padding: 0;text-align: center;}[part="layers-menu"] [part="layer-choice"]:hover,
|
|
23
|
+
[part="layers-menu"] [part="layer-choice"][aria-pressed="true"] {background-color: transparent;color: var(--helix-color-foreground);}[part="layers-menu"] [part="layer-choice"]:focus-visible {outline: none;}[part="layer-icon"] {aspect-ratio: 4 / 3;background-color: var(--helix-color-surface-sunken);border: var(--helix-border-thick) solid transparent;border-radius: var(--helix-radii-sm);box-sizing: border-box;display: block;inline-size: 100%;padding: var(--helix-space-sm);}[part="layer-choice"][aria-pressed="true"] [part="layer-icon"] {border-color: var(--map-chosen-color, var(--helix-color-primary-surface));}[part="layer-choice"]:focus-visible [part="layer-icon"] {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}@media (forced-colors: active) {[part="tilt"][aria-pressed="true"] {background-color: Highlight;color: HighlightText;forced-color-adjust: none;}[part="map-type"]:has(input:checked),
|
|
24
|
+
[part="layers-menu"] [part="layer-choice"][aria-pressed="true"] {outline: var(--helix-border-thick) solid Highlight;outline-offset: var(--helix-space-2xs);}}`);
|
|
@@ -19,9 +19,19 @@ import type { CSSResultGroup } from 'lit';
|
|
|
19
19
|
* @aliases Map frame, Map container, Geo
|
|
20
20
|
* @documentation https://fusion.dev/helix/components/map
|
|
21
21
|
*
|
|
22
|
+
* @cssproperty --map-attribution-border-color - The rule above the map credit, under the map.
|
|
23
|
+
* @cssproperty --map-attribution-color - The color of the map credit.
|
|
24
|
+
* @cssproperty --map-attribution-font-size - The size of the map credit's text.
|
|
22
25
|
* @cssproperty --map-background-color - The color behind the map while tiles load.
|
|
23
26
|
* @cssproperty --map-block-size - The frame's height, as a length. Ignored with `fill`, where the container decides it.
|
|
24
27
|
* @cssproperty --map-border-color - The frame's border color.
|
|
28
|
+
* @cssproperty --map-chosen-color - The fill of the pressed 3D button and the ring around the chosen map type and each shown layer in the layers menu.
|
|
29
|
+
* @cssproperty --map-layers-menu-gap - The space between the map types and the layers in the layers menu.
|
|
30
|
+
* @cssproperty --map-layers-menu-inline-size - The width of the layers menu.
|
|
31
|
+
* @cssproperty --map-layers-menu-padding - The space inside the edge of the layers menu.
|
|
32
|
+
* @cssproperty --map-needle-north-color - The north half of the compass needle.
|
|
33
|
+
* @cssproperty --map-needle-south-color - The south half of the compass needle.
|
|
34
|
+
* @cssproperty --map-radius - The frame's corners.
|
|
25
35
|
* @cssproperty --viewport-control-background-color - The background of the pan and zoom buttons. Canvas uses the same property.
|
|
26
36
|
*/
|
|
27
37
|
export declare class HelixMap extends HelixHeadlessMap {
|
|
@@ -1,25 +1,2 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {
|
|
3
|
-
border-color: var(--map-route-casing-color, var(--helix-color-surface));
|
|
4
|
-
color: var(--map-route-color, var(--helix-color-primary));
|
|
5
|
-
display: none;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:host([tone="accent"]) {
|
|
9
|
-
color: var(--helix-color-accent);
|
|
10
|
-
}
|
|
11
|
-
:host([tone="danger"]) {
|
|
12
|
-
color: var(--helix-color-danger);
|
|
13
|
-
}
|
|
14
|
-
:host([tone="info"]) {
|
|
15
|
-
color: var(--helix-color-info);
|
|
16
|
-
}
|
|
17
|
-
:host([tone="neutral"]) {
|
|
18
|
-
color: var(--helix-color-foreground-muted);
|
|
19
|
-
}
|
|
20
|
-
:host([tone="success"]) {
|
|
21
|
-
color: var(--helix-color-success);
|
|
22
|
-
}
|
|
23
|
-
:host([tone="warning"]) {
|
|
24
|
-
color: var(--helix-color-warning);
|
|
25
|
-
}`);
|
|
2
|
+
export const styles = createSheet(`:host {border-color: var(--map-route-casing-color, var(--helix-color-surface));color: var(--map-route-color, var(--helix-color-primary));display: none;}:host([tone="accent"]) {color: var(--helix-color-accent);}:host([tone="danger"]) {color: var(--helix-color-danger);}:host([tone="info"]) {color: var(--helix-color-info);}:host([tone="neutral"]) {color: var(--helix-color-foreground-muted);}:host([tone="success"]) {color: var(--helix-color-success);}:host([tone="warning"]) {color: var(--helix-color-warning);}`);
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {
|
|
3
|
-
border-top-color: var(
|
|
2
|
+
export const styles = createSheet(`:host {border-top-color: var(
|
|
4
3
|
--map-terrain-highlight-color,
|
|
5
4
|
color-mix(in oklab, var(--helix-color-foreground-media) 25%, transparent)
|
|
6
|
-
);
|
|
7
|
-
color: var(
|
|
5
|
+
);color: var(
|
|
8
6
|
--map-terrain-shadow-color,
|
|
9
7
|
color-mix(in oklab, var(--helix-color-surface-media) 40%, transparent)
|
|
10
|
-
);
|
|
11
|
-
display: none;
|
|
12
|
-
}`);
|
|
8
|
+
);display: none;}`);
|
|
@@ -1,173 +1,22 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
[part="trigger"] {
|
|
7
|
-
all: unset;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
|
|
10
|
-
align-items: center;
|
|
11
|
-
border-radius: var(--megamenu-trigger-radius, var(--helix-radii-sm));
|
|
12
|
-
color: var(--megamenu-trigger-color, var(--helix-color-foreground-muted));
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
display: inline-flex;
|
|
15
|
-
font-family: var(--helix-font-sans);
|
|
16
|
-
font-size: var(--megamenu-trigger-font-size, var(--helix-text-sm));
|
|
17
|
-
font-weight: var(--megamenu-trigger-font-weight, var(--helix-weight-medium));
|
|
18
|
-
gap: var(--helix-space-2xs);
|
|
19
|
-
min-block-size: var(--helix-size-control-tight);
|
|
20
|
-
padding-inline: var(--megamenu-trigger-padding-inline, var(--helix-space-xs));
|
|
21
|
-
transition:
|
|
2
|
+
export const styles = createSheet(`:host {display: inline-flex;position: relative;}[part="indicator"] {align-items: flex-end;display: flex;inset-block: 0;inset-inline: 0;justify-content: center;pointer-events: none;position: absolute;}[part="trigger"] {all: unset;box-sizing: border-box;align-items: center;border-radius: var(--megamenu-trigger-radius, var(--helix-radii-sm));color: var(--megamenu-trigger-color, var(--helix-color-foreground-muted));cursor: pointer;display: inline-flex;font-family: var(--helix-font-sans);font-size: var(--megamenu-trigger-font-size, var(--helix-text-sm));font-weight: var(--megamenu-trigger-font-weight, var(--helix-weight-medium));gap: var(--helix-space-2xs);min-block-size: var(--helix-size-control-tight);padding-inline: var(--megamenu-trigger-padding-inline, var(--helix-space-xs));transition:
|
|
22
3
|
background-color var(--helix-duration-fast) var(--helix-easing-standard),
|
|
23
|
-
color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[part="trigger"]:hover {
|
|
27
|
-
color: var(--megamenu-trigger-hover-color, var(--helix-color-foreground));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
[part="trigger"]:focus-visible {
|
|
31
|
-
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
32
|
-
outline-offset: var(--helix-size-focus-offset);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
[part="trigger"][aria-expanded="true"] {
|
|
36
|
-
background-color: var(
|
|
4
|
+
color var(--helix-duration-fast) var(--helix-easing-standard);}[part="trigger"]:hover {color: var(--megamenu-trigger-hover-color, var(--helix-color-foreground));}[part="trigger"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset);}[part="trigger"][aria-expanded="true"] {background-color: var(
|
|
37
5
|
--megamenu-trigger-open-background-color,
|
|
38
6
|
color-mix(in oklab, var(--helix-color-foreground) 8%, transparent)
|
|
39
|
-
);
|
|
40
|
-
color: var(--megamenu-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[part="surface"] {
|
|
44
|
-
|
|
45
|
-
backdrop-filter: var(--megamenu-backdrop, none);
|
|
46
|
-
background-color: var(--megamenu-background-color, var(--helix-color-background));
|
|
47
|
-
|
|
48
|
-
border: var(--megamenu-border-width, var(--helix-border-thin)) solid
|
|
49
|
-
light-dark(transparent, var(--helix-color-border));
|
|
50
|
-
|
|
51
|
-
border-radius: var(--helix-radii-sm);
|
|
52
|
-
box-shadow: var(--megamenu-shadow, var(--helix-shadow-floating));
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
|
|
55
|
-
clip-path: inset(0 calc(var(--helix-space-xl) * -1) 100% calc(var(--helix-space-xl) * -1));
|
|
56
|
-
|
|
57
|
-
display: grid;
|
|
58
|
-
gap: var(--megamenu-gap, var(--helix-space-xl));
|
|
59
|
-
grid-auto-columns: minmax(var(--megamenu-column-size, 15rem), 1fr);
|
|
60
|
-
grid-auto-flow: column;
|
|
61
|
-
|
|
62
|
-
inline-size: max-content;
|
|
63
|
-
margin: var(--helix-space-none);
|
|
64
|
-
|
|
65
|
-
max-inline-size: min(var(--megamenu-size, 52rem), calc(100% - var(--helix-space-xl) * 2));
|
|
66
|
-
padding: var(--megamenu-padding, var(--helix-space-md));
|
|
67
|
-
|
|
68
|
-
transition:
|
|
7
|
+
);color: var(--megamenu-trigger-open-color, var(--helix-color-foreground));}[part="surface"] {backdrop-filter: var(--megamenu-backdrop, none);background-color: var(--megamenu-background-color, var(--helix-color-background));border: var(--megamenu-border-width, var(--helix-border-thin)) solid
|
|
8
|
+
light-dark(transparent, var(--helix-color-border));border-radius: var(--helix-radii-sm);box-shadow: var(--megamenu-shadow, var(--helix-shadow-floating));box-sizing: border-box;clip-path: inset(0 calc(var(--helix-space-xl) * -1) 100% calc(var(--helix-space-xl) * -1));display: grid;gap: var(--megamenu-gap, var(--helix-space-xl));grid-auto-columns: minmax(var(--megamenu-column-size, 15rem), 1fr);grid-auto-flow: column;inline-size: max-content;margin: var(--helix-space-none);max-inline-size: min(var(--megamenu-size, 52rem), calc(100% - var(--helix-space-xl) * 2));padding: var(--megamenu-padding, var(--helix-space-md));transition:
|
|
69
9
|
clip-path var(--megamenu-duration, var(--helix-duration-slow)) var(--helix-easing-decelerate),
|
|
70
10
|
display var(--megamenu-duration, var(--helix-duration-slow)) allow-discrete,
|
|
71
|
-
overlay var(--megamenu-duration, var(--helix-duration-slow)) allow-discrete;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[part="surface"]:popover-open {
|
|
75
|
-
clip-path: inset(
|
|
11
|
+
overlay var(--megamenu-duration, var(--helix-duration-slow)) allow-discrete;}[part="surface"]:popover-open {clip-path: inset(
|
|
76
12
|
0 calc(var(--helix-space-xl) * -1) calc(var(--helix-space-xl) * -1)
|
|
77
13
|
calc(var(--helix-space-xl) * -1)
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@starting-style {
|
|
82
|
-
[part="surface"]:popover-open {
|
|
83
|
-
clip-path: inset(0 calc(var(--helix-space-xl) * -1) 100% calc(var(--helix-space-xl) * -1));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
:host(:not([variant="band"])) [part="surface"] {
|
|
88
|
-
clip-path: inset(0 100% 100% calc(var(--helix-space-xl) * -1));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
:host(:not([variant="band"])) [part="surface"]:popover-open {
|
|
92
|
-
clip-path: inset(
|
|
14
|
+
);}@starting-style {[part="surface"]:popover-open {clip-path: inset(0 calc(var(--helix-space-xl) * -1) 100% calc(var(--helix-space-xl) * -1));}}:host(:not([variant="band"])) [part="surface"] {clip-path: inset(0 100% 100% calc(var(--helix-space-xl) * -1));}:host(:not([variant="band"])) [part="surface"]:popover-open {clip-path: inset(
|
|
93
15
|
0 calc(var(--helix-space-xl) * -1) calc(var(--helix-space-xl) * -1)
|
|
94
16
|
calc(var(--helix-space-xl) * -1)
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@
|
|
99
|
-
:host(:not([variant="band"])) [part="surface"]:popover-open {
|
|
100
|
-
clip-path: inset(0 100% 100% calc(var(--helix-space-xl) * -1));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
:host([variant="band"]) [part="surface"],
|
|
105
|
-
:host(:state(narrow)) [part="surface"] {
|
|
106
|
-
|
|
107
|
-
backdrop-filter: var(--megamenu-backdrop, none);
|
|
108
|
-
background-color: var(--megamenu-background-color, var(--helix-color-background));
|
|
109
|
-
|
|
110
|
-
border: none;
|
|
111
|
-
border-radius: var(--helix-radii-none);
|
|
112
|
-
box-shadow: var(--helix-shadow-md);
|
|
113
|
-
|
|
114
|
-
clip-path: inset(0 0 100% 0);
|
|
115
|
-
|
|
116
|
-
display: grid;
|
|
117
|
-
grid-auto-flow: row;
|
|
118
|
-
grid-template-columns: repeat(auto-fit, minmax(var(--megamenu-column-size, 15rem), 1fr));
|
|
119
|
-
inline-size: auto;
|
|
120
|
-
inset-block-start: var(--megamenu-top, 100%);
|
|
121
|
-
inset-inline: 0;
|
|
122
|
-
max-inline-size: none;
|
|
123
|
-
|
|
124
|
-
padding-block: var(--helix-space-md) var(--helix-space-xl);
|
|
125
|
-
|
|
126
|
-
padding-inline: max(var(--helix-space-xl), calc((100% - var(--megamenu-full-size, 80rem)) / 2));
|
|
127
|
-
position: fixed;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:host([variant="band"]) [part="surface"]:popover-open,
|
|
131
|
-
:host(:state(narrow)) [part="surface"]:popover-open {
|
|
132
|
-
clip-path: inset(0 0 calc(var(--helix-space-xl) * -1) 0);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
@starting-style {
|
|
136
|
-
:host([variant="band"]) [part="surface"]:popover-open,
|
|
137
|
-
:host(:state(narrow)) [part="surface"]:popover-open {
|
|
138
|
-
clip-path: inset(0 0 100% 0);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
:host(:state(narrow)) [part="surface"] {
|
|
143
|
-
grid-auto-flow: row;
|
|
144
|
-
grid-template-columns: 1fr;
|
|
145
|
-
|
|
146
|
-
max-block-size: calc(100dvh - var(--megamenu-top, 0px) - var(--helix-space-xl));
|
|
147
|
-
overflow-y: auto;
|
|
148
|
-
overscroll-behavior: contain;
|
|
149
|
-
padding-inline: var(--helix-space-md);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
:host [part="surface"][hidden] {
|
|
153
|
-
display: none;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
@media (prefers-reduced-motion: reduce) {
|
|
157
|
-
[part="trigger"] {
|
|
158
|
-
transition: none;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
[part="surface"] {
|
|
162
|
-
clip-path: none;
|
|
163
|
-
transition:
|
|
17
|
+
);}@starting-style {:host(:not([variant="band"])) [part="surface"]:popover-open {clip-path: inset(0 100% 100% calc(var(--helix-space-xl) * -1));}}:host([variant="band"]) [part="surface"],
|
|
18
|
+
:host(:state(narrow)) [part="surface"] {backdrop-filter: var(--megamenu-backdrop, none);background-color: var(--megamenu-background-color, var(--helix-color-background));border: none;border-radius: var(--helix-radii-none);box-shadow: var(--helix-shadow-md);clip-path: inset(0 0 100% 0);display: grid;grid-auto-flow: row;grid-template-columns: repeat(auto-fit, minmax(var(--megamenu-column-size, 15rem), 1fr));inline-size: auto;inset-block-start: var(--megamenu-top, 100%);inset-inline: 0;max-inline-size: none;padding-block: var(--helix-space-md) var(--helix-space-xl);padding-inline: max(var(--helix-space-xl), calc((100% - var(--megamenu-full-size, 80rem)) / 2));position: fixed;}:host([variant="band"]) [part="surface"]:popover-open,
|
|
19
|
+
:host(:state(narrow)) [part="surface"]:popover-open {clip-path: inset(0 0 calc(var(--helix-space-xl) * -1) 0);}@starting-style {:host([variant="band"]) [part="surface"]:popover-open,
|
|
20
|
+
:host(:state(narrow)) [part="surface"]:popover-open {clip-path: inset(0 0 100% 0);}}:host(:state(narrow)) [part="surface"] {grid-auto-flow: row;grid-template-columns: 1fr;max-block-size: calc(100dvh - var(--megamenu-top, 0px) - var(--helix-space-xl));overflow-y: auto;overscroll-behavior: contain;padding-inline: var(--helix-space-md);}:host [part="surface"][hidden] {display: none;}@media (prefers-reduced-motion: reduce) {[part="trigger"] {transition: none;}[part="surface"] {clip-path: none;transition:
|
|
164
21
|
display var(--helix-duration-instant) allow-discrete,
|
|
165
|
-
overlay var(--helix-duration-instant) allow-discrete;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@media print {
|
|
170
|
-
:host {
|
|
171
|
-
display: none;
|
|
172
|
-
}
|
|
173
|
-
}`);
|
|
22
|
+
overlay var(--helix-duration-instant) allow-discrete;}}@media print {:host {display: none;}}`);
|
|
@@ -7,6 +7,14 @@ import type { CSSResultGroup } from 'lit';
|
|
|
7
7
|
* Styles the trigger and lays out the panel it opens as a grid of columns. What
|
|
8
8
|
* opens and closes the panel comes from the base class.
|
|
9
9
|
*
|
|
10
|
+
* **The panel's contents are laid out by `helix.css`**, through attributes you
|
|
11
|
+
* write on your own markup: `data-megamenu-group` on each column,
|
|
12
|
+
* `data-megamenu-heading` on a column's heading, and `data-megamenu-item` on a
|
|
13
|
+
* link that carries a title in `<strong>` and a line of description in `<span>`
|
|
14
|
+
* or `<p>`, with an icon before them. A plain `<a>` in a group is drawn as a
|
|
15
|
+
* navigation item. Without the attributes the panel holds your markup as you
|
|
16
|
+
* styled it.
|
|
17
|
+
*
|
|
10
18
|
* @since 0.1.0
|
|
11
19
|
* @status stable
|
|
12
20
|
* @category navigation
|