@foxford/ui 2.0.0-beta-ea0e9a4-20220620 → 2.0.0-beta-c2f5825-20220621
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/Anchor/Anchor.js +1 -1
- package/components/Anchor/Anchor.js.map +1 -1
- package/dts/index.d.ts +4 -1
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from'@babel/runtime/helpers/esm/objectSpread2';import s from'@babel/runtime/helpers/esm/objectWithoutProperties';import{Link as i}from'react-router-dom';import{Root as r}from'./style.js';import{jsx as a}from'react/jsx-runtime';var o=["as","to","href","wrapper","className","style","children","content","pseudo","underline","color","display","size","sizeXS","sizeS","sizeM","sizeL","sizeXL"];function l(l){var{as:
|
|
1
|
+
import e from'@babel/runtime/helpers/esm/objectSpread2';import s from'@babel/runtime/helpers/esm/objectWithoutProperties';import{Link as i}from'react-router-dom';import{Root as r}from'./style.js';import{jsx as a}from'react/jsx-runtime';var o=["as","to","href","wrapper","className","style","children","content","pseudo","underline","color","display","size","sizeXS","sizeS","sizeM","sizeL","sizeXL"];function l(l){var{as:p,to:z,href:t,wrapper:n,className:d,style:c,children:m,content:u,pseudo:h,underline:L,color:S,display:y,size:f,sizeXS:X,sizeS:b,sizeM:M,sizeL:N,sizeXL:v}=l,w=s(l,o);var j;j='div'!==p||y?y:'block';var k={};return u&&(k={dangerouslySetInnerHTML:{__html:u}}),a(r,e(p?e(e({as:p,pseudo:h,wrapper:n,underline:L,href:t,className:d,style:c,color:S,size:f,display:j,sizeXS:X,sizeS:b,sizeM:M,sizeL:N,sizeXL:v},w),k):h?e(e({as:"div",pseudo:h,wrapper:n,underline:L,href:t,className:d,color:S,size:f,display:j,sizeXS:X,sizeS:b,sizeM:M,sizeL:N,sizeXL:v},w),k):z?e(e({as:i,to:z,pseudo:h,wrapper:n,underline:L,className:d,color:S,size:f,display:j,sizeXS:X,sizeS:b,sizeM:M,sizeL:N,sizeXL:v},w),k):e(e({as:"a",href:t,pseudo:h,wrapper:n,underline:L,className:d,color:S,size:f,display:j,sizeXS:X,sizeS:b,sizeM:M,sizeL:N,sizeXL:v},k),w),{},{children:m}))}l.displayName='Anchor',l.defaultProps={display:'inline-block'};export{l as Anchor};
|
|
2
2
|
//# sourceMappingURL=Anchor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { Link } from 'react-router-dom'\nimport { BaseProps } from '../../shared/interfaces'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { Color } from '../../mixins/color'\nimport { Display } from '../../mixins/display'\nimport * as Styled from './style'\n\nexport interface AnchorProps extends BaseProps, Color, ResponsiveProperty<'size'>, Display {\n /**\n * Custom CSS class name\n */\n as?: 'div' | 'span' | 'a' | typeof Link\n /**\n * React router link to\n */\n to?: string\n /**\n * Link href\n */\n href?: string\n /**\n * Is display inline\n * */\n wrapper?: boolean\n /**\n * Pseudo link has dashed bottom border\n * */\n pseudo?: boolean\n /**\n * If link should be underlined\n * */\n underline?: boolean\n /**\n * Primary content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Primary content\n */\n content?: string\n /**\n * Onclick handler\n */\n onClick?: () => void\n}\n\nAnchor.displayName = 'Anchor'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n * - [`Display`](#/Миксины)\n */\nexport function Anchor(props: AnchorProps) {\n const {\n as,\n to,\n href,\n wrapper,\n className,\n style,\n children,\n content,\n pseudo,\n underline,\n color,\n display,\n size,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...rest\n } = props\n\n let _display: Display['display']\n\n if (as === 'div' && !display) _display = 'block'\n else _display =
|
|
1
|
+
{"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { Link } from 'react-router-dom'\nimport { BaseProps } from '../../shared/interfaces'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { Color } from '../../mixins/color'\nimport { Display } from '../../mixins/display'\nimport * as Styled from './style'\n\nexport interface AnchorProps extends BaseProps, Color, ResponsiveProperty<'size'>, Display {\n /**\n * Custom CSS class name\n */\n as?: 'div' | 'span' | 'a' | typeof Link\n /**\n * React router link to\n */\n to?: string\n /**\n * Link href\n */\n href?: string\n /**\n * Is display inline\n * */\n wrapper?: boolean\n /**\n * Pseudo link has dashed bottom border\n * */\n pseudo?: boolean\n /**\n * If link should be underlined\n * */\n underline?: boolean\n /**\n * Primary content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Primary content\n */\n content?: string\n /**\n * Onclick handler\n */\n onClick?: () => void\n}\n\nAnchor.displayName = 'Anchor'\nAnchor.defaultProps = {\n display: 'inline-block',\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n * - [`Display`](#/Миксины)\n */\nexport function Anchor(props: typeof Anchor.defaultProps & AnchorProps) {\n const {\n as,\n to,\n href,\n wrapper,\n className,\n style,\n children,\n content,\n pseudo,\n underline,\n color,\n display,\n size,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...rest\n } = props\n\n let _display: Display['display']\n\n if (as === 'div' && !display) _display = 'block'\n else _display = display\n\n let contentProps = {}\n\n if (content) {\n contentProps = {\n dangerouslySetInnerHTML: { __html: content },\n }\n }\n\n if (as)\n return (\n <Styled.Root\n as={as}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n href={href}\n className={className}\n style={style}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n\n if (pseudo)\n return (\n <Styled.Root\n as='div'\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n href={href}\n className={className}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n else if (to)\n return (\n <Styled.Root\n as={Link}\n to={to}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n className={className}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...rest}\n {...contentProps}\n >\n {children}\n </Styled.Root>\n )\n else\n return (\n <Styled.Root\n as='a'\n href={href}\n pseudo={pseudo}\n wrapper={wrapper}\n underline={underline}\n className={className}\n color={color}\n size={size}\n display={_display}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n {...contentProps}\n {...rest}\n >\n {children}\n </Styled.Root>\n )\n}\n"],"names":["Anchor","props","as","to","href","wrapper","className","style","children","content","pseudo","underline","color","display","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","rest","_excluded","_display","contentProps","dangerouslySetInnerHTML","__html","_jsx","Styled.Root","_objectSpread","Link","displayName","defaultProps"],"mappings":"gZA6DO,SAASA,EAAOC,GACrB,IAAMC,GACJA,EADIC,GAEJA,EAFIC,KAGJA,EAHIC,QAIJA,EAJIC,UAKJA,EALIC,MAMJA,EANIC,SAOJA,EAPIC,QAQJA,EARIC,OASJA,EATIC,UAUJA,EAVIC,MAWJA,EAXIC,QAYJA,EAZIC,KAaJA,EAbIC,OAcJA,EAdIC,MAeJA,EAfIC,MAgBJA,EAhBIC,MAiBJA,EAjBIC,OAkBJA,GAEElB,EADCmB,IACDnB,EApBJoB,GAsBA,IAAIC,EAGCA,EADM,QAAPpB,GAAiBW,EACLA,EADyB,QAGzC,IAAIU,EAAe,GAQnB,OANId,IACFc,EAAe,CACbC,wBAAyB,CAAEC,OAAQhB,KAMnCiB,EAACC,EAADC,EAFA1B,EAEA0B,EAAAA,EAAA,CACE1B,GAAIA,EACJQ,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXP,KAAMA,EACNE,UAAWA,EACXC,MAAOA,EACPK,MAAOA,EACPE,KAAMA,EACND,QAASS,EACTP,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAG,GAMNb,EAEAkB,EAAAA,EAAA,CACE1B,GAAG,MACHQ,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXP,KAAMA,EACNE,UAAWA,EACXM,MAAOA,EACPE,KAAMA,EACND,QAASS,EACTP,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAG,GAKDpB,EAELyB,EAAAA,EAAA,CACE1B,GAAI2B,EACJ1B,GAAIA,EACJO,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXL,UAAWA,EACXM,MAAOA,EACPE,KAAMA,EACND,QAASS,EACTP,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAG,GAONK,EAAAA,EAAA,CACE1B,GAAG,IACHE,KAAMA,EACNM,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXL,UAAWA,EACXM,MAAOA,EACPE,KAAMA,EACND,QAASS,EACTP,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJI,GACAH,GAvFN,GAAA,CAAAZ,SAmBGA,KArETR,EAAO8B,YAAc,SACrB9B,EAAO+B,aAAe,CACpBlB,QAAS"}
|
package/dts/index.d.ts
CHANGED
|
@@ -770,9 +770,12 @@ interface AnchorProps extends BaseProps, Color, ResponsiveProperty<'size'>, Disp
|
|
|
770
770
|
* - [`ResponsiveProperty<'size'>`](#/Миксины)
|
|
771
771
|
* - [`Display`](#/Миксины)
|
|
772
772
|
*/
|
|
773
|
-
declare function Anchor(props: AnchorProps): JSX.Element;
|
|
773
|
+
declare function Anchor(props: typeof Anchor.defaultProps & AnchorProps): JSX.Element;
|
|
774
774
|
declare namespace Anchor {
|
|
775
775
|
var displayName: string;
|
|
776
|
+
var defaultProps: {
|
|
777
|
+
display: string;
|
|
778
|
+
};
|
|
776
779
|
}
|
|
777
780
|
|
|
778
781
|
interface ArrowProps extends BaseProps {
|