@fusion.dev/helix 0.104.1 → 0.105.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 +5514 -1540
- package/dist/element-events.generated.js +12 -1
- package/dist/map/area/map-area.css.d.ts +1 -0
- package/dist/map/area/map-area.css.js +24 -0
- package/dist/map/area/map-area.d.ts +27 -0
- package/dist/map/area/map-area.js +20 -0
- package/dist/map/index.d.ts +5 -0
- package/dist/map/index.js +5 -0
- package/dist/map/marker/map-marker.css.d.ts +1 -0
- package/dist/map/marker/map-marker.css.js +335 -0
- package/dist/map/marker/map-marker.d.ts +51 -0
- package/dist/map/marker/map-marker.js +29 -0
- package/dist/map/points/map-points.css.d.ts +1 -0
- package/dist/map/points/map-points.css.js +82 -0
- package/dist/map/points/map-points.d.ts +29 -0
- package/dist/map/points/map-points.js +20 -0
- package/dist/map/position/map-position.css.d.ts +1 -0
- package/dist/map/position/map-position.css.js +234 -0
- package/dist/map/position/map-position.d.ts +41 -0
- package/dist/map/position/map-position.js +26 -0
- package/dist/map/root/map-root.css.js +35 -1
- package/dist/map/root/map-root.d.ts +13 -12
- package/dist/map/root/map-root.js +4 -0
- package/dist/map/route/map-route.css.d.ts +1 -0
- package/dist/map/route/map-route.css.js +25 -0
- package/dist/map/route/map-route.d.ts +31 -0
- package/dist/map/route/map-route.js +23 -0
- package/dist/shared/viewport/viewport.css.js +2 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +3749 -2380
- package/types/svelte.d.ts +5 -0
- package/types/vue.d.ts +776 -477
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`:host {
|
|
3
|
+
|
|
4
|
+
--_map-position-ink: color-mix(
|
|
5
|
+
in oklab,
|
|
6
|
+
var(--helix-color-foreground) 84%,
|
|
7
|
+
var(--helix-color-surface)
|
|
8
|
+
);
|
|
9
|
+
--_map-position-color: var(--map-position-color, var(--_map-position-ink));
|
|
10
|
+
--_map-position-edge: var(--map-position-edge, var(--helix-color-surface));
|
|
11
|
+
--_map-position-fill: var(--map-position-fill, var(--_map-position-ink));
|
|
12
|
+
--_map-position-size: var(--map-position-size, 1.25rem);
|
|
13
|
+
|
|
14
|
+
--_map-position-heading: 0deg;
|
|
15
|
+
--_map-position-radius: 0px;
|
|
16
|
+
--_map-position-x: 0px;
|
|
17
|
+
--_map-position-y: 0px;
|
|
18
|
+
block-size: 0;
|
|
19
|
+
display: block;
|
|
20
|
+
inline-size: 0;
|
|
21
|
+
inset-block-start: var(--_map-position-y);
|
|
22
|
+
left: var(--_map-position-x);
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
position: absolute;
|
|
25
|
+
|
|
26
|
+
z-index: var(--helix-layer-raised);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(:not([style*="--_map-position-x"])) {
|
|
30
|
+
visibility: hidden;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[part="position"] {
|
|
34
|
+
display: block;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[part="accuracy"] {
|
|
38
|
+
background: color-mix(in oklab, var(--_map-position-color) 12%, transparent);
|
|
39
|
+
block-size: calc(var(--_map-position-radius) * 2);
|
|
40
|
+
border: var(--helix-border-thin) solid
|
|
41
|
+
color-mix(in oklab, var(--_map-position-color) 35%, transparent);
|
|
42
|
+
border-radius: var(--helix-radii-full);
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
inline-size: calc(var(--_map-position-radius) * 2);
|
|
45
|
+
left: 0;
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 0;
|
|
48
|
+
translate: -50% -50%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[part="heading"] {
|
|
52
|
+
background: conic-gradient(
|
|
53
|
+
from -45deg,
|
|
54
|
+
transparent 0deg,
|
|
55
|
+
var(--_map-position-color) 30deg 60deg,
|
|
56
|
+
transparent 90deg
|
|
57
|
+
);
|
|
58
|
+
block-size: calc(var(--_map-position-size) * 5);
|
|
59
|
+
border-radius: var(--helix-radii-full);
|
|
60
|
+
display: none;
|
|
61
|
+
inline-size: calc(var(--_map-position-size) * 5);
|
|
62
|
+
left: 0;
|
|
63
|
+
mask: radial-gradient(closest-side, rgb(0 0 0 / 0.32) 20%, transparent);
|
|
64
|
+
position: absolute;
|
|
65
|
+
rotate: var(--_map-position-heading);
|
|
66
|
+
top: 0;
|
|
67
|
+
translate: -50% -50%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([heading]) [part="heading"] {
|
|
71
|
+
display: block;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[part="pulse"] {
|
|
75
|
+
animation: map-position-pulse calc(var(--helix-duration-slow) * 7.5)
|
|
76
|
+
var(--helix-easing-decelerate) infinite;
|
|
77
|
+
background: var(--_map-position-color);
|
|
78
|
+
block-size: var(--_map-position-size);
|
|
79
|
+
border-radius: var(--helix-radii-full);
|
|
80
|
+
inline-size: var(--_map-position-size);
|
|
81
|
+
left: 0;
|
|
82
|
+
opacity: 0;
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 0;
|
|
85
|
+
translate: -50% -50%;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@keyframes map-position-pulse {
|
|
89
|
+
from {
|
|
90
|
+
opacity: 0.45;
|
|
91
|
+
scale: 1;
|
|
92
|
+
}
|
|
93
|
+
to {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
scale: 3.2;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[part="dot"] {
|
|
100
|
+
background: var(--_map-position-fill);
|
|
101
|
+
block-size: var(--_map-position-size);
|
|
102
|
+
border: var(--helix-border-thick) solid var(--_map-position-edge);
|
|
103
|
+
border-radius: var(--helix-radii-full);
|
|
104
|
+
box-shadow:
|
|
105
|
+
0 0 0 calc(var(--_map-position-size) * 0.3)
|
|
106
|
+
color-mix(in oklab, var(--_map-position-color) 20%, transparent),
|
|
107
|
+
var(--helix-shadow-sm);
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
inline-size: var(--_map-position-size);
|
|
110
|
+
left: 0;
|
|
111
|
+
position: absolute;
|
|
112
|
+
top: 0;
|
|
113
|
+
translate: -50% -50%;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[part="arrow"] {
|
|
117
|
+
block-size: calc(var(--_map-position-size) * 1.6);
|
|
118
|
+
display: none;
|
|
119
|
+
filter: drop-shadow(
|
|
120
|
+
0 var(--helix-border-thin) var(--helix-border-thick)
|
|
121
|
+
color-mix(in oklab, var(--helix-color-foreground) 30%, transparent)
|
|
122
|
+
);
|
|
123
|
+
inline-size: calc(var(--_map-position-size) * 1.6);
|
|
124
|
+
left: 0;
|
|
125
|
+
overflow: visible;
|
|
126
|
+
position: absolute;
|
|
127
|
+
rotate: var(--_map-position-heading);
|
|
128
|
+
top: 0;
|
|
129
|
+
translate: -50% -50%;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[part="arrow"] path {
|
|
133
|
+
fill: var(--_map-position-fill);
|
|
134
|
+
paint-order: stroke;
|
|
135
|
+
stroke: none;
|
|
136
|
+
stroke-linejoin: round;
|
|
137
|
+
stroke-width: calc(var(--helix-border-thick) * 1.5);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host([heading]) [part="arrow"] {
|
|
141
|
+
display: block;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host([heading]) [part="dot"] {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:host([shape="rounded"]) [part="dot"] {
|
|
149
|
+
border-radius: var(--helix-radii-md);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([shape="square"]) [part="dot"] {
|
|
153
|
+
border-radius: var(--helix-radii-none);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host([shape="diamond"]) [part="dot"] {
|
|
157
|
+
border-radius: var(--helix-radii-none);
|
|
158
|
+
rotate: 45deg;
|
|
159
|
+
scale: 0.85;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([shape="ring"]) [part="dot"] {
|
|
163
|
+
background: transparent;
|
|
164
|
+
|
|
165
|
+
border-color: var(--_map-position-fill);
|
|
166
|
+
border-width: calc(var(--_map-position-size) * 0.25);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host([separation="outlined"]) [part="dot"] {
|
|
170
|
+
box-shadow: none;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:host([separation="elevated"]) [part="dot"] {
|
|
174
|
+
box-shadow: var(--helix-shadow-md);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host([separation="filled"]) [part="dot"] {
|
|
178
|
+
border-color: transparent;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:host([separation="plain"]) [part="dot"] {
|
|
182
|
+
border-color: transparent;
|
|
183
|
+
box-shadow: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:host([separation="outlined"]) [part="arrow"] path {
|
|
187
|
+
stroke: var(--_map-position-edge);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:host([separation="outlined"]) [part="arrow"],
|
|
191
|
+
:host([separation="plain"]) [part="arrow"] {
|
|
192
|
+
filter: none;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media (prefers-reduced-motion: reduce) {
|
|
196
|
+
[part="pulse"] {
|
|
197
|
+
animation: none;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[part="status"] {
|
|
202
|
+
block-size: 1px;
|
|
203
|
+
clip-path: inset(50%);
|
|
204
|
+
inline-size: 1px;
|
|
205
|
+
overflow: hidden;
|
|
206
|
+
position: absolute;
|
|
207
|
+
white-space: nowrap;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:host([tone]) {
|
|
211
|
+
--_map-position-color: var(--_map-position-tone);
|
|
212
|
+
--_map-position-fill: var(--_map-position-tone);
|
|
213
|
+
}
|
|
214
|
+
:host([tone="accent"]) {
|
|
215
|
+
--_map-position-tone: var(--helix-color-accent);
|
|
216
|
+
}
|
|
217
|
+
:host([tone="danger"]) {
|
|
218
|
+
--_map-position-tone: var(--helix-color-danger);
|
|
219
|
+
}
|
|
220
|
+
:host([tone="info"]) {
|
|
221
|
+
--_map-position-tone: var(--helix-color-info);
|
|
222
|
+
}
|
|
223
|
+
:host([tone="neutral"]) {
|
|
224
|
+
--_map-position-tone: var(--helix-color-foreground-muted);
|
|
225
|
+
}
|
|
226
|
+
:host([tone="primary"]) {
|
|
227
|
+
--_map-position-tone: var(--helix-color-primary);
|
|
228
|
+
}
|
|
229
|
+
:host([tone="success"]) {
|
|
230
|
+
--_map-position-tone: var(--helix-color-success);
|
|
231
|
+
}
|
|
232
|
+
:host([tone="warning"]) {
|
|
233
|
+
--_map-position-tone: var(--helix-color-warning);
|
|
234
|
+
}`);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { HelixHeadlessMapPosition } from '@fusion.dev/helix-headless/map';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A moving point on a map, such as a vehicle or a person.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Draws the position in your theme's foreground color with a surface-colored
|
|
8
|
+
* edge, or in a `tone`. A position with a heading is drawn as an arrow.
|
|
9
|
+
*
|
|
10
|
+
* @since 0.105.0
|
|
11
|
+
* @status experimental
|
|
12
|
+
* @category media
|
|
13
|
+
* @aliases Current location, Live position, Tracker, You are here
|
|
14
|
+
* @documentation https://fusion.dev/helix/components/map
|
|
15
|
+
*
|
|
16
|
+
* @cssproperty --map-position-color - The color of the halo, direction cone, and pulse when no tone is set.
|
|
17
|
+
* @cssproperty --map-position-edge - The edge around the point and the arrow.
|
|
18
|
+
* @cssproperty --map-position-fill - The color of the point and the arrow when no tone is set.
|
|
19
|
+
* @cssproperty --map-position-size - The point's width.
|
|
20
|
+
*/
|
|
21
|
+
export declare class HelixMapPosition extends HelixHeadlessMapPosition {
|
|
22
|
+
/**
|
|
23
|
+
* How the point stands out from the map. Leave unset for an edge, a halo,
|
|
24
|
+
* and a small shadow. `outlined` has the edge only, `elevated` a larger
|
|
25
|
+
* shadow, `filled` the halo without an edge, and `plain` none of these.
|
|
26
|
+
*/
|
|
27
|
+
separation?: 'elevated' | 'filled' | 'outlined' | 'plain';
|
|
28
|
+
/**
|
|
29
|
+
* The point's shape. A circle unless set. A position with a heading is
|
|
30
|
+
* always an arrow.
|
|
31
|
+
*/
|
|
32
|
+
shape?: 'diamond' | 'ring' | 'rounded' | 'square';
|
|
33
|
+
/** The position's color. Uses your theme's foreground color unless set. */
|
|
34
|
+
tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
|
|
35
|
+
static styles: CSSResultGroup;
|
|
36
|
+
}
|
|
37
|
+
declare global {
|
|
38
|
+
interface HTMLElementTagNameMap {
|
|
39
|
+
'helix-map-position': HelixMapPosition;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessMapPosition } from '@fusion.dev/helix-headless/map';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './map-position.css.js';
|
|
11
|
+
let HelixMapPosition = class HelixMapPosition extends HelixHeadlessMapPosition {
|
|
12
|
+
static { this.styles = styles; }
|
|
13
|
+
};
|
|
14
|
+
__decorate([
|
|
15
|
+
property({ reflect: true })
|
|
16
|
+
], HelixMapPosition.prototype, "separation", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
property({ reflect: true })
|
|
19
|
+
], HelixMapPosition.prototype, "shape", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
property({ reflect: true })
|
|
22
|
+
], HelixMapPosition.prototype, "tone", void 0);
|
|
23
|
+
HelixMapPosition = __decorate([
|
|
24
|
+
customElement('helix-map-position')
|
|
25
|
+
], HelixMapPosition);
|
|
26
|
+
export { HelixMapPosition };
|
|
@@ -16,12 +16,24 @@ position: relative;
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
[part="viewport"] {
|
|
19
|
+
isolation: isolate;
|
|
19
20
|
min-block-size: 0;
|
|
20
21
|
overflow: hidden;
|
|
21
22
|
position: relative;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
[part="
|
|
25
|
+
[part="layers"] {
|
|
26
|
+
block-size: 1px;
|
|
27
|
+
clip-path: inset(50%);
|
|
28
|
+
inline-size: 1px;
|
|
29
|
+
margin: var(--helix-space-none);
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
padding: var(--helix-space-none);
|
|
32
|
+
position: absolute;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[part="viewport"] ::slotted(:not(helix-map-marker, helix-map-points, helix-map-position)) {
|
|
25
37
|
block-size: 100%;
|
|
26
38
|
inline-size: 100%;
|
|
27
39
|
}
|
|
@@ -42,6 +54,28 @@ font-size: var(--helix-text-xs);
|
|
|
42
54
|
padding: var(--helix-space-2xs) var(--helix-space-xs);
|
|
43
55
|
}
|
|
44
56
|
|
|
57
|
+
:host([material="glass"]) [part="controls"] button {
|
|
58
|
+
backdrop-filter: var(--helix-material-backdrop);
|
|
59
|
+
background-color: var(--viewport-control-background-color, var(--helix-material-translucent));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([material="frosted"]) [part="controls"] button {
|
|
63
|
+
backdrop-filter: blur(var(--helix-material-blur-lg));
|
|
64
|
+
background-color: var(
|
|
65
|
+
--viewport-control-background-color,
|
|
66
|
+
var(--helix-material-translucent-strong)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([material="transparent"]) [part="controls"] button {
|
|
71
|
+
backdrop-filter: none;
|
|
72
|
+
background-color: var(--viewport-control-background-color, transparent);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([material]) [part="controls"] button:hover {
|
|
76
|
+
background-color: var(--helix-color-surface-raised);
|
|
77
|
+
}
|
|
78
|
+
|
|
45
79
|
@media print {
|
|
46
80
|
[part="controls"] {
|
|
47
81
|
display: none;
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { HelixHeadlessMap } from '@fusion.dev/helix-headless/map';
|
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
|
3
3
|
/**
|
|
4
|
-
* @summary A frame around
|
|
4
|
+
* @summary A frame around a map drawn by another library.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* rather than arrow keys, is the base class.
|
|
10
|
-
*
|
|
11
|
-
* **The controls do not fade with the chrome.** A reader who has gone still has
|
|
12
|
-
* not stopped needing the only controls this frame offers, so the idle state
|
|
13
|
-
* takes the header and footer a consumer slotted and leaves the buttons alone.
|
|
7
|
+
* The styled frame: a bordered box with the pan and zoom buttons in its top
|
|
8
|
+
* corner. The buttons stay visible when the header and footer fade.
|
|
14
9
|
*
|
|
15
10
|
* @since 0.100.0
|
|
16
11
|
* @status experimental
|
|
@@ -18,12 +13,18 @@ import type { CSSResultGroup } from 'lit';
|
|
|
18
13
|
* @aliases Map frame, Map container, Geo
|
|
19
14
|
* @documentation https://fusion.dev/helix/components/map
|
|
20
15
|
*
|
|
21
|
-
* @cssproperty --map-background-color - The
|
|
22
|
-
* @cssproperty --map-block-size -
|
|
23
|
-
* @cssproperty --map-border-color -
|
|
24
|
-
* @cssproperty --viewport-control-background-color - The
|
|
16
|
+
* @cssproperty --map-background-color - The color behind the map while tiles load.
|
|
17
|
+
* @cssproperty --map-block-size - The frame's height, as a length.
|
|
18
|
+
* @cssproperty --map-border-color - The frame's border color.
|
|
19
|
+
* @cssproperty --viewport-control-background-color - The background of the pan and zoom buttons. Canvas uses the same property.
|
|
25
20
|
*/
|
|
26
21
|
export declare class HelixMap extends HelixHeadlessMap {
|
|
22
|
+
/**
|
|
23
|
+
* The background of the pan and zoom buttons. Leave unset for solid. `glass`
|
|
24
|
+
* shows the map through a blur, `frosted` blurs more, and `transparent` has
|
|
25
|
+
* no background. Your theme sets how see-through each one is.
|
|
26
|
+
*/
|
|
27
|
+
material?: 'frosted' | 'glass' | 'transparent';
|
|
27
28
|
static styles: CSSResultGroup;
|
|
28
29
|
}
|
|
29
30
|
declare global {
|
|
@@ -6,11 +6,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from '@fusion.dev/helix-core';
|
|
8
8
|
import { HelixHeadlessMap } from '@fusion.dev/helix-headless/map';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
9
10
|
import { styles as viewportStyles } from '../../shared/viewport/viewport.css.js';
|
|
10
11
|
import { styles } from './map-root.css.js';
|
|
11
12
|
let HelixMap = class HelixMap extends HelixHeadlessMap {
|
|
12
13
|
static { this.styles = [viewportStyles, styles]; }
|
|
13
14
|
};
|
|
15
|
+
__decorate([
|
|
16
|
+
property({ reflect: true })
|
|
17
|
+
], HelixMap.prototype, "material", void 0);
|
|
14
18
|
HelixMap = __decorate([
|
|
15
19
|
customElement('helix-map')
|
|
16
20
|
], HelixMap);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
}`);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HelixHeadlessMapRoute } from '@fusion.dev/helix-headless/map';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary A line on a map, such as a route between stops.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Draws the route in your theme's colors, with a surface-colored casing under
|
|
8
|
+
* it so it stands out from the roads. Uses your primary color unless `tone`
|
|
9
|
+
* sets another.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.105.0
|
|
12
|
+
* @status experimental
|
|
13
|
+
* @category media
|
|
14
|
+
* @aliases Map line, Path, Polyline
|
|
15
|
+
* @documentation https://fusion.dev/helix/components/map
|
|
16
|
+
*
|
|
17
|
+
* @cssproperty --map-route-casing-color - The color of the casing under the route.
|
|
18
|
+
* @cssproperty --map-route-color - The route's color when no tone is set.
|
|
19
|
+
*/
|
|
20
|
+
export declare class HelixMapRoute extends HelixHeadlessMapRoute {
|
|
21
|
+
/** The route's color. Uses your primary color unless set. */
|
|
22
|
+
tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
|
|
23
|
+
/** `dotted` draws the route as dots, for a walk off the road network. */
|
|
24
|
+
variant?: 'dotted';
|
|
25
|
+
static styles: CSSResultGroup;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
'helix-map-route': HelixMapRoute;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessMapRoute } from '@fusion.dev/helix-headless/map';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './map-route.css.js';
|
|
11
|
+
let HelixMapRoute = class HelixMapRoute extends HelixHeadlessMapRoute {
|
|
12
|
+
static { this.styles = styles; }
|
|
13
|
+
};
|
|
14
|
+
__decorate([
|
|
15
|
+
property({ reflect: true })
|
|
16
|
+
], HelixMapRoute.prototype, "tone", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
property({ reflect: true })
|
|
19
|
+
], HelixMapRoute.prototype, "variant", void 0);
|
|
20
|
+
HelixMapRoute = __decorate([
|
|
21
|
+
customElement('helix-map-route')
|
|
22
|
+
], HelixMapRoute);
|
|
23
|
+
export { HelixMapRoute };
|
|
@@ -83,8 +83,9 @@ grid-area: full;
|
|
|
83
83
|
[part="controls"] button {
|
|
84
84
|
align-items: center;
|
|
85
85
|
background-color: var(--viewport-control-background-color, var(--helix-color-surface-overlay));
|
|
86
|
-
border: var(--helix-border-
|
|
86
|
+
border: var(--helix-border-floating) solid var(--helix-color-border);
|
|
87
87
|
border-radius: var(--helix-radii-sm);
|
|
88
|
+
box-shadow: var(--helix-shadow-floating);
|
|
88
89
|
block-size: var(--helix-size-control-sm);
|
|
89
90
|
color: var(--helix-color-foreground);
|
|
90
91
|
cursor: pointer;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix",
|
|
3
3
|
"description": "Styled component tier. Extends the headless tier with token-driven presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.105.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
},
|
|
48
48
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fusion.dev/helix-core": "0.
|
|
51
|
-
"@fusion.dev/helix-headless": "0.
|
|
52
|
-
"@fusion.dev/helix-styles": "0.
|
|
50
|
+
"@fusion.dev/helix-core": "0.105.0",
|
|
51
|
+
"@fusion.dev/helix-headless": "0.105.0",
|
|
52
|
+
"@fusion.dev/helix-styles": "0.105.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.105.0",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.105.0",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^4.1.0",
|