@local-logic/maps 0.0.4 → 0.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/.storybook/globals.css
CHANGED
|
@@ -4,29 +4,37 @@
|
|
|
4
4
|
|
|
5
5
|
html {
|
|
6
6
|
height: 100%;
|
|
7
|
-
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
font-
|
|
11
|
-
}
|
|
8
|
+
/* Override base font size */
|
|
9
|
+
font-size: var(--ll-base-unit);
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
h4,
|
|
17
|
-
h5,
|
|
18
|
-
h6 {
|
|
19
|
-
font-family: 'Inter', sans-serif;
|
|
11
|
+
-webkit-font-smoothing: antialiased;
|
|
12
|
+
-moz-osx-font-smoothing: grayscale;
|
|
13
|
+
text-rendering: optimizeLegibility;
|
|
20
14
|
}
|
|
21
15
|
|
|
22
|
-
@layer
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
@layer base {
|
|
17
|
+
:root {
|
|
18
|
+
--ll-base-unit: 16px;
|
|
19
|
+
|
|
20
|
+
/* FONT FAMILY */
|
|
21
|
+
--ll-font-family: Inter, sans-serif;
|
|
22
|
+
--ll-font-family-mono: Consolas, Andale Mono WT, Andale Mono, Lucida Console,
|
|
23
|
+
Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono,
|
|
24
|
+
Nimbus Mono L, Monaco, Courier New, Courier, monospace;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
scrollbar-width: none; /* Firefox */
|
|
27
|
+
html {
|
|
28
|
+
@apply scroll-smooth;
|
|
31
29
|
}
|
|
32
30
|
}
|
|
31
|
+
|
|
32
|
+
body {
|
|
33
|
+
-webkit-font-smoothing: antialiased;
|
|
34
|
+
-moz-osx-font-smoothing: antialiased;
|
|
35
|
+
-moz-osx-font-smoothing: grayscale;
|
|
36
|
+
-webkit-backface-visibility: hidden;
|
|
37
|
+
backface-visibility: hidden;
|
|
38
|
+
text-rendering: optimizeLegibility;
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
package/.storybook/preview.tsx
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import "@local-logic/core/style.css";
|
|
2
1
|
import "./globals.css";
|
|
3
|
-
import { Preview } from
|
|
4
|
-
import { withThemeByDataAttribute } from
|
|
2
|
+
import { Preview } from "@storybook/react";
|
|
3
|
+
import { withThemeByDataAttribute } from "@storybook/addon-themes";
|
|
5
4
|
|
|
6
5
|
const preview: Preview = {
|
|
7
6
|
decorators: [
|
|
8
7
|
withThemeByDataAttribute({
|
|
9
8
|
themes: {
|
|
10
|
-
light:
|
|
11
|
-
dark:
|
|
9
|
+
light: "day",
|
|
10
|
+
dark: "night",
|
|
12
11
|
},
|
|
13
|
-
defaultTheme:
|
|
12
|
+
defaultTheme: "light",
|
|
14
13
|
attributeName: "data-theme",
|
|
15
14
|
}),
|
|
16
15
|
],
|
|
@@ -22,7 +21,7 @@ const preview: Preview = {
|
|
|
22
21
|
date: /Date$/,
|
|
23
22
|
},
|
|
24
23
|
},
|
|
25
|
-
}
|
|
24
|
+
},
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
export default preview;
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@local-logic/maps",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "This is a maps implementation allowing for the display of Local Logic data on a map.",
|
|
5
5
|
"author": "Local Logic",
|
|
6
6
|
"license": "ISC",
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
"vitest": "^3.0.9"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@local-logic/core": "*",
|
|
68
67
|
"@local-logic/design-system": "*",
|
|
69
68
|
"@phosphor-icons/react": "^2.1.7",
|
|
70
69
|
"@turf/turf": "^7.2.0",
|
|
@@ -23,7 +23,7 @@ export const background = `
|
|
|
23
23
|
|
|
24
24
|
export const iconWrapper = `
|
|
25
25
|
absolute top-1 left-1/2 transform -translate-x-1/2
|
|
26
|
-
|
|
26
|
+
flex justify-center items-center rounded-full overflow-hidden
|
|
27
27
|
transition-all w-3.5 h-3.5
|
|
28
28
|
|
|
29
29
|
group-hover:bg-base-white
|
|
@@ -31,7 +31,9 @@ export const iconWrapper = `
|
|
|
31
31
|
|
|
32
32
|
export const icon = `
|
|
33
33
|
m-auto transition-all w-full h-full
|
|
34
|
+
max-w-3.5 max-h-3.5
|
|
34
35
|
|
|
35
36
|
group-hover:text-primary-100
|
|
36
|
-
group-hover:
|
|
37
|
+
group-hover:max-w-2.5
|
|
38
|
+
group-hover:max-h-2.5
|
|
37
39
|
`;
|
|
@@ -51,7 +51,8 @@ const Template: StoryFn<RootProps> = (args) => {
|
|
|
51
51
|
if (activeMarker.markers.length === 1) {
|
|
52
52
|
return (
|
|
53
53
|
<>
|
|
54
|
-
{activeMarker.markers[0].icon &&
|
|
54
|
+
{activeMarker.markers[0].icon &&
|
|
55
|
+
React.createElement(activeMarker.markers[0].icon, { className: "block" })}
|
|
55
56
|
<strong>{activeMarker.markers[0]?.name}</strong>
|
|
56
57
|
<p>
|
|
57
58
|
{activeMarker?.latitude}, {activeMarker?.longitude}
|
|
@@ -74,7 +75,7 @@ const Template: StoryFn<RootProps> = (args) => {
|
|
|
74
75
|
})
|
|
75
76
|
}
|
|
76
77
|
>
|
|
77
|
-
{marker.icon && React.createElement(marker.icon, { className: "inline mr-
|
|
78
|
+
{marker.icon && React.createElement(marker.icon, { className: "inline mr-1" })}
|
|
78
79
|
<strong>{marker.name}</strong>
|
|
79
80
|
</button>
|
|
80
81
|
</div>
|