@citygross/components 0.8.87 → 0.8.88

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.
@@ -14,7 +14,7 @@ export declare type TLink = {
14
14
  isDisabled?: boolean;
15
15
  noWrap?: boolean;
16
16
  hrefPath?: string;
17
- onClick?: () => void;
17
+ onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
18
18
  children: React.ReactNode;
19
19
  icon?: JSX.Element;
20
20
  target?: '_self' | '_blank';
@@ -31,13 +31,13 @@ function Link(_a) {
31
31
  var isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, hrefPath = _a.hrefPath, icon = _a.icon, _b = _a.size, size = _b === void 0 ? typography.TextTypes.TextSize.REGULAR : _b, _c = _a.target, target = _c === void 0 ? '_self' : _c, borderRadius = _a.borderRadius, _d = _a.tabIndex, tabIndex = _d === void 0 ? 0 : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, children = _a.children, asButton = _a.asButton, _f = _a.variant, variant = _f === void 0 ? exports.ELinkVariant.PRIMARY : _f, props = _tslib.__rest(_a, ["isDisabled", "noWrap", "onClick", "hrefPath", "icon", "size", "target", "borderRadius", "tabIndex", "inverted", "children", "asButton", "variant"]);
32
32
  return asButton ? (React__default["default"].createElement(Link_styles.LinkAsButton, _tslib.__assign({ tabIndex: isDisabled ? -1 : tabIndex, isDisabled: isDisabled, noWrap: noWrap, variant: variant, onClick: onClick, onKeyDown: function (event) {
33
33
  if (event.key === 'Enter') {
34
- onClick && onClick();
34
+ onClick && onClick(event);
35
35
  }
36
36
  }, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted }, props),
37
37
  React__default["default"].createElement(typography.LinkText, { size: size }, children),
38
38
  icon && React__default["default"].createElement(Link_styles.IconWrapper, null, icon))) : (React__default["default"].createElement(Link_styles.BaseLink, _tslib.__assign({ tabIndex: isDisabled ? -1 : tabIndex, href: hrefPath, isDisabled: isDisabled, variant: variant, noWrap: noWrap, onClick: onClick, onKeyDown: function (event) {
39
39
  if (event.key === 'Enter') {
40
- onClick && onClick();
40
+ onClick && onClick(event);
41
41
  }
42
42
  }, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted, target: target }, props),
43
43
  React__default["default"].createElement(typography.LinkText, { size: size }, children),
@@ -23,13 +23,13 @@ function Link(_a) {
23
23
  var isDisabled = _a.isDisabled, noWrap = _a.noWrap, onClick = _a.onClick, hrefPath = _a.hrefPath, icon = _a.icon, _b = _a.size, size = _b === void 0 ? TextTypes.TextSize.REGULAR : _b, _c = _a.target, target = _c === void 0 ? '_self' : _c, borderRadius = _a.borderRadius, _d = _a.tabIndex, tabIndex = _d === void 0 ? 0 : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, children = _a.children, asButton = _a.asButton, _f = _a.variant, variant = _f === void 0 ? ELinkVariant.PRIMARY : _f, props = __rest(_a, ["isDisabled", "noWrap", "onClick", "hrefPath", "icon", "size", "target", "borderRadius", "tabIndex", "inverted", "children", "asButton", "variant"]);
24
24
  return asButton ? (React.createElement(LinkAsButton, __assign({ tabIndex: isDisabled ? -1 : tabIndex, isDisabled: isDisabled, noWrap: noWrap, variant: variant, onClick: onClick, onKeyDown: function (event) {
25
25
  if (event.key === 'Enter') {
26
- onClick && onClick();
26
+ onClick && onClick(event);
27
27
  }
28
28
  }, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted }, props),
29
29
  React.createElement(LinkText, { size: size }, children),
30
30
  icon && React.createElement(IconWrapper, null, icon))) : (React.createElement(BaseLink, __assign({ tabIndex: isDisabled ? -1 : tabIndex, href: hrefPath, isDisabled: isDisabled, variant: variant, noWrap: noWrap, onClick: onClick, onKeyDown: function (event) {
31
31
  if (event.key === 'Enter') {
32
- onClick && onClick();
32
+ onClick && onClick(event);
33
33
  }
34
34
  }, size: size, icon: icon, borderRadius: borderRadius, inverted: inverted, target: target }, props),
35
35
  React.createElement(LinkText, { size: size }, children),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components",
3
- "version": "0.8.87",
3
+ "version": "0.8.88",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "./build/cjs/components/src/index.js",
@@ -76,5 +76,5 @@
76
76
  "react-slick": "^0.30.1",
77
77
  "slick-carousel": "^1.8.1"
78
78
  },
79
- "gitHead": "455c924ff9eaf0fdab735053affaaf0e66ae9a9b"
79
+ "gitHead": "2a502f655401e04bc40a44339917ea0f9af84ac1"
80
80
  }