@swr-data-lab/components 2.17.0 → 2.18.1
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/ChartList/ChartList.svelte +14 -8
- package/dist/DesignTokens/Tokens.js +1 -1
- package/dist/maplibre/GeocoderControl/GeocoderControl.svelte +1 -1
- package/dist/maplibre/Map/Map.svelte +1 -1
- package/dist/maplibre/MapStyle/SWRDataLabDark.js +2 -2
- package/dist/maplibre/MapStyle/SWRDataLabLight.js +3 -3
- package/dist/maplibre/MapStyle/components/PlaceLabels.js +14 -4
- package/dist/maplibre/Tooltip/Tooltip.svelte +12 -13
- package/package.json +12 -12
|
@@ -41,6 +41,7 @@ let { project, charts, baseUrl } = $props();
|
|
|
41
41
|
flex-flow: column;
|
|
42
42
|
font-family: var(--swr-sans);
|
|
43
43
|
font-size: var(--fs-small-1);
|
|
44
|
+
color: var(--color-textPrimary);
|
|
44
45
|
max-width: 40rem;
|
|
45
46
|
margin: 0 auto;
|
|
46
47
|
height: 90vh;
|
|
@@ -52,17 +53,18 @@ main * {
|
|
|
52
53
|
|
|
53
54
|
.inner {
|
|
54
55
|
width: 100%;
|
|
55
|
-
|
|
56
|
+
background: var(--color-surfaceFill);
|
|
57
|
+
border: 1px solid var(--color-surfaceBorder);
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
h1 {
|
|
59
61
|
font-size: var(--fs-base);
|
|
60
|
-
border-bottom: 1px solid
|
|
62
|
+
border-bottom: 1px solid var(--color-textSecondary);
|
|
61
63
|
padding-bottom: 0.2em;
|
|
62
|
-
background-color:
|
|
64
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
63
65
|
}
|
|
64
66
|
h1 em {
|
|
65
|
-
background:
|
|
67
|
+
background: rgba(134, 139, 84, 0.4);
|
|
66
68
|
font-style: normal;
|
|
67
69
|
padding: 0 0.3em;
|
|
68
70
|
border-radius: 2px;
|
|
@@ -88,11 +90,11 @@ h1 {
|
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
th {
|
|
91
|
-
border-bottom: 1px solid
|
|
93
|
+
border-bottom: 1px solid var(--color-textSecondary);
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
tr {
|
|
95
|
-
border-bottom: 1px solid
|
|
97
|
+
border-bottom: 1px solid var(--color-surfaceBorder);
|
|
96
98
|
}
|
|
97
99
|
tr:last-child {
|
|
98
100
|
border-bottom: 0;
|
|
@@ -102,8 +104,11 @@ input {
|
|
|
102
104
|
display: block;
|
|
103
105
|
font-family: monospace;
|
|
104
106
|
width: calc(100% - 0.6em);
|
|
105
|
-
padding: 0.
|
|
106
|
-
font-size:
|
|
107
|
+
padding: 0.2em 0.4em;
|
|
108
|
+
font-size: 0.9rem;
|
|
109
|
+
background: var(--color-pageFill);
|
|
110
|
+
border: 1px solid var(--color-surfaceBorder);
|
|
111
|
+
color: var(--color-textSecondary);
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
a:hover,
|
|
@@ -117,5 +122,6 @@ a:last-child {
|
|
|
117
122
|
|
|
118
123
|
.notes {
|
|
119
124
|
margin-top: 0.5em;
|
|
125
|
+
color: var(--color-textSecondary);
|
|
120
126
|
font-size: var(--fs-small-2);
|
|
121
127
|
}</style>
|
|
@@ -30,7 +30,7 @@ const geocoder = new MaplibreGeocoder(geocoderAPI, {
|
|
|
30
30
|
font-family: var(--swr-sans);
|
|
31
31
|
font-size: var(--fs-small-1);
|
|
32
32
|
border-radius: var(--br-small);
|
|
33
|
-
border: 1px solid var(--color-
|
|
33
|
+
border: 1px solid var(--color-textSecondary);
|
|
34
34
|
box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.075);
|
|
35
35
|
}
|
|
36
36
|
:global(.maplibregl-ctrl-geocoder) :global(button) {
|
|
@@ -224,7 +224,7 @@ const handleDebugCopyLocationClick = (e) => {
|
|
|
224
224
|
}
|
|
225
225
|
:global(.maplibregl-ctrl-group) {
|
|
226
226
|
background: var(--color-surfaceFill);
|
|
227
|
-
border: 1px solid var(--color-
|
|
227
|
+
border: 1px solid var(--color-textSecondary);
|
|
228
228
|
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.075);
|
|
229
229
|
border-radius: var(--br-small);
|
|
230
230
|
overflow: hidden;
|
|
@@ -17,7 +17,7 @@ const tokens = {
|
|
|
17
17
|
},
|
|
18
18
|
water: 'hsl(210, 12%, 8%)',
|
|
19
19
|
water_light: 'hsl(210, 12%, 8%)',
|
|
20
|
-
water_ocean: 'hsl(
|
|
20
|
+
water_ocean: 'hsl(214, 17%, 8%)',
|
|
21
21
|
marsh: 'hsl(180, 3%, 35%)',
|
|
22
22
|
grass: 'hsl(170, 20%, 14%)',
|
|
23
23
|
grass_dark: 'hsl(170, 16%, 12%)',
|
|
@@ -27,7 +27,7 @@ const tokens = {
|
|
|
27
27
|
street_secondary_case: 'hsl(0, 0%, 0%)',
|
|
28
28
|
street_tertiary: 'hsl(0, 0%, 20%)',
|
|
29
29
|
street_tertiary_case: 'hsl(0, 0%, 14%)',
|
|
30
|
-
label_primary: 'hsl(240, 5%,
|
|
30
|
+
label_primary: 'hsl(240, 5%, 80%)',
|
|
31
31
|
label_secondary: 'hsl(0, 2%, 72%)',
|
|
32
32
|
label_tertiary: 'hsl(0, 1%, 55%)',
|
|
33
33
|
boundary_country: '#6e6f71',
|
|
@@ -15,9 +15,9 @@ const tokens = {
|
|
|
15
15
|
[10, 'white']
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
|
-
water: 'hsl(
|
|
19
|
-
water_light: 'hsl(
|
|
20
|
-
water_ocean: 'hsl(
|
|
18
|
+
water: 'hsl(212, 71%, 83%)',
|
|
19
|
+
water_light: 'hsl(212, 41%, 90%)',
|
|
20
|
+
water_ocean: 'hsl(212, 60%, 83%)',
|
|
21
21
|
marsh: 'hsl(200, 14%, 97%)',
|
|
22
22
|
grass: 'hsl(133, 36%, 95%)',
|
|
23
23
|
grass_dark: 'hsl(127, 49%, 93%)',
|
|
@@ -96,7 +96,7 @@ export default function makePlaceLabels(tokens) {
|
|
|
96
96
|
layout: {
|
|
97
97
|
'text-size': {
|
|
98
98
|
stops: [
|
|
99
|
-
[7,
|
|
99
|
+
[7, 13],
|
|
100
100
|
[13, 17]
|
|
101
101
|
]
|
|
102
102
|
}
|
|
@@ -115,13 +115,18 @@ export default function makePlaceLabels(tokens) {
|
|
|
115
115
|
layout: {
|
|
116
116
|
'text-size': {
|
|
117
117
|
stops: [
|
|
118
|
-
[7,
|
|
118
|
+
[7, 14],
|
|
119
119
|
[15, 20]
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
paint: {
|
|
124
|
-
'text-color':
|
|
124
|
+
'text-color': {
|
|
125
|
+
stops: [
|
|
126
|
+
[7, tokens.label_tertiary],
|
|
127
|
+
[9, tokens.label_secondary]
|
|
128
|
+
]
|
|
129
|
+
}
|
|
125
130
|
}
|
|
126
131
|
},
|
|
127
132
|
{
|
|
@@ -138,7 +143,12 @@ export default function makePlaceLabels(tokens) {
|
|
|
138
143
|
}
|
|
139
144
|
},
|
|
140
145
|
paint: {
|
|
141
|
-
'text-color':
|
|
146
|
+
'text-color': {
|
|
147
|
+
stops: [
|
|
148
|
+
[7, tokens.label_tertiary],
|
|
149
|
+
[9, tokens.label_secondary]
|
|
150
|
+
]
|
|
151
|
+
}
|
|
142
152
|
}
|
|
143
153
|
}
|
|
144
154
|
].map((el) => {
|
|
@@ -33,9 +33,9 @@ onDestroy(() => tooltip.remove());
|
|
|
33
33
|
background: var(--color-surfaceFill);
|
|
34
34
|
color: var(--color-textPrimary);
|
|
35
35
|
padding: 0.75em;
|
|
36
|
-
border: 1px solid
|
|
37
|
-
filter: drop-shadow(2px 2px 1px rgba(0, 0, 0, 0.1));
|
|
36
|
+
border: 1px solid var(--color-surfaceBorder);
|
|
38
37
|
pointer-events: none;
|
|
38
|
+
filter: drop-shadow(2px 2px 1px rgba(0, 0, 0, 0.1));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.mouseEvents {
|
|
@@ -97,32 +97,31 @@ onDestroy(() => tooltip.remove());
|
|
|
97
97
|
}
|
|
98
98
|
:global(.maplibregl-popup-close-button) {
|
|
99
99
|
position: absolute;
|
|
100
|
-
top: 0.
|
|
101
|
-
right: 0.
|
|
100
|
+
top: 0.4em;
|
|
101
|
+
right: 0.4em;
|
|
102
102
|
cursor: pointer;
|
|
103
|
-
border-radius: 2px;
|
|
104
103
|
display: flex;
|
|
105
104
|
justify-content: center;
|
|
106
105
|
align-items: center;
|
|
107
106
|
padding-bottom: 0.15em;
|
|
108
107
|
font-size: 1.2rem;
|
|
109
|
-
width: 1.
|
|
110
|
-
height: 1.
|
|
108
|
+
width: 1.15em;
|
|
109
|
+
height: 1.15em;
|
|
111
110
|
z-index: 100;
|
|
112
|
-
background:
|
|
113
|
-
color: var(--
|
|
114
|
-
border: 1px solid var(--
|
|
111
|
+
background: var(--color-surfaceFill);
|
|
112
|
+
color: var(--color-textPrimary);
|
|
113
|
+
border: 1px solid var(--color-textSecondary);
|
|
115
114
|
}
|
|
116
115
|
:global(.maplibregl-popup-close-button:hover),
|
|
117
116
|
:global(.maplibregl-popup-close-button:focus-visible) {
|
|
118
|
-
background: var(--
|
|
117
|
+
background: var(--color-surfaceFill);
|
|
119
118
|
}
|
|
120
119
|
:global(.maplibregl-popup-tip) {
|
|
121
120
|
width: 0.65rem;
|
|
122
121
|
height: 0.65rem;
|
|
123
122
|
background: var(--color-surfaceFill);
|
|
124
123
|
position: absolute;
|
|
125
|
-
border-right: 1px solid var(--
|
|
126
|
-
border-bottom: 1px solid var(--
|
|
124
|
+
border-right: 1px solid var(--color-surfaceBorder);
|
|
125
|
+
border-bottom: 1px solid var(--color-surfaceBorder);
|
|
127
126
|
z-index: 10;
|
|
128
127
|
}</style>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swr-data-lab/components",
|
|
3
3
|
"description": "SWR Data Lab component library",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.18.1",
|
|
5
5
|
"author": "SWR Data Lab",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"@semantic-release/changelog": "^6.0.3",
|
|
40
40
|
"@semantic-release/git": "^10.0.1",
|
|
41
41
|
"@semantic-release/npm": "^12.0.2",
|
|
42
|
-
"@storybook/addon-docs": "^9.1.
|
|
43
|
-
"@storybook/addon-links": "^9.1.
|
|
42
|
+
"@storybook/addon-docs": "^9.1.8",
|
|
43
|
+
"@storybook/addon-links": "^9.1.8",
|
|
44
44
|
"@storybook/addon-svelte-csf": "^5.0.8",
|
|
45
|
-
"@storybook/addon-vitest": "^9.1.
|
|
46
|
-
"@storybook/sveltekit": "^9.1.
|
|
45
|
+
"@storybook/addon-vitest": "^9.1.8",
|
|
46
|
+
"@storybook/sveltekit": "^9.1.8",
|
|
47
47
|
"@storybook/test-runner": "^0.23.0",
|
|
48
|
-
"@sveltejs/adapter-auto": "^6.0
|
|
49
|
-
"@sveltejs/kit": "^2.
|
|
50
|
-
"@sveltejs/package": "^2.4
|
|
51
|
-
"@sveltejs/vite-plugin-svelte": "^6.1
|
|
48
|
+
"@sveltejs/adapter-auto": "^6.1.0",
|
|
49
|
+
"@sveltejs/kit": "^2.43.4",
|
|
50
|
+
"@sveltejs/package": "^2.5.4",
|
|
51
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
52
52
|
"@types/geojson": "^7946.0.16",
|
|
53
53
|
"@versatiles/style": "^5.7.0",
|
|
54
54
|
"@vitest/browser": "^3.2.4",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"playwright": "^1.55.0",
|
|
61
61
|
"publint": "^0.3.12",
|
|
62
62
|
"sass": "^1.91.0",
|
|
63
|
-
"sass-embedded": "^1.
|
|
64
|
-
"semantic-release": "^24.2.
|
|
65
|
-
"storybook": "^9.1.
|
|
63
|
+
"sass-embedded": "^1.93.2",
|
|
64
|
+
"semantic-release": "^24.2.9",
|
|
65
|
+
"storybook": "^9.1.8",
|
|
66
66
|
"svelte": "^5.23.0",
|
|
67
67
|
"svelte-check": "^4.0.0",
|
|
68
68
|
"svelte-preprocess": "^6.0.3",
|