@semcore/icon 16.0.0-prerelease.7 → 16.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.
- package/CHANGELOG.md +29 -1
- package/lib/cjs/Icon.js +4 -2
- package/lib/cjs/Icon.js.map +1 -1
- package/lib/es6/Icon.js +4 -2
- package/lib/es6/Icon.js.map +1 -1
- package/lib/esm/Icon.mjs +4 -1
- package/lib/esm/style/icon.shadow.css +19 -0
- package/package.json +13 -3
- package/platform/AIToolkit/index.d.ts +6 -0
- package/platform/AIToolkit/index.js +36 -0
- package/platform/AIToolkit/index.mjs +25 -0
- package/platform/EnterpriseSolutions/index.d.ts +6 -0
- package/platform/EnterpriseSolutions/index.js +39 -0
- package/platform/EnterpriseSolutions/index.mjs +28 -0
- package/platform/SEOToolkit/index.js +2 -2
- package/platform/SEOToolkit/index.mjs +2 -2
- package/svg/platform/AIToolkit/AIToolkit.svg +3 -0
- package/svg/platform/EnterpriseSolutions/EnterpriseSolutions.svg +1 -0
- package/svg/platform/SEOToolkit/SEOToolkit.svg +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [16.0.0] - 2025-
|
|
5
|
+
## [16.0.0] - 2025-05-19
|
|
6
6
|
|
|
7
7
|
### Removed
|
|
8
8
|
|
|
9
9
|
- External icons.
|
|
10
10
|
|
|
11
|
+
## [4.62.1] - 2025-05-13
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/flex-box` [5.41.3 ~> 5.41.4], `@semcore/utils` [4.48.4 ~> 4.48.5], `@semcore/core` [2.39.3 ~> 2.39.4]).
|
|
16
|
+
|
|
17
|
+
## [4.62.0] - 2025-04-25
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- New `EnterpriseSolutions` icon.
|
|
22
|
+
|
|
23
|
+
## [4.61.0] - 2025-04-09
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- New `AIToolkit` icon.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- `SEOToolkit` icon a little bit.
|
|
32
|
+
|
|
33
|
+
## [4.60.2] - 2025-04-04
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- Version patch update due to children dependencies update (`@semcore/flex-box` [5.41.1 ~> 5.41.2], `@semcore/utils` [4.48.1 ~> 4.48.2], `@semcore/core` [2.39.1 ~> 2.39.2]).
|
|
38
|
+
|
|
11
39
|
## [4.60.1] - 2025-03-18
|
|
12
40
|
|
|
13
41
|
### Added
|
package/lib/cjs/Icon.js
CHANGED
|
@@ -20,8 +20,10 @@ var _ref = require("@semcore/core/lib/utils/ref");
|
|
|
20
20
|
var _hasLabels = _interopRequireDefault(require("@semcore/core/lib/utils/hasLabels"));
|
|
21
21
|
var _useColorResolver = require("@semcore/core/lib/utils/use/useColorResolver");
|
|
22
22
|
var _excluded = ["keyboardFocused"];
|
|
23
|
-
|
|
24
|
-
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SIcon_ypx5i_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_ypx5i)}.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_{cursor:pointer}@media (hover:hover){.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_:hover{filter:brightness(.8)}}" /*__inner_css_end__
|
|
23
|
+
/*!__reshadow-styles__:"./style/icon.shadow.css"*/
|
|
24
|
+
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SIcon_ypx5i_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_ypx5i)}.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_{cursor:pointer}@media (hover:hover){.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_:hover{filter:brightness(.8)}}", /*__inner_css_end__*/"ypx5i_gg_"),
|
|
25
|
+
/*__reshadow_css_end__*/
|
|
26
|
+
{
|
|
25
27
|
"__SIcon": "___SIcon_ypx5i_gg_",
|
|
26
28
|
"--color": "--color_ypx5i",
|
|
27
29
|
"_interactive": "__interactive_ypx5i_gg_"
|
package/lib/cjs/Icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","names":["_core","require","_react","_interopRequireDefault","_classnames","_flexBox","_keyboardFocusEnhance2","_propsForElement","_logger","_ref","_hasLabels","_useColorResolver","_excluded","styles","sstyled","insert","Icon","props","ref","_useBox","useBox","_objectSpread2","tag","width","height","viewBox","focusable","interactive","_useBox2","_slicedToArray2","SIcon","other","colorProps","color","resolveColor","useColorResolver","_keyboardFocusEnhance","keyboardFocusEnhance","disabled","keyboardFocused","propsEnhance","_objectWithoutProperties2","sstyles","_sstyles$cn","cn","className","style","onKeyDown","event","onClick","key","preventDefault","labelCheckRef","React","useRef","useEffect","process","env","NODE_ENV","logger","warn","current","hasLabels","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 keyboardFocusEnhance from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';\nimport propsForElement from '@semcore/core/lib/utils/propsForElement';\nimport logger from '@semcore/core/lib/utils/logger';\nimport { useForkRef } from '@semcore/core/lib/utils/ref';\nimport hasLabels from '@semcore/core/lib/utils/hasLabels';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\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 resolveColor = useColorResolver();\n const color = resolveColor(colorProps);\n const { keyboardFocused, ...propsEnhance } = keyboardFocusEnhance()({\n disabled: !interactive,\n ...other,\n });\n const sstyles = sstyled(styles);\n const { className, style } = sstyles.cn('SIcon', {\n 'use:color': color,\n interactive: interactive,\n keyboardFocused: keyboardFocused,\n });\n\n function onKeyDown(event) {\n if (propsEnhance.onKeyDown) {\n return propsEnhance.onKeyDown(event);\n }\n\n if (interactive && propsEnhance.onClick && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n propsEnhance.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 labelCheckRef.current && !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(propsEnhance)}\n style={Object.assign({}, style, propsEnhance.style)}\n className={cn(className, propsEnhance.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;A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S,GAAG;EAAO,GAC1C,IAAAC,2BAAe,EAAC9B,YAAY,CAAC;IACjCM,KAAK,EAAEyB,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE1B,KAAK,EAAEN,YAAY,CAACM,KAAK,CAAE;IACpDD,SAAS,EAAE,IAAAD,sBAAE,EAACC,SAAS,EAAEL,YAAY,CAACK,SAAS,CAAC,IAAIwB,SAAU;IAC9DtB,SAAS,EAAEA,SAAU;IACrB7B,GAAG,EAAE8C;EAAU,GACf;AAEN;AAEAhD,IAAI,CAAC+C,WAAW,GAAG,MAAM;AAAC,IAAAU,QAAA,GAEX,IAAAC,yBAAmB,EAAC1D,IAAI,CAAC;AAAA2D,OAAA,cAAAF,QAAA"}
|
|
1
|
+
{"version":3,"file":"Icon.js","names":["_core","require","_react","_interopRequireDefault","_classnames","_flexBox","_keyboardFocusEnhance2","_propsForElement","_logger","_ref","_hasLabels","_useColorResolver","_excluded","styles","sstyled","insert","Icon","props","ref","_useBox","useBox","_objectSpread2","tag","width","height","viewBox","focusable","interactive","_useBox2","_slicedToArray2","SIcon","other","colorProps","color","resolveColor","useColorResolver","_keyboardFocusEnhance","keyboardFocusEnhance","disabled","keyboardFocused","propsEnhance","_objectWithoutProperties2","sstyles","_sstyles$cn","cn","className","style","onKeyDown","event","onClick","key","preventDefault","labelCheckRef","React","useRef","useEffect","process","env","NODE_ENV","logger","warn","current","hasLabels","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 keyboardFocusEnhance from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';\nimport propsForElement from '@semcore/core/lib/utils/propsForElement';\nimport logger from '@semcore/core/lib/utils/logger';\nimport { useForkRef } from '@semcore/core/lib/utils/ref';\nimport hasLabels from '@semcore/core/lib/utils/hasLabels';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\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 resolveColor = useColorResolver();\n const color = resolveColor(colorProps);\n const { keyboardFocused, ...propsEnhance } = keyboardFocusEnhance()({\n disabled: !interactive,\n ...other,\n });\n const sstyles = sstyled(styles);\n const { className, style } = sstyles.cn('SIcon', {\n 'use:color': color,\n interactive: interactive,\n keyboardFocused: keyboardFocused,\n });\n\n function onKeyDown(event) {\n if (propsEnhance.onKeyDown) {\n return propsEnhance.onKeyDown(event);\n }\n\n if (interactive && propsEnhance.onClick && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n propsEnhance.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 labelCheckRef.current && !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(propsEnhance)}\n style={Object.assign({}, style, propsEnhance.style)}\n className={cn(className, propsEnhance.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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G0C,SAAS,GAAG;EAAO,GAC1C,IAAAC,2BAAe,EAAC9B,YAAY,CAAC;IACjCM,KAAK,EAAEyB,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE1B,KAAK,EAAEN,YAAY,CAACM,KAAK,CAAE;IACpDD,SAAS,EAAE,IAAAD,sBAAE,EAACC,SAAS,EAAEL,YAAY,CAACK,SAAS,CAAC,IAAIwB,SAAU;IAC9DtB,SAAS,EAAEA,SAAU;IACrB7B,GAAG,EAAE8C;EAAU,GACf;AAEN;AAEAhD,IAAI,CAAC+C,WAAW,GAAG,MAAM;AAAC,IAAAU,QAAA,GAEX,IAAAC,yBAAmB,EAAC1D,IAAI,CAAC;AAAA2D,OAAA,cAAAF,QAAA"}
|
package/lib/es6/Icon.js
CHANGED
|
@@ -14,8 +14,10 @@ import logger from '@semcore/core/lib/utils/logger';
|
|
|
14
14
|
import { useForkRef } from '@semcore/core/lib/utils/ref';
|
|
15
15
|
import hasLabels from '@semcore/core/lib/utils/hasLabels';
|
|
16
16
|
import { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';
|
|
17
|
-
|
|
18
|
-
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SIcon_ypx5i_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_ypx5i)}.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_{cursor:pointer}@media (hover:hover){.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_:hover{filter:brightness(.8)}}" /*__inner_css_end__
|
|
17
|
+
/*!__reshadow-styles__:"./style/icon.shadow.css"*/
|
|
18
|
+
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SIcon_ypx5i_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_ypx5i)}.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_{cursor:pointer}@media (hover:hover){.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_:hover{filter:brightness(.8)}}", /*__inner_css_end__*/"ypx5i_gg_"),
|
|
19
|
+
/*__reshadow_css_end__*/
|
|
20
|
+
{
|
|
19
21
|
"__SIcon": "___SIcon_ypx5i_gg_",
|
|
20
22
|
"--color": "--color_ypx5i",
|
|
21
23
|
"_interactive": "__interactive_ypx5i_gg_"
|
package/lib/es6/Icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","names":["React","cn","createBaseComponent","sstyled","useBox","keyboardFocusEnhance","propsForElement","logger","useForkRef","hasLabels","useColorResolver","styles","_sstyled","insert","Icon","props","ref","_useBox","_objectSpread","tag","width","height","viewBox","focusable","interactive","_useBox2","_slicedToArray","SIcon","other","colorProps","color","resolveColor","_keyboardFocusEnhance","disabled","keyboardFocused","propsEnhance","_objectWithoutProperties","_excluded","sstyles","_sstyles$cn","className","style","onKeyDown","event","onClick","key","preventDefault","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 keyboardFocusEnhance from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';\nimport propsForElement from '@semcore/core/lib/utils/propsForElement';\nimport logger from '@semcore/core/lib/utils/logger';\nimport { useForkRef } from '@semcore/core/lib/utils/ref';\nimport hasLabels from '@semcore/core/lib/utils/hasLabels';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\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 resolveColor = useColorResolver();\n const color = resolveColor(colorProps);\n const { keyboardFocused, ...propsEnhance } = keyboardFocusEnhance()({\n disabled: !interactive,\n ...other,\n });\n const sstyles = sstyled(styles);\n const { className, style } = sstyles.cn('SIcon', {\n 'use:color': color,\n interactive: interactive,\n keyboardFocused: keyboardFocused,\n });\n\n function onKeyDown(event) {\n if (propsEnhance.onKeyDown) {\n return propsEnhance.onKeyDown(event);\n }\n\n if (interactive && propsEnhance.onClick && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n propsEnhance.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 labelCheckRef.current && !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(propsEnhance)}\n style={Object.assign({}, style, propsEnhance.style)}\n className={cn(className, propsEnhance.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,oBAAoB,MAAM,uDAAuD;AACxF,OAAOC,eAAe,MAAM,yCAAyC;AACrE,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,OAAOC,SA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U,GACf;AAEN;AAEA1C,IAAI,CAACyC,WAAW,GAAG,MAAM;AAEzB,eAAerD,mBAAmB,CAACY,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"Icon.js","names":["React","cn","createBaseComponent","sstyled","useBox","keyboardFocusEnhance","propsForElement","logger","useForkRef","hasLabels","useColorResolver","styles","_sstyled","insert","Icon","props","ref","_useBox","_objectSpread","tag","width","height","viewBox","focusable","interactive","_useBox2","_slicedToArray","SIcon","other","colorProps","color","resolveColor","_keyboardFocusEnhance","disabled","keyboardFocused","propsEnhance","_objectWithoutProperties","_excluded","sstyles","_sstyles$cn","className","style","onKeyDown","event","onClick","key","preventDefault","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 keyboardFocusEnhance from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';\nimport propsForElement from '@semcore/core/lib/utils/propsForElement';\nimport logger from '@semcore/core/lib/utils/logger';\nimport { useForkRef } from '@semcore/core/lib/utils/ref';\nimport hasLabels from '@semcore/core/lib/utils/hasLabels';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\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 resolveColor = useColorResolver();\n const color = resolveColor(colorProps);\n const { keyboardFocused, ...propsEnhance } = keyboardFocusEnhance()({\n disabled: !interactive,\n ...other,\n });\n const sstyles = sstyled(styles);\n const { className, style } = sstyles.cn('SIcon', {\n 'use:color': color,\n interactive: interactive,\n keyboardFocused: keyboardFocused,\n });\n\n function onKeyDown(event) {\n if (propsEnhance.onKeyDown) {\n return propsEnhance.onKeyDown(event);\n }\n\n if (interactive && propsEnhance.onClick && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n propsEnhance.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 labelCheckRef.current && !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(propsEnhance)}\n style={Object.assign({}, style, propsEnhance.style)}\n className={cn(className, propsEnhance.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,oBAAoB,MAAM,uDAAuD;AACxF,OAAOC,eAAe,MAAM,yCAAyC;AACrE,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,UAAU,QAAQ,6BAA6B;AACxD,OAAOC,SAAS,MAAM,mCAAmC;AACzD,SAASC,gBAAgB,QAAQ,8CAA8C;AAAC;AAAA,IAAAC,MAAA,+BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;AAAA;AAIhF,SAASC,IAAIA,CAACC,KAAK,EAAEC,GAAG,EAAE;EACxB,IAAAC,OAAA,GAAuBb,MAAM,CAAAc,aAAA;MAEzBC,GAAG,EAAE,KAAK;MACV,cAAc,EAAE,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S,OAAO,CAACD,KAAK,CAAC;IAC7B;EACF;EAEA,IAAMI,aAAa,GAAG/C,KAAK,CAACgD,MAAM,EAAE;EACpChD,KAAK,CAACiD,SAAS,CAAC,YAAM;IACpB,IAAI,CAACzB,WAAW,EAAE;IAClB,IAAI0B,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;MACzC7C,MAAM,CAAC8C,IAAI,CACTN,aAAa,CAACO,OAAO,IAAI,CAAC7C,SAAS,CAACsC,aAAa,CAACO,OAAO,CAAC,gFAE1DvC,KAAK,CAAC,cAAc,CAAC,IAAID,IAAI,CAACyC,WAAW,CAC1C;IACH;EACF,CAAC,EAAE,CAAC/B,WAAW,CAAC,CAAC;EACjB,IAAMgC,SAAS,GAAGhD,UAAU,CAACQ,GAAG,EAAE+B,aAAa,CAAC;EAEhD,oBACE/C,KAAA,CAAAyD,aAAA,CAAC9B,KAAK,EAAA+B,QAAA;IACJC,IAAI,EAAEnC,WAAW,GAAG,QAAQ,GAAGoC,SAAU;IACzC,eAAapC,WAAW,GAAGoC,SAAS,GAAG;EAAO,GAC1CtD,eAAe,CAAC6B,YAAY,CAAC;IACjCM,KAAK,EAAEoB,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAErB,KAAK,EAAEN,YAAY,CAACM,KAAK,CAAE;IACpDD,SAAS,EAAEvC,EAAE,CAACuC,SAAS,EAAEL,YAAY,CAACK,SAAS,CAAC,IAAIoB,SAAU;IAC9DlB,SAAS,EAAEA,SAAU;IACrB1B,GAAG,EAAEwC;EAAU,GACf;AAEN;AAEA1C,IAAI,CAACyC,WAAW,GAAG,MAAM;AAEzB,eAAerD,mBAAmB,CAACY,IAAI,CAAC"}
|
package/lib/esm/Icon.mjs
CHANGED
|
@@ -13,13 +13,16 @@ import { useForkRef } from "@semcore/core/lib/utils/ref";
|
|
|
13
13
|
import hasLabels from "@semcore/core/lib/utils/hasLabels";
|
|
14
14
|
import { useColorResolver } from "@semcore/core/lib/utils/use/useColorResolver";
|
|
15
15
|
var _excluded = ["keyboardFocused"];
|
|
16
|
+
/*!__reshadow-styles__:"./style/icon.shadow.css"*/
|
|
16
17
|
var styles = (
|
|
17
18
|
/*__reshadow_css_start__*/
|
|
18
19
|
(sstyled.insert(
|
|
19
20
|
/*__inner_css_start__*/
|
|
20
21
|
".___SIcon_ypx5i_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_ypx5i)}.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_{cursor:pointer}@media (hover:hover){.___SIcon_ypx5i_gg_.__interactive_ypx5i_gg_:hover{filter:brightness(.8)}}",
|
|
22
|
+
/*__inner_css_end__*/
|
|
21
23
|
"ypx5i_gg_"
|
|
22
|
-
),
|
|
24
|
+
), /*__reshadow_css_end__*/
|
|
25
|
+
{
|
|
23
26
|
"__SIcon": "___SIcon_ypx5i_gg_",
|
|
24
27
|
"--color": "--color_ypx5i",
|
|
25
28
|
"_interactive": "__interactive_ypx5i_gg_"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
SIcon {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
user-select: none;
|
|
4
|
+
shape-rendering: geometricPrecision;
|
|
5
|
+
box-sizing: content-box;
|
|
6
|
+
fill: currentColor;
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
outline: none;
|
|
9
|
+
color: var(--color);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
SIcon[interactive] {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
filter: brightness(0.8);
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/icon",
|
|
3
3
|
"description": "Semrush Icon Component",
|
|
4
|
-
"version": "16.0.0
|
|
4
|
+
"version": "16.0.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.mjs",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/flex-box": "16.0.0
|
|
12
|
+
"@semcore/flex-box": "16.0.0",
|
|
13
13
|
"classnames": "2.2.6"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@semcore/base-components": "^16.0.0
|
|
16
|
+
"@semcore/base-components": "^16.0.0"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
@@ -647,6 +647,11 @@
|
|
|
647
647
|
"import": "./platform/AdsToolkit/index.mjs",
|
|
648
648
|
"types": "./platform/AdsToolkit/index.d.ts"
|
|
649
649
|
},
|
|
650
|
+
"./platform/AIToolkit": {
|
|
651
|
+
"require": "./platform/AIToolkit/index.js",
|
|
652
|
+
"import": "./platform/AIToolkit/index.mjs",
|
|
653
|
+
"types": "./platform/AIToolkit/index.d.ts"
|
|
654
|
+
},
|
|
650
655
|
"./platform/AppCenter": {
|
|
651
656
|
"require": "./platform/AppCenter/index.js",
|
|
652
657
|
"import": "./platform/AppCenter/index.mjs",
|
|
@@ -657,6 +662,11 @@
|
|
|
657
662
|
"import": "./platform/ContentToolkit/index.mjs",
|
|
658
663
|
"types": "./platform/ContentToolkit/index.d.ts"
|
|
659
664
|
},
|
|
665
|
+
"./platform/EnterpriseSolutions": {
|
|
666
|
+
"require": "./platform/EnterpriseSolutions/index.js",
|
|
667
|
+
"import": "./platform/EnterpriseSolutions/index.mjs",
|
|
668
|
+
"types": "./platform/EnterpriseSolutions/index.d.ts"
|
|
669
|
+
},
|
|
660
670
|
"./platform/HomePlatform": {
|
|
661
671
|
"require": "./platform/HomePlatform/index.js",
|
|
662
672
|
"import": "./platform/HomePlatform/index.mjs",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _core = require("@semcore/core");
|
|
12
|
+
var _index = _interopRequireDefault(require("../../lib/cjs/index.js"));
|
|
13
|
+
var _excluded = ["width", "height", "viewBox"];
|
|
14
|
+
function RootAIToolkit(_ref, ref) {
|
|
15
|
+
var _ref$width = _ref.width,
|
|
16
|
+
width = _ref$width === void 0 ? '24' : _ref$width,
|
|
17
|
+
_ref$height = _ref.height,
|
|
18
|
+
height = _ref$height === void 0 ? '24' : _ref$height,
|
|
19
|
+
_ref$viewBox = _ref.viewBox,
|
|
20
|
+
viewBox = _ref$viewBox === void 0 ? '0 0 24 24' : _ref$viewBox,
|
|
21
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement(_index["default"], (0, _extends2["default"])({
|
|
23
|
+
ref: ref,
|
|
24
|
+
"data-name": "AIToolkit",
|
|
25
|
+
"data-group": "",
|
|
26
|
+
width: width,
|
|
27
|
+
height: height,
|
|
28
|
+
viewBox: viewBox
|
|
29
|
+
}, props), /*#__PURE__*/_react["default"].createElement("path", {
|
|
30
|
+
d: "M10.093 6.464C7.329 5.702 6.798 5.17 6.035 2.407a.555.555 0 0 0-1.07 0C4.202 5.17 3.67 5.702.907 6.464a.555.555 0 0 0 0 1.072c2.764.763 3.295 1.294 4.058 4.057a.555.555 0 0 0 1.07 0c.763-2.764 1.294-3.295 4.058-4.057a.556.556 0 0 0 0-1.072ZM22.93 12.25c-3.869-1.068-4.613-1.811-5.68-5.68a.778.778 0 0 0-1.5 0c-1.067 3.868-1.81 4.613-5.68 5.68a.778.778 0 0 0 0 1.5c3.869 1.069 4.613 1.811 5.68 5.68a.778.778 0 0 0 1.5 0c1.067-3.87 1.81-4.613 5.68-5.68a.778.778 0 0 0 0-1.5ZM9 18.379l-2.44-2.44a1.5 1.5 0 0 0-2.12 0l-4 4a1.5 1.5 0 0 0 2.12 2.122l2.94-2.94 2.44 2.44a1.5 1.5 0 0 0 2.12 0l2.5-2.5a1.5 1.5 0 0 0-2.12-2.122L9 18.38Z",
|
|
31
|
+
shapeRendering: "geometricPrecision"
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
RootAIToolkit.displayName = 'AIToolkit';
|
|
35
|
+
var AIToolkit = (0, _core.createBaseComponent)(RootAIToolkit);
|
|
36
|
+
exports["default"] = AIToolkit;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { createBaseComponent } from '@semcore/core';
|
|
4
|
+
import Icon from '../../lib/esm/index.mjs';
|
|
5
|
+
function RootAIToolkit({
|
|
6
|
+
width = '24',
|
|
7
|
+
height = '24',
|
|
8
|
+
viewBox = '0 0 24 24',
|
|
9
|
+
...props
|
|
10
|
+
}, ref) {
|
|
11
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
12
|
+
ref: ref,
|
|
13
|
+
"data-name": "AIToolkit",
|
|
14
|
+
"data-group": "",
|
|
15
|
+
width: width,
|
|
16
|
+
height: height,
|
|
17
|
+
viewBox: viewBox
|
|
18
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
d: "M10.093 6.464C7.329 5.702 6.798 5.17 6.035 2.407a.555.555 0 0 0-1.07 0C4.202 5.17 3.67 5.702.907 6.464a.555.555 0 0 0 0 1.072c2.764.763 3.295 1.294 4.058 4.057a.555.555 0 0 0 1.07 0c.763-2.764 1.294-3.295 4.058-4.057a.556.556 0 0 0 0-1.072ZM22.93 12.25c-3.869-1.068-4.613-1.811-5.68-5.68a.778.778 0 0 0-1.5 0c-1.067 3.868-1.81 4.613-5.68 5.68a.778.778 0 0 0 0 1.5c3.869 1.069 4.613 1.811 5.68 5.68a.778.778 0 0 0 1.5 0c1.067-3.87 1.81-4.613 5.68-5.68a.778.778 0 0 0 0-1.5ZM9 18.379l-2.44-2.44a1.5 1.5 0 0 0-2.12 0l-4 4a1.5 1.5 0 0 0 2.12 2.122l2.94-2.94 2.44 2.44a1.5 1.5 0 0 0 2.12 0l2.5-2.5a1.5 1.5 0 0 0-2.12-2.122L9 18.38Z",
|
|
20
|
+
shapeRendering: "geometricPrecision"
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
RootAIToolkit.displayName = 'AIToolkit';
|
|
24
|
+
const AIToolkit = createBaseComponent(RootAIToolkit);
|
|
25
|
+
export { AIToolkit as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _core = require("@semcore/core");
|
|
12
|
+
var _index = _interopRequireDefault(require("../../lib/cjs/index.js"));
|
|
13
|
+
var _excluded = ["width", "height", "viewBox"];
|
|
14
|
+
function RootEnterpriseSolutions(_ref, ref) {
|
|
15
|
+
var _ref$width = _ref.width,
|
|
16
|
+
width = _ref$width === void 0 ? '24' : _ref$width,
|
|
17
|
+
_ref$height = _ref.height,
|
|
18
|
+
height = _ref$height === void 0 ? '24' : _ref$height,
|
|
19
|
+
_ref$viewBox = _ref.viewBox,
|
|
20
|
+
viewBox = _ref$viewBox === void 0 ? '0 0 24 24' : _ref$viewBox,
|
|
21
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement(_index["default"], (0, _extends2["default"])({
|
|
23
|
+
ref: ref,
|
|
24
|
+
"data-name": "EnterpriseSolutions",
|
|
25
|
+
"data-group": "",
|
|
26
|
+
width: width,
|
|
27
|
+
height: height,
|
|
28
|
+
viewBox: viewBox
|
|
29
|
+
}, props), /*#__PURE__*/_react["default"].createElement("path", {
|
|
30
|
+
d: "M12.245 3.15a2 2 0 0 1 2.757 1.851V21h-10a1 1 0 0 1-1-1V8.538A3 3 0 0 1 5.867 5.76l6.378-2.61ZM8.002 15a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2h-3Zm0-4a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2h-3Z",
|
|
31
|
+
shapeRendering: "geometricPrecision"
|
|
32
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
33
|
+
d: "M17.949 10.315a3 3 0 0 1 2.053 2.847V20a1 1 0 0 1-1 1h-2V10l.947.315Z",
|
|
34
|
+
shapeRendering: "geometricPrecision"
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
RootEnterpriseSolutions.displayName = 'EnterpriseSolutions';
|
|
38
|
+
var EnterpriseSolutions = (0, _core.createBaseComponent)(RootEnterpriseSolutions);
|
|
39
|
+
exports["default"] = EnterpriseSolutions;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { createBaseComponent } from '@semcore/core';
|
|
4
|
+
import Icon from '../../lib/esm/index.mjs';
|
|
5
|
+
function RootEnterpriseSolutions({
|
|
6
|
+
width = '24',
|
|
7
|
+
height = '24',
|
|
8
|
+
viewBox = '0 0 24 24',
|
|
9
|
+
...props
|
|
10
|
+
}, ref) {
|
|
11
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
12
|
+
ref: ref,
|
|
13
|
+
"data-name": "EnterpriseSolutions",
|
|
14
|
+
"data-group": "",
|
|
15
|
+
width: width,
|
|
16
|
+
height: height,
|
|
17
|
+
viewBox: viewBox
|
|
18
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
d: "M12.245 3.15a2 2 0 0 1 2.757 1.851V21h-10a1 1 0 0 1-1-1V8.538A3 3 0 0 1 5.867 5.76l6.378-2.61ZM8.002 15a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2h-3Zm0-4a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2h-3Z",
|
|
20
|
+
shapeRendering: "geometricPrecision"
|
|
21
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
d: "M17.949 10.315a3 3 0 0 1 2.053 2.847V20a1 1 0 0 1-1 1h-2V10l.947.315Z",
|
|
23
|
+
shapeRendering: "geometricPrecision"
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
RootEnterpriseSolutions.displayName = 'EnterpriseSolutions';
|
|
27
|
+
const EnterpriseSolutions = createBaseComponent(RootEnterpriseSolutions);
|
|
28
|
+
export { EnterpriseSolutions as default };
|
|
@@ -27,11 +27,11 @@ function RootSEOToolkit(_ref, ref) {
|
|
|
27
27
|
height: height,
|
|
28
28
|
viewBox: viewBox
|
|
29
29
|
}, props), /*#__PURE__*/_react["default"].createElement("path", {
|
|
30
|
-
d: "
|
|
30
|
+
d: "M4.838 5.224c-.067-.405.016-.842.33-1.099a7.88 7.88 0 0 1 1.66-1.047c.393-.183.84-.023 1.17.262A3.046 3.046 0 0 0 10 4.1c.758 0 1.454-.284 2.002-.759.33-.285.776-.445 1.17-.262.594.277 1.151.63 1.66 1.047.314.257.397.694.33 1.1a3.72 3.72 0 0 0-.028.994 7.983 7.983 0 0 0-3.597 1.937 3.5 3.5 0 0 0-2.508 6.52c.058.706.209 1.386.44 2.027L7.171 19a.836.836 0 0 1-.344-.078 7.881 7.881 0 0 1-1.66-1.047c-.314-.257-.397-.694-.33-1.1a3.668 3.668 0 0 0-.38-2.324 3.265 3.265 0 0 0-1.621-1.495c-.388-.161-.729-.47-.777-.896a9.386 9.386 0 0 1 0-2.12c.048-.426.389-.735.777-.896a3.265 3.265 0 0 0 1.62-1.495 3.668 3.668 0 0 0 .38-2.325Z",
|
|
31
31
|
shapeRendering: "geometricPrecision"
|
|
32
32
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
33
33
|
fillRule: "evenodd",
|
|
34
|
-
d: "
|
|
34
|
+
d: "M23 14a6 6 0 0 1-8.971 5.214l-2.797 2.796a1.5 1.5 0 1 1-2.121-2.12l2.765-2.766A6 6 0 1 1 23 14Zm-3 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",
|
|
35
35
|
clipRule: "evenodd",
|
|
36
36
|
shapeRendering: "geometricPrecision"
|
|
37
37
|
}));
|
|
@@ -16,11 +16,11 @@ function RootSEOToolkit({
|
|
|
16
16
|
height: height,
|
|
17
17
|
viewBox: viewBox
|
|
18
18
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
19
|
-
d: "
|
|
19
|
+
d: "M4.838 5.224c-.067-.405.016-.842.33-1.099a7.88 7.88 0 0 1 1.66-1.047c.393-.183.84-.023 1.17.262A3.046 3.046 0 0 0 10 4.1c.758 0 1.454-.284 2.002-.759.33-.285.776-.445 1.17-.262.594.277 1.151.63 1.66 1.047.314.257.397.694.33 1.1a3.72 3.72 0 0 0-.028.994 7.983 7.983 0 0 0-3.597 1.937 3.5 3.5 0 0 0-2.508 6.52c.058.706.209 1.386.44 2.027L7.171 19a.836.836 0 0 1-.344-.078 7.881 7.881 0 0 1-1.66-1.047c-.314-.257-.397-.694-.33-1.1a3.668 3.668 0 0 0-.38-2.324 3.265 3.265 0 0 0-1.621-1.495c-.388-.161-.729-.47-.777-.896a9.386 9.386 0 0 1 0-2.12c.048-.426.389-.735.777-.896a3.265 3.265 0 0 0 1.62-1.495 3.668 3.668 0 0 0 .38-2.325Z",
|
|
20
20
|
shapeRendering: "geometricPrecision"
|
|
21
21
|
}), /*#__PURE__*/React.createElement("path", {
|
|
22
22
|
fillRule: "evenodd",
|
|
23
|
-
d: "
|
|
23
|
+
d: "M23 14a6 6 0 0 1-8.971 5.214l-2.797 2.796a1.5 1.5 0 1 1-2.121-2.12l2.765-2.766A6 6 0 1 1 23 14Zm-3 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",
|
|
24
24
|
clipRule: "evenodd",
|
|
25
25
|
shapeRendering: "geometricPrecision"
|
|
26
26
|
}));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
2
|
+
<path d="M10.093 6.464C7.329 5.702 6.798 5.17 6.035 2.407a.555.555 0 0 0-1.07 0C4.202 5.17 3.67 5.702.907 6.464a.555.555 0 0 0 0 1.072c2.764.763 3.295 1.294 4.058 4.057a.555.555 0 0 0 1.07 0c.763-2.764 1.294-3.295 4.058-4.057a.556.556 0 0 0 0-1.072ZM22.93 12.25c-3.869-1.068-4.613-1.811-5.68-5.68a.778.778 0 0 0-1.5 0c-1.067 3.868-1.81 4.613-5.68 5.68a.778.778 0 0 0 0 1.5c3.869 1.069 4.613 1.811 5.68 5.68a.778.778 0 0 0 1.5 0c1.067-3.87 1.81-4.613 5.68-5.68a.778.778 0 0 0 0-1.5ZM9 18.379l-2.44-2.44a1.5 1.5 0 0 0-2.12 0l-4 4a1.5 1.5 0 0 0 2.12 2.122l2.94-2.94 2.44 2.44a1.5 1.5 0 0 0 2.12 0l2.5-2.5a1.5 1.5 0 0 0-2.12-2.122L9 18.38Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.245 3.15a2 2 0 0 1 2.757 1.851V21h-10a1 1 0 0 1-1-1V8.538A3 3 0 0 1 5.867 5.76l6.378-2.61ZM8.002 15a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2h-3Zm0-4a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2h-3Z"/><path d="M17.949 10.315a3 3 0 0 1 2.053 2.847V20a1 1 0 0 1-1 1h-2V10l.947.315Z"/></svg>
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
2
|
-
<path d="M5.836 3.864c-.316.242-.397.66-.34 1.049a2.94 2.94 0 0 1-.346 1.862c-.317.566-.794.98-1.338 1.215-.382.165-.726.459-.77.866a7.495 7.495 0 0 0 0 1.601c.044.407.388.7.77.866.544.236 1.02.649 1.338 1.215a2.94 2.94 0 0 1 .345 1.862c-.056.389.025.807.341 1.049.405.308.842.572 1.307.786.39.18.836.025 1.175-.237l.06-.045a7.691 7.691 0 0 1-.213-3.974A2.907 2.907 0 0 1 7 9.656c0-1.62 1.343-2.934 3-2.934.541 0 1.049.14 1.487.385a8.054 8.054 0 0 1 3.037-1.23 2.96 2.96 0 0 1-.02-.965c.057-.389-.024-.807-.34-1.049a6.953 6.953 0 0 0-1.306-.786c-.391-.18-.837-.025-1.176.237a2.736 2.736 0 0 1-3.364 0c-.339-.262-.785-.417-1.175-.237a6.952 6.952 0 0 0-1.307.786Z"/>
|
|
3
|
-
<path fill-rule="evenodd" d="M16 19.436c3.314 0 6-2.627 6-5.867 0-3.241-2.686-5.868-6-5.868s-6 2.627-6 5.868c0 1.267.41 2.44 1.11 3.4l-2.585 2.527a1.444 1.444 0 0 0 0 2.074 1.524 1.524 0 0 0 2.122 0l2.766-2.705a6.09 6.09 0 0 0 2.587.571Zm0-2.934c1.657 0 3-1.313 3-2.933 0-1.62-1.343-2.935-3-2.935s-3 1.314-3 2.934 1.343 2.934 3 2.934Z" clip-rule="evenodd"/>
|
|
4
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.838 5.224c-.067-.405.016-.842.33-1.099a7.88 7.88 0 0 1 1.66-1.047c.393-.183.84-.023 1.17.262A3.046 3.046 0 0 0 10 4.1c.758 0 1.454-.284 2.002-.759.33-.285.776-.445 1.17-.262.594.277 1.151.63 1.66 1.047.314.257.397.694.33 1.1a3.72 3.72 0 0 0-.028.994 7.983 7.983 0 0 0-3.597 1.937 3.5 3.5 0 0 0-2.508 6.52c.058.706.209 1.386.44 2.027L7.171 19a.836.836 0 0 1-.344-.078 7.881 7.881 0 0 1-1.66-1.047c-.314-.257-.397-.694-.33-1.1a3.668 3.668 0 0 0-.38-2.324 3.265 3.265 0 0 0-1.621-1.495c-.388-.161-.729-.47-.777-.896a9.386 9.386 0 0 1 0-2.12c.048-.426.389-.735.777-.896a3.265 3.265 0 0 0 1.62-1.495 3.668 3.668 0 0 0 .38-2.325Z"/><path fill-rule="evenodd" d="M23 14a6 6 0 0 1-8.971 5.214l-2.797 2.796a1.5 1.5 0 1 1-2.121-2.12l2.765-2.766A6 6 0 1 1 23 14Zm-3 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" clip-rule="evenodd"/></svg>
|