@ztwoint/z-ui 0.1.122 → 0.1.124

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 (78) hide show
  1. package/dist/components/assets/icons/index.d.ts +2 -0
  2. package/dist/components/assets/icons/left-square-bracket.d.ts +6 -0
  3. package/dist/components/assets/icons/left-square-bracket.js +23 -0
  4. package/dist/components/assets/icons/right-square-bracket.d.ts +6 -0
  5. package/dist/components/assets/icons/right-square-bracket.js +23 -0
  6. package/dist/components/table/components/cell/avatar-cell.js +13 -6
  7. package/dist/components/table/table-provider.js +7 -0
  8. package/dist/components/table-card/table-card.js +52 -45
  9. package/dist/components/z2map/components/index.d.ts +5 -0
  10. package/dist/components/z2map/components/map-controls.d.ts +12 -0
  11. package/dist/components/z2map/components/map-controls.js +29 -0
  12. package/dist/components/z2map/components/map-empty-state.d.ts +2 -0
  13. package/dist/components/z2map/components/map-empty-state.js +10 -0
  14. package/dist/components/z2map/components/map-loading-state.d.ts +8 -0
  15. package/dist/components/z2map/components/map-loading-state.js +45 -0
  16. package/dist/components/z2map/components/map-pin-content.d.ts +8 -0
  17. package/dist/components/z2map/components/map-pin-content.js +27 -0
  18. package/dist/components/z2map/components/map-pin.d.ts +19 -0
  19. package/dist/components/z2map/components/map-pin.js +116 -0
  20. package/dist/components/z2map/components/map-style-control.d.ts +8 -0
  21. package/dist/components/z2map/components/map-style-control.js +45 -0
  22. package/dist/components/z2map/components/map-zoom-control.d.ts +8 -0
  23. package/dist/components/z2map/components/map-zoom-control.js +49 -0
  24. package/dist/components/z2map/index.d.ts +9 -0
  25. package/dist/components/z2map/map.constants.d.ts +47 -0
  26. package/dist/components/z2map/map.constants.js +40 -0
  27. package/dist/components/z2map/map.d.ts +4 -0
  28. package/dist/components/z2map/map.hook.d.ts +33 -0
  29. package/dist/components/z2map/map.hook.js +99 -0
  30. package/dist/components/z2map/map.js +161 -0
  31. package/dist/components/z2map/map.type.d.ts +45 -0
  32. package/dist/components/z2map/map.utils.d.ts +10 -0
  33. package/dist/components/z2map/map.utils.js +37 -0
  34. package/dist/css/node_modules/mapbox-gl/dist/mapbox-gl.css +1 -0
  35. package/dist/css/styles/tailwind.css +1 -1
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.js +221 -201
  38. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/attribution-control.js +12 -0
  39. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/fullscreen-control.js +12 -0
  40. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/geolocate-control.js +30 -0
  41. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/map.js +54 -0
  42. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/marker.js +56 -0
  43. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/navigation-control.js +12 -0
  44. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/popup.js +35 -0
  45. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/scale-control.js +14 -0
  46. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/use-control.js +14 -0
  47. package/dist/node_modules/@vis.gl/react-mapbox/dist/components/use-map.js +6 -0
  48. package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/create-ref.js +77 -0
  49. package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/mapbox.js +315 -0
  50. package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/proxy-transform.js +35 -0
  51. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/apply-react-style.js +13 -0
  52. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/compare-class-names.js +16 -0
  53. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/deep-equal.js +33 -0
  54. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/set-globals.js +18 -0
  55. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/style-utils.js +25 -0
  56. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/transform.js +40 -0
  57. package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/use-isomorphic-layout-effect.js +5 -0
  58. package/dist/routes/map.d.ts +2 -0
  59. package/dist/types/components/assets/icons/index.d.ts +2 -0
  60. package/dist/types/components/assets/icons/left-square-bracket.d.ts +6 -0
  61. package/dist/types/components/assets/icons/right-square-bracket.d.ts +6 -0
  62. package/dist/types/components/z2map/components/index.d.ts +5 -0
  63. package/dist/types/components/z2map/components/map-controls.d.ts +12 -0
  64. package/dist/types/components/z2map/components/map-empty-state.d.ts +2 -0
  65. package/dist/types/components/z2map/components/map-loading-state.d.ts +8 -0
  66. package/dist/types/components/z2map/components/map-pin-content.d.ts +8 -0
  67. package/dist/types/components/z2map/components/map-pin.d.ts +19 -0
  68. package/dist/types/components/z2map/components/map-style-control.d.ts +8 -0
  69. package/dist/types/components/z2map/components/map-zoom-control.d.ts +8 -0
  70. package/dist/types/components/z2map/index.d.ts +9 -0
  71. package/dist/types/components/z2map/map.constants.d.ts +47 -0
  72. package/dist/types/components/z2map/map.d.ts +5 -0
  73. package/dist/types/components/z2map/map.hook.d.ts +33 -0
  74. package/dist/types/components/z2map/map.type.d.ts +45 -0
  75. package/dist/types/components/z2map/map.utils.d.ts +10 -0
  76. package/dist/types/index.d.ts +1 -0
  77. package/dist/types/routes/map.d.ts +2 -0
  78. package/package.json +5 -1
@@ -42,3 +42,5 @@ export { default as FilterIcon } from './filter-icon';
42
42
  export { default as DescendingSortingIcon } from './descending';
43
43
  export { default as ChainIcon } from './chain';
44
44
  export { default as EraserIcon } from './eraser';
45
+ export { default as LeftSquareBracketIcon } from './left-square-bracket';
46
+ export { default as RightSquareBracketIcon } from './right-square-bracket';
@@ -0,0 +1,6 @@
1
+ import { SVGProps } from 'react';
2
+ type IconProps = SVGProps<SVGSVGElement> & {
3
+ title?: string;
4
+ };
5
+ declare function LeftSquareBracket({ fill, width, height, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
6
+ export default LeftSquareBracket;
@@ -0,0 +1,23 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ function a({
3
+ fill: r = "currentColor",
4
+ width: t = "1em",
5
+ height: n = "1em",
6
+ ...o
7
+ }) {
8
+ return /* @__PURE__ */ e(
9
+ "svg",
10
+ {
11
+ height: n,
12
+ id: "left-square-bracket",
13
+ width: t,
14
+ viewBox: "0 0 3 12",
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ ...o,
17
+ children: /* @__PURE__ */ e("g", { fill: "none", children: /* @__PURE__ */ e("path", { d: "M0 12V0H3V1.01448H1.2288V10.9808H3V12H0Z", fill: r }) })
18
+ }
19
+ );
20
+ }
21
+ export {
22
+ a as default
23
+ };
@@ -0,0 +1,6 @@
1
+ import { SVGProps } from 'react';
2
+ type IconProps = SVGProps<SVGSVGElement> & {
3
+ title?: string;
4
+ };
5
+ declare function RightSquareBracket({ fill, width, height, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
6
+ export default RightSquareBracket;
@@ -0,0 +1,23 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ function a({
3
+ fill: e = "currentColor",
4
+ width: t = "1em",
5
+ height: i = "1em",
6
+ ...n
7
+ }) {
8
+ return /* @__PURE__ */ r(
9
+ "svg",
10
+ {
11
+ height: i,
12
+ id: "right-square-bracket",
13
+ width: t,
14
+ viewBox: "0 0 3 12",
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ ...n,
17
+ children: /* @__PURE__ */ r("g", { fill: "none", children: /* @__PURE__ */ r("path", { d: "M3 0V12H0V10.9808H1.7712V1.01448H0V0H3Z", fill: e }) })
18
+ }
19
+ );
20
+ }
21
+ export {
22
+ a as default
23
+ };
@@ -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>;
@@ -0,0 +1,27 @@
1
+ import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
+ import { MapPin as d, MapPinned as m } from "lucide-react";
3
+ import { Badge as c } from "../../badge/badge.js";
4
+ import { cn as t } from "../../../lib/utils.js";
5
+ const p = ({ location: e, customContent: s, className: n }) => s ? /* @__PURE__ */ r("div", { className: t("min-w-0", n), children: s }) : /* @__PURE__ */ a("div", { className: t("flex flex-col gap-3 max-w-xs p-1", n), children: [
6
+ /* @__PURE__ */ a("div", { className: "flex items-start gap-2.5", children: [
7
+ /* @__PURE__ */ r("div", { className: "flex-shrink-0 w-8 h-8 rounded-full bg-surface-accent-default/10 flex items-center justify-center mt-0.5", children: /* @__PURE__ */ r(d, { size: 16, className: "text-accent-primary" }) }),
8
+ /* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
9
+ /* @__PURE__ */ r("h3", { className: "leading-none-medium-base text-neutral-primary font-semibold mb-1 break-words", children: e.title }),
10
+ e.name && e.name !== e.title && /* @__PURE__ */ r("p", { className: "leading-none-regular-xs text-neutral-secondary", children: e.name })
11
+ ] })
12
+ ] }),
13
+ e.description && /* @__PURE__ */ r("p", { className: "leading-none-regular-sm text-neutral-secondary leading-relaxed", children: e.description }),
14
+ e.specs && e.specs.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5", children: e.specs.map((i, l) => /* @__PURE__ */ r(c, { label: i, size: "sm", variant: "neutral" }, l)) }),
15
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 text-neutral-tertiary leading-none-regular-xs pt-2 border-t border-stroke-solid-light", children: [
16
+ /* @__PURE__ */ r(m, { size: 12, className: "text-neutral-tertiary" }),
17
+ /* @__PURE__ */ a("span", { className: "font-mono text-[10px]", children: [
18
+ e.coordinate.lat.toFixed(4),
19
+ ", ",
20
+ e.coordinate.lng.toFixed(4)
21
+ ] })
22
+ ] })
23
+ ] });
24
+ p.displayName = "MapPinContent";
25
+ export {
26
+ p as MapPinContent
27
+ };
@@ -0,0 +1,19 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { PinSize, PinVariant } from '../map.type';
4
+ declare const pinVariants: (props?: ({
5
+ variant?: "success" | "warning" | "danger" | "neutral" | "brand" | null | undefined;
6
+ active?: boolean | null | undefined;
7
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
8
+ export interface MapPinProps extends VariantProps<typeof pinVariants> {
9
+ icon?: ReactNode;
10
+ className?: string;
11
+ onClick?: () => void;
12
+ onMouseEnter?: () => void;
13
+ onMouseLeave?: () => void;
14
+ active?: boolean;
15
+ variant?: PinVariant;
16
+ size?: PinSize;
17
+ }
18
+ export declare const MapPinComponent: FC<MapPinProps>;
19
+ export {};
@@ -0,0 +1,116 @@
1
+ import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
+ import { cva as v } from "class-variance-authority";
3
+ import { MapPin as h } from "lucide-react";
4
+ import { cn as c } from "../../../lib/utils.js";
5
+ import { PIN_SIZES as r } from "../map.constants.js";
6
+ const m = v(
7
+ [
8
+ "relative flex items-center justify-center cursor-pointer transition-all duration-300 select-none group",
9
+ 'before:content-[""] before:absolute before:inset-0 before:rounded-full',
10
+ "before:transition-all before:duration-300",
11
+ "before:ring-2 before:ring-white/90",
12
+ "before:shadow-[0_2px_8px_rgba(0,0,0,0.15)] hover:before:shadow-[0_4px_16px_rgba(0,0,0,0.25)]",
13
+ "before:z-[0]"
14
+ ],
15
+ {
16
+ variants: {
17
+ variant: {
18
+ brand: "",
19
+ neutral: "",
20
+ danger: "",
21
+ success: "",
22
+ warning: ""
23
+ },
24
+ active: {
25
+ true: [
26
+ "scale-125 z-50",
27
+ "before:ring-4 before:ring-white/70",
28
+ "before:shadow-[0_8px_24px_rgba(0,0,0,0.3)]"
29
+ ],
30
+ false: "hover:scale-110"
31
+ }
32
+ },
33
+ compoundVariants: [
34
+ {
35
+ variant: "brand",
36
+ className: "before:bg-surface-accent-default hover:before:bg-surface-accent-hover"
37
+ },
38
+ {
39
+ variant: "neutral",
40
+ className: "before:bg-surface-gray-default hover:before:bg-surface-gray-hover"
41
+ },
42
+ {
43
+ variant: "danger",
44
+ className: "before:bg-surface-danger-default hover:before:bg-surface-danger-hover"
45
+ },
46
+ {
47
+ variant: "success",
48
+ className: "before:bg-surface-success-default hover:before:bg-surface-success-hover"
49
+ },
50
+ {
51
+ variant: "warning",
52
+ className: "before:bg-surface-warning-default hover:before:bg-surface-warning-hover"
53
+ }
54
+ ],
55
+ defaultVariants: {
56
+ variant: "warning",
57
+ active: !1
58
+ }
59
+ }
60
+ ), p = {
61
+ sm: r.sm.iconSize,
62
+ md: r.md.iconSize,
63
+ lg: r.lg.iconSize
64
+ }, w = {
65
+ brand: "bg-surface-accent-hover",
66
+ neutral: "bg-surface-gray-hover",
67
+ danger: "bg-surface-danger-hover",
68
+ success: "bg-surface-success-hover",
69
+ warning: "bg-surface-warning-hover"
70
+ }, x = ({
71
+ icon: f,
72
+ className: b,
73
+ onClick: e,
74
+ onMouseEnter: u,
75
+ onMouseLeave: l,
76
+ active: s = !1,
77
+ variant: o = "warning",
78
+ size: t = "md"
79
+ }) => {
80
+ const g = p[t], i = r[t];
81
+ return /* @__PURE__ */ d(
82
+ "div",
83
+ {
84
+ className: c(m({ variant: o, active: s }), b),
85
+ style: {
86
+ width: `${i.width}px`,
87
+ height: `${i.height}px`
88
+ },
89
+ onClick: e,
90
+ onMouseEnter: u,
91
+ onMouseLeave: l,
92
+ role: "button",
93
+ tabIndex: 0,
94
+ "aria-label": "Map pin",
95
+ onKeyDown: (a) => {
96
+ (a.key === "Enter" || a.key === " ") && (a.preventDefault(), e == null || e());
97
+ },
98
+ children: [
99
+ s && /* @__PURE__ */ n(
100
+ "div",
101
+ {
102
+ className: c(
103
+ "absolute inset-0 rounded-full z-[1] opacity-60",
104
+ w[o]
105
+ )
106
+ }
107
+ ),
108
+ /* @__PURE__ */ n("div", { className: "relative z-10 flex items-center justify-center", children: f || /* @__PURE__ */ n(h, { size: g, className: "text-white drop-shadow-sm" }) })
109
+ ]
110
+ }
111
+ );
112
+ };
113
+ x.displayName = "MapPinComponent";
114
+ export {
115
+ x as MapPinComponent
116
+ };
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { MapVariant } from '../map.constants';
3
+ export interface MapStyleControlProps {
4
+ activeStyle: MapVariant;
5
+ onStyleChange: (style: MapVariant) => void;
6
+ className?: string;
7
+ }
8
+ export declare const MapStyleControl: FC<MapStyleControlProps>;