@semcore/icon 3.15.1 → 3.15.3

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
@@ -2,6 +2,18 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [3.15.3] - 2023-06-27
6
+
7
+ ### Changed
8
+
9
+ - Version patch update due to children dependencies update (`@semcore/flex-box` [4.7.31 ~> 4.7.32], `@semcore/utils` [3.53.4 ~> 3.54.0]).
10
+
11
+ ## [3.15.2] - 2023-06-14
12
+
13
+ ### Changed
14
+
15
+ - Version patch update due to children dependencies update (`@semcore/flex-box` [4.7.30 ~> 4.7.31], `@semcore/utils` [3.53.3 ~> 3.53.4]).
16
+
5
17
  ## [3.15.1] - 2023-06-12
6
18
 
7
19
  ### Changed
@@ -49,7 +49,7 @@ FeauturedImage.displayName = 'FeauturedImage';
49
49
 
50
50
  var _default = (0, _core.createBaseComponent)(FeauturedImage);
51
51
 
52
- // eslint-disable-next-line no-console
52
+
53
53
  console.warn(true, 'The "FeauturedImage" icon is deprecated. Use the "FeaturedImage"', 'Icon');
54
54
 
55
55
  exports["default"] = _default;
@@ -28,7 +28,7 @@ function FeauturedImage({
28
28
  }));
29
29
  }
30
30
 
31
- // eslint-disable-next-line no-console
31
+
32
32
  console.warn(true, 'The "FeauturedImage" icon is deprecated. Use the "FeaturedImage"', 'Icon');
33
33
 
34
34
  FeauturedImage.displayName = 'FeauturedImage';
@@ -49,7 +49,7 @@ FeauturedImage.displayName = 'FeauturedImage';
49
49
 
50
50
  var _default = (0, _core.createBaseComponent)(FeauturedImage);
51
51
 
52
- // eslint-disable-next-line no-console
52
+
53
53
  console.warn(true, 'The "FeauturedImage" icon is deprecated. Use the "FeaturedImage"', 'Icon');
54
54
 
55
55
  exports["default"] = _default;
@@ -28,7 +28,7 @@ function FeauturedImage({
28
28
  }));
29
29
  }
30
30
 
31
- // eslint-disable-next-line no-console
31
+
32
32
  console.warn(true, 'The "FeauturedImage" icon is deprecated. Use the "FeaturedImage"', 'Icon');
33
33
 
34
34
  FeauturedImage.displayName = 'FeauturedImage';
@@ -49,7 +49,7 @@ FeauturedVideo.displayName = 'FeauturedVideo';
49
49
 
50
50
  var _default = (0, _core.createBaseComponent)(FeauturedVideo);
51
51
 
52
- // eslint-disable-next-line no-console
52
+
53
53
  console.warn(true, 'The "FeauturedVideo" icon is deprecated. Use the "FeaturedVideo"', 'Icon');
54
54
 
55
55
  exports["default"] = _default;
@@ -28,7 +28,7 @@ function FeauturedVideo({
28
28
  }));
29
29
  }
30
30
 
31
- // eslint-disable-next-line no-console
31
+
32
32
  console.warn(true, 'The "FeauturedVideo" icon is deprecated. Use the "FeaturedVideo"', 'Icon');
33
33
 
34
34
  FeauturedVideo.displayName = 'FeauturedVideo';
@@ -49,7 +49,7 @@ FeauturedVideo.displayName = 'FeauturedVideo';
49
49
 
50
50
  var _default = (0, _core.createBaseComponent)(FeauturedVideo);
51
51
 
52
- // eslint-disable-next-line no-console
52
+
53
53
  console.warn(true, 'The "FeauturedVideo" icon is deprecated. Use the "FeaturedVideo"', 'Icon');
54
54
 
55
55
  exports["default"] = _default;
@@ -28,7 +28,7 @@ function FeauturedVideo({
28
28
  }));
29
29
  }
30
30
 
31
- // eslint-disable-next-line no-console
31
+
32
32
  console.warn(true, 'The "FeauturedVideo" icon is deprecated. Use the "FeaturedVideo"', 'Icon');
33
33
 
34
34
  FeauturedVideo.displayName = 'FeauturedVideo';
@@ -55,7 +55,7 @@ Stoller.displayName = 'Stoller';
55
55
 
56
56
  var _default = (0, _core.createBaseComponent)(Stoller);
57
57
 
58
- // eslint-disable-next-line no-console
58
+
59
59
  console.warn(true, 'The "Stoller" icon is deprecated. Use the "Stroller"', 'Icon');
60
60
 
61
61
  exports['default'] = _default;
@@ -42,7 +42,7 @@ function Stoller({ width = '24', height = '24', viewBox = '0 0 24 24', ...props
42
42
  );
43
43
  }
44
44
 
45
- // eslint-disable-next-line no-console
45
+
46
46
  console.warn(true, 'The "Stoller" icon is deprecated. Use the "Stroller"', 'Icon');
47
47
 
48
48
  Stoller.displayName = 'Stoller';
@@ -59,7 +59,7 @@ Stoller.displayName = 'Stoller';
59
59
 
60
60
  var _default = (0, _core.createBaseComponent)(Stoller);
61
61
 
62
- // eslint-disable-next-line no-console
62
+
63
63
  console.warn(true, 'The "Stoller" icon is deprecated. Use the "Stroller"', 'Icon');
64
64
 
65
65
  exports['default'] = _default;
@@ -48,7 +48,7 @@ function Stoller({ width = '16', height = '16', viewBox = '0 0 16 16', ...props
48
48
 
49
49
  Stoller.displayName = 'Stoller';
50
50
 
51
- // eslint-disable-next-line no-console
51
+
52
52
  console.warn(true, 'The "Stoller" icon is deprecated. Use the "Stroller"', 'Icon');
53
53
 
54
54
  export default createBaseComponent(Stoller);
@@ -49,7 +49,7 @@ YoutubeAlt.displayName = 'YoutubeAlt';
49
49
 
50
50
  var _default = (0, _core.createBaseComponent)(YoutubeAlt);
51
51
 
52
- // eslint-disable-next-line no-console
52
+
53
53
  console.warn(true, 'The "YoutubeAlt" icon is deprecated. Use the "YoutubeColored"', 'Icon');
54
54
 
55
55
  exports["default"] = _default;
@@ -28,7 +28,7 @@ function YoutubeAlt({
28
28
  }));
29
29
  }
30
30
 
31
- // eslint-disable-next-line no-console
31
+
32
32
  console.warn(true, 'The "YoutubeAlt" icon is deprecated. Use the "YoutubeColored"', 'Icon');
33
33
 
34
34
  YoutubeAlt.displayName = 'YoutubeAlt';
@@ -49,7 +49,7 @@ YoutubeAlt.displayName = 'YoutubeAlt';
49
49
 
50
50
  var _default = (0, _core.createBaseComponent)(YoutubeAlt);
51
51
 
52
- // eslint-disable-next-line no-console
52
+
53
53
  console.warn(true, 'The "YoutubeAlt" icon is deprecated. Use the "YoutubeColored"', 'Icon');
54
54
 
55
55
  exports["default"] = _default;
@@ -28,7 +28,7 @@ function YoutubeAlt({
28
28
  }));
29
29
  }
30
30
 
31
- // eslint-disable-next-line no-console
31
+
32
32
  console.warn(true, 'The "YoutubeAlt" icon is deprecated. Use the "YoutubeColored"', 'Icon');
33
33
 
34
34
  YoutubeAlt.displayName = 'YoutubeAlt';
@@ -48,7 +48,7 @@ YoutubeRed.displayName = 'YoutubeRed';
48
48
 
49
49
  var _default = (0, _core.createBaseComponent)(YoutubeRed);
50
50
 
51
- // eslint-disable-next-line no-console
51
+
52
52
  console.warn(true, 'The "YoutubeRed" icon is deprecated. Use the "YoutubeInvert"', 'Icon');
53
53
 
54
54
  exports["default"] = _default;
@@ -27,7 +27,7 @@ function YoutubeRed({
27
27
  }));
28
28
  }
29
29
 
30
- // eslint-disable-next-line no-console
30
+
31
31
  console.warn(true, 'The "YoutubeRed" icon is deprecated. Use the "YoutubeInvert"', 'Icon');
32
32
 
33
33
  YoutubeRed.displayName = 'YoutubeRed';
@@ -48,7 +48,7 @@ YoutubeRed.displayName = 'YoutubeRed';
48
48
 
49
49
  var _default = (0, _core.createBaseComponent)(YoutubeRed);
50
50
 
51
- // eslint-disable-next-line no-console
51
+
52
52
  console.warn(true, 'The "YoutubeRed" icon is deprecated. Use the "YoutubeInvert"', 'Icon');
53
53
 
54
54
  exports["default"] = _default;
@@ -27,7 +27,7 @@ function YoutubeRed({
27
27
  }));
28
28
  }
29
29
 
30
- // eslint-disable-next-line no-console
30
+
31
31
  console.warn(true, 'The "YoutubeRed" icon is deprecated. Use the "YoutubeInvert"', 'Icon');
32
32
 
33
33
  YoutubeRed.displayName = 'YoutubeRed';
package/lib/cjs/Icon.js CHANGED
@@ -22,12 +22,12 @@ var _ref = require("@semcore/utils/lib/ref");
22
22
  var _hasLabels = _interopRequireDefault(require("@semcore/utils/lib/hasLabels"));
23
23
  var _excluded = ["keyboardFocused"];
24
24
  /*__reshadow-styles__:"./style/icon.shadow.css"*/
25
- var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SIcon_1t4um_gg_{display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none;shape-rendering:geometricPrecision;box-sizing:content-box;fill:currentColor;flex-shrink:0;outline:0;color:var(--color_1t4um)}.___SIcon_1t4um_gg_.__keyboardFocused_1t4um_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SIcon_1t4um_gg_.__interactive_1t4um_gg_{cursor:pointer}@media (hover:hover){.___SIcon_1t4um_gg_.__interactive_1t4um_gg_:hover{color:var(--color-interactive_1t4um)}}" /*__inner_css_end__*/, "1t4um_gg_") /*__reshadow_css_end__*/, {
26
- "__SIcon": "___SIcon_1t4um_gg_",
27
- "--color": "--color_1t4um",
28
- "_keyboardFocused": "__keyboardFocused_1t4um_gg_",
29
- "_interactive": "__interactive_1t4um_gg_",
30
- "--color-interactive": "--color-interactive_1t4um"
25
+ var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SIcon_ec5td_gg_{display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none;shape-rendering:geometricPrecision;box-sizing:content-box;fill:currentColor;flex-shrink:0;outline:0;color:var(--color_ec5td)}.___SIcon_ec5td_gg_.__keyboardFocused_ec5td_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SIcon_ec5td_gg_.__interactive_ec5td_gg_{cursor:pointer}@media (hover:hover){.___SIcon_ec5td_gg_.__interactive_ec5td_gg_:hover{color:var(--color-interactive_ec5td)}}" /*__inner_css_end__*/, "ec5td_gg_") /*__reshadow_css_end__*/, {
26
+ "__SIcon": "___SIcon_ec5td_gg_",
27
+ "--color": "--color_ec5td",
28
+ "_keyboardFocused": "__keyboardFocused_ec5td_gg_",
29
+ "_interactive": "__interactive_ec5td_gg_",
30
+ "--color-interactive": "--color-interactive_ec5td"
31
31
  });
32
32
  function Icon(props, ref) {
33
33
  var _useBox = (0, _flexBox.useBox)((0, _objectSpread2["default"])({
@@ -63,7 +63,8 @@ function Icon(props, ref) {
63
63
  return props.onKeyDown(event);
64
64
  }
65
65
  if (interactive && event.code === 'Enter') {
66
- props.onClick && props.onClick(event);
66
+ var _props$onClick;
67
+ (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, event);
67
68
  }
68
69
  }
69
70
  var labelCheckRef = _react["default"].useRef();
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","names":["_core","require","_react","_interopRequireDefault","_classnames","_flexBox","_color","_interopRequireWildcard","_keyboardFocusEnhance2","_propsForElement","_logger","_ref","_hasLabels","_excluded","styles","sstyled","insert","Icon","props","ref","_useBox","useBox","_objectSpread2","tag","width","height","viewBox","focusable","interactive","_useBox2","_slicedToArray2","SIcon","other","colorProps","color","resolveColor","_keyboardFocusEnhance","keyboardFocusEnhance","disabled","keyboardFocused","propsWithKeyboardEnhance","_objectWithoutProperties2","sstyles","_sstyles$cn","cn","shade","className","style","onKeyDown","event","code","onClick","labelCheckRef","React","useRef","useEffect","process","env","NODE_ENV","logger","warn","hasLabels","current","displayName","forkedRef","useForkRef","createElement","_extends2","role","undefined","propsForElement","Object","assign","_default","createBaseComponent","exports"],"sources":["../../src/Icon.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { createBaseComponent, sstyled } from '@semcore/core';\nimport { useBox } from '@semcore/flex-box';\nimport resolveColor, { shade } from '@semcore/utils/lib/color';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport propsForElement from '@semcore/utils/lib/propsForElement';\nimport logger from '@semcore/utils/lib/logger';\nimport { useForkRef } from '@semcore/utils/lib/ref';\nimport hasLabels from '@semcore/utils/lib/hasLabels';\n\nimport styles from './style/icon.shadow.css';\n\nfunction Icon(props, ref) {\n const [SIcon, other] = useBox(\n {\n tag: 'svg',\n 'data-ui-name': 'Icon',\n width: 16,\n height: 16,\n viewBox: '0 0 16 16',\n focusable: props.interactive,\n ...props,\n },\n ref,\n );\n\n const { interactive, color: colorProps } = props;\n const color = resolveColor(colorProps);\n const { keyboardFocused, ...propsWithKeyboardEnhance } = keyboardFocusEnhance()({\n disabled: !interactive,\n ...other,\n });\n const sstyles = sstyled(styles);\n const { className, style } = sstyles.cn('SIcon', {\n 'color-interactive': shade(color, -0.12),\n 'use:color': color,\n interactive: interactive,\n keyboardFocused: keyboardFocused,\n });\n\n function onKeyDown(event) {\n if (props.onKeyDown) {\n return props.onKeyDown(event);\n }\n\n if (interactive && event.code === 'Enter') {\n props.onClick && props.onClick(event);\n }\n }\n\n const labelCheckRef = React.useRef();\n React.useEffect(() => {\n if (!interactive) return;\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n !hasLabels(labelCheckRef.current),\n `'aria-label' or 'aria-labelledby' are required props for interactive icons`,\n props['data-ui-name'] || Icon.displayName,\n );\n }\n }, [interactive]);\n const forkedRef = useForkRef(ref, labelCheckRef);\n\n return (\n <SIcon\n role={interactive ? 'button' : undefined}\n aria-hidden={interactive ? undefined : 'true'}\n {...propsForElement(propsWithKeyboardEnhance)}\n style={Object.assign({}, style, propsWithKeyboardEnhance.style, props.style)}\n className={cn(className, propsWithKeyboardEnhance.className, props.className) || undefined}\n onKeyDown={onKeyDown}\n ref={forkedRef}\n />\n );\n}\n\nIcon.displayName = 'Icon';\n\nexport default createBaseComponent(Icon);\n"],"mappings":";;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAC,uBAAA,CAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,gBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,OAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,IAAA,GAAAV,OAAA;AAC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4B,SAAS,CAAC,IAAIuB,SAAU;IAC3FrB,SAAS,EAAEA,SAAU;IACrB7B,GAAG,EAAE6C;EAAU,GACf;AAEN;AAEA/C,IAAI,CAAC8C,WAAW,GAAG,MAAM;AAAC,IAAAU,QAAA,GAEX,IAAAC,yBAAmB,EAACzD,IAAI,CAAC;AAAA0D,OAAA,cAAAF,QAAA"}
1
+ {"version":3,"file":"Icon.js","names":["_core","require","_react","_interopRequireDefault","_classnames","_flexBox","_color","_interopRequireWildcard","_keyboardFocusEnhance2","_propsForElement","_logger","_ref","_hasLabels","_excluded","styles","sstyled","insert","Icon","props","ref","_useBox","useBox","_objectSpread2","tag","width","height","viewBox","focusable","interactive","_useBox2","_slicedToArray2","SIcon","other","colorProps","color","resolveColor","_keyboardFocusEnhance","keyboardFocusEnhance","disabled","keyboardFocused","propsWithKeyboardEnhance","_objectWithoutProperties2","sstyles","_sstyles$cn","cn","shade","className","style","onKeyDown","event","code","_props$onClick","onClick","call","labelCheckRef","React","useRef","useEffect","process","env","NODE_ENV","logger","warn","hasLabels","current","displayName","forkedRef","useForkRef","createElement","_extends2","role","undefined","propsForElement","Object","assign","_default","createBaseComponent","exports"],"sources":["../../src/Icon.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { createBaseComponent, sstyled } from '@semcore/core';\nimport { useBox } from '@semcore/flex-box';\nimport resolveColor, { shade } from '@semcore/utils/lib/color';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport propsForElement from '@semcore/utils/lib/propsForElement';\nimport logger from '@semcore/utils/lib/logger';\nimport { useForkRef } from '@semcore/utils/lib/ref';\nimport hasLabels from '@semcore/utils/lib/hasLabels';\n\nimport styles from './style/icon.shadow.css';\n\nfunction Icon(props, ref) {\n const [SIcon, other] = useBox(\n {\n tag: 'svg',\n 'data-ui-name': 'Icon',\n width: 16,\n height: 16,\n viewBox: '0 0 16 16',\n focusable: props.interactive,\n ...props,\n },\n ref,\n );\n\n const { interactive, color: colorProps } = props;\n const color = resolveColor(colorProps);\n const { keyboardFocused, ...propsWithKeyboardEnhance } = keyboardFocusEnhance()({\n disabled: !interactive,\n ...other,\n });\n const sstyles = sstyled(styles);\n const { className, style } = sstyles.cn('SIcon', {\n 'color-interactive': shade(color, -0.12),\n 'use:color': color,\n interactive: interactive,\n keyboardFocused: keyboardFocused,\n });\n\n function onKeyDown(event) {\n if (props.onKeyDown) {\n return props.onKeyDown(event);\n }\n\n if (interactive && event.code === 'Enter') {\n props.onClick?.(event);\n }\n }\n\n const labelCheckRef = React.useRef();\n React.useEffect(() => {\n if (!interactive) return;\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n !hasLabels(labelCheckRef.current),\n `'aria-label' or 'aria-labelledby' are required props for interactive icons`,\n props['data-ui-name'] || Icon.displayName,\n );\n }\n }, [interactive]);\n const forkedRef = useForkRef(ref, labelCheckRef);\n\n return (\n <SIcon\n role={interactive ? 'button' : undefined}\n aria-hidden={interactive ? undefined : 'true'}\n {...propsForElement(propsWithKeyboardEnhance)}\n style={Object.assign({}, style, propsWithKeyboardEnhance.style, props.style)}\n className={cn(className, propsWithKeyboardEnhance.className, props.className) || undefined}\n onKeyDown={onKeyDown}\n ref={forkedRef}\n />\n );\n}\n\nIcon.displayName = 'Icon';\n\nexport default createBaseComponent(Icon);\n"],"mappings":";;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAC,uBAAA,CAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,gBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,OAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,IAAA,GAAAV,OAAA;AACA,I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sBAAE,EAACE,SAAS,EAAEN,wBAAwB,CAACM,SAAS,EAAE5B,KAAK,CAAC4B,SAAS,CAAC,IAAIyB,SAAU;IAC3FvB,SAAS,EAAEA,SAAU;IACrB7B,GAAG,EAAE+C;EAAU,GACf;AAEN;AAEAjD,IAAI,CAACgD,WAAW,GAAG,MAAM;AAAC,IAAAU,QAAA,GAEX,IAAAC,yBAAmB,EAAC3D,IAAI,CAAC;AAAA4D,OAAA,cAAAF,QAAA"}
package/lib/es6/Icon.js CHANGED
@@ -15,12 +15,12 @@ import logger from '@semcore/utils/lib/logger';
15
15
  import { useForkRef } from '@semcore/utils/lib/ref';
16
16
  import hasLabels from '@semcore/utils/lib/hasLabels';
17
17
  /*__reshadow-styles__:"./style/icon.shadow.css"*/
18
- var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SIcon_1t4um_gg_{display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none;shape-rendering:geometricPrecision;box-sizing:content-box;fill:currentColor;flex-shrink:0;outline:0;color:var(--color_1t4um)}.___SIcon_1t4um_gg_.__keyboardFocused_1t4um_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SIcon_1t4um_gg_.__interactive_1t4um_gg_{cursor:pointer}@media (hover:hover){.___SIcon_1t4um_gg_.__interactive_1t4um_gg_:hover{color:var(--color-interactive_1t4um)}}" /*__inner_css_end__*/, "1t4um_gg_") /*__reshadow_css_end__*/, {
19
- "__SIcon": "___SIcon_1t4um_gg_",
20
- "--color": "--color_1t4um",
21
- "_keyboardFocused": "__keyboardFocused_1t4um_gg_",
22
- "_interactive": "__interactive_1t4um_gg_",
23
- "--color-interactive": "--color-interactive_1t4um"
18
+ var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SIcon_ec5td_gg_{display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none;shape-rendering:geometricPrecision;box-sizing:content-box;fill:currentColor;flex-shrink:0;outline:0;color:var(--color_ec5td)}.___SIcon_ec5td_gg_.__keyboardFocused_ec5td_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SIcon_ec5td_gg_.__interactive_ec5td_gg_{cursor:pointer}@media (hover:hover){.___SIcon_ec5td_gg_.__interactive_ec5td_gg_:hover{color:var(--color-interactive_ec5td)}}" /*__inner_css_end__*/, "ec5td_gg_") /*__reshadow_css_end__*/, {
19
+ "__SIcon": "___SIcon_ec5td_gg_",
20
+ "--color": "--color_ec5td",
21
+ "_keyboardFocused": "__keyboardFocused_ec5td_gg_",
22
+ "_interactive": "__interactive_ec5td_gg_",
23
+ "--color-interactive": "--color-interactive_ec5td"
24
24
  });
25
25
  function Icon(props, ref) {
26
26
  var _useBox = useBox(_objectSpread({
@@ -56,7 +56,8 @@ function Icon(props, ref) {
56
56
  return props.onKeyDown(event);
57
57
  }
58
58
  if (interactive && event.code === 'Enter') {
59
- props.onClick && props.onClick(event);
59
+ var _props$onClick;
60
+ (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, event);
60
61
  }
61
62
  }
62
63
  var labelCheckRef = React.useRef();
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","names":["React","cn","createBaseComponent","sstyled","useBox","resolveColor","shade","keyboardFocusEnhance","propsForElement","logger","useForkRef","hasLabels","styles","_sstyled","insert","Icon","props","ref","_useBox","_objectSpread","tag","width","height","viewBox","focusable","interactive","_useBox2","_slicedToArray","SIcon","other","colorProps","color","_keyboardFocusEnhance","disabled","keyboardFocused","propsWithKeyboardEnhance","_objectWithoutProperties","_excluded","sstyles","_sstyles$cn","className","style","onKeyDown","event","code","onClick","labelCheckRef","useRef","useEffect","process","env","NODE_ENV","warn","current","displayName","forkedRef","createElement","_extends","role","undefined","Object","assign"],"sources":["../../src/Icon.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { createBaseComponent, sstyled } from '@semcore/core';\nimport { useBox } from '@semcore/flex-box';\nimport resolveColor, { shade } from '@semcore/utils/lib/color';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport propsForElement from '@semcore/utils/lib/propsForElement';\nimport logger from '@semcore/utils/lib/logger';\nimport { useForkRef } from '@semcore/utils/lib/ref';\nimport hasLabels from '@semcore/utils/lib/hasLabels';\n\nimport styles from './style/icon.shadow.css';\n\nfunction Icon(props, ref) {\n const [SIcon, other] = useBox(\n {\n tag: 'svg',\n 'data-ui-name': 'Icon',\n width: 16,\n height: 16,\n viewBox: '0 0 16 16',\n focusable: props.interactive,\n ...props,\n },\n ref,\n );\n\n const { interactive, color: colorProps } = props;\n const color = resolveColor(colorProps);\n const { keyboardFocused, ...propsWithKeyboardEnhance } = keyboardFocusEnhance()({\n disabled: !interactive,\n ...other,\n });\n const sstyles = sstyled(styles);\n const { className, style } = sstyles.cn('SIcon', {\n 'color-interactive': shade(color, -0.12),\n 'use:color': color,\n interactive: interactive,\n keyboardFocused: keyboardFocused,\n });\n\n function onKeyDown(event) {\n if (props.onKeyDown) {\n return props.onKeyDown(event);\n }\n\n if (interactive && event.code === 'Enter') {\n props.onClick && props.onClick(event);\n }\n }\n\n const labelCheckRef = React.useRef();\n React.useEffect(() => {\n if (!interactive) return;\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n !hasLabels(labelCheckRef.current),\n `'aria-label' or 'aria-labelledby' are required props for interactive icons`,\n props['data-ui-name'] || Icon.displayName,\n );\n }\n }, [interactive]);\n const forkedRef = useForkRef(ref, labelCheckRef);\n\n return (\n <SIcon\n role={interactive ? 'button' : undefined}\n aria-hidden={interactive ? undefined : 'true'}\n {...propsForElement(propsWithKeyboardEnhance)}\n style={Object.assign({}, style, propsWithKeyboardEnhance.style, props.style)}\n className={cn(className, propsWithKeyboardEnhance.className, props.className) || undefined}\n onKeyDown={onKeyDown}\n ref={forkedRef}\n />\n );\n}\n\nIcon.displayName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alC,WAAW,GAAGkC,SAAS,GAAG;EAAO,GAC1CnD,eAAe,CAAC2B,wBAAwB,CAAC;IAC7CM,KAAK,EAAEmB,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEpB,KAAK,EAAEN,wBAAwB,CAACM,KAAK,EAAEzB,KAAK,CAACyB,KAAK,CAAE;IAC7ED,SAAS,EAAEvC,EAAE,CAACuC,SAAS,EAAEL,wBAAwB,CAACK,SAAS,EAAExB,KAAK,CAACwB,SAAS,CAAC,IAAImB,SAAU;IAC3FjB,SAAS,EAAEA,SAAU;IACrBzB,GAAG,EAAEsC;EAAU,GACf;AAEN;AAEAxC,IAAI,CAACuC,WAAW,GAAG,MAAM;AAEzB,eAAepD,mBAAmB,CAACa,IAAI,CAAC"}
1
+ {"version":3,"file":"Icon.js","names":["React","cn","createBaseComponent","sstyled","useBox","resolveColor","shade","keyboardFocusEnhance","propsForElement","logger","useForkRef","hasLabels","styles","_sstyled","insert","Icon","props","ref","_useBox","_objectSpread","tag","width","height","viewBox","focusable","interactive","_useBox2","_slicedToArray","SIcon","other","colorProps","color","_keyboardFocusEnhance","disabled","keyboardFocused","propsWithKeyboardEnhance","_objectWithoutProperties","_excluded","sstyles","_sstyles$cn","className","style","onKeyDown","event","code","_props$onClick","onClick","call","labelCheckRef","useRef","useEffect","process","env","NODE_ENV","warn","current","displayName","forkedRef","createElement","_extends","role","undefined","Object","assign"],"sources":["../../src/Icon.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { createBaseComponent, sstyled } from '@semcore/core';\nimport { useBox } from '@semcore/flex-box';\nimport resolveColor, { shade } from '@semcore/utils/lib/color';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport propsForElement from '@semcore/utils/lib/propsForElement';\nimport logger from '@semcore/utils/lib/logger';\nimport { useForkRef } from '@semcore/utils/lib/ref';\nimport hasLabels from '@semcore/utils/lib/hasLabels';\n\nimport styles from './style/icon.shadow.css';\n\nfunction Icon(props, ref) {\n const [SIcon, other] = useBox(\n {\n tag: 'svg',\n 'data-ui-name': 'Icon',\n width: 16,\n height: 16,\n viewBox: '0 0 16 16',\n focusable: props.interactive,\n ...props,\n },\n ref,\n );\n\n const { interactive, color: colorProps } = props;\n const color = resolveColor(colorProps);\n const { keyboardFocused, ...propsWithKeyboardEnhance } = keyboardFocusEnhance()({\n disabled: !interactive,\n ...other,\n });\n const sstyles = sstyled(styles);\n const { className, style } = sstyles.cn('SIcon', {\n 'color-interactive': shade(color, -0.12),\n 'use:color': color,\n interactive: interactive,\n keyboardFocused: keyboardFocused,\n });\n\n function onKeyDown(event) {\n if (props.onKeyDown) {\n return props.onKeyDown(event);\n }\n\n if (interactive && event.code === 'Enter') {\n props.onClick?.(event);\n }\n }\n\n const labelCheckRef = React.useRef();\n React.useEffect(() => {\n if (!interactive) return;\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n !hasLabels(labelCheckRef.current),\n `'aria-label' or 'aria-labelledby' are required props for interactive icons`,\n props['data-ui-name'] || Icon.displayName,\n );\n }\n }, [interactive]);\n const forkedRef = useForkRef(ref, labelCheckRef);\n\n return (\n <SIcon\n role={interactive ? 'button' : undefined}\n aria-hidden={interactive ? undefined : 'true'}\n {...propsForElement(propsWithKeyboardEnhance)}\n style={Object.assign({}, style, propsWithKeyboardEnhance.style, props.style)}\n className={cn(className, propsWithKeyboardEnhance.className, props.className) || undefined}\n onKeyDown={onKeyDown}\n ref={forkedRef}\n />\n );\n}\n\nIcon.displayName = 'Icon';\n\nexport default createBaseComponent(Icon);\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,mBAAmB,EAAEC,OAAO,QAAQ,eAAe;AAC5D,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,IAAIC,KAAK,QAAQ,0BAA0B;AAC9D,OAAOC,oBAAoB,MAAM,kDAAkD;AACnF,OAAO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AAEvC,EAAE,CAACuC,SAAS,EAAEL,wBAAwB,CAACK,SAAS,EAAExB,KAAK,CAACwB,SAAS,CAAC,IAAIqB,SAAU;IAC3FnB,SAAS,EAAEA,SAAU;IACrBzB,GAAG,EAAEwC;EAAU,GACf;AAEN;AAEA1C,IAAI,CAACyC,WAAW,GAAG,MAAM;AAEzB,eAAetD,mBAAmB,CAACa,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/icon",
3
3
  "description": "Semrush Icon Component",
4
- "version": "3.15.1",
4
+ "version": "3.15.3",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -19,9 +19,6 @@
19
19
  "react": "16.8 - 18",
20
20
  "react-dom": "16.8 - 18"
21
21
  },
22
- "jest": {
23
- "preset": "@semcore/jest-preset-ui"
24
- },
25
22
  "repository": {
26
23
  "type": "git",
27
24
  "url": "https://github.com/semrush/intergalactic.git",
@@ -29,13 +26,12 @@
29
26
  },
30
27
  "devDependencies": {
31
28
  "@semcore/icon-transform-svg": "1.1.0",
32
- "@semcore/jest-preset-ui": "1.0.0",
29
+ "@semcore/testing-utils": "1.0.0",
33
30
  "@types/react": "18.0.21"
34
31
  },
35
32
  "scripts": {
36
33
  "transform": "pnpm icon-transform-svg",
37
34
  "build": "pnpm run clean && pnpm semcore-builder --source=js && pnpm run transform --configFile=./transform-svg-legacy.config.js && pnpm run transform --configFile=./transform-svg.config.js",
38
- "test": "jest",
39
35
  "clean": "node clean.js"
40
36
  }
41
37
  }