@foxford/ui 2.0.0-beta-62e8660-20220701 → 2.0.0-beta-4790701-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.
- package/components/Text/Text.js +1 -1
- package/components/Text/Text.js.map +1 -1
- package/dts/index.d.ts +3 -2
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/mixins/color.js +1 -1
- package/mixins/color.js.map +1 -1
- package/package.json +1 -1
- package/theme/index.js +1 -1
- package/theme/index.js.map +1 -1
package/components/Text/Text.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{TEXT_COLOR as e}from'../../theme/index.js';import{TextHeading as i}from'../Text.Heading/Text.Heading.js';import{TextEllipse as s}from'../Text.Ellipse/Text.Ellipse.js';import{Root as t}from'./style.js';import{jsx as l}from'react/jsx-runtime';function n(i){var{as:s="div",children:n,weight:a="normal",content:r,textAlign:o,underlineLinks:m,className:z,style:d,lineHeight:x="m",fontStyle:g="normal",title:p,color:y=e,size:c="m",sizeXS:L,sizeS:T,sizeM:h,sizeL:S,sizeXL:f,display:H}=i;return l(t,n?{as:s,color:y,className:z,title:p,weight:a,lineHeight:x,textAlign:o,fontStyle:g,underlineLinks:m,size:c,sizeXS:L,sizeS:T,sizeM:h,sizeL:S,sizeXL:f,display:H,style:d,children:n}:{as:s,color:y,className:z,title:p,weight:a,lineHeight:x,textAlign:o,fontStyle:g,underlineLinks:m,size:c,sizeXS:L,sizeS:T,sizeM:h,sizeL:S,sizeXL:f,display:H,style:d,dangerouslySetInnerHTML:{__html:r||''}})}n.Heading=i,n.Ellipse=s,n.displayName='Text';export{n as Text};
|
|
2
2
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sources":["../../../../src/components/Text/Text.tsx"],"sourcesContent":["import { TextHeading } from '../../components/Text.Heading'\nimport { TextEllipse } from '../../components/Text.Ellipse'\nimport { Color } from '../../mixins/color'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { Display } from '../../mixins/display'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nexport interface TextProps extends BaseProps, Color, ResponsiveProperty<'size'>, Display {\n /**\n * An element type to render as (string).\n */\n as?: 'div' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'p'\n /**\n * Primary content\n */\n content?: string\n /**\n * Primary content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Text font weight\n */\n weight?: 'lighter' | 'normal' | 'bold' | 'bolder' | number\n /**\n * Text font style\n */\n fontStyle?: 'normal' | 'italic'\n /**\n * Add underline to inline links\n */\n underlineLinks?: boolean\n /**\n * Text align\n */\n textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end'\n /**\n * Line height\n */\n lineHeight?: 'l' | 'm' | 's' | 'xs' | number\n /**\n * Element title\n */\n title?: string\n}\n\nText.Heading = TextHeading\nText.Ellipse = TextEllipse\nText.displayName = 'Text'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Text(props: TextProps) {\n const {\n as = 'div',\n children,\n weight = 'normal',\n content,\n textAlign,\n underlineLinks,\n className,\n style,\n lineHeight = 'm',\n fontStyle = 'normal',\n title,\n color,\n size = 'm',\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n display,\n } = props\n\n if (children) {\n return (\n <Styled.Root\n as={as}\n color={color}\n className={className}\n title={title}\n weight={weight}\n lineHeight={lineHeight}\n textAlign={textAlign}\n fontStyle={fontStyle}\n underlineLinks={underlineLinks}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n display={display}\n style={style}\n >\n {children}\n </Styled.Root>\n )\n }\n\n return (\n <Styled.Root\n as={as}\n color={color}\n className={className}\n title={title}\n weight={weight}\n lineHeight={lineHeight}\n textAlign={textAlign}\n fontStyle={fontStyle}\n underlineLinks={underlineLinks}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n display={display}\n style={style}\n dangerouslySetInnerHTML={{ __html: content || '' }}\n />\n )\n}\n"],"names":["Text","props","as","children","weight","content","textAlign","underlineLinks","className","style","lineHeight","fontStyle","title","color","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","display","_jsx","Styled.Root","dangerouslySetInnerHTML","__html","Heading","TextHeading","Ellipse","TextEllipse","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../../src/components/Text/Text.tsx"],"sourcesContent":["import { TEXT_COLOR } from 'theme'\nimport { TextHeading } from '../../components/Text.Heading'\nimport { TextEllipse } from '../../components/Text.Ellipse'\nimport { Color } from '../../mixins/color'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { Display } from '../../mixins/display'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nexport interface TextProps extends BaseProps, Color, ResponsiveProperty<'size'>, Display {\n /**\n * An element type to render as (string).\n */\n as?: 'div' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'p'\n /**\n * Primary content\n */\n content?: string\n /**\n * Primary content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Text font weight\n */\n weight?: 'lighter' | 'normal' | 'bold' | 'bolder' | number\n /**\n * Text font style\n */\n fontStyle?: 'normal' | 'italic'\n /**\n * Add underline to inline links\n */\n underlineLinks?: boolean\n /**\n * Text align\n */\n textAlign?: 'left' | 'center' | 'right' | 'justify' | 'start' | 'end'\n /**\n * Line height\n */\n lineHeight?: 'l' | 'm' | 's' | 'xs' | number\n /**\n * Element title\n */\n title?: string\n}\n\nText.Heading = TextHeading\nText.Ellipse = TextEllipse\nText.displayName = 'Text'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Text(props: TextProps) {\n const {\n as = 'div',\n children,\n weight = 'normal',\n content,\n textAlign,\n underlineLinks,\n className,\n style,\n lineHeight = 'm',\n fontStyle = 'normal',\n title,\n color = TEXT_COLOR,\n size = 'm',\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n display,\n } = props\n\n if (children) {\n return (\n <Styled.Root\n as={as}\n color={color}\n className={className}\n title={title}\n weight={weight}\n lineHeight={lineHeight}\n textAlign={textAlign}\n fontStyle={fontStyle}\n underlineLinks={underlineLinks}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n display={display}\n style={style}\n >\n {children}\n </Styled.Root>\n )\n }\n\n return (\n <Styled.Root\n as={as}\n color={color}\n className={className}\n title={title}\n weight={weight}\n lineHeight={lineHeight}\n textAlign={textAlign}\n fontStyle={fontStyle}\n underlineLinks={underlineLinks}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n display={display}\n style={style}\n dangerouslySetInnerHTML={{ __html: content || '' }}\n />\n )\n}\n"],"names":["Text","props","as","children","weight","content","textAlign","underlineLinks","className","style","lineHeight","fontStyle","title","color","TEXT_COLOR","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","display","_jsx","Styled.Root","dangerouslySetInnerHTML","__html","Heading","TextHeading","Ellipse","TextEllipse","displayName"],"mappings":"wPA8DO,SAASA,EAAKC,GACnB,IAAMC,GACJA,EAAK,MADDC,SAEJA,EAFIC,OAGJA,EAAS,SAHLC,QAIJA,EAJIC,UAKJA,EALIC,eAMJA,EANIC,UAOJA,EAPIC,MAQJA,EARIC,WASJA,EAAa,IATTC,UAUJA,EAAY,SAVRC,MAWJA,EAXIC,MAYJA,EAAQC,EAZJC,KAaJA,EAAO,IAbHC,OAcJA,EAdIC,MAeJA,EAfIC,MAgBJA,EAhBIC,MAiBJA,EAjBIC,OAkBJA,EAlBIC,QAmBJA,GACEpB,EAEJ,OAEIqB,EAACC,EAFDpB,EAEA,CACED,GAAIA,EACJW,MAAOA,EACPL,UAAWA,EACXI,MAAOA,EACPR,OAAQA,EACRM,WAAYA,EACZJ,UAAWA,EACXK,UAAWA,EACXJ,eAAgBA,EAChBQ,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRC,QAASA,EACTZ,MAAOA,EAjBTN,SAmBGA,GAML,CACED,GAAIA,EACJW,MAAOA,EACPL,UAAWA,EACXI,MAAOA,EACPR,OAAQA,EACRM,WAAYA,EACZJ,UAAWA,EACXK,UAAWA,EACXJ,eAAgBA,EAChBQ,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRC,QAASA,EACTZ,MAAOA,EACPe,wBAAyB,CAAEC,OAAQpB,GAAW,MA/EpDL,EAAK0B,QAAUC,EACf3B,EAAK4B,QAAUC,EACf7B,EAAK8B,YAAc"}
|
package/dts/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ declare type ColorCssProperty = string | ColorCalcProperty;
|
|
|
21
21
|
declare type Color<T extends ColorPropsProperties = 'color'> = {
|
|
22
22
|
[key in `${T}`]?: RGB | RGBA | HEX | keyof typeof ColorNames;
|
|
23
23
|
};
|
|
24
|
-
declare const color: (color
|
|
24
|
+
declare const color: (color?: ColorValue, cssProperty?: ColorCssProperty) => () => (props: {
|
|
25
25
|
theme: DefaultTheme;
|
|
26
26
|
}) => FlattenSimpleInterpolation | null;
|
|
27
27
|
|
|
@@ -317,7 +317,8 @@ interface Theme {
|
|
|
317
317
|
[key: string]: RGB | RGBA | HEX;
|
|
318
318
|
};
|
|
319
319
|
borderRadius: string;
|
|
320
|
-
textColor
|
|
320
|
+
textColor?: string;
|
|
321
|
+
fallbackColor?: string;
|
|
321
322
|
zIndex: {
|
|
322
323
|
modal: number;
|
|
323
324
|
tooltip: number;
|