@foxford/ui 2.121.0 → 2.121.1
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
|
-
'use strict';var styled=require('styled-components');var style=require('../../shared/utils/style.js');var templates=require('./templates.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const COLOR_SCHEMA={'gd-1':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-2':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-3':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-4':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-5':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-6':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-7':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-8':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-9':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-10':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-11':{firstColor:'#B199FF',secondColor:'#6035E2'},'gd-12':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-13':{firstColor:'#B199FF',secondColor:'#6035E2'},'gd-14':{firstColor:'rgba(255, 255, 255, 0.1)',secondColor:'#6035E2'},'gd-15':{firstColor:'rgba(255, 255, 255, 0.1)',secondColor:'#6035E2'}};const shouldForwardProp=style.createShouldForwardProp(o=>!['flipX','flipY','variant'].includes(o));const Background=styled__default.default.div.withConfig({displayName:"Gradient__Background",componentId:"ui__sc-337cql-0"})(["z-index:-1;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;background-repeat:no-repeat;background-position:center;background-size:cover;"]);const Root=styled__default.default.div.withConfig({shouldForwardProp}).withConfig({displayName:"Gradient__Root",componentId:"ui__sc-337cql-1"})(["appearance:none;padding:0;margin:0;border:none;position:relative;box-sizing:border-box;width:100%;height:100%;isolation:isolate;& > ","{transform:",";","}"],Background,o=>o.flipX&&o.flipY?"scale(-1, -1)":o.flipX?"scale(-1, 1)":o.flipY?"scale(1, -1)":"none",o=>templates.GRADIENT_TEMPLATES[o.variant]((o=>({...COLOR_SCHEMA[o.variant],...o.palette}))(o)));exports.Background=Background,exports.Root=Root;
|
|
1
|
+
'use strict';var styled=require('styled-components');var style=require('../../shared/utils/style.js');var templates=require('./templates.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const COLOR_SCHEMA={'gd-1':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-2':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-3':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-4':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-5':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-6':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-7':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-8':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-9':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-10':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-11':{firstColor:'#B199FF',secondColor:'#6035E2'},'gd-12':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-13':{firstColor:'#B199FF',secondColor:'#6035E2'},'gd-14':{firstColor:'rgba(255, 255, 255, 0.1)',secondColor:'#6035E2'},'gd-15':{firstColor:'rgba(255, 255, 255, 0.1)',secondColor:'#6035E2'}};const shouldForwardProp=style.createShouldForwardProp(o=>!['flipX','flipY','variant'].includes(o));const Background=styled__default.default.div.withConfig({displayName:"Gradient__Background",componentId:"ui__sc-337cql-0"})(["z-index:-1;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;background-repeat:no-repeat;background-position:center;background-size:cover;border-radius:inherit;"]);const Root=styled__default.default.div.withConfig({shouldForwardProp}).withConfig({displayName:"Gradient__Root",componentId:"ui__sc-337cql-1"})(["appearance:none;padding:0;margin:0;border:none;position:relative;box-sizing:border-box;width:100%;height:100%;isolation:isolate;& > ","{transform:",";","}"],Background,o=>o.flipX&&o.flipY?"scale(-1, -1)":o.flipX?"scale(-1, 1)":o.flipY?"scale(1, -1)":"none",o=>templates.GRADIENT_TEMPLATES[o.variant]((o=>({...COLOR_SCHEMA[o.variant],...o.palette}))(o)));exports.Background=Background,exports.Root=Root;
|
|
2
2
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../src/components/Gradient/style.ts"],"sourcesContent":["import type { DefaultTheme, ThemedStyledProps } from 'styled-components'\nimport styled from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { StyledGradientProps, GradientPalette, GradientVariant } from './types'\nimport { GRADIENT_TEMPLATES } from './templates'\n\nconst COLOR_SCHEMA: Record<GradientVariant, GradientPalette> = {\n 'gd-1': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-2': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-3': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-4': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-5': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-6': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-7': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-8': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-9': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-10': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-11': {\n firstColor: '#B199FF',\n secondColor: '#6035E2',\n },\n 'gd-12': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-13': {\n firstColor: '#B199FF',\n secondColor: '#6035E2',\n },\n 'gd-14': {\n firstColor: 'rgba(255, 255, 255, 0.1)',\n secondColor: '#6035E2',\n },\n 'gd-15': {\n firstColor: 'rgba(255, 255, 255, 0.1)',\n secondColor: '#6035E2',\n },\n}\n\nconst shouldForwardProp = createShouldForwardProp((propKey) => !['flipX', 'flipY', 'variant'].includes(propKey))\n\nconst resolvePalette = (props: ThemedStyledProps<StyledGradientProps, DefaultTheme>): GradientPalette => ({\n ...COLOR_SCHEMA[props.variant],\n ...props.palette,\n})\n\nexport const Background = styled.div`\n z-index: -1;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n`\n\nexport const Root = styled.div.withConfig<StyledGradientProps>({\n shouldForwardProp,\n})`\n appearance: none;\n padding: 0;\n margin: 0;\n border: none;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n isolation: isolate;\n\n & > ${Background} {\n transform: ${(props) => {\n if (props.flipX && props.flipY) {\n return `scale(-1, -1)`\n }\n if (props.flipX) {\n return `scale(-1, 1)`\n }\n if (props.flipY) {\n return `scale(1, -1)`\n }\n\n return `none`\n }};\n\n ${(props) => GRADIENT_TEMPLATES[props.variant](resolvePalette(props))}\n }\n`\n"],"names":["COLOR_SCHEMA","firstColor","secondColor","shouldForwardProp","createShouldForwardProp","propKey","includes","Background","styled","div","withConfig","displayName","componentId","Root","props","flipX","flipY","GRADIENT_TEMPLATES","variant","palette","resolvePalette"],"mappings":"2PAMA,MAAMA,aAAyD,CAC7D,OAAQ,CACNC,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,2BACZC,YAAa,WAEf,QAAS,CACPD,WAAY,2BACZC,YAAa,YAIjB,MAAMC,kBAAoBC,MAAAA,wBAAyBC,IAAa,CAAC,QAAS,QAAS,WAAWC,SAASD,UAO1FE,WAAaC,gBAAAA,QAAOC,IAAGC,WAAA,CAAAC,YAAA,uBAAAC,YAAA,mBAAVJ,CAAU,CAAA,
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/Gradient/style.ts"],"sourcesContent":["import type { DefaultTheme, ThemedStyledProps } from 'styled-components'\nimport styled from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { StyledGradientProps, GradientPalette, GradientVariant } from './types'\nimport { GRADIENT_TEMPLATES } from './templates'\n\nconst COLOR_SCHEMA: Record<GradientVariant, GradientPalette> = {\n 'gd-1': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-2': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-3': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-4': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-5': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-6': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-7': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-8': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-9': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-10': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-11': {\n firstColor: '#B199FF',\n secondColor: '#6035E2',\n },\n 'gd-12': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-13': {\n firstColor: '#B199FF',\n secondColor: '#6035E2',\n },\n 'gd-14': {\n firstColor: 'rgba(255, 255, 255, 0.1)',\n secondColor: '#6035E2',\n },\n 'gd-15': {\n firstColor: 'rgba(255, 255, 255, 0.1)',\n secondColor: '#6035E2',\n },\n}\n\nconst shouldForwardProp = createShouldForwardProp((propKey) => !['flipX', 'flipY', 'variant'].includes(propKey))\n\nconst resolvePalette = (props: ThemedStyledProps<StyledGradientProps, DefaultTheme>): GradientPalette => ({\n ...COLOR_SCHEMA[props.variant],\n ...props.palette,\n})\n\nexport const Background = styled.div`\n z-index: -1;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n border-radius: inherit;\n`\n\nexport const Root = styled.div.withConfig<StyledGradientProps>({\n shouldForwardProp,\n})`\n appearance: none;\n padding: 0;\n margin: 0;\n border: none;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n isolation: isolate;\n\n & > ${Background} {\n transform: ${(props) => {\n if (props.flipX && props.flipY) {\n return `scale(-1, -1)`\n }\n if (props.flipX) {\n return `scale(-1, 1)`\n }\n if (props.flipY) {\n return `scale(1, -1)`\n }\n\n return `none`\n }};\n\n ${(props) => GRADIENT_TEMPLATES[props.variant](resolvePalette(props))}\n }\n`\n"],"names":["COLOR_SCHEMA","firstColor","secondColor","shouldForwardProp","createShouldForwardProp","propKey","includes","Background","styled","div","withConfig","displayName","componentId","Root","props","flipX","flipY","GRADIENT_TEMPLATES","variant","palette","resolvePalette"],"mappings":"2PAMA,MAAMA,aAAyD,CAC7D,OAAQ,CACNC,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,2BACZC,YAAa,WAEf,QAAS,CACPD,WAAY,2BACZC,YAAa,YAIjB,MAAMC,kBAAoBC,MAAAA,wBAAyBC,IAAa,CAAC,QAAS,QAAS,WAAWC,SAASD,UAO1FE,WAAaC,gBAAAA,QAAOC,IAAGC,WAAA,CAAAC,YAAA,uBAAAC,YAAA,mBAAVJ,CAAU,CAAA,uLAc7B,MAAMK,KAAOL,gBAAAA,QAAOC,IAAIC,WAAgC,CAC7DP,oBACAO,WAAA,CAAAC,YAAA,iBAAAC,YAAA,mBAFkBJ,CAElB,CAAA,uIAAA,cAAA,IAAA,KAWMD,WACUO,GACRA,EAAMC,OAASD,EAAME,MAChB,gBAELF,EAAMC,MACD,eAELD,EAAME,MACD,eAGF,OAGNF,GAAUG,UAAAA,mBAAmBH,EAAMI,SA/ClBJ,KAA2D,IAC9Ed,aAAac,EAAMI,YACnBJ,EAAMK,UA6CwCC,CAAeN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import styled from'styled-components';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{GRADIENT_TEMPLATES}from'./templates.mjs';const COLOR_SCHEMA={'gd-1':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-2':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-3':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-4':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-5':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-6':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-7':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-8':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-9':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-10':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-11':{firstColor:'#B199FF',secondColor:'#6035E2'},'gd-12':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-13':{firstColor:'#B199FF',secondColor:'#6035E2'},'gd-14':{firstColor:'rgba(255, 255, 255, 0.1)',secondColor:'#6035E2'},'gd-15':{firstColor:'rgba(255, 255, 255, 0.1)',secondColor:'#6035E2'}};const shouldForwardProp=createShouldForwardProp(o=>!['flipX','flipY','variant'].includes(o));const Background=styled.div.withConfig({displayName:"Gradient__Background",componentId:"ui__sc-337cql-0"})(["z-index:-1;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;background-repeat:no-repeat;background-position:center;background-size:cover;"]);const Root=styled.div.withConfig({shouldForwardProp}).withConfig({displayName:"Gradient__Root",componentId:"ui__sc-337cql-1"})(["appearance:none;padding:0;margin:0;border:none;position:relative;box-sizing:border-box;width:100%;height:100%;isolation:isolate;& > ","{transform:",";","}"],Background,o=>o.flipX&&o.flipY?"scale(-1, -1)":o.flipX?"scale(-1, 1)":o.flipY?"scale(1, -1)":"none",o=>GRADIENT_TEMPLATES[o.variant]((o=>({...COLOR_SCHEMA[o.variant],...o.palette}))(o)));export{Background,Root};
|
|
1
|
+
import styled from'styled-components';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{GRADIENT_TEMPLATES}from'./templates.mjs';const COLOR_SCHEMA={'gd-1':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-2':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-3':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-4':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-5':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-6':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-7':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-8':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-9':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-10':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-11':{firstColor:'#B199FF',secondColor:'#6035E2'},'gd-12':{firstColor:'#6035E2',secondColor:'#B199FF'},'gd-13':{firstColor:'#B199FF',secondColor:'#6035E2'},'gd-14':{firstColor:'rgba(255, 255, 255, 0.1)',secondColor:'#6035E2'},'gd-15':{firstColor:'rgba(255, 255, 255, 0.1)',secondColor:'#6035E2'}};const shouldForwardProp=createShouldForwardProp(o=>!['flipX','flipY','variant'].includes(o));const Background=styled.div.withConfig({displayName:"Gradient__Background",componentId:"ui__sc-337cql-0"})(["z-index:-1;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;background-repeat:no-repeat;background-position:center;background-size:cover;border-radius:inherit;"]);const Root=styled.div.withConfig({shouldForwardProp}).withConfig({displayName:"Gradient__Root",componentId:"ui__sc-337cql-1"})(["appearance:none;padding:0;margin:0;border:none;position:relative;box-sizing:border-box;width:100%;height:100%;isolation:isolate;& > ","{transform:",";","}"],Background,o=>o.flipX&&o.flipY?"scale(-1, -1)":o.flipX?"scale(-1, 1)":o.flipY?"scale(1, -1)":"none",o=>GRADIENT_TEMPLATES[o.variant]((o=>({...COLOR_SCHEMA[o.variant],...o.palette}))(o)));export{Background,Root};
|
|
2
2
|
//# sourceMappingURL=style.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","sources":["../../../../src/components/Gradient/style.ts"],"sourcesContent":["import type { DefaultTheme, ThemedStyledProps } from 'styled-components'\nimport styled from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { StyledGradientProps, GradientPalette, GradientVariant } from './types'\nimport { GRADIENT_TEMPLATES } from './templates'\n\nconst COLOR_SCHEMA: Record<GradientVariant, GradientPalette> = {\n 'gd-1': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-2': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-3': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-4': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-5': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-6': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-7': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-8': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-9': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-10': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-11': {\n firstColor: '#B199FF',\n secondColor: '#6035E2',\n },\n 'gd-12': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-13': {\n firstColor: '#B199FF',\n secondColor: '#6035E2',\n },\n 'gd-14': {\n firstColor: 'rgba(255, 255, 255, 0.1)',\n secondColor: '#6035E2',\n },\n 'gd-15': {\n firstColor: 'rgba(255, 255, 255, 0.1)',\n secondColor: '#6035E2',\n },\n}\n\nconst shouldForwardProp = createShouldForwardProp((propKey) => !['flipX', 'flipY', 'variant'].includes(propKey))\n\nconst resolvePalette = (props: ThemedStyledProps<StyledGradientProps, DefaultTheme>): GradientPalette => ({\n ...COLOR_SCHEMA[props.variant],\n ...props.palette,\n})\n\nexport const Background = styled.div`\n z-index: -1;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n`\n\nexport const Root = styled.div.withConfig<StyledGradientProps>({\n shouldForwardProp,\n})`\n appearance: none;\n padding: 0;\n margin: 0;\n border: none;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n isolation: isolate;\n\n & > ${Background} {\n transform: ${(props) => {\n if (props.flipX && props.flipY) {\n return `scale(-1, -1)`\n }\n if (props.flipX) {\n return `scale(-1, 1)`\n }\n if (props.flipY) {\n return `scale(1, -1)`\n }\n\n return `none`\n }};\n\n ${(props) => GRADIENT_TEMPLATES[props.variant](resolvePalette(props))}\n }\n`\n"],"names":["COLOR_SCHEMA","firstColor","secondColor","shouldForwardProp","createShouldForwardProp","propKey","includes","Background","styled","div","withConfig","displayName","componentId","Root","props","flipX","flipY","GRADIENT_TEMPLATES","variant","palette","resolvePalette"],"mappings":"wJAMA,MAAMA,aAAyD,CAC7D,OAAQ,CACNC,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,2BACZC,YAAa,WAEf,QAAS,CACPD,WAAY,2BACZC,YAAa,YAIjB,MAAMC,kBAAoBC,wBAAyBC,IAAa,CAAC,QAAS,QAAS,WAAWC,SAASD,UAO1FE,WAAaC,OAAOC,IAAGC,WAAA,CAAAC,YAAA,uBAAAC,YAAA,mBAAVJ,CAAU,CAAA,
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../src/components/Gradient/style.ts"],"sourcesContent":["import type { DefaultTheme, ThemedStyledProps } from 'styled-components'\nimport styled from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { StyledGradientProps, GradientPalette, GradientVariant } from './types'\nimport { GRADIENT_TEMPLATES } from './templates'\n\nconst COLOR_SCHEMA: Record<GradientVariant, GradientPalette> = {\n 'gd-1': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-2': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-3': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-4': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-5': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-6': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-7': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-8': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-9': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-10': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-11': {\n firstColor: '#B199FF',\n secondColor: '#6035E2',\n },\n 'gd-12': {\n firstColor: '#6035E2',\n secondColor: '#B199FF',\n },\n 'gd-13': {\n firstColor: '#B199FF',\n secondColor: '#6035E2',\n },\n 'gd-14': {\n firstColor: 'rgba(255, 255, 255, 0.1)',\n secondColor: '#6035E2',\n },\n 'gd-15': {\n firstColor: 'rgba(255, 255, 255, 0.1)',\n secondColor: '#6035E2',\n },\n}\n\nconst shouldForwardProp = createShouldForwardProp((propKey) => !['flipX', 'flipY', 'variant'].includes(propKey))\n\nconst resolvePalette = (props: ThemedStyledProps<StyledGradientProps, DefaultTheme>): GradientPalette => ({\n ...COLOR_SCHEMA[props.variant],\n ...props.palette,\n})\n\nexport const Background = styled.div`\n z-index: -1;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n border-radius: inherit;\n`\n\nexport const Root = styled.div.withConfig<StyledGradientProps>({\n shouldForwardProp,\n})`\n appearance: none;\n padding: 0;\n margin: 0;\n border: none;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n isolation: isolate;\n\n & > ${Background} {\n transform: ${(props) => {\n if (props.flipX && props.flipY) {\n return `scale(-1, -1)`\n }\n if (props.flipX) {\n return `scale(-1, 1)`\n }\n if (props.flipY) {\n return `scale(1, -1)`\n }\n\n return `none`\n }};\n\n ${(props) => GRADIENT_TEMPLATES[props.variant](resolvePalette(props))}\n }\n`\n"],"names":["COLOR_SCHEMA","firstColor","secondColor","shouldForwardProp","createShouldForwardProp","propKey","includes","Background","styled","div","withConfig","displayName","componentId","Root","props","flipX","flipY","GRADIENT_TEMPLATES","variant","palette","resolvePalette"],"mappings":"wJAMA,MAAMA,aAAyD,CAC7D,OAAQ,CACNC,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,OAAQ,CACND,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,UACZC,YAAa,WAEf,QAAS,CACPD,WAAY,2BACZC,YAAa,WAEf,QAAS,CACPD,WAAY,2BACZC,YAAa,YAIjB,MAAMC,kBAAoBC,wBAAyBC,IAAa,CAAC,QAAS,QAAS,WAAWC,SAASD,UAO1FE,WAAaC,OAAOC,IAAGC,WAAA,CAAAC,YAAA,uBAAAC,YAAA,mBAAVJ,CAAU,CAAA,uLAc7B,MAAMK,KAAOL,OAAOC,IAAIC,WAAgC,CAC7DP,oBACAO,WAAA,CAAAC,YAAA,iBAAAC,YAAA,mBAFkBJ,CAElB,CAAA,uIAAA,cAAA,IAAA,KAWMD,WACUO,GACRA,EAAMC,OAASD,EAAME,MAChB,gBAELF,EAAMC,MACD,eAELD,EAAME,MACD,eAGF,OAGNF,GAAUG,mBAAmBH,EAAMI,SA/ClBJ,KAA2D,IAC9Ed,aAAac,EAAMI,YACnBJ,EAAMK,UA6CwCC,CAAeN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foxford/ui",
|
|
3
|
-
"version": "2.121.
|
|
3
|
+
"version": "2.121.1",
|
|
4
4
|
"description": "UI components and utilities",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/foxford/ui/issues"
|
|
@@ -63,6 +63,6 @@
|
|
|
63
63
|
"shared",
|
|
64
64
|
"theme"
|
|
65
65
|
],
|
|
66
|
-
"sha": "
|
|
66
|
+
"sha": "5ec7f5e",
|
|
67
67
|
"scripts": {}
|
|
68
68
|
}
|