@hig/icon-button
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -37,6 +37,6 @@ import React, { Component } from 'react'; | ||
var isDynamic = variant === "dynamic"; | ||
var dynamicHoverIconColor = on ? themeData["iconButton.hover.on.iconColor"] : themeData["iconButton.hover.iconColor"]; | ||
var dynamicHoverIconColor = on ? themeData["iconButton.dynamic.on.hover.iconColor"] : themeData["iconButton.dynamic.hover.iconColor"]; | ||
var hoverIconColor = isDynamic ? dynamicHoverIconColor : ""; | ||
var staticSurfaceLevelBackgroundColor = surfaceLevel <= 250 ? themeData["iconButton.static.hover.level100To250.backgroundColor"] : themeData["iconButton.static.hover.level300To350.backgroundColor"]; | ||
var staticHoverBackgroundColor = on ? themeData["iconButton.static.on.hover.level100To250.backgroundColor"] : staticSurfaceLevelBackgroundColor; | ||
var staticSurfaceLevelBackgroundColor = surfaceLevel <= 250 ? themeData["iconButton.static.hover.100To250BackgroundColor"] : themeData["iconButton.static.hover.300To350BackgroundColor"]; | ||
var staticHoverBackgroundColor = on ? themeData["iconButton.static.on.hover.100To250BackgroundColor"] : staticSurfaceLevelBackgroundColor; | ||
var backgroundColor = !isDynamic ? staticHoverBackgroundColor : "transparent"; | ||
@@ -58,3 +58,3 @@ var staticBorderColor = on ? themeData["iconButton.static.on.hover.borderColor"] : "transparent"; | ||
var isDynamic = variant === "dynamic"; | ||
var dynamicFocusIconColor = on ? themeData["iconButton.focus.on.iconColor"] : themeData["iconButton.focus.iconColor"]; | ||
var dynamicFocusIconColor = on ? themeData["iconButton.dynamic.on.focus.iconColor"] : themeData["iconButton.dynamic.focus.iconColor"]; | ||
var focusIconColor = isDynamic ? dynamicFocusIconColor : ""; | ||
@@ -66,3 +66,3 @@ var staticBorderColor = on ? themeData["iconButton.static.on.focus.borderColor"] : "transparent"; | ||
borderColor: borderColor, | ||
boxShadow: "0 0 0 " + themeData["iconButton.focus.halo.width"] + " " + themeData["iconButton.focus.halo.color"], | ||
boxShadow: "0 0 0 " + themeData["iconButton.focus.haloWidth"] + " " + themeData["iconButton.focus.haloColor"], | ||
transitionDuration: "0.3s, 0.3s", | ||
@@ -77,6 +77,6 @@ "& svg *": _extends({}, getDefaultIconTransitionProperties(), { | ||
var surfaceLevel = Number(surface); | ||
var dynamicPressedIconColor = on ? themeData["iconButton.pressed.on.iconColor"] : themeData["iconButton.pressed.iconColor"]; | ||
var dynamicPressedIconColor = on ? themeData["iconButton.dynamic.on.pressed.iconColor"] : themeData["iconButton.dynamic.pressed.iconColor"]; | ||
var pressedIconColor = variant === "dynamic" ? dynamicPressedIconColor : ""; | ||
return { | ||
backgroundColor: surfaceLevel <= 250 ? themeData["iconButton.pressed.level100To250.backgroundColor"] : themeData["iconButton.pressed.level300To350.backgroundColor"], | ||
backgroundColor: surfaceLevel <= 250 ? themeData["iconButton.dynamic.pressed.100To250BackgroundColor"] : themeData["iconButton.dynamic.pressed.300To350BackgroundColor"], | ||
borderColor: "transparent", | ||
@@ -92,3 +92,3 @@ transitionDuration: "0.3s, 0.3s", | ||
return { | ||
opacity: themeData["component.disabled.opacity"], | ||
opacity: themeData["colorScheme.opacity.disabled"], | ||
pointerEvents: "none" | ||
@@ -109,3 +109,3 @@ }; | ||
var isDynamic = variant === "dynamic"; | ||
var dynamicIconColor = on ? themeData["iconButton.on.iconColor"] : themeData["iconButton.iconColor"]; | ||
var dynamicIconColor = on ? themeData["iconButton.dynamic.on.default.iconColor"] : themeData["iconButton.dynamic.default.iconColor"]; | ||
var iconColor = isDynamic ? dynamicIconColor : ""; | ||
@@ -115,4 +115,4 @@ | ||
iconButton: _extends({ | ||
backgroundColor: !isDynamic && on ? themeData["iconButton.static.on.backgroundColor"] : "transparent", | ||
borderColor: !isDynamic && on ? themeData["iconButton.static.on.borderColor"] : "transparent", | ||
backgroundColor: !isDynamic && on ? themeData["iconButton.static.on.default.backgroundColor"] : "transparent", | ||
borderColor: !isDynamic && on ? themeData["iconButton.static.on.default.borderColor"] : "transparent", | ||
borderStyle: "solid", | ||
@@ -119,0 +119,0 @@ borderWidth: "1px", |
@@ -44,6 +44,6 @@ 'use strict'; | ||
var isDynamic = variant === "dynamic"; | ||
var dynamicHoverIconColor = on ? themeData["iconButton.hover.on.iconColor"] : themeData["iconButton.hover.iconColor"]; | ||
var dynamicHoverIconColor = on ? themeData["iconButton.dynamic.on.hover.iconColor"] : themeData["iconButton.dynamic.hover.iconColor"]; | ||
var hoverIconColor = isDynamic ? dynamicHoverIconColor : ""; | ||
var staticSurfaceLevelBackgroundColor = surfaceLevel <= 250 ? themeData["iconButton.static.hover.level100To250.backgroundColor"] : themeData["iconButton.static.hover.level300To350.backgroundColor"]; | ||
var staticHoverBackgroundColor = on ? themeData["iconButton.static.on.hover.level100To250.backgroundColor"] : staticSurfaceLevelBackgroundColor; | ||
var staticSurfaceLevelBackgroundColor = surfaceLevel <= 250 ? themeData["iconButton.static.hover.100To250BackgroundColor"] : themeData["iconButton.static.hover.300To350BackgroundColor"]; | ||
var staticHoverBackgroundColor = on ? themeData["iconButton.static.on.hover.100To250BackgroundColor"] : staticSurfaceLevelBackgroundColor; | ||
var backgroundColor = !isDynamic ? staticHoverBackgroundColor : "transparent"; | ||
@@ -65,3 +65,3 @@ var staticBorderColor = on ? themeData["iconButton.static.on.hover.borderColor"] : "transparent"; | ||
var isDynamic = variant === "dynamic"; | ||
var dynamicFocusIconColor = on ? themeData["iconButton.focus.on.iconColor"] : themeData["iconButton.focus.iconColor"]; | ||
var dynamicFocusIconColor = on ? themeData["iconButton.dynamic.on.focus.iconColor"] : themeData["iconButton.dynamic.focus.iconColor"]; | ||
var focusIconColor = isDynamic ? dynamicFocusIconColor : ""; | ||
@@ -73,3 +73,3 @@ var staticBorderColor = on ? themeData["iconButton.static.on.focus.borderColor"] : "transparent"; | ||
borderColor: borderColor, | ||
boxShadow: "0 0 0 " + themeData["iconButton.focus.halo.width"] + " " + themeData["iconButton.focus.halo.color"], | ||
boxShadow: "0 0 0 " + themeData["iconButton.focus.haloWidth"] + " " + themeData["iconButton.focus.haloColor"], | ||
transitionDuration: "0.3s, 0.3s", | ||
@@ -84,6 +84,6 @@ "& svg *": _extends({}, getDefaultIconTransitionProperties(), { | ||
var surfaceLevel = Number(surface); | ||
var dynamicPressedIconColor = on ? themeData["iconButton.pressed.on.iconColor"] : themeData["iconButton.pressed.iconColor"]; | ||
var dynamicPressedIconColor = on ? themeData["iconButton.dynamic.on.pressed.iconColor"] : themeData["iconButton.dynamic.pressed.iconColor"]; | ||
var pressedIconColor = variant === "dynamic" ? dynamicPressedIconColor : ""; | ||
return { | ||
backgroundColor: surfaceLevel <= 250 ? themeData["iconButton.pressed.level100To250.backgroundColor"] : themeData["iconButton.pressed.level300To350.backgroundColor"], | ||
backgroundColor: surfaceLevel <= 250 ? themeData["iconButton.dynamic.pressed.100To250BackgroundColor"] : themeData["iconButton.dynamic.pressed.300To350BackgroundColor"], | ||
borderColor: "transparent", | ||
@@ -99,3 +99,3 @@ transitionDuration: "0.3s, 0.3s", | ||
return { | ||
opacity: themeData["component.disabled.opacity"], | ||
opacity: themeData["colorScheme.opacity.disabled"], | ||
pointerEvents: "none" | ||
@@ -116,3 +116,3 @@ }; | ||
var isDynamic = variant === "dynamic"; | ||
var dynamicIconColor = on ? themeData["iconButton.on.iconColor"] : themeData["iconButton.iconColor"]; | ||
var dynamicIconColor = on ? themeData["iconButton.dynamic.on.default.iconColor"] : themeData["iconButton.dynamic.default.iconColor"]; | ||
var iconColor = isDynamic ? dynamicIconColor : ""; | ||
@@ -122,4 +122,4 @@ | ||
iconButton: _extends({ | ||
backgroundColor: !isDynamic && on ? themeData["iconButton.static.on.backgroundColor"] : "transparent", | ||
borderColor: !isDynamic && on ? themeData["iconButton.static.on.borderColor"] : "transparent", | ||
backgroundColor: !isDynamic && on ? themeData["iconButton.static.on.default.backgroundColor"] : "transparent", | ||
borderColor: !isDynamic && on ? themeData["iconButton.static.on.default.borderColor"] : "transparent", | ||
borderStyle: "solid", | ||
@@ -126,0 +126,0 @@ borderWidth: "1px", |
@@ -0,1 +1,8 @@ | ||
# [@hig/icon-button-v2.4.1](https://github.com/Autodesk/hig/compare/@hig/icon-button@2.4.0...@hig/icon-button@2.4.1) (2020-05-12) | ||
### Bug Fixes | ||
* stop using deprecated theme-data roles ([1409974](https://github.com/Autodesk/hig/commit/1409974)) | ||
# [@hig/icon-button-v2.4.0](https://github.com/Autodesk/hig/compare/@hig/icon-button@2.3.2...@hig/icon-button@2.4.0) (2020-04-27) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@hig/icon-button", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "HIG IconButton component", | ||
@@ -35,3 +35,3 @@ "author": "Autodesk Inc.", | ||
"@hig/theme-context": "^3.0.0", | ||
"@hig/theme-data": "^2.15.1", | ||
"@hig/theme-data": "^2.16.0", | ||
"react": "^15.4.1 || ^16.3.2" | ||
@@ -38,0 +38,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53716