@longline/aqua-ui 1.0.38 → 1.0.40
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/controls/Fab/Fab.d.ts +1 -1
- package/controls/Fab/Fab.js +2 -2
- package/controls/PrimaryButton/PrimaryButton.d.ts +1 -1
- package/controls/PrimaryButton/PrimaryButton.js +2 -2
- package/controls/SecondaryButton/SecondaryButton.d.ts +1 -1
- package/controls/SecondaryButton/SecondaryButton.js +2 -2
- package/controls/TertiaryButton/TertiaryButton.d.ts +1 -1
- package/controls/TertiaryButton/TertiaryButton.js +2 -2
- package/map/Map/Map.d.ts +5 -0
- package/map/Map/Map.js +1 -1
- package/map/controls/base/MapButton/MapButton.d.ts +1 -1
- package/map/controls/base/MapButton/MapButton.js +2 -2
- package/package.json +1 -1
package/controls/Fab/Fab.d.ts
CHANGED
package/controls/Fab/Fab.js
CHANGED
|
@@ -28,11 +28,11 @@ import * as React from 'react';
|
|
|
28
28
|
import styled, { css } from 'styled-components';
|
|
29
29
|
import { Icon } from '../Icon';
|
|
30
30
|
var FabBase = function (props) {
|
|
31
|
-
var handleClick = function () {
|
|
31
|
+
var handleClick = function (e) {
|
|
32
32
|
if (props.disabled)
|
|
33
33
|
return;
|
|
34
34
|
if (props.onClick)
|
|
35
|
-
props.onClick();
|
|
35
|
+
props.onClick(e);
|
|
36
36
|
};
|
|
37
37
|
return (React.createElement("button", { tabIndex: props.disabled ? -1 : 0, className: props.className, onClick: handleClick, title: props.title },
|
|
38
38
|
typeof props.icon == "string" && React.createElement(Icon, { url: props.icon }),
|
|
@@ -29,11 +29,11 @@ import styled, { css } from 'styled-components';
|
|
|
29
29
|
import { darken } from '../../helper/darken';
|
|
30
30
|
import { Icon } from '../Icon';
|
|
31
31
|
var PrimaryButtonBase = function (props) {
|
|
32
|
-
var handleClick = function () {
|
|
32
|
+
var handleClick = function (e) {
|
|
33
33
|
if (props.disabled)
|
|
34
34
|
return;
|
|
35
35
|
if (props.onClick)
|
|
36
|
-
props.onClick();
|
|
36
|
+
props.onClick(e);
|
|
37
37
|
};
|
|
38
38
|
return (React.createElement("button", { tabIndex: props.disabled ? -1 : 0, className: props.className, onClick: handleClick, title: props.title },
|
|
39
39
|
props.icon && typeof props.icon == "string" && React.createElement(Icon, { url: props.icon }),
|
|
@@ -28,11 +28,11 @@ import * as React from 'react';
|
|
|
28
28
|
import styled, { css } from 'styled-components';
|
|
29
29
|
import { Icon } from '../Icon';
|
|
30
30
|
var SecondaryButtonBase = function (props) {
|
|
31
|
-
var handleClick = function () {
|
|
31
|
+
var handleClick = function (e) {
|
|
32
32
|
if (props.disabled)
|
|
33
33
|
return;
|
|
34
34
|
if (props.onClick)
|
|
35
|
-
props.onClick();
|
|
35
|
+
props.onClick(e);
|
|
36
36
|
};
|
|
37
37
|
return (React.createElement("button", { tabIndex: props.disabled ? -1 : 0, className: props.className, onClick: handleClick, title: props.title },
|
|
38
38
|
typeof props.icon == "string" && React.createElement(Icon, { url: props.icon }),
|
|
@@ -27,11 +27,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
27
|
import * as React from 'react';
|
|
28
28
|
import styled, { css } from 'styled-components';
|
|
29
29
|
var TertiaryButtonBase = function (props) {
|
|
30
|
-
var handleClick = function () {
|
|
30
|
+
var handleClick = function (e) {
|
|
31
31
|
if (props.disabled)
|
|
32
32
|
return;
|
|
33
33
|
if (props.onClick)
|
|
34
|
-
props.onClick();
|
|
34
|
+
props.onClick(e);
|
|
35
35
|
};
|
|
36
36
|
return (React.createElement("button", { className: props.className, onClick: handleClick }, props.children));
|
|
37
37
|
};
|
package/map/Map/Map.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Map as OriginalMap } from 'mapbox-gl';
|
|
3
3
|
import { ViewState } from 'react-map-gl';
|
|
4
|
+
import { MapLayerMouseEvent } from 'mapbox-gl';
|
|
4
5
|
interface IProps {
|
|
5
6
|
/** @ignore */
|
|
6
7
|
children?: React.ReactNode;
|
|
@@ -61,6 +62,10 @@ interface IProps {
|
|
|
61
62
|
* Fired when map is loaded.
|
|
62
63
|
*/
|
|
63
64
|
onLoad?: (map: OriginalMap) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Fired when map is clicked.
|
|
67
|
+
*/
|
|
68
|
+
onClick?: (e: MapLayerMouseEvent) => void;
|
|
64
69
|
}
|
|
65
70
|
declare const useViewState: () => ViewState;
|
|
66
71
|
declare const Map: ({ longitude, latitude, zoom, pitch, bearing, clipped, logoPosition, minZoom, maxZoom, ...props }: IProps) => React.JSX.Element;
|
package/map/Map/Map.js
CHANGED
|
@@ -207,7 +207,7 @@ var MapBase = function (props) {
|
|
|
207
207
|
var handleMove = function (e) {
|
|
208
208
|
setViewState(e.viewState);
|
|
209
209
|
};
|
|
210
|
-
return (React.createElement(GLMap, __assign({}, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom:
|
|
210
|
+
return (React.createElement(GLMap, __assign({}, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: props.minZoom, maxZoom: props.maxZoom, doubleClickZoom: true, onMove: handleMove, onLoad: handleLoad, onClick: props.onClick }),
|
|
211
211
|
props.clipped && React.createElement(React.Fragment, null,
|
|
212
212
|
React.createElement(Source, { type: "raster", tiles: ["https://api.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/{z}/{x}/{y}.webp?access_token=".concat(props.token)] },
|
|
213
213
|
React.createElement(Layer, { id: "overlay", type: "raster" })),
|
|
@@ -29,11 +29,11 @@ import styled, { css } from 'styled-components';
|
|
|
29
29
|
import { Hint } from './Hint';
|
|
30
30
|
import { MapControl } from '../MapControl';
|
|
31
31
|
var MapButtonBase = function (props) {
|
|
32
|
-
var handleClick = function () {
|
|
32
|
+
var handleClick = function (e) {
|
|
33
33
|
if (props.disabled)
|
|
34
34
|
return;
|
|
35
35
|
if (props.onClick)
|
|
36
|
-
props.onClick();
|
|
36
|
+
props.onClick(e);
|
|
37
37
|
};
|
|
38
38
|
var renderButton = function () {
|
|
39
39
|
return React.createElement("div", { className: props.className, tabIndex: props.disabled ? -1 : 0, onClick: handleClick },
|