@commercetools-uikit/icon-button 18.4.0 → 19.0.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,10 +85,10 @@ 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.backgroundColorForButtonWhenDisabled, ";border-color:", designSystem.designTokens.colorSurface, ";color:", designSystem.designTokens.colorNeutral60, ";box-shadow:none;}" + ("" ), "" );
88
+ return /*#__PURE__*/react.css("&,&:hover{background-color:", designSystem.designTokens.backgroundColorForIconButtonWhenDisabled, ";border-color:", designSystem.designTokens.colorSurface, ";color:", designSystem.designTokens.colorNeutral60, ";box-shadow:none;}" + ("" ), "" );
89
89
  }
90
90
  if (!theme || theme === 'default') {
91
- return /*#__PURE__*/react.css("&:hover{background-color:", designSystem.designTokens.backgroundColorForButtonWhenHovered, ";box-shadow:", designSystem.designTokens.shadow0, ";}", isActive ? '&,' : '', " &:active{background-color:", designSystem.designTokens.backgroundColorForButtonWhenActive, ";box-shadow:", designSystem.designTokens.shadow0, ";border-color:", designSystem.designTokens.borderColorForButtonAsSecondary, ";}" + ("" ), "" );
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, ";}" + ("" ), "" );
92
92
  }
93
93
  switch (theme) {
94
94
  // TODO: These custom colors where itroduced in the Merchant Center redign 2023
@@ -120,6 +120,8 @@ const defaultProps = {
120
120
  isToggleButton: false
121
121
  };
122
122
  const IconButton = props => {
123
+ const _useTheme = designSystem.useTheme(),
124
+ themedValue = _useTheme.themedValue;
123
125
  const buttonAttributes = _objectSpread({
124
126
  'data-track-component': 'IconButton'
125
127
  }, utils.filterInvalidAttributes(props));
@@ -133,7 +135,7 @@ const IconButton = props => {
133
135
  isToggleButton: props.isToggleButton,
134
136
  isToggled: props.isToggled,
135
137
  isDisabled: props.isDisabled,
136
- css: [/*#__PURE__*/react.css("width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:1px solid ", designSystem.designTokens.borderColorForButtonAsSecondary, ";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), "" , "" ],
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), "" , "" ],
137
139
  children: props.icon && /*#__PURE__*/react$1.cloneElement(props.icon, {
138
140
  size: props.size,
139
141
  color: getIconThemeColor(props)
@@ -146,7 +148,7 @@ IconButton.displayName = 'IconButton';
146
148
  var IconButton$1 = IconButton;
147
149
 
148
150
  // NOTE: This string will be replaced on build time with the package version.
149
- var version = "18.4.0";
151
+ var version = "19.0.0";
150
152
 
151
153
  exports["default"] = IconButton$1;
152
154
  exports.version = version;