@macrostrat/map-interface 0.3.0 → 1.0.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.
@@ -1,407 +0,0 @@
1
- /*
2
- This stylesheet the overall application page layout.
3
- */
4
-
5
- .map-page
6
- height 100vh
7
- width 100vw
8
- /* mobile viewport bug fix */
9
- max-height: -webkit-fill-available;
10
- display flex
11
- flex-direction column
12
- position relative
13
-
14
- // Compass display
15
- .compass-control
16
- display: none
17
- &.map-is-rotated
18
- .compass-control
19
- display: block
20
-
21
- .map-3d-control
22
- display: none
23
- &.map-3d-available .map-3d-control
24
- display: block
25
- &.map-is-rotated.map-3d-available .map-3d-control
26
- display: none
27
-
28
- .globe-control
29
- svg
30
- color: var(--secondary-color)
31
- display: none
32
- &.map-is-global .globe-control
33
- display: block
34
-
35
- .main-ui
36
- flex 1
37
- position: relative
38
- display flex
39
- flex-direction: column
40
- max-height 100%
41
- height: 100%
42
- box-shadow 0 0 10px 4px var(--card-shadow-color)
43
-
44
-
45
- .panel-card
46
- padding: 10px
47
- >:last-child
48
- margin-bottom: 0
49
-
50
- .context-stack
51
- display: flex
52
- flex-direction: column
53
- max-height: 100%
54
- &>div
55
- flex-shrink 1
56
- &>.searchbar
57
- flex 0
58
-
59
- // Rename left-stack to context-stack
60
-
61
- .context-stack, .detail-stack
62
- z-index: 100
63
-
64
- .panel-container
65
- display flex
66
- flex-direction: column
67
- &>div
68
- pointer-events all
69
-
70
- .panel-title
71
- font-size 16px
72
-
73
- .spacer
74
- flex-grow 1
75
- pointer-events: none
76
-
77
- .map-view-container
78
- flex-grow 1
79
- position relative
80
- overflow: hidden
81
-
82
- .searchbar-holder
83
- margin-bottom 0.5em
84
-
85
- .right-panel
86
- width: 24em
87
-
88
- // Menu
89
- .buttons
90
- display: flex
91
- flex-direction: row
92
- flex: 1
93
- min-width: 0
94
-
95
- .tab-button
96
- flex-shrink: 1
97
- min-width: 40px
98
- overflow: hidden
99
- text-align: right
100
- :global(.bp4-button-text)
101
- transition all 0.2s
102
- transition-delay 0.1s
103
-
104
- .menu-card.narrow-card
105
- // Transition opacity when leaving context panel
106
- .panel-header:not(.minimal)
107
- // .tab-button
108
- // &:not(:hover) :global(.bp4-button-text)
109
- // //width 0
110
- // opacity: 1
111
- //margin-left: -7px
112
- // Fancy CSS to select all buttons _after_ the currently hovered one
113
- .tab-button:global(.bp4-active) ~ .tab-button :global(.bp4-button-text)
114
- width 0
115
- opacity: 0
116
- margin-left: -7px
117
-
118
- // When panel is closing, fade out the buttons text-first
119
- .context-panel-leave .menu-card .panel-header
120
- .tab-button :global(.bp4-button-text)
121
- opacity: 0
122
- width: 0
123
-
124
- .narrow-card.narrow-enter .panel-header .buttons
125
- // When we have not yet transitioned to a "minimal" state, we need extra space
126
- // to not crowd buttons that haven't yet transitioned
127
- margin-right: -500px
128
-
129
- .panel-header.minimal
130
- .tab-button:not(:hover)
131
- &:not(:global(.bp4-active))
132
- padding-left: 0
133
- padding-right: 0
134
- min-width: 30px
135
- width: 30px
136
- :global(.bp4-button-text)
137
- width 0
138
- opacity: 0
139
- margin-left: -7px
140
-
141
- .menu-group
142
- margin-bottom: 0.5em
143
- margin-top: 0.2em
144
-
145
-
146
- .menu-card
147
- :global
148
- .bp4-text, .text-panel
149
- ul
150
- padding-left: 1em
151
-
152
- .menu-content
153
- display flex
154
- flex-direction column
155
- .bp4-button-group
156
- margin-bottom 4px
157
- margin-bottom -8px
158
-
159
- hr
160
- width 100%
161
-
162
- // Map controls
163
- map-control()
164
- min-width: 22px
165
- min-height: 22px
166
- border-radius: 4px
167
- background-color: var(--panel-background-color)
168
- box-shadow 0 0 0 1px var(--card-shadow-color)
169
- //box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 0 0 rgba(16, 22, 26, 0), 0 1px 1px rgba(16, 22, 26, 0.2) !important
170
- //box-shadow: 0 0 0 2px rgba(0,0,0,.1)
171
- button
172
- width: 22px
173
- height: 22px
174
- background-position: center center
175
- padding 0
176
- background-color: var(--panel-background-color)
177
- color: var(--text-color)
178
-
179
- &:hover
180
- background-color: var(--panel-background-color) !important
181
-
182
-
183
- :global
184
-
185
- #map
186
- position: absolute;
187
- top: 0;
188
- bottom: 0;
189
- left: 0;
190
- right: 0;
191
-
192
- .mapbox-compass, .mapbox-3d
193
- display: none
194
-
195
- .mapboxgl-ctrl.mapbox-3d.mapbox-control
196
- width: unset
197
- button
198
- width: unset
199
- padding-inline: 4px
200
-
201
- .mapboxgl-canvas-container
202
- width: 100%
203
- height: 100%
204
-
205
- .mapboxgl-ctrl.mapboxgl-ctrl-attrib
206
- a
207
- color: var(--text-color)
208
- background-color: var(--translucent-panel-background-color) !important
209
-
210
-
211
- .mapboxgl-marker svg
212
- path
213
- fill: var(--panel-background-color) !important
214
- circle
215
- fill: var(--secondary-color) !important
216
-
217
-
218
- .mapbox-control.mapbox-zoom
219
- background: var(--translucent-panel-background-color)
220
- svg
221
- fill: var(--text-color) !important
222
-
223
- .mapboxgl-ctrl-logo
224
- transform: scale(0.9)translate(-8px,2px)
225
- .bp4-dark
226
- .mapboxgl-ctrl-logo
227
- filter: invert(100%)
228
-
229
-
230
-
231
- .mapboxgl-ctrl-group button + button
232
- border-top: 1px solid var(--panel-rule-color) !important
233
-
234
- .bp4-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon
235
- filter: invert(40%)
236
- &:hover
237
- filter: invert(50%)
238
- //background-color: var(--)
239
-
240
- .mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon
241
- filter: invert(40%)
242
- &:hover
243
- filter: invert(50%)
244
-
245
-
246
- .detail-stack
247
- position relative
248
-
249
- .main-ui.detail-panel-open
250
- .zoom-control
251
- opacity: 0
252
- display none
253
-
254
- .zoom-control
255
- transition opacity 1s ease-in-out
256
- width: 30px
257
- position absolute
258
- top 0
259
- right 0
260
-
261
- .main-ui.searching
262
- .map-view-container
263
- pointer-events: none
264
-
265
- .map-controls
266
- display flex
267
- flex-direction row
268
- justify-content: right
269
- margin-bottom: 0
270
- &>*
271
- margin-left: 0.5em
272
- :global(.mapbox-control), :global(.map-control-wrapper), .map-control
273
- map-control()
274
-
275
- .map-scale-control
276
- background: none
277
- box-shadow: none
278
- padding-top: 8px
279
- :global(.mapboxgl-ctrl-scale)
280
- background-color: var(--translucent-panel-background-color)
281
- border-color: var(--secondary-text-color)
282
- color: var(--secondary-text-color)
283
-
284
-
285
- /* For mobile phones, we want to make the most of screen space,
286
- which in some cases means adding complications to the basic page. */
287
- @media only screen and (max-width: 768px)
288
-
289
- // Move the search bar and context panel to the bottom of the screen
290
- // .context-stack
291
- // display flex
292
- // order 1
293
- // flex-direction: column-reverse
294
- // max-height: 80%
295
-
296
- // Hide searchbar when infodrawer is open
297
- .main-ui.detail-panel-enter .context-stack
298
- height: 0
299
- visibility: hidden
300
- transition: height 0.5s ease-in-out
301
-
302
-
303
- // Make sure that our detail panel doesn't take up the entirety of the page
304
- .detail-stack
305
- height: fit-content
306
- position: inherit
307
- max-height: 70%
308
-
309
- .infodrawer-stack
310
- max-height: 70%
311
- &:global(.exit-active)
312
- max-height: 0
313
-
314
- // Completely hide zoom control
315
- :global(.mapbox-control.mapbox-zoom)
316
- display: none
317
-
318
- // Position map controls within the map area
319
- .map-controls
320
- position absolute
321
- top -60px
322
- right 10px
323
-
324
- .detail-panel
325
- border-radius: 0px
326
-
327
- /* Desktop styling is necessarily much more complicated than mobile
328
- to handle a two-column layout. */
329
- @media screen and (min-width: 768px)
330
-
331
- .main-ui
332
- flex-direction row
333
- padding 1em 1em 2em
334
- min-height: 80px
335
- &>*
336
- margin-right 0.5em
337
- &:last-child
338
- margin-right 0
339
- &.searching .context-stack
340
- width: 24em
341
-
342
-
343
- .context-stack
344
- max-width 34em
345
- min-width 14em
346
- width: 16em
347
- transition width 300ms ease
348
- //margin-right: -15.5em
349
- &.panel-open
350
- width: 34em
351
- margin-right 0.5em
352
- &.layers, &.settings
353
- width: 18em
354
- margin-right 0.5em
355
- // Leave a little space for Mapbox logo at the bottom
356
- padding-bottom: 0.5em
357
-
358
- .main-ui.detail-panel-open .detail-stack
359
- width: 30em
360
-
361
- .detail-stack
362
- width 30em
363
- // position absolute
364
- // right 0px
365
- // top 0px
366
- // bottom: 0px
367
- pointer-events none
368
- display flex
369
- flex-direction column
370
-
371
- .context-stack, .detail-stack
372
- pointer-events: none
373
- z-index: 100
374
- &>div
375
- pointer-events: all
376
- margin-bottom: 0.5em
377
- &:last-child
378
- margin-bottom 0
379
- &>div.spacer
380
- pointer-events: none
381
-
382
- /* Make map fill page rather than containing div,
383
- by unsetting map position */
384
- .map-view-container
385
- position: unset
386
-
387
- // .map-holder
388
- // z-index: 1;
389
- // position: absolute;
390
- // top 0
391
- // left 0
392
- // bottom 0
393
- // right 0
394
- // height 100%
395
-
396
- // padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
397
-
398
- // Transitions
399
-
400
- // @keyframes fadeIn
401
- // from
402
- // opacity: 0
403
- // to
404
- // opacity: 1
405
-
406
-
407
- @require "./transitions.module.styl"
@@ -1,23 +0,0 @@
1
- .map-view-container
2
- flex-grow: 1
3
- position: relative
4
- overflow: hidden
5
-
6
- .mapbox-map
7
- position: absolute
8
- top: 0
9
- bottom: 0
10
- left: 0
11
- right: 0
12
- &:global(.mapboxgl-map)
13
- // override the default mapbox position: relative in all cases
14
- position: absolute
15
-
16
- /* Desktop styling is necessarily much more complicated than mobile
17
- to handle a two-column layout. */
18
- @media screen and (min-width: 768px)
19
- /* Make map fill page rather than containing div,
20
- by unsetting map position */
21
- // We should move this to another file.
22
- .map-view-container
23
- position: unset