@foxford/ui 2.0.0-beta-c4bb20f-20220704 → 2.0.0-beta-2e17b82-20220704
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/components/Icon/Icon.js +1 -1
- package/components/Icon/Icon.js.map +1 -1
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/package.json +1 -1
package/components/Icon/Icon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Root as s}from'./style.js';import{defaultIcons as e}from'./icons.js';export{IconNames}from'./icons.js';import{jsxs as i,jsx as o}from'react/jsx-runtime';function l(l){var{name:n,icon:r,svg:
|
|
1
|
+
import{Root as s}from'./style.js';import{defaultIcons as e}from'./icons.js';export{IconNames}from'./icons.js';import{jsxs as i,jsx as o}from'react/jsx-runtime';function l(l){var{name:n,icon:r,svg:z,pointer:t,color:a,size:c,sizeXS:m,sizeS:p,sizeM:L,sizeL:S,sizeXL:X,className:d,style:u,vAlign:y,children:f}=l;return n&&e[n]?i(s,{vAlign:y,color:a,pointer:t,className:d,size:c,sizeXS:m,sizeS:p,sizeM:L,sizeL:S,sizeXL:X,style:u,children:[o(e[n],{}),f]}):z?o(s,{vAlign:y,color:a,pointer:t,className:d,size:c,sizeXS:m,sizeS:p,sizeM:L,sizeL:S,sizeXL:X,style:u,dangerouslySetInnerHTML:{__html:z||''},children:r||null}):i(s,{vAlign:y,color:a,pointer:t,className:d,size:c,sizeXS:m,sizeS:p,sizeM:L,sizeL:S,sizeXL:X,style:u,children:[r||null,f]})}l.displayName='Icon';export{l as Icon};
|
|
2
2
|
//# sourceMappingURL=Icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { Color } from '../../mixins/color'\nimport { VAlign } from '../../mixins/vAlign'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nimport { defaultIcons, IconNames } from './icons'\n\nexport interface IconProps extends BaseProps, Color, VAlign, ResponsiveProperty<'size'> {\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Name of default icon\n */\n name?: keyof typeof IconNames\n /**\n * Object with icon's svg. Use for custom icon insertion\n */\n svg?: string\n /**\n * Object with icon's svg. Use for custom icon insertion\n */\n icon?: React.ReactNode\n /**\n * Show pointer cursor on hover?\n */\n pointer?: boolean\n}\n\nIcon.displayName = 'Icon'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`VAlign`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Color<'fontColor'>`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Icon(props: IconProps) {\n const {\n name,\n icon,\n svg,\n pointer,\n color,\n size,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n className,\n style,\n vAlign,\n children,\n } = props\n\n if (name && defaultIcons[name]) {\n const Icon = defaultIcons[name]\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={className}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n >\n <Icon />\n {children}\n </Styled.Root>\n )\n }\n\n if (svg)\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n className={className}\n style={style}\n dangerouslySetInnerHTML={{ __html: svg || '' }}\n >\n {icon || null}\n </Styled.Root>\n )\n\n return (\n <Styled.Root
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { Color } from '../../mixins/color'\nimport { VAlign } from '../../mixins/vAlign'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nimport { defaultIcons, IconNames } from './icons'\n\nexport interface IconProps extends BaseProps, Color, VAlign, ResponsiveProperty<'size'> {\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Name of default icon\n */\n name?: keyof typeof IconNames\n /**\n * Object with icon's svg. Use for custom icon insertion\n */\n svg?: string\n /**\n * Object with icon's svg. Use for custom icon insertion\n */\n icon?: React.ReactNode\n /**\n * Show pointer cursor on hover?\n */\n pointer?: boolean\n}\n\nIcon.displayName = 'Icon'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`VAlign`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Color<'fontColor'>`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Icon(props: IconProps) {\n const {\n name,\n icon,\n svg,\n pointer,\n color,\n size,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n className,\n style,\n vAlign,\n children,\n } = props\n\n if (name && defaultIcons[name]) {\n const Icon = defaultIcons[name]\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={className}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n >\n <Icon />\n {children}\n </Styled.Root>\n )\n }\n\n if (svg)\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={className}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n dangerouslySetInnerHTML={{ __html: svg || '' }}\n >\n {icon || null}\n </Styled.Root>\n )\n\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={className}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n >\n {icon || null}\n {children}\n </Styled.Root>\n )\n}\n\nexport { IconNames }\n"],"names":["Icon","props","name","icon","svg","pointer","color","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","style","vAlign","children","defaultIcons","_jsxs","Styled.Root","_jsx","dangerouslySetInnerHTML","__html","displayName"],"mappings":"gKAyCO,SAASA,EAAKC,GACnB,IAAMC,KACJA,EADIC,KAEJA,EAFIC,IAGJA,EAHIC,QAIJA,EAJIC,MAKJA,EALIC,KAMJA,EANIC,OAOJA,EAPIC,MAQJA,EARIC,MASJA,EATIC,MAUJA,EAVIC,OAWJA,EAXIC,UAYJA,EAZIC,MAaJA,EAbIC,OAcJA,EAdIC,SAeJA,GACEf,EAEJ,OAAIC,GAAQe,EAAaf,GAGrBgB,EAACC,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWA,EACXN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EAXTE,SAAA,CAaEI,EAfSH,EAAaf,GAExB,IAcGc,KAKHZ,EAEAgB,EAACD,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWA,EACXN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EACPO,wBAAyB,CAAEC,OAAQlB,GAAO,IAZ5CY,SAcGb,GAAQ,OAKbe,EAACC,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWA,EACXN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EAXTE,SAAA,CAaGb,GAAQ,KACRa,KAtFPhB,EAAKuB,YAAc"}
|