@commercetools-uikit/icon-button 19.0.0 → 19.2.0

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.
@@ -85,7 +85,7 @@ const getSizeStyles = size => {
85
85
  };
86
86
  const getBaseStyles = (theme, isDisabled, isActive) => {
87
87
  if (isDisabled) {
88
- return /*#__PURE__*/react.css("&,&:hover{background-color:", designSystem.designTokens.backgroundColorForIconButtonWhenDisabled, ";border-color:", designSystem.designTokens.colorSurface, ";color:", designSystem.designTokens.colorNeutral60, ";box-shadow:none;}" + ("" ), "" );
88
+ return /*#__PURE__*/react.css("&,&:hover{background-color:", designSystem.designTokens.colorTransparent, ";border-color:", designSystem.designTokens.colorSurface, ";color:", designSystem.designTokens.colorNeutral60, ";box-shadow:none;}" + ("" ), "" );
89
89
  }
90
90
  if (!theme || theme === 'default') {
91
91
  return /*#__PURE__*/react.css("&:hover{background-color:", designSystem.designTokens.backgroundColorForButtonWhenHovered, ";box-shadow:", designSystem.designTokens.shadow0, ";}&:active{background-color:", designSystem.designTokens.backgroundColorForButtonWhenActive, ";box-shadow:", designSystem.designTokens.shadow0, ";border-color:", designSystem.designTokens.borderColorForButtonAsSecondary, ";}" + ("" ), "" );
@@ -96,7 +96,7 @@ const getBaseStyles = (theme, isDisabled, isActive) => {
96
96
  // #15A390 -> color-primary with 10% black opacity
97
97
  // #057FCC -> color-info with 10% black opacity
98
98
  case 'primary':
99
- return /*#__PURE__*/react.css("&:hover{background-color:", designSystem.designTokens.backgroundColorForButtonAsPrimaryWhenHovered, ";box-shadow:", designSystem.designTokens.shadow0, ";}", isActive ? '&,' : '', " &:active{background-color:", designSystem.designTokens.backgroundColorForButtonAsPrimary, ";box-shadow:", designSystem.designTokens.shadow0, ";}", isActive ? '&,' : '', " &:hover,&:active{border-color:", designSystem.designTokens.colorNeutral, ";}" + ("" ), "" );
99
+ return /*#__PURE__*/react.css("&:hover{background-color:", designSystem.designTokens.colorPrimary40, ";box-shadow:", designSystem.designTokens.shadow0, ";}", isActive ? '&,' : '', " &:active{background-color:", designSystem.designTokens.colorPrimary, ";box-shadow:", designSystem.designTokens.shadow0, ";}", isActive ? '&,' : '', " &:hover,&:active{border-color:", designSystem.designTokens.colorNeutral, ";}" + ("" ), "" );
100
100
  case 'info':
101
101
  return /*#__PURE__*/react.css("&:hover{background-color:", designSystem.designTokens.colorInfo, ";box-shadow:", designSystem.designTokens.shadow0, ";}", isActive ? '&,' : '', " &:active{background-color:#057fcc;box-shadow:", designSystem.designTokens.shadow0, ";}", isActive ? '&,' : '', " &:hover,&:active{border-color:", designSystem.designTokens.colorNeutral, ";}" + ("" ), "" );
102
102
  default:
@@ -120,8 +120,6 @@ const defaultProps = {
120
120
  isToggleButton: false
121
121
  };
122
122
  const IconButton = props => {
123
- const _useTheme = designSystem.useTheme(),
124
- themedValue = _useTheme.themedValue;
125
123
  const buttonAttributes = _objectSpread({
126
124
  'data-track-component': 'IconButton'
127
125
  }, utils.filterInvalidAttributes(props));
@@ -135,7 +133,7 @@ const IconButton = props => {
135
133
  isToggleButton: props.isToggleButton,
136
134
  isToggled: props.isToggled,
137
135
  isDisabled: props.isDisabled,
138
- css: [/*#__PURE__*/react.css("width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:", themedValue("1px solid ".concat(designSystem.designTokens.borderColorForButtonAsSecondary), 'none'), ";background-color:", designSystem.designTokens.colorSurface, ";box-shadow:", designSystem.designTokens.shadow0, ";color:", designSystem.designTokens.fontColorForButtonAsSecondary, ";*{fill:", designSystem.designTokens.fontColorForButtonAsSecondary, ";}transition:background-color ", designSystem.designTokens.transitionLinear80Ms, ",box-shadow 150ms ease-in-out;" + ("" ), "" ), getBaseStyles(props.theme, props.isDisabled, isActive), getShapeStyles('square', props.size), getSizeStyles(props.size), getHoverStyles(props.isDisabled, props.theme), "" , "" ],
136
+ css: [/*#__PURE__*/react.css("width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:none;background-color:", designSystem.designTokens.colorSurface, ";box-shadow:", designSystem.designTokens.shadow0, ";color:", designSystem.designTokens.fontColorForButtonAsSecondary, ";*{fill:", designSystem.designTokens.fontColorForButtonAsSecondary, ";}transition:background-color ", designSystem.designTokens.transitionLinear80Ms, ",box-shadow 150ms ease-in-out;" + ("" ), "" ), getBaseStyles(props.theme, props.isDisabled, isActive), getShapeStyles('square', props.size), getSizeStyles(props.size), getHoverStyles(props.isDisabled, props.theme), "" , "" ],
139
137
  children: props.icon && /*#__PURE__*/react$1.cloneElement(props.icon, {
140
138
  size: props.size,
141
139
  color: getIconThemeColor(props)
@@ -148,7 +146,7 @@ IconButton.displayName = 'IconButton';
148
146
  var IconButton$1 = IconButton;
149
147
 
150
148
  // NOTE: This string will be replaced on build time with the package version.
151
- var version = "19.0.0";
149
+ var version = "19.2.0";
152
150
 
153
151
  exports["default"] = IconButton$1;
154
152
  exports.version = version;