@foxford/ui 2.0.0-beta-d9b410b-20220704 → 2.0.0-beta-e46656e-20220706

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
- import{Icon as s}from'../Icon/Icon.js';import'../Icon/icons.js';import{Root as o}from'./style.js';import{jsxs as i,jsx as n}from'react/jsx-runtime';function t(t){var{icon:a,disabled:c=!1,onClick:e,children:r,className:l,active:m,style:d}=t;return i(o,{className:l,style:d,disabled:c,active:m,onClick:e,children:[a&&n(s,{size:16,name:a}),r]})}t.displayName='ActionBtn';export{t as ActionBtn};
1
+ import{useClassname as s}from'../../hooks/useClassname.js';import{Icon as a}from'../Icon/Icon.js';import'../Icon/icons.js';import{Root as o}from'./style.js';import{jsxs as e,jsx as i}from'react/jsx-runtime';function n(t){var{icon:c,disabled:r=!1,onClick:m,children:l,className:d,active:p,style:j}=t;var f=s(n.displayName,d);return e(o,{className:f,style:j,disabled:r,active:p,onClick:m,children:[c&&i(a,{size:16,name:c}),l]})}n.displayName='ActionBtn';export{n as ActionBtn};
2
2
  //# sourceMappingURL=ActionBtn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionBtn.js","sources":["../../../../src/components/ActionBtn/ActionBtn.tsx"],"sourcesContent":["import { Display } from '../../mixins/display'\nimport { BaseProps } from '../../shared/interfaces'\nimport { Icon, IconNames } from './../Icon'\nimport * as Styled from './style'\n\nexport interface ActionBtnProps extends BaseProps, Display {\n /** Icon name (for inner Icon component) */\n icon?: keyof typeof IconNames\n disabled?: boolean\n active?: boolean\n onClick?(): void\n /**\n * Children react node\n */\n children?: React.ReactNode\n}\n\nActionBtn.displayName = 'ActionBtn'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Display`](#/Миксины)\n */\nexport function ActionBtn({ icon, disabled = false, onClick, children, className, active, style }: ActionBtnProps) {\n return (\n <Styled.Root className={className} style={style} disabled={disabled} active={active} onClick={onClick}>\n {icon && <Icon size={16} name={icon} />}\n {children}\n </Styled.Root>\n )\n}\n"],"names":["ActionBtn","_ref","icon","disabled","onClick","children","className","active","style","_jsxs","Styled.Root","_jsx","Icon","size","name","displayName"],"mappings":"oJAwBO,SAASA,EAAmGC,GAAA,IAAzFC,KAAEA,EAAFC,SAAQA,GAAAA,EAARC,QAA0BA,EAA1BC,SAAmCA,EAAnCC,UAA6CA,EAA7CC,OAAwDA,EAAxDC,MAAgEA,GAAyBP,EACjH,OACEQ,EAACC,EAAD,CAAaJ,UAAWA,EAAWE,MAAOA,EAAOL,SAAUA,EAAUI,OAAQA,EAAQH,QAASA,EAA9FC,SACGH,CAAAA,GAAQS,EAACC,EAAD,CAAMC,KAAM,GAAIC,KAAMZ,IAC9BG,KAXPL,EAAUe,YAAc"}
1
+ {"version":3,"file":"ActionBtn.js","sources":["../../../../src/components/ActionBtn/ActionBtn.tsx"],"sourcesContent":["import { useClassname } from 'hooks/useClassname'\nimport { Display } from '../../mixins/display'\nimport { BaseProps } from '../../shared/interfaces'\nimport { Icon, IconNames } from './../Icon'\nimport * as Styled from './style'\n\nexport interface ActionBtnProps extends BaseProps, Display {\n /** Icon name (for inner Icon component) */\n icon?: keyof typeof IconNames\n disabled?: boolean\n active?: boolean\n onClick?(): void\n /**\n * Children react node\n */\n children?: React.ReactNode\n}\n\nActionBtn.displayName = 'ActionBtn'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Display`](#/Миксины)\n */\nexport function ActionBtn({ icon, disabled = false, onClick, children, className, active, style }: ActionBtnProps) {\n const _className = useClassname(ActionBtn.displayName, className)\n\n return (\n <Styled.Root className={_className} style={style} disabled={disabled} active={active} onClick={onClick}>\n {icon && <Icon size={16} name={icon} />}\n {children}\n </Styled.Root>\n )\n}\n"],"names":["ActionBtn","_ref","icon","disabled","onClick","children","className","active","style","_className","useClassname","displayName","_jsxs","Styled.Root","_jsx","Icon","size","name"],"mappings":"+MAyBO,SAASA,EAAmGC,GAAA,IAAzFC,KAAEA,EAAFC,SAAQA,GAAW,EAAnBC,QAA0BA,EAA1BC,SAAmCA,EAAnCC,UAA6CA,EAA7CC,OAAwDA,EAAxDC,MAAgEA,GAAyBP,EACjH,IAAMQ,EAAaC,EAAaV,EAAUW,YAAaL,GAEvD,OACEM,EAACC,EAAD,CAAaP,UAAWG,EAAYD,MAAOA,EAAOL,SAAUA,EAAUI,OAAQA,EAAQH,QAASA,EAA/FC,SACGH,CAAAA,GAAQY,EAACC,EAAD,CAAMC,KAAM,GAAIC,KAAMf,IAC9BG,KAbPL,EAAUW,YAAc"}
@@ -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: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=e(e({},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};
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{useClassname as r}from'../../hooks/useClassname.js';import{Root as a}from'./style.js';import{jsx as o}from'react/jsx-runtime';var l=["as","to","href","wrapper","className","style","children","content","pseudo","underline","color","display","size","sizeXS","sizeS","sizeM","sizeL","sizeXL"];function p(z){var{as:n,to:t,href:d,wrapper:m,className:c,style:u,children:h,content:y,pseudo:L,underline:S,color:f,display:X,size:b,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w}=z,k=s(z,l);var x=r(p.displayName,c);var A;A='div'!==n||X?X:'block';var C={};return y&&(C=e(e({},C),{},{dangerouslySetInnerHTML:{__html:y}})),o(a,e(n?e(e({as:n,pseudo:L,wrapper:m,underline:S,href:d,className:x,style:u,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):L?e(e({as:"div",pseudo:L,wrapper:m,underline:S,href:d,className:x,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):t?e(e({as:i,to:t,pseudo:L,wrapper:m,underline:S,className:x,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},k),C):e(e({as:"a",href:d,pseudo:L,wrapper:m,underline:S,className:x,color:f,size:b,display:A,sizeXS:N,sizeS:v,sizeM:M,sizeL:j,sizeXL:w},C),k),{},{children:h}))}p.displayName='Anchor',p.defaultProps={display:'inline-block'};export{p 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 target?: string\n rel?: string\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 ...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":"gZA+DO,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,GASnB,OAPId,IACFc,SACKA,GADO,GAAA,CAEVC,wBAAyB,CAAEC,OAAQhB,MAMnCiB,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,KAtETR,EAAO8B,YAAc,SACrB9B,EAAO+B,aAAe,CACpBlB,QAAS"}
1
+ {"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\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 target?: string\n rel?: string\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 const _className = useClassname(Anchor.displayName, className)\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 ...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","_className","useClassname","displayName","_display","contentProps","dangerouslySetInnerHTML","__html","_jsx","Styled.Root","_objectSpread","Link","defaultProps"],"mappings":"2cAgEO,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,IAAMC,EAAaC,EAAavB,EAAOwB,YAAalB,GAEpD,IAAImB,EAGCA,EADM,QAAPvB,GAAiBW,EACLA,EADyB,QAGzC,IAAIa,EAAe,GASnB,OAPIjB,IACFiB,SACKA,GADO,GAAA,CAEVC,wBAAyB,CAAEC,OAAQnB,MAMnCoB,EAACC,EAADC,EAFA7B,EAEA6B,EAAAA,EAAA,CACE7B,GAAIA,EACJQ,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXP,KAAMA,EACNE,UAAWgB,EACXf,MAAOA,EACPK,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAMNhB,EAEAqB,EAAAA,EAAA,CACE7B,GAAG,MACHQ,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXP,KAAMA,EACNE,UAAWgB,EACXV,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAKDvB,EAEL4B,EAAAA,EAAA,CACE7B,GAAI8B,EACJ7B,GAAIA,EACJO,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXL,UAAWgB,EACXV,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJC,GACAM,GAONK,EAAAA,EAAA,CACE7B,GAAG,IACHE,KAAMA,EACNM,OAAQA,EACRL,QAASA,EACTM,UAAWA,EACXL,UAAWgB,EACXV,MAAOA,EACPE,KAAMA,EACND,QAASY,EACTV,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,GACJO,GACAN,GAvFN,GAAA,CAAAZ,SAmBGA,KAxETR,EAAOwB,YAAc,SACrBxB,EAAOiC,aAAe,CACpBpB,QAAS"}
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/esm/objectSpread2';import t from'@babel/runtime/helpers/esm/objectWithoutProperties';import{Text as r}from'../Text/Text.js';import{Root as o}from'./style.js';import{jsx as i}from'react/jsx-runtime';var s=["children","content","textProps","round","display"];function n(n){var{children:a,content:l,textProps:m,round:p,display:d="inline-block"}=n,c=t(n,s);return i(o,e(e({round:p,display:d},c),{},{children:i(r,e(e({className:"text",size:p?10:12,weight:p?'bolder':'normal',lineHeight:"s",content:'string'==typeof l?l:void 0},m),{},{children:a||l}))}))}n.displayName='Badge';export{n as Badge};
1
+ import e from'@babel/runtime/helpers/esm/objectSpread2';import s from'@babel/runtime/helpers/esm/objectWithoutProperties';import{useClassname as r}from'../../hooks/useClassname.js';import{Text as t}from'../Text/Text.js';import{Root as o}from'./style.js';import{jsx as a}from'react/jsx-runtime';var i=["children","content","className","textProps","round","display"];function m(n){var{children:l,content:p,className:d,textProps:c,round:u,display:h="inline-block"}=n,x=s(n,i);var b=r(m.displayName,d);return a(o,e(e({round:u,display:h,className:b},x),{},{children:a(t,e(e({className:"text",size:u?10:12,weight:u?'bolder':'normal',lineHeight:"s",content:'string'==typeof p?p:void 0},c),{},{children:l||p}))}))}m.displayName='Badge';export{m as Badge};
2
2
  //# sourceMappingURL=Badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { Color } from '../../mixins/color'\nimport { Display } from '../../mixins/display'\nimport { BaseProps } from '../../shared/interfaces'\nimport { Text, TextProps } from './../Text/Text'\nimport * as Styled from './style'\n\nexport interface BadgeProps extends BaseProps, Color, Display {\n /**\n * Children react node\n */\n children?: React.ReactNode\n content?: string | React.ReactNode\n textProps?: TextProps\n /** Make badge round */\n round?: string\n}\n\nBadge.displayName = 'Badge'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n */\nexport function Badge({ children, content, textProps, round, display = 'inline-block', ...restProps }: BadgeProps) {\n return (\n <Styled.Root round={round} display={display} {...restProps}>\n <Text\n className='text'\n size={round ? 10 : 12}\n weight={round ? 'bolder' : 'normal'}\n lineHeight='s'\n content={typeof content === 'string' ? content : undefined}\n {...textProps}\n >\n {children || content}\n </Text>\n </Styled.Root>\n )\n}\n"],"names":["Badge","_ref","children","content","textProps","round","display","restProps","_objectWithoutProperties","_excluded","_jsx","Styled.Root","_objectSpread","Text","className","size","weight","lineHeight","displayName"],"mappings":"sSAyBO,SAASA,EAAmGC,GAAA,IAA7FC,SAAEA,EAAFC,QAAYA,EAAZC,UAAqBA,EAArBC,MAAgCA,EAAhCC,QAAuCA,EAAU,gBAA4CL,EAAzBM,EAAyBC,EAAAP,EAAAQ,GACjH,OACEC,EAACC,EAADC,EAAAA,EAAA,CAAaP,MAAOA,EAAOC,QAASA,GAAaC,GAAjD,GAAA,CAAAL,SACEQ,EAACG,EAADD,EAAAA,EAAA,CACEE,UAAU,OACVC,KAAMV,EAAQ,GAAK,GACnBW,OAAQX,EAAQ,SAAW,SAC3BY,WAAW,IACXd,QAA4B,iBAAZA,EAAuBA,OAAAA,GACnCC,GANN,GAAA,CAAAF,SAQGA,GAAYC,QAnBrBH,EAAMkB,YAAc"}
1
+ {"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { useClassname } from 'hooks/useClassname'\nimport { Color } from '../../mixins/color'\nimport { Display } from '../../mixins/display'\nimport { BaseProps } from '../../shared/interfaces'\nimport { Text, TextProps } from './../Text/Text'\nimport * as Styled from './style'\n\nexport interface BadgeProps extends BaseProps, Color, Display {\n /**\n * Children react node\n */\n children?: React.ReactNode\n content?: string | React.ReactNode\n textProps?: TextProps\n /** Make badge round */\n round?: string\n}\n\nBadge.displayName = 'Badge'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n */\nexport function Badge({\n children,\n content,\n className,\n textProps,\n round,\n display = 'inline-block',\n ...restProps\n}: BadgeProps) {\n const _className = useClassname(Badge.displayName, className)\n return (\n <Styled.Root round={round} display={display} className={_className} {...restProps}>\n <Text\n className='text'\n size={round ? 10 : 12}\n weight={round ? 'bolder' : 'normal'}\n lineHeight='s'\n content={typeof content === 'string' ? content : undefined}\n {...textProps}\n >\n {children || content}\n </Text>\n </Styled.Root>\n )\n}\n"],"names":["Badge","_ref","children","content","className","textProps","round","display","restProps","_objectWithoutProperties","_excluded","_className","useClassname","displayName","_jsx","Styled.Root","_objectSpread","Text","size","weight","lineHeight","undefined"],"mappings":"6WA0BO,SAASA,EAQDC,GAAA,IAROC,SACpBA,EADoBC,QAEpBA,EAFoBC,UAGpBA,EAHoBC,UAIpBA,EAJoBC,MAKpBA,EALoBC,QAMpBA,EAAU,gBAEGN,EADVO,EACUC,EAAAR,EAAAS,GACb,IAAMC,EAAaC,EAAaZ,EAAMa,YAAaT,GACnD,OACEU,EAACC,EAADC,EAAAA,EAAA,CAAaV,MAAOA,EAAOC,QAASA,EAASH,UAAWO,GAAgBH,GAAxE,GAAA,CAAAN,SACEY,EAACG,EAADD,EAAAA,EAAA,CACEZ,UAAU,OACVc,KAAMZ,EAAQ,GAAK,GACnBa,OAAQb,EAAQ,SAAW,SAC3Bc,WAAW,IACXjB,QAA4B,iBAAZA,EAAuBA,OAAUkB,GAC7ChB,GANN,GAAA,CAAAH,SAQGA,GAAYC,QA5BrBH,EAAMa,YAAc"}
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/esm/objectSpread2';import r from'@babel/runtime/helpers/esm/objectWithoutProperties';import{Link as t}from'react-router-dom';import{Root as o,Content as a}from'./style.js';import{PROPS_BY_SIZE as i,PRESETS as n}from'./default.js';import{jsxs as s,jsx as d}from'react/jsx-runtime';var l=["children","disabled","href","to","as","target","onClick","ref","icon","type","innerRef"];function m(m){var{children:p,disabled:f,href:c,to:u,as:b,target:y,onClick:h,ref:v,icon:j,type:g,innerRef:x}=m,P=r(m,l);var R=b||(f?'button':c?'a':u?t:'button');var S='a'!==R||f?{}:{href:c||u,target:y};var k='string'==typeof R||f?{}:{to:u||c};var C=P.size&&!P.round&&i[P.size]||{};var z=(e=>e.primary?n.primary:e.secondary?n.secondary:n.default)(m);return s(o,e(e(e(e(e(e({as:R,type:'button'===R?g:void 0,onClick:f||P.loading?void 0:h},C),S),k),z),P),{},{disabled:f,ref:v||x,children:[j&&d("span",{className:"icon",children:j}),p&&d(a,{children:p})]}))}m.defaultProps={size:'m',rounded:!0,display:'inline-flex',type:'button'},m.displayName='Button';export{m as Button};
1
+ import e from'@babel/runtime/helpers/esm/objectSpread2';import r from'@babel/runtime/helpers/esm/objectWithoutProperties';import{Link as a}from'react-router-dom';import{useClassname as t}from'../../hooks/useClassname.js';import{Root as s,Content as o}from'./style.js';import{PROPS_BY_SIZE as i,PRESETS as n}from'./default.js';import{jsxs as l,jsx as m}from'react/jsx-runtime';var d=["children","className","disabled","href","to","as","target","onClick","ref","icon","type","innerRef"];function c(p){var{children:f,className:u,disabled:b,href:y,to:h,as:v,target:j,onClick:N,ref:C,icon:g,type:k,innerRef:x}=p,P=r(p,d);var R=v||(b?'button':y?'a':h?a:'button');var S='a'!==R||b?{}:{href:y||h,target:j};var _='string'==typeof R||b?{}:{to:h||y};var z=P.size&&!P.round&&i[P.size]||{};var B=(e=>e.primary?n.primary:e.secondary?n.secondary:n.default)(p);var E=t(c.displayName,u);return l(s,e(e(e(e(e(e({as:R,className:E,type:'button'===R?k:void 0,onClick:b||P.loading?void 0:N},z),S),_),B),P),{},{disabled:b,ref:C||x,children:[g&&m("span",{className:"icon",children:g}),f&&m(o,{className:"".concat(E,"__content"),children:f})]}))}c.defaultProps={size:'m',rounded:!0,display:'inline-flex',type:'button'},c.displayName='Button';export{c as Button};
2
2
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { Link } from 'react-router-dom'\nimport { Display } from '../../mixins/display'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps, Tooltiped } from '../../shared/interfaces'\nimport { Color } from '../../mixins/color'\nimport { Anchor } from '../../components/Anchor'\nimport * as Styled from './style'\nimport { PRESETS, PROPS_BY_SIZE } from './default'\n\nexport interface ButtonProps\n extends BaseProps,\n Tooltiped,\n Display,\n Color,\n Color<'fontColor'>,\n ResponsiveProperty<'padding'>,\n ResponsiveProperty<'paddingTop'>,\n ResponsiveProperty<'paddingRight'>,\n ResponsiveProperty<'paddingBottom'>,\n ResponsiveProperty<'paddingLeft'>,\n ResponsiveProperty<'margin'>,\n ResponsiveProperty<'marginTop'>,\n ResponsiveProperty<'marginRight'>,\n ResponsiveProperty<'marginBottom'>,\n ResponsiveProperty<'marginLeft'>,\n ResponsiveProperty<'fontSize'>,\n ResponsiveProperty<'fluid', boolean>,\n ResponsiveProperty<'width', 'auto' | 'l' | 'm' | 's' | 'xs' | number>,\n ResponsiveProperty<'height', 'l' | 'm' | 's' | 'xs' | number> {\n /**\n * Node type\n */\n as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor\n target?: string\n rel?: string\n /**\n * Link href\n */\n href?: string\n /**\n * React router link to\n */\n to?: string\n /**\n * Type for button element\n */\n type?: 'button' | 'submit' | 'reset'\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Basic button\n */\n basic?: boolean\n /**\n * Disabled\n */\n disabled?: boolean\n /**\n * Is primary\n */\n primary?: boolean\n /**\n * Is secondary\n */\n secondary?: boolean\n /**\n * Is inverted\n */\n inverted?: boolean\n /**\n * Is rounded\n */\n rounded?: boolean\n /**\n * Is round (in a shape of circle)\n */\n round?: boolean\n /**\n * Indicates if there should not be any margin\n * between this button and the previous one\n */\n noSpacing?: boolean\n /**\n * Is in loading state\n */\n loading?: boolean\n /**\n * Button icon\n */\n icon?: React.ReactNode\n /** On click callback */\n onClick?: () => void\n /** Function to make ref */\n ref?: React.LegacyRef<HTMLDivElement>\n /**\n * Size\n */\n size?: 'l' | 'm' | 's' | 'xs'\n}\n\nButton.defaultProps = {\n size: 'm',\n rounded: true,\n display: 'inline-flex',\n type: 'button',\n}\n\nButton.displayName = 'Button'\n\nconst extractPresetByProps = (props: ButtonProps): Partial<ButtonProps> => {\n if (props.primary) return PRESETS.primary\n if (props.secondary) return PRESETS.secondary\n return PRESETS.default\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`Tooltiped`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Color<'fontColor'>`](#/Миксины)\n * - [`ResponsiveProperty<'padding'>`](#/Миксины)\n * - [`ResponsiveProperty<'paddingTop'>`](#/Миксины)\n * - [`ResponsiveProperty<'paddingRight'>`](#/Миксины)\n * - [`ResponsiveProperty<'paddingBottom'>`](#/Миксины)\n * - [`ResponsiveProperty<'paddingLeft'>`](#/Миксины)\n * - [`ResponsiveProperty<'margin'>`](#/Миксины)\n * - [`ResponsiveProperty<'marginTop'>`](#/Миксины)\n * - [`ResponsiveProperty<'marginRight'>`](#/Миксины)\n * - [`ResponsiveProperty<'marginBottom'>`](#/Миксины)\n * - [`ResponsiveProperty<'marginLeft'>`](#/Миксины)\n * - [`ResponsiveProperty<'fontSize'>`](#/Миксины)\n * - [`ResponsiveProperty<'fluid', boolean>`](#/Миксины)\n * - [`ResponsiveProperty<'width', 'auto' | 'l' | 'm' | 's' | 'xs' | number>`](#/Миксины)\n * - [`ResponsiveProperty<'height', 'l' | 'm' | 's' | 'xs' | number>`](#/Миксины)\n */\nexport function Button(props: ButtonProps) {\n const { children, disabled, href, to, as, target, onClick, ref, icon, type, innerRef, ...restProps } = props\n\n const _as = as || (disabled ? 'button' : href ? 'a' : to ? Link : 'button')\n const aProps = _as === 'a' && !disabled ? { href: href || to, target } : {}\n const linkProps = typeof _as !== 'string' && !disabled ? { to: to || href } : {}\n const propsBySize: Partial<ButtonProps> =\n restProps.size && !restProps.round ? PROPS_BY_SIZE[restProps.size] || {} : {}\n const presetProps: Partial<ButtonProps> = extractPresetByProps(props)\n\n return (\n <Styled.Root\n as={_as}\n type={_as === 'button' ? type : undefined}\n onClick={disabled || restProps.loading ? undefined : onClick}\n {...propsBySize}\n {...aProps}\n {...linkProps}\n {...presetProps}\n {...restProps}\n disabled={disabled}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={(ref || innerRef) as any}\n >\n {icon && <span className='icon'>{icon}</span>}\n {children && <Styled.Content>{children}</Styled.Content>}\n </Styled.Root>\n )\n}\n"],"names":["Button","props","children","disabled","href","to","as","target","onClick","ref","icon","type","innerRef","restProps","_excluded","_as","Link","aProps","linkProps","propsBySize","size","round","PROPS_BY_SIZE","presetProps","primary","PRESETS","secondary","default","_jsxs","Styled.Root","_objectSpread","loading","_jsx","className","Styled.Content","defaultProps","rounded","display","displayName"],"mappings":"8ZA2IO,SAASA,EAAOC,GACrB,IAAMC,SAAEA,EAAFC,SAAYA,EAAZC,KAAsBA,EAAtBC,GAA4BA,EAA5BC,GAAgCA,EAAhCC,OAAoCA,EAApCC,QAA4CA,EAA5CC,IAAqDA,EAArDC,KAA0DA,EAA1DC,KAAgEA,EAAhEC,SAAsEA,GAA2BX,EAAdY,IAAcZ,EAAvGa,GAEA,IAAMC,EAAMT,IAAOH,EAAW,SAAWC,EAAO,IAAMC,EAAKW,EAAO,UAClE,IAAMC,EAAiB,MAARF,GAAgBZ,EAA0C,GAA/B,CAAEC,KAAMA,GAAQC,EAAIE,OAAAA,GAC9D,IAAMW,EAA2B,iBAARH,GAAqBZ,EAAgC,GAArB,CAAEE,GAAIA,GAAMD,GACrE,IAAMe,EACJN,EAAUO,OAASP,EAAUQ,OAAQC,EAAcT,EAAUO,OAAc,GAC7E,IAAMG,EApCsBtB,CAAAA,GACxBA,EAAMuB,QAAgBC,EAAQD,QAC9BvB,EAAMyB,UAAkBD,EAAQC,UAC7BD,EAAQE,QAHa1B,CAoCmCA,GAE/D,OACE2B,EAACC,EAADC,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,EAAA,CACExB,GAAIS,EACJJ,KAAc,WAARI,EAAmBJ,OAAAA,EACzBH,QAASL,GAAYU,EAAUkB,aAAAA,EAAsBvB,GACjDW,GACAF,GACAC,GACAK,GACAV,GARN,GAAA,CASEV,SAAUA,EAEVM,IAAMA,GAAOG,EAXfV,SAAA,CAaGQ,GAAQsB,EAAA,OAAA,CAAMC,UAAU,OAAhB/B,SAAwBQ,IAChCR,GAAY8B,EAACE,EAAD,CAAAhC,SAAiBA,QA9DpCF,EAAOmC,aAAe,CACpBf,KAAM,IACNgB,SAAAA,EACAC,QAAS,cACT1B,KAAM,UAGRX,EAAOsC,YAAc"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { Display } from '../../mixins/display'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps, Tooltiped } from '../../shared/interfaces'\nimport { Color } from '../../mixins/color'\nimport { Anchor } from '../../components/Anchor'\nimport * as Styled from './style'\nimport { PRESETS, PROPS_BY_SIZE } from './default'\n\nexport interface ButtonProps\n extends BaseProps,\n Tooltiped,\n Display,\n Color,\n Color<'fontColor'>,\n ResponsiveProperty<'padding'>,\n ResponsiveProperty<'paddingTop'>,\n ResponsiveProperty<'paddingRight'>,\n ResponsiveProperty<'paddingBottom'>,\n ResponsiveProperty<'paddingLeft'>,\n ResponsiveProperty<'margin'>,\n ResponsiveProperty<'marginTop'>,\n ResponsiveProperty<'marginRight'>,\n ResponsiveProperty<'marginBottom'>,\n ResponsiveProperty<'marginLeft'>,\n ResponsiveProperty<'fontSize'>,\n ResponsiveProperty<'fluid', boolean>,\n ResponsiveProperty<'width', 'auto' | 'l' | 'm' | 's' | 'xs' | number>,\n ResponsiveProperty<'height', 'l' | 'm' | 's' | 'xs' | number> {\n /**\n * Node type\n */\n as?: 'div' | 'span' | 'a' | 'button' | typeof Link | typeof Anchor\n target?: string\n rel?: string\n /**\n * Link href\n */\n href?: string\n /**\n * React router link to\n */\n to?: string\n /**\n * Type for button element\n */\n type?: 'button' | 'submit' | 'reset'\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Basic button\n */\n basic?: boolean\n /**\n * Disabled\n */\n disabled?: boolean\n /**\n * Is primary\n */\n primary?: boolean\n /**\n * Is secondary\n */\n secondary?: boolean\n /**\n * Is inverted\n */\n inverted?: boolean\n /**\n * Is rounded\n */\n rounded?: boolean\n /**\n * Is round (in a shape of circle)\n */\n round?: boolean\n /**\n * Indicates if there should not be any margin\n * between this button and the previous one\n */\n noSpacing?: boolean\n /**\n * Is in loading state\n */\n loading?: boolean\n /**\n * Button icon\n */\n icon?: React.ReactNode\n /** On click callback */\n onClick?: () => void\n /** Function to make ref */\n ref?: React.LegacyRef<HTMLDivElement>\n /**\n * Size\n */\n size?: 'l' | 'm' | 's' | 'xs'\n}\n\nButton.defaultProps = {\n size: 'm',\n rounded: true,\n display: 'inline-flex',\n type: 'button',\n}\n\nButton.displayName = 'Button'\n\nconst extractPresetByProps = (props: ButtonProps): Partial<ButtonProps> => {\n if (props.primary) return PRESETS.primary\n if (props.secondary) return PRESETS.secondary\n return PRESETS.default\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`Tooltiped`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Color<'fontColor'>`](#/Миксины)\n * - [`ResponsiveProperty<'padding'>`](#/Миксины)\n * - [`ResponsiveProperty<'paddingTop'>`](#/Миксины)\n * - [`ResponsiveProperty<'paddingRight'>`](#/Миксины)\n * - [`ResponsiveProperty<'paddingBottom'>`](#/Миксины)\n * - [`ResponsiveProperty<'paddingLeft'>`](#/Миксины)\n * - [`ResponsiveProperty<'margin'>`](#/Миксины)\n * - [`ResponsiveProperty<'marginTop'>`](#/Миксины)\n * - [`ResponsiveProperty<'marginRight'>`](#/Миксины)\n * - [`ResponsiveProperty<'marginBottom'>`](#/Миксины)\n * - [`ResponsiveProperty<'marginLeft'>`](#/Миксины)\n * - [`ResponsiveProperty<'fontSize'>`](#/Миксины)\n * - [`ResponsiveProperty<'fluid', boolean>`](#/Миксины)\n * - [`ResponsiveProperty<'width', 'auto' | 'l' | 'm' | 's' | 'xs' | number>`](#/Миксины)\n * - [`ResponsiveProperty<'height', 'l' | 'm' | 's' | 'xs' | number>`](#/Миксины)\n */\nexport function Button(props: ButtonProps) {\n const { children, className, disabled, href, to, as, target, onClick, ref, icon, type, innerRef, ...restProps } =\n props\n\n const _as = as || (disabled ? 'button' : href ? 'a' : to ? Link : 'button')\n const aProps = _as === 'a' && !disabled ? { href: href || to, target } : {}\n const linkProps = typeof _as !== 'string' && !disabled ? { to: to || href } : {}\n const propsBySize: Partial<ButtonProps> =\n restProps.size && !restProps.round ? PROPS_BY_SIZE[restProps.size] || {} : {}\n const presetProps: Partial<ButtonProps> = extractPresetByProps(props)\n const _className = useClassname(Button.displayName, className)\n\n return (\n <Styled.Root\n as={_as}\n className={_className}\n type={_as === 'button' ? type : undefined}\n onClick={disabled || restProps.loading ? undefined : onClick}\n {...propsBySize}\n {...aProps}\n {...linkProps}\n {...presetProps}\n {...restProps}\n disabled={disabled}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={(ref || innerRef) as any}\n >\n {icon && <span className='icon'>{icon}</span>}\n {children && <Styled.Content className={`${_className}__content`}>{children}</Styled.Content>}\n </Styled.Root>\n )\n}\n"],"names":["Button","props","children","className","disabled","href","to","as","target","onClick","ref","icon","type","innerRef","restProps","_excluded","_as","Link","aProps","linkProps","propsBySize","size","round","PROPS_BY_SIZE","presetProps","primary","PRESETS","secondary","default","_className","useClassname","displayName","_jsxs","Styled.Root","_objectSpread","loading","_jsx","Styled.Content","concat","defaultProps","rounded","display"],"mappings":"qeA4IO,SAASA,EAAOC,GACrB,IAAMC,SAAEA,EAAFC,UAAYA,EAAZC,SAAuBA,EAAvBC,KAAiCA,EAAjCC,GAAuCA,EAAvCC,GAA2CA,EAA3CC,OAA+CA,EAA/CC,QAAuDA,EAAvDC,IAAgEA,EAAhEC,KAAqEA,EAArEC,KAA2EA,EAA3EC,SAAiFA,GACrFZ,EADkGa,IAClGb,EADFc,GAGA,IAAMC,EAAMT,IAAOH,EAAW,SAAWC,EAAO,IAAMC,EAAKW,EAAO,UAClE,IAAMC,EAAiB,MAARF,GAAgBZ,EAA0C,GAA/B,CAAEC,KAAMA,GAAQC,EAAIE,OAAAA,GAC9D,IAAMW,EAA2B,iBAARH,GAAqBZ,EAAgC,GAArB,CAAEE,GAAIA,GAAMD,GACrE,IAAMe,EACJN,EAAUO,OAASP,EAAUQ,OAAQC,EAAcT,EAAUO,OAAc,GAC7E,IAAMG,EArCsBvB,CAAAA,GACxBA,EAAMwB,QAAgBC,EAAQD,QAC9BxB,EAAM0B,UAAkBD,EAAQC,UAC7BD,EAAQE,QAHa3B,CAqCmCA,GAC/D,IAAM4B,EAAaC,EAAa9B,EAAO+B,YAAa5B,GAEpD,OACE6B,EAACC,EAADC,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,EAAA,CACE3B,GAAIS,EACJb,UAAW0B,EACXjB,KAAc,WAARI,EAAmBJ,OAAAA,EACzBH,QAASL,GAAYU,EAAUqB,eAAsB1B,GACjDW,GACAF,GACAC,GACAK,GACAV,GATN,GAAA,CAUEV,SAAUA,EAEVM,IAAMA,GAAOG,EAZfX,SAAA,CAcGS,GAAQyB,EAAA,OAAA,CAAMjC,UAAU,OAAhBD,SAAwBS,IAChCT,GAAYkC,EAACC,EAAD,CAAgBlC,UAAS,GAAAmC,OAAKT,EAA9B,aAAA3B,SAAsDA,QAjEzEF,EAAOuC,aAAe,CACpBlB,KAAM,IACNmB,WACAC,QAAS,cACT7B,KAAM,UAGRZ,EAAO+B,YAAc"}
@@ -1,2 +1,2 @@
1
- import{Root as s}from'./style.js';import{defaultIcons as e}from'./icons.js';export{IconNames}from'./icons.js';import{jsxs as i,jsx as o}from'react/jsx-runtime';function l(l){var{name:n,icon:r,svg:z,pointer:t,color:a,size:c,sizeXS:m,sizeS:p,sizeM:L,sizeL:S,sizeXL:X,className:d,style:u,vAlign:y,children:f}=l;return n&&e[n]?i(s,{vAlign:y,color:a,pointer:t,className:d,size:c,sizeXS:m,sizeS:p,sizeM:L,sizeL:S,sizeXL:X,style:u,children:[o(e[n],{}),f]}):z?o(s,{vAlign:y,color:a,pointer:t,className:d,size:c,sizeXS:m,sizeS:p,sizeM:L,sizeL:S,sizeXL:X,style:u,dangerouslySetInnerHTML:{__html:z||''},children:r||null}):i(s,{vAlign:y,color:a,pointer:t,className:d,size:c,sizeXS:m,sizeS:p,sizeM:L,sizeL:S,sizeXL:X,style:u,children:[r||null,f]})}l.displayName='Icon';export{l as Icon};
1
+ import s from'clsx';import{Root as e}from'./style.js';import{defaultIcons as i}from'./icons.js';export{IconNames}from'./icons.js';import{jsxs as o,jsx as n}from'react/jsx-runtime';function r(r){var{name:l,icon:c,svg:t,pointer:z,color:a,size:m,sizeXS:f,sizeS:p,sizeM:x,sizeL:L,sizeXL:S,className:u,style:X,vAlign:d,children:v}=r;if(l&&i[l]){var y=i[l];return o(e,{vAlign:d,color:a,pointer:z,className:s('fox-icon',u),size:m,sizeXS:f,sizeS:p,sizeM:x,sizeL:L,sizeXL:S,style:X,children:[n(y,{}),v]})}return t?n(e,{vAlign:d,color:a,pointer:z,className:s('fox-icon',u),size:m,sizeXS:f,sizeS:p,sizeM:x,sizeL:L,sizeXL:S,style:X,dangerouslySetInnerHTML:{__html:t||''},children:c||null}):o(e,{vAlign:d,color:a,pointer:z,className:s('fox-icon',u),size:m,sizeXS:f,sizeS:p,sizeM:x,sizeL:L,sizeXL:S,style:X,children:[c||null,v]})}r.displayName='Icon';export{r as Icon};
2
2
  //# sourceMappingURL=Icon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { Color } from '../../mixins/color'\nimport { VAlign } from '../../mixins/vAlign'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nimport { defaultIcons, IconNames } from './icons'\n\nexport interface IconProps extends BaseProps, Color, VAlign, ResponsiveProperty<'size'> {\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Name of default icon\n */\n name?: keyof typeof IconNames\n /**\n * Object with icon's svg. Use for custom icon insertion\n */\n svg?: string\n /**\n * Object with icon's svg. Use for custom icon insertion\n */\n icon?: React.ReactNode\n /**\n * Show pointer cursor on hover?\n */\n pointer?: boolean\n}\n\nIcon.displayName = 'Icon'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`VAlign`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Color<'fontColor'>`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Icon(props: IconProps) {\n const {\n name,\n icon,\n svg,\n pointer,\n color,\n size,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n className,\n style,\n vAlign,\n children,\n } = props\n\n if (name && defaultIcons[name]) {\n const Icon = defaultIcons[name]\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={className}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n >\n <Icon />\n {children}\n </Styled.Root>\n )\n }\n\n if (svg)\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={className}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n dangerouslySetInnerHTML={{ __html: svg || '' }}\n >\n {icon || null}\n </Styled.Root>\n )\n\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={className}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n >\n {icon || null}\n {children}\n </Styled.Root>\n )\n}\n\nexport { IconNames }\n"],"names":["Icon","props","name","icon","svg","pointer","color","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","style","vAlign","children","defaultIcons","_jsxs","Styled.Root","_jsx","dangerouslySetInnerHTML","__html","displayName"],"mappings":"gKAyCO,SAASA,EAAKC,GACnB,IAAMC,KACJA,EADIC,KAEJA,EAFIC,IAGJA,EAHIC,QAIJA,EAJIC,MAKJA,EALIC,KAMJA,EANIC,OAOJA,EAPIC,MAQJA,EARIC,MASJA,EATIC,MAUJA,EAVIC,OAWJA,EAXIC,UAYJA,EAZIC,MAaJA,EAbIC,OAcJA,EAdIC,SAeJA,GACEf,EAEJ,OAAIC,GAAQe,EAAaf,GAGrBgB,EAACC,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWA,EACXN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EAXTE,SAAA,CAaEI,EAfSH,EAAaf,GAExB,IAcGc,KAKHZ,EAEAgB,EAACD,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWA,EACXN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EACPO,wBAAyB,CAAEC,OAAQlB,GAAO,IAZ5CY,SAcGb,GAAQ,OAKbe,EAACC,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWA,EACXN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EAXTE,SAAA,CAaGb,GAAQ,KACRa,KAtFPhB,EAAKuB,YAAc"}
1
+ {"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import cx from 'clsx'\nimport { Color } from '../../mixins/color'\nimport { VAlign } from '../../mixins/vAlign'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nimport { defaultIcons, IconNames } from './icons'\n\nexport interface IconProps extends BaseProps, Color, VAlign, ResponsiveProperty<'size'> {\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Name of default icon\n */\n name?: keyof typeof IconNames\n /**\n * Object with icon's svg. Use for custom icon insertion\n */\n svg?: string\n /**\n * Object with icon's svg. Use for custom icon insertion\n */\n icon?: React.ReactNode\n /**\n * Show pointer cursor on hover?\n */\n pointer?: boolean\n}\n\nIcon.displayName = 'Icon'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`VAlign`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Color<'fontColor'>`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Icon(props: IconProps) {\n const {\n name,\n icon,\n svg,\n pointer,\n color,\n size,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n className,\n style,\n vAlign,\n children,\n } = props\n\n if (name && defaultIcons[name]) {\n const Icon = defaultIcons[name]\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={cx('fox-icon', className)}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n >\n <Icon />\n {children}\n </Styled.Root>\n )\n }\n\n if (svg)\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={cx('fox-icon', className)}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n dangerouslySetInnerHTML={{ __html: svg || '' }}\n >\n {icon || null}\n </Styled.Root>\n )\n\n return (\n <Styled.Root\n vAlign={vAlign}\n color={color}\n pointer={pointer}\n className={cx('fox-icon', className)}\n size={size}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n style={style}\n >\n {icon || null}\n {children}\n </Styled.Root>\n )\n}\n\nexport { IconNames }\n"],"names":["Icon","props","name","icon","svg","pointer","color","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","className","style","vAlign","children","defaultIcons","_jsxs","Styled.Root","cx","_jsx","_Icon","dangerouslySetInnerHTML","__html","displayName"],"mappings":"oLA0CO,SAASA,EAAKC,GACnB,IAAMC,KACJA,EADIC,KAEJA,EAFIC,IAGJA,EAHIC,QAIJA,EAJIC,MAKJA,EALIC,KAMJA,EANIC,OAOJA,EAPIC,MAQJA,EARIC,MASJA,EATIC,MAUJA,EAVIC,OAWJA,EAXIC,UAYJA,EAZIC,MAaJA,EAbIC,OAcJA,EAdIC,SAeJA,GACEf,EAEJ,GAAIC,GAAQe,EAAaf,GAAO,CAC9B,IAAMF,EAAOiB,EAAaf,GAC1B,OACEgB,EAACC,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWO,EAAG,WAAYP,GAC1BN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EAXTE,SAAA,CAaEK,EAACC,EAbH,IAcGN,KAKP,OAAIZ,EAEAiB,EAACF,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWO,EAAG,WAAYP,GAC1BN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EACPS,wBAAyB,CAAEC,OAAQpB,GAAO,IAZ5CY,SAcGb,GAAQ,OAKbe,EAACC,EAAD,CACEJ,OAAQA,EACRT,MAAOA,EACPD,QAASA,EACTQ,UAAWO,EAAG,WAAYP,GAC1BN,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRE,MAAOA,EAXTE,SAAA,CAaGb,GAAQ,KACRa,KAtFPhB,EAAKyB,YAAc"}
@@ -1,2 +1,2 @@
1
- import r from'@babel/runtime/helpers/esm/objectSpread2';import e from'@babel/runtime/helpers/esm/objectWithoutProperties';import{Root as o}from'./style.js';import{jsx as a}from'react/jsx-runtime';var t=["padding","rounded","shadow"];function d(d){var{padding:s="m",rounded:m=!0,shadow:p=!0}=d,i=e(d,t);return a(o,r({padding:s,rounded:m,shadow:p},i))}d.displayName='Paper';export{d as Paper};
1
+ import e from'@babel/runtime/helpers/esm/objectSpread2';import a from'@babel/runtime/helpers/esm/objectWithoutProperties';import{useClassname as s}from'../../hooks/useClassname.js';import{Root as r}from'./style.js';import{jsx as o}from'react/jsx-runtime';var m=["padding","rounded","shadow","className"];function t(d){var{padding:p="m",rounded:i=!0,shadow:n=!0,className:l}=d,u=a(d,m);var c=s(t.displayName,l);return o(r,e({padding:p,rounded:i,shadow:n,className:c},u))}t.displayName='Paper';export{t as Paper};
2
2
  //# sourceMappingURL=Paper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Paper.js","sources":["../../../../src/components/Paper/Paper.tsx"],"sourcesContent":["import { BaseProps } from '../../shared/interfaces'\nimport { Display } from '../../mixins/display'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { Color } from '../../mixins/color'\nimport * as Styled from './style'\n\nexport interface PaperProps extends BaseProps, Display, Color, ResponsiveProperty<'padding'> {\n /**\n * Paper content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Set to true to generate a circlular paper container\n */\n circle?: boolean\n /**\n * Paper with rounded corners\n */\n rounded?: boolean\n /**\n * Paper with shadow\n */\n shadow?: boolean\n /**\n * This number represents the zDepth of the paper shadow\n */\n zDepth?: false | 0 | 1 | 2 | 3 | 4\n /**\n * Text align\n */\n textAlign?: 'left' | 'center' | 'right'\n}\n\nPaper.displayName = 'Paper'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveProperty<'padding'>`](#/Миксины)\n */\nexport function Paper({ padding = 'm', rounded = true, shadow = true, ...props }: PaperProps) {\n return <Styled.Root padding={padding} rounded={rounded} shadow={shadow} {...props} />\n}\n"],"names":["Paper","_ref","padding","rounded","shadow","props","_objectWithoutProperties","_excluded","_jsx","Styled.Root","_objectSpread","displayName"],"mappings":"yOA6CO,SAASA,EAA8EC,GAAA,IAAxEC,QAAEA,EAAU,IAAZC,QAAiBA,GAAAA,EAAjBC,OAAiCA,GAAAA,GAAuCH,EAArBI,EAAqBC,EAAAL,EAAAM,GAC5F,OAAOC,EAACC,EAADC,EAAA,CAAaR,QAASA,EAASC,QAASA,EAASC,OAAQA,GAAYC,IAV9EL,EAAMW,YAAc"}
1
+ {"version":3,"file":"Paper.js","sources":["../../../../src/components/Paper/Paper.tsx"],"sourcesContent":["import { useClassname } from 'hooks/useClassname'\nimport { BaseProps } from '../../shared/interfaces'\nimport { Display } from '../../mixins/display'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { Color } from '../../mixins/color'\nimport * as Styled from './style'\n\nexport interface PaperProps extends BaseProps, Display, Color, ResponsiveProperty<'padding'> {\n /**\n * Paper content\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * Set to true to generate a circlular paper container\n */\n circle?: boolean\n /**\n * Paper with rounded corners\n */\n rounded?: boolean\n /**\n * Paper with shadow\n */\n shadow?: boolean\n /**\n * This number represents the zDepth of the paper shadow\n */\n zDepth?: false | 0 | 1 | 2 | 3 | 4\n /**\n * Text align\n */\n textAlign?: 'left' | 'center' | 'right'\n}\n\nPaper.displayName = 'Paper'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveProperty<'padding'>`](#/Миксины)\n */\nexport function Paper({ padding = 'm', rounded = true, shadow = true, className, ...props }: PaperProps) {\n const _className = useClassname(Paper.displayName, className)\n\n return <Styled.Root padding={padding} rounded={rounded} shadow={shadow} className={_className} {...props} />\n}\n"],"names":["Paper","_ref","padding","rounded","shadow","className","props","_objectWithoutProperties","_excluded","_className","useClassname","displayName","_jsx","Styled.Root","_objectSpread"],"mappings":"gTA8CO,SAASA,EAAyFC,GAAA,IAAnFC,QAAEA,EAAU,IAAZC,QAAiBA,GAAAA,EAAjBC,OAAiCA,GAAS,EAA1CC,UAAgDA,GAAmCJ,EAArBK,EAAqBC,EAAAN,EAAAO,GACvG,IAAMC,EAAaC,EAAaV,EAAMW,YAAaN,GAEnD,OAAOO,EAACC,EAADC,EAAA,CAAaZ,QAASA,EAASC,QAASA,EAASC,OAAQA,EAAQC,UAAWI,GAAgBH,IAZrGN,EAAMW,YAAc"}
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/esm/objectSpread2';import a from'@babel/runtime/helpers/esm/objectWithoutProperties';import{useState as r,useEffect as s,useCallback as l}from'react';import{RadioGroup as o}from'./Group.js';import{Root as i}from'./style.js';import{jsxs as t,jsx as c}from'react/jsx-runtime';var d=["children","disabled","error","id","name","onChange","size","value","label","className","style"];function m(o){var m=void 0===o.checked;var[n,h]=r(m?o.defaultChecked:o.checked);var{children:p,disabled:u,error:f,id:b,name:v,onChange:k,size:g,value:y,label:x,className:C,style:j}=o,w=a(o,d);s((()=>{m||n===o.checked||h(o.checked)}),[o.checked]);var N=l((e=>{e.stopPropagation(),'function'==typeof k&&k(e)}),[m]);var z=m?{defaultChecked:n}:{checked:n};return t(i,{className:C,style:j,disabled:u,checked:n,error:f,htmlFor:b||v,size:g,children:[c("input",e(e({},w),{},{id:b||v,name:v,type:"radio",onChange:N,value:y,disabled:u},z)),t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:[c("circle",{cx:"10",cy:"10",r:"9",stroke:"#727D8A",strokeWidth:"2",fill:"#fff"}),c("circle",{cx:"10",cy:"10",r:"5",fill:"#727D8A"})]}),(x||p)&&c("span",{className:"label",children:x||p})]})}m.defaultProps={disabled:!1,size:'medium',defaultChecked:!1,onChange:e=>console.log(e,e.target.value)},m.Group=o,m.displayName='Radio';export{m as Radio};
1
+ import e from'@babel/runtime/helpers/esm/objectSpread2';import a from'@babel/runtime/helpers/esm/objectWithoutProperties';import{useState as r,useEffect as s,useCallback as o}from'react';import{useClassname as l}from'../../hooks/useClassname.js';import{RadioGroup as i}from'./Group.js';import{Root as t}from'./style.js';import{jsxs as c,jsx as d}from'react/jsx-runtime';var m=["children","disabled","error","id","name","onChange","size","value","label","className","style"];function n(i){var h=void 0===i.checked;var[p,u]=r(h?i.defaultChecked:i.checked);var{children:f,disabled:b,error:v,id:k,name:g,onChange:y,size:C,value:j,label:x,className:N,style:w}=i,z=a(i,m);var R=l(n.displayName,N);s((()=>{h||p===i.checked||u(i.checked)}),[i.checked]);var G=o((e=>{e.stopPropagation(),'function'==typeof y&&y(e)}),[h]);var P=h?{defaultChecked:p}:{checked:p};return c(t,{className:R,style:w,disabled:b,checked:p,error:v,htmlFor:k||g,size:C,children:[d("input",e(e({},z),{},{id:k||g,name:g,type:"radio",onChange:G,value:j,disabled:b},P)),c("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:[d("circle",{cx:"10",cy:"10",r:"9",stroke:"#727D8A",strokeWidth:"2",fill:"#fff"}),d("circle",{cx:"10",cy:"10",r:"5",fill:"#727D8A"})]}),(x||f)&&d("span",{className:"label",children:x||f})]})}n.defaultProps={disabled:!1,size:'medium',defaultChecked:!1,onChange:e=>console.log(e,e.target.value)},n.Group=i,n.displayName='Radio';export{n as Radio};
2
2
  //# sourceMappingURL=Radio.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","sources":["../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\nimport { BaseProps } from '../../shared/interfaces'\nimport { RadioGroup } from './Group'\nimport * as Styled from './style'\n\ntype RadioInputHtmlAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>\n\nexport interface RadioProps extends BaseProps, RadioInputHtmlAttributes {\n /**\n * Field id\n */\n id?: string\n /**\n * Field name\n */\n name?: string\n /**\n * Radio label\n */\n label?: string\n /**\n * On change handler\n */\n onChange?(_e: React.ChangeEvent<HTMLInputElement>): void\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * A Radio can appear disabled and be unable to change states\n */\n disabled?: boolean\n /**\n * Field can show the data contains errors\n */\n error?: boolean\n /**\n * Whether or not Radio is checked\n */\n checked?: boolean\n defaultChecked?: boolean\n /**\n * Checkbox size\n */\n size?: 'small' | 'medium' | 'large'\n /**\n * Value\n */\n value?: string | number\n}\n\nRadio.defaultProps = {\n disabled: false,\n size: 'medium',\n defaultChecked: false,\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => console.log(e, e.target.value), // eslint-disable-line no-console\n}\n\nRadio.Group = RadioGroup\nRadio.displayName = 'Radio'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - `React.InputHTMLAttributes<HTMLInputElement>`\n */\nexport function Radio(props: typeof Radio.defaultProps & RadioProps) {\n const uncontrolled = props.checked === undefined\n const [checkedInput, setChecked] = useState(uncontrolled ? props.defaultChecked : props.checked)\n\n const { children, disabled, error, id, name, onChange, size, value, label, className, style, ...anotherProps } = props\n\n useEffect(() => {\n if (!uncontrolled && checkedInput !== props.checked) setChecked(props.checked)\n }, [props.checked])\n\n const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = useCallback(\n (e) => {\n e.stopPropagation()\n if (typeof onChange === 'function') onChange(e)\n },\n [uncontrolled]\n )\n\n const inputProps = uncontrolled ? { defaultChecked: checkedInput } : { checked: checkedInput }\n\n return (\n <Styled.Root\n className={className}\n style={style}\n disabled={disabled}\n checked={checkedInput}\n error={error}\n htmlFor={id || name}\n size={size}\n >\n <input\n {...anotherProps}\n id={id || name}\n name={name}\n type='radio'\n onChange={handleOnChange}\n value={value}\n disabled={disabled}\n {...inputProps}\n />\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'>\n <circle cx='10' cy='10' r='9' stroke='#727D8A' strokeWidth='2' fill='#fff' />\n <circle cx='10' cy='10' r='5' fill='#727D8A' />\n </svg>\n {(label || children) && <span className='label'>{label || children}</span>}\n </Styled.Root>\n )\n}\n"],"names":["Radio","props","uncontrolled","checked","checkedInput","setChecked","useState","defaultChecked","children","disabled","error","id","name","onChange","size","value","label","className","style","anotherProps","_excluded","useEffect","handleOnChange","useCallback","e","stopPropagation","inputProps","_jsxs","Styled.Root","htmlFor","_jsx","type","xmlns","viewBox","cx","cy","r","stroke","strokeWidth","fill","defaultProps","console","log","target","Group","RadioGroup","displayName"],"mappings":"+ZAkEO,SAASA,EAAMC,GACpB,IAAMC,WAAeD,EAAME,QAC3B,IAAOC,EAAcC,GAAcC,EAASJ,EAAeD,EAAMM,eAAiBN,EAAME,SAExF,IAAMK,SAAEA,EAAFC,SAAYA,EAAZC,MAAsBA,EAAtBC,GAA6BA,EAA7BC,KAAiCA,EAAjCC,SAAuCA,EAAvCC,KAAiDA,EAAjDC,MAAuDA,EAAvDC,MAA8DA,EAA9DC,UAAqEA,EAArEC,MAAgFA,GAA2BjB,EAAjBkB,IAAiBlB,EAAjHmB,GAEAC,QACOnB,GAAgBE,IAAiBH,EAAME,SAASE,EAAWJ,EAAME,WACrE,CAACF,EAAME,UAEV,IAAMmB,EAA6DC,GAChEC,IACCA,EAAEC,kBACsB,mBAAbZ,GAAyBA,EAASW,KAE/C,CAACtB,IAGH,IAAMwB,EAAaxB,EAAe,CAAEK,eAAgBH,GAAiB,CAAED,QAASC,GAEhF,OACEuB,EAACC,EAAD,CACEX,UAAWA,EACXC,MAAOA,EACPT,SAAUA,EACVN,QAASC,EACTM,MAAOA,EACPmB,QAASlB,GAAMC,EACfE,KAAMA,EAPRN,SAAA,CASEsB,iBACMX,GADN,GAAA,CAEER,GAAIA,GAAMC,EACVA,KAAMA,EACNmB,KAAK,QACLlB,SAAUS,EACVP,MAAOA,EACPN,SAAUA,GACNiB,IAENC,EAAA,MAAA,CAAKK,MAAM,6BAA6BC,QAAQ,YAAhDzB,SACE,CAAAsB,EAAA,SAAA,CAAQI,GAAG,KAAKC,GAAG,KAAKC,EAAE,IAAIC,OAAO,UAAUC,YAAY,IAAIC,KAAK,SACpET,EAAA,SAAA,CAAQI,GAAG,KAAKC,GAAG,KAAKC,EAAE,IAAIG,KAAK,gBAEnCvB,GAASR,IAAasB,EAAA,OAAA,CAAMb,UAAU,QAAhBT,SAAyBQ,GAASR,OA3DhER,EAAMwC,aAAe,CACnB/B,YACAK,KAAM,SACNP,gBAAAA,EACAM,SAAWW,GAA2CiB,QAAQC,IAAIlB,EAAGA,EAAEmB,OAAO5B,QAGhFf,EAAM4C,MAAQC,EACd7C,EAAM8C,YAAc"}
1
+ {"version":3,"file":"Radio.js","sources":["../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\nimport { useClassname } from 'hooks/useClassname'\nimport { BaseProps } from '../../shared/interfaces'\nimport { RadioGroup } from './Group'\nimport * as Styled from './style'\n\ntype RadioInputHtmlAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>\n\nexport interface RadioProps extends BaseProps, RadioInputHtmlAttributes {\n /**\n * Field id\n */\n id?: string\n /**\n * Field name\n */\n name?: string\n /**\n * Radio label\n */\n label?: string\n /**\n * On change handler\n */\n onChange?(_e: React.ChangeEvent<HTMLInputElement>): void\n /**\n * Children react node\n */\n children?: React.ReactNode\n /**\n * A Radio can appear disabled and be unable to change states\n */\n disabled?: boolean\n /**\n * Field can show the data contains errors\n */\n error?: boolean\n /**\n * Whether or not Radio is checked\n */\n checked?: boolean\n defaultChecked?: boolean\n /**\n * Checkbox size\n */\n size?: 'small' | 'medium' | 'large'\n /**\n * Value\n */\n value?: string | number\n}\n\nRadio.defaultProps = {\n disabled: false,\n size: 'medium',\n defaultChecked: false,\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => console.log(e, e.target.value), // eslint-disable-line no-console\n}\n\nRadio.Group = RadioGroup\nRadio.displayName = 'Radio'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - `React.InputHTMLAttributes<HTMLInputElement>`\n */\nexport function Radio(props: typeof Radio.defaultProps & RadioProps) {\n const uncontrolled = props.checked === undefined\n const [checkedInput, setChecked] = useState(uncontrolled ? props.defaultChecked : props.checked)\n\n const { children, disabled, error, id, name, onChange, size, value, label, className, style, ...anotherProps } = props\n const _className = useClassname(Radio.displayName, className)\n\n useEffect(() => {\n if (!uncontrolled && checkedInput !== props.checked) setChecked(props.checked)\n }, [props.checked])\n\n const handleOnChange: React.ChangeEventHandler<HTMLInputElement> = useCallback(\n (e) => {\n e.stopPropagation()\n if (typeof onChange === 'function') onChange(e)\n },\n [uncontrolled]\n )\n\n const inputProps = uncontrolled ? { defaultChecked: checkedInput } : { checked: checkedInput }\n\n return (\n <Styled.Root\n className={_className}\n style={style}\n disabled={disabled}\n checked={checkedInput}\n error={error}\n htmlFor={id || name}\n size={size}\n >\n <input\n {...anotherProps}\n id={id || name}\n name={name}\n type='radio'\n onChange={handleOnChange}\n value={value}\n disabled={disabled}\n {...inputProps}\n />\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'>\n <circle cx='10' cy='10' r='9' stroke='#727D8A' strokeWidth='2' fill='#fff' />\n <circle cx='10' cy='10' r='5' fill='#727D8A' />\n </svg>\n {(label || children) && <span className='label'>{label || children}</span>}\n </Styled.Root>\n )\n}\n"],"names":["Radio","props","uncontrolled","undefined","checked","checkedInput","setChecked","useState","defaultChecked","children","disabled","error","id","name","onChange","size","value","label","className","style","anotherProps","_excluded","_className","useClassname","displayName","useEffect","handleOnChange","useCallback","e","stopPropagation","inputProps","_jsxs","Styled.Root","htmlFor","_jsx","type","xmlns","viewBox","cx","cy","r","stroke","strokeWidth","fill","defaultProps","console","log","target","Group","RadioGroup"],"mappings":"0dAmEO,SAASA,EAAMC,GACpB,IAAMC,OAAiCC,IAAlBF,EAAMG,QAC3B,IAAOC,EAAcC,GAAcC,EAASL,EAAeD,EAAMO,eAAiBP,EAAMG,SAExF,IAAMK,SAAEA,EAAFC,SAAYA,EAAZC,MAAsBA,EAAtBC,GAA6BA,EAA7BC,KAAiCA,EAAjCC,SAAuCA,EAAvCC,KAAiDA,EAAjDC,MAAuDA,EAAvDC,MAA8DA,EAA9DC,UAAqEA,EAArEC,MAAgFA,GAA2BlB,EAAjBmB,IAAiBnB,EAAjHoB,GACA,IAAMC,EAAaC,EAAavB,EAAMwB,YAAaN,GAEnDO,GAAU,KACHvB,GAAgBG,IAAiBJ,EAAMG,SAASE,EAAWL,EAAMG,WACrE,CAACH,EAAMG,UAEV,IAAMsB,EAA6DC,GAChEC,IACCA,EAAEC,kBACsB,mBAAbf,GAAyBA,EAASc,KAE/C,CAAC1B,IAGH,IAAM4B,EAAa5B,EAAe,CAAEM,eAAgBH,GAAiB,CAAED,QAASC,GAEhF,OACE0B,EAACC,EAAD,CACEd,UAAWI,EACXH,MAAOA,EACPT,SAAUA,EACVN,QAASC,EACTM,MAAOA,EACPsB,QAASrB,GAAMC,EACfE,KAAMA,EAPRN,SAAA,CASEyB,iBACMd,GADN,GAAA,CAEER,GAAIA,GAAMC,EACVA,KAAMA,EACNsB,KAAK,QACLrB,SAAUY,EACVV,MAAOA,EACPN,SAAUA,GACNoB,IAENC,EAAA,MAAA,CAAKK,MAAM,6BAA6BC,QAAQ,YAAhD5B,SACE,CAAAyB,EAAA,SAAA,CAAQI,GAAG,KAAKC,GAAG,KAAKC,EAAE,IAAIC,OAAO,UAAUC,YAAY,IAAIC,KAAK,SACpET,EAAA,SAAA,CAAQI,GAAG,KAAKC,GAAG,KAAKC,EAAE,IAAIG,KAAK,gBAEnC1B,GAASR,IAAayB,EAAA,OAAA,CAAMhB,UAAU,QAAhBT,SAAyBQ,GAASR,OA5DhET,EAAM4C,aAAe,CACnBlC,UAAU,EACVK,KAAM,SACNP,gBAAgB,EAChBM,SAAWc,GAA2CiB,QAAQC,IAAIlB,EAAGA,EAAEmB,OAAO/B,QAGhFhB,EAAMgD,MAAQC,EACdjD,EAAMwB,YAAc"}
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/esm/objectSpread2';import a from'@babel/runtime/helpers/esm/objectWithoutProperties';import r,{AsyncCreatable as l,Async as t,Creatable as o}from'react-select';import{Root as s}from'./style.js';import{jsx as c}from'react/jsx-runtime';var m=["fluid","error","className","style"];function p(p){var{fluid:i,error:d,className:b,style:n}=p,u=a(p,m);return c(s,{className:b,style:n,error:d,fluid:i,children:c(p.loadOptions?p.allowCreate?l:t:p.allowCreate?o:r,e(e({},u),{},{promptTextCreator:e=>"Добавить \"".concat(e,"\"")}))})}p.defaultProps={allowCreate:!1,searchable:!0,clearable:!1,addLabelText:'Добавить "{label}"?',backspaceToRemoveMessage:'Нажмите клавишу Backspace, чтобы удалить {last label}',clearAllText:'Очистить все',clearValueText:'Очистить значение',noResultsText:'Результатов не найдено',placeholder:'Выбрать ...',searchPromptText:'Введите поисковый запрос',loadingPlaceholder:'Загрузка...',autoload:!0,loadOptions:!1},p.displayName='Select';export{p as Select};
1
+ import e from'@babel/runtime/helpers/esm/objectSpread2';import a from'@babel/runtime/helpers/esm/objectWithoutProperties';import r,{AsyncCreatable as l,Async as s,Creatable as t}from'react-select';import{useClassname as o}from'../../hooks/useClassname.js';import{Root as c}from'./style.js';import{jsx as m}from'react/jsx-runtime';var p=["fluid","error","className","style"];function i(d){var{fluid:n,error:u,className:b,style:f}=d,h=a(d,p);var x=o(i.displayName,b);return m(c,{className:x,style:f,error:u,fluid:n,children:m(d.loadOptions?d.allowCreate?l:s:d.allowCreate?t:r,e(e({},h),{},{promptTextCreator:e=>"Добавить \"".concat(e,"\"")}))})}i.defaultProps={allowCreate:!1,searchable:!0,clearable:!1,addLabelText:'Добавить "{label}"?',backspaceToRemoveMessage:'Нажмите клавишу Backspace, чтобы удалить {last label}',clearAllText:'Очистить все',clearValueText:'Очистить значение',noResultsText:'Результатов не найдено',placeholder:'Выбрать ...',searchPromptText:'Введите поисковый запрос',loadingPlaceholder:'Загрузка...',autoload:!0,loadOptions:!1},i.displayName='Select';export{i as Select};
2
2
  //# sourceMappingURL=Select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","sources":["../../../../src/components/Select/Select.tsx"],"sourcesContent":["import ReactSelect, { Async, AsyncCreatable, Creatable, ReactSelectProps } from 'react-select'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nexport interface SelectProps extends BaseProps, ReactSelectProps {\n fluid?: boolean\n error?: boolean\n}\n\nSelect.defaultProps = {\n allowCreate: false,\n searchable: true,\n clearable: false,\n addLabelText: 'Добавить \"{label}\"?',\n backspaceToRemoveMessage: 'Нажмите клавишу Backspace, чтобы удалить {last label}',\n clearAllText: 'Очистить все',\n clearValueText: 'Очистить значение',\n noResultsText: 'Результатов не найдено',\n placeholder: 'Выбрать ...',\n searchPromptText: 'Введите поисковый запрос',\n loadingPlaceholder: 'Загрузка...',\n autoload: true,\n loadOptions: false,\n}\n\nSelect.displayName = 'Select'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - `ReactSelectProps`\n */\nexport function Select(props: typeof Select.defaultProps & SelectProps) {\n const { fluid, error, className, style, ...reactSelectProps } = props\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const SelectElement: typeof ReactSelect & typeof Creatable = props.loadOptions\n ? props.allowCreate\n ? AsyncCreatable\n : Async\n : props.allowCreate\n ? Creatable\n : ReactSelect\n\n return (\n <Styled.Root className={className} style={style} error={error} fluid={fluid}>\n <SelectElement {...reactSelectProps} promptTextCreator={(label: string) => `Добавить \"${label}\"`} />\n </Styled.Root>\n )\n}\n"],"names":["Select","props","fluid","error","className","style","reactSelectProps","_objectWithoutProperties","_excluded","_jsx","Styled.Root","children","loadOptions","allowCreate","AsyncCreatable","Async","Creatable","ReactSelect","_objectSpread","promptTextCreator","label","concat","defaultProps","searchable","clearable","addLabelText","backspaceToRemoveMessage","clearAllText","clearValueText","noResultsText","placeholder","searchPromptText","loadingPlaceholder","autoload","displayName"],"mappings":"2TAgCO,SAASA,EAAOC,GACrB,IAAMC,MAAEA,EAAFC,MAASA,EAATC,UAAgBA,EAAhBC,MAA2BA,GAA+BJ,EAArBK,EAA3CC,EAAgEN,EAAhEO,GAYA,OACEC,EAACC,EAAD,CAAaN,UAAWA,EAAWC,MAAOA,EAAOF,MAAOA,EAAOD,MAAOA,EAAtES,SACEF,EAVyDR,EAAMW,YAC/DX,EAAMY,YACJC,EACAC,EACFd,EAAMY,YACNG,EACAC,EAIAC,EAAAA,EAAA,GAAmBZ,GAAnB,GAAA,CAAqCa,kBAAoBC,GAAD,cAAAC,OAAgCD,EAAhC,WAtC9DpB,EAAOsB,aAAe,CACpBT,aAAAA,EACAU,YAAAA,EACAC,WAAW,EACXC,aAAc,sBACdC,yBAA0B,wDAC1BC,aAAc,eACdC,eAAgB,oBAChBC,cAAe,yBACfC,YAAa,cACbC,iBAAkB,2BAClBC,mBAAoB,cACpBC,UAAAA,EACArB,aAAa,GAGfZ,EAAOkC,YAAc"}
1
+ {"version":3,"file":"Select.js","sources":["../../../../src/components/Select/Select.tsx"],"sourcesContent":["import ReactSelect, { Async, AsyncCreatable, Creatable, ReactSelectProps } from 'react-select'\nimport { useClassname } from 'hooks/useClassname'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nexport interface SelectProps extends BaseProps, ReactSelectProps {\n fluid?: boolean\n error?: boolean\n}\n\nSelect.defaultProps = {\n allowCreate: false,\n searchable: true,\n clearable: false,\n addLabelText: 'Добавить \"{label}\"?',\n backspaceToRemoveMessage: 'Нажмите клавишу Backspace, чтобы удалить {last label}',\n clearAllText: 'Очистить все',\n clearValueText: 'Очистить значение',\n noResultsText: 'Результатов не найдено',\n placeholder: 'Выбрать ...',\n searchPromptText: 'Введите поисковый запрос',\n loadingPlaceholder: 'Загрузка...',\n autoload: true,\n loadOptions: false,\n}\n\nSelect.displayName = 'Select'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - `ReactSelectProps`\n */\nexport function Select(props: typeof Select.defaultProps & SelectProps) {\n const { fluid, error, className, style, ...reactSelectProps } = props\n const _className = useClassname(Select.displayName, className)\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const SelectElement: typeof ReactSelect & typeof Creatable = props.loadOptions\n ? props.allowCreate\n ? AsyncCreatable\n : Async\n : props.allowCreate\n ? Creatable\n : ReactSelect\n\n return (\n <Styled.Root className={_className} style={style} error={error} fluid={fluid}>\n <SelectElement {...reactSelectProps} promptTextCreator={(label: string) => `Добавить \"${label}\"`} />\n </Styled.Root>\n )\n}\n"],"names":["Select","props","fluid","error","className","style","reactSelectProps","_excluded","_className","useClassname","displayName","_jsx","Styled.Root","children","loadOptions","allowCreate","AsyncCreatable","Async","Creatable","ReactSelect","_objectSpread","promptTextCreator","label","concat","defaultProps","searchable","clearable","addLabelText","backspaceToRemoveMessage","clearAllText","clearValueText","noResultsText","placeholder","searchPromptText","loadingPlaceholder","autoload"],"mappings":"sXAiCO,SAASA,EAAOC,GACrB,IAAMC,MAAEA,EAAFC,MAASA,EAATC,UAAgBA,EAAhBC,MAA2BA,GAA+BJ,EAArBK,IAAqBL,EAAhEM,GACA,IAAMC,EAAaC,EAAaT,EAAOU,YAAaN,GAYpD,OACEO,EAACC,EAAD,CAAaR,UAAWI,EAAYH,MAAOA,EAAOF,MAAOA,EAAOD,MAAOA,EAAvEW,SACEF,EAVyDV,EAAMa,YAC/Db,EAAMc,YACJC,EACAC,EACFhB,EAAMc,YACNG,EACAC,EAIAC,EAAAA,EAAA,GAAmBd,GAAnB,GAAA,CAAqCe,kBAAoBC,GAAD,cAAAC,OAAgCD,EAAhC,WAvC9DtB,EAAOwB,aAAe,CACpBT,aAAAA,EACAU,YAAY,EACZC,WAAW,EACXC,aAAc,sBACdC,yBAA0B,wDAC1BC,aAAc,eACdC,eAAgB,oBAChBC,cAAe,yBACfC,YAAa,cACbC,iBAAkB,2BAClBC,mBAAoB,cACpBC,UAAU,EACVrB,aAAa,GAGfd,EAAOU,YAAc"}
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/esm/objectSpread2';import{Root as r}from'./style.js';import{jsx as t}from'react/jsx-runtime';function o(o){return t(r,e({},o))}o.defaultProps={size:'m'},o.displayName='Spinner';export{o as Spinner};
1
+ import e from'@babel/runtime/helpers/esm/objectSpread2';import s from'@babel/runtime/helpers/esm/objectWithoutProperties';import{useClassname as r}from'../../hooks/useClassname.js';import{Root as a}from'./style.js';import{jsx as m}from'react/jsx-runtime';var o=["className"];function t(i){var{className:p}=i,l=s(i,o);var n=r(t.displayName,p);return m(a,e({className:n},l))}t.defaultProps={size:'m'},t.displayName='Spinner';export{t as Spinner};
2
2
  //# sourceMappingURL=Spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","sources":["../../../../src/components/Spinner/Spinner.tsx"],"sourcesContent":["import { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nexport interface SpinnerProps extends BaseProps, ResponsiveProperty<'size'> {\n /**\n * Size of spinner\n */\n size?: 'l' | 's' | 'm' | number\n /**\n * Vertically center the spinner inside 100vh container\n */\n fullscreen?: boolean\n /**\n * Inline. Has no top/bottom margins\n */\n inline?: boolean\n}\n\nSpinner.defaultProps = {\n size: 'm',\n}\n\nSpinner.displayName = 'Spinner'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Spinner(props: typeof Spinner.defaultProps & SpinnerProps) {\n return <Styled.Root {...props} />\n}\n"],"names":["Spinner","props","_jsx","Styled.Root","_objectSpread","defaultProps","size","displayName"],"mappings":"kIA8BO,SAASA,EAAQC,GACtB,OAAOC,EAACC,EAADC,EAAA,GAAiBH,IAZ1BD,EAAQK,aAAe,CACrBC,KAAM,KAGRN,EAAQO,YAAc"}
1
+ {"version":3,"file":"Spinner.js","sources":["../../../../src/components/Spinner/Spinner.tsx"],"sourcesContent":["import { useClassname } from 'hooks/useClassname'\nimport { ResponsiveProperty } from '../../mixins/responsive-property'\nimport { BaseProps } from '../../shared/interfaces'\nimport * as Styled from './style'\n\nexport interface SpinnerProps extends BaseProps, ResponsiveProperty<'size'> {\n /**\n * Size of spinner\n */\n size?: 'l' | 's' | 'm' | number\n /**\n * Vertically center the spinner inside 100vh container\n */\n fullscreen?: boolean\n /**\n * Inline. Has no top/bottom margins\n */\n inline?: boolean\n}\n\nSpinner.defaultProps = {\n size: 'm',\n}\n\nSpinner.displayName = 'Spinner'\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`ResponsiveProperty<'size'>`](#/Миксины)\n */\nexport function Spinner({ className, ...props }: typeof Spinner.defaultProps & SpinnerProps) {\n const _className = useClassname(Spinner.displayName, className)\n\n return <Styled.Root className={_className} {...props} />\n}\n"],"names":["Spinner","_ref","className","props","_objectWithoutProperties","_excluded","_className","useClassname","displayName","_jsx","Styled.Root","_objectSpread","defaultProps","size"],"mappings":"mRA+BO,SAASA,EAA6EC,GAAA,IAArEC,UAAEA,GAAmED,EAArDE,EAAqDC,EAAAH,EAAAI,GAC3F,IAAMC,EAAaC,EAAaP,EAAQQ,YAAaN,GAErD,OAAOO,EAACC,EAADC,EAAA,CAAaT,UAAWI,GAAgBH,IAdjDH,EAAQY,aAAe,CACrBC,KAAM,KAGRb,EAAQQ,YAAc"}
@@ -1,2 +1,2 @@
1
- import{TextHeading as e}from'../Text.Heading/Text.Heading.js';import{TextEllipse as i}from'../Text.Ellipse/Text.Ellipse.js';import{Root as s}from'./style.js';import{jsx as t}from'react/jsx-runtime';function l(e){var{as:i="div",children:l,weight:n="normal",content:a,textAlign:r,underlineLinks:o,className:m,style:z,lineHeight:d="m",fontStyle:g="normal",title:x,color:p,size:y="m",sizeXS:c,sizeS:L,sizeM:S,sizeL:h,sizeXL:T,display:f}=e;return t(s,l?{as:i,color:p,className:m,title:x,weight:n,lineHeight:d,textAlign:r,fontStyle:g,underlineLinks:o,size:y,sizeXS:c,sizeS:L,sizeM:S,sizeL:h,sizeXL:T,display:f,style:z,children:l}:{as:i,color:p,className:m,title:x,weight:n,lineHeight:d,textAlign:r,fontStyle:g,underlineLinks:o,size:y,sizeXS:c,sizeS:L,sizeM:S,sizeL:h,sizeXL:T,display:f,style:z,dangerouslySetInnerHTML:{__html:a||''}})}l.Heading=e,l.Ellipse=i,l.displayName='Text';export{l as Text};
1
+ import{TextHeading as e}from'../Text.Heading/Text.Heading.js';import{TextEllipse as s}from'../Text.Ellipse/Text.Ellipse.js';import{useClassname as i}from'../../hooks/useClassname.js';import{Root as t}from'./style.js';import{jsx as l}from'react/jsx-runtime';function n(e){var{as:s="div",children:a,weight:o="normal",content:r,textAlign:m,underlineLinks:z,className:d,style:p,lineHeight:g="m",fontStyle:x="normal",title:y,color:c,size:h="m",sizeXS:L,sizeS:S,sizeM:f,sizeL:u,sizeXL:T,display:H}=e;var j=i(n.displayName,d);return l(t,a?{as:s,color:c,className:j,title:y,weight:o,lineHeight:g,textAlign:m,fontStyle:x,underlineLinks:z,size:h,sizeXS:L,sizeS:S,sizeM:f,sizeL:u,sizeXL:T,display:H,style:p,children:a}:{as:s,color:c,className:j,title:y,weight:o,lineHeight:g,textAlign:m,fontStyle:x,underlineLinks:z,size:h,sizeXS:L,sizeS:S,sizeM:f,sizeL:u,sizeXL:T,display:H,style:p,dangerouslySetInnerHTML:{__html:r||''}})}n.Heading=e,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":"sMA6DO,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,EAZIC,KAaJA,EAAO,IAbHC,OAcJA,EAdIC,MAeJA,EAfIC,MAgBJA,EAhBIC,MAiBJA,EAjBIC,OAkBJA,EAlBIC,QAmBJA,GACEnB,EAEJ,OAEIoB,EAACC,EAFDnB,EAEA,CACED,GAAIA,EACJW,MAAOA,EACPL,UAAWA,EACXI,MAAOA,EACPR,OAAQA,EACRM,WAAYA,EACZJ,UAAWA,EACXK,UAAWA,EACXJ,eAAgBA,EAChBO,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRC,QAASA,EACTX,MAAOA,EAjBTN,SAmBGA,GAML,CACED,GAAIA,EACJW,MAAOA,EACPL,UAAWA,EACXI,MAAOA,EACPR,OAAQA,EACRM,WAAYA,EACZJ,UAAWA,EACXK,UAAWA,EACXJ,eAAgBA,EAChBO,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRC,QAASA,EACTX,MAAOA,EACPc,wBAAyB,CAAEC,OAAQnB,GAAW,MA/EpDL,EAAKyB,QAAUC,EACf1B,EAAK2B,QAAUC,EACf5B,EAAK6B,YAAc"}
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 { useClassname } from '../../hooks/useClassname'\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: origClassName,\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 const className = useClassname(Text.displayName, origClassName)\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","origClassName","style","lineHeight","fontStyle","title","color","size","sizeXS","sizeS","sizeM","sizeL","sizeXL","display","useClassname","displayName","_jsx","Styled.Root","dangerouslySetInnerHTML","__html","Heading","TextHeading","Ellipse","TextEllipse"],"mappings":"iQA8DO,SAASA,EAAKC,GACnB,IAAMC,GACJA,EAAK,MADDC,SAEJA,EAFIC,OAGJA,EAAS,SAHLC,QAIJA,EAJIC,UAKJA,EALIC,eAMJA,EACAC,UAAWC,EAPPC,MAQJA,EARIC,WASJA,EAAa,IATTC,UAUJA,EAAY,SAVRC,MAWJA,EAXIC,MAYJA,EAZIC,KAaJA,EAAO,IAbHC,OAcJA,EAdIC,MAeJA,EAfIC,MAgBJA,EAhBIC,MAiBJA,EAjBIC,OAkBJA,EAlBIC,QAmBJA,GACEpB,EAEJ,IAAMO,EAAYc,EAAatB,EAAKuB,YAAad,GAEjD,OAEIe,EAACC,EAFDtB,EAEA,CACED,GAAIA,EACJY,MAAOA,EACPN,UAAWA,EACXK,MAAOA,EACPT,OAAQA,EACRO,WAAYA,EACZL,UAAWA,EACXM,UAAWA,EACXL,eAAgBA,EAChBQ,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRC,QAASA,EACTX,MAAOA,EAjBTP,SAmBGA,GAML,CACED,GAAIA,EACJY,MAAOA,EACPN,UAAWA,EACXK,MAAOA,EACPT,OAAQA,EACRO,WAAYA,EACZL,UAAWA,EACXM,UAAWA,EACXL,eAAgBA,EAChBQ,KAAMA,EACNC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRC,QAASA,EACTX,MAAOA,EACPgB,wBAAyB,CAAEC,OAAQtB,GAAW,MAjFpDL,EAAK4B,QAAUC,EACf7B,EAAK8B,QAAUC,EACf/B,EAAKuB,YAAc"}
package/dts/index.d.ts CHANGED
@@ -323,6 +323,7 @@ interface Theme {
323
323
  modal: number;
324
324
  tooltip: number;
325
325
  };
326
+ classNamePrefix: string;
326
327
  }
327
328
  declare const theme: Theme;
328
329
 
@@ -994,7 +995,7 @@ interface BadgeProps extends BaseProps, Color, Display {
994
995
  * - [`Color`](#/Миксины)
995
996
  * - [`Display`](#/Миксины)
996
997
  */
997
- declare function Badge({ children, content, textProps, round, display, ...restProps }: BadgeProps): JSX.Element;
998
+ declare function Badge({ children, content, className, textProps, round, display, ...restProps }: BadgeProps): JSX.Element;
998
999
  declare namespace Badge {
999
1000
  var displayName: string;
1000
1001
  }
@@ -1252,7 +1253,7 @@ interface PaperProps extends BaseProps, Display, Color, ResponsiveProperty<'padd
1252
1253
  * - [`Color`](#/Миксины)
1253
1254
  * - [`ResponsiveProperty<'padding'>`](#/Миксины)
1254
1255
  */
1255
- declare function Paper({ padding, rounded, shadow, ...props }: PaperProps): JSX.Element;
1256
+ declare function Paper({ padding, rounded, shadow, className, ...props }: PaperProps): JSX.Element;
1256
1257
  declare namespace Paper {
1257
1258
  var displayName: string;
1258
1259
  }
@@ -1736,7 +1737,7 @@ interface SpinnerProps extends BaseProps, ResponsiveProperty<'size'> {
1736
1737
  * - [`BaseProps`](#/Миксины)
1737
1738
  * - [`ResponsiveProperty<'size'>`](#/Миксины)
1738
1739
  */
1739
- declare function Spinner(props: typeof Spinner.defaultProps & SpinnerProps): JSX.Element;
1740
+ declare function Spinner({ className, ...props }: typeof Spinner.defaultProps & SpinnerProps): JSX.Element;
1740
1741
  declare namespace Spinner {
1741
1742
  var defaultProps: {
1742
1743
  size: string;