@superrouteca/smap 1.0.1 → 1.0.5

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/dist/smap.css CHANGED
@@ -22,3 +22,57 @@
22
22
  .maplibregl-ctrl-bottom-right > .maplibregl-ctrl.smap-badge { margin: 12px 0 12px 10px; }
23
23
  .maplibregl-ctrl-bottom-right > .maplibregl-ctrl-attrib + .smap-badge { clear: none; }
24
24
  .maplibregl-ctrl-bottom-right > .maplibregl-ctrl.smap-badge.smap-badge-above { margin: 0 10px 0 0; }
25
+ /* Popups (one per map). Customise with these variables, on the map's element, the page, or a popup className:
26
+ --smap-popup-bg, --smap-popup-color, --smap-popup-radius, --smap-popup-padding, --smap-popup-shadow,
27
+ --smap-popup-font-size, --smap-popup-width
28
+ The defaults follow the colour scheme (dark ones on the dark and black schemes). */
29
+ .smap-popup {
30
+ --smap-popup-bg-in: var(--smap-popup-bg, #ffffff);
31
+ --smap-popup-color-in: var(--smap-popup-color, #1e293b);
32
+ --smap-popup-shadow-in: var(--smap-popup-shadow, 0 2px 10px rgba(15, 23, 42, 0.18));
33
+ width: var(--smap-popup-width, auto);
34
+ }
35
+ .smap-style-dark .smap-popup,
36
+ .smap-style-black .smap-popup {
37
+ --smap-popup-bg-in: var(--smap-popup-bg, #1f2430);
38
+ --smap-popup-color-in: var(--smap-popup-color, #e5e7eb);
39
+ --smap-popup-shadow-in: var(--smap-popup-shadow, 0 2px 12px rgba(0, 0, 0, 0.55));
40
+ }
41
+ .smap-popup .maplibregl-popup-content {
42
+ background: var(--smap-popup-bg-in);
43
+ color: var(--smap-popup-color-in);
44
+ border-radius: var(--smap-popup-radius, 8px);
45
+ padding: var(--smap-popup-padding, 10px 12px);
46
+ box-shadow: var(--smap-popup-shadow-in);
47
+ font-size: var(--smap-popup-font-size, 13px);
48
+ line-height: 1.4;
49
+ }
50
+ .smap-popup .maplibregl-popup-close-button { color: inherit; font-size: 16px; line-height: 1; padding: 2px 6px; }
51
+ .smap-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip,
52
+ .smap-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
53
+ .smap-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--smap-popup-bg-in); }
54
+ .smap-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
55
+ .smap-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
56
+ .smap-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--smap-popup-bg-in); }
57
+ .smap-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--smap-popup-bg-in); }
58
+ .smap-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--smap-popup-bg-in); }
59
+ /* The default loading state: three pulsing dots. */
60
+ .smap-popup-loading { display: flex; gap: 4px; padding: 4px 2px; }
61
+ .smap-popup-loading span {
62
+ width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.25;
63
+ animation: smap-popup-pulse 1s infinite ease-in-out;
64
+ }
65
+ .smap-popup-loading span:nth-child(2) { animation-delay: 0.15s; }
66
+ .smap-popup-loading span:nth-child(3) { animation-delay: 0.3s; }
67
+ @keyframes smap-popup-pulse { 50% { opacity: 0.9; } }
68
+ @media (prefers-reduced-motion: reduce) { .smap-popup-loading span { animation: none; opacity: 0.6; } }
69
+
70
+ /* The chooser shown for pins piled up under a click: one row per pin, the pin drawn small beside its label. */
71
+ .smap-chooser { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; min-width: 160px; }
72
+ .smap-chooser-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; border: 0; border-radius: 6px;
73
+ background: transparent; color: inherit; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
74
+ .smap-chooser-item:hover, .smap-chooser-item:focus-visible { background: rgba(37, 99, 235, 0.1); outline: none; }
75
+ .smap-chooser-pin { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
76
+ padding: 0 4px; box-sizing: border-box; border: 2px solid; border-radius: 11px; color: #fff; font-size: 10px; font-weight: 700;
77
+ text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); }
78
+ .smap-chooser-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }