playbook_ui 12.28.0.pre.alpha.PLAY837MapCustomButton868 → 12.28.0.pre.alpha.20230613implementbakesupport865
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/index.js +0 -1
- data/app/pb_kits/playbook/pb_map/_map.scss +1 -16
- data/app/pb_kits/playbook/pb_map/_map.tsx +26 -9
- data/app/pb_kits/playbook/pb_map/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_map/docs/index.js +0 -1
- data/dist/playbook-rails.js +5 -5
- data/lib/playbook/version.rb +1 -1
- metadata +2 -6
- data/app/pb_kits/playbook/pb_map/_map_controls.tsx +0 -47
- data/app/pb_kits/playbook/pb_map/_map_custom_button.tsx +0 -18
- data/app/pb_kits/playbook/pb_map/docs/_map_with_custom_button.jsx +0 -83
- data/app/pb_kits/playbook/pb_map/docs/_map_with_custom_button.md +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62eedbdec361bff235a7ebde79c752faa859b91299c6f95eaa2c3ec23e91abf2
|
4
|
+
data.tar.gz: 550f326d274477581aa51f988951324a83431324e67a7e08f5c46563af295b26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c2068cc5d7a0a63feee16c002e6e4b9b5ec441d937753f7e35bd80a2f4dc3af6946f4c05d9d74a44a3003fa8d4ff94a34b4e1767eb1ae3f1d7d8eaa2bc72435
|
7
|
+
data.tar.gz: 866b7ce2934c27dcec593eeb6cea2e3728f81f0ce4b7590483e2e4f17f62c09843da42b26507a5f11246df25aa2ff93692c1b5301804013f2f1d1fed2aba9a42
|
@@ -60,7 +60,6 @@ export { default as List } from './pb_list/_list'
|
|
60
60
|
export { default as ListItem } from './pb_list/_list_item'
|
61
61
|
export { default as LoadingInline } from './pb_loading_inline/_loading_inline'
|
62
62
|
export { default as Map} from './pb_map/_map'
|
63
|
-
export { default as MapCustomButton } from './pb_map/_map_custom_button'
|
64
63
|
export { default as Message } from './pb_message/_message'
|
65
64
|
export { default as MultiLevelSelect} from './pb_multi_level_select/_multi_level_select'
|
66
65
|
export { default as MultipleUsers } from './pb_multiple_users/_multiple_users'
|
@@ -5,21 +5,6 @@
|
|
5
5
|
@import "./_pb_map_button_mixin.scss";
|
6
6
|
|
7
7
|
[class*="pb_map"] {
|
8
|
-
.pb_map-custom-button {
|
9
|
-
@include pb_map_button;
|
10
|
-
position: relative;
|
11
|
-
margin-top: $space_xs;
|
12
|
-
box-shadow: $shadow_deep;
|
13
|
-
.pb_icon_kit {
|
14
|
-
width: $space_sm - 2;
|
15
|
-
height: $space_sm;
|
16
|
-
}
|
17
|
-
|
18
|
-
.pb_button_content {
|
19
|
-
height: $space_sm;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
8
|
.mapboxgl-map,
|
24
9
|
.maplibregl-map {
|
25
10
|
font-family: $font_family_base !important;
|
@@ -200,7 +185,7 @@
|
|
200
185
|
}
|
201
186
|
.map-zoom-in-button,
|
202
187
|
.map-zoom-out-button,
|
203
|
-
.map-flyto-button
|
188
|
+
.map-flyto-button {
|
204
189
|
@include pb_map_button_dark;
|
205
190
|
}
|
206
191
|
|
@@ -3,7 +3,9 @@ import classnames from 'classnames'
|
|
3
3
|
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
4
4
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
5
5
|
|
6
|
-
import
|
6
|
+
import Flex from "../pb_flex/_flex"
|
7
|
+
import Icon from '../pb_icon/_icon'
|
8
|
+
import Button from '../pb_button/_button'
|
7
9
|
|
8
10
|
type MapProps = {
|
9
11
|
aria?: { [key: string]: string },
|
@@ -45,13 +47,29 @@ const Map = (props: MapProps) => {
|
|
45
47
|
>
|
46
48
|
{
|
47
49
|
zoomBtns ? (
|
48
|
-
<
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
<Flex className="custom-nav-control" orientation='column'>
|
51
|
+
<div className="custom-nav-control-zoom">
|
52
|
+
<Button className='map-zoom-in-button'
|
53
|
+
onClick={zoomInClick}
|
54
|
+
>
|
55
|
+
<Icon icon="plus"/>
|
56
|
+
</Button>
|
57
|
+
<Button className='map-zoom-out-button'
|
58
|
+
onClick={zoomOutClick}
|
59
|
+
>
|
60
|
+
<Icon icon="minus"/>
|
61
|
+
</Button>
|
62
|
+
</div>
|
63
|
+
{
|
64
|
+
flyTo ? (
|
65
|
+
<Button className='map-flyto-button'
|
66
|
+
onClick={flyToClick}
|
67
|
+
>
|
68
|
+
<Icon icon="eye"/>
|
69
|
+
</Button>
|
70
|
+
) : null
|
71
|
+
}
|
72
|
+
</Flex>
|
55
73
|
) : null
|
56
74
|
}
|
57
75
|
{children}
|
@@ -59,5 +77,4 @@ const Map = (props: MapProps) => {
|
|
59
77
|
)
|
60
78
|
}
|
61
79
|
|
62
|
-
Map.Controls = MapControls
|
63
80
|
export default Map
|