@widergy/energy-ui 3.12.0 → 3.13.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [3.13.0](https://github.com/widergy/energy-ui/compare/v3.12.1...v3.13.0) (2024-07-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * utpanel added prop ([e999fb1](https://github.com/widergy/energy-ui/commit/e999fb179562d14496d71798b4de912f77e3fbff))
7
+
8
+ ## [3.12.1](https://github.com/widergy/energy-ui/compare/v3.12.0...v3.12.1) (2024-07-18)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update uticon ([#464](https://github.com/widergy/energy-ui/issues/464)) ([c5320e6](https://github.com/widergy/energy-ui/commit/c5320e69a02d0840cf690194341d52f2406e7ae5))
14
+
1
15
  # [3.12.0](https://github.com/widergy/energy-ui/compare/v3.11.0...v3.12.0) (2024-07-17)
2
16
 
3
17
 
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.variantsColorTheme = exports.retrieveStyle = void 0;
7
7
  var _constants = require("./constants");
8
8
  const variantsColorTheme = (theme, colorTheme) => {
9
+ var _theme$Palette$action;
9
10
  const colorName = _constants.COLORS_MAPPER[colorTheme] || _constants.COLORS_MAPPER[_constants.DEFAULT_PROPS.colorTheme];
10
- const paletteTheme = theme.Palette[colorName] || theme.Palette.actions[colorName];
11
+ const paletteTheme = theme.Palette[colorName] || ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action[colorName]);
11
12
  const backgroundColorMapper = {
12
13
  alert: paletteTheme['04'],
13
14
  information: paletteTheme['05'],
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VARIANTS = exports.SIZES = exports.SHADOW_MAPPER = exports.ICON_PLACEMENTS = exports.DEFAULT_PROPS = exports.COLORS_MAPPER = void 0;
7
+ var _Palette = require("../../constants/Palette");
7
8
  const VARIANTS = exports.VARIANTS = {
8
9
  filled: 'contained',
9
10
  outlined: 'outlined',
@@ -30,11 +31,11 @@ const DEFAULT_PROPS = exports.DEFAULT_PROPS = {
30
31
  variant: 'filled'
31
32
  };
32
33
  const COLORS_MAPPER = exports.COLORS_MAPPER = {
33
- error: 'error',
34
- negative: 'negative',
35
- primary: 'accent',
36
- secondary: 'neutral',
37
- success: 'success'
34
+ error: _Palette.COLOR_THEMES.error,
35
+ negative: _Palette.COLOR_THEMES.negative,
36
+ primary: _Palette.COLOR_THEMES.accent,
37
+ secondary: _Palette.COLOR_THEMES.neutral,
38
+ success: _Palette.COLOR_THEMES.success
38
39
  };
39
40
  const SHADOW_MAPPER = exports.SHADOW_MAPPER = {
40
41
  [COLORS_MAPPER.error]: 'accentError',
@@ -10,10 +10,11 @@ var _constants = require("./constants");
10
10
  const variantsColorTheme = (theme, colorTheme, variant) => {
11
11
  var _theme$Palette$shadow;
12
12
  const actionColorName = _constants.COLORS_MAPPER[colorTheme] || _constants.COLORS_MAPPER[_constants.DEFAULT_PROPS.colorTheme];
13
- const actionTheme = theme.Palette.actions[actionColorName];
13
+ const actionPaletteColors = theme.Palette.actions || theme.Palette;
14
+ const actionTheme = actionPaletteColors[actionColorName];
14
15
  const shadowTheme = ((_theme$Palette$shadow = theme.Palette.shadows) === null || _theme$Palette$shadow === void 0 ? void 0 : _theme$Palette$shadow[_constants.SHADOW_MAPPER[actionColorName]]) || 'transparent';
15
- const negativeTheme = theme.Palette.actions[_constants.COLORS_MAPPER.negative];
16
- const neutralTheme = theme.Palette.actions[_constants.COLORS_MAPPER.secondary];
16
+ const negativeTheme = actionPaletteColors[_constants.COLORS_MAPPER.negative];
17
+ const neutralTheme = actionPaletteColors[_constants.COLORS_MAPPER.secondary];
17
18
  const definition = {
18
19
  filled: {
19
20
  backgroundColor: actionTheme['04'],
@@ -7,8 +7,9 @@ exports.variantsColorTheme = exports.retrieveStyle = void 0;
7
7
  var _classesUtils = require("../../utils/classesUtils");
8
8
  var _constants = require("./constants");
9
9
  const variantsColorTheme = (colorTheme, theme) => {
10
+ var _theme$Palette$action;
10
11
  const actionColorName = _constants.COLORS_MAPPER[colorTheme] || _constants.COLORS_MAPPER[_constants.DEFAULT_PROPS.colorTheme];
11
- const actionTheme = theme.Palette.actions[actionColorName];
12
+ const actionTheme = ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action[actionColorName]) || theme.Palette[actionColorName];
12
13
  return actionTheme['05'];
13
14
  };
14
15
  exports.variantsColorTheme = variantsColorTheme;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.retrieveStyle = void 0;
7
7
  const retrieveStyle = _ref => {
8
+ var _theme$Palette$action;
8
9
  let {
9
10
  theme
10
11
  } = _ref;
@@ -43,7 +44,7 @@ const retrieveStyle = _ref => {
43
44
  padding: '12px 0'
44
45
  },
45
46
  resultIcon: {
46
- color: theme.Palette.actions.neutral['05'],
47
+ color: ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action.neutral['05']) || theme.Palette.neutral['05'],
47
48
  minWidth: '20px'
48
49
  }
49
50
  };
@@ -10,12 +10,13 @@ The icon name must be with the first letter of each word in uppercase.
10
10
 
11
11
  ### Props
12
12
 
13
- | Name | Description |
14
- | --------- | ----------------------------------- |
15
- | name | The name of the icon in TablerIcons |
16
- | classname | The classname to aplied to the Icon |
17
- | color | The icon color |
18
- | size | The icon size in px |
13
+ | Name | Description |
14
+ | ----------- | ----------------------------------- |
15
+ | name | The name of the icon in TablerIcons |
16
+ | classname | The classname to aplied to the Icon |
17
+ | colorTheme | The icon color |
18
+ | shade | The icon color shade |
19
+ | size | The icon size in px |
19
20
 
20
21
  ### Usage
21
22
 
@@ -27,7 +28,7 @@ import styles from './styles.module.scss';
27
28
  const MyComponent = () => {
28
29
  return (
29
30
  <div>
30
- <UTIcon name="IconArrowLeft" color="red" size={48} className={styles.iconClassname} />
31
+ <UTIcon name="IconArrowLeft" colorTheme="dark" size={48} className={styles.iconClassname} />
31
32
  </div>
32
33
  );
33
34
  };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FILLED_ICON_SUFIX = exports.FILLED_ICON_COLOR = void 0;
7
+ const FILLED_ICON_COLOR = exports.FILLED_ICON_COLOR = 'transparent';
8
+ const FILLED_ICON_SUFIX = exports.FILLED_ICON_SUFIX = 'Filled';
@@ -7,6 +7,8 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = require("prop-types");
9
9
  var TablerIcons = _interopRequireWildcard(require("@tabler/icons-react"));
10
+ var _WithTheme = _interopRequireDefault(require("../WithTheme"));
11
+ var _theme = require("./theme");
10
12
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
13
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -14,21 +16,41 @@ const UTIcon = _ref => {
14
16
  let {
15
17
  className,
16
18
  color,
19
+ colorTheme,
17
20
  name,
18
- size
21
+ shade,
22
+ size,
23
+ theme
19
24
  } = _ref;
25
+ const {
26
+ iconColor,
27
+ iconStyle
28
+ } = (0, _theme.retrieveColor)({
29
+ color,
30
+ colorTheme,
31
+ name,
32
+ shade,
33
+ theme
34
+ });
20
35
  const IconComponent = TablerIcons[name];
21
36
  if (!IconComponent) return null;
22
37
  return /*#__PURE__*/_react.default.createElement(IconComponent, {
23
38
  className: className,
24
- color: color,
25
- size: size
39
+ color: iconColor,
40
+ size: size,
41
+ style: iconStyle
26
42
  });
27
43
  };
28
44
  UTIcon.propTypes = {
29
45
  className: _propTypes.string,
46
+ /**
47
+ * @deprecated The "color" prop is deprecated and will be removed in a future release. Please use "colorTheme" instead.
48
+ */
30
49
  color: _propTypes.string,
50
+ colorTheme: _propTypes.string,
31
51
  name: _propTypes.string,
32
- size: _propTypes.number
52
+ shade: _propTypes.string,
53
+ size: _propTypes.number,
54
+ theme: _propTypes.object
33
55
  };
34
- var _default = exports.default = UTIcon;
56
+ var _default = exports.default = (0, _WithTheme.default)()(UTIcon);
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.retrieveColor = void 0;
7
+ var _Palette = require("../../constants/Palette");
8
+ var _constants = require("./constants");
9
+ const getDefaultColorShade = colorTheme => colorTheme === _Palette.COLOR_THEMES.gray ? _Palette.COLOR_SHADES.shade04 : colorTheme === _Palette.COLOR_THEMES.light ? _Palette.COLOR_SHADES.shade01 : _Palette.COLOR_SHADES.shade05;
10
+ const getIconColorDefinition = (color, iconName) => {
11
+ const filled = iconName.endsWith(_constants.FILLED_ICON_SUFIX);
12
+ return {
13
+ iconColor: filled ? _constants.FILLED_ICON_COLOR : color,
14
+ iconStyle: filled ? {
15
+ color
16
+ } : {}
17
+ };
18
+ };
19
+ const retrieveColor = _ref => {
20
+ var _theme$Palette$action;
21
+ let {
22
+ color,
23
+ colorTheme,
24
+ name,
25
+ shade,
26
+ theme
27
+ } = _ref;
28
+ if (color) return getIconColorDefinition(color, name);
29
+ if (!colorTheme) return {};
30
+ const colorThemeDefinition = theme.Palette[colorTheme] || ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action[colorTheme]);
31
+ const colorShade = shade || getDefaultColorShade(colorTheme);
32
+ return getIconColorDefinition(colorThemeDefinition[colorShade], name);
33
+ };
34
+ exports.retrieveColor = retrieveColor;
@@ -3,18 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WEIGHTS = exports.VARIANTS_SIZES = exports.VARIANTS_LINE_HEIGHT = exports.VARIANTS = exports.SHADES = exports.MARKDOWN_RENDERERS = exports.DEFAULT_PROPS = exports.COLOR_THEMES = void 0;
6
+ exports.WEIGHTS = exports.VARIANTS_SIZES = exports.VARIANTS_LINE_HEIGHT = exports.VARIANTS = exports.MARKDOWN_RENDERERS = exports.DEFAULT_PROPS = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
+ var _Palette = require("../../constants/Palette");
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
10
  /* eslint-disable react/prop-types */
10
11
 
11
- const SHADES = exports.SHADES = {
12
- shade01: '01',
13
- shade02: '02',
14
- shade03: '03',
15
- shade04: '04',
16
- shade05: '05'
17
- };
18
12
  const VARIANTS = exports.VARIANTS = {
19
13
  title1: 'h1',
20
14
  title2: 'h2',
@@ -62,15 +56,6 @@ const WEIGHTS = exports.WEIGHTS = {
62
56
  extrabold: 800,
63
57
  black: 900
64
58
  };
65
- const COLOR_THEMES = exports.COLOR_THEMES = {
66
- dark: 'dark',
67
- gray: 'gray',
68
- light: 'light',
69
- success: 'success',
70
- error: 'error',
71
- warning: 'warning',
72
- information: 'information'
73
- };
74
59
  const MARKDOWN_RENDERERS = exports.MARKDOWN_RENDERERS = {
75
60
  a: _ref => {
76
61
  let {
@@ -85,7 +70,7 @@ const MARKDOWN_RENDERERS = exports.MARKDOWN_RENDERERS = {
85
70
  }
86
71
  };
87
72
  const DEFAULT_PROPS = exports.DEFAULT_PROPS = {
88
- colorTheme: 'dark',
73
+ colorTheme: _Palette.COLOR_THEMES.dark,
89
74
  field: {},
90
75
  markdownRenderers: MARKDOWN_RENDERERS,
91
76
  variant: 'body',
@@ -5,16 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.retrieveStyle = void 0;
7
7
  var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
8
+ var _Palette = require("../../constants/Palette");
8
9
  var _constants = require("./constants");
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- const getDefaultColorShade = colorTheme => colorTheme === _constants.COLOR_THEMES.gray ? _constants.SHADES.shade04 : colorTheme === _constants.COLOR_THEMES.light ? _constants.SHADES.shade01 : _constants.SHADES.shade05;
11
+ const getDefaultColorShade = colorTheme => colorTheme === _Palette.COLOR_THEMES.gray ? _Palette.COLOR_SHADES.shade04 : colorTheme === _Palette.COLOR_THEMES.light ? _Palette.COLOR_SHADES.shade01 : _Palette.COLOR_SHADES.shade05;
11
12
  const variantsColorTheme = (colorTheme, shade, theme) => {
12
- const colorThemeDefinition = theme.Palette[colorTheme] || theme.Palette.actions[colorTheme] || theme.Palette[_constants.DEFAULT_PROPS.colorTheme];
13
- const colorShade = Object.values(_constants.SHADES).includes(shade) ? shade : getDefaultColorShade(colorTheme);
13
+ var _theme$Palette$action;
14
+ const colorThemeDefinition = theme.Palette[colorTheme] || ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action[colorTheme]) || theme.Palette[_constants.DEFAULT_PROPS.colorTheme];
15
+ const colorShade = Object.values(_Palette.COLOR_SHADES).includes(shade) ? shade : getDefaultColorShade(colorTheme);
14
16
  return colorThemeDefinition[colorShade] || _colorsModule.default.black;
15
17
  };
16
18
  const linkColor = (theme, colorTheme) => {
17
- const color = colorTheme === _constants.COLOR_THEMES.light ? theme.Palette.actions.negative[_constants.SHADES.shade05] : colorTheme === _constants.COLOR_THEMES.error ? theme.Palette.actions.error[_constants.SHADES.shade05] : theme.Palette.actions.neutral[_constants.SHADES.shade05];
19
+ const actionPaletteColors = theme.Palette.actions || theme.Palette;
20
+ const color = colorTheme === _Palette.COLOR_THEMES.light ? actionPaletteColors.negative[_Palette.COLOR_SHADES.shade05] : colorTheme === _Palette.COLOR_THEMES.error ? actionPaletteColors.error[_Palette.COLOR_SHADES.shade05] : actionPaletteColors.neutral[_Palette.COLOR_SHADES.shade05];
18
21
  return color;
19
22
  };
20
23
  const retrieveStyle = _ref => {
@@ -24,17 +24,19 @@ const getLabelTheme = _ref2 => {
24
24
  }[variant];
25
25
  };
26
26
  const getButtonTheme = _ref3 => {
27
+ var _theme$Palette$action, _theme$Palette$action2, _theme$Palette$action3;
27
28
  let {
28
29
  theme,
29
30
  variant
30
31
  } = _ref3;
31
32
  return {
32
- [_constants.VARIANTS.dark]: theme.Palette.actions.negative['04'],
33
- [_constants.VARIANTS.information]: theme.Palette.actions.negative['04'],
34
- [_constants.VARIANTS.light]: theme.Palette.actions.accent['04']
33
+ [_constants.VARIANTS.dark]: ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action.negative['04']) || theme.Palette.negative['04'],
34
+ [_constants.VARIANTS.information]: ((_theme$Palette$action2 = theme.Palette.actions) === null || _theme$Palette$action2 === void 0 ? void 0 : _theme$Palette$action2.negative['04']) || theme.Palette.negative['04'],
35
+ [_constants.VARIANTS.light]: ((_theme$Palette$action3 = theme.Palette.actions) === null || _theme$Palette$action3 === void 0 ? void 0 : _theme$Palette$action3.accent['04']) || theme.Palette.accent['04']
35
36
  }[variant];
36
37
  };
37
38
  const getButtonNextTextTheme = _ref4 => {
39
+ var _theme$Palette$action4;
38
40
  let {
39
41
  theme,
40
42
  variant
@@ -42,7 +44,7 @@ const getButtonNextTextTheme = _ref4 => {
42
44
  return {
43
45
  [_constants.VARIANTS.dark]: theme.Palette.dark['05'],
44
46
  [_constants.VARIANTS.information]: theme.Palette.dark['05'],
45
- [_constants.VARIANTS.light]: theme.Palette.actions.negative['05']
47
+ [_constants.VARIANTS.light]: ((_theme$Palette$action4 = theme.Palette.actions) === null || _theme$Palette$action4 === void 0 ? void 0 : _theme$Palette$action4.negative['05']) || theme.Palette.negative['05']
46
48
  }[variant];
47
49
  };
48
50
  const validateProps = _ref5 => {
@@ -15,6 +15,7 @@ var _UTLabel = _interopRequireDefault(require("../UTLabel"));
15
15
  var _commonTypes = require("../../types/commonTypes");
16
16
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
17
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
18
19
  const UTPanel = _ref => {
19
20
  let {
20
21
  children,
@@ -30,7 +31,8 @@ const UTPanel = _ref => {
30
31
  perfectScrollbarOptions,
31
32
  title,
32
33
  TitleComponent,
33
- TitleIcon
34
+ TitleIcon,
35
+ ...props
34
36
  } = _ref;
35
37
  const {
36
38
  title: titleClass,
@@ -41,7 +43,7 @@ const UTPanel = _ref => {
41
43
  iconClose: iconCloseClass,
42
44
  ...drawerClasses
43
45
  } = classes;
44
- return /*#__PURE__*/_react.default.createElement(_SwipeableDrawer.default, {
46
+ return /*#__PURE__*/_react.default.createElement(_SwipeableDrawer.default, _extends({
45
47
  anchor: panelSide,
46
48
  open: open,
47
49
  onOpen: onOpen,
@@ -58,7 +60,7 @@ const UTPanel = _ref => {
58
60
  paper: "".concat(_stylesModule.default.paper, " ").concat(drawerClasses.paper),
59
61
  root: "".concat(containerRef && _stylesModule.default.root, " ").concat(drawerClasses.root)
60
62
  }
61
- }, /*#__PURE__*/_react.default.createElement("div", {
63
+ }, props), /*#__PURE__*/_react.default.createElement("div", {
62
64
  className: "".concat(_stylesModule.default.titleContainer, " ").concat(titleContainerClass)
63
65
  }, TitleComponent || /*#__PURE__*/_react.default.createElement("div", {
64
66
  className: _stylesModule.default.iconTitleContainer
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.retrieveStyle = void 0;
7
7
  const retrieveStyle = _ref => {
8
+ var _theme$Palette$action, _theme$Palette$action2;
8
9
  let {
9
10
  theme
10
11
  } = _ref;
@@ -26,7 +27,7 @@ const retrieveStyle = _ref => {
26
27
  paddingBottom: '24px'
27
28
  },
28
29
  discountChip: {
29
- backgroundColor: theme.Palette.actions.accent['04'],
30
+ backgroundColor: ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action.accent['04']) || theme.Palette.accent['04'],
30
31
  borderRadius: '4px',
31
32
  padding: '4px 8px'
32
33
  },
@@ -55,7 +56,7 @@ const retrieveStyle = _ref => {
55
56
  gridGap: '12px'
56
57
  },
57
58
  selectedQuantity: {
58
- backgroundColor: theme.Palette.actions.neutral['04'],
59
+ backgroundColor: ((_theme$Palette$action2 = theme.Palette.actions) === null || _theme$Palette$action2 === void 0 ? void 0 : _theme$Palette$action2.neutral['04']) || theme.Palette.neutral['04'],
59
60
  borderRadius: '4px',
60
61
  padding: '4px 8px'
61
62
  }
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.retrieveStyle = void 0;
7
7
  var _shadowUtils = require("../../utils/shadowUtils");
8
8
  const retrieveStyle = _ref => {
9
- var _theme$Palette$shadow;
9
+ var _theme$Palette$shadow, _theme$Palette$action, _theme$Palette$action2, _theme$Palette$action3, _theme$Palette$action4, _theme$Palette$action5, _theme$Palette$action6, _theme$Palette$action7, _theme$Palette$action8, _theme$Palette$action9, _theme$Palette$action10, _theme$Palette$action11, _theme$Palette$action12, _theme$Palette$action13;
10
10
  let {
11
11
  theme
12
12
  } = _ref;
@@ -113,20 +113,20 @@ const retrieveStyle = _ref => {
113
113
  },
114
114
  whiteSelectedContainer: {
115
115
  boxShadow: 'none',
116
- outline: "2px solid ".concat(theme.Palette.actions.accent['05']),
116
+ outline: "2px solid ".concat(((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action.accent['05']) || theme.Palette.accent['05']),
117
117
  '& $titleText, & $description, & $aditionalInfoTitle, & $aditionalInfoDescription': {
118
- color: theme.Palette.actions.accent['05']
118
+ color: ((_theme$Palette$action2 = theme.Palette.actions) === null || _theme$Palette$action2 === void 0 ? void 0 : _theme$Palette$action2.accent['05']) || theme.Palette.accent['05']
119
119
  },
120
120
  '& $icon path, & $infoIcon path, & $checkIcon path': {
121
- fill: theme.Palette.actions.accent['05']
121
+ fill: ((_theme$Palette$action3 = theme.Palette.actions) === null || _theme$Palette$action3 === void 0 ? void 0 : _theme$Palette$action3.accent['05']) || theme.Palette.accent['05']
122
122
  },
123
123
  '&:hover': {
124
- backgroundColor: theme.Palette.actions.accent['01'],
125
- outline: "2px solid ".concat(theme.Palette.actions.accent['05'])
124
+ backgroundColor: ((_theme$Palette$action4 = theme.Palette.actions) === null || _theme$Palette$action4 === void 0 ? void 0 : _theme$Palette$action4.accent['01']) || theme.Palette.accent['01'],
125
+ outline: "2px solid ".concat(((_theme$Palette$action5 = theme.Palette.actions) === null || _theme$Palette$action5 === void 0 ? void 0 : _theme$Palette$action5.accent['05']) || theme.Palette.accent['05'])
126
126
  },
127
127
  '&:active': {
128
- backgroundColor: theme.Palette.actions.accent['02'],
129
- outline: "2px solid ".concat(theme.Palette.actions.accent['05'])
128
+ backgroundColor: ((_theme$Palette$action6 = theme.Palette.actions) === null || _theme$Palette$action6 === void 0 ? void 0 : _theme$Palette$action6.accent['02']) || theme.Palette.accent['02'],
129
+ outline: "2px solid ".concat(((_theme$Palette$action7 = theme.Palette.actions) === null || _theme$Palette$action7 === void 0 ? void 0 : _theme$Palette$action7.accent['05']) || theme.Palette.accent['05'])
130
130
  }
131
131
  },
132
132
  whiteDisabledContainer: {
@@ -169,19 +169,19 @@ const retrieveStyle = _ref => {
169
169
  }
170
170
  },
171
171
  graySelectedContainer: {
172
- backgroundColor: theme.Palette.actions.accent['01'],
173
- outline: "2px solid ".concat(theme.Palette.actions.accent['03']),
172
+ backgroundColor: ((_theme$Palette$action8 = theme.Palette.actions) === null || _theme$Palette$action8 === void 0 ? void 0 : _theme$Palette$action8.accent['01']) || theme.Palette.accent['01'],
173
+ outline: "2px solid ".concat(((_theme$Palette$action9 = theme.Palette.actions) === null || _theme$Palette$action9 === void 0 ? void 0 : _theme$Palette$action9.accent['03']) || theme.Palette.accent['03']),
174
174
  '& $titleText, & $description, & $aditionalInfoTitle, & $aditionalInfoDescription': {
175
- color: theme.Palette.actions.accent['05']
175
+ color: ((_theme$Palette$action10 = theme.Palette.actions) === null || _theme$Palette$action10 === void 0 ? void 0 : _theme$Palette$action10.accent['05']) || theme.Palette.accent['05']
176
176
  },
177
177
  '& $icon path, & $infoIcon path, & $checkIcon path': {
178
- fill: theme.Palette.actions.accent['05']
178
+ fill: ((_theme$Palette$action11 = theme.Palette.actions) === null || _theme$Palette$action11 === void 0 ? void 0 : _theme$Palette$action11.accent['05']) || theme.Palette.accent['05']
179
179
  },
180
180
  '&:hover': {
181
- backgroundColor: theme.Palette.actions.accent['02']
181
+ backgroundColor: ((_theme$Palette$action12 = theme.Palette.actions) === null || _theme$Palette$action12 === void 0 ? void 0 : _theme$Palette$action12.accent['02']) || theme.Palette.accent['02']
182
182
  },
183
183
  '&:active': {
184
- backgroundColor: theme.Palette.actions.accent['03'],
184
+ backgroundColor: ((_theme$Palette$action13 = theme.Palette.actions) === null || _theme$Palette$action13 === void 0 ? void 0 : _theme$Palette$action13.accent['03']) || theme.Palette.accent['03'],
185
185
  '& $titleText, & $description, & $aditionalInfoTitle, & $aditionalInfoDescription': {
186
186
  color: theme.Palette.light['01']
187
187
  },
@@ -9,7 +9,7 @@ var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.
9
9
  var _classesUtils = require("../../utils/classesUtils");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const retrieveStyle = _ref => {
12
- var _theme$UTTable, _theme$UTTable2, _theme$UTTable3, _theme$UTTable4, _theme$UTTable5, _theme$UTTable6, _theme$UTTable7, _theme$UTTable8, _theme$UTTable9, _theme$UTTable10, _theme$UTTable11, _theme$UTTable12, _theme$UTTable13, _theme$UTTable14, _theme$UTTable15, _theme$UTTable16, _theme$UTTable17, _theme$UTTable18, _theme$UTTable19, _theme$UTTable20, _theme$UTTable21, _theme$UTTable22, _theme$UTTable23, _theme$UTTable24, _theme$UTTable25, _theme$UTTable26, _theme$UTTable27;
12
+ var _theme$UTTable, _theme$UTTable2, _theme$UTTable3, _theme$UTTable4, _theme$UTTable5, _theme$UTTable6, _theme$UTTable7, _theme$UTTable8, _theme$UTTable9, _theme$UTTable10, _theme$UTTable11, _theme$UTTable12, _theme$UTTable13, _theme$UTTable14, _theme$UTTable15, _theme$UTTable16, _theme$UTTable17, _theme$UTTable18, _theme$UTTable19, _theme$UTTable20, _theme$UTTable21, _theme$UTTable22, _theme$UTTable23, _theme$UTTable24, _theme$UTTable25, _theme$UTTable26, _theme$UTTable27, _theme$Palette$action, _theme$Palette$action2, _theme$Palette$action3;
13
13
  let {
14
14
  theme
15
15
  } = _ref;
@@ -352,12 +352,12 @@ const retrieveStyle = _ref => {
352
352
  color: (0, _seamlessImmutable.getIn)(theme, ['Loading', 'base', 'color'], _colorsModule.default.loadingBase)
353
353
  },
354
354
  actionIcon: {
355
- color: theme.Palette.actions.neutral['05'],
356
- fill: theme.Palette.actions.neutral['05']
355
+ color: ((_theme$Palette$action = theme.Palette.actions) === null || _theme$Palette$action === void 0 ? void 0 : _theme$Palette$action.neutral['05']) || theme.Palette.neutral['05'],
356
+ fill: ((_theme$Palette$action2 = theme.Palette.actions) === null || _theme$Palette$action2 === void 0 ? void 0 : _theme$Palette$action2.neutral['05']) || theme.Palette.neutral['05']
357
357
  },
358
358
  actionIconButton: {
359
359
  '&:hover': {
360
- backgroundColor: theme.Palette.actions.neutral['01']
360
+ backgroundColor: ((_theme$Palette$action3 = theme.Palette.actions) === null || _theme$Palette$action3 === void 0 ? void 0 : _theme$Palette$action3.neutral['01']) || theme.Palette.neutral['01']
361
361
  }
362
362
  }
363
363
  };
@@ -44,9 +44,11 @@ const ThemedComponent = _ref => {
44
44
  return muiThemeUpdated ? /*#__PURE__*/_react.default.createElement(_styles.MuiThemeProvider, {
45
45
  theme: muiThemeUpdated
46
46
  }, /*#__PURE__*/_react.default.createElement(Component, _extends({
47
- classes: classes
47
+ classes: classes,
48
+ theme: theme
48
49
  }, props))) : /*#__PURE__*/_react.default.createElement(Component, _extends({
49
- classes: classes
50
+ classes: classes,
51
+ theme: theme
50
52
  }, props));
51
53
  };
52
54
  ThemedComponent.propTypes = {
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.COLOR_THEMES = exports.COLOR_SHADES = void 0;
7
+ const COLOR_SHADES = exports.COLOR_SHADES = {
8
+ shade01: '01',
9
+ shade02: '02',
10
+ shade03: '03',
11
+ shade04: '04',
12
+ shade05: '05'
13
+ };
14
+ const COLOR_THEMES = exports.COLOR_THEMES = {
15
+ accent: 'accent',
16
+ dark: 'dark',
17
+ error: 'error',
18
+ gray: 'gray',
19
+ information: 'information',
20
+ light: 'light',
21
+ negative: 'negative',
22
+ neutral: 'neutral',
23
+ success: 'success',
24
+ warning: 'warning'
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.12.0",
3
+ "version": "3.13.0",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",