@foxford/ui 2.3.0 → 2.3.1-beta-c5df908-20230413

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxford/ui",
3
- "version": "2.3.0",
3
+ "version": "2.3.1-beta-c5df908-20230413",
4
4
  "description": "UI components library",
5
5
  "main": "index.cjs.js",
6
6
  "module": "index.js",
@@ -83,3 +83,4 @@
83
83
  "ui-kit"
84
84
  ]
85
85
  }
86
+
@@ -0,0 +1,2 @@
1
+ import e from'@babel/runtime/helpers/objectSpread2';function o(o,r,t){return o.reduce(((o,n)=>{var p;var a=r[n];var b=t[n];return(a||'boolean'==typeof a||'number'==typeof a)&&(p=a),(b||'boolean'==typeof b||'number'==typeof b)&&(p=b),e(e({},o),{},{[n]:p})}),{})}export{o as getComponentConfig};
2
+ //# sourceMappingURL=get-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-config.js","sources":["../../../../src/shared/utils/get-config.ts"],"sourcesContent":["export function getComponentConfig<T>(propNames: (keyof T)[], context: Partial<T>, props: Partial<T>) {\n return propNames.reduce((config, propName) => {\n let resultVal\n\n const contextVal = context[propName]\n const propsVal = props[propName]\n\n if (contextVal || typeof contextVal === 'boolean' || typeof contextVal === 'number') {\n resultVal = contextVal\n }\n\n if (propsVal || typeof propsVal === 'boolean' || typeof propsVal === 'number') {\n resultVal = propsVal\n }\n\n return {\n ...config,\n [propName]: resultVal,\n }\n }, {} as T)\n}\n"],"names":["getComponentConfig","propNames","context","props","reduce","config","propName","resultVal","contextVal","propsVal","_objectSpread"],"mappings":"oDAAO,SAASA,EAAsBC,EAAwBC,EAAqBC,GACjF,OAAOF,EAAUG,QAAO,CAACC,EAAQC,KAC/B,IAAIC,EAEJ,IAAMC,EAAaN,EAAQI,GAC3B,IAAMG,EAAWN,EAAMG,GAUvB,OARIE,GAAoC,kBAAfA,GAAkD,iBAAfA,KAC1DD,EAAYC,IAGVC,GAAgC,kBAAbA,GAA8C,iBAAbA,KACtDF,EAAYE,GAGdC,EAAAA,EAAA,GACKL,GADL,GAAA,CAEEC,CAACA,GAAWC,MAEb"}
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/objectSpread2';import{defaultTheme as t}from'../../theme/themes.js';function m(m){var r='object'==typeof m.theme&&Object.keys(m.theme).length?m.theme:t;return e(e({},m),{},{theme:r})}export{m as injectDefaultTheme};
1
+ import e from'@babel/runtime/helpers/objectSpread2';import{defaultTheme as t}from'../../theme/themes.js';function r(r){var m=r.theme;var o='object'==typeof m&&null!==m&&Object.keys(m).length>0?m:t;return e(e({},r),{},{theme:o})}export{r as injectDefaultTheme};
2
2
  //# sourceMappingURL=inject-theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inject-theme.js","sources":["../../../../src/shared/utils/inject-theme.ts"],"sourcesContent":["import type { DefaultTheme } from 'styled-components'\nimport { defaultTheme } from '../../theme/themes'\n\nexport function injectDefaultTheme(\n config: { theme: DefaultTheme | void } & Record<string, unknown>\n): { theme: DefaultTheme } & Record<string, unknown> {\n const forwardTheme =\n typeof config.theme !== 'object' || !Object.keys(config.theme).length ? defaultTheme : config.theme\n\n return {\n ...config,\n theme: forwardTheme,\n }\n}\n"],"names":["injectDefaultTheme","config","forwardTheme","theme","Object","keys","length","defaultTheme","_objectSpread"],"mappings":"yGAGO,SAASA,EACdC,GAEA,IAAMC,EACoB,iBAAjBD,EAAOE,OAAuBC,OAAOC,KAAKJ,EAAOE,OAAOG,OAAwBL,EAAOE,MAAtBI,EAE1E,OAAAC,EAAAA,EAAA,GACKP,GADL,GAAA,CAEEE,MAAOD"}
1
+ {"version":3,"file":"inject-theme.js","sources":["../../../../src/shared/utils/inject-theme.ts"],"sourcesContent":["import type { DefaultTheme } from 'styled-components'\nimport { defaultTheme } from '../../theme/themes'\n\nexport function injectDefaultTheme(\n config: { theme: DefaultTheme | void } & Record<string, unknown>\n): { theme: DefaultTheme } & Record<string, unknown> {\n const contextTheme = config.theme\n\n const shouldForwardTheme =\n typeof contextTheme === 'object' && contextTheme !== null && Object.keys(contextTheme).length > 0\n\n const forwardedTheme = shouldForwardTheme ? contextTheme : defaultTheme\n\n return {\n ...config,\n theme: forwardedTheme,\n }\n}\n"],"names":["injectDefaultTheme","config","contextTheme","theme","forwardedTheme","Object","keys","length","defaultTheme","_objectSpread"],"mappings":"yGAGO,SAASA,EACdC,GAEA,IAAMC,EAAeD,EAAOE,MAK5B,IAAMC,EAFoB,iBAAjBF,GAA8C,OAAjBA,GAAyBG,OAAOC,KAAKJ,GAAcK,OAAS,EAEtDL,EAAeM,EAE3D,OAAAC,EAAAA,EAAA,GACKR,GADL,GAAA,CAEEE,MAAOC"}
package/theme/themes.js CHANGED
@@ -1,2 +1,2 @@
1
- import r from'@babel/runtime/helpers/objectSpread2';import{relBuilder as o}from'../shared/utils/rel-builder.js';import{SizeInput as s}from'../shared/enums/sizeInput.js';import{COMPONENT_NAME as e}from'../components/Arrow/Arrow.js';import{colors as a,socialColors as l,unitColors as t}from'./colors.js';import{baseColors as m,motherColors as d,babyColors as i,teenColors as p,adultColors as n}from'./colors-light.js';import{baseColors as b,motherColors as c,babyColors as h,teenColors as u,adultColors as f}from'./colors-dark.js';import{breakpoints as C}from'./breakpoints.js';var k={breakpoints:C,colors:r(r(r(r(r({},a),l),t),m),d),borderRadius:'5px',textColor:'mineShaft',fallbackColor:'mineShaft',zIndex:{modal:9e3,tooltip:80},classNamePrefix:'fox',defaultInputControlsWidth:s.l,utils:{relBuilder:o},mode:'light',preset:'default',components:{[e]:{preset:'default',size:'l'}}};var T=r(r({},k),{},{preset:'brand'});var v=r(r({},k),{},{colors:r(r(r({},k.colors),b),c),mode:'dark',preset:'brand'});var j=r(r({},k),{},{colors:r(r({},k.colors),i),preset:'brand'});var g=r(r({},k),{},{colors:r(r(r({},k.colors),b),h),mode:'dark',preset:'brand'});var x=r(r({},k),{},{colors:r(r({},k.colors),p),preset:'brand'});var y=r(r({},k),{},{colors:r(r(r({},k.colors),b),u),mode:'dark',preset:'brand'});var z=r(r({},k),{},{colors:r(r({},k.colors),n),preset:'brand'});var D=r(r({},k),{},{colors:r(r(r({},k.colors),b),f),mode:'dark',preset:'brand'});export{D as adultDarkTheme,z as adultLightTheme,g as babyDarkTheme,j as babyLightTheme,k as defaultTheme,v as motherDarkTheme,T as motherLightTheme,y as teenDarkTheme,x as teenLightTheme};
1
+ import r from'@babel/runtime/helpers/objectSpread2';import{relBuilder as o}from'../shared/utils/rel-builder.js';import{SizeInput as s}from'../shared/enums/sizeInput.js';import{COMPONENT_NAME as e}from'../components/Arrow/Arrow.js';import{colors as a,socialColors as l,unitColors as t}from'./colors.js';import{baseColors as m,motherColors as d,babyColors as i,teenColors as p,adultColors as n}from'./colors-light.js';import{baseColors as b,motherColors as c,babyColors as h,teenColors as u,adultColors as f}from'./colors-dark.js';import{breakpoints as C}from'./breakpoints.js';var k={breakpoints:C,colors:r(r(r(r(r({},a),l),t),m),d),borderRadius:'5px',textColor:'mineShaft',fallbackColor:'mineShaft',zIndex:{modal:9e3,tooltip:80},classNamePrefix:'fox',defaultInputControlsWidth:s.l,utils:{relBuilder:o},mode:'light',preset:'default',components:{[e]:{size:'l'}}};var T=r(r({},k),{},{preset:'brand'});var v=r(r({},k),{},{colors:r(r(r({},k.colors),b),c),mode:'dark',preset:'brand'});var j=r(r({},k),{},{colors:r(r({},k.colors),i),preset:'brand'});var g=r(r({},k),{},{colors:r(r(r({},k.colors),b),h),mode:'dark',preset:'brand'});var x=r(r({},k),{},{colors:r(r({},k.colors),p),preset:'brand'});var y=r(r({},k),{},{colors:r(r(r({},k.colors),b),u),mode:'dark',preset:'brand'});var z=r(r({},k),{},{colors:r(r({},k.colors),n),preset:'brand'});var D=r(r({},k),{},{colors:r(r(r({},k.colors),b),f),mode:'dark',preset:'brand'});export{D as adultDarkTheme,z as adultLightTheme,g as babyDarkTheme,j as babyLightTheme,k as defaultTheme,v as motherDarkTheme,T as motherLightTheme,y as teenDarkTheme,x as teenLightTheme};
2
2
  //# sourceMappingURL=themes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"themes.js","sources":["../../../src/theme/themes.ts"],"sourcesContent":["import type { DefaultTheme } from 'styled-components'\nimport { relBuilder } from 'shared/utils/rel-builder'\nimport { SizeInput } from 'shared/enums/sizeInput'\nimport { COMPONENT_NAME as ARROW } from 'components/Arrow'\nimport { colors, socialColors, unitColors } from './colors'\nimport * as ColorsLight from './colors-light'\nimport * as ColorsDark from './colors-dark'\nimport { breakpoints } from './breakpoints'\n\nexport const defaultTheme: DefaultTheme = {\n breakpoints,\n colors: {\n ...colors,\n ...socialColors,\n ...unitColors,\n ...ColorsLight.baseColors,\n ...ColorsLight.motherColors,\n },\n borderRadius: '5px',\n textColor: 'mineShaft',\n fallbackColor: 'mineShaft',\n zIndex: {\n modal: 9000,\n tooltip: 80,\n },\n classNamePrefix: 'fox',\n defaultInputControlsWidth: SizeInput.l,\n utils: {\n relBuilder,\n },\n mode: 'light',\n preset: 'default',\n components: {\n [ARROW]: {\n preset: 'default',\n size: 'l',\n },\n },\n}\n\nexport const motherLightTheme: DefaultTheme = {\n ...defaultTheme,\n preset: 'brand',\n}\n\nexport const motherDarkTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsDark.baseColors,\n ...ColorsDark.motherColors,\n },\n mode: 'dark',\n preset: 'brand',\n}\n\nexport const babyLightTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsLight.babyColors,\n },\n preset: 'brand',\n}\n\nexport const babyDarkTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsDark.baseColors,\n ...ColorsDark.babyColors,\n },\n mode: 'dark',\n preset: 'brand',\n}\n\nexport const teenLightTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsLight.teenColors,\n },\n preset: 'brand',\n}\n\nexport const teenDarkTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsDark.baseColors,\n ...ColorsDark.teenColors,\n },\n mode: 'dark',\n preset: 'brand',\n}\n\nexport const adultLightTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsLight.adultColors,\n },\n preset: 'brand',\n}\n\nexport const adultDarkTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsDark.baseColors,\n ...ColorsDark.adultColors,\n },\n mode: 'dark',\n preset: 'brand',\n}\n"],"names":["defaultTheme","breakpoints","colors","socialColors","unitColors","ColorsLight","borderRadius","textColor","fallbackColor","zIndex","modal","tooltip","classNamePrefix","defaultInputControlsWidth","SizeInput","l","utils","relBuilder","mode","preset","components","COMPONENT_NAME","ARROW","size","motherLightTheme","_objectSpread","motherDarkTheme","ColorsDark","babyLightTheme","babyDarkTheme","teenLightTheme","teenDarkTheme","adultLightTheme","adultDarkTheme"],"mappings":"gkBASO,IAAMA,EAA6B,CACxCC,YAAAA,EACAC,OACKA,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,GAAAA,GACAC,GACAC,GACAC,GACAA,GAELC,aAAc,MACdC,UAAW,YACXC,cAAe,YACfC,OAAQ,CACNC,MAAO,IACPC,QAAS,IAEXC,gBAAiB,MACjBC,0BAA2BC,EAAUC,EACrCC,MAAO,CACLC,WAAAA,GAEFC,KAAM,QACNC,OAAQ,UACRC,WAAY,CACVC,CAACC,GAAQ,CACPH,OAAQ,UACRI,KAAM,OAKL,IAAMC,EAA8BC,EAAAA,EAAA,GACtCzB,GADsC,GAAA,CAEzCmB,OAAQ,UAGH,IAAMO,EAA6BD,EAAAA,EAAA,GACrCzB,GADqC,GAAA,CAExCE,OACKF,EAAAA,EAAAA,EAAAA,GAAAA,EAAaE,QACbyB,GACAA,GAELT,KAAM,OACNC,OAAQ,UAGH,IAAMS,EAA4BH,EAAAA,EAAA,GACpCzB,GADoC,GAAA,CAEvCE,OAAMuB,EAAAA,EAAA,GACDzB,EAAaE,QACbG,GAELc,OAAQ,UAGH,IAAMU,EAA2BJ,EAAAA,EAAA,GACnCzB,GADmC,GAAA,CAEtCE,OACKF,EAAAA,EAAAA,EAAAA,GAAAA,EAAaE,QACbyB,GACAA,GAELT,KAAM,OACNC,OAAQ,UAGH,IAAMW,EAA4BL,EAAAA,EAAA,GACpCzB,GADoC,GAAA,CAEvCE,OAAMuB,EAAAA,EAAA,GACDzB,EAAaE,QACbG,GAELc,OAAQ,UAGH,IAAMY,EAA2BN,EAAAA,EAAA,GACnCzB,GADmC,GAAA,CAEtCE,OACKF,EAAAA,EAAAA,EAAAA,GAAAA,EAAaE,QACbyB,GACAA,GAELT,KAAM,OACNC,OAAQ,UAGH,IAAMa,EAA6BP,EAAAA,EAAA,GACrCzB,GADqC,GAAA,CAExCE,OAAMuB,EAAAA,EAAA,GACDzB,EAAaE,QACbG,GAELc,OAAQ,UAGH,IAAMc,EAA4BR,EAAAA,EAAA,GACpCzB,GADoC,GAAA,CAEvCE,OACKF,EAAAA,EAAAA,EAAAA,GAAAA,EAAaE,QACbyB,GACAA,GAELT,KAAM,OACNC,OAAQ"}
1
+ {"version":3,"file":"themes.js","sources":["../../../src/theme/themes.ts"],"sourcesContent":["import type { DefaultTheme } from 'styled-components'\nimport { relBuilder } from 'shared/utils/rel-builder'\nimport { SizeInput } from 'shared/enums/sizeInput'\nimport { COMPONENT_NAME as ARROW } from 'components/Arrow'\nimport { colors, socialColors, unitColors } from './colors'\nimport * as ColorsLight from './colors-light'\nimport * as ColorsDark from './colors-dark'\nimport { breakpoints } from './breakpoints'\n\nexport const defaultTheme: DefaultTheme = {\n breakpoints,\n colors: {\n ...colors,\n ...socialColors,\n ...unitColors,\n ...ColorsLight.baseColors,\n ...ColorsLight.motherColors,\n },\n borderRadius: '5px',\n textColor: 'mineShaft',\n fallbackColor: 'mineShaft',\n zIndex: {\n modal: 9000,\n tooltip: 80,\n },\n classNamePrefix: 'fox',\n defaultInputControlsWidth: SizeInput.l,\n utils: {\n relBuilder,\n },\n mode: 'light',\n preset: 'default',\n components: {\n [ARROW]: {\n size: 'l',\n },\n },\n}\n\nexport const motherLightTheme: DefaultTheme = {\n ...defaultTheme,\n preset: 'brand',\n}\n\nexport const motherDarkTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsDark.baseColors,\n ...ColorsDark.motherColors,\n },\n mode: 'dark',\n preset: 'brand',\n}\n\nexport const babyLightTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsLight.babyColors,\n },\n preset: 'brand',\n}\n\nexport const babyDarkTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsDark.baseColors,\n ...ColorsDark.babyColors,\n },\n mode: 'dark',\n preset: 'brand',\n}\n\nexport const teenLightTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsLight.teenColors,\n },\n preset: 'brand',\n}\n\nexport const teenDarkTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsDark.baseColors,\n ...ColorsDark.teenColors,\n },\n mode: 'dark',\n preset: 'brand',\n}\n\nexport const adultLightTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsLight.adultColors,\n },\n preset: 'brand',\n}\n\nexport const adultDarkTheme: DefaultTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n ...ColorsDark.baseColors,\n ...ColorsDark.adultColors,\n },\n mode: 'dark',\n preset: 'brand',\n}\n"],"names":["defaultTheme","breakpoints","colors","socialColors","unitColors","ColorsLight","borderRadius","textColor","fallbackColor","zIndex","modal","tooltip","classNamePrefix","defaultInputControlsWidth","SizeInput","l","utils","relBuilder","mode","preset","components","COMPONENT_NAME","ARROW","size","motherLightTheme","_objectSpread","motherDarkTheme","ColorsDark","babyLightTheme","babyDarkTheme","teenLightTheme","teenDarkTheme","adultLightTheme","adultDarkTheme"],"mappings":"gkBASO,IAAMA,EAA6B,CACxCC,YAAAA,EACAC,OACKA,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,GAAAA,GACAC,GACAC,GACAC,GACAA,GAELC,aAAc,MACdC,UAAW,YACXC,cAAe,YACfC,OAAQ,CACNC,MAAO,IACPC,QAAS,IAEXC,gBAAiB,MACjBC,0BAA2BC,EAAUC,EACrCC,MAAO,CACLC,WAAAA,GAEFC,KAAM,QACNC,OAAQ,UACRC,WAAY,CACVC,CAACC,GAAQ,CACPC,KAAM,OAKL,IAAMC,EAA8BC,EAAAA,EAAA,GACtCzB,GADsC,GAAA,CAEzCmB,OAAQ,UAGH,IAAMO,EAA6BD,EAAAA,EAAA,GACrCzB,GADqC,GAAA,CAExCE,OACKF,EAAAA,EAAAA,EAAAA,GAAAA,EAAaE,QACbyB,GACAA,GAELT,KAAM,OACNC,OAAQ,UAGH,IAAMS,EAA4BH,EAAAA,EAAA,GACpCzB,GADoC,GAAA,CAEvCE,OAAMuB,EAAAA,EAAA,GACDzB,EAAaE,QACbG,GAELc,OAAQ,UAGH,IAAMU,EAA2BJ,EAAAA,EAAA,GACnCzB,GADmC,GAAA,CAEtCE,OACKF,EAAAA,EAAAA,EAAAA,GAAAA,EAAaE,QACbyB,GACAA,GAELT,KAAM,OACNC,OAAQ,UAGH,IAAMW,EAA4BL,EAAAA,EAAA,GACpCzB,GADoC,GAAA,CAEvCE,OAAMuB,EAAAA,EAAA,GACDzB,EAAaE,QACbG,GAELc,OAAQ,UAGH,IAAMY,EAA2BN,EAAAA,EAAA,GACnCzB,GADmC,GAAA,CAEtCE,OACKF,EAAAA,EAAAA,EAAAA,GAAAA,EAAaE,QACbyB,GACAA,GAELT,KAAM,OACNC,OAAQ,UAGH,IAAMa,EAA6BP,EAAAA,EAAA,GACrCzB,GADqC,GAAA,CAExCE,OAAMuB,EAAAA,EAAA,GACDzB,EAAaE,QACbG,GAELc,OAAQ,UAGH,IAAMc,EAA4BR,EAAAA,EAAA,GACpCzB,GADoC,GAAA,CAEvCE,OACKF,EAAAA,EAAAA,EAAAA,GAAAA,EAAaE,QACbyB,GACAA,GAELT,KAAM,OACNC,OAAQ"}