@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.
@@ -100,7 +100,18 @@ registerElementEvents({
100
100
  'toggle',
101
101
  ],
102
102
  'helix-listbox': ['change', 'helix-before-change', 'helix-filter', 'input'],
103
- 'helix-map': ['helix-map-pan', 'helix-map-zoom'],
103
+ 'helix-map': [
104
+ 'helix-activate',
105
+ 'helix-map-cluster',
106
+ 'helix-map-pan',
107
+ 'helix-map-part-change',
108
+ 'helix-map-zoom',
109
+ ],
110
+ 'helix-map-area': ['helix-map-part-change'],
111
+ 'helix-map-marker': ['helix-map-cluster', 'helix-map-part-change'],
112
+ 'helix-map-points': ['helix-activate', 'helix-map-cluster', 'helix-map-part-change'],
113
+ 'helix-map-position': ['helix-map-part-change'],
114
+ 'helix-map-route': ['helix-map-part-change'],
104
115
  'helix-megamenu': ['helix-before-close', 'helix-before-open', 'toggle'],
105
116
  'helix-menu': ['helix-before-close', 'helix-before-open', 'helix-select', 'toggle'],
106
117
  'helix-menu-item': ['helix-select'],
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,24 @@
1
+ import { createSheet } from '@fusion.dev/helix-core';
2
+ export const styles = createSheet(`:host {
3
+ color: var(--map-area-color, var(--helix-color-primary));
4
+ display: none;
5
+ }
6
+
7
+ :host([tone="accent"]) {
8
+ color: var(--helix-color-accent);
9
+ }
10
+ :host([tone="danger"]) {
11
+ color: var(--helix-color-danger);
12
+ }
13
+ :host([tone="info"]) {
14
+ color: var(--helix-color-info);
15
+ }
16
+ :host([tone="neutral"]) {
17
+ color: var(--helix-color-foreground-muted);
18
+ }
19
+ :host([tone="success"]) {
20
+ color: var(--helix-color-success);
21
+ }
22
+ :host([tone="warning"]) {
23
+ color: var(--helix-color-warning);
24
+ }`);
@@ -0,0 +1,27 @@
1
+ import { HelixHeadlessMapArea } from '@fusion.dev/helix-headless/map';
2
+ import type { CSSResultGroup } from 'lit';
3
+ /**
4
+ * @summary A shape on a map, such as a delivery zone.
5
+ *
6
+ * @description
7
+ * Fills the area in your theme's colors. Uses your primary color unless
8
+ * `tone` sets another.
9
+ *
10
+ * @since 0.105.0
11
+ * @status experimental
12
+ * @category media
13
+ * @aliases Map region, Polygon, Zone
14
+ * @documentation https://fusion.dev/helix/components/map
15
+ *
16
+ * @cssproperty --map-area-color - The area's color when no tone is set.
17
+ */
18
+ export declare class HelixMapArea extends HelixHeadlessMapArea {
19
+ /** The area's color. Uses your primary color unless set. */
20
+ tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
21
+ static styles: CSSResultGroup;
22
+ }
23
+ declare global {
24
+ interface HTMLElementTagNameMap {
25
+ 'helix-map-area': HelixMapArea;
26
+ }
27
+ }
@@ -0,0 +1,20 @@
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 { HelixHeadlessMapArea } from '@fusion.dev/helix-headless/map';
9
+ import { property } from 'lit/decorators.js';
10
+ import { styles } from './map-area.css.js';
11
+ let HelixMapArea = class HelixMapArea extends HelixHeadlessMapArea {
12
+ static { this.styles = styles; }
13
+ };
14
+ __decorate([
15
+ property({ reflect: true })
16
+ ], HelixMapArea.prototype, "tone", void 0);
17
+ HelixMapArea = __decorate([
18
+ customElement('helix-map-area')
19
+ ], HelixMapArea);
20
+ export { HelixMapArea };
@@ -1 +1,6 @@
1
+ export { HelixMapArea } from './area/map-area.js';
2
+ export { HelixMapMarker } from './marker/map-marker.js';
3
+ export { HelixMapPoints } from './points/map-points.js';
4
+ export { HelixMapPosition } from './position/map-position.js';
1
5
  export { HelixMap } from './root/map-root.js';
6
+ export { HelixMapRoute } from './route/map-route.js';
package/dist/map/index.js CHANGED
@@ -1 +1,6 @@
1
+ export { HelixMapArea } from './area/map-area.js';
2
+ export { HelixMapMarker } from './marker/map-marker.js';
3
+ export { HelixMapPoints } from './points/map-points.js';
4
+ export { HelixMapPosition } from './position/map-position.js';
1
5
  export { HelixMap } from './root/map-root.js';
6
+ export { HelixMapRoute } from './route/map-route.js';
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,335 @@
1
+ import { createSheet } from '@fusion.dev/helix-core';
2
+ export const styles = createSheet(`:host {
3
+ --_map-marker-color: var(--map-marker-color, var(--helix-color-primary));
4
+
5
+ --_map-marker-fill: var(--map-marker-color, var(--helix-color-primary-surface));
6
+ --_map-marker-ink: var(--map-marker-ink, var(--helix-color-foreground-on-accent));
7
+
8
+ --_map-marker-edge: var(--helix-color-surface);
9
+ --_map-marker-lift: 0px;
10
+ --_map-marker-shadow: var(--helix-shadow-sm);
11
+ --_map-marker-size: var(--map-marker-size, 0.875rem);
12
+
13
+ --_map-marker-leg: 0px;
14
+ --_map-marker-leg-angle: 0rad;
15
+ --_map-marker-x: 0px;
16
+ --_map-marker-y: 0px;
17
+ block-size: 0;
18
+ display: block;
19
+ inline-size: 0;
20
+ inset-block-start: var(--_map-marker-y);
21
+ left: var(--_map-marker-x);
22
+ position: absolute;
23
+ }
24
+
25
+ :host(:hover),
26
+ :host(:focus-within) {
27
+ z-index: calc(var(--helix-layer-raised) + 1);
28
+ }
29
+
30
+ :host(:not([style*="--_map-marker-x"])) {
31
+ visibility: hidden;
32
+ }
33
+
34
+ [part="marker"] {
35
+ align-items: center;
36
+ cursor: pointer;
37
+ display: flex;
38
+ gap: var(--helix-space-xs);
39
+ left: 0;
40
+ outline: none;
41
+
42
+ pointer-events: none;
43
+ position: absolute;
44
+ top: 0;
45
+ transform: translate(calc(var(--_map-marker-size) / -2), calc(-50% - var(--_map-marker-lift)));
46
+ }
47
+
48
+ :host(:dir(rtl)) [part="marker"],
49
+ :host(:state(start)) [part="marker"] {
50
+ transform: translate(
51
+ calc(-100% + var(--_map-marker-size) / 2),
52
+ calc(-50% - var(--_map-marker-lift))
53
+ );
54
+ }
55
+
56
+ :host(:dir(rtl):state(start)) [part="marker"] {
57
+ transform: translate(calc(var(--_map-marker-size) / -2), calc(-50% - var(--_map-marker-lift)));
58
+ }
59
+
60
+ :host(:state(start)) [part="marker"] {
61
+ flex-direction: row-reverse;
62
+ }
63
+
64
+ [part="point"] {
65
+ align-items: center;
66
+ background: var(--_map-marker-color);
67
+ block-size: var(--_map-marker-size);
68
+ border: var(--helix-border-thick) solid var(--_map-marker-edge);
69
+ border-radius: var(--helix-radii-full);
70
+ box-shadow: var(--_map-marker-shadow);
71
+ box-sizing: border-box;
72
+ color: var(--_map-marker-ink);
73
+ display: grid;
74
+ flex: none;
75
+ font-family: var(--helix-font-sans);
76
+ font-size: calc(var(--_map-marker-size) * 0.5);
77
+ font-weight: var(--helix-weight-semibold);
78
+ inline-size: var(--_map-marker-size);
79
+ isolation: isolate;
80
+ justify-items: center;
81
+ line-height: 1;
82
+ pointer-events: auto;
83
+ position: relative;
84
+ transition: transform var(--helix-duration-fast) var(--helix-easing-standard);
85
+ }
86
+
87
+ :host(:state(icon)) {
88
+ --_map-marker-size: var(--map-marker-size, 1.375rem);
89
+ }
90
+
91
+ :host(:state(icon)) [part="point"] {
92
+ background: var(--_map-marker-fill);
93
+ }
94
+
95
+ :host([shape="rounded"]) [part="point"] {
96
+ border-radius: var(--helix-radii-md);
97
+ }
98
+
99
+ :host([shape="square"]) [part="point"] {
100
+ border-radius: var(--helix-radii-none);
101
+ }
102
+
103
+ :host([shape="diamond"]) [part="point"] {
104
+ border-radius: var(--helix-radii-none);
105
+ rotate: 45deg;
106
+ scale: 0.85;
107
+ }
108
+
109
+ :host([shape="diamond"]) ::slotted(*) {
110
+ rotate: -45deg;
111
+ }
112
+
113
+ :host([shape="ring"]) [part="point"] {
114
+ background: var(--helix-color-surface);
115
+ border-color: var(--_map-marker-color);
116
+ border-width: calc(var(--_map-marker-size) * 0.18);
117
+ color: var(--_map-marker-color);
118
+ }
119
+
120
+ :host([shape="pin"]) {
121
+ --_map-marker-lift: calc(var(--_map-marker-size) * 0.72);
122
+ --_map-marker-size: var(--map-marker-size, 1.625rem);
123
+ }
124
+
125
+ :host([shape="pin"]) [part="point"] {
126
+ background: var(--_map-marker-fill);
127
+ border: 0;
128
+ border-radius: var(--helix-radii-full);
129
+ box-shadow: none;
130
+ }
131
+
132
+ :host([shape="pin"]) [part="point"]::before {
133
+ background: var(--_map-marker-fill);
134
+ border: var(--helix-border-thick) solid var(--_map-marker-edge);
135
+ border-radius: var(--helix-radii-full) var(--helix-radii-full) var(--helix-radii-full)
136
+ var(--helix-radii-none);
137
+ box-shadow: var(--_map-marker-shadow);
138
+ box-sizing: border-box;
139
+ content: "";
140
+ inset: 0;
141
+ position: absolute;
142
+ rotate: -45deg;
143
+ z-index: var(--helix-layer-beneath);
144
+ }
145
+
146
+ :host([shape="pin"]) [part="point"]::after {
147
+ background: var(--_map-marker-fill);
148
+ block-size: calc(var(--_map-marker-size) * 0.26);
149
+ border: var(--helix-border-thin) solid var(--_map-marker-edge);
150
+ border-radius: var(--helix-radii-full);
151
+ box-sizing: border-box;
152
+ content: "";
153
+ inline-size: calc(var(--_map-marker-size) * 0.26);
154
+ left: 50%;
155
+ position: absolute;
156
+ top: calc(50% + var(--_map-marker-lift));
157
+ translate: -50% -50%;
158
+ z-index: calc(var(--helix-layer-beneath) - 1);
159
+ }
160
+
161
+ :host(:state(cluster)) {
162
+ --_map-marker-lift: 0px;
163
+ --_map-marker-size: var(--map-marker-cluster-size, 1.75rem);
164
+ }
165
+
166
+ :host(:state(cluster)) [part="point"] {
167
+ background: var(--map-marker-cluster-color, var(--helix-color-primary-surface));
168
+ border: var(--helix-border-thick) solid var(--_map-marker-edge);
169
+ border-radius: var(--helix-radii-full);
170
+ box-shadow:
171
+ 0 0 0 calc(var(--_map-marker-size) * 0.18)
172
+ color-mix(
173
+ in oklab,
174
+ var(--map-marker-cluster-color, var(--helix-color-primary-surface)) 28%,
175
+ transparent
176
+ ),
177
+ var(--_map-marker-shadow);
178
+ color: var(--helix-color-foreground-on-accent);
179
+ font-size: calc(var(--_map-marker-size) * 0.42);
180
+ font-variant-numeric: tabular-nums;
181
+ rotate: none;
182
+ scale: none;
183
+ }
184
+
185
+ :host(:state(cluster)) [part="point"]::before,
186
+ :host(:state(cluster)) [part="point"]::after {
187
+ content: none;
188
+ }
189
+
190
+ :host(:state(fanned))::before {
191
+ --_map-marker-leg-ink: color-mix(
192
+ in oklab,
193
+ var(--helix-color-foreground) 55%,
194
+ var(--helix-color-surface)
195
+ );
196
+ --_map-marker-leg-dot: calc(var(--helix-border-thick) * 1.75);
197
+
198
+ background:
199
+ radial-gradient(
200
+ circle at calc(100% - var(--_map-marker-leg-dot)) 50%,
201
+ var(--_map-marker-leg-ink) var(--_map-marker-leg-dot),
202
+ transparent calc(var(--_map-marker-leg-dot) + var(--helix-border-thin))
203
+ ),
204
+ linear-gradient(var(--_map-marker-leg-ink), var(--_map-marker-leg-ink)) 0 50% / 100%
205
+ var(--helix-border-thick) no-repeat;
206
+
207
+ block-size: calc((var(--_map-marker-leg-dot) + var(--helix-border-thin)) * 2);
208
+ content: "";
209
+ inline-size: calc(var(--_map-marker-leg) + var(--_map-marker-leg-dot));
210
+ left: 0;
211
+ position: absolute;
212
+ rotate: var(--_map-marker-leg-angle);
213
+ top: 0;
214
+ transform-origin: 0 50%;
215
+ translate: 0 -50%;
216
+ }
217
+
218
+ :host(:state(clustered)) {
219
+ display: none;
220
+ }
221
+
222
+ :host([separation="outlined"]) {
223
+ --_map-marker-shadow: none;
224
+ }
225
+
226
+ :host([separation="elevated"]) {
227
+ --_map-marker-shadow: var(--helix-shadow-md);
228
+ }
229
+
230
+ :host([separation="filled"]) {
231
+ --_map-marker-edge: transparent;
232
+ --_map-marker-shadow: 0 0 0 calc(var(--_map-marker-size) * 0.3)
233
+ color-mix(in oklab, var(--_map-marker-color) 22%, transparent);
234
+ }
235
+
236
+ :host([separation="plain"]) {
237
+ --_map-marker-edge: transparent;
238
+ --_map-marker-shadow: none;
239
+ }
240
+
241
+ [part="label"] {
242
+
243
+ background: var(--helix-color-surface-overlay);
244
+ border: var(--map-marker-label-border-width, var(--helix-border-floating)) solid
245
+ var(--helix-color-border);
246
+ border-radius: var(--helix-radii-sm);
247
+ box-shadow: var(--map-marker-label-shadow, var(--helix-shadow-floating));
248
+ color: var(--helix-color-foreground);
249
+ font-family: var(--helix-font-sans);
250
+ font-size: var(--helix-text-sm);
251
+ font-weight: var(--helix-weight-medium);
252
+ opacity: 0;
253
+ padding: var(--helix-space-2xs) var(--helix-space-xs);
254
+ pointer-events: none;
255
+ transition: opacity var(--helix-duration-fast) var(--helix-easing-standard);
256
+ white-space: nowrap;
257
+ }
258
+
259
+ :host(:state(cluster)) [part="label"] {
260
+
261
+ inline-size: max-content;
262
+ max-inline-size: 16rem;
263
+ white-space: normal;
264
+ }
265
+
266
+ :host([material="glass"]) [part="label"] {
267
+ backdrop-filter: var(--helix-material-backdrop);
268
+ background: var(--helix-material-translucent);
269
+ }
270
+
271
+ :host([material="frosted"]) [part="label"] {
272
+ backdrop-filter: blur(var(--helix-material-blur-lg));
273
+ background: var(--helix-material-translucent-strong);
274
+ }
275
+
276
+ :host([material="transparent"]) [part="label"] {
277
+ backdrop-filter: none;
278
+ background: transparent;
279
+ }
280
+
281
+ :host(:hover) [part="label"],
282
+ [part="marker"]:focus-visible [part="label"] {
283
+ opacity: 1;
284
+ }
285
+
286
+ :host(:hover) [part="point"],
287
+ [part="marker"]:focus-visible [part="point"] {
288
+ transform: scale(1.25);
289
+ }
290
+
291
+ [part="marker"]:focus-visible [part="point"] {
292
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
293
+ outline-offset: var(--helix-size-focus-offset);
294
+ }
295
+
296
+ :host([tone="accent"]) {
297
+ --_map-marker-color: var(--helix-color-accent);
298
+ --_map-marker-fill: var(--helix-color-accent-surface);
299
+ }
300
+ :host([tone="danger"]) {
301
+ --_map-marker-color: var(--helix-color-danger);
302
+ --_map-marker-fill: var(--helix-color-danger-surface);
303
+ }
304
+ :host([tone="info"]) {
305
+ --_map-marker-color: var(--helix-color-info);
306
+ --_map-marker-fill: var(--helix-color-info-surface);
307
+ }
308
+
309
+ :host([tone="neutral"]) {
310
+ --_map-marker-color: var(--helix-color-foreground-muted);
311
+ --_map-marker-fill: var(--helix-color-foreground-muted);
312
+ --_map-marker-ink: var(--map-marker-ink, var(--helix-color-surface));
313
+ }
314
+ :host([tone="success"]) {
315
+ --_map-marker-color: var(--helix-color-success);
316
+ --_map-marker-fill: var(--helix-color-success-surface);
317
+ }
318
+ :host([tone="warning"]) {
319
+ --_map-marker-color: var(--helix-color-warning);
320
+ --_map-marker-fill: var(--helix-color-warning-surface);
321
+ }
322
+
323
+ :host(:state(passed)) {
324
+ --_map-marker-color: var(--helix-color-foreground-muted);
325
+ --_map-marker-fill: var(--helix-color-foreground-muted);
326
+ --_map-marker-ink: var(--helix-color-surface);
327
+ --_map-marker-shadow: none;
328
+ }
329
+
330
+ @media (prefers-reduced-motion: reduce) {
331
+ [part="label"],
332
+ [part="point"] {
333
+ transition: none;
334
+ }
335
+ }`);
@@ -0,0 +1,51 @@
1
+ import { HelixHeadlessMapMarker } from '@fusion.dev/helix-headless/map';
2
+ import type { CSSResultGroup } from 'lit';
3
+ /**
4
+ * @summary A named place on a map.
5
+ *
6
+ * @description
7
+ * A point in your theme's colors with the place's name beside it. Uses your
8
+ * primary color unless `tone` sets another.
9
+ *
10
+ * @since 0.105.0
11
+ * @status experimental
12
+ * @category media
13
+ * @aliases Map pin, Place, Point of interest
14
+ * @documentation https://fusion.dev/helix/components/map
15
+ *
16
+ * @cssproperty --map-marker-cluster-color - A cluster's fill color.
17
+ * @cssproperty --map-marker-cluster-size - A cluster's width.
18
+ * @cssproperty --map-marker-color - The point's color when no tone is set.
19
+ * @cssproperty --map-marker-ink - The color of a letter or icon in the point. Set it with `--map-marker-color` when white is hard to read on your color.
20
+ * @cssproperty --map-marker-label-border-width - The width of the name's border.
21
+ * @cssproperty --map-marker-label-shadow - The name's shadow.
22
+ * @cssproperty --map-marker-size - The point's width.
23
+ */
24
+ export declare class HelixMapMarker extends HelixHeadlessMapMarker {
25
+ /**
26
+ * The background of the name. Leave unset for solid. `glass` shows the map
27
+ * through a blur, `frosted` blurs more, and `transparent` has no background.
28
+ */
29
+ material?: 'frosted' | 'glass' | 'transparent';
30
+ /**
31
+ * How the point stands out from the map. Leave unset for a surface-colored
32
+ * edge and a small shadow. `outlined` has the edge only, `elevated` a larger
33
+ * shadow, `filled` a soft halo in the marker's color, and `plain` no edge or
34
+ * shadow.
35
+ */
36
+ separation?: 'elevated' | 'filled' | 'outlined' | 'plain';
37
+ /**
38
+ * The point's shape. A circle unless set. Use shapes with tones to tell
39
+ * kinds of places apart. `pin` places the tip of a pin on the location, for
40
+ * a destination.
41
+ */
42
+ shape?: 'diamond' | 'pin' | 'ring' | 'rounded' | 'square';
43
+ /** The point's color. Uses your primary color unless set. */
44
+ tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
45
+ static styles: CSSResultGroup;
46
+ }
47
+ declare global {
48
+ interface HTMLElementTagNameMap {
49
+ 'helix-map-marker': HelixMapMarker;
50
+ }
51
+ }
@@ -0,0 +1,29 @@
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 { HelixHeadlessMapMarker } from '@fusion.dev/helix-headless/map';
9
+ import { property } from 'lit/decorators.js';
10
+ import { styles } from './map-marker.css.js';
11
+ let HelixMapMarker = class HelixMapMarker extends HelixHeadlessMapMarker {
12
+ static { this.styles = styles; }
13
+ };
14
+ __decorate([
15
+ property({ reflect: true })
16
+ ], HelixMapMarker.prototype, "material", void 0);
17
+ __decorate([
18
+ property({ reflect: true })
19
+ ], HelixMapMarker.prototype, "separation", void 0);
20
+ __decorate([
21
+ property({ reflect: true })
22
+ ], HelixMapMarker.prototype, "shape", void 0);
23
+ __decorate([
24
+ property({ reflect: true })
25
+ ], HelixMapMarker.prototype, "tone", void 0);
26
+ HelixMapMarker = __decorate([
27
+ customElement('helix-map-marker')
28
+ ], HelixMapMarker);
29
+ export { HelixMapMarker };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,82 @@
1
+ import { createSheet } from '@fusion.dev/helix-core';
2
+ export const styles = createSheet(`:host {
3
+ border-color: var(--map-points-casing-color, var(--helix-color-surface));
4
+ color: var(--map-points-color, var(--helix-color-primary-surface));
5
+
6
+ block-size: 0;
7
+ display: block;
8
+ inline-size: 0;
9
+ inset-block-start: 0;
10
+ left: 0;
11
+ outline-color: var(--map-points-ink, var(--helix-color-foreground-on-accent));
12
+ pointer-events: none;
13
+ position: absolute;
14
+ }
15
+
16
+ [part~="place"] {
17
+ block-size: var(--helix-size-control-sm);
18
+ border-radius: var(--helix-radii-full);
19
+ inline-size: var(--helix-size-control-sm);
20
+ left: var(--_map-place-x);
21
+ outline: none;
22
+ position: absolute;
23
+ top: var(--_map-place-y);
24
+ translate: -50% -50%;
25
+ }
26
+
27
+ [part~="count"] {
28
+ block-size: var(--helix-size-control-lg);
29
+ inline-size: var(--helix-size-control-lg);
30
+ }
31
+
32
+ [part~="place"]:focus-visible {
33
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
34
+ outline-offset: var(--helix-size-focus-offset);
35
+ }
36
+
37
+ [part="label"] {
38
+ background: var(--helix-color-surface-overlay);
39
+ border: var(--helix-border-floating) solid var(--helix-color-border);
40
+ border-radius: var(--helix-radii-sm);
41
+ box-shadow: var(--helix-shadow-floating);
42
+ color: var(--helix-color-foreground);
43
+ font-family: var(--helix-font-sans);
44
+ font-size: var(--helix-text-sm);
45
+ font-weight: var(--helix-weight-medium);
46
+ inset-inline-start: calc(100% + var(--helix-space-sm));
47
+ opacity: 0;
48
+ padding: var(--helix-space-2xs) var(--helix-space-xs);
49
+ position: absolute;
50
+ top: 50%;
51
+ translate: 0 -50%;
52
+ white-space: nowrap;
53
+ }
54
+
55
+ [part~="place"]:focus-visible [part="label"] {
56
+ opacity: 1;
57
+ }
58
+
59
+ :host([tone="accent"]) {
60
+ color: var(--helix-color-accent-surface);
61
+ }
62
+
63
+ :host([tone="danger"]) {
64
+ color: var(--helix-color-danger-surface);
65
+ }
66
+
67
+ :host([tone="info"]) {
68
+ color: var(--helix-color-info-surface);
69
+ }
70
+
71
+ :host([tone="neutral"]) {
72
+ color: var(--helix-color-foreground-muted);
73
+ outline-color: var(--map-points-ink, var(--helix-color-surface));
74
+ }
75
+
76
+ :host([tone="success"]) {
77
+ color: var(--helix-color-success-surface);
78
+ }
79
+
80
+ :host([tone="warning"]) {
81
+ color: var(--helix-color-warning-surface);
82
+ }`);
@@ -0,0 +1,29 @@
1
+ import { HelixHeadlessMapPoints } from '@fusion.dev/helix-headless/map';
2
+ import type { CSSResultGroup } from 'lit';
3
+ /**
4
+ * @summary Thousands of places on a map, loaded from data.
5
+ *
6
+ * @description
7
+ * Draws the points in your theme's colors, with counts in white on your
8
+ * primary color unless `tone` sets another.
9
+ *
10
+ * @since 0.105.0
11
+ * @status experimental
12
+ * @category media
13
+ * @aliases Data layer, GeoJSON layer, Point cloud, Point layer
14
+ * @documentation https://fusion.dev/helix/components/map
15
+ *
16
+ * @cssproperty --map-points-casing-color - The edge around each point and count.
17
+ * @cssproperty --map-points-color - The points' color when no tone is set.
18
+ * @cssproperty --map-points-ink - The color of the numbers in counts.
19
+ */
20
+ export declare class HelixMapPoints extends HelixHeadlessMapPoints {
21
+ /** The points' color. Uses your primary color unless set. */
22
+ tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
23
+ static styles: CSSResultGroup;
24
+ }
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ 'helix-map-points': HelixMapPoints;
28
+ }
29
+ }
@@ -0,0 +1,20 @@
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 { HelixHeadlessMapPoints } from '@fusion.dev/helix-headless/map';
9
+ import { property } from 'lit/decorators.js';
10
+ import { styles } from './map-points.css.js';
11
+ let HelixMapPoints = class HelixMapPoints extends HelixHeadlessMapPoints {
12
+ static { this.styles = styles; }
13
+ };
14
+ __decorate([
15
+ property({ reflect: true })
16
+ ], HelixMapPoints.prototype, "tone", void 0);
17
+ HelixMapPoints = __decorate([
18
+ customElement('helix-map-points')
19
+ ], HelixMapPoints);
20
+ export { HelixMapPoints };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;