@mackin.com/styleguide 9.11.0 → 9.11.2

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.
Files changed (3) hide show
  1. package/index.esm.js +20 -8
  2. package/index.js +20 -8
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -3051,10 +3051,16 @@ const OmniLink = (props) => {
3051
3051
  return (React.createElement("a", Object.assign({}, linkProps, { target: props.target, className: mainClassName }), content));
3052
3052
  }
3053
3053
  const isDisabled = props.disabled || props.waiting;
3054
- return (React.createElement(Link$1, Object.assign({}, linkProps, { className: mainClassName, to: props.href, onClick: isDisabled ? e => {
3055
- e.stopPropagation();
3056
- e.preventDefault();
3057
- } : undefined }), content));
3054
+ return (React.createElement(Link$1, Object.assign({}, linkProps, { className: mainClassName, to: props.href, onClick: e => {
3055
+ var _a;
3056
+ if (isDisabled) {
3057
+ e.stopPropagation();
3058
+ e.preventDefault();
3059
+ }
3060
+ else {
3061
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
3062
+ }
3063
+ } }), content));
3058
3064
  };
3059
3065
 
3060
3066
  const roundPxPadding = '4px';
@@ -4663,10 +4669,16 @@ const Link = (props) => {
4663
4669
  return React.createElement(Text, { className: mainClassName, tag: "div" }, props.children);
4664
4670
  }
4665
4671
  const isDisabled = props.disabled || props.waiting;
4666
- return (React.createElement("a", Object.assign({}, linkProps, { tabIndex: disabled ? -1 : undefined, target: props.target, className: mainClassName, onClick: isDisabled ? e => {
4667
- e.stopPropagation();
4668
- e.preventDefault();
4669
- } : undefined }),
4672
+ return (React.createElement("a", Object.assign({}, linkProps, { tabIndex: disabled ? -1 : undefined, target: props.target, className: mainClassName, onClick: e => {
4673
+ var _a;
4674
+ if (isDisabled) {
4675
+ e.stopPropagation();
4676
+ e.preventDefault();
4677
+ }
4678
+ else {
4679
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
4680
+ }
4681
+ } }),
4670
4682
  React.createElement(LinkContent, Object.assign({}, props))));
4671
4683
  };
4672
4684
 
package/index.js CHANGED
@@ -3078,10 +3078,16 @@ const OmniLink = (props) => {
3078
3078
  return (React__namespace.createElement("a", Object.assign({}, linkProps, { target: props.target, className: mainClassName }), content));
3079
3079
  }
3080
3080
  const isDisabled = props.disabled || props.waiting;
3081
- return (React__namespace.createElement(reactRouterDom.Link, Object.assign({}, linkProps, { className: mainClassName, to: props.href, onClick: isDisabled ? e => {
3082
- e.stopPropagation();
3083
- e.preventDefault();
3084
- } : undefined }), content));
3081
+ return (React__namespace.createElement(reactRouterDom.Link, Object.assign({}, linkProps, { className: mainClassName, to: props.href, onClick: e => {
3082
+ var _a;
3083
+ if (isDisabled) {
3084
+ e.stopPropagation();
3085
+ e.preventDefault();
3086
+ }
3087
+ else {
3088
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
3089
+ }
3090
+ } }), content));
3085
3091
  };
3086
3092
 
3087
3093
  const roundPxPadding = '4px';
@@ -4690,10 +4696,16 @@ const Link = (props) => {
4690
4696
  return React__namespace.createElement(Text, { className: mainClassName, tag: "div" }, props.children);
4691
4697
  }
4692
4698
  const isDisabled = props.disabled || props.waiting;
4693
- return (React__namespace.createElement("a", Object.assign({}, linkProps, { tabIndex: disabled ? -1 : undefined, target: props.target, className: mainClassName, onClick: isDisabled ? e => {
4694
- e.stopPropagation();
4695
- e.preventDefault();
4696
- } : undefined }),
4699
+ return (React__namespace.createElement("a", Object.assign({}, linkProps, { tabIndex: disabled ? -1 : undefined, target: props.target, className: mainClassName, onClick: e => {
4700
+ var _a;
4701
+ if (isDisabled) {
4702
+ e.stopPropagation();
4703
+ e.preventDefault();
4704
+ }
4705
+ else {
4706
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
4707
+ }
4708
+ } }),
4697
4709
  React__namespace.createElement(LinkContent, Object.assign({}, props))));
4698
4710
  };
4699
4711
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mackin.com/styleguide",
3
- "version": "9.11.0",
3
+ "version": "9.11.2",
4
4
  "description": "",
5
5
  "main": "./index.js",
6
6
  "module": "./index.esm.js",