@ztwoint/z-ui 0.1.135 → 0.1.136
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/components/z2map/components/map-controls.js +2 -2
- package/dist/components/z2map/components/map-empty-state.js +1 -1
- package/dist/components/z2map/components/map-loading-state.js +1 -1
- package/dist/components/z2map/components/map-pin.js +3 -3
- package/dist/components/z2map/map.js +42 -42
- package/dist/css/styles/tailwind.css +1 -1
- package/package.json +1 -1
|
@@ -15,13 +15,13 @@ const f = ({
|
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
className: s(
|
|
18
|
-
"absolute bottom-6 right-6 z-
|
|
18
|
+
"absolute bottom-6 right-6 z-0 transition-all duration-300 hover:scale-105",
|
|
19
19
|
l
|
|
20
20
|
),
|
|
21
21
|
children: /* @__PURE__ */ r(d, { onZoomIn: o, onZoomOut: t })
|
|
22
22
|
}
|
|
23
23
|
),
|
|
24
|
-
e && a && i && /* @__PURE__ */ r("div", { className: s("absolute top-6 right-6 z-
|
|
24
|
+
e && a && i && /* @__PURE__ */ r("div", { className: s("absolute top-6 right-6 z-0 transition-all duration-300", l), children: /* @__PURE__ */ r(c, { activeStyle: a, onStyleChange: i }) })
|
|
25
25
|
] });
|
|
26
26
|
f.displayName = "MapControls";
|
|
27
27
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { MapPinOff as a } from "lucide-react";
|
|
3
|
-
const s = () => /* @__PURE__ */ e("div", { className: "absolute inset-0 pointer-events-none flex items-center justify-center z-
|
|
3
|
+
const s = () => /* @__PURE__ */ e("div", { className: "absolute inset-0 pointer-events-none flex items-center justify-center z-0", children: /* @__PURE__ */ e("div", { className: "bg-white/95 backdrop-blur-sm rounded-2xl shadow-[0_8px_32px_rgba(0,0,0,0.12)] border border-stroke-solid-light p-8 max-w-sm mx-4 pointer-events-auto", children: /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-4 text-center", children: [
|
|
4
4
|
/* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-surface-neutral-default flex items-center justify-center", children: /* @__PURE__ */ e(a, { className: "w-8 h-8 text-neutral-secondary" }) }) }),
|
|
5
5
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e("h3", { className: "leading-none-medium-base text-neutral-primary font-semibold", children: "No locations to display" }) })
|
|
6
6
|
] }) }) });
|
|
@@ -25,7 +25,7 @@ const c = ({ width: r, height: t, className: l }) => {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
) }),
|
|
28
|
-
/* @__PURE__ */ a("div", { className: "relative z-
|
|
28
|
+
/* @__PURE__ */ a("div", { className: "relative z-0 flex flex-col items-center gap-3", children: [
|
|
29
29
|
/* @__PURE__ */ a("div", { className: "relative", children: [
|
|
30
30
|
/* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-surface-accent-default/10 flex items-center justify-center", children: /* @__PURE__ */ e(i, { className: "w-8 h-8 text-accent-primary animate-spin" }) }),
|
|
31
31
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 rounded-full bg-accent-primary/20 animate-ping" })
|
|
@@ -23,7 +23,7 @@ const m = v(
|
|
|
23
23
|
},
|
|
24
24
|
active: {
|
|
25
25
|
true: [
|
|
26
|
-
"scale-125 z-
|
|
26
|
+
"scale-125 z-0",
|
|
27
27
|
"before:ring-4 before:ring-white/70",
|
|
28
28
|
"before:shadow-[0_8px_24px_rgba(0,0,0,0.3)]"
|
|
29
29
|
],
|
|
@@ -100,12 +100,12 @@ const m = v(
|
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
102
|
className: c(
|
|
103
|
-
"absolute inset-0 rounded-full z-
|
|
103
|
+
"absolute inset-0 rounded-full z-0 opacity-60",
|
|
104
104
|
w[o]
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
/* @__PURE__ */ n("div", { className: "relative z-
|
|
108
|
+
/* @__PURE__ */ n("div", { className: "relative z-0 flex items-center justify-center", children: f || /* @__PURE__ */ n(h, { size: g, className: "text-white drop-shadow-sm" }) })
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
);
|
|
@@ -20,20 +20,20 @@ import { DEFAULT_MAP_CONFIG as r } from "./map.constants.js";
|
|
|
20
20
|
import { cn as Q } from "../../lib/utils.js";
|
|
21
21
|
/* empty css */
|
|
22
22
|
const X = ({
|
|
23
|
-
locations:
|
|
23
|
+
locations: m = [],
|
|
24
24
|
mapboxToken: M,
|
|
25
25
|
width: a = r.width,
|
|
26
|
-
height:
|
|
27
|
-
className:
|
|
28
|
-
pinVariant:
|
|
26
|
+
height: l = r.height,
|
|
27
|
+
className: d,
|
|
28
|
+
pinVariant: s = r.pinVariant,
|
|
29
29
|
pinSize: h = r.pinSize,
|
|
30
30
|
renderPin: t,
|
|
31
|
-
renderPopover:
|
|
31
|
+
renderPopover: n,
|
|
32
32
|
popoverDisabled: C = r.popoverDisabled,
|
|
33
|
-
interactive:
|
|
34
|
-
draggable:
|
|
33
|
+
interactive: b = r.interactive,
|
|
34
|
+
draggable: c = r.draggable,
|
|
35
35
|
scrollZoom: x = r.scrollZoom,
|
|
36
|
-
showZoomControls:
|
|
36
|
+
showZoomControls: w = r.showZoomControls,
|
|
37
37
|
showStyleSwitcher: y = r.showStyleSwitcher,
|
|
38
38
|
minZoom: S = r.minZoom,
|
|
39
39
|
maxZoom: k = r.maxZoom,
|
|
@@ -43,26 +43,26 @@ const X = ({
|
|
|
43
43
|
const {
|
|
44
44
|
mapRef: O,
|
|
45
45
|
initialViewState: I,
|
|
46
|
-
currentVariant:
|
|
46
|
+
currentVariant: z,
|
|
47
47
|
activeLocation: p,
|
|
48
|
-
openPopoverId:
|
|
49
|
-
setOpenPopoverId:
|
|
50
|
-
mapStyle:
|
|
51
|
-
containerStyle:
|
|
52
|
-
handleZoomIn:
|
|
53
|
-
handleZoomOut:
|
|
54
|
-
handleStyleChange:
|
|
48
|
+
openPopoverId: A,
|
|
49
|
+
setOpenPopoverId: E,
|
|
50
|
+
mapStyle: P,
|
|
51
|
+
containerStyle: j,
|
|
52
|
+
handleZoomIn: F,
|
|
53
|
+
handleZoomOut: L,
|
|
54
|
+
handleStyleChange: N,
|
|
55
55
|
handlePinHover: i,
|
|
56
|
-
handlePinClickWrapper:
|
|
57
|
-
handleMove:
|
|
58
|
-
} = $({ locations:
|
|
59
|
-
return Z ? /* @__PURE__ */ o(J, { width: a, height:
|
|
56
|
+
handlePinClickWrapper: u,
|
|
57
|
+
handleMove: T
|
|
58
|
+
} = $({ locations: m, width: a, height: l, ..._ });
|
|
59
|
+
return Z ? /* @__PURE__ */ o(J, { width: a, height: l, className: d }) : /* @__PURE__ */ g(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
|
-
style:
|
|
62
|
+
style: j,
|
|
63
63
|
className: Q(
|
|
64
|
-
"relative rounded-xl overflow-hidden
|
|
65
|
-
|
|
64
|
+
"relative rounded-xl overflow-hidden border border-stroke-solid-light [&_.mapboxgl-ctrl-bottom-right]:!z-0 [&_.mapboxgl-ctrl-bottom-left]:!z-0",
|
|
65
|
+
d
|
|
66
66
|
),
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ o(
|
|
@@ -72,16 +72,16 @@ const X = ({
|
|
|
72
72
|
mapboxAccessToken: M,
|
|
73
73
|
initialViewState: I,
|
|
74
74
|
style: { width: "100%", height: "100%" },
|
|
75
|
-
mapStyle:
|
|
76
|
-
interactive:
|
|
77
|
-
dragPan:
|
|
75
|
+
mapStyle: P,
|
|
76
|
+
interactive: b,
|
|
77
|
+
dragPan: c,
|
|
78
78
|
scrollZoom: x,
|
|
79
79
|
minZoom: S,
|
|
80
80
|
maxZoom: k,
|
|
81
|
-
onMove:
|
|
81
|
+
onMove: T,
|
|
82
82
|
projection: { name: "mercator" },
|
|
83
|
-
cursor:
|
|
84
|
-
children:
|
|
83
|
+
cursor: c ? void 0 : "default",
|
|
84
|
+
children: m.map((e) => {
|
|
85
85
|
const f = (p == null ? void 0 : p.id) === e.id;
|
|
86
86
|
return /* @__PURE__ */ o(
|
|
87
87
|
H,
|
|
@@ -92,30 +92,30 @@ const X = ({
|
|
|
92
92
|
children: C ? /* @__PURE__ */ o(V, { children: t ? t(e) : /* @__PURE__ */ o(
|
|
93
93
|
v,
|
|
94
94
|
{
|
|
95
|
-
variant:
|
|
95
|
+
variant: s,
|
|
96
96
|
size: h,
|
|
97
97
|
icon: e.icon,
|
|
98
98
|
active: f,
|
|
99
|
-
onClick: () =>
|
|
99
|
+
onClick: () => u(e),
|
|
100
100
|
onMouseEnter: () => i(e),
|
|
101
101
|
onMouseLeave: () => i(null)
|
|
102
102
|
}
|
|
103
103
|
) }) : /* @__PURE__ */ g(
|
|
104
104
|
R,
|
|
105
105
|
{
|
|
106
|
-
open:
|
|
106
|
+
open: A === e.id,
|
|
107
107
|
onOpenChange: (D) => {
|
|
108
|
-
|
|
108
|
+
E(D ? e.id : null);
|
|
109
109
|
},
|
|
110
110
|
children: [
|
|
111
111
|
/* @__PURE__ */ o(U, { asChild: !0, children: /* @__PURE__ */ o("div", { children: t ? t(e) : /* @__PURE__ */ o(
|
|
112
112
|
v,
|
|
113
113
|
{
|
|
114
|
-
variant:
|
|
114
|
+
variant: s,
|
|
115
115
|
size: h,
|
|
116
116
|
icon: e.icon,
|
|
117
117
|
active: f,
|
|
118
|
-
onClick: () =>
|
|
118
|
+
onClick: () => u(e),
|
|
119
119
|
onMouseEnter: () => i(e),
|
|
120
120
|
onMouseLeave: () => i(null)
|
|
121
121
|
}
|
|
@@ -127,7 +127,7 @@ const X = ({
|
|
|
127
127
|
align: "center",
|
|
128
128
|
className: "w-auto max-w-sm p-3 bg-white/98 backdrop-blur-md shadow-[0_8px_32px_rgba(0,0,0,0.12)] border-stroke-solid-light",
|
|
129
129
|
sideOffset: 8,
|
|
130
|
-
children: /* @__PURE__ */ o(q, { location: e, customContent:
|
|
130
|
+
children: /* @__PURE__ */ o(q, { location: e, customContent: n == null ? void 0 : n(e) })
|
|
131
131
|
}
|
|
132
132
|
)
|
|
133
133
|
]
|
|
@@ -142,15 +142,15 @@ const X = ({
|
|
|
142
142
|
/* @__PURE__ */ o(
|
|
143
143
|
B,
|
|
144
144
|
{
|
|
145
|
-
showZoomControls:
|
|
146
|
-
onZoomIn:
|
|
147
|
-
onZoomOut:
|
|
145
|
+
showZoomControls: w,
|
|
146
|
+
onZoomIn: F,
|
|
147
|
+
onZoomOut: L,
|
|
148
148
|
showStyleSwitcher: y,
|
|
149
|
-
activeStyle:
|
|
150
|
-
onStyleChange:
|
|
149
|
+
activeStyle: z,
|
|
150
|
+
onStyleChange: N
|
|
151
151
|
}
|
|
152
152
|
),
|
|
153
|
-
|
|
153
|
+
m.length === 0 && /* @__PURE__ */ o(K, {})
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
156
|
);
|