@idea-fragments/react-components-zendesk 0.1.37 → 0.1.38

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.
package/dist/tags.js CHANGED
@@ -2329,7 +2329,8 @@ var light = function (c, amount) {
2329
2329
  // console.log("luminosity new:", Color(newColor).luminosity())
2330
2330
 
2331
2331
  return newColor;
2332
- };
2332
+ }; // Deprecated. Do not use
2333
+
2333
2334
 
2334
2335
  var Chip = styled__default["default"](XXS).attrs(function (_a) {
2335
2336
  var danger = _a.danger,
@@ -6018,10 +6019,24 @@ var Tag$1 = TagComponent;
6018
6019
  Tag$1.Avatar = Avatar;
6019
6020
  Tag$1.Close = Close$1;
6020
6021
  var Close = styled__default["default"](Tag$1.Close)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n"], ["\n\n"])));
6021
- var Tag = styled__default["default"](Tag$1)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n && {\n cursor: ", ";\n }\n"], ["\n && {\n cursor: ", ";\n }\n"])), function (_a) {
6022
+ var Tag = styled__default["default"](Tag$1).attrs(function (props) {
6023
+ return {
6024
+ hue: finalizeColor(props)
6025
+ };
6026
+ })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n && {\n cursor: ", ";\n }\n"], ["\n && {\n cursor: ", ";\n }\n"])), function (_a) {
6022
6027
  var onClick = _a.onClick;
6023
6028
  return onClick ? "pointer" : "initial";
6024
6029
  });
6030
+
6031
+ var finalizeColor = function (_a) {
6032
+ var color = _a.color,
6033
+ success = _a.success,
6034
+ theme = _a.theme;
6035
+ if (success) return theme.styles.colorSuccess;
6036
+ if (color) return color;
6037
+ return undefined;
6038
+ };
6039
+
6025
6040
  var templateObject_1, templateObject_2;
6026
6041
  exports.Chip = Chip;
6027
6042
  exports.Close = Close;