@citygross/components 0.7.135 → 0.7.136

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.
@@ -5,4 +5,4 @@ export declare type TIconButton = styles.TBaseSmallButton & {
5
5
  color?: TButtonColor;
6
6
  icon: JSX.Element;
7
7
  };
8
- export declare function IconButton({ color, height, icon, isDisabled, loading, noWrap, onClick, border, shadow, width }: TIconButton): JSX.Element;
8
+ export declare function IconButton({ color, height, icon, isDisabled, loading, noWrap, onClick, border, shadow, width, ...props }: TIconButton): JSX.Element;
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _tslib = require('../../../../_virtual/_tslib.js');
5
6
  var React = require('react');
6
7
  var designTokens = require('@citygross/design-tokens');
7
8
  var Button_styles = require('./Button.styles.js');
@@ -11,8 +12,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
12
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
13
 
13
14
  function IconButton(_a) {
14
- var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width;
15
- return (React__default["default"].createElement(Button_styles.BaseIconButton, { color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow },
15
+ var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, props = _tslib.__rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width"]);
16
+ return (React__default["default"].createElement(Button_styles.BaseIconButton, _tslib.__assign({ color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow }, props),
16
17
  loading && (React__default["default"].createElement(Button_styles.Loading, null,
17
18
  React__default["default"].createElement(Button_styles.LoadingContainer, null,
18
19
  React__default["default"].createElement(Button_styles.LoadingSpinner, null)))),
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"IconButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,11 @@
1
+ import { __rest, __assign } from '../../../../_virtual/_tslib.js';
1
2
  import React from 'react';
2
3
  import { theme } from '@citygross/design-tokens';
3
4
  import { BaseIconButton, Loading, LoadingContainer, LoadingSpinner } from './Button.styles.js';
4
5
 
5
6
  function IconButton(_a) {
6
- var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width;
7
- return (React.createElement(BaseIconButton, { color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow },
7
+ var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, props = __rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width"]);
8
+ return (React.createElement(BaseIconButton, __assign({ color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow }, props),
8
9
  loading && (React.createElement(Loading, null,
9
10
  React.createElement(LoadingContainer, null,
10
11
  React.createElement(LoadingSpinner, null)))),
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"IconButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components",
3
- "version": "0.7.135",
3
+ "version": "0.7.136",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "./build/cjs/components/src/index.js",
@@ -71,5 +71,5 @@
71
71
  "moment": "^2.29.1",
72
72
  "react-loading-skeleton": "^2.2.0"
73
73
  },
74
- "gitHead": "72a4d573f0537d454c73e7aa5d8bc00a81de69cd"
74
+ "gitHead": "08a38bd588b142b18fc2acf942dba385869600c9"
75
75
  }