@foxford/ui 2.0.0-beta-34b6866-20220714 → 2.0.0-beta-cc8d265-20220714
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/style.js +1 -1
- package/components/Icon/style.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/style.js
CHANGED
|
@@ -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
|
|
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({
|
|
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"}
|