@ztwoint/z-ui 0.1.121 → 0.1.123

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.
Files changed (92) hide show
  1. package/dist/components/chart-card/builders/bar-chart-builder.d.ts +1 -1
  2. package/dist/components/chart-card/builders/bar-chart-builder.js +78 -31
  3. package/dist/components/chart-card/builders/chart-builder-factory.d.ts +1 -1
  4. package/dist/components/chart-card/builders/chart-builder-factory.js +15 -15
  5. package/dist/components/chart-card/builders/line-chart-builder.d.ts +1 -1
  6. package/dist/components/chart-card/builders/line-chart-builder.js +85 -38
  7. package/dist/components/chart-card/builders/pie-chart-builder.d.ts +1 -1
  8. package/dist/components/chart-card/builders/pie-chart-builder.js +37 -34
  9. package/dist/components/chart-card/chart-card.config.types.d.ts +27 -0
  10. package/dist/components/chart-card/chart-card.d.ts +1 -1
  11. package/dist/components/chart-card/chart-card.js +25 -23
  12. package/dist/components/chart-card/chart-card.types.d.ts +2 -0
  13. package/dist/components/chart-card/config/defaults.d.ts +28 -0
  14. package/dist/components/chart-card/config/defaults.js +105 -88
  15. package/dist/components/table/components/cell/avatar-cell.js +13 -6
  16. package/dist/components/table/table-provider.js +7 -0
  17. package/dist/components/table-card/table-card.js +52 -45
  18. package/dist/components/z2map/components/index.d.ts +5 -0
  19. package/dist/components/z2map/components/map-controls.d.ts +12 -0
  20. package/dist/components/z2map/components/map-controls.js +29 -0
  21. package/dist/components/z2map/components/map-empty-state.d.ts +2 -0
  22. package/dist/components/z2map/components/map-empty-state.js +10 -0
  23. package/dist/components/z2map/components/map-loading-state.d.ts +8 -0
  24. package/dist/components/z2map/components/map-loading-state.js +45 -0
  25. package/dist/components/z2map/components/map-pin-content.d.ts +8 -0
  26. package/dist/components/z2map/components/map-pin-content.js +27 -0
  27. package/dist/components/z2map/components/map-pin.d.ts +19 -0
  28. package/dist/components/z2map/components/map-pin.js +116 -0
  29. package/dist/components/z2map/components/map-style-control.d.ts +8 -0
  30. package/dist/components/z2map/components/map-style-control.js +45 -0
  31. package/dist/components/z2map/components/map-zoom-control.d.ts +8 -0
  32. package/dist/components/z2map/components/map-zoom-control.js +49 -0
  33. package/dist/components/z2map/index.d.ts +9 -0
  34. package/dist/components/z2map/map.constants.d.ts +47 -0
  35. package/dist/components/z2map/map.constants.js +40 -0
  36. package/dist/components/z2map/map.d.ts +4 -0
  37. package/dist/components/z2map/map.hook.d.ts +33 -0
  38. package/dist/components/z2map/map.hook.js +99 -0
  39. package/dist/components/z2map/map.js +161 -0
  40. package/dist/components/z2map/map.type.d.ts +45 -0
  41. package/dist/components/z2map/map.utils.d.ts +10 -0
  42. package/dist/components/z2map/map.utils.js +37 -0
  43. package/dist/css/node_modules/mapbox-gl/dist/mapbox-gl.css +1 -0
  44. package/dist/css/styles/tailwind.css +1 -1
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +128 -112
  47. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/attribution-control.js +12 -0
  48. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/fullscreen-control.js +12 -0
  49. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/geolocate-control.js +30 -0
  50. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/map.js +54 -0
  51. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/marker.js +56 -0
  52. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/navigation-control.js +12 -0
  53. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/popup.js +35 -0
  54. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/scale-control.js +14 -0
  55. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/use-control.js +14 -0
  56. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/use-map.js +6 -0
  57. package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/create-ref.js +77 -0
  58. package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/mapbox.js +315 -0
  59. package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/proxy-transform.js +35 -0
  60. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/apply-react-style.js +13 -0
  61. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/compare-class-names.js +16 -0
  62. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/deep-equal.js +33 -0
  63. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/set-globals.js +18 -0
  64. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/style-utils.js +25 -0
  65. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/transform.js +40 -0
  66. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/use-isomorphic-layout-effect.js +5 -0
  67. package/dist/routes/map.d.ts +2 -0
  68. package/dist/types/components/chart-card/builders/bar-chart-builder.d.ts +1 -1
  69. package/dist/types/components/chart-card/builders/chart-builder-factory.d.ts +1 -1
  70. package/dist/types/components/chart-card/builders/line-chart-builder.d.ts +1 -1
  71. package/dist/types/components/chart-card/builders/pie-chart-builder.d.ts +1 -1
  72. package/dist/types/components/chart-card/chart-card.config.types.d.ts +27 -0
  73. package/dist/types/components/chart-card/chart-card.d.ts +1 -1
  74. package/dist/types/components/chart-card/chart-card.types.d.ts +2 -0
  75. package/dist/types/components/chart-card/config/defaults.d.ts +28 -0
  76. package/dist/types/components/z2map/components/index.d.ts +5 -0
  77. package/dist/types/components/z2map/components/map-controls.d.ts +12 -0
  78. package/dist/types/components/z2map/components/map-empty-state.d.ts +2 -0
  79. package/dist/types/components/z2map/components/map-loading-state.d.ts +8 -0
  80. package/dist/types/components/z2map/components/map-pin-content.d.ts +8 -0
  81. package/dist/types/components/z2map/components/map-pin.d.ts +19 -0
  82. package/dist/types/components/z2map/components/map-style-control.d.ts +8 -0
  83. package/dist/types/components/z2map/components/map-zoom-control.d.ts +8 -0
  84. package/dist/types/components/z2map/index.d.ts +9 -0
  85. package/dist/types/components/z2map/map.constants.d.ts +47 -0
  86. package/dist/types/components/z2map/map.d.ts +5 -0
  87. package/dist/types/components/z2map/map.hook.d.ts +33 -0
  88. package/dist/types/components/z2map/map.type.d.ts +45 -0
  89. package/dist/types/components/z2map/map.utils.d.ts +10 -0
  90. package/dist/types/index.d.ts +1 -0
  91. package/dist/types/routes/map.d.ts +2 -0
  92. package/package.json +6 -2
@@ -1,156 +1,173 @@
1
- import { UI_COLORS as m } from "./colors.js";
2
- const g = "Inter Variable, sans-serif", c = {
3
- fontFamily: g,
4
- color: m.text.primary
1
+ import { UI_COLORS as c } from "./colors.js";
2
+ const S = "Inter Variable, sans-serif", d = {
3
+ fontFamily: S,
4
+ color: c.text.primary
5
5
  };
6
- function y(e, l) {
7
- if ((l == null ? void 0 : l.show) === !1)
6
+ function T(a, r) {
7
+ if ((r == null ? void 0 : r.show) === !1)
8
8
  return;
9
- const r = (l == null ? void 0 : l.position) ?? "left", a = (l == null ? void 0 : l.fontSize) ?? 16, f = (l == null ? void 0 : l.color) ?? m.text.primary;
9
+ const e = (r == null ? void 0 : r.position) ?? "left", l = (r == null ? void 0 : r.fontSize) ?? 16, f = (r == null ? void 0 : r.color) ?? c.text.primary;
10
10
  return {
11
- text: e,
11
+ text: a,
12
12
  textStyle: {
13
- fontFamily: g,
14
- fontSize: a,
13
+ fontFamily: S,
14
+ fontSize: l,
15
15
  fontWeight: 500,
16
16
  color: f
17
17
  },
18
- left: r,
18
+ left: e,
19
19
  top: 12,
20
20
  padding: [0, 0, 8, 0]
21
21
  };
22
22
  }
23
- function C(e) {
24
- return (e == null ? void 0 : e.show) === !1 ? void 0 : {
25
- trigger: (e == null ? void 0 : e.trigger) ?? "axis",
26
- backgroundColor: m.background.default,
27
- borderColor: m.border.default,
23
+ function z(a) {
24
+ return (a == null ? void 0 : a.show) === !1 ? void 0 : {
25
+ trigger: (a == null ? void 0 : a.trigger) ?? "axis",
26
+ backgroundColor: c.background.default,
27
+ borderColor: c.border.default,
28
28
  borderWidth: 1,
29
29
  textStyle: {
30
- ...c
30
+ ...d
31
31
  }
32
32
  };
33
33
  }
34
- function v(e, l = !1, r) {
35
- if ((r == null ? void 0 : r.show) === !1)
34
+ function F(a, r = !1, e) {
35
+ var y, h;
36
+ if ((e == null ? void 0 : e.show) === !1)
36
37
  return;
37
- const a = (r == null ? void 0 : r.position) ?? "top", f = (r == null ? void 0 : r.orient) ?? "horizontal";
38
- let u = l ? 48 : 16, t, d = "center", b;
39
- return a === "bottom" ? (u = "auto", t = 10) : a === "left" ? (u = "middle", d = 10) : a === "right" && (u = "middle", d = "auto", b = 10), {
40
- data: e,
38
+ const l = (e == null ? void 0 : e.position) ?? "top", f = (e == null ? void 0 : e.orient) ?? "horizontal", m = (e == null ? void 0 : e.scrollable) ?? !1;
39
+ let u = r ? 48 : 16, g, b = "center", x;
40
+ l === "bottom" ? (u = "auto", g = 10) : l === "left" ? (u = "middle", b = 10) : l === "right" && (u = "middle", b = "auto", x = 10);
41
+ const t = {
42
+ data: a,
41
43
  top: u,
42
- bottom: t,
43
- left: d,
44
- right: b,
44
+ bottom: g,
45
+ left: b,
46
+ right: x,
45
47
  orient: f,
46
48
  itemGap: 20,
47
49
  padding: [8, 0, 12, 0],
48
50
  textStyle: {
49
- ...c,
51
+ ...d,
50
52
  fontSize: 12
51
53
  },
52
54
  itemWidth: 25,
53
55
  itemHeight: 14
54
56
  };
57
+ return m ? {
58
+ ...t,
59
+ type: "scroll",
60
+ pageButtonItemGap: (e == null ? void 0 : e.pageButtonItemGap) ?? 5,
61
+ pageButtonGap: (e == null ? void 0 : e.pageButtonGap) ?? 10,
62
+ pageButtonPosition: (e == null ? void 0 : e.pageButtonPosition) ?? "end",
63
+ pageFormatter: (e == null ? void 0 : e.pageFormatter) ?? "{current}/{total}",
64
+ pageIconColor: (e == null ? void 0 : e.pageIconColor) ?? "#2f4554",
65
+ pageIconInactiveColor: (e == null ? void 0 : e.pageIconInactiveColor) ?? "#aaa",
66
+ pageIconSize: (e == null ? void 0 : e.pageIconSize) ?? 12,
67
+ pageTextStyle: {
68
+ color: ((y = e == null ? void 0 : e.pageTextStyle) == null ? void 0 : y.color) ?? "#333",
69
+ fontSize: ((h = e == null ? void 0 : e.pageTextStyle) == null ? void 0 : h.fontSize) ?? 12
70
+ }
71
+ } : t;
55
72
  }
56
- function x(e) {
73
+ function L(a) {
57
74
  return {
58
- color: m.text.secondary,
59
- fontFamily: g,
75
+ color: c.text.secondary,
76
+ fontFamily: S,
60
77
  fontSize: 11,
61
- ...e && { rotate: e }
78
+ ...a && { rotate: a }
62
79
  };
63
80
  }
64
- function S(e = !0) {
81
+ function C(a = !0) {
65
82
  return {
66
- show: e,
83
+ show: a,
67
84
  lineStyle: {
68
- color: m.border.default
85
+ color: c.border.default
69
86
  }
70
87
  };
71
88
  }
72
- function h(e = !0) {
89
+ function I(a = !0) {
73
90
  return {
74
- show: e,
91
+ show: a,
75
92
  lineStyle: {
76
- color: m.border.light
93
+ color: c.border.light
77
94
  }
78
95
  };
79
96
  }
80
- function T(e, l = !1, r = "top", a) {
81
- if (a)
97
+ function w(a, r = !1, e = "top", l) {
98
+ if (l)
82
99
  return {
83
- left: a.left ?? "3%",
84
- right: a.right ?? "4%",
85
- bottom: a.bottom ?? "3%",
86
- top: a.top ?? 20,
100
+ left: l.left ?? "3%",
101
+ right: l.right ?? "4%",
102
+ bottom: l.bottom ?? "3%",
103
+ top: l.top ?? 20,
87
104
  containLabel: !0
88
105
  };
89
106
  let f = 20;
90
- e && (f += 48), l && r === "top" && (f += 40);
107
+ a && (f += 48), r && e === "top" && (f += 40);
108
+ let m = "3%";
109
+ r && e === "bottom" && (m = 60);
91
110
  let u = "3%";
92
- l && r === "bottom" && (u = 60);
93
- let t = "3%";
94
- l && r === "left" && (t = 100);
95
- let d = "4%";
96
- return l && r === "right" && (d = 100), {
97
- left: t,
98
- right: d,
99
- bottom: u,
111
+ r && e === "left" && (u = 100);
112
+ let g = "4%";
113
+ return r && e === "right" && (g = 100), {
114
+ left: u,
115
+ right: g,
116
+ bottom: m,
100
117
  top: f,
101
118
  containLabel: !0
102
119
  };
103
120
  }
104
- function w(e, l = !0, r) {
105
- return (r == null ? void 0 : r.show) === !1 ? { show: !1 } : {
121
+ function A(a, r = !0, e) {
122
+ return (e == null ? void 0 : e.show) === !1 ? { show: !1 } : {
106
123
  type: "category",
107
- data: e,
108
- boundaryGap: l,
109
- name: r == null ? void 0 : r.name,
110
- nameLocation: (r == null ? void 0 : r.nameLocation) ?? "middle",
111
- nameGap: r != null && r.name ? 30 : void 0,
112
- nameTextStyle: r != null && r.name ? {
113
- ...c,
124
+ data: a,
125
+ boundaryGap: r,
126
+ name: e == null ? void 0 : e.name,
127
+ nameLocation: (e == null ? void 0 : e.nameLocation) ?? "middle",
128
+ nameGap: e != null && e.name ? 30 : void 0,
129
+ nameTextStyle: e != null && e.name ? {
130
+ ...d,
114
131
  fontSize: 12,
115
132
  fontWeight: 500
116
133
  } : void 0,
117
- axisLine: S(),
118
- axisLabel: x(r == null ? void 0 : r.labelRotate),
119
- splitLine: h((r == null ? void 0 : r.gridLines) ?? !1)
134
+ axisLine: C(),
135
+ axisLabel: L(e == null ? void 0 : e.labelRotate),
136
+ splitLine: I((e == null ? void 0 : e.gridLines) ?? !1)
120
137
  };
121
138
  }
122
- function z(e) {
123
- if ((e == null ? void 0 : e.show) === !1)
139
+ function B(a) {
140
+ if ((a == null ? void 0 : a.show) === !1)
124
141
  return { show: !1 };
125
- const l = (e == null ? void 0 : e.min) === "auto" || e == null ? void 0 : e.min, r = (e == null ? void 0 : e.max) === "auto" || e == null ? void 0 : e.max;
142
+ const r = (a == null ? void 0 : a.min) === "auto" || a == null ? void 0 : a.min, e = (a == null ? void 0 : a.max) === "auto" || a == null ? void 0 : a.max;
126
143
  return {
127
144
  type: "value",
128
- name: e == null ? void 0 : e.name,
129
- nameLocation: (e == null ? void 0 : e.nameLocation) ?? "middle",
130
- nameGap: e != null && e.name ? 50 : void 0,
145
+ name: a == null ? void 0 : a.name,
146
+ nameLocation: (a == null ? void 0 : a.nameLocation) ?? "middle",
147
+ nameGap: a != null && a.name ? 50 : void 0,
131
148
  nameRotate: 90,
132
- nameTextStyle: e != null && e.name ? {
133
- ...c,
149
+ nameTextStyle: a != null && a.name ? {
150
+ ...d,
134
151
  fontSize: 12,
135
152
  fontWeight: 500
136
153
  } : void 0,
137
- min: l,
138
- max: r,
139
- axisLine: S(!1),
140
- axisLabel: x(),
141
- splitLine: h((e == null ? void 0 : e.gridLines) ?? !0)
154
+ min: r,
155
+ max: e,
156
+ axisLine: C(!1),
157
+ axisLabel: L(),
158
+ splitLine: I((a == null ? void 0 : a.gridLines) ?? !0)
142
159
  };
143
160
  }
144
161
  export {
145
- c as COMMON_TEXT_STYLE,
146
- g as DEFAULT_FONT_FAMILY,
147
- x as buildAxisLabelConfig,
148
- S as buildAxisLineConfig,
149
- T as buildGridConfig,
150
- v as buildLegendConfig,
151
- h as buildSplitLineConfig,
152
- y as buildTitleConfig,
153
- C as buildTooltipConfig,
154
- w as buildXAxisConfig,
155
- z as buildYAxisConfig
162
+ d as COMMON_TEXT_STYLE,
163
+ S as DEFAULT_FONT_FAMILY,
164
+ L as buildAxisLabelConfig,
165
+ C as buildAxisLineConfig,
166
+ w as buildGridConfig,
167
+ F as buildLegendConfig,
168
+ I as buildSplitLineConfig,
169
+ T as buildTitleConfig,
170
+ z as buildTooltipConfig,
171
+ A as buildXAxisConfig,
172
+ B as buildYAxisConfig
156
173
  };
@@ -47,13 +47,20 @@ import "../../../dynamic-table/z2-table-context.js";
47
47
  import "../../../chart/chart.js";
48
48
  import "../../../chart-card/config/defaults.js";
49
49
  import "../../../chart-card/config/colors.js";
50
- const pt = ({
50
+ import "../../../z2map/map.js";
51
+ import "../../../z2map/map.constants.js";
52
+ import "../../../z2map/components/map-pin.js";
53
+ import "../../../z2map/components/map-pin-content.js";
54
+ import "../../../z2map/components/map-controls.js";
55
+ import "../../../z2map/components/map-zoom-control.js";
56
+ import "../../../z2map/components/map-style-control.js";
57
+ const xt = ({
51
58
  avatar: m,
52
59
  value: a,
53
60
  rightIcon: o,
54
61
  className: s,
55
- helperText: e,
56
- description: p
62
+ helperText: p,
63
+ description: e
57
64
  }) => /* @__PURE__ */ i(
58
65
  "div",
59
66
  {
@@ -74,16 +81,16 @@ const pt = ({
74
81
  a
75
82
  ] }),
76
83
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2.5", children: [
77
- e && /* @__PURE__ */ t("span", { className: "text-text-neutral-secondary", children: e }),
84
+ p && /* @__PURE__ */ t("span", { className: "text-text-neutral-secondary", children: p }),
78
85
  o && /* @__PURE__ */ t("span", { className: r("min-h-max min-w-max"), children: o })
79
86
  ] })
80
87
  ]
81
88
  }
82
89
  ),
83
- p && /* @__PURE__ */ t("div", { className: "text-text-neutral-secondary w-full", children: p })
90
+ e && /* @__PURE__ */ t("div", { className: "text-text-neutral-secondary w-full", children: e })
84
91
  ]
85
92
  }
86
93
  );
87
94
  export {
88
- pt as AvatarCell
95
+ xt as AvatarCell
89
96
  };
@@ -52,6 +52,13 @@ import "../dynamic-table/z2-table-context.js";
52
52
  import "../chart/chart.js";
53
53
  import "../chart-card/config/defaults.js";
54
54
  import "../chart-card/config/colors.js";
55
+ import "../z2map/map.js";
56
+ import "../z2map/map.constants.js";
57
+ import "../z2map/components/map-pin.js";
58
+ import "../z2map/components/map-pin-content.js";
59
+ import "../z2map/components/map-controls.js";
60
+ import "../z2map/components/map-zoom-control.js";
61
+ import "../z2map/components/map-style-control.js";
55
62
  import { TableHeaderWrapper as T } from "./components/table-header-wrapper.js";
56
63
  import { TableHeaderContent as b } from "./components/table-header-content.js";
57
64
  import { TableFooter as s } from "./components/table-footer.js";
@@ -1,4 +1,4 @@
1
- import { jsx as e, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
2
  import { Table as r } from "../table/table-provider.js";
3
3
  import "react";
4
4
  import { cn as d } from "../../lib/utils.js";
@@ -47,8 +47,15 @@ import "../dynamic-table/z2-table-context.js";
47
47
  import "../chart/chart.js";
48
48
  import "../chart-card/config/defaults.js";
49
49
  import "../chart-card/config/colors.js";
50
+ import "../z2map/map.js";
51
+ import "../z2map/map.constants.js";
52
+ import "../z2map/components/map-pin.js";
53
+ import "../z2map/components/map-pin-content.js";
54
+ import "../z2map/components/map-controls.js";
55
+ import "../z2map/components/map-zoom-control.js";
56
+ import "../z2map/components/map-style-control.js";
50
57
  import "../table/table.context.js";
51
- const _e = ({
58
+ const zt = ({
52
59
  dataSource: w,
53
60
  schema: B,
54
61
  loading: b,
@@ -58,8 +65,8 @@ const _e = ({
58
65
  bordered: n = !0,
59
66
  showHeader: g = !0,
60
67
  headerClassName: j,
61
- search: m,
62
- filter: t,
68
+ search: a,
69
+ filter: e,
63
70
  headerLeftContent: h,
64
71
  headerActions: p,
65
72
  body: l = {
@@ -71,24 +78,24 @@ const _e = ({
71
78
  footerClassName: T,
72
79
  pagination: o,
73
80
  paginationInfo: i,
74
- paginationQuickJumper: a,
81
+ paginationQuickJumper: s,
75
82
  error: u = !1,
76
83
  dataSourceError: _ = !1
77
84
  }) => {
78
85
  var F;
79
86
  if (u)
80
- return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-64 bg-background-error-subtle rounded-lg text-text-warning-secondary", children: /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
81
- /* @__PURE__ */ e(S, { className: "mt-1.5" }),
82
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
83
- /* @__PURE__ */ e("div", { className: "text-text-error-primary text-lg font-medium", children: "Error loading data" }),
84
- /* @__PURE__ */ e("div", { className: "text-sm", children: "Please try again later" }),
85
- typeof u == "string" && /* @__PURE__ */ e("div", { className: "text-text-warning-secondary text-sm", children: u })
87
+ return /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center h-64 bg-background-error-subtle rounded-lg text-text-warning-secondary", children: /* @__PURE__ */ m("div", { className: "flex gap-2", children: [
88
+ /* @__PURE__ */ t(S, { className: "mt-1.5" }),
89
+ /* @__PURE__ */ m("div", { className: "flex flex-col gap-2", children: [
90
+ /* @__PURE__ */ t("div", { className: "text-text-error-primary text-lg font-medium", children: "Error loading data" }),
91
+ /* @__PURE__ */ t("div", { className: "text-sm", children: "Please try again later" }),
92
+ typeof u == "string" && /* @__PURE__ */ t("div", { className: "text-text-warning-secondary text-sm", children: u })
86
93
  ] })
87
94
  ] }) });
88
- const C = a && a.totalPage && a.totalPage >= 2, N = o && o.totalPage && o.totalPage >= 2 || !!i || C, v = m || t || h || p, R = typeof (t == null ? void 0 : t.showFilterButton) > "u" ? !0 : t == null ? void 0 : t.showFilterButton;
89
- return /* @__PURE__ */ s("div", { className: d("flex flex-col overflow-hidden relative", H), children: [
90
- /* @__PURE__ */ s(r, { dataSource: w, schema: B, emptyMessage: k, children: [
91
- g && v && /* @__PURE__ */ s(
95
+ const C = s && s.totalPage && s.totalPage >= 2, N = o && o.totalPage && o.totalPage >= 2 || !!i || C, v = a || e || h || p, R = typeof (e == null ? void 0 : e.showFilterButton) > "u" ? !0 : e == null ? void 0 : e.showFilterButton;
96
+ return /* @__PURE__ */ m("div", { className: d("flex flex-col overflow-hidden relative", H), children: [
97
+ /* @__PURE__ */ m(r, { dataSource: w, schema: B, emptyMessage: k, children: [
98
+ g && v && /* @__PURE__ */ m(
92
99
  r.Header,
93
100
  {
94
101
  className: d(
@@ -98,43 +105,43 @@ const _e = ({
98
105
  j
99
106
  ),
100
107
  children: [
101
- /* @__PURE__ */ s(r.HeaderContent, { children: [
108
+ /* @__PURE__ */ m(r.HeaderContent, { children: [
102
109
  h && h,
103
- m && /* @__PURE__ */ e(
110
+ a && /* @__PURE__ */ t(
104
111
  r.Search,
105
112
  {
106
113
  search: {
107
- value: m.value || "",
108
- onChange: m.onChange || (() => {
114
+ value: a.value || "",
115
+ onChange: a.onChange || (() => {
109
116
  }),
110
- placeholder: m.placeholder
117
+ placeholder: a.placeholder
111
118
  },
112
- className: m.className
119
+ className: a.className
113
120
  }
114
121
  ),
115
- t && /* @__PURE__ */ s(
122
+ e && /* @__PURE__ */ m(
116
123
  x,
117
124
  {
118
- filterSchema: t.filterSchema,
125
+ filterSchema: e.filterSchema,
119
126
  filter: {
120
- value: t.value || [],
121
- onChange: t.onChange || (() => {
127
+ value: e.value || [],
128
+ onChange: e.onChange || (() => {
122
129
  }),
123
- onFilterClick: t.onFilterClick,
124
- loading: t.loading
130
+ onFilterClick: e.onFilterClick,
131
+ loading: e.loading
125
132
  },
126
133
  children: [
127
- R && /* @__PURE__ */ e(x.FilterButton, {}),
128
- (F = t == null ? void 0 : t.quickFilters) == null ? void 0 : F.map((f) => /* @__PURE__ */ e(x.FilterColumnButton, { filterName: f }, f))
134
+ R && /* @__PURE__ */ t(x.FilterButton, {}),
135
+ (F = e == null ? void 0 : e.quickFilters) == null ? void 0 : F.map((f) => /* @__PURE__ */ t(x.FilterColumnButton, { filterName: f }, f))
129
136
  ]
130
137
  }
131
138
  )
132
139
  ] }),
133
- p && /* @__PURE__ */ e(r.HeaderContent, { children: p })
140
+ p && /* @__PURE__ */ t(r.HeaderContent, { children: p })
134
141
  ]
135
142
  }
136
143
  ),
137
- /* @__PURE__ */ e(
144
+ /* @__PURE__ */ t(
138
145
  r.Body,
139
146
  {
140
147
  dataSourceError: _,
@@ -152,7 +159,7 @@ const _e = ({
152
159
  stickyHeader: l == null ? void 0 : l.stickyHeader
153
160
  }
154
161
  ),
155
- P && N && /* @__PURE__ */ s(
162
+ P && N && /* @__PURE__ */ m(
156
163
  r.Footer,
157
164
  {
158
165
  className: d(
@@ -162,7 +169,7 @@ const _e = ({
162
169
  T
163
170
  ),
164
171
  children: [
165
- i ? /* @__PURE__ */ e(r.FooterContent, { children: /* @__PURE__ */ e(
172
+ i ? /* @__PURE__ */ t(r.FooterContent, { children: /* @__PURE__ */ t(
166
173
  r.PaginationInfo,
167
174
  {
168
175
  showTotal: i.showTotal,
@@ -170,19 +177,19 @@ const _e = ({
170
177
  currentPage: i.currentPage,
171
178
  itemsPerPage: i.itemsPerPage
172
179
  }
173
- ) }) : a || o ? /* @__PURE__ */ e(r.FooterContent, { children: null }) : null,
174
- (a || o) && /* @__PURE__ */ s(r.FooterContent, { children: [
175
- C && /* @__PURE__ */ e(
180
+ ) }) : s || o ? /* @__PURE__ */ t(r.FooterContent, { children: null }) : null,
181
+ (s || o) && /* @__PURE__ */ m(r.FooterContent, { children: [
182
+ C && /* @__PURE__ */ t(
176
183
  r.PaginationQuickJumper,
177
184
  {
178
- currentPage: a.currentPage,
179
- totalPage: a.totalPage,
180
- onChange: a.onChange || (() => {
185
+ currentPage: s.currentPage,
186
+ totalPage: s.totalPage,
187
+ onChange: s.onChange || (() => {
181
188
  }),
182
- disabled: a.disabled
189
+ disabled: s.disabled
183
190
  }
184
191
  ),
185
- o && /* @__PURE__ */ e(
192
+ o && /* @__PURE__ */ t(
186
193
  r.Pagination,
187
194
  {
188
195
  currentPage: o.currentPage,
@@ -197,12 +204,12 @@ const _e = ({
197
204
  }
198
205
  )
199
206
  ] }),
200
- b && /* @__PURE__ */ e("div", { className: "absolute top-0 inset-0 w-full h-full bg-white/80 flex items-center justify-center", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-3", children: [
201
- /* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-text-brand-secondary" }),
202
- /* @__PURE__ */ e("p", { className: "text-text-neutral-primary font-medium", children: "Loading..." })
207
+ b && /* @__PURE__ */ t("div", { className: "absolute top-0 inset-0 w-full h-full bg-white/80 flex items-center justify-center", children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-3", children: [
208
+ /* @__PURE__ */ t("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-text-brand-secondary" }),
209
+ /* @__PURE__ */ t("p", { className: "text-text-neutral-primary font-medium", children: "Loading..." })
203
210
  ] }) })
204
211
  ] });
205
212
  };
206
213
  export {
207
- _e as default
214
+ zt as default
208
215
  };
@@ -0,0 +1,5 @@
1
+ export { MapControls } from './map-controls';
2
+ export { MapPinComponent } from './map-pin';
3
+ export { MapPinContent } from './map-pin-content';
4
+ export { MapLoadingState } from './map-loading-state';
5
+ export { MapEmptyState } from './map-empty-state';
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { MapVariant } from '../map.constants';
3
+ export interface MapControlsProps {
4
+ showZoomControls?: boolean;
5
+ onZoomIn?: () => void;
6
+ onZoomOut?: () => void;
7
+ showStyleSwitcher?: boolean;
8
+ activeStyle?: MapVariant;
9
+ onStyleChange?: (style: MapVariant) => void;
10
+ className?: string;
11
+ }
12
+ export declare const MapControls: FC<MapControlsProps>;
@@ -0,0 +1,29 @@
1
+ import { jsxs as m, Fragment as p, jsx as r } from "react/jsx-runtime";
2
+ import { MapZoomControl as d } from "./map-zoom-control.js";
3
+ import { MapStyleControl as c } from "./map-style-control.js";
4
+ import { cn as s } from "../../../lib/utils.js";
5
+ const f = ({
6
+ showZoomControls: n = !0,
7
+ onZoomIn: o,
8
+ onZoomOut: t,
9
+ showStyleSwitcher: e = !1,
10
+ activeStyle: a,
11
+ onStyleChange: i,
12
+ className: l
13
+ }) => /* @__PURE__ */ m(p, { children: [
14
+ n && o && t && /* @__PURE__ */ r(
15
+ "div",
16
+ {
17
+ className: s(
18
+ "absolute bottom-6 right-6 z-10 transition-all duration-300 hover:scale-105",
19
+ l
20
+ ),
21
+ children: /* @__PURE__ */ r(d, { onZoomIn: o, onZoomOut: t })
22
+ }
23
+ ),
24
+ e && a && i && /* @__PURE__ */ r("div", { className: s("absolute top-6 right-6 z-10 transition-all duration-300", l), children: /* @__PURE__ */ r(c, { activeStyle: a, onStyleChange: i }) })
25
+ ] });
26
+ f.displayName = "MapControls";
27
+ export {
28
+ f as MapControls
29
+ };
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const MapEmptyState: FC;
@@ -0,0 +1,10 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
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-20", 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
+ /* @__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
+ /* @__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
+ ] }) }) });
7
+ s.displayName = "MapEmptyState";
8
+ export {
9
+ s as MapEmptyState
10
+ };
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ interface MapLoadingStateProps {
3
+ width: string | number;
4
+ height: string | number;
5
+ className?: string;
6
+ }
7
+ export declare const MapLoadingState: FC<MapLoadingStateProps>;
8
+ export {};
@@ -0,0 +1,45 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { Loader2 as i } from "lucide-react";
3
+ import { cn as s } from "../../../lib/utils.js";
4
+ const c = ({ width: r, height: t, className: l }) => {
5
+ const n = {
6
+ width: typeof r == "number" ? `${r}px` : r,
7
+ height: typeof t == "number" ? `${t}px` : t
8
+ };
9
+ return /* @__PURE__ */ a(
10
+ "div",
11
+ {
12
+ style: n,
13
+ className: s(
14
+ "relative bg-gradient-to-br from-surface-neutral-default to-surface-neutral-hover rounded-xl border border-stroke-solid-light flex flex-col items-center justify-center gap-4 overflow-hidden",
15
+ l
16
+ ),
17
+ children: [
18
+ /* @__PURE__ */ e("div", { className: "absolute inset-0 opacity-[0.03]", children: /* @__PURE__ */ e(
19
+ "div",
20
+ {
21
+ className: "absolute inset-0",
22
+ style: {
23
+ backgroundImage: "radial-gradient(circle at 20px 20px, currentColor 1px, transparent 1px)",
24
+ backgroundSize: "40px 40px"
25
+ }
26
+ }
27
+ ) }),
28
+ /* @__PURE__ */ a("div", { className: "relative z-10 flex flex-col items-center gap-3", children: [
29
+ /* @__PURE__ */ a("div", { className: "relative", children: [
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
+ /* @__PURE__ */ e("div", { className: "absolute inset-0 rounded-full bg-accent-primary/20 animate-ping" })
32
+ ] }),
33
+ /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-1", children: [
34
+ /* @__PURE__ */ e("div", { className: "leading-none-medium-sm text-neutral-primary font-medium", children: "Loading map..." }),
35
+ /* @__PURE__ */ e("div", { className: "leading-none-regular-xs text-neutral-secondary", children: "Please wait" })
36
+ ] })
37
+ ] })
38
+ ]
39
+ }
40
+ );
41
+ };
42
+ c.displayName = "MapLoadingState";
43
+ export {
44
+ c as MapLoadingState
45
+ };
@@ -0,0 +1,8 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Location } from '../map.type';
3
+ export interface MapPinContentProps {
4
+ location: Location;
5
+ customContent?: ReactNode;
6
+ className?: string;
7
+ }
8
+ export declare const MapPinContent: FC<MapPinContentProps>;