@foxford/ui 2.0.0-beta-34b6866-20220714 → 2.0.0-beta-3af3d84-20220725

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.
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/objectSpread2';import s from'@babel/runtime/helpers/objectWithoutProperties';import{Link as i}from'react-router-dom';import{useClassname as r}from'../../hooks/useClassname.js';import{Root as a}from'./style.js';import{jsx as o}from'react/jsx-runtime';var l=["as","to","href","wrapper","className","style","children","content","pseudo","underline","color","display","size","sizeXS","sizeS","sizeM","sizeL","sizeXL"];function p(z){var{as:n,to:t,href:d,wrapper:m,className:c,style:u,children:h,content:y,pseudo:L,underline:S,color:f,display:X,size:b,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w}=z,k=s(z,l);var x=r(p.displayName,c);var A;A='div'!==n||X?X:'block';var C={};return y&&(C=e(e({},C),{},{dangerouslySetInnerHTML:{__html:y}})),o(a,e(n?e(e({as:n,pseudo:L,wrapper:m,underline:S,href:d,className:x,style:u,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):L?e(e({as:"div",pseudo:L,wrapper:m,underline:S,href:d,className:x,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):t?e(e({as:i,to:t,pseudo:L,wrapper:m,underline:S,className:x,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):e(e({as:"a",href:d,pseudo:L,wrapper:m,underline:S,className:x,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},C),k),{},{children:h}))}p.displayName='Anchor',p.defaultProps={display:'inline-block'};export{p as Anchor};
1
+ import e from'@babel/runtime/helpers/objectSpread2';import s from'@babel/runtime/helpers/objectWithoutProperties';import{Link as i}from'react-router-dom';import{useClassname as r}from'../../hooks/useClassname.js';import{Root as a}from'./style.js';import{jsx as o}from'react/jsx-runtime';var l=["as","to","href","wrapper","className","style","children","content","pseudo","underline","color","display","size","sizeXS","sizeS","sizeM","sizeL","sizeXL"];function p(t){var{as:z,to:n,href:d,wrapper:m,className:c,style:u,children:y,content:h,pseudo:L,underline:S,color:f,display:X,size:b,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w}=t,k=s(t,l);var x=r(p.displayName,c);var A;A='div'!==z||X?X:'block';var C={};return h&&(C=e(e({},C),{},{dangerouslySetInnerHTML:{__html:h}})),o(a,e(z?e(e({as:z,pseudo:L,wrapper:m,underline:S,href:d,className:x,style:u,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):L?e(e({as:"div",pseudo:L,wrapper:m,underline:S,href:d,className:x,color:f,style:u,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):n?e(e({as:i,to:n,pseudo:L,wrapper:m,underline:S,className:x,color:f,size:b,style:u,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):e(e({as:"a",href:d,pseudo:L,wrapper:m,underline:S,className:x,color:f,size:b,style:u,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},C),k),{},{children:y}))}p.displayName='Anchor',p.defaultProps={display:'inline-block'};export{p as Anchor};
2
2
  //# sourceMappingURL=Anchor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { BaseProps } from '../../shared/interfaces'\nimport { ResponsiveNamedProperty } from '../../mixins/responsive-property'\nimport { Color } from '../../mixins/color'\nimport { Display } from '../../mixins/display'\nimport * as Styled from './style'\n\nexport interface AnchorProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {\n /**\n * Custom CSS class name\n */\n as?: 'div' | 'span' | 'a' | typeof Link\n /**\n * React router link to\n */\n to?: string\n /**\n * Link href\n */\n href?: string\n /**\n * Is display inline\n * */\n wrapper?: boolean\n /**\n * Pseudo link has dashed bottom border\n * */\n pseudo?: boolean\n /**\n * If link should be underlined\n * */\n underline?: boolean\n /**\n * Primary content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Primary content\n */\n content?: string\n /**\n * Onclick handler\n */\n onClick?: () => void\n target?: string\n rel?: string\n}\n\nAnchor.displayName = 'Anchor'\nAnchor.defaultProps = {\n display: 'inline-block',\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)\n * - [`Display`](#/Миксины)\n */\nexport function Anchor(props: typeof Anchor.defaultProps & AnchorProps) {\n const {\n as,\n to,\n href,\n wrapper,\n className,\n style,\n children,\n content,\n pseudo,\n underline,\n color,\n display,\n size,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...rest\n } = props\n\n const _className = useClassname(Anchor.displayName, className)\n\n let _display: Display['display']\n\n if (as === 'div' && !display) _display = 'block'\n else _display = display\n\n let contentProps = {}\n\n if (content) {\n contentProps = {\n ...contentProps,\n dangerouslySetInnerHTML: { __html: content },\n }\n }\n\n if (as)\n return (\n <Styled.Root\n as={as}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n href={href}\n className={_className}\n style={style}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n\n if (pseudo)\n return (\n <Styled.Root\n as='div'\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n href={href}\n className={_className}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n else if (to)\n return (\n <Styled.Root\n as={Link}\n to={to}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n className={_className}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n else\n return (\n <Styled.Root\n as='a'\n href={href}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n className={_className}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...contentProps}\n {...rest}\n >\n {children}\n </Styled.Root>\n )\n}\n"],"names":["Anchor","props","as","to","href","wrapper","className","style","children","content","pseudo","underline","color","display","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","rest","_excluded","_className","useClassname","displayName","_display","contentProps","dangerouslySetInnerHTML","__html","_jsx","Styled.Root","_objectSpread","Link","defaultProps"],"mappings":"mcAgEO,SAASA,EAAOC,GACrB,IAAMC,GACJA,EADIC,GAEJA,EAFIC,KAGJA,EAHIC,QAIJA,EAJIC,UAKJA,EALIC,MAMJA,EANIC,SAOJA,EAPIC,QAQJA,EARIC,OASJA,EATIC,UAUJA,EAVIC,MAWJA,EAXIC,QAYJA,EAZIC,KAaJA,EAbIC,OAcJA,EAdIC,MAeJA,EAfIC,MAgBJA,EAhBIC,MAiBJA,EAjBIC,OAkBJA,GAEElB,EADCmB,IACDnB,EApBJoB,GAsBA,IAAMC,EAAaC,EAAavB,EAAOwB,YAAalB,GAEpD,IAAImB,EAGCA,EADM,QAAPvB,GAAiBW,EACLA,EADyB,QAGzC,IAAIa,EAAe,GASnB,OAPIjB,IACFiB,SACKA,GADO,GAAA,CAEVC,wBAAyB,CAAEC,OAAQnB,MAMnCoB,EAACC,EAADC,EAFA7B,EAEA6B,EAAAA,EAAA,CACE7B,GAAIA,EACJQ,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXP,KAAMA,EACNE,UAAWgB,EACXf,MAAOA,EACPK,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAMNhB,EAEAqB,EAAAA,EAAA,CACE7B,GAAG,MACHQ,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXP,KAAMA,EACNE,UAAWgB,EACXV,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAKDvB,EAEL4B,EAAAA,EAAA,CACE7B,GAAI8B,EACJ7B,GAAIA,EACJO,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXL,UAAWgB,EACXV,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAONK,EAAAA,EAAA,CACE7B,GAAG,IACHE,KAAMA,EACNM,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXL,UAAWgB,EACXV,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJO,GACAN,GAvFN,GAAA,CAAAZ,SAmBGA,KAxETR,EAAOwB,YAAc,SACrBxB,EAAOiC,aAAe,CACpBpB,QAAS"}
1
+ {"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { BaseProps } from '../../shared/interfaces'\nimport { ResponsiveNamedProperty } from '../../mixins/responsive-property'\nimport { Color } from '../../mixins/color'\nimport { Display } from '../../mixins/display'\nimport * as Styled from './style'\n\nexport interface AnchorProps extends BaseProps, Color, ResponsiveNamedProperty<'size'>, Display {\n /**\n * Custom CSS class name\n */\n as?: 'div' | 'span' | 'a' | typeof Link\n /**\n * React router link to\n */\n to?: string\n /**\n * Link href\n */\n href?: string\n /**\n * Is display inline\n * */\n wrapper?: boolean\n /**\n * Pseudo link has dashed bottom border\n * */\n pseudo?: boolean\n /**\n * If link should be underlined\n * */\n underline?: boolean\n /**\n * Primary content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Primary content\n */\n content?: string\n /**\n * Onclick handler\n */\n onClick?: () => void\n target?: string\n rel?: string\n}\n\nAnchor.displayName = 'Anchor'\nAnchor.defaultProps = {\n display: 'inline-block',\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)\n * - [`Display`](#/Миксины)\n */\nexport function Anchor(props: typeof Anchor.defaultProps & AnchorProps) {\n const {\n as,\n to,\n href,\n wrapper,\n className,\n style,\n children,\n content,\n pseudo,\n underline,\n color,\n display,\n size,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...rest\n } = props\n\n const _className = useClassname(Anchor.displayName, className)\n\n let _display: Display['display']\n\n if (as === 'div' && !display) _display = 'block'\n else _display = display\n\n let contentProps = {}\n\n if (content) {\n contentProps = {\n ...contentProps,\n dangerouslySetInnerHTML: { __html: content },\n }\n }\n\n if (as)\n return (\n <Styled.Root\n as={as}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n href={href}\n className={_className}\n style={style}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n\n if (pseudo)\n return (\n <Styled.Root\n as='div'\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n href={href}\n className={_className}\n color={color}\n style={style}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n else if (to)\n return (\n <Styled.Root\n as={Link}\n to={to}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n className={_className}\n color={color}\n size={size}\n style={style}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n else\n return (\n <Styled.Root\n as='a'\n href={href}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n className={_className}\n color={color}\n size={size}\n style={style}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...contentProps}\n {...rest}\n >\n {children}\n </Styled.Root>\n )\n}\n"],"names":["Anchor","props","as","to","href","wrapper","className","style","children","content","pseudo","underline","color","display","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","rest","_excluded","_className","useClassname","displayName","_display","contentProps","dangerouslySetInnerHTML","__html","_jsx","Styled.Root","_objectSpread","Link","defaultProps"],"mappings":"mcAgEO,SAASA,EAAOC,GACrB,IAAMC,GACJA,EADIC,GAEJA,EAFIC,KAGJA,EAHIC,QAIJA,EAJIC,UAKJA,EALIC,MAMJA,EANIC,SAOJA,EAPIC,QAQJA,EARIC,OASJA,EATIC,UAUJA,EAVIC,MAWJA,EAXIC,QAYJA,EAZIC,KAaJA,EAbIC,OAcJA,EAdIC,MAeJA,EAfIC,MAgBJA,EAhBIC,MAiBJA,EAjBIC,OAkBJA,GAEElB,EADCmB,IACDnB,EApBJoB,GAsBA,IAAMC,EAAaC,EAAavB,EAAOwB,YAAalB,GAEpD,IAAImB,EAGCA,EADM,QAAPvB,GAAiBW,EACLA,EADyB,QAGzC,IAAIa,EAAe,GASnB,OAPIjB,IACFiB,SACKA,GADO,GAAA,CAEVC,wBAAyB,CAAEC,OAAQnB,MAMnCoB,EAACC,EAADC,EAFA7B,EAEA6B,EAAAA,EAAA,CACE7B,GAAIA,EACJQ,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXP,KAAMA,EACNE,UAAWgB,EACXf,MAAOA,EACPK,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAMNhB,EAEAqB,EAAAA,EAAA,CACE7B,GAAG,MACHQ,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXP,KAAMA,EACNE,UAAWgB,EACXV,MAAOA,EACPL,MAAOA,EACPO,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAKDvB,EAEL4B,EAAAA,EAAA,CACE7B,GAAI8B,EACJ7B,GAAIA,EACJO,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXL,UAAWgB,EACXV,MAAOA,EACPE,KAAMA,EACNP,MAAOA,EACPM,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAONK,EAAAA,EAAA,CACE7B,GAAG,IACHE,KAAMA,EACNM,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXL,UAAWgB,EACXV,MAAOA,EACPE,KAAMA,EACNP,MAAOA,EACPM,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJO,GACAN,GA1FN,GAAA,CAAAZ,SAmBGA,KAxETR,EAAOwB,YAAc,SACrBxB,EAAOiC,aAAe,CACpBpB,QAAS"}
@@ -1,2 +1,2 @@
1
- import i,{css as s}from'styled-components';import{vAlign as e}from'../../mixins/vAlign.js';import{color as o}from'../../mixins/color.js';import{property as r,responsiveNamedProperty as n}from'../../mixins/responsive-property.js';var l=s(["cursor:pointer;"]);var t=i.div.withConfig({shouldForwardProp:i=>['children','className','style','dangerouslySetInnerHTML'].includes(i)}).withConfig({componentId:"fox-ui__sc-yfeniy-0"})(["display:inline-block;flex-shrink:0;vertical-align:baseline;width:1em;height:1em;svg{display:block;width:100%;height:100%;fill:currentColor;}"," "," "," "," ",""],(i=>i.pointer?l:null),(i=>i.vAlign?e(i.vAlign):null),(i=>i.color?o(i.color):null),(i=>i.size?r(i.size,'font-size'):null),(i=>{var{sizeXS:s,sizeS:e,sizeM:o,sizeL:r,sizeXL:l}=i;return n({sizes:{sizeXS:s,sizeS:e,sizeM:o,sizeL:r,sizeXL:l},cssProperty:'font-size'})}));export{t as Root};
1
+ import i,{css as s}from'styled-components';import{vAlign as e}from'../../mixins/vAlign.js';import{color as o}from'../../mixins/color.js';import{property as r,responsiveNamedProperty as l}from'../../mixins/responsive-property.js';var n={xxxl:42,xxl:38,xl:34,lm:32,l:30,m:26,s:22,xs:18,xxs:14,xxxs:10};var t=s(["cursor:pointer;"]);var a=i=>'string'==typeof i?n[i]:i;var p=i.div.withConfig({shouldForwardProp:i=>['children','className','style','dangerouslySetInnerHTML'].includes(i)}).withConfig({componentId:"fox-ui__sc-yfeniy-0"})(["display:inline-block;flex-shrink:0;vertical-align:baseline;width:1em;height:1em;svg{display:block;width:100%;height:100%;fill:currentColor;}"," "," "," "," ",""],(i=>i.pointer?t:null),(i=>i.vAlign?e(i.vAlign):null),(i=>i.color?o(i.color):null),(i=>i.size?r(a(i.size),'font-size'):null),(i=>{var{sizeXS:s,sizeS:e,sizeM:o,sizeL:r,sizeXL:n}=i;return l({sizes:{sizeXS:s,sizeS:e,sizeM:o,sizeL:r,sizeXL:n},cssProperty:'font-size',customSizeHandler:a})}));export{p as Root};
2
2
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/Icon/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { vAlign } from '../../mixins/vAlign'\nimport { color } from '../../mixins/color'\nimport { responsiveNamedProperty, property } from '../../mixins/responsive-property'\nimport { IconProps } from './Icon'\n\nconst pointerStyle = css`\n cursor: pointer;\n`\nexport const Root = styled.div.withConfig<IconProps>({\n shouldForwardProp: (prop) => ['children', 'className', 'style', 'dangerouslySetInnerHTML'].includes(prop),\n})`\n display: inline-block;\n flex-shrink: 0;\n vertical-align: baseline;\n width: 1em;\n height: 1em;\n svg {\n display: block;\n width: 100%;\n height: 100%;\n fill: currentColor;\n }\n ${(props) => (props.pointer ? pointerStyle : null)}\n ${(props) => (props.vAlign ? vAlign(props.vAlign) : null)}\n ${(props) => (props.color ? color(props.color) : null)}\n ${(props) => (props.size ? property(props.size, 'font-size') : null)}\n ${({ sizeXS, sizeS, sizeM, sizeL, sizeXL }) =>\n responsiveNamedProperty({ sizes: { sizeXS, sizeS, sizeM, sizeL, sizeXL }, cssProperty: 'font-size' })}\n`\n"],"names":["pointerStyle","css","Root","styled","div","withConfig","shouldForwardProp","prop","includes","componentId","props","pointer","vAlign","color","size","property","_ref","sizeXS","sizeS","sizeM","sizeL","sizeXL","responsiveNamedProperty","sizes","cssProperty"],"mappings":"qOAMA,IAAMA,EAAeC,EAArB,CAAA,oBAGO,IAAMC,EAAOC,EAAOC,IAAIC,WAAsB,CACnDC,kBAAoBC,GAAS,CAAC,WAAY,YAAa,QAAS,2BAA2BC,SAASD,KADrFF,WAAA,CAAAI,YAAA,uBAAGN,CAcfO,CAAAA,+IAAAA,IAAAA,IAAAA,IAAAA,IAAAA,KAAAA,GAAWA,EAAMC,QAAUX,EAAe,OAC1CU,GAAWA,EAAME,OAASA,EAAOF,EAAME,QAAU,OACjDF,GAAWA,EAAMG,MAAQA,EAAMH,EAAMG,OAAS,OAC9CH,GAAWA,EAAMI,KAAOC,EAASL,EAAMI,KAAM,aAAe,OAC7DE,IAAA,IAACC,OAAEA,EAAFC,MAAUA,EAAVC,MAAiBA,EAAjBC,MAAwBA,EAAxBC,OAA+BA,GAAhCL,EAAA,OACAM,EAAwB,CAAEC,MAAO,CAAEN,OAAAA,EAAQC,MAAAA,EAAOC,MAAAA,EAAOC,MAAAA,EAAOC,OAAAA,GAAUG,YAAa"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/Icon/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { vAlign } from '../../mixins/vAlign'\nimport { color } from '../../mixins/color'\nimport { responsiveNamedProperty, property } from '../../mixins/responsive-property'\nimport { IconProps } from './Icon'\n\nconst SIZES = {\n xxxl: 42,\n xxl: 38,\n xl: 34,\n lm: 32,\n l: 30,\n m: 26,\n s: 22,\n xs: 18,\n xxs: 14,\n xxxs: 10,\n}\n\nconst pointerStyle = css`\n cursor: pointer;\n`\n\nconst calcFontSize = (size: IconProps['size']) => {\n return typeof size === 'string' ? SIZES[size] : size\n}\n\nexport const Root = styled.div.withConfig<IconProps>({\n shouldForwardProp: (prop) => ['children', 'className', 'style', 'dangerouslySetInnerHTML'].includes(prop),\n})`\n display: inline-block;\n flex-shrink: 0;\n vertical-align: baseline;\n width: 1em;\n height: 1em;\n svg {\n display: block;\n width: 100%;\n height: 100%;\n fill: currentColor;\n }\n ${(props) => (props.pointer ? pointerStyle : null)}\n ${(props) => (props.vAlign ? vAlign(props.vAlign) : null)}\n ${(props) => (props.color ? color(props.color) : null)}\n ${(props) => (props.size ? property(calcFontSize(props.size), 'font-size') : null)}\n ${({ sizeXS, sizeS, sizeM, sizeL, sizeXL }) =>\n responsiveNamedProperty({\n sizes: { sizeXS, sizeS, sizeM, sizeL, sizeXL },\n cssProperty: 'font-size',\n customSizeHandler: calcFontSize,\n })}\n`\n"],"names":["SIZES","xxxl","xxl","xl","lm","l","m","s","xs","xxs","xxxs","pointerStyle","css","calcFontSize","size","Root","styled","div","withConfig","shouldForwardProp","prop","includes","componentId","props","pointer","vAlign","color","property","_ref","sizeXS","sizeS","sizeM","sizeL","sizeXL","responsiveNamedProperty","sizes","cssProperty","customSizeHandler"],"mappings":"qOAMA,IAAMA,EAAQ,CACZC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,GACLC,KAAM,IAGR,IAAMC,EAAeC,EAArB,CAAA,oBAIA,IAAMC,EAAgBC,GACG,iBAATA,EAAoBd,EAAMc,GAAQA,EAG3C,IAAMC,EAAOC,EAAOC,IAAIC,WAAsB,CACnDC,kBAAoBC,GAAS,CAAC,WAAY,YAAa,QAAS,2BAA2BC,SAASD,KADrFF,WAAA,CAAAI,YAAA,uBAAGN,CAcfO,CAAAA,+IAAAA,IAAAA,IAAAA,IAAAA,IAAAA,KAAAA,GAAWA,EAAMC,QAAUb,EAAe,OAC1CY,GAAWA,EAAME,OAASA,EAAOF,EAAME,QAAU,OACjDF,GAAWA,EAAMG,MAAQA,EAAMH,EAAMG,OAAS,OAC9CH,GAAWA,EAAMT,KAAOa,EAASd,EAAaU,EAAMT,MAAO,aAAe,OAC3Ec,IAAA,IAACC,OAAEA,EAAFC,MAAUA,EAAVC,MAAiBA,EAAjBC,MAAwBA,EAAxBC,OAA+BA,GAAhCL,EAAA,OACAM,EAAwB,CACtBC,MAAO,CAAEN,OAAAA,EAAQC,MAAAA,EAAOC,MAAAA,EAAOC,MAAAA,EAAOC,OAAAA,GACtCG,YAAa,YACbC,kBAAmBxB"}
package/dts/index.d.ts CHANGED
@@ -266,12 +266,12 @@ declare const responsiveNamedProperty: <T extends PropsProperties>({ sizes, cssP
266
266
  /**
267
267
  * Миксин для генерации media запросов
268
268
  *
269
- * @param property имя пропсы
269
+ * @param propName имя пропсы
270
270
  * @param cssProperty имя css свойства
271
271
  * @param sizing значение величины, по умолчанию `px`
272
272
  * @returns строки медиазапросов
273
273
  */
274
- declare const responsiveProperty: (property: string, cssProperty?: string | null, sizing?: null | string) => () => (props: any) => styled_components.FlattenInterpolation<styled_components.ThemeProps<styled_components.DefaultTheme>> | null;
274
+ declare const responsiveProperty: (propName: string, cssProperty?: string | null, sizing?: null | string) => () => (props: any) => styled_components.FlattenInterpolation<styled_components.ThemeProps<styled_components.DefaultTheme>> | null;
275
275
 
276
276
  declare enum SizeInput {
277
277
  l = 380,