@foxford/ui 2.0.0-beta-b086a52-20220630 → 2.0.0-beta-62e8660-20220701

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 +1 @@
1
- {"version":3,"file":"color.js","sources":["../../../src/mixins/color.ts"],"sourcesContent":["import { css, DefaultTheme, FlattenSimpleInterpolation } from 'styled-components'\nimport { HEX, RGB, RGBA } from '../shared/interfaces'\nimport { ColorNames } from '../theme'\n\ntype ColorPropsProperties = 'color' | 'fontColor' | `${string}Color` | `color${string}`\ntype ColorValue = keyof typeof ColorNames | RGB | RGBA | HEX\ntype ColorCalcProperty = (_color: ColorValue) => FlattenSimpleInterpolation | null\ntype ColorCssProperty = string | ColorCalcProperty\n\nexport type Color<T extends ColorPropsProperties = 'color'> = {\n /**\n * Color name, HEX, rgb or rgba\n */\n [key in `${T}`]?: RGB | RGBA | HEX | keyof typeof ColorNames // eslint-disable-line no-unused-vars\n}\n\nexport const getColor = (color: ColorValue, props: { theme: DefaultTheme }) => {\n return typeof color === 'string' && (color.includes('#') || color.includes('rgb')) ? color : props.theme.colors[color]\n}\n\nexport const color =\n (color: ColorValue, cssProperty: ColorCssProperty = 'color') =>\n () =>\n (props: { theme: DefaultTheme }) => {\n const _color = getColor(color, props)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(_color)\n }\n\n return css`\n ${cssProperty}: ${_color};\n `\n }\n"],"names":["getColor","color","props","includes","theme","colors","e","cssProperty","_color","css"],"mappings":"4CAgBaA,EAAW,CAACC,EAAmBC,IAClB,iBAAVD,IAAuBA,EAAME,SAAS,MAAQF,EAAME,SAAS,QAAUF,EAAQC,EAAME,MAAMC,OAAOJ,GAGrGA,IAAAA,EACX,SAACA,EAADK,GAAA,IAAoBC,+BAApBD,EAAAA,EAAoD,QAApD,MACA,IACCJ,IACC,IAAMM,EAASR,EAASC,EAAOC,GAE/B,MAA2B,mBAAhBK,EACFA,EAAYC,GAGdC,EAAP,CAAA,GAAA,IAAA,KACIF,EAAgBC"}
1
+ {"version":3,"file":"color.js","sources":["../../../src/mixins/color.ts"],"sourcesContent":["import { css, DefaultTheme, FlattenSimpleInterpolation } from 'styled-components'\nimport { HEX, RGB, RGBA } from '../shared/interfaces'\nimport { ColorNames } from '../theme'\n\ntype ColorPropsProperties = 'color' | 'fontColor' | `${string}Color` | `color${string}`\nexport type ColorValue = keyof typeof ColorNames | RGB | RGBA | HEX\ntype ColorCalcProperty = (_color: ColorValue) => FlattenSimpleInterpolation | null\ntype ColorCssProperty = string | ColorCalcProperty\n\nexport type Color<T extends ColorPropsProperties = 'color'> = {\n /**\n * Color name, HEX, rgb or rgba\n */\n [key in `${T}`]?: RGB | RGBA | HEX | keyof typeof ColorNames // eslint-disable-line no-unused-vars\n}\n\nexport const getColor = (color: ColorValue, props: { theme: DefaultTheme }) => {\n return typeof color === 'string' && (color.includes('#') || color.includes('rgb')) ? color : props.theme.colors[color]\n}\n\nexport const color =\n (color: ColorValue, cssProperty: ColorCssProperty = 'color') =>\n () =>\n (props: { theme: DefaultTheme }) => {\n const _color = getColor(color, props)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(_color)\n }\n\n return css`\n ${cssProperty}: ${_color};\n `\n }\n"],"names":["getColor","color","props","includes","theme","colors","e","cssProperty","_color","css"],"mappings":"4CAgBaA,EAAW,CAACC,EAAmBC,IAClB,iBAAVD,IAAuBA,EAAME,SAAS,MAAQF,EAAME,SAAS,QAAUF,EAAQC,EAAME,MAAMC,OAAOJ,GAGrGA,IAAAA,EACX,SAACA,EAADK,GAAA,IAAoBC,+BAApBD,EAAAA,EAAoD,QAApD,MACA,IACCJ,IACC,IAAMM,EAASR,EAASC,EAAOC,GAE/B,MAA2B,mBAAhBK,EACFA,EAAYC,GAGdC,EAAP,CAAA,GAAA,IAAA,KACIF,EAAgBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxford/ui",
3
- "version": "2.0.0-beta-b086a52-20220630",
3
+ "version": "2.0.0-beta-62e8660-20220701",
4
4
  "description": "UI components library",
5
5
  "main": "index.cjs.js",
6
6
  "module": "index.js",
package/theme/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import o from'@babel/runtime/helpers/esm/objectSpread2';import{colors as r,socialColors as s,unitColors as e}from'./colors.js';export{ColorNames}from'./colors.js';import{breakpoints as t}from'./breakpoints.js';import'styled-components';import'./global-styled.js';import'react/jsx-runtime';var a={breakpoints:t,colors:o(o(o({},r),s),e),borderRadius:'5px',zIndex:{modal:9e3,tooltip:80}};export{a as theme};
1
+ import o from'@babel/runtime/helpers/esm/objectSpread2';import{colors as r,socialColors as s,unitColors as e}from'./colors.js';export{ColorNames}from'./colors.js';import{breakpoints as t}from'./breakpoints.js';import'styled-components';import'./global-styled.js';import'react/jsx-runtime';var a={breakpoints:t,colors:o(o(o({},r),s),e),borderRadius:'5px',textColor:'mineShaft',zIndex:{modal:9e3,tooltip:80}};export{a as theme};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/theme/index.ts"],"sourcesContent":["import { HEX, RGB, RGBA } from '../shared/interfaces'\nimport { colors, socialColors, unitColors } from './colors'\nimport { breakpoints } from './breakpoints'\n\nexport interface Theme {\n breakpoints: Readonly<{\n xl: number\n l: number\n m: number\n s: number\n xs: number\n xxs: number\n }>\n colors: {\n [key: string]: RGB | RGBA | HEX\n }\n borderRadius: string\n zIndex: {\n modal: number\n tooltip: number\n }\n}\n\nconst theme: Theme = {\n breakpoints,\n colors: {\n ...colors,\n ...socialColors,\n ...unitColors,\n },\n borderRadius: '5px',\n zIndex: {\n modal: 9000,\n tooltip: 80,\n },\n}\n\nexport { theme }\n\nexport { ColorNames } from './colors'\n\nexport { ThemeProvider } from './theme-provider'\n"],"names":["theme","breakpoints","colors","socialColors","unitColors","borderRadius","zIndex","modal","tooltip"],"mappings":"iSAuBA,IAAMA,EAAe,CACnBC,YAAAA,EACAC,gBACKA,GACAC,GACAC,GAELC,aAAc,MACdC,OAAQ,CACNC,MAAO,IACPC,QAAS"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/theme/index.ts"],"sourcesContent":["import { HEX, RGB, RGBA } from '../shared/interfaces'\nimport { colors, socialColors, unitColors } from './colors'\nimport { breakpoints } from './breakpoints'\n\nexport interface Theme {\n breakpoints: Readonly<{\n xl: number\n l: number\n m: number\n s: number\n xs: number\n xxs: number\n }>\n colors: {\n [key: string]: RGB | RGBA | HEX\n }\n borderRadius: string\n textColor: string\n zIndex: {\n modal: number\n tooltip: number\n }\n}\n\nconst theme: Theme = {\n breakpoints,\n colors: {\n ...colors,\n ...socialColors,\n ...unitColors,\n },\n borderRadius: '5px',\n textColor: 'mineShaft',\n zIndex: {\n modal: 9000,\n tooltip: 80,\n },\n}\n\nexport { theme }\n\nexport { ColorNames } from './colors'\n\nexport { ThemeProvider } from './theme-provider'\n"],"names":["theme","breakpoints","colors","socialColors","unitColors","borderRadius","textColor","zIndex","modal","tooltip"],"mappings":"iSAwBA,IAAMA,EAAe,CACnBC,YAAAA,EACAC,gBACKA,GACAC,GACAC,GAELC,aAAc,MACdC,UAAW,YACXC,OAAQ,CACNC,MAAO,IACPC,QAAS"}