@mackin.com/styleguide 9.11.1 → 9.11.3

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 +11 -5
  2. package/index.js +11 -5
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -3039,7 +3039,7 @@ const generateLinkStyles = (props, theme) => {
3039
3039
  };
3040
3040
 
3041
3041
  const OmniLink = (props) => {
3042
- const { noRouter, rightIcon, leftIcon, block, iconBlock, variant, round, small, colorOverride, children, ref } = props, linkProps = __rest(props, ["noRouter", "rightIcon", "leftIcon", "block", "iconBlock", "variant", "round", "small", "colorOverride", "children", "ref"]);
3042
+ const { noRouter, rightIcon, leftIcon, block, iconBlock, variant, round, small, colorOverride, children, ref, waiting } = props, linkProps = __rest(props, ["noRouter", "rightIcon", "leftIcon", "block", "iconBlock", "variant", "round", "small", "colorOverride", "children", "ref", "waiting"]);
3043
3043
  const theme = useThemeSafely();
3044
3044
  const linkStyles = generateLinkStyles(props, theme);
3045
3045
  const mainClassName = cx('omniLink', linkStyles, props.className);
@@ -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';
package/index.js CHANGED
@@ -3066,7 +3066,7 @@ const generateLinkStyles = (props, theme) => {
3066
3066
  };
3067
3067
 
3068
3068
  const OmniLink = (props) => {
3069
- const { noRouter, rightIcon, leftIcon, block, iconBlock, variant, round, small, colorOverride, children, ref } = props, linkProps = __rest(props, ["noRouter", "rightIcon", "leftIcon", "block", "iconBlock", "variant", "round", "small", "colorOverride", "children", "ref"]);
3069
+ const { noRouter, rightIcon, leftIcon, block, iconBlock, variant, round, small, colorOverride, children, ref, waiting } = props, linkProps = __rest(props, ["noRouter", "rightIcon", "leftIcon", "block", "iconBlock", "variant", "round", "small", "colorOverride", "children", "ref", "waiting"]);
3070
3070
  const theme = useThemeSafely();
3071
3071
  const linkStyles = generateLinkStyles(props, theme);
3072
3072
  const mainClassName = css.cx('omniLink', linkStyles, props.className);
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mackin.com/styleguide",
3
- "version": "9.11.1",
3
+ "version": "9.11.3",
4
4
  "description": "",
5
5
  "main": "./index.js",
6
6
  "module": "./index.esm.js",