@longline/aqua-ui 1.0.38 → 1.0.39

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.
@@ -49,7 +49,7 @@ interface IProps {
49
49
  /**
50
50
  * Fired when the button is clicked.
51
51
  */
52
- onClick: () => void;
52
+ onClick: (e?: React.MouseEvent) => void;
53
53
  }
54
54
  /**
55
55
  * Floating action buttons (FABs) help people take primary ations and are used
@@ -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 }),
@@ -41,7 +41,7 @@ interface IProps {
41
41
  /**
42
42
  * Fired when the button is clicked.
43
43
  */
44
- onClick: () => void;
44
+ onClick: (e?: React.MouseEvent) => void;
45
45
  }
46
46
  /**
47
47
  * Primary buttons denote the primary action. They may have icons or not and
@@ -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 }),
@@ -39,7 +39,7 @@ interface IProps {
39
39
  /**
40
40
  * Fired when the button is clicked.
41
41
  */
42
- onClick: () => void;
42
+ onClick: (e?: React.MouseEvent) => void;
43
43
  }
44
44
  /**
45
45
  * The `SecondaryButton` is a small button that holds only an icon. It has no
@@ -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 }),
@@ -12,7 +12,7 @@ interface IProps {
12
12
  /**
13
13
  * Fired when the button is clicked.
14
14
  */
15
- onClick: () => void;
15
+ onClick: (e?: React.MouseEvent) => void;
16
16
  }
17
17
  /**
18
18
  * The `TertiaryButton` is connected to a specific area or component such as
@@ -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
  };
@@ -33,7 +33,7 @@ interface IProps {
33
33
  /**
34
34
  * Fired when the map button is clicked.
35
35
  */
36
- onClick: () => void;
36
+ onClick: (e?: React.MouseEvent) => void;
37
37
  }
38
38
  /**
39
39
  * A `MapButton` is a square button to be used on a Mapbox map. It must
@@ -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 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",